A Pen by Captain Anonymous on CodePen.
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
jQuery(function($) { | |
$('form[data-async]').live('submit', function(event) { | |
var $form = $(this); | |
var $target = $($form.attr('data-target')); | |
$.ajax({ | |
type: $form.attr('method'), | |
url: $form.attr('action'), | |
data: $form.serialize(), |
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
'use strict'; | |
var gulp = require('gulp'); | |
var typescript = require('gulp-tsc'); | |
var mocha = require('gulp-mocha'); | |
var growl = require('gulp-notify-growl'); | |
var async = require('async'); | |
var notify = growl(); | |
var paths = { |
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
$domains = parse_ini_file(__DIR__.'/../app/config/domains.ini'); | |
$localDomainsFile = __DIR__.'/../app/local/domains.ini'; | |
if(file_exists($localDomainsFile)) { | |
$localDomains = parse_ini_file($localDomainsFile); | |
$domains = array_merge($domains, $localDomains); | |
} | |
$site = $domains[filter_input(INPUT_SERVER, 'SERVER_NAME')]; | |
define('SITE', $site); |
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
{ | |
"USD": "$", | |
"EUR": "€", | |
"GBP": "£", | |
"INR": "₹", | |
"AUD": "$", | |
"CAD": "$", | |
"SGD": "$", | |
"CHF": "CHF", | |
"MYR": "RM", |
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
$di->set('translator', function() use ($config, $di) { | |
$locale = $di->get('locale'); | |
$whitelist = ['de', 'en']; | |
$fallback = ['de', 'en']; | |
$chainResolver = new \Kdyby\Translation\LocaleResolver\ChainResolver;//new \LocaleResolver($locale); | |
$localeResolver = new \LocaleResolver($locale); | |
$chainResolver->addResolver($localeResolver); |
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
const renderBooleanFeature = (packages, title, feature) => { | |
let tds = []; | |
for (let $package of packages) { | |
const data = $package[1]; | |
const code = $package[0]; | |
if (data.hasOwnProperty(feature) && data[feature] === true) { | |
tds.push( | |
<td key={code+feature} className={code}> | |
<span className="glyphicon glyphicon-ok"></span> |
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 apeConfig = { | |
domain: 'auto', | |
server: 'server.com:6969', | |
transport: 1, | |
} | |
var baseUrl = 'http://' + window.location.hostname; | |
if(window.location.port != 80) | |
{ |
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
{ | |
"location": { | |
"type": "Polygon", | |
"coordinates": [ | |
[ | |
48.122033990283, | |
17.036580815472 | |
], | |
[ | |
48.211966009717, |
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
GsonBuilder gsonBuilder = new GsonBuilder(); | |
Gson inputGson = new Gson(); | |
ArrayList<ArrayList<String>> list = inputGson.fromJson(json, ArrayList.class); | |
Coordinate[] coordinates = new Coordinate[list.size()]; | |
for (int i = 0; i < list.size(); i++) { | |
coordinates[i] = new Coordinate(Double.parseDouble(list.get(i).get(0)), Double.parseDouble(list.get(i).get(1))); | |
} |
OlderNewer