上一页 1 ··· 6 7 8 9 10 11 12 下一页
摘要: 阅读:http://blog.csdn.net/v_july_v/article/details/7382693 1、海量日志数据,提取出某日访问百度次数最多的那个IP。 对于该问题文字只是大概给了思路,接下来则是本人进一步思考结果: 具体而论,则是: “首先是这一天,并且是访问百度的日志中的IP取出来,逐个写入到一个大文件中。注意到IP是32位的,最多有个2^32个IP。同样可以采用映射的方 法,比如模1000,把整个大文件映射为1000个小文件,再找出每个小文中出现频率最大的IP(可以采用hash_map对那1000个文件中的所有 IP进行频率统计,然后依次找出各个文件中频率最大... 阅读全文
posted @ 2013-10-23 11:17 yutoulck 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 阅读:http://developer.android.com/guide/topics/providers/content-providers.htmlWhen you want to access data in a content provider, you use the ContentRe... 阅读全文
posted @ 2013-10-22 16:13 yutoulck 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 阅读:http://developer.android.com/guide/components/bound-services.htmlA bound service is an implementation of theServiceclass that allows other applications to bind to it and interact with it. To provide binding for a service, you must implement theonBind()callback method. This method returns anIBinde 阅读全文
posted @ 2013-10-21 22:14 yutoulck 阅读(217) 评论(0) 推荐(0) 编辑
摘要: 阅读:http://developer.android.com/guide/components/services.htmlServices是一个长时间操作而且不提供界面的组件。程序里其他的组件都能够启动它并且就算用户切换了其他的程序,Services也仍然运行着。StartedA service is "started" when an application component (such as an activity) starts it by callingstartService(). Once started, a service can run in the 阅读全文
posted @ 2013-10-20 22:10 yutoulck 阅读(372) 评论(0) 推荐(0) 编辑
摘要: 阅读:http://developer.android.com/guide/components/tasks-and-back-stack.htmlandroid通过Task来实现尽管调用了不同程序的Activity但是却让你有一种其他程序的Activity是当前程序的一部分(例如发邮件例子)。Task就是用户在执行某个任务时各种Activity的集合。The device Home screen is the starting place for most tasks. When the user touches an icon in the application launcher (or 阅读全文
posted @ 2013-10-20 13:00 yutoulck 阅读(234) 评论(0) 推荐(0) 编辑
摘要: 阅读:http://developer.android.com/guide/components/fragments.htmlA fragment must always be embedded in an activity and the fragment's lifecycle is directly affected by the host activity's lifecycle. For example, when the activity is paused, so are all fragments in it, and when the activity is 阅读全文
posted @ 2013-10-19 22:19 yutoulck 阅读(434) 评论(0) 推荐(0) 编辑
摘要: 阅读:http://developer.android.com/guide/components/activities.htmlAn application usually consists of multiple activities that are loosely bound to each other. Typically, one activity in an application is specified as the "main" activity, which is presented to the user when launching the appl 阅读全文
posted @ 2013-10-19 17:19 yutoulck 阅读(617) 评论(0) 推荐(0) 编辑
摘要: 阅读:http://developer.android.com/guide/components/fundamentals.htmlWhen the system starts a component, it starts the process for that application (if it's not already running) and instantiates the classes needed for the component. For example, if your application starts the activity in the camera 阅读全文
posted @ 2013-10-19 15:57 yutoulck 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 2013.12.01更新阅读:http://www.zhihu.com/question/21074979从su说起。SU:( Switch user切换用户),用户通过该命令可进行用户切换,该文件一般位于/system/bin或者/system/xbin/目录下,拥有者和群组均为ROOT。Linux下su以后输入密码就可以root了,但Android里的su和Linux里的su是不一样的,Android里的su不是靠验证密码的,而是看你原来的权限是什么。意思就是如果你是root,那你可以通过su切换到别的用户,比如说shell,wifi,audio什么的。但如果你是root之外的其他用户,就 阅读全文
posted @ 2013-10-19 11:33 yutoulck 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 题目:有一个桶,里面有白球、黑球各100个,人们必须按照以下的规则把球取出来:1、每次从桶里面拿出来两个球;2、如果是两个同色的球,就再放入一个黑球;3、如果是两个异色的球,就再放入一个白球;问:最后桶里面只剩下一个黑球的概率是多少?思路1:找规律 使用(黑球个数, 白球个数)来表示桶中黑球和白球的个数变动,正数表示增加,负数表示减少,根据规则找规律:1、如果每次从桶里面拿出两个白球,则应放入一个黑球:(0, -2) + (1, 0) = (1, -2);2、如果每次从桶里面拿出两个黑球,则应放入一个黑球:(-2, 0) + (1, 0) = (-1, 0);3、如果每次从桶里面拿出一个白球和 阅读全文
posted @ 2013-09-26 20:19 yutoulck 阅读(1034) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 下一页