Skip to content

Instantly share code, notes, and snippets.

$ nm -a Icons8App.app/Contents/MacOS/Icons8App
U _CFArrayAppendArray
U _CFArrayAppendValue
U _CFArrayApplyFunction
U _CFArrayCreateMutable
U _CFArrayGetCount
U _CFArrayGetValueAtIndex
U _CFArrayRemoveValueAtIndex
U _CFBinaryHeapAddValue
U _CFBinaryHeapCreate
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
;dimensions of square world
var $es = [];
var findLeaves = function(i, $root) {
console.log($root);
$children = $root.children();
if($children.length > 0) {
$children.each(findLeaves);
}
else {
$es.push($root);
}
@nmtitov
nmtitov / 1
Created November 15, 2012 22:52
var x = 20;
var A = function () {
this.list = [1, 2, 3, 4, 5];
this.x = 10;
}
A.prototype.test = function() {
this.list.forEach(function (element) {
console.log(Math.pow(element, this.x));
// конструктор родительского класса
var A = function () {
this.x = 10;
this.y = 10;
this.area = function () {
return this.x * this.y;
}
}
// A.prototype.area = function () {
@nmtitov
nmtitov / gist:4056062
Created November 11, 2012 19:58
while
count = 0; // globals ftw
var my_cond = function () {
return count <= 10;
}
var my_block = function () {
console.log(count);
return count = count + 1;
}
@nmtitov
nmtitov / gist:3642720
Created September 5, 2012 19:06
EntityManager
var EntityManager = (function() {
function EntityManager () {
var self = this;
self.entropy = 0;
self.entities = [];
}
EntityManager.prototype.generateUid = function() {
var self = this;
var BrushToolDelegate = (function() {
function BrushToolDelegate (tool) {
var self = this;
self.tool = tool;
self.picked = null;
}
/* abstract - override this! */
BrushToolDelegate.prototype.outcome = function () {}
/*
* Door Tool class inherits Tool and uses
* Door Tool Delegate which implements
* informal Tool Delegate interface
*/
var DoorToolDelegate = (function(_super) {
__extends(DoorToolDelegate, _super);
var Tool = (function() { // abstract class (inherit to use)
/* Informal tool delegate interface
* (string) ToolDelegate.prototype.outcome = function () {}
* (boolean) ToolDelegate.prototype.shouldApplyTo = function (destPt) {}
* (null) ToolDelegate.prototype.didApplyTo = function (destPt) {}
* (boolean) ToolDelegate.prototype.shouldCleanAt = function (destPt) {}
* (null) ToolDelegate.prototype.didCleanAt = function (destPt) {}
*/