兴趣是坚持一件事永不衰竭的动力
发布时间:2016-01-18 00:40:06
package com.dd.model.protocol;import java.util.ArrayList;public class CmdLogin implements IProtocolBase{Field version;Field cmd;Field handle;Field userName;Field password;Field crc;ArrayList<Field> fieldList = new ArrayList<Field>();public CmdLogin(Field version, Field cmd, Field hand.........【阅读全文】
发布时间:2015-12-28 01:45:11
生产者/消费者问题的多种Java实现方式 实质上,很多后台服务程序并发控制的基本原理都可以归纳为生产者/消费者模式,而这是恰恰是在本科操作系统课堂上老师反复讲解,而我们却视而不见不以为然的。在博文《一种面向作业流(工作流)的轻量级可复用的异步流水开发框架的设计与实现》中将介绍一种生产者/消费者.........【阅读全文】
发布时间:2015-11-25 23:51:40
package com.ddChat.graphic;import java.awt.Graphics;import javax.swing.JFrame;import javax.swing.JPanel;public class PlotPanel extends JPanel{Graphics g;Plot plot;public PlotPanel(){g = this.getGraphics();System.out.println(g);plot = new Plot(g);}public void paint(Graphics g){S.........【阅读全文】
发布时间:2015-11-25 23:51:04
package com.ddChat.graphic;import java.awt.Graphics;import java.util.Vector;public class Plot extends Painter{Curve curve;XScale xScale;YScale yScale;GData min ;GData max ;public Plot(Graphics g){super(g);min = new GData(1, 2);max = new GData(100, 2);curve = new Curve(g);xScale.........【阅读全文】
发布时间:2015-11-25 23:50:28
package com.ddChat.graphic;import java.awt.Graphics;public class YScale extends Scale{GData min;GData max;private final int MAJOR_TICK_LEN = 10;public YScale(Graphics g){super(g);min = new GData(1, 2);max = new GData(300, 2);}@Overridevoid setG(Graphics g){this.g = g;}@Ov.........【阅读全文】