I am able to transform carriage returns into new lines. The problem however is to get it running in nearly 'real time'. It will be quite stupid looking if progres bar only values are 0 and 100 :-)
This code returns output at once:
import subprocess
p = subprocess.Popen(['mplayer', '/home/user/sample.mkv'], stdout=subprocess.PIPE).comm...
Hi,
I am using SQL Management objects to connect to SQL server. At the moment they contain simple "create table" commands for my example.
I run this code twice on purpose to cause an error for "table already exists".
However my events below are not getting triggered.
Anyone got any ideas, how I can get hold of this message in my co...
Hello,
I am writing some unit tests in ruby and have tests like the following:
def executing_a_signal
a_method(a_signal.new, a_model, a_helper);
assert_equal(new_state, a_model.state)
end
The tests work fine, but the method which runs just before the assertion to execute the logic prints various messages to the console (m...
Is it possible in PHP to get a count of the number of bytes transmitted to the client? For example, if I'm outputting a 10 MB file, is there a way to find out if all 10 MB were sent to the client, or to see if the client interrupted the transfer partway? I know Apache will log this afterwards, but I'd like to access the data in PHP.
...
I have a php function that I wish to reduce even further.
<?='Testing'?>
Is there a way to reduce this any further?
...
Hello,
I'm writing program in C++ (for XAMPP communication) and I want to execute command which I have in strings (I know that this is simply system("command")) but I want to get the output from bash to C++ to string. I've founded several threads about this, but no which solved Bash -> C++.
...
So I have this special output:
dAmn_Raw('send chat:Sandbox\n\nmsg main\n\nthismessage');
I have a variable: myvariable that equals a random value from an array I made.
I'd like this random value to show up in chat through this output, but I can't include
it in the output line of code. How would I got about writing something that repl...
I have a large static table which is generated by a cgi script from a tmp file to a php file.
If it outputs
<td> </td>
Can I remove these with output buffering.
...
I am running a loop in a Fortran 90 program that outputs numerical values to an output file for each iteration of the loop. The problem is that the output is not saved to the file but every so many steps. How do I get it to flush each step?
Example code:
open(unit=1,file='output')
do i = 1, 1000
write(1,*) i
end do
close(unit=1)
...
Hi
I was trying to output a not null terminated char array to a file.
Actual thing is, I am receiving packets and then printing their fields.
Now as these fields are not null terminated, for example, a data segment which has size of 512 but may or may not be completely occupied.
When I write this data to a file I am using simple << ...
I need to read output from native C++ console application in my C++/.NET. There are many articles about this, but most wait until the process ends to read the output, which I don't want to, I need to read it immediately after it is "cout-ed" by the process (and don't want to block the GUI while doing so, but that's something I can do on ...
I'm getting weird results from the System.out.print immediately below the Scanner declaration in the code snippet below. It seems like it's executing twice. I've debugged it and immediately after executing the print statement I get this in standard out:
run:
Input a freaking binary number: Input a freaking binary number:
I added t...
I have a crontab job calling a python script and outputting to a file:
python run.py &> current_date.log
now sometimes when I do
tail -f current_date.log
I see the file filling up with the output, but other times the log file exists, but stays empty for a long time. I am sure that the python script is printing stuff right after it...
I have an issue with my C++ code for college. I can't seem to understand why my sRecSort() method isn't working.
Any help? This is really confusing me!
#include <iostream>
#include <algorithm>
#include <string>
#include <fstream>
#include <sstream>
using namespace std;
void sRecSort(string n[], int s[], string e[], int len){
for (in...
Hi all,
I am kind of newbie on C++, and working on a simple program on Linux which is supposed to invoke another program in the same directory and get the output of the invoked program without showing output of the invoked program on console. This is the code snippet that I am working on:
pid_t pid;
cout<<"General sentance:"<<en...
I've debugged my program and the arrays seem to be allocated well. However for some strange and stupid reason, the code doesn't output the arrays into the file.
Please help me spot my bug or such!
#include <iostream>
#include <algorithm>
#include <string>
#include <fstream>
using namespace std;
void sRecSort(string *n, int *s, string...
I'm trying to benchmark a simple webserver I wrote, but I'm having trouble deciphering what Autobench has outputted. I've been googling all over for help on this (even going through the autobench and httperf source code) but haven't been able to grok what's going on.
I ran the following benchmark on my server:
autobench --single_host ...
I want my resulting *.css file to land in the output/css directory instead of the stylesheets directory. How would I go about doing this?
I've already tried:
Compass.configuration do |config|
config.project_path = File.dirname(__FILE__)
config.sass_dir = File.join('src','stylesheets')
config.css_dir = 'css'
config.output_style...
How do you redirect the output of printf to, for example, a stream or something? I have a gui app that links with a console library. The library makes repeated calls to printf. I need a way to intercept those and have them processed by a function. Also, creating a console is not an option. Im using Windows, btw.
Edit - Also I was hoping...
How do I set this up so that I can manipulate $backgroundcolor = "#00FFFF";
on another .php file?
Initially I just want to be able to change the value of the $backgroundcolor ="#00FFFF";
From another form that is hrefed to this form (style.php) based on user input.
I Tried this on this form so that I could hopefully give $backg...