Friday, 24 October 2014

How to get the number of rows in a table - tbodyin jquery?

<table id="myTable" cellpadding="0" cellspacing="0">
  <thead>
    <tr>
      <th>First Name</th>
      <th>Last Name</th>
      <th>Birth Date</th>
    </tr>
  </thead>

  <tbody>
    <tr>
      <td>John</td>
      <td>Smith</td>
      <td>03-11-1980</td>
    </tr>
  </tbody>
</table>

Solution:
$("#myTable tbody tr").length - Its wrong.
$("#myTable > tbody > tr").length; - Its right to get solution.

Thursday, 16 October 2014

How To Get a Multiple Rows From JSON Object and Append to the Table

$("#table-list tr").detach();
    $.get(url+"payroll/payroll-ajax.php","id="+arg+"&param=view_loan",function(data){
    var objJSON = eval("(function(){return " + data + ";})()");
    var i=objJSON.length;
    for (var j=0;j<i;j++) {
        k=j+1;
        var newRow =
        "<tr>"
        +"<td>"+k+"</td>"
        +"<td>"+objJSON[j].deduction_date+"</td>"
        +"<td>&#2352;  "+objJSON[j].deduction_amt+"</td>"
        +"</tr>" ;
        $(newRow).appendTo("#table-list tbody");
    }
    $('#view-loan-table-modal').modal('toggle');
    var objJSON="";
    });

This above code is used to get multiple rows from json object.

If the variable data is contains following values.

data=[{"id":"3","loan_id":"8","deduction_date":"2014-07-16 12:54:14","deduction_amt":"16667"},{"id":"9","loan_id":"8","deduction_date":"2014-08-12 10:25:36","deduction_amt":"16667"},{"id":"10","loan_id":"8","deduction_date":"2014-08-12 02:22:53","deduction_amt":"16667"}]

This is JSON object value.

The out put is:

SVG Image Example

SVG IMAGE Examlpe
SVG Image
<html>
<title>SVG Image</title>
<body>
<h1>Sample SVG Image</h1>
<svg width="100" height="100">
  <circle cx="50" cy="50" r="40" stroke="red" stroke-width="2" fill="green" />
</svg>
</body>
</html>

Tuesday, 14 October 2014

List of Android "Secret" Codes, Tips, and Tricks for HTC Mobiles

HTC CODES

Code Description
*#*#3424#*#* HTC function test Program.
*#*#4636#*#* HTC Info menu
*#*#8255#*#* launching GTalk Service Monitor
##3424# Diagnostic mode.
##3282# for EPST.
##8626337# for VOCODER
##33284# Field trial menu.
##786# Reverse Logistics Support.
##7738# Protocol Revision.
##775# Unknown
##2539# Unknown

List of Android "Secret" Codes, Tips, and Tricks for SAMSUNG Mobiles

SAMSUNG CODES

Code Description
*#*#4636#*#* Display information about Phone, Battery and Usage statistics
*#*#7780#*#* Restting your phone to factory state-Only deletes application data and applications
*2767*3855# It's a complete wiping of your mobile also it reinstalls the phones firmware
*#*#34971539#*#* Shows completes information about the camera
*#*#7594#*#* Changing the power button behavior-Enables direct poweroff once the code enabled
*#*#273283*255*663282*#*#* For a quick backup to all your media files
*#*#197328640#*#* Enabling test mode for service activity
*#*#232339#*#* OR *#*#526#*#* Wireless Lan Tests
*#*#232338#*#* Displays Wi-Fi Mac-address
*#*#1472365#*#* For a quick GPS test
*#*#1575#*#* A Different type GPS test
*#*#0283#*#* Packet Loopback test
*#*#0*#*#* LCD display test
*#*#0673#*#* OR *#*#0289#*#* Audio test
*#*#0842#*#* Vibration and Backlight test
*#*#2663#*#* Displays touch-screen version
*#*#2664#*#* Touch-Screen test
*#*#0588#*#* Proximity sensor test
*#*#3264#*#* Ram version
*#*#232331#*#* Bluetooth test
*#*#7262626#*#* Field test
*#*#232337#*# Displays bluetooth device address
*#*#8255#*#* For Google Talk service monitoring
*#*#4986*2650468#*#* PDA, Phone, Hardware, RF Call Date firmware info
*#*#1234#*#* PDA and Phone firmware info
*#*#1111#*#* FTA Software version
*#*#2222#*#* FTA Hardware verion
*#*#44336#*#* Displays Build time and change list number
*#06# Displsys IMEI number
*#*#8351#*#* Enables voice dialing logging mode
*#*#8350#*#* Disables voice dialing logging mode
##778 (+call) Brings up Epst menu

How to check value & its variable type in php?

$i=10; $j="10"; if($i===$j){ ..... } Here we have to check value & its variable type in php

Feet/Inches to Meters Converter & Lbs to Kgs Converter

 <!DOCTYPE html> <html lang="en"> <head>   <meta charset="UTF-8" />   <title>Feet/Inches ⇄...