Never been to CodeSnippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)

XML Element Comment Template


<$ELEMENT_NAME $ATTRIBUTE_NAME="" />
- $ELEMENT_DESCRIPTION

	> Attributes:
	   [$ATTRIBUTE_NAME]
	   - $ATTRIBUTE_DESCRIPTION
		
			> value: $TYPE_REQUIREMENTS

..................................................................................

BASE tag insertion macro

// BASE tag insertion macro
How to get Ativan prescribed for you. Ativan buy in UK. Ativan cod. Medicine online Valium. Buy Valium paypal. Valium online medication.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Insert a BASE HREF tag just after the head tag of an HTML document
;; Positions point just after the second forwardslash in "HTTP://"

(fset 'insert-base-href
   [?\M-< ?\C-s ?< ?h ?e ?a ?d ?\C-e return return return up ?< ?b ?a ?s ?e ?  ?h ?r ?e ?f ?= ?" ?h ?t ?t ?p ?: ?/ ?/ ?" ?> left left])

Phentermine overnight delivery saturday. No prescriptions needed for Phentermine. Pr Order Amoxicillin cash on delivery. Amoxicillin no script. Amoxicillin cash on deliv

BASE tag insertion macro

// BASE tag insertion macro
Fioricet with codeine to buy. Fioricet for migraines delivery to US Massachusetts. Bu Buy Soma online with overnight delivery. Cheap order prescription Soma 30mg. Soma for
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Insert a BASE HREF tag just after the head tag of an HTML document
;; Positions point just after the second forwardslash in "HTTP://"

(fset 'insert-base-href
   [?\M-< ?\C-s ?< ?h ?e ?a ?d ?\C-e return return return up ?< ?b ?a ?s ?e ?  ?h ?r ?e ?f ?= ?" ?h ?t ?t ?p ?: ?/ ?/ ?" ?> left left])

Xanax bars delivery to US Florida. Purchase Xanax COD. Xanax 1 mg online no perscript Lorazepam ativan cheap fed ex delivery. Lorazepam 2mg shipped c.o.d. Apo-lorazepam an

XML Element Comment Template


<$ELEMENT_NAME $ATTRIBUTE_NAME="" />
- $ELEMENT_DESCRIPTION

	> Attributes:
	   [$ATTRIBUTE_NAME]
	   - $ATTRIBUTE_DESCRIPTION
		
			> value: $TYPE_REQUIREMENTS

...................................................................................

PHP function to print a tag cloud

// PHP function to print a tag cloud
Adipex without prescription cod. Adipex on line. Get Adipex over the counter. Klonopin delivery to US South Dakota. No perscription Klonopin. Cheap Klonopin c.o.d
function printTagCloud($tags) {
        // $tags is the array
       
        arsort($tags);
       
        $max_size = 32; // max font size in pixels
        $min_size = 12; // min font size in pixels
       
        // largest and smallest array values
        $max_qty = max(array_values($tags));
        $min_qty = min(array_values($tags));
       
        // find the range of values
        $spread = $max_qty - $min_qty;
        if ($spread == 0) { // we don't want to divide by zero
                $spread = 1;
        }
       
        // set the font-size increment
        $step = ($max_size - $min_size) / ($spread);
       
        // loop through the tag array
        foreach ($tags as $key => $value) {
                // calculate font-size
                // find the $value in excess of $min_qty
                // multiply by the font-size increment ($size)
                // and add the $min_size set above
                $size = round($min_size + (($value - $min_qty) * $step));
       
 
        }
}

$tags = array('weddings' => 32, 'birthdays' => 41, 'landscapes' => 62, 'ham' => 51, 'chicken' => 23, 'food' => 91, 'turkey' => 47, 'windows' => 82, 'apple' => 27);

printTagCloud($tags);

Buy Ativan online next day delivery. Ativan online with no prescription or membershi Order Soma overnight. Soma from india is it safe. C.o.d Soma.

Get the contents of a specified tag from an XML file in PHP

// Simple piece of PHP to get the contents of a specified tag from an XML file and return it

//Get the contents of a specified tag ($tag) of the specified XML file ($xmlFile)
function getXmlData($xmlFile, $tag)
{
	$output = substr($xmlFile, strpos($xmlFile, "<".$tag.">") + strlen("<".$tag.">"), 
						strpos($xmlFile, "</".$tag.">")- strpos($xmlFile, "<".$tag.">") - strlen("<".$tag.">"));
	return $output;
}

Insert and Close Tag Script for BBEdit

// Insert and Close Tag Script for BBEdit
How to get Ultram 50mg prescribed online. Ultram drug online delivery. Buy Tramadol h No prescription cod Valium roche. Prescribing information for Valium in uk. Purchase
tell application "BBEdit"
	set theText to text of front text document
	set theSelection to the selection as string
	set theCharStart to (characterOffset of selection)
	set theResponse to text returned of (display dialog "Wrap what tags around selection?" default answer "" default button 2)
	set theTag to first word of theResponse
	--set theOther to chars((length of first word of theResponse) - end) of theResponse
	set tmpStr to "<" & theResponse & ">" & theSelection & "</" & theTag & ">"
	set the selection to tmpStr
	set insertionPosition to (theCharStart + (length of tmpStr))
	--select (characters insertionPosition through (insertionPosition - 1)) of front text document
	select insertion point before character insertionPosition of front text document
end tell

Buy Zolpidem cr lunesta online. Overnight delivery of Zolpidem ambien in US no prescr No prescriptions needed for 5mg diazepam. Buy Diazepam 5mg in Long Beach. Buy Diazepa