Skip to content

Instantly share code, notes, and snippets.

View slallum's full-sized avatar
🍮

Ofer (pitz) Horowitz slallum

🍮
View GitHub Profile
SetTitleMatchMode, Regex
#IfWinActive, (- Google Chrome)$
^+w::
;do nothing
return
#IfWinActive
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> def func(l):
return sum(l)
>>> func([1,2,3,4])
10
>>> a = [1,2,3,4]
>>> a + 5
Traceback (most recent call last):
public static String order(RBNode node, String type) {
String right = (node.getRight() != null) ? "," + order(node.getRight(), type)
.toString() : "";
String left = (node.getLeft() != null) ? order(node.getLeft(), type)
.toString() + "," : "";
switch (type) {
case "pre":
return node.getKey() + left + right;
case "post":
return left + right + node.getKey();
package test;
import static junit.framework.Assert.assertEquals;
import java.util.Stack;
import org.junit.Test;
import system.RBTree;
import system.RBTree.RBNode;
def p(x, bound1, bound2):
return min(max(x, bound1), bound2)
if __name__ == '__main__':
print(p(5, 2, 7))
sys.exit()