output

How to nicely output a list of separated strings ?

Usually, when I had to display a list of separated strings, I was doing something like: using namespace std; vector<string> mylist; // Lets consider it has 3 elements : apple, banana and orange. for (vector<string>::iterator item = mylist.begin(); item != mylist.end(); ++item) { if (item == mylist.begin()) { cout << *item; } ...

Powershell 2.0 generates nulls between characters

With powershell 2.0: write-output "abcd" >> mytext.txt writes: a nul b nul c nul d nul od -c shows the nul as a true binary zero, \0 , or: a \0 b \0 c \0 d \0 (and \r \0 \n \0) I am trying to generate some SQL, so I don't think this will do. Any ideas of what's going on and how to use write-output to just get the specifie...

DB2 truncated output

Hi, when i make select (command prompt WinXP) like: enter code here db2 select message_data from messages where message_id = 20043 i get output + 'Output is truncated' message. message_data is LONG VARCHAR > 30000 characters If i do like: enter code here db2 select message_data from messages where message_id = 20043 > c:\otpt.xml ...

Intercept outputs from a Program in Windows 7

I have an executable program which outputs data to the harddisk e.g. C:\documents. I need some means to intercept the data in Windows 7 before they get to the hard drive. Then I will encrypt the data and send it back to the harddisk. Unfortunately, the .exe file does not support redirection command i.e. > in command prompt. Do you know ...

Aesthetic question about Xstream XML output

Hi all, When I output an XML file using Xstream with a custom converter, all the nodes are printed out nice and indented etc., however when I print out another object, there is no new line between the end object tag and the new object tag. Take the example below: </macroblock> </frame> </MetadataFrame><MetadataFrame frame="456"> ...

Save mysql query to excel file from php webpage

Hi, I have a table within a mysql database. What i want to do, is in a php page, run a select statement and output the result into an excel file. I've seen quite a few tutorials out there and tried them, however these output the contents of the webpage into the excel file. I just want the mysql table data and headers. Is there a wa...

Wrong output in Python - as per my logic

Can someone tell me why my program is working weird. I am trying to sort list1 in ascending order. This code is part of my quick sort program I am trying to write. As per my logic which I am applying in this code, and I checked manually too, the output should be [1,2,3,4,5]. However the output is coming out to be [1,2,2,4,5]. Can you tel...

Perl Output issues

This is going to seem extremely trivial, but it just doesn't make any sense to me. I have the following snippit of code: foreach $i (@inputtext) { @line = split(/\|/, $i); foreach $j (@line) { print "$j, "; } } The input is three of the following lines, identical: 98465895|No idea what goes here|123 anywhere lane|city|ST...

Missing PDB file and referenced output

My .Net Application, A, has a reference to library B. Library B has a reference to Library C. When I rebuild A (in debug mode), its output directory contains me the B.DLL and B.PDB files, but only the C.DLL file. C.PDB is missing, or rather it is not being copied from its project's debug folder. In fact, looking at B's output directory,...

XSL output method text including whitespaces in xsl

Hi, I am creating some xsl to transform my xml into text (which will be csv eventually). I am using VS2008. When I use the editor to create the xsl, the transformed output is indented as per my xsl. However, if I edit the xsl and remove the formatted whitespaces it outputs correctly - but doing it like this is a nightmare to work wit...

Library for visualizing object graphs in .NET

Does anyone know of, or can recommend, a library that can recursively visualize an arbitrary object graph in .NET? I need to be able to print out (to the console) a formatted representation of an object graph. For example, given a simple object graph like this: var foo = new Foo(); foo.Bar = new Bar(); foo.Bar.Baz = 42; foo.Bar.Qux = "...

Getting many Binding "Information" in WPF output window

When I start my app I get alot information like this: System.Windows.Data Information: 10 : Cannot retrieve value using the binding and no valid fallback value exists; using default instead. BindingExpression:Path=Period; DataItem=null; target element is 'TextBlock' (Name=''); target property is 'Text' (type 'String') System.Windows.Da...

Weird output during JVM application execution in Eclipse - how to debug?

Hi, I've encountered weird Eclipse console output during my application execution. I'm almost 100% sure that it's my application's fault, but I couldn't find any information on how such output should be interpreted. After printing those characters, Eclipse freezes. Screenshot here My bet is problem with thread synchronisation, but how...

Output from a file in printf

Looking for help with the following code: package pkgPeople; import java.io.File; import java.io.FileOutputStream; import java.io.ObjectOutputStream; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Scanner; public class RetrieveNonSerializedFile { public static void main(String[] args) throws Exception{ ...

Visual Studio 2008 always build to C:\Users\bin\Debug\MyLibrary.dll

Although I have set the output build path to: ..\..\..\..\..\..\bin\Debug\ All other projects accept the relative path above. Why not that newly added project? When I choose the FolderDialog to set the output path, press ok then I see the absolute path in the output path textbox. Now I copy paste my relative path into the output path t...

php exec() not returning error message in output when executing svn command

Hello everyone. I am trying to get certain output for svn command in XML format. Output is ok when I type valid parameters. However, when I type in wrong password, output does not show error message. This is the PHP code: exec('/usr/bin/svn --username something --password something --non-interactive log -r HEAD --xml --verbose http://a5...

How to pipe program output in an editor?

I have my program generating some data. It output everything on standard error. Now I'd like to redirect the output to a newly started text editor, into the main unnamed edit window that shows at startup. I tried with vim and gedit without success. myprogram | gedit myprogram | gvim Anyone knows about an X11 text editor that would su...

Is there any setfill() alternative for C?

In C++: int main() { cout << setfill('#') << setw(10) << 5 << endl; return 0; } Outputs: #########5 Is there any setfill() alternative for C? Or how to do this in C without manually creating the string? Thanks in advance. ...

Configure a PIC pin for Input and Output

I am working on a project which uses a PIC24FJ64GA002 mcu. I am working on a bit-banged serial communication function that will use one wire to send data and then switch to receive mode to receive data on the same pin. A separate pin will be used for clocking which will always be controlled by a different board (always an input). I am w...

Asynchronous Cmd.exe Output Redirection Problem

I'm using VB.new to create my own custom Command Line Program. It's a windows form Application that starts a new "cmd.exe" process. My Form has one big TextBox which all the cmd.exe's output is displayed to. And it has a smaller text box in which you can type commands to send to cmd.exe. Everything works for the most part. I can send com...