Skip to content

Instantly share code, notes, and snippets.

class Person::Car < ActiveRecord::Base
include ParserServiceSeparable
has_paper_trail
acts_as_paranoid
before_validation :set_ownership
belongs_to :person
has_many :vehicle_ownerships, foreign_key: :vin, primary_key: :vin
has_many :road_accidents, foreign_key: :vin, primary_key: :vin
has_many :taxis, foreign_key: :gosnumber, primary_key: :number
SELECT Products.Name, Categories.Name
FROM Products
LEFT JOIN ProductCategories ON Products.Id = ProductCategories.ProductId
LEFT JOIN Categories ON ProductCategories.CategoryId = Categories.Id
var a = {};
(function b(a) {
a.a = 10;
a = null;
})(a);
console.log(a);
-----------------------------
public async deleteCompanyDocument(companyId: string): Promise<any> {
const data = {
index: INDEX,
type: TYPE,
id: companyId.toString(),
};
return await this.deleteIndex(data);
}
const ENABLE_MAP = "ENABLE_MAP";
const DISABLE_MAP = "DISABLE_MAP";
const SET_CENTER_COORDINATE = "SET_CENTER_COORDINATE";
const SET_PLACEHOLDER = "SET_PLACEHOLDER";
const CLEAR_PLACEHOLDER = "CLEAR_PLACEHOLDER";
const START_NAVIGATION_MODE = "START_NAVIGATION_MODE";
const STOP_NAVIGATION_MODE = "STOP_NAVIGATION_MODE";
const SET_ACTIVE_POINT = "SET_ACTIVE_POINT";
const RESET_POINTS = "RESET_POINTS";
import React, { Component } from "react";
import PropTypes from "prop-types";
import { createSwitchNavigator } from "react-navigation";
import { StyleSheet, View } from "react-native";
import SwitchCustom from "../components/SwitchCustom/SwitchCustom";
import MainHeader from "../components/MainHeader/MainHeader";
import Main from "../routes/Main";
import DriverAnalytics from "../routes/DriverAnalytics";
import DeliveryStart from "../routes/DeliveryStart";
import AppContainer from "../containers/AppContainer";
import React, {Component, PropTypes} from 'react';
import {
Picker,
Text,
View,
TouchableHighlight,
} from 'react-native';
import {styles} from '../styles/css';
export default class IterationPicker extends Component {
import React, { Component, PropTypes } from 'react';
import { Text,
TouchableHighlight,
View,
ListView,
Image} from 'react-native';
import { styles } from '../styles/css';
import EditTask from './EditTask';
import Icon from 'react-native-vector-icons/FontAwesome';
import CheckBox from './CheckBox';
{
"meta": {
"code": 200
},
"data": [
{
"can_sort_tasks_by": [
"name",
"dueBy",
"createdAt",
_handlePushNotification(){
PushNotification.setApplicationIconBadgeNumber(4);
PushNotification.localNotificationSchedule({
message: "Schedule Message",
date: new Date(Date.now() + (60 * 1000))
});
PushNotification.localNotification({
message: "Local Notification Message",
playSound: true,