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 DeleteArrayElements( array, index, count ) | |
-- Deletes one or more (count) array elements from the specified index. | |
-- Returns an undo function, which if called would revert the operation. | |
local deletedElements = {} | |
assert( index >= 1 and index <= #array, "index=" .. index .. " must be >= 1 and <= " .. #array .. " (#array)" ) | |
assert( count >= 1 and count <= #array - index + 1, "count=" .. count .. " must be >= 1 and <= " .. #array - index + 1 .. " (#array - index + 1) where #array=" .. #array .. " and index=" .. index) | |
for i = 0, count - 1 do |
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
#!/bin/sh | |
SDK=`dirname $0` | |
SCRIPT=`basename $0` | |
SDKPARENT=`dirname $SDK` | |
PLATFORM=`uname -sp` | |
if [ "$PLATFORM" = "Darwin i386" -o "$PLATFORM" = "Darwin x86_64" ]; then | |
echo "iPhone Toolchain installer script by rpetrich" | |
echo "" |
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> | |
char hex( char h ) | |
{ | |
signed char xa = '0' - h; | |
signed char xb = h - ('9' + 1); | |
signed char ya = ('A' - 1) - h; | |
signed char yb = h - ('F' + 1); | |
signed char za = ('a' - 1) - h; | |
signed char zb = h - ('f' + 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
;; Lispworks 6.00 required and p4 executable | |
;; Tested only under Vista 64 bit with Lispworks Professional 32-bit | |
;; | |
(defpackage "P4BEE" (:use "CL")) | |
(in-package "P4BEE") | |
(eval-when (:compile-toplevel :load-toplevel :execute) | |
(let ((dir (or *compile-file-truename* *load-truename* *default-pathname-defaults*))) | |
(format t "*compile-file-truename* = ~A~&" *compile-file-truename*) | |
(format t "*load-truename* = ~A~&" *load-truename*) |
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> | |
/* | |
malkia ~/p $ gcc nan.c | |
nan.c: In function ‘print_range’: | |
nan.c:15: warning: format ‘%p’ expects type ‘void *’, but argument 2 has type ‘unsigned int’ | |
nan.c:15: warning: format ‘%p’ expects type ‘void *’, but argument 3 has type ‘unsigned int’ | |
nan.c:15: warning: format ‘%p’ expects type ‘void *’, but argument 4 has type ‘unsigned int’ | |
malkia ~/p $ ./a.out | |
[0x7f800001 .. 0x7fffffff], total of 0x7fffff (8388607) |
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
@start /B /MAX %~dp0\emacs -g 216x69+0+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 ffi = require( "ffi" ) | |
local function wraplib( lib, options ) | |
local function LOG(...) | |
if options.verbose then | |
print(...) | |
end | |
end | |
return setmetatable ( | |
{}, |
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
LuaJIT 2.0.0-beta6 -- Copyright (C) 2005-2011 Mike Pall. http://luajit.org/ | |
JIT: ON CMOV SSE2 SSE3 fold cse dce fwd dse narrow loop abc fuse | |
> | |
1 | |
2 | |
__index: importing from library <userdata: 0x0004f2e0> | |
into table <table: 0x0004f398> | |
the symbol curl_easy_init = cdata<void **()>: 0x00043820 |
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
// x64 | |
// | |
using System; | |
using System.Diagnostics; | |
using System.Threading; | |
using System.Windows.Forms; | |
namespace GenericSpeedTest | |
{ |
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 <windows.h> | |
#include <stdio.h> | |
// to compile: | |
// cl fileinfo.c setargv.obj | |
void fileinfo(const char*name); | |
int main( int argc, const char* argv[] ) | |
{ | |
int i; |