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
<!--- strip tags ---> | |
<cfset stripedString = ReReplaceNoCase(source,"<[^>]*>","","ALL") /> |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<!-- Code source: http://www.devcurry.com/2009/08/limit-number-of-characters-in-textarea.html THANKS --> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Limit Number of Characters in a TextArea</title> | |
<script type='text/javascript' | |
src='http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js'></script> | |
<script type='text/javascript'> | |
$(document).ready(function() { |
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
"Status line | |
set statusline=%F%m%r%h%w\ %{&ff}\ %Y\ a/h:%03.3b/%02.2B\ %04l,%04v\ %p%%\ %L\ lines | |
set laststatus=2 | |
"Tabstop | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set backspace=indent,eol,start |
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
/** | |
* @class Acme.TYPO3.Foo.ClassWithConstructor | |
* | |
* This class has a constructor! | |
* | |
* @namespace Acme.TYPO3.Foo | |
* @extends TYPO3.TYPO3.Core.SomeOtherClass | |
* | |
* @constructor | |
* @param {String} id The ID which to use |
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
/** | |
* This is a method declaration; and the | |
* explanatory text is followed by a newline. | |
* | |
* @param {String} param1 Parameter name | |
* @param {String} param2 (Optional) Optional parameter | |
* @return {Boolean} Return value | |
*/ |
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
function isHtml5(){ | |
var test_canvas = document.createElement("canvas") //try and create sample canvas element | |
return (test_canvas.getContext)? true : false //check if object supports getContext() method, a method of the canvas element | |
} |
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
$("textarea[maxlength]").keydown( function(e) { | |
var key = e.which; // backspace = 8, delete = 46, arrows = 37,38,39,40 | |
if ( ( key >= 37 && key <= 40 ) || key == 8 || key == 46 ) return; | |
return $(this).val().length < $(this).attr( "maxlength" ); | |
}); |
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
curl -u username:password http://example.com |
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
<!-- bookmark on Delicious --> | |
<a rel="nofollow" href="http://delicious.com/post?url=<?php the_permalink(); ?>&title=<?php echo urlencode(get_the_title($id)); ?>" title="Bookmark this post at Delicious">Bookmark at Delicious</a> | |
<!-- submit to Digg --> | |
<a rel="nofollow" href="http://digg.com/submit?phase=2&url=<?php the_permalink(); ?>" title="Submit this post to Digg">Digg this!</a> | |
<!-- tweet on Twitter --> | |
<a rel="nofollow" href="http://twitter.com/home?status=<?php echo urlencode("Currently reading: "); ?><?php the_permalink(); ?>" title="Share this article with your Twitter followers">Tweet this!</a> | |
<!-- submit to StumbleUpon --> |
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
function is_empty(obj) { | |
"use strict"; | |
// Assume if it has a length property with a non-zero value | |
// that that property is correct. | |
if (obj.length && obj.length > 0){ return false; } | |
if (obj.length && obj.length === 0){return true; } | |
for (var key in obj) { | |
if (Object.prototype.hasOwnProperty.call(obj, key)) { return false; } | |
} |