Monday, April 30, 2012

How to Block FB / FaceBook from your Laptop


1. put the following line in host file.
Path : C:\WINDOWS\system32\drivers\etc

2. Edit this line and add the following line at end..
---------------------------------------------
74.125.79.94 www.facebook.com
74.125.79.94 facebook.com
74.125.79.94 static.ak.fbcdn.net
74.125.79.94 www.static.ak.fbcdn.net
74.125.79.94 login.facebook.com
74.125.79.94 www.login.facebook.com
74.125.79.94 fbcdn.net
74.125.79.94 www.fbcdn.net
74.125.79.94 fbcdn.com
74.125.79.94 www.fbcdn.com
74.125.79.94 static.ak.connect.facebook.com
74.125.79.94 www.static.ak.connect.facebook.com

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

Cheers
Dipankar

HowTo: Browse the Internet on Your Terminal

Hi,

This post shows you , how u can access net through terminal.. I need this to logon remote machine by putty and Download IEEE paper , which is not accessible from here..

DO the following steps:

1. Dowload W3m software.

w3m is a text-based web browser as well as a pager like `more' or `less'. With w3m you can browse web pages through a terminal emulator window (xterm, rxvt or something like that). Moreover, w3m can be used as a text formatting tool which typesets HTML into plain text.


To install w3m on your Debian system, just do this:

$ sudo apt-get install w3m


2. To browse the interwebs simply do:

$ w3m www.google.com


TIPS:
1. TAB is a useful key and so is enter
2. To go back, press ESC + Down Arrowkey
3. To search something over at Google,
  • Use the arrow keys to get over the blank space and press the ENTER key
  • Then type the search term and press the ENTER key
  • TAB over to the text equivalent of the 'Search Google' button
  • You can download stuff from the Internet by pressing ENTER on the link text (usually blue)


For Cent OS /Fedora /RedHat ==>

1.  sudo wget http://mirror.centos.org/centos/5/os/i386/CentOS/w3m-0.5.1-18.el5.i386.rpm

2. sudo yum install w3m-0.5.1-18.el5.i386.rpm


3. w3m google.com

Cheers
Dipankar

Wednesday, April 25, 2012

Amazon Interview Process and Tips


Hi Friends,

This post is regarding the huge opening in Amazon India Bangalore and Hydrabad Location for SDE, SDET and QA [2012].  This is a referral program by Amazon india, where you can send your CV to me to f/w to our HR dept Directly. If you got selected for interview by ur resume, you will get a call from them. So, If you think that you are a ALGO-GEEK and you can code overnight, Don't lose this opportunity and try your LUCK.

Some details from my Experience  is given below.. Feel free to contact me if u have any query.

Cheers
Dipankar



Details Job Desc :


Interview Requirements:

1. Excellent coding Skill : C, C++, Java [ able to write correct efficient code Pen and paper and able to Dry run , cover most test cases, with minimal space and time complexity
2. Excellent Problem Solving Skill [ SEE my Interview Exp , what do mean by problem solving ]. Can  ypu solved in in O(1) or O(n) ?
3. Fundamental understanding of Data Structure [ Linked list, Array, sorting searching, hashing, Tree, Graph, stack and Queue ]
4. Deep Knowledge of Algorithm Technique , D&C, Greedy, Dynamic Programming, etc. [You will get 2-3 Question from Dynamic programming ]
5. Basic concept of OS, N/w and OOPs [Not Required in Details ]
6. NO Aptitude , NO verbal, NO MCQ question, Only coding and Algo..That's All..

My Experience and Interview Question papers:


How To prepare ?

1. Read core concept of DS and Algo from Testbook:
  • D.Samata for DS
  • Coreman for Algo
  • Sahani for Algo
  • Levitin For Algo
  • Algorithms 4-th edition
  • Algorithm Design Manual
2. Read the Qn and Solution from Book:
  • Crack The interview
  • Crack the coding Interview
  • Algorithm for Interviews
3. Solved  Algo and DS question from Internet: 
 Interview Procedure For Amazon:
  1. Online Coding Exam [ 4 Coding in 2 hours]
  2. One-two Telephonic Interview [All are Technical]
  3. Five to Seven Onsite technical Interview :
    • All are on technical on algo and DS
    • They will ask you to write code in pen and paper
    • One of them Will be Bar Raiser Round , Which is simple one type of Ragging Round on Algo and DS
    • One Manager round  
    • In my case, they took only 5 round. but there are some people who give 7 round , depending on their skill.
  4. HR round if Necessary .
  • In my CASE, there was NO HR round. 
  • genaraly , they don't remove candidate in HR round, just talking about to salary etc etc
Sore info about benefit  Detilals:
  • For BTech , it is , about <two digit> lac Fixed [base salary, it Depends on interview, it can even MUCH MORE.. ]
  • * lac benifits, include food , internet, Cab , relocation etc etc
  • Stock in RSU
  • No Joining Bonus for Freshers
  • not fixed timing ofc hours..as ur choice...
  • allow Work from Home...

Please Note that, Ur grade and Clg name will not matter too much If u r really GEEK ...So u must have a try........:)

Tuesday, April 24, 2012

Tabbed PuTTy --SuperPutty

PuTTY is an open source application which has the capability to act as a client for the SSHTelnet, rlogin, and raw TCP computing protocols, as well as a serial console client. Though it was originally written for Microsoft Windows, however, it is also used with Unix based platforms. SuperPutty is a GUI (Graphical User Interface) based application for PuTTY SSH Client which can not only perform regular PuTTY commands, but also allows it to be opened in multiple tabs.


1. Install putty
2. install super Putty ---> Assign path to putty.:https://github.com/phendryx/superputty.
3.Njoy
After installation, the PuTTY.exe (and optionally the spcp.exe) file path(s) have to be specified.

Cheers
Dipankar

My interview with Citrix R&D India


From My Memory.......[6th Dec,2010 ]

Hi friends,

I have never tried to write any experience of my life.. and I never try to write a diary in my life. I wrote the last paragraph in my life in final exam of higher secondary. As most of my friend request me to share my experience of my interview , I m trying to write something about my interview. Today is 6th dec, 2010, at 2:15 Am. I am trying to  re-visualize the event occurred in that night and try to give perfect sequence occur of event of my interview.

I am in M-tech 2nd year student ,IIT roorkee , our placement started from 1th decbr , Citrix was the 5th company in our campus. I m not able to clear the written test of google, adobe. I cleared the written test of Microsoft but debarred in GD in coding. I have cleared the written test  , first round interview of Netapps but they put me in QA rather than DeV group..and in the 2nd level of interview they discard me as i was not interested in QA positions ...

In 4th December, there was two back to back interviews, first one is Netapps, the interview process is so bad .. I cannot tell u. they call me at 12:30 pm and take first round of interview and the took 2nd level of interview at 6:45 pm … in fact they harry up the interview process and leave me at 7:00pm .. I did not feel any depression because from next was Citrix , which works on same domain of mine, in Cloud Computing..

Citrix had 4 level of selection process:

First level written test started at 7:15 and a duration of 1 hours, it fully consist of c question( basic on c++ from test your c skill ) there was 50 questions. No negative marking. Some simple apti.(every 10 th question. They prepare the question well formatted and they gave color full question paper, by chance I got a yellow color question paper.different color indicate different sets to restrict copying…

In second level , there are 3 coding in paper and pencil:

Q1. Write a program which marge two sorted single linked list into single sorted linked list it must remove duplicate..
This one is very simple ..and already known to me.

Q2  write a program which find LCA of a binary tree. It is not a BST.This problem can be done by simple recursion and also known the logic previously

Q3. Write a program which print all possible combination of 10 A and  10 ‘B’.

This problem was unknown to me.. but a little though give me Good idea to solve this problem using divide and conquer rule to solve this problem,

They gave 1 hr time to write the program.

I solve each problem in a good coding fashion and after each problem I gave a illustration of execution. I have also properly handle the exception. I took near about 40 min to solve the problem.

I asked them when the interview will be ? they told me at night.. but I was so tired that I directly came back to my hostel. I had already missed my lunch and dinner both. Took a bun omelet from canteen and went to sleep. I was sure that I will get a call for interview. Thus before sleep I told amit to awake up if I was selected for interview.  I know that my prediction fail a little.

As expected, I got a call for interview directly from placement cell at 12:50Am. They told me that I got  selected for interview and the to come to placement cell with in 15 min. some of my friends also got selected and just ware the dresses and come out from the room.

The night was completely silence…cold and some dogs are sleeping outside the gate.. I took my ear cover( just like headphone) to save me from cold. I was very cheerful and cool because I know there would be lots of fun going to happen in interview. I was not felling sleepy.. in fact I have good (?) habit to sleep late night at 4-5 am.

After reaching the interview placement cell , I found that 17 people are called from Mtech , Btech and IDD,   I m also feel some nervers. After thinking , there are a lot of companies like Oracle/ Yahoo/CISCo still there… but I not able to cool at that time…I just sit in front of hitter and njoying how other people preparing for interview. One of my another habit is that I never read or try to recapitulate something just before interview.. again I am trying to sing some Bengali Band song in my mind….i started observer how the heater works.. how it was rotating and related to hitter….really I didn’t see this type of hitter even before…

There ware 3 panel .. so there are three parallel processing going on…my name was top 3 from the bottom of the list.. I understand that each of taking 30-45 min then my term will come near about 4:30. I fell boring .. how long  a person can observe a hitter?

I found that Btech people take it more seriously ,, collect and discuss the ans within themself. but Mtech people are are most caz.. our topper avisek sleep in chair ..shib also do so.. told me to wake up when there turn come..interview process was going on…

One of my friend Tonmoy brought tea for us.. after some time I just go through my resume.. try to every thing I stayed about cloud computing.. and just took a look over my recent published paper on cloud computing on IEEE symposium, Bangalore. I decided to take tee to take my energy . I put tea into a cup…and just ready to take tea…my term come….anyway I have to leave tea.. and go for the next Fun…. Now this time I feel some kind of something ..i cannot express .. but I understand my heart was beeping and I was vivarting…was this a effect of cold ? or something else ? J

It was 3rd panel. There ware two persons.. one middle age person ,looking scientist  and other was young looking very smart. After welcome notes. They asked to tell something about me. After that they introduce themselves. One of them was some higher post engineer in Netscalar , acquired by Citrix, and other was working on desktop virtualization,:

First question was:
Lets there is an array A[10];They wrote some code something
Int arr[10];Arr[0]=0;
Arr[1]=1;
-----------
Arr[9]=9;
Printf(“%d”,a[15]);
What it will print? And why? 
I gv the solution and also give the backed logic to support my ans.
  • Next question: explain your work on scheduling.
  • Next question: why genetic algorithm?
  • Next question: what is virtualization? What is the advantage of Virtualization?
  • Next question: give some example of real application of virtualization.
  • Next question: what are different type of virtualization.
  • Next question: what is the difference between traditional computing and cloud computing.?
they look my dissertation topic and ask what is difference between traditional license management and license mangemeant in cloud computing?
Next question: how to determine is  there any  loop in  a single linked list or not?I clearly state that this is a known problem to me.. they smile.. and say.. can u prove the correctness of the algorithm what u know.I proved by inductionThey make it more complicated.
If slow pointer increment by 2 and fast pointer is increment by three then do u think it will detect the loop? Prove correctness of algorithm, which is more efficient and way?I say that 1st one is more efficient.. but they show some counter example. Really it depending on the length of  SLL.
They switch to next puzzle: in google, when we type a string to search . how  will you  find top most 100 search text in most efficient way.
I give 3 alternative solution and explain them and also tell them each advantage and drawback.Approach one: Hash table + Max heap treeApproach II : trie structureApproach III: augmented BST or Red black treeThen they switch to networking:They ask three simple question from networking:
  • Q1. Explain what ‘s happened when we type something in address bar?
  • Q2. Explain what is fast retransmit and what is advantage of that.
  • Q3. How flow control is done by TCP?
  • Q4. What is SACK?

I say I m not sure about this ans. But I guess the ans : fortunately it was correct.. it’s selective ACK.
My interview then over . they ask . u have any question  ?

 I say that I was not able to attend the ppt due to my workload. Can u kindly tell me something about co0mpany ? what type of work currently is going on in your company ? and whether phd is offered by your company?
They answered . and thanks me and tell me wait for next level of technical interview.

I come out from the panel.. felling very confident as my interview was quite good .. again the some thought came into my mind.. if I wound not select ..then why to worry? Anyway yahoo is coming today !!!!

IT is 5:15.. it’s horrible cold… and we are 19 peoples are playing with dr luck….the silence take over the whole IIT( definitely it is not HIT , in HIT the scenario is quite different  :) ). And after that we wait for half hour with cold bez I m not not allowed to those person who r not still not appeared for interview.after the some time the list of selected come .. only 3 person was selected out of 19 , and I was among them. They told other people can leave now.. my friend wish best of luck to me and go to hostel.. only my M.tech peer  with me.. they told that no 2nd level technical interview. 


Just there is a HR interview.first they called me. In HR interview held just only for 5 Min and it’s a really a silly interview.. I felt sleepy during this interview…after me there two interview is going on…..



It was 6:15.. still sun is not get up from bed.. some light ray is shown from the east corner of the sky.. some bird maght wake up.. some people are returning from home.. the sound of Bus. Auto and life world is just to wake up…we r the three people are waiting for our luck…the HR came out from a room .. in her hand there is a paper.. may be some name was written on it.. is my name would be appeared in that list?

She declare that they are very glad by taking interview from my clg.. And they select final 3 student from my college..now the game is over .. I m out of placement..they welcome us .. handshaking .. and finally give some gift to us.. and told us they will send offer letter via mail…

It’s time to return to room… and I know It was 2 hours late from my daily sleeping time…..




Friday, April 20, 2012

How can I force pop-ups being opened in a new tab ?

This is an experience of my personal hacking Stuff.

Sometime , you must face this problem to edit Address bar url in a Mozilla popup , but which is not  possible as Popup URL can;t be editable..

But u need it to make a navigation by changing the URL as the URL might be already removed from page..as deadline occur..

You are thinking , why can't copy the URL and paste in a new tab , in that case it wont work if the site use some Cookie or session..

In that you can force to open a popup in a new tab easily..

It can be done by :

The easy way is to install 'Tab mix plus' addon and under 'links' set 'Java script & pop up restriction' to 'open all pop ups in tabs'. You can also use https://addons.mozilla.org/en-US/firefox/addon/tab-mix-plus/ to tweak a bunch of other tab settings. There is always about:config but more often than not there is the easy way, an addon that will do it for you.

Try and Njoy..

Thanks
Dipankar 

Saturday, April 14, 2012

How to convert in Microsoft Word 2007 into LaTeX ??

Ever seen those sweet research papers with that awesome font? That’s LaTeX. If you are a die-hard LaTeX fan you can pretty much stop reading this post right now. For the rest of us, Microsoft Word 2007 is often a practical alternative when pressed for time.

I’ll be the first to admit that if you can be bothered getting your hands dirty, LaTeX makes documents look pretty damn sweet. If you just need to throw a quick document together, but want people to think you’re a LaTeX pro, you can get passable results using Word 2007 with a few tweaks:

Alternate #1. [ref-http://www.frostnova.net/archives/fake-latex.html ]

  1. First, download the Computer Modern and Latin Modern fonts. Word 2007 supports the OpenType format so get that. Don’t be disheartened by how these fonts look onscreen – some look like total arse, but let’s face it, these fonts were not designed for the screen at all. They look fine when printed or even in a PDF if you zoom in far enough. And stick with “LM Roman 12″ as it has the proper bold font, others may look strange. You can find even more fonts if you install a LaTeX distro like MikTeX and search the installation folder for *.pfm files.
  2. If you want to approximate BibTeX-style references, get the IEEE citation stylesheet for Microsoft Word 2007 and extract to
    C:\Program Files\Microsoft Office\Office12\Bibliography\Style.
  3. Set up your heading sizes and turn on 1.2.3 section numbering. I can’t be bothered explaining how so here’s a sample word document to get you started.
  4. Make sure you use the LM fonts for all figures and diagrams for consistency. However, for built-in equations, you’re stuck with Cambria Math, which Microsoft built especially for equations, but it doesn’t look too bad.
Alternative #2 :
use online converter : http://www.wordtolatex.com/upload

Alternative 3:
use the template..
http://www.jchl.co.uk/computing/LaTeX.dot

Alternative 4 :

Use this S/w Easy ..

Word-to-LaTeX 2.40:

Thanks
Dipankar

Friday, April 13, 2012

Parameter Passing : HTML--> JSP--->JSP

The most frequent question in JSP tut or Wb design is that ..
"Is it possible to pass a parameter between JSP pages IF the parameter hasn't been set in HTML tags?"

There are a few ways to pass information from one JSP page to another.

1. Hidden values.

Simply write the data to an input field within a form with the type 'hidden', e.g.

<input type="hidden" name="mydata" value="<%=thedata%>">

Data written thus will get posted back when the relevant form is submitted. This can be a useful way to 'carry along' information as the user fills out a series of dialogs as all state is user side and the back and forward buttons will work as expected.

2. URL writing.

Attach parameters to URLs in links on the page, e.g.

<a href="another.jsp?mydata=<%=thedata>>Go!a>

This also maintains the state with the client while removing the need for a form element to be submitted.

3. Cookies.

Should speak for itself.The state is still user side but is now handled by a cookie. More fragile in some ways since some people disable cookies. Also the back and forward buttons may do unexpected things if you are not careful

4. Server side (session)

Finally you could store the data in a session variable on one JSP and retrieve it on the next, e.g.

session.setAttribute(String key, Object value)

and

session.getAttribute(String key)

Here the state is kept server side which has some benefits (the user can browse away and return without losing his place, but tends to make the back and forward buttons in the browser a bit unreliable unless you are careful. Also the value is available to all pages.

It does however have the advantage that the information is never sent to the client and is thus more secure and more tamper proof.


You usually pass data between servlet/JSP or JSP pages in scoped attributes (in request, session or application). E.g. request.setAttribute("key", data) can set "key" attribute in one JSP, andrequest.getAttribute("key") gets you this data in other JSP (if multiple JSPs are processing same request).

It is possible to create fake parameters by wrapping your request, and overriding getParameter and similar method, if that is what you really need.



Let's do some expamle :

How to set in send.jsp
===============================
<% request.setAttribute("AttributeName","This is the Attribute value."); String strViewPage="SetAttributeMethod1.jsp"; RequestDispatcher dispatcher = request.getRequestDispatcher(strViewPage); if (dispatcher != null){ dispatcher.forward(request, response); } %>

===============================
How to get the value in recv.jsp?
<% out.println(request.getAttribute("AttributeName")); %>

========================================

Hope it helps..

Cheers
Dipankar