This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.PreparedStatement; | |
import java.sql.ResultSet; | |
import java.sql.SQLException; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Properties; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static ByteArrayOutputStream ResultSetToXML(ResultSet rs) | |
throws ParserConfigurationException, SQLException, | |
XMLStreamException { | |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
XMLStreamWriter writer = XMLOutputFactory.newInstance() | |
.createXMLStreamWriter(baos); | |
writer.writeStartDocument(); | |
writer.writeStartElement("Results"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Dog{ | |
String name | |
Dog(String name){ | |
this.name = name; | |
} | |
String getName(){ return this.name;} | |
} | |
Dog aDog = new Dog("Max"); | |
foo(aDog); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import javax.xml.bind.annotation.*; | |
import javax.xml.bind.*; | |
import java.io.*; | |
/** | |
* For mapping Detail XML to objects | |
*/ | |
@XmlRootElement(name="Detail1") | |
class Detail{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
import java.awt.event.*; | |
import javax.swing.*; | |
import java.awt.geom.*; | |
public class ShapedWindow implements ActionListener{ | |
ShapedPane pane = new ShapedPane(); | |
final static int INTERVAL = 1000; | |
String[] tokens; | |
int counter = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var xhr = new XMLHttpRequest(); | |
xhr.onreadystatechange = function() { | |
if (xhr.readyState == 4) { | |
console.log(xhr.responseText); | |
} | |
} | |
xhr.open('GET', 'http://www.html5rocks.com/en/tutorials/file/xhr2/', true); | |
xhr.send(null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mainApp = angular.module("mainApp", []); | |
//Tag name is mentioned at three places. | |
//1. Directive declaration | |
//2. Template | |
//3. Scope | |
//it does not take camel cased or works with special characters like - or _ | |
var directive = function() { | |
var directive = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!-- saved from url=(0051)https://mathiasbynens.github.io/jquery-placeholder/ --> | |
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<input type="text" name="name" placeholder="Enter Name" autofocus="autofocus" /> | |
<script src="./HTML5 placeholder jQuery Plugin_files/jquery.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<input type="text" name="name" placeholder="Enter Name" autofocus="autofocus" /> | |
<span></span> | |
<script src="./HTML5 placeholder jQuery Plugin_files/jquery.min.js"> | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
<style> | |
.holder{ | |
color:grey; | |
margin-left: 2px; | |
margin-top:2px; | |
position:absolute; | |
} |