standard-output

Unable to get Google definitions to Standard Output

I aim to filter my Google results right at terminal such that I get only Google's definitions. I am trying to run the following in Mac's terminal open http://www.google.com/search?q=define:cars&ie=utf-8&oe=utf-8:en-GB:official&client=vim A similar command for Firefox is open http://www.google.com/search?q=define:cars&amp...

Java: What's the reason behind System.out.println() being that slow?

For small logical programs that can be done in a text editor, for tracing I use the classic System.out.println(). I guess you all know how frustrating it is to use that in a block of high number of iterations. Why is it so slow? What's the reason behind it? ...

link to files displayed in output (ctrl + click)

Hello: I have a utility command that writes out a list of the 3 or so files it created, ie: Console.WriteLine("\t{0} \tUpdated @ {1}", file, lastWriteTime); The main reason I do this is so I can find the files easily after the routine runs (the location may vary). Ideally, I'd be able to hotlink and open the file using ctrl + click,...

What is an appropriate way to programmatically exit an application?

I am evaluating user inputs as commands for my application. If the user presses Q, or q, and then hits enter, the application quits and execution terminates. Is there a proper context, or best practices on how to do that? I do not have any resources to release, or anything like that. Should I just use System.exit(0);? Is there a recomm...

Redirect Standard Output from Remote Process

I am currently launching a remote process using the following code (in C#): ConnectionOptions connOptions = new ConnectionOptions(); connOptions.EnablePrivileges = true; connOptions.Username = userName; connOptions.Password = password; ManagementScope manScope = new ManagementScope(String.Format(@"\\{0}\ROOT\CIMV2", remoteMachine), con...

check output in MSTest unit test

I want to capture output sent to standard out and standard error within an MSTest unit test so that I can verify it. I've captured output before when explicitly running a Process, but is there a way to do with [I guess] the MSTest process itself? For example: [TestMethod] public void OutputTest() { MySnazzyMethod("input", 1, 'c');...

Redirect Python standard input/output to C# forms application

I apologize if this is a duplicate question, I searched a bit and couldn't find anything similar - I have a Python library that connects to my C# application via a socket in order to allow simple Python scripting (IronPython isn't an option right now for a couple of reasons). I would like to create a Windows Forms control that would be b...

How do I run processes synchronously, targetting the same output?

I have a .Net application that needs to run several executables. I'm using the Process class, but Process.Start doesn't block. I need the first process to finish before the second runs. How can I do this? Also, I'd like all of the processes to all output to the same console window. As it is, they seem to open their own windows. I'm sure...