流水号自增规则:时间(天) + ?自增流水(000)
例如:20150109001,20150109016,20150110001
?
思路一:
? ? 思路:java通过static 和?synchronized来实现
? ? 问题:如果是单纯的一个静态变量,那么如果服务器意外重启,这个变量会从0开始。
? ? 解决:如果是0的话去持久化介质中验证是否这天从0开始
? ? 总结:j ...
分类:
其他 时间:
2015-01-10 02:08:52
收藏:
0 评论:
0 赞:
0 阅读:
395
首先在src下的main下的scala下创建一个包为org.scala.base
创建一个scala类名称为HelloWorld.scla
由于main方法要位于object对象中,所以我们创建一个object ? ...
分类:
其他 时间:
2015-01-10 02:07:39
收藏:
0 评论:
0 赞:
0 阅读:
413
一; ?简单Fragment的使用;
? ? 效果图;
??
??代码实现:
??
1), 创建fragment1.xml布局
? ?
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="ma ...
分类:
其他 时间:
2015-01-10 02:06:22
收藏:
0 评论:
0 赞:
0 阅读:
252
S2SH开发环境搭建、框架整合、项目基础环境搭建
1.S2SH框架整合
新建项目s2sh:
?
1.1添加jar包
1.1.1添加Struts的jar包
添加如下的jar包:
commons-fileupload-1.2.2.jar
commons-io-2.0.1.jar
freemarker-2.3.19.jar
ognl-3.0.5.jar
struts2 ...
分类:
其他 时间:
2015-01-10 02:06:03
收藏:
0 评论:
0 赞:
0 阅读:
497
设计模式产品算法commandprototype
? Longronglin之设计模式:
?
Christopher Alexander说过:“每一个模式描述了一个在我们周围不断重复发生的问题,以及该问题的解决方案的核心。这样,你就能一次又一次地使用该方案而不必做重复劳动”。
模式描述为:在一定环境中解决某一问题的方案,包括三个基本元素--问题,解决方案和环境。
阅读类图和 ...
分类:
其他 时间:
2015-01-10 02:05:33
收藏:
0 评论:
0 赞:
0 阅读:
373
现在UI设计不仅仅是UI设计师的工作,程序员也需要学习,优质界面的重要性就不再赘述,博主就简单盘点一下去年的UI设计资源。
?
??
...
分类:
其他 时间:
2015-01-10 02:04:42
收藏:
0 评论:
0 赞:
0 阅读:
271
分类:
其他 时间:
2015-01-10 02:02:14
收藏:
0 评论:
0 赞:
0 阅读:
672
Pat1087代码
题目描述:
Indeed there are many different tourist routes from our city to Rome. You are supposed to find your clients the route with the least cost while gaining the most happiness.
Input S...
分类:
其他 时间:
2015-01-10 01:29:07
收藏:
0 评论:
0 赞:
0 阅读:
249
题目描述:
将输入的一个单向链表,逆序后输出链表中的值。链表定义如下:
typedef struct tagListNode
{
int value;
struct tagListNode *next;
}ListNode;
要求实现函数:
void converse(ListNode **head);
【输入】head: ...
分类:
其他 时间:
2015-01-10 01:28:47
收藏:
0 评论:
0 赞:
0 阅读:
351
Pat1089代码
题目描述:
According to Wikipedia:
Insertion sort iterates, consuming one input element each repetition, and growing a sorted output list. Each iteration, insertion sort removes one element ...
分类:
其他 时间:
2015-01-10 01:28:37
收藏:
0 评论:
0 赞:
0 阅读:
271
Pat1090代码
题目描述:
A supply chain is a network of retailers(零售商), distributors(经销商), and suppliers(供应商)-- everyone involved in moving a product from supplier to customer.
Starting from one root supp...
分类:
其他 时间:
2015-01-10 01:28:17
收藏:
0 评论:
0 赞:
0 阅读:
424
题目描述:
通过键盘输入任意一个字符串序列,字符串可能包含多个子串,子串以空格分隔。请编写一个程序,自动分离出各个子串,并使用’,’将其分隔,并且在最后也补充一个’,’并将子串存储。
如果输入“abc def gh i d”,结果将是abc,def,gh,i,d,
要求实现函数:
void DivideString(const char *pInputS...
分类:
其他 时间:
2015-01-10 01:27:17
收藏:
0 评论:
0 赞:
0 阅读:
289
大家inflate应该用的比较多吧,尤其在使用listview 的时候。
先来看看item的布局文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="20...
分类:
其他 时间:
2015-01-10 01:27:07
收藏:
0 评论:
0 赞:
0 阅读:
255
1、目标
重新认识下ValueStack;
2、图解
3、解释下用法
struts2中在页面取值的话;是这样的,root中可以直接取值不用加#
但是在ActionContext中取值则需要加#访问才能取到值;
4、struts2中debug标签所对应的root和ActionContext;...
分类:
其他 时间:
2015-01-10 01:07:18
收藏:
0 评论:
0 赞:
0 阅读:
355
一、自律 勇于承担责任,敢于面对困难,才能够使心灵变得健康。自律,是解决人生问题的首要工具,也是消除人生痛苦的重要手段。 四方面:推迟满足感、承担责任、尊重事实、保持平衡。 推迟满足感,意味着不贪图暂时的安逸,重新设置人生快乐与痛苦的次序:首先,面对问题并感受痛苦;然后,解决问题并享受更大的快乐,这...
分类:
其他 时间:
2015-01-10 01:04:56
收藏:
0 评论:
0 赞:
0 阅读:
274
语法:SELECT [DISTINCT] * | 列名称 [AS]别名,........FROM 表名称1 [别名1],表名称2 [别名2],...[WHERE 条件(s)][ORDER BY 排序的字段 1,ASC| DESC,排序的字段2 ASC| DESC,....] 示例一 查询所有员工的信...
分类:
其他 时间:
2015-01-10 01:04:26
收藏:
0 评论:
0 赞:
0 阅读:
316
IP数据报格式常常为32位,4字节为单位来描述。由首部和数据两部分组成。首部的前一部分是固定长度,共20字节,是所有IP数据报必须有的,在首部的固定部分后面是一些可选字段,长度是可变的。IP数据报首部的固定部分:1,版本,4位,IP协议版本,通信双方IP协议版本必须一致。IPv4,IPv6。2,首部...
分类:
其他 时间:
2015-01-10 01:04:07
收藏:
0 评论:
0 赞:
0 阅读:
332
Problem Description There are several ancient Greek texts that contain descriptions of the fabled island Atlantis. Some of these texts even include...
分类:
其他 时间:
2015-01-10 01:03:07
收藏:
0 评论:
0 赞:
0 阅读:
333
/** * 計算兩組經緯度座標間的距離 * params:lat1緯度1,lng1經度1,lat2緯度2,lng2經度2,len_type(1:m|2:km); * Echo GetDistance($lat1,$lng1,$lat2,$lng2).'米'; */function GetDistan...
分类:
其他 时间:
2015-01-10 01:02:57
收藏:
0 评论:
0 赞:
0 阅读:
385
最近从Hadoop 1.x 转到Hadoop 2.x 同时将一些java 程序转为Scala的程序将平台上的代码减少了很多,在实施的过程中,开到一些Spark相关的YARN的部署上都是基于之前的Hadoop 1.x的部分方式,在Hadoop2.2 +版本之上 基本上就不用这么部署了。其原因就是Had...
分类:
其他 时间:
2015-01-10 01:01:37
收藏:
0 评论:
0 赞:
0 阅读:
447