Questions tagged [console]

A mechanism for interacting with a computer operating system or software by typing commands to perform specific tasks

A terminal is an interactive text-mode or text-based user interface to a software application or operating system. It may be implemented as a character-mode application or embedded in a graphical user interface.

A terminal may be used as the main user interface or as a secondary interface for debugging and administrative tasks. The degree of interactivity varies widely between terminals.

A console is a particular type of terminal, usually a physical terminal or a terminal implemented directly by the kernel. The term "console" is often incorrectly used in place of "terminal".

14034 questions
99
votes
8 answers

How to get Rails.logger printing to the console/stdout when running rspec?

Same as title: How to get Rails.logger printing to the console/stdout when running rspec? Eg. Rails.logger.info "I WANT this to go to console/stdout when rspec is running" puts "Like how the puts function works" I still want Rails.logger to go to…
s12chung
  • 1,718
  • 1
  • 14
  • 29
98
votes
7 answers

Display an Image in a console application

I have a console application that manages images. Now I need something like a preview of the Images within the console application. Is there a way to display them in the console? Here is a comparison of the current character based…
Byyo
  • 2,163
  • 4
  • 21
  • 35
97
votes
6 answers

Command to close an application of console?

I need to close the console when the user selects a menu option. I tried using close() but it did not work.. how can I do this?
ale
  • 3,301
  • 10
  • 40
  • 48
97
votes
4 answers

Stop rails console from printing out the object at the end of a loop

If I, say, loop through all the instances of a given model and output something from each, at the end, irb will still print the entire object. If the object ends up taking hundreds of lines, it'll be a long way up before I see what I was actually…
dsp_099
  • 5,801
  • 17
  • 72
  • 128
95
votes
9 answers

Chrome/Firefox console.log always appends a line saying 'undefined'

Every time console.log is executed, a line saying undefined is appended to the output log. It happens in both Firefox and Chrome on Windows and Linux.
N. Chamaa
  • 1,507
  • 3
  • 12
  • 22
94
votes
9 answers

How can I align text in columns using Console.WriteLine?

I have a sort of column display, but the end two column's seem to not be aligning correctly. This is the code I have at the moment: Console.WriteLine("Customer name " + "sales " + "fee to be paid " + "70% value "…
Stephen Smith
  • 953
  • 1
  • 7
  • 6
94
votes
14 answers

Mirroring console output to a file

In a C# console application, is there a smart way to have console output mirrored to a text file? Currently I am just passing the same string to both Console.WriteLine and InstanceOfStreamWriter.WriteLine in a log method.
xyz
  • 27,223
  • 29
  • 105
  • 125
92
votes
9 answers

Logging data on device and retrieving the log

On a debug build in Xcode, regardless of whether I am using the simulator or an actual device, NSLog, printf, fprintf assert and NSAssert statements come out on the console If I now run a release build on the device (say I send a test flight build…
P i
  • 29,020
  • 36
  • 159
  • 267
92
votes
7 answers

Autocompletion in the MySQL command-line client

In Linux, and many other systems, when navigating the terminal you can press Tab to auto complete a directory or file name. I'm wondering if there is anything like that in the MySQL terminal. For example, if I want to get the description of…
Alan B. Dee
  • 5,490
  • 4
  • 34
  • 29
92
votes
12 answers

Show Console in Windows Application?

Is there a way to show the console in a Windows application? I want to do something like this: static class Program { [STAThread] static void Main(string[] args) { bool consoleMode = Boolean.Parse(args[0]); if (consoleMode)…
Ase
  • 1,105
  • 1
  • 9
  • 10
90
votes
13 answers

System.console() returns null

I was using readLine of BufferedReader to get input/new password from user, but wanted to mask the password so I am trying to use java.io.Console class. Problem is that System.console() returns null when an application is debugged in Eclipse. I am…
Gauls
  • 1,955
  • 6
  • 28
  • 44
90
votes
7 answers

rails - Redirecting console output to a file

On a bash console, if I do this: cd mydir ls -l > mydir.txt The > operator captures the standard input and redirects it to a file; so I get the listing of files in mydir.txt instead of in the standard output. Is there any way to do something…
kikito
  • 51,734
  • 32
  • 149
  • 189
89
votes
7 answers

How do I create a simple Qt console application in C++?

I was trying to create a simple console application to try out Qt's XML parser. I started a project in VS2008 and got this template: int main(int argc, char *argv[]) { QCoreApplication a(argc, argv); return a.exec(); } Since I don't need…
neuviemeporte
  • 6,310
  • 10
  • 49
  • 78
88
votes
13 answers

How to open Console window in Eclipse?

I accidentally closed the Console window in Eclipse, and now I can't see the result of my code being run. How do you open it again?
Evolutionary High
  • 1,257
  • 4
  • 14
  • 14
87
votes
11 answers

Is there any Python-like interactive console for Java?

I spent a lot of time programming in Java recently, and one thing I miss from scripting languages was the ability to test them in a console. To quickly test a java program, I have to edit a file, then turn it to bytecode and execute it. Even using…
Bite code
  • 578,959
  • 113
  • 301
  • 329