ascii-art

Ascii Art - Java [closed]

佐手、 提交于 2019-12-03 18:30:40
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 8 years ago . I want to make a program, where the user enters their name and the program generates an ascii picture of their name. Is it possible to do that without using 3rd party tools? What I came up with was to create each

HTML table to “graphical text” for code comments

青春壹個敷衍的年華 提交于 2019-12-03 15:36:27
Is there a tool (ideally command-line-based) that can help in converting the source to HTML tables into “graphical text” (think perhaps ASCII art for HTML tables) for use in code comments, as show below? For example, given the following HTML table source <TABLE BORDER=1> <CAPTION>A test table with merged cells</CAPTION> <TR><TH ROWSPAN=2><TH COLSPAN=2>Average <TH ROWSPAN=2>other<BR>category<TH>Misc <TR><TH>height<TH>weight <TR><TH ALIGN=LEFT>males<TD>1.9<TD>0.003 <TR><TH ALIGN=LEFT ROWSPAN=2>females<TD>1.7<TD>0.002 </TABLE> the tool would output something like the following to be embedded into

How can I display an image in the terminal?

。_饼干妹妹 提交于 2019-12-03 12:25:38
问题 Is there any sort of utility I can use to convert an image to ASCII and then print it in my terminal? I looked for one but couldn't seem to find any. 回答1: A program called cacaview allows you to do this. It is interactive, allowing you to pan, zoom, and change display modes. (Full size image) 回答2: Try using the Google-Ninja before asking! I found cacaview and aview. 回答3: more simply, you may use img2txt from the caca library ( cacaview is an image browser and opens a new window, which is not

ASCII art in HTML

為{幸葍}努か 提交于 2019-12-03 08:12:40
问题 What could I do to make it print like it looks in the HTML document in the web browser? <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Example</title> </head> <body> ###### # # ## # # ##### # ###### # # # # # ## ## # # # # ##### ## # # # ## # # # # ##### # ## ###### # # ##### # # # # # # # # # # # # ###### # # # # # # # ###### ###### </body> </html> Gives: # # #

minimizing overlap in random rectangles

拥有回忆 提交于 2019-12-03 06:45:22
I have a number of possibly overlapping rectangles, of random size and position within a fixed plane. Since these rectangles are random, some may not overlap: |----- | | |----| |----| | | |----| Some may overlap by just one corner: |-----| | |--|--| |--|--| | |-----| Some may be contained inside another rectangle: |----------------| | | | |-----| | | | | | | |-----| | |----------------| Some may pass through another rectangle: |----------------| | | |--|-------------------| | | | | |--|-------------------| |----------------| etc. I'm trying to find an algorithm that gives me a set of

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

拟墨画扇 提交于 2019-12-03 06:43:43
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 yellow which corresponds to the complete shape. See the picture attached: I have to search a file which

How can I display an image in the terminal?

随声附和 提交于 2019-12-03 03:43:06
Is there any sort of utility I can use to convert an image to ASCII and then print it in my terminal? I looked for one but couldn't seem to find any. A program called cacaview allows you to do this. It is interactive, allowing you to pan, zoom, and change display modes. ( Full size image ) Try using the Google-Ninja before asking! I found cacaview and aview . more simply, you may use img2txt from the caca library ( cacaview is an image browser and opens a new window, which is not what is asked here I guess); For instance : $ img2txt /Users/foo/pool/libs/ipython/docs/resources/ipynb_icon

Regarding a star pattern

落花浮王杯 提交于 2019-12-02 23:45:15
问题 I am trying to print below star pattern * *** ***** *** * I am using below logic to print : * *** ***** Code for first half: int i, j; for (i = 1; i <= 3; i++) { for (j = 1; j <= i; j++) System.out.print("*"); for (j = i - 1; j >= 1; j--) System.out.print("*"); System.out.println(); } But still I am not sure about how to print the whole structure. 回答1: You just have to write in reverse the loop, to start from the upperBound - 1. See the code bellow: int numberOfLines = 3; for (int i = 1; i <=

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

这一生的挚爱 提交于 2019-12-02 17:33:10
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! 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[] chars = new char[] { '.', '-', '+', '^', '°', '*' }; for (int i = 0; ; i++) { if (i != 0) { // Delete the

Regarding a star pattern

放肆的年华 提交于 2019-12-02 13:39:22
I am trying to print below star pattern * *** ***** *** * I am using below logic to print : * *** ***** Code for first half: int i, j; for (i = 1; i <= 3; i++) { for (j = 1; j <= i; j++) System.out.print("*"); for (j = i - 1; j >= 1; j--) System.out.print("*"); System.out.println(); } But still I am not sure about how to print the whole structure. Slimu You just have to write in reverse the loop, to start from the upperBound - 1. See the code bellow: int numberOfLines = 3; for (int i = 1; i <= numberOfLines; i++) { for (int j = 1; j < 2*i; j++){ System.out.print("*"); } System.out.println(); }