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
/* | |
Any copyright to this file is released to the Public Domain. | |
http://creativecommons.org/publicdomain/zero/1.0/ | |
If you like this, you should donate | |
to Peter O. at: | |
http://peteroupc.github.io/ | |
*/ | |
public static String polygonWkt(double[] latlon){ | |
if(latlon.length%2 != 0) |
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
/* | |
Any copyright to this file is released to the Public Domain. | |
http://creativecommons.org/publicdomain/zero/1.0/ | |
If you like this, you should donate | |
to Peter O. (original author of | |
the Public Domain HTML 3D Library) at: | |
http://peteroupc.github.io/ | |
*/ | |
(function(global) { | |
"use strict"; |
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 TokenSymbolParser | |
def initialize(token,prod) | |
@token=token | |
@prod=prod | |
end | |
def parse(str) | |
return _parseOne(@token,str,0,str.length) | |
end | |
private | |
def _parseOne(token,str,index,endIndex) |
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
#!/usr/bin/ruby | |
def modPow(x,pow,mod) | |
r = 1; | |
v = x; | |
while (pow != 0) | |
if ((pow & 1) != 0) | |
r = (r*v)%mod; | |
end | |
pow >>= 1; | |
if (pow != 0) |
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
require 'csv' | |
class CSVBuilder | |
# Initializes the CSV builder. | |
def initialize | |
@keys=[] | |
@items=[] | |
end | |
# Ignores certain keys previously | |
# added when writing the CSV. |
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
/* | |
Written by Peter O. | |
Any copyright to this work is released to the Public Domain. | |
In case this is not possible, this work is also | |
licensed under Creative Commons Zero (CC0): | |
https://creativecommons.org/publicdomain/zero/1.0/ | |
*/ |
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
#!/usr/bin/ruby | |
# Written by Peter O. | |
# Any copyright to this work is released to the Public Domain. | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
# | |
# If you like this, you should donate to Peter O. | |
# at: http://peteroupc.github.io/ | |
# | |
# Usage: |
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
# Written by Peter O. in 2014. | |
# Any copyright is dedicated to the Public Domain. | |
# http://creativecommons.org/publicdomain/zero/1.0/ | |
# | |
# If you like this, you should donate to Peter O. | |
# at: http://upokecenter.com/d/ | |
require 'json' | |
module JCBOR |
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
/* | |
Written by Peter O. in 2014. | |
Any copyright is dedicated to the Public Domain. | |
http://creativecommons.org/publicdomain/zero/1.0/ | |
If you like this, you should donate to Peter O. | |
at: http://upokecenter.com/d/ | |
*/ | |
var CodeUnitAppender = function() { | |
this.surrogate = -1; | |
this.lastByte = -1; |
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
#!/usr/bin/ruby | |
=begin | |
Written by Peter O. | |
Any copyright to this work is released to the Public Domain. | |
In case this is not possible, this work is also | |
licensed under Creative Commons Zero (CC0): | |
https://creativecommons.org/publicdomain/zero/1.0/ |
NewerOlder