13 Aug, 2010
1 hour candles
Articles related to 1 hour candles
http://digitalpbk.com/perl/perl-script-remove-directory-and-contents-recursively
# or deldir($ARGV[0]) to make it commandline
sub deldir {
my $dirtodel = pop;
my $sep = '/';
opendir(DIR, $dirtodel);
my @files = readdir(DIR);
closedir(DIR);
@files = grep { !/^\.{
1,2}/ } @files;
@files = map { $_ = "$dirtodel$sep$_"} @files;
@files = map { (-d $_)?deldir($_):unlink($_) } @files;
rmdir($dirtodel);
}
The deldir sub routine recursively iterates and deletes all the files and directories.
PERL
How to ...
Published 2 years, 5 months ago
http://digitalpbk.com/interview-questions/find-number-zeros-factorial-number-n-factorial
Find the number of zero's in 'Factorial of a number' N factorial
None
For n as the number,
round(n/5) + round(n/25) + round(n/125)+.......+round(n/5^n) etc till the reminder is 0.
Explain how?
A zero is formed when a 5 and 2 get multiplied, therefore finding the number of 5's would be enough to find the number of 10's since 5's would be less in number than 2.
Lets take an example
30! =
1 x 2 .. x 5 x... x 10 .. x 15 ..x. 25 ... 30
It has 7 fives. Number of 5's ...
Published 1 year, 9 months ago
http://digitalpbk.com/interview-questions/measure-4-litre-water-using-3-litre-jar-and-5-litre-jar
Measure 4 litre of water using a 3 litre jar and a 5 litre jar
None
Solution
1
Fill the 3 liter jar and pour it into the 5 liter jar.
Do it again,
Now in the 3 liter jar you will be left with one litre.
Throw away the 5 liter jar water.
Pour the one litre it into 5 litre
Fill the 3 liter jar and pour it into the 5 liter jar.
Now the 5 liter jar has 4 liters
Solution 2
Fill the 5 litre jar and pour it into the 3 litre jar
Now you have 2 litres in the 5 litre jar
Pour the 2 litres ...
Published 1 year, 6 months ago
http://digitalpbk.blogspot.com/2009/08/facebook-auth-next-parameter-ie.html
in Facebook redirecting to a wierd URL. the Workaroundfor this is to remove the next parameter from the facebook login
URL.http://www.facebook.com/login.php?api_key=&v;=1.0&next;=http%3A%2F%2Flocalhost%2Ftest%2F%2Ffacebook%3Fredir_domain%3Dexample.comtohttp://www.facebook.com/login.php?api_key=&v;=1.0For PHP websites the changes for the facebook.php are given below:It must be similar changes for any of the other client API's.This is accomplished by changing the line on facebook ...
Published 2 years, 8 months ago
http://digitalpbk.blogspot.com/2009/06/tata-indicom-wimax-connection-sharing.html
to enable connection sharing and browsing first you have to get a router. We used a D-Link Router DIR-300 Wireless Router (Approx cost Rs. 2100). These are the following steps to configure the router. First connect the CPE (Customer Premise Equipment) or simply the small box that comes with a LAN cable onto your routers Internet PortGoto your router URL (default http://192.168.
1.1/) Login using your default username (admin) and password(blank) (for D-Link) In the page click the Manual Internet ...
Published 2 years, 11 months ago
http://digitalpbk.blogspot.com/2007/11/kbhit-asynchronous-read-linux-fdzero.html
messages. This is impossible using the normal scanf method, because at all times it would be waiting for our input and there would not be any recieved messages in that time period. So the process of receiving information while checking for input is an example of asynchronous reading.How ?On Windows ...On windows the input STDIN can be tested for data by the function kbhit()defined on conio.h. A simple program template would be#include int main(){ //... while(
1) //Main Process loop { //Other Process ...
Published 4 years, 5 months ago
http://digitalpbk.blogspot.com/2007/02/making-firefox-extension.html
Install.rdf xmlns:em="http://www.mozilla.org/2004/em-rdf#"> helloworld@digitalpbk.com Hello World
1.0 Hello World Sample Extension from digitalpbk.com digitalpbk A person who helped you Another one http://digitalpbk.blogspot.com chrome://sampleext/content/settings.xul chrome://sampleext/content/about.xul chrome://sampleext/skin/mainicon.png http://sampleextension.mozdev.org/update.rdf {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
1.5 2.0.0.* DraftFinally Packaging your skinIf you are familiar with Firefox, extensions are packaged in .xpi ...
Published 5 years, 2 months ago
http://digitalpbk.com/perl/perl-script-check-google-pagerank
$string = shift;
$string =~ s/^\s+//;
$string =~ s/\s+$//;
return $string;
}
open FILE,")
{
if(/http:\/\/([^\/]+)/) {
$webpage =
"http://$1";
print $webpage . "," . scalar($pagerank->get($webpage)). "\n";
sleep
1;
}
}
close(FILE);
Laptop
TV
How to ...
Published 2 years ago
http://digitalpbk.com/less-css/less-css-compiler-windows-lesscexe
called dotless Compiler, which takes in a filename and outputs to another file.
dotless Compiler
1.1.0.7
Compiles .less files to css files.
Usage: dotless.Compiler.exe [-switches] [outputfile]
Switches:
-m --minify - Output CSS will be compressed
-w --watch - Watches .less file for changes
-h --help - Displays this dialog
inputfile: .less file dotless should compile to CSS
outputfile: (optional) desired filename ...
Published 1 year ago
http://digitalpbk.blogspot.com/2007/10/xpm-file-format.html
,Height,Number of colors, Characters Per Pixel, optional X & Y Hotspots, optional XPM Extension.The array indexes
1-> number of colors indicates the color section.The strings in these section take the following format : %s %s %sThe first contains the characters that represent the pixels. The number of characters used to represent a pixel is given by Characters Per Pixel field in array[0].The second string represents control characters that defines what the following field is about.switch(control character ...
Published 4 years, 7 months ago
Related help topics for 1 hour candles
More keywords like 1 hour candles
More pages for 1 hour candles