jQuery Mobile: Part 3 – Modifying default ‘loading’ and ‘error loading page’ messages



In the second part of this series we have learned how to link pages. If you followed them, probably, you’ve also noticed that a ‘loading’ message while you are visiting pages back and forth. jQuery Mobile shows this while it loads the page behind the scene. Well, you may not see this in fast connection or during testing in your computer as it loaded too fast. Similarly, jQuery Mobile shows ‘error loading page’ when it fails to load any page.

In my application, I wanted to change these texts as I wanted them in Bangla.  We were seeing these because they are set by default in the framework. By modifying the default properties, we can change them to something we want.

To do so we will hook into jQuery Mobile’s ‘mobileinit’ event. This event (on document object) is triggered just on the moment jQuery Mobile is started to load. So, we will have to override these before loading jQuery Mobile library.

So far, we have loaded the library files in the following order:

Continue reading

Posted in jQuery Mobile | Tagged , , , , , , , , , , , , , , , , , | 1 Comment

jQuery Mobile: Part 2 – Making multiple pages and linking them



Hey fellas, in the first part of our jQuery Mobile journey we have learned how to make the first jQuery Mobile page. That was quite easy and fun. As we ain’t going to give those introductions again, I believe, its a good idea to have a look into the previous part.

In this part we will dig a bit more. We will see how can we make more than one pages and link to each other.

Continue reading

Posted in jQuery Mobile | Tagged , , , , , , , , , , , , , , , , , | Leave a comment

jQuery Mobile: Part 1 – Making your first mobile page

Happy days are coming soon as jQuery Mobile 1.0 is already in Beta 2 phase which is going to enter Beta 3 in, probably, next month and then to Release Candidates (RC). However, the current state of jQuery Mobile is very well qualified for playing. So, I wish to write some beginner level blog posts as I discover it. If you find any mistake, error and/or you have any suggestion, please feel free to notify me.

Today we will see how to create first page with jQuery Mobile 1.0 Beta 2. We will see other things in near future, may be :P .

Continue reading

Posted in jQuery Mobile | Tagged , , , , , , , , , , , | 12 Comments

Rooting Samsung Galaxy Pop (Mini) on Mac OSx and enabling Bangla (Bengali) support

Introduction
(you can skip this part if you are in hurry)

I was planning to root my galaxy pop for a quite long time. But it was delayed as I found all tutorials applicable for Windows. That means, I need a windows machine to root my device but I don’t have any working windows machine.

Yesterday, I planned to upgrade to Gingerbread from Froyo as some of the friends suggested claiming it improves the battery performance (honestly, so far after upgrade, I believe it really does). I read some tutorials and this also requires windows machine. So, I borrowed my brother’s laptop. After about 10 hours of efforts, I could successfully upgrade the ROM.

So, this morning, I planned to root the device and in office I tried SuperOneClick.exe with colleague’s windows machine but failed. Then I was searching Google to do so on my Mac OSx. After several tries, I could do it. Continue reading

Posted in Tutorial | Tagged , , , , , , , , , | 5 Comments

Just received amazonkindle!

Today I came to office a bit late. Immediately after coming I was informed that a parcel has arrived on my name. I was expecting a dummy camera lens as it is supposed to come. However, seeing the packet I was a bit suspicious. The dummy lens’s package would not be so small. After I opened it, I could not believe my eyes. It is amazonkindle! Yes, I ordered it on 15th May from www.aliexpress.com! But still unbelievable. Do you know why? Keep following.

In aliexpress, when a order is placed and payment is done the order status was ‘Shipment Required‘. The seller was supposed to ship it and mark it as ‘Shipped’ and provide me the tracking ID. However, till now I did not receive any tracking and the order status was ‘Shipment Required’ last night. Seeing the seller is delaying unnecessarily, I canceled the order and aliexpress.com refunded me the whole money within few minutes. I also gave negative feedback to the buyer for wasting my time.

So, I guess you now can understand why I am so surprised seeing it. The seller must be stupid! Why s/he did not update the status of the order?

Anyway, as still in office, I could not get much time to explore it. I will explore it at home. I wish the seller will contact me and I will arrange a way to pay him.

The benefit of aliexpress is that it does keeps the money in escrow until you confirm that the product is reached to you and it is upto your expectation. I first heard about aliexpress.com from a member of Projanmo Forum.

My version is Kindle 3 WiFi + 3G. Costs (including shipping) was US$191. Also I had to pay 1050 tk here as excise duty and other fees.

Posted in General | Tagged , , , , , , , , , , | 17 Comments

Get free SMS alert on your server down (or something else)!

Well, first thing first. This blog may be little bit immoral even if it is not illegal by the provider terms of service. So, if you read this or later sentences, the responsibilities are on you.

—————-

I am going to share an idea that I’ve personally used a bit ago (2009) in my previous office to monitor the server and get notified when any server/service is down. I wrote a small PHP application that would do the tasks. Though I planned that time to blog about it, apparently, I forgot about it. The steps of the idea is:

  • A php chunk checks server status
  • If it finds something unexpected (or may be expected; depends on your logic :) ) it creates an event in your google calendar which is due just 1-3 minutes from now
  • If your SMS alert is setup in Google Calender, Google will email you about the event.

Here I will not show how to write a PHP script to monitor server. I just told it as I applied this idea for same purpose. I guess you will get lots if you google it. However, the initial version that I developed just checked site’s homepage (using CURL) and if they were returning 200 response within a sensible time limit. If the response was not 200, it would create the event for me.

How to create Event?

It’s very simple. First of all download the following classes from phpclasses.org

Put them in your project path. Create a php file. Lets assume it is createevent.php. Now include the wrapper file in createevent.php.

Continue reading

Posted in PHP, Tutorial | Tagged , , , , , , , , , , , , , , , , , | 5 Comments

Is it right time to buy Apple’s product from Bangladesh?

It has been about 11 months that I’ve purchased Macbook Pro 13.3 inches. Though I am extremely happy with hardware design, I am that level of unhappy due to instability of the Mac OS. I can’t run it for more than 3 days as it either hangs or become too unstable to use! Many applications including Firefox 4 crashing frequently on it.

Again, in the first month of purchase, a silica ball as been penetrated into its sound port (3.5mm) and to date it is safely there. Why? Because Aloha iShoppe, from where I’ve purchased it, said they can’t open it as it will void the Apple’s warranty though they are authorized dealer of Apple’s product! If I need to claim warranty, they would send the laptop to Singapore and it will take about 2 months to get back the laptop. Can you imagine?

Moreover from last week, power adapter for my macbook pro is dead. This morning I went to Executive Machines for asking the price of a macbook pro adapter. They said it is 8500 BDT. And they also said you can get yours one replaced from where you’ve purchased it as it has one year warranty (they also provide same warranty for their power adapters too)! Then I called to Aloha iShoppe and here is pattern of conversation:

Me: What is the warranty duration for power adapter of macbook pro?
Aloha: There is no warranty for the power adapter.
Me: But so far I know, it also has same warranty as the main body!
Aloha: When you’ve purchased it?
Me: Last june!
Aloha: Actually, it does not has so long warranty, it has about 90 days of warranty?
Me: But Executive Machines is giving 1 year warranty for power adapter.
Aloha: ummm, it is (1 year warranty) given for the products from this year, not for earlier products (power adapter)!
Me: What is the price of power adapter at your house?
Aloha: It is 9500 BDT.
Me: OMG! It is 8500 BDT at Executive Machines. Why you are charging higher prices with less warranty period?
Aloha: They might not have the product, they sometimes, tell prices for products even they don’t have.
Me: Well, they showed me the adapter

(I hang up the phone!)

If you read the above conversation, you will notice how inconsistent their information are!

With my bad experiences with Apple products, I don’t think we should buy Apple’s product unless there is a service center of Apple in Bangladesh! However, if you need to buy, I think it will be wise not to buy from Aloha iShoppe.

Few months ago, I purchased a remote control from Executive Machines by BDT 1700 whose price was asked 2800 at Aloha! So you see how much higher their prices and most importantly, poor after sales service.

Posted in General | Tagged , , , , , , , , | 5 Comments

Line wrapping is finally available in Netbeans 7.0

Well, if you ask me why I left Netbeans and started using phpStorm; I will say first: Speed, second: Line wrapping along with few other reasons. I’ve used Netbeans for quite sometime but I was very irritated as it did not have good line wrapping support. Some users may wonder why I am saying ‘good’ as it did not have any line wrapping at all.

The fact is that, line wrapping was implemented in earlier versions too but was not enabled by default as it was not stable.  It can be enabled by editing a configuration file but it was causing lots of troubles while coding. However, as the latest version, v7.0, is released on 18th April 2011, line wrapping is now available without any such hacking and so far it is good to me.

How to enable Line Wrapping?

Go to Netbeans  -> Preferences (or press CMD + ,) -> Editor -> Formatting

You will notice a drop down labeled as ‘Line Wrap’. Choose ‘After Words’ or ‘Anywhere’ as per your wish and then hit OK.

That’s it. Simply open a file (opened files need re-opening) and you will not see horizontal scroll-bars :) .

Netbeans Linewrapping

Netbeans Linewrapping

Posted in PHP, Tutorial | Tagged , , , , , , , , , , , | 5 Comments

Extending or replacing core classes in CodeIgniter 2x

It has been quite some time that CodeIgniter 2x has been released after a quite long waiting. There are several improvements in this latest release and upgrading from the 1x is quite easy. However, they have changed some file/folder organization in this latest release. I found these changes as good as it provides better application wise personalization. CodeIgniter’s previous file/folder structures were not (at least, by default) very good (without some/little modification) for hosting multiple application based on single core installation. However, in this version they organized it better.

On of the major change was made in this version in replacing and/or extending core classes. There was no note in their upgrade guide (but explains in their relevant doc page, which I found later). So I had to go through little trouble with it until Arafat Rahman helped me out!

However, the process is simple. In version 2x, they have introduced a new directory called ‘core’ (along with few others). All core classes that needs to be replaced or extended should be in this directory. I liked it very much, as I hated to put core classes in library directory in older versions.

Replacing a core class
Let’s say we want to replace a core class by our own version. Also let’s assume we want to replace the model class (actual name is CI_Model). Now follow these steps:

  • Create a directory named ‘core’ in your application directory, if it does not exist. If your application directory is default one, it would be ‘application/core’
  • Create a new file named Model.php.
  • Put the following line in the newly created empty file:
<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
class CI_Model
{
 function __construct()
  {
  }
}

Now when you create model classes in current application extend the CI_Model as you were doing earlier, this class will be extended rather than the CI_Model class in the system/core/Model.php. However, when you do, think if you have enough reasons to replace the core class as you can do most, if not all, of the tasks by simply extending it.

Extending the core class

Rather than replacing, I find it much better to extend the core class and use that class in my application. The steps of extending the core class are also simple. Continue reading

Posted in PHP | Tagged , , , , , , , , , , , , , , , , , | 6 Comments

Joomla 1.5 Top Extensions Cookbook Review

Well, I came to this book  when I was looking for a Project Management Tool inside Joomla. It is because, I am working on a project where clients handles several persons (developers, researchers etc.) and he wants to manage the tasks himself that he assigned to others. Being familiar with Joomla, it is comfortable for him to get something inside Joomla.

While searching for an easy manual for him, I somehow found this book. When I got this book, I found exactly what I wanted in its 7th Chapter where it discussed about ProjectFork. I found that it is clearly and easily described how to configure & us Projectfork. Moreover, sufficient number of images/screenshots have been included on every sections. Sometimes images talk much than texts.

Now I can recommend the same book to Project Owner so that he can take help from it too. I am sure, it will be quite easy for him to use ProjectFork following this book.

I have read few other chapters (for example: chapter about Docman as it will also be needed in this project) and I am amazed to see its lucid descriptions. In every section, there are sufficient screenshots that will greatly help the newbies, the book is mainly intended to. Overall it contains more than 80 recipes of doing something with Joomla. The interesting part is that, you don’t need any programming skills for following these. Little familiarity with Joomla will be sufficient to follow the guidelines. However, the numerous screenshots are included which will make the reading comfortable.

The reader of this book will learn the following things (copied from original site): Continue reading

Posted in Book Reviews | Tagged , , , , , , , , , , , , , , , , , , | 2 Comments