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
#include <iostream> | |
#include <string> | |
#include <fstream> | |
using namespace std; | |
int main(int argc, char ** argv) | |
{ | |
if (argc != 3) | |
{ |
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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int x; | |
int y; | |
cout << "Enter x: "; |
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
#include <iostream> | |
#include <cstdlib> | |
#include <time.h> | |
using namespace std; | |
void usage(const char * name) { | |
cout << "Usage: " << name << " followed by the number of random digits to display" | |
<< endl << "e.g. " << name << " 5" << endl; | |
} |
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
#include <iostream> | |
#include <cstdlib> // for random | |
#include <time.h> // for random | |
#include <algorithm> // for sort | |
#define NUMITEMS 10000000 | |
#define TARGET 40 // the number to look for | |
using namespace std; |
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
import sys | |
""" | |
These are some look up tables used in translating the words into | |
hex. They are hash tables that correspond from one string to another | |
""" | |
commands = { | |
'NOP' : '0', | |
'MOVIR0' : '1', | |
'MOVIR1' : '2', |
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
/*********************************************************************** | |
* Program: | |
* Lesson 08, Tic-Tac-Toe | |
* Summary: | |
* This program reads, displays, and writes a Tic-Tac-Toe board | |
************************************************************************/ | |
#include <iostream> | |
#include <fstream> | |
#include <cassert> |
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
alert('omg javascript'); |