Skip to content

Instantly share code, notes, and snippets.

View brindy's full-sized avatar
🪂

Christopher Brind brindy

🪂
View GitHub Profile
@brindy
brindy / SampleListAdapter.java
Created May 6, 2009 20:20
A sample custom ListAdapter for Android
setListAdapter(new BaseAdapter() {
public int getCount() {
return expenses.size();
}
public Object getItem(int position) {
return expenses.get(position);
}
@brindy
brindy / emmaantjunit.xml
Created May 29, 2009 14:40
Sample JUnit ant task configuration to use Emma for code coverage on the fly.
<junit fork="yes" printsummary="yes">
<classpath refid="emma.classpath" />
<!-- general stuff -->
<classpath>
<!-- the test classes. -->
<pathelement location="bin" />
<!-- contains junit and other dependencies -->
<repository name="myapp-repo:0" >
<rule name="app/myapp" >
<!-- this line is required by nimble to build the rule and install it -->
<req name="builder/primordial.builder" />
<!-- pre-load my known osgi service requirements -->
<req name="osgi.service/component" />
<req name="osgi.service/cm" />
<req name="osgi.service/http" />
package helloworld;
import com.vaadin.Application;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;
public class HelloWorldApplication extends Application {
@Override
public void init() {
package com.vaadin.osgi;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.URL;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
package com.vaadin.osgi;
import java.util.HashSet;
import java.util.Set;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionEvent;
import javax.servlet.http.HttpSessionListener;
Bundle-SymbolicName: helloworld
Bundle-Version: 1.0.0
Service-Component: helloworld;\
provide:=com.vaadin.Application;\
factory:=vaadin.app;\
implementation:=helloworld.HelloWorldApplication
Private-Package: helloworld
Bundle-SymbolicName: helloworld.theme
Include-Resource: etc/theme
Export-Package: VAADIN.themes.helloworld
Fragment-Host: com.vaadin
Bundle-Version: 6.2.3
package helloworld;
import com.vaadin.Application;
import com.vaadin.ui.Label;
import com.vaadin.ui.Window;
public class HelloWorldApplication extends Application {
@Override
public void init() {
package com.vaadin.osgi;
import java.util.Dictionary;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServlet;