会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
黄聪
论SEO对人类的重要性,请看我的博客:hcsem.com
博客园
::
首页
::
博问
::
闪存
::
新随笔
::
联系
::
订阅
::
管理
::
公告
2012年12月13日
黄聪:WordPress下如何获取当前page页或者single文章页的别名
摘要: 一句话:$post_data = get_post($post->ID, ARRAY_A);$slug = $post_data['post_name'];echo $slug;
阅读全文
posted @ 2012-12-13 14:58 黄聪
阅读(729)
评论(0)
推荐(0)
黄聪:IE6下css大bug:文字神秘消失,鼠标选择了才出现
摘要: 解决办法:给文字所在的div或者容器加上 float:left; 属性
阅读全文
posted @ 2012-12-13 14:37 黄聪
阅读(280)
评论(0)
推荐(0)
黄聪:python中defaultdict标准字典的使用
摘要: #!python# encoding: utf-8import collectionsdef default_factory(): return 'default value'd=collections.defaultdict(default_factory,foo='bar',ok='ok')print 'd:',dprint 'foo=>',d['foo']print 'ok=>',d['ok']print 'bar=&
阅读全文
posted @ 2012-12-13 00:37 黄聪
阅读(3292)
评论(0)
推荐(0)
黄聪:python控制台无法正常显示中文字符串解决方法
摘要: #!python# encoding: utf-8s = "哈哈"ss = u'哈哈'print s.decode('utf-8').encode('gbk')print ss.encode('gbk')
阅读全文
posted @ 2012-12-13 00:20 黄聪
阅读(1112)
评论(0)
推荐(0)