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 f = io.open("a.txt", "r") | |
local malloc = {} | |
for line in f:lines() do | |
local typ, ptr, src = string.match(line, "([^:]+):([^:]+):(.*)") | |
if typ == "malloc" then | |
malloc[ptr] = src | |
end | |
if typ == "free" then | |
malloc[ptr] = nil |
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
daemon = 0 | |
bootstrap = "test/testhttp.lua" | |
lualib_path = "test/?.lua;lualib/?.lua" | |
lualib_cpath = "test/?.so;luaclib/?.so" | |
ctrl="192.168.2.1@8002" | |
tunnel="192.168.2.1@8003" |
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
Shader "Template" { | |
Properties { | |
_Color("Color", Color) = (1, 1, 1, 1) | |
_Specular("Specular Color", Color) = (1, 1, 1, 1) | |
_Gloss("Gloss", Range(8.0, 256.0)) = 20 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" "Queue"="Geometry"} | |
Pass { | |
Tags { "LightMode"="ForwardBase" } |
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
#include <stdio.h> | |
#include <stdlib.h> | |
static int input[] = { | |
9, 2, | |
3, 7, | |
7, 5, | |
5, 8, | |
8, 6, | |
4, 6, |
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.Collections; | |
using System.Collections.Generic; | |
using System.Linq; | |
using UnityEngine; | |
using UnityEditor; | |
class MeshBuilder { | |
private readonly List<Vector3> vertices = new List<Vector3>(); | |
private readonly List<Vector3> normals = new List<Vector3>(); |
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 LINK = require "link" | |
local buffer = setmetatable({ | |
link = nil | |
}, {__gc = function(tbl) | |
LINK.free(tbl.link) | |
end}) | |
buffer.link = LINK.new() | |
LINK.push(buffer.link) | |
LINK.push(buffer.link) | |
buffer = nil |
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.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
using UnityEditor; | |
using UnityEngine.Profiling; | |
namespace Profiler { |
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
#include <assert.h> | |
#include <time.h> | |
#include <ctype.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <string.h> | |
//#define DEBUG | |
#define TERM (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
using System; | |
using System.IO; | |
using System.Net; | |
using System.Collections; | |
using System.Net.Sockets; | |
using UnityEngine; | |
class Stream { | |
private byte[] buffer = null; | |
private int length = 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
local concat = table.concat | |
local tree = {} | |
local function tree_add(str) | |
local p = tree | |
for i = 1, #str do | |
local c = str:byte(i) | |
local n = p[c] | |
if not n then | |
n = {} |
OlderNewer