This file contains hidden or 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> | |
<head> | |
<title>Rendering test</title> | |
</head> | |
<body> | |
<div id="js-toolbar"> | |
<a class="js-action-edit" href="javascript:void(0)">Edit</a> | |
<a class="js-action-delete" href="javascript:void(0)">Delete</a> |
This file contains hidden or 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 addScript = function (url) { | |
var script = document.createElement("SCRIPT"); | |
var parentNode = document.getElementsByTagName("HEAD")[0]; | |
script.async = true; | |
script.type = "text/javascript"; | |
script.src = url; | |
script.addEventListener("load", function () { | |
parentNode.removeChild(script); | |
}); | |
parentNode.appendChild(script); |
This file contains hidden or 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 logger = function (level) { | |
return function (message) { | |
console.log(level + " " + message); | |
}; | |
}; | |
var info = logger("INFO"); | |
var debug = logger("DEBUG"); | |
info("Information event"); | |
debug("Debugging event"); |
This file contains hidden or 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> | |
<head> | |
<title>DOM Event Bubbling Test</title> | |
</head> | |
<body> | |
<div id="toolbar"> | |
<a id="edit" href="#">Edit</a> | |
<a id="delete" href="#">Delete</a> |
This file contains hidden or 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> | |
<head> | |
<title>DOM Binding Test</title> | |
</head> | |
<body> | |
<button id="action">Submit!</button> | |
<script type="text/javascript"> |
This file contains hidden or 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 MAX = 5; | |
var INTERVAL = 250; | |
var EXPECTED_TIME = INTERVAL * MAX; | |
var intervalId; | |
var index = 0; | |
var totalTime = 0; | |
var lastTime = Date.now(); | |
var longOperation = function () { | |
totalTime += Date.now() - lastTime; |
This file contains hidden or 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
#!/usr/bin/node | |
var fs = require("fs"); | |
var api = require('etherpad-lite-client'); | |
var eth = api.connect({ | |
apikey: 'your-api-key', | |
host: 'localhost', | |
port: 9001 | |
}); | |
var contentType = process.argv[2]; |
This file contains hidden or 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.Arrays; | |
import java.util.List; | |
import javax.transaction.Synchronization; | |
import org.apache.commons.lang.Validate; | |
import org.hibernate.FlushMode; | |
import org.hibernate.HibernateException; | |
import org.hibernate.Session; | |
import org.hibernate.context.internal.ManagedSessionContext; |
NewerOlder