If my program is printing to the console, I perform word-wrapping in a certain way according to Console.WindowWidth by inserting newlines - and this works perfectly.
However if the output of the program is redirected to a file or another program I would like it to skip the word-wrapping. How can I detect when this is the case?
Console....
I am using the getResponseBody() method of the org.apache.commons.httpclient.methods.PostMethod class. However, I am always getting a message written to the console at runtime:
WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
In the code I have to write the response...
Exact duplicate:
Split string containing command-line parameters into string[] in C#
C#: How do you configure for a string[] to accept input of a whole string the way the console's main entry point accepts it broken up?
When you execute a console application made in c#, it's main method accepts any other arguments typed into it ...
Is it possible to have "debug" and "info" output written to the console while the "info" output is only written to some log file? For example, given this logging:
LOG.debug(fileContent);
LOG.info(fileLength);
What does a corresponding log4j.xml look like?
...
Is there a way I can put a console application in the system tray when minimizing ?
I use .Net 3.5 with c#
...
I have a WCF service currently using a TCP endpoint. Rather than create a separate console client app to administer the server I want the ability to telnet into the server or even just connect using a raw connection using putty and execute ascii commands straight on the server.
Any ideas how I would go about doing this? Not an expert on...
I'm writing a windowed program in C++, but I would like to have the option to pop up a console to output to from inside the program (such as various things that go on behind the scenes of my program, to see that everything is acting correctly). Is there an easy way to do this?
EDIT:
In this particular case I'm using sfml on windows, bu...
I've been playing around with Qt Creator 4.5 under Linux. My application builds just fine under Linux, but if I build in Windows, the app always opens a console window at startup.
Can I stop it doing that?
I'm building using the default MinGW setup, perhaps that is related. If need be I can build with Visual Studio, but I'd like to und...
Heyas
So I'm trying to move away from using the mouse as much as I can (just a pet project). I know that in the terminal you can do c-k to cut a line and c-u to paste that line back into that same terminal, but I'm looking for something where I can copy a line in the terminal into gnomes clipboard so I can paste it into say a browser o...
We are trying to debug some web services code we're running in C# on IIS. I am new to Windows programming and have no idea how to view output to the console. We've got some write statements in the code, but I can't figure out how to view the console while this thing is running. Help?
...
I created a console app in c# with a single console.readline statement. Running this app within visual studio and stepping into the debugger shows 7 thread in the thread window (6 worker threads, one is .NET SystemEvents and the other is vshost.RunParkingWindow and the main thread). When I run the app outside visual studio I see a total ...
Hello Everyone !
Well ... I am writing an IRC bot in python.
I wish to make stand-alone binaries for Linux and windows of it.
And mainly i wish that when the bot initiates .. the console window should hide and the user should not be able to see the window.
What can I do for that ?
The python way will be better.
...
Just that. I found a similar question here : http://stackoverflow.com/questions/377927/c-console-console-clear-problem
but that didn't answer the question.
UPDATES :
Console.Clear() throws : IOException (The handle is invalid)
The app is a WPF app. Writing to the console however is no problem at all, nor is reading from.
...
I am currently in the process of learning Ruby on Rails. I have been following the Learning Rails podcast and screencasts.
I've run into a problem, well more of an annoyance. Every time the screencast has me kill the mongrel server I am forced to close the console window because CTRL+C isnt killing it as it should. I then have to open ...
I'm trying to modify a legacy Delphi 5 app so that it can be launched either from it's icon/via Explorer, or from the console (command-line). When it gets launched from the console, I want the program to detach itself from the console process, so that the console can continue to execute other instructions without waiting for my program t...
Hey Everyone,
I am trying to connect a console application to a access database.
This is the query that i have am using:
"SELECT [Type], [Name], [Phone Number], [Start Time], [End Time], [IM Session File], [Notes] FROM [Call History] WHERE [Start Time] >= ?"
The problem is that for some reason when i take that data from the access da...
hi guys,
i have only very limited exposure with .net 1.1 and a bit of 2.0, so i'm actually pretty excited and confused with the many changes that they have in .net 3.5. so i have this access database but we don't want the other programs from calling into this database directly. so i'm writing a wrapper exe which will contains functions w...
I've set the buffer size to the window size to get rid of the scroll bar. Now, I'm trying to fill the console with a value, but there is always a new blank line added to the end, which causes the first line to be cleared from the buffer.
I know why it's happening, but is there any way that I can prevent it?
I've tried moving the buffer...
I spent a lot of time programming in Java recently, and one thing I miss from scripting languages was the ability to test them in a console.
To quickly test a java program, I have to edit a file, then turn it to bytecode and execute it. Even using an IDE, it loses its fun after the 372 th time.
I would like to know if there is a prod...
I want to write a C# program (for purely educational purposes) that would auto-complete a HTML form which resides at a specified URL. The thing is I don't know if that's possible or how can I get started? I thought of downloading the HTML, parsing it for the form's elements' names and then make a GET on that URL with the necessary parame...