A creative video parody done to highlight the environmental issues of haze in Singapore.
Computer, Technology, Databases, Google, Internet, Mobile, Linux, Microsoft, Open Source, Security, Social Media, Web Development, Business, Finance
Monday, August 24, 2015
Tuesday, June 30, 2015
Rebuild all Indexes on a Microsoft SQL Server
As part of database maintenance, a DBA may wish to do periodical rebuild of all indexes. The below may come handy.
EXEC sp_MSForEachTable 'ALTER INDEX ALL ON ? REBUILD'
Monday, June 29, 2015
President Obama 'AMAZING GRACE' Eulogy For Clementa Pickney
President Obama delivered a 40-minute 'AMAZING GRACE' eulogy for Clementa Pickney who was murdered by a racist terrorist on June 17, 2015 at an evening Bible study at his church. This touching speech is a thoughtful meditation on the whites and blacks race in America.
Watch the video below:
Watch the video below:
Thursday, May 28, 2015
NDP 2015 Theme Song: Our Singapore
The theme song, written by Dick Lee, for this year's National Day is released.
How do you feel about this song? For your pleasure, I have consolidated all NDP theme songs from 1998 to 2013.
How do you feel about this song? For your pleasure, I have consolidated all NDP theme songs from 1998 to 2013.
Friday, April 17, 2015
Chen Tianwen's un-un-un-un-unbelievable song got a remix
The famous Mediacorp's 'Spouse For House' actor Chen Tianwen music video "Un. un. un. un. unbelievable!!!" now comes with a remix version.
If you are interested to listen to the original version, do check out this link!
If you are interested to listen to the original version, do check out this link!
Wednesday, April 15, 2015
MsSQL Split Function
The following demonstrates how to do a string Split using a character delimiter.
Edited: [dbo].[Split_PerformanceEnhanced] added - better performance results (31 July 2017).
Edited: [dbo].[Split_PerformanceEnhanced] added - better performance results (31 July 2017).
--SQL function to do split (performance enhanced)
CREATE FUNCTION [dbo].[Split_PerformanceEnhanced]
(
@List NVARCHAR(MAX),
@Delimiter VARCHAR(5)
)
RETURNS @RtnValue TABLE
(
ID INT IDENTITY(1,1),
Data VARCHAR(MAX)
)
AS
BEGIN
INSERT INTO @RtnValue(Data)
SELECT [Value] FROM
(
SELECT
[Value] = LTRIM(RTRIM(SUBSTRING(@List, [Number],
CHARINDEX(@Delimiter, @List + @Delimiter COLLATE Latin1_General_100_BIN2, [Number]) - [Number])))
FROM (SELECT Number = ROW_NUMBER() OVER (ORDER BY name)
FROM sys.all_objects) AS x
WHERE Number <= LEN(@List)
AND SUBSTRING(@Delimiter + @List, [Number], LEN(@Delimiter)) = @Delimiter
) AS y
RETURN;
END
GO
--Test out the SQL function
SELECT * FROM dbo.Split_PerformanceEnhanced('one|two|three|four', '|')
GO
Below SQL function still works but prefer the above new performance enhanced version.
--SQL function to do split
CREATE FUNCTION [dbo].[Split]
(
@RowData NVARCHAR(MAX),
@SplitOn CHAR(1)
)
RETURNS @RtnValue TABLE
(
ID INT IDENTITY(1,1),
Data VARCHAR(MAX)
)
AS
BEGIN
DECLARE @count INT
SET @count = 1
WHILE (CHARINDEX(@SplitOn COLLATE Latin1_General_100_BIN2, @RowData) > 0)
BEGIN
INSERT INTO @RtnValue (data)
SELECT Data = LTRIM(RTRIM(SUBSTRING(@RowData, 1, CHARINDEX(@SplitOn COLLATE Latin1_General_100_BIN2, @RowData) - 1)))
SET @RowData = SUBSTRING(@RowData, CHARINDEX(@SplitOn COLLATE Latin1_General_100_BIN2, @RowData) + 1, LEN(@RowData))
SET @count = @count + 1
END
INSERT INTO @RtnValue (data)
SELECT Data = LTRIM(RTRIM(@RowData))
RETURN
END
GO
--Test out the SQL function
SELECT * FROM dbo.Split('one|two|three|four', '|')
GO
So stunned like a vegetable by Chen Tianwen's "Un. un. un. un. unbelievable!!!" music video
Mediacorp's 'Spouse For House' actor Chen Tianwen music video "Un. un. un. un. unbelievable!!!" is so unbelievably funny. What a multi-talented guy.
Spouse For House airs every Wednesday, 10pm on Channel 5.
Spouse For House airs every Wednesday, 10pm on Channel 5.
Tuesday, April 14, 2015
Google Malaysia access disrupted and hacked
As of now, access to Google Malaysia (www.google.com.my) remains not possible and is showing 'Google Malaysia HackeD' message.
The disruption is reported to be due to DNS redirection as confirmed by a tweet from Google Malaysia.
A WHOIS check on www.google.com.my domain confirmed the DNS redirection.
The disruption is reported to be due to DNS redirection as confirmed by a tweet from Google Malaysia.
Getting reports some users are experiencing http://t.co/uIvl6RbDzu DNS redirection. Please use http://t.co/AdkzwxVR4U in the meantime.
— Google Malaysia (@GoogleMsia) April 14, 2015A WHOIS check on www.google.com.my domain confirmed the DNS redirection.
Monday, April 13, 2015
Introduction to Project Management
Greg Balestrero (Strategic Advisor on Corporate Consciousness, Leadership & Sustainability, IIL) provides a quick but thorough introduction to Project Management, how it is being used, and why it should matter to you, especially if you are into Project Management.
Wednesday, April 08, 2015
Charlie Munger in 2010: ‘Don’t ask Charlie Munger. Study the life and work of Lee Kuan Yew, you’re going to be flabbergasted’
In a Q&A at University of Michigan in 2010, Charlie Munger who is Vice-Chairman of Berkshire Hathaway Corporation praised the Singapore system and Lee Kuan Yew. He said, ‘Don’t ask Charlie Munger. Study the life and work of Lee Kuan Yew, you’re going to be flabbergasted’.
Watch the segment in the video below.
Watch the segment in the video below.
Monday, April 06, 2015
Wednesday, April 01, 2015
Amazon newly revamped design - RETRO
As part of April Fool, Amazon has just launched their newly revamped retro design. See below if you like it!
Monday, March 23, 2015
My condolences to Lee Kuan Yew's family
Dear family members of Lee Kuan Yew's,
With the great loss of founder of modern Singapore, Mr Lee Kuan Yew, I would like to send my deepest condolences to PM Lee Hsien Loong and his family members. Without the late Lee Kuan Yew's courage and lifelong commitment, it would have been impossible to see what Singapore has achieved since independence day.
Lee's contribution will be remembered for generations to come. Let us continue building Singapore into a fine, gracious nation.
With deepest sympathies,
A Singaporean born and bred here
With the great loss of founder of modern Singapore, Mr Lee Kuan Yew, I would like to send my deepest condolences to PM Lee Hsien Loong and his family members. Without the late Lee Kuan Yew's courage and lifelong commitment, it would have been impossible to see what Singapore has achieved since independence day.
Lee's contribution will be remembered for generations to come. Let us continue building Singapore into a fine, gracious nation.
With deepest sympathies,
A Singaporean born and bred here
Thursday, March 12, 2015
Restore wrong or unknown program icons in Windows 7 Start Menu
Should you see wrong or unknown program icons in your Windows 7 Start Menu, you may try the following steps to restore them.
I hope this helps.
- Open Windows Explorer.
- Copy and paste %userprofile%\AppData\Local onto the address bar.
- Find and delete IconCache.db. This file is hidden by default.
- Open Command Prompt.
- Run taskkill /F /IM explorer.exe on Command Prompt.
- Run start explorer on Command Prompt.
I hope this helps.
Tuesday, February 03, 2015
How do I remove the cached username and password from SQL Management Studio?
You may have your reasons to want to remove the cached username and password from the SQL Management Studio e.g. before handing your laptop to someone else.
The step to remove will require deleting a file but differs depending on the version of SQL Management Studio you are using.
SQL Server Management Studio 2014
Delete C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\12.0\SqlStudio.bin
SQL Server Management Studio 2012
Delete C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\SqlStudio.bin
SQL Server Management Studio 2008
Delete C:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin
SQL Server Management Studio 2005
Delete C:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat
One good news is as of SQL Server Management Studio 2012, you may delete an entry by using the tool itself without the need to delete a file. To delete, you will need to click on the 'Server name' dropdown in the 'Connect to Server' dialog. Move your mouse or use your keyboard arrow key to highlight the server to remove followed by hitting on the 'Delete' key on your keyboard. This is so convenient!
The step to remove will require deleting a file but differs depending on the version of SQL Management Studio you are using.
SQL Server Management Studio 2014
Delete C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\12.0\SqlStudio.bin
SQL Server Management Studio 2012
Delete C:\Users\%username%\AppData\Roaming\Microsoft\SQL Server Management Studio\11.0\SqlStudio.bin
SQL Server Management Studio 2008
Delete C:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\100\Tools\Shell\SqlStudio.bin
SQL Server Management Studio 2005
Delete C:\Users\%username%\AppData\Roaming\Microsoft\Microsoft SQL Server\90\Tools\Shell\mru.dat
One good news is as of SQL Server Management Studio 2012, you may delete an entry by using the tool itself without the need to delete a file. To delete, you will need to click on the 'Server name' dropdown in the 'Connect to Server' dialog. Move your mouse or use your keyboard arrow key to highlight the server to remove followed by hitting on the 'Delete' key on your keyboard. This is so convenient!
Thursday, December 11, 2014
Monday, December 08, 2014
The side-effects of young children using mobile / handheld devices
In current generation where penetration rate of mobile devices is high, we see many including young children often using mobile devices while travelling, in school or even before bedtime. A fact sheet published on Zone'in advised infants aged 0-2 years should not have any exposure to technology, 3-5 years be restricted to one hour per day, and 6-18 years restricted to 2 hours per day.
The fact sheet researched on areas:
The fact sheet researched on areas:
- Technology Use: usage statistics; technology addiction prevalence
- Physical Impairments: developmental delay; obesity, cardiovascular disorders and diabetes; movement deprivation, sensory overstimulation, elecrtromagnetic radiation, sleep disruption
- Mental Disorders: human detachment and mental illness; psychotropic medication, restraints, and seclusion rooms, touch deprivation, pornography and risky behavior
- Social Disorders: communication, aggression and declining empathy,
- Academic Decline: attention deficit; illiteracy, education technology;
- Implications and Solutions: costs, technology screening an management, playgrounds as epicenter for child development and learning
Tuesday, December 02, 2014
How to stop FortiClient from starting automatically?
Installed FortiClient recently but the challenge in disabling the application/service from running automatically on every start-up annoyed me. Attempt to stop 'FortiClient Service Scheduler' only return 'Parameter is incorrect' error message.
An article on Technet help solve my trouble. To stop FortiClient from starting automatically, try the following:
An article on Technet help solve my trouble. To stop FortiClient from starting automatically, try the following:
- Shut down FortiClient from the system tray.
- Run net stop fortishield on command prompt.
- Run msconfig.
- On msconfig, switch to the Services tab. Clear the FortiClient Service Scheduler check box and click Apply.
- Run services.msc on command prompt to open up show all available services.
- Look for FortiClient Service Scheduler. Switch Startup type to Manual.
- Restart your computer.
FortiClient should not be running automatically the next time round. Hope it helps.
Tuesday, November 25, 2014
An interesting perspective on Responsive Web Design and getting it right
An article on the Smashing Magazine has an interesting perspective on what is responsive web design and how to actually get it right. Taking note on the performance is the right approach.
» You May Be Losing Users If Responsive Web Design Is Your Only Mobile Strategy | Smashing Magazine
» You May Be Losing Users If Responsive Web Design Is Your Only Mobile Strategy | Smashing Magazine
Subscribe to:
Posts (Atom)
Popular Posts
-
新加坡人口400万,亚洲人口4亿,全世界人口6亿。 但是,我一人可能就很有可能是世界最傻的了。我真是个不折不扣的大木头。真是受不了自己。
-
For anyone living in or visiting Singapore, mastering the public transport system is a rite of passage. While the MRT is efficient, the exte...
-
I recently wrote a code snippet to fill arrays with a value. The below method is a generic method that will accept different data types. Hop...
-
*********** Try to sleep now, close your eyes Soon the birds would stop singing Twinkling stars, are shining bright They'll be watch...
-
I got the below findings from Taipei , Hong Kong and Singapore and I thought I should share them with all of you. Taxi Fares In Taipei Tax...




