text stringlengths 3 1.18M |
|---|
package org.json;
/**
* The JSONException is thrown by the JSON.org classes when things are amiss.
* @author JSON.org
* @version 2010-12-24
*/
public class JSONException extends Exception {
private static final long serialVersionUID = 0;
private Throwable cause;
/**
* Constructs a JSONExcep... |
package org.json;
/*
Copyright (c) 2006 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... |
package org.json;
/*
Copyright (c) 2008 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish,... |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... |
package org.json;
/*
Copyright (c) 2002 JSON.org
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, ... |
import java.awt.EventQueue;
/**
* Carro.java
* @author Edwin Xico, Carnet 11090
* @since 11/07/2013
* Descripción: Clase principal de la aplicacion, que muestra el frame del Radio.
*/
public class Carro {
private static RadioGUI Radio1 = new RadioGUI();
/**
* Método principal del pro... |
/**
* RadioCarro.java
* @author Edwin Xico, Carnet 11090
* @since 11/07/2013
* Descripción: Representación del radio de un carro, el cual implementa la
* interfaz radio. Es capaz de ser encendido, apagado, cambiar
* de banda, avanzar de frecuencia y almacenar 12 estaciones
* ... |
import java.text.DecimalFormat;
/**
* RadioGUI.java
* @author Edwin Xico, Carnet 11090
* @since 11/07/2013
* Descripción: Interfaz gráfica para la radio, con botones para encender, cambiar de banda,
* subir en la frecuencia y 12 botones para memoria.
*/
public class RadioGUI extends javax.swing.JFrame {
//... |
/**
* Radio.java
* @author Edwin Xico, Carnet 11090
* @since 11/07/2013
* Descripción: Interfaz de un radio que es capaz de ser encendido, apagado,
* cambiar de banda, avanzar de frecuencia y almacenar 12 estaciones
* para cada una de las bandas.
*/
public interface Radio {
//**C... |
/*
* Java CSV is a stream based library for reading and writing
* CSV and other delimited data.
*
* Copyright (C) Bruce Dunwiddie bruce@csvreader.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published b... |
/*
* Java CSV is a stream based library for reading and writing
* CSV and other delimited data.
*
* Copyright (C) Bruce Dunwiddie bruce@csvreader.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published b... |
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World!!!");
}
}
|
public class Main {
public static void main(String[] args) {
System.out.println("Hello from the command line!");
}
}
|
public class Main {
public static void main(String[] args) {
System.out.println("Number of args: " + args.length);
for (int i = 0; i < args.length; i++) {
System.out.println(args[i]);
}
}
}
|
public class Main {
public static void main(String[] args) {
System.out.println("Number of args: " + args.length);
for (int i = 0; i < args.length; i++) {
System.out.println(args[i]);
}
}
}
|
package gis;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.io.BufferedOutputStream;
import java.io.BufferedWriter;
import java.io.FileOutputStream;
import java.io.FileWriter;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.Writer;
impo... |
//package gis;
//
///**
// *
// */
//public class Main
//{
// /**
// * @param args
// */
// public static void main(String[] args)
// {
// new View();
// }
//
//}
|
package gis;
/**
* Klasa pomocnicza
*
*/
public class SquareParams
{
public boolean Left = false, Right = false, Top = false, Bottom = false;
}
|
package gis;
public class SynchProgress
{
private static SynchProgress instance = new SynchProgress();
public static SynchProgress getInstance()
{
return instance;
}
int progress;
boolean valueSet = false;
public synchronized int get()
{
if (!valueSet) try
{
wait();
}
catch ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class OrderPOJO
{
private String MaOrder;
private String MaKhachHang;
private Date ThoiGianTao;
private int TongTien;
pri... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class NhaSanXuatPOJO
{
private String MaNhaSanXuat;
private String TenNhaSanXuat;
// phuong thuc khoi tao
public NhaSanXuatPOJO(String MaNhaSanX... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class LoaiSanPhamPOJO
{
private String MaLoaiSanPham;
private String TenLoaiSanPham;
private String MaNhom;
// phuong thuc khoi tao
public L... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class ChiTietKhuyenMaiPOJO
{
private String MaChuongTrinh;
private String MaSanPham;
private int ChietKhau;
private String Khac;
//khoi tao
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class KhuyenMaiPOJO
{
private String MaChuongTrinh;
private String TenChuongTrinh;
private String MoTa;
private Date NgayBatD... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class ThongSoKiThuat_LoaiPOJO
{
private String MaLoaiSanPham;
private String MaThongSoKiThuat;
// phuong thuc khoi tao
public ThongSoKiThuat_Loa... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class TraHangPOJO
{
private String MaTraHang;
private String MaOrder;
private String MaSanPham;
private Date ThoiGianTra;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class KhuVucPOJO
{
private String MaKhuVuc;
private String TenKhuVuc;
// phuong thuc khoi tao
public KhuVucPOJO(String MaKhuVuc, String TenKhuV... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class SanPham_CuaHangPOJO
{
private String MaCuaHang;
private String MaSanPham;
private int SoLuongCon;
//phuong thuc khoi tao
public SanPha... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class NguoiThanPOJO
{
private String MaKhachHang;
private String EmailNguoiThan;
private String HoTenNguoiThan;
private String SoDienThoaiNguoiThan;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class ThongSoKiThuatPOJO
{
private String MaThongSoKiThuat;
private String TenThongSoKiThuat;
private String MoTa;
//phuong thuc khoi tao
p... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class CuaHangPOJO
{
private String MaCuaHang;
private String MaKhuVuc;
private String TenCuaHang;
private String DiaChi;
//phuong thuc khoi ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class ChiTietThongSoKiThuatPOJO
{
private String MaSanPham;
private String MaThongSoKiThuat;
private String NoiDung;
// phuong thuc khoi tao
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class NhomSanPhamPOJO
{
private String MaNhom;
private String TenNhom;
//phuong thuc khoi tao
public NhomSanPhamPOJO(String MaNhom, String TenNh... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class SoDiaChiPOJO
{
private String MaKhachHang;
private String DiaChi;
// phuong thuc khoi tao
public SoDiaChiPOJO(String MaKhachHang, String ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class SanPhamPOJO
{
private String MaSanPham;
private String MaloaiSanPham;
private int SoLuong;
private int GiaBan;
private String MaNhaSanXuat;... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class KhachHangPOJO
{
private String MaKhachHang;
private String Email;
private String HoTen;
private String MatKhau;
pri... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class WishListPOJO
{
private String MaWishList;
private String List_OP_Code;
private Date NgayDienRaSuKien;
private String Di... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package PoJo;
/**
*
* @author Kute_Ants
*/
public class ChiTietOrderPOJO
{
private String MaOrder;
private String MaSanPham;
private int SoLuong;
private int ChietKhau;
private int Gia;
priva... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class traHangPOJO implements Serializable
{
private String maTraHang;
private String maOrder;
privat... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author Kute_Ants
*/
public class nguoiThanPOJO implements Serializable
{
private String maKhachHang;
private String emailNguoiThan;
private String hoTe... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author Kute_Ants
*/
public class sanPhamPOJO implements Serializable
{
private String maSanPham;
private String maloaiSanPham;
private int soLuong;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class khuyenMaiPOJO implements Serializable
{
private String maChuongTrinh;
private String tenChuongTrinh... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author Kute_Ants
*/
public class thongSoKiThuatLoaiPOJO implements Serializable
{
private String maLoaiSanPham;
private String maThongSoKiThuat;
/... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author SoftVnn Member
*/
public class loaiSanPhamPOJO implements Serializable {
private String maLoaiSanPham;//ký tự đầu phải là chữ thường
private String ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author SoftVnn Member
*/
public class sanPhamCuaHangPOJO implements Serializable {
private String maCuahang;
private String maSanPham;
private int soLu... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author Kute_Ants
*/
public class nhaSanXuatPOJO implements Serializable
{
private String maNhaSanXuat;
private String tenNhaSanXuat;
// phuong thu... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class chiTietOrderPOJO implements Serializable
{
private String maOrder;
private String maSanPham;
pr... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author Kute_Ants
*/
public class chiTietThongSoKiThuatPOJO implements Serializable
{
private String maSanPham;
private String maThongSoKiThuat;
private... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author Kute_Ants
*/
public class cuaHangPOJO implements Serializable
{
private String maCuaHang;
private String maKhuVuc;
private String tenCuaHang;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class orderPOJO implements Serializable
{
private String maOrder;
private String maKhachHang;
private... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author SoftVnn Member
*/
public class nhomSanPhamPOJO implements Serializable {
private String maNhom; //ký tự đầu phải là chữ thường
private String tenNho... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author Kute_Ants
*/
public class soDiaChiPOJO implements Serializable
{
private String maKhachHang;
private String diaChi;
// phuong thuc khoi tao... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class wishListPOJO implements Serializable
{
private String maWishList;
private String list_OP_Code;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author Kute_Ants
*/
public class khuVucPOJO implements Serializable
{
private String maKhuVuc;
private String tenKhuVuc;
// phuong thuc khoi tao
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
import java.util.Date;
/**
*
* @author Kute_Ants
*/
public class khachHangPOJO implements Serializable
{
private String maKhachHang;
private String email;
priva... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author Kute_Ants
*/
public class thongSoKiThuatPOJO implements Serializable
{
private String maThongSoKiThuat;
private String tenThongSoKiThuat;
privat... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package POJO;
import java.io.Serializable;
/**
*
* @author Kute_Ants
*/
public class chiTietKhuyenMaiPOJO implements Serializable
{
private String maChuongTrinh;
private String maSanPham;
private int chi... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dbhelper;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
/**
*
* @author SoftVnn Member
*/
public class MD5 {
private stat... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package dbhelper;
import com.mysql.jdbc.Statement;
import java.sql.Connection;
import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Properties;... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DAO;
import com.mysql.jdbc.CallableStatement;
import dbhelper.dbconnect;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import POJO.sanPhamCuaHangPOJO;
/**
*
* @author Soft... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DAO;
import POJO.loaiSanPhamPOJO;
import com.mysql.jdbc.CallableStatement;
import dbhelper.dbconnect;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
/**
*
* @author SoftV... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DAO;
import POJO.nhomSanPhamPOJO;
import com.mysql.jdbc.CallableStatement;
import dbhelper.dbconnect;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
/**
*
* @author SoftVn... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DAO;
import com.mysql.jdbc.CallableStatement;
import dbhelper.dbconnect;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import POJO.sanPhamPOJO;
/**
*
* @author SoftVnn Mem... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DAO;
import com.mysql.jdbc.CallableStatement;
import dbhelper.dbconnect;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import POJO.traHangPOJO;
import java.util.Date;
/**
*... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package DAO;
import com.mysql.jdbc.CallableStatement;
import dbhelper.dbconnect;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import POJO.cuaHangPOJO;
/**
*
* @author SoftVnn Mem... |
import javax.swing.*;
public class InputOddEven
{
public static void main(String[] args)
{
int number;
number = Integer.parseInt(JOptionPane.showInputDialog( null, "Please enter a number: " ));
if ( number % 2 == 1 )
{
JOptionPane.showMes... |
import javax.swing.*;
public class helloworld1 {
public static void main(String[] args) {
String num = "";
num = JOptionPane.showInputDialog(null, "Please Enter you number: ");
JOptionPane.showMessageDialog(null, "Hi" +num);
}
} |
class LinkedListNode {
public int data;
public LinkedListNode link;
}
public class JavaApplication1 {
public static void main(String[] args) {
/*
exercise
head -> 45 -> 65 -> 50 -> 34 -> 76
exercise 1: insert 15 between 34 and 76
... |
class Node{
public int info;
public Node link;
}
class LinkList{
public Node head;
public int counter;
public LinkList(){
head = new Node();
counter = 0;
}
public void add(int _info){
Node newNode = new Node();
newNode.info = _info;
... |
import java.util.Random;
class sortArray
{
private int[] myArray;
public sortArray()
{
System.out.println("Default Order:");
Random digit = new Random();
myArray = new int [10];
for ( int counter = 0 ; counter < 10 ; counter++ )
{
myArray[counter] = 1 + digit.nextInt(10);
}
printEleme... |
class myArrayList {
private int[] myArray;
private int size;
public myArrayList( int value, int seed, int increment ) {
myArray = new int [value];
size = value;
for ( int counter = 0 ; counter < size ; counter++ ) {
... |
class Calclib {
int x;
int y;
int z;
public Calclib(int num1, int num2) {
x= num1;
y=num2;
}
public int addNumber() {
z = x+y;
return z;
}
public int subtractNumbers() {
... |
class Node{
public int info;
public Node link;
}
class LinkList{
public Node head;
public int counter;
public LinkList(){
head = new Node();
counter = 0;
}
public void add(int _info){
Node newNode = new Node();
newNode.info = _info;
... |
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++){
System.ou... |
class LinkedListNode {
public int data;
public LinkedListNode link;
}
public class javaLinkInsert{
public static void main(String[] args){
LinkedListNode head;
LinkedListNode newNode;
LinkedListNode current;
LinkedListNode p;
LinkedListNode p2;
newNode = new LinkedListNode();
... |
import javax.swing.*;
public class OddEven {
public static void main(String[] args) {
int num;
String input = "";
input = JOptionPane.showInputDialog(null, "Please enter a number: ");
num = Integer.parseInt(input);
if(num%2 == 0)
JOptionPane.showMessageDialog(null, "The number is EV... |
package calculator;
class Compute {
int x;
int y;
int z;
public Compute(int num1, int num2){
x = num1;
y = num2;
}
public int addNumber(){
z=x+y;
return z;
}
public int subtractNumber(){
z=x-y;
return z;
}
}
public class Calculator {
public static vo... |
/**
*
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.Socket;
import java.net.URL;
import java.net.URLConnection;
... |
class myArrayList {
private int[] myArray;
private int size;
public myArrayList( int value, int seed, int increment ) {
myArray = new int [value];
size = value;
for ( int counter = 0 ; counter < size ; counter++ ) {
myArray[counter] = seed;
seed += increment;
}
}
public void printElement... |
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() {
return x - y;
}
public int multiplyNumber() {
return x * y;
}
public int divideNumber() {
return x / y;
}
... |
class stackClass {
private int maxSize;
private char[] stackArray;
private int top;
public stackClass(int max) {
maxSize = max;
stackArray = new char[maxSize];
top = -1;
}
public void push(char j) {
stackArray[++top] = j;
}
... |
import java.util.Random;
class sortArray
{
private int[] myArray;
public sortArray()
{
System.out.println("Default Order:");
Random digit = new Random();
myArray = new int [10];
for ( int counter = 0 ; counter < 10 ; counter++ )
{
myArray[counter] = 1 + digit.nextInt(10);
}
printEleme... |
class myArrayList {
private int[] myArray;
private int size;
public myArrayList( int value, int seed, int increment ) {
myArray = new int [value];
size = value;
for ( int counter = 0 ; counter < size ; counter++ ) {
myArray[counter] = seed;
seed += increment;
}
}
public void printElement... |
import java.io.IOException;
public class reverseStack {
private String input;
private String output;
public reverseStack(String in) {
input = in;
}
public String doRev() {
int stackSize = input.length();
Stack theStack = new Stack(stackSize);
for (int i = 0; i < in... |
class LinkedListNode {
public int data;
public LinkedListNode link;
}
public class JavaApplication1 {
public static void main(String[] args) {
/*
exercise
head -> 45 -> 65 -> 50 -> 34 -> 76
exercise 1: insert 15 between 34 and 76
... |
import java.util.Random;
class sortArray
{
private int[] myArray;
public sortArray()
{
System.out.println("Default Order:");
Random digit = new Random();
myArray = new int [10];
for ( int counter = 0 ; counter < 10 ; counter++ )
{
myArray[counter] = 1 + digit.nextInt(10);
}
printEleme... |
import javax.swing.*;
public class UserInput
{
public static void main(String[] args)
{
int number;
number = Integer.parseInt(JOptionPane.showInputDialog( null, "Please enter a number: " ));
if ( number % 2 == 1 )
{
JOptionPane.showMessageDialog( nu... |
import javax.swing.*;
public class HelloWorld {
public static void main(String[] args){
String num = "";
num = JOptionPane.showInputDialog(null, "Please enter your name: ");
JOptionPane.showMessageDialog(null, "Hi"+num);
}
} |
package uy.edu.um.taller2;
import java.rmi.RemoteException;
public class ClienteRemoteMgtService implements ClienteRemoteMgt {
public void addClient(String sNombre, String sApellido) throws RemoteException {
System.out.println("Nombre: " + sNombre + " Apellido: " + sApellido);
return;
}
}
|
/**
*
*/
package uy.edu.um.taller2;
import java.rmi.RMISecurityManager;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
/**
* @author pegardan
*
*/
public class Main {
public static void main(String[] args) {
try {
String name = "Hell... |
package uy.edu.um.taller2;
import java.rmi.RemoteException;
public class HelloWorldRemoteService implements HelloWorldRemote {
public String sayHelloWorld(String name) throws RemoteException {
System.out.println("Previo a return sayHelloWorld");
return "Hello world " + name;
}
public int sumarNumeros(int a,... |
/**
*
*/
package uy.edu.um.taller2;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;
import java.rmi.server.UnicastRemoteObject;
/**
* @author pegardan
*
*/
public class ClientTest {
public static void main(String[] args) {
try {
String sObjectService = "HelloWorldService";
... |
package uy.edu.um.restaurante.tocommons;
public interface OperadoresBusqueda {
final static String LEFT_PARENTESIS = "(";
final static String RIGHT_PARENTESIS = ")";
final static String EQUAL = "=";
final static String GT = ">";
final static String LT = "<";
final static String GTE = ">=";
final static... |
package uy.edu.um.restaurante.service.swingextend;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import javax.swing.JComponent;
import javax.swing.JPanel;
public abstract class PanelBag extends JPanel{
// Todas las clases que hereden tendran seteados por defecto este GridBagLayout
... |
package uy.edu.um.restaurante.service;
public interface NombreOperaciones {
final static String ALTA = "Alta";
final static String BAJA = "Baja";
final static String BUSCAR = "Buscar";
final static String MODIFICAR = "Modificar";
}
|
package uy.edu.um.restaurante.service.article.interfaces;
import javax.swing.JTable;
import javax.swing.table.DefaultTableModel;
import uy.edu.um.articulo.ArticleDT;
//import uy.edu.um.restaurante.ui.articles.ArticleDT;
//import uy.edu.um.restaurante.ui.articles.UIObserver;
public class JTableExtended{
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.