When I run some python code in NetBeans, which raises an error, the output in NetBeans just gives an error message and no further information, such as line number. Is there any way to fix that?
Assume that I have a text file separated by colons. I understand how to display the entire text file or any specific column using awk. However, what I want to do is to get the awk output and then display it by adding my own text using a shell script? For example, assume that my text file is:
England:London:GMT
USA:Washington:EST
France:Paris:GMT
What I want to do is to display this input into the below format:
COUNTRY: England
CAPITOL: London
TIMEZONE: GMT
COUNTRY: USA
CAPITOL: Washington
TIMEZONE: EST
COUNTRY: France
CAPITOL: Paris
TIMEZONE: GMT
Hi,
i have in my program few swf files and using mxmlc i compile the application into one swf file.
when i open the swf from the output directory(just dbl click) everything works fine.
But, when i copy the directory to another location in the hardisk the application stops responding
(i can see my swf main picture and its buttons in it.
But, when i click a button which just popup a message, it doesn't work!)
any help?
Hi
Given a list of dates (which may not be sorted), I want to build a list of date ranges -
E.g. Assuming MM/DD format,
Input - 5/1, 5/5, 5/6, 5/15, 5/7, 5/8, 5/19,5/20, 5/23
Output -
Date Range 1: 5/1 to 5/1
Date Range 2: 5/5 to 5/8
Date Range 3: 5/15 to 5/15
Date Range 4: 5/19 to 5/20
Date Range 5: 5/23 to 5/23
Basically, a range should be continuous.
Thanks
Nakul Ringshia
Hi all,
I have the following table.
mysql> select * from consumer2;
SERVICE_ID SERVICE_TYPE CONSUMER_FEEDBACK
31 PRINTER 1
32 PRINTER -1
33 PRINTER 0
34 PRINTER -1
35 PRINTER 0
31 PRINTER 0
32 PRINTER 1
35 PRINTER 1
31 PRINTER 0
From the above table i need to select the bottom 4 values using mysql
i need to get the output as follows
SERVICE_ID SERVICE_TYPE CONSUMER_FEEDBACK
31 PRINTER 0
32 PRINTER 1
35 PRINTER 1
31 PRINTER 0
Please help me.Thank u in advance.
I am looking for a c# example project of a winform wich redirect the output from a batch file running in background to any kind of winform control.
Any suggestions?
Thanks!
Error:
Warning: imagejpeg() [function.imagejpeg]: Unable to open 'images/xxx/xxx.jpg' for writing: Permission denied in /usr/www/users/xxx/resources/func.createthumbs.php on line 48
images/xxx/xxx/xxx.jpg
Warning: Cannot modify header information - headers already sent by (output started at /usr/www/users/xxx/resources/updatethumbs.php:17) in /usr/www/users/xxx/resources/func.createthumbs.php on line 3
So... How can I change the permission? This is being run on a shared server--is it possible?
Given a infinite stream of random 0's and 1's that is from a biased (e.g. 1's are more common than 0's by a know factor) but otherwise ideal random number generator, I want to convert it into a (shorter) infinite stream that is just as ideal but also unbiased.
Looking up the definition of entropy finds this graph showing how many bits of output I should, in theory, be able to get from each bit of input.
The question: Is there any practical way to actually implement a converter that is nearly ideally efficient?
Can we use Replace function in a update statement ?
If yes then How?
I have a column 'enrollno' having values like '800-00001' to '800-01800'.
I want to replace inital '800-' to '800' in all 1800 records.
(Output should be '8000001' to '80001800')
Is it possible through replace function or any other option is there in ORACLE8i ?
MaheshA...
I have a daemon (written in C, but I assume it does not really matter) which outputs messages with printf, and can get input and do stuff with this input (again, not really important what, but he sends those messages to a different machine to be saved there in the DB).
My question, how can I make this daemon to be a stream in PHP, so I can hook the input/output of, for example, file_put_contents to this stream.
2 threads going to use the same func().
The 2 threads should be mutually exclusive. How do I get it to work properly?
(output should be "abcdeabcde")
char arr[] = "ABCDE";
int len = 5;
void func(){
for(int i = 0; i <len;i++)
printf("%c,arr[i]);
}
Is there a way to configure hg com so that in the commit message file that pops up in the external editor, instead of just showing which files were changed (in the HG: lines) it actually shows the full diff? I'd rather view the output and compose my commit message simultaneously from the comfort of my text editor as opposed to doing hg diff on the command line separately beforehand.
I need to print the following values with printf as the follwoing around like this:
printf "[`date +%d"/"%b"/"%G"-"%T`] [WARN] $PARAM1 $PARAM2 $PARAM3
The required output:
[02/Jun/2010-11:08:42] [WARN] val1....val2...val3
If I have the enum:
public enum VehicleType
{
Car = 0,
Boat = 1,
Bike = 2,
Spaceship = 3
}
and I then do:
int X = 10;
VehicleType vt = (VehicleType)2;
X = X + vt;
Console.WriteLine("I travel in a " + vt + " with " + X + " people.");
What should the output be in C#?
I want to add a key,value pair into a hashtable (or any other collection) but have to maintain insertion order. How can I do this?
Like I'll add 1 as key "one" as value, 2 as key and "two" as value.
The output should be ordered as:
1:one
2:two
Hi.
I have a process where one of the things to do is to capture the output from a print into a file for further processing. For this I have configured a "FILE:" printer port which works very nicely but asks everytime for the file name to use.
Unfortunately "FILE" is not a very descriptive word when trying to use a search engine :(
Is there a small driver somewhere which does exactly the same as the FILE: driver, but can automatically generate a filename (perhaps based on a pattern) and just print to that?
Anyone know how to use Get-Member to Recursively dump to a text file The entire properties|methods tree of a COM object? (The Output formatting of Get-Object is fine)
Instead of giving me only the top level as in this example;
New-Object -com AutoItX3.Control | Get-Member
I need it to recurse the entire object to return results.
If This is not possible, how would I dump the methods/properties of a sub object?
is it possible to read the datatype of a vector?
var vec:Vector.<int> = new Vector.<int>;
trace(the datatype of vec);
//ideally this would output 'int'
I have a Ruby app with a lot of classes/modules, and some of them are not used. Is there an easy way of finding out which?
I was thinking to do a profile, and then work with it's output. Any other ideas?
I just created a project so my Solution Explorer looks like this:
But I want to add another project which is related to this project but it's going to be a class library and it's going to output a DLL that I could use in any other project.
So how can I create a "solution" with multiple projects?
I have to compare two folder structure and with reference of source folder I want to delete all the files/folders present in other destination folder which do not exist in reference source folder, how could i do this?
$original = scan_dir_recursive('/var/www/html/copy2');
$mirror = scan_dir_recursive('/var/www/html/copy1');
function scan_dir_recursive($dir) {
$all_paths = array();
$new_paths = scandir($dir);
foreach ($new_paths as $path) {
if ($path == '.' || $path == '..') {
continue;
}
$path = $dir . DIRECTORY_SEPARATOR . $path;
if (is_dir($path)) {
$all_paths = array_merge($all_paths, scan_dir_recursive($path));
} else {
$all_paths[] = $path;
}
}
return $all_paths;
}
foreach($mirror as $mirr)
{
if($mirr != '.' && $mirr != '..')
{
if(!in_array($mirr, $original))
{
unlink($mirr);
// delete the file
}
}
}
The above code shows what i did.. Here My copy1 folder contains extra files than copy2 folders hence i need these extra files to be deleted.
Below given output is are arrays of original Mirror and of difference of both..
Original Array
(
[0] => /var/www/html/copy2/Copy (5) of New Text Document.txt
[1] => /var/www/html/copy2/Copy of New Text Document.txt
)
Mirror Array
(
[0] => /var/www/html/copy1/Copy (2) of New Text Document.txt
[1] => /var/www/html/copy1/Copy (3) of New Text Document.txt
[2] => /var/www/html/copy1/Copy (5) of New Text Document.txt
)
Difference Array
(
[0] => /var/www/html/copy1/Copy (2) of New Text Document.txt
[1] => /var/www/html/copy1/Copy (3) of New Text Document.txt
[2] => /var/www/html/copy1/Copy (5) of New Text Document.txt
)
when i iterate a loop to delete on difference array all files has to be deleted as per displayed output.. how can i rectify this.. the loop for deletion is given below.
$dirs_to_delete = array();
foreach ($diff_path as $path) {
if (is_dir($path)) {
$dirs_to_delete[] = $path;
} else {
unlink($path);
}
}
while ($dir = array_pop($dirs_to_delete)) {
rmdir($dir);
}
I have used Fiddler2 with great results on windows before, but now I have moved to using linux for development. The problem I have, is that I have not been able to find a decent replacement for Fiddler2 that will run on linux.
I have tried Wireshark, but it is perhaps too generic in what it does, and I can never really make any sense of its output.
What tools do you use on linux to debug/inspect web-traffic during development?
I have a page where I need to display a pdf and an "I agree" button.
Q: Do I use cfpdf to create a thumbnail of the pdf and display the resulting output?
Chapter 32 of cfWack 8 talks about using cfpdf.