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
terraform { | |
required_providers { | |
digitalocean = { | |
source = "digitalocean/digitalocean" | |
version = "~> 2.0" | |
} | |
} | |
} | |
# Set the variable value in *.tfvars file |
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
from socket import * | |
host = "localhost" | |
port = 50000 | |
buf = 1024 | |
addr = (host,port) | |
# Create socket and bind to address | |
UDPSock = socket(AF_INET,SOCK_DGRAM) | |
UDPSock.bind(addr) | |
print "Listening" |
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 "glm.h" | |
#include<vector> | |
#include <iostream> | |
#include<Windows.h> | |
double PCFreq = 0.0; | |
__int64 CounterStart = 0; | |
void StartCounter() | |
{ | |
LARGE_INTEGER li; |
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
solution "Lua" | |
configurations { "Release", "Debug"} | |
os.chdir("src") | |
-- The static Lua library | |
project "Lua51" | |
bindir = "bin" | |
libdir = "lib" | |
kind "StaticLib" |
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
-- Simple Premake script to get all C/C++ files | |
solution "SolutionName" | |
configurations { "Debug", "Release" } | |
project "ProjectName" | |
kind "ConsoleApp" | |
language "C++" | |
files { "**.h", "**.cpp"} | |
links{ "SDL2", "glew32", "glew32s"} |
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
import time | |
from threading import * | |
key = "lol" | |
def getInput(): | |
global key | |
lock = Lock() | |
while True: | |
with lock: | |
key = raw_input() |
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
bool keys[255]; | |
// constructor | |
EventHandler::EventHandler() | |
{ | |
for(int i = 0; i < 255; i++) | |
keys[i] = false; | |
} | |
EventHandler::keyPressed(unsigned char key) |
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
//Create an RGB image from a grayscale image. Grayscale is grayScaleImage | |
result_image = cvCreateImage(cvGetSize(grayScaleImage),IPL_DEPTH_8U, 3); | |
cvMerge(grayScaleImage, grayScaleImage, grayScaleImage, NULL, result_image); |
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
sudo sh | |
apt-get update | |
apt-get install python2.7 | |
apt-get install python-numpy | |
apt-get install python-opencv | |
apt-get install eclipse-platform | |
apt-get install eclipse-cdt | |
apt-get install g++ | |
apt-get install clang | |
apt-get install git |
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 FOOTEST_H | |
#define FOOTEST_H | |
class FooTest : public Test | |
{ | |
public: | |
// List of shapes | |
b2Body *dynamicBody; // The players shape | |
b2Body* lowerground; // The horizontal platform | |
b2Body* sideground; // The vertical platform |
NewerOlder