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
public class WordArrayAlgs { | |
static void scan(int[] src, int[] dest){ | |
int i; | |
dest[0]=src[0]; | |
for(i=1;i < src.length; i++) | |
dest[i]= dest[i-1]+ src[i]; | |
} |
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
public boolean isPalindromeAnagram(String s){ | |
//assuming this is initalized to zero | |
boolean bvec[] = new boolean[90]; | |
// ' ' is ASCII 32 | |
// 'z' is ASCII 122 | |
// So -32 to base at zero and length 90 | |
for(int i=0;i<s.length();i++){ | |
bvec[(int)s.charAt(i)-32] ^= true; | |
} | |
int odds =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
//Simple fastaq sequence extractor | |
//Usage: fqextract.out FILEIN > FILEOUT | |
#include <iostream> | |
#include <string> | |
#include <fstream> | |
#include <cstdlib> | |
using namespace std; | |
int main(int argc,char **argv) | |
{ |
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
// Caluclates the AT - CG ratio of a file containing "ATCG\n" | |
// Usage: atcgratio.out INFILE | |
#include <iostream> | |
#include <string> | |
#include <fstream> | |
#include <cstdlib> | |
using namespace std; | |
int main(int argc,char **argv) | |
{ |
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
<html> | |
<head> | |
<title>Invoice Example</title> | |
</head> | |
<body> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script> | |
<!-- Get these js libraries here: | |
https://github.com/jeromeetienne/jquery-qrcode/tree/master/src--> | |
<script type="text/javascript" src="https://raw.github.com/jeromeetienne/jquery-qrcode/master/src/jquery.qrcode.js"></script> |
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
# Roman Numeral Evaluation is a Monoid | |
# Chad Brewbaker | Software Engineer | Telligen.org | |
# crb002@gmail.com | |
# Initial release January 15, 2013 | |
class RomanMonoid | |
attr_accessor :prefix, :prefix_size, :suffix, :suffix_size, :suffix_credit, :sum, :homo | |
def initialize(val) |
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
{"description":"countiesdata","endpoint":"","display":"svg","public":true,"require":[],"tab":"edit","display_percent":0.5958333333333333,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01} |
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
#Node1 = Struct.new(:next,:value) | |
#Node2 = Struct.new(:left, :right, :value) | |
#Node = Struct.new(:parent, :left, :right, :value) | |
#root = Node.new | |
#n1 = Node.new(root, nil, nil, 99) | |
#root.left = n1 | |
#puts root.left.value | |
#puts root.left.right |
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
#Solution for Sedgewick Analytic Combinatorics homework 1 | |
#http://ac.cs.princeton.edu/lectures/AC01-OGFs.pdf | |
#Chad Brewbaker | |
#crb002@gmail.com | Software Engineer @ Telligen | |
#January 30, 2013 | |
best =0 | |
coins=*(1..100) | |
coins.combination(4).each{ |currency| | |
memo = [0]*100 |
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 'rubygems' | |
require 'json' | |
require 'mechanize' | |
require 'json' | |
require 'date' | |
require 'net/http' | |
require 'net/https' | |
require 'csv' | |
module IowaCourts |