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
var fs = require("fs"); | |
fs.readFileSync(process.argv[2]).toString().split('\n').forEach(function (line) { | |
if (line != "") { | |
console.log(processLine(line)); | |
} | |
}); | |
function processLine(line) { | |
var lists = line.split(";"); |
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() | |
{ | |
cout << "Hello World!" << endl; | |
cin.get(); | |
return 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
/** | |
* Change the "Hello, World!" example above to display another line. | |
* If Spock were doing this exercise, he might add to | |
* it so that it would display: | |
* | |
* Hello, World! | |
* Live long and prosper. | |
* | |
**/ |
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
/** | |
* Copy the following, then edit it so it compiles correctly | |
* and prints "Hello, World!" on the screen. | |
* | |
* #include<iosteam.h> | |
* void main() | |
* { | |
* | |
* cout<<"Danny Walling"; | |
* cin getput(); |
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
/* Problem 0.1 | |
* | |
* Electronic parrot: Reads in a float from the user and prints it on | |
* the console. | |
*/ | |
#include <iostream> | |
#include <iomanip> | |
#include <limits> | |
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
/* Problem 0 | |
* To run this program, you'll need to have a file named | |
* datafile.dat in the working directory. | |
*/ | |
#include <iostream> | |
#include <fstream> // For ifstream | |
#include <string> | |
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
int main () { | |
int climber, floater; | |
int* blocker = &climber; | |
int* bomber = new int; | |
int* builder = new int; | |
int* basher = builder; | |
int* miner = blocker; | |
int* digger = new int; | |
*digger = *blocker; | |
/* builder was created with a "new int" assignment, |
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 <fstream> // For ifstream | |
#include <string> | |
#include <locale> | |
using namespace std; | |
int main(int argc, char* argv[]) { | |
ifstream file; | |
string line; | |
file.open(argv[1]); |
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
// ==UserScript== | |
// @name saylor | |
// @namespace P1xt | |
// @description Fix Saylor font sizing | |
// @include http://www.saylor.org/ | |
// @include http://www.saylor.org/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
function addGlobalStyle(css) { |
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
// ==UserScript== | |
// @name saylor resources | |
// @namespace P1xt | |
// @description fix the ghastly styling of the chemistry textbook | |
// @include http://resources.saylor.org/* | |
// @version 1.003 | |
// @grant none | |
// ==/UserScript== | |
function addGlobalStyle(css) { | |
var head, style; |