#include
#include
#include
#include
#include
#include
#include
#include "elf.h"
#define FALSE 0
#define TURE 1
#define MAX_SIZE 52
#define Elf_Ehdr Elf64_Ehdr
int OpenElf(char *fi...
分类:
其他好文 时间:
2014-09-12 08:55:13
阅读次数:
258
shell中集中语句的总结:if语句:但分支的if语句:if[];thencmd;fi双分支的if语句:if[];thencmd1;elsecmd2;fi多分支的if语句:if[];thencmd1;elif[];thencmd2;elif[];thencmd3;...elsecmd;ficase语句:case$变量名称in条件1)cmd1;;条件2)cmd2;;*)cmd;;esacwhile语句..
分类:
其他好文 时间:
2014-09-12 02:30:13
阅读次数:
257
/*删除数组中的重复元素,并返回去重的数组*/function delRepeatNum(arr){ var result = []; var middleObj = {}; var temp; for(var i = 0; i < arr.length; i++){ ...
分类:
其他好文 时间:
2014-09-11 19:04:02
阅读次数:
143
Caused by: java.lang.IllegalArgumentException: java.lang.RuntimeException: Error parsing Mapper XML. Cause: java.lang.IllegalArgumentException: Result Maps collection already contains value for com...
分类:
其他好文 时间:
2014-09-11 17:36:52
阅读次数:
262
virm.sh
#!/bin/bash
##linux删除
huishou=~/.temp
(($#==0))&&{echo"Noparaments!";exit1;}
if[!-d$huishou];then
mkdir$huishou
fi
foriin$*
do
iftest-e$i
then
cd$(dirname$i)
mv-f$(basename$i)$huishou/$(find$(pwd)-maxdepth1-name$(basename$i)|tr"/""=")
cd-
..
分类:
系统相关 时间:
2014-09-11 11:22:24
阅读次数:
401
查询符合条件的第一个文档(对于mongo来说不能叫记录了)db.COLLECTION_NAME.findOne({},{}); 查询符合条件的文档,并按照指定条件排序,跳过前面N1个文档,返回最多数量为N2的文档列表sort skip limit三个函数可选db.COLLECTION_NAME.fi...
分类:
数据库 时间:
2014-09-11 09:30:51
阅读次数:
344
1 public class Solution { 2 public List getRow(int rowIndex) { 3 List result = new ArrayList(); 4 for (int i=0; i=0; j--) { 6 ...
分类:
其他好文 时间:
2014-09-10 21:02:51
阅读次数:
180
本系列作为Effective JavaScript的读书笔记。
所谓的即时调用的函数表达式,这个翻译也许不太准确,它对应的英文原文是Immediately Invoked Function Expression (IIFE)。下文也使用IIFE来表达这一概念。
首先看一个程序:
function wrapElements(a) {
var result = [], i,...
分类:
编程语言 时间:
2014-09-10 19:31:59
阅读次数:
211
1, 在uboot记录命令的运行时间,可以打开CONFIG_CMD_TIME。
2, autoscr已经改变成了source命令,可以打开CONFIG_SOURCE,source可以执行内存中脚本,该脚本是由mkimage生成的。
#!/bin/sh
file=$1
result=$2
if [ $# -lt 1 ]
then
echo "$0 file_name result...
分类:
其他好文 时间:
2014-09-10 17:45:30
阅读次数:
162
本文来自论文:Paxos Made Practical
Paxos在实现上有三步:
1)proposer S1 选择一个提案编号n,这个编号要包含提议者机器的唯一标识,这样两个不同的机器就不会有相同的提案编号。proposer将信息PREPARE(n)广播出去。收到这个信息的机器会要么拒绝(已经收到大于n的PREPARE信息),要么回复PREPARE-RESULT(n', v')(...
分类:
其他好文 时间:
2014-09-10 06:14:00
阅读次数:
156