上一页 1 2 3 4 5 6 ··· 12 下一页
摘要: 经过这几轮笔试,发现智力题就那么10多20道,所以慢慢收集了一下。、分布转自:http://blog.csdn.net/randyjiawenjie/article/details/6752098http://www.cnrencai.com/maishishiti/19163.html感谢分享!有1000瓶药物,但是其中有一瓶是有毒的,小白鼠吃了一个星期以后就会死掉!请问,在一个星期内找出有毒的药物,最少需要多少只小白鼠?解答:用二进制的思路去思考,1000瓶药代表了1000种状态,那么1000用二进制表示可以用一个10位的二进制数就可以全部表示出来,考虑用十只白鼠来试验,用0和1代表它们最 阅读全文
posted @ 2014-03-31 09:23 yutoulck 阅读(2329) 评论(0) 推荐(0) 编辑
摘要: 阅读:http://developer.android.com/training/load-data-background/setup-loader.htmlhttp://developer.android.com/training/load-data-background/handle-results.html首先,要实现LoaderManager.LoaderCallbacks。实现该接口的onCreateLoader、onLoadFinished、onLoaderReset。onCreateLoader要返回一个LOADER,官方代码如下:/** Callback that's 阅读全文
posted @ 2014-03-25 10:44 yutoulck 阅读(472) 评论(0) 推荐(0) 编辑
摘要: mQueue = Volley.newRequestQueue(getApplicationContext()); //StringRequest四个构造参数分别是Request类型,url,网络请求响应监听器,错误监听器 mQueue.add(new StringRequest(Method.GET, "http://www.baidu.com/", new Listener(){ @Override public void onResponse(String arg0) { // TODO... 阅读全文
posted @ 2014-03-24 19:59 yutoulck 阅读(738) 评论(0) 推荐(0) 编辑
摘要: Loaders,获取数据的东西。总体流程是:通过getLoaderManager().initLoader(0,null,this)获得Loader,如果没有,那么就会调用接口函数获取,注意:有ID,所以要在获取的接口函数里进行相应的选择。会自动更新数据;一个主要依赖Activity或者Fragme... 阅读全文
posted @ 2014-03-23 17:09 yutoulck 阅读(268) 评论(0) 推荐(0) 编辑
摘要: 比起property animation ,View就简单得多了。它提供了大部分的功能,而关于动画的定义,可以是XML或者是CODE,XML移植性较好。XML的标签可以是, , , ,或者是包含起来的, , , 。主要需要注意的是,他的动画可以是同时或者是按顺序来的,只需要在XML里面的startOffset做好设置即可,同时,对于数字的变换(例如直线、二次函数变化等)可以通过interpolator属性来设置。在代码中引用XML动画:ImageView spaceshipImage = (ImageView) findViewById(R.id.spaceshipImage);Animati 阅读全文
posted @ 2014-03-22 13:32 yutoulck 阅读(194) 评论(0) 推荐(0) 编辑
摘要: The view animation system provides the capability to only animate View objects, so if you wanted to animate non-View objects, you have to implement your own code to do so. The view animation system is also constrained in the fact that it only exposes a few aspects of a View object to animate, such a 阅读全文
posted @ 2014-03-22 12:02 yutoulck 阅读(247) 评论(0) 推荐(0) 编辑
摘要: DPI是每英寸点数。DP单位用于布局排版。记住下面的规范。example:关于字体的颜色和大小。注意字体大小使用sp单位。颜色的推荐:http://developer.android.com/design/style/color.html对于图标的使用,也是很有讲究的,切记不可乱用。http://developer.android.com/design/style/iconography.html 阅读全文
posted @ 2014-03-21 13:15 yutoulck 阅读(232) 评论(0) 推荐(0) 编辑
摘要: #include #include xp(int num[], int n){ int min; int temp; int i; int j; for (i = 0; i num[j]){ min = j; } } temp = num[min]; num[min] = num[i]; num[i] = temp; }}main(){ int i; int num[] = {1, -2, 3, 10, -4, 7, 2, -5}; ... 阅读全文
posted @ 2014-03-20 09:56 yutoulck 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 拆分技术主要用于将一个链表分开,或者是按照一定的规律排列完再合并为一条链表。下面是最简单的一种a,b成对出现#include #include typedef struct Node{ int content; struct Node* next;}LNode;init(LNode** head){ *head = (LNode*)malloc(sizeof(LNode)); (*head)->content = 0; (*head)->next = NULL;}insert(LNode* head, int num){ LNode* newNode = (... 阅读全文
posted @ 2014-03-18 15:21 yutoulck 阅读(285) 评论(0) 推荐(0) 编辑
摘要: #include #include find(int num[], int n){ int max; int maxX; int i; int temp; int tempX; tempX = 0; temp = 1; max = 0; maxX = 0; for (i = 1; i max){ max = temp; maxX = tempX; } temp = 1; tempX = i; }... 阅读全文
posted @ 2014-03-18 14:21 yutoulck 阅读(133) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 12 下一页