Game Controller Abstraction for LibGDX
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
// ==UserScript== | |
// @name XKCD Subtitutions | |
// @namespace xkcd | |
// @description Make reading the new more fun! http://xkcd.com/1288/ | |
// @include http://news.yahoo.com/* | |
// @include http://news.google.com/* | |
// @include http://*.cnn.com/* | |
// @include http://*.nbc.com/* | |
// @include http://arstechnica.com/* | |
// @version 1 |
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 sqlite3, atexit, random | |
import schedule | |
from flask import Flask, request, session, g, jsonify | |
from datetime import datetime | |
from contextlib import closing | |
# configuration | |
DATABASE = './sm_daily.db' | |
DEBUG = True | |
SECRET_KEY = 'development 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
public class ConversionUtility { | |
/** | |
* Set of appropriate types of Strings that we may convert booleans into or parse from | |
*/ | |
public static enum BooleanConversion { | |
YN("Y", "N"), YesNo("Yes", "No"), TrueFalse("True", "False"); | |
public final String True; | |
public final String 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
const float RATE = 5.0; | |
/** | |
* Converts RGB value from our texture channel into an HSV value. | |
* By using the V we can perform a transition using any color image | |
*/ | |
vec3 rgb2hsv(vec3 c) | |
{ | |
vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); | |
vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g)); |
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
/** | |
* Flattens a json object into a single-dimensional representation | |
* @param: stripPrefix: boolean | |
* by default, subobjects will have their property name prefixed to the flattened property name. | |
* This is done to prevent overwriting of properties with the same name. If this is a non-issue | |
* for your data type, then feel free to set this to true | |
* @return: a single dimensional copy of the original object | |
*/ | |
Object.defineProperty(Object.prototype, 'flatten', { | |
value: function(stripPrefix) { |
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
Computer Information: | |
Manufacturer: BIOSTAR Group | |
Model: A870U3 | |
Form Factor: Desktop | |
No Touch Input Detected | |
Processor Information: | |
CPU Vendor: AuthenticAMD | |
CPU Family: 0x10 | |
CPU Model: 0x4 |
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/sh | |
device='/dev/sr0' | |
mount=$(mount | grep $device | cut -d " " -f 3) | |
DVD_NAME=$(find $mount -name "SLUS_*" | grep -o '[^/]*$') | |
blockcount=$(isoinfo -d -i $device | grep "^Volume size is:" | cut -d " " -f 4) | |
blocksize=$(isoinfo -d -i $device | grep "^Logical block size is:" | cut -d " " -f 5) | |
dd if=$device bs=$blocksize count=$blockcount of=$DVD_NAME.iso |
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
3ch Language Specification | |
***keywords*** | |
always lower case | |
var - declare variable | |
val - declare constant | |
cls - class | |
slf - self (this) | |
sup - super |
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
public class EventPool extends SharedInheritenceReflectionPool<Event> { | |
public EventPool () { | |
this(16, Integer.MAX_VALUE); | |
} | |
public EventPool (int initialCapacity) { | |
this(initialCapacity, Integer.MAX_VALUE); | |
} |
OlderNewer