Archive | Mixed RSS feed for this section

SQLite space within string

Today I was working in some SQLite3 tasks for one of our iPhone application. One of the problem I faced is that, I’ve to know the string data that contains a certain number of  ‘ ‘ space.  Suppose If I need to know the string data that has 2 space or may be 3 space then how can I do so.

The simplest thing I tried and that solved my problem by the following way:

if I one to search 1 space:

SELECT * FROM tbl_name where str_field LIKE '% %'

if I one to search 2 space:

SELECT * FROM tbl_name where str_field LIKE '% %% %'

if I one to search 3 space:

SELECT * FROM tbl_name where str_field LIKE '% %% %% %'
Comments { 1 }

Codeigniter 1.7 Professional Development Book Review

codeigniterSome days ago I got this book from packt. I skimmed all the chapters of this book and read details some chapters. This is a very good book to start developing web application using Codeigniter framework.

The writer Adam Griffiths nicely describes details of this framework. Beside codeigniter framework, the writer also mentioned how to add external libraries like facebook,twitter, memcache to develop web application using codeigniter framework.

Continue Reading →

Comments { 0 }

Amazon S3 vs Rackspace cloud files

amazons3I have been using rackspace cloud storage as a CDN for my site for some months. Before moving to rackspace I first used Amazon S3 and my overall experience is amazon S3 is slower than rackspace. Some of my senior brothers also told me that, but I first didn’t believe them. But practically when I used s3 I found its not working faster. And then I moved to rackspace files and it loads really faster. That’s why I suggest my blog readers and clients to use rackspace cloud files.

rackspace-cloudAmazon opted to build their own content delivery network (CDN) while Rackspace chose to partner with Limelight Networks, a leading, global CDN provider.  Limelight serves some of the largest media customers in the world (including Disney, MSNBC, NetFlix, Microsoft Xbox, and Amazon Video on Demand) and has an extensive world-wide network. For a brief comparison read this article.

If you have wordpress powered sites and want to use CDN either amazon s3 or rackspace cloud files, then you could easily integrate them using the following plugins.

Continue Reading →

Comments { 13 }

Some of my favorite web related books

Here I listed some programming and web related books those I found important for knowledge/skills/career whatever you said. Some of the books I read completely and some books partially. But all of these books I found very helpful to increase knowledge.

PHP

php 5 and mysql Beginning PHP 5 and MySQL If you’re beginner and want to learn from the start then you should read this book. You’ll find lot of examples of php, mysql in this book.

Continue Reading →

Comments { 3 }

In actionscript 3 how to remove duplicates from array

actionscriptToday I was working in  actionscript 3 + php project. I was working in an array and I needed to remove duplicate entries from array. In php its very easy to remove duplicate entries.

There is a function in php named array_unique($array); that removes duplicate elements from array. So in php I could easily use

    $arr = array('a', 'b', 'a', 'c', 'd', 'b');
    $arr = array_unique($arr); //removes duplicate entries

But there is no such type of built in function in actionscript 3 for array. So I created my own function and used it

function removeDuplicate(arr:Array) : void{
    var i:int;
    var j: int;
    for (i = 0; i < arr.length - 1; i++){
        for (j = i + 1; j < arr.length; j++){
            if (arr[i] === arr[j]){
                arr.splice(j, 1);
            }
        }
    }
}

Now just call the function and pass an array

var arr:Array = new Array("a", "b", "a", "c", "d", "b");
removeDuplicate(arr);

splice(startIndex:int, deleteCount:uint); method removes elements from an array. So using 2 simple loops I solved my problem. But as my arrays are short 20 elements max so I don’t need to optimize this function.

reference: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/Array.html

Comments { 3 }

My Personal Web Hosting Experience

web-hosting-experienceLet me tell you a story about my experience regarding web hosting, cdn technology, domain registration company. In 2007 I first bought a shared hosting from a local (Bangladeshi) company named CronySoft.com. Their service and supports are good and cheap in Bangladesh.  Later I found that they provide their hosting from hostmonster.com

In 2008, first time I bought shared hosting account and domain from GoDaddy.com using my debit card. I’ve still one of my site is hosted there as I bought for 3 years hosting.  I don’t like their control panel to mange my host. It looks slow for me.  And regarding their server, if you host facebook application that has low traffic sometimes you’ll see timeout. So think what happen if you have moderate level traffic application. I think their server is sharing many accounts and thus response time is slow most of the time. I don’t recommend Godaddy for any purpose.

Continue Reading →

Comments { 6 }

Monitor your website using 3rd party sites

site24x7 What would be your feelings if you see your site is down for more than 4 hours, or your VPS is shutting down by the hosting company and needs to reboot? In my case I would be feeling very angry if I see such type of long downtime. But if I be informed within 5 min or 15 min after downtime then I can take proper action to restore my service.

So if you want to get alert message when your site is down you could use third party service like site24x7, siteuptime , 100pulse

All of them has free services and paid services. Personally I use site24x7 . Here You could set 2 urls and http port check in 60 min interval as a free service. You can pay 1$/month for 1 Url to check between 1 min to 60 min. They will send email to you if your site is down. You can also purchase SMS package so that they can also send sms message as alert.

site24x7_services

So checkout these sites and use which site suits best to you.

Comments { 4 }

Getting external parameters in ActionScript 3

ActionScript 3.0

Actually this is not a big or complex post. I am a part time ActionScript 3.0 developer and recently in my company i2we, inc. I developed a customized jobs search widget for them. Where one of the criteria was when we include flash object in html, we can provide external parameter. Based on the parameter the flash widget customize its result.

So in this post, I will show how you can pass parameter from html and get them in your flash object. Please keep in mind that my code is based on ActionScript 3.0

Continue Reading →

Comments { 3 }

Free mind mapping software

Some days ago one of my senior brother give me the link of this awesome free software. My brother used it to visual design a book, chapters, topics. Its such a wonderful software that you can easily draw and present your thinking as a nice way.

If you’re a project manager you can easily draw your projects so that your developers can easily understand what they need to do. If you’re a web developer you can also design your web applications so that other developers can easily understand about the features and modules.

So lets look at the features of this tool:
Continue Reading →

Comments { 0 }

Twitter like p2 theme for wordpress

Sometimes short message posting looks far better than a long posting. For this purpose you can use twitter or facebook fan page. Facebook fan page is better than twitter in one sense is that, you can attach video, image and  your message could be long than twitter. Though we use fan page or twitter to inform our friends or connection about our status or some news.

If you want a twitter and facebook fan page like features for your own purpose,  where you can publish full post or short message, attach image/video whatever then you can use wordpress and p2 theme.  P2 theme is excellent. You can also use p2 theme as group blog for short update.

Continue Reading →

Comments { 2 }