This question is almost same as the previous one.I just use a stack (another vector) of vector to store the level result. Then reverse it. 1 /** 2 * ....
分类:
其他 时间:
2015-03-18 08:54:39
收藏:
0 评论:
0 赞:
0 阅读:
258
writing_first_django_app_part4Write a simple form点击每个Question进去detail界面,看到的vote我们希望以选择的形式给用户进行选择,然后将结果以表格的形式POST到服务器.# polls/templates/polls/detail.ht...
分类:
其他 时间:
2015-03-18 08:54:19
收藏:
0 评论:
0 赞:
0 阅读:
256
Hive是为了简化编写MapReduce程序而生的,使用MapReduce做过数据分析的人都知道,很多分析程序除业务逻辑不同外,程序流程基本一样。在这种情况下,就需要Hive这样的用戶编程接口。Hive本身不存储和计算数据,它完...
分类:
其他 时间:
2015-03-18 07:53:09
收藏:
0 评论:
0 赞:
0 阅读:
273
1.多表连接查询: class?A(models.Model):
????name?=?models.CharField(u‘姓名‘)
class?B(models.Model):
????aa?=?models.ForeignKey(A)
B.objects.filter(aa__name__contains=‘searchtitle‘) 2...
分类:
其他 时间:
2015-03-18 07:52:19
收藏:
0 评论:
0 赞:
0 阅读:
362
在centos7中运行NodeJs的容器,发现挂载的本地目录在容器中没有执行权限,经过各种验证和Google搜索,找到了问题的原因,这里做一下记录。原因是centos7中的安全模块selinux把权限禁掉了,至少有以下三种方式解决...
分类:
其他 时间:
2015-03-18 07:51:50
收藏:
0 评论:
0 赞:
0 阅读:
469
16.5?? BOOTP穿越路由器 我们在 5.4节中提到 RARP的一个缺点就是它使用链路层广播,这种广播通常不会由路由 器转发。这就需要在每个物理网络内设置一个 RARP 服务器。如果路由器支持 BOOTP协议, 那么BOOTP能够...
分类:
其他 时间:
2015-03-18 07:51:30
收藏:
0 评论:
0 赞:
0 阅读:
306
GP2Y1010AU0F传感器接线方式如下: 使用PA0接收模拟信号,PB1发送脉冲信号。 代码如下: GP2Y.c #include?"GP2Y.h"
#include?"system.h"
u16?AD_PM;
void?GP2Yinit(void)
{?
//定义变量
????ADC_InitT...
分类:
其他 时间:
2015-03-18 07:51:19
收藏:
0 评论:
2 赞:
2 阅读:
4704
1.在scroView上拖一个imageView 设置其大小,然后设置contentSize的大小,只能用代码设置。在设置contentOffSet属性(contentOffSet的属性特点,是一个point设置成正值向上移动)。contentInSet = UIEdgeInSetMake(...
分类:
其他 时间:
2015-03-18 07:50:30
收藏:
0 评论:
0 赞:
0 阅读:
300
异步函数: 1. 返回Future 2. 必须有set_result( )或者set_exception( )调用。 这里展示一个异步socket读取的例子: 首先定义一个定时返回的服务器,来模拟耗时的操作 from?tornado.tcpserver?import?TCPServ...
分类:
其他 时间:
2015-03-18 07:50:09
收藏:
0 评论:
0 赞:
0 阅读:
636
如果我说的没错,你可能想看到的界面大致如下: 右边m2的红色标记一直是你的疑惑,你会有这样的疑问:怎么我的项目就没有这些操作呢? 那一定是你的项目不符合基本maven项目的规范。 按照如下的操作步骤创建项目即...
分类:
其他 时间:
2015-03-18 07:49:59
收藏:
0 评论:
0 赞:
0 阅读:
293
今天早上回去,好好看了下书,毕竟前几天脑袋还没有反应过来,所以没怎么敲代码。如果连书都不看,那就彻底浪费时间了。 ????看得差不多的时候,收到了昨天晚上买那个水货5s,很不放心地给了钱之后,...
分类:
其他 时间:
2015-03-18 07:49:49
收藏:
0 评论:
0 赞:
0 阅读:
279
当初项目文档是用sphinx写的,一套rst下来make html得到一整个漂亮的在线文档。现在想要将文档导出为离线的handbook pdf,于是找到了rst2pdf这个项目,作为sphinx的拓展,然后加上少量配置即可输出中文PDF。rst2p...
分类:
其他 时间:
2015-03-18 07:49:39
收藏:
0 评论:
0 赞:
0 阅读:
372
水题,直接贴代码。
//poj 1406
//sep9
# include
using namespace std;
__int64 f1[2024];
__int64 f2[3024];
int main()
{
__int64 index1=0,index2=0,n;
for(index1=0;index1<1300;++index1)
f1[index1]=index1*index...
分类:
其他 时间:
2015-03-18 07:48:09
收藏:
0 评论:
0 赞:
0 阅读:
292
生活目标其实就是一件如果你愿意投入精力去做,就可能达到的事。怎么找你的目标呢……...
分类:
其他 时间:
2015-03-18 07:47:59
收藏:
0 评论:
0 赞:
0 阅读:
321
Use a hash table to record it. The tricky part is that when the hash value is > 0, it is the index + 1. Otherwise, that string already exists in resul...
分类:
其他 时间:
2015-03-18 07:47:29
收藏:
0 评论:
0 赞:
0 阅读:
217
It is similar to use stack for BST inorder traversal.So do the same thing :1. Get stack to store right branchs(include current node).2. When you pop t...
分类:
其他 时间:
2015-03-18 07:47:19
收藏:
0 评论:
0 赞:
0 阅读:
342
Need a helper function to return the binary tree maximum height. If the return value is -1, it means there is a imbalanced subbranch . 1 /** 2 * Defi....
分类:
其他 时间:
2015-03-18 07:46:59
收藏:
0 评论:
0 赞:
0 阅读:
307
This is simple, use greedy algorithm will solve the problem. 1 class Solution { 2 public: 3 int maxProfit(vector &prices) { 4 int len = pr...
分类:
其他 时间:
2015-03-18 07:46:49
收藏:
0 评论:
0 赞:
0 阅读:
305
This is combination of II and III.1. when k >= length, it is totally II.2. when k localMax[j] = max(localMax[j] + diff, globalMax[j-1] + max(0, diff.....
分类:
其他 时间:
2015-03-18 07:46:39
收藏:
0 评论:
0 赞:
0 阅读:
258
This question is pretty straight forward. 1 class Solution { 2 public: 3 string addBinary(string a, string b) { 4 int runnerA = a.size()-1...
分类:
其他 时间:
2015-03-18 07:46:29
收藏:
0 评论:
0 赞:
0 阅读:
296