Given a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible representation...
分类:
其他好文 时间:
2014-07-23 15:06:06
阅读次数:
320
今天在做项目开发时遇到这么一个错误,完整的错误提示信息如下:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tony.timepicker/com.tony.timepicker.MainActivity}...
分类:
移动开发 时间:
2014-07-23 14:55:57
阅读次数:
328
nginx 默认不支持PATH_INFO 那么不能正常使用CI。 更改nginx.conf 配置 server { listen 80; server_name localhost; index index.php index.html index.htm; root /Users/renfrank/Sites/; location ~ \.php{ fa...
分类:
其他好文 时间:
2014-07-23 14:01:36
阅读次数:
243
地址:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3799
Two star-crossed lovers want to meet. The two lovers are standing at distinct points in t...
分类:
其他好文 时间:
2014-07-23 13:29:04
阅读次数:
242
题目大意:
给出一棵树,树上每个节点都有权值,然后有两个操作。
1 x val 在结点x上加上一个值val,x的儿子加上 -val,x的儿子的儿子加上 - (-val),以此类推。
2 x 问x节点的值。
思路分析:
每个节点上加值都是给自己的儿子节点加,而且这个是颗树。
比如样例上的,如果你给node 1加一个值,那么五个节点都加。
再给node 2加个值,2的儿子节点也加...
分类:
其他好文 时间:
2014-07-23 13:19:26
阅读次数:
272
在Windows环境下:有时在其他环境下运行正常的程序在自己的环境上会报错误程序会 报出Undefined index:这样的错误例如有如下的代码:Undefined varialbe:一下是在网上找到的解决办法:问题如下:1.问题出在哪里?2.应如何修改这段代码?3.不改段代码,如何修改php.i...
分类:
Web程序 时间:
2014-07-23 12:59:16
阅读次数:
207
Highcharts中文网学习Highcharts很重要的一个网站,而且提供下载。http://www.hcharts.cn/demo/index.php?p=92提供了很多例子,每个例子下方都有 查看源代码 和 编辑代码,有了例子展示和源代码,弄出自己需要的统计图还不是小意思。有了源代码,但是很多...
分类:
Web程序 时间:
2014-07-23 12:38:26
阅读次数:
250
树形结构的数据库表Schema设计 程序设计过程中,我们常常用树形结构来表征某些数据的关联关系,如企业上下级部门、栏目结构、商品分类等等,通常而言,这些树状结构需要借助于数据库完成持久化。然而目前的各种基于关系的数据库,都是以二维表的形式记录存储数据信息,因此是不能直接将Tree存入DBMS,设计合...
分类:
数据库 时间:
2014-07-23 12:12:06
阅读次数:
404
Another textbook problem. We take back of postorder array as the current root, and then we can split the inorder array: 1st half for current right chi...
分类:
其他好文 时间:
2014-07-23 12:01:56
阅读次数:
210
A collegiate textbook problem. Nothing special, but just take care of your memory use.class Solution {public: TreeNode *_buildTree(int pre[], int &...
分类:
其他好文 时间:
2014-07-23 12:00:46
阅读次数:
248