摘要: 最近微信登录开放公测,为了方便微信用户使用,我们的产品也决定加上微信登录功能,然后就有了这篇笔记。根据需求选择相应的登录方式微信现在提供两种登录接入方式移动应用微信登录网站应用微信登录这里我们使用的是网站应用微信登录按照 官方流程1 注册并通过开放平台开发者资质认证注册微信开放平台帐号后,在帐号中心... 阅读全文
posted @ 2015-02-15 18:16 cacique 阅读(17020) 评论(0) 推荐(0) 编辑
摘要: 今天无意间看到 simple-todo: 一个简易的 todo 程序 - web.py 中文教程,然后发现竟然有好多的版本http://simple-is-better.com/news/tag/simple-todo然后看到django版的是个半成品,好吧,自己动手丰衣足食。django 安装配置这里就不再介绍了,直接给之前的地址:django 简易博客开发 1 安装、创建、配置、admin使用使用的环境: fedora 17 + django1.4 + python2.7 + sqlite3前端使用的 bootstrap + jquery实现添加修改删除 ajax支持 可自行添加用户控制1 阅读全文
posted @ 2012-10-06 23:40 cacique 阅读(9675) 评论(16) 推荐(6) 编辑
摘要: 作为全球最大的程序员同性交友社区,github pages 吸引了我 为了有一个更好的博客的写作环境 将会把内容逐渐迁移到 github.io 地址 "zongxiao.github.io" 新的文章也会更新到那里 再次感谢博客园 阅读全文
posted @ 2016-04-17 22:44 cacique 阅读(366) 评论(0) 推荐(0) 编辑
摘要: 变量 变量是代表某个值的名字 函数 函数通过def关键字、函数名和可选的参数列表定义。 是可以调用的,它执行某种行为并且返回一个值。 函数内部也可以定义函数 作用域&生存周期 函数会创建一个新的作用域(命名空间)。 函数的命名空间随着函数调用开... 阅读全文
posted @ 2015-10-14 15:52 cacique 阅读(1237) 评论(0) 推荐(1) 编辑
摘要: 最近在用git,但git学习曲线实在是有点高。好在找到一个文档https://www.atlassian.com/git/tutorial/,以下就是学习笔记吧!git initgit init 在当前目录初始化一个Git仓库,包含一个 .git 目录 .git 目录就是Git版本库 当前目录为工作区git init 在指定的目录初始化一个Git仓库, 下包含一个.git 目录git init --bare 在指定目录初始化一个版本库,仅包含".git"目录(记录版本历史),不含项目源文件拷贝。在使用Git初始化版本库的时候,使用"git init"命令 阅读全文
posted @ 2013-11-20 14:57 cacique 阅读(821) 评论(0) 推荐(0) 编辑
摘要: 在学习haskell 记录以下常用的函数随时更新!spanspan:: (a ->Bool) -> [a] -> ([a], [a])span, applied to a predicatepand a listxs, returns a tuple where first element is longest prefix (possibly empty) ofxsof elements that satisfypand second element is the remainder of the list:接受一个 判断条件 和 一个 list xs, 返回一个包含两个l 阅读全文
posted @ 2013-08-28 10:39 cacique 阅读(1576) 评论(0) 推荐(0) 编辑
摘要: 文档地址http://jinja.pocoo.org/docs/templates/#builtin-filtersindentindent(s, width=4, indentfirst=False)Return a copy of the passed string, each line indented by 4 spaces. The first line is not indented. If you want to change the number of spaces or indent the first line too you can pass additional par 阅读全文
posted @ 2013-08-27 14:57 cacique 阅读(737) 评论(0) 推荐(0) 编辑
摘要: 最近在用wxpyhon google 联系人应用, 不能避免的遇到了使用oauth 验证的问题。首先贴一下关于 OAuth 2.0 的官方文档 https://developers.google.com/accounts/docs/OAuth2然后再贴一下 中文文档 http://blog.csdn.net/totogogo/article/details/6860966Google提供下列4种方式的OAuth 2.0:TheClient-side Applications flow for JavaScript applications running in a browser该flow适用 阅读全文
posted @ 2013-05-09 11:09 cacique 阅读(1020) 评论(0) 推荐(0) 编辑
摘要: select to_char(date_published, 'yyyymm') yo from blog group by yo;转换成sqlalchemy 语句可以使用 extract()In[3]: year_field = db.func.extract('year', ArticleModel.date_published)In[4]: month_field = db.func.extract('month', ArticleModel.date_published)In[5]: yonth_field = year_field *1 阅读全文
posted @ 2013-05-03 10:01 cacique 阅读(1721) 评论(0) 推荐(0) 编辑
摘要: 上一篇博客介绍了comments库使用及ajax支持,现在blog已经具备了基本的功能,但是只能发表文字,不支持富文本编辑。今天我们利用markdown添加富文本支持。markdown语法说明:http://wowubuntu.com/markdown/http://markdown.tw/http://mahua.jser.me/推荐第三个,可以直接在线编辑markdown文档。django添加markdown支持首先需要安装markdown 安装说明 :http://daringfireball.net/projects/markdown/然后添加django.contrib.markup 阅读全文
posted @ 2012-10-07 12:25 cacique 阅读(14053) 评论(7) 推荐(3) 编辑
Copyright ©2011 Goodspeed Cheng