10 2015 档案

摘要:pq函数功能很强大,我打算把统计的功能都放在数据库端。优势让运算离数据更近一些,缺点无法服用代码。牺牲了django的灵魂性,项目必须依赖postgresql。项目中,希望实现返回select内容后来通过bing.com查询,其实我需要的是返回表格。也是pq中的table,下面是demoCREATE OR REPLACE FUNCTION word_frequency(_max_tokens in... 阅读全文
posted @ 2015-10-28 23:02 springday 阅读(1126) 评论(0) 推荐(0)
摘要:安装Apacheyum install httpd -ychkconfig httpd onservice httpd start配置一下iptablesiptables -I INPUT -p tcp --dport 80 -j ACCEPTservice iptables save2.安装vsftpdyum install -y vsftpd配置一下iptables一般ftp用20与联21... 阅读全文
posted @ 2015-10-28 21:08 springday 阅读(175) 评论(0) 推荐(0)
摘要:CREATE LANGUAGE plpgsql CREATE or REPLACE function getDatirenshu(w_wjID int)RETURNS INTEGERas 'DECLARE datiRenshu INTEGER;BEGIN select count(id) into datiRenshu from rfwenjuan_yuanshij... 阅读全文
posted @ 2015-10-27 17:26 springday 阅读(547) 评论(0) 推荐(0)
摘要:引自 PostgreSQL Server Programming-Second Editionpage81: 大部分时候,我们不需要快速的代码,而是能用的程序。 remember that most of the time,you don't need the absolutely fastest code. For your clients or bosses,the best co... 阅读全文
posted @ 2015-10-27 07:47 springday 阅读(152) 评论(0) 推荐(0)
摘要:from django.template import Context,TemplatetextTemplate=""" {{time}} {{MsgId}} {{AgentID}} """ def response_text(self,msg): ... 阅读全文
posted @ 2015-10-26 20:03 springday 阅读(441) 评论(0) 推荐(0)
摘要:第一步 指定一下登陆url。url(r'^accounts/login/$', include(xadmin.site.urls)),由于我用的xadmin故而指向了xadmin,如果使用默认的adminsite,可做如下配置url(r'^accounts/login/$', 'django.contrib.auth.views.login'),这样的话,如果未登录,程序会默认跳转到“templa... 阅读全文
posted @ 2015-10-26 08:53 springday 阅读(563) 评论(0) 推荐(0)
摘要:sudo ln -s /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl /usr/bin/subl参考地址:https://www.sublimetext.com/docs/3/osx_command_line.html 阅读全文
posted @ 2015-10-19 21:33 springday 阅读(297) 评论(0) 推荐(0)
摘要:In [17]: now.strftime(%a),now.strftime(%w)Out[17]: ('Mon', '1')Directive Meaning%a Weekday name.%A Full weekday name.%b Abbreviated month name.%B Full month name.%c Appropriate date and time re... 阅读全文
posted @ 2015-10-19 21:06 springday 阅读(1679) 评论(0) 推荐(0)
摘要:9,10,11,12,1 第一学期2,3,4,5,6,7 第二学期其中8月份放假,暂且放入第一学期。因为大部分学校都选在8月底开学import datetimedef getXNandXQ(): now=datetime.datetime.now() year=int(now.strftime("%Y")) month=int(now.strftime("%m")) if ... 阅读全文
posted @ 2015-10-19 20:42 springday 阅读(318) 评论(0) 推荐(0)
摘要:主动调用的频率限制当你获取到AccessToken时,你的应用就可以成功调用企业号后台所提供的各种接口以管理或访问企业号后台的资源或给企业号成员发消息。为了防止企业应用的程序错误而引发企业号服务器负载异常,默认情况下,每个企业号调用接口都有一定的频率限制,当超过此限制时,调用对应接口会收到相应错误码。以下是当前默认的频率限制,企业号后台可能会根据运营情况调整此阈值:基础频率每企业调用单个cgi/a... 阅读全文
posted @ 2015-10-18 18:04 springday 阅读(2536) 评论(0) 推荐(0)
摘要:2014年为了尝鲜自己为单位做了微信服务号,受到同事们的一致好评,然而大boss对此毫无所知,小boss们也是可有可无。平时的工作也是实在平淡,2015年上半年又加入些许实用功能。(不要我问我怎么能拿到数据,我知回答他们的数据库都托管到我们部门,每次维护都是我配合集成商工程师调试,所以搞好各部门的关系也是十分必要的)。9月单位换了新的大boss,对微信十分感兴趣,特别是喜欢微信每天推送的新闻格式。... 阅读全文
posted @ 2015-10-18 10:36 springday 阅读(485) 评论(0) 推荐(0)
摘要:{% for item in item_list %} {{ forloop.counter }} {# starting index 1 #} {{ forloop.counter0 }} {# starting index 0 #} do your stuff{%endfor%} {{ forloop.counter }} .{... 阅读全文
posted @ 2015-10-13 17:21 springday 阅读(209) 评论(0) 推荐(0)