Simple code

This is just a basic code to use datatables.

Important components in the code:

  1. include of js, css on top
  2. declaring ‘thead’ tag
  3. declaring ‘id’ of the table to be same as called in js at the bottom
  4. include js script at the bottom

or can refer here for code


<link rel="stylesheet" type="text/css" href="">
<script src=""></script>
<script src=""></script>
<h1>A List</h1>
<table id="myTable" class="display" cellspacing="0" border="1">
    $counter = 0;
    foreach ($branch_list as $row) {
        <td><?php echo $row->orgname; ?></td>
        <td><?php echo $row->sessionname; ?></td>
        <td><?php echo $row->total_student; ?></td>
    <?php } ?>
$(document).ready(function() {
} );

Printer is offline issue

Normally happen on Windows 8

Some solutions

  1. disable the SNMP in printer properties > ports > configure port. Untick “SNMP Status Enable”
  2. install windows 8 hotfix
  3. editing the registry at HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print and adding a new DWORD called SNMPLegacy with the value 1 and restarting


How to shop for a smart phone

This is what I normally do.

  1. Find exact model that match your criteria. Use criteria search available in GSM Arena
    For example you want a 13MP camera,¬†5″ screen size, 2GB RAM, 16GB Internal storage etc.
  2. Then look for price of the phone in or in
  3. When you are shopping outside in the mall, at least you know what’s the price range for the model that you are looking for.

How to solve disk usage 100%

You need to increase the virtual memory.

Set the setting as below

  • initial size – set equal to RAM size
  • maximum size – set double the RAM size

To do this, follow the following steps:
1. Go to Control Panel> All control panel items > System
2. Click on Advanced system settings
3. Under performance, click on settings
4. Go to Advanced tab
5. Under Virtual memory, click on Change
6. UN-check “Automatically manage paging file size for all drives” check box
7. Select your windows drive (where OS is installed)
8. Click on Custom size radio button
9. Set Initial size equivalent to your RAM size in MB
10. Set Maximum size to twice of your RAM size in MB
11. Click on Set
12. Click on OK thrice
13. Restart your system

This should resolve this issue,