This uses generator functions to generate permutations on demand.
The typescript is the original, the js version is just the compiled typescript.
This uses generator functions to generate permutations on demand.
The typescript is the original, the js version is just the compiled typescript.
@echo off | |
IF "%1" == "" ( | |
echo %cd% >> %userprofile%\_k | |
) ELSE ( | |
IF "%1" == "ls" ( | |
type %userprofile%\_k | |
exit /B | |
) |
JSWEEKLY BINGO | |
+-------------------------------+-------------------------------+-------------------------------+ | |
| An atricle from someone who | | | | |
| just figured out | Baby's first functional | How to do this one very | | |
| prototype-based OO and thinks | programming | specific thing in Node.js | | |
| everyone else needs telling | | | | |
+-------------------------------+-------------------------------+-------------------------------+ | |
| | | | | |
| A new jQuery release | A job in San Francisco | An introduction to an MVC | | |
| | | framework | |
class Wren { | |
construct new() { | |
var a = 0 | |
_list = [1,2,3].map{|i| | |
a = a + 1 | |
return a | |
} | |
} | |
printList() { |
class Wren { | |
construct new() { | |
var a = 0 | |
_list = [1,2,3].map{|i| | |
a = a + 1 | |
return a | |
} | |
} | |
printList() { |
import json | |
import urllib2 | |
import time | |
import sys | |
import lxml.html | |
from datetime import datetime, timedelta | |
# get viewers | |
j = json.load(urllib2.urlopen('https://api.twitch.tv/kraken/streams/speeddemosarchivesda')) |
import socket | |
sock = socket.socket(socket.AF_INET, socket.TCP_NODELAY) | |
sock.connect(('irc.synirc.net', 6667)) | |
sock.setblocking(0) | |
def irc_connect(): | |
buff = '' | |
while 1: | |
try: |
import math | |
import random | |
import functools | |
import sys | |
# an inefficient ga for the travelling salesman problem | |
# stuff to think about: | |
# chromosomes can't be repeated, so crossover and mutation have to be changed | |
# mutation: swap two elements | |
# crossover: use ordered crossover |
if(i==1) | |
return 4; | |
if(i==2) | |
return 4; | |
if(i==3) | |
return 4; | |
if(i==4) | |
return 4; | |
if(i==5) | |
return 4; |
import ctypes, ctypes.wintypes | |
xinputDLL = ctypes.windll.xinput9_1_0 | |
class XINPUT_VIBRATE(ctypes.Structure): | |
_fields_ = [ | |
('left_motor', ctypes.wintypes.WORD), | |
('right_motor', ctypes.wintypes.WORD), | |
] |