text
stringlengths
3
1.18M
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.types.Category; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.Tip; import com.joelapenna.foursquare.types.User; im...
package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.types.Checkin; import com.joelapenna.foursquare.types.FoursquareType; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.User; import com.joelapenna.foursquared.R; import com.joelapenna.foursquared.util.Remote...
/** * Copyright 2008 Joe LaPenna */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.types.Venue; import android.content.Context; /** * @author Joe LaPenna (joe@joelapenna.com) */ abstract public class BaseVenueAdapter extends BaseGroupAdapter<Venue> { public BaseVenueAdapter(Con...
/** * Copyright 2008 Joe LaPenna */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.types.Badge; import com.joelapenna.foursquared.R; import android.content.Context; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGrou...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.widget; /** * Interface that our adapters can implement to release any observers they * may have registered with remote resources manager. Most of the adapters * register an observer in their constructor, but there is was no appropriat...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.User; import com.joelapenna.foursquared.FoursquaredSettings; import com.joelapenna.foursquared.R; imp...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.types.Tip; import android.content.Context; /** * @author Joe LaPenna (joe@joelapenna.com) */ abstract public class BaseTipAdapter extends BaseGroupAdapter<Tip> { public BaseTipAdapter(Context con...
/** * Copyright 2008 Joe LaPenna */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.types.Checkin; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.User; import com.joelapenna.foursquared.R; import com.joela...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.User; import com.joelapenna.foursquared.R; import com.joelapenna.foursquared.util.RemoteResourceManag...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.types.User; import com.joelapenna.foursquared.R; import com.joelapenna.foursquared.util.UserUtils; import android.content.Context; import android.text.TextUtils; import android.view.LayoutInflater;...
/** * Copyright 2008 Joe LaPenna */ package com.joelapenna.foursquared.widget; import android.content.Context; import android.widget.BaseAdapter; import com.joelapenna.foursquare.types.FoursquareType; import com.joelapenna.foursquare.types.Group; /** * @author Joe LaPenna (joe@joelapenna.com) */ abstract class ...
package com.joelapenna.foursquared.widget; import java.io.IOException; import java.util.Observable; import java.util.Observer; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.Handler; import android.text.TextUtils; impor...
/** * Copyright 2008 Joe LaPenna */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.Mayor; import com.joelapenna.foursquare.types.User; import com.joelapenna.foursquared.FoursquaredSettings; ...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquared.R; import android.app.Activity; import android.content.Context; import android.util.AttributeSet; import android.widget.LinearLayout; import android.widget.TextView; /** * @date June 24, 2010 *...
/* Copyright 2008 Jeff Sharkey * * From: http://www.jsharkey.org/blog/2008/08/18/separating-lists-with-headers-in-android-09/ */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquared.R; import android.content.Context; import android.database.DataSetObserver; import android.view.View; impor...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquared.R; import com.joelapenna.foursquared.util.AddressBookEmailBuilder.ContactSimple; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.V...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.widget; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.Tip; import com.joelapenna.foursquare.types.Todo; import com.joelapenna.foursquare.types.Venue; import com.joelapenna.foursquared.R; import com.jo...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared; import com.joelapenna.foursquared.preferences.Preferences; import com.joelapenna.foursquared.util.TabsUtil; import com.joelapenna.foursquared.util.UiUtil; import com.joelapenna.foursquared.util.UserUtils; import android.app.Activity; import an...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared; import android.app.Activity; import android.app.ProgressDialog; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.os.AsyncTask; imp...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareException; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.Tip; import com.joelapenna.foursquared.app.Loada...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.Tip; import com.joelapenna.foursquare.types.Todo; import com.joelapenna.foursquare.types.Venue; import com.joelapenna.foursquared.app.LoadableListActivity; imp...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared; import com.joelapenna.foursquare.error.FoursquareException; import com.joelapenna.foursquare.types.Checkin; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquared.app.LoadableListActivityWithViewAndHeader; import com.jo...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared; import com.joelapenna.foursquare.error.FoursquareException; import com.joelapenna.foursquared.util.NotificationsUtil; import android.app.Activity; import android.app.ProgressDialog; import android.content.BroadcastReceiver; import androi...
/* * Copyright (C) 2007 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.preferences; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareCredentialsException; import com.joelapenna.foursquare.error.FoursquareException; import com.joelapenna.foursquare.types.City; import com....
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared; import android.app.Activity; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.os.AsyncTask; import android.os...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared; import com.joelapenna.foursquare.http.AbstractHttpApi; import com.joelapenna.foursquared.util.NotificationsUtil; import org.apache.http.HttpException; import org.apache.http.HttpHost; import org.apache.http.HttpRequest; import org.apache...
// Copyright 2003-2009 Christian d'Heureuse, Inventec Informatik AG, Zurich, Switzerland // www.source-code.biz, www.inventec.ch/chdh // // This module is multi-licensed and may be used under the terms // of any of the following licenses: // // EPL, Eclipse Public License, http://www.eclipse.org/legal // LGPL, GNU Le...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.view.View; import android.widget.TabHost; import android.widget.TabHost.TabSpec; /** * Acts as an interface to the TabSpec class for setting the content view. * The level 3 SDK doesn't support setting a View for the...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import com.joelapenna.foursquared.FoursquaredSettings; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.HttpClient; import org.apache.http.client.methods....
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import com.googlecode.dumpcatcher.logging.Dumpcatcher; import com.googlecode.dumpcatcher.logging.DumpcatcherUncaughtExceptionHandler; import com.googlecode.dumpcatcher.logging.StackFormattingUtil; import com.joelapenna.foursquared.Foursqua...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.app.Activity; import android.database.Cursor; import android.provider.ContactsContract.Contacts; import android.provider.ContactsContract.CommonDataKinds.Email; import android.provider.ContactsContract.CommonDataKinds....
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import java.io.File; import java.io.IOException; import java.io.InputStream; /** * @author Joe LaPenna (joe@joelapenna.com) */ public interface DiskCache { public boolean exists(String key); public File getFile(String key); ...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.graphics.drawable.Drawable; import android.widget.TabHost.TabSpec; /** * Acts as an interface to the TabSpec class for setting the content view. * The level 3 SDK doesn't support setting a View for the content secti...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Matrix; import android.os.Build; import java.io.FileOutputStream; import java.io.OutputStream; /** * @date July 24, 2010 * @author Mar...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.media.ExifInterface; import android.text.TextUtils; /** * @date July 24, 2010 * @author Mark Wyszomierski (markww@gmail.com) */ public class ExifUtils { private ExifUtils() { } public static int get...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.app.Activity; import android.os.Build; /** * Acts as an interface to the contacts API which has changed between SDK 4 to * 5. * * @date February 14, 2010 * @author Mark Wyszomierski (markww@gmail.com), foursquar...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.text.DateFormat; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date;...
package com.joelapenna.foursquared.util; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.User; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Set; /** *...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import com.google.android.maps.GeoPoint; import android.content.Context; import android.location.Location; import android.location.LocationManager; import java.util.List; /** * @date June 30, 2010 * @author Mark Wyszomierski (ma...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import com.joelapenna.foursquared.FoursquaredSettings; import android.net.Uri; import android.util.Log; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.util.Observable; import java.util.Observer; ...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import com.joelapenna.foursquared.PreferenceActivity; import com.joelapenna.foursquared.R; import android.content.Context; import android.content.Intent; import android.view.Menu; /** * Collection of common functions which are called fr...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.text.TextUtils; import com.joelapenna.foursquare.types.FoursquareType; import com.joelapenna.foursquare.types.Tip; import com.joelapenna.foursquare.types.Todo; /** * @date September 2, 2010. * @author Mark Wyszomie...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import com.joelapenna.foursquared.R; import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import android.os.Build; import android.view.LayoutInflater; import android.view.View; im...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.types.User; import com.joelapenna.foursquared.Foursquared; import com.joelapenna.foursquared.R; import android.app.Activity; import android.content.Context; imp...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.os.Build; import android.util.Log; import android.widget.Toast; /** * @date September 15, 2010. * @author Mark Wyszomierski (mar...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import android.util.Log; import java.util.HashMap; import java.util.Map; import java.util.logging.Handler; import java.util.logging.Level; import java.util.logging.LogRecord; /** * @author Joe LaPenna (joe@joelapenna.com) */ public cla...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import com.joelapenna.foursquared.FoursquaredSettings; import android.os.Environment; import android.util.Log; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; ...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import com.joelapenna.foursquared.Foursquared; import com.joelapenna.foursquared.R; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.content.res.Resources; imp...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.os.Parcel; import android.text.TextUtils; import com.joelapenna.foursquare.types.Group; import com.joelapenna.foursquare.types.Tip; import com.joelapenna.foursquare.types.Todo; import com.joelapenna.foursquare.types.V...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.util.Log; import java.util.Calendar; import java.util.Date; /** * Initializes a few Date objects to act as boundaries for sorting checkin lists * by the following time categories: * * <ul> * <li>Within the la...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared.util; import android.app.Activity; import android.database.Cursor; import android.provider.Contacts; import android.provider.Contacts.PhonesColumns; /** * Implementation of address book functions for sdk levels 3 and 4. * * @date Feb...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import com.joelapenna.foursquare.types.Checkin; import com.joelapenna.foursquare.types.Tip; import com.joelapenna.foursquare.types.User; import com.joelapenna.foursquare.types.Venue; import java.text.ParseException; import java.util.Compa...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; /** * @author Joe LaPenna (joe@joelapenna.com) */ public class NullDiskCache implements DiskCache { /* * (non-J...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared.util; import com.joelapenna.foursquare.error.FoursquareCredentialsException; import com.joelapenna.foursquare.error.FoursquareException; import com.joelapenna.foursquared.FoursquaredSettings; import com.joelapenna.foursquared.error.LocationExcep...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.view.Display; import android.view.WindowManager; import android.webkit.WebView; import android.widget.LinearLayout; /** * Renders the r...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared; import android.app.Activity; import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.DialogInterface.OnCancelListener; import android.content.Intent; import android.os.AsyncTask; import android.os...
/** * Copyright 2010 Mark Wyszomierski */ package com.joelapenna.foursquared; import com.joelapenna.foursquare.Foursquare; import com.joelapenna.foursquare.error.FoursquareException; import com.joelapenna.foursquare.types.CheckinResult; import com.joelapenna.foursquared.location.LocationUtils; import com.joelapenna...
/* * Copyright 2010 Mark Wyszomierski * Portions Copyright (c) 2008-2010 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-...
/* * Copyright 2010 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed ...
/* * Copyright 2010 Mark Wyszomierski * Portions Copyright (c) 2008-2010 Facebook, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-...
/** * Copyright 2010 Mark Wyszomierski * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or ag...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquare; public class TestCredentials { public static final String oAuthConsumerKey = ""; public static final String oAuthConsumerSecret = ""; public static final String oAuthToken = ""; public static final String oAuthTokenSecret = "";...
/** * Copyright 2009 Joe LaPenna */ package com.joelapenna.foursquared; /** * @author Joe LaPenna (joe@joelapenna.com) */ public class FoursquaredSettings { public static final boolean USE_DEBUG_SERVER = false; public static final boolean DEBUG = false; public static final boolean LOCATION_DEBUG = f...
package unirio; import java.io.BufferedReader; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import Dados.Dados; public class ReadCSV { public static String teste; public static void ReadCSV(String csvFile, String tipo){ BufferedReader br = n...
package unirio; import java.awt.*; import java.awt.event.*; import java.io.*; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Enumeration; import java.util.Hashtable; import javax.swing.*; import Dados.Dados; @SuppressWarnings("serial") publi...
package unirio; import javax.swing.table.DefaultTableModel; import javax.swing.*; import java.awt.event.*; import java.util.*; @SuppressWarnings("serial") public class ImpressaoResultados extends JFrame { private JLabel lblHistescolhas, lblAjuda, lblLoad, lblHeader, lblMenu, lblInfoDist, lblDistanci...
package Dados; import java.util.Hashtable; public class Dados { public static Hashtable produtos; public static Hashtable precos; public static Hashtable vendas; public static Hashtable vendedores; public static int quantidadeVendas; //HashTable mapeia keys em valores //Uti...
public class Calculator2 { int x; int y; int z; public Calculator2 (int num1, int num2){ x = num1; y = num2; } public int addNumbers(){ return x+y; } public int subtractNumbers(){ z = x-y; return z; } public int multiplyNumbers(){ z = x*y; return z; ...
/** * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package chess; /** * * @author Ray Walser */ public class MyForm extends javax.swing.JFrame { /** * Creates new form MyFo...
package chess; /** * * @author Anthony Hilyard */ public class Knight extends Piece { public Knight(int color) { pieceColor = color; }//end of constructor public int canMove(int sourceX, int sourceY, int destX, int destY) { // Return false if coordinates...
package chess; /**the Board class is simply a 2d array of piece objects. Later a text file will be added to create an initial board with a FileReader. the setPiece function will set the piece at the specified indices. getPiece will be passed to integers and return the piece at the coordinates, removePiece will ask...
package chess; /** * * @author Anthony Hilyard */ public class King extends Piece { public King(int color) { pieceColor = color; }//end of constructor public int canMove(int sourceX, int sourceY, int destX, int destY) { // Return false if coordinates are o...
package chess; public abstract class Piece { int pieceColor; /** * This function returns the color of this piece. * * @author Anthony Hilyard * @return The color of the piece. 0 = black, 1 = white */ int getColor() { return pieceColor; }//end ...
package chess; /** * * @author Dave Frost */ public class Rook extends Piece { public Rook(int color) { pieceColor = color; }//end of constructor public int canMove(int sourceX, int sourceY, int destX, int destY) { // Return false if coordinates are outs...
package chess; /** * Bishop piece class * @author Dave * @param Int a value to represent the player who owns it */ public class Bishop extends Piece { public Bishop(int color) { pieceColor = color; }//end of constructor public int canMove(int sourceX, int sourceY, ...
package chess; /** * * @author Dave Frost */ public class Queen extends Piece { public Queen(int color) { pieceColor = color; }//end of constructor public int canMove(int sourceX, int sourceY, int destX, int destY) { // Return false if coordinates are ou...
package chess; /** * * @author Anthony */ public class Pawn extends Piece { public Pawn(int color) { pieceColor = color; }//end of constructor public int canMove(int sourceX, int sourceY, int destX, int destY) { // Return false if coordinates are outside...
import java.awt.*; import java.awt.event.*; import java.awt.FileDialog; import java.awt.FlowLayout; import java.io.File; import java.io.IOException; //import javax.imageio.ImageIO; import javax.sound.sampled.*; import javax.swing.*; import javax.swing.event.*; class Option{final static int PLAY=0,PAUSE=1,STOP=2,CIR...
import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.IOException; import javax.sound.sampled.AudioFormat; import javax.sound.sampled.AudioInputStream; import javax.sound.sampled.AudioSystem; import javax.sound.sampled.UnsupportedAudioFileExcept...
import java.awt.*; import java.awt.event.*; import java.awt.FileDialog; import java.awt.FlowLayout; import java.io.File; import java.io.IOException; import javax.sound.sampled.*; import javax.swing.*; import javax.swing.event.*; class Option{final static int PLAY=0,PAUSE=1,STOP=2,CIRCLE=3,OPEN=4;} public class Med...
import static org.junit.Assert.*; import org.junit.*; public class horseTest { private horse calculator; @Test public void testNameInput() { int expected = 0; int result =horse.run("我是一號馬", "我是二號碼"); assertEquals(expected, result); } @Test public void testNameInput2() { int expected...
 public class ExceptionFirst extends Exception{ /** * */ private static final long serialVersionUID = 1L; public ExceptionFirst() {} }
public class ExceptionThird extends Exception{ /** * */ private static final long serialVersionUID = 1L; public ExceptionThird() {} }
public class ExceptionSecond extends Exception { /** * */ private static final long serialVersionUID = 1L; public ExceptionSecond(){} }
import java.util.*; /*最初的繼承檔 設定需要的函式(速度 位置等) 讓其他馬繼承*/ abstract class oldhor{ //老馬 protected String name; //馬名 protected static int speed; //速度 protected static int move = 0 ; //位移 public oldhor (String horsename){ this.name = horsename; } abstract int finil(); //確定結束用 abstract int ti...
import static org.junit.Assert.*; import org.junit.*; public class Test1 { @Test public void testAdd() { int num1 = 3; int num2 = 2; int total = 5; int sum = 0; sum = Math1.add(num1,num2); assertEquals(sum,total); } @Test public void testMulitply() { int num1 = 3; int num2 = 7; int tota...
public class Math1{ static public int add (int a,int b){ return a + b; } static public int multiply(int a,int b){ return a * b; } }
public class helloworld { public static void main(String[] args){ System.out.println("hello World"); } }
import javax.swing.*; public class userinput { public static void main(String[] args){ String num = ""; num = JOptionPane.showInputDialog(null,"Please Enter your number:"); double val = Double.parseDouble(num); if (val %2 == 0){ JOptionPane.showMessageDialog(null, "# have enter is Even");...
public class UserInput1 { }
class Calculator{ int x; int y; int z; public Calculator(int num1, int num2){ x = num1; y = num2; } public int addNUmbers() { z = x+y; return z; } public int subtractNumbers() { z = x-y; return z; } } public class javaapplication { public static void main(String[] arg...
import java.util.Scanner; class CalcLib { int x; int y; public CalcLib( int num1, int num2 ) { x = num1; y = num2; } public int addNumber() { return x + y; } public int subtractNumber() { ...
class MyArrayList { private int[] MyArray; private int size; public MyArrayList(int value, int seed, int inc){ MyArray = new int [value]; size = value; for (int i = 0; i < size; i++){ MyArray[i]=seed; seed +=inc; } } public void PrintElement(){ for (int i = 0; i < size; i++){ Sys...
package examples.service; import jade.core.AID; import jade.core.BaseService; import jade.core.Filter; import jade.core.VerticalCommand; import jade.core.messaging.GenericMessage; import jade.core.messaging.MessagingSlice; import jade.lang.acl.ACLMessage; /** * This example shows how to implement a JADE K...
/** * *************************************************************** * JADE - Java Agent DEvelopment Framework is a framework to develop * multi-agent systems in compliance with the FIPA specifications. * Copyright (C) 2000 CSELT S.p.A. * * GNU Lesser General Public License * * This library is free s...
/** * *************************************************************** * JADE - Java Agent DEvelopment Framework is a framework to develop * multi-agent systems in compliance with the FIPA specifications. * Copyright (C) 2000 CSELT S.p.A. * * GNU Lesser General Public License * * This library is free s...
/***************************************************************** JADE - Java Agent DEvelopment Framework is a framework to develop multi-agent systems in compliance with the FIPA specifications. Copyright (C) 2000 CSELT S.p.A. GNU Lesser General Public License This library is free software; you can redistr...
package examples; import com.sun.org.omg.CORBA.ParameterModeHelper; import jade.core.Profile; import jade.core.ProfileException; import jade.core.ProfileImpl; import jade.core.Runtime; import jade.tools.rma.rma; import jade.util.leap.Properties; import jade.wrapper.AgentController; import jade.wrapper.ContainerContr...
/***************************************************************** JADE - Java Agent DEvelopment Framework is a framework to develop multi-agent systems in compliance with the FIPA specifications. Jade is Copyright (C) 2000 CSELT S.p.A. This file copyright (c) 2001 Hewlett-Packard Corp. GNU Lesser General Public...