Sample Code: prevent web page overwrites
Below are some interesting problems and solutions that I have come accross. Problem: In a web based system how to you prevent multiple updates to the same record by different users seeing potentially...
View Articlehtml5 – javascript game frameworks? – Game Development
HTML5 Gaming I’m beginning to look into various html5 javascript game and graphics frameworks. The toughest part is always choosing a good framework in the beginning, since its such a time investment...
View ArticleCode Sample: PHP Currency converter with caching RSS Feed
Problem: For a recent project I needed to get the latest exchange rates to allow the sales folks to quickly calculate exchange rates while doing estimates in different currencies. There are many sites...
View ArticleWebsockets : Using modern HTML5 technology for true server push
HTML5 Websockets the future of server push HTML5 is likely to go down in web history as the most important revision to HTML , well since, HTML first introduced the <img > tag. HTML5 is...
View ArticleSample Code: Quick and Dirty PHP Cache
Here’s a variation of a PHP caching script. One of the things I frequently find myself doing for page(s) that take a long time to render, especially if they are a long running process, is to generally...
View ArticleCode Samples – Preventing web update overwrites
Below are some interesting problems and solutions that I have come accross. Problem: In a web based system how to you prevent web update overwrites to the same record by different users seeing...
View ArticleTwitter like alerts via simple Jquery and PHP
One of the minor challenges of creating a web application , is to indicate that something was successfully or unsuccessfully completed when transitioning to a new page or screen. I find it’s very...
View ArticleCode Sample: PHP Backup MySQL and files to Dropbox
Most web hosts have the ability via their control panel to offer an entire site backup , and this is the minimal functionality you should consider. Generally there’s a site backup link within the...
View ArticlePalindrome algorithms: What’s fastest reverse vs. compare.
Today during a meeting a simple coding question came up as to how to write a palindrome function. A palindrome is a word, phrase, number, or other sequence of symbols or elements, whose meaning may be...
View ArticleHTTP long poll streaming requests via ajax php
HTTP is a terrific protocol , likely the most popular protocol ever (since it’s the foundation of the modern web portion of the Internet), but even so its mostly a REQUEST->RESPONSE protocol,...
View ArticleShell script code: show oldest | newest file in folder and file age
Determining Oldest file and file age Today I had to write a short shell script to help figure out the oldest file in a particular folder, how old that file was (in secs or minutes). This is a pretty...
View ArticlePHP backup monitor and alert: prevent backup rot…
One of the key components with any IT software system is putting together an automated , reliable backup solution. Gone are the days of manually backing up files to a removable media, with our...
View ArticleLinux backup and rotate script
A common task to do with backups is to rotate them , so that you have multiple copies of critical files going back x days. Below is a bash script (Linux command line) that does this. Why Rotate...
View ArticleUsing server-side Datatables with SQLite or MySQL via PDO
I have been a fan of using datatables for a while and always wanted to generalize the server side example to be able to use SQLite, MySQL or any other PDO supported database. For the longest time in my...
View ArticleCross platform mobile development (android / ios) , consider Intel XDK
These days a common idiom is that there’s an app for that (coined by Apple marketing) ,and for the two major platforms Android and iOS and too a lesser extent Windows Phone, there generally is a wide...
View ArticleBootstrap Bootgrid with PHP json server side script
I recently came across Jquery Bootgrid, which is Twitter Bootstrap (aka bootstrap) friendly table grid, that is very similar in function to Datatables.While not as feature rich as datatables (yet), it...
View ArticleWordPress fixing unattached images – empty media library
Having recently been the victim of WordPress site hack (vandalized) I was forced to move to a new hosting company, and move over all my content, but I didn’t want to copy my database verbatim, as I was...
View Articlegenetic algorithms in PHP code example of (evolutionary programming )
This posting and php code sample is about fascinating topic of Genetic Algorithms (GA) which simulate evolution using computer code to help find near-optimal solutions when dealing with problems that...
View ArticlePHP 7 is here!
It looks like the latest edition of PHP has been released, PHP 7 , and it brings a lot of new enhancements. Its biggest new capabilities are vast speed improvements, rumor has it that its on par with...
View ArticleRe-discovering Windows & Linux cross platform Development IDE Lazarus
If you’re a developer of a certain age (say north of 35) you will likely have worked with or heard of Visual Basic and to a lesser known extent Delphi IDE (Integrated Development Environment)...
View Article