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
SetTitleMatchMode, Regex | |
#IfWinActive, (- Google Chrome)$ | |
^+w:: | |
;do nothing | |
return | |
#IfWinActive |
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
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): |
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
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(); |
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
package test; | |
import static junit.framework.Assert.assertEquals; | |
import java.util.Stack; | |
import org.junit.Test; | |
import system.RBTree; | |
import system.RBTree.RBNode; |
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
def p(x, bound1, bound2): | |
return min(max(x, bound1), bound2) | |
if __name__ == '__main__': | |
print(p(5, 2, 7)) | |
sys.exit() | |