Posted on May 29, 2008 by linuxconfig
From time to time I need to search for eamils in my gmail account for unread emails.
Even advanced gmail search does not have that option available however the solutions is simpler thna that. Into search text box type: ” label:Unread ” and hit search button.
If you would like to search just in your lables or [...]
Filed under: Uncategorized | Leave a Comment »
Posted on December 19, 2007 by linuxconfig
Using single while loop to calculate Fibonacci number. This script is in Perl but can be easily translated to any other language:
#!/usr/bin/perl
$i=0;
$fibonacci_number=0;
$a=1;
$b=0;
while ($i < 30) {
$b = $fibonacci_number;
$fibonacci_number = $a + $b;
print $fibonacci_number . “,”;
$a = $b;
$i++;
}
print “\n”;
Output:
./fibonacci.pl
1,1,2,3,5,8,13,21,34,55,89,144,233,377,610,987,1597,2584,4181,6765,
10946,17711,28657,46368,75025,121393,196418,317811,514229,832040,
Filed under: Perl, Uncategorized | Leave a Comment »