##mailinglists
##list of speakers
import sys | |
import json | |
myfile = sys.stdin | |
if myfile: | |
content = myfile.readlines() | |
for line in content: | |
try: | |
json.loads(line) | |
except Exception as e: | |
print "Invalid JSON" |
##mailinglists
##list of speakers
var checkPrime = function(n) { | |
"use strict"; | |
if (n === 1) { | |
return false; | |
} | |
var isPrime = true; | |
for (let i = 2; i < n;) { | |
if (n % i === 0) { | |
isPrime = false; | |
} |
I have two accounts on github, one is personal account and other is office account. I typically face this problem to manage pushing to different repos using these different accounts.
I found a great way of doing it without any hassle.
Suppose my personal id is [email protected] and office account is [email protected]
Follow the steps mentioned here to generate ssh keys : https://help.github.com/articles/generating-ssh-keys/
Apart from the official and the best android resource (http://developer.android.com/develop/index.html), here are few links to help one get started with android.
var a = "{{{}}}}"; | |
var ts = []; | |
var mismatch = false; | |
for (var i = 0; i < a.length; ++i) { | |
if (a[i] === '{') { | |
ts.push('{'); | |
} | |
if (a[i] === '}') { | |
if (ts.length == 0) { | |
mismatch = true; |
class Node{ | |
int val; | |
Node left; | |
Node right; | |
} | |
class Tree{ | |
Node root; | |
} |
var Node = function (val) { | |
this.val = val || null; | |
this.next = null; | |
}; | |
var SinglyLinkedList = function () { | |
this.head = null; | |
this.tail = null; | |
}; |
var BinaryTree = function (val) { | |
'use strict'; | |
this.val = val || null; | |
this.left = null; | |
this.right = null; | |
}; | |
BinaryTree.prototype.create = function (num) { | |
'use strict'; | |
var i; | |
for (i = 0; i <= num; i = i + 1) { |