console

Why won't this println command start a new line?

Here's the relevant code: public static void printBoarders (Territory x) { int t = 0 ; int n = 0 ; for (int i = 0; i<x.borders.length; i++) { if (x.borders[i] == -1) t = i ; } for (int j = 0; j<x.borders.length; j++) { if (x.borders[j] == 1) n++ ; } Ter...

grails console issue : No Hibernate Session bound to thread,

i'm trying to learn Grails console and had a problem. It looks like this: When I start grails console in my project WITHOUT starting the project, I can persist data to my postgreSQL database. However, when I started the project (after a bunch of error messages from netbeans output), I cannot do what I did anymore from Grails console. ...

How to correctly pop a modeless dialog from console using MFC

I need to create a console application that has a main() function and pop a modeless dialog, so the console can still work in parallel to the modeless dialog (do other work, like communicating with the modeless dialog). Whatever i tried, i could only pop a modal dialog. (where the console is in hold till the modal dialog close itself). ...

How do i jump to a breakpoint within gdb?

Hey folks! I'm new to gdb and I tried out the following: I set a breakpoint, which worked fine actually, but is there any possibility to jump immediately to that breakpoint without using "next" or "step". Using "next" or "step" takes really long to get to the final breakpoint. I wasn't able to find a faster way. Any help is preciated!...

Printing on console WIN32/WTL.

I am developing WTL GUI application. I want to print something on console. How to enable console printing in win32/WTL application. ...

Readkey in Java

Hi, I am new to Java ... is there a similar method to the ReadKey() in C# to avoid that a console application closes? thanks ...

Visual Studio 2008 project organization for executable and assembly

Hi - I am having a problem setting up the following in Visual Studio 2008: a parent project which includes the entrypoint Main() method class and which declares an interface, and a child project which has classes that implement the interface declared in the parent project. I have specified that Parent's Output type is a Console applicat...

Having the output of a Console App in Visual Studio instead of the Console

When doing "Console" apps in Java with Eclipse, I see the output being put in a text box on the IDE itself, instead of having a Console popping up like in Visual Studio. This comes in handy, as even after the program has exited, I can still make good use of the text that was written in it, as it doesn't get erased until I run it again....

Hide console window in Windows Forms application

Hi there, I took over a Visual C++ project in Visual Studio 2005 from a colleague. It is a Windows Forms project (I assume). But when I start it, besides the Windows Form it also shows a console window. How do I get rid of this console window? I think it must be a project setting but I don't find it. Any help is appreciated ... ...

.NET Console TextWriter that Understands Indent/Unindent/IndentLevel

Does anybody have or know of a TextWriter for the Console that understand how to indent/unindent and has the ability to set the indent level. ...

How to handle a C# console application terminating?

If I have a console application, is there any way I can handle the following: Ctrl-C (I know the answer to this. Using Console.TreatControlCAsInput and Console.CancelKeyPress) Session termination, such as when someone logs off Process exit, such as when someone uses the task manager to close the application. I know that if I was writ...

Configuration Log4j: ConsoleAppender to System.err?

I saw that one of our tools uses a ConsoleAppender to System.err next to System.out in it's log4j configuration. Fragments of the configuration: <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> <!-- Log to STDOUT. --> <param name="Target" value="System.out"/> .... <appender name="CONSOLE_ERR" class="...

/SUBSYSTEM:Windows program will not write to command line

I have a mixed mode C++-CLI program in Visual Studio 2005 that is set to use the /SUBSYSTEM:Windows. Generally speaking it is a graphical application that is launched from its shortcut or through the filetype registered to it. However, there is a rare occasion where a user will want to run it from the command line with arguments. I ca...

Attach Console to Service

I currently have a WCF Service Library which will be started through a Console Application acting as ServiceHost. The ServiceHost starts the service and then waits with Console.ReadLine() for the "quit" command. If i do "Console.WriteLine();" in the service this will be printed to the ServiceHosts Console of course. The Service prints so...

how can i load a file in ruby on rails console?

am trying to load a file where i have all my setting into rails console. i want to do it because when i use the console there is too much repetition . thank you ...

How to create a console application that does not terminate?

Hello, In C++,a console application can have a message handler in its Winmain procedure.Like this: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { HWND hwnd; MSG msg; #ifdef _DEBUG CreateConsole("Title"); #endif hwnd = CreateDialog(hInstance, MAKEINTRESOURCE(ID...

Windows console

Hello. Well, I have a simple question, at least I hope its simple. I was interested in win32 console for a while. Our teacher told us, that windows console is just for DOS and real mode emulation purposes. Well, I know it is not true, becouse DOS applications are runned by emulator which only uses console to display output. Another thing...

How to more effectively debug PHP code in the vein JavaScript with Firebug or XCode?

Hi everyone, I'm kind of a newbie with PHP so please bear with me. I would like to know if there was an effective way of debugging PHP code so that I don't have to have debugging messages display on the browser. For example, I find var_dump and print_r functions to be excellent for debugging variables, function calls and arrays respect...

reading a set count of characters from the console input stream

I'm trying to make something like a textbox for a console application, how to limit the Console.In to only read a defined count of characters from user inputs ? EDIT I can't go the Readkey() loop -way, i still need to interact with that box, like using the arrow keys to navigate left an right, Del or Backspace to edit the input and so...

Assigning console.log to another object (Webkit issue)

I wanted to keep my logging statements as short as possible while preventing console from being accessed when it doesn't exist; I came up with the following solution: var _ = {}; if (console) { _.log = console.debug; } else { _.log = function() { } } To me, this seems quite elegant, and it works great in Firefox 3.6 (including...