Skip to main content

Posts

Showing posts from May, 2013

How to Turn Off Thumbs.db From Appearing?

The auto creation of Thumbs.db files in folders with images can get annoying. Before burning photo albums into DVD-R, I often have to go around searching and deleting such files. This can also get annoying for web developers using version control software e.g. TortoiseGit and TortoiseSVN.

Eh .. Sometimes, deleting these files can get the "file is in use and cannot be deleted" prompt. Very annoying.

So what exactly is Thumbs.db? As quoted from Wikipedia,

On Microsoft Windows operating systems, starting with the IE4 Desktop Update for Win95/98, a thumbnail cache is used to store thumbnail images for Windows Explorer's thumbnail view. This speeds up the display of images as these smaller images do not need to be recalculated every time the user views the folder.
Yes we know the purpose of Thumbs.db but what if we still wish to turn off Thumbs.db from appearing? There is a way to do it by tweaking a setting on the Local Group Policy Editor.

From the Start Menu, click Run optio…

MSSQL: Generate Random String Using SQL

The following will generate a random fixed-length string using SQL. Simply pass in a string of accepted characters and the length of the random string to be generated.

IF ISNULL(object_id('cspRandomString'),0)<>0 DROP PROC cspRandomString IF ISNULL(object_id('fnGenRandomInteger'),0)<>0 DROP FUNCTION fnGenRandomInteger GO CREATE function fnGenRandomInteger(@MinValue int, @MaxValue int, @Seed float) returns int as begin -- ============================================= -- Author: Loh Hon Chun -- ============================================= return ((@MaxValue + 1) - @MinValue) * @Seed + @MinValue end go CREATE procedure cspRandomString ( @Result varchar(255) output, @AcceptedChars varchar(255), @Length int ) as begin -- ============================================= -- Author: Loh Hon Chun -- ============================================= set nocount on declare @ret char(255) declare @i int, @pos int set @Result = '' set @i = 0 …

Stop Windows from Restarting Your Computer After Windows Update

Almost always, Windows will always show the "your computer is going to restart in 15 minutes ..." prompt every time Windows Updates is performed. This can get annoying especially when the update setting is set to auto download and update. So I can we make the annoying prompt not to show?

The following fix should apply to both Windows 8 and 7.

Open your registry editor by typing regedit from your Start Menu → Run box.Navigate to key HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU. Many may see up to \Windows level. In that case, you will need to create new keys for \WindowsUpdate and \WindowsUpdate\AU.Now, create a new DWORD (32-bit) value NoAutoRebootWithLoggedOnUsers under the AU key. Give it a value of 1.Reboot your machine and you are done.
NOTE: It is still your responsibility and is definitely recommended to reboot whenever you are ready to so the updates can be applied completely.

» Stop Windows from Restarting Your Computer After Updates | LifeHa…

What to look out for for responsive adaptable web design?

An article on the Smashing Magazine website - How Much Has The Web Really Changed? discusses what has changed for the past one decade or so in web development. A lengthy but easy-to-read article.

Up until not so long ago, we used to base our designs on some rather general assumptions about screen size and input type. With the rise of devices with various screen sizes and alternative ways to interact, these assumptions have turned out to be unreliable. We need to upgrade the defaults that we use when we start designing our websites.

Google Doodle for Malaysia On Polling Day 2013

Google doodle for Malaysia as the Malaysians go to the poll today.


GS1 Prefix List - How to Determine Origin of Food From Barcodes?

Do you know that it may be possible to determine the country where a food product is manufactured bought from a supermarket by reading the barcodes on the package itself? However, do note that the barcodes do not provide identification of country of origin for a given product though hopefully the manufacturer can put our mind at ease if certain countries are in our blacklist.

How to read the barcodes?
Turn over the food product and look for the barcode.


The first 3 digits of the barcode will reveal the GS1 Prefix.

Tally with the list below to find out the country where the food product could have been manufactured at.

GS1 Prefixes do not provide identification of country of origin for a given product. They simply provide number capacity to different countries for assignment from that location to companies who apply. Those companies in turn may manufacture products anywhere in the world.
ASSIGNED GS1 PREFIXES000 - 019GS1 US020 - 029Restricted distribution (MO defined)030 - 039GS1 US040 - 04…

Samsung Galaxy S4 Commercial Video - Going Wireless

Official Chrome Extension for Google Keep

Google has released an official Chrome Extension for Google Keep - a task keeping minimalistic app. The Chrome extension can only be installed from the link above i.e. you won't find the app from doing a search.

As quoted from the Google Drive blog post,
The Google Keep Chrome app launches in its own window, so you can create notes, cross out your to-do lists, and attach photos to tasks while you work on other things. And if you don’t have an internet connection, don't fret: the Chrome app works offline because we all know that ideas (big and small) can be sparked at any time.