- Read every row in the table
- No reading of index. Reading from indexes is also expensive.
au BufRead,BufNewFile jquery.*.js set ft=javascript syntax=jquery | |
set nocompatible | |
set autoindent | |
set tabstop=2 | |
set showmatch | |
set vb t_vb= | |
set ruler | |
set nohls | |
set incsearch | |
syntax on |
Install Python
$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7
Symlinks...
At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)
Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.
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 |
Backbone is a library of tools that simplify the design and implementation of client-side web applications. It is explicitly not a framwework. Backbone does not provide guidance about how to assemble an application. This post will be an initial attempt at filling that gap. It assumes an intermediate level of Backbone.js knowledge. If you have never used Backbone.js try Backbone.js Basics or the Backbone.js homepage.
I like to provide a root object/namespace for my application. Let's call it app
.
var app = {};
Register Components on the Application Object
WorkflowEventsController < ApplicationController | |
# . . . | |
def create | |
workflow_event = WorkflowEvent.new(params[:workflow_event]) | |
@some_model = SomeModel.find(params[:some_model_id] | |
SomeWorkflow.new(current_user, @some_model).handle(workflow_event) do |result| | |
result.on_success { render :template => 'success' } | |
result.on_failure { render :template => 'failure' } | |
end | |
end |
class Node: | |
def __init__(self,val,nxt): | |
self.val = val | |
self.nxt = nxt | |
def prnt(n): | |
nxt = n.nxt | |
print n.val | |
if(nxt is not None): | |
prnt(nxt) |