群聊的前台主要代码:
{%block content%}
测试版本,每天凌晨4:00清水,enjoy it~~:-)-->
{%for i in content[19*int(num)-19:19*int(num)]%}
【{{i[1]}}】 ({{i[3]}}) : {{i[2]}}
{%end%}
{%for i in range(1,pages+1)%}
{{i}}
{%...
分类:
其他好文 时间:
2014-05-13 23:14:45
阅读次数:
388
1. if elif else 2. 条件表达式:三元操作符: smaller = x if x
< y else y == if x < y : smaller =x else : smaller = y3. range(start, end,
step=1) 4. xrange(): 当有一个很...
分类:
编程语言 时间:
2014-05-13 21:48:28
阅读次数:
362
Given an integer, convert it to a roman
numeral.Input is guaranteed to be within the range from 1 to 3999.public class
Solution { public String int...
分类:
其他好文 时间:
2014-05-10 20:31:10
阅读次数:
335
dmidecode # 查看全面硬件信息dmidecode | grep "Product Name"
# 查看服务器型号dmidecode | grep -P -A5 "Memory\s+Device" | grep Size | grep -v Range #
查看内存插槽
分类:
其他好文 时间:
2014-05-10 08:00:29
阅读次数:
540
1 #include 2 #define range 1300000 3 #define
BOOL int //必须把bool,true,false这样表示出来,不然会报编译错误...不知道为什么囧... 4 #define true 1 5
#define false 0 6 BOOL p...
分类:
其他好文 时间:
2014-05-10 06:56:39
阅读次数:
283
聪明的办法是想:求前10位,那只要前8位加起来,进2位就OK。本的办法,就是真的加起来,截前面10位。如我。numList
= str.split()sum = 0for i in range(0,len(numList)): sum += int(numList[i][0:50])
p...
分类:
其他好文 时间:
2014-05-09 23:16:32
阅读次数:
350
在 mkfs.ext4 /dev/sda2 格式化硬盘空间时,可能出现这样的错误。
had this situation at office where I was told to re-partition an already existing partition. The situation was to get the below schema
/dev/sdb1 1 3040 24...
分类:
其他好文 时间:
2014-05-09 20:49:25
阅读次数:
343
partition是快排的准备工作,被用在其他很多问题上,比如找满足某个条件的数之类的。
在数组中,可以一头一尾的指针依次置换,这样是不能保证源数组中的相对顺序的。链表中就不一样了,没办法拿到尾部的指针,只能从头部往后找,找到第一不满足partition条件的节点,即较大的数,然后再往后找较小数,把较小数的节点移到前面来,因此跟数组的做法还有个区别,链表的partition只有一个指针在做实际的...
分类:
其他好文 时间:
2014-05-09 20:48:28
阅读次数:
252
oracle 10g下有几种扫描方式,注意最后一种扫描方式,当对分区的列进行计算时,会不走分区,这跟对索引列进行计算会导致无法用索引一样。
--扫描单个分区 PARTITION RANGE SINGLE
--连续扫描多个分区 PARTITION RANGE ITERATOR
--不连续扫描多个分区 PARTITION RANGE INLIST
--扫描全分区 P...
分类:
数据库 时间:
2014-05-09 09:05:28
阅读次数:
519
来尝试一下更为复杂一点的检索。我们想要找到姓中包含“Smith"且年龄大于30的员工信息,一个有效的查询如下:GET
/megacorp/employee/_search{ "query":{ "filtered":{ "filter":{ "range":{ ...
分类:
其他好文 时间:
2014-05-09 00:06:23
阅读次数:
358