console

Basic ruby array code: Testing if an array has a specific integer

I'm trying to test if an array has a specific integer in it. Right now I'm using this test; def admin? current_user.role_ids == [1,2] || current_user.role_ids == [2] || current_user.role_ids == [1,2,5] end The code works, but I'd prefer to just test for the integer "2" rather than explicitly write out every possible combination...

How to run form and console at the same time with c#?

Hey I am fairly new to the c# programming language and have enjoyed my experience so far. I normally develop applications in java but a need for the win32 library has lead me to c# so far the languages seem relatively similar. however a problem I am having at the moment is a simple piece of code that can be best explained in this example...

how to create a recoverable file uploader console app?

I am uploading thousands of files to a server. The server connection breaks allot, so I need a way for this console application to be able to recover if the connection fails for a few seconds etc. My application is simple, it just gets all the files in the c:\uploads folder and then uses a web service to upload the files to the server....

Hide Console When Executing a TProcess

I'm building a application that uses a TProcess called AProcess like this: procedure TFormMain.btCompileClick(Sender: TObject); begin AProcess := TProcess.Create(nil); try AProcess.CommandLine := 'gcc.exe "' + OpenDialog1.FileName + '"' + ' -o "' + OpenDialog2.FileName + '"'; AProcess.Options := AProcess.Options + [poW...

how to open & use cakephp i18n console ????

how to open & use cakephp i18n console ????s ...

Rails custom script/console?

In this movie http://media.railscasts.com/videos/181_include_vs_joins.mov you can see he is using a custom ./script/console and all find results are shown nicely like this Is there a plugin for that? ...

Converting Color to ConsoleColor?

What is the best way to convert a System.Drawing.Color to a similar System.ConsoleColor? ...

Is there ANY way to write an image to the Win32 Console?

Is there any way to write an colorful image to the Win32 Console? I don't care in which language, but C/C++/C# would be preferred. Thanks. ...

mysql console (windows->linux), wrong character set?

When I make a query from the mysql console and it has accents or any character that needs to be utf-8 encoded, it gets mugged INSERT INTO users (userName) VALUES ("José Alarcón"); SELECT userName FROM users; José Alarcón SET NAMES utF8 changes nothing --default-character-set=utf8 as parameter changes nothing Keep in mind than this i...

How to write console output to a txt file

I have tried to write the console output to a txt file using this code suggestion (http://www.daniweb.com/forums/thread23883.html#) however I am not succeed. Whats wrong? try { //create a buffered reader that connects to the console, we use it so we can read lines BufferedReader in = new BufferedReader(new InputStreamReader(...

Can get Console input from an asynch method using a delegate?

Hi all, EDIT: Issue worked around. This Console code was testing for ultimate use in a WPF app. I've moved the code to a WPF test app and it works, slightly modified of course. So I'll leave this Console issue, as at the end of the day it's not actually important! I'm basically trying to call "Console.ReadLine()" from an asynch metho...

Ruby Console Help with a One-to-Many Association

Hello I've set up a One-to-Many Association between "orders" and "users". I'm wondering how to have console just return an array containing ID's rather than a full array of data: user = User.find_by_login("Lesa") user.orders => [#, #] user.orders.id NoMethodError: undefined method `order' for #<User:0x...

How can I see long texts/msg in logcat?

Since we are using logcat as a console for android. There are cases when the the output text/msg is kinda big and I can't see the complete output. The log cat shows only the starting part of it. Is there a way to expand it so that I can see the full msg? ...

Is it possible to refresh two lines of text at once using something like a CR? (C++)

Right now, I have a console application I'm working on, which is supposed to display and update information to the console at a given interval. The problem I'm having is that with a carriage return, I can only update one line of text at a time. If I use a newline, the old line can no longer be updated using a carriage return. What can I...

putting a debugging console window in your app

I'm starting to develop a simple application in VS9 and I decided to use WPF and the MVVM paradigm for it. Still being a bit unexperienced with VS deveopment in general and WPF-controls in peculiar, I would like to ask how I should proceed to establish a little debug console window that takes perhaps 1/4 of the main window and sits kind...

Simple Macro Output/Console Logging in Visual Studio 2005?

I'm trying to log output to the Output window from one of my macros in Visual Studio. I thought that Debug.Print would do the trick like it does in Visual Basic.NET and VBA, but it doesn't do that. I found this, and tried this, it is not simple, nor does it work in Visual Studio 2005 (see bellow): Private Function GetMacroOutputPane...

A Groovy Web Console in a Java webapp?

I've been looking at Groovy a little lately, and I love the idea of the Groovy Web Console. I'm idly wondering whether there's a way to embed a simple web control to write and run scripts from in a web app I might put together myself. Is there a plugin-style solution to embed a control like this? Are there any resources or guidance ou...

What does "Couldn't raise load state for requested shlib:..." means?

I get this message on the debugger console, but the application seems work. The full console below. [Session started at 2010-01-05 20:17:29 +0100.] Warning - No location found for "BGTangramLevel.m:1" Warning - No location found for "BGTangramClues.m:1080" Warning - No location found for "BGTanRender.m:143" Warning - No location found f...

Is it possible to convert a Win32 application project into a console application?

Is it possible to convert an existing visual studio project file that creates a Win32 application into a project file that creates a Win32 "Console" application? If so, how is this done? I've googled and found plenty of people doing the opposite, but none this way. ...

How to send command to console application from GUI application

Hi, I have a console application that I launch from a GUI applicaiton. The console application takes parameters for filenames to parse and process. Currently I am able to capture its output and display it in the GUI application but I would like to be able to send commands to it so as to control or even halt its execution. How can I sen...