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
| http://www.netflix.com/browse/genre/*** | |
| The *** is where you type a code relating to the category you’re looking for. | |
| For example, 35800 is steamy romantic movies, 11140 is supernatural thrillers and 67879 is Korean TV shows. | |
| Action & Adventure: 1365 | |
| Action Comedies: 43040 | |
| Action Sci-Fi & Fantasy: 1568 | |
| Action Thrillers: 43048 | |
| Adult Animation: 11881 |
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
| //try values for persistance like 0.75 - 0.25 | |
| public double OctavePerlin(double x, double y, double z, int octaves, double persistence) | |
| { | |
| double total = 0; | |
| double frequency = 1; | |
| double amplitude = 1; | |
| double maxValue = 0; // Used for normalizing result to 0.0 - 1.0 | |
| for(int i=0;i<octaves;i++) | |
| { |
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
| //accurate to 6 decimal places | |
| 355.f/113 | |
| //math.h | |
| #define M_PI 3.14159265358979323846 | |
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
| // | |
| // ECS.cpp | |
| // quadc_two | |
| // | |
| // Created by Ramsey Nasser on 4/25/15. | |
| // | |
| // | |
| //////// framework |
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
| //lamda sort a vector | |
| #include <algorithm> | |
| std::sort(vect.begin(), vect.end(), [](ObjectType A, ObjectType B) -> bool{ return (A.id < B.id); }); |
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
| //C++ copy files | |
| #include <fstream> | |
| std::ifstream src("from.ogv", std::ios::binary); | |
| std::ofstream dst("to.ogv", std::ios::binary | std::ios::trunc); | |
| dst << src.rdbuf(); | |
| /* | |
| the one-liner: | |
| std::ofstream(dest) << std::ifstream(src).rdbuf(); |
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
| //this code sets up memory leak detection | |
| #ifdef _DEBUG | |
| #define _CRTDBG_MAP_ALLOC | |
| #include <crtdbg.h> | |
| #define DEBUG_NEW new(_CLIENT_BLOCK, __FILE__, __LINE__) | |
| #define new DEBUG_NEW | |
| #endif | |
| //the line below turns on memory leak detection in debug mode | |
| _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF ); |