摘要: 友好,好用,顺手,专一。比如,total commander,资源管理器,其实有基本的资源管理器的功能就好了,不要有很明显的bug,不要集成ftp服务器,计算机管理之类的副业,这些东西,用资源管理器的人很少用,偶尔用到一两次,直接打开原路径就可以了,无须再这里重新增加,增加负担。专用型强是最好的,混杂的软件往往容易不伦不类,搞不清自己是做什么的,而且bug会很多。 阅读全文
posted @ 2013-11-13 23:57 calabashdad 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-11-05 18:56 calabashdad 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 若推上来的数据量太大,socket一时堵塞,采用什么方法解决?总有个极限,超过这个极限,就会导致延时处理增加服务器吧 阅读全文
posted @ 2013-11-01 00:39 calabashdad 阅读(114) 评论(0) 推荐(0) 编辑
摘要: std::bind用法实例#include #include using namespace std;typedef std::function fp;class A{public: virtual void f() { coutinit(); return 0;}std::function用法实例#include #include using namespace std;typedef std::function fp;void g_fun(){ cout fpi; //对于参数要使用占位符 std::placeholders::_1 ... 阅读全文
posted @ 2013-10-30 14:51 calabashdad 阅读(447) 评论(0) 推荐(0) 编辑
摘要: c c++宏定义中##使用方法#include typedef struct command{ char * name; void (*function) (void);}T_commands, *PT_commands;#define COMMAND(NAME) { #NAME, NAME##_command }void (f1_command) (void){ std::cout << "f1" << std::endl;}void (f2_command) (void){ std::cout << "f2" &l 阅读全文
posted @ 2013-10-27 17:09 calabashdad 阅读(643) 评论(0) 推荐(0) 编辑
摘要: 先贴下,再回改#include "pub.h"template > class CONT = std::deque>class Stack{private: CONT elems;public: void push(T const &); void pop(); T top() const; bool empty() const { return elems.empty(); } template > class CONT2> Stack & operator = (Stack const &);};template c... 阅读全文
posted @ 2013-10-25 17:13 calabashdad 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2013-10-24 17:20 calabashdad 阅读(167) 评论(0) 推荐(0) 编辑
摘要: template inline const T& Max_(const T& v1, const T& v2){ return v1 > v2 ? v1:v2;}1.采用模板实现,泛型化2.inline 内敛提交运行速度3.const保证数据不改动4.引用节省空间,也提高运行效率 阅读全文
posted @ 2013-10-24 15:14 calabashdad 阅读(126) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;class StrategyInterface{public: virtual void execute() = 0;};class ConcreteStrategyA: public StrategyInterface{public: virtual void execute() { cout execute(); }};int main(int argc, char *argv[]){ ConcreteStrategyA concreteStrategyA; ConcreteStr... 阅读全文
posted @ 2013-10-24 14:27 calabashdad 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 使用freemind。千里之行,始于足下。 阅读全文
posted @ 2013-10-24 10:14 calabashdad 阅读(82) 评论(0) 推荐(0) 编辑