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 | |
function url_path(){ | |
// Base path | |
$script_name = isset($_SERVER["SCRIPT_NAME"]) ? $_SERVER["SCRIPT_NAME"] : ''; | |
$base_path = ''; | |
if (!empty($script_name)) { | |
$base_path = trim(str_replace('\\', '/', dirname($script_name)), '/ '); | |
} | |
// Path |
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
$.fn.skrollto = function(speed, easing) { | |
speed = speed || 1000; | |
easing = easing || 'swing'; | |
return $(this).each(function(i, el){ | |
//calculate destination place | |
var dest = 0; | |
var el = $(this); | |
if (el.is(':hidden')) { |
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 | |
class ClassLoader{ | |
protected $prefixes = array(); | |
protected $fallbackDirs = array(); | |
protected $useIncludePath = false; | |
protected $classMap = array(); | |
protected $history = array(); |
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 | |
class Benchmarker { | |
protected $start_time; | |
protected $end_time; | |
protected $memory_usage; | |
/** | |
* Sets start microtime |
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
search: \$_SERVER\[\'([A-Z_]{1,})\'] | |
replace: \$this\-\>app\-\>server\(\'$1\'\) |
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 | |
/** | |
* A simple "StopWatch" class to measure PHP execution time. | |
* The class can handle multiple separate timers at the same time. | |
*/ | |
class StopWatch { | |
/** | |
* @var $start float The start time of the StopWatch | |
*/ |
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 | |
/** | |
* Annotations support for PHP. | |
* Class based on the Nette Framework annotation parser. | |
*/ | |
class AnnotationParser | |
{ | |
/** @internal single & double quoted PHP string */ | |
const RE_STRING = '\'(?:\\\\.|[^\'\\\\])*\'|"(?:\\\\.|[^"\\\\])*"'; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Auto-fit background image script</title> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script> | |
<style> | |
html,body{ | |
padding:0; | |
margin:0; | |
height:100%; |
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
(function($){ | |
$(document).ready(function(){ | |
$("*[data-ui-widget]").each(function(){ | |
$this = $(this); | |
switch($this.data("ui-widget")){ | |
case "button":{ | |
$this.button($this.data("ui-widget-options")); | |
}break; | |
case "datepicker":{ | |
$this.datepicker($this.data("ui-widget-options")); |
OlderNewer