ascii-art

Letters Made From Letters

半腔热情 提交于 2019-12-24 01:54:09
问题 I am new to python(version 3.4.) and I am wondering how I can make a code similar to this one: #block letters B1 = ("BBBB ") B2 = ("B B ") B3 = ("B B ") B4 = ("BBBB ") B5 = ("B B ") B6 = ("B B ") B7 = ("BBBB ") B = [B1, B2, B3, B4, B5, B6, B7] E1 = ("EEEEE ") E2 = ("E ") E3 = ("E ") E4 = ("EEEEE ") E5 = ("E ") E6 = ("E ") E7 = ("EEEEE ") E = [E1, E2, E3, E4, E5, E6, E7] N1 = ("N N") N2 = ("NN N") N3 = ("N N N") N4 = ("N N N") N5 = ("N N N") N6 = ("N NN") N7 = ("N N") N = [N1, N2, N3, N4, N5,

ASCII - Asciimatics - how to implement effects/screens into the code

我的未来我决定 提交于 2019-12-24 00:49:15
问题 Few posts ago somebody suggested me to look into Asciimatics library for Python. i'm trying to get my head around it, using: samples - https://github.com/peterbrittain/asciimatics/tree/master/samples documentation - https://asciimatics.readthedocs.io/en/stable/ Yet, as I'm novice, I'm still a bit confused about few quite basic things in it. I know, that by using effect array you can create layers of code that will overwrite information on the screen, based of their position in the array. The

Locate an ASCII art image inside a body of text with a certain toleration for error

跟風遠走 提交于 2019-12-20 21:22:58
问题 Are there any algorithms that would find the following ASCII-art image? + + +++ +++++++ ++ ++ ++ + ++ ++ +++ ++ ++ + ++ ++ ++ +++++++ +++ Inside the following body of text? complete_file_here + + + ++ + +++ + + + ++ + + ++++ + + + + + + +++ +++ + + + + ++ ++ ++ + ++ + + + + + + ++ + ++ + + + ++ ++ + + ++++++ + + + ++ + + + + ++ + + + + + + + + ++ + ++ + + + + +++ + ++ + + + +++ + + ++ + +++++ + + + + + + + + + + + + + + + + + + + + ++ + + + ++ + + + ++ I must highlight the ASCII art image in

Locate an ASCII art image inside a body of text with a certain toleration for error

早过忘川 提交于 2019-12-20 21:21:13
问题 Are there any algorithms that would find the following ASCII-art image? + + +++ +++++++ ++ ++ ++ + ++ ++ +++ ++ ++ + ++ ++ ++ +++++++ +++ Inside the following body of text? complete_file_here + + + ++ + +++ + + + ++ + + ++++ + + + + + + +++ +++ + + + + ++ ++ ++ + ++ + + + + + + ++ + ++ + + + ++ ++ + + ++++++ + + + ++ + + + + ++ + + + + + + + + ++ + ++ + + + + +++ + ++ + + + +++ + + ++ + +++++ + + + + + + + + + + + + + + + + + + + + ++ + + + ++ + + + ++ I must highlight the ASCII art image in

How to create ASCII animation in Windows Console application using C#?

爷,独闯天下 提交于 2019-12-20 08:39:20
问题 I would like it to display non-flickery animation like this awesome Linux command; sl http://www.youtube.com/watch?v=9GyMZKWjcYU I would appreciate a small & stupid example of say ... a fly. Thanks! 回答1: Just use Console.SetCursorPosition for moving the cursor to a certain position, then Console.Write a character. Before each frame you have to delete the previous one by overwriting it with spaces. Heres a little example I just built: class Program { static void Main(string[] args) { char[]

Reverse upside-down asterisk triangle

时间秒杀一切 提交于 2019-12-18 09:39:10
问题 I am trying to use nested for loops to ask the user for an integer and then the program will output a reverse, upside-down triangle, with the base of it having the number of asterisks and working its way down. It's supposed to look like this: ***** **** *** ** * The code I have: def pattern(): integer = requestInteger("Please enter a number") for number in range(0, integer): for variable in range(integer, 0, -1): if variable - 1 > number: sys.stdout.write(' ') else: sys.stdout.write('*') sys

How do I print this list vertically?

时光毁灭记忆、已成空白 提交于 2019-12-17 20:49:03
问题 Let's say I have this list of asterisks, and I say it to print this way: list = ['* *', '*', '* * *', '* * * * *', '* * * * * *', '* * * *'] for i in list: print i So here, the output is: * * * * * * * * * * * * * * * * * * * * * But I want the output to be vertical, like this: * * * * * * * * * * * * * * * * * * * * * Any tips on doing this? I've tried to conceptualize how to use things like list comprehension or for-loops for this, but haven't got it quite right. 回答1: myList = ['* *', '*',

Image to ASCII art conversion

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-17 03:21:12
问题 Prologue This subject pops up here on SO from time to time, but is removed usually because of being a poorly written question. I saw many such questions and then silence from the OP (usual low rep) when additional info is requested. From time to time if the input is good enough for me I decide to respond with an answer and it usually gets a few up-votes per day while active but then after a few weeks the question gets removed/deleted and all starts from the beginning. So I decided to write

SQL Challenge/Puzzle: How to create an ASCII art hierarchy tree with an SQL query?

匆匆过客 提交于 2019-12-13 06:38:12
问题 The initial motivation for this one, was to display Oracles' actual execution plans, saved in GV$SQL_PLAN, in a visual, clear way. I've attached my suggested solutions. Please feel free to add yours, as long as it fulfills the requirements. Please mention the database name your solution was written for. Requirements Input A table containing columns "id" (node's id) and "pid" (node's parent id). Output The result should be a an ASCII art graph (see example below) Each pair of "id" and "pid"

Ascii Art in Python not printing in one line

那年仲夏 提交于 2019-12-13 06:27:41
问题 s = [0,2,6,4,7,1,5,3] def row_top(): print("|--|--|--|--|--|--|--|--|") def cell_left(): print("| ", end = "") def solution(s): for i in range(8): row(s[i]) def cell_data(isQ): if isQ: print("X", end = "") return () else: print(" ", end = "") def row_data(c): for i in range(9): cell_left() cell_data(i == c) def row(c): row_top() row_data(c) print("\n") solution(s) I'm trying to make a chess board, but the cell left keeps printing in separate lines. Also the spaces in between the | is needed,