Capturing stdout when calling Runtime.exec

Capturing stdout when calling Runtime.exec

When experiencing networking problems on client machines, I'd like to be able to run a few command lines and email the results of them to myself.I've found Runtime.exec will allow me to execute arbitrary commands, but Collecting the results

Improve INSERT-per-second performance of SQLite?

Improve INSERT-per-second performance of SQLite?

Optimizing SQLite is tricky. Bulk-insert performance of a C application can vary from 85 inserts per second to over 96,000 inserts per second!Background: We are using SQLite as part of a desktop application. We have large amounts of configu

Any workaround for ignoring unexpected elements in Apache Axis 1.4?

Any workaround for ignoring unexpected elements in Apache Axis 1.4?

The problem was asked before "Apache AXIS Ignore/Skip additional element while parsing" in 2012 for Apache Axis 2. Is there no workaround yet for Axis 1.4?Problem DefinitionFor instance;1- We have a soap response definition('ResponseGetCust

How to generate VS proj with both 32-bit and 64-bit configurations using CMake

How to generate VS proj with both 32-bit and 64-bit configurations using CMake

Does any one know how to generate a VS proj/soln file with both 32-bit and 64-bit configurations using CMake. 1:You can't. With CMake you can generate separate solution files for 32-bit and 64-bit depending on the Visual Studio generator

Is .zfproject.xml a must in a Zend Framework project?

Is .zfproject.xml a must in a Zend Framework project?

Is .zfproject.xml a must in a Zend Framework project?What does it do?Is it's location absolute? 1:When using Zend_Tool to manage your Zend Framework project, .zfproject.xml will contain your application structure state. This is required

Missing script/generate in Rails 3

Missing script/generate in Rails 3

I just installed Rails 3 and created my first app. The install of Rails3 + ruby 1.9 went very smoothly but I am missing the generate script in script/generate.I have created a new app from scratch with no options to verify.Any idea why thi

Avro field default values

Avro field default values

I am running into some issues setting up default values for Avro fields. I have a simple schema as given below:data.avsc:{ "namespace":"test", "type":"record", "name":"Data", "fields":[ { "name": "id", "type": [ "long", "null" ]

Generate jasmine report using Karma Runner

Generate jasmine report using Karma Runner

I want to obtain a report of all successful jasmine specs runned with karma, something like you obtain when using jasmine alone.Is there anyway to achieve this? 1:Try this quick plugin I wrote:https://github.com/dtabuenc/karma-html-repor

Search Apple App store by genre with iOS/Obj-c

Search Apple App store by genre with iOS/Obj-c

How would you use Obj-c to search the Apple App store to do the following...Return the details of the top 100 in the games overall category or aspecific games categoryReturn the details of a specific games in the games categoryAnyone? 1:

Fill factor for a sequential index that is PK

Fill factor for a sequential index that is PK

Yes, fill factor again. I spend many hours reading and I can't decide which is the better fill factor for each case. The problem is I don't understand when and how the fragmentation is made. I'm migrating a database from MS SQL Server to a

How to download, zip and save multiple files with Javascript and get progress?

How to download, zip and save multiple files with Javascript and get progress?

I'm creating a Chrome extension that needs to download multiple files (images and/or videos) from a website. These files may have a huge size, so I want to show the download progress to the user. After some research I found that currently a

Find the index of a given permutation in the list of permutations in lexicographic order [duplicate]

Find the index of a given permutation in the list of permutations in lexicographic order [duplicate]

Possible Duplicate: Given a string and permutation of the string. Find the index of this permuted string in the sorted list of the permutations of the string. This is an interview question. Let there is a list of permutations in lexicogra

Matlab, how to calculate AUC (Area Under Curve)?

Matlab, how to calculate AUC (Area Under Curve)?

I have the file data.txt with two columns and N rows, something like this:0.009943796 0.46679750.009795735 0.467778860.009623984 0.468978320.009564759 0.469414470.009546991 0.47039580.009428543 0.472249480.009375241 0.474757370.009298249 0.

Create animated gif using the GD library

Create animated gif using the GD library

If I've got a bunch of image resources that I made using the GD library in php, or otherwise a bunch of frames, how can I combine these into an animated gif? I've got an array of images and a frames per second I'd like to add..I can't use I

Generate page numbers using javascript/jquery?

Generate page numbers using javascript/jquery?

How to generate page numbers like the below using javascript/jquery?If the 5 th page is selected i have to show 3,4 and 6,7 and also 1,last page with prev,next...Any suggestion....EDIT:How to work with json data that use these pagination di

Xcode building and resources folders

Xcode building and resources folders

I have several resources in my iPhone app and when they get compiled they all get added to the root of the resources folder in the app regardless of the Xcode grouping structure. This is fine for most things, however there is a set of files

Different Interop references on two different computers doesn't work

Different Interop references on two different computers doesn't work

When I add a reference to Microsoft.Office.Interop.Excel on my computer, Visual Studio adds this to the project file: {00020813-0000-0000-C000-000000000046} 1 5 0 primary FalseThere is another developer on the team who gets errors and

MySQL: how to drop multiple tables using single query?

MySQL: how to drop multiple tables using single query?

I want to drop multiple tables with ease without actually listing the table names in the drop query and the tables to be deleted have prefix say 'wp_' 1:I've used a query very similar to Angelin's. In case you have more than a few tables

laravel 4: key not being generated with artisan

laravel 4: key not being generated with artisan

When running php artisan key:generateI can see the generated key in my shell, but the variable 'key' in app.php remains empty.Running on localhost with windows-apache-php 5.4 - mysql.Never had this problem before with laravel 4 beta versi

How to use external makefile in Eclipse

How to use external makefile in Eclipse

I have a source code of an OpenSource project which I get from SVN. I was able to run autogen configure and make successfully (through the terminal). But I want to build the same project with Eclipse, and I can't port manually those sourc

Any way to generate WSDL documentation from Javadoc with JAX-WS?

Any way to generate WSDL documentation from Javadoc with JAX-WS?

I'm hoping that an extension of some kind is available that does this (although I suppose that my hope is foolishly optimistic). /** * * Gets the {@link ResultObject} given the identifier. The following * fields are not avail

ashx files in asp.net

ashx files in asp.net

When do you use ashx files in asp.net web application ? Can some one explain in simple terminology with a pratical example ? I understood from the msdn that .ashx files implements ihttphandler but i could not get much explanation from here

Autogenerate function comments in Eclipse

Autogenerate function comments in Eclipse

How to autogenerate xml based function header comments (@param etc) in Eclipse. Is there an equivalent of "///" shortcut in Visual Studio. 1:In the line just before the method definition, type /** and hit enter.In the IDE, type /** just

Plotting a grid behind data, not in front in R

Plotting a grid behind data, not in front in R

I like to produce my own grid lines when plotting so I can control tick marks, etc. and I am struggling with this with the 'hist' plotting routine. hist(WindSpeed, breaks=c(0:31), freq=TRUE, col="blue", xaxt="n", yaxt="n", xlab="Wind Spe

How to force an unused memory read in C that won't be optimized away?

How to force an unused memory read in C that won't be optimized away?

Microcontrollers often require a register to be read to clear certain status conditions. Is there a portable way in C to ensure that a read is not optimized away if the data is not used? Is it sufficient that the pointer to the memory mappe