Filed Under (mediawiki) by admin on 28-01-2010
Edit the LocalSettings.php
add the notes:// protocol
where you find this line (add it as an array item)
$wgUrlProtocols = array( 'http://', 'https://', 'mailto:' ,'notes://');
Filed Under (php) by admin on 25-01-2010
Tagged Under : php
The mt_rand() function is a drop-in replacement for rand().
It uses a random number generator with known characteristics using the Mersenne Twister from the php docs website
I somehow noticed php rand() has a pattern, So I dug up the php docs for a better rand function and end up discovering this neat random function
Use mt_rand()
<?php
echo mt_rand() . "\n";
echo mt_rand() . "\n";
echo mt_rand(5, 15);
?>
Output
1604716014
1478613278
6
Filed Under (php) by admin on 22-01-2010
Tagged Under : php

I was able to figure out how to run Simple_html_dom php library on codeigniter
Download the simple html dom library here simple html dom
I copied the file Simple_html_dom.php to
/system/libraries
Then in my controller I call it using
require_once(‘Simple_html_dom.php’);
To use it, I initialized it using this line
$html = new Simple_html_dom();
Load a page or link using the line
$html->load_file(‘http://www.google.com’);
and parse or find elements using this line
$html->find(‘table tr td’)->plaintext;
works fine and fits right to what I needed to do.
Filed Under (Others) by admin on 04-01-2010
Visit google today and see an animated logo of a falling apple

http://www.google.com
Newton himself often told the story that he was inspired to formulate his theory of gravitation by watching the fall of an apple from a tree.
Cartoons have gone further to suggest the apple actually hit Newton’s head.
GRAVITY……… and there goes the apple