λ
摘要: FreeBSD的lagg接口可以聚合多个网络接口为一个虚拟网络接口,提供了很好的容错能力。对于笔记本来说,我们一般希望当有线由于某种原因,比如被拔出等,出现故障后,可以自动切换到无线。So easy for FreeBSD, 妈妈再也不用担心我的学习啦!1. 更改物理无线网络接口,一般是ath0,# ifconfig ath0 ether xx:xx:xx:xx:xx:xx这个xx:xx:xx:xx:xx:xx是你的有线网络接口的MAC地址,通过 ifconfig re0 得到。2.创建lagg0接口,# ifconfig lagg0 create# ifconfig lagg0 up lag 阅读全文
posted @ 2014-03-28 16:19 maxc01 阅读(483) 评论(0) 推荐(0)
摘要: 我花了几天时间来配置我的FreeBSD,觉得FreeBSD越来越令我满意。我分了八个主分区,虽说当时留了150G的空间准备划给windows的(lol专用。。),结果我插上启动盘时,安装程序给我谈了这么一行字:windows无法安装在GPT分区上。好吧,虽说有办法可以做到,不过我就想玩个lol,也不想多此一举,于是把那150G送给FreeBSD了。newfs -U /dev/ada0p*# 也可以添加卷标newfs -U -L homefs /dev/ada1p*# 然后挂载这个文件系统到某个目录就okmount /dev/ada0p* /mnt/*** 阅读全文
posted @ 2014-03-20 21:18 maxc01 阅读(231) 评论(0) 推荐(0)
摘要: 一直以来,都是习惯于把自己积累下来的东西存在记事本上,从来没有养成写博客的习惯(我自己觉得能够将写博客变成一种习惯是好的),现在时间很充裕了,其实也没那么其实也没那么充裕,比起考研那段时间,现在显得现在实在是现在太闲了。 阅读全文
posted @ 2014-03-20 21:05 maxc01 阅读(110) 评论(0) 推荐(0)
摘要: 如何找到链表中的循环?弗洛伊德有一个算法,也叫兔子和乌龟算法,boolean hasLoop(Node first) { if(first == null) // list does not exist..so no loop either. return false; Node slow, fast; // create two references. slow = fast = first; // make both refer to the start of the list. while(true) { slow = slow.nex... 阅读全文
posted @ 2013-09-07 18:59 maxc01 阅读(757) 评论(0) 推荐(0)
摘要: 大致步骤是:import matplotlib.pyplot as pltimport numpy as npx = np.linspace(0, 5, 10)y = x**2# 首先,需要一个figure对象fig = plt.figure()# 然后,axes对象,在axes上面绘图axes = fig.add_axes([0.1, 0.1, 0.8, 0.8])axes.plot(x, y, 'r')axes.set_xlabel('x')axes.set_ylabel('y')axes.set_title('title') 阅读全文
posted @ 2013-09-05 21:29 maxc01 阅读(394) 评论(0) 推荐(0)
摘要: 线性回归from scipy import statsimport numpy as npx = np.random.random(10)y = np.random.random(10)slope, intercept, r_value, p_value, std_err = stats.linregress(x,y)# slope 斜率# intercept 截距 阅读全文
posted @ 2013-08-30 19:18 maxc01 阅读(255) 评论(0) 推荐(0)
摘要: I’ve not had to use TrueType fonts before as my desktop display resolution never warranted it.Now with eyesight failing and much better monitors, I decided to give them a go.Fonts are globally managed by settings in/etc/X11/app-defaults. However, TrueType fonts can be locally set using ~/.Xresources 阅读全文
posted @ 2013-08-19 17:19 maxc01 阅读(318) 评论(0) 推荐(0)
摘要: 换行Emacs当中有四种方式进行自动换行:1.当一个行的长度超过窗口的宽度的时候,Emacs会默认换行内,缓冲区的文本不会发生变化。但是换行可能会截断word。2.AutoFillMode模式在行宽度未超过fill-column的最后一个单词之后会插入一个行结束符。3.LongLines模式会在行宽度未超过fill-column的最后一个单词前面换行,但不会改变缓冲区文本。它只是在外观显示效果上进行换行。4.VisualLineMode模式在窗口的边缘换行,但是也不会修改缓冲区文本内容,该模式只是在外观显示效果上进行换行。不会截断单词。当你的键入字符的长度超过一个规定的列数(fill-colu 阅读全文
posted @ 2013-08-07 14:55 maxc01 阅读(501) 评论(0) 推荐(0)