Simple example of Server Send Events By Steren Giannini for Paris JS
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> | |
<script src="http://documentcloud.github.com/underscore/underscore-min.js"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
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> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> | |
<link type="text/css" rel="stylesheet" href="http://code.shutterstock.com/rickshaw/src/css/graph.css"> | |
<script src="http://code.shutterstock.com/rickshaw/vendor/d3.v2.js"></script> | |
<script src="http://code.shutterstock.com/rickshaw/rickshaw.js"></script> | |
<meta charset=utf-8 /> |
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
<p>Code to help you with <a href="http://www.html5rocks.com/en/tutorials/canvas/imagefilters/">this tutorial</a>.</p> | |
<p>To manipulate image pixels, run Chrome with "web security" disabled. On a mac, terminate your existing Chrome, then type in a terminal: <code>$ open -a Google\ Chrome --args --disable-web-security</code></p> | |
<figure> | |
<img id="orig" src="http://www.html5rocks.com/en/tutorials/canvas/imagefilters/demo_small.png" width="600" height="337"> | |
<figcaption>The original test image</figcaption> | |
</figure> | |
<h2>Processing pixels</h2> |
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
// if API level > 13, we can use this: | |
// Point outSize = new Point(); | |
// display.getSize(outSize); | |
DisplayMetrics displaymetrics = new DisplayMetrics(); | |
getWindowManager().getDefaultDisplay().getMetrics(displaymetrics); | |
int ht = displaymetrics.heightPixels; | |
int wt = displaymetrics.widthPixels; | |
// Determine screen size |
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
@-moz-document domain("voyages-sncf.com") { | |
/* Delete */ | |
/* main */ | |
#l_foot, | |
#actu, | |
#eco-searchform, | |
#promos, | |
#block-links, |
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
git fetch upstream && git diff remotes/upstream/master master > changes.diff |
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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script> | |
<script url="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.js" ></script> | |
<script src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script> | |
<script type="text/javascript"> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
package helpers; | |
public class RenderSitemap extends RenderSitemapXml { | |
public RenderSitemap(List<User> users) { | |
super(getDocument(users)); | |
} | |
private static Document getDocument(List<User> users) { | |
Document doc = createSiteMapDocument(); |