#List of countries / Список стран
ISO 3166-1
En list forked from https://gist.github.com/396531
import { batch, Component, createEffect, createMemo, onCleanup, onMount } from 'solid-js'; | |
import { createStore } from 'solid-js/store'; | |
const Window: Component<{ | |
title?: string, | |
width?: number, | |
height?: number, | |
initX?: number, | |
initY?: number, | |
}> = (props) => { |
#List of countries / Список стран
ISO 3166-1
En list forked from https://gist.github.com/396531
module Bar | |
module ClassMethods | |
# `new` is a class method on the `Class` object | |
# It then uses `send` to access `initialize` which would otherwise be a private instance method | |
# So it can be overridden by extending the your class with a new `new` class method | |
def new(*args, &block) | |
super | |
p "new constructor defined" | |
end | |
end |
# interpreted AST | |
system ~/projects/jruby $ jruby.bash -X-C mandelbrot.rb 20 | |
warming up | |
running mandelbrot(500) for 20 iterations | |
4.862 | |
4.822 | |
4.822 | |
4.846 | |
5.057 |
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |
module Taggable | |
extend ActiveSupport::Concern | |
included do | |
attr_accessible :tags | |
after_save :set_tags | |
after_destroy :unset_tags | |
end |
SourceFileInfo.find_or_create_by(hash: hash) do |sfi| | |
sfi.name = file_id | |
sfi.ext = ext | |
sfi.path = file_path | |
sfi.original_name = original_name | |
sfi.user = user | |
end |
require 'spec_helper' | |
describe FeaturePool do | |
it "creates a new instance given valid attributes" do | |
Fabricate :feature_pool | |
end | |
it "is not valid without a name" do | |
Fabricate.build(:feature_pool, :name => "").should_not be_valid | |
end |