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 in 2013 by Peter O. | |
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/ | |
*/ | |
public static string GuidToDecimalString(Guid guid) { |
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
# 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
/* This file is in the public domain. Peter O., 2012. http://upokecenter.dreamhosters.com | |
Public domain dedication: http://creativecommons.org/publicdomain/zero/1.0/legalcode */ | |
/* NOTE: Currently supports lines only */ | |
function RectAccum(){ | |
this.left=0; | |
this.top=0; | |
this.right=0; | |
this.bottom=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
// Gets a timing function from a "transition-timing-function" string | |
// Written by Peter O. in 2012, released to the public domain | |
// Returns the function itself if the object passed in is a Function object, | |
// or the "ease" function if the object is null or undefined | |
// This file is in the public domain. Peter O., 2012. http://upokecenter.dreamhosters.com | |
// Public domain dedication: http://creativecommons.org/publicdomain/zero/1.0/ | |
function getTimingFunction(f){ | |
if(typeof f=="undefined" || f==null)f="ease"; | |
if(typeof f=="function" || (f && f.constructor==Function))return f; | |
if(f=="step-start")return function(v){ return (v>0) ? 1.0 : 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
// This file is in the public domain. Peter O., 2013. http://upokecenter.dreamhosters.com | |
// Public domain dedication: http://creativecommons.org/publicdomain/zero/1.0/ | |
using System; | |
using System.Reflection; | |
namespace PeterO | |
{ | |
public static class ReflectionUtil { |
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
// This file is in the public domain. Peter O., 2013. http://upokecenter.dreamhosters.com | |
// Public domain dedication: http://creativecommons.org/publicdomain/zero/1.0/ | |
package com.upokecenter.util; | |
import java.lang.reflect.Constructor; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
public final class Reflection { |
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. 2013. In the public domain. | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
Color BlendColors(Color crDst, Color crSrc, byte alpha){ | |
switch(alpha){ | |
case 0x00:return crDst; | |
case 0xFF:return crSrc; | |
default:{ | |
int r,g,b,a; | |
r=crDst.R; |
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 com.upokecenter.util; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
// Written by Peter O. in 2013. | |
// Any copyright is dedicated to the Public Domain. | |
// http://creativecommons.org/publicdomain/zero/1.0/ |
OlderNewer