Создать гем, позволяющий вычислять пересечение геометрических объектов на плоскости.
Все объекты задаются в декартовой системе координат.
Должны поддерживаться cледующие виды объектов:
#!/bin/sh | |
d=`date +%Y%m%d` | |
path=/home/keeper/backup | |
pg_dump -U postgres -d my_database -n my_schema -f $path"dump"$d -O | |
zip -jq $path"dump"$d".zip" $path"dump"$d |
require 'active_support/all' | |
class A < HashWithIndifferentAccess | |
end | |
class B < HashWithIndifferentAccess | |
def initialize(*args) | |
super | |
freeze | |
end |
import javax.inject.{Inject, Singleton} | |
import play.api.db.slick.DatabaseConfigProvider | |
import slick.backend.DatabaseConfig | |
import slick.driver.JdbcProfile | |
import scala.concurrent.Future | |
/* | |
* The problem we are trying to solve here is how to have one trait per Slick table definition. |
FROM ruby:2.4-alpine | |
ENV PATH /root/.yarn/bin:$PATH | |
RUN apk update && apk upgrade && \ | |
apk add --no-cache bash git openssh build-base nodejs tzdata | |
RUN apk update \ | |
&& apk add curl bash binutils tar gnupg \ | |
&& rm -rf /var/cache/apk/* \ |
require 'json' | |
require 'net/http' | |
HOST = '192.168.242.150' | |
USER = 'Администратор' | |
PASSWORD = '' | |
DB = 'DemoHRM1' | |
# Идентификаторы | |
# ПАО "Винтерфелл" - a878eda5-9484-11e8-a45d-e269cdf4837d |
require 'json' | |
require 'net/http' | |
HOST = '192.168.242.150' | |
USER = 'Администратор' | |
PASSWORD = '' | |
DB = 'DemoHRM1' | |
def json_date(d) | |
d.strftime '%Y-%m-%dT00:00:00' |
class CreateBook | |
def initialize(title, author_guid) | |
@title, @author_guid = title, author_guid | |
end | |
def perform | |
unless author | |
log "Could not find author" | |
else | |
book.save! |
describe SaveScoping do | |
let(:role){ create :role } | |
let(:cities){ (0..2).map{ create :city } } | |
let(:orgs){ (0..2).map{ create :legl_organization } } | |
context 'creating initial role scoping' do | |
it '...' do | |
expect { | |
SaveScoping.(role, RoleScope::CITY, [cities[0].id, cities[1].id]) | |
}.to change{ role.reload.divided }.to true |
class ExtraChargeGroundsController < WithSessionController | |
require_global_permission Access::P_EXTRA_CHARGE_MANAGE | |
end |