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
208
votes
23 answers

How to keep the console window open in Visual C++?

I'm starting out in Visual C++ and I'd like to know how to keep the console window. For instance this would be a typical "hello world" application: int _tmain(int argc, _TCHAR* argv[]) { cout << "Hello World"; return 0; } What's the line…
Raúl Roa
  • 12,061
  • 13
  • 49
  • 64
201
votes
8 answers

vbscript output to console

What is the command or the quickest way to output results to console using vbscript?
Regmi
  • 2,658
  • 4
  • 24
  • 32
198
votes
6 answers

Rails: How to list database tables/objects using the Rails console?

I was wondering if you could list/examine what databases/objects are available to you in the Rails console. I know you can see them using other tools, I am just curious. Thanks.
rtfminc
  • 6,243
  • 7
  • 36
  • 45
187
votes
7 answers

How to log data to the Flutter console?

I am a beginner and using IntelliJ IDEA, and I wanted to log data to the console? I tried print() and printDebug(), but none of my data were showing in the Flutter console.
179
votes
14 answers

Changing default encoding of Python?

I have many "can't encode" and "can't decode" problems with Python when I run my applications from the console. But in the Eclipse PyDev IDE, the default character encoding is set to UTF-8, and I'm fine. I searched around for setting the default…
Ali Nadalizadeh
  • 2,726
  • 3
  • 22
  • 24
178
votes
14 answers

How to clear the console using Java?

Can any body please tell me what code is used for clear the screen in Java? For example, in C++: system("CLS"); What code is used in Java to clear the screen?
sadia
  • 1,953
  • 5
  • 17
  • 17
176
votes
5 answers

Ruby on Rails console is hanging when loading

For whatever reason, the Ruby on Rails console refuses to start; it just hangs. I haven't made any changes to my code, and other projects using the same version of Ruby and Ruby on Rails have no issue. When I finally Ctrl + C I get this stack trace,…
theog
  • 2,062
  • 2
  • 14
  • 13
176
votes
19 answers

How can I compile and run C/C++ code in a Unix console or Mac terminal?

How can I compile/run C or C++ code in a Unix console or a Mac terminal?
P-A
  • 10,882
  • 8
  • 26
  • 19
175
votes
16 answers

Error in MySQL when setting default value for DATE or DATETIME

I'm running MySql Server 5.7.11 and this sentence: updated datetime NOT NULL DEFAULT '0000-00-00 00:00:00' is not working. Giving the error: ERROR 1067 (42000): Invalid default value for 'updated' But the following: updated datetime NOT NULL…
Evhz
  • 8,852
  • 9
  • 51
  • 69
174
votes
1 answer

How can I use "puts" to the console without a line break in ruby on rails?

I have a method which goes through a loop -- I want it to output a "." each loop so I can see it in the console. however, it puts a linebreak at the end of each when I use puts ".". If there a way so that it just has a continuous line?
Satchel
  • 16,414
  • 23
  • 106
  • 192
174
votes
1 answer

How do I detect whether sys.stdout is attached to terminal or not?

Is there a way to detect whether sys.stdout is attached to a console terminal or not? For example, I want to be able to detect if foo.py is run via: $ python foo.py # user types this on console OR $ python foo.py > output.txt # redirection $…
Sridhar Ratnakumar
  • 81,433
  • 63
  • 146
  • 187
172
votes
3 answers

In Eclipse, can I have multiple Console views at once, each showing a different Console?

I'm working on some applications that, in debug mode, log to the console. I'd like to run and debug them from inside of Eclipse, and view the console for each one simultaneously. However, I have a single Console tab that shows a single Console…
Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
171
votes
16 answers

Reading value from console, interactively

I thought to make an simple server http server with some console extension. I found the snippet to read from command line data. var i = rl.createInterface(process.stdin, process.stdout, null); i.question('Write your name: ', function(answer) { …
Risto Novik
  • 8,199
  • 9
  • 50
  • 66
163
votes
12 answers

How can I make console.log show the current state of an object?

In Safari with no add-ons (and actually most other browsers), console.log will show the object at the last state of execution, not at the state when console.log was called. I have to clone the object just to output it via console.log to get the…
user429620
160
votes
9 answers

No output to console from a WPF application?

I'm using Console.WriteLine() from a very simple WPF test application, but when I execute the application from the command line, I'm seeing nothing being written to the console. Does anyone know what might be going on here? I can reproduce it by…
Rob
  • 25,984
  • 32
  • 109
  • 155