I'm proposing a staged adoption of a library & namespacing pattern for all of Partnercomm's re-usable code for better organization & testability.
use PComm\Core;
use PComm\Plugins;
use PComm\Api;
// Using libraries examples:
import {Injectable, provide} from 'angular2/core'; | |
import {Observable} from 'rxjs'; | |
const GEOLOCATION_ERRORS = { | |
'errors.location.unsupportedBrowser': 'Browser does not support location services', | |
'errors.location.permissionDenied': 'You have rejected access to your location', | |
'errors.location.positionUnavailable': 'Unable to determine your location', | |
'errors.location.timeout': 'Service timeout has been reached' | |
}; |
Answering the Front-end developer JavaScript interview questions to the best of my ability.
Sometimes you need to delegate events to things.
this
works in JavaScriptThis references the object or "thing" defined elsewhere. It's like "hey, thing I defined elsewhere, I'm talkin' to you."
vhost( ) { | |
if [[ -z $1 ]]; then | |
echo 'usage: vhost [hostname]' | |
return | |
fi | |
HOST=$1 | |
HOSTNAME="$HOST.dev" | |
ADDRESS="127.0.0.1" | |
SITEPATH="$HOME/Sites/$HOST" |
I'm writing in response to events that have recently come to light involving a sexual assault at a tech conference. Background information can be found [here][1], [here][2], and [here][3] as well as on twitter and google.
I've been watching this from the sidelines, and I've been wrestling with several questions that I can't seem to shake and that I really don't have answers to.
I wear many hats, both in the tech community and others. I'm a coder, a speaker, a user group organizer, a conference organizer, and even a boss. Each of those roles colors how I see this, but there's one role that is overpowering in my reaction.
See, I'm a Dad. A dad of two beautiful and innocent girls who are 3 and 2. They have their whole lives in front of them and so the questions I'm struggling with are:
When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.
Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008
…………………………
/* Assuming: | |
* dataview is a { xtype: "list" } | |
* dataview.itemTpl includes a <div class="deleteplaceholder"></div> | |
* | |
* Delete button will disappear as soon as something is touched | |
*/ | |
dataview.on("itemswipe", function(dataview, ix, target, record, event, options) { | |
if (event.direction == "left") { | |
var del = Ext.create("Ext.Button", { |
/* Disable the Wordpress Admin Bar for all but admins. */ | |
if (!current_user_can('administrator')): | |
show_admin_bar(false); | |
endif; |
iframe { | |
max-width: 100%; | |
} |