Archive for March, 2007

FlexibleLove

Tuesday, March 13th, 2007

FlexibleLove

Source: FlexibleLove.com

No, it has nothing to do with love or anything like it. It is just one cool furniture designed by one Taiwanese designer at “2006 Young Designer Exhibition”.

Some said it looks like a giant slinky. Sure it does when you start to make different kind of design with this product alone. It is so flexible that it can be adjusted to fit just one person or even 10 person!
However, no price is mention in his website. For more information, check out the official website at FlexibleLove. He is currently seeking regional distributors for sales and promotions. I bet this product is going to sell like hot cakes if the price is not too steep for average people, like me!

What do you think? Will you buy one yourself too?

If you like this post, you may want to subscribe to my RSS feed.

Delete vs Truncate in SQL

Monday, March 12th, 2007

If you want to quickly remove all rows of data in a table, use [TRUNCATE] command. Sample SQL statement using [TRUNCATE] command :

TRUNCATE TABLE [tablename]

All indexes, triggers, and structures still remain intact. It is faster than [DELETE] command because when using [DELETE] command, the data is removed and logs as transaction one row at a time. On the other hand, [TRUNCATE] will deallocate the entire data page in the table and reduces the number of logs activities; thus performs better compare to [DELETE] command.

Sample using [DELETE] command:

  1. DELETE FROM [table name]
  2. DELETE FROM [table name] WHERE [clauses]

Getting MAC Address in .Net

Monday, March 5th, 2007

Below is the VB.Net snippet to retrieve MAC address available on your machine.

‘Add reference to system.management

Imports System.Management

Private Sub GetMACAddress()

Dim oMClass As ManagementClass = New _ ManagementClass(”Win32_NetworkAdapterConfiguration”)
Dim colMObj As ManagementObjectCollection = oMClass.GetInstances()

For Each objMO As ManagementObject In colMObj
console.WriteLine (objMO(”MacAddress”).ToString)
Next

End Sub