Sample Code

JSON Viewer DownloadEdit

				
					{
					    "employees": {
					        "employee": [
					            {
					                "id": "1",
					                "firstName": "Tom",
					                "lastName": "Cruise",
					                "photo": "https://pbs.twimg.com/profile_images/735509975649378305/B81JwLT7.jpg"
					            },
					            {
					                "id": "2",
					                "firstName": "Maria",
					                "lastName": "Sharapova",
					                "photo": "https://pbs.twimg.com/profile_images/3424509849/bfa1b9121afc39d1dcdb53cfc423bf12.jpeg"
					            },
					            {
					                "id": "3",
					                "firstName": "James",
					                "lastName": "Bond",
					                "photo": "https://pbs.twimg.com/profile_images/664886718559076352/M00cOLrh.jpg"
					            }
					        ]
					    }
					}
				
		

XML Viewer DownloadEdit

		 		
					<?xml version="1.0" encoding="UTF-8" ?>
					<employees>
			    		<employee>
			        		<id>1</id>
					        <firstName>Amir</firstName>
					        <lasttName>Khan</lasttName>
					        <photo>http://imgdj.s3.amazonaws.com/dhoom-3-fan-made-poster.jpg</photo>
					    </employee>
					    <employee>
					        <id>2</id>
					        <firstName>Anna</firstName>
					        <lasttName>Smith</lasttName>
					        <photo>http://imgdj.s3.amazonaws.com/nN43GfvL.jpg</photo>
					    </employee>
					    <employee>
					        <id>3</id>
					        <firstName>Peter</firstName>
					        <lasttName>Jones</lasttName>
					        <photo>http://imgdj.s3.amazonaws.com/7vVKPFpQ.jpg</photo>
					    </employee>
					</employees>
					
		

HTML ViewerDownloadEdit

				
					<html>
							<head>
								<style>
									body
										{
					        				background-color : #d0e4fe;
					    				}	
									h1
					   					{
					        				color : Orange;
					        				text-align : center;
					   					}	
									p
					   					{
					        				font-family : "Times New Roman";
					        				font-size : 20px;
					   					}	
								</style>
							</head>
					        
							<body>
								<h1>CSS example!</h1>
								<p>This is a paragraph.</p>
							</body>
					</html>
				
		

CSS Sample code DownloadEdit

				
					html {
					     	font-size: 100%;
					    	-webkit-text-size-adjust: 100%;
					    	-ms-text-size-adjust: 100%;
					}
					ul.a {
							list-style-type:circle;
					}
					
					ul.b {
							list-style-type:disc;
					}
					
					ul.c {
							list-style-type:square;
					}
					
					ol.d {
							list-style-type:armenian;
					}
					
					ol.e {
							list-style-type:cjk-ideographic;
					}
					ol.f {
							list-style-type:decimal;
					}
					
					ol.g {
							list-style-type:decimal-leading-zero;
					}
					
					ol.h {
							list-style-type:georgian;
					}
					
					ol.i {
							list-style-type:hebrew;
					}
					
					ol.j {
							list-style-type:hiragana;
					}
					
					ol.k {
							list-style-type:hiragana-iroha;
					}
					
					ol.l {
							list-style-type:katakana;
					}
					ol.m {
							list-style-type:katakana-iroha;
					}
					
					ol.n {
							list-style-type:lower-alpha;
					}
					
					ol.o {
							list-style-type:lower-greek;
					}
					
					ol.p {
							list-style-type:lower-latin;
					}
					
					ol.q {
							list-style-type:lower-roman;
					}
					
					ol.r {
							list-style-type:upper-alpha;
					}
					
					ol.s {
							list-style-type:upper-latin;
					}
					
					ol.t {
							list-style-type:upper-roman;
					}
					
					ol.u {
							list-style-type:none;
					}
					
					ol.v {
							list-style-type:inherit;
					}
				
		

JavaScript Sample code DownloadEdit

				
						for (var line = 1; line < 30; line++) {
							for (var i = 1; i < 29; i++) {
								var s = (Math.floor((Math.random() * 2) % 2)) ? "╱" : "╲";
								document.write(s);
							}
							document.writeln("
"); }

SQL Viewer DownloadEdit

				
						CREATE TABLE STATION (
							  ID INTEGER PRIMARY KEY, 
							  CITY CHAR(20), 
							  STATE CHAR(2), 
							  LAT_N REAL, 
							  LONG_W REAL
							);
							INSERT INTO STATION 
							VALUES 
							  (13, 'Phoenix', 'AZ', 33, 112);
							INSERT INTO STATION 
							VALUES 
							  (44, 'Denver', 'CO', 40, 105);
							INSERT INTO STATION 
							VALUES 
							  (66, 'Caribou', 'ME', 47, 68);
				
		

JAVA Viewer DownloadEdit

				
					import java.io.*;
					class MyFirstProgram {
						/** Print a hello message */
						public static void main(String[] args) {
							BufferedReader in = new BufferedReader(new InputStreamReader(System. in ));
							String name = "Instructor";
							System.out.print("Give your name: ");
							try {
								name = in .readLine();
							} catch (Exception e) {
								System.out.println("Caught an exception!");
							}
							System.out.println("Hello " + name + "!");
						}
					}
				
		

C# Viewer DownloadEdit

				
					using System;
					namespace Example1 {
						class Program {
							public static void value(int num) {
								num++;
							}
							public static void reference(ref int num) {
								num++;
							}
							static void Main(string[] args) {
								int num;
								Console.Write("Enter a number:\t");
								num = Convert.ToInt32(Console.ReadLine());
								Console.WriteLine("\n\n\tValue Type");
								Console.WriteLine("----------------");
								Console.Write("\nPrevious Value:\t{0}", num);
								Program.value(num);
								Console.Write("\nCurrent Value:\t{0}", num);
								Console.WriteLine("\n\n\n----------------");
								Console.WriteLine("\tReference Type");
								Console.WriteLine("--------------------");
								Console.Write("\nPrevious Value:\t{0}", num);
								Program.reference(ref num);
								Console.Write("\nCurrent Value:\t{0}", num);
								Console.ReadLine();
							}
						}
					}
				
		

Title
Description
Tags