- Supports all phones on Tier 1 carriers
- Find and correct for inaccuracy patterns
- Supports smart phones on all carriers
- Possible spoof prevention: http://stackoverflow.com/questions/6623945/check-if-geo-location-has-been-spoofed
| package io.realm.example; | |
| import io.realm.RealmObject; | |
| public class Dog extends RealmObject { | |
| private String name; | |
| public String getName() { | |
| return name; |
| package io.realm.example; | |
| import io.realm.RealmObject; | |
| public class Dog extends RealmObject { | |
| private String name; | |
| public String getName() { | |
| return name; |
| package io.realm.example; | |
| import io.realm.RealmObject; | |
| public class Dog extends RealmObject { | |
| private String name; | |
| public String getName() { | |
| return name; |
| Starts working at 7am at Job A | |
| Starts travelling at 8am from Job A | |
| Starts working at 9am at Job B | |
| Finished for the day at 3pm | |
| | datetime | activity | job_id | duration | adjusted_dateimte | adjusted_duration | |
| +----------+---------------+--------+ | |
| 7am work 1 1 9am 0 (9am - 8am) |
| class Diagnosis < ActiveRecord::Base | |
| has_and_belongs_to_many :prescriptions | |
| has_many :patients, :through=>:prescriptions | |
| end |
| class Message < ActiveRecord::Base | |
| belongs_to :user | |
| # accepts_nested_attributes_for :user | |
| end |
| def self.active | |
| s = arel_table where( | |
| s[:begins_at].lteq(Time.now.utc).or(s[:begins_at].eq(nil)), | |
| s[:ends_at].gt(Time.now.utc).or(s[:ends_at]).eq(nil)) | |
| ) | |
| end | |
| def self.active | |
| s = arel_table.where( | |
| s[:begins_at].lteq(Time.now.utc).or(s[:begins_at].eq(nil)), |
| validates :superiority | |
| def superiority | |
| User.find(superior_id).company_id == User.find(inferior_id).company_id | |
| end | |
| # Karpah's method | |
| validates :superior_id, :if => "User.find(superior_id).company_id == User.find(inferior_id).company_id" |