Multi Touch Sensor

Looks like the answer to the bad mouse experience is here. This thing is multi point and pressure sensitive.


9:28pm, November 17th, 2006

HardwareZone Prices In Sri Lankan Rupees

I was just checking phone prices in HardwareZone Singapore and I was thinking…

Wouldn’t it be nice to have prices in Sri Lankan rupees?

With the power of Firefox and Greasemonkey that’s what I did.

HardwareZone Greasemonkey

You can install the HardwareZone Greasemonkey Script here.

You too can customize your web experience using Greasemonkey. You can learn more about Greasemonkey at Dive Into Greasemonkey and share and find more useful scripts at Userscripts.org.

Update: Added this script to Userscripts.org


7:46pm, November 17th, 2006

Google Project Managers Search.


8:37pm, November 16th, 2006

How to get the best look in the best Distro of the best OS


3:02pm, November 15th, 2006

Why cannot I enter date earlier than 1753?

Almost all SQL Server database developers know this issue, in other word, limitation. You cannot insert values lower than 01/01/1753 into datetime column. Do you know the reason? I was unaware of this reason but yesterday, one of my friends (He insisted not mention his name :)) explained me one of possible reasons. And guess what, it is not a technical reason, it is historical reason.

You might know that there had been two calendar types; Julian and Gregorian. When the people who used Julian decided move to Gregorian, they had to skip couple of days (10 to 14 days). This was happen around 1752. Because of this, the dates earlier than 1753 are different from country to country and have to maintain different procedures for different countries (or cultures) if the system need to support for them. That’s why SQL Server treats 01/01/1753 as the earliest date.


8:46am, November 15th, 2006

Dapper -> Edgy causing probs

Couple of weeks back I was getting to the edge of upgrading my Ubuntu Desktop from Dapper Drake to Edge Eft. Upgrading has been a very easy process in Ubuntu as last time too I upgraded from Breezy Badger to Dapper Drake without any problems. With that in mind I started to upgrade it on my notebook on that day itself but didn't get a chance to make a post on how things went. In order to upgrade I ran this command.

gksu "update-manager -c -d"


It opened up the update manager with the message that Ubuntu 6.10 is available for upgrade. There was about 1GB to be downloaded so I left it to upgrade and went to sleep. By next day morning I upgraded to edgy. It was not up to the expectations but there was more problems when I realized that my wireless card has stopped working. It was working fine under Breezy and Dapper. Over the last couple of weeks I have been going through the forums and have found out lot of people have come across lot of problems trying to upgrade from Dapper to Edgy. Wireless issues have been a common thing. Currently I'm settled with my Ethernet card though have to sort out the wireless issue. I even played around with ndiswrapper but have few issues with it. I might have to install edgy freshly if I'm unable to fix it.

2:35am, November 13th, 2006

Disneyland - LA Trip


9:42pm, November 12th, 2006

What makes people happy…


7:38pm, November 12th, 2006

vardecimal with SP2: It is not what I thought

Is new datatype introduced? Is it just like varchar? I thought yes. But it is not. Vardecimal is a storage format, not a datatype. Because of that it is not available for columns when design tables. I have been trying to find what it is, yes after Gogula's comment for my one of previous posts. Finally I figured it out how to use it; see the sample code I used for testing.

-- create a table with decimal column
CREATE TABLE TestTable
(ID int IDENTITY(1,1) PRIMARY KEY, Number decimal(20,3))
GO

-- insert some values
DECLARE @i int
SET @i = 1
WHILE @i < 100000
BEGIN

   INSERT INTO
TestTable
   VALUES (rand()*1000000)

   SET @i = @i + 1
END

-- check the space used for table
sp_spaceused
'TestTable'

-- result
-- reserved: 2632KB
-- data: 2576KB

Since vardecimal is a storage format, it cannot be set it to column itself. It has to be set for; first database and then table. But before all of these, it is possible to check whether the size reduction after enabling the format is really a worth enough.

-- check the estimated reduction for the row.
sys.sp_estimated_rowsize_reduction_for_vardecimal 'TestTable'

*Note: BOL shows the name of SP as sys.sp_estimate_ro... . Make sure you use it as sys.sp_estimated_ro.... .

-- result
-- avg_rowlen_fixed_format: 24.00
-- avg_rowlen_vardecimal_format: 17.98

The result tells us that the row size can be reduced by 25%. Isn't good? Yes, It is worthwhile to change the storage format of decimals. Enable it on the database and then the table.

-- enable the database for vardecimal storage format
sp_db_vardecimal_storage_format 'TestDatabase', 'ON'

-- enable the table
sp_tableoption 'TestTable', 'vardecimal storage format', true

Done. Lets check the space usage again.

-- check the space used for table
sp_spaceused
'TestTable'

-- result
-- reserved: 2248KB
-- data: 2176KB


Great. We just saved the disk space. And this is just for 100000 records. If you have millions of records with decimal values, Then it is high time to set this. Note that it is better to check the size reduction estimate before enabling it on the table because it might give you an unexpected result.





8:10am, November 11th, 2006

Why we are poor and keep getting poorer


11:56pm, November 10th, 2006

Happy and Sad


7:23pm, November 10th, 2006

Civil Linkage

Rap Impressions

Rap Impressions

russell davies: how to be interesting

Current style in web design


1:38pm, November 10th, 2006

Fahamas boat accident

Last night fahamas speed boat (fahamas-2) face an accident near male’, it was  around 12:30AM got crashed with sun-land (Not yet Official) boat. i cant understand what kind of animala on other boat they smashed a boat and craw was dying on sea they went to hide. also when they got cough they [...]

11:26am, November 10th, 2006

Gmail realigns it’s interface

It seems Gmail has also joined the rounded corner and drop shadow galore with it’s upgrade to the interface. Even though there isn’t a major upgrade in the main UI message interface has become much sweet. Also they have taken all the message actions to a top-right drop-down menu, which actually becomes quite irritating than the [...]

3:04am, November 10th, 2006

LOGON Trigger from SP2 CTP

Had a chance to check this new trigger, wow it's cool and worked fine for me. This fires only after the authentication process is completed but before the session is estabilished. This is what I wrote to test this new trigger, it checks and accpets only windows users not SQL users.

CREATE TRIGGER ValidateLogon
ON ALL SERVER FOR LOGON
AS
BEGIN

   IF
EVENTDATA().value('(/EVENT_INSTANCE/LoginType)[1]', 'nvarchar(100)') != 'Windows (NT) Login'
   BEGIN

      ROLLBACK
   END
   -- only for Windows login
   -- INSERT INTO TestTable VALUES (EVENTDATA())

END

I wanted to execute the INSERT statement even for SQL login but seems it is not executed if ROLLBACK is fired; because it is the original implicit transaction?


12:58am, November 10th, 2006

Windows Vista is RTM


5:00am, November 9th, 2006

World Wide Web Sri Lanka (W3LK)

I just setup something called a World Wide Web Sri Lanka (W3LK) group. It seemed like a good idea at the time. About 17 web designers and web developers signed up pretty fast.

We’d like to improve web experience for Sri Lankan’s.

Join us and have your say.


10:11pm, November 8th, 2006

Bag Upgrade

So I’m moving from this … (boring)

IBM Bag

to this … (shiny)

Rebel Bag

Its a bit too late to show the kids in school but I’m blogging this. I’m trying to break away from the geek-with-a-notebook-bag to a more back-to-school look. I always wanted a bag like this when I was going to school. I know I’m older now but this thing is cool and I’m not sending it back.

The notebook bag was a pain on the shoulder and you can’t stuff too much stuff in it. Sometimes I chug the company notebook in there too then I wish I had desktops at home and office.

I love the Swiss Army brand and as far as bag-bling goes the Wenger Rival is shiny. It has a padded pocket for the notebook and many more pockets I haven’t figured out what to do with yet. See more pictures here.


5:43pm, November 8th, 2006

SQL Server SP2 CTP: What I noticed today

If you have used “SQL Server Scripts” project templates for maintaining scripts for databases, you must have noticed that order of the queries are not ordered (either ascending or descending). If you add a query to the project, it will be added to the end of the list. I used to manually change the order of added quarries by opening project file through one of text editors but as it is a painful task, most of the time, I didn’t do it.

When I open one of my projects today, I wondered, at last, list is automatically sorted. How did it happen? Yes, this is after installing CTP for SP2.

But it is not as smart as I thought. When I add a new query, it is added to correct place in the list (again, there is no way of giving the name of the query when adding so it is always “SQLQuery….”), but once it is renamed, it does not adjust the order of the list. Hope we will see the fix soon.

Saw two new menu items for table objects; Edit (If I am not mistaken) and Reports, Edit creates the table CREATE script, Reports does: No idea yet.


5:57am, November 8th, 2006

.NET Framework 3.0 released


5:21am, November 8th, 2006

« Previous Entries Next Entries »