console

Invoking Methods on a Singleton Object via reflection in an object tree

This is similar to Invoking a method using reflection on a singleton object but it has a much deeper context. First I want to say this is for a project I was just playing around with ideas on, this is in NO way production code, and the project has taken a VERY different path, but this problem still haunts me so here it goes. I have a s...

Writing to the command line in a windowed app

I'm trying to get my WinForm based C# to cooperate with the commandline too, but I'm having difficulty getting it to play nice. For example, I have this code: [STAThread] static void Main(string[] args) { foreach (string s in args) { System.Windows.Forms.MessageBox.Show(s); Console.WriteLine("Stri...

Easiest way to Filter Eclipse Console Output text

I'm asking this in relation to Flex Builder, but it might apply to Eclipse in general. Trace statements in Flex Builder get sent to an Eclipse Output Console. What is the easiest way to filter this text on the Eclipse side? Specifically, I'd like to be able to filter (ignore) lines by patterns. I came across Logback, but it seems like...

Ignoring EOF on std::cin in C++

I have an application that implements an interactive shell, similar to how the Python console / irb works. The problem now is that if the user accidentally hits ^D EOF is issued and my getline() call returns an empty string which i treat as "no input" and display the prompt again. This then results in an endless loop that prints the pr...

How can I associate a console with a Java application?

Since I've been learning Java, I've been able to create GUI programs. However, even simple "Hello World!" programs will not work, if they require a console. My research on the topic has lead me to the conclusion that my Java Runtime Environment does not have a console associated with it. Is it possible to call the Win32 "AllocConsole" ...

Rails console: Run a Ruby file several times

Rails provides a very useful console ('script/console'). I write a ruby file and run it in the console using require foo.rb. It works fine the first time, but the second and next require foo.rb does not run my script (require does not reload it). Do you have any tips/tricks? ...

Handling desktop position, font and other win32 console parameters

Is it possible to programmatically set such windows console parameters as its left-top desktop position, console font, fast insert and selection by mouse options, etc. ? EDIT Unfortunately we can set some console parameters by invoking undocumented Windows API. For example: SetConsoleFont, GetConsoleFontInfo, GetNumberOfConsoleFonts fro...

simple cross-platform c++ GUI console -- how to?

I'm writing a game and I'm wound up in needing a console for simple text input; filenames and simple values. Using SDL, my console looks the following at it's simplest: class Console { public: typedef std::list<String> InputList; enum Result { NOTHING = 0, ENTERED, ESCAPED }; static const String& GetInput() { return...

What happened to console.log in IE8?

According to this post it was in the beta, but it's not in the release? ...

Is there a way to create a second console to output to in .NET when writing a console application?

Is there a way to create a second console to output to in .NET when writing a console application? ...

Download an offline version of a webpage

Duplicate of Suggestions for a site ripper. Hi I need to download an offline version of an specific page. Including all images and CSS files. I need to recreate the entire webpage again in my server. Something running in the console would be great. Thanks ...

In Java, how can I get user input in a console in a curses-like manner?

I just started learning Java at school for cse142, but I've known a bit of programming so am considerably ahead of the class and have been trying my own little projects. Normally if I run into a problem I just work around it because I figure I just haven't learned that yet, but this one bugs me enough to make a whole thread about it. I ...

Writing to the Eclipse console

My plugin has to write to the eclipse console - for testing purpose I simplified my code, so that I only have the following: public void start(BundleContext context) throws Exception { super.start(context); plugin = this; System.out.println("Tecomp Plugin is running"); MessageConsole myConsole = new Mess...

determine if another application is busy

How do I check if another application is busy? I have a program that sends text to a console. The text that I will send contains #13 char (i.e. ls#13cd documents#13dir). In other words I want to send many commands at one time and the console will process it one by one. I am sending it character by character. But sometimes it only execut...

How do I sleep in my MSVC++ console application?

The title says it all. I want to call Sleep(x), where x is milliseconds to sleep. I know this is the function, but it doesn't work for me. What do I need to include? ---SOLVED--- I was using the compiler option /Za, which disabled the native Windows extensions used in Sleep()'s implementation. ...

How to run a .sh-script in an Unix console/Mac terminal?

I know it, forgets it and relearn it again. Time to write it down. ...

Ruby console alternative for IRB (Windows)

I am looking for some free light-weight GUI alternative for IRB console on windows. What I whould like to see: Area to write a script (so I can edit, run, edit...) Command line to play with current variables Output window to see results Intellisence Breakpoints/debugging is a plus Actually, some thing similar to powershell_ise.exe wh...

Disabling Scroll with System.Console.Write

Is it possible to use Console.Write to place a single character at the very bottom right of a typical 80x25 console, without having the console scroll the row up? This is the code that I'm using... Imports System Console.SetCursorPosition(Console.WindowWidth-1, Console.WindowHeight-1) Console.Write("x") This is not working like I woul...

Send TAB to a child console (windows)

I create a child console application with _process = new Process(); _process.StartInfo.FileName = @"cmd.exe"; _process.StartInfo.UseShellExecute = false; _process.StartInfo.RedirectStandardInput = true; _process.StartInfo.RedirectStandardOutput = true; _process.StartInfo.CreateNoWindow = true; _proccess.Start(); Now I can go to c:\a...

Capture Console Output of a Specific Thread in Java

I realize there are similar questions on SO, but they don't quite solve my problem. I would like a method that, given a Class object, will invoke the "main" method, that is to say, public static void main, on that Class (if it exists) and capture the console output of that main method. The class doing the invocation is a non-daemon thr...