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
1 0 LOAD_CONST 0 (5) | |
2 STORE_NAME 0 (x) | |
2 4 LOAD_NAME 0 (x) | |
6 LOAD_CONST 0 (5) | |
8 COMPARE_OP 0 (<) | |
10 POP_JUMP_IF_FALSE 22 | |
3 12 LOAD_NAME 1 (print) | |
14 LOAD_CONST 1 ('x less than 5') |
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
var i : number = 9; | |
/** Simple less then checks */ | |
var v = i < 5+5; | |
var v = i <5+5; | |
var v = i<5+5; | |
var v=i<5+5; | |
/** If statement no space before "<" */ | |
if (i<5+5) { console.log("something"); } |
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
// Example code for a simple custom validator using github.com/vladvelici/valid | |
// | |
// This program outputs: | |
// | |
// $ ./valid-example hello | |
// Validation result: 2 errors. | |
// 1. Not "example" (case-insensitive). | |
// 2. Not exactly "example". | |
// | |
// $ ./valid-example example |
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
// This tool gets a list of random words form a given dictionary. | |
// The dictionary must be specified using the -dict flag. | |
// The number of words can be specified using the -n flag. | |
// The number of words is, | |
// by default, 10 or, if the dictionary is smaller, half its size. | |
package main | |
import ( | |
"bufio" | |
"flag" |
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
why git? | |
- remove the goddamn folders like final, final_final, ultimate, submit etc | |
- keep versioning in a sane order | |
- branch and experiment (feel free to code drunk) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>video test</title> | |
</head> | |
<body> | |
<video width='500' height='500' id='v'></video> | |
<canvas width='500' height='500' id='c'></canvas> | |
<script type="text/javascript"> |
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 | |
# I really tested this file. it works. :) | |
print "Hello world!" | |
# :) |
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
# (C) 2012 Vlad Velici | |
# Released under MIT licence. See licence.txt | |
# ==== | |
# USAGE: | |
# | |
# gtin14 = Barcode::standardize "123456" | |
# --- OR --- | |
# bc = Barcode.new "123456" | |
# bc.gtin [the given code in GTIN-14 format] | |
# bc.original_type [:ean13|:ean8|:gtin|:upca|:upce] [the type of the input barcode] |