Wednesday 28 August 2013

Smile ! Its prank time !

Sudden Raptor

Imagine suddenly finding yourself in a monster movie! A Japanese TV show pranked unsuspecting passers-by with a puppeteer in an awesome Allosaurus costume. Here's the next clip from the same show:

Wonder how your Credit Card's number is generated ? Read on...


A wonderfully informative article from DataGenetics.com !

Credit Cards

Most of us carry credit cards and ATM cards. These, typically, have sixteen digits on the front. These digits are the unique account number for the card. For obvious reasons, just any sixteen digits will not work, they follow pattern.
Here's a fictitious card I made up:

The first few characters of the card number describe the type of card.
Some cards are Visa, some Mastercard, some are American Express …
IssuerPrefix
 Visa  4- 
 Mastercard  51-, 52-, 53-, 54-, 55- 
 Diners Club  36-, 38- 
 Discover  6011-, 65- 
 JCB  35- 
 American Express  34-, 37- 
To the left is a (non-exhaustive) list of the some of the common card prefixes.
Cards can be identified by their first few digits (try it out now, pull a few cards out of your wallet and look them up).
(Here you can find a more complete list of Issue Identifier Numbers)

Check Digits

Credit card numbers are often typed in, input, transferred and quoted. All of this transmission can cause errors, especially considering that humans are involved. Humans often make mistakes in transferal. To try and minimize this, credit card numbers contain a check digit.
In a typical sixteen digit credit card number, the first fifteen digits are determined by the issuing bank, but the last digit, called the check digit, is mathematically determined based on all the other digits.

You don’t select this last digit, it is deterministic. The exact mathematic formula for its generation was invented by Hans Peter Luhn, an engineer at IBM in 1954. Originally patented, the algorithm is now in the public domain and a Worldwide standard ISO/IEC 7812-1
Obviously, with just a single check digit, not all errors can be detected (there’s a one in ten chance of a random number having the correct check digit), but the Luhn algorithm is clever in that it detects any singleerror (getting a single digit wrong), such as swapping the 9 with a 6 in the above example. It also detects almost all* pair-wise switching of two adjacent numbers. These errors are typical common errors people make when transcribing card numbers, so the check digit does a good thing.
An added side benefit is that, as discussed above, there is only a one in ten chance that a randomly generated number has the correct check digit. This provides a small amount of protection from hackers or poorly educated crooks who might attempt to randomly generate and guess credit card numbers.
* It will not detect the switching of 09 to 90 (or vice versa)

The Luhn Algorithm

The Luhn algorithm is based around the principle of modulo arithmetic and digital roots.
The Luhn algorithm uses modulo-10 mathematics.

To calculate the check digit, multiply every even-position digit (when counted from the right) in the number by two. If the result is a two digit number, then add these digits together to make a single digit (this is called the digital root).
To this total, we then add every odd-position digit.
This will result in a total (in our example =67). The check-digit is what number needs to be added to this total to make the next multiple of 10. In our case, we’d need to add 3 to make 70. So the check-digit for this fictitious number is 3.
5457623898234113
(This is the same thing as asking what value the check-digit would need to be to make the sum mod 10 equal to zero. What number should be added to string to make a sum that, when divided by 10, gives no remainder.)

Try it for yourself!

Type a number into the box below and click the button to test:
 
Don't worry the numbers you type in are not being sent anywhere (if you are paranoid, you can view the source of the page to confirm). The script on the page is purely a client-side test to confirm the check digit is correct. This is common practice in the industry. Performing a client-side smoke-test to make sure things are well-formed before transmitting to the server is a good way to reduce load on your server.

Other uses

Adding a check digit is a very common practice to ensure that numbers are well-formed and have not fallen foul to a simply transcribing error, or unimaginative fraud.
Here are a selection of other common numbers have have check digits baked in (not all using Luhns Algorithm; there are a few other common encoding systems in use):
Automobile VIN numbers, Barcodes, ISBN numbers on books and magazines, Australian Tax Numbers, Hungarian Social Security Numbers, American bank routing codes …
For those interested in learning more, there are a couple of more complicated check digit algorithms than Luhn. These are the Verhoeff algorithm (1969) and the Damm algorithm(2004). These offer all the benefits of Luhn (detecting any single digit error), but also are able to detect any pair-wise adjacent transpositions of digits. There are also systems that are expanded to deal with errors in text and not just numbers.

Parity

The concept of check digits has been around for a long time. In the early days of computing, RAM was not as reliable as it is today. Computer designers wanted a way to detect hardware failures of memory.
The solution they came up with was the concept of Parity. The eight bits that made up a byte were counted. The result was either an odd number of bits or an even number of bits. For every byte, one additional bit was generated. This was called the Parity Bit.
The value of this parity bit was set based on the count of set bits and selected so that (typically) the number of bits set to the value 1 was even. This is called Even Parity.
(It’s also just as possible to configure the system to maintain an odd number of bits. This is calledOdd Parity. Both systems are perfectly acceptable, you simple choose which version you are going to use, and stick with it!)

Whenever a value was read, at a hardware level, the parity was recomputed. If the parity was wrong, an error could be raised. You can clearly see how toggling of any single bit (flipping its state) would cause the parity to fail.
It would not tell you which bit had failed, just that one bit was wrong (it could even have been the parity bit that failed!)
RAM chips have become more reliable these days, and most modern PCs do not support parity RAM. High-end servers, however, and mission critical computers (banks, power stations …) still have hardware parity protection. In fact, they take this a step further and implement something called ECC (Error-Correcting Code memory). As mentioned above, simple parity just tells you something is wrong (and only if one thing goes wrong), but does not tell you what. This is incredibly valuable to know, but it does not help you fix things. This is where ECC comes in …
ECC memory works in a more complex way. It stripes information across a block of data. It is able to detect all errors of one-bit, and most errors of two simultaneous bits, but more crucially, is able to correct any single-bit error and put the correct value back. It is more complex than simply parity and requires multiple parity bits per byte (making it more expensive).
The math involved is quite complex, and outside the scope of this article, but relies on the concept of redundancy and storing information, mathematically, in more than one location. If you want to lean more, you can start here with information about Reed-Solomon Error Correction.
To show the basic concept, imagine the following scenario below with one unknown bit of information. If we can trust all the other bits, and we known that we are using even parity, we are able to repair the missing bit of information (in tha case the missing bit would need to be a zero).

RAID

A final example of the use of this damage tolerance from the tech industry is the RAID storage technology.
Spinning hard drives, being moving components, are typically the most fragile components in computer systems. Whilst the world is moving solid state rapidly, you’re either very young, very lucky, or have lived a sheltered life if you have not had firsthand experience of some kind of hard-drive failure.
Because data stored on hard drives is usually quite valuable, you want redundancy in storage. One solution is simply to ‘mirror’ the data on a parallel set of drives. This certainly works, but requires a doubling all the drives.
An alternative, and slightly more cost effective approach, is to use the principle of parity and stripe the data, and the parity, over a collection of drives. The theory is that, whilst one drive might fail, the probability of two drives failing at the same time is small. Once one drive is detected as going bad, then you can rely on the redundancy in the system to carry on running whilst you replace the bad drive. Once the new drive is installed, it can back-fill the parity and data and provide protection again, all without any downtime.
RAID originally stood for “Redundant Array of Inexpensive Disks”, in reference to when hard drives were both expensive, and less reliable than they are today. When designed, the theory was to build arrays of cheap drives, knowing in advance that they would probably fail regularly, but by using cheaper drives, redundancy and replacement it was more cost effective than buying very expensive drives with slightly better reliability.
It was kind of like relying on a safety net.
These days, with reliability and technology improvements, we still have safety nets, but they are just that, safety nets, not standard operating procedure. To reflect this, the industry has changed the definition of RAID to now mean “Redundant Array of Independent Disks”

Now Is the Worst Time to Buy an iPhone !

Now Is the Worst Time to Buy an iPhone


Eric Limer
In the market for a brand new iPhone? We've got an important piece of advice for you: WAIT! Now is the worst time to buy.
You're probably well aware by now, but in case you aren't, here's the PSA: iPhone-land is about to get a big shake-up, and there is no reason for you to buy a new phone before that happens. On Sept. 10th, we're (probably) going to be seeing not one but two new flavors of iPhone, and you'll want to know about them before you make your decision.

A Fancy New Flagship

Apple has yet to confirm it big iPhone reveal is coming in just a few short weeks. A big event with a brand-new flagship iPhone. The iPhone 5S rumors are just that at this point, but we've still got a pretty good idea what's coming.
The iPhone that's coming in early September will be pretty much like the iPhone 5, but with a few key upgrades. We're talking about a faster processor, a better battery and maybe a dual LED flash for the camera. We've also seen hints that iPhone 5S will have a fingerprint scanner in the home button so that you'll never have to type in your PIN again. And if you like standing out, it looks like the 5S will come in gold (and maybe graphite?) in addition to traditional black and white.
But most importantly-unless the world turns upside down-it'll be $200 on contract. The exact same price that the less-good-in-almost-every-way iPhone 5 is today. If you buy an iPhone 5 at full price today, you'll hate yourself for it a few weeks from now.
And even if the iPhone 5's not your speed, you'll still want to hold off.

A Budget Badass

We've been hearing rumors about a lower-cost iPhone for ages, but this time, it seems almost certainly true. Evidence for an "iPhone 5c" has been turning up like crazy. When it arrives on the scene, it's definitely going to mix up the iPhone hierarchy we're used to.
We're pretty sure the iPhone 5c will have a back made of plastic and come in a whole bunch of colors. So it's a bit of a departure from your typical flagship iPhone. Its guts are likely to be recycled from older models (probably the 4S), and it stands to be a cheaper, more durable, more colorful option for kids, klutzes, and anyone who doesn't need or want a premium product at a premium price.
But the big question about the iPhone 5c is price. Dirt cheap has never been a part of Apple's product strategy, so the best guess seems to be that it'd cost $100-$150 on contract, maybe $300-$400 unsubsidized. If you were thinking about getting an iPhone 4S, you'll want to wait for this instead. Bigger display, less breakable, same or better guts, a rainbow of colors, all for the same price.

Everybody wins by waiting

Even if you aren't curious what the iPhone 5S has in store, or couldn't care less about the colorful iPhone 5c, you should still wait. Why? Because every iPhone that's out right now will be cheaper next month.
Generally, a new flagship iPhone means that every other option gets pushed down one rung on the price ladder. So the iPhone 5S would be the new $200 option, the iPhone 5 would drop to $100, and the iPhone 4S would be free-on-contract while the currently free iPhone 4 fades away into history.
The iPhone 5c throws a wrench in those gears though; either we're going to have four different iPhones on sale at once, or Apple's going to phase out the iPhone 5 to avoid product confusion with the 5S. But even if Apple isn't selling its older handsets, that doesn't mean they won't be for sale, and cheap.
Yup, we're talking about refurbished units. Once the gold rush for the 5S starts, you can bet your ass there's going to be a landslide of trade-ins available for low, low prices as Apple rushes to clear out inventory. And if the iPhone 5 does get phased out early, you can bet they'll be a damn good deal.

A Little Patience

You'll know exactly what your iPhone options are on September 10th. Better still, you'll likely be able to preorder them on Sept. 13th, and can expect them in the mail on Sept. 20th. And as long as you can hold out until then, you'll be getting something better, or cheaper, or both, than what you can in an Apple Store today. Sit tight.

Where Is the Boundary Between Your Work and Your Life?

Where Is the Boundary Between Your Work and Your Life?


Life and Work Boundary
You work all day.
You check email at lunch and wherever you are. And then you keep checking (and answering) emails when you get home.
Do you ever stop working and start living?
More importantly, do you know where the boundary is between your work and your life?

Where is the Boundary?

Does your work day start when you check email in bed in the morning?
Are you still checking it before you go to sleep?
For many, work has taken over their lives.
They don’t know where one begins and one ends.
“To have a life, you need to have a boundary between your work and personal time.” (Tweet this Quote)
Do you have a life that you can discern from your work?

Is Work Your Life?

If you are like most people, your job runs into your personal life. (Although, for some it is the opposite…)
Mobile email and smartphones, can be a technology leash that keeps you always working.
But, it doesn’t have to be that way.
You can draw a boundary between your work and your life.
You just need to be clear about where one ends and the other begins.
Here are 10 Questions to Ask Yourself About Your Work And Life Boundary:
  1. Where is the boundary between your work and your life? Do you know where work ends and your life begins? You need to have a clear distinction between the two.
  2. Do you have balance? Without balance, things eventually topple over. If one of your areas is dominating the other, it will create problems in the other. For some, this reaches the extreme that one destroys the other.
  3. Is one area negatively impacting the other? – Are you bringing work stress home? Or perhaps, you are bringing home stress to work? If you are not careful, your attitude and emotions in one area will negatively affect the other.
  4. Which is more important to you? This is a tough one. Do you “Work to Live” or “Live to Work?” When there is a conflict, which one do you choose to put first? Your answer to this question can be very telling about your priorities.
  5. Which do you spend more time on? – Life is all about quantity time. How much time are you spending on work versus life? You can’t spend the majority of your time on one and then cram the other into the few remaining moments of your day.
  6. Are you doing something you enjoy? – People often think of this question as it relates to their job. Do you enjoy your work? But, it is not limited to your job. Do you also enjoy what you are doing with the personal time in your life?
  7. Do you work after work? – Do you continue working into the evening? Receiving texts and email at all hours of the day. And even in bed with your smartphone?
  8. Are you ever off duty? Do you ever punch out of the time clock? What hours of the day are you actually off duty?
  9. Can you get work out of your head? – Are you able to disconnect from your work? Or do you spend your nights talking about work. Or losing sleep because of work stress and issues?
  10. Do you take your vacation? – Almost 60% of workers don’t take all their vacation. If this is you, what you are saying is that work is more important that your life. You are willing to sacrifice your personal time for work.

Draw a Line Between Work and Life

You need to know where your work ends and your life begins.
Draw a distinct line between the two.
Be clear, so that you can tell where one ends and the other begins.
You might just be able to take some time off… and enjoy it.

What !! After China & Pak, even Burma is playing with us ?

IBNLIVE » INDIA » MANIPUR


Myanmar intrudes into Indian territory, sets up camp in Manipur

Arijit SenCNN-IBN | Updated Aug 28, 2013 at 06:00pm IST 
Share

Imphal: The Myanmar Army crossed into the Indian border and set up camps at Haolenphai in Manipur on August 22.
Manipur government has taken a serious review of the Myanmar Army's preparation to construct a temporary army camp at Haolenphai village. A high level committee has been sent to investigate the matter. The camp is located at 3 kms from the police station at the border town of Moreh.
"There are nine boundary pillars which are still not settled between India and Myanmar. So government of India, state govt have been requesting Ministry of External Affairs to take up the matter with the Burmese authorities to do a joint survey so that these nine pillars are also settled. As far as the settlement of the boundary dispute is concerned we can only express our views...ultimately it has to be done by the governments of both the countries..so we alone cannot make a settlement," said Suresh Babu, Principal Secretary (Home).
Currently, India and Myanmar share a soft border. It is possible to cross over to Myanmar by foot from the Moreh post. The incident also featured in the Lok Sabha when Manipur MP Thompchong Mena brought it into focus he claimed it was intrusion of sorts which happened near pillar number 76 in the Chandel district.
The state government is in contact with New Delhi regarding the development. Attempts by Indian officials to defuse the crisis have so far been unsuccessful.
At least 30 militant outfits from India have moved their camps to Myanmar and they have also used soft boundary to their advantage. The matter is being looked into by the Indian intelligence.
Large number of political parties in Manipur have opposed fencing of the border by the Myanmar Army as they fear a large chunk of land will be lost to Myanmar.

MUMBAI GANG RAPE INVESTIGATIONS : As expected !!

MUMBAI GANG RAPEAccused linked to politicians, copsShiv Kumar/TNS
Forensic experts examine the crime scene at Shakti Mills in Mumbai on Tuesday.
Forensic experts examine the crime scene at Shakti Mills in Mumbai on Tuesday. — PTI
UNHOLY NEXUS Two of the accused, Chand Sattar Sheikh and Salim Ansari, are allegedly activists of the Nationalist Congress Party Photographs of the two of them posing with senior NCP leader Sachin Ahir have appeared in Shiv Sena mouthpiece Saamna Ahir is a nephew of notorious gangster Arun Gawli and used to be minister for housing and slum improvement in the Maharashtra Government Leader of the gang, Qasim Mohammad Shaikh, alias Bangali, who is the main accused in the rape case, was also a police informer
Mumbai, August 27
The five youths who raped a photojournalist on assignment in an abandoned mill in Mumbai had close links to a prominent Maharashtra politician apart from working as police informers.
Investigators probing the assault have told local residents that the five men were notorious goondas operating in the vicinity of the Mahalaxmi railway station in South Central Mumbai. Apart from committing petty crimes, the five often picked up quarrels with local people confident that their clout would let them get away scot-free, the police said.
Two of the accused, Chand Sattar Sheikh and Salim Ansari, were also allegedly activists of the Nationalist Congress Party. Photographs of the two of them posing with senior NCP leader Sachin Ahir have appeared in Shiv Sena mouthpiece Saamna. Ahir is a nephew of notorious gangster Arun Gawli and used to be minister for housing and slum improvement in the Maharashtra government.
A number of old textile mills in Central Mumbai, the stomping grounds of Gawli, are being replaced by swanky towers with builders openly using underworld elements to cow down opposition to their projects. The police admits that the five men often got politicians to participate in functions organised by them.
Meanwhile, Ahir’s office has denied that the rapists were linked to the MLA. “During any function people come to pose with leaders. MLA saab cannot personally know everyone,” one Jadhav attached to Ahir’s office told this reporter.
Leader of the gang, Qasim Mohammad Shaikh, alias Bangali, who is the main accused in the rape case was also a police informer cultivated by officers in the Crime Branch of the Mumbai police. Shaikh was caught in Delhi after he fled Mumbai following a conversation with a police constable, investigations have revealed.
According to the police, constable Salim Mujawar and Shaikh had exchanged 80 calls in the past month. The constable is being investigated for tipping off the rapist, according to sources.
Local residents have been quoted as telling the police that the gang often stole property belonging to the railways which they sold as scrap. Constables from the local police stations were allegedly bribed to turn a blind eye to their doings.

The rot within IAS -An Article from Tribune

The rot within IAS
Officers should stop dancing to tunes of politicians
by Kuldip Nayar

THE Indian Administrative Service (IAS) is at the apex to run the country's administration. It replaced the Indian Civil Service (ICS) which was an instrument in the hands of the British to rule over India. After Independence, there was a serious thinking whether there should be an all-India service at all. The states wanted persons from their own area to administer.

But then Home Minister Sardar Patel was keen on having an all-India service to articulate the feeling of unity and maintain the diversities prevailing in the country. The service would also, Patel asserted, ensure that the Indian Constitution remained supreme in the medley of pulls by different states. Two all-India services, Indian Administrative Service and Indian Police Service (IPS), were constituted. Their members came to occupy top
positions in the states.

This arrangement worked fairly well till the early seventies when the rot started due to the Centre's maniac effort to concentrate power and the states' ambition to play politics through civil servants. This has practicably nullified good administration. The IAS has become a glorified state service. The rulers use it in the
manner they like.

In real, the Emergency is the watershed. The then Prime Minister, Indira Gandhi, suspended the Constitution and used the IAS officers to enforce illegal acts and suppress the critics. This was the time when the thin line between right and wrong, moral and immoral was erased. Only a couple of officers stood up against what was sheer dictatorship.

Fear of punishment for disobedience made the service servile. It was once the steel frame but it has now turned into a seal frame. The Shah Commission, appointed to look into the excesses during the Emergency, has deplored how the bureaucracy caved in. The Commission has said:

“The ethical considerations inherent in public behaviour became generally dim and in many cases beyond the mental grasp of many of the public functionaries. Desire for self-preservation as admitted by a number of public servants at various levels became the sole motivation for their official actions and behaviour.”

The service has not recovered from the carrots dangled before it during the Emergency. In fact, it is going out of the way to placate the rulers. The latter, in turn, have rewarded those who did what the rulers wanted. The malaise is largely because of two reasons: one, the rulers do not respect the regulations and violate them to reap benefits for themselves and their parties; two, the IAS officers who are allotted to the states, have surrendered because of the threat of transfer or posting to an unimportant position.

Therefore, it is heartening to see when IAS officers like Durga Shakti Nagpal from Uttar Pradesh and Ashok Khemka from Haryana stand up against the wrongs the rulers wished them to do. She has been suspended because of stopping illegal mining by the sand mafia. The Samajwadi Party, ruling UP and placating the Muslim electorate, has justified her suspension, saying that she had endangered the communal harmony by ordering the demolition of an outside wall
of a mosque.

One, this is not true. Two, she was within her right to demolish any unauthorised structure on the government land. In a judgment, the Supreme Court has said that a place of worship should be pulled down immediately if the government land had been encroached upon.

It is a pity that the Supreme Court rejected a public interest litigation (PIL) petition challenging her suspension. The court is technically correct that it cannot interfere in matters between the government and the employees. The court had the opportunity to set right the rot. It should have realised the anger which swept through the country following action against the two officials.

The support of IAS associations from some states and the trainees at Mussoorie to Durga evokes hope that the service, which has ingratiated itself with politicians, may begin to assert itself as was the case before the Emergency. The manner in which the three-member IAS officers’ committee endorsed the Haryana government casts shadow on the behaviour of the service.

The nation still hopes that the bureaucracy will make up for the deficiencies which the politicians, particularly belonging to the ruling party in a state or at the Centre, have created in the system.

In many foreign countries, there is a committee for civil service supervising the suspensions, transfers and promotions of officials. A similar committee can be constituted in India as well. The task can also be entrusted to the Union Public Service Commission (UPSC), which is also the recruiting authority.

The service itself will have to do introspection if officers were to act only on the basis of self-promotion. Today when the common man does not get even what is rightfully due to him, he is disillusioned with the entire system. True, politicians will continue to keep an eye on the electorate, but the IAS cannot afford to fall prey to their designs. A public functionary must display a degree of vigilance and willingness to sacrifice.

The Gandhi dynasty should draw a lesson from the example of Feroze Gandhi, son-in-law of Jawaharlal Nehru. Feroz Gandhi would take up cases of corruption in Parliament, even to the embarrassment of Nehru.

He was so upright that he did not even live at the Prime Minister's house but had a separate bungalow to which he was entitled as a member of Parliament. It is another matter that Feroze Gandhi's son, Rajiv Gandhi, got the atmosphere contaminated when, as the Prime Minister he bought the Bofors guns. Corruption of the dynasty has not lessened either in tone or tenor. Robert Vadra, son-in-law of Congress president Sonia Gandhi, has created a stench.

Coming back to the IAS, its name is in the mud. It must retrieve itself not only for the sake of the Durgas and Khemkas, but also for the public which is still hoping against hope that the service will not dance to the tunes of the rulers. That is how the democratic structure in the country can be made safer.

Sunday 25 August 2013