原文出自:http://cmsblogs.com/?p=599 在前篇博文中(java提高篇(二三)-----HashMap)详细讲解了HashMap的实现过程,对于HashSet而言,它是基于HashMap来实现的,底层采用HashMap来保存元素。所以如果对HashMap比较熟悉,那么HashSet是so easy!!一、定义public class HashSet
ext...
分类:
编程语言 时间:
2014-03-24 23:41:15
收藏:
0 评论:
0 赞:
0 阅读:
647
在很多地方都会用到正则表达式,每次都重新写或者到处找,显然是浪费时间。于是我这次项目将用到的或是网上找的或是自己写的几个常用的正则表达式列举一些,以后好找。
1.关于邮箱
^[a-zA-Z0-9_\-]+@[a-zA-Z0-9]+(\.[a-zA-Z]{2,4})+$
2.身份证号(15位)
^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\...
分类:
其他 时间:
2014-03-24 23:33:39
收藏:
0 评论:
0 赞:
0 阅读:
548
??
Description
Introduction
The Wu Xing, or the Five Movements, Five Phases or Five Steps/Stages, are chiefly an ancient mnemonic device, in many traditional Chinese fields.
The doctrine of five p...
分类:
其他 时间:
2014-03-24 23:32:44
收藏:
0 评论:
0 赞:
0 阅读:
649
为什么我明明在Eclipse导入了dom4j的jar包,但是在实例化SAXReader类还是失败了?
原因:没有正确地导入jar包。...
分类:
编程语言 时间:
2014-03-24 23:46:59
收藏:
0 评论:
0 赞:
0 阅读:
665
数据库备份是非常重要的。如果定期做好备份,这样就可以在发生系统崩溃时恢复数据到最后一次正常的状态,把损失减小到最少。
一、 用命令实现备份
MySQLl提供了一个mysqldump命令,我们可以用它进行数据备份,下面假设要备份tm这个数据库:
1
#mysqldump
-u root -p tm > tm_050519.sql...
分类:
数据库技术 时间:
2014-03-24 23:28:13
收藏:
0 评论:
0 赞:
0 阅读:
539
由于计算机内只有高低电平,只能代表0和1两种状态,所以就存在10进制与2进制之间的转换,但是由于2进制表达起来不方面,二转换为10进制有比较麻烦,就产生了八进制、十六进制
进制对照表
2进制与八进制、十六进制转换十分容易
每个进制都是的每一位都是有位权的
如:1001(二进制)
2^3*1 + 2^2*0 + 2^1*0 + 2^0*1 = 9
1001(八进制)...
分类:
其他 时间:
2014-03-24 23:27:18
收藏:
0 评论:
0 赞:
0 阅读:
825
John's trip
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 6569
Accepted: 2182
Special Judge
Description
Little Johnny has got a new car. He decided to ...
分类:
其他 时间:
2014-03-24 23:19:57
收藏:
0 评论:
0 赞:
0 阅读:
597
Given a binary tree containing digits from 0-9 only,
each root-to-leaf path could represent a number.
An example is the root-to-leaf path 1->2->3 which
represents the number 123.
Find the total...
分类:
其他 时间:
2014-03-24 23:57:21
收藏:
0 评论:
0 赞:
0 阅读:
601
题目地址:点击打开链接
拓扑排序
#include
#include
#include
#include
using namespace std;
const int maxsize = 110;
int graph[maxsize][maxsize];
int inDegree[maxsize];
int main()
{
int n,m;
while(cin>>n>>m&&(n...
分类:
其他 时间:
2014-03-24 23:56:25
收藏:
0 评论:
0 赞:
0 阅读:
607
有好的解决方案总该分享出来,你知道win 7/8 的笔记本电脑可以作为虚拟WiFi吗?如果不知道,那么,请看下面的操作步骤吧!
1. 使用管理运行命令提示符(查找栏中,输入cmd,以管理员运行cmd.exe).执行命令:netsh wlan set hostednetwork mode=allow
ssid="无线热点的名字" key=“w ifi的密码”。...
分类:
Windows开发 时间:
2014-03-24 23:50:46
收藏:
0 评论:
0 赞:
0 阅读:
739
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below binary tree and sum ...
分类:
其他 时间:
2014-03-24 23:34:31
收藏:
0 评论:
0 赞:
0 阅读:
492
POJ 3278
题意是一个农夫在一维空间内找一头奶牛,
农夫的位置是x 奶牛的位置是y
农夫每次可以走到x+1或x-1或者2*x;
问最少需要多少次才可以找到奶牛。
思路:水题,裸的一道BFS,唯一的坑就是数组开10W会RE。具体不多说,上代码
#include
#include
#include
#include
using namespace std;
int a[1000005...
分类:
其他 时间:
2014-03-24 23:15:12
收藏:
0 评论:
0 赞:
0 阅读:
447
运行Java Web项目报错
今天,我启动服务,发现项目报错,并且是在打开登录界面时报错。
具体错误如下:
org.apache.catalina.core.Standard WrapperValue invoke
严重:Servlet service() for servlet [jsp] in content path[Dojo] throw exceptio...
分类:
编程语言 时间:
2014-03-24 23:20:53
收藏:
0 评论:
0 赞:
0 阅读:
727
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
/**
* Definition for binary...
分类:
其他 时间:
2014-03-24 23:12:17
收藏:
0 评论:
0 赞:
0 阅读:
541
题意:看图就明白了
思路:迭代深搜,用到了剪枝,如果当前至少需要的加上深度就可以剪掉
#include
#include
#include
#include
using namespace std;
const int MAXN = 10;
int len[MAXN],n,now[MAXN];
char str[MAXN][MAXN],ans[100];
char name[] = ...
分类:
其他 时间:
2014-03-24 23:48:51
收藏:
0 评论:
0 赞:
0 阅读:
687
一般分为静态功耗和动态功耗。
动态功耗发生在门开关(或状态翻转)的瞬间。是由于对电容充电和电源和地之间短暂电流通路造成的。它正比于开关频率。
静态功耗总是存在。是有电源和地之间的静态导通电流(或漏电流)引起的。 降低动态功耗:
1、降低内核供电电压。降低供电电压会影响到时序性能。为了弥补这个影响,一...
分类:
其他 时间:
2014-03-24 22:41:54
收藏:
0 评论:
0 赞:
0 阅读:
585
Unity3d 层(layer)的学习 @广州小龙 unity中的层是个很有用的东西,
分类:
其他 时间:
2014-03-24 22:43:50
收藏:
0 评论:
0 赞:
0 阅读:
430
1、程序中故意抛出异常:public class ExceptionActivity extends
Activity { String str; @Override public void onCreate(Bundle savedInstanceState)
{ super.onCreate(s...
分类:
移动平台 时间:
2014-03-24 22:45:48
收藏:
0 评论:
0 赞:
0 阅读:
507
公司有几万个用户,接近10万人,有一些紧急的通知,消息提醒,可以发个及时通知工具,这样可以快速把一些信息通知给大家,让大家快速收到信息,及时通知到系统的每个人。自动提示信息现实状态,会在客户端自动谈出来,比较友善,发布的内容支持html格式内容。
分类:
Web开发 时间:
2014-03-24 22:46:41
收藏:
0 评论:
0 赞:
0 阅读:
604
原文地址:http://www.cnblogs.com/kross/p/3621952.html考虑到以后可能要用到这方面的知识,就来写个Demo尝试下,其实以前学过,但不记得了……(用不到的东西各种不记得啊)直接进入正题吧,在Android上使用Socket实际上跟在Java中使用差不多,只要注意...
分类:
移动平台 时间:
2014-03-24 22:48:37
收藏:
0 评论:
0 赞:
0 阅读:
623