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
/* Namespace */ | |
var DCX = DCX || { }; | |
DCX.Ui = DCX.Ui || { }; | |
DCX.Ui.Model = DCX.Ui.Model || { }; | |
DCX.Ui.View = DCX.Ui.View || { }; | |
DCX.Ui.Controller = DCX.Ui.Controller || { }; | |
DCX.Ui.Service = DCX.Ui.Service || { }; | |
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
javascript: var title = 'Mantis #' + document.title.substring(2, (document.title.length - 11)); var url = 'https://www.google.com/calendar/render?action=TEMPLATE&sf=true&output=xml&text=' + encodeURIComponent(title) + '&details=' + encodeURIComponent('Details in Mantis: ' + location.href); window.open(url, 'mantisgcal', 'scrollbars=yes,width=1200,height=800,top=175,left=75,status=no,resizable=yes'); if (!document.all) T = (setTimeout('popw.focus()',50)); void(0); |
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
// Usage: | |
// resolvePromisesInArray(values_with_promises).then(function(values_resolved) | |
// { console.log(values_resolved); }); | |
function resolvePromisesInArray(values) | |
{ | |
var deferred, deferred_values; | |
if (! $.isArray(values)) | |
{ |
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
<html> | |
<head> | |
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script> | |
</head> | |
<body> | |
<?php | |
if ($_SERVER[ 'REQUEST_METHOD' ] === 'POST') | |
{ | |
if (isset($_FILES[ 'file' ]) && isset($_FILES[ 'file' ][ 'tmp_name' ]) && is_uploaded_file($_FILES[ 'file' ][ 'tmp_name' ])) |
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
// Factory function | |
var Greeter = function(config) | |
{ | |
// Hold public and private variables and functions in two objects: | |
var _public = { }; | |
var _private = { }; | |
// Storing "constructor" parameters in a private variable |
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 | |
// Find invisible non-breaking spaces in source code | |
// which can cause errors in PHP and JavaScript. | |
// | |
// see: http://www.strehle.de/tim/weblog/archives/2013/02/26/1563 | |
// | |
// Usage: | |
// php charcheck.php path/to/*.php | |
// or: |
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 | |
/* | |
Minimal example for parsing http://planetdam.org article list RDF/XML | |
using http://www.easyrdf.org | |
1) Install Composer, see http://www.easyrdf.org/docs/getting-started : | |
curl -s https://getcomposer.org/installer | php | |
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 | |
// Correct input value: | |
// $value = 'Wednesday, December 18, 2014 4:05:06 PM PT'; | |
// Wrong input value that I suppose should rather return false: | |
$value = 'XXX'; | |
$formatter = new IntlDateFormatter | |
( |
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
/* A sample "Die" component using the "library" */ | |
/** | |
* Create a "Die" component instance | |
* | |
* Creates an anonymous object you can only interact with using events. | |
* | |
* @param object config componentConfig.config object from the component JSON data | |
* @constructor |
OlderNewer