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
;;; Nameses enables named sessions. | |
;; Nameses is largely based on my-desktop.el by Scott Frazer | |
;; Modification by Jannis Teunissen | |
;; Version 0.02 - 21 Nov 2014 (added extra check) | |
;;; *** Usage *** | |
;; Note: if 'name' is not given, you'll be asked for a name | |
;; | |
;; (nameses-load prefix &optional name) -> without prefix: load session | |
;; (nameses-load prefix &optional name) -> with prefix: save session |
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 draft; | |
public class GenericValue2 { | |
enum Type {INT, DOUBLE}; | |
interface Val { | |
public String str(); | |
public Type type(); | |
} |
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 draft; | |
public class GenericValue { | |
enum Type {INT, DOUBLE}; | |
interface Val { | |
public String str(); | |
public Type type(); | |
Operations ops(); |
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
import argparse | |
class Value(object): | |
def __init__(self, alias, name): | |
super(Value, self).__init__() | |
self.alias = alias | |
self.name = name | |
class Converter(object): | |
def __init__(self, first, second, multiplier): |
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 myhash($str) { | |
$result = 5381; | |
for($i=0; $i<strlen($str); $i++) { | |
$c = (int) $str[$i]; | |
$result = (($result << 5) + $result) + $c; | |
} | |
return $result; | |
} | |
$str = "aabbcc"; | |
echo "Hash for ".$str." = ". myhash($str); |
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
import cv2 | |
import sys | |
import numpy as np | |
lk_params = dict(winSize=(15, 15), maxLevel=5, | |
criteria=(cv2.TERM_CRITERIA_EPS | cv2.TERM_CRITERIA_COUNT, 10, 0.03), | |
) | |
feature_params = dict(maxCorners=1000, | |
qualityLevel=0.01, |
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
class QueryBook(object): | |
def __init__(self, tableName): | |
self.tableName = tableName | |
def add(self, queryName, query): | |
#setattr(self, queryName, query) | |
def execute(*args): | |
self.__execute(query, args) |
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 _make_function(args, body) { | |
return new Function(args, body); | |
} | |
// helpers | |
var $ = _make_function("id" ,"return document.getElementById(id)") | |
var _isarray = _make_function("obj","return obj instanceof Array;") | |
var _error = _make_function("txt", "throw new Error(txt)") | |
var _is_undefined = _make_function("obj","return obj == undefined") | |
function _add_repr_to_object (o, r) { |