This file contains hidden or 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 RAFEngine from 'raf-engine'; | |
const engine = new RAFEngine(); | |
export default (ctx, inject) => { | |
ctx.$engine = engine; | |
inject('engine', engine); | |
} |
This file contains hidden or 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
let settings = { | |
enableHighAccuracy: true, | |
timeout: 2e3, | |
maximumAge: 0 | |
} | |
let watchId = null; | |
let messages = []; | |
messages['enabled'] = 'Location service is not enabled on your device.'; |
This file contains hidden or 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
initDom() { | |
let output = $('div#m_ver_menu ul.m-menu__nav > li.m-menu__item--submenu').map(this.extractData).get(); | |
console.log('output', output) | |
} | |
extractData() { | |
let $this = $(this); | |
let anchor = $this.find("a:first")[0]; | |
let text = $(anchor).find("span:first").text(); | |
let icon = $(anchor).find("i:first").attr('class'); |
This file contains hidden or 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 { | |
compose, | |
withProps, | |
branch, | |
renderNothing | |
} from 'recompose'; | |
import List from './list'; | |
import Item from './item'; |
This file contains hidden or 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
"use strict"; | |
var React = require('react'); | |
var Select = React.createClass({ | |
propTypes: { | |
name: React.PropTypes.string.isRequired, | |
label: React.PropTypes.string.isRequired, | |
onChange: React.PropTypes.func.isRequired, |
This file contains hidden or 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 array = [22, 44, 17, 47, 75, 26, 81, 15, 31, 23, 78, 95, 84, 29, 134, 64]; | |
function indexOfSmallest(a) { | |
var lowest = 0; | |
for (var i = 1; i < a.length; i++) { | |
if (a[i] < a[lowest]) lowest = i; | |
} | |
return lowest; | |
} |
This file contains hidden or 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
<?php | |
namespace Application\Controller; | |
use Zend\Mvc\Controller\AbstractActionController; | |
use Zend\View\Model\ViewModel; | |
use Zend\Http\Client; | |
use Zend\Http\Client\Adapter\Curl; | |
use Zend\Json\Json; |
This file contains hidden or 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
<?php | |
$select->where | |
->literal('LOWER(campaign.title) LIKE "%'.strtolower($data['search']).'%"') | |
->or | |
->literal('LOWER(campaign.description) LIKE "%'.strtolower($data['search']).'%"'); |
This file contains hidden or 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
<?php | |
namespace Application\Controller\Plugin; | |
use Zend\Mvc\Controller\Plugin\AbstractPlugin; | |
use Zend\Debug\Debug; | |
class Dump extends AbstractPlugin | |
{ | |
public function __invoke($var, $label = null, $echo = true) |
This file contains hidden or 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
<?php | |
namespace HTMLPurifier\Controller\Plugin; | |
use Zend\Mvc\Controller\Plugin\AbstractPlugin; | |
class Purifier extends AbstractPlugin | |
{ | |
public function __invoke($data) | |
{ |