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
87
votes
2 answers

Error message "CS5001 Program does not contain a static 'Main' method suitable for an entry point"

Unable to execute the following code error CS5001 Program does not contain a static 'Main' method suitable for an entry point What does this error message mean? class Program { static async Task MainAsync(string[] args) { …
001
  • 62,807
  • 94
  • 230
  • 350
86
votes
10 answers

Cannot read property 'push' of undefined when combining arrays

When pushing an array's contents to another array I get "Uncaught TypeError: Cannot read property 'push' of undefined" error in this snippet. var order = new Object(), stack = []; for(var i=0;i
d3nm4k
  • 1,023
  • 1
  • 8
  • 12
83
votes
6 answers

An Eclipse console view that respects ANSI color codes?

The output from ScalaTest is colored to distinguish different states, but these end up as control codes and [34m Annoying garbage Is there any way to convince the Eclipse console to either respect or ignore these sequences, or to plug in a view…
Duncan McGregor
  • 17,665
  • 12
  • 64
  • 118
82
votes
5 answers

Redirect console output to string in Java

I have one method whose return type is void and it prints directly on console. However I need that output in a String so that I can work on it. As I can't make any changes to the method with return type void I have to redirect that output to a…
SRK
  • 1,020
  • 1
  • 9
  • 11
82
votes
7 answers

Python: Write unittest for console print

Function foo prints to console. I want to test the console print. How can I achieve this in python? Need to test this function, has NO return statement : def foo(inStr): print "hi"+inStr My test : def test_foo(): cmdProcess =…
sudhishkr
  • 3,318
  • 5
  • 33
  • 55
81
votes
28 answers

Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255

I moved my project from desk to another. When I run php artisan it does not work. I tried to run composer update, but it returns the error Script @php artisan package:discover handling the post-autoload-dump event returned with error code 255
Ghyath Darwish
  • 2,614
  • 4
  • 15
  • 31
79
votes
5 answers

How do I hide the console when I use os.system() or subprocess.call()?

I wrote some statements like below: os.system(cmd) #do something subprocess.call('taskkill /F /IM exename.exe') both will pop up a console. How can I stop it from popping up the console?
Synapse
  • 1,574
  • 6
  • 18
  • 19
78
votes
12 answers

Polling the keyboard (detect a keypress) in python

How can I poll the keyboard from a console python app? Specifically, I would like to do something akin to this in the midst of a lot of other I/O activities (socket selects, serial port access, etc.): while True: # doing amazing pythonic…
K. Brafford
  • 3,755
  • 2
  • 26
  • 30
78
votes
8 answers

Node.js formatted console output

Is there a simple built-in way to output formatted data to console in Node.js? Indent, align field to left or right, add leading zeros?
exebook
  • 32,014
  • 33
  • 141
  • 226
77
votes
14 answers

How can I keep the "Console Drawer" hidden by default every time I open Chrome DevTools?

When I have DevTools open, there is a little button that toggles Hide Drawer. and Show Console.. Besides being inconsistently named, the 'drawer' is very annoying to me because it takes up so much of the little screen real estate allotted for…
celwell
  • 1,634
  • 3
  • 19
  • 27
76
votes
5 answers

Safari Developer Tools: How to Preserve Console Log Upon Navigation?

When using Safari Web Inspector to read the JavaScript console output, the log is reset upon navigation i.e. going from page index.html to mail.html clears the console output. In the Chrome Developer Tools, I can easily preserve the log by right…
Zorayr
  • 23,770
  • 8
  • 136
  • 129
75
votes
8 answers

Reading console input in Kotlin

I am attempting to accept input from the console in Kotlin but it is difficult because I am not too sure about the syntax. I begin with the main fun main(args: Array) { } WHAT should I enter after this? I am aware that the println() and…
siur
  • 919
  • 2
  • 9
  • 11
75
votes
7 answers

Where can I read the Console output in Visual Studio 2015

I am new to C# and downloaded the free version of Microsoft Visual Studio 2015. To write a first program, I created a Windows Forms Application. Now I use Console.Out.WriteLine() to print some test data. But where can I read the console?
Garrarufa
  • 1,145
  • 1
  • 12
  • 29
75
votes
5 answers

How do I get console input in spidermonkey JavaScript?

I'm currently using spidermonkey to run my JavaScript code. I'm wondering if there's a function to get input from the console similar to how Python does this: var = raw_input() Or in C++: std::cin >> var; I've looked around and all I've found so…
camel_space
  • 1,057
  • 1
  • 7
  • 10
75
votes
3 answers

Redirect Trace output to Console

Let's say I'm working on a little batch-processing console app in VB.Net. I want to be able to structure the app like this: Sub WorkerMethod() 'Do some work Trace.WriteLine("Work progress") 'Do more work Trace.WriteLine("Another…
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794