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 <stdlib.h> | |
| #include <stdio.h> | |
| typedef struct Node { | |
| struct Node *next; | |
| int val; | |
| } Node; | |
| Node* constructTestLL() { | |
| Node *root; |
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
| import Control.Monad | |
| import Data.Char | |
| -- Memory | Code | Program Input | |
| data P = P [Int] [Char] [Char] | |
| main = do | |
| fstLine <- getLine | |
| secLine <- getLine | |
| rawCodeFile <- replicateM (read $ last $ words fstLine) getLine |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.IO.Ports; | |
| using System.Threading; | |
| namespace Lab2 | |
| { |
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 <vector> | |
| #include <map> | |
| #include <math.h> | |
| using namespace std; | |
| // map of <last top point ix, last bottom point ix> to path length | |
| map< pair< int, int>, double > d_map; | |
| int len; |
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
| 1 balls up to throw height 5 | |
| |---------| | |
| |0|0|0|0|1| | |
| |0|0|0|1|0| | |
| |0|0|1|0|0| | |
| |0|1|0|0|0| | |
| |1|0|0|0|0| | |
| |-|-|-|-|-| | |
| |^| | | | | | |
| |1<0| | | | |
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
| // alt ans: | |
| #include <vector> | |
| int main() { | |
| vector< pair<int, string> > ir_map; | |
| ir_map.push_back( make_pair(1000, "M") ); | |
| ir_map.push_back( make_pair(900, "CM") ); | |
| ir_map.push_back( make_pair(500, "D") ); | |
| ir_map.push_back( make_pair(400, "CD") ); |
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
| // Program to convert to roman numerals. | |
| // | |
| // I'm going to split the number into digits, and call a function to | |
| // convert each one to roman numerals individually. | |
| #include <string> | |
| #include <iostream> | |
| using namespace std; |
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
| $(document).keydown(function(e) { | |
| switch(e.which) { | |
| case 'h': // left | |
| createjs.Sound.play((wordNumber = (wordNumber %5) + 1) + "_1", createjs.Sound.INTERRUPT_NONE, 0, 0, false, 1); | |
| break; | |
| case 'j': // up | |
| createjs.Sound.play((wordNumber = (wordNumber %5) + 1) + "_2", createjs.Sound.INTERRUPT_NONE, 0, 0, false, 1); | |
| break; |
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
| // As simple of a starting point as I can make for a console game! | |
| // Aka a very stripped down version of my own project. | |
| // Reads console input as arrow keys and wasd, | |
| // and allows you to move a player around the screen. | |
| // To build, save as starting_point.cpp, then build with | |
| // g++ starting_point.cpp -o starting_point -lncurses |
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 <clocale> | |
| #include <cmath> | |
| #include <ncurses.h> | |
| #include <unistd.h> | |
| #include <vector> | |
| #include <ctime> | |
| #include <cstdlib> | |
| using namespace std; |