Monday, October 10, 2011

something u must know if u r using DOCOMO(know ur call logs)

Recently I was really surprised to dat 1 of ma frnds had access to all my account details, my recent call logs n muh more. After some research I got to know some facts...

1)Docomo has an online support desk(link-Online Support). Many of the advanced queries which customer support guys at 121 cannot answer are all answered there.

2)Docomo has a "my accounts" page (link- My Account), where you can see all your account details.The details include...
a)Ur account info like ur name n address on which ur no. is registered.
b)Ur recent call logs.
c)Ur recharge information.
d)U can activate/deactivate DND. And some more information.

Hope u would like the post.Remember not to disclose ur passwd :)

~barun

Monday, August 8, 2011

Increase your PC's RAM!!

Use Ready Boost to use your USB as a temporary memory to increase your RAM.
Do chek this link...

http://www.sevenforums.com/tutorials/33289-readyboost-setup-use.html

Windows boots up Slow..Cool Solution??

1)goto run-->msconfig...and remove the items from startup which eat up your memory while startup but you don't need them as such.

2)Delete all temporary files from your Windows machine..
goto run-->%temp% and delete all temporary files.

I hope your computer is not infected else you need an antivirus first!! :)

Monday, May 16, 2011

Know your System

Method 1

~type "systeminfo" in a dos.

Method 2

~Start->Run(Windows key+R)

~type "winmsd" and click "OK".

Windows Keyboard Shortcuts

~goto start->Run

~type "C:\WINDOWS\Help\keyshort.chm"

~click "OK"

~click Print

Changing MAC address

I hope you will not use it for illegal things...but it's sometimes really important for security reasons...

The steps are as follows...

Windows 2000/XP

~Go to start>my network places.Right click and go to Properties.

~Under "General" tab, click on the "Properties" button


~Under "General" tab, click on the "Configure" button

~Click on "Advanced" tab

~Under "Property section" select "Network Address" or "Locally Administered Address".

~On the right side, under "Value", type in the new MAC address you want to assign to your NIC. Do not use "-" between the MAC address numbers.

~Goto command prompt and type in "ipconfig /all" or "net config rdr" to verify the changes.

~If successful, reboot your system.

Get MAC addresses of all computers connected to your network(LAN)


~In command prompt execute "arp -a".(arp is for Address Resolution Protocol)

What is PUK code of a sim?

PUK code is a sim specific code assigned by your service provider. Its not possible to crack it on your own. So, whenever your cell asks for the PUK code, don't play(you may be in trouble), get the PUK code from your service provider.

Many people use a pin no. to get access to their cell phones.But, sometimes this may be a great cause of problem.

Suppose mistakenly someone enters 3 wrong trials.This results in blocking of your sim card and cell will now ask for PUK no. If the tragedy is to happen,you again give 3 wrong trials for PUK code.And the unfortunate result is that your sim gets blocked permanently.Now there is only 1 solution,go to the customer care center and ask for a replacement sim or simply throw this one and buy a new sim.

Sunday, May 15, 2011

show hidden files and folders

Windows registry(winreg) to show the hidden files and folders.

1)type "regedit" in Run.
2)Make the following entry...

User Key: [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\
Advanced]
Value Name: Hidden
Data Type: REG_DWORD (DWORD Value)
Value Data: (1 = show hidden, 2 = do not show)

Best SMS site

smsze.com is the best sms site I have ever used.It sends sms without ads,as if you were sending it from your cellphone.you will definitely like it.

Friday, April 15, 2011

Search Algorithms

Linear Search

It is the easiest search algorithm.The algorithm intends so check each and every element and stops when the required element is found.

Implementation

int getindex(int a[], int n, int target)
{
for(int i = 0; i < n ; i++)
if (a[i] == target) { return i; }
return -1;
}

void main()
{
int a[]={3,4,5,2,6,8,10};
int n=7; //no. of elements in the array
int index=getindex(a,n,6);
printf("index of 6 in array "a" is::%d",index);
}

explaination::The above code returns the index of element to be found...


Binary Search

Binary Search use Divide and rule algorithm to find the reqd. element in an already sorted list. The algorithm is deceptively simple. Pretend I was thinking of a number between 1 and 100. Every guess you take, I'll say higher or lower. The most efficient way to discover my number is to first guess 50. Higher. 75. Lower. 62. Higher 68. Yes!

Implementation

int findIndex(int a[],int n, int target) {
return binarySearch(a, target, 0, n);
};

int binarySearch(int a, int target,int start,int end) {
if (start > end) { return -1; } //does not exist

int middle = (start + end) / 2;
int value = a[middle];

if (value > target) { return binarySearch(a, target, start, middle-1); }
if (value < target) { return binarySearch(a, target, middle+1, end); }
return middle; //found!
}

int a[]={1, 4,6,8,9,12,32,45,56,58,78};
int n=11;
findIndex(a,n,12);

Monday, April 4, 2011

Microsoft Placement Paper

My experience....MICROSOFT....conducted on 22nd Dec 2010

First round was a written test of an hour. There were 6 questions(4 programming and 2 test cases) 10 marks each.

1)find output of following code??

void main()

{

void *ptr;

char *a='A';

char *b="TAN";

int i=50;

ptr=a;

ptr=(*char)malloc(sizeof(a));

printf("%c",*ptr);

ptr=i;

ptr=(*int)malloc(sizeof(i));

printf("%d",++(*ptr));

ptr=b;

ptr=(*char)malloc(sizeof(b));

printf("%c",++(*ptr));

}

ans: A51AN

2) Write a program that takes a no. from user and prints the no. subtracting 5 each time from the no. till the no. doesn’t crosses/reaches 0.And again prints the nos. now increasing 5 each time till the no. doesn’t reaches/crosses original no.

don't use any loops or goto stmnt.And don't declare any local variables.

ans: use recursion.

3)convert a no. from string to integer.

eg: str:"1234"

convert to int a=1234;

ans:while(*ptr!=NULL)

{

a=(a*10)+(*ptr-48);

}

4) Find the subarray of an array that has the greatest sum? Array contains both +ve as well as -ve nos.

ans:I did it using 3 loops but when I went for the 2nd technical round the interviewer told me a very simple and optimal program for the same.

sumtillnow=0;

sum=0;

for(i=0;i

{

sumtillnow+=a[i];

if(sumtillnow>sum)

sum=sumtillnow;

if(sumtillnow<=0)

sumtillnow=0;

}

5) Write test cases for a student regestration form.

6) Write test cases for a web search engine.

--------------------------------------

20 students were shortlisted after the written test.

1st technical round...

First he saw my resume and asked me few ques about my BE Project and the TE Project.

Then I was asked many questions from OOP concepts...mainly about virtual functions,pure virtual functions(application based) and v-table etc.

Then he asked me some ques from OS...

1) Critical section

2) Semaphores

3) Processes

4) Threads

5) Reader Writers problem

Then there were a few questions from Logic Gates

1) Half adder....circuit and functionality

2) Full adder....circuit and functionality

Then he asked me 2 puzzles...

1) There are 3 buckets full of oranges, apples and mixture of both. Buckets are labeled with orange, apple and mixture. And it is known that all labels are false. Now just pick up 1 fruit from any 1 of the buckets and label all of them correctly.

Ans ::hint: pick the fruit from mixed labeled basket.

2) There are 5 bags containing marbles. All are identical.4 of them weight 9g one of them is 10g.you have a weighing balance. In one go can u tell which is the bag with 10g.

ans::i was blank.min I could produce was in 3 chances.

-------------------------------------------------

In 1st round other students were also asked ques. from DBMS (Normalization, few queries and ER diagrams).

And ques from TOC (Finite automata machine)..... Draw a finite automata to accept a binary no. that is divisible by 5.

-------------------------------------------------

2nd Round

He asked me some test cases.

Then the interviewer asked me to optimize certain codes...

1)4th ques of the written exam. (Subarry sum)

2) An array of n elements contains elements 1-(n-1) in random order and 1 entry is duplicated. Find the duplicate entry???

ans::I told him to take one more array. Now pick the elements from 1st array and put them into respective index of the 2nd array. If duplicate occur then report and end the loop.

he asked me to optimize the code. Then I suggested a BST. He asked me to optimize more and more and more and more......this ques fucked me..

But somehow I was advanced for the 3rd round..I was very excited.

---------------------------------------------------

3rd Round

HR...Some test cases and Why should I take you in Microsoft.

---------------------------------------------------

But unfortunately I wasn’t able to make it :( But may be these questions will help you for your placements. Best of Luck to all...