Posts

Showing posts with the label code

Installing PERL in Windows / Beginner For Perl

Image
For installing the Perl you need to download Perl from their website which is about 69 MB. Step I: Download Perl from perl.org Step II : Now create a program with extension in .pl with the help of notepad.An example code is given below #!/usr/local/bin/perl      print "Hello Perl \n"; Step III: Now from start menu search for Perl command line and open it.Then get to the location where the program file exist. Now:                                                           perl filename.pl                                                There.. u get the output in Perl.....

Pagination In Website Using Arrays / Php / Javascript Example Code

Hi, Pagination in a database based website is very much important in order to include all the entries in the web page.the following give a way to include pagination in your web page through Arrays $result = mysql_query(“select * from tablename where conditions (optional)”); if(mysql_num_rows($result)>0) {$i=0 ; while($row=mysql_fetch_array(result)) { $array[$i][0]=$row["fieldname1"]; //fieldname reprsents the arrtibute name in the table $array[$i][1]=$row["fieldname2"]; $array[$i][2]=$row["fieldname3"]; $array[$i][3]=$row["fieldname4"]; $array[$i][4]=$row["fieldname5"]; //place as much information to be displayed in the array here ‘a’ $i++; } } $total_pages = mysql_num_rows($result); echo “Total “.$total_pages.” results found”; $targetpage = “your current page?parametes that you are sending from previous page”; /* Place code to connect to your DB here. */ //include(‘dbconnect.php’); // include your code t...

Tips and Tricks To Improve the Performance Of Your Android Program

Image
As per illustrated in the previous article ,you may have learned to make an android programs. Now I will tell you to improve your Android codes performance. Just follow the 9 points below 1.Make your own quit option In your application make a exit in the menu itself and don’t make the user not to quit it by using the back button. 2.Cashe clearing Make option to clear the cache. It will increase the performance and reputation of your application 3.Install in sd card Make default arrangement to make the software to be installed in the sd card rather than the internal memory. 4.Simple Interface Make simple interface so that user don’t get confused which will end in killing the program. 5.Improve the user interface You must concentrate in improving your user interface. It will attract thee user much to the appln 6.Speed up ur appln or die User always need to speed up ur appln other wise he will kill it 7.Update You can provide regular update to add more option 8.client based updates In ...

How to access GPS location in Android phones program code

Image
Following is a code for accessing the gps location in an Android phone by coding.Import necessary package to run it out. package andgps.g;// ur package name import com.ieffects.android.lbs.R; import android.app.Activity; import android.content.Context; import android.location.Location; import android.location.LocationListener; import android.location.LocationManager; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; import android.widget.Toast; public class gps extends Activity { private static final long MINIMUM_DISTANCE_CHANGE_FOR_UPDATES = 1; // in Meters private static final long MINIMUM_TIME_BETWEEN_UPDATES = 1000; // in Milliseconds protected LocationManager locationManager; protected Button retrieveLocationButton; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); retrieveLocationButton =...