using Microsoft.Win32; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace LockIE { public partial class For…
前两天去面试web developer,面试官提出一个问题,用JavaScript或者Python实现字符串反转,我选择了Python,然后写出了代码(错误的): #!/usr/bin/env python #-*-coding:utf-8-*- __author__ = 'ZhangHe' def reverse(s): l = 0 r = len(s) - 1 while l < r: s[l],s[r] = s[r],s[l] l += 1 r -= 1 return s 然后面试官问了两…
我经常用到urllib2这个库,基本上每次都要添加 User-Agent 为一个模拟浏览器的值. 突然想到,能不能直接修改源代码,添加 User-Agent 的值. google 到 https://docs.python.org/2/library/urllib2.html 其中有解释说: headers should be a dictionary, and will be treated as if add_header() was called with each key and val…
1. tzselect [root@xxxx etc]# tzselect --- 选择时区命令 Please identify a location so that time zone rules can be set correctly. Please select a continent or ocean. ) Africa ) Americas ) Antarctica ) Arctic Ocean ) Asia ) Atlantic Ocean ) Australia ) Europ…
注意:当前1.1.3版本的zepto,已经有模块来支持wp8 原先的zepto,通过__proto__赋值,来使dom继承到$.fn方法, 无奈IE11之前的IE10,IE9不支持这种写法, 所以我们只能自己手动把方法添加到dom // `$.zepto.Z` swaps out the prototype of the given `dom` array // of nodes with `$.fn` and thus supplying all the Zepto functions //…