Skip to content

Instantly share code, notes, and snippets.

// File: p06.cpp
// Name: Mark Sands
// Date: 12/02/08
// Course: CS 240 - Introduction to Computing III
// Desc: This program demonstrates a Binary Search Tree with the ability to index by
// a static key value in order to sort, display, and remove in a robust manner.
//
// Other files required: IndexedBST.h, IndexedBST.cpp
//------------------------------------------------------------------------------------------
#include <iostream>
#include <iomanip>
#include <string>
#include "BST.h"
#include "SearchableADT.h"
void ShowStats( SearchableADT<string>*& dictionary );
int main( int argc, char* argv[] )
{
#!/usr/bin/python
#
# Program to convert a number into the format
# hh mm ss.sssss
# Input format: ./ToDecRa.py DEC RA
#
# test data: 63.36130383 256.99567542
import math
#!/usr/bin/python
# Program to convert a number into the format
# hh mm ss.sssss
# Input format: ./converter.py DEC RA
import math
import sys
import string
def to_dec(inp):
#include <iostream>
#include <string>
inline std::istream& operator >>(std::ostream& os, std::string &arg) { return (std::cin >> arg); }
inline std::ostream& operator <<(std::istream& is, std::ostream& (*_T)(std::ostream&)){ return (std::cout << _T); }
int main()
{
std::string name;
std::cout << "Name? " >> name << std::endl;
@marksands
marksands / gist:204713
Created October 8, 2009 04:09
makefile for brntbeer Simulator
all: main
main: Simulator.o Environment.o Behavior.o Cell.o Circle.o Formation.o Neighborhood.o Robot.o Vector.o
g++ -framework OpenGL -framework GLUT -framework Cocoa Simulator.o Behavior.o Cell.o Circle.o Environment.o Formation.o Neighborhood.o Robot.o Vector.o -o Simulator
Simulator.o: Simulator.cpp
g++ -c Simulator.cpp
Behavior.o: Behavior.cpp
g++ -c Behavior.cpp
require "rubygems"
require "net/http"
require "uri"
require "aws/s3"
AWS::S3::Base.establish_connection!(
:access_key_id => 'ACCESS KEY',
:secret_access_key => 'SECRET KEY'
)
require 'rubygems'
require 'benchmark'
require 'rdiscount'
FILE = 'README.markdown'
Benchmark.bm do |b|
b.report("File.read ") do
mdown = File.read(FILE)
setsid python /mnt/data/MZP/MZP.py > /tmp/out.log 2>&1
#include <iostream>
int main() {
const char* a = "fsdcpuhauicimnsktnts ";
for( int i = 0; i < 50; ++i ) {
int k = rand() % 5, j = 0;
do putchar(a[j*5+k]); while(a[j++*5+k]>' ');
}
}