multi-threaded Perl, I’ve missed you…
#!/usr/bin/perl -w
use strict ;
my $can_use_threads = eval 'use threads; 1';
die("Your Perl doesn't support threads\n") if (!$can_use_threads) ;
use threads ;
use threads::shared ;
my @threads = () ;
# spin a bunch of threads
for (my $i=0; $i<5; $i++) {
my $param1 = $i ;
my $param2 = $i**2 ;
$threads[$i] = threads->create(\&thread_function, $param1, $param2) or die("couldn't create a thread for i: $i\n") ;
}
# wait for all threads to finish
for (my $i=0; $i<5; $i++) {
$threads[$i]->join() ;
}
exit ;
sub thread_function
{
my $param1 = shift ;
my $param2 = shift ;
print "Hi there, I'm thread #$param1, my value is $param2\n" ;
}
Apple iOS 3 and 4 VS Android 2.1 and 2.2
Ubuntu 10.04 on Alienware M17x (R1)
After several failed attempts to install Linux late last year, and over the past week or so, I finally got Ubuntu 10.04 installed on my Alienware laptop. Working wifi, working audio, working nvidia graphics.
To get started, I downloaded unetbootin-windows-442.exe, and the Ubuntu 10.04 LTS CD .iso, and ran unetbootin to unpack the ISO on a USB stick. When that was finished, I rebooted, went into the BIOS and disabled both the hybrid graphics and the integrated graphics, rebooted again and selected F12 to choose my boot medium, and booted from the USB stick.
With the graphics cards ‘disabled’, installation began in 1900×1200 native mode. I moved my 25GB recovery partition to another USB drive using dd:
dd if=/dev/sda2 of=/media/MyPassport/DellRecovery.partition
I then removed that partition and started the Ubuntu installer.
When installation was complete, and I rebooted, I realized I had no way to download the restricted STA driver, but there’s a workaround — you can install it from your installation medium by running a dpkg command. First, insert your installation medium, then start a Terminal prompt, change to the mount folder, such as /media/cdrom or in my case, /media/CORSAIR … from there, change into the pool folder, so your path is similar to /media/CORSAIR/pool/ and run the following command:
sudo dpkg -i restricted/b/bcmwl/bcmwl-kernel-source_5.60.48.36+bdcom-0ubuntu3_i386.deb \
main/d/dkms/dkms_2.1.1.2-2fakesync1_all.deb \
main/p/patch/patch_2.6-2ubuntu1_i386.deb
This will install the restricted driver and kernel patch, etc.
Next, I downloaded all available updates, rebooted, loaded the restricted nvidia driver, rebooted, and voila:
Now to see if the HDMI output will work at the office in the morning for a dual monitor setup.

Recent Comments