码迷,mamicode.com
首页 > 其他好文
fragment hide/show 生命周期
Fragment的使用越来越普遍了,掌握它的生命周期以及注意事项时非常有必要的,首先 All subclasses of Fragment must include a public empty constructor. The framework will often re-instantiate a fragment class when needed, in particular duri...
分类:其他好文   时间:2014-11-23 17:37:26    阅读次数:223
Vertica中断会话
在Vertica的使用过程中经常会碰到在执行了一个耗时的查询的时候希望强行结束或者说中断这一操作,此时可以通过Vertica提供的INTERRUPT_STATEMENT()功能来解决这类问题,INTERRUPT_STATEMENT需要两个参数,第一个参数是session_id,第二个参数是statement_id,这两个参数都可有从sessions表里获得。首先从sessions表里查出需要结束的...
分类:其他好文   时间:2014-11-23 17:34:58    阅读次数:220
数据结构 - 选首领(C)
/* ChiefElection.c - by Chimomo */ /* 选首领。N个游戏者围成一圈,从第一个人开始顺序报数1,2,3。凡报到3者退出圈子,最后留在圈子里的人为首领。 */ #include #include typedef struct node { /* 游戏者的编号 */ int code; struct node * next; } NO...
分类:其他好文   时间:2014-11-23 17:34:26    阅读次数:236
如何正确地使用vfork():简析vfork()与fork()的不同
vfork是一个比较特别的系统调用,它与fork之间有一些微妙的区别。...
分类:其他好文   时间:2014-11-23 17:36:33    阅读次数:230
【LeetCode】Flatten Binary Tree to Linked List 解题报告
【题目】 Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / 2 5 / \ 3 4 6 The flattened tree should look like:...
分类:其他好文   时间:2014-11-23 17:35:12    阅读次数:131
HDU1575 Tr A 【矩阵快速幂】
Tr A Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3018    Accepted Submission(s): 2249 Problem Description A为一个方阵,则Tr A表示A的迹(就是主...
分类:其他好文   时间:2014-11-23 17:36:19    阅读次数:162
mahout向量
mahout三种向量: 在mahout中,向量被实现为三个不同的类,每个类都是针对不同场景优化的:DenseVector、RandomAccessSparseVector和SequentialAccessSparseVector。 1、DenseVector可被视为一个double型数组,其大小为数据中的特征个数。因为不管数组的元素之是不是0,数组中所有元素都被预先分配了空间。我们称之为密集的...
分类:其他好文   时间:2014-11-23 17:34:29    阅读次数:181
POJ 2378 Tree Cutting(树形DP)
Description After Farmer John realized that Bessie had installed a "tree-shaped" network among his N (1 Bessie, feeling vindictive, decided to sabotage Farmer John's network by cutting power to...
分类:其他好文   时间:2014-11-23 17:35:43    阅读次数:190
【LeetCode】Path Sum II 解题报告
【题目】 Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example: Given the below binary tree and sum = 22, 5 ...
分类:其他好文   时间:2014-11-23 17:34:18    阅读次数:163
Jenkins分布式构建
Jenkins分布式构建(Jenkins Distributed builds) 前言: 当自动化测试用例需要在多个PC机或虚拟机中执行时,如果在每个虚拟机中均搭建类似tomcat+jenkins的环境,将会造成例如每台虚拟机资源占用大、对环境的配置维护成本大等弊端,此时,就可以采用Jenkins分布式构建方式了。 一、Jenkins节点配置 1.Master配置 1)进入Maste...
分类:其他好文   时间:2014-11-23 17:34:43    阅读次数:294
转:zip 和 unzip 的参数说明
收集的资料: 1. 我想把一个文件abc.txt和一个目录dir1压缩成为yasuo.zip: # zip -r yasuo.zip abc.txt dir1 2.我下载了一个yasuo.zip文件,想解压缩: # unzip yasuo.zip 3.我当前目录下有abc1.zip,abc2.zip...
分类:其他好文   时间:2014-11-23 17:32:50    阅读次数:176
在CentOS上安装Git
CentOS的yum源中没有git,只能自己编译安装,现在记录下编译安装的内容,留给自己备忘。确保已安装了依赖的包yum install curlyum install curl-develyum install zlib-develyum install openssl-develyum inst...
分类:其他好文   时间:2014-11-23 17:33:29    阅读次数:145
Nginx开启Gzip压缩
1、Vim打开Nginx配置文件vim/usr/local/nginx/conf/nginx.conf2、找到如下一段,进行修改gzip on;gzip_min_length 1k;gzip_buffers 4 16k;#gzip_http_version 1.0;gzip_comp_level 2...
分类:其他好文   时间:2014-11-23 17:32:40    阅读次数:193
LeetCode: ZigZag Conversion 解题报告
ZigZag ConversionThe string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern...
分类:其他好文   时间:2014-11-23 17:30:46    阅读次数:289
OpenCV Tutorials —— Back Projection
反向投影 一种记录给定图像中的像素点如何适应直方图模型像素分布的方式。 反向投影就是首先计算某一特征的直方图模型,然后使用模型去寻找图像中存在的该特征。 backproject是直接取直方图中的值,即以灰度为例,某种灰度值在整幅图像中所占面积越大,其在直方图中的值越大,backproject时,其对...
分类:其他好文   时间:2014-11-23 17:32:36    阅读次数:362
虚拟机安装小记
在win7上安装一个xp的虚拟机,就有ie6了 =。=http://jingyan.baidu.com/article/90895e0f95a07564ec6b0bc7.html此教程较为详尽,但仍有几个步骤需注意1.下载vmware workstation,同时下载xp的ios镜像文件。我们通常会...
分类:其他好文   时间:2014-11-23 17:29:46    阅读次数:143
Jump Game
Dynamic Programming参考:http://fisherlei.blogspot.com/2012/12/leetcode-jump-game.htmlhttp://blog.csdn.net/linhuanmars/article/details/21354751Given an a...
分类:其他好文   时间:2014-11-23 17:31:04    阅读次数:150
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!