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
// Pi approximatization | |
//http://en.wikipedia.org/wiki/Leibniz_formula_for_%CF%80 | |
//Slow conversion... | |
#include <stdint.h> | |
#include <stdio.h> | |
int main() | |
{ | |
double result = 0; | |
for( size_t k = 1; k <= 1000000; k++ ) |
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
//Spirals | |
//┌─────────┐ | |
//│┌───────┐│ | |
//││┌─────┐││ | |
//│││┌───┐│││ | |
//││││┌─┐││││ | |
//│││││└┘││││ | |
//││││└──┘│││ | |
//│││└────┘││ | |
//││└──────┘│ |
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
// Parse Action Replay DS Code | |
#include <string> | |
#include <vector> | |
#define STR(x) # x | |
enum Button | |
{ | |
A = 0xFFFE, | |
B = 0xFFFD, |
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 <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <string> | |
#include <initializer_list> | |
#include <thread> | |
#include <chrono> |
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
typedef enum <uint> | |
{ | |
FTEX_Param = 1, // Found for srm and mtm files | |
// Each channel acts as material parameter | |
// R = Ambient Occlusion | |
// G = Specular Albedo | |
// B = Roughness | |
FTEX_Color = 3, // Found for bsm files(albedo texture) | |
FTEX_Cubemap = 7, // Found for cbm(cubemap) and |
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 <windows.h> | |
#include <iostream> | |
#include <iomanip> | |
#include <stdlib.h> | |
#include <conio.h> | |
#include <TlHelp32.h> //GetModuleBase | |
#pragma pack() | |
struct Color | |
{ | |
Color() |
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 xchat, re, random | |
import string | |
__module_name__ = "Noise" | |
__module_version__ = "1.0.0" | |
__module_description__ = "Generates random colored string of the length specified" | |
def RandomWord(Length): | |
charlist = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!#$%&\'()*+,-./:;<=>?@[\]^_`{|}~" | |
word = "" |
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 gathers = [].slice.call(document.querySelectorAll('input[class="redbutton anybutton"]')); | |
var main = document.querySelector("#super-container").insertBefore(document.createElement('div'),document.querySelector("#super-container").children[5]); | |
main.id = "grab"; | |
for (var i = 0; i < gathers.length; i++) | |
{ | |
var posturl = "main.php?p=gather&action=" + gathers[i].value.toLowerCase(); | |
gathers[i].parentNode = ""; | |
$.ajax({ | |
url: posturl, | |
type: 'POST', |
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
template<unsigned int N, unsigned int I> | |
struct FnvHash | |
{ | |
inline static unsigned int Hash(const char (&str)[N]) | |
{ | |
return (FnvHash<N,I-1>::Hash(str) ^ str[I-1]) * 16777619u; | |
} | |
}; | |
template<unsigned int N> |
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 message = ["X","X"]; | |
var count = 25; | |
var cross = 5;//Number of times to "cross" the helix | |
var spacemax = 60; | |
handle = setInterval(function(){ | |
var string = ".".repeat(spacemax); | |
var strand1 = (Math.sin((i/count)*3.14*cross)*0.5+0.5)*spacemax; | |
string = string.substring(0,strand1) + message[0] + string.substring(strand1); |