(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.
| package main | |
| import ( | |
| "encoding/json" | |
| "log" | |
| "net/http" | |
| "reflect" | |
| "time" | |
| "github.com/gorilla/context" |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "time" | |
| "github.com/gorilla/context" | |
| "github.com/codegangsta/negroni" |
| package main | |
| import ( | |
| "database/sql" | |
| "encoding/json" | |
| "errors" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "time" |
(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.
| package com.segmint.jdbi; | |
| import java.lang.reflect.Constructor; | |
| import java.lang.reflect.Field; | |
| import java.lang.reflect.ParameterizedType; | |
| import java.lang.reflect.Type; | |
| import java.math.BigDecimal; | |
| import java.sql.Array; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns on recent CPU
L2 cache reference ........................... 7 ns 14x L1 cache
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs 4X memory
| data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script> | |
| <!-- | |
| For other language: Instead of `ace/mode/ruby`, Use | |
| Markdown -> `ace/mode/markdown` | |
| Python -> `ace/mode/python` | |
| C/C++ -> `ace/mode/c_cpp` | |
| Javscript -> `ace/mode/javascript` | |
| Java -> `ace/mode/java` | |
| Scala- -> `ace/mode/scala` |
| import play.api._ | |
| import mvc._ | |
| import controllers.Info.VERSION_PROPERTY | |
| import controllers.Info.DEFAULT_VERSION | |
| object Global extends GlobalSettings { | |
| val VERSION_PROPERTY = "my.property.name" | |
| val DEFAULT_VERSION = "0.0.0" |
| #!/bin/sh | |
| # Just copy and paste the lines below (all at once, it won't work line by line!) | |
| # MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY! | |
| function abort { | |
| echo "$1" | |
| exit 1 | |
| } | |
| set -e |