Sunday, June 7, 2009

Getting a good salary hike in the time of slowdown

It may be hard for a lot of people to even save their job in the hard time of recession. But still people can think of getting a good salary hike in these times. I am one of those fortunate people, who managed to get a salary hike n this hard time. For geting this hike, there was no fixed rule, but I followed some, and got the result. Here I wish to share them with you.
  • Believe in yourself: The best formula to get success anywhere is first to believe in yourself. Unless you will have faith in your own abilities, no-one will bother to believe in you. Then believing in yourself gives you a lot of strength and inspiration to complete all the tasks, even tougher ones. If you will have faith in yourself, then only you can produce a good result in your work. Thus this is the first and foremost requirement.
  • Be honest: Here being honest means being honest to your work. I feel that you cannot do justice to your work, unless you love your work. But just loving your work does not guarantee that you will be doing the work perfectly. And for making your presence felt in an organization, you need to work perfectly. Thus, be honest to your work and do full justice to it. This will give you an image boost in your organization.
  • Work hard: Unless you will work hard, you will not be able to deliver what you are expected to. Specially in these tough times, when companies are laying-off people, you will sustain only by putting some extra effort to your work.
  • Work smart: I firmly believe that only working hard does not pay, but working smart always pay. And if you could blend the two, you will certainly get the desired result.
  • Deliver on-time: As per me, what your seniors want from you is a good output, that too in a given time-frame. In some cases, if you give some-thing, that error prone, but is being delivered on time, this helps your organization a lot. And if organization get some praise due to your timely work, it's a great reward for you. So, try putting those extra efforts in making the delivery on or before the cut-off time. I prefer keeping things ready before cut-off time, as this gives you some extra space to mend your unknown mistakes.
  • Win trust of seniors: Finally the most valued point in these times. Try to win the trust of your seniors. If you could win over management, then that is the best thing for you to have. Since you could win over your seniors only by working hard and smart, this is prone to happen that seniors start trusting you in the course, when you are following the above points.
I have followed the above points and got results, so hope these points help you as well. 
With Best Wishes.

Saturday, May 30, 2009

Remarkable developments on web this year

This is going to be a great year for the web, as we are seeing a lot of new and wonderful developments in on the web. This all started with the launch of Wolfram|Alpha and counting with the announcement of launch of new products like Bing from Microsoft and Wave from Google. So, here's a brief introduction to the new market hopper:
  1. Wolfram Alpha: Rather than a search-engine  it is an answer-engine. It is an online tool to get answer of all your factual queries. It computes the answers of you queries directly from structured data, rather than providing link to sites, that may contain the result of the given query, like most search engines do.
  2. Yahoo Glue Pages: It is a specialized kind of search, where you get results of wiki, images, videos, articles and all other stuffs over a single page. It provides regular search results with option to other related stuffs.
  3. Bing: This is going to be the upgrade of Microsoft's Live Search. The notable change in this version would be the explorer pane, based on semantic technology from PowerSet which gives the related search results. 
  4. Wave: It is proposed to be a perfect blend of e-mail, instant messaging, wiki and social networking. It will have live features in e-mails like instant messaging. That means e-mail is going to change for-ever. It will also have features of using documents with multiple users, that means a group of people can now work easily after the release of wave, which is supposed to come later this year, though there no word of release date from Google itself.
So, I hope things are going to be interesting this year, specially in the field of web. Just wait and watch, what's in the store for all of us.

Friday, January 23, 2009

Code for adding JS Files at runtime and then executing Functions from currently loaded file.

/*-------This works for IE and non IE as well----------------*/
var oScript = document.createElement("script");
oScript.src = fileName.js;
document.body.appendChild(oScript);

if(browser=="NonIE")
oScript.onload = function(){callAFunction()}; 
else
oScript.onreadystatechange = function(){callAFunction()}; 

Friday, January 2, 2009

Handling logout (back button) for secure pages in asp .net (C#)

It is a common problem in programming that if a user is logged in to a secure page and loggs out of that page. Then clicking on the back button of browser gets a user back to that secure page (regardless of the fact that the user has logged out of the page.)

Ideally, the secure page should bot be shown, in case the user has logged out of the page due to security concerns. I found it very hard to crack. But finally I got a magic function, that handles this problem perfectly. This code worked for me perfectly in IE 6.0, FireFox 2.0 and chrome 1.0.

The code is:

//Put this line in page load event of the page:
Response.Cache.SetNoStore();

and

//Put this code, where you have to logout a user:
Session.Abandon();
Response.Redirect("Login.aspx"); 

If you don't want to remove all the sessions on logout, then you can user below line to remove a specific session:
Session["SessionId"]=null;

Saturday, December 20, 2008

My First site in PHP.

I tried my hands on creating some new featured site using PHP. This came into the shape of Ignou MCA Helper site which is having sections like: MCA Assignments, MCA Lab manuals and MCA Question papers,

My idea behind this site was that through a common platform, we can share our knowledge in the form of assignments and lab manuals. I also added a section for question papers to share old year's question paper, as these are very useful, while preparing for an exam.


I hope those will help you and you will find it interesting.

http://ignou.110mb.com/Index.html

Saturday, September 27, 2008

Enabling secure file download in Asp .Net 2.0

I was trying my hands on Asp .net after a long time, and then came across an interesting problem. I was trying to write a function to make a secure download of web based files, that is I was trying to hide the path of file from user, who is going to download a file from my site. Igoogled a lot, but could not find the exact thing, that I was looking for. Then I collected the pieces of codes from my search, and created that function out of it. This function can be called from any event and will initiate the download without letting users know the path of target file.

The code goes here:

public void download(string fileName, string parentDirectory)
{
string path = Server.MapPath(pare);
FileInfo f1 = new FileInfo(path + "/" + fileName);
        if (f1.Exists)
        {
            Response.Clear();
            Response.AddHeader("Content-Disposition", "attachment; filename=" + f1.Name);
            Response.AddHeader("Content-Length", f1.Length.ToString());
            Response.ContentType = "application/octet-stream";
            Response.WriteFile(f1.FullName);
            Response.End();
        }
        else
            Response.Write(path + "/" + fileName);
}

Note: To use this code, one must use the System.IO namespace.

Wednesday, June 11, 2008

How to install JDK 6 on Linux (Fedora Core)

I came across a problem of installing JDK on linux. This was interesting because I had to install JDK on a remote server machine. Here's the process to do that.

  1. Downloaded file using wget (because I was told that there is only wget installed on the remote machine) from this location: http://www.java.net/download/jdk6/6u2/promoted/b02/binaries/jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin
  2. Now changed the permission of the downloaded file to 755 like this:
    chmod 755 jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin
  3. Then ran it by calling ./jdk-6u2-ea-bin-b02-linux-i586-12_apr_2007-rpm.bin Here I needed to type yes after going through the license document as my acceptance to the terms.
  4. I was made to find the path of the actual location of JDK installation and indicate the fedora to accept my choice by using updatedb;locate javac |grep bin.
  5. Now I required to run the alternative command to instruct Fedora to recognize Sun’s JVM.
    alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_02/bin/java 100
    alternatives --install /usr/bin/jar jar /usr/java/jdk1.6.0_02/bin/jar 100
    alternatives --install /usr/bin/javac javac /usr/java/jdk1.6.0_02/bin/javac 100
  6. Finally I required to configure alternative to use Sun’s JVM as the default JVM by calling /usr/sbin/alternatives --config java
Now the installation process is over. This can be checked by saying java -version.

Here we need to remember that we have to login as root to the machine to do all the installation.