output

How can I make sure all the output from ant's exec task gets printed on stdout?

The ant exec task has an output property which can be used to tell ant where the output goes. I've used it to redirect the output to a file. The thing is, if I don't do something with the output, the stuff that ant prints isn't that much of a help ( it's not the complete thing ). Is there someway of setting the output property to System...

How to get output?

I am using the Python/C API with my app and am wondering how you can get console output with a gui app. When there is a script error, it is displayed via printf but this obviously has no effect with a gui app. I want to be able to obtain the output without creating a console. Can this be done? Edit - Im using Windows, btw. Edit - The P...

Psexec not outputting to log file in VB script

Hi all, I have a VB script which needs to run psexec to launch an app called md5 on a remote server. Md5 generates a hash key of a file and takes one parameter - the file path\name. I need to retrieve the has key that is generated to store in a variable. Below is the code I am using: Set objShell = CreateObject("Wscript.Shell") strcomp...

&nbsp character not displaying correctly in Java

I have tried "&nbsp;&nbsp;" to display two spaces in a standard output Java String. Trying System.out.println("__"); <---- (two spaces, but, obviously, it trims it down to one space, hence the underscore) I imagine there is a way to escape the &nbsp;, but I can not figure it out nor find help online. Searching for it is ironic becau...

Writing Standard Input and waiting for Standard Output

Hi, I'm trying to create a Thread that keeps netsh windows command-line tool open so I can execute netsh commands without open it every single time. The thing is, once I've created the Thread, just the first command call works... the subsequent calls seems to have no effect. Here is my code: public class NetshThread implements Runnabl...

ASP.NET MVC Response Filter + OutputCache Attribute

I'm not sure if this is an ASP.NET MVC specific thing or ASP.NET in general but here's what's happening. I have an action filter that removes whitespace by the use of a response filter: public class StripWhitespaceAttribute : ActionFilterAttribute { public StripWhitespaceAttribute () { } public override void OnResultExecuted(Resul...

Is there a way to get gcc to output raw binary?

Forgive me—newbie gcc question. Is there a set of command-line options that will convince gcc to produce a flat binary file from a self-contained source file? For example, suppose the contents of foo.c are static int f(int x) { int y = x*x; return y+2; } No external references, nothing to export to the linker. I'd like to get a s...

Unbuffered I/O in ANSI C

For the sake of education, and programming practice, I'd like to write a simple library that can handle raw keyboard input, and output to the terminal in 'real time'. I'd like to stick with ansi C as much as possible, I just have no idea where to start something like this. I've done several google searches, and 99% of the results use l...

Generic Java Output Library or Pattern

I'm writing a bunch of data out from a java application that gets consumed by the end user it could be to a file, console, or an arbitrary listener. It would be nice to allow the user to specify how they want to consume this data. What approach have people taken to this sort of problem, is there a good open source solution? I could see s...

Reusing Process object and IO redirects in C#

I'm using the data ready events of the Process class to get information from the standard output and standard error of a running process. It works great on the first run, but after calling Stop() then Start() to force a restart of the application, I no longer recieve data. I've tried CancelErrorRead() but no luck there. I'm considering...

include/echo output of PHP

I got two projects running, both written in PHP. Now I want to merge these two projects. The first project is a CMS and on a specific page i will display the contents of the other project / application. I don't want the first project to know about, or get access to, the variables and functions in the other and vice versa. So i just want ...

Why does this program not output 20?

#include<stdio.h> int main() { int a = 1; switch (a) { int b = 20; case 1: { printf("b is %d\n", b); break; } default: { printf("b is %d\n", b); break; } } return 0; } ...

What am I missing in the following program?

#include<stdio.h> #define TOTAL_ELEMENTS (sizeof(array) / sizeof(array[0])) int array[] = {23, 34, 12, 17, 204, 99, 16}; int main() { int d; for (d = -1; d <= (TOTAL_ELEMENTS - 2); d++) printf("%d\n", array[d + 1]); return 0; } Why is the for loop not run even once? ...

Debugging the reading of output of a Windows console app using Python

This question is very similar to this one. I want to read output from a console app of mine. The app does not terminate, nor does it take input from stdin. When I modify rix0rrr's solution to execute my app and then run his solution, Python hangs because read(1) does not return. The initial output of the app is "Starting the server.\n"....

Visual Studio 2008 Debug Window to display timestamp?

The title says it all. I want to be able to see a time stamp in the beginning of every trace in the debug window in Visual studio. [Time stamp here] The thread 'Win32 Thread' (0xcd0) has exited with code 0 (0x0). [Time stamp here] => CLR ProvideAssembly: AppDomainId: 1, Ref: 'msvcm90d... Example of this is the sysinternals appli...

Why is the output of the following two statements different?

code: #define f(a,b) a##b #define g(a) #a #define h(a) g(a) main() { printf("%s\n",h(f(1,2))); //[case 1] printf("%s\n",g(f(1,2))); //[case 2] } output: 12 f(1, 2) Why is the output not same in both cases? [I understood the concatenation (a##b) and string conversion (#a) here, but I did not get why the outpu...

PHP Output complete notification

I'm trying find a way to have PHP to indicate to the browser that all page output is complete. After the page is done we're running some statistics code that usually doesn't take to long but in case it does I don't want to have the users browser waiting for more data. This can't be done via JavaScript because it needs to work with mobil...

How to create XML from MSXML DOM

I've loaded an XML into a MSXML DOM node hierarchy, manipulated some of the nodes, and now I'd like to create an XML as a string from the node hierarchy. I know MSXML exposes a save functionality through IXMLDOMDocument.save(), however it is: 1) non-standard (i.e. not specified by W3C), and 2) apparently only writing to files (e.g. not t...

Getting output from one executable in an other one

Hi there. I'm currently trying to get the output of an executable console-app into an other one. To be exact, a little overview of what I'm trying to do: I have one executable which I cannot edit and neither see it's code. It writes some (quite a bunch to be honest) lines into the console when executed. Now I want to write another exe...

csv output format from sqlplus run in a Unix script

I need to format csv output file from a sqlplus query. The char and varchar output fields come out in the max column size in the table, which means a lot of columns have extra blanks, plus the comma seperator. How can I get rid of the extra blanks in my csv file? Also how can I get "" around the numeric fields? ...