Can’t locate Net/LDAP.pm

On Debian: # apt-get install libnet-ldap-perl

October 25, 2010 · 1 min · 6 words · kenno

SQL: Update with values from another table

UPDATE Log<br /> SET Username = u.Username, Name = u.Name<br /> FROM Users u<br /> Where u.Id = userid Source: codesnippets.joyent.com

August 13, 2009 · 1 min · 21 words · kenno

MS SQL: Reset identity seed

Occasionally, I need to reset the value of the identity column in MS SQL database. I keep forgetting how to do this, and have to search all the time. So here is a note to myself: DBCC CHECKIDENT (TableName, RESEED, 0)

August 13, 2009 · 1 min · 41 words · kenno

Restore Grub Boot Loader

Warning: this guide is only a personal note to remind myself when I have to restore Grub again. In my previous post, I had just installed Windows 7 as a dual boot with Debian on my Toshiba laptop. The following describe the steps taken to restore the Grub boot loader so that Debian can be started again. I booted the laptop with Ubuntu Live CD, then open a Terminal. To get the partition tables, as a root execute the fdisk command:...

August 8, 2009 · 1 min · 190 words · kenno

Windows 7 64 bit on Toshiba Satellite A200

I just finished installing Windows 7 64-bit Ultimate edtion on my 1+ year old Toshiba laptop. The model is Satellite A200-*****. The installation went smoothly, well almost. On the first boot, the graphic card driver, the finger print reader were automatically updated with Windows update. The only two devices which weren’t detected are: unknown device “ACPITOS6205” (bluetooth) and the Texas Instrument 5-in-1 card reader. The 64-bit driver for the bluetooth can be downloaded from: http://aps2....

August 8, 2009 · 1 min · 131 words · kenno

Linq Read Inserted Id of a Record

Suppose we have the following code sinppets: <br /> private BlogDataContext db = new BlogDataContext ();<br /> ... article.Created = DateTime.UtcNow; article.Modified = DateTime.UtcNow; db.Articles.InsertOnSubmit(article); db.SubmitChanges( ); The ID of the article is automatically generated. How do we get the Id of the newly inserted record? It turns out that the article is updated with the value of Id after the method SubmitChanges( ) is invoked. So, we can just get the Id this way:...

August 4, 2009 · 1 min · 88 words · kenno

Pidgin &#8211; old version of libpurple and unknown protocol

Aaaahhh… I fixed the Pidgin problem with Unknow protocol just 5 minutes after the previous post was made. I’m going to write how I found out the problem and how it has been fixed. If you’re interested, keep reading. In the previous post, I mentioned that I would removed the Pidgin package completely including its configuration file (# apt-get –purge remove pidgin.) I did and followed by re-installation of Pidgin, unfortunately, it didn’t fix anything....

July 10, 2009 · 2 min · 255 words · kenno

Pidgin &#8211; Protocol Unknown (FIXED)

Update: The problem has been fixed. Please see the above post. A few weeks ago, Pidgin could not connect to Yahoo messenger server because Yahoo was changing its protocols. At the time, the Pidgin was at version 2.5.5. Then that Yahoo connection problem has been fixed in version 2.5.7 and newer of Pidgin. Anyway, Pidgin is acting up again. This time I’m not sure what is going on, and it didn’t seem other people are experiecing the same problem – Protocol Unknown for all types of accounts....

July 10, 2009 · 1 min · 209 words · kenno

C# Math.Round

This is just a quick note to remind myself: <br /> Math.Round(4.4); //Returns 4.0.<br /> Math.Round(4.5); //Returns 4.0.<br /> Math.Round(4.6); //Returns 5.0. Credit: Math.Round Method

June 23, 2009 · 1 min · 25 words · kenno

Debian JSON for Ruby

I tried to install JSON for Ruby via RubyGem, # gem install json and I got the following error message: Building native extensions. This could take a while...<br /> ERROR: Error installing json:<br /> ERROR: Failed to build gem native extension. <br /> /usr/bin/ruby1.8 extconf.rb install json<br /> extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)<br /> from extconf.rb:1<br /> <br /> Gem files will remain installed in /usr/lib/ruby/gems/1....

May 24, 2009 · 1 min · 120 words · kenno