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
class CI_DB_active_record extends CI_DB_driver { | |
/** | |
* Select | |
* | |
* Generates the SELECT portion of the query | |
* | |
* @access public | |
* @param string | |
* @return CI_DB_active_record | |
*/ |
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 date { | |
/** | |
* Display the time from now in a readable way | |
* @param int $targetTime | |
* @param int $now | |
* @return 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
<?php | |
ini_set("include_path", "..".PATH_SEPARATOR."../../..".PATH_SEPARATOR.ini_get("include_path")); | |
require_once 'PHPUnit/Framework.php'; | |
//include your json encoding classes, if you are using them | |
// /includes |
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 version of http://twitter.com/gavinblair/statuses/24515252902 that will work everywhere as it does not rely on jQuery | |
var i=10, | |
elems = document.getElementsByTagName('a'), | |
exploder = setInterval(function(){ | |
for(var e in elems){ | |
(function(elem) { | |
if(elem.style){ | |
elem.style.fontSize = i + 'px'; | |
} |
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
module ActiveModel | |
# == Active Model Confirmation Validator | |
module Validations | |
class ConfirmationValidator < EachValidator | |
def validate_each(record, attribute, value) | |
if (confirmed = record.send("#{attribute}_confirmation")) && (value != confirmed) | |
record.errors.add(attribute, :confirmation, options) | |
end | |
end |
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
line 1 column 60 - Error: invalid formal public identifier "-//w3c//dtd html 4.0 transitional//en": invalid public text class | |
line 19 column 213 - Error: "NOSAVE" is not a member of a group specified for any attribute | |
line 21 column 18 - Error: an attribute value must be a literal unless it contains only name characters | |
line 27 column 22 - Error: an attribute value must be a literal unless it contains only name characters | |
line 31 column 22 - Error: an attribute value must be a literal unless it contains only name characters | |
line 35 column 22 - Error: an attribute value must be a literal unless it contains only name characters | |
line 39 column 22 - Error: an attribute value must be a literal unless it contains only name characters | |
line 43 column 22 - Error: an attribute value must be a literal unless it contains only name characters | |
line 47 column 35 - Error: an attribute value must be a literal unless it contains only name characters | |
line 57 column 26 - Error: an attribute value must be a literal unless it cont |
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
hr {margin:-8px auto 11px;} |
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 | |
include 'classes/markdown.php'; | |
$parser = new Markdown(); | |
//Transform text using parser. | |
echo $parser->transform($text); |
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 | |
//to have multiple sidebars in wordpress: | |
function mytheme_widgets_init() { | |
register_sidebar(array( | |
'name' => __( 'sidebar1', 'mytheme' ), | |
'id' => 'sidebar1-area', | |
'description' => __( 'The first sidebar area', 'mytheme' ), | |
'before_widget' => '', | |
'after_widget' => '', | |
'before_title' => '<h2>', |