There is competition going on in bbGameZone. I decided to participate with small Bulls and cows game:
Here is my submission “CowsNBulls”.
It’s a game I loved playing when I was younger.
Demo: http://posterfans.com/game/
Source code: http://posterfans.com/game/index.php.txt (2013 bytes)
The code can be further optimized, but let’s leave something for Phase 2 Smiley
Total planning + development + bug fixing time [...]
¶
Posted 22 February 2010
§
PHP
‡
A nice hack for postgres field size: http://sniptools.com/databases/resize-a-column-in-a-postgresql-table-without-changing-data
Today HostGator is offering 75% discount for hosting with code: 75OFF
To move table to different schema in PostgreSQL use:
ALTER TABLE table_name SET SCHEMA schema_name;
If you’re looking for a big text file to play with, why don’t you try http://www.dotnetdotcom.org/.
We invite you to help us share the content of internet by downloading the first part of our index. It has roughly 600,000 pages and is shared in an easy to parse text file. We are making this available [...]
If you want to add rating system for your posts in Blogger, check Outbrain (http://www.outbrain.com/). They have fully automated script for that.
I’m using it form my animated gifs blog.
If you want to use GET parameters in Code igniter just for specific controller do use the following line in your Controller’s constructor:
parse_str($_SERVER[’QUERY_STRING’],$_GET);
Also make sure to call your script like this (even if you use mod_rewrite to get rid of index.php):
www.example.com/index.php/controller/method/?par1=1&par2=2
¶
Posted 29 May 2009
§
PHP
‡
This is my first attempt for smooth tile scrolling in Slick. The offx/offy coordinates are not entirely correct for hero, smaller than the tile image but it’s a good start the “smooth” part comes from shx/shy variables which offset the rendering position. The code is after the break:
Update: Check the project source code page at [...]
¶
Posted 05 May 2009
§
Slick
‡
I needed a bot to quickly modify the pages of wiki.muonlinehelp.com. So I created Mutex which kind of helps do the job. It’s full of bugs with no error handling but works for me.
Usage:
<?
require ‘class.mediawiki.php’;
$mw = new mediawiki(’http://yourwikiurl/api.php’);
$mw->login(’bot_user’, ‘bot_password’);
$mw->editPage(’title’, ‘page_text’);
?>
You can get the source code from here. [...]
To randomize timestamp column in mysql You can use the following statement:
UPDATE your_table SET
timestamp_field = TIMESTAMPADD(MINUTE, RAND()*60,timestamp_field);
¶
Posted 16 February 2009
§
MySql
‡