Skip to content

Instantly share code, notes, and snippets.

@tkihira
tkihira / gist:2232412
Created March 29, 2012 01:57
test for cc
/**
* @constructor
*/
var f1 = function() {
};
/**
*
*/
f1.prototype.foo = function() {
@tkihira
tkihira / profiler.js
Created March 24, 2012 16:00
JavaScript General Profiler
window.Profiler = {
stackFrame: [],
counters: {},
working: false,
listup: function(name, obj, parentName, parentObj, level) {
if(level > 10) {
return;
}
var fullName = parentName? parentName + "." + name: name;
@tkihira
tkihira / hack version.c
Created March 22, 2012 19:09
switch hack on C
void switch_func(int n) {
char *s;
switch(n) {
case 0:
s = "Sun";
if(0)
case 1:
{ s = "Mon"; }
if(0)
case 2:
@tkihira
tkihira / gist:2161538
Created March 22, 2012 18:43
goto implementation on JavaScript
var gotoLabel;
do {
switch(gotoLabel) {
default:
/* code here... */
gotoLabel = "label1"; break; /*goto lable1*/
case "label1":
/* code here... */
gotoLable = null;
}