1.字典字典是python中唯一的映射类型,采用键值对(key-value)的形式存储数据。python对key进行哈希函数运算,根据计算的结果决定value的存储地址,所以字典是无序存储的,且key必须是可哈希的。可哈希表示key必须是不可变类型,如:数字、字符串、只含不可变类型元素的元组(1,2...
分类:
编程语言 时间:
2014-05-27 01:59:59
阅读次数:
422
下面是自定义Activity半透明的效果例子:res/values/styles.xml
res/values/color.xml #50000000注意:color.xml的#5000000前两位是透明的效果参数从00 到
ff(透明--不么透明),后6位是颜色的设置manifest.xmljav...
分类:
移动开发 时间:
2014-05-27 00:43:37
阅读次数:
340
在Android的日常开发中,相信大家都用过SharedPreferences来保存用户的某些settings值。Shared
Preferences以键值对的形式存储私有的原生类型数据,这里的私有的是指只对你自己的app可见的,也就是说别的app是无法访问到的。客户端代码为了使用它有2种方式,.....
分类:
移动开发 时间:
2014-05-19 18:19:23
阅读次数:
410
说明MapReduce是一种分布式计算模型,解决海量数据的计算问题,主要有Map和Reduce组成用户使用时需要实现map()和reduce()两个函数,两个函数的形参都是key/value键值对若以eclipse为开发环境,运行时出现内存不足的情况,需要修改虚拟机的参数
(例如把Default V...
分类:
其他好文 时间:
2014-05-19 11:56:18
阅读次数:
352
【题目】
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remain as it is.
You may not alter the values in the nodes, only n...
分类:
其他好文 时间:
2014-05-18 10:22:34
阅读次数:
367
Binary Tree Level Order Traversal
Total Accepted: 12441 Total
Submissions: 40879My Submissions
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left t...
分类:
其他好文 时间:
2014-05-18 10:11:13
阅读次数:
337
【题目】
Given a linked list, swap every two adjacent nodes and return its head.
For example,
Given 1->2->3->4, you should return the list as 2->1->4->3.
Your algorithm should use only constant space. You may not modify the values in the list, only nodes it...
分类:
其他好文 时间:
2014-05-18 08:37:57
阅读次数:
370
1、
??
Path Sum
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
For example:
Given the below...
分类:
其他好文 时间:
2014-05-18 03:25:06
阅读次数:
301
最近项目实在是太忙了~恩 此封装在一般使用频率不大的键值对应配置,
要复杂的结构还是要编写XML对应生成代码工具比较方便和高效 1 #pragma once 2 #include 3 #include 4 #include 5
#include 6 #include 7 ...
分类:
其他好文 时间:
2014-05-18 02:41:01
阅读次数:
245
1.生成key edit->preferences->license
Keys->generate 2.新建product license文件 3.新建Zend Guard项目文件 需要注意新建项目的第二项需要英文路径
4.在项目上按右键 选择configure 初始界面是 如果要用做授权,点击se...
分类:
其他好文 时间:
2014-05-18 01:31:21
阅读次数:
492