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
// "License": Public Domain | |
// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like. | |
// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to | |
// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it | |
// an example on how to get the endian conversion functions on different platforms. | |
#ifndef PORTABLE_ENDIAN_H__ | |
#define PORTABLE_ENDIAN_H__ | |
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) |
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
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.Net; | |
using System.Text; | |
using common; | |
using System.Security.Cryptography.X509Certificates; | |
using System.Net.Security; | |
namespace federation |
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 UnitTest = {} | |
local meta = { __index = UnitTest } | |
function UnitTest.New() | |
local inst = { | |
numTests = 0, | |
failed = {} | |
} | |
setmetatable(inst, meta) |
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 Packet = {} | |
-- packet.data is a binary string | |
-- packet.pos is position of current reading pos | |
local str = string | |
local packetMeta = { __index = Packet, __len = function(p) return #p.data end } | |
function Packet.New(inData) |
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
using UnityEngine; | |
using System.Linq; | |
using System; | |
using System.Reflection; | |
using System.Collections.Generic; | |
namespace playingtest | |
{ | |
public class TestAttribute : Attribute |
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
function HexDump(buf) | |
local s = {} | |
s.output = '' | |
for byte=1, #buf, 16 do | |
local chunk = buf:sub(byte, byte+15) | |
s.output = s.output .. string.format('%08X ',byte-1) | |
chunk:gsub('.', function (c) s.output = s.output .. string.format('%02X ',string.byte(c)) end) | |
s.output = s.output .. string.rep(' ',3*(16-#chunk)) | |
s.output = s.output .. chunk:gsub('%c','.') .. "\n" | |
end |
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
import os | |
import sys | |
import fnmatch | |
FlashExe= r'"D:\opt\FlashCS6\Adobe Flash CS6\Flash.exe"' | |
def collectAllFla(fla, dirname, names): | |
for n in names: | |
p = os.path.join(dirname, n) |
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
-- https://blog.acolyer.org/2016/11/23/hashed-and-hierarchical-timing-wheels/ | |
-- Scheme 6 | |
local Timer = {} | |
local kMaxIntervalShift = 4 --> 1 << kMaxIntervalShift seconds | |
local kMaxSlots = 1 << kMaxIntervalShift | |
local kSlotsMask = kMaxSlots - 1 | |
local origin = os.clock() | |
local pointer = 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
// This is used by 3dsmax to load the correct parser | |
string ParamID = "0x0"; | |
float FixedLightmapIntensity = 1.5; | |
int texcoord0 : Texcoord | |
< | |
int Texcoord = 0; | |
int MapChannel = 1; |
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
using UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEditor; | |
using UnityEngine.Sprites; | |
public class BitmapFontWizard : ScriptableWizard { | |
public Texture2D fontTexture; |
OlderNewer