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 org.joda.time.LocalDate; | |
import org.joda.time.Years; | |
public class DateTest { | |
public static void main(String[] args) { | |
LocalDate start = LocalDate.parse("2012-01-28"); // leap year | |
LocalDate end = LocalDate.parse("2013-01-27"); | |
LocalDate end2 = LocalDate.parse("2013-01-28"); | |
System.out.println(end.isBefore(start.plus(Years.ONE))); // true | |
System.out.println(end2.isBefore(start.plus(Years.ONE))); // false |
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 RTCPeerConnection = window.mozRTCPeerConnection || window.webkitRTCPeerConnection || window.RTCPeerConnection; | |
var RTCSessionDescription = window.mozRTCSessionDescription || window.webkitRTCSessionDescription || window.RTCSessionDescription; | |
var RTCIceCandidate = window.mozRTCIceCandidate || window.webkitRTCIceCandidate || window.RTCIceCandidate; | |
var RTC_CONFIGURATION = {"iceServers": [{"url": "stun:stun.l.google.com:19302"}]}; | |
var MEDIA_CONSTRAINTS = {optional: [{internalSctpDataChannels: true},{DtlsSrtpKeyAgreement: true}]}; | |
function errorCallback(error) { | |
console.log(error); | |
} |
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 find(object, search, cache, path) { | |
if (!cache) | |
cache = []; | |
if (!path) | |
path = ''; | |
if (cache.indexOf(object) >= 0) | |
return; | |
cache.push(object); | |
for (var key in object) { |
NewerOlder