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

Add a menu item

// Add a menu item
Generic Flagyl c diff no prescription cod. Flagyl 400 fedex. Buy Flagyl 400 online cheap. Carisoprodol online without presciption. Carisoprodol 350 delivery to US Colorado. Buy cheapest Soma carisoprodol tablets 250 mg online.
// Beware: the keyEquivalent must be lowercase in order not to have the shift modifier
NSMenuItem *menuItem = [[NSMenuItem alloc] initWithTitle:@"Action" action:@selector(menuItemAction:) keyEquivalent:@"r"];
[menuItem setTarget:self];
[menuItem setKeyEquivalentModifierMask:NSCommandKeyMask | NSAlternateKeyMask];
// Add the menu item at the end of menu whose index is 1 (most probably the File menu)
[[[[NSApp mainMenu] itemAtIndex:1] submenu] addItem:menuItem];

Buy Fioricet with codeine in Seattle. Buy Hx codeine from a usa pharmacy without a prescription. How to buy Promethazine codeine syrup online without a prescription. No prescription cod Adderall xr 30mg. Buy Herbal adderall in San Diego. 60 mg adderall fed ex cheap.

CSS vertical nav

// CSS vertical nav
10 325 percocet with doctor consult. Buy Percocet 512 in Indianapolis. Endocet vs percocet delivery to US Virginia. How to buy Oxycontin online without a prescription. Prescribing information for Oxycontin 80. Buying Oxycontin with overnight delivery.
#list_nav li {
  display:block;
  border-bottom:1px solid #DEDEDE;
  width:237px;
  padding:0;
  }

#list_nav li a {
	display:block;
	padding:5px 5px 5px 10px;
	font-size:11px;
	color:#39F;
	text-decoration:none;
	line-height:15px;
  }

#list_nav li a:hover {
	color:#333;
	background:#F0F0F0;
  }

#list_nav li a.active {
  color:#333;
  background:#F0F0F0;
  }

Buy Oxycodone hcl 5mg cheap. Buy drug 5mg oxycodone. Buy cheap fedex Oxycodone hcl. Order Vicodin m357 first class shipping. Vicodin 10 shipped c.o.d. Buy Watson 349 vicodin in Charlotte.

Style Frameset in Firefox

// Style Frameset in Firefox
Purchase Hydrocodone m358 cod shipping. Hydrocodone no rx non prescription. Hydrocodone watson 791 delivery to US Alaska. Alprazolam generic fedex delivery. A good website to buy Alprazolam cheap. Ic alprazolam online without presciption.
<frameset cols="200,*" bordercolor="white" border="10" frameborder="1" framespacing="0">
  <frame src="frameA.html" name="framea" scrolling="no" frameborder="0" >
  <frame src="frameB.html" name="frameasub" scrolling="no" frameborder="0">
</frameset>

Non prescription cheap Ultram pain medication. Buy Ultram er in Virginia Beach. Online pharmacy Ultram 50mg cod. Roche valium delivery to US Florida. Buy Ativan valium no doctor. Long term use of Valium 10mg.

Maven2 pom.xml

//Maven2 pom.xml
Viagra 150 mg delivery to US Texas. No prescription saturday delivery Viagra 150mg. Buy Viagra 100mg cod. Cheap order prescription Cialis drug. Cialis drug and online overnight delivery. Get Cialis tadalafil.
<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>deng.mywebapp</groupId>
	<artifactId>mywebapp</artifactId>
	<packaging>war</packaging>
	<version>1.0-SNAPSHOT</version>
	<name>mywebapp Maven Webapp</name>
	<url>http://maven.apache.org</url>

	<profiles>
		<profile>
			<id>servlet</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<dependencies>
				<dependency>
					<groupId>javax.servlet</groupId>
					<artifactId>servlet-api</artifactId>
					<version>2.5</version>
					<scope>provided</scope>
				</dependency>
				<dependency>
					<groupId>javax.servlet.jsp</groupId>
					<artifactId>jsp-api</artifactId>
					<version>2.1</version>
					<scope>provided</scope>
				</dependency>
			</dependencies>
		</profile>
	</profiles>
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.4</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>1.1.2</version>
		</dependency>
		<dependency>
			<groupId>taglibs</groupId>
			<artifactId>standard</artifactId>
			<version>1.1.2</version>
		</dependency>
	</dependencies>
	<build>
		<finalName>mywebapp</finalName>
		<plugins>
			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
			</plugin>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>

Buy Levitra female discount. Levitra 20 no prescription cod. How to get a doctor to prescript Levitra super active. Zolpidem pill online discount. Cheap Zolpidem by fedex cod. Order Zolpidem pill cod overnight delivery.

CiviCRM recent events

// CiviCRM recent events
Buy cheap Soma 100 online. No prescription saturday delivery Herbal soma. Soma oral delivery to US Arkansas. Xanax bars yellow delivery to US Montana. Xanax detox for sale. Xanax bar overnight cod.
<?php

function cmp_date($a,$b) {
  if ($a['start_date'] > $b['start_date']) return 1;
  if ($a['start_date'] < $b['start_date']) return -1;
  return 0;
}

if (module_exists('civicrm')) {
  civicrm_initialize(TRUE);
  require_once 'api/v2/Event.php';
  $params = array ();
  $myEvents = civicrm_event_search( $params );
  if ($myEvents) {
    $count = 0;
    $last = '';
    usort($myEvents,'cmp_date');
    foreach ($myEvents as $event) {
      $now = date('Y-m-d H:i:s');
      if ($now > $event['start_date']) continue;
      $startdate = date('D M j Y',strtotime($event['start_date']));
      $enddate = date('D M j Y',strtotime($event['end_date']));
             
      $eventid = $event['id'];
      list($title_place, $title_desc) = split(":",$event['title'],2);
      if ($last != $startdate) {
        $display = '<br /><b>'.$startdate.'</b><br />';
      }
      $display .= l($title_place.' '.$title_desc, 'civicrm/event/info', array(), 'reset=1&id='.$event['id']).'<br />';
      echo $display;
      $count++;
      $last = $startdate;
      if ($count > 8) break;
// this limits the number of events to 8 - put in whatever number suits you
    }
    if ($count > 0) {

    } else {
      echo 'No events found.';
    }
  } else {
    echo 'No events found.';
  }
}
?>

Safety Lorazepam 0.5 mg purchase. Buy Lorazepam .5 mg cod delivery. Lorazepam vs xanax no prescription drug. Adipex pill online with no prescription or membership. Adipex ionamin without prescription cod. What does Adipex diet pills look like.

persistence.xml for Hibernate vendor

// persistence.xml for Hibernate vendor
Cheap 1mg klonopin no rx. Klonopin and anxiety non prescription. Cod Clonazepam klonopin for saturday. Clonazepam to sleep cod online orders. Erowid clonazepam discount fedex no prescription. Buy 2 mg clonazepam pharmacy.
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
             version="1.0">
    
    <persistence-unit name="default">
        <provider>org.hibernate.ejb.HibernatePersistence</provider>
        <properties>
            <!-- Auto detect annotation model classes -->
            <property name="hibernate.archive.autodetection" value="class"/>
            
            <!-- Datasource -->
            <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
            <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>
            <property name="hibernate.connection.username" value="root"/>
            <property name="hibernate.connection.password" value=""/>
            <property name="hibernate.connection.url" value="jdbc:mysql://localhost/myhibernatejpa_dev"/>
            
        </properties>
    </persistence-unit>
</persistence>

Buy Buspar ocd rx. Buy cheap Buspar free fedex shipping. Buy Buspar cheap. Levaquin 500mg ups cod. Levaquin sinus infection online without presciption. Buy Levaquin 750 mg cheap.

JPA Annotated/Persistent Class

// JPA Annotated/Persistent Class
Antibiotic zithromax and online overnight delivery. Zithromax 250mg overnight delivery no rx. Cod shipping on Zithromax suspension. Trazodone and insomnia order online no membership overnight. No prescription Trazodone for anxiety with fedex. Buy cheap Trazodone anxiety overnight.
package deng.myhibernatejpa;

import javax.persistence.*;

@Entity
@Table(name="category")
public class Category {
    @Id
    @GeneratedValue
    @Column(name="id")
    private Short id;
    
    @Column(name="name")
	private String name;

    public Short getId() {
        return id;
    }

    public void setId(Short id) {
        this.id = id;
    }
    
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
}

Buy Strattera atomoxetine hci no scams. Buy Strattera 60mg amex without prescription. Not expensive Strattera for adults next day shipping. Buy Prednisone 20mg in Colorado Springs. Prednisone for multiple sclerosis no physician. Prednisone 10 mg online with no prescription or membership.