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
<!doctype html> | |
<!-- test --> | |
<html> | |
<head> | |
<title>Deferred pipes</title> | |
<style type="text/css"> | |
div { | |
display: none; | |
position: absolute; | |
top: 50px; |
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
$("#filter").live("keyup", function (ev) { | |
var $filter = $(this), | |
keyCode = ev.keyCode || ev.which, | |
search; | |
if (keyCode === 27) { //ESC | |
$filter.val(""); | |
} | |
search = $(this).val(); |
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 cache_method(name): | |
def dict_cache_wrapper(fn): | |
cache = {} | |
def wrapper(*args): | |
if args not in cache: | |
cache[args] = fn(*args) | |
return cache[args] |