这篇对应的是习题39 字典, 可爱的字典
#encoding:utf-8
#列表与字典的区别
#列表
thing = ['name',1,'age','AD','sex']
print thing[1]
#print thing['name'] #会报错,列表只能通过整数去访问:TypeError: list indices must be integers, not str
stuff...
分类:
编程语言 时间:
2014-05-07 06:00:20
阅读次数:
365
为了方便说明和更加直观的展示jquerymobile的页面初始化过程以及各个事件的触发过程,我绘制了一幅流程图:图中用红色框圈起来的是界面中的事件,测试代码如下:
练习
<meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=0;...
分类:
移动开发 时间:
2014-05-07 04:40:07
阅读次数:
450
Beaming NDEF Messages to Other Devices
Android Beam allows simple peer-to-peer data exchange between two Android-powered devices. The application that wants to beam data to another device must be in ...
分类:
移动开发 时间:
2014-05-06 23:21:48
阅读次数:
620
1、
??
Candy
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
Each child must h...
分类:
其他好文 时间:
2014-05-06 22:41:02
阅读次数:
427
1、权表介绍
(1)、user表包括了3个字段:Host,User,Password分别表示:主机名、用户名、密码
(2)、db表包括了3个字段:Host,DbUser,分别表示:主机名数据库名和用户名
(3)、host表包括了2个字段:Host,Db,
2、创建和删除普用户
(1)、新建一个普通用户
语法:createuser‘用户名..
分类:
数据库 时间:
2014-05-06 20:27:29
阅读次数:
424
#servicemysqlstop#servicemysqlstart--skip-grant-tables//跳过授权表启动MySQL服务程序#mysql-uroot//不需要密码登录mysql>updatemysql.usersetpassword=password(‘123456‘)wherehost="localhost";//通过修改mysql库中user表的相关记录重置密码QueryOK,0rowsaffected(0.38..
分类:
数据库 时间:
2014-05-06 16:52:46
阅读次数:
439
将文件的每行读取到字典中文件每行内容格式为:cui:123456789f=open(‘user.txt‘)
d=f.readlines()
f.close()
mydict={}
foriind:
user=i.split(‘:‘)[0]
info=i.split(‘:‘)[1].rstrip()
mydict[user]=info
分类:
编程语言 时间:
2014-05-06 16:40:26
阅读次数:
362
一直有关注CSLA框架,最近闲来无事,折腾了下,在最新的r3054版本基础上修改了一些东西,以备自己用,有兴趣的园友可以下载共同研究1、添加了默认的授权规则如果是列表对象则生成列表权限,User的只读列表和可编辑列表生成的都是User.List权限,admin角色具有所有权限:public
part...
分类:
其他好文 时间:
2014-05-06 13:59:19
阅读次数:
719
1、修改boot.properties,将usernmae和password重设为明文,如:password=weblogicusername=weblogic2、将domain下\servers\AdminServer\data\ldap下的文件和目录都删除。3、重启weblogic即可。
分类:
Web程序 时间:
2014-05-06 12:39:00
阅读次数:
303
现象:html中可能有些地方不想让用户复制文字,或是用a标签做了个点击按钮,点快的时候文字会被选中,很丑,这个时候可以使用下面的方案禁止文字选中。原因:鼠标点快了。解决方案:不同的浏览器设置的内容不一样,user-select不是一个W3C的标准,浏览器的支持不完成,需要对不同的浏览器进行调整。bo...
分类:
Web程序 时间:
2014-05-06 10:07:04
阅读次数:
546