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
vector<AABB> getMergedAABBSLeft(vector<AABB> mSource) | |
{ | |
vector<AABB> result; | |
while(!mSource.empty()) | |
{ | |
bool merged{false}; AABB a{mSource.back()}; mSource.pop_back(); | |
for(auto& b : mSource) | |
if(a.getRight() == b.getRight()) |
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
vector<string> specials{"{", "}", "[", "]", "(", ")"}; | |
vector<string> keywords{"if", "else"}; | |
enum class TokenType{Symbol, Keyword, Special, Numeric}; | |
bool isKeyword(const std::string& mValue) { return contains(keywords, mValue); } | |
bool isSpecial(const std::string& mValue) { return contains(specials, mValue); } | |
bool isNumeric(const std::string& mValue) { for(const auto& c : mValue) if(!isdigit(c)) return false; return true; } | |
struct Token |
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
// Test 1 works | |
// Test 2 segfaults... on some machines. | |
// Compiled with -std=c++11, GCC 4.8.1, tested both on native Linux, Windows and Wine | |
#include <iostream> | |
#include <functional> | |
#include <vector> | |
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
//////////////////////////////////////////////////////////// | |
// | |
// SFML - Simple and Fast Multimedia Library | |
// Copyright (C) 2007-2013 Laurent Gomila ([email protected]) | |
// | |
// 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, |
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
#!/bin/bash | |
# Set directories | |
BACKUPDIR="/media/veeBackup/_ARCHBACKUP/" | |
TEMPDIR="${BACKUPDIR}_TEMP/" | |
TEMPFILE="${TEMPDIR}tmpfile" | |
LASTENTRIESFILE="${BACKUPDIR}_LAST" | |
# Get all entries from LASTENTRIESFILE (one entry per line) and put them in the LASTENTRIES array | |
OLD_IFS=$IFS |
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
#!/bin/bash | |
echo "Password, please!" | |
sudo echo "Thanks!" | |
for dir in ./*; do | |
if [[ -d "$dir" ]]; then | |
( | |
cd "$dir" | |
mkdir "buildAll" |
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 <cstdlib> | |
#include <cmath> | |
#include <iostream> | |
#ifdef _WIN32 | |
#include "sys\time.h" | |
#include <windows.h> | |
#else | |
#include "sys/time.h" | |
#endif |
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
#!/bin/bash | |
# This bash script, called in a repository with submodules, builds and installs all submodules then the project itself | |
# RELEASE MODE, SKIPS RPATH | |
# Takes $1 destination directory parameter | |
if [ -z "${1}" ]; then | |
echo "This script the installation path as an argument!" | |
exit 1 | |
fi |
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 <algorithm> | |
#include <string> | |
#include <thread> | |
#include <functional> | |
#include <future> | |
#include <SSVUtils/SSVUtils.h> | |
#include <SFML/Network.hpp> | |
#include "Common.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
#ifndef SSVU_TOKENIZER | |
#define SSVU_TOKENIZER | |
#include <string> | |
#include <vector> | |
#include <unordered_map> | |
#include <functional> | |
#include "SSVUtils/Utils/UtilsContainers.h" | |
#include "SSVUtils/Log/Log.h" | |
#include "SSVUtils/Global/Typedefs.h" |
OlderNewer