For reference: http://postgis.net/install
The most reliable way to get PostGIS on OSX is to download and install Postgres.app. Great for development and testing. Do not mix with other installations. Select the extension when prompted.
package main | |
func main() { | |
>> car{}.Model() | |
} | |
type car struct { | |
vehicle | |
boat | |
} |
class SearchesController < ApplicationController | |
def index | |
@tools = Tool.search do | |
keywords params[:query] | |
end.results | |
@inventories = Inventory.search do | |
keywords params[:query] | |
end.results |
For reference: http://postgis.net/install
The most reliable way to get PostGIS on OSX is to download and install Postgres.app. Great for development and testing. Do not mix with other installations. Select the extension when prompted.
desc 'Benchmark funds_raised methods' | |
ITERATIONS = 1000 | |
task benchmark_sql: :environment do | |
campaign = Campaign.last | |
Benchmark.bm do |bm| | |
bm.report('sql') do | |
ITERATIONS.times do |
desc 'Benchmark funds_raised methods' | |
ITERATIONS = 100_000 | |
task benchmark_sql: :environment do | |
GC.disable | |
campaign = Campaign.last | |
Benchmark.bm do |bm| | |
bm.report('sql') do |
title: Filters | |
output: basic.html | |
controls: true | |
-- | |
# Filters | |
## Controllers | |
-- |
"1001" + "11" ---> "1100" | |
"1" + "1" ---> "10" | |
def add(number_one, number_two) | |
# "1011" | |
# "1111" | |
# 1110" | |
ones_digit = number_one[-1] | |
result = "" |
class Fizzbuzz < Struct.new(:max) | |
MUTATIONS = { | |
'fizzbuzz' => ->(i) {i % 3 == 0 && i % 5 == 0}, | |
'fizz' => ->(i) {i % 3 == 0}, | |
'buzz' => ->(i) {i % 5 == 0} | |
} | |
def fizzle | |
1.upto(max).map do |i| | |
mutations.find(-> {[i]}) do |k, v| |
#user nobody; | |
worker_processes 1; | |
error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
#pid logs/nginx.pid; | |
Before: | |
def create | |
@transaction = current_order.build_transaction(transaction_params) | |
@transaction.update(:order_id => current_order.id) | |
if @transaction.save | |
@transaction.pay! | |
if current_user | |
current_order.update(:user_id => current_user.id, :status => "paid") | |
else | |
current_order.update(:status => "paid") |