output

Output location of images for django-imagekit

I'm trying to output a list of images that belong to each record in my app as below: pri_photo = vehicle.images.all()[:1] sec_photos = vehicle.images.all()[1:] This first part is OK. The part I'm having issues with is when I try pri_photo.original_image.url sec_photos.original_image.url The above two lines of code give me a 'Query...

Display output of a Bash command and keeping the output in a variable

Hi again, I'm not sure if it is possible but what I want to do is to run a bash command and storing the output in a variable AND display it as if I launched the command normally. Here is my code: VAR=`svn checkout $URL` So I want to store the output in VAR and still see the result (and because svn checkout takes a long time, I can't ...

Faster way to create tab deliminated text files?

Hello everyone, Many of my programs output huge volumes of data for me to review on Excel. The best way to view all these files is to use a tab deliminated text format. Currently i use this chunk of code to get it done: ofstream output (fileName.c_str()); for (int j = 0; j < dim; j++) { for (int i = 0; i < dim; i++) output...

Using Haskell to output a UTF-8-encoded ByteString

I'm going out of my mind trying to simply output UTF-8-encoded data to the console. I've managed to accomplish this using String, but now I'd like to do the same with ByteString. Is there a nice and fast way to do this? This is what I've got so far, and it's not working: import Prelude hiding (putStr) import Data.ByteString.Char8 (put...

unreadable var_dump() output on Snow Leopard?

I have xdebug configured as shown below but the error-output is totally unreadable. Do you have an idea what's wrong with the setup? TIA & best regards Setup: Apache/2.2.13 (Unix) PHP/5.3.0 on Snow Leopard Server Config from php.ini: xdebug.remote_autostart=0 xdebug.remote_enable=1 xdebug.remote_host=10.0.1.9 xdebug.remote_connect_ba...

SubSonic - getting sproc output parameters by name?

My sproc signature is defined as: ALTER PROCEDURE [dbo].[AuthenticateUser] -- Add the parameters for the stored procedure here @UserName varchar(64), @UserPassword varchar(64), @Result INT OUT, @ErrorMessage VARCHAR(25) OUT AS BEGIN.... Calling this sproc with SubSonic: DataSet dsResults = new DataSet(); Stored...

Displaying Flash output window data into text field

Hi, is it possible to display the output window's contents into a textField so it can be seen in the SWF? Has anyone tried this? ...

Filtered tasklist piped into find doesn't show console output?

Windows XP Pro This shows output in the console: dir | find " free" This doesn't: tasklist | find "Image Name" This does: tasklist | find /C "Image Name" And this does write the expected line into the file: tasklist | find "Image Name" > foo.txt What causes that? ...

Batch file: store lines of command's output without writing to a file?

Windows XP My batch file runs a command that has several lines of output. How can I count (and store in a variable) the lines of output without ever writing to the disk? ...

Efficiency of using a function to output html tags in php

Trying to come up with a basic way to display code in a way that would be nicely maintainable, I thought of doing something like this: echo htmlfunction('a',array('href'=>'http://google.com'),'google'); to generate: <a href="http://google.com"&gt;google&lt;/a&gt; this would use as a global scale function to output all html tags. th...

Affect of Content Deployment on Caching

Hi All , we are working on a website with three tier architecture. And the content store is a File System which contains the static content like images and all. We have two types of pages which contain static content and dynamic content but on the whole the page rendering is dynamic. The question is what will be the affect of accessing...

Storing output messages inside constants in PHP

Will it downgrade performance significantly (or exhaust the server with http requests), or maybe ill advised, to do something like this echo "<span>enter_username_message</span>"; and centralize this constant along with all output messages in one file, so that those could be changed without getting into the code: define('enter_userna...

Strange PHP output corruption

I'm having a very strange output corruption on one of my PHP sites. Sometimes, a piece of HTML code is displayed, rather than the tags being interpreted. It looks like some characters are missing, messing up the tags. See the example below: the second line should just be a link to c1, but due to some reason part of the target URL is show...

Xcode and input/output files

I have to put my input files directly in the root directory for xcode to see them, and the output files are always in the same root directly. How can I configure xcode to change the input/output directories ? ...

Is it possible to view the messages outputted by Microsoft ReportViewer in my own front-end?

I would like to view the messages displayed by ReportViewer in the output window of Visual Studio when a report is viewed, in my own application. I assume it would involve intercepting the debug or console output messages. Is this possible? I am using Microsoft ReportViewer 2008 in local mode. ...

Can a recursive function write to a file in C++?

I'm going to have two class functions. The first class function opens the file. Then it calls a second function that writes to the file and recursively calls itself. When the second function finishes, the original function closes the file. Is it possible to do this? ...

Formatting an output file.

I'm currently indexing my music collection with python. Ideally I'd like my output file to be formatted as; "Artist; Album; Tracks - length - bitrate - md5 Artist2; Album2; Tracks - length - bitrate - md5" But I can't seem to work out how to achieve this. Any suggestions? ...

output code AS IS

add in note i have to paste 3 time the following code in the html body of a static webpage, instead of having to paste it and have a lot of code, i prefer to only have one line (3 times) that call the writing of the code, like this : <?php getgooglepub(); ?> I like to make a php function that will ouput to the hmtl page the google ana...

How to make G++ preprocessor output a newline in a macro?

Hello, Is there a way in gcc/g++ 4.* to write a macro that expands into several lines? The following code: #define A X \ Y Expands into X Y I need a macro expanding into X Y ...

Is it possible create an output property to show endtime on custom activity properties when activity completed

when do the custom activity in .net 3.5, I tried to add a datetime property to show user when the activity completed, however as this property will be assigned value during workflow runtime, it cannot been show up the value to user, do you guys have any idea? ...