- Welcome to the Jungle - Guns N' Roses - jungle.asyncjs.com
- JavaScript Garden?
- Special Features
- Hoisting (scope!)
- Closures (and how to get most out of those)
- Prototypes (vs. classes as in Java etc.)
- ???
- Common Problems
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
type: rating | |
title: JavaScript Color Pickers | |
user: bebraw | |
slug: javascript-color-pickers | |
includes: [nativeColorPicker, colorjoe, Flexi Colorpicker, SimpleColor, ExColor, JavaScript Colorpicker, Farbtastic, mooRainbow, jPicker] | |
body: | | |
If you are building an application that deals with graphics somehow, you are likely going to need a color picker. Fortunately | |
there are quite a few of those available for JavaScript. HTML5 includes `color` input type even. One color picker, aptly | |
named `nativeColorPicker`, provides a shim for Internet Explorer so that you have got all bases covered. Other pickers | |
available are more specialized. |
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
define(['../common/annotate', '../math/range', '../functional/map', '../operators/gt'], function(annotate, range, map, gt) { | |
function chunk(len, a) { | |
return map(function(k) { | |
return a.slice(k, k + len); | |
}, range(0, a.length, len)); | |
} | |
return annotate(chunk, gt(0), Array); | |
}); |
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
// https://github.com/visionmedia/mocha | |
var assert = require("assert"); | |
describe('Array', function(){ | |
describe('#indexOf()', function(){ | |
it('should return -1 when the value is not present', function(){ | |
assert.equal(-1, [1,2,3].indexOf(5)); | |
assert.equal(-1, [1,2,3].indexOf(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
// ==UserScript== | |
// @name Bugira Script | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.55 | |
// @description injects bugira script | |
// @match http://jswiki.codegyre.com/* | |
// @copyright 2012+, You | |
// ==/UserScript== | |
// http://stackoverflow.com/questions/2246901/how-can-i-use-jquery-in-greasemonkey-scripts-in-google-chrome |
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
struct { | |
uint8_t fac; | |
uint8_t fac2; | |
} params; | |
struct { | |
xyz_t xyz[10]; | |
} vars; | |
... // effect def etc. |
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
http://designinghypermediaapis.com/ | |
http://www.udacity.com/overview/Course/ep245/CourseRev/1 | |
http://www.ashmaurya.com/ | |
http://jswiki.org/ |
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
build/release/firmware.elf: tiedostomuoto elf32-avr | |
Lohkot: | |
Ind Nimi Koko VirMuisOs LatMuisOs TiedSiir Tasaus | |
0 .data 00000010 00800100 0000153a 000015ee 2**0 | |
CONTENTS, ALLOC, LOAD, DATA | |
1 .text 0000153a 00000000 00000000 000000b4 2**1 | |
CONTENTS, ALLOC, LOAD, READONLY, CODE | |
2 .bss 0000066f 00800110 00800110 000015fe 2**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
#!/usr/bin/env python | |
import os | |
def walk(path, extensions, cb): | |
path = os.path.abspath(path) | |
for f in os.listdir(path): | |
fp = os.path.join(path, f) | |
p, ext = os.path.splitext(f) |
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
effects = { // note that this is supposed to be ordered dict! (alternative, use list + name prop) | |
sine: { | |
init: function() {...}, | |
exec: function() {...}, | |
}, | |
gameOfLife: { | |
init: function() {...}, | |
exec: function() {...}, | |
accumulate: true // defaults to false | |
}, |