码迷,mamicode.com
首页 >  
搜索关键字:add binary    ( 48151个结果
新版eclipse编写Android 时经常报的错误 -support-v7
一。.和以往一样新建完一个Android项目之后,会报android.support.v4.。。。或者V7找不到的错误。   这是因为这两个包在另一个附带的项目(android-support-v7-appcompat)下。 解决办法:右键你刚才建 的项目〉Properties>Android 在下边 点Add  然后把android-support-v7-appcompat添加上就好...
分类:移动开发   时间:2014-05-18 18:30:05    阅读次数:204
分析java.lang.NullPointerException thrown in RelativeLayout measure()
不难看出,在RelativeLayout被add/attach到父View之前mLayoutParams成员为空,调用measure方法将导致上图标注处代码抛出空指针异常。 解决方案有两种 a) 在measure之前显式设置LayoutParams(代表着对父View的Layout请求,必须是父View的内部LayoutParams类型) b) 自动设置LayoutParams的inflate方式...
分类:编程语言   时间:2014-05-18 18:26:17    阅读次数:576
求树的最大路径和
求树的最大路径和(Binary Tree Maximum Path Sum)...
分类:其他好文   时间:2014-05-18 18:25:41    阅读次数:235
LeetCode--Binary Tree Level Order Traversal
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
Android批量添加联系人到通讯录
由于工作上的需要,把数据库中备份的联系人添加到通讯录,一般都有几百条记录,插入一条数据系统默认commit一次,这样效率就降低了,如果把所有的数据都添加进去后再commit效率就不一样,这就需要事务 没有添加事务的方法,每次添加一条记录 /** * 单条添加数据 * * @param contacts * @return */ public boolean add(T...
分类:移动开发   时间:2014-05-18 07:03:31    阅读次数:629
对Socket CAN的理解(4)——【Socket CAN接收数据流程】
现在我们来分析一下CAN总线的接收数据流程,对于网络设备,数据接收大体上采用中断+NAPI机制进行数据的接收。同样,我们现在的CAN模块也是采用同样的方式进行数据的接收。由于我们只针对CAN总线接收数据这条主线进行分析。因些,会忽略一些针对CAN协议的设置及初始化等相关代码。 在初始化CAN设备时,我们需要给CAN设备分配NAPI功能。我们通过netif_napi_add()函数将CAN设备添加到NAPI机制列表中。...
分类:其他好文   时间:2014-05-18 06:13:15    阅读次数:317
编写.ini文件
from ConfigParser import RawConfigParser as rcp if __name__ == "__main__": cfg = rcp() cfg.add_section("Info") cfg.set("Info", "ImagePath", "f:/whu") cfg.set("Info", "foo", "cd'...
分类:其他好文   时间:2014-05-18 05:58:51    阅读次数:284
使用时间类处理时间问题
定义一个时间类 class Time//时间类 { public: void set_time( );//设置时间 void show_time( );//显示时间 int add_a_sec();//增加1秒 int add_a_minute();//增加1分钟 int add_a_hour();//增加1个小时 int add_seconds(int n);//增...
分类:其他好文   时间:2014-05-18 04:33:46    阅读次数:294
在fragment中显示对话框出现异常
异常类型为:android.view.WindowManager$BadTokenException: Unable to add window 我在fragment中public View onCreateView(LayoutInflater inflater, ViewGroup container,Bundle savedInstanceState) {中试图调用对话框静态工...
分类:其他好文   时间:2014-05-18 04:27:35    阅读次数:240
leetcode -day17 Path Sum I II & Flatten Binary Tree to Linked List & Minimum Depth of Binary Tree
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!