console

REPL console application service

I hope this is the right forum for this, and excuse the naive question. I would like to provide an "guest" login to a (non-dedicated) linux server and run just one console application. The user cannot do anything more than use this application. A scenario could be: ssh dervinATsomehost.com (no password) and the just automatical...

Java console API

I tried the java.io.Console API using eclipse. My sample code follows. package app; import java.io.Console; public class MainClass { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub Console console = System.console(); console.printf("Hello, world!!"); ...

How do I handle Ctrl+C in a Delphi console application?

Are there best practices and code snippets available which show how I can handle Ctrl+C in a Delphi console application? I have found some articles which give some information about possible problems with the debugger, with exception handling, unloading of DLLs, closing of stdin, and finalization for example this CodeGear forums thread....

Console based progress in Java

Is there are easy way to implement a rolling percentage for a process in Java, to be displayed in the console? I have a percentage data type (double) I generated during a particular process, but can I force it to the console window and have it refresh, instead of just printing a new line for each new update to the percentage? I was think...

How to pass references as arguments in a method in c#

Hi How to pass refernces in c#??/ ...

Are there any useful libraries for .NET Console applications?

Hi, I'm wondering if there are any useful (free) libraries out there to help the development of Console applications. Just a simple example: What about a library that encapsulates all the behaviour to select files in a console application (aka the OpenFileDialog for Console applications). There's MonoCurses of course, but I'm wonder...

'Unable to read symbols' error

When I 'Build and Go' on the device, the console shows: warning: Unable to read symbols for ""/Users/Steve/Blue/build/Debug-iphoneos"/Blue.app/Blue" (file not found). warning: Unable to read symbols for ""/Users/Steve/Blue/build/Debug-iphoneos"/Blue.app/Blue" (file not found). Is this something I should worry about? If so, where shoul...

How do I get IRBRC running on Win32 for Ruby console?

Can anyone suggest some troubleshooting approaches for getting IRBRC running under Win32? The rails console is an awesome tool and I'm attempting to extend it with more functionality. For instance, I would like the what_method gem to load automatically. The gem is installed but it does not load: C:\...\trunk>ruby script\console Loa...

Stop VB application from running in background

I have a console application (written in VB6 ) which is behaving strangely on my machine. I kick it off from the command line and what should be a two minute job drops straight back to the prompt - if I run this on another machine the executable will sit and wait until the job finishes before returning control back to the prompt. If I ch...

How do i write over the last line in the console?

I want to show a progress bar (like wget) how do i keep writing to the last line in the console? Windows 7 vis 2005 c++ ...

C# : Redirect console application output : How to flush the output?

I am spawning external console application and use async output redirect. as shown in this SO post My problem is it seems that the spawned process needs to produce certain amount of output before I get the OutputDataReceived event notification. I want to receive the OutputDataReceived event as soon as possible. I have a bare-bones...

Console_init Causes Kernel paniC

System Details: OS: Debian/5.0 kernel 2.6.26-2 i686 SMP Hardware: IBM Thinkpad T40 Type 2373 Pentium M 1.5GHz, 512MB RAM Sources: sudo apt-get install linux-source-2.6.18 linux-patch-debian-2.6.18 linux-support-2.6.18-5 Toolchain: arm-linux-gcc3.4.cs-uclibc0.9.27 as installed by scratchbox arm-linuc-uclibc-gcc/-g++ -v: Reading ...

c# main method ignores string variables

Hi, I've been given a small c# project to write, which basically is to wrap a few dlls in a console application. I've hit what I see as a weird problem. I've declared a couple of local variables within the main method to use. The idea is that when the arguments are parsed they values are store in these variables ( the arguments are...

How to check with PHP if the script is being run from the console or browser request?

I tried things like $_ENV['CLIENTNAME'] == 'Console' but that seems to work on only certain OS's (worked in windows, not linux). I tried !empty($_ENV['SHELL']) but that doesn't work always either... Is there a way to check this that will work in all OS's/environments? Thanks! ...

display chinese character in eclipse console output

Hi, I am trying to display some Chinese characters in the GB2312 encoding in the eclipse console. I realize that in Run Dialog -> Common tab -> Console Encoding, I can choose additional encodings other than the default CP1252. However, how I can add additional encodings, like GB2312? Thanks. ...

C# Print Any Complete XML Document to Console?

C# Print Any Complete XML Document to Console? Anyone have a snippet? (Hides behind the cubicle...shit.) ...

How to read a single char from the console in Java (as the user types it)?

Is there an easy way to read a single char from the console as the user is typing it in Java? Is it possible? I've tried with these methods but they both wait for the user to press enter key: char tmp = (char) System.in.read(); char tmp = (char) new InputStreamReader(System.in).read (); char tmp = (char) System.console().reader().read()...

Is there a hot key to run the contents of the Firebug Console?

If you're using Firebug (Firefox) and you type in javascript in the Console command line and press enter it executes. However, for good reason, when you expand the command line into a multi-line text area to the right then pressing enter does not execute the code. Instead you have to click Run at the lower left of this window. Is there ...

Can eclipse monitor an arbitrary log file in the Console view?

I am launching my JBoss server in eclipse, and so standard out/err displays in the Console view. But there are other logs being generated by log4j, and so I need to be able to monitor some of those as well. Is there anyway to "tail" an arbitrary file - with the nice source code hyperlinks that the Console view provides, of course. (I am...

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 $ python foo.py | grep .... # pipe The reason I ask this question is that I want to make su...