Skip to content

Instantly share code, notes, and snippets.

View tobiastom's full-sized avatar

Tobias Tom tobiastom

View GitHub Profile
var foo = document.createElement('a')
foo.addEventListener('click', function() { console.log('yeah') }, false)
var event = document.createEvent('UIEvents')
event.initEvent('click', false, false)
foo.dispatchEvent(event)
// yeah
<?php
class Foo {
protected $description_de = 'Beschreibung';
protected $description_en = 'Description';
protected $localizedProperties = array( 'description' );
public function __get( $key ) {
if ( !in_array( $key, $this->localizedProperties ) ) {
@interface SquaceMenuItem : UIMenuItem {
SquaceMLAction *squaceAction;
}
@property (nonatomic, retain) SquaceMLAction *squaceAction;
@end;
test – durchgefallen – danke.
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8"/>
<title>Testing inline SVG …</title>
<style type="text/css" media="screen">
/* SVG-Namensraum unter dem Kürzel "svg" registriert */
@namespace svg "http://www.w3.org/2000/svg";
Array.prototype.unique = function () {
var keys = {},
result = [],
items = this.length
while ( items )
keys[ this[ --items ] ] = true
for ( var key in keys )
if ( !keys.hasOwnProperty( key ) )
Array.prototype.unique = function() {
var uniqueKeys = {};
var items = this.length;
while ( items ) {
uniqueKeys[ this[ --items ] ] = true;
}
var uniqueArray = [];
for ( var key in uniqueKeys ) {
if ( !uniqueKeys.hasOwnProperty( key ) ) {
Array.prototype.unique = function() {
var uniqueKeys = {};
var items = this.length;
while( items ) {
uniqueKeys[this[--items]] = true;
}
var uniqueArray = [];
for( var key in uniqueKeys ) {