Wednesday, 5 October 2011

Glass effect in ununtu like windows7

In Ubuntu you can set nearly the same aero glass effect to window borders with alpha transparency as available in Windows 7.
  1. Aero Glass EffectPress Alt+F2 to bring up "Run Application" window.
  2. Type gconf-editor into the box, click "Run" to bring up Configuration Editor.
  3. Browse to apps > gwd, look for "metacity_theme_active_opacity" on the right panel.
  4. Change the value in "metacity_theme_active_opacity" from 1 to 0.75 (or smaller such as 0.5 for more transparency).
  5. Then go to System > Preferences > CompizConfig Settings Manager
  6. Select "Effects" from the left panel.
  7. Tick "Blur Windows" and click the "Close" button. (Note: default values in Blur Windows can be applied.)
   If the aero glass effect doesn't work, check if you have updated your display driver. Go to System > Administration > Additional Drivers, activate the recommended graphics driver and restart the system.

Move Window Control Buttons to the Right

If your Ubuntu system sets the Minimize, Maximize and Close buttons to the left in a window and you prefer to change them to the right, then follow these simple steps:


  1. Move buttons to rightPress Alt+F2 to bring up "Run Application" window.
  2. Type gconf-editor into the box, click "Run" to bring up Configuration Editor.
  3. Browse to apps > metacity > general, look for "button_layout" on the right panel.
  4. Change the value in the "button_layout" from close,minimize,maximize: to menu:minimize,maximize,close and press the Enter key

Wednesday, 21 September 2011

How to remove repeated entries from a Perl array



How to remove repeated entries from a Perl array

Simply assign each elements of array to a key of hash variable.
And extract the keys.

Sample code is as bellow.

#--------------------------------
my @array = qw(3 1 2 3  5 4 2 66 44 55 4 5 6 7 8 9);
print join " ", @array, "\n";
my @array1 = uniq(@array);
print join " ", @array1, "\n";

sub uniq {
    return keys %{{ map { $_ => 1 } @_ }};
}

Monday, 19 September 2011

White LED Light Dangerous

White LED light is more dangerous than orange and yellow ones, says a new study. According to the study, the exposure to white LED bulbs suppresses the production of melatonin in human brain. This can affect our biological clock as against the exposure of orange-yellow LED light bulbs.

An ANI report talking about the study said that Melatonin is responsible for adjusting our biological clock and is known for its anti-oxidant and anti-cancerous properties. Suppressing the production of melatonin causes health-related issues and behaviour disruptions.






The study was conducted by the astronomers, physicists and biologists from ISTIL- Light Pollution Science and Technology Institute in Italy, the National Geophysical Data Centre in Boulder, Colorado, and the University of Haifa. According to the ANI report, researchers had examined the differences in melatonin suppression in a various types of light bulbs, primarily those used for outdoor illumination, such as streetlights, road lighting, mall lighting and the like, for the first time.

The researchers found that the metal halide bulb, which gives off a white light, suppresses melatonin at a rate more than three times greater than the high-pressure sodium HPS bulb that gives off orange-yellow light. Metal Halide bulbs are used as stadium lights. The white LED bulb was found suppressing melatonin at a rate more than five times higher than the HPS bulb.

The report quoted researcher as saying, “The current migration from the now widely used sodium lamps to white lamps will increase melatonin suppression in humans and animals.” The study recently appeared in the Journal of Environmental Management. 

Thursday, 16 June 2011

Perl Script for Excel File read

How to access excel with perl?

While i was wandering How to read from excel file using perl, I found that it is easy


With perl its very simple to assess excel file.
Excel data will come as array
most simple way to get excel data..........
only 3 line of code.....


#-------------------------------------------------
use Spreadsheet::DataFromExcel;
my $xls_file = Spreadsheet::DataFromExcel->new;
my $xls_data = $xls_file->load( "excel_file.xls" ) or die $xls_file ->error;

#$xls_data is the pointer to the 2D array
#-------------------------------------------------


you have to use Spreadsheet::DataFromExcel.
http://search.cpan.org/~zoffix/Spreadsheet-DataFromExcel-0.0101/lib/Spreadsheet/DataFromExcel.pm