04 2012 档案

摘要:在1.4版本以前,内置的 Truncate Filter 只有两种:trancatewords 和 trancatewords_html 。 这里的截断过滤器根据空格为分界符,所以就显得不是很灵活!1.4版本后有了新的filter:truncatechars 。 这个就能满意要求了。但如果你是1.4版本以前的,不要沮丧,可以自己写一个。这里举个例子,以截断IP后一段,变成*号 。 比如:192.168.100.100 变成 192.168.100.**先写一个tag,命名为 truncate_ipaddr.pyfrom django import templateregister = tem. 阅读全文
posted @ 2012-04-30 10:16 timest 阅读(754) 评论(0) 推荐(0)
摘要:Alert--LESS:close.less , alerts.less ,(V&M)--js: bootstrap-alert.jsProgress-bar--LESS: progress-bars.less--js: -Button dropdown menu / Split button dropdowns --LESS: dropdowns.less , buttons.less ,button-groups.less, scaffolding.less(下拉框按钮的布局)--js: bootstrap-dropdown.jsLabels :--LESS: labels.les 阅读全文
posted @ 2012-04-19 10:25 timest 阅读(598) 评论(0) 推荐(0)
摘要:转载This evening I tried to connect to my MongoDB instance using the command line mongo tool and got the following error message:Error: couldn't connect to server 127.0.0.1} (anon):1137. It turns out that the server wasn't running due to an improper shutdown at some point in the past. Here' 阅读全文
posted @ 2012-04-15 08:14 timest 阅读(5955) 评论(1) 推荐(0)
摘要:1 #include <iostream> 2 #include <cstdio> 3 #include <string> 4 #include <cstring> 5 #include <vector> 6 #include <map> 7 using namespace std; 8 int main() { 9 int n; 10 map<string, int> m; 11 vector<string> sv; 12 scanf("%d\n\n",&n); 13 阅读全文
posted @ 2012-04-08 15:59 timest 阅读(396) 评论(0) 推荐(0)