有时候我们只需要某类一个对象,多个对象会产生不利的影响,如充当打印机: public
class OnlyModle { private static OnlyModle _only; private OnlyModle() { }
public...
分类:
其他好文 时间:
2014-05-28 04:41:53
阅读次数:
209
#include "ScriptPCH.h" class npc_teleport : public
CreatureScript{ public: npc_teleport() : CreatureScript("npc_teleport") { } ...
分类:
其他好文 时间:
2014-05-28 04:15:52
阅读次数:
305
1、索引器 1 class Player 2 { 3 private int[] arr = new
int[100]; 4 public int this[int index] 5 { 6 get { 7 ...
分类:
Web程序 时间:
2014-05-28 04:00:03
阅读次数:
216
题目链接题意: find the maximum positive difference
between the price on the ith day and the jth day附上代码: 1 class Solution { 2
public: 3 int maxProfit(ve...
分类:
其他好文 时间:
2014-05-28 03:49:45
阅读次数:
307
接口:interface Worker{ public void
dowork();}清洁工:被装饰者,节点流class Clean implements Worker{ public void dowork(){
System.out.println("搞清洁"); ...
分类:
编程语言 时间:
2014-05-28 03:18:38
阅读次数:
325
public class BubbleSortLib { public int[]
Sort(int[] arr) { for (int outer = arr.Length - 1; outer...
分类:
其他好文 时间:
2014-05-28 03:12:37
阅读次数:
223
在开发中Junit测试可以很方便的帮助开者尽可能早的发现并处理问题,而且使用也非常简单,只需要导入Junit测试相关的jar包并创建测试类,就可以对业务功能进行测试,而不用为了测试在代码中添加输出语句把代码搞得面目全非。需要注意的是,编写的测试方法只能是public
void并且无参,在测试方法.....
分类:
移动开发 时间:
2014-05-28 03:10:46
阅读次数:
497
/** * 带文本提示的进度条 */public class TextProgressBar
extends ProgressBar { private String text; private Paint mPaint; public
TextProgressBar...
分类:
移动开发 时间:
2014-05-27 16:29:14
阅读次数:
1470
/** * 循环统计数组或集合中的重复元素个数 * @param args */ public
static void main(String[] args) { Map map = new HashMap(); String[] ss = ...
分类:
其他好文 时间:
2014-05-27 16:23:14
阅读次数:
290
/// /// 多数据库服务器事务提交 /// ///
key为connName,value为Sql语句 /// public bool ExecuteMultiTran(List sqlStrings) {
bool reval = true...
分类:
数据库 时间:
2014-05-27 16:14:24
阅读次数:
434