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
//Usage: | |
//1) Save this file to disk. | |
//2) Load the target *.fla file in Flash. | |
//3) Commands | Run Command, Choose this file. | |
//4) Choose a target output folder, then sit back and wait. | |
fl.outputPanel.clear(); | |
var outputScaleFactor = 2; |
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> | |
#define return return 1 + | |
int ReturnFour() | |
{ | |
return 4; | |
} | |
int main() |
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
-- HUMAN RESOURCE MACHINE PROGRAM -- | |
BUMPUP 14 | |
BUMPUP 14 | |
COPYTO 17 | |
BUMPUP 14 | |
COPYTO 18 | |
BUMPUP 14 | |
COPYTO 15 | |
BUMPUP 14 |
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; | |
namespace PiDay | |
{ | |
// The probability of two random numbers to be coprime is P = 6 / Pi^2 | |
// So let's generate a bunch of random numbers. Figure out how often they're coprime. | |
// Use that percentage as our probabilty and solve for Pi. | |
// Pi = sqrt(6 / P) | |
// For more info, watch the video where I stole the idea: https://youtu.be/RZBhSi_PwHU |
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
Instructions copied from here: http://www.mingw.org/wiki/HOWTO_Use_the_GCC_specs_file | |
1) Check for an existing gcc specs file in <mingw-root>/lib/gcc/mingw32/<gcc-version> | |
2) If it doesn't exist, generate one | |
cd <mingw-root>/lib/gcc/mingw32/<gcc-version> | |
gcc -dumpspecs > specs | |
3) Add to the top of the specs file | |
*local_prefix: |
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.Collections; | |
using System.Collections.Generic; | |
namespace Memento | |
{ | |
public class Coroutine | |
{ | |
public bool Paused { get; set; } | |
internal void Reset(IEnumerator routine) |
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 Microsoft.Xna.Framework.Audio; | |
using System; | |
namespace Fenix.Audio | |
{ | |
public class Vorbis : IDisposable | |
{ | |
public int Channels { get; private set; } | |
public int SampleRate { get; private set; } | |
public float Duration { get; private set; } |
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 System.Collections.Generic; | |
public class ShuffleBag<T> | |
{ | |
public ShuffleBag() : this(-1) { } | |
public ShuffleBag(Int32 seed) | |
{ | |
if(seed < 0) |
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
// Note: Experimental code, probably not production useful! | |
// Get a unique identifier based on the type, without modifying the type | |
// This will be unique for the runtime of the program, but is based on execution | |
// order, so it will possibly change the next time the program runs. | |
// Don't serialize it! | |
using UniqueIdType = uint64_t; | |
struct UniqueIdBase |