码迷,mamicode.com
首页 > 其他好文
Guava中TreeRangeMap结构简析
TreeRangeMap结构简介,简要介绍put方法和remove方法...
分类:其他好文   时间:2015-08-03 19:18:50    阅读次数:229
Log日志打印集合类型
看到Logger可以打印json,当时就想能不能打印集合呢,现在通过学习了一些反射的东西,写了出来,仅供参考。 Log日志打印集合类型public static void list(List list) { if (IS_DDEBUG) { if (list == null || list.size() == 0) {...
分类:其他好文   时间:2015-08-03 19:18:33    阅读次数:534
百度导航
SDK组成 百度iOS导航SDK由四部分组成:baiduNaviSDK.bundle资源包,libbaiduNaviSDK.a静态库,头文件,BaiduStatistics。baiduNaviSDK.bundle资源包由导航所需的配置数据、基础数据,以及导航功能所需的图片资源组成。libbaiduNaviSDK.a静态库,提供导航功能、线径规划、巡航等功能。头文件是libbaiduNaviS...
分类:其他好文   时间:2015-08-03 19:15:39    阅读次数:173
scanf("%s",s);语句输入
1.代码: #include #include using namespace std; int main() { char s[1000]; while(scanf("%s",s)==1) { printf("%s\n",s); int len=strlen(s); printf("%d\n",len); ...
分类:其他好文   时间:2015-08-03 19:15:46    阅读次数:124
内存(堆)的动态申请和释放
两个函数:malloc和free 需要头文件:stdlib.h void *malloc(size_t size); void free(void *ptr); 需要说明的是: 申请: 1)。参数是申请内存的字节数。 2)。申请的是一块连续的内存。 3)。返回值是void *类型,因此,要将他的返回值付给一个指针的时候,一定要类型转换。 释放: 1)。参数是...
分类:其他好文   时间:2015-08-03 19:14:11    阅读次数:98
leetcode-232-Implement Queue using Stacks
Implement Queue using Stacks   Implement the following operations of a queue using stacks. push(x) -- Push element x to the back of queue.pop() -- Removes the element from in front of queue.pe...
分类:其他好文   时间:2015-08-03 19:14:35    阅读次数:133
lintcode Recover Rotated Sorted Array
Given a rotated sorted array, recover it to sorted array in-place. Have you met this question in a real interview?  Yes Example [4, 5, 1, 2, 3] -> [1, 2, 3, 4, 5] Challenge ...
分类:其他好文   时间:2015-08-03 19:14:31    阅读次数:160
HDU4101 Ali and Baba (bfs+dfs+博弈)
题意: Ali 和Baba玩游戏,游戏是在给出的一个n*m的图中,有且仅有一个宝藏(-1)表示,图中其他位置可能是空地(0表示),也可能是石头(石头的HP用一个正数表示)。二人轮流,每次游戏开始都是Ali先手,选手可以攻击石头,每次可以让石头HP减少一。问Ali是否可以胜利。 开始时,直接BFS 宝藏能扩展的最大的面积,因为面对都是1包围的-1 ,这个是必败态。但是WA了;然后想了很久,想到,可能...
分类:其他好文   时间:2015-08-03 19:15:21    阅读次数:141
远程调试
1、adb shell netcfg guoqifa@guoqifa:~$ adb shell netcfg wlan0 UP 172.29.107.21/21 0x00001043 00:08:22:7e:a1:fe tunl0 DOWN 0.0.0...
分类:其他好文   时间:2015-08-03 19:14:03    阅读次数:151
hive中udf读写hbase
在大数据开发过程中经常会遇到,将hive中处理后的结果写入hbase中,每次都要写java程序会非常浪费时间,我们就想了一个办法 ,用hive的udf来实现。 只需要调用同一个udf,将表名字段名以及每一个字段的值作为udf的参数,就可以实现写hbase了。 这样大大的节省了开发时间,提升了开发效率。 大家可以按照这种思路写自己需要的功能。这里只简单的列举几个供大家参考,具体操作如下:一、依赖的ja...
分类:其他好文   时间:2015-08-03 19:13:59    阅读次数:256
pconline注册页面很诡异的一堆请求
今天偶然发现pconline很诡异的一个现象 他的注册地址http://my.pconline.com.cn/passport/register.jsp 我用burp suite挂上后,发现一堆莫名其妙的请求出去了 啥都有qq的,baidu的,很明显是在耍广告数据(其中qq的有的参数里还带adbXXXX.... 尝试联系qq的管家?不知道了) 诡异的事情来了, 我用firefox+f...
分类:其他好文   时间:2015-08-03 19:11:52    阅读次数:156
BUPT Summer Training #7 for Grade 14 题解
A. CodeForces 396C 题意就不描述啦。 对于第一种操作 1 v x k,我们可以给v的子树全部加上(x+depth[v]*k)的值。 对于第二种操作 2 v。查询每个节点的值之后,只需要在减去depth[v]*K即可得到答案了。里面的K是对v这个节点有影响的k的和。 自己在纸上推推公式,很容易就能知道为何是对的了 这里用两个树状数组即可维护, 当然增加整棵子树的操作...
分类:其他好文   时间:2015-08-03 19:13:38    阅读次数:136
hdoj-1171-Big Event in HDU【动态规划】
Big Event in HDU Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 28852 Accepted Submission(s): 10143 Problem Description Nowadays, we all...
分类:其他好文   时间:2015-08-03 19:11:10    阅读次数:120
block 页面传值
Block 传值   .h   typedef void(^CountBlock)(NSIntegerfigure); -(void)CountWithFigureBlock:(CountBlock)figureBlock;                          .m      CountBlock cBlock;  #pragma mark - 块传值调用的方法...
分类:其他好文   时间:2015-08-03 19:11:06    阅读次数:100
URAL 1900. Brainwashing Device(dp+输出路径)
1900. Brainwashing Device Time limit: 1.0 second Memory limit: 64 MB While some people travel in space from planet to planet and discover new worlds, the others who live on Earth still have...
分类:其他好文   时间:2015-08-03 19:11:55    阅读次数:369
leetcode-225-Implement Stack using Queues
Implement Stack using Queues    Implement the following operations of a stack using queues. push(x) -- Push element x onto stack.pop() -- Removes the element on top of the stack.top() -- ...
分类:其他好文   时间:2015-08-03 19:13:06    阅读次数:150
N皇后问题 HDU 杭电2553【递归回溯】
Problem Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Input 共有若干行,每行一个正整数N≤10,表示棋盘和皇后的数量;如果N=0,表示结束。   Output 共有若干行,每行一个正整数...
分类:其他好文   时间:2015-08-03 19:11:38    阅读次数:126
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!