回顾昨天的酒井知识竞赛

昨天晚上,我作为蒟蒻组的一员在三教2102参加了酒井知识竞赛,并因此鸽掉了TUNA和Lab mU的迎新会hhh,不过运气好拿到了二等奖的好成绩,获得Paperang便携打印机一台。中间遇到了好一些网络方面的知识,这对于没有记忆OSI模型的我无疑有巨大的难度。下面是几道比较有印象的题目: 以下哪个不是编程语言? A. J B. L C. R D. K 这题不难,R肯定对,J见过,K略微有印象,选B IPv6链路层地址解析的协议是? A. ARP B. Neighbour Solicitation C. Neighbour Advertisement D. Neighbour Discovery 对于一个没研究过IPv6的人来说这只好蒙了。。。ARP是IPv4时代的,ND(Neighbour Discovery则是IPv6时代的新产物,把ARP和ICMP等协议的功能都包含了进来,并且有新的功能。之前样题里还出现过问IPv6中去掉了Unicast,Anycast,Multicast,Broadcast中的哪种,答案是Broadcast。 第一个把程序错误称做bug的是? 选项太多忘了,答案是Grace Hopper,因为当时一只飞蛾意外飞入了机器导致了故障,后来慢慢就流传下来了。 以下不是网络操作系统的是? A. Windows NT B. OS/2 warp C. DOS D. Netware 当时我没见过D,于是就选了。。。然后就挂了,Netware是Novell开发的系统,OS/2 warp当然是历史悠久的系统啦,而DOS=Disk Operating System所以没有“网络”二字。。。晕倒 以下是用作局域网的协议是? A. TCP/IP B. IPX/SPX C. NetBEUI D. RS-232-C TCP/IP当然不仅限于局域网,RS-232-C是接口,当时蒙了B结果就对了,白白拿了50分哈哈哈。IPX/SPX是Novell设计用在Netware系统上的局域网协议,NetBEUI则是NetBIOS的一个历史遗留的一个“别称”。 姚期智的夫人给谁取了中文名? 当然是Donald Ervin Knuth啦!高德纳万岁!

Read More

华为随行 WiFi 2 mini开箱

前段时间,我办了4G升级,移动送了一张副卡,有不少免费的流量,由于我的手机是iPhone不支持双卡,老爸就借了我他的GlocalMe当成MiFi来用,不过呢GlocalMe放在这里当然是大材小用了,所以我就网购了华为随行WiFi 2 mini,把我的副卡装上一个壳放进去就可以了!把这个MiFi插入电脑,会弹出一个目录,里面有Win/Mac的驱动安装文件,打开后在网络设置里就有HUAWEI_MOBILE的连接了,并自动打开网络配置界面。设置一下SSID和密码,就能正常使用了,手机连上也很正常,手机上可以下载HUAWEI HiLink来配置MiFi,挺爽的。随赠的有联通的上网卡,不过我准备在北京买个上网卡放MiFi里面用。

Read More

In macOS Sierra, Karabiner-Elements finally support complex modifications

In favor of this commit, Karabiner-Elements now supports the much welcomed yet long-lost feature, namely complex modifications that enable users to trigger complex keypress. Now I can achieve this: If I press <Enter>, then: 1. If <Enter> is pressed alone, then send <Enter>. 2. If <Enter> is pressed along with other keys, then send <Control> + Other. By adding this code to ~/.config/karabiner/karabiner.json : "complex_modifications": { "rules": [ { "manipulators": [ { "description": "Change return_or_enter to left_control.

Read More

等时圆

最近学校老师讲了一下等时圆。先从这个题讲起: 在同一个地方向不同倾角光滑斜面用不同的初速度上滑,到达最高点所用时间相等,求最高点的轨迹是什么? A. 直线 B. 椭圆 C. 抛物线 D. 圆 当时做这个题目的第一想法是把x和y座标表示出来: $$ \frac{1}{2}gsin\theta{}t^2=l, y=lsin\theta, x=ycot\theta $$ 然后就傻眼了,并得不到x与y的关系式。当然了可以求出几个点,强行带入二次曲线通式求解。不过想了想还是用解析几何的方法去做吧: $$ \frac{1}{2}gsin\theta{}t^2=\sqrt{x^2+y^2}, sin\theta=\frac{y}{\sqrt{x^2+y^2}} $$ 这么一代入,显然是圆。但既然这是物理题,可不可以用物理方法做呢? 可以,这就是等时圆。 啥叫等时圆? 等时圆就是,在一个光滑圆环上选择任意一点,让一个小球从这个点沿着光滑直杆到圆的最低点,无论这个点在哪里(最低点不算哈),时间都是一样的。怎么证明? 很简单:设小球与最低点连线与数值方向上夹角为$$\theta$$,那么 $$ s=2Rcos\theta, \frac{1}{2}gcos\theta{}t^2=s $$ 你会发现t与$$\theta$$无关。证明完毕。 其实也可以倒过来:从圆的最高点往各个方向下滑,到达圆周时间相等。 好了,到此为止内容都没什么,但你会想问这和前面那道题目有什么关系呢?这怎么等时圆?重力往下诶。运动可是往右上方。 Here comes the black magic :) 我们考虑向下滑到最低点的那个等时圆,在这个圆周上滑倒最低点的时间都相等。好,我们把这个图沿着竖直方向旋转180度形成一个球,想想这个球上每一个点到最低点时间是不是也一样?那么考虑逆过程,让小球从斜面上滑下来,我对刚才的球体再竖着切一刀,得到的平面不就是题目中那个吗?得证。 当然了最好能有动画说明,限于本人时间问题暂时不提供 ^_^

Read More

I have found a good way to track changes in .gz files: Add these to ~/.gitconfig: [core] attributesFile = ~/.gitattributes [diff "zip"] textconv = unzip -p binary = true [diff "gz"] textconv = gzcat binary = true [diff "bz2"] textconv = bzcat binary = true [diff "xz"] textconv = xzcat binary = true [diff "tar"] textconv = tar -O -xf binary = true [diff "tar-bz2"] textconv = tar -O -xjf binary = true [diff "tar-gz"] textconv = tar -O -xzf binary = true [diff "tar-xz"] textconv = tar -O -xJf binary = true [diff "odf"] textconv = odt2txt [diff "pdf"] textconv = pdfinfo [diff "bin"] textconv = hexdump -v -C And these to ~/.

Read More

Finally the end of Senior 2 arrives. I’m on the way to Senior 3. The summer vacation is rather short which is really common in China. These days I have been diving into Emacs by subscribing both emacs and emacs-devel mailing list. It contributes to my English as well. I can learn a lot of new words and expression thanks to the nice and convenient feature of looking up a word in iOS.

Read More

Just got a piece of great news: GHC 8.0.1 is out! See the announcement [here][http://article.gmane.org/gmane.comp.lang.haskell.ghc.devel/11928]. So excited! And Emacs 25 release will be out soon. Using Emacs 25.0.94 now. Many new features available. See [this][http://puntoblogspot.blogspot.com/2016/05/emacs-251-news.html] for more information. Recently I have finally started to use mu4e and gnus. What makes it truly great is that they integrate org, bbdb and so on.

Read More

Having a bad cold. Really annoying. Okay, here comes the interesting links: https://glyph.twistedmatrix.com/2015/11/editor-malware.html http://kitchingroup.cheme.cmu.edu/blog/2016/04/07/Writing-hy-code-from-hy-code/ https://github.com/holomorph/transmission https://github.com/bergey/org-babel-diagrams http://ess.r-project.org/ http://projects.haskell.org/diagrams/

Read More

Just learned a new tip on git shallow clone. As you know, some repository are really really large, such as emacs and linux. Cloning is slow and unstable. And there is no way to pause and resume a git clone. So I use shallow clone to clone them. But what if I want to clone other branches? From here: http://stackoverflow.com/a/27393574/2148614 git remote set-branches origin '*'

Read More