http://ln.hixie.ch/?start=1037910467&count=1
http://ln.hixie.ch/?start=1137740632&count=1
/* | |
* Fair License (Fair) | |
* | |
* Copyright (c) 2012, IWAMURO Motonori | |
* | |
* Usage of the works is permitted provided that this instrument is | |
* retained with the works, so that any entity that uses the works is | |
* notified of this instrument. | |
* | |
* DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY. |
// arcfour aka RC4 enc/decrypt function | |
// see: http://en.wikipedia.org/wiki/RC4 | |
arcfour = (function () { | |
"use strict"; | |
var swap = function (a, i, j) { | |
var tmp = a[i]; | |
a[i] = a[j]; | |
a[j] = tmp; | |
}; | |
;; This example shows how to create a single producer and multiple consumers. | |
;; Each consumer will receive the message. I'm not sure if internally it's handled in a round-robin manner, | |
;; but when queue does not listen for messages (e.q. it's processing them), it won't receive one. | |
;; | |
;; In order to run it, use: | |
;; | |
;; lein2 run --mode consumer | |
;; | |
;; And in other window: | |
;; |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
;(function(ns) | |
{ | |
var color = {}; | |
color.reHexTest = /^\s*#[\da-fA-F]{1,6}\s*$/; | |
color.reRgbTest = /^\s*rgb\s*\(\s*\d{1,3}\s*,\s*\d{1,3}\s*,\s*\d{1,3}\s*\)\s*$/i; | |
color.reRgbExec = /^\s*rgb\s*\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*\)\s*$/i; | |
color.reHexExec = /^\s*#([\da-fA-F]{1,2})([\da-fA-F]{1,2})?([\da-fA-F]{1,2})?\s*$/; |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright* (C) 2011 Alex Kloss <[email protected]> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
for (var i = 0; i < 1024 * 1024; i++) { | |
process.nextTick(function () { Math.sqrt(i) } ) | |
} |
Bekanntlich kann CPython Code nicht parallel in Betriebssystem-Threads ausführen. Es gibt den Global Interpreter Lock (GIL), der verhindert, dass dies passiert. Auf einem Computer mit mehr als einer CPU (dem Standard heutzutage), kämpfen alle paar Millisekunden die CPUs um den GIL, was dazu führt, dass die Laufzeit von CPython in diesem Fall deutlich schlechter als das theoretische Maximum ist.
Dieses Python-Programm braucht auf meinem Rechner etwa 9,5s:
def count_down(n):
while n > 0:
n -= 1
@media only screen and (-moz-min-device-pixel-ratio: 2), | |
only screen and (-ms-min-device-pixel-ratio: 2), | |
only screen and (-o-min-device-pixel-ratio: 2), | |
only screen and (-webkit-min-device-pixel-ratio: 2), | |
only screen and (min-device-pixel-ratio: 2) | |
{ | |
#social-links img { | |
background: top left no-repeat; | |
background-size: 25px 25px; | |
display: inline-block; |