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
| // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ | |
| // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | |
| // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel | |
| // MIT license | |
| (function() { | |
| var lastTime = 0; | |
| var vendors = ['ms', 'moz', 'webkit', 'o']; |
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
| float Q_rsqrt( float number ) | |
| { | |
| long i; | |
| float x2, y; | |
| const float threehalfs = 1.5F; | |
| x2 = number * 0.5F; | |
| y = number; | |
| i = * ( long * ) &y; // evil floating point bit level hacking | |
| i = 0x5f3759df - ( i >> 1 ); // what the fuck? |
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
| # Mostly stolen from deap's symbreg GP example | |
| import operator | |
| import math | |
| import random | |
| import string | |
| import inspect | |
| import ctypes | |
| import numpy | |
| from scipy import optimize |
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
| // Copyright (c) 2012 Calvin Rien | |
| // http://the.darktable.com | |
| // | |
| // 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, | |
| // subject to the following restrictions: |
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
| #multiple-datasets .league-name { | |
| margin: 0 20px 5px 20px; | |
| padding: 3px 0; | |
| border-bottom: 1px solid #ccc; | |
| } |
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
| function encrypt(text){ | |
| var cipher = crypto.createCipher('aes-256-cbc','d6F3Efeq') | |
| var crypted = cipher.update(text,'utf8','hex') | |
| crypted += cipher.final('hex'); | |
| return crypted; | |
| } | |
| function decrypt(text){ | |
| var decipher = crypto.createDecipher('aes-256-cbc','d6F3Efeq') | |
| var dec = decipher.update(text,'hex','utf8') |
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
| var zlib = require('zlib'); | |
| var compress = function(req, res, result) { | |
| var acceptEncoding = req.headers['accept-encoding']; | |
| if (!acceptEncoding) { acceptEncoding = ''; } | |
| if (acceptEncoding.match(/\bdeflate\b/)) { | |
| zlib.deflate(result, function(err, result) { | |
| if (!err) { | |
| res.writeHead(200, { 'content-encoding': 'deflate' }); | |
| res.send(result); |
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
| using System; | |
| using UnityEngine.Events; | |
| using UnityEngine.EventSystems; | |
| namespace UnityEngine.UI | |
| { | |
| /// <summary> | |
| /// Simple toggle -- something that has an 'on' and 'off' states: checkbox, toggle button, radio button, etc. | |
| /// </summary> | |
| [AddComponentMenu("UI/Toggle", 35)] |
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 jinja2.environment import create_cache | |
| # blah blah blah | |
| app.jinja_env.cache = create_cache(1000) | |
| # blah blah blah | |
| app.run() |
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
| <div> | |
| <h1>Tweetbox</h1> | |
| <form id="my-tweetbox"> | |
| <p><textarea name="tweet">Write your tweet...</textarea></p> | |
| <p><input type="submit" name="submit" value="Tweet!" /></p> | |
| </form> | |
| </div> | |
| <div> | |
| <h1>County Tweetbox</h1> |