Karachi   ->   Sweden   ->   Karachi, again   ->   Dubai   ->   Bahrain   ->   Karachi, once more   ->   London and Leeds

Sunday, February 09, 2014

Configuring jPOS with Maven POM

jPOS is now available on GitHub. If you want to make use of the ISO8583 Java library in your Maven project, following are the dependency settings that you need to define in your POM.xml:

In other words, the groupId is org.jpos and the artifactId is jpos. The latest released version as of today is 1.9.2.

A frequently encountered error, however, is related to missing sleepycat jar when you build your maven project having jPOS as a dependency. The exact error is something like "missing com.sleepycat:je:4.1.10 artifact".

A nice solution to that is to add Oracle's maven repository in your project's list of repositories, so that the missing dependency gets resolved automatically. For this, you just need to add reference to http://download.oracle.com/maven in your POM file, as shown below:

Saturday, December 14, 2013

Applying for International Driving Permit (IDP)

You can easily get an International Driving Permit (IDP) from the post office (over the counter), and the application fee is just £5.50. Read on to know the details.

If you are a UK driving licence holder and would like to drive abroad, you might be required to hold an International Driving Permit (IDP) along with your full driving licence. The exact requirements vary country by country; for example, you can drive in all European Union (EU) or European Economic Area (EEA) countries and Switzerland without on your UK driving licence, but the same is not true for several Asian countries. Here is a word on the requirement from the UK government.

So, if you have decided to apply for an International Driving Permit (IDP), this post is going to highlight the process as of Dec 2013. You can apply by post or by visiting the local crown post office in person. I personally prefer getting it over the counter to avoid postage costs and the associated delays.

Step 0: Get the application form

The application forms are available in the UK crown post offices. They are also available from the AA and the RAC website. Here is the Royal Mail page about International Driving Permits. Just visit one of the post offices which can issue an IDP.

Step 1: Fill in the application form and attach supporting documents

The application form is pretty simple to fill in. You'll need some personal details, driving licence number, the country you are visiting and the date you would like your IDP to become active. You can post date your application by 3 months. The IDP is valid for 1 year.

The required supporting documents are
  • Your driving licence and the counter part
  • An additional proof of identity (such as Passport or Biometric Residence Permit)
  • A photo signed at the back

Step 2: Apply at the post office

Visit one of the post offices which can issue IDP, along with a filled in application form, the supporting documents and the application fee (£5.50). Provide these over the counter and they will issue you the IDP then and there.

Thursday, October 31, 2013

Catching a COM+ Event in VBScript

Catching events in Visual Basic 6 was simple---the IDE provided you all the tools to define event handlers in a very easy and intuitive way. Similar approach was carried over to .NET based languages. But what if you are going to use a COM object in VBScript, where you don't have an IDE to help you at all?

Difference between CreateObject and WScript.CreateObject

The first point to note is that you need to use WScript.CreateObject to create your COM object in VBScript, if you want to attach a handler for events raised by the object. WScript.CreateObject takes an additional parameter---a prefix for your VBScript functions which will be called when the event is raised:

Set obj = WScript.CreateObject(ProgID [,strPrefix])

where strPrefix is the starting prefix of the function names which will act as the event handlers for the object created.

Event Handler - Practical Example

Let's say that I have a prog id of "Math.SimpleCalculator" and the event raised by the corresponding object is CalculationComplete. The VBSCript client which can create this object and receive the raised event will be declared as follows:

Set obj = WScript.CreateObject ( "Math.SimpleCalculator", "MyObj_")

Function MyObj_CalculationComplete ()
   MsgBox "Calculation is complete!"
EndFunction

call obj.doSomething()
call WScript.Sleep (1000)

Tuesday, October 22, 2013

Remittances to Pakistan by Pakistani Expats

Do you know what's the biggest export of Pakistan? It's still Textile, amounting to 1.1 billion USD in a single month (stats from Aug 2013). But you might be surprised to know that this export is now matched by the remittances sent in by Pakistanis from abroad to their families back home. The figure is more than a billion dollars in a single month!

Remittances from Pakistani Expats in Sep-2013

The data about remittances is publicly available from the State Bank of Pakistan. Below, we analyse some of the data from September 2013:

Source: State Bank of Pakistan (Home Remittances Sep-2013)

The above figures are in millions of dollars, remitted by Pakistanis in a single month, broken down by countries.

As you can see, the largest remittances come from four countries: Kingdom of Saudia Arabia, the UAE, the UK and the USA. Amount of money remitted from KSA to Pakistan in a single month is 373 million US dollars, followed by the UAE at 276 million USD. Being Pakistanis, we also know that besides Gulf countries, a large number of Pakistanis live in the UK and the US.

Year on year increase in remittances

The following graph shows yearly increase in the last 10 years. Mind that the figures are in USD, and hence, these remittances further strengthen the economy in the backdrop of Rupee losing against Dollar:

Source: World Bank Migration & Remittances Data

Why have the remittances gone up?

working paper by IMF (International Monetary Fund), published in 2011 studies the factors behind this trend of remittances.

The hypothesis presented in the IMF paper are interesting, especially considering the fact that the world economy hasn't been doing really well in general during the last 10 years. The working paper from IMF narrows down everything to the number of migrants moving out of Pakistan and their general skill-level. 

And once again, being Pakistanis, we know that the large outflux of skilled migrants is actually due to the law and order situation in Pakistan. While these migrants are helping a lot to the economy, the "brain drain" impact can't be ignored.

What method do you use for remittance?

Are you a Pakistani living abroad? I am sure you send money back home. What's the method that you use? Do you think you are getting the best rates with minimal transaction fee?

Sunday, August 18, 2013

Google Nexus Sound Mute Problem

So, my Google Nexus 4 suddenly went mute. I did a quick check to find out that it's only video and applications which have their volume stuck at 0; the phone itself was ringing fine; even the alarm function was working. This relieved me because it meant that the speaker itself wasn't faulty.

As with all software problem, a complete reboot came to mind. Unfortunately, that didn't help either. I even tried rebooting it to Safe Mode but with no luck---games, videos stored on the phone and Youtube all seemed to be completely silent.

The next idea was to check the phone with headphones, and to my surprise, things were fine if I plugged in a headphone. It was just the speaker which wasn't being used!

Some interesting articles on the web told me about similar situations where the audio which previously worked fine had stopped working; although all of these cases were a little di
fferent from what I was facing:

Similar Android Problems


Google Nexus Android Mute BugAndroid Bug: Volume for "media" stuck muted until device is rebooted is a bug reported for Android 4.2.1, which seems to remain unfixed till June 2013 (from the comments in the bug report). Interestingly, this one is an Android bug and effects all phones, including Galaxy SIII. The problem here seems to go away if the device is rebooted but that was not the case with me.

Another problem reported on Google forums is a sound problem which affects both speakers and headphones. You can see in the comments that people have different variations to this and no solution has been posted by anyone.

Many people suggest that if you face this problem, you have a third party application which is not letting your phone restore the volume. If reboot doesn't work, perhaps you should uninstall any recently added mobile phone applications?

What finally worked for me!

And then I came to know about SoundAbout. This nifty application allows you to redirect your sound forcefully to one of the many audio output devices associated with your phone: external speaker, wired headphone, HDMI, Bluetooth, etc. There is a PRO version too, but the basic, free version was good enough to fix the issue for me.


The screenshot from Sound About on the right shows you the relevant screen in the application. By default, things are set to let the application to decide where to send the sound output. I changed it to "Speaker" and then played videos---Voila! Everything was back to normal! I changed the settings back to "Let App Decide" and things were still normal. I uninstalled Sound About, and yet the phone was still behaving as normal.