Software

PHP Bijoy to Unicode Converter

In our latest project at PROGmaatic, we needed a converter to convert lots of information written in Bangla. Unfortunately  everything was in Bijoy (SutonnyMJ) font. But our requirement was Unicode formatted data and language preference was PHP.

 

I thought, no big deal. There should have been lots of converters available, and most of them might be in PHP. After hours of searching (Yes I don’t like coding when I can find something free :D).

Well, I haven’t found a single script which would do what I needed. Two of the following did help me to understand how to develop the converter:

So finally I end up coding one myself. Fork it from my Github account.

In the coding process I have learnt two valuable lessons 🙂

1. javascript string method ‘substring‘ is not equivalent to PHP’s string function ‘substr‘ [I spent only 5 hours for this mistake!!!]

2. Nothing is better than step-by-step Debugging!

 

Future modifications:

1. Make mbstring independent. (I actually figured out the way, but right now I don’t need it since I have mbstring support :))

2. Make memory efficient.

 

Check the code and let me know if you find a better way, find a bug or need some modification. I will be happy to make the changes and give you the credit 🙂

 

What is the difference between this & this(), super & super()

Well the topic is a basic in OOP, when I first learned my first OO language (C++ back in 2004), I have learned the basic. Few days ago some one asked the question, suddenly I become confused, so I made a quick research, and decided to post 🙂

this and super both are object. this() and super() both are constructors.

this is the object of current class.

this() is the constructor of current class.

super is the object of parent class.

super() is the constructor of parent class.

Example (in java) please check out this nice example provided in this link

I hope this will save someone’s day 🙂

World City locations database

For one of my projects, I need the geographical location (latitude, longitude, altitude) of all main cities of the world. It was a adobe air project to determine worldwide salat timetable automatically.

I couldn’t find a complete list. Then I found this site, Aneki World Cities. Then I designed a scrapper using PHP, and scrapped all the countries first, then their respective cities list, then respective geographical location. Then end result was a table in the database with all countries, respective cities and locations 🙂

How to setup latex environment in Windows

Must read notice: Geekish Post….Only for geeks 😀

Do you need to write your first thesis paper or do you want your publication published in a famous journal?

So LaTeX is for you. LaTeX is a document preparation system for high-quality typesetting based on Donald E. Knuth’s TeX typesetting language or certain extensions. It is most often used for medium-to-large technical or scientific documents but it can be used for almost any form of publishing.

Well, definitely *NIX systems have built-in latex support, but in windows you need to set it up for yourself. As few monthes ago I have started writting my first thesis paper using latex and for some reason I have used windows system, I need to setup latex environment in windows. Definitely a annoying, time consuming task, So I have decided to share it 🙂

I am going to describe it step by step, please follow these steps as described, its important. I am assuming you have Windows XP or later versions and you have administrative privilege.

1 of 2
12