Raj Agrawal

Learnings from software and technology

  • Home
  • Technology
  • Software
  • Work
  • Play

Connect

  • GitHub
  • LinkedIn
  • YouTube

Powered by Genesis

You are here: Home / Archives for Raj Agrawal

Warning: This Math Trick Can Actually Improve Your Social Image!

December 14, 2009 by Raj Agrawal 3 Comments

An algorithm to remember and calculate

We know that Mathematics is linked to everything we can see, feel and imagine. Math can help a human build something he has only dreamed of.  It has the power to create, modify and destroy things. From the process involved in building computer applications to the preparation of food we eat, all have ‘at least’ a point where Math has to be used. So, here is the bottom line “Can you use Math to improve your social image”? You know the answer is the obvious, yes you can!

Can you count?

The following is the guide to a simple mental calculation (referred from Wikipedia) that will help you easily calculate the day of the week of any date of any year!

Points to be considered:

  • The algorithm is valid for the Gregorian calendar. This began in Britain and her colonies on September 14, 1752. The area now forming the United States changed at different times depending on the colonial power; Spain, France, Italy, and others had changed in 1582 and Russia had not changed by 1867 when Alaska was purchased by the U.S. from Russia.
  • To know whether a year is a leap year or not, divide the last two digits of the year by 4. If the quotient you get is a whole number like ‘2’, then it’s a leap year. In a special case where the year (all digits) is completely divisible by 100, must also be divisible by 400 in order to qualify as a leap year. If the quotient is a decimal figure like ‘1.25’ it’s a regular year.
  • Lets take the year 2008. 08/4 = 2 which means the year 2008 is a leap year. But the year 2100, being completely divisible by 100, must also divisible by 400, which isn’t. So, the year 2100 is not a leap year.

These are the values for the given centuries,months and days:

Centuries table

* 1700-1799 = 4 (Still Julian Calendar in Great Britain and it lands until 1752)
* 1800-1899 = 2
* 1900-1999 = 0
* 2000-2099 = 6
* 2100-2199 = 4
* 2200-2299 = 2
* 2300-2399 = 0
* 2400-2499 = 6
* 2500-2599 = 4

Months table

* January = 0 (in leap year 6)
* February = 3 (in leap year 2)
* March = 3
* April = 6
* May = 1
* June = 4
* July = 6
* August = 2
* September = 5
* October = 0
* November = 3
* December = 5

Days table

* Sunday = 0
* Monday = 1
* Tuesday = 2
* Wednesday = 3
* Thursday = 4
* Friday = 5
* Saturday = 6

Here comes the main part, the calculation:

Let’s use April 24, 1982.

1. Look up the 1900s in the centuries table: 0
2. Note the last two digits of the year: 82
3. Divide the 82 by 4: 82/4 = 20.5 and drop the fractional part: 20
4. Look up April in the months table: 6
5. Add all numbers from steps 1-4 to the day of the month (in this case, 24):
0+82+20+6+24=132.
6. Divide the sum from step 5 by 7 and find the remainder: 132/7=18 remainder 6
7. Find the remainder in the days table: 6=Saturday.

It should be noted that, in this algorithm, the days on which the century, year, and month start are the “zeroth” day. This allows us to add the day of the month directly (without subtracting 1). For example, 1900 starts on day 0 which corresponds to a Sunday; however, we still need to add 1 for the January 1 which brings the day on which January 1, 1900 fell to day 1, which is Monday, the correct day.

So, next time you talk about birthdays with your colleagues, don’t forget to impress them with your new Math Trick πŸ˜‰

(Errors rectified, as spotted by the readers. Thanks Chirag64!)

Filed Under: Technology

Google Goggles For Android Phones, Hot Or Not?

December 11, 2009 by Raj Agrawal Leave a Comment

Now photos can be used to search the internet

google goggles
Screenshot

Definitely hot! Google has yet again introduced a great application that allows users to find all available information from your Android powered mobile phone, just with click of a photo. You can click a picture of your favorite book, a restaurant, street and immediately get all the relevant information about it through Google Goggles! The app is intended to cover all tangible objects. Since, it’s a new app and is still being worked upon, there is much to expect from this product in future. Watch this short video from Google, demonstrating how Google Google works:

Google has a very, very far vision of it’s intentions and it seems like Google is willing to capture every thing πŸ˜€

Filed Under: Consumer Technology Tagged With: Android, google

HDRadio Gets Smarter, Offers Song Tagging!

November 14, 2009 by Raj Agrawal Leave a Comment

It’s time to upgrade

It’s great news for radio listeners, now you can listen to radio music at CD quality sound and tag all your favorite songs aired on any HDRadio channel at your convenience. It’s like bookmarking your favourite website. If you are really looking for great radio sound quality, this the real deal. The HDRadio has Zune HD and related radio technology products that gives you access to your favorite HDRadio stations with the clear, deep sound and portability, which HDRadio is known for, but now with more.  Not only can you listen to your radio station but, song tagging and music tagging lets you to also buy the song you heard. Imagine, you can listen, enjoy, tag and download a radio song forever! It’s only been a few years now that we have started to hear about music tagging and song tagging, HDRadio is now offering a line of Zune HD radios too.

HDRadio features:

  • CD-quality sound
  • Crystal-clear reception
  • No station drop-off
  • No static, hiss or audio distortion
Illustration

iTunes users can also take advantage of the tagging feature. You just need an iTunes Tagging enabled HDRadio receiver. When you hear a song you like on your local FM HDRadio station, you simply hit the “tag” button. The song’s info will be saved from your HDRadio receiver to your iPod and iPhone. The songs will show up in a playlist called “Tagged” in iTunes the next time you sync your iPod to your computer. So you can click, download and buy the songs you want directly from the Apple iTunes Music Store.

You can do all this while you are walking, in your car, at home, in your office and even on your boat. Upgrade your current system. Radio listening is going to be easy and enjoyable again. Visit: www.hdradio.com

It’s been a few years now that we have started to hear about music tagging and song tagging, and now HDRadio is offering a line of Zune HD radios.

Filed Under: Consumer Technology Tagged With: apple

  • « Previous Page
  • 1
  • …
  • 62
  • 63
  • 64
  • 65
  • 66
  • …
  • 79
  • Next Page »