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
// StringSplitter.cpp | |
#include <iostream> // std::cout | |
#include <vector> // std::vector | |
#include <fstream> | |
std::vector<std::string> Split(const std::string str, const std::vector<std::string> delims) | |
{ | |
const std::string fixedDelim = ","; | |
std::vector<std::string> split; | |
size_t t = 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
// StringSplitter.cpp | |
#include <iostream> // std::cout | |
#include <vector> // std::vector | |
#include <fstream> | |
std::vector<std::string> Split(const std::string str, const std::vector<std::string> delims) | |
{ | |
const std::string fixedDelim = ","; | |
std::vector<std::string> split; | |
size_t t = 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
// FileDegradation.cpp : Place an MP3, MP4, JPG or any other file in a directory and create another | |
// empty directory. Add the filenames with paths to the const strings below | |
// Uses the excellent PicoSHA2 to calculate the file hash: https://github.com/okdshin/PicoSHA2 | |
#include <iostream> | |
#include <filesystem> | |
#include <chrono> | |
#include <thread> | |
#include "PicoSHA2.h" |
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 <vector> | |
#include <iostream> | |
#include <algorithm> | |
#include <random> | |
#include <iomanip> | |
using namespace std; | |
const int NumDays = 45; | |
const int PopulationTexas = 30000000; |
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 <map> | |
#include <string> | |
#include <vector> | |
#include <iostream> | |
#include "ConsoleApplication10.h" | |
std::map<const int, const std::string> Numbers = | |
{ | |
{1, "one" }, {2, "two"}, {3, "three"}, {4, "four"}, {5, "five"}, | |
{6, "six"}, {7, "seven"}, {8, "eight"}, {9, "nine"}, {10, "ten"}, |
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 <iomanip> | |
#include <ctime> | |
#include <vector> | |
#include <cstdlib> | |
#include <cmath> | |
#include <fstream> | |
#include <sstream> | |
enum class UserChoice | |
{ |
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
<script> | |
const VideoLenSeconds = 300; // Modify this to the length of your video in seconds. 300 = 5 mins | |
const Divisions = 10; // 10 = every 10%, 4 = every 25%, 5 = every 20% | |
const ConversionPct = 75; // Set this to record a desired conversion percentage | |
// Don't change these! | |
const MSecsPerSecond = 1000; | |
var percentageViewed = 0; | |
var converted = false; |
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.IO; | |
using System.Globalization; | |
using System.Diagnostics; | |
using System.Runtime.CompilerServices; | |
using System.Threading.Tasks; | |
using System.Linq; | |
namespace collisions_sharp |
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
// DeadEndMazeSolver.cpp : This file contains the 'main' function. Program execution begins and ends there. | |
// | |
#include <iostream> | |
#include <vector> | |
#include <thread> | |
#include <chrono> | |
using Maze = std::vector<std::vector<bool>>; | |
using PrintableMaze = std::vector<std::vector<unsigned char>>; |
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
// SVNLogToCSV.cpp : This program will take an SVN log file, as captured in the repository documentation | |
// and convert it to a CSV file for deeper analysis | |
#include <iostream> | |
#include <fstream> | |
#include <string> | |
#include <vector> | |
#include <algorithm> | |
const std::string Revision = "Revision:"; | |
const std::string Author = "Author:"; |