Amazon deals

Showing posts with label general. Show all posts
Showing posts with label general. Show all posts

Friday, February 12, 2010

How to Add a Facebook Apllication to your profile page?

Step 1: Login to facebook.com

Step 2: Get the the application you want to use. Our example here is http://apps.facebook.com/impetusapp/

Step 3: Click on view my profile from your facebook home page. Snapshot below shows where you can find it.



Step 4: Click on the "+" symbol on the tabs.

Step 5: Enter the name of the application you want to add.


Step 6: And voila. We are done :)

Friday, May 22, 2009

Connect BSNL EVDO card on linux

This procedure can be applied for different datacards such as those of reliance and tata indicom if they are devices of zte type. And guess what you don't have to worry about getting an zte device driver for linux...

Step 1: Login to linux as superuser(root)
Step 2: Connect your device to the USB port
Step 3: open terminal
Step 4: enter the command 'lsusb'.It should give a listing of all USB devices connected. Something similar to this...
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 08ff:2580 AuthenTec, Inc. AES2501 Fingerprint Sensor
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 014: ID 19d2:fffe ONDA Communication S.p.A.
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

Your device should be listed. Something similar to ONDA Communication or Qualcomm depending on your device.

Step 5: Goto /etc and open wvdial.conf in a text editor.
Step 6: After keeping backup of the file modify it as follows. Please enter your correct user name and password instead of 1111111111

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = Analog Modem
ISDN = 0
Phone = #777
Modem = /dev/ttyUSB0
Username = 1111111111
Password = 1111111111
Baud = 460800
Stupid Mode = 1

Step 6: whenever you need to connect to the internet just open the terminal and run the command 'wvdial'

linux-y5au:/home/kiran/lin evdo driver/linux # wvdial
--> WvDial: Internet dialer version 1.60
--> Cannot get information for serial port.
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Modem initialized.
--> Sending: ATDT#777
--> Waiting for carrier.
ATDT#777
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Fri May 22 12:05:59 2009
--> Pid of pppd: 5873
--> Using interface ppp0
--> pppd: ��[06][08][08]�[06][08]
--> pppd: ��[06][08][08]�[06][08]
--> pppd: �[06][08][08]�[06][08]
--> pppd: ��[06][08][08]�[06][08]
--> local IP address 10.4.61.177
--> pppd: ��[06][08][08]�[06][08]
--> remote IP address 192.168.52.12
--> pppd: ��[06][08][08]�[06][08]
--> primary DNS address 208.67.220.220
--> pppd: ��[06][08][08]�[06][08]
--> secondary DNS address 208.67.222.222
--> pppd: ��[06][08][08]�[06][08]
--> Script /etc/ppp/ip-up run successful
--> Default route Ok.
--> Nameserver (DNS) Ok.
--> Connected... Press Ctrl-C to disconnect
--> pppd: ��[06][08][08]�[06][08]

and voila online on linux and lovin it ;)

Wednesday, February 11, 2009

The dreaded null comes back

The null pointer exceptions are dreadfully insane in Java. Take this one for example, the EntityManagerFactory returned null. You go on to a thousand forums on the net to find a solution to this problem and you find out one this, the JPA is relatively a newbie on the experienced programming world and the closest problem could be that you've not the given the correct name for the persistence unit. Well i'll try to list out a max of probable errors you need to correct to solve this problem...

1. Use the same name while defining the persistence unit in the persistence.xml file and while denoting the @Persistence

2. Add the META-inf folder that contains this xml fle in yor classpath if its not already in the classpath. The persistence.xml must be in the classpath for the entities to be able to recognise your back end database and connect to it.

3. Check the data type of entity parameters. Are they what you really expect? JPA has a weird habit of using non-conventional data types such as short for representing columns with numbers that are of range low enough to be represented by this datatype. But they'll mess you up when you try to connect to databases like oracle that don't support this. So you may need to look into the auto generated codes a little bit.

4. You do the above and still no gain? Yo might have foreign keys in your database. Drop those keys, the JPA doesn't always work well when you don't have well defined foreign keys around in your tables.

If you are still scratching your heads, then EJB's are not for you. Definitely you'll even find some books titled Why not to use EJB's. But this technology has certainly revolutionized database based applications especially with the way we perceive entities and query them.

Sunday, December 21, 2008

AJAX - A misconception?

My encounters with HR's of various companies have left me wondering on how people with very little/narrow technical knowledge end up being major recturing factors of some well known technical companies. Naming the person here and the company would actually soil the reputation of one of a few damn good companies, so i'll refrain from mentioning that and give more of the background and clear off a few misconceptions about a piece of technical jagron termed AJAX.

Here's the incident: It was kinda of deep into a tech interview round when i mentioned AJAX as one of the technologies i've been working on in the recent times. As expected the HR asked me what was AJAX and i gave the classical definition that even you can look up here. He then went on to ask how to make a score ticker using AJAX. I'll mention the steps here minus the technical jagron

1. Write javascript with an automated function call that calls itself every min or so as the time difference needed for the score update.

2. Create the xmlhttprequest object connection to the data source (an ASP/JSP page here)

3. Write the DataSource provider script to access the database and return the XML data.

4. Put the XML data on the page.

And to this he told: Wrong. Where are you using AJAX? You are using just javascript. I tried my best to convince him that AJAX technology is a confluence of javascript and XML. Ironical but his belief was that i had to drag and drop one of the widgets either from dojo/yui or any of the widget libraries that provide AJAX. Uph!! When will people ever learn that code libraries are also collection of javascripts that do the same job as we write; and the technology doesn't change whether you use an API/library or you yourself write the code within the technology constraints.

LESSON: Never go indepth onto the side of technology your interviewer has little knowledge off. The company doesn't deserve a bright individual as you.