(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
enum Node { | |
TVector(&'static str), | |
TScalar(f32), | |
Add(Box<Node>, Box<Node>), | |
Sub(Box<Node>, Box<Node>), | |
Mul(Box<Node>, Box<Node>), | |
Div(Box<Node>, Box<Node>), | |
Pow(Box<Node>, Box<Node>), | |
} |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
if [ $EUID != 0 ]; then | |
echo "It's a weird tree." | |
else | |
echo ' _ __' | |
echo ' / `\ (~._ ./ )' | |
echo ' \__/ __`-_\__/ ./' | |
echo ' _ \ \/ \ \ |_ __' | |
echo ' ( ) \__/ -^ \ / \' | |
echo ' \_/ " \ | o o |.. / __' | |
echo " \\. --' ==== / || / \\ " |
# coding=UTF-8 | |
from __future__ import division | |
import nltk | |
from collections import Counter | |
# This is a simple tool for adding automatic hashtags into an article title | |
# Created by Shlomi Babluki | |
# Sep, 2013 | |
(ns sudoku | |
(:refer-clojure :exclude [==]) | |
(:use [clojure.core.logic]) | |
(:require [clojure.core.logic.fd :as fd])) | |
(defn init-board [vars puzzle] | |
(matche [vars puzzle] | |
([[] []] | |
succeed) |
node -e 'process.stdin.pipe(require("fs").createWriteStream(process.argv[1]))' FILENAME |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
# vim: set fileencoding=utf8 | |
''' | |
References | |
- http://stackoverflow.com/a/1966188 | |
- http://en.wikipedia.org/wiki/Tree_(data_structure) | |
$ python suggest.py prefix | |
''' | |
import sys | |
import redis |
eXtreme Go Horse (XGH) Process | |
Quelle: http://gohorseprocess.wordpress.com | |
Übersetzung ursprünglich von https://gist.github.com/Neffez/f8d907ba8289f14e23f3855011fa4e2f | |
1. Ich denke, also ist es nicht XGH. | |
In XGH wird nicht gedacht, es wird das erste gemacht, was in den Sinn kommt. Es gibt auch keine zweite Option, die erste ist schneller. | |
2. Es gibt 3 Wege ein Problem zu lösen: den richtigen Weg, den falschen Weg und den XGH Weg, welcher exakt wie der falsche ist, aber schneller. |
function rice_chessboard ( A ) { | |
return checkPath(A[0][0], 0, 0, A) | |
} | |
function checkPath(val, x, y, board){ | |
if(board[x + 1] && board[x][y+1]){ //If there is room | |
var possibility1 = checkPath(val + board[x][y+1], x, (y+1), board); | |
var possibility2 = checkPath(val + board[x+1][y], (x+1), y, board); | |
return possibility1 > possibility2 ? possibility1 : possibility2; |