Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
require 'rubygems' | |
require 'socket' | |
include Socket::Constants | |
class ChatServer | |
def initialize | |
@reading = Array.new | |
@writing = Array.new | |
@clients = Hash.new |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
fizz = function f() { | |
fizz = function () { | |
fizz = function () { | |
fizz = f | |
return "Fizz" | |
} | |
} | |
} | |
buzz = function f() { |
Updated for Rails 4.0.0+
Set up the bower
gem.
Follow the Bower instructions and list your dependencies in your bower.json
, e.g.
// bower.json
{
# http://stackoverflow.com/questions/14972253/simpleform-default-input-class | |
# https://github.com/plataformatec/simple_form/issues/316 | |
inputs = %w[ | |
CollectionSelectInput | |
DateTimeInput | |
FileInput | |
GroupedCollectionSelectInput | |
NumericInput | |
PasswordInput |
inputs = %w[ | |
CollectionSelectInput | |
DateTimeInput | |
FileInput | |
GroupedCollectionSelectInput | |
NumericInput | |
PasswordInput | |
RangeInput | |
StringInput | |
TextInput |
Why Should I Care (For Developers)
"Dockerが面白いのはシンプルな環境に隔離性と再現性をもたらしてくれることだ.ランタイムの環境を一度作れば、パッケージにして別のマシンでも再利用することできる.さらに,すべてはホスト内の隔離された環境で行われる(VMのように).最も素晴らしい点は,シンプルかつ高速であることだ."
# | |
# Example from code built on the Flask web framework (and Werkzeug) | |
# Accepts uploading a photo file in the 'photo' form member, then | |
# copies it into a memory byte array and converts it to a numpy array | |
# which in turn can be decoded by OpenCV. | |
# | |
# Beware that this increases the memory pressure and you should | |
# configure a max request size before doing so. | |
# | |
# It saves a round-trip to a temporary file, though. |
extension String { | |
func encodeURIComponent() -> String? { | |
var characterSet = NSMutableCharacterSet.alphanumericCharacterSet() | |
characterSet.addCharactersInString("-_.!~*'()") | |
return self.stringByAddingPercentEncodingWithAllowedCharacters(characterSet) | |
} | |
} |