public class Processer{ public virtual string
Test() { return "virtual"; } public string Test2() { return "father"; }}public
class Processer2 : Proces...
分类:
其他好文 时间:
2014-05-27 00:17:38
阅读次数:
278
例如:我想将String[] str = {"4","5","6"}转化为“‘4’,‘5’,‘6’”字符串。这样我就可以用sql查询:select * from tableName id in (字符串)了。
项目中实现的源码如下:
StringBuffer idsStr = new StringBuffer();
for (int i = 0; i < i...
分类:
数据库 时间:
2014-05-23 01:55:42
阅读次数:
390
为什么会有线程同步的概念呢?为什么要同步?什么是线程同步?先看一段代码:package com.maso.test;
public class ThreadTest2 implements Runnable{
private TestObj testObj = new TestObj();
public static void main(String[] args) {
Thread...
分类:
移动开发 时间:
2014-05-23 01:29:34
阅读次数:
333
My97 DatePicker普通调用
1、设计源码
My97 DatePicker普通调用
$(function(){
//获取当前日期时间
var date = new Date();
//获取当前...
分类:
其他好文 时间:
2014-05-23 01:27:38
阅读次数:
241
结构是使用 struct 关键字定义的,与类相似,都表示可以包含数据成员和函数成员的数据结构。 一般情况下,我们很少使用结构,而且很多人也并不建议使用结构,但作为.NET Framework 一般型別系统中的一个基本架构,还是有必要了解一下的。
结构的特征: 结构是一种值类型,并且不需要堆分配。 结构的实例化可以不使用 new 运算符。
在结构声明中,除非字段被声明为 const 或 stat...
分类:
其他好文 时间:
2014-05-23 01:05:52
阅读次数:
298
Problem 2: Even Fibonacci numbers
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2,...
分类:
其他好文 时间:
2014-05-22 23:29:44
阅读次数:
435
设计模式3——建造者模式
1 解释
1.1 定义
将一个复杂对象的构建与他的表示分离,使得同样的构建可以创建不同的表示。
1.2 分析
首先我们看看一般的实例化对象的方法,如下面代码:
Roboter roboter = new Roboter();
roboter.setmArm("arm");
roboter.setmBody("...
分类:
其他好文 时间:
2014-05-22 22:36:05
阅读次数:
314
Js获取当前日期时间及其它操作
var myDate = new Date();
myDate.getYear(); //获取当前年份(2位)
myDate.getFullYear(); //获取完整的年份(4位,1970-????)
myDate.getMonth(); //获取当前月份(0-11,0代表1月)
myDate.getDate(); ...
分类:
Web程序 时间:
2014-05-22 18:47:26
阅读次数:
336
注意几点:
1. 如果有提示出错,考虑是否编译器的版本问题:Progect –》Properties-》Java Complier;(我目前选择的Java编译器版本是1.6)
2. 在进行debug的时候,需要New一个新的模拟器;
3.只需要New一次,运行一次模拟器,如果运行多了,需要去debug的窗口关闭,否则会多个模拟器同时运行。...
分类:
移动开发 时间:
2014-05-22 18:31:19
阅读次数:
386
day1='2014-03-31 00:00:01';function get_day(day1,day2){
var s = day1;
var dt = Date.parse(s.replace(/-/g,"/"));
var day1 = new Date(dt);
var s = day2;
var dt = Date.parse(s.replace(/-/...
分类:
Web程序 时间:
2014-05-22 17:29:10
阅读次数:
332