Code and Articles. $this->is->keymann()

Flickr View All » Blue sky, reflectedJump!White birdsCo-pilot Jeremy

A simple calculator application

Hello,from this post i promised to write a simple class to ease the burden on my lovely calculator and bring my mechanics issues online,and so i did.I have now completed the class and here it is.

Calculator Library.Place it in your libraries folder:

 .
 *
 * @package   Calculator
 * @copyright 2006-2010 Geoffrey Keymann
 * @license   http://www.gnu.org/licenses/gpl.html
 * @version   $Id: Calculator.php 205 2010-02-07 11:33:55Z undgerman@gmail.com $
 */

class Calculator
{

function add( $num1, $num2)
{
return $num1 + $num2;
}

function subtract( $num1, $num2)
{
return $num1 - $num2;
}

function multiply( $num1, $num2)
{
return $num1 * $num2;
}

function divide( $num1, $num2)
{
return $num1 / $num2;
}
function getSine($value)
{
return sin($value);
}

function getCosine($value)
{
return cos($value);
}

function getTan($value)
{
return tan($value);
}

function getLogarithm($value)
{
return log($value);
}

function getPower($value1, $value2)
{
return pow($value1, $value2);
}

function getSqrt($value)
{
return sqrt($value);
}

function getFmod($value1, $value2)
{
return fmod($value1, $value2);
}
}
?>

Now here is the controller.Place it in your controllers folder.

 .
 *
 * @package   Calculate
 * @copyright 2006-2010 Geoffrey Keymann
 * @license   http://www.gnu.org/licenses/gpl.html
 * @version   $Id: Calculate.php 205 2010-02-07 11:40:21Z undgerman@gmail.com $
 */
class Calculate extends Controller
{
function calc()
{
$this->load->library('Calculator');
$a = 20;
$b = 4;
echo("The two numbers are $a and $b
\n");

$calca = new Calculator();

 $sum = $calca->add($a, $b);
$sine = $calca->getSine($a);

echo ("The sine of $a is equal to $sine
\n");

echo("Their sum is $sum
\n");
}

}
?>

Fireworks mockup

Two weeks  ago i created a webpage mockup in fireworks and i exported it to dreamweaver.However,that is not what i was looking for.I have now realised that,alot of fancy things you slice up in fireworks may end up just being another fancy table with no particular order,so i have turned to blueprint css and i am loving so far.

I however do not know really how to come up with the fancy buttons,forms and other form controls.Right now am looking at some good design tools like mochaUI and i am hoping that all will go well when i begin my very first design in blueprint.


Build a scientific app in codeigniter

I  have began building a scientific app in codeigniter to calculate several things in mechanics.The app will be useful in mathematics for it will assist you do some long boring calculations that even if you went to mars and back,you will still get the same answer no matter how much you beat around the bush in unnecessary carry WHF calculations.

I’ll keep posting.


My Model Town Board in Pygame

I have started to build a model town board software in pygame and i hope it will be ready soon.A model town board is used to instruct driving students on how to drive in an urban setting.I am yet to decide whether to put on github.

I will outline the features later.


Awesome Codeigniter Arsenal – Lists

I have been trying to list almost anything cool that codeigniter offers and i was surprised to find that almost everything,everything really that is helfpful to me is available on the codeigniter forums and else where across the internet.I will list all the resourses that you probably will want to have in your development machine.

  1. Authentication and authorization
  2. Multiple languages handling
  3. Multiple templates handling
  4. Geoip plugin
  5. Data Mapper
  6. Editable grid
  7. Assets manager
  8. Ssl knowhow
  9. Jquery
  10. Modules manager
  11. Charts and other visualization tools
  12. Popular helpers
  13. Popular libraries

Now that we have the basic list of things that will make our stay at codeigniter better,in the next post we will look at how real and free libraries straight from the forums will be instrumental to putting some meat into our lists.We will look from access control in dx_auth to jquery tricks that improve your web application greatly.


My First Template

I have been experimenting with fireworks of late and i can say  i liked its ease of handling things as compared to photoshop.I have managed to come up with a template of sorts but need more work on the menu and forms styling part.

In the next post,i will have completed the forms and the links part,slices and images.Download the png here


2010 is here!

Its 2010,where will i be 10 years from now,will there be a twitter,what about youtube,facebook,wordpress and python,well i will have to wait to see that one,pretty interesting.


2010 – From the Php jungle to Django

If we were to sum up the journey of an ordinary php developer,this may sound familiar or not:

  • Download xampp
  • Get very excited to have built a hello world
  • Probably build some php enabled pages in dreamweaver
  • Discover the world of free scripts and clone versions of popular applications
  • Admire the power of facebook and probably hangout at Boonex.us
  • Download a couple of free social networking web applications
  • Discover the wonderful world of web applications frameworks
  • Start with zend,move to cake,then to codeigniter,probably hangout at Kohana
  • ……then django

Django offers a comprehensive book on building web applications and their is the pinax project to help you build your web applications with a social networking leaning.

At the end of the day,you will realize that django is better.



Why i switched to Python

Well,the year is 2010,and everybody seems to be comfortable coding.There are many languages,among them the might c++ and python.I have tried each one of them and for now,my interests will be best served by python and this is why i made that decision.

  • I needed a comprehensive web applications framework and i did not wan’t to rely so much on php,so there was codeigniter(for php) and django(for python) to choose from.I thought to myself,i can use python both for desktop and web applications,so why continue with php which is best suited for web applications?.
  • Python was easy to learn and i could use it to make games.
  • I just like python.

Get Adobe Flash playerPlugin by wpburn.com wordpress themes