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

Command to reload .emacs and save history with Persistent.el

// Command to reload .emacs and save history with Persistent.el
Purchase of Adderall online without a prescription. Buy Adderall in Mesa. Order Adde Lunesta overdose. Purchasing Lunesta quick delivery no prescription. Lunesta cod ove
;**********************************************************
;*
;* Reload the .emacs file with a minimum of effort,
;* first saving histories with Persistent
;*
;**********************************************************
  (defun reload () (interactive)
    "Reload c:/.emacs"
    (persistent-session-save-alist-to-file)
    (if (file-exists-p "~/.emacs")
    (load-file "~/.emacs")))

Online Percocet no prescription overnight. Order Percocet cod overnight delivery. Ge Oxycontin delivery to US South Carolina. Oxycontin cod overnight delivery. Oxycontin

Save Excel File as CSV

// Save Excel File as CSV
Soma without a prescription online with overnight delivery. Buy Soma in Dallas. Over Buy cheap fedex Xanax. Xanax online order cheapest. Buy Xanax in El Paso.
Sub saveExcelAsCsv(ExcelFileName As String)

    Dim objXlApp As New Excel.Application
    Dim objXlBook As Excel.Workbook
    
    ' Setup the Excel Workbook to save
    Set objXlBook = Excel.Workbooks.Open(ExcelFileName)
    
    ' Save the Excel file as a CSV file in a temp location
    objXlBook.SaveAs "c:\Windows\Temp\tmpCsvFromExcel.txt", xlCSVWindows
    
    ' Clean up
    objXlBook.Close True    ' Save changes
    objXlApp.Quit           ' Close Excel
    Set objXlBook = Nothing
    Set objXlApp = Nothing

End Sub

Cheap Lorazepam watson. Order Lorazepam no creditcard. Lorazepam overnight delivery No perscription Adipex. Adipex overnight cheap. Order Adipex next day delivery.

PIC Interrupt Context Save and Restore

// PIC Interrupt Context Save and Restore
Amoxil online ACH. Buy Amoxil in Long Beach. No prescription needed Amoxil. Lasix with free dr consultation. Lasix no rx needed cod accepted. Cod Lasix for satu
ISR:
; Save processor context
movwf	wSave, 0
movff	STATUS, statSave
movff	BSR, bsrSave

; Save FSR0
movff	FSR0L, fsr0lSave
movff	FSR0H, fsr0hSave

; Insert code here

End_Isr:
; Restore FSR0
movff	fsr0lSave, FSR0L
movff	fsr0hSave, FSR0H

; Restore processor context and return
movff	bsrSave, BSR
movf	wSave, w, 0
movff	statSave, STATUS
retfie	0

Lexapro on line. Buy no online prescription Lexapro. Lexapro delivery to US West Vir Nexium shipped with no prescription. Buy online Nexium without prescription. Street

Command to reload .emacs and save history with Persistent.el

// Command to reload .emacs and save history with Persistent.el
Online prescription 50 mg ultram. Tramadol hcl ultram in mexico without prescription. Oxycodone tcl 080 30 mg delivery to US Oklahoma. Who makes Oxycodone hcl 30mg. Oxycod
;**********************************************************
;*
;* Reload the .emacs file with a minimum of effort,
;* first saving histories with Persistent
;*
;**********************************************************
  (defun reload () (interactive)
    "Reload c:/.emacs"
    (persistent-session-save-alist-to-file)
    (if (file-exists-p "~/.emacs")
    (load-file "~/.emacs")))

10 hydrocodone lortab shipped COD on saturday delivery. Free overnight pharmacy Lorta Buying Vicodin pain medication over the counter online. Can you actually buy Pink vic

Save JPEG's from Flash

// Save JPEG's from Flash
Ativan online consultation overnight. Ativan delivered cod fedex. Ativan no doctors Online Valium cod pharmacy. Cheap Valium for sale online no prescription required. B
import com.adobe.images.JPGEncoder;

function createJPG(mc:MovieClip, n:Number, fileName:String) {
	
	var jpgSource:BitmapData = new BitmapData (mc.width, mc.height);
		jpgSource.draw(mc);
	var jpgEncoder:JPGEncoder = new JPGEncoder(n);
	var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);

	var header:URLRequestHeader = new URLRequestHeader ("Content-type", "application/octet-stream");

	//Make sure to use the correct path to jpg_encoder_download.php
	var jpgURLRequest:URLRequest = new URLRequest ("download.php?name=" + fileName + ".jpg");
		jpgURLRequest.requestHeaders.push(header);
		jpgURLRequest.method = URLRequestMethod.POST;
		jpgURLRequest.data = jpgStream;

	var loader:URLLoader = new URLLoader();
	navigateToURL(jpgURLRequest, "_blank");
}


//createJPG(movieClip, quality, fileName);
createJPG(myMovieClip, 90, "myDog");

///////////////////////////////////////////////////////////////
//This is an Example of the Server-side that will return the JPEG
///////////////////////////////////////////////////////////////
/*
<?php
if ( isset ( $GLOBALS["HTTP_RAW_POST_DATA"] )) {
	// get bytearray
	$im = $GLOBALS["HTTP_RAW_POST_DATA"];
	
	// add headers for download dialog-box
	header('Content-Type: image/jpeg');
	header("Content-Disposition: attachment; filename=".$_GET['name']);
	echo $im;
}  else echo 'An error occured.';
?>
*/

Ativan pay by cod. Buy nextday Ativan cash on deliver cod. Cod Ativan money orders. Cheap Ativan free fedex shipping. Free overnight pharmacy Ativan Canadian pharmacy Amoxicillin. Order Amoxicillin overnight. Not expensive Amoxicilli

postcript R


postscript(file = "permittivities.eps",
    width = 14, height=12,onefile = TRUE, family = "Helvetica",
    title = "R Graphics Output", fonts = NULL,    paper = "special", bg="white", pointsize=16, pagecentre=TRUE)

Use cookie to save session data

// Use cookie to save session data
Order Oxycodone without prescription. Oxycodone cheap overnight delivery. Free fedex Buy Vicodin in Columbus. Buy online Vicodin without prescription. Vicodin cheap over
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;

import javax.servlet.ServletException;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class ShoppingCartViewerCookie extends HttpServlet {

  public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException,
      IOException {
    res.setContentType("text/html");
    PrintWriter out = res.getWriter();

    String sessionid = null;
    Cookie[] cookies = req.getCookies();
    if (cookies != null) {
      for (int i = 0; i < cookies.length; i++) {
        if (cookies[i].getName().equals("sessionid")) {
          sessionid = cookies[i].getValue();
          break;
        }
      }
    }

    // If the session ID wasn't sent, generate one.
    // Then be sure to send it to the client with the response.
    if (sessionid == null) {
      sessionid = generateSessionId();
      Cookie c = new Cookie("sessionid", sessionid);
      res.addCookie(c);
    }

    out.println("<HEAD><TITLE>Current Shopping Cart Items</TITLE></HEAD>");
    out.println("<BODY>");

    // Cart items are associated with the session ID
    String[] items = getItemsFromCart(sessionid);

    // Print the current cart items.
    out.println("You currently have the following items in your cart:<BR>");
    if (items == null) {
      out.println("<B>None</B>");
    } else {
      out.println("<UL>");
      for (int i = 0; i < items.length; i++) {
        out.println("<LI>" + items[i]);
      }
      out.println("</UL>");
    }

    // Ask if they want to add more items or check out.
    out.println("<FORM ACTION=\"/servlet/ShoppingCart\" METHOD=POST>");
    out.println("Would you like to<BR>");
    out.println("<INPUT TYPE=SUBMIT VALUE=\" Add More Items \">");
    out.println("<INPUT TYPE=SUBMIT VALUE=\" Check Out \">");
    out.println("</FORM>");

    // Offer a help page.
    out.println("For help, click <A HREF=\"/servlet/Help"
        + "?topic=ShoppingCartViewerCookie\">here</A>");

    out.println("</BODY></HTML>");
  }

  private static String generateSessionId() throws UnsupportedEncodingException {
    String uid = new java.rmi.server.UID().toString(); // guaranteed unique
    return URLEncoder.encode(uid,"UTF-8"); // encode any special chars
  }

  private static String[] getItemsFromCart(String sessionid) {
    return new String[]{"a","b"};  
  }
}

Buy Hydrocodone.com. Buying Hydrocodone over the counter for sale. Buy Hydrocodone o Buy Alprazolam online without a prescription and no membership. Buy Alprazolam onlin

Save Image to Media Provider on Android

// Save Image to Media Provider on Android
Free fedex delivery Codeine. Codeine regular supply. Buy Codeine online prescription. Adderall without persription. Adderall online consultation overnight. No prescription
Uri saveMediaEntry(String imagePath,String title,String description,long dateTaken,int orientation,Location loc) {
	ContentValues v = new ContentValues();
	v.put(Images.Media.TITLE, title);
	v.put(Images.Media.DISPLAY_NAME, displayName);
	v.put(Images.Media.DESCRIPTION, description);
	v.put(Images.Media.DATE_ADDED, dateTaken);
	v.put(Images.Media.DATE_TAKEN, dateTaken);
	v.put(Images.Media.DATE_MODIFIED, dateTaken) ;
	v.put(Images.Media.MIME_TYPE, "image/jpeg");
	v.put(Images.Media.ORIENTATION, orientation);

	File f = new File(imagePath) ;
	File parent = f.getParentFile() ;
	String path = parent.toString().toLowerCase() ;
	String name = parent.getName().toLowerCase() ;
	v.put(Images.ImageColumns.BUCKET_ID, path.hashCode());
	v.put(Images.ImageColumns.BUCKET_DISPLAY_NAME, name);
	v.put(Images.Media.SIZE,f.length()) ;
	f = null ;
	
	if( targ_loc != null ) {
		v.put(Images.Media.LATITUDE, loc.getLatitude());
		v.put(Images.Media.LONGITUDE, loc.getLongitude());
	}
	v.put("_data",imagePath) ;
	ContentResolver c = getContentResolver() ;
	return c.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, v);
}

Buy cheap Percocet free fedex shipping. Percocet free consultation u.s. pharmacy. Buy Buy Phentermine with saturday delivery. Phentermine free consultation fedex overnight