console

Detect console window?

Is it possible to detect if an application has an console window? Either by have used AllocConsole or if it's a regular console application. Edit: Solution (thanks to ho1's answer): public static class ConsoleDetector { private const uint ATTACH_PARENT_PROCESS = 0x0ffffffff; private const int ERROR_ACCESS_DENIED = 5; [DllI...

Unicode and console interpretation

I print to the standard output some characters from a wide UTF-8 range in a Java application. My console is configured for UTF-8 support. My problem is that sometimes, when I decide to print 10 characters for example, I see a number of character which is less then 10. I think this is due to the console which interprets some characters. ...

Cannot use vaiable with Get-User -Filter in Exchange Management Console

I cannot seem to use variable in the situation below. [PS] C:\>Get-User -Filter {SamAccountName -eq "Test.Smith"} Name RecipientType ---- ------------- Test Smith UserMailbox [P...

Is there a way to reduce startup time of a console Java application?

I noticed that the startup time of a minimal console application in Java is slightly more than 100 ms on my machine compared to 1 ms of an equivalent C application. Although it is not a problem in most cases I would like to find out if there is a way to reduce this time because I need to write an application that will be executed many ti...

redirecting complete make output to a file

Hi I want to redirect complete make output to a file. I tried redirecting the stdout and stderr with the following command: make >aks_file.txt 2>&1 & But that is not redirecting the EXACT complete output which is otherwise generated by issuing just make (some lines are missing) Am I missing something? ...

How do I programmatically change the position of the cursor in a Mac terminal program?

How do I programmatically change the position of the cursor in a Mac terminal program? I'm teaching a couple of kids to program and we're learning by writing a little terminal game. I've done this with C# on Windows with SetCursorPosition(x, y) so I'm hoping for something like that. ...

How to disable stdin echo in windows console

I'm writting a Ruby program for windows, and I need to read user input from keyboard (stdin). However, it's needed that the user key-presses are not automatically displayed in the windows console, and behave like "silent key presses" This problem in Ruby over linux, can be solved using the "stty" linux command: %x{stty -icanon -echo} ...

WriteLine on Console but in Retro Style

I am trying to write on Console let's say "Enter your User Name:" and what I know is to use Console.WriteLine("Enter your..."); But I want this message of prompt appears as its' being typed like Aliens or star trek computers. Your expert answer with best practices is much appreciated. Thanks ...

Rails3 irb console vs rails console?

Using Rails3 and Ruby 1.9.2, I am new, just learning Ruby/Rails-- When I run irb I end up with irb(main):001:0> which is fine. However when I run rails console I also end up with irb(main):001:0> and I thought, based on the book I'm reading and online tutorials that I should be seeing >>. Is the Rails Console I'm thinking of a gem that...

Is there a good library to embed a command prompt in a scala (or java) application.

I have an application that I'd like to have a prompt in. If it helps, this is a graph database implementation and I need a prompt just like any other database client (MySQL, Postgresql, etc.). So far I have my own REPL like so: object App extends Application { REPL ! Read } object REPL extends Actor { def act() { loop...

Is Chrome's JavaScript console lazy about evaluating arrays?

I'll start with the code: var s = ["hi"]; console.log(s); s[0] = "bye"; console.log(s); Simple, right? In response to this, Firebug says: ["hi"] ["bye"] Wonderful, but Chrome's JavaScript console (7.0.517.41 beta) says: ["bye"] ["bye"] Have I done something wrong, or is Chrome's JavaScript console being exceptionally lazy about...