I hereby claim:
- I am trevordixon on github.
- I am trevordixon (https://keybase.io/trevordixon) on keybase.
- I have a public key ASCzdZDbIbkDh3klIM2pGAU-qx33WJaLpN0kgGvIjQVr-go
To claim this, I am signing this object:
using System; | |
using System.Diagnostics; | |
using System.Collections.Generic; | |
namespace Simplex { | |
class Simplex { | |
private double[] c; | |
private double[,] A; | |
private double[] b; | |
private HashSet<int> N = new HashSet<int>(); |
extendedEu :: Integer -> Integer -> (Integer, Integer) | |
extendedEu a 0 = (1, 0) | |
extendedEu a b = (t, s - q * t) | |
where (q, r) = quotRem a b | |
(s, t) = extendedEu b r |
import Data.Bits | |
modExp :: Integer -> Integer -> Integer -> Integer | |
modExp b 0 m = 1 | |
modExp b e m = t * modExp ((b * b) `mod` m) (shiftR e 1) m `mod` m | |
where t = if testBit e 0 then b `mod` m else 1 |
using System; | |
using System.Collections.Generic; | |
// From http://visualstudiomagazine.com/articles/2012/11/01/priority-queues-with-c.aspx | |
public class PriorityQueue<T> where T : IComparable<T> { | |
private List<T> data; | |
public PriorityQueue() { | |
this.data = new List<T>(); | |
} |
I hereby claim:
To claim this, I am signing this object:
// MIT License: | |
// | |
// Copyright (c) 2010-2012, Joe Walnes | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
function renderElement(page, selector) { | |
var prevClipRect = page.clipRect; | |
page.clipRect = page.evaluate(function(selector) { | |
return document.querySelector(selector).getBoundingClientRect(); | |
}, selector); | |
var pic = page.renderBase64('png'); | |
page.clipRect = prevClipRect; |
{ | |
var separator = ','; | |
} | |
start | |
= comma | |
comma | |
= & { return separator = ','; } sv:sv { return sv; } |
/* | |
Relies on jQuery, underscore.js, Async.js (https://github.com/caolan/async), and zip.js (http://gildas-lormeau.github.com/zip.js). | |
Tested only in Chrome on OS X. | |
Call xlsxParser.parse(file) where file is an instance of File. For example (untested): | |
document.ondrop = function(e) { | |
var file = e.dataTransfer.files[0]; | |
excelParser.parse(file).then(function(data) { | |
console.log(data); |
-- AES encryption in Haskell using Simple AES (http://hackage.haskell.org/package/SimpleAES-0.4.2) | |
-- Example encryption and decryption: | |
import Codec.Crypto.SimpleAES | |
import qualified Data.ByteString.Char8 as B | |
import qualified Data.ByteString.Lazy.Char8 as BL | |
import Data.Hex | |
key = B.pack "Thisismykey....." |