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 <SFML/Graphics.hpp> | |
#include <SFML/System.hpp> | |
#include <iostream> | |
int main() { | |
sf::RenderWindow app(sf::VideoMode(800,600,32), "lol", sf::Style::Close, sf::ContextSettings(24,8,4)); | |
std::cout << "Antialiasing level: " << app.GetSettings().AntialiasingLevel << std::endl; | |
while(app.IsOpened()) { |
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 | |
''' | |
Description: | |
This script generates the different BasisSkin tags for a MyGUI skin | |
definintion file. Possible widget layouts are: | |
- Stretch | |
- 3 Tiles, vertical | |
- 3 Tiles, horizontal | |
- 9 Tiles (center piece and 8 around it) |
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 <ctime> | |
#include <random> | |
class Random { | |
public: | |
static void Initialize() { | |
Generator.seed(time(0)); | |
} |
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
// Shortened version of this: | |
// http://www.bpfh.net/simes/computing/chroot-break.html | |
#include <stdio.h> | |
#include <errno.h> | |
#include <fcntl.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> |
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
#!/bin/bash | |
GAME=$1 | |
DIR="/sdcard/love" | |
MIME="application/x-love-game" | |
INTENT="org.love2d.android/.GameActivity" | |
if [[ -z "$1" ]]; then | |
GAME="game.love" | |
echo "Creating game package at $GAME" |
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
local class = require("util/middleclass") | |
function assert_vector(v) | |
assert(v ~= nil and v:isInstanceOf(Vector)) | |
end | |
Vector = class("Vector") | |
function Vector:initialize(x, y) | |
self.x = x or 0 |
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
# Data mining 2014, practical tutorial 5, example for | |
# *** Self-Organising Map *** | |
# Copyright agreement: | |
# Do whatever you want. | |
import numpy, scipy, sys, subprocess | |
iterations = int(sys.argv[2]) | |
# set parameters |
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
/* | |
* Easing Functions - inspired from http://gizma.com/easing/ | |
* only considering the t value for the range [0, 1] => [0, 1] | |
* Finally! Someone who understands we don't need to put the | |
* start, end, duration, etc. into the easing forumlae. | |
*/ | |
var EasingFunctions = { | |
// no easing, no acceleration | |
linear: function (t) { return t }, | |
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
// setup.js | |
console.log('starting timeout'); | |
setTimeout(function() { | |
console.log('timeout triggered, running suite'); | |
run(); | |
}, 1000); |
OlderNewer