2018年6月25日

Linux的read和write 函数注意事项

摘要: Linux的read和write 函数注意事项 阅读全文

posted @ 2018-06-25 21:31 wudymand 阅读(252) 评论(0) 推荐(0) 编辑

linux系统函数open,create中flags和mode参数总结

摘要: 我们在linux系统下编程,经常会用到I/O 系统函数去操作文件,再用到open和create函数去创建和打开文件时,函数中的参数如何理解呢。int open(const char *pathname,int flags)int open(const char *pathname,int flags 阅读全文

posted @ 2018-06-25 21:30 wudymand 阅读(2411) 评论(0) 推荐(0) 编辑

virtualbox ,centos 的多网卡如何设置

摘要: 假设eth0是NAT,另外一块(eth4)是Host-Only.#首先确认网卡MAC[root@localhost ~]# ifconfig -a | grep HWeth0 Link encap:Ethernet HWaddr 08:00:27:B2:9F:F5eth4 Link encap:Et 阅读全文

posted @ 2018-06-25 21:28 wudymand 阅读(209) 评论(0) 推荐(0) 编辑

ubuntu的linux 下如何直接进入命令行终端,不进入可视桌面

摘要: 修改/etc/X11/default-display-manager值为/usr/sbin/gdm,则进入图形界面值为false,则进入控制台修改/etc/X11/default-display-manager如果值为/usr/sbin/gdm,则进入图形界面如果值为false,则进入控制台(命令行 阅读全文

posted @ 2018-06-25 21:27 wudymand 阅读(5360) 评论(0) 推荐(1) 编辑

阿里云主机apache如何查看百度蜘蛛baiduspider的访问记录log

摘要: 进入apache的安装路径,例如”Apache-2.2.29/conf“目录编辑工具打开httpd.conf大概在200行左右找到以下语句 LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combine 阅读全文

posted @ 2018-06-25 21:26 wudymand 阅读(255) 评论(0) 推荐(0) 编辑

2017年9月6日

js中回调函数总结

摘要: 函数也是对象,可以理解为字符串序列化的对象 普通的定义函数,先定义变量,再指向一个函数 var foo=function(arg1,arg2){ return arg1+arg2; } console.log(foo(2,3));//执行后结果输出为5 我们也可以写成另外一种形式,构建一个Funct 阅读全文

posted @ 2017-09-06 14:19 wudymand 阅读(203) 评论(0) 推荐(0) 编辑

2015年4月3日

java中23种设计模式之20-备忘录模式(memento pattern)

摘要: abstract class Health{ private int blood; private int mana; public void setBlood(int blood) { this.blood=blood; } public int getBlood() { return blo... 阅读全文

posted @ 2015-04-03 16:59 wudymand 阅读(117) 评论(0) 推荐(0) 编辑

java中23种设计模式之19-中介者模式(mediator pattern)

摘要: abstract class AbstractColleague{ public abstract void workSelf(); public abstract void requestOthersHelp();}class ColleagueA extends AbstractColleagu... 阅读全文

posted @ 2015-04-03 16:58 wudymand 阅读(124) 评论(0) 推荐(0) 编辑

2015年4月2日

java中23种设计模式之18-原型模式(Prototype pattern)

摘要: class Something{ public String something=null;}class Prototype implements Cloneable{ private String name; public Something aSomething=new Something();... 阅读全文

posted @ 2015-04-02 20:50 wudymand 阅读(130) 评论(0) 推荐(0) 编辑

java中23种设计模式之17-状态模式(state pattern)

摘要: interface State{ public void handle(StateMachine statemachine);}class Eat implements State{ StateMachine statemachine=null; public void handle(StateMa... 阅读全文

posted @ 2015-04-02 20:49 wudymand 阅读(124) 评论(0) 推荐(0) 编辑

导航