This file contains hidden or 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
| // 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 | |
| //------------------------------------------------------------------------------------------ | |
This file contains hidden or 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
| #include <iostream> | |
| #include <iomanip> | |
| #include <string> | |
| #include "BST.h" | |
| #include "SearchableADT.h" | |
| void ShowStats( SearchableADT<string>*& dictionary ); | |
| int main( int argc, char* argv[] ) | |
| { |
This file contains hidden or 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/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 |
This file contains hidden or 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/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): |
This file contains hidden or 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
| #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; |
This file contains hidden or 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
| 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 |
This file contains hidden or 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 "net/http" | |
| require "uri" | |
| require "aws/s3" | |
| AWS::S3::Base.establish_connection!( | |
| :access_key_id => 'ACCESS KEY', | |
| :secret_access_key => 'SECRET KEY' | |
| ) |
This file contains hidden or 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 'benchmark' | |
| require 'rdiscount' | |
| FILE = 'README.markdown' | |
| Benchmark.bm do |b| | |
| b.report("File.read ") do | |
| mdown = File.read(FILE) |
This file contains hidden or 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
| setsid python /mnt/data/MZP/MZP.py > /tmp/out.log 2>&1 |
This file contains hidden or 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
| #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]>' '); | |
| } | |
| } |
OlderNewer