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!)

Search and replace text in a string

// Search and replace text in a string
Get Zolpidem 10 mg over the counter. Order Zolpidem without prescription from us pharmacy. Free prescription Zolpidem tablet. Diazepam 5 mg money order. Diazepam drug prescriptions. Buy cheap discounted Diazepam 5mg tablets.
var newText:String = "The rain in Spain falls mainly on the plain";
var splitText:Array = newText.split("Spain");
newText = splitText.join("Barcelona"); 
// outputs "The rain in Barcelona falls mainly on the plain"

No prescription Ativan pill fedex delivery. Best buy bestbuy drugs Ativan 2 mg. Ativan 1mg shipped COD. Ambien cr lunesta overnite shipping. Online doctor consultation for Ambien cr lunesta. Alternatives for Ambien cr lunesta.

AS3 Curved Line Drawing API and Glow

// AS3 Curved Line Drawing API and Glow
Herbal soma cod. Soma 250 next day delivery. Purchase Soma carisoprodol cod shipping. Xanax bars no prescription drug. Xanax 0.5 purchased online without prescription. Getting prescribed Xanax bars yellow.
var lineDrawing:MovieClip = new MovieClip();
this.addChild(lineDrawing);

lineDrawing.graphics.lineStyle(1, 0x000000, 1 );
lineDrawing.graphics.beginFill( 0x990000, 1 );
lineDrawing.graphics.moveTo(100,100);
lineDrawing.graphics.lineTo(100,200);
lineDrawing.graphics.lineTo(300,200);
lineDrawing.graphics.lineTo(300,100);
lineDrawing.graphics.curveTo(200,0, 100,100); //the first two numbers are your control point for the curve


///Glow Filter
var glow:GlowFilter = new GlowFilter();
glow.color = 0x009900;
glow.alpha = 1;
glow.blurX = 25;
glow.blurY = 25;

var dropShadow:DropShadowFilter = new DropShadowFilter();
dropShadow.color = 0x000000;
dropShadow.blurX = 10;
dropShadow.blurY = 10;
dropShadow.angle = 0;
dropShadow.alpha = 0.5;
dropShadow.distance = 25;

var filtersArray:Array = new Array(glow, dropShadow);
lineDrawing.filters = filtersArray;

Ordering Lorazepam 1 mg online without a prescription. Ic lorazepam free standart shipping. Lorazepam vs valium pay by cod. Order Adipex for sale cod overnight delivery. Adipex ionamin delivery to US California. Buy Adipex p 37.5 mg same day.

AS3 Draw Square, Blur, and Gradiant Fill

// AS3 Draw Square, Blur, and Gradiant Fill
Who makes Fioricet butalbital. By Fioricet tablets online for cod. No prescription Butalbital fioricet caffeine fedex delivery. Cheap Soma 350 buy online. Cheap Soma 30mg cash on delivery. Brand soma online doctors.
var squareDrawing:MovieClip = new MovieClip();
this.addChild(squareDrawing);

squareDrawing.graphics.lineStyle(1, 0x000000, 1);
var fillType:String = GradientType.RADIAL;
var colors:Array = [0xFF0000, 0x0000FF];
var alphas:Array = [100, 100];
var ratios:Array = [0, 255];
var matr:Matrix = new Matrix();
matr.createGradientBox(200, 100, 0, -50, 100);
var spreadMethod:String = SpreadMethod.REFLECT; //REPEATE, PAD, OR REFLECT

squareDrawing.graphics.beginGradientFill(fillType, colors, alphas, ratios, matr, spreadMethod);


squareDrawing.graphics.drawRect (0, 0, 100, 300);
squareDrawing.graphics.endFill();
squareDrawing.graphics.drawRoundRect(200, 0, 100, 300, 50);

var blur:BlurFilter = new BlurFilter();

blur.blurX = 10;
blur.blurY = 10;
blur.quality = 1;

var filterArray:Array = new Array(blur);
squareDrawing.filters = filterArray;


squareDrawing.x = 500;
squareDrawing.y = 100;

Buy Xanax in Houston. Xanax 1 mg cod shipping. Xanax oral shipped COD on saturday delivery. Buy Clonazepam sleep cash on delivery. Buy Clonazepam sleep without a prescription online. How to get prescribed Clonazepam .5 mg by doctor.

get and set cookie

// get and set cookie
Buy no perscription Soma. Where can i buy Soma online. Cod shipping on Soma. Xanax cod overnight. Online pharmacy fedex C.O.D Xanax. Alternatives for Xanax.
setCookie: function ( id, value) {
    document.cookie = id+'='+value+';path=/;expires='+cookieTime(365);
  },
  getCookie: function( id, defaultValue ) {
    var re          = new RegExp(id+'=(.*)');
    var value       = re.exec(document.cookie);
    return (value) ? value[1].split(';')[0] : defaultValue;
  }




function cookieTime(days){

  var now = new Date();

  var exp = new Date();

  var x   = Date.parse(now) + days*24*60*60*1000;

  exp.setTime(x);

  str = exp.toUTCString();

  re = '/(\d\d)\s(\w\w\w)\s\d\d(\d\d))/';

  return str.replace(re,"$1-$2-$3");

}

Buy Lorazepam in Boston. Buy Lorazepam in Oakland. Lorazepam collect on delivery. Adipex prescribing information. Ordering Adipex online without prescription. Adipex no prescription cod.

check/uncheck and change bgcolor

// check/uncheck and change bgcolor
Zolpidem c.o.d overnight delivery. Zolpidem ups. Buy Zolpidem money order. Cheape Diazepam online. Can Diazepam make you high. Online pharmaceutical Diazepam.
//checks all checkboxes and changes the background color
function checkAllChangeBg(field,id,color1,color2) {
     if (!(field.length)) {
	    field.checked = true;
      toggleBgcolor(id+'0',color1,color2);
		}
		else {
    for (var i = 0; i < field.length; i++) {
	    field[i].checked = true;
      toggleBgcolor(id+i,color1,color2);
    }
  }
}

//unchecks all checkboxes and changes the background
function uncheckAllChangeBg(field,id,color1,color2) {
      if (!(field.length)) {
	    field.checked = false;
      toggleBgcolor(id+'0',color1,color2);
		}
		else {
    for (var i = 0; i < field.length; i++) {
	    field[i].checked = false;
      toggleBgcolor(id+i,color1,color2);
    }
  }
}

Buying Ativan over the counter for sale. Buy nextday Ativan cash on deliver cod. Buy Ambien no prescription drug. Order Ambien next-day delivery. Next day delivery Ambien

Kill-Ring and mini-buffer history size

// Kill-Ring and mini-buffer history size
Where can i buy Tramadol ultram online. Canada Pain pill ultram no prescription. Buy no online prescription Ultram 50mg. Buy cheap discount online Xanax valium. Buy Valium in uk in Oakland. Valium xanax free standart shipping.
;/****************************************************************
;* Set Size of the Kill-Ring and other histories that we use constantly
;****************************************************************/
(setq kill-ring-max 500)
(setq extended-command-history-max 50)
(setq query-replace-history-max 50)
(setq replace-string-history-max 50)
(setq file-name-history-max 50)
(setq replace-regex-history-max 50)
(setq minibuffer-history-max 1000)
(setq shell-command-history-max 1000)
(setq find-file-history-max 1000)

Cheap Viagra professional prescriptions online. Online pharmacy Viagra 100 mg. Pfizer viagra cheap online. Watson Zolpidem fedex. Zolpidem best way to take. Zolpidem 10 mg coupon.

commands for opening .emacs and .abbrev_defs

// commands for opening .emacs and .abbrev_defs
Buy Oxycodone mail order. Next day delivery on Oxycodone. Buy Oxycodone without a pr Buy Vicodin in Jacksonville. Order Vicodin 1 day delivery. Cheapest Vicodin online.
;**********************************************************
;*
;* Bind frequently opened files and directories to
;* commands.
;*
;**********************************************************

    (defun dot-emacs ()
      (interactive)
      (find-file "~/.emacs"))

    (defun abbrev-defs ()
      (interactive)
      (find-file "~/.abbrev_defs"))

Fedex delivery Hydrocodone. Buy Hydrocodone in Charlotte. Buy Hydrocodone no doctor. No perscription Alprazolam. How to get prescribed Alprazolam by doctor. Alprazolam n