Skip to main content

Posts

Showing posts from 2010

Einstein’s Riddle

It's a riddle created by Albert Einstein . But the beauty of this riddle is that it doesn't involve physics. You have to just apply your logic. But he had declared that "98% of the world population would not be able to solve it" So do you have guts to try it? The Riddle: In a town, there are five houses, each painted with a different color. In every house lives a person of different nationality. Each homeowner drink a different beverage, smokes a different brand of cigar, and owns a different type of pet. The Question: Who owns the fishes? Hints: The Brit lives in a red house. The Swede keeps dogs as pets. The Dane drinks tea. The Green house is next to, and on the left of the White house. The owner of the Green house drinks coffee. The person who smokes Pall Mall rears birds. The owner of the Yellow house smokes Dunhill. The man living in the center house drinks milk. The Norwegian lives in the first house. The man who smokes Blends live

Batch File - Bulk Renamer

Below is the batch-file code to systematically rename all the files present in the folder according to the given condition. .: C.O.D.E :. @echo off&set /a cnt=0 for %%a in (*.jpeg) do call :PROCESS "%%a" goto :EOF :PROCESS rename %1 "IMG_%cnt%.jpg" set /a cnt+=1 .: S.T.E.P.S :. Step-1 : Open a Notepad. Step-2 : Copy the above code and paste it in Notepad. Step-3 : Save the file as "bulk_renamer.bat" . Step-4 : Put the  bulk_renamer.bat file inside the folder that is having the files which needs to be renamed. Step-5 : Run the  bulk_renamer.bat file by double clicking on it. Note: This batch-file should be present inside the folder where rest of the files that needs to be renamed are present. Remark: Modify the script and condition as per your requirement.

Naming Conventions for common Team's File

Earlier, I'd posted an article  Naming Conventions for Flash Designers . In continuation of that idea, here is another efficient way of doing the say job. According to this method of naming convention, let us first understand how to make a tag. The tag can be created as <name-intials><number-of-times> .  Here name-initials contains the initials of the user's name and number-of-times contains the number of times the user has worked on that file. For example,  AK1 for Abhishek Kumar worked for first time, DC5 for Dulani Chandni worked for fifth time, etc. Now the creater first creates a file and name it as per the tag creation rule. Then another person works over the same file and he'd suffix his tag in the name of that file. Again the creater re-works over that file. This time creater would increment the number-of-times part in his tag-initials. Similarly any other person who'll work on this file will suffix his tag in the filename. So, the filename w

Code of Ethics from Superstitious Beliefs!

Have you ever wondered how normal events turn into superstition or moral codes? Here is a short story by Paramahamsa Nithyananda . In an ashram in India, its master used to hold his puja worship every morning. Now, the master had a pet cat. The cat was very curious and used to jump and play around. It got in the way of the master and his disciples during the daily worship. It never allowed them to finish their worship peacefully. Gradually the cat, in all its playfulness, became a big nuisance. The master had grown quite fond of the cat and did not want to get rid of it. Since he did not want his daily worship disturbed, he asked his disciples to cover the cat with a basket before he began the worship. That day, the worship was peaceful. The master asked his disciples to continue the same way next day. Covering the cat with a basket during their daily worship soon became a part of their routine. Unexpectedly one day the master died. The disciples continued the tradition estab

AS3: Override in Actionscript 3

To understand the working of override keyword in Actionscript 3, follow the article. Create a blank .fla file and name it Main.fla . Then fill in  Document class input box, by typing  Main  in it . This will connect the Main.as file with the  Main.fla file. Main.as package {   import flash.display.MovieClip;   /**    * ...    * @author Abhishek Kumar    */   public class main extends MovieClip   {     public function main()     {       var oBase:CBase = new CBase();       oBase.method();       var oChild:CChild = new CChild();       oChild.method();       var oClone:CBase = oChild as CBase;       oClone.method();     }   } } CBase.as package {   public class CBase   {     public function CBase()     {     }     public function method():void     {       trace("CBase -> method");     }   } } CChild.as package {   public class CChild extends CBase   {     public function CChild()     {     }     publ

Long trip over a bike

My younger cousin brother is crazy about bikes. Few weeks back he told me about his plan to visit his hometown. I said "Ok! What's the big deal?". Then he told me "over a bike". Since he is staying in Gurgaon while his hometown is Madhubani, which is around 1250 km from Gurgaon. So after listening this I was like "Oh My God! Are you sure?". He was quite determined, so I asked about how he'll be going to execute this. But as I guessed he had no plan. Though his excitement was visible over Facebook, as he was asking for suggestions on his wall. Since nobody else has ever did this before, he wouldn't got much suggestion though everyone wished him luck. Finally he included his friend in his trip. And I sighed as two can better care themselves. As per their plan, in fact, no-plan they were gone over a trip and to my expectation they finished it well. As he called me about his exciting journey of 2 days. Though I knew they'll do it even tho

App Inventor Versus Scratch

Google has launched it's latest innovative solution for mobile applications. Now you may think what so special about it? Well, it is special because now it is not required to be a programmer to develop a mobile application for Android operating system. With the help of this latest App Inventor, any non-programmer can develop a mobile application. The idea is quite innovative, as it uses blocks instead of textual code to create an application. Though this idea is not so unique, since another language named Scratch, that is meant for kids, was launched in Dec, 2007 by Lifelong Kindergarten Group at the MIT Media Lab. Scratch has been developed keeping kids in mind. So it was made to teach programming language to kids in a very simple way. And to make it so, all the complexity have been removed. Hence, the result were blocks of hidden wrapped codes. It seems that Google has taken this idea further and made it more general purpose. In fact, it looks more useful, if it can be used

AS3: Function to resize an image

/** * Function to resize an image **/ function resizeImage (id, ReqWidth, ReqHeight) {   id.scaleX = 1;   id.scaleY = 1;   var OriginalW:Number = id.width;   var OriginalH:Number = id.height;   var new_width:Number = 0;   var new_height:Number = 0;   if (OriginalW<=ReqWidth && OriginalH<=ReqHeight)   {     new_width = OriginalW;     new_height = OriginalH;   }   else   {     if (OriginalW>ReqWidth)     {       new_width = ReqWidth;       new_height = Math.floor(OriginalH * (ReqWidth / OriginalW));// 149*(119.30/149) = 83.51       if (new_height > ReqHeight)       {         new_width = Math.floor(new_width*(ReqHeight/new_height));         new_height = ReqHeight;       }     }     else if (OriginalH>ReqHeight)     {       new_width = Math.floor(OriginalW*(ReqHeight/OriginalH));       new_height = ReqHeight;       if (new_width>ReqWidth)       {         new_width = ReqWidth;         new_height = Math.floor(new_height*(ReqWidth/

About Aloe Vera ...

Top 10 reasons to drink aloe vera gel Dental health and hygiene Provides rapid soothing Aids in healthy digestion Immune support and function Regulates weight and energy levels Collagen and elastin repair Daily dose of minerals Daily dose of vitamins Anti-inflammatory properties Body “building blocks”   What does aloe vera do? Supports internal cleansing and digestive health Soothes the digestive system Boosts the immune system Dispose toxins from the body Facilitate digestion Activate blood & lymphatic circulation Helps to remove toxins accumulated in the body Alleviates arthritic and rheumatic pains   Different uses of aloe vera Burns, irradiation, sunburns, minor wounds Liver infections Stomach and intestines Arthritis, rheumatism, back-pain Dermatology Allergies Hygiene and cosmetics Skin care

My first self-review of my performance & work in my first job

Below is my email that I'd emailed to my Boss before my first performance review and it was before I got permanent in the G-Cube Solution. It was my first survey of my performance & work to show it to my Boss on 24th May 2007. After reading this email my boss was surprised because nobody (no employee) had ever done this type of work in his life. My boss Kapil Sir with another director Ankit Jain (Hr head) talked to me about this email and many other things with that. The reaction I'd got was just amazing. Have a look at my email that is given below: I’ve asked people about the cases when someone out of their colleagues got promotion or salary hike then what happened, what type of problems they faced, what was the reaction of their colleagues, etc., before I’d joined the company. And on the basis of those cases, I have analysed this.   Possible problems arise when someone  (an employee , say A )   gets  promotion or salary hike and if  their  colleagues do not accept that :-

Algorithm of Luck

Luck = Preparation + Opportunity. IF (Preparation = NIL)  {    Opportunity = NO USE. } IF (Opportunity KNOCK Your_Door)  {    IF ((You = Hesitate) OR (You != Confident))     {       You = LOSE    }    ELSE    {        You = WIN    } } ELSE {    DO    {       You KNOCK Opportunity's_Door.       IF (Opportunity's_Door = OPEN)       {          You ENTER Inside.          You GRAB Opportunity.       }       ELSE       {          You BANG Opportunity's_Door       }    } WHILE(Opportunity's_Door != OPEN) }

There is a new SOS/SOSG code out for chatters

There is a new code out ... just like "lol" or "brb".  This one is a little different. Plz take a look. It can help u. PROBLEM : You all know how it feels when your talking to someone online and someone is standing behind you lookin at everything you type, especially MOM or DAD.  SOLUTION : To solve this problem, now online chatters have deviced the "code SOS" system. According to this system, SOS = Someone Over Shoulder SOSG = Someone Over Shoulder Gone IMPLEMENTATION : Simply type "SOS" when someone is watching over ur shoulder.  change ur Mode of Talking,  from CASUAL to ATTENTION  That way, the other person will know what ur talkin about and start talkin about homework or something irrelevant.  When they leave, type "SOSG". change ur Mode of Talking,  from ATTENTION to CASUAL That is, u can now go back to ur normal conversation again.  . . . SPREAD THE CODE 'SOS'.

Orkut is deleting profiles - Myth busted

Hey you all orkut users, as I've came across many messages that says 'Orkut is deleting profiles' or something like that. So I thought to clarify this problem. As many of the users are afraid of this. GOOD NEWS !!! Orkut couldn't delete any of the profile without prior notifications.  I suggest you to see the link given below:- http://www.google.com/accounts/TOS This link will show you 'orkut.com Terms of Service'. As per our habbits, we generally ignore to read these things while registering or opening our account. So now give it a look. In the 'term and termination' section,  "... We may terminate your membership immediately at any time, for any reason. ..." is stated. But they can delete the profile "... who does not receive this scrap ..." is ridiculous.  If they want to see who are using/not using their account then why don't they look the record. In which it is stated that when a user has last login or have done last scrap/m

Can a virus attacks via orkut

Guys, r u (orkut users) also getting sick of recieving mails that says  "...don't add this particular id to ur frnd list ... it is a VIRUS..."  or something like this.  Then there is a good news for u all.  Orkut is quite a safe place.  And there is no way to introduce virus via anybody's profile. How this Virus Myth came into existence? Generally, when two guys involve in a feud, then atleast one of them definitely tries to hurt the other one by one or the other way. And guess what's that way? U r right. They broadcast messages like this in their bulletin board. And in orkut they send these types of messages to all of their friends. Sometimes this is not good enough to relief their feudal tension. So they attach a Keyword that is considered like terrorist of the Virtual World ... VIRUS or WORM. And attach a sentence to forward this msg to ur good ones. Can a virus attacks via orkut? NO, i.e., a big No. There is no way through which virus can be uploaded in an ork