12:10pm Friday
Cory Benfield. (Core contributor to the requests library)
- HTTP/1.1 was standardized in 1996.
- TCP works best if you keep a connection alive and keep sending data down it.
var walk; | |
(function() { | |
function showId(tag) { | |
return tag.id ? '#' + tag.id : ''; | |
} | |
function showClasses(tag) { | |
var classes = ""; | |
for (var i = 0; i < tag.classList.length; i++) { |
// ==UserScript== | |
// @name Fix gmail images | |
// @namespace fixGmailImages | |
// @match https://mail.google.com/* | |
// ==/UserScript== | |
// | |
(function() { | |
function fix() { | |
var images = document.getElementsByTagName('img'); | |
for (var i = 0; i < images.length; i++) { |
" Vim color file | |
" Maintaner: Radu Dineiu <[email protected]> | |
" URL: http://ld.yi.org/vim/rdark/ | |
" Last Change: 2007 Jun 23 | |
" Version: 0.6 | |
" | |
" Features: | |
" - let rdark_current_line = 1 if you want to highlight the current line | |
" | |
" Changelog: |
data CrazyList a = CL a (CrazyList [a]) | End | |
-- Try compiling this without either type annotation: | |
f :: CrazyList a -> Int | |
f End = 0 | |
f (CL x rest) = g x rest | |
g :: a -> CrazyList [a] -> Int | |
g x rest = 1 + (f rest) |
-- requires "mtl" | |
import Control.Monad.State | |
import Control.Monad.Except | |
import Data.Map (Map) | |
import qualified Data.Map as Map | |
data Err = Missing String | OtherErr | |
deriving (Eq, Show) |
import Control.Monad (liftM) | |
import Control.Monad.Except | |
type MyMonad = ExceptT String IO | |
successVal :: MyMonad Int | |
successVal = return 123 | |
errVal :: MyMonad Int | |
errVal = throwError "this is an error" |
import Control.Concurrent | |
main = do | |
setNumCapabilities 4 | |
result <- parallelDoWork 38 4 | |
--result <- doWork 38 4 | |
putStrLn $ show result | |
parallelDoWork n m = do | |
resultMVars <- mapM (\_ -> forkWork n) [1..m] |