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
<?xml version="1.0" encoding="UTF-8"?> | |
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" | |
jcr:primaryType="cq:ClientLibraryFolder" | |
categories="rte.coralui2"/> |
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
function swapUsingThirdVariable(a, b) { | |
var c = a; | |
a = b; | |
b = c; | |
} | |
function swapNumbersWithoutThirdVariable(a, b) { | |
a = a + b; | |
b = a - b; | |
a = a - b; |
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 start = new Date(); | |
var fs = require('fs'); | |
var arr = []; | |
// Large Loop | |
for (var i = 0; i < 10000000; ++i) { | |
arr.push({x : i}); | |
} | |
fs.writeFile('largefile.txt', JSON.stringify(arr), function(err){ |
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
Set<HostAndPort> jedisClusterNodes = new HashSet<HostAndPort>(); | |
//Jedis Cluster will attempt to discover cluster nodes automatically | |
jedisClusterNodes.add(new HostAndPort("127.0.0.1", 7379)); | |
JedisCluster jc = new JedisCluster(jedisClusterNodes); | |
jc.set("foo", "bar"); | |
String value = jc.get("foo"); |