错误代码:
java.lang.OutOfMemoryError: PermGen space
原因分析:
myeclipse或tomcat的内容分配的不够用,启动失败
解决方法:
1.找到tomcat安装目录的这个文件\apache-tomcat-7.0.41\bin\catalina.bat,打开,在里面找到这句:rem ----- Execute The Requested Command 。在这句下面添加:set JAVA_OPTS=%JAVA_OPTS% -Xms256m -Xmx1024m ...
分类:
编程语言 时间:
2014-10-09 20:48:47
阅读次数:
212
本题有几个注意点:
1. 回溯找路径时,根据路径的最大长度控制回溯深度
2. BFS时,在找到end单词后,给当前层做标记find=true,遍历完当前层后结束。不需要遍历下一层了。
3. 可以将字典中的单词删除,替代visited的set,这样优化以后时间从1700ms+降到800ms+
代码如下:
class Solution {
public:
vector> findLa...
分类:
其他好文 时间:
2014-10-09 20:13:57
阅读次数:
177
#service mysql stop#mysqld_safe --skip-grant-tables另外开个SSH连接或终端[root@localhost ~]# mysqlmysql>use mysqlmysql>update user set password=password("123456...
分类:
数据库 时间:
2014-10-09 19:49:27
阅读次数:
224
SQL如下:
update mapping_nj_roads
set municipality='227'
from mapping_geodata_boundary a
where a.supportfile_code='227' and
(a.boundary.STContains(mapping_nj_roads.geom)=1 or a.boundary.STIntersect...
分类:
数据库 时间:
2014-10-09 19:39:17
阅读次数:
320
using System;
using System.IO.Ports;
class SerialPortHelper
{
private long _receiveByteCount = 0, _sendByteOfCount = 0;
public long ReceiveByteCount { get { return _receiveByteCount; } set...
分类:
其他好文 时间:
2014-10-09 17:46:37
阅读次数:
339
题目:ZOJ Problem Set - 2297 Survival
题意:给出一些怪,有两个值,打他花费的血和可以增加的血,然后有一个boss,必须把小怪所有都打死之后才能打boss,血量小于0会死,也不能大于100.
分析:定义状态:dp【st】,表示在 st 状态下的血量。
然后转移:dp【st】 = max (dp【st】,dp【st&~(1
注意初始化的时候必须...
分类:
其他好文 时间:
2014-10-09 16:33:48
阅读次数:
366
Alt+回车 导入包,自动修正
Ctrl+N 查找类
Ctrl+Shift+N 查找文件
Ctrl+Alt+L 格式化代码
Ctrl+Alt+O 优化导入的类和包
Alt+Insert 生成代码(如get,set方法,构造函数等)
Ctrl+E或者Alt+Shift+C 最近更改的代码
Ctrl+R 替换文本
Ctrl+F 查找文本
C...
分类:
移动开发 时间:
2014-10-09 16:33:24
阅读次数:
182
Problem Description
A binary tree is a finite set of vertices that is either empty or consists of a root r and two disjoint binary trees called the left and right subtrees. There are three most impor...
分类:
其他好文 时间:
2014-10-09 16:32:58
阅读次数:
176
题目链接:HDU 5058
So easy
题意:给出两个序列,问这个两个序列构成的集合是否相同、
set大法好!
AC代码:
#include
#include
#include
using namespace std;
#define ll __int64
set ss1,ss2;
set::iterator it;
int main()
{
ll n...
分类:
其他好文 时间:
2014-10-09 15:56:38
阅读次数:
282