上一页 1 2 3 4 5 6 7 ··· 19 下一页

2017年12月15日

ruby http爬虫中的 :body 用法问题

摘要: 引用perl6 中的 User-agent模块中的一段文本: 原文出处: https://github.com/sergot/http-useragent/blob/master/lib/HTTP/Request.pm6 perl6中, http-useragent中的 add-form-data 阅读全文

posted @ 2017-12-15 23:24 Perl6 阅读(752) 评论(0) 推荐(0) 编辑

2017年9月16日

ruby post json

摘要: require 'net/http' require 'json' uri = URI('http://localhost/test1.php') req = Net::HTTP::Post.new uri content = {name:'root',password:'password'} req.body = content.to_json http = Net::HTTP.start(u... 阅读全文

posted @ 2017-09-16 03:04 Perl6 阅读(219) 评论(0) 推荐(0) 编辑

2017年9月10日

perl6正则 6: 大小写/空白/匹配所有符合

摘要: 这个 :g 只能写在外面 m:g /re/ 阅读全文

posted @ 2017-09-10 05:43 Perl6 阅读(722) 评论(0) 推荐(0) 编辑

perl6正则 5: [ ] / | / ||

摘要: 也就是可以把多种要匹配的写进[ ] 中, 第种用 | 分开就行了。 | 与 || 有差别 |的话, 当匹配位置 相同时, 会取最长的, 而 || , 当前面的匹配成功, 后面的就不会再去匹配。 注意 [] 跟 <[]> 是不同的: 阅读全文

posted @ 2017-09-10 05:23 Perl6 阅读(372) 评论(0) 推荐(0) 编辑

2017年9月8日

linux 下 genymotion 模拟器不能安装app

摘要: 提示: "应用未安装" 解决方法: 下载: Genymotion-ARM-Translation_v1.1.zip 进入genymotion 的tools用adb传进去: ./adb push Genymotion-ARM-Translation_v1.1.zip /mnt/sdcard 利用she 阅读全文

posted @ 2017-09-08 14:28 Perl6 阅读(507) 评论(0) 推荐(0) 编辑

2017年8月29日

目录扫描编写

摘要: use HTTP::UserAgent; my $fp = open 'result.txt', :w; my @threads; #控制线程数目 sub MAIN (Str $ip, Str $dict) { # #判断是否是文件 if $dict.IO.f { #不要把文件一次进数组, 一行一行读就行 ... 阅读全文

posted @ 2017-08-29 12:40 Perl6 阅读(304) 评论(0) 推荐(1) 编辑

控制并发数量

摘要: 每 4 个线程, 就先等待返回线程返回。 里面的grep为了提取已完成的, 未完成的就再保存。 阅读全文

posted @ 2017-08-29 12:08 Perl6 阅读(378) 评论(0) 推荐(0) 编辑

多线程中的超时, 如Socket超时

摘要: anyod里面的线程如果有一个返回 kept时, 就马上返回, 设置超时时间为 $timeout 后, 当第一个 Promise.in($timeout) 时间到达时会返回, 里面的 Socket就不能继续运行了。 阅读全文

posted @ 2017-08-29 11:31 Perl6 阅读(363) 评论(0) 推荐(0) 编辑

Supply

摘要: Supplier创建一个Supply Supply有tap或emit方法。 可以这样理解: Supplier创建一个工厂 Supply 用tap创建流水线 emit向流水线上传送加工品进行加厂 阅读全文

posted @ 2017-08-29 11:27 Perl6 阅读(254) 评论(0) 推荐(0) 编辑

2017年8月27日

Perl6多线程4: Promise allof / anyof

摘要: allof : 所有代码块执行完成后才退出 anyof :只要有一个代码块执行完后就马上退出 要配合 await 一起用: 这个代码, 只会打印出: a 这个代码会打印出: a, b 阅读全文

posted @ 2017-08-27 15:32 Perl6 阅读(219) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 19 下一页

导航