- 博客(53)
- 资源 (5)
- 收藏
- 关注
转载 GOOGLE学术搜索技巧
转自:http://www.cnblogs.com/edgarliang/articles/581279.html#_Hlk149730668第1招:关键词取之有道关键词的选择在搜索中起到决定性的作用,所有搜索技巧中,关键词选择是最基本也是最有效的,用特定的词语一下子可以找到目标资料。关键词可以是主题词、作者、会议、刊物、书名或者作品标题等。但有时候关键字不易确定,
2013-07-13 10:57:42
6058
原创 The notes of Algorithms ---- Dynamic Programming
Two key ingredients:#1 Optimal Substructure: If an optimal solution to the problem exhibits optimal solution to subproblems. Some common pattern: 1. You show that a so
2013-04-17 22:47:11
863
原创 The notes of Algorithms ---- Data Structures ---- Hash Table
Table S holding n records.One record structure is like this:struct{Key;Satellite data;}X, as a pointer, which point to one record.Operations- Insert(S,x); //S- Delete(S,x); //S
2013-04-15 16:11:31
1040
原创 The Program of Algorithms ------- Diveide and Conquer ---- Randomized-Select
Randomized-Select:Question:Given n elements in array, find the i-th smallest element.Navie Algorithm: Sort A and return A[i]. Best Time cost will be O(nlgn).Divide: Using the Quick Sort Rand
2013-04-14 15:11:40
824
原创 The Program of Algorithms ------- Sorting in Linear Time---- Bucket Sort
Bucket Sort:Bucket sort assumes that the input is generated by a random process that distributes elements uniformly and independently over the interval [0,1). That is to say, the input number shou
2013-04-13 15:54:35
831
原创 The Program of Algorithms ------- Sorting in Linear Time---- Counting Sort
Input: A[1...n], each 0Output: B[1...n] = sorting of AAuxiliary: C[1...k]Restricts: 1. each element little than a const "k"2. the element should be integer3. the range of the elements
2013-04-13 14:03:29
876
原创 The Program of Algorithms ------- Diveide and Conquer ---- Quicksort
Divide and Conquer: 1. Divide: Partition array into 2 subarrays around pivot, such that elements in lower subarray little than pivot, and upper subarray bigger than pivot. 2. Conquer: Recursive
2013-04-03 20:23:15
797
原创 The Program of Algorithms ------- Diveide and Conquer ---- Matrix Multiplication
Q:Input: A=[a_ij] B=[b_ij] i,d=1,2,3...nOutput: C=[c_ij]=A*B Naive Algorithm: Θ(n^3)Realization --- CPP:long int** NaiveMatrixMulitiple(long int** lhs,long int** rhs,long int size
2013-04-03 20:14:04
881
原创 The Program of Algorithms ------- Diveide and Conquer ---- Fibonacci
Definition: Fn = 0 if n==0 Fn = 1 if n==1 Fn = F_n-1 + F_n-2 if n
2013-04-03 19:58:00
936
原创 The Program of Algorithms ------- Diveide and Conquer ---- Powering a number
Q: given number x, and n>=0 compute x^n. Naive Algorithm: x*x*x*......*x=x^n Time:Θ(n)Divide and Conquer Algorithm: X^n=(X^2)^(n/2) if n is a
2013-04-03 19:43:27
972
原创 The Program of Algorithms ------- Diveide and Conquer ---- Merge Sort
Merge Sort:1. Divide: Divide the input array into two subarray(n/2 and n/2).2. Conquer: Recursively sort each subarray.3. Combine: Linear-Time merge. Running Time: T(n)=2T(n/2)+Θ(n).
2013-04-03 19:34:34
843
原创 The notes of Algorithms ---- Solving Recurrences
There are three solutions to solve the recurrences. Substitution method: 1. Guess the form of the solution 2. Verify by induction 3. Slove for constsRecursion-tr
2013-04-01 22:02:53
697
原创 The notes of Algorithms ---- Asymptotic Notation
O notation: O(g(n))={f(n): there exists consts c>0 no>0 such taht 0no} f(n)=O(g(n)) represents an anonymous function[f(n)] in that set[O(g(n))]. Ex1. f(n)=n^3+O(n^2) means there i
2013-04-01 20:57:50
804
原创 C++ 类中的引用成员变量
类成员引用。注意点:1.必须在初始化列表中指定。2.所指定的变量的生存期一定要长于改类的生存期。错误&正确例子:using namespace std;class classB;class classA{public: //classA(classB p); 错误例子 classA(classB& p); //正确使用 classB &a_obj;
2013-03-12 16:19:24
7068
原创 C++ 传递机制,自己总结(平台VS2010)
1.函数调用:栈指针esp,帧指针ebp 函数调用过程:push 参数2push 参数1call fun ;将下一条地址压栈push ebpmov ebp,esp 函数返回过程:mov eax,[ebp-0x04] ;返回值 放在eax中leaveret2.返回引用,与按值返回不要返回局部变量的引用:
2013-03-12 14:20:25
840
转载 APACHE 非ROOT用户
检查apache_error.log日志文件,发现有以下内容报错:ls: /home/xxxx/output/jk.shm*: 没有那个文件或目录(13)Permission denied: make_sock: could not bind to address [::]:80no listening sockets available, shutting downUnable
2012-08-29 16:29:17
1087
原创 C++ Operator——Choose method.
在运算符重载中,有友元函数重载和成员函数重载两类。当重载的运算符 左操作符 必须 是对象本身时,必须用成员函数重载。函数参数个数为该操作符操作数-1,传入的参数为“右”操作数。“左”操作数以this传入。例子:1: =、()、[ ]、->;2: +=、-+……;3: 一元操作符(++,--)。当重载的运算符 左操作数 可以 是其他类型(如进行强制转换,或
2012-08-29 10:21:28
830
转载 Find Any AT Command For iPhone Baseband Using My List
http://www.letsunlockiphone.com/iphone-at-baseband-command-list/#axzz24O2GhYudiPhone Baseband Ndrey Rivers 14.05.2012I think that the main part in iPhone is its baseband. Baseband
2012-08-24 00:14:24
1571
转载 如何破解软件机器码
转http://hi.baidu.com/888wangning/item/ae70b74712978dd0c1a59288破解基本知识一、机械码,又称机器码.ultraedit打开,编辑exe文件时你会看到许许多多的由0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F组成的数码,这些数码就是机器码.修改程序时必须通过修改
2012-08-23 09:22:48
19883
1
转载 破解软件
转载:http://gbuy.gdcvi.com/?ArticleID=19712手把手教你破解软件,每一步都有图示,你若再不会就太XX 软件破解的目的是:::有些需要注册的软件,可是找不到注册码,将其破解之后,输入任何注册码都会提示注册成功。声明:此贴适合从来没接触过软件破解或编程的同志学习,,,下面开始今天的破解,我要破解的软件:网络填表终结者破解需要的软件:侦
2012-08-23 09:04:08
2771
1
原创 设计模式——装饰模式
主要参考:《大话设计模式》注:例子也好,如何使用也好。都是个人理解,如有误差,请指出。装饰模式:概念:动态的给一个对象添加一些额外的职责,增加功能。用途:对于一些写好的类(主要行为,核心功能),需要新功能的时候,遵循“开放—封闭”原则,应尽量不像旧的类中添加新的代码。通过装饰模式把每个要装饰的功能放在单独的类中并让这个类包装它所要装饰的对象。(对某一核心功能的方法的扩充)例子:
2012-08-21 21:51:33
547
原创 设计模式——开放封闭与依赖倒置
主要参考:《大话设计模式》开放封闭:开放:面对新的需求应该能提供扩展,即对扩展是开放的。封闭:面对变化不要总去修改原有的类,即对更改是封闭的。方法:创建抽象类加以实现。新需求到来只需添加为抽象的子类。注意:拒绝不成熟的抽象。对频繁变化的部分做出抽象。依赖倒置:概念:依赖于抽象进行编程,不依赖与细节(实现)进行编程。(高层模块不依赖与低成模块,都依赖于抽象)例
2012-08-21 21:19:19
483
原创 设计模式——简单工厂+策略模式
主要参考:《大话设计模式》1.简单工厂模式:输入:对象特征(字符串)输出:对象方法:Factory,选取对象选取方式:利用switch选取对象。优点:客户不需要知道具体调用哪个对象,只需要知道使用该对象特征。弱点:封装性不够高,客户端须知道工厂与需操作对象(抽象类)两个类。2.策略模式:输入:需操作的对象输出:最终结果方法:Result,统一调用
2012-08-20 20:53:02
941
转载 设计模式—适配器模式—C++
http://blog.youkuaiyun.com/wuzhekai1985 软件领域中的设计模式为开发人员提供了一种使用专家设计经验的有效途径。设计模式中运用了面向对象编程语言的重要特性:封装、继承、多态,真正领悟设计模式的精髓是可能一个漫长的过程,需要大量实践经验的积累。最近看设计模式的书,对于每个模式,用C++写了个小例子,加深一下理解。主要参考《大话设计模式》和《设计模式:可
2012-08-16 10:51:02
484
转载 设计模式C++实现(2)——策略模式
http://blog.youkuaiyun.com/wuzhekai1985软件领域中的设计模式为开发人员提供了一种使用专家设计经验的有效途径。设计模式中运用了面向对象编程语言的重要特性:封装、继承、多态,真正领悟设计模式的精髓是可能一个漫长的过程,需要大量实践经验的积累。最近看设计模式的书,对于每个模式,用C++写了个小例子,加深一下理解。主要参考《大话设计模式》和《设计模式:可复
2012-08-16 10:46:31
527
转载 设计模式-工厂模式-C++
http://blog.youkuaiyun.com/wuzhekai1985软件领域中的设计模式为开发人员提供了一种使用专家设计经验的有效途径。设计模式中运用了面向对象编程语言的重要特性:封装、继承、多态,真正领悟设计模式的精髓是可能一个漫长的过程,需要大量实践经验的积累。最近看设计模式的书,对于每个模式,用C++写了个小例子,加深一下理解。主要参考《大话设计模式》和《设计模式:可复用面向对象软
2012-08-16 10:44:05
630
转载 设计模式-工厂模式-C++
工厂方法模式:一个抽象产品类,可以派生出多个具体产品类。 一个抽象工厂类,可以派生出多个具体工厂类。 每个具体工厂类只能创建一个具体产品类的实例。抽象工厂模式:多个抽象产品类,每个抽象产品类可以派生出多个具体产品类。 一个抽象工厂类,可以派生出多个具体工厂类。 每个具体工厂类可以创建多个具体产品类的实例。 区别:工厂方法模式只有一个抽象产品类,而抽
2012-08-16 10:37:39
422
转载 UML-基本类之间关系
http://blog.youkuaiyun.com/lewutian/article/details/4038733类与类之间的关系对于理解面向对象具有很重要的作用,以前在面试的时候也经常被问到这个问题,在这里我就介绍一下。类与类之间存在以下关系: (1)泛化(Generalization) (2)关联(Association) (3)依赖(Depend
2012-08-16 10:32:22
917
转载 Linux 下 sudoer文件的一些介绍
hi.baidu.com/xjll1314/blog/item/d293a253dc1c372f42a75bb3.htmlsudo是linux下常用的允许普通用户使用超级用户权限的工具。它的主要配置文件是sudoers,linux下通常在/etc目录下,如果是solaris,缺省不装sudo的,编译安装后通常在安装目录的etc目 录下,不过不管sudoers文件在哪儿,
2012-08-15 17:11:20
3861
转载 PHP 杂记
1. 类默认访问方式:对于一个类成员的访问方式,可以是其中之一. 如果你没有指明访问方式,默认地访问方式为public. 2. 类似C++虚函数多态实现:self:: 相当于不动态链编$this-> 相当于virtual 函数.3.引用传递PHP 的自定义函数中支持引用调用和引用返回. 引用就是指多个不同的php变量绑定在同一块值上面, 对于大容量参数似乎会节省
2012-08-15 13:35:32
489
转载 typedef 函数指针的用法
代码简化, 促进跨平台开发的目的. typedef 行为有点像 #define 宏,用其实际类型替代同义字。 不同点:typedef 在编译时被解释,因此让编译器来应付超越预处理器能力的文本替换。用法一:typedef int (*MYFUN)(int, int); 这种用法一般用在给函数定义别名的时候上面的例子定义MYFUN 是一个函数指针, 函数类型是带
2012-08-15 09:30:55
462
转载 LDAP-Series-1-Chapter-4 - ACL file
As introduce in Chapter 2 & 3.The LDAP`s ACL should be made. ::= access to [by [] [] ]+ ::= * | [dn[.]= | dn.=] [filter=] [attrs=] ::= regex | exact ::=
2012-08-09 21:51:20
572
原创 LDAP-Series-1-Chapter-3 - PHP-LDAP
If you want to use PHP with ldap. You have to add the extension lib.(ldap.so)Go to the install file of PHP.$ cd /opt/php-5.4.5/ext/ldap/$ /usr/local/bin/phpize$ ./configure --with-php-config=/us
2012-08-09 21:39:36
828
原创 LDAP-Series-1-Chapter-2
Config LDAP.Directory struct.|-- bin(ldap tool)| |-- ldapadd -> ldapmodify| |-- ldapcompare| |-- ldapdelete| |-- ldapexop| |-- ldapmodify| |-- ldapmodrdn| |-- ldappasswd|
2012-08-09 21:24:28
955
原创 LDAP-Series-1-Chapter-1
OpenLdap | BDB(Necessary)Install: Compile SourceDownload:http://www.openldap.org/ | http://www.oracle.com/technetwork/products/berkeleydb/downloads/index.html (The Oracle Index -> Download(Regis
2012-08-09 21:11:54
784
转载 php+ldap
http://leeon.me/a/php-with-ldap今日需要部署一套ldap的测试环境,但发现现有php并不支持ldap模块,遂打算重新编译so,但这种方式比较麻烦并且繁琐,如果仅仅是增加一个ldap模块可以通过phpize和configure的方式编译外挂加载ldap的so文件来使php支持ldap扩展拓展。第一步是找到当前运营环境的php版本,并将此版本的源码包放
2012-08-08 23:18:49
1672
原创 ldap_bind(): Unable to bind to server: Protocol error in
if (ldap_set_option($ds, LDAP_OPT_PROTOCOL_VERSION, 3)) { echo "Using LDAPv3".";";} else { echo "Failed to set protocol version to 3".";";}
2012-08-08 21:58:36
1267
转载 已知两线段的四点坐标,如何判断两线段是否相交的思路
说明TPoint和TLineSeg的定义了:) struct TPoint { float x,y; }; //TPoint是指线段端点的坐标 struct TLineSeg { TPoint a,b; }; //TLineSeg是指线段的两个端点 //这里编者巧妙地把线段和坐标两个事物通过定义一对嵌套的数据结构来简化。许多初学者会定义诸如dot1x,d
2012-04-24 17:15:18
5841
1
原创 选择分组中的最小列
select t.PlaceId,t.wheatid,t.x,t.y,t.dbz,t.cjz,t.smjFrom (select m.PlaceId,MIN(m.OS) AS OSFROM InitData AS mGROUP BY m.PlaceId) qleft join initdata t on t.PlaceId=q.PlaceId and t.OS=q.OSor
2012-04-09 11:09:09
636
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人