Search This Blog

Google Analytics

Sunday, March 25, 2012

Instagram for Android: Accepting sign-ups

Most popular photography app, Instagram, is coming to Android. If you are interested, click here to queue for the sign-up.

Saturday, March 24, 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)<>0 drop table #tem_tblTest
create table #tem_tblTest (ID int, Name varchar(255), Age tinyint)

--UPDATE record and select into temp table (All in one statement)
update tblTest
set
    Age = Age + 1, LastModifiedDate = GETDATE()
output inserted.ID, inserted.Name, inserted.Age into #tem_tblTest (ID, Name, Age)
where Name = 'Name 1'

--SELECT what's updated
select * from #tem_tblTest
go

--CLEANUP
if ISNULL(object_id('tempdb..#tem_tblTest'),0)<>0 drop table #tem_tblTest

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:
  1. Suggestions are contextual. For example, the spell checker is now smart enough to know what you mean if you type “Icland is an icland.”


  2. 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."

  3. 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

Thursday, March 22, 2012

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.

Monday, March 19, 2012

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 information, Apple last distributed dividends in 1995.

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.

Saturday, March 17, 2012

Garbage Collection on JavaScript

An interesting post on how to perform garbage collection and optimize JavaScript to avoid execution pauses when browser decides to do clean up.

» How to write low garbage real-time Javascript | About Scirra Blog

Nokia Maps offer audio navigation

Nokia Maps and its voice-guided, turn-by-turn walk navigation is now available for iOS and Android. It is not working very well in Singapore.

» m.maps.nokia.com gets updated with walk navigation | Conversations by Nokia

Barack Obama: The Road We've Traveled

Wednesday, March 07, 2012

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, Music
  • UK & Canada: Apps, Movies, Books
  • Australia: Apps & Books
  • Japan: Apps & Movies
  • Others: 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, Australia
  • Movies: US, UK, Canada, Japan
  • Music: 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..

Monday, March 05, 2012

IT Show 2012

The annual IT Show 2012 is set to launch again this week at Suntec Singapore.

Date
8 - 11 March 2012

Venue
Suntec Singapore
Levels 1, 2, 3, 4 & 6 Opening Hours : 12 noon to 9pm

Free Admission

Sunday, March 04, 2012

Windows 8 Consumer Preview Serial Number

Microsoft just released Windows 8 Consumer Preview for public testing days ago. To proceed with installation, a 25-characters serial number is required.

The 25-characters serial number is:

DNJXJ-7XBW8-2378T-X22TX-BKG7J

Saturday, March 03, 2012

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 Development, Tan Chuan-Jin, also made similar comments on a Facebook post.

I quote Tan Chuan-Jin's reply:

Tears were shed by some, who lamented about the ability to buy flats for their parents in the future. Others raised their eyebrows when DPM Tharman made the point about the $1,000 income family being able to afford to buy a small flat. Online critics went to town to mock the im-possibility of this.

Well...

For a first time applicant, he can apply for a new 2-room standard BTO (Build-to-Order) flat in a non-mature estate. These flats are set aside for those earning $2,000 and below a month.

These households earning $1,000 can qualify for generous housing grants. Available to them are the Additional CPF Housing Grant (AHG) of up to $40,000, and the Special CPF Housing Grant (SHG) of up to $20,000. These grants could be used for the flat down payment. Total = $60,000

How much is a flat? Using the selling price of a new 2-room BTO flat in Fernvale Lea in Sengkang as an example, it is $100,000 (offered in the Jan 12 BTO exercise; the price range was from $83,000 to $112,000)

Deduct the $60,000. The applicant needs to pay $40,000.

With a loan for $40,000, repayment per month is as shown below:

- 30 years loan : $161/mth
- 25 years loan : $182/mth
- 20 years loan : $214/mth

For a young household headed by an income earner with a salary of $1,000 per month. He will have a total of $217 contributed monthly to his CPF Ordinary Account.

Monthly cash outlay = $0

This support for families enable them to move from rental to owning their own homes. Rentals for income of about $1,000 is $90-123 for 1-room, $123-$165 for 2-room.

An Inclusive Society...making it happen

More info can be found at HDB InfoWEB

Special Housing Grant HTML the link

Additional Housing Grant HTML the link

Help for low income families HTML the link

It may seems possible from the above calculation, however, we should not forget other expenses like buying new furniture, minor simple renovation, and so on.

Thursday, March 01, 2012

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:

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 Chrome itself, plus other bugs. For example, a WebKit bug combined with a Windows sandbox bug.

$20,000 - “Consolation reward, Flash / Windows / other”: Chrome / Win7 local OS user account persistence that does not use bugs in Chrome. For example, bugs in one or more of Flash, Windows or a driver. These exploits are not specific to Chrome and will be a threat to users of any web browser. Although not specifically Chrome’s issue, we’ve decided to offer consolation prizes because these findings still help us toward our mission of making the entire web safer.

All winners will also receive a Chromebook.

» Pwnium: rewards for exploits | The Chromium Blog

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.

Popular Posts