Skip to main content

Posts

Showing posts with the label codes

Thanks to MS Windows Live Writer

The most important tools I’m using to develop content in my blogs is the article editor. The MS Windows Live Writer provides the most user friendly and easy of all the blog composer. And it’s FREE… More information and download here at http://windows.microsoft.com/en-US/windows-live/essentials-other-programs And the my favourite (coder blog) plug-ins is the Code Snippets ( http://plugins.live.com/writer/detail/code-snippet-plugin-for-windows-live-writer ). Below is Code Snippets in action. With lots of color coding schemes for programming languages. 1: //code sample 2: package com.kerul.kamusmm; 3: 4: import android.app.TabActivity; 5: import android.content.Intent; 6: import android.database.Cursor; 7: import android.database.sqlite.SQLiteDatabase; 8: import android.graphics.Typeface; 9: import android.graphics.drawable.Drawable; 10: import android.os.Bundle; 11: import android.widget.TabHost; 12: import android.widget.TabH...

Listing in tables for database BOOKSHOP, table BOOKS

EXERCISE 1: Simple Listing Develop a web-based application (using PHP script) to list all the contents of the table Books.

Using Fling Motion Gesture in Android

  The layout . I’m using the ViewFlipper to demonstrate this simple fling application. So, what is Fling… It’s also known as the swiping action on your mobile device screen. In this demo, I prepared an Activity with ViewFlipper layout that has 3 screens. Green, Blue and Yellow. <? xml version="1.0" encoding="utf-8" ?> < LinearLayout xmlns : android = "http://schemas.android.com/apk/res/android" android : orientation = "vertical" android : layout_width = "fill_parent" android : layout_height = "fill_parent" > < TableLayout android : id = "@+id/LinearLayout01" android : layout_width = "fill_parent" android : layout_height = "wrap_content" > < TableRow > < TextView android : id = "@+id/btnback" android : text = "Fling left - Back " android : layout...

Developing Login Page with password verification

file 1 - login.php < html > < head > < title > Login Form </ title > </ head > < body > < strong > Login to MYCOMPANYHR system </ strong > < form name = "formlogin" method = "post" action = "verify.php" > < table width = "400" border = "0" > < tr > < td > Employee No </ td > < td >< input name = "EMPNO" type = "text" maxlength = "6" > Eg : 999999 </ td > </ tr > < tr > < td > Password </ td > < td >< input name = "PASSWORD" type = "password" ></ td > </ tr > < tr > < td >& nbsp ;</ td > < td >< input name = "submit" type = "submit" value = "Login" ></ td > </ tr > </ table > </ form > ...

Javascript on-screen keyboard to be embedded in your web page

I searched for an Arabic on-screen keyboard for my latest project, Arabic-Malay online dictionary. I came across this nice multilanguage on-screen keyboard that support major languages in the world. Waaa… A cool keyboard, and it’s licensed under GNU-GPL open source license!!! It’s available here, http://www.greywyvern.com/code/js/keyboard.html It looks cool in my apps…

Listing records to be update (listing-edit.php)

< form name = 'search' method = 'get' action = '' > Insert the firstname < input type = 'text' name = 'txtname' > < input type = 'submit' value = 'search name' > </ form > < ?php //database connect $db = mysqli_connect ( "localhost" , "root" , "" , "mycompanyhr" ); //checking database connection if ( $db == false ) { echo "Connect failed: " . mysqli_connect_error ( $db ); exit (); } else { echo "Connection successful" ; } $n = $_GET [ 'txtname' ]; $sql = "select EMPNO, FIRSTNAME, LASTNAME, WORKDEPT, PHONENO from employee where FIRSTNAME like '%$n%' " ; $rs = mysqli_query ( $db , $sql ); if ( $rs == false ){ echo ( "Query cannot be executed!<br>" ); echo ( "SQL Error : " . mysqli_error ( $db )); } else { echo "<table border=1>...

searchdelete.php (list records of table to delete)

< form name = 'search' method = 'get' action = '' > Insert the firstname < input type = 'text' name = 'txtname' > < input type = 'submit' value = 'search name' > </ form > < ?php //database connect $db = mysqli_connect ( "localhost" , "root" , "" , "mycompanyhr" ); //checking database connection if ( $db == false ) { echo "Connect failed: " . mysqli_connect_error ( $db ); exit (); } else { echo "Connection successful" ; } $n = $_GET [ 'txtname' ]; $sql = "select EMPNO, FIRSTNAME, LASTNAME, WORKDEPT, PHONENO from employee where FIRSTNAME like '%$n%' " ; $rs = mysqli_query ( $db , $sql ); if ( $rs == false ){ echo ( "Query cannot be executed!<br>" ); echo ( "SQL Error : " . mysqli_error ( $db )); } else { echo "<table border=1>...