This file contains 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> | |
using namespace std; | |
// Support single argument | |
auto sumElements() { | |
return 0; | |
} | |
template <typename T, typename... Ts> |
This file contains 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> | |
using namespace std; | |
template <typename U1, typename U2, typename U3> | |
void movingAvg(U1 u1, U2 u2, U3 u3) { | |
cout << "AVG(" << u1 << ", " << u2 << ", " << u3 << ") = " << (u1 + u2 + u3) / 3.f << endl; | |
} | |
template <typename U1, typename U2, typename U3, typename... Ts> |
This file contains 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> | |
using namespace std; | |
void sayIt() { | |
// Does nothing | |
} | |
template <typename T, typename... Ts> | |
void sayIt(T t, Ts... ts) { |
This file contains 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 <chrono> | |
#include <cstring> | |
#include <iostream> | |
#include <string> | |
using namespace std; | |
using std::chrono::system_clock; | |
template <typename... Args> | |
void log(const char* format, Args... args) { |
This file contains 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
#version 330 core | |
layout(triangles) in; | |
layout(line_strip, max_vertices = 2) out; | |
uniform mat4 transform; | |
vec3 getFaceMiddle(in vec4 v0, in vec4 v1, in vec4 v2) { | |
return (v0.xyz + v1.xyz + v2.xyz) / 3.f; | |
} |
This file contains 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
#version 330 core | |
layout(triangles) in; | |
layout(triangle_strip, max_vertices = 3) out; | |
uniform mat4 transform; | |
out vec3 lighting; | |
vec3 getFaceNormal(in vec4 v0, in vec4 v1, in vec4 v2) { |
This file contains 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 <vector> | |
using namespace std; | |
struct test { | |
int a; | |
long b; | |
}; |
This file contains 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
template <class T> void glBufferDataVector(GLenum target, const std::vector<T>& v, GLenum usage) { | |
glBufferData(target, v.size() * sizeof(T), &v[0], usage); | |
} |
This file contains 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
#!/usr/bin/python | |
import time | |
from selenium import webdriver | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.common.action_chains import ActionChains | |
This file contains 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 <chrono> | |
#include <iostream> | |
using namespace std::literals::chrono_literals; | |
int main() { | |
{ | |
// Implicit casting down | |
auto hours = 24h; |
OlderNewer