text stringlengths 3 1.18M |
|---|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.camera;
import edu.wpi.first.wpilibj.image.EllipseMatch;
import edu.wpi.first.wpilibj.util.SortedVector.Comparator;
/**
*
* @author nttoole
*/
public class EllipseAreaComparator imple... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.camera;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.model.Model;
import com.team1160.breakaway.model.ModelNotifier;
import com.team1160.breakaway.util.Point... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.robotOutput;
import com.team1160.breakaway.ballControl.Dribbler;
import com.team1160.breakaway.ballControl.Kicker;
import com.team1160.breakaway.camera.Cam_Drive;
import com.team1160.brea... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.autonomous;
/**
*
* @author CJ
*/
public interface AutonomousPositions {
public static final int FRONT_POSITION = 1;
public static final int MIDDLE_POSITION = 2;
public st... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.autonomous;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.input.AutoInputState;
import com.team1160.breakaway.model.RobotState;
import com.team1160.breakaway.... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.endGame;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.model.Model;
import com.team1160.breakaway.model.ModelNotifier;
import edu.wpi.first.wpilibj.Servo;
imp... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.ballControl;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.model.Model;
import com.team1160.breakaway.model.ModelNotifier;
import edu.wpi.first.wpilibj.Driver... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.ballControl;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.model.Model;
import com.team1160.breakaway.model.ModelNotifier;
import com.team1160.breakaway.util.... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.api;
/**
* Once we determine the encode information, place
* it here.
* @author nttoole
*/
public class EncoderConfig {
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.api;
import edu.wpi.first.wpilibj.Joystick;
/**
*
* @author CJ
*/
public interface Constants {
public static final int TEAM_ID = 1160;
public static final String TEAM_NAME =... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.drive;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.model.Model;
import com.team1160.breakaway.model.ModelNotifier;
import edu.wpi.first.wpilibj.Encoder;
imp... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.drive.pid;
/**
*
* @author CJ
*/
public class PID {
protected double total_error;
protected double last_error;
protected double last_setValue;
protected final double ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.dashboard;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.camera.TargetOrientation;
import com.team1160.breakaway.model.RobotState;
import com.team1160.breaka... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.util;
/**
*
* @author CJ
*/
public class Point2D {
protected int x;
protected int y;
public Point2D(int x, int y){
this.x = x;
this.y = y;
}
publ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.util;
/**
*
* @author CJ
*/
public class SolenoidStates {
public boolean so_front_kicker;
public boolean so_back_kicker;
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.util;
import edu.wpi.first.wpilibj.Solenoid;
/**
*
* @author CJ
*/
public class Piston {
protected Solenoid front_id, back_id;;
public Piston(int front_id, int back_id){
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.util;
/**
*
* @author CJ
*/
public class Point2DDouble {
protected double x;
protected double y;
//---------------------------------------------------------------------
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.util;
/**
*
* @author CJ
*/
public class MotorSpeeds {
public double s_left_back_motor;
public double s_left_front_motor;
public double s_right_back_motor;
public dou... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.util;
import com.team1160.breakaway.api.Constants;
import edu.wpi.first.wpilibj.Compressor;
/**
*
* @author CJ
*/
public class Pnuematics {
protected Compressor compressor;
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.model;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.camera.TargetOrientation;
import com.team1160.breakaway.util.Point2D;
import com.team1160.breakaway.util.... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.model;
/**
* Essentially matches the data sent over to the Dashboard
* for target entries.
*
* @author nttoole
*/
public class TargettingStateEntry {
double targetScore;
in... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.model;
/**
*
* @author Team 1160 Firebird Robotics
*/
public interface ModelNotifier
{
public void updateModel(Model model);
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.model;
import java.util.Vector;
/**
*
* @author Team 1160 Firebird Robotics (saketh kasibatla)
*/
public class ModelUpdater
{
//protected ModelNotifier[] notifiers;
private O... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.model;
import com.team1160.breakaway.api.Constants;
/**
*
* @author Team 1160 Firebird Robotics (saketh kasibatla)
*/
public class RobotStateReader {
//final instance fields
... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.model.robotCommand;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.camera.TargetOrientation;
import com.team1160.breakaway.input.InputState;
import com.team116... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.model.robotCommand;
/**
*
* @author CJ
*/
public class RobotCommand {
//TODO Mango
boolean extend_shooter;
boolean hold_shooter;
boolean toggle_claw;
boolean acti... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.model;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.camera.TargetOrientation;
import com.team1160.breakaway.util.Point2D;
import com.team1160.breakaway.util.... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.team1160.breakaway.model;
import com.team1160.breakaway.api.Constants;
import com.team1160.breakaway.util.Point2D;
import com.team1160.breakaway.util.Point2DDouble;
import edu.wpi.first.wpilibj.camera.AxisC... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.camera.AxisCamera;
import edu.wpi.first.wpilibj.camera.AxisCameraException;
import edu.wpi.first.wpilibj.image.ColorImage;
import edu.wpi.first.wpil... |
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.camera.AxisCamera;
import edu.wpi.first.wpilibj.camera.AxisCameraException;
import edu.wpi.first.wpilibj.image.ColorImage;
import edu.wpi.first.wpili... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package edu.wpi.first.wpilibj.templates;
import edu.wpi.first.wpilibj.Solenoid;
/**
*
* @author Saketh Kasibatla
*/
public class Piston
{
protected final Solenoid front;
protected final ... |
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011.arm;
/**
*
* @author Anupam
*/
public interface AutoArm {
public void setArm(double newTheta, double newAlpha);
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011.arm;
/**
* Interface for all objects manipulating the manipulator during Autonomous
* @author James
*/
public interface AutoManip {
/**
* Autonomous method for the Simple ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011.arm;
import com.circuitrunners.frc2011.*;
import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.can.CANTimeoutException;
/**
* The Component Module in charge of controlling the... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011.arm;
import com.circuitrunners.frc2011.*;
import edu.wpi.first.wpilibj.AnalogChannel;
import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.camera.AxisCamera;
import edu.wpi.f... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011;
/**
*
* @author Anupam
*/
public abstract class Components extends IOHandler implements Runnable {
/**
* Normal execution during tele-op enabled state
*/
public ... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011.minibot;
import edu.wpi.first.wpilibj.*;
import com.circuitrunners.frc2011.*;
/**
*
* @author James
*/
public class MinibotDeployment extends Components {
private Solenoid exten... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011.compressor;
/**
*
* @author Anupam
*/
public interface AutoCompress {
public void compress();
}
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011.compressor;
import edu.wpi.first.wpilibj.*;
import com.circuitrunners.frc2011.*;
/**
* Component Module in charge of controlling the pneumatic Compressor on board the robot
* @author... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011;
import edu.wpi.first.wpilibj.*;
/**
*
* @author Anupam
*/
/*
* This isn't really a handler, more of a processor
* makes everything easy (no messy calling of joysticks), centrali... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011.chassis;
/**
*
* @author Anupam
*/
public interface automove {
public void move(double right, double left);
public void move(double magnitude, double direction, double rota... |
package com.circuitrunners.frc2011.chassis;
import com.circuitrunners.frc2011.*;
import edu.wpi.first.wpilibj.*;
import edu.wpi.first.wpilibj.CANJaguar.*;
import edu.wpi.first.wpilibj.can.CANTimeoutException;
/**
* Drive Class, handles the drive train throughout the entire operation of the robot
* @author Anupam and... |
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.circuitrunners.frc2011.dashboard;
import com.circuitrunners.frc2011.*;
import edu.wpi.first.wpilibj.*;
/**
*
* @author Anupam
*/
public class DriveStation extends Components {
public static DriverSt... |
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 -... |
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 javax.swing.*;
public class UserInput {
public static void main (String[] args) {
String num="";
num =JOptionPane.showInputDialog(null,"Please enter your name:");
JOptionPane.showMessageDialog(null,"Hi "+num);
}
} |
import javax.swing.*;
public class helloWorld {
public static void main(String[] args) {
JOptionPane.showMessageDialog( null, "Hello World!" );
}
} |
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... |
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;
... |
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.out.printl... |
import javax.swing.*;
public class Calculator {
public static void main(String[] args){
int answer;
String num1 = "";
String num2 = "";
num1 = JOptionPane.showInputDialog(null, "Please enter first value: ");
num2 = JOptionPane.showInputDialog(null, "Please enter second value: ");
answer = input... |
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 int multiplyNumbers(){
z = x*y;
return z;
}
... |
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.out.printl... |
class Queue{
private int maxSize;
private char[] queueArray;
private int Front;
private int Rear;
private int Counter;
public Queue(int max) {
maxSize = max;
queueArray = new char[maxSize];
Front = 0;
Rear = maxSize - 1;
Counter = 0;
}
... |
class LinkedListNode{
public int data;
public LinkedListNode link;
}
public class JavaApplication1 {
public static void main(String[] args){
LinkedListNode head; // main
LinkedListNode newNode; // temporary
LinkedListNode current, current2; // flexible
LinkedListNode pointer;
newNod... |
import javax.swing.*;
public class HelloWorld {
public static void main(String[] args) {
String num = "";
num = JOptionPane.showInputDialog(null, "Please Enter a Number: ");
int number = Integer.parseInt(num);
if (number % 2 == 0) {
JOptionPane
.showMessageDialog(null, "The Value " + ... |
package com.service;
import com.dao.MMsgClassDao;
import com.dao.MsgDao;
public interface MsgManager extends UniversalManager {
public MsgDao getMsgDao();
public MMsgClassDao getmMsgClassDao();
}
|
package com.service;
import com.dao.NewsDao;
public interface NewsManager {
public NewsDao getNewsDao();
}
|
package com.service;
import com.dao.AdminDao;
import com.dao.MenuDao;
import com.dao.RollerDao;
import com.dao.TreeDao;
public interface SysManager extends UniversalManager {
public TreeDao getTreeDao();
public MenuDao getMenuDao();
public AdminDao getAdminDao();
public RollerDao getRollerDao();
}... |
package com.service;
import com.dao.AdminDao;
import com.dao.CompanyDao;
import com.dao.MsgDao;
import com.dao.PositionDao;
import com.dao.UserDao;
public interface AdminManager extends UniversalManager {
public CompanyDao getCompanyDao();
public UserDao getUserDao();
public AdminDao getAdminDao();
pu... |
package com.service;
import com.dao.CompanyDao;
import com.dao.PositionDao;
import com.dao.UserDao;
public interface CompanyManager extends UniversalManager {
public CompanyDao getCompanyDao();
public UserDao getUserDao();
public PositionDao getPositionDao();
}
|
package com.service.impl;
import com.dao.AdminDao;
import com.dao.CompanyDao;
import com.dao.MsgDao;
import com.dao.PositionDao;
import com.dao.UserDao;
import com.service.AdminManager;
public class AdminManagerImpl extends UniversalManagerImpl implements
AdminManager {
private CompanyDao companyDao;
... |
package com.service.impl;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.dao.UniversalDao;
import com.service.UniversalManager;
import com.vo.Page;
public class Uni... |
package com.service.impl;
import com.dao.CompanyDao;
import com.dao.PositionDao;
import com.dao.UserDao;
import com.service.CompanyManager;
public class CompanyManagerImpl extends UniversalManagerImpl implements
CompanyManager {
private CompanyDao companyDao;
private PositionDao positionDao;
private U... |
package com.service.impl;
import com.dao.NewsDao;
import com.service.NewsManager;
public class NewsManagerImpl extends UniversalManagerImpl implements
NewsManager {
private NewsDao newsDao;
public NewsDao getNewsDao() {
return newsDao;
}
public void setNewsDao(NewsDao newsDao) {
this.newsDao... |
package com.service.impl;
import com.dao.CompanyDao;
import com.dao.PositionDao;
import com.dao.RollerDao;
import com.dao.UserDao;
import com.service.UserManager;
public class UserManagerImpl extends UniversalManagerImpl implements
UserManager {
private UserDao userDao;
private RollerDao rollerDao;
p... |
package com.service.impl;
import com.dao.MMsgClassDao;
import com.dao.MsgDao;
import com.service.MsgManager;
public class MsgManagerImpl extends UniversalManagerImpl implements
MsgManager {
private MsgDao msgDao;
private MMsgClassDao mMsgClassDao;
public MsgDao getMsgDao() {
return msgDao;
}
pub... |
package com.service.impl;
import com.dao.AdminDao;
import com.dao.MenuDao;
import com.dao.RollerDao;
import com.dao.TreeDao;
import com.service.SysManager;
public class SysManagerImpl extends UniversalManagerImpl implements SysManager {
private TreeDao treeDao;
private MenuDao menuDao;
private AdminDao adminDao;
... |
package com.service;
import com.dao.CompanyDao;
import com.dao.PositionDao;
import com.dao.RollerDao;
import com.dao.UserDao;
public interface UserManager {
public UserDao getUserDao();
public RollerDao getRollerDao();
public PositionDao getPositionDao();
public CompanyDao getCompanyDao();
}
|
package com.service;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import com.vo.Page;
public interface UniversalManager {
/**
* 更新记录到数据表中
*
* @param object
*/
void update(Object o);
void saveOrUpdate(Object o);
/**
* 增加记录到... |
package com.servlet;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.util.Random;
import javax.imageio.ImageIO;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServlet;
... |
package com.dao;
import java.util.List;
import java.util.Map;
import com.beans.Admin;
import com.beans.AdminLog;
import com.vo.Page;
public interface AdminDao extends UniversalDao {
public Admin login(String name,String pwd,String ip);
public boolean myPwd(int userid,String oldPwd,String newPwd);
publ... |
package com.dao;
import java.util.List;
import com.beans.Msg;
import com.vo.Page;
public interface MsgDao extends UniversalDao {
public Page list(int pageNo, int pageSize, Msg msg);
public List topNewMsg(int top);
public List topViewMsg(int top);
public List topFixMsg(int top);
public void fix(int m... |
package com.dao;
import java.util.List;
public interface MMsgClassDao extends UniversalDao {
/**
* 分类显示
*
* @param parent_code
* 根据父节点code
* @param level
* 显示下级层数
* **/
public List getListByParentCode(String parent_code, int level);
}
|
package com.dao;
import java.util.List;
import com.beans.Menu;
public interface MenuDao extends UniversalDao {
/**一级菜单**/
public List getMainMenuList();
/**
* 所有菜单
* **/
public List getMenuList();
//
// /**
// * **/
// public List getListMenuTreeByCode(String code);
//
// public void inse... |
package com.dao;
import java.util.List;
import java.util.Map;
import com.beans.Company;
import com.beans.Position;
import com.beans.User;
import com.beans.UserLog;
import com.vo.Page;
public interface UserDao extends UniversalDao {
public List getListUser(String rollerCode);
public User login(String n... |
package com.dao;
import java.util.List;
import com.beans.Company;
import com.beans.CompanyLog;
import com.vo.Page;
public interface CompanyDao extends UniversalDao {
public Company login(String name,String pwd,String ip);
public boolean companyPwd(int userid, String oldPwd, String newPwd);
public List ... |
package com.dao.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.beans.Company;
import com.beans.Position;
import com.beans.User;
import com.beans.UserLog;
import com.dao.UserDao;
public class UserDaoImpl extends UniversalDaoImpl implements UserDao {
public List... |
package com.dao.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.beans.Msg;
import com.dao.MsgDao;
public class MsgDaoImpl extends UniversalDaoImpl implements MsgDao {
public com.vo.Page list(int pageNo, int pageSize, Msg msg) {
String sql = "select m.id,userid,... |
package com.dao.impl;
import java.util.List;
import java.util.Map;
import com.beans.Menu;
import com.dao.MenuDao;
public class MenuDaoImpl extends UniversalDaoImpl implements MenuDao {
/** 一级菜单 **/
public List getMainMenuList() {
String sql = "select * from j_menu where pcode is null and enabled='Y' o... |
package com.dao.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.beans.Company;
import com.beans.CompanyLog;
import com.dao.CompanyDao;
public class CompanyDaoImpl extends UniversalDaoImpl implements CompanyDao {
public Company login(String name, String pwd,String... |
package com.dao.impl;
import java.util.List;
import com.dao.RollerDao;
public class RollerDaoImpl extends UniversalDaoImpl implements RollerDao{
public List getListTree(String code) {
String sql;
if(code==null)
sql = "select code id,concat('[',code,'] ',name) text,isLeaf leaf from roller where... |
package com.dao.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.beans.Admin;
import com.beans.AdminLog;
import com.dao.AdminDao;
import com.vo.Page;
public class AdminDaoImpl extends UniversalDaoImpl implements AdminDao {
public Admin login(String name, String p... |
package com.dao.impl;
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.hibernate.Criteria;
import org.hibernate.Query;
import org.hibernate.criterion.Example;
import org.hibernate.criterion.Order;
import ... |
package com.dao.impl;
import java.util.List;
import com.dao.TreeDao;
public class TreeDaoImpl extends UniversalDaoImpl implements TreeDao {
public List getListByType(int type, boolean enabled) {
String sql;
if (enabled)
sql = "select code,parent_code,name,isLeaf,enabled from tree where type="
... |
package com.dao.impl;
import java.util.List;
import com.dao.MMsgClassDao;
public class MMsgClassDaoImpl extends UniversalDaoImpl implements MMsgClassDao {
public List getListByParentCode(String code, int level) {
String sql;
level = 2 * level;
if (code != null) {
int len = code.length();
... |
package com.dao.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.beans.Position;
import com.beans.User;
import com.dao.PositionDao;
import com.vo.Page;
public class PositionDaoImpl extends UniversalDaoImpl implements PositionDao {
public Page queryList(int pageNo... |
package com.dao.impl;
import com.dao.NewsDao;
public class NewsDaoImpl extends UniversalDaoImpl implements NewsDao {
public void addViews(int id) {
String sql="update j_news set views=views+1 where id="+id;
excuteSQL(sql);
}
public void fix(int newsID, int fix) {
String sql="update j_news set f... |
package com.dao;
public interface NewsDao extends UniversalDao {
public void addViews(int id);
public void fix(int newsID,int fix);
}
|
package com.dao;
import java.io.Serializable;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import com.vo.Page;
public interface UniversalDao {
/**
* ���¼�¼����ݱ���
*
* @param object
*/
void update(Object o);
void saveOrUpdate(Object o);
/**
* ���Ӽ�¼����ݱ���
*
* @par... |
package com.dao;
import java.util.List;
import com.beans.Position;
import com.vo.Page;
public interface PositionDao extends UniversalDao {
public Page queryList(int pageNo, int pageSize, Position p);
public List topFixPosition(int top);
public List topNewPosition(int top);
public List topViewPosition(... |
package com.yeepay;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.yeepay.DigestUtil;
import com.yeepay.HttpUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
... |
package com.yeepay;
import java.util.ResourceBundle;
/**
* @author lu.li
*
*/
public class Configuration {
private static Object lock = new Object();
private static Configuration config = null;
private static ResourceBundle rb = null;
private static final String CONF... |
package com.yeepay;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.UnsupportedEncodingException;
import java.net.URL;
import java.net.HttpURLConnection;
import java.net.URLEncoder;
... |
package com.yeepay;
import java.io.UnsupportedEncodingException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Arrays;
public class DigestUtil {
private static String encodingCharset = "UTF-8";
/**
* @param aValue
* @param aKey
* @return
... |
package com.yeepay;
public class RefundResult {
private String r0_Cmd; // 请求命令
private String r1_Code; // 请求结果
private String r2_TrxId; // 交易流水号
private String r3_Amt; // 交易金额
private String r4_Cur; // 交易币种
private String hmac; // 签名校验
public String getR0_Cmd() {
return r0_Cmd;
}... |
package com.filter;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletRespons... |
package com.controller.base;
import java.beans.PropertyEditor;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
impor... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.