execute

Adding editors in Visual Studio "Open With..." dialog box

I added a batch (.bat) file to my project. I want to add a new editor for batch files that would actually execute this batch file in command prompt window. What I did, but didn't remember my editor: Right clicked on my .bat file Selected Open with... Clicked Add Set program as "cmd /c" and some Friendly name Accepted this dialog. A ne...

Can you use an objects property in a string in powershell?

Basically I have the following code: $DatabaseSettings = @(); $NewDatabaseSetting = "" | select DatabaseName, DataFile, LogFile, LiveBackupPath; $NewDatabaseSetting.DatabaseName = "LiveEmployees_PD"; $NewDatabaseSetting.DataFile = "LiveEmployees_PD_Data"; $NewDatabaseSetting.LogFile = "LiveEmployees_PD_Log"; $NewDatabaseSetting.LiveBack...

running arbitrary system commands from Ruby, on OSX and Windows

I would like to open OSX windows (and Windows windows) from a ruby script. If I do system "touch /Users/apple/Documents/thekbase-temp-files/test5.txt" it works (creates an empty file), but this system "mate /Users/apple/Documents/thekbase-temp-files/test5.txt" does not open TextMate, even though it does if I type it. I feel this mi...

Manually Start ANT Task

For various reasons that I won't go into (I promise it's necessary to do this with the current code base; I know it's goofy), I want to execute a target twice in the same build task. For example, I want to execute the target foo, then bar, then foo again. This is a simplified version of what I already tried: <target name="foo"> .....

What is the best way to call a python script from another python script?

I have a script named test1.py which is not in a module. It just has code that should execute when the script itself is run. There are no functions, classes, methods etc. I have another script which runs as a service. I want to call test1.py from the script running as a service. eg: test1.py print "I am a test" print "see! I do nothin...

Is there a way in Ruby/Rails to execute code that is in a string?

So I have a database of different code samples (read snippets). The code samples are created by users. Is there a way in Rails to execute it? So for example I have the following code in my database (with id=123): return @var.reverse Is there a way for me to execute it? Something like: @var = 'Hello' @result = exec(CodeSample.find(...

How can I open a help file (chm or so) from my GUI developed in VC++ 2008?

Hi, I'm trying to add some help to my GUI developed in VC++ 2008. I want to compile a chm file, or a hlp file that can be accessed from my menu. Anyone can give me any idea about how to do this? Thanks a lot ...

Mysql Slow query execution

Hi All, I have one procedure which retrieves all the records from one table which has more than 20000 records and two columns. the column i m trying to retrieve has the index on it. But still it takes more than 1-2 minutes to execute. Can anyone provide any input on this. ...

iPhone - is it possible to make system call

Hi Devs, is it possible to make a system call like f.e. execute a "ls -la" and use the result in your app. If it is possible would apple approve this usage? Thanks Tom ...

jquery execute function in all event

is it possible to execute a function in all events ...

Run Executable In Jar With ProcessBuilder

I have an application I've built that uses a non-Java executable that it calls via ProcessBuilder: ProcessBuilder pb = new ProcessBuilder(invocation); pb.redirectErrorStream(true); Process proc = pb.start(); InputStream is = proc.getInputStream(); InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedRead...

c# execute program from MemoryStream

Hi maestros, How can I execute a program that is in a MemoryStream so I don't have to save it first to the harddisk. The file may not be saved temperally to the harddisk. The program has to be 100% functional from in memory. static string strTemplate = "MyAPP.SOMEprogram.exe"; byte[] template; int len = 0; ...

How to read/redirect output of a dos command to a program variable in C/C++ ?

I want to run a dos command from my program for example "dir" command. I am doing it like, system("dir"); Is there any way to read the output of that command directly into a program variable? We can always redirect the output to a file and then read that file, by doing system("dir > command.out"); And then reading command.out fil...

Want to invoke a linux shell command from Java

I am trying to exec some linux commands from Java code. Actualy the code that I use is useing redirection (>&) and pipe simbols (|). How my Java code should be to be able to invoke that command as in csh or bash. Thanks in advance. P.S. I have used: Process p = Runtime.getRuntime().exec("shell command"); but this code is not OK with...

Shell execute from Ruby

Assume, I have a file 'text_file.txt' within my .rb script. How do I execute a default windows program for that file from the Ruby? ...

Best way of executing code over the internet

Hello.. basically, I am needing to execute a program on the viewers computer through a website. This program must be capable of talking to device drivers however, which makes it an unlikely candidate for activex. The website will only be used by clients(as in, it's not a public site) so having to change security settings isn't too big of...

How to run my Ruby programs without installing 20,000 file?

I have written quite a few Ruby programs, but if I need to show my friend one of the program, I need to install Ruby 1.8.6 on that computer, and that is 20,000 files. For running of my Ruby programs, is there a way besides this? ...

python executing existent (&big) c++ code

I have a program in C++ that uses the cryptopp library to decrypt/encrypt messages. It offers two interface methods encrypt & decrypt that receive a string and operate on it through cryptopp methods. Is there some way to use both methods in Python without manually wrapping all the cryptopp & files included? Example: import cppEncrypt...

How to Execute a Python File in Notepad ++ ?

I prefer using notepad ++ for developing, How do I execute the files in Python through Notepad++? ...

Execute procedure in a trigger

Is it possible to execute a stored procedure inside a trigger? Thank you ...