何以解忧,唯有打油 18 July 2014 Jeff Random Thought 随想随记, Thinking 思想 哎呀,掐指一算,我居然有一年多没有写过打油诗了!生活如此多的忧愁,没有打油诗如何能排解?诗好写,题目难拟。不过有人随口说了句顺口溜,那么我就拿它做题了!虽然有点儿长…… 既然我们这么高大上,为什么我们还这么荡(Down)? 作者:姐夫 吃着火锅唱着歌, 曲线救国也快乐。 非要直线才肯走, 止步不前受折磨。 有图有真相:
Javascript: Check an element’s value change not made by user 18 July 2014 Jeff JavaScript Problem: We all know if an input’s value was changed by user input, we can capture this change event by $('input').change(function(event){ console.log('user changed the value.'); }); But if t... [More]
JS: Lock form when submitting and unlock it when done 14 July 2014 Jeff JavaScript Background: When a form is submitting, it should be locked – not be editable, all input elements and buttons should be disabled. And it should be unlocked or enabled after the submitting is complete ... [More]
如何彻底解决使用长城宽带的过程中,网页右下角弹出广告的问题 13 July 2014 Jeff Computer Network 计算机网络, Other 其他 问题: 在上海租了个房子,接入长城宽带后,上网的过程中,在网页右下角时不时会弹出各种广告。 连 Localhost 的网站都不放过!!!: 分析: 这是一种流氓注入。如果你的网络是免费提供的,那么注入一些广告也情有可原,但是我是付了网络费了的,凭什么还要被你注入广告??? 上面有截图证明它对于 localhost 的网站也不放过——这是因为 localhost 有引用外部的脚本文... [More]
Solved: Knockout binding error “Expected identifier, string or number” on IE 8 27 June 2014 Jeff JavaScript Problem: You use Knockout 3.0 in your web pages, and it works fine with all browsers but IE 8. On IE 8, it throws the error: Expected identifier, string or number which is useless for debugging. ... [More]
Solved: FTP Error “503 Login with USER first.” 24 June 2014 Jeff Computer Network 计算机网络 Problem: Setup a FTP site allowing anonymous log in and with virtual host names enabled on Windows Server 2008 R2: But when trying to connect to that FTP site with the user name anonymous, the f... [More]
The forced distribution algorithm of sales leads dispatching 07 June 2014 Jeff Computer Network 计算机网络, Math 数学 Problem: A supervisor at a Call Center with several telemarketers, gets lists of sales leads that need to follow up from a specific channel every day. These sales leads lists are arrived in several b... [More]
随机图的连通概率递推公式 07 June 2014 Jeff Computer Network 计算机网络, Math 数学 背景: 图:图是一些顶点以及连接顶点的边的集合。相关概念可以参考这里。 随机图:一个包含 n 个顶点的简单图,其中每两个顶点间存在边的可能性为 p。这样的图记为 G(n, p)。 连通图:在无向图 G 中,两个顶点 u 和 v 被称为是连通的,如果 G 中存在一条从 u 到 v 的路径。否则,它们就被称为是不连通的。如果图中的每对不同的顶点间都是连通的,那么这个图也就被称为是连通的。否则,它被称为... [More]
如何允许 Windows 7 主机与 Ubuntu 虚拟机互相 ping 通 26 May 2014 Jeff Computer Network 计算机网络 问题: 在 Windows 7 主机里的 Virtual Box 中安装了 Ubuntu,然后发现主机能够 Ping 通虚拟机,但反过来不行。 解决方案: 在 Virtual Box 中的设置里,将网络连接方式改成 Host-only Adapter 之后就可以互相 Ping 通了。 顺便说一句,在 Windows 的 cmd 里查看 IP 设置,命令为 ipconfig,但在 Ubuntu 中... [More]
在 Windows 7 (64 位) 的 IIS 7 上运行 32 位应用程序 24 May 2014 Jeff ASP.NET, Computer Network 计算机网络 问题: 你发布了一个网站应用到 Windows 7 (64 位)的 IIS 7 服务器上,当你从网页上打开时,显示“试图加载格式不正确的程序”的错误。如: Server Error in ‘xxx’ Application. Could not load file or assembly ‘System.Data.SQLite’ or one of its dpendencies. 解... [More]