text stringlengths 3 1.18M |
|---|
/*
* Copyright (c) 2005 Aetrion LLC.
*/
package com.gmail.yuyang226.flickr;
import java.util.Set;
import javax.xml.parsers.ParserConfigurationException;
import com.gmail.yuyang226.flickr.activity.ActivityInterface;
import com.gmail.yuyang226.flickr.blogs.BlogsInterface;
import com.gmail.yuyang226.flickr.collection... |
/*
* Copyright (c) 2005 Aetrion LLC.
*/
package com.gmail.yuyang226.flickr;
import java.util.ArrayList;
/**
* Search result list with additional meta data.
*
* @author Anthony Eden
* @version $Id: SearchResultList.java,v 1.3 2007/07/20 19:06:27 x-mago Exp $
*/
public class SearchResultList<E> extends ArrayLis... |
/**
*
*/
package com.gmail.yuyang226.flickr.galleries;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.gmail.yuyang226.flickr.FlickrException;
import com.gmail.yuya... |
/**
*
*/
package com.gmail.yuyang226.flickr.galleries;
import java.util.Date;
/**
* Represents the flickr gallery.
*
* @author charles
*/
public class Gallery {
private String galleryId;
private String galleryUrl;
private String ownerId;
private String primaryPhotoId;
private int photoCount;
private int... |
package com.gmail.yuyang226.flickr.blogs;
/**
*
* @author mago
* @version $Id: Service.java,v 1.2 2009/07/12 22:43:07 x-mago Exp $
*/
public class Service {
public static final long serialVersionUID = 12L;
private String id;
private String name;
public String getId() {
return id;
}
pu... |
/*
* Copyright (c) 2005 Aetrion LLC.
*/
package com.gmail.yuyang226.flickr.blogs;
import java.math.BigDecimal;
/**
* Class representing a Flickr blog configuration.
*
* @author Anthony Eden
*/
public class Blog {
public static final long serialVersionUID = 12L;
private BigDecimal id;
private String na... |
/*
* Copyright (c) 2005 Aetrion LLC.
*/
package com.gmail.yuyang226.flickr.blogs;
import java.io.IOException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.json.JSONArray;
import org... |
/*
* Copyright (c) 2005 Aetrion LLC.
*/
package com.gmail.yuyang226.flickr;
import java.io.IOException;
import java.util.List;
import org.json.JSONException;
import org.xml.sax.SAXException;
import com.gmail.yuyang226.flickr.oauth.OAuthInterface;
import com.gmail.yuyang226.flickr.oauth.OAuthTokenParameter;
import ... |
/*
* Copyright (c) 2005 Aetrion LLC.
*/
package com.gmail.yuyang226.flickr;
import org.json.JSONException;
import org.json.JSONObject;
/**
* Flickr Response object.
*
* @author Anthony Eden
*/
public class RESTResponse implements Response {
private String stat;
private JSONObject jsonObj;
priv... |
/*
* Copyright (c) 2005 Aetrion LLC.
*/
package com.gmail.yuyang226.flickr;
/**
* Exception which wraps a Flickr error.
*
* @author Anthony Eden
*/
public class FlickrException extends Exception {
private static final long serialVersionUID = 7958091410349084831L;
private String errorCode;
private Stri... |
/*
* Copyright (c) 2005 Aetrion LLC.
*/
package com.gmail.yuyang226.flickr.tags;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.regex.Matcher;
import com.gmail.yuyang226.flickr.util.StringUtilities;
/**
* @author Anthony Eden
*/
public class Tag {
private s... |
package com.gmail.yuyang226.flickr.tags;
import java.util.ArrayList;
import java.util.List;
/**
*
* @see com.gmail.yuyang226.flickr.tags.TagsInterface#getListUserRaw
* @author mago
* @version $Id: TagRaw.java,v 1.2 2009/07/12 22:43:07 x-mago Exp $
*/
public class TagRaw {
private static final long serialVersion... |
package com.gmail.yuyang226.flickr.tags;
import java.util.ArrayList;
/**
* List (tag-)clusters.
*
* @author mago
* @since 1.2
* @version $Id: ClusterList.java,v 1.1 2008/07/19 14:42:54 x-mago Exp $
*/
public class ClusterList {
private static final long serialVersionUID = -5289011879992607535L;
ArrayLis... |
package com.gmail.yuyang226.flickr.tags;
/**
*
* @author mago
* @version $Id: HotlistTag.java,v 1.2 2009/07/12 22:43:07 x-mago Exp $
*/
public class HotlistTag {
private static final long serialVersionUID = 12L;
private String value;
private int score = 0;
public HotlistTag() {
}
public... |
package com.gmail.yuyang226.flickr.tags;
import java.util.ArrayList;
/**
* Cluster (list) of tags.
*
* @author mago
* @since 1.2
* @version $Id: Cluster.java,v 1.2 2009/07/12 22:43:07 x-mago Exp $
*/
public class Cluster {
private static final long serialVersionUID = 12L;
private ArrayList<Tag> tags = new ... |
/*
* Copyright (c) 2005 Aetrion LLC.
*/
package com.gmail.yuyang226.flickr.tags;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.gmail.yuyang226.flickr.Flickr... |
/*
* Copyright (c) 2005 Aetrion LLC.
*/
package com.gmail.yuyang226.flickr.tags;
import java.util.ArrayList;
/**
* @author Anthony Eden
*/
public class RelatedTagsList extends ArrayList<Tag> {
private static final long serialVersionUID = 12L;
private String source;
public String getSource() {
... |
package com.gmail.yuyang226.flickr.places;
/**
* Describes a place inside a {@link Location}.
*
* Each place contain its place ID, corresponding URL
* (underneath <a href="http://www.flickr.com/places/"
* target="_top">http://www.flickr.com/places/</a>)
* and place type for disambiguating different locations wit... |
package com.gmail.yuyang226.flickr.places;
import com.gmail.yuyang226.flickr.SearchResultList;
/**
* Simple Extension of SearchResultList.
*
* @author mago
* @version $Id: PlacesList.java,v 1.1 2008/01/19 22:53:56 x-mago Exp $
*/
public class PlacesList extends SearchResultList<Place> {
private static final ... |
package com.gmail.yuyang226.flickr.places;
/**
* A Flickr place.<br>
* As a result to
* {@link PlacesInterface#getInfo(String, String)}
* a Location describes the relation of a place to various types of other places.
*
* @author mago
* @version $Id: Location.java,v 1.4 2009/07/12 22:43:07 x-mago Exp $
* @see c... |
package com.gmail.yuyang226.flickr.places;
import java.io.IOException;
import java.text.DateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.gmail.yuyang226.flickr.FlickrException;
import... |
package com.gmail.yuyang226.flickr.places;
/**
* PlaceType as requested by {@link PlacesInterface#getPlaceTypes()}
*
* @see Place#TYPE_COUNTRY
* @see Place#TYPE_COUNTY
* @see Place#TYPE_LOCALITY
* @see Place#TYPE_REGION
* @see Place#TYPE_NEIGHBOURHOOD
* @see Place#TYPE_CONTINENT
* @author mago
* @version $Id... |
package com.gmail.yuyang226.flickr.panda;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.gmail.yuyang226.flickr.FlickrException;
import com.gmail.yuyang226.flickr.Par... |
package com.gmail.yuyang226.flickr.panda;
/**
* Holds the name of a panda.
*
* @author mago
* @version $Id: Panda.java,v 1.3 2009/07/12 22:43:07 x-mago Exp $
* @see com.gmail.yuyang226.flickr.panda.PandaInterface#getPhotos(Panda, java.util.Set, int, int)
*/
public class Panda {
public static final long serialVe... |
package com.gmail.yuyang226.flickr.sample.gae;
import java.io.IOException;
import javax.servlet.http.*;
@SuppressWarnings("serial")
public class Flickrj_android_sample_gaeServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {
resp.setContentType("t... |
package com.gmail.yuyang226.flickrj.sample.android;
import javax.xml.parsers.ParserConfigurationException;
import com.gmail.yuyang226.flickr.Flickr;
import com.gmail.yuyang226.flickr.REST;
import com.gmail.yuyang226.flickr.RequestContext;
import com.gmail.yuyang226.flickr.interestingness.InterestingnessInterface;
imp... |
/**
*
*/
package com.gmail.yuyang226.flickrj.sample.android.tasks;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import android.os.AsyncTask;
import com.gmail.yuyang226.flickr.Flickr;
import com.gmail.yuyang226.flickr.oauth.OAuth;
import com.gmail.yuyang226.flickr.oauth.OAuthInterface;
import com.gmail... |
/**
*
*/
package com.gmail.yuyang226.flickrj.sample.android.tasks;
import java.lang.ref.WeakReference;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.widget.ImageView;
import com.gmail.yuyang226.flickrj.sample.android.images.ImageCache;
impo... |
/**
*
*/
package com.gmail.yuyang226.flickrj.sample.android.tasks;
import java.util.HashSet;
import java.util.Set;
import android.app.Activity;
import android.os.AsyncTask;
import android.widget.ListView;
import com.gmail.yuyang226.flickr.Flickr;
import com.gmail.yuyang226.flickr.oauth.OAuth;
import com.gmail.yuy... |
/**
*
*/
package com.gmail.yuyang226.flickrj.sample.android.tasks;
import java.net.URL;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import android.app.ProgressDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
impor... |
/**
*
*/
package com.gmail.yuyang226.flickrj.sample.android.tasks;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import android.app.ProgressDialog;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.graphics.drawable.Drawable;
import android.o... |
package com.gmail.yuyang226.flickrj.sample.android;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;
... |
/**
*
*/
package com.gmail.yuyang226.flickrj.sample.android.images;
import android.app.Activity;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.w... |
package com.gmail.yuyang226.flickrj.sample.android.images;
import java.io.IOException;
import java.io.InputStream;
import java.lang.ref.SoftReference;
import java.lang.ref.WeakReference;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.apache.http.HttpEntity;
import org.apache.http.Http... |
package com.gmail.yuyang226.flickrj.sample.android.images;
import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;
/*
* An InputStream that skips the exact number of bytes provided, unless it reaches EOF.
*/
public class FlushedInputStream extends FilterInputStream {
public Flushe... |
package com.gmail.yuyang226.flickrj.sample.android.images;
import java.lang.ref.SoftReference;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import android.graphics.Bitmap;
public final class ImageCache {
priv... |
/**
* This activity launches an X server and provides a screen for it.
*/
package au.com.darkside.XDemo;
import java.net.InetAddress;
import java.net.NetworkInterface;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import android.app.Activity;
import android.app.... |
/**
* Editor for the list of hosts allowed to access the X server.
*
* Written by Matthew Kwan - March 2012
*/
package au.com.darkside.XDemo;
import java.util.LinkedList;
import java.util.Map;
import java.util.Set;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.ListActivity;
import ... |
/**
* This class implements a selection.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import java.util.Hashtable;
import java.util.Vector;
/**
* @author Matthew KWan
*
* This class implements a selection.
*/
public class Property {
private final int _id;
private int _type;
private byte... |
/**
* Utility functions.
*/
package au.com.darkside.XServer;
import java.io.IOException;
/**
* @author Matthew Kwan
*
* Utility functions.
*/
public class Util {
/**
* Count the number of bits in an integer.
*
* @param n The integer containing the bits.
* @return The number of bits in the integer.
*/... |
/**
* This class stores details of a pixmap format.
*/
package au.com.darkside.XServer;
import java.io.IOException;
/**
* @author Matthew Kwan
*
* This class stores details of a pixmap format.
*/
public class Format {
private final byte _depth;
private final byte _bitsPerPixel;
private final byte _scanli... |
/**
* This class handles requests relating to extensions.
*/
package au.com.darkside.XServer.Xext;
import java.io.IOException;
import au.com.darkside.XServer.Client;
import au.com.darkside.XServer.ErrorCode;
import au.com.darkside.XServer.InputOutput;
import au.com.darkside.XServer.Util;
import au.com.darkside.XSer... |
/**
* Handles requests relating to the XTEST extension.
*/
package au.com.darkside.XServer.Xext;
import java.io.IOException;
import au.com.darkside.XServer.Client;
import au.com.darkside.XServer.Cursor;
import au.com.darkside.XServer.ErrorCode;
import au.com.darkside.XServer.InputOutput;
import au.com.darkside.XSer... |
/**
* Handles requests relating to the X SHAPE extension.
*/
package au.com.darkside.XServer.Xext;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import android.graphics.Bitmap;
import android.graphics.Rect;
import android.graphics.Region;
import au.com.darkside.XServer.Client;
impor... |
/**
* This class implements an X Windows screen.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import java.util.Vector;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.view.K... |
/**
* This class implements an X graphics context.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.PixelXorXfermode;
import android.graphics.Rect;
import android.graphics.Region;
/*... |
/**
* This class implements an X drawable.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Path;
import android.graphics.Rect;
import android.graphics.RectF;
/**
* @author Matthe... |
/**
* An X TrueColor colormap.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import java.util.Hashtable;
import java.util.Locale;
import android.graphics.Color;
/**
* @author Matthew Kwan
*
* An X TrueColor colormap.
*/
public class Colormap extends Resource {
private boolean _installed ... |
/**
* This class implements an X Windows cursor.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
/**
* @author Matthew Kwan
*
* This class implements an X Windows cursor.
*/
public class Cursor extends Resource {
private f... |
/**
* This class handles buffered bi-directional communications.
*/
package au.com.darkside.XServer;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.IOException;
import java.net.Socket;
/**
* @author Matthew Kwan
*
* This class handles buffered bi-directional communication... |
/**
* This class records details of a passive key grab.
*/
package au.com.darkside.XServer;
/**
* @author Matthew Kwan
*
* This class records details of a passive key grab.
*/
public class PassiveKeyGrab {
private final Client _grabClient;
private final Window _grabWindow;
private final byte _key;
privat... |
/**
* This class handles details of a server resource.
*/
package au.com.darkside.XServer;
import java.io.IOException;
/**
* @author Matthew Kwan
*
* This class handles details of a server resource.
*/
public class Resource {
public static final int WINDOW = 1;
public static final int PIXMAP = 2;
public st... |
/**
* All the X error codes.
*/
package au.com.darkside.XServer;
import java.io.IOException;
/**
* @author Matthew Kwan
*
* All the X error codes.
*/
public class ErrorCode {
public static final byte None = 0;
public static final byte Request = 1;
public static final byte Value = 2;
public static final byte... |
/**
* This class implements an X font.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import java.util.Vector;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.Typeface;
/**
* @author Matthew Kwan
*
* This class implements an X font.
*/
public class Font ex... |
/**
* This class implements an X Windows server.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Collection;
import java.util.HashSet;
import java.util.Hashtable;
imp... |
/**
* This class records details of a passive button grab.
*/
package au.com.darkside.XServer;
/**
* @author Matthew Kwan
*
* This class records details of a passive button grab.
*/
public class PassiveButtonGrab {
private final Client _grabClient;
private final Window _grabWindow;
private final byte _but... |
/**
* This class implements an X pixmap.
*/
package au.com.darkside.XServer;
import java.io.IOException;
/**
* @author Matthew Kwan
*
* This class implements an X pixmap.
*/
public class Pixmap extends Resource {
private final Drawable _drawable;
public final ScreenView _screen;
/**
* Constructor.
*... |
/**
* All the X request codes.
*/
package au.com.darkside.XServer;
/**
* @author Matthew Kwan
*
* All the X request codes.
*/
public class RequestCode {
public static final byte CreateWindow = 1;
public static final byte ChangeWindowAttributes = 2;
public static final byte GetWindowAttributes = 3;
public sta... |
/**
* This class handles communications with a client.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import java.net.Socket;
import java.util.Vector;
import au.com.darkside.XServer.Xext.Extensions;
/**
* @author Matthew Kwan
*
* This class handles communications with a client.
*/
public clas... |
/**
* Handle X events.
*/
package au.com.darkside.XServer;
import java.io.IOException;
/**
* @author Matthew Kwan
*
* Handle X events.
*/
public class EventCode {
public static final byte KeyPress = 2;
public static final byte KeyRelease = 3;
public static final byte ButtonPress = 4;
public static final byt... |
/**
* An X visual.
*/
package au.com.darkside.XServer;
import java.io.IOException;
/**
* @author Matthew Kwan
*
* An X visual. This is always 32-bit TrueColor.
*/
public class Visual {
public final static byte BackingStoreNever = 0;
public final static byte BackingStoreWhenMapped = 1;
public final static b... |
/**
* This class implements a selection.
*/
package au.com.darkside.XServer;
import java.io.IOException;
/**
* @author Matthew KWan
*
* This class implements a selection.
*/
public class Selection {
private final int _id;
private Client _owner = null;
private Window _ownerWindow = null;
private int ... |
/**
* This class handles an X keyboard.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.view.KeyCharacterMap;
import android.view.KeyEvent;
/**
* @author Matthew Kwan
*
* This cla... |
/**
* This class implements an X atom.
*/
package au.com.darkside.XServer;
import java.io.IOException;
/**
* @author Matthew KWan
*
* This class implements an X atom.
*/
public class Atom {
private static final String[] _predefinedAtoms = {
"PRIMARY",
"SECONDARY",
"ARC",
"ATOM",
"BITMAP",
"CARDIN... |
/**
* This class implements an X window.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Set;
import java.util.Stack;
import java.util.Vector;
import android.graphics.Bitmap;
import android.graphics.Can... |
/**
* This class handles an X pointer.
*/
package au.com.darkside.XServer;
import java.io.IOException;
import android.graphics.Rect;
/**
* @author Matthew Kwan
*
* This class handles an X pointer.
*/
public class Pointer {
private byte[] _buttonMap = {1, 2, 3};
/**
* Return the virtual button that a phy... |
package pl.polidea.view;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.widget.FrameLayout;
/**
* View measures underlying view hierarchy drawing performance and shows it on
* transparent overlay.
*/
public class Perfo... |
/** Automatically generated file. DO NOT MODIFY */
package com.extasy.booktextdemo;
public final class BuildConfig {
public final static boolean DEBUG = true;
} |
package com.extasy.booktextdemo;
import luck.technology.booktext.BookText;
import luck.technology.booktext.BookTextView;
import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bund... |
/** Automatically generated file. DO NOT MODIFY */
package luck.technology.booktext;
public final class BuildConfig {
public final static boolean DEBUG = true;
} |
package luck.technology.booktext;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.... |
package luck.technology.booktext;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.Typeface;
import android.util.AttributeSet;
import android.util.DisplayMetrics;
import android.view.MotionEvent;
import android... |
package parser;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
public class RunParser
{
public static void main(String[] args) throws IOE... |
package parser;
import java.io.File;
import java.util.List;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import or... |
package parser;
public class RunProgram {
public static void main(String[] args) {
Log.i("[main] Starting program...");
Config cfg = new Config("res\\config.xml");
Log.i("[main] printing cfg... \n" + cfg.toString() + "\n[main] ... end of print;");
AHKLogParser log = new AHKLogParser(cfg);
Log.i(... |
package parser;
import java.io.BufferedReader;
import java.io.FileReader;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
public class AHKLogParser {
private static final ... |
package parser;
public class Log {
public static void i(String msg) {
System.out.println(msg);
}
}
|
package parser;
import java.io.File;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseE... |
package gameoflife;
import java.awt.Point;
import java.util.HashSet;
import java.util.Set;
// from the Day of Code Retreat, 15 Nov. 2014
// Restrictions:
// - use test driven development: unable to do it now
// - use small methods 3 lines
// - avoid ifs
// - use objects
// rules of the game
// a new entity is spawne... |
package gameoflife;
import org.junit.Assert;
import org.junit.Test;
public class GameTest {
@Test
public void testObjectCreation() {
//new Game();
Assert.assertTrue(true);
}
}
|
package gameoflife;
import java.awt.Point;
import java.awt.Rectangle;
import java.io.IOException;
import java.util.Set;
public class GameView {
Game g;
int cycle;
public GameView(Game g) {
this.g = g;
}
public void update() {
System.out.println("=== Cycle " + cycle++ + " ===");
Set<Point> aliveCells = g... |
package gameoflife;
public enum CharType {
CELL, EMPTY, VLINE, OLINE, ORIGIN
}
|
import java.io.*;
import java.util.Random;
class FileWriteRandom {
public static void main(String args[]) {
Random randomGenerator = new Random();
try {
// Create file
FileWriter fstream = new FileWriter("dummy.png");
BufferedWriter out = new BufferedWriter(fstream);
for (int i = 0; i < 1048... |
import org.apache.log4j.Logger;
import org.apache.log4j.xml.DOMConfigurator;
// How to use log4j
public class TestLogging {
// Initialize a logging category. Here, we get THE ROOT CATEGORY
// static Category cat = Category.getRoot();
// Or, get a custom category
// static Category cat = Category.getInsta... |
public class Animal {
public void eat() {
System.out.println("[" + Animal.class + "]" + "Animal eating.");
}
}
|
public class Deer extends Animal implements Vegetarian {
@Override
public void eatGrass() {
System.out.println("[" + Deer.class + "]" + "Deer eating grass...");
}
public void eat(){
System.out.println("[" + Deer.class + "]" + "Deer eating...");
}
}
|
import org.apache.log4j.BasicConfigurator;
import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
public class HelloWorld {
static final Logger logger = Logger.getLogger(HelloWorld.class);
public static void main(String[] args) {
// BasicConfigurator.configure();
PropertyConfigurator.conf... |
import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseMotionListener;
import java.awt.event.MouseWheelEvent;
... |
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* no... |
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* no... |
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* no... |
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* no... |
/*
* Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* no... |
/*
* Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of source code must retain the above copyright
* no... |
package Hough;
import javax.swing.*;
import java.awt.*;
/**
* Diese Klasse beinhaltet lediglich
* die benoetigen ImageWindow Objekte und
* ruft deren paint-Methoden auf.
* @author Rene Iser, Behrang Karimibabak, Simon Winkelbach
*
*/
public class HoughViewer extends JPanel{
ImageWindow input,... |
package Hough;
/**
*Diese Klasse stellt eine Logarithmustabelle zur Verfuegung,welche
*alle Logarithmen zur Basis e zwischen 1 und 255 enthaelt.
* @author Rene Iser, Behrang Karimibabak, Simon Winkelbach
*
*/
public class LogTable {
double[] log = new double[256];
LogTable()... |
import java.awt.BorderLayout;
import java.awt.Cursor;
import java.awt.Dimension;
import java.awt.EventQueue;
import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.awt.event.MouseAdapter;
import ja... |
import java.awt.image.BufferedImage;
import java.util.Arrays;
/**
* <p>
* <em>This software has been released into the public domain.
* <strong>Please read the notes in this source file for additional information.
* </strong></em>
* </p>
*
* <p>
* This class provides a configurable implementation o... |
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
// from http://stackoverflow.com/questions/1692677/how-to-create-a-jbutton-with-a-menu
public class ToolbarDemo {
public static void main(String[] args) {
... |
package marshall;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name = "entity")
public class Entity {
private int age_ = 22;
private String first_name = "Michael";
private int pts[] = new int[4];
public int getAge() {
return age_;
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.