练习一下stack的使用,还有要注意一下输入的格式,看了好长时间没懂。 1 //#define LOCAL 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 const int maxn = 100...
分类:
其他好文 时间:
2014-09-17 18:35:42
阅读次数:
190
C - Number of Ways
直接暴力从前往后寻找,如果找到1/3sum的位置,那么标记++。找到2/3的位置,总数加上标记数。
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#pragma comment(linker, "/STACK:1024000...
分类:
其他好文 时间:
2014-09-17 16:57:02
阅读次数:
282
文章仅记录自己的一点理解,供日后参考。
AMS管理四大组件外加进程管理,其中最庞大的算是Activity了吧。
1、AMS中对ActivityStack划分为两类,其中一类是FrontStack,另一类刚好相反。
boolean isFrontStack(ActivityStack stack) {
return !(stack.isHomeStack() ^ g...
分类:
其他好文 时间:
2014-09-17 16:54:02
阅读次数:
270
//avl_tree.h
#include
using std::stack;
template
class AVL_TREE
{
public:
AVL_TREE(){
nil = new AVL_NODE(0, -1, NULL, NULL);
tree_root = nil;
}
bool find(const T &val) const;
void insert(co...
分类:
其他好文 时间:
2014-09-16 23:44:51
阅读次数:
272
写了一个Action,但在浏览器输入:http://localhost:8080/JhxcomOA/role_add.do访问就报错:Struts Problem ReportStruts has detected an unhandled exception:Messages: com.jhxc....
分类:
其他好文 时间:
2014-09-16 23:31:51
阅读次数:
182
Stack4.h
/**
* 书本:【ThinkingInC++】
* 功能:带内联函数的Stack
* 时间:2014年9月16日19:04:01
*/
#ifndef STACK4_H_INCLUDED
#define STACK4_H_INCLUDED
#include "../require.h"
class Stack
{
struct Link //节点结构
{
...
分类:
编程语言 时间:
2014-09-16 20:41:52
阅读次数:
288
题描述
在Linux上使用Spring+Hibernate+dbcp连接本机上的MySQL时,出现异常:
[ERROR][2014-09-1614:00:59,343][com.ocyd.jeecgframework.core.common.exception.MyExceptionHandler]org.springframework.transaction.CannotCreateTran...
分类:
数据库 时间:
2014-09-16 19:03:20
阅读次数:
457
报zookeeper exception not foundI fixed this by editing the file "/usr/local/hbase-0.94.1/conf/hbase-env.sh" and adding the element "export HBASE_CLASSP...
分类:
其他好文 时间:
2014-09-16 18:47:20
阅读次数:
144
今天在图书馆借了一本《高效能程序员的修炼》,内容幽默风趣。(其实我是看到作者是stack overflow创始人,才借的)。看到几十页中有一个例子是关于求平方根的,代码很简单,但是```第一次没看懂····才知道原理是根据牛顿-拉夫逊方法即牛顿迭代法,具体细节大家可以百度一下。
private double SquareBootAppr(int n)
{
double r=n/2;
wh...
分类:
其他好文 时间:
2014-09-16 17:28:50
阅读次数:
230
同理 org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:?Line?52?in?XML?document?from?class?path?resource?[bean.xml]?is?invalid;?nested?exception?is?org.xml.sax.S...
分类:
Web程序 时间:
2014-09-16 16:14:00
阅读次数:
859