This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION distance(point1 point, point2 point) RETURNS float8 AS $$ | |
DECLARE | |
long1 float8; | |
long2 float8; | |
lat1 float8; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#define SUCCESS_CODE 0 | |
#define ERR_CODE 1 | |
/* | |
* Функция разбора входных параметров | |
* | |
* аргументы: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Circle = (center, radius, options) -> | |
options = $.extend({accuracy : 32}, options) | |
# Вызывает родительский конструктор | |
YMaps.Polygon.call(@, [], options) | |
# Вызывается при добавлении круга на карту | |
@.onAddToMap = (map, container) -> | |
YMaps.Polygon.prototype.onAddToMap.call(@, map, container) | |
@.updatePoints() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Circle = (center, radius, options) -> | |
options = $.extend({accuracy : 32}, options) | |
# Вызывает родительский конструктор | |
YMaps.Polygon.call(@, [], options) | |
# Вызывается при добавлении круга на карту | |
@.onAddToMap = (map, container) -> | |
YMaps.Polygon.prototype.onAddToMap.call(@, map, container) | |
@.updatePoints() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Room < ActiveRecord::Base | |
has_many :auctions | |
end | |
class Auction < ActiveRecord::Base | |
belongs_to :room | |
validates :room, :presence => true | |
end | |
FactoryGirl.define do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Started GET "/ussd?from=%2A100%23&msisdn=79049225884&request=9" for 127.0.0.1 at Fri Oct 28 15:58:15 +0400 2011 | |
Читаем сессию из кеша; результат: #<MobileMenu::Sessions::Session:0xb4fbcad4> | |
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."msisdn" = 79049225884 LIMIT 1 | |
Пытаюсь войти в экран: MobileMenu::Ussd::ResumeSession | |
Сохраняем сессию в кеш; результат: true | |
Рендерю экран: MobileMenu::Ussd::ResumeSession | |
User Load (0.5ms) SELECT "users".* FROM "users" WHERE (users.aimsid IS NOT NULL AND users.events_url IS NOT NULL) | |
User Load (0.5ms) SELECT "users".* FROM "users" WHERE (users.aimsid IS NOT NULL AND users.events_url IS NOT NULL) | |
User Load (0.5ms) SELECT "users".* FROM "users" WHERE (users.aimsid IS NOT NULL AND users.events_url IS NOT NULL) | |
User Load (0.5ms) SELECT "users".* FROM "users" WHERE (users.aimsid IS NOT NULL AND users.events_url IS NOT NULL) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def require_user | |
return true if logged_in? | |
reauthenticate | |
return false | |
end | |
def reauthenticate | |
cookies[:return_to] = request.fullpath | |
@user = User.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(::) failed steps (::) | |
scope '.calendar-res-container' not found on page (Capybara::ElementNotFound) | |
./features/step_definitions/web_steps.rb:14:in `with_scope' | |
./features/step_definitions/web_steps.rb:108:in `/^(?:|I )should see "([^"]*)"(?: within "([^"]*)")?$/' | |
features/calendar.feature:11:in `Then I should see "Rename Me" within ".calendar-res-container"' | |
expected #has_content?("Create Event") to return true, got false (RSpec::Expectations::ExpectationNotMetError) | |
./features/step_definitions/web_steps.rb:110 | |
./features/step_definitions/web_steps.rb:14:in `with_scope' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pending: | |
Role add some examples to (or delete) /home/ebaranov/workspace/scheduler/patient-scheduler-ruslan/spec/models/role_spec.rb | |
# Not Yet Implemented | |
# ./spec/models/role_spec.rb:4 | |
EventType add some examples to (or delete) /home/ebaranov/workspace/scheduler/patient-scheduler-ruslan/spec/models/event_type_spec.rb | |
# Not Yet Implemented | |
# ./spec/models/event_type_spec.rb:4 | |
UsersHelper add some examples to (or delete) /home/ebaranov/workspace/scheduler/patient-scheduler-ruslan/spec/helpers/users_helper_spec.rb | |
# Not Yet Implemented | |
# ./spec/helpers/users_helper_spec.rb:14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'oauth' | |
class TwitterOauth | |
class GeneralError < StandardError | |
end | |
class APIError < TwitterOauth::GeneralError | |
end | |
class UnexpectedResponse < TwitterOauth::APIError |