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
+ ---------------------------------------------------------------------------- + | |
| TODOS @ Sunday 20 April 2014 01:41 | | |
| 124 files scanned | | |
+ ---------------------------------------------------------------------------- + | |
## NOTE (4) | |
1. region_pager.hpp:53 don't change the sizes mid-program, it will cause issues | |
2. raster_font.cpp:43 This class can only take a raster font with 16*16 characters, and the | |
3. server_application.cpp:109 I might need to rearrange the init process so that lua & SQL can interact | |
4. server_application.cpp:300 assigning each field one-by-one so adding or moving a field doesn't break this code |
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
diff --git a/common/network/serial.cpp b/common/network/serial.cpp | |
index 2aa88cb..5130841 100644 | |
--- a/common/network/serial.cpp | |
+++ b/common/network/serial.cpp | |
@@ -21,7 +21,7 @@ | |
*/ | |
#include "serial.hpp" | |
-#include "map_generator.hpp" | |
+#include "map_allocator.hpp" |
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 "sqlite3/sqlite3.h" | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
const char* command = "CREATE TABLE accounts(username VARCHAR(100)); INSERT INTO accounts VALUES(\"Ratstail91\"); SELECT * FROM accounts;"; | |
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
//check for collisions | |
for (int i = -6; i < 6; ++i) { | |
for (int j = -6; j < 6; ++j) { | |
Vector2 wallPoint = { | |
snapToBase(32.0, character.GetOrigin().x), | |
snapToBase(32.0, character.GetOrigin().y) | |
}; | |
wallPoint.x += i * 32; | |
wallPoint.y += j * 32; |
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
/* Rules | |
* Write the implementation in Container.h, do not change ContainerTest.cpp. | |
* No memory allocation is allowed (implicit or explicit). | |
* Use of the STL (Standard Template Library) is not allowed. | |
* You can add member functions and variables. | |
* All storage management data structures must use the buffer memory, not additional member variables. | |
* You must test your solution in debug (or any configuration that have asserts enabled) so that the requirements are tested. | |
* Your solution must be efficient and scalable. | |
* Try to maximize the number of elements in the given buffer, and also perform well whether you have ten elements or thousands. | |
* Optionally, you can uncomment the _ADVANCED macro at the top of ContainerTest.cpp and implement the sorting algorithm. |
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
unsigned hashuint(unsigned x) { | |
//found this on stack overflow | |
x = ((x >> 16) ^ x) * 0x45d9f3b; | |
x = ((x >> 16) ^ x) * 0x45d9f3b; | |
x = ((x >> 16) ^ x); | |
return x; | |
} | |
unsigned hashCoordinates(unsigned seed, int x, int y) { | |
//default values when 0 is a parameter |
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
ack(m, n): | |
m == 0 ? n + 1 : ; | |
n == 0 ? ack(m - 1, 1) : ; | |
ack(m, ack(m, n - 1)) | |
Each stack frame is structured as (a,n,m,x), each referred to as arguments (@x). Everything to the right of the following stack frame is essentially a local variable, and must be cleared before the current frame "returns". Each stack frame is refered to as s@x where s is the current frame, s+1@x is the next, etc. Always assume the pointer will enter the next stage of the function by pointing to the top of a stack frame. | |
A way to test the precise value of a cell is like this. Assuming the cell @x has the value of 2: |
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
int CompareOddEven(int lhs, int rhs) | |
{ | |
//lhs < rhs ? -1, 1, 0 | |
//odd vs even | |
if (lhs % 2 == 1 && rhs % 2 == 0) { | |
return -1; | |
} | |
if (lhs % 2 == 0 && rhs % 2 == 1) { | |
return 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
@ECHO OFF | |
ECHO USB Backup Utility designed by Kayne Ruse. | |
SET folder=USBBackup | |
ECHO Instructions | |
ECHO. | |
ECHO 1) There must be a folder called "%folder%" in this directory. | |
ECHO 2) The USB must have a copy of this file in it's root directory. | |
ECHO. |
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
/* Copyright: (c) Kayne Ruse 2014 | |
* | |
* This software is provided 'as-is', without any express or implied | |
* warranty. In no event will the authors be held liable for any damages | |
* arising from the use of this software. | |
* | |
* Permission is granted to anyone to use this software for any purpose, | |
* including commercial applications, and to alter it and redistribute it | |
* freely, subject to the following restrictions: | |
* |