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 { | |
defineComponent as originalDefineComponent, | |
EmitsOptions, | |
SetupContext, | |
watch, | |
onMounted, | |
DefineComponent, | |
RenderFunction, | |
ComputedOptions, | |
MethodOptions, |
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
declare module '@storybook/addon-knobs' { | |
import { StoryDecorator } from '@storybook/vue'; | |
export interface WithKnobsOptions { | |
timestamps: boolean; | |
escapeHTML: boolean; | |
} | |
export const withKnobs: StoryDecorator & ((options?: WithKnobsOptions) => StoryDecorator); |
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
// build your own rule | |
declare module 'vuelidate/lib/validators' { | |
import Vue from 'vue' | |
export interface Params { | |
type: string | |
} | |
export interface ValidationParams { | |
readonly name: string |
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
/** | |
* @return string | |
*/ | |
protected function buildTreeNodeQuery() { | |
if($this->nodeQuery) { | |
return $this->nodeQuery; | |
} | |
$query = <<<EOT |
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
<?php | |
use Symfony\Component\Validator\Constraint; | |
/** | |
* @Annotation | |
* @author Oliver Hoff <oliver@hofff.com> | |
*/ | |
class Validate extends Constraint { |
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
<?php | |
$strpos = function($haystack, $needle, $n) { | |
return function() use($haystack, $needle, $n) { | |
for($i = 0; $i < $n; $i++) { | |
if(0 === strpos($haystack, $needle)) { | |
'ok'; | |
} | |
} | |
}; |
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
/** | |
* namespacing and prototyping utility | |
* | |
* <T> bbit.local([String nspart, ..., ]Function T closure) | |
* <T> bbit.mt([String nspart, ..., ]Function T closure) | |
* <T> bbit.jq([String nspart, ..., ]Function T closure) | |
* Function bbit.thrower(String msg) | |
* <lambda> bbit.inherit(Function constructor, mixed parent) | |
* | |
* @copyright backboneIT | Oliver Hoff 2012 |
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
<?php | |
$cache = array(); | |
$insert = function(stdClass $stat) use(&$cache) { | |
echo 'insert '; var_dump($stat->i); | |
$cache[spl_object_hash($stat)] = $stat; | |
}; | |
$delete = function(stdClass $stat) use(&$cache) { |
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
<?php | |
class LatLng { | |
const FORMAT_D = 'd'; | |
const FORMAT_DM = 'dm'; | |
const FORMAT_DMS = 'dms'; | |
const EARTH_RADIUS = 6371000; | |