You know, like the United Nations logo.
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
public class Application implements EntryPoint { | |
... | |
public void onModuleLoad() { | |
... | |
final MapWidget map = new MapWidget("mapMain", "app") { | |
@Override | |
protected void initializationCallback(GetMapConfigurationResponse r) { | |
super.initializationCallback(r); | |
Map<String, MapAddon> mapAddons = getMapAddons(); | |
for (MapAddon addon : mapAddons.values()) { |
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
// http://stackoverflow.com/a/4320620 | |
// merge object properties | |
// earlier objects override later objects | |
function merge () { | |
var o = {} | |
for (var i = arguments.length - 1; i >= 0; i --) { | |
var s = arguments[i] | |
for (var k in s) o[k] = s[k] | |
} | |
return o |
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
/** | |
* Download a resource from a URL and save as a file in the current directory. | |
* (no overwrite, no timestamp checking, assumes URL has a sensible filename-like path) | |
*/ | |
File grabRemoteUrlAsLocalFile(String remote) throws MalformedURLException, IOException { | |
URL remoteUrl = new URL(remote); | |
String localName = url2filename(remoteUrl); | |
File localFile = new File(localName); | |
Path localPath = localFile.toPath(); | |
if (!localFile.exists()) { |
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
XMLReader tagSoupReader = new org.ccil.cowan.tagsoup.Parser(); | |
Transformer identityTransformer = TransformerFactory.newInstance().newTransformer(); | |
Reader sourceReader = new FileReader(sourceFile); | |
InputSource sourceInputSource = new InputSource(sourceReader); | |
Source xmlSource = new SAXSource(tagSoupReader, sourceInputSource); | |
Result outputTarget = new StreamResult(outputFile); | |
identityTransformer.transform(xmlSource, outputTarget); |
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
/** | |
* get MD5 digest for input string | |
* TODO: pad with leading zeros | |
*/ | |
String md5(String data) { | |
return ( | |
new java.math.BigInteger( | |
1, | |
java.security.MessageDigest.getInstance( | |
"MD5" |
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
{"name":"all","children":[{"type":"dataset","name":"MYD17A2","children":[{"type":"granule","name":"sc:MYD17A2.005:2056598170","size":3626540.0,"jpegs":2},{"type":"granule","name":"sc:MYD17A2.005:2056598724","size":2723373.0,"jpegs":2},{"type":"granule","name":"sc:MYD17A2.005:2056593309","size":999282.44,"jpegs":2},{"type":"granule","name":"sc:MYD17A2.005:2056593316","size":4275257.0,"jpegs":2},{"type":"granule","name":"sc:MYD17A2.005:2056598092","size":146175.69,"jpegs":2},{"type":"granule","name":"sc:MYD17A2.005:2056725553","size":4129298.5,"jpegs":2},{"type":"granule","name":"sc:MYD17A2.005:2056725068","size":990799.44,"jpegs":2},{"type":"granule","name":"sc:MYD17A2.005:2056725162","size":146175.69,"jpegs":2},{"type":"granule","name":"sc:MYD17A2.005:2056726498","size":3598176.0,"jpegs":2},{"type":"granule","name":"sc:MYD17A2.005:2056723922","size":2675996.2,"jpegs":2}]},{"type":"dataset","name":"MCD43B4","children":[{"type":"granule","name":"sc:MCD43B4.005:2056424316","size":5511891.0,"jpegs":1},{"type":"gr |
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
(function(w){w = w || window; var i = w.setInterval(function(){},100000); while(i>=0) { w.clearInterval(i--); }})(/*window*/); |
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
drush sqlq 'SHOW TABLES' | tail -n +2 | sed -e 's,^,DROP TABLE ,' -e 's,$,;,' | drush sqlc |
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> | |
<style> | |
.bar { | |
height: 1em; | |
background-color: lightblue; | |
} | |
td { | |
text-align: right; |
OlderNewer