Archive for the ‘Web Dev’ Category

PHP – Currency Conversion

I can’t remember when I wrote this but I found this little snippet in my library and didn’t want it to go to waste. It’s very simple and just uses Yahoo! Finance to get the quote. To use the Class simply use the below code: 1 2 $currency = new Currency(); print_r($currency->convert(’USD’, ‘JPY’, 100)); It [...]

PHP – Binary Bayesian Filter

This is a simple Binary Bayesian Filter. The reason for the Interfaces and Abstract classes is because I am still mid-ways through my Java to PHP port Also notice that this model calculates P(A|B) by assigning probability values rather than frequency counts. P(A|B) = P(A & B) / P(B) Sample Usage 1 2 3 4 [...]

PHP Timer Class

A small timer class I wrote: Timer.php 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 [...]

jTicTacToe – Display a Tic Tac Toe Game State/Animation (jGames)

jTicTacToe is one module within the jGames suite used to display Tic Tac Toe game states, as well as animations. jGames can be downloaded from the jGames home page. Display Static Tic Tac Toe State First include the following lines to your webpage 1 2 <script type="text/javascript" src="js/jgames/jquery.jgames.js"></script> <link href="js/jgames/css/style.css" rel="stylesheet" type="text/css" /> Create an [...]

jOthello – Display a Othello Game State/Animation (jGames)

jOthello is one module within the jGames suite used to display Othello game states, as well as animations. jGames can be downloaded from the jGames home page. Display Static Othello State First include the following lines to your webpage 1 2 <script type="text/javascript" src="js/jgames/jquery.jgames.js"></script> <link href="js/jgames/css/style.css" rel="stylesheet" type="text/css" /> Create an empty div tag and [...]

Powered by WordPress | Designed by: WordPress Themes | Thanks to best wordpress themes, Find WordPress Themes and Themes Directory