Code Is Poetry

Life is Binary


html table extending php array object

The code will be as follows:class mahfooz extends ArrayObject{      public function createhtmlTable($array){      $arrayObj = parent::__construct($array);        echo "<table border=1 cellpadding='10'>";    /*** iterate over the array ***/    for($iterator = $this->getIterator();         /*** check if valid...

Read more

How can I block a program from accessing the Internet

Basically you do this to prevent a program from connecting to the Internet: From start menu, search for "Firewall" and select Windows Firewall with Advanced Security Choose Outbound Rules from the tree at the left. Choose New Rule... from the menu at the right. New Outbound Rule Wizard opens. This is really easy now: a. Select Program as rule type. b. Select the program's EXE file. c. Choose Block the connection. Choose the...

Read more

cakephp bake setup and migration command for windows7

migration guide slideshare link   cake bake setup for cake bake set the following path in environment variable EDIT by putting semicolon first In the System Variables box, find the “Path” variable and click “Edit…” ;d:\wamp\bin\php\php5.5.12;d:\wamp\www\emailmarketing\app\Console;   cmd cd d:\wamp\www\emailmarketing\app;run cake upgrade all     cake bake...

Read more

jquery ui datepicker - only select specific days

For example you need to make visible only Tuesday(2) and Wednesday(3), then it can be done by putting following code as datepicker options. It is to be noted that, datepicker's dateoffset starts with 0 and ends with 6 mapping Sunday to Friday respectively. beforeShowDay: function(date){   var day = date.getDay();   return [day == 2 || day == 3,""];}

Read more