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 <fstream> | |
| #include <vector> | |
| #include <cassert> | |
| namespace std { } | |
| using namespace std; | |
| struct item | |
| { |
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 <fstream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <cmath> | |
| #include <cassert> | |
| namespace std { } | |
| 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
| #include <iostream> | |
| #include <fstream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <cassert> | |
| namespace std { } | |
| using namespace std; | |
| struct edge |
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 <fstream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <cmath> | |
| #include <cassert> | |
| namespace std { } | |
| 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
| #include <iostream> | |
| #include <assert.h> | |
| namespace std { }; | |
| using namespace std; | |
| struct node | |
| { | |
| node* next; | |
| size_t data; |
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
| -- Work-a-round for SQL lite's lack of ENUM support. | |
| CREATE TABLE enum(id INTEGER NOT NULL PRIMARY KEY, action VARCHAR(255) NOT NULL); | |
| INSERT INTO enum VALUES (0, "INSERT"); | |
| INSERT INTO enum VALUES (1, "UPDATE"); | |
| INSERT INTO enum VALUES (2, "DELETE"); | |
| PRAGMA foreign_keys = ON; | |
| -- Create a table to audit. | |
| CREATE TABLE inventory(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name VARCHAR(255) NOT NULL, description VARCHAR(255), cost INTEGER NOT NULL, quantity INTEGER NOT NULL); |
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
| main.exe kitten sitting |
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
| def get_factorial_recursively(i): | |
| f = 1 | |
| if i > 1: | |
| f = f * i * get_factorial_recursively(i - 1) | |
| return f | |
| def get_factorial_iteratively(i): | |
| f = 1 | |
| for j in range(2, i + 1): | |
| f = f * j |
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
| #ifdef _MSC_VER | |
| #define _CRT_SECURE_NO_WARNINGS | |
| #endif | |
| #include <iostream> | |
| #include <cstring> | |
| #include <cassert> | |
| #include <sys/stat.h> | |
| #define WIN32_LEAN_AND_MEAN |
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
| 2148 | |
| 9058 | |
| 7742 | |
| 3153 | |
| 6324 | |
| 609 | |
| 7628 | |
| 5469 | |
| 7017 | |
| 504 |