This file contains hidden or 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
<script> | |
function supports_canvas() | |
{ | |
return !!document.createElement('canvas').getContext; | |
} | |
function supportsToDataURL() | |
{ | |
if(!supports_canvas()) | |
{ |
This file contains hidden or 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
<script> | |
function supports_canvas() | |
{ | |
return !!document.createElement('canvas').getContext; | |
} | |
function supportsToDataURL() | |
{ | |
if(!supports_canvas()) | |
{ |
This file contains hidden or 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
<html> | |
<head> | |
<script type="text/javascript" charset="utf-8" src="file:///android_asset/www/cordova-2.1.0.js"></script> | |
</head> | |
<script> | |
function takePicture() { | |
alert('step1'); | |
navigator.camera.getPicture( function (imageData) {alert('success');}, function (message) { alert('message'); }, [ ] ); | |
} | |
</script> |
This file contains hidden or 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 urllib, urllib2 | |
import json | |
import base64 | |
import time | |
import itertools | |
import string | |
def coroutine(func): | |
def start(*args,**kwargs): | |
cr = func(*args,**kwargs) |
This file contains hidden or 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 urllib, urllib2 | |
import json | |
import base64 | |
import time | |
def coroutine(func): | |
def start(*args,**kwargs): | |
cr = func(*args,**kwargs) | |
cr.next() | |
return cr |
This file contains hidden or 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 urllib, urllib2 | |
import json | |
import base64 | |
import time | |
class config: | |
TWITTER = { | |
'user': 'dv_test_1', | |
'password': 'mrybRJnp'} |
This file contains hidden or 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
data Trunk m x = Tip | Bin (m x) (m x) | |
instance (Monad m) => Functor (Trunk m) where | |
fmap f (Bin x y) = Bin (x >>= return . f) (y >>= return . f) | |
fmap _ Tip = Tip |
This file contains hidden or 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
data Trunk m x = Tip | Bin (m x) (m x) | |
instance (Monad m) => Functor (Trunk m) where | |
fmap f (Bin x y) = Bin (x >>= return . f) (y >>= return . f) | |
fmap _ Tip = Tip |
This file contains hidden or 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 Control.Monad | |
-- HashGraph | |
class HashGraph digest value m where | |
hash :: value -> m digest | |
unhash :: digest -> m value | |
instance (Monad m) => HashGraph a a m where | |
hash = return |
This file contains hidden or 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
log_format privacy_preserving | |
'$time_local ' | |
'$status $bytes_sent ' | |
'"$request_method [...]"'; | |
server { | |
server_name tahoe_readonly.asus.ln.soc1024.com; | |
listen 9567; |