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
// Original is http://d.hatena.ne.jp/uupaa/20090116/1232051707 | |
var array = []; | |
var notarray = {}; | |
(function () { | |
var S = new Date*1; | |
var toString = Object.prototype.toString; | |
for (var i = 0; i < 5000000; i++) { ( toString.call(array) === "[object Array]" ) } | |
print('Array#Object.prototype.toString.call : ' + (new Date-S)); | |
}()); |
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
=begin | |
RGSSRuntime Module 1.0 for RPG Maker XP/VX/VX Ace | |
http://orzFly.com/html/rgssruntime.html | |
Copyright 2013-2014 Yeechan Lu a.k.a. orzFly <i@orzFly.com> | |
Partial Copyright 2013-2014 Seiran A. [http://seiran.mist.so/] | |
Permission is hereby granted, free of charge, to any person obtaining a | |
copy of this software and associated documentation files (the "Software"), |
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 limitEval(code, fnOnStop, opt_timeoutInMS) { | |
var id = Math.random() + 1, | |
blob = new Blob( | |
['onmessage=function(a){a=a.data;postMessage({i:a.i+1});postMessage({r:eval.call(this,a.c),i:a.i})};'], | |
{ type:'text/javascript' } | |
), | |
myWorker = new Worker(URL.createObjectURL(blob)); | |
function onDone() { | |
URL.revokeObjectURL(blob); |
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
# Load importer part of fiddle (ffi) library | |
require 'fiddle/import' | |
# Create module as body for an importer instance | |
module MessageBox | |
# Extend this module to an importer | |
extend Fiddle::Importer | |
# Load 'user32' dynamic library into this importer | |
dlload 'user32' | |
# Set C aliases to this importer for further understanding of function signatures |
NewerOlder