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
/* | |
Copyright (c) 2012 Martin Sustrik All rights reserved. | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), | |
to deal in the Software without restriction, including without limitation | |
the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
and/or sell copies of the Software, and to permit persons to whom | |
the Software is furnished to do so, subject to the following conditions: |
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
// MIT License, have fun | |
function sprintf() { | |
var ret = ""; | |
var param = 1; // maps to first % | |
var msg = arguments[0]; | |
for (var i=0; i<msg.length; i++) { | |
if (msg[i] == "%") { | |
// %% will be printed as normal % | |
if (msg[i+1] == "%") { |
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
textures/aaaaaaaaaaa/kungfuckintest | |
{ | |
qer_editorimage textures/kungtile/tile6_dio.jpg | |
surfaceparm woodsteps | |
map textures/kungtile/tile6_dio.jpg | |
bumpMap textures/kungtile/tile6_dio_n.jpg | |
implicitMap textures/kungtile/tile6_dio.jpg | |
} |
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
// When it works: https://i.gyazo.com/cf1ddce65f0eb0233e2389e63487a8ee.jpg | |
// When it doesn't work: https://i.gyazo.com/42e3ef72ffa244c26f2a9503e70af5e6.png | |
// I am calling simpletriangle() in renderer2/tr_backend.c at the end of RB_RenderViewFront: | |
// https://github.com/etlegacy/etlegacy/blob/master/src/renderer2/tr_backend.c#L6045 | |
static void simpletriangle() { | |
GLuint shader_programme; | |
GLuint vao; |
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 "duktape.h" | |
duk_ret_t duk_func_log(duk_context *ctx) { | |
int i; | |
int n = duk_get_top(ctx); /* #args */ | |
char *res; | |
for (i = 0; i < n; i++) { | |
res = (char *)duk_to_string(ctx, i); | |
printf("%s", res); |
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 "duktape.h" | |
duk_ret_t duk_func_log(duk_context *ctx) { | |
int i; | |
int n = duk_get_top(ctx); /* #args */ | |
char *res; | |
for (i = 0; i < n; i++) { | |
res = (char *)duk_to_string(ctx, i); | |
printf("%s", res); |
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 StateMachine = { | |
//--------------------------------------------------------------------------- | |
VERSION: "2.4.0", | |
//--------------------------------------------------------------------------- | |
Result: { |
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
<?php | |
function handle_mysql_error() | |
{ | |
die(mysql_error()); | |
} | |
mysql_connect("127.0.0.1:3306", "username", "password") OR handle_mysql_error(); | |
mysql_select_db("tracker") OR handle_mysql_error(); | |
?> | |
<html> |
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
print("Haii") | |
function log(str) | |
#return ccall(:julia_log, Int, (Cstring,), str) | |
#print(str) | |
leetmenu_log(leetmenu, str); | |
end | |
function pprint(data) |
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
type keyboard_s | |
forward::Int32 | |
backward::Int32 | |
left::Int32 | |
right::Int32 | |
jump::Int32 | |
end | |
address = ccall(:malloc, (Int64), (Int64, ), sizeof(keyboard_s)) | |
ptr = Ptr{keyboard_s}(address) | |
thekeyboard = unsafe_load(ptr) |
OlderNewer