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
(defun to-webm (lat lng) | |
(let ((origin-shift (/ (* 2.0 pi (/ 6378137.0 2.0)) 180.0))) | |
(list | |
(* origin-shift lng) | |
(* origin-shift | |
(/ (log (tan (* | |
(+ 90.0 lat) | |
(/ pi 360.0)))) | |
(/ pi 180.0)))))) |
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
# apt-get install apt-get install libblas-dev liblapack-dev gfortran | |
# pip install numpy | |
# pip install scipy pil | |
from math import exp, sqrt | |
from scipy import array, zeros | |
from scipy.signal import fftconvolve | |
from scipy.misc import imsave | |
from random import randint |
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
typedef struct { | |
uint8_t xoffset; | |
uint8_t yoffset; | |
uint8_t style; | |
} AZPoint; | |
typedef enum { | |
AZPointParserBadLength = 1, | |
AZPointParserBadMagicNumber = 2, |
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
def getqattr(obj, name): | |
''' get value of an object, safely ''' | |
try: | |
if hasattr(name,'__call__'): | |
return name(obj) | |
else: | |
value = getattr(obj, name) | |
if hasattr(value, '__call__'): # function generated value | |
if name.find('link') != -1: # link tuple triplet | |
return _linkify(value()) |
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
;; Use a better buffer switcher | |
(global-set-key (kbd "C-x C-b") 'ibuffer) | |
(global-set-key (kbd "C-c C-l e") 'erc-buffers) | |
(global-set-key (kbd "C-c C-l t") 'term-buffers) | |
(defun erc-buffers () | |
(interactive) | |
(list-buffers-with-mode 'erc-mode)) |
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 for test s0002/d1e6546_1/d1e6418_1/d1e1830_1 | |
Test csw:csw-2.0.2-GetRecordById-tc1.2 (s0002/d1e6546_1/d1e6418_1/d1e1830_1) | |
Assertion: | |
The response to a GetRecordById request without the ElementSetName parameter | |
must produce a response containing a summary view of all matching records. | |
Request d1e1992_1: |
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
Test csw:csw-2.0.2-GetRecordById-tc1.2 (s0003/d1e6546_1/d1e6418_1/d1e1830_1) | |
Assertion: | |
The response to a GetRecordById request without the ElementSetName parameter | |
must produce a response containing a summary view of all matching records. | |
Request d1e1992_1: | |
Method: POST | |
URL: http://76.124.185.24:9810/pycsw/csw.py |
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
CMUser* user = [[CMUser alloc] initWithUsername:@"jim" password:@"pw"]; | |
Recipe* r = [[Recipe alloc] initWithUser:... name:.....]; | |
Review* rv = [[Review alloc] initWithUser:user recipe:r stars:5]; | |
CMFuture* future = [user saveFuture]; | |
CMFuture* future2 = [future andThen:^{ return [r saveFuture]; }]; | |
CMFuture* future3 = [future andThen:^{ return [rv saveFuture]; }]; | |
// or: future3 = | |
// [CMFuture doSeq:^{ return [user saveFuture]; }, |
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
public boolean removeNode(Node aNode) { | |
Node prevNode = this; | |
Node curNode = this.next; | |
do { | |
if (curNode == aNode) { | |
prevNode.next = curNode.next; | |
return true; | |
} |