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
WAXP = (function(){ | |
MutationObserver = window.MutationObserver || window.WebKitMutationObserver; | |
var SCROLL_INTERVAL = 600, | |
SCROLL_INCREMENT = 450, | |
AUTO_SCROLL = true, | |
NAME_PREFIX = '', | |
UNKNOWN_CONTACTS_ONLY = false, | |
MEMBERS_QUEUE = {}, |
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
import React from 'react'; | |
import { Formik, Field, Form } from 'formik'; | |
import {bindActionCreators} from "redux"; | |
import connect from "react-redux/es/connect/connect"; | |
import { contactCompleted, contactHasError, contactLoading, saveContact } from "../actions/contactAction" | |
import * as Yup from 'yup'; | |
/** | |
* TODO Contact us form | |
* √ - first name, last name and email request |
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
// Render Prop | |
import React from 'react'; | |
import { Formik } from 'formik'; | |
const Basic = () => ( | |
<div> | |
<h1>My Form</h1> | |
<p>This can be anywhere in your application</p> | |
{/* | |
The benefit of the render prop approach is that you have full access to React's |
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
import { Observable } from 'rxjs/Observable'; | |
import { Injectable } from '@angular/core'; | |
import { AngularFireAuth } from 'angularfire2/auth'; | |
// Do not import from 'firebase' as you'll lose the tree shaking benefits | |
import * as firebase from 'firebase/app'; | |
@Injectable() | |
export class AuthService { | |
private currentUser: firebase.User; |
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
<style> | |
td { | |
border: 1px solid black; | |
margin: 2px; | |
padding: 2px; | |
} | |
.marked { | |
background-color: red; | |
} |
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
$regions = array(); | |
$regions[65] = array('id' => 65, 'parent_id' => 44, 'name' => "Shoreditch"); | |
$regions[77] = array('id' => 77, 'parent_id' => 5, 'name' => "England"); | |
$regions[100] = array('id' => 100, 'parent_id' => 0, 'name' => "Europe"); | |
$regions[5] = array('id' => 5, 'parent_id' => 100, 'name' => "United Kingdom"); | |
$regions[44] = array('id' => 44, 'parent_id' => 77, 'name' => "London"); | |
function getChild ($parent_id = 0) | |
{ |
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
# current json | |
"_embedded": { | |
"items": [ | |
{ | |
"0": { | |
"id": 5, | |
... | |
}, | |
"isFeedbackAdded": "0" |
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
{ | |
"search" : { | |
"mappings" : { | |
"delivery" : { | |
"_meta" : { | |
"model" : "AppBundle\\Entity\\Delivery" | |
}, | |
"dynamic_date_formats" : [ ], | |
"properties" : { | |
"categories" : { |
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
{ | |
"error": { | |
"root_cause": [{ | |
"type": "script_exception", | |
"reason": "Error evaluating pricing", | |
"script_stack": [], | |
"script": "", | |
"lang": "groovy" | |
}], | |
"type": "search_phase_execution_exception", |
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
/** | |
* @var Vehicle $vehicle | |
*/ | |
$vehicle = false; | |
foreach ($user->getVehicles() as $userVehicle) | |
{ | |
if ($userVehicle->getType() == $selectedVehicleType) | |
{ | |
$vehicle = $userVehicle; | |
break; |
NewerOlder