GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
Hint: I also mad an octave docset for Dash: https://github.com/obstschale/octave-docset
#! /usr/bin/env stack | |
-- stack --resolver lts-18.8 script | |
{-# LANGUAGE OverloadedStrings #-} | |
{- | |
This is a handy illustration of converting between five of the commonly-used | |
string types in Haskell (String, ByteString, lazy ByteString, Text and lazy | |
Text). |
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback | |
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB; | |
// Open (or create) the database | |
var open = indexedDB.open("MyDatabase", 1); | |
// Create the schema | |
open.onupgradeneeded = function() { | |
var db = open.result; | |
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"}); |
GNU Octave is a high-level interpreted language, primarily intended for numerical computations.
(via GNU Octave)
Hint: I also mad an octave docset for Dash: https://github.com/obstschale/octave-docset
##git mergetool
In the middle file (future merged file), you can navigate between conflicts with ]c
and [c
.
Choose which version you want to keep with :diffget //2
or :diffget //3
(the //2
and //3
are unique identifiers for the target/master copy and the merge/branch copy file names).
:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
{-# LANGUAGE FlexibleContexts #-} | |
import Data.Conduit | |
import qualified Data.Conduit.List as CL | |
import Network.HTTP.Conduit | |
import Control.Concurrent.Async (mapConcurrently) | |
import Control.Concurrent.MVar | |
import Control.Monad.IO.Class (liftIO) | |
import Control.Monad.Trans.Control (MonadBaseControl) |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
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 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
" Gopi's _gvimrc file https://github.com/GopinathMR | |
" This file has been modified to make it work on both Windows and Linux | |
" Github gist location : https://gist.github.com/1100054 | |
" If you find any issues or add any enhancements, please submit revised version as gist | |
"---------------------------------------------------------------------------------------------------------- | |
" 1. OS specific | |
if ($OS == 'Windows_NT') | |
" Windows specific settings |