code
stringlengths
3
1.18M
language
stringclasses
1 value
package asg.cliche; import java.lang.annotation.Annotation; import java.lang.reflect.Method; /** * Specification of command's parameters, such as description given with Param annotation. */ public class ShellCommandParamSpec { static ShellCommandParamSpec[] forMethod(Method theMethod) { Class[] param...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche; import asg.cliche.util.Strings; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; ...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche; /** * Output for Shell to direct its output to. * Something like the Builder pattern. * @author ASG */ public interface Output { void output(Object obj,...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche; import asg.cliche.util.Strings; import java.lang.reflect.Method; import java.util.List; /** * Default "dash-joined" implementation of the CommandNamer. * * @...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; ...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche; /** * Exception pointing at the token which caused it. * Used to report invalid parameter types. * * @author ASG */ public class TokenException extends CLIE...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche.util; import java.util.Collection; import java.util.Set; /** * This is an extension to Java Collections framework. * MultiMap is a map which can contain multip...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche.util; import java.util.ArrayList; import java.util.List; /** * Procedural class with static public methods for string handling. * @author ASG */ public class ...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche.util; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; /** ...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche.util; import java.util.ArrayList; import java.util.Collection; import java.util.HashSet; import java.util.Set; /** * * @author ASG */ public class EmptyMultiM...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; /** * Command table entry */ public class ShellCommand { private S...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package asg.cliche.example; import asg.cliche.Command; import asg.cliche.ShellFactory; import java.io.IOException; /** * 'Hello World!' example. * * @author ASG */ public class HelloWorld { @Command publi...
Java
/* * This example code is in public domain. */ package asg.cliche.example; import asg.cliche.Command; import asg.cliche.InputConverter; import asg.cliche.OutputConverter; import asg.cliche.Param; import asg.cliche.Shell; import asg.cliche.ShellDependent; import asg.cliche.ShellFactory; import java.io.IOException; i...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche; /** * * Root exception for Cliche. * * @author ASG */ public class CLIException extends Exception { public CLIException() { super(); } p...
Java
/* * This file is part of the Cliche project, licensed under MIT License. * See LICENSE.txt file in root folder of Cliche sources. */ package asg.cliche; import java.util.List; /** * Input provider for Shell. * Shell asks Input, "What does the user want to execute?", and Input reads and returns line from the us...
Java
public class Warrior extends Player { public Warrior(String arg1) { super(arg1,3,8); } }
Java
import java.util.Scanner; public class Primary{ public static void main(String[] args) { Scanner input= new Scanner(System.in); System.out.print("What be your name, bro? "); String name=input.next(); Boolean repeat; Player character=null; do { repeat=false; System.out.print("What class are you?\n1. Warrior ...
Java
public class Player { private String name; private int damage; private int accuracy; public Player(String name, int damage, int accuracy) { this.name=name; this.damage=damage; this.accuracy= accuracy; } public int attack() { int randomDamage = 1 + (int)(Math.random() * 4); //This creates a random number between...
Java
public class Archer extends Player{ public Archer(String arg1) { super(arg1,2,7); } }
Java
package com.example.firstapp; import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar; import android.support.v4.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android....
Java
package boring_basic_stuff; public class GoldenRetriever extends Dog { public GoldenRetriever(String name) { super(name, "Golden","Big"); } public void announceSelf(){ System.out.print("I AM THE GOLDEN RETRIEVER "+getName()+"!!!"); } } //hfhdfhugfhu
Java
package boring_basic_stuff; import java.util.Scanner; public class helloWorld_inputToo { public static void main(String[] args){ Scanner input= new Scanner(System.in); System.out.print("Put in a number : "); int var1=input.nextInt(); System.out.print("Hello world, the number of the day is "+var1+"!"); input.cl...
Java
package boring_basic_stuff; public class Dog { public Dog(String arg1, String arg2,String arg3){name=arg1;color=arg2;size=arg3;} private String name, color,size; public String getName(){return name;} public void bark(){System.out.print("BARK!");} public void setName(String newName){name=newName;} public String getCol...
Java
package com.springapp.service.impl; import com.springapp.common.dto.CategoryDTO; import com.springapp.common.utils.Constants; import com.springapp.dao.CategoryDAO; import com.springapp.model.CategoryEntity; import com.springapp.service.CategoryService; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import or...
Java
package com.springapp.service; import com.springapp.common.dto.CategoryDTO; import java.io.IOException; import java.util.List; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 10/8/13 * Time: 10:28 PM * To change this template use File | Settings | File Templates. */ public interface CategoryService { ...
Java
package com.springapp.jms; import com.springapp.common.dto.CategoryDTO; import com.springapp.dao.CategoryDAO; import com.springapp.model.CategoryEntity; import org.apache.activemq.command.ActiveMQObjectMessage; import org.springframework.stereotype.Service; import javax.jms.JMSException; import javax.jms.Message; imp...
Java
package com.springapp.jms; import com.springapp.common.dto.CategoryDTO; import com.springapp.dao.CategoryDAO; import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.MessageCreator; import javax.jms.*; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 10/11/13 * Time: 6:07 PM ...
Java
import com.springapp.common.dto.CategoryDTO; import com.springapp.common.utils.Constants; import com.springapp.jms.CategoryObjProducerMessageService; import com.springapp.service.impl.CategoryServiceImpl; import org.apache.activemq.command.ActiveMQDestination; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; i...
Java
/** * Created with IntelliJ IDEA. * User: nkhang * Date: 8/26/13 * Time: 10:16 PM * To change this template use File | Settings | File Templates. */ public class App { public static void main(String[] args){ System.out.print("Hello"); } }
Java
package com.springapp.model; import javax.persistence.Basic; import javax.persistence.Entity; import javax.persistence.Id; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 8/29/13 * Time: 5:26 PM * To change this template use File | Settings | File Templates. */ @javax.persistence.Table(name = "stock", ...
Java
package com.springapp.model; import java.sql.Timestamp; import java.util.Collection; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 10/14/13 * Time: 4:31 PM * To change this template use File | Settings | File Templates. */ public class CategoryEntity { private long id; private String code; ...
Java
package com.springapp.service.impl; import com.springapp.dao.CategoryDAO; import com.springapp.model.CategoryEntity; import com.springapp.service.CategoryService; import org.springframework.stereotype.Service; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 10/14/13 * Time: 10:37 PM * To change this tem...
Java
package com.springapp.service; import com.springapp.model.CategoryEntity; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 10/14/13 * Time: 10:37 PM * To change this template use File | Settings | File Templates. */ public interface CategoryService { public void save(CategoryEntity entity); }
Java
package com.springapp.dao; import org.hibernate.SessionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 8/27/13 * Time: 9:36 PM * To change this template use File...
Java
package com.springapp.dao; import com.springapp.model.CategoryEntity; import java.util.List; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 10/14/13 * Time: 10:35 PM * To change this template use File | Settings | File Templates. */ public class CategoryHibernate extends CustomHibernateDaoSupport imp...
Java
package com.springapp.dao; import com.springapp.model.CategoryEntity; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 10/14/13 * Time: 10:34 PM * To change this template use File | Settings | File Templates. */ public interface CategoryDAO { public void save(CategoryEntity entity); public void ...
Java
package com.springapp; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 8/27/13 * Time: 10:19 PM * To change this template use File | Settings | File Templates. */ public cla...
Java
package com.springapp.mvc; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller @RequestMapping("/index.html") public class HelloContro...
Java
package com.springapp.common.dto; import java.io.Serializable; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 10/8/13 * Time: 10:37 PM * To change this template use File | Settings | File Templates. */ public class CategoryDTO implements Serializable { public String getUrl() { return url;...
Java
package com.springapp.common.utils; /** * Created with IntelliJ IDEA. * User: nkhang * Date: 10/8/13 * Time: 10:46 PM * To change this template use File | Settings | File Templates. */ public class Constants { public static String userAgent = "Mozilla"; public static String HOME_PAGE = "http://www.bbc.co...
Java
import java.awt.Image; import java.awt.Point; import javax.swing.ImageIcon; public class Plain extends Tile { static Image i=(new ImageIcon("src/plain.png")).getImage(); public Plain(Point p){ super(i,p,2,3,1,0); } }
Java
import java.awt.Image; import java.awt.Point; import javax.swing.ImageIcon; public class M2 extends Tile { static Image i=(new ImageIcon("src/mountain2.png")).getImage(); public M2(Point p){ super(i,p,1,1,3,0); } }
Java
import javax.swing.JPanel; import javax.swing.JLabel; import java.awt.Button; import javax.swing.JTable; import javax.swing.JSplitPane; import javax.swing.JInternalFrame; import java.awt.FlowLayout; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.SwingConstants; import javax.swing.JMenu...
Java
import java.awt.*; import javax.swing.*; public class TownPlayer extends TownLocation { static Image i = (new ImageIcon("src/player.png")).getImage(); /** * Getting the location of player in town. * @param p location */ public TownPlayer(Point p) { super("Player", p, i); } }
Java
import java.awt.Image; import java.awt.Point; import javax.swing.ImageIcon; public class M1 extends Tile { static Image i=(new ImageIcon("src/mountain1.png")).getImage(); public M1(Point p){ super(i,p,1,1,2,0); } }
Java
import java.awt.Graphics; import java.awt.Point; import javax.swing.JPanel; public class GameMap { private String MapType; private Tile[][] map = new Tile[5][9]; private MapPanel mapp; private NewGame game; /** * creat a game map * @param MT the input map type * @param g the new game * */ public G...
Java
import java.awt.*; import javax.swing.ImageIcon; public class Grass extends TownLocation { static Image i = (new ImageIcon("src/plain.png")).getImage(); public Grass(Point p) { super("Grass", p, i); } }
Java
public class GameEng { private GamePanel display; private NewGame game; /** * Creat the display panel. * @param disp the main display game panel * * */ public GameEng(GamePanel disp){ display = disp; game = new NewGame(display); } /** * creat the display panel without a game Panel. * */ ...
Java
import java.awt.Image; import java.awt.Point; import javax.swing.ImageIcon; public class M3 extends Tile { static Image i=(new ImageIcon("src/mountain3.png")).getImage(); public M3(Point p){ super(i,p,1,1,4,0); } }
Java
import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import java.awt.Point; import javax.swing.*; import javax.swing.border.Border; public abstract class Tile extends JComponent { private Image image; protected Point p; protected static int food; protected static int energy; ...
Java
import java.awt.Point; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.*; /** * @author * @version * @since * * */ public class GamePanel extends JPanel { private State state; private NewGame game; private MapPanel map; /** * * */ public static enum State { Ma...
Java
import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import java.awt.Point; import java.util.ArrayList; import javax.swing.ImageIcon; import javax.swing.JComponent; public class Player extends JComponent{ private String name; private Color color; private String race; private Point mapLocatio...
Java
import java.awt.*; import javax.swing.ImageIcon; public class Pub extends TownLocation { static Image i = (new ImageIcon("src/pub.png")).getImage(); public Pub(Point p) { super("Pub", p, i); } }
Java
import java.awt.*; import javax.swing.*; public class Assay extends TownLocation { static Image i = (new ImageIcon("src/assay.png")).getImage(); public Assay(Point p) { super("Assay", p, i); } }
Java
import java.awt.Image; import java.awt.Point; import javax.swing.ImageIcon; public class Road extends TownLocation { static Image i = (new ImageIcon("src/road.png")).getImage(); public Road(Point p) { super("Road", p, i); } }
Java
import java.awt.Color; import javax.swing.*; public class mainTest { public static void main(String[] args) { JFrame frame = new JFrame(); JPanel TownPanel = new TownPanel(new Player("hello", Color.RED, "human")); frame.add(TownPanel); frame.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE); } } ...
Java
import java.awt.Graphics; import java.awt.Image; import java.awt.Point; import javax.swing.JComponent; public abstract class TownLocation extends JComponent { protected String name; private Image image; private Point p; /** * * @param n name of tile * @param p location of tile * @param i...
Java
import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Image; import java.awt.Point; import java.awt.event.*; import javax.swing.*; /** * I worked on this assignment alone, using only course materials * * GUI of the game * @author Da * @version 1 */ public c...
Java
import java.awt.Image; import java.awt.Point; import javax.swing.ImageIcon; public class River extends Tile { static Image i=(new ImageIcon("src/river.png")).getImage(); public River(Point p){ super(i,p,4,2,0,0); } }
Java
import java.awt.Dimension; import java.awt.Graphics; import java.awt.Point; import java.awt.event.*; import javax.swing.*; public class TownPanel extends JPanel implements KeyListener { private TownLocation[][] town = new TownLocation[5][7]; private Point pLocation; private NewGame game; /** * ...
Java
import javax.swing.JPanel; public class NewGame { private GamePanel display; private GameStart startInfo; private Player[] playerList; private String mapType; private String difficulty; private GameMap map; private MapPanel mapp; private State currentS; public enum State {landGrant, landBuy, playerTurn, Sum...
Java
import java.awt.*; import javax.swing.ImageIcon; public class Store extends TownLocation { static Image i = (new ImageIcon("src/store.png")).getImage(); public Store(Point p) { super("Store", p, i); } }
Java
import java.awt.Dimension; import java.awt.Graphics; import java.awt.Point; import javax.swing.JPanel; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; @SuppressWarnings("serial") public c...
Java
import java.awt.*; import javax.swing.*; public class LandOffices extends TownLocation{ static Image i = (new ImageIcon("src/landoffice.png")).getImage(); public LandOffices(Point p) { super("LandOffices", p, i); } }
Java
import java.awt.Image; import java.awt.Point; import javax.swing.ImageIcon; public class TownTile extends Tile { static Image i=(new ImageIcon("src/town.png")).getImage(); /** * Getting the tile location. * @param p */ public TownTile(Point p){ super(i,p,0,0,0,0); } }
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package pe.pucp.plugin.mda.ui.window.command.prompt; import java.util.logging.Logger; import org.openide.util.NbBundle; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; import org.openi...
Java
package pe.pucp.plugin.mda.ui.config; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import javax.swing.JComponent; import org.netbeans.spi.options.OptionsPanelController; import org.openide.util.HelpCtx; import org.openide.util.Lookup; @OptionsPanelController.TopLevelRegistration...
Java
package pe.pucp.plugin.common; import java.io.InputStream; import java.io.OutputStream; import javax.swing.JOptionPane; import javax.swing.text.JTextComponent; /** * * @author Diego */ public class TextComponentReaderThread extends ReaderThread { private JTextComponent text; private boolean showLastOnly; ...
Java
package pe.pucp.plugin.common; import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import javax.swing.JOptionPane; import org.openide.util.Exceptions; /** * * @author Diego */ public class WriterThread extends Thread { private OutputStream...
Java
package pe.pucp.plugin.common; import java.io.InputStream; import javax.swing.JOptionPane; /** * * @author Diego */ public class MessageReaderThread extends ReaderThread{ public MessageReaderThread(InputStream is) { super(is); } @Override protected String nuevaEntrada(String entrada) { ...
Java
package pe.pucp.plugin.common; import java.io.File; import java.io.IOException; import javax.swing.text.JTextComponent; import org.netbeans.api.extexecution.ExternalProcessBuilder; /** * * @author Diego */ public class LineaComando { TextComponentReaderThread tcRT; public LineaComando(String rutaProg...
Java
package pe.pucp.plugin.common; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import javax.swing.JOptionPane; import org.openide.util.Exceptions; /** * * @author Diego */ public abstract class ReaderThread extends Thread { private Input...
Java
package pe.pucp.netbeans.pluggin.mda; import java.io.File; import java.io.IOException; import java.util.prefs.Preferences; import javax.swing.JFileChooser; import javax.swing.JOptionPane; import javax.swing.filechooser.FileFilter; import org.openide.util.Exceptions; import pe.pucp.netbeans.common.util.LineaComando; ...
Java
package pe.pucp.netbeans.pluggin.mda; import java.beans.PropertyChangeListener; import java.beans.PropertyChangeSupport; import javax.swing.JComponent; import org.netbeans.spi.options.OptionsPanelController; import org.openide.util.HelpCtx; import org.openide.util.Lookup; @OptionsPanelController.SubRegistration(loca...
Java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package pe.pucp.netbeans.pluggin.mda.ui; import java.util.logging.Logger; import org.openide.util.NbBundle; import org.openide.windows.TopComponent; import org.openide.windows.WindowManager; import org.openide.util.Imag...
Java
package pe.pucp.netbeans.common.util; import java.io.InputStream; import java.io.OutputStream; import javax.swing.JOptionPane; import javax.swing.text.JTextComponent; /** * * @author Diego */ public class TextComponentReaderThread extends ReaderThread { private JTextComponent text; private boolean showLas...
Java
package pe.pucp.netbeans.common.util; import java.io.BufferedWriter; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import javax.swing.JOptionPane; import org.openide.util.Exceptions; /** * * @author Diego */ public class WriterThread extends Thread { private Outpu...
Java
package pe.pucp.netbeans.common.util; import java.io.InputStream; import javax.swing.JOptionPane; /** * * @author Diego */ public class MessageReaderThread extends ReaderThread{ public MessageReaderThread(InputStream is) { super(is); } @Override protected String nuevaEntrada(String entrada...
Java
package pe.pucp.netbeans.common.util; import java.io.File; import java.io.IOException; import javax.swing.text.JTextComponent; import org.netbeans.api.extexecution.ExternalProcessBuilder; /** * * @author Diego */ public class LineaComando { TextComponentReaderThread tcRT; public LineaComando(String r...
Java
package pe.pucp.netbeans.common.util; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import javax.swing.JOptionPane; import org.openide.util.Exceptions; /** * * @author Diego */ public abstract class ReaderThread extends Thread { privat...
Java
/* * 배열 객체는 3개 선언하고 try 문서의 인덱스 처리는 4개를 처리하면 예외 상황이 발생한다. * 예외처리(try-catch-finally 문 이용) 가능한 애플리케이션(콘솔) 프로그램을 작성하시오. * * 처리조건 * - 배열 객체를 사용할 것 * - 배열 객체는 3개인데 try문에서의 인덱스 처리는 4개를 처리하여 예외를 발생시킬 것 * - ArrayIndexOutOfBoundsException이라는 예외가 발생하면 catch 문에서 처리할 것 * - 예외 처리를 위하여 try-catch-finally 문을 이용할 것 *...
Java
import java.awt.*; import java.awt.event.*; public class Java_1031_kk extends Frame implements ActionListener, TextListener, ItemListener { private CheckboxGroup cbg; private Label label0, label1, label2; private TextField t; private TextArea ta; private Button bt0; private Checkbox ...
Java
/*클래스 생성.. 생성자 생성 생성자의 매개변수 1. 정수형 하나 - 출력 2. 정수형, 실수형 - 출력 3. 정수형, 실수형, 문자열 - 출력 main 클래스 객체 생성 객체.메서드(정수형) 객체.메서드 (정수형, 실수형) 객체.메서드( 정수형, 실수형, 문자열) //문자열 : 이름 //정수형 : 점수 // 실수형 : 점수.. ex) 90.0 */ class java_ex { public void java_ex(int i) { System.out.println("정수형 점수 : " + i); ...
Java
public class work4_4 { /** * @param args */ public static void main(String[] args) { System.out.println("***** result *****"); for(int i=1;i<10;i++) { for(int j=1;j<10;j++) { System.out.print(" "+i+"*"+j+" = "+i*j); } System.out.println("\n"); } } }
Java
public class hw2_1 { /** * @param args */ public static void main(String[] args) { int i =0; long fac = 1; for(i=1;i<=10;i++) { fac=fac*i; System.out.println(i+"! = " +fac); } } }
Java
public class work4_3 { /** * @param args */ public static void main(String[] args) { int n, hap; System.out.println("***** result *****"); n=hap=0; for(n=0;n<101;n++) { hap = hap + n; } System.out.println("1+2+3+...+100 = " +hap+ "(for statement)"); n=1; hap=0; ...
Java
public class work4_5 { /** * @param args */ public static void main(String[] args) { int ken[] = {10,20,30,40,50}; int i , ave, sum = 0; System.out.println("***** result *****"); for(i=0;i<5;i++) { sum = ken[i]+sum; System.out.println("ken["+i+"] = "+ken[i]); } ave = s...
Java
public class work4 { public static void main(String[] args) throws java.io.IOException { int x; System.out.println("***** result *****"); System.out.print(" Input x == ?"); x = System.in.read() - '0'; if(x>0) System.out.println("x is greater than zero"); else Syste...
Java
import java.io.BufferedReader; import java.io.*; public class work4_2 { public static void main(String[] args) throws java.io.IOException { int jumsu; char hakjum; String iput; System.out.println("***** result *****"); System.out.print("Input jumsu: "); InputStreamReader kkk = new InputStreamR...
Java
/*** Copyright (c) 2009-11 CommonsWare, LLC 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 to ...
Java
/*** Copyright (c) 2011 CommonsWare, LLC 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 to in ...
Java
package net.everythingandroid.smspopup.provider; import net.everythingandroid.smspopup.BuildConfig; import net.everythingandroid.smspopup.provider.SmsPopupContract.ContactNotifications; import net.everythingandroid.smspopup.provider.SmsPopupContract.QuickMessages; import net.everythingandroid.smspopup.service.Sms...
Java
package net.everythingandroid.smspopup.provider; import java.util.List; import android.net.Uri; import android.provider.BaseColumns; public class SmsPopupContract { public static final String CONTENT_AUTHORITY = "net.everythingandroid.smspopup.provider"; public static final Uri BASE_CONTENT_URI = ...
Java
package net.everythingandroid.smspopup.provider; import java.util.ArrayList; import net.everythingandroid.smspopup.BuildConfig; import net.everythingandroid.smspopup.ui.SmsPopupActivity; import net.everythingandroid.smspopup.util.Log; import net.everythingandroid.smspopup.util.SmsMessageSender; import net.eve...
Java
package net.everythingandroid.smspopup.provider; import net.everythingandroid.smspopup.provider.SmsPopupContract.ContactNotifications; import net.everythingandroid.smspopup.provider.SmsPopupContract.QuickMessages; import android.content.ContentProvider; import android.content.ContentValues; import android.conten...
Java
/* * Copyright (C) 2011 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...
Java
package net.everythingandroid.smspopup.controls; import android.content.Context; import android.telephony.SmsMessage; import android.text.Editable; import android.text.TextWatcher; import android.view.View; import android.widget.Button; import android.widget.TextView; public class QmTextWatcher implements T...
Java
package net.everythingandroid.smspopup.controls; import java.util.ArrayList; import net.everythingandroid.smspopup.BuildConfig; import net.everythingandroid.smspopup.R; import net.everythingandroid.smspopup.provider.SmsMmsMessage; import net.everythingandroid.smspopup.util.Log; import android.content.Context; import ...
Java
package net.everythingandroid.smspopup.service; import java.util.ArrayList; import net.everythingandroid.smspopup.BuildConfig; import net.everythingandroid.smspopup.provider.SmsMmsMessage; import net.everythingandroid.smspopup.provider.SmsPopupContract.ContactNotifications; import net.everythingandroid.smspopu...
Java
package net.everythingandroid.smspopup.service; import net.everythingandroid.smspopup.BuildConfig; import net.everythingandroid.smspopup.util.Log; import net.everythingandroid.smspopup.util.ManageNotification; import net.everythingandroid.smspopup.util.SmsPopupUtils; import android.app.Service; import android.c...
Java