摘要:##mysql distinct field1,field2,field3, .... from table我们知道 这样的sql可以去掉重复项 (field1的重复项);>select distinct field1 from table1;但是,常常我们的需求是这样子的:select * fr...
阅读全文
07 2015 档案
摘要:## jsoup 使用总结4--高级用法之 script js 脚本 大部分时候,我们使用jsoup解析网页的时候,都是直接找到某一类元素,或者按某种selector查询;具体使用方法可以参考[jsoup](http://jsoup.org/)官网文档那么你有没有实际操作过,查找script js ...
阅读全文
摘要:## jsoup 使用总结3--高级用法之 not大部分时候,我们使用jsoup解析网页的时候,都是直接找到某一类元素,或者按某种selector查询;具体使用方法可以参考[jsoup](http://jsoup.org/)官网文档例子代码: String html = "An exa...
阅读全文
摘要:## jsoup 使用总结2--高级用法之 :gt(n)大部分时候,我们使用jsoup解析网页的时候,都是直接找到某一类元素,或者按某种selector查询;具体使用方法可以参考[jsoup](http://jsoup.org/)官网文档部分html代码: 真相 今日头条 ...
阅读全文
摘要:## jsoup 使用总结1--添加header大部分时候,我们使用jsoup解析网页的是否都是直接Jsoup.connect(url); 孰不知,我们可以添加header,例如 Host, Referer 等下面是代码: Document doc = Jsoup.connect("h...
阅读全文
摘要:## require './ex25' can't load such file在练习learn ruby the hard way时候,第25题,发生了一下错误 LoadError: cannot load such file -- ./ex25 from /Users/yutu04/.rvm/r...
阅读全文
摘要:## ruby the diference between gets and gets.chomp() 二者都是可以获取用户命令行输入的函数,但是 gets获取内容后,后面 附带了 多余的换行符号'\n'; 而gets.chomp() 是对后面多余的换行符'\n' 进行清除。例如 ex11.rb:...
阅读全文
摘要:## goquery 添加header 发起请求我们知道使用net/http 很容易发起GET or POST 请求;并且在发起http请求时候,可以很容易的对header进行干预例如: client := &http.client{} request, err := http.NewReques...
阅读全文
摘要:## golang 二进制转十进制实现方式直接上代码 package main import ( "fmt" "math" ) func StringToIntArray(input string) []int { output := []int{} for _, v := ran...
阅读全文
摘要:## mysql select column default value if is null SELECT `w`.`city` AS `city`, `w`.`city_en` AS `city_en`, `w`.`date_y` ...
阅读全文
摘要:## 忘记MySQL root密码解决方法,基于Ubuntu 14.10忘了mysql密码,从网上找到的解决方案记录在这里。编辑mysql的配置文件/etc/mysql/my.cnf,在[mysqld]段下加入一行“skip-grant-tables”。
浙公网安备 33010602011771号