class FunctionType:
def __init__(self, tyA, tyB):
self.tyA = tyA
self.tyB = tyB
def __eq__(self, other):
return self.tyA == other.tyA and self.tyB == other.tyB| var Dialog = React.createClass({ | |
| render: function() { | |
| // 1) render nothing, this way the DOM diff will never try to do | |
| // anything to it again, and we get a node to mess with | |
| return React.DOM.div(); | |
| }, | |
| componentDidMount: function() { | |
| // 2) do DOM lib stuff | |
| this.node = this.getDOMNode(); |
| package main | |
| import ( | |
| "encoding/hex" | |
| "flag" | |
| "io" | |
| "io/ioutil" | |
| "log" | |
| "net" | |
| "os" |
| function someLibraryCode(callback, dataProvider) { | |
| dataProvider(function (error, data) { | |
| if (error) { | |
| callback(error); | |
| return; | |
| } | |
| var newData = mungeData(data); | |
| callback(null, newData); | |
| }); | |
| } |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| 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 |
- Swap Control and Caps Lock in System Preferences -> Keyboard -> Modifier Keys
- Google Chrome http://www.google.com/chrome/
- iTerm2 http://www.iterm2.com/
- Oh my zsh https://github.com/robbyrussell/oh-my-zsh/
- XCode (from the mac app store)
- XCode command line tools (run XCode, go to Preferences -> Downloads -> Command Line Tools)
- Homebrew https://github.com/mxcl/homebrew/wiki/installation
| """ | |
| A really stupid python template language inspired by coffeekup, markaby. | |
| Do not use this code, it will ruin your day. A byproduct of insomnia. | |
| TL;DR | |
| ----- | |
| This module defines a template language that allows us to do: | |
| d = Doc() |
If you don't care about the explanation, scroll down to find the code, it's 50 some odd lines and written by someone who doesn't know any better. You have been warned.
This is a very simple proof of concept jitting RPN calculator implemented in python. Basically, it takes the source code, tokenizes it via whitespace, and asks itself one simple question: am I looking at a number or not?
First, let's talk about the underlying program flow. Pretend that you are a shoe connoisseur with a tiny desk. You may only have two individual shoes on that desk at any one time, but should you ever purchase a new one or get harassed by an unruly shoe salesman without realizing that you have the power to say no (or even maybe?), you can always sweep aside one of the two shoes on the desk (the one on the right, because you're a lefty and you feel that the left side is always superior) onto the messy floor, put the other shoe on the right hand side, and then place your newly acquired shoe in
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> | |
| <script src="http://cdn.simplegeo.com/js/1.2/simplegeo.context.jq.min.js"></script> | |
| <script type="text/javascript" src="http://github.com/simplegeo/polymaps/raw/v2.4.0/polymaps.js"></script> | |
| </head> | |
| <body> | |
| <script type="text/javascript"> |