This file contains hidden or 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 | |
/** | |
* Try a callable a number of times. | |
* If all attempts fail, handle a catch and/or finally. | |
* If no catch is provided, just throw the exception from the last failed attempt. | |
* If an attempt succeeds, return the number of attempts (at least one). | |
* If the provided number of attempts is zero or less, the code won't attempt to run at all. | |
* | |
* This is a quick hack, which can easily be improved and most likely still has issues. |
This file contains hidden or 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 | |
/** | |
* Returns an array of formatted backtrace lines. | |
* Optional format string may include the following keywords: | |
* index Zero-based order number of backtrace step. | |
* file Path and name of file | |
* line Line number | |
* class Fully qualified name of class | |
* type `::` if class method or `->` if object method |
This file contains hidden or 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
// knockout-jquery-widget.js | |
// Copyright (c) 2011, Planapple, Inc. | |
// License: MIT (http://www.opensource.org/licenses/mit-license.php) | |
// | |
// Knockout binding for jQuery widgets | |
// | |
// Examples: | |
// <input type="submit" value="OK" data-bind='jquery: "button"' /> | |
// | |
// Attaches a jQuery UI button widget to this button, with default options. |
This file contains hidden or 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
// Based on http://stackoverflow.com/questions/20091481/auto-resizing-the-select-element-according-to-selected-options-width | |
// Licensed as CC0 or public domain, whatever you prefer. | |
;(function($, undefined) { | |
var pluginName = 'autowidth', | |
defaults = { | |
maxWidth: null, | |
minWidth: null, | |
padding: 30 | |
}; |