Provider的不常见访问方式 Batch access:访问ContentProvider的一中模式,使用该模式可以同时对provider进行多个操作,且支持同时操作多个表。使用时首先构建一个ContentProviderOperation序列,然后使用ContentResolver.apply ...
分类:
移动开发 时间:
2016-11-27 20:11:57
阅读次数:
265
The gray code is a binary numeral system where two successive values differ in only one bit. Given a non-negative integer n representing the total num ...
分类:
其他好文 时间:
2016-11-27 08:04:25
阅读次数:
188
转自:http://apfelmus.nfshost.com/articles/monoid-fingertree.html This post grew out of the big monoid discussion on the haskell-cafe mailing list. Intro ...
分类:
其他好文 时间:
2016-11-27 07:14:52
阅读次数:
322
基本数据类型对象包装类:是按照面向对象思想将基本数据类型封装成了对象。 好处: 1:可以通过对象中的属性和行为操作基本数据。 2:可以实现基本数据类型和字符串之间的转换。 关键字 对应的类名 byte Byte short Short paserShort(numstring); int Integ ...
分类:
其他好文 时间:
2016-11-26 23:37:34
阅读次数:
273
题意:二叉树的根节点为(1,1),对每个结点(a,b)其左结点为 (a + b, b) ,其右结点为 (a, a + b),已知某结点坐标,求根节点到该节点向左和向右走的次数。 分析:往回一步一步走肯定超时,不过如果a>b,大的有点多,就没必要一步一步走,直接a/b就好了,然后把a变成a%b取余,那 ...
分类:
其他好文 时间:
2016-11-26 20:45:00
阅读次数:
137
1.案例: 通过record类型处理一行多列的数据 复合变量--record 记录类型record:在一个变量中可以存储多个区域,每个区域可以是一个标量、记录或table (用于处理一行多列的信息) 2.通过%rowtype处理一行数据 3.案例:通过table类型变量处理一列多行的数据table ...
分类:
数据库 时间:
2016-11-26 17:00:00
阅读次数:
218
题目就是给出一棵二叉搜索树,已知根节点为0,并且给出一个序列要插入到这课二叉树中,求这棵二叉树层次遍历后的序列。 用结构体建立节点,val表示该节点存储的值,left指向左孩子,right指向右孩子。中序遍历的顺序正好是序列从小到大的顺序,因此中序遍历的时候顺便赋值就可以了,最后层次遍历输出。 思路 ...
分类:
其他好文 时间:
2016-11-25 19:36:29
阅读次数:
169
One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node's value. If it is a null node, ...
分类:
其他好文 时间:
2016-11-25 06:56:48
阅读次数:
158
我的binary Search 解法:无需变成long 别人三种方法总结: ...
分类:
其他好文 时间:
2016-11-24 14:23:19
阅读次数:
129
REPLACE用第三个表达式替换第一个字符串表达式中出现的所有第二个给定字符串表达式。 语法REPLACE ( ''string_replace1'' , ''string_replace2'' , ''string_replace3'' ) 参数''string_replace1'' 待搜索的字符 ...
分类:
数据库 时间:
2016-11-24 11:16:39
阅读次数:
207