Skip to main content

Posts

Showing posts from March, 2012

Combine UPDATE and SELECT in one statement

After we did an UPDATE on a record and when we want to find out what are updated, we will usually follow up with a SELECT. Example,

update tblTest set Age = Age + 1, LastModifiedDate = GETDATE() where Name = 'Name 1' select * from tblTest where Name = 'Name 1'
How about doing the above all in one single statement and avoiding the select statement from getting outdated record when someone intercepts and attempts to update?

It's possible! Try the following.

--SETUP if ISNULL(object_id('tblTest'),0)<>0 drop table tblTest go create table tblTest ( ID int identity(1,1) not null primary key, Name varchar(255) not null, Age tinyint not null, LastModifiedDate datetime not null default getdate() ) go --INSERT test records insert into tblTest (Name, Age) values ('Name 1', 21) insert into tblTest (Name, Age) values ('Name 2', 22) go --CREATE the temp table for select if ISNULL(object_id('tempdb..#tem_tblTest'),0)<&…

Google Docs spell checker is contextual and awesome!

Google Docs has launched a revolutionary spell checker - one that not only correct spellings, but also is contextual. This contextual spell checker is able to make suggestions on the correct use of word based on the sentence. What's even better is the suggestions get smarter and smarter based on the words Googlebot sees as it explores the web.

The advantages spelled out are as follows:
Suggestions are contextual. For example, the spell checker is now smart enough to know what you mean if you type “Icland is an icland.”


Contextual suggestions are made even if the misspelled word is in the dictionary. If you write “Let’s meat tomorrow morning for coffee” you’ll see a suggestion to change “meat” to “meet."

Suggestions are constantly evolving. As Google crawls the web, we see new words, and if those new words become popular enough they’ll automatically be included in our spell checker—even pop culture terms, like Skrillex.


» Spell checking powered by the web | Google Docs Blog

Amazon to buy robotics firm Kiva Systems for $775 million

Amazon is reported to be acquiring robotics firm Kiva Systems for $755 million in cash. Saving a little time can save a lot of money for Amazon, making robots move inventory items, instead of the workers, and fulfilling orders faster.

Mitt Romney's "Etch A Sketch" Comment, but some things you can't shake off

An "Etch A Sketch" Romney campaign gaffe is spreading around the Internet like wildfire. The comment that sparked controversial debate is as quote:

Everything changes. It's like Etch A Sketch. You can shake it up and we start all over again.

Soon after the comment, several political rivals including the Democrats seized the opportunity to attack Romney. Democrats even produced a YouTube clip entitled "Mitt Romney: Some Things You Can't Shake Off".

Woman gets in argument, hits man on plane

More details on the incident here.

Google+ Campaign Hangout With Mitt Romney

Apple to distribute dividends and execute share buyback amounting to $45 billion

In post Steve Jobs era, new Apple CEO Tim Cook has decided the time is ripe to distribute dividends and execute share buyback. Apple is now sitting on a massive $97 billion cash balance.

Quote from Apple's press release:

Subject to declaration by the Board of Directors, the Company plans to initiate a quarterly dividend of $2.65 per share sometime in the fourth quarter of its fiscal 2012, which begins on July 1, 2012.

Additionally, the Company’s Board of Directors has authorized a $10 billion share repurchase program commencing in the Company’s fiscal 2013, which begins on September 30, 2012. The repurchase program is expected to be executed over three years, with the primary objective of neutralizing the impact of dilution from future employee equity grants and employee stock purchase programs.
This would means Apple will be spending approximately $45 billion of its $97 billion cash reserves on dividends and share buyback in the first three years of these new programs. For your in…

How to Manage Facebook Photo Tags?

I believe many have been experiencing similar annoyances on Facebook, been tagged in a photo inappropriately randomly. To avoid that, read on here to learn how to control Facebook photo tags and how to manage your privacy settings so it doesn't happen again.

Android - Digital Logic & Design

Barack Obama: The Road We've Traveled

Gurmit Singh scolding spectators "idiots" during rehearsal of First XI

Comments? I feel Gurmit is both right and wrong.

Barcelona - Bayer Leverkusen 7-1 Highlights

A game when Lionel Messi scored 5 times!

Google Doodle - International Women's Day 2012

Android best music player - n7player Music Player

n7player Music Player is simply the best ever Android music player! Download n7player Music Player now from Android Market (Google Play).

Google Play - Consolidate Android Market, Books, Music, Video Apps

Google has rebranded Android Market and renamed it to Google Play. In this exercise, it is combining Android Market, Google Music, Video App and Google Books, all onto Google Play.


Google doesn't sell content in all countries, so here's the rundown on what Google Play will offer depending on where you are:
US: Apps, Movies, Books, MusicUK & Canada: Apps, Movies, BooksAustralia: Apps & BooksJapan: Apps & MoviesOthers: Apps
Here it is by content type:
Apps: US, UK, Canada, Australia, Japan and many other countries (not all countries can buy apps)Books: US, UK, Canada, AustraliaMovies: US, UK, Canada, JapanMusic: US

» Introducing Google Play: All your entertainment, anywhere you go | Official Google Blog

Unable to unsubscribe from Tan Kin Lian unsolicited newsletter

I have been receiving several unsolicited emails from Tan Kin Lian these days, many early ones do not come with unsubscribe option, and latter ones do have an unsubscribe option but aren't working at all.


Ironically, the company is offering EDM service as a business. Oops..

Man Caught Peeing in 'Street View,' Sues Google

This is so funny.

Tharman said $1,000 can buy a flat

Singapore's Deputy Prime Minister and Finance Minister, Tharman Shanmugaratnam, comment made in parliament on Thursday that household of income as low as $1,000 is now able to buy a flat has sparked an outrage among Singaporeans online.

Tharman's comment in response to NCMP Gerald Giam about Singaporeans being unable to afford a flat:

I would like to assure Mr Gerald Giam, who might not have caught up with all the developments, that our enhanced housing grants for lower income families are such that a family with a monthly income of as low as $1,000 can now purchase a small flat. 98% of our younger cohorts, those who are below 35, earn at least $1,000 of income a month. A family that earns a bit more, say $1500, can purchase a medium-sized flat.
DPM Tharman's budget speech can be found here.

So how is this possible?

Today, National Development Minister Khaw Boon Wan came out to clarify the comment made by DPM Tharman. Similarly, Minister of State in the Ministry of National…

Sneak preview of Windows 8 - Consumer Preview available for download

Microsoft has just released Windows 8 Consumer Preview for public testing. To try, click here to start downloading its ISO images.

Preview of Windows 8 Consumer Preview


Related Readings:
Sneak preview of Windows 8Windows 8 Preview: 23 Potential Features You Should Know AboutWindows 8 PreviewThe Windows 8 Task ManagerWindows 8 IE 10 will be plugin free, HTML Enabled, no FlashWindows 8 fast boot in just 8 seconds

Google offering up to $1 million if someone finds a bug on its Chrome

Google has put up a challenge to all hackers - up to $1 million rewards and one free Chromebook if someone finds a bug on its Chrome.

The aim of our sponsorship is simple: we have a big learning opportunity when we receive full end-to-end exploits. Not only can we fix the bugs, but by studying the vulnerability and exploit techniques we can enhance our mitigations, automated testing, and sandboxing. This enables us to better protect our users.

While we’re proud of Chrome’s leading track record in past competitions, the fact is that not receiving exploits means that it’s harder to learn and improve. To maximize our chances of receiving exploits this year, we’ve upped the ante. We will directly sponsor up to $1 million worth of rewards in the following categories:
$60,000 - “Full Chrome exploit”: Chrome / Win7 local OS user account persistence using only bugs in Chrome itself.

$40,000 - “Partial Chrome exploit”: Chrome / Win7 local OS user account persistence using at least one bug in Chro…

Michelle Yeoh's for Aung San Suu Kyi "The Lady" movie trailer

The story of pro-democracy activist Aung San Suu Kyi and the academic and writer Michael Aris; a true story of love set against political turmoil.