Connecting Laptop to TV using HDMI Port

2010
05
Apr

Connecting laptop to tv using HDMI Port HDMI or High Definition Multimedia Input is a new technology to connect Multimedia devices like laptops, DVD Players and TVs. HDMI is capable of upto 10 Gbps transmission of High Definition Videosin Full HD Resolution (1080p). Unlike other ports that connect to screens like VGA, SVideo, the advantage of HDMI is that a single cable connection carries both the audio and video channels.

Read More

Cygwin: Clear screen command, How to clear the screen ?

2010
05
Apr

Clear screen on cygwin

Some one may be wondering where is the clear command on cygwin. If we type either

cls

or

clear

we would be shown bash: clear: command not found. So there are many fancy ways to clear the command line prompt, but the one I liked the best is

Ctrl + L

Simple, just press Control + L on the keyboard and your command line prompt cleans up.
Smiling



Sony Vaio CW VPCCW26FG EDID (Extended display identification data)

2010
02
Apr
1

Extended display identification data (EDID) is a data structure provided by a computer display to describe its capabilities to a graphics card. It is what enables a modern personal computer to know what kind of monitor is connected. EDID is defined by a standard published by the Video Electronics Standards Association (VESA). The EDID includes manufacturer name and serial number, product type, phosphor or filter type, timings supported by the display, display size, luminance data and (for digital displays only) pixel mapping data.

Read More

CodeIgniter: Use GET Parameters for OAuth or Facebook

2010
02
Apr
1

Codeignitor destroys your GET parameters, because it does not use it, however for applications that use OAuth, Facebook Applications or Facebook authentication using Facebook connect, GET parameters are required.

In order to retrieve GET parameters from Code Ignitor, first we have to change the config.php, uri_protocol to PATH_INFO,
this solves 404 Errors with GET parameters on Codeigniter

/*
|--------------------------------------------------------------------------
| URI PROTOCOL

Read More

Install Wireless Wifi drivers on Sony Vaio CW on Linux Ubuntu

2010
01
Apr

Out of the box Ubuntu 9.10 wireless/wifi did not work on my Sony Vaio CW Series (VPCCW26FG), The following error message is shown on start up and on dmesg command.

Could not read microcode: -2

The solution was to install backports modules.

Installing Wireless Drivers on Ubuntu

In order to make wireless (WiFi) work on the new Sony Vaio CW series, you have to run the following commands on Ubuntu 9.10 Karmic.

sudo apt-get clean
sudo apt-get update
sudo apt-get install linux-backports-modules-karmic

Read More

PERL: How to remove an element from hash or array?

2010
29
Mar

In order to remove an element from the array or hash, we have to use the delete keyword on perl. Using the delete keyword on the key of the hash or array (numeric keyed hash), we can delete elements of a hash or array.

Example for deleting an element from a hash

The following code deletes the key 'a' from the hash

%hash

.

#!/usr/bin/perl
$, = "\n"; # Fields separator
my %hash = (
'a' => 'aaa', 
'b' => 'bbb',
'c' => 'ccc',
);
 
print %hash;
delete $hash{a}; #key value pair 'a' => 'aaa' would be deleted
print %hash;

Read More

Resolve Net::MySQL Hang problem if the database result has only 1 row or is empty

2010
26
Mar

Net::MySQL is a simple MySQL perl Client to connect to MySQL servers. But Net::MySQL hangs if your result set is having just one row.

Sample Net::MySQL code

#!/usr/bin/perl
 
use Net::MySQL;
 
$mysql = Net::MySQL->new(
	hostname => 'localhost',
	database => 'db',
	user     => 'user',
	password => 'password',
);
 
$gid = 1;
 
$mysql->query('SELECT * FROM table WHERE id = 1');
 
if ($mysql->has_selected_record) {
	my $record_set = $mysql->create_record_iterator;
	while(my $record = $record_set->each) {

Read More

Syndicate content