- Technology
- Programming Languages
- Haskell
- Rust
- Elixir
- Go
- DBMS
- Mongo Db
- Programming Languages
- PrestoDb
class Fixnum | |
VERSION=1 | |
ROMAN_SYMBOL_MAPPING= { | |
1=> "I", | |
5=> "V", | |
10=>"X", | |
50=>"L", | |
100=>"C", | |
500=>"D", | |
1000=>"M" |
<html> | |
<head> | |
<link rel="canonical" href="<%= current_uri_sans_amp %>"> | |
</head> | |
... | |
</html> |
require 'omniauth-oauth2' | |
# this OmniAuth-Strategy uses the Keyrock Identity Management | |
# see http://catalogue.fiware.org/enablers/identity-management-keyrock | |
# The server url is from the public FIWARE Lab instance. | |
module OmniAuth | |
module Strategies | |
class FilabStrategy < OmniAuth::Strategies::OAuth2 | |
option :name, "filab" | |
option :client_options, { |
This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.
###Array ####Definition:
- Stores data elements based on an sequential, most commonly 0 based, index.
- Based on tuples from set theory.
#!/usr/bin/env ruby | |
require 'date' | |
require 'rubygems' | |
require 'libnotify' | |
require 'net/http' | |
require 'rexml/document' | |
require 'xmlsimple' | |
def every( time ) | |
Thread.new { | |
loop do |
It's pretty easy to do polymorphic associations in Rails: A Picture can belong to either a BlogPost or an Article. But what if you need the relationship the other way around? A Picture, a Text and a Video can belong to an Article, and that article can find all media by calling @article.media
This example shows how to create an ArticleElement join model that handles the polymorphic relationship. To add fields that are common to all polymorphic models, add fields to the join model.
=> Booting Mongrel | |
=> Rails 3.0.6 application starting in development on http://0.0.0.0:3000 | |
=> Call with -d to detach | |
=> Ctrl-C to shutdown server | |
Exiting | |
/home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.6/lib/active_support/core_ext/module/introspection.rb:70:in `const_get': uninitialized constant ActionView::ActionViewError (NameError) | |
from /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.6/lib/active_support/core_ext/module/introspection.rb:70:in `local_constants' | |
from /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.6/lib/active_support/core_ext/module/introspection.rb:70:in `each' | |
from /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.6/lib/active_support/core_ext/module/introspection.rb:70:in `local_constants' | |
from /home/user/.rvm/gems/ruby-1.8.7-head/gems/activesupport-3.0.6/lib/active_support/core_ext/module/introspection.rb:68:in `each' |
rails s --trace |pastebinit | |
/home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/optparse.rb:1450:in `complete': invalid option: --trace (OptionParser::InvalidOption) | |
from /home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/optparse.rb:1448:in `catch' | |
from /home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/optparse.rb:1448:in `complete' | |
from /home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/optparse.rb:1261:in `parse_in_order' | |
from /home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/optparse.rb:1254:in `catch' | |
from /home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/optparse.rb:1254:in `parse_in_order' | |
from /home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/optparse.rb:1248:in `order!' | |
from /home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/optparse.rb:1339:in `permute!' | |
from /home/user/.rvm/rubies/ruby-1.8.7-head/lib/ruby/1.8/optparse.rb:1360:in `parse!' |