自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

知行天下

本博不在更新。新博 : http://www.iequa.com

  • 博客(20)
  • 收藏
  • 关注

转载 git add详解

一、前言git add命令主要用于把我们要提交的文件的信息添加到索引库中。当我们使用git commit时,git将依据索引库中的内容来进行文件的提交。二、基本git add 表示 add to index only files created or modified and not those deleted 我通常是通过git add 的形式把我们添加到索引库中,可以是文件也可

2013-04-29 11:45:06 999

转载 git push 原因以及问题!

$ git push ssh://git@dev.lemote.com/rt4ls.git master // 把本地仓库提交到远程仓库的master分支中$ git remote add origin ssh://git@dev.lemote.com/rt4ls.git$ git push origin master 这两个操作是等价的,第二个操作的第一行的意思是添加一个标记

2013-04-27 18:39:21 1304

原创 记忆话搜索来实现斐波那契数列

所谓的记忆话搜索,这还不是用了数组来存储么!#include #include using namespace std;#define BUG puts("here");const int N = 15;int fib[15];void init() { fib[0] = 1; fib[1] = 1; for(int i = 2; i < N; i++) { fib[i] =

2013-04-22 22:18:39 1171

转载 Linux下C进程管理(fork,wait,exec)

在我们编程中用的最多是函数,也就是如何函数调用。那我们如何调用函数呢?一:我们必须要知道函数的功能是什么?二:再看这个函数需要哪些参数?三:最后看返回值是什么?当我们面对一个函数时,既不知道函数的功能也不参数以及返回值时,我们该如何下手呢?必须得动手查询呗,可以使用函数手册,终端,以及书本资料等、现在就用fork,wait,exec来举例说明:fork功能:创建一个

2013-04-21 21:37:42 1065

原创 poj 3414 Pots [bfs - 倒水问题]

感 : 经典的倒水问题,个人很喜欢的一道 bfs.   另外 : 今天知识 地址作为参数只能用指针来接收!否则编译错误。代码 : 为没有记录路径的 STL queue 的实现! 记录路径可以用 dfs , 状态中记录上一个节点地址,但是需要静态开辟状态,间接说明此时不能用 STL的queue记录了。#include #include #include #include #inclu

2013-04-21 16:49:09 938

原创 好公司职位要求

百度-熟悉Linux(类Unix)操作系统,熟悉TCP/IP协议 -精通或熟练掌握Linux环境下的C/C++/PERL/PYTHON/SHELL等1至2种语言,对计算机体系结构有一定理解 -具备很强的分析和解决问题的能力,对于攻关疑难问题具有强烈的兴趣 -善于学习新的知识,善于思考,勤于动手,不怕繁琐,重视流程规范 -有相关系统开发经验的更好 职位要求:热爱互联网,对搜索技术、探

2013-04-21 16:12:50 885

原创 [算法] poj 1274 The Perfect Stall (匈牙利)

#include #include #include using namespace std;const int N = 205;bool map[N][N];int mat[N];bool vis[N];int n, m;bool dfs(int u) { for(int i = 1; i <= m; i++) { if(map[u][i] && !vi

2013-04-15 20:07:31 827

原创 [C++] String类的复制控制的实现

#include #include using namespace std;class String { // 一切都是深拷贝!private : char *m_data;public : String(const char *str = NULL); String(const String&); String& operator =(const String& rhs);

2013-04-12 12:27:53 1111

原创 [C++] 分别设计只能在栈, 堆中分配内存的类!

#include using namespace std;class HeapOnly {public : HeapOnly() {} void destroy() const { delete this; }private : ~HeapOnly() {}};class HeapStack {private : static void* operator new

2013-04-12 10:30:04 986

原创 句柄类的实现,robby 难道你还能忘记么?第几遍了已经!

为了避免每个使用指针的类自己去控制引用计数,可以用一个类把指针封装起来。这个类对象可以出现在用户类使用指针的任何地方。#include #include #include using namespace std;template class Handle {private : T *ptr; size_t *use; void decrUse() { --(*use);

2013-04-11 15:32:20 864

原创 [算法] poj 2387 单源最短路 Dijkstra

单源最短路#include #include #include #include #include using namespace std;const int N = 1005;#define INF 0x7fffffffint data[N][N];int lowc[N];bool vis[N];int n, m;void djst(int p) { for(int

2013-04-10 16:58:45 957

原创 [算法] poj 3356 字符串的距离 AGTC

#include #include #include #include using namespace std;const int N = 1010;int dp[N][N];char a[N], b[N];int n, m;int get_min(int x, int y, int z) { return min(min(x, y), z);}int main() {

2013-04-10 11:09:14 897

原创 [算法] doj 1067 归并法求逆序对 Ultra-QuickSort

#include #include using namespace std;#define mid(x,y) ((x&y) + ((x^y)>>1))const int N = 500005;long long a[N];long long ans; // 记录逆序对个数void merge_sort(int l, int r) { if(l >= r) return; int

2013-04-09 16:40:29 878

原创 [算法] doj 1066 最长上升子序列

#include #include #include #include #include using namespace std;const int N = 100005;int a[N];int dp[N];int n;int mmax;void solve() { memset(dp, 0, sizeof(dp)); mmax = 0; if(n > 0) mma

2013-04-09 15:24:15 985

原创 [算法] doj 1605 Common Subsequence 公共子序列

#include #include #include #include #include using namespace std;const int N = 505;char s1[N], s2[N];int dp[N][N];void solve() { int len1 = strlen(s1+1); int len2 = strlen(s2+1); memset(d

2013-04-09 14:34:41 792

原创 [算法] 矩阵相乘

#include #include #include #include using namespace std;int a[2][3] = {{100, 200, 300}, {400, 500, 600}};int b[3][2] = {{1, 2}, {3, 4}, {5, 6}};int c[2][2];void solve(int m, int n) { for(i

2013-04-09 13:30:36 953

原创 [C++] 单件模式的一般实现

#include #include #include #include #include using namespace std;class L {public : static L* instance() { if(!pi) { pi = new L(); } return pi; } virtual ~L() { if(pi) { delet

2013-04-09 12:19:43 948

原创 [kmp] doj 1045 Number Sequence

#include #include using namespace std;const int N = 1000005;const int M = 10005; int s[N], t[M];int next[M];void get_next(int len) { int i = 0, j = -1; next[0] = -1; while(i < len-

2013-04-08 16:13:17 716

转载 华为EC321CDMA PCMICA 无线网卡Ubuntu下使用

工作性质的原因,公司配备了华为EC321 CDMA无线网卡,PCMCIA接口。Windows环境下安装好驱动然后通过华为自带的软件可以拨号上网。 Linux下面能不能使用这块网卡呢,答案是肯定的。linux内核中已经包含了很多标准CDMA无线网卡芯片的驱动,只要你使用的CDMA卡是兼容的标准芯片那么在linux环境中使用的可能性很大。其中华为EC321这款网卡的芯片就可以被linux支持。

2013-04-07 10:59:40 1173

转载 C++经典书籍推荐(from stackoverflow)

C++和其它语言的不同之处在于,其它的语言通过网上的一些教程也许就可以掌握,而C++则基本不可能,必须得深入地研究大量经典的书籍。究其原因,在于C++的庞大和繁杂。因此市面上也难免会有一些书滥竽充数,抛开一些差的代码风格,这些书里面有很多的语言层面上的错误,而对于网络教程更是如此(事实上,也很难在网上找到一个全面的C++网络教程)。    下面主要是一些高质量的C++经典书籍,同时我们会标

2013-04-02 12:33:16 1436

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除