- 博客(81)
- 资源 (10)
- 收藏
- 关注
原创 30来岁程序员的一些想法
30来岁,可能见得东西会多一些,但是总有一些危机意识。我们干的活儿,小伙子们都能干。需要沉淀沉淀,让自己不一样,充实一些管理的技能,了解一些公司的运作。
2015-10-16 15:21:36
391
原创 新的起点
<br />来傲天就要满一年了。<br />最近似乎有些懈怠。<br />也许很快就会忘了一些事,然后开始新的奋斗。<br />很多事都是没做之前觉得难,做了之后觉得也就那样。<br />所以,我要做一个系统架构师。<br />有时候,需要忽略一些细节,抓住主要的东西。<br />更多时候,小事情也要认真做好。<br />因为架构师的严谨和实战经验是不可或缺的。
2011-06-01 10:58:00
342
原创 生活的无奈
<br />有时候,一个人的力量很小。<br />但是,我总相信事在人为。<br />放弃是最容易的。<br />有什么可怕呢。<br />喜欢一个人没错。<br />喜欢写程序也没错。<br />寻找一个平衡点,一切都解决了。
2011-04-11 14:29:00
297
原创 学会忍耐
<br />转眼做了半年多的程序员。<br />还有很多东西需要思考。<br />我不是个小气的家伙。<br />既然上了这条船,就好好享受海风吧!
2011-02-25 14:02:00
362
原创 爱夏天的理由
<br />昨天的答辩有些不知所云,我的鲁莽让剑超有些尴尬。<br />我就是个长不大的孩子,总在事后后悔不已。<br />这个夏天发生的许多,好的坏的,不管怎样,总算走上了正路。<br />老大说这是提前转正,加的米算多了。<br />我是一个不大喜欢计较钱财的人,不过也不大介意来点奖赏之类的。<br />很知足了,至少,现在可以干自己喜欢的事,挑战一下数学思维。<br />我会继续努力。
2010-08-10 23:48:00
569
原创 开始学习Linux
<br />读书时候linux的培训就很火。<br />下了个文档,决定好好学,得空装个试试。<br />工作快两年了,一直想做开发。<br />一年前,以为考了软设就能跳了。<br />面疲之后没走成,稀里糊涂地做了半年技术支持,熬了不少夜班。<br />看着兄弟们都走了,一个星期的观察期也能让我辞职,欣然前往。<br />这次是web开发,一方面对于游戏的不热衷,一方面搬家的杂事。<br />如果我能够积极多点,把学习任务漂亮地完成,不问那些傻问题,也就不会延长观察期。<br />如果我能轻松点,好好琢
2010-06-09 18:40:00
325
原创 堆排序
<br />// array是待调整的堆数组,i是待调整的数组元素的位置,length是数组的长度 <br /> void HeapAdjust(int array[], int i, int nLength) <br /> { <br /> int nChild, nTemp; <br /> for (nTemp = array[i]; 2 * i + 1 < nLength; i = nChild) <br />
2010-06-07 15:11:00
272
原创 内存拷贝函数
<br />void* memcpy( void *dst, const void *src, unsigned int len )<br />{<br /> register char *d;<br /> register char *s;<br /> if (len == 0)<br /> return dst;<br /> if ( dst > src ) //考虑覆盖情况<br /> {<br /> d = (char *)dst + l
2010-06-07 11:13:00
340
原创 Josephu问题的链表解决方案
<br />typedef struct Node<br />{<br /> int index;<br /> struct Node *next;<br />}JosephuNode;<br /><br />int Josephu(int n, int m)<br />{<br /> int i, j;<br /> JosephuNode *head, *tail;<br /> head = tail = (JosephuNode *)malloc(sizeof(JosephuNode));<b
2010-06-07 10:17:00
594
原创 删除相同值节点
<br />双向循环链表结点定义为:<br />struct node<br />{ int data;<br />struct node *front,*next;<br />};<br /><br /><br />两个双向循环链表A,B,头指针为:pHeadA,pHeadB,函数将两链表中data值相同的结点删除:<br />BOOL DeteleNode(Node *pHead, DataType Value)<br />{<br /> if (pHeader == NULL) return f
2010-06-07 09:47:00
496
原创 set求交集
<br />// test.cpp : Defines the entry point for the console application.<br />//<br />#include "stdafx.h"<br />#include "iostream"<br />#include "algorithm"<br />#include "set"<br />using namespace std;<br /> <br />int _tmain(int argc, _TCHAR* argv[])<br /
2010-06-03 16:49:00
1268
原创 螺旋矩阵
<br />// test.cpp : Defines the entry point for the console application.<br />//<br />#include "stdafx.h"<br />#include "iostream"<br />using namespace std;<br /> <br />int _tmain(int argc, _TCHAR* argv[])<br />{<br /> const int N=10; <br /> int met
2010-06-02 13:36:00
342
原创 继续看题之c++
二分查找:int bs(int *a,int len,int val){ int l=0; int m=len/2; int r=len-1;while(l!=m && r!= m) { if(a[m] > val) { r = m; m = (m+l)/2; }
2010-05-28 17:38:00
285
原创 专注c++,看题
SIZEOF CONST 预处理题目:1. sizeof相关系列问题a. struct s{char a;int b}; sizeof(s) = 8; 因为当结构体内元素长度都小于处理器位数(32位=4字节)的时候,便以结构体中最长的<span class="t_tag" onclick="function onclick(){tagshow(event)}">数据元素为对齐条件
2010-05-28 16:25:00
326
原创 Access violation之字符串
通常:char* str="test";不要修改这种方式声明的字符串内容。malloc没问题。数组方式:虽然也使用了静态只读数据段里内容,但很显然是复制而不仅仅是指向偏移,所以修改其中的内容不会导致错误。
2010-05-28 09:58:00
312
原创 windows内存管理
windows NT系统是以页尾基础的虚拟内存系统,使用32位线性地址。在内部,系统管理被称为页的4096字节段中的所有内存。每页的物理内存都被备份。临时的内存页使用页文件(pagefile),只读的内存页使用磁盘文件。同一时刻,最多可有16个不同的页文件。代码,资源和其他只读数据通过他们创建的文件直接备份。// Memory.cpp : Defines the entry poi
2010-05-27 10:34:00
450
原创 Boost有点意思
开源的东西很赞,仔细看下文档就能用。// Shell.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include using namespace std;int _tmain(int argc, _TCHAR* arg
2010-05-21 17:26:00
298
原创 初识多媒体
最近想了解一些多媒体,看了点东西。#include "stdafx.h"#include "windows.h" int _tmain(int argc, _TCHAR* argv[]){ ShellExecute(NULL,"open", "d://Wildlife.wmv","","",SW_SHOWNORMAL ); return 0;} 多媒体开发方法:1 使用o
2010-05-21 14:19:00
434
原创 关于C++ Effective
终于草草地把这本书看完了。下决心干一件事还是很快的,放了很久的C++ Effective给我的感觉就是观念性的冲击。之前对于程序员的理解仅限于实现,对于效率,对于内存管理,对于异常安全性,对于很多其他方面一无所知。在写了一些MFC的网络相关的简单实现之后,觉得实现只是个基本的目标。同样是一个实现,你的资源管理,你对效率的关注,你对编译期的关注,这些才反映你的深度。我需要更多的实
2010-05-20 17:52:00
249
原创 动态绑定与静态绑定
class B{public:void mf();...}; class D:public B{public:void mf(); //遮掩了B:mf()...}; D x;B* pB=&x;D* pD=&x; pB->mf(); //调用B::mf()pD->mf();//调用D::mf() non-virtual函数
2010-05-12 16:55:00
295
原创 inline是个申请,编译器可以忽略
inline void f(){...}void (*pf)()=f; //pf指向f...f(); //这个调用被inlinepf();//这个或许不被inline,因为是通过函数指针达成
2010-05-11 17:00:00
363
原创 Dynamic_cast的效率问题
dynamic_cast的作用:在derived class身上执行derived class 执行函数,手头只有指向base的pointer或reference.方案一:class Window{...};class SpecialWindow:public Window{public:void blink();...}; typedef std::vecto
2010-05-11 10:52:00
1080
原创 写一个不抛异常的swap函数
Consider support for a non-throwing swap.STL中的swap算法:namespace std{templatevoid swap(T& a,T& b){T temp(a);a=b;b=temp;}} 复制动作无一必要。考虑以指针指向一个对象,内含真正数据。class WidgetImpl{publi
2010-05-10 14:17:00
403
原创 让接口容易被正确使用,不易被误用
Make interfaces easy to use correctly and hard to use incorrectly.为表现日期的class设计构造函数:class Date{public :Date(int month,int day,int year);...}; 客户有可能的错误:Date d(30,3,1995); 导入wrapper
2010-05-07 09:20:00
304
原创 智能指针
今天开始写c++ effective的读书笔记。以对象管理资源需要pointer-like object,即智能指针。#include "stdafx.h"#include "iostream"#include "memory" using namespace std;int _tmain(int argc, _TCHAR* argv[]){ int* p=new int(12);
2010-05-06 09:45:00
240
原创 初识Wininet:抓网页
#include "stdafx.h"#include#include#include#include#include#pragma comment(lib,"WinInet.lib")using namespace std;int main(){ HINTERNET hINet, hHttpFile; char szSizeBuffer[32
2010-04-22 17:41:00
383
原创 Copy Directory
#include "stdafx.h"#include "windows.h"#include "string.h"#include "time.h" //clock()#define MAX 1000int level = 0;int filecount = 0;void Findfile(char * filepath,char *destpath); int _tmain(
2010-04-14 08:42:00
495
原创 遍历目录
#include "stdafx.h"#include "windows.h"#include "string.h"#include "time.h" //clock()#define MAX 1000int level = 0;int filecount = 0;void Findfile(char * filepath); int _tmain(int argc, _TCHA
2010-04-13 12:31:00
387
原创 FTP客户端:上传需要关闭Socket
#include "stdafx.h"#include #include #include "iostream"using namespace std; #pragma comment(lib,"ws2_32.lib") int
2010-04-09 16:32:00
502
原创 构造堆栈:Private List Can Be Converted To Stacklist
// stack.cpp : Defines the entry point for the console application.//#include "stdafx.h"#includeusing namespace std;class node{ friend class list;private: node* next; int data;public: node(node* n
2010-03-12 16:31:00
342
原创 重载String:Overload String
#include "stdafx.h"#include #include using namespace std;class String{private: char* ch; int size;public: String(char *s=""); String(const String &s); ~String(void); int length(void)const; String su
2010-03-12 16:26:00
386
原创 重载操作符:Array:Overload Operator
#include "stdafx.h"#include #include using namespace std;class Array{private : int size; int low; int high; int *arr;public: Array(int sz=10); Array(int l,int h); Array(const Array &a); ~Array(void);
2010-03-12 16:22:00
336
原创 同步对象:Monitor
using System;using System.Threading;public class Cell{ int cellContents; bool readerFlag = false; public int ReadFromCell() { lock (this) { if (!readerFlag)
2010-03-12 16:17:00
262
原创 送花之手动重设:Send Flower:Set A Signal of Ending
using System;using System.Threading;public class TestMain{ private static ManualResetEvent ent = new ManualResetEvent(false); public static void Main() { Boy sender = new Boy
2010-03-12 16:11:00
367
原创 送花同步:AutoResetEvent=ManualResetEvent(Set+Reset)
using System;using System.Threading;public class TestMain{ private static AutoResetEvent ent = new AutoResetEvent(false); public static void Main() { Boy sender = new Boy(ent);
2010-03-12 16:08:00
434
原创 读写同步:AutoResetEvent:ReadThread After WriteThread
using System;using System.Threading;namespace AutoResetEvent_Examples{ class MyMainClass { const int numIterations = 10; static AutoResetEvent myResetEvent = new AutoResetEvent(f
2010-03-12 15:57:00
318
原创 银行账户锁:Transaction:Lock(this)
using System;using System.Threading;namespace ThreadSimple{ internal class Account { int balance; Random r = new Random(); internal Account(int initial) {
2010-03-12 15:36:00
368
原创 信号量:Semaphore:Release
using System;using System.Threading;public class Example{ private static Semaphore _pool; private static int _padding; public static void Main() { _pool = new Se
2010-03-12 15:31:00
408
A Simple Chatting Program using C++
2009-10-21
Make Two Timers using MFC
2009-09-13
WF Practice
2009-05-11
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人