V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  aaaa007cn  ›  全部回复第 16 页 / 共 18 页
回复总数  353
1 ... 8  9  10  11  12  13  14  15  16  17 ... 18  
2014-11-28 22:09:21 +08:00
回复了 caizixian 创建的主题 Python 想用用 Python 3 也是挺难的
@ryd994
好在还有 git update-index --chmod=+x
2014-11-27 22:41:23 +08:00
回复了 hzqim 创建的主题 问与答 DNS 能否直接进行端口重定向?
$ curl http://bbs.leowood.net/ -v
* About to connect() to bbs.leowood.net port 80 (#0)
* Trying 58.176.229.230... connected
* Connected to bbs.leowood.net (58.176.229.230) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.16.3 (i686-pc-linux-gnu) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3
> Host: bbs.leowood.net
> Accept: */*
>
< HTTP/1.1 302 Object moved
< Date: Thu, 27 Nov 2014 14:34:39 GMT
< Server: Microsoft-IIS/6.0
< X-Powered-By: ASP.NET
< Location: http://bbs.leowood.net:88/
< Content-Length: 147
< Content-Type: text/html
<
<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found <a HREF="http://bbs.leowood.net:88/">here</a>.</body>

那个例子是先请求 80 端口然后 302 到 88 端口
2014-11-27 22:32:50 +08:00
回复了 caizixian 创建的主题 Python 想用用 Python 3 也是挺难的
@ryd994
不过这还得先 chmod +x 啊……
我现在也是这么做的
python 在 windows 下也有支持 shebang 的 py.exe
https://www.python.org/dev/peps/pep-0397
2014-11-27 22:09:43 +08:00
回复了 riophae 创建的主题 问与答 关于在网页设计中选择使用微软雅黑还是微软正黑的问题
记得雅黑的字和宇在某些场合下会被混淆
就去搜了当年的讨论
http://g.mozest.com/thread-27050-1-1
看到 wikipedia 上也列了不少问题
https://zh.wikipedia.org/zh/微软雅黑
2014-11-27 21:50:25 +08:00
回复了 xdf331 创建的主题 SSL 为何有那么多网站使用 DigiCert 的证书?
http://w3techs.com/technologies/overview/ssl_certificate/all

不过我常去的网站大部分都是 DigiCert 的证书
其中大半还是 EV 证书
2014-11-26 00:00:55 +08:00
回复了 egen 创建的主题 V2EX https 页面使用 http 资源导致的 https 告警
@wwqgtxx 可是这 12306 的证书是搞什么
一开始我还以为是打开方式不对 233
2014-11-25 23:09:12 +08:00
回复了 llhh 创建的主题 问与答 请教下下面这个表( mysql)可否生成一张折线图呢?
无所谓
具体看你的前端

如果是在浏览器中查看
那么可以选择任意 javascript、flash 实现的库
根据文档用 python 输出相应的格式
比如我有个监控 ping 的 django 项目就是用 d3.js 来画图的
数据是用 python 输出的纯文本 tsv 制表符分隔

如果想用 python 直接生成图片
搜了一下,有相当多的库可选
https://wiki.python.org/moin/NumericAndScientific/Plotting
不过我没用过不了解哪个更适合什么场合
另外 google 也有个 image chart api
根据格式 post 数据过去就可以返回图片了
2014-11-25 21:36:03 +08:00
回复了 csensix 创建的主题 问与答 关于 curl 页面跳转的疑惑
突然想到该不会是
浏览器访问你的服务器
在你的服务器上模拟登录远程服务器
然后你的 php 把远程服务器的 js 跳转代码发回浏览器
导致浏览器跟着 js 跳转了
没法继续执行之前那个 php 中的 login_post 之后的语句?

所以你的问题其实是如何让 php 不直接输出 curl 远程服务器的结果?
那就是 @momaer 说的 CURLOPT_RETURNTRANSFER 改为 true
之后也不用提取 href 了
2014-11-25 21:14:52 +08:00
回复了 egen 创建的主题 V2EX https 页面使用 http 资源导致的 https 告警
@wwqgtxx
@jasontse
@egen

使用 114.114.114.114 解析 ww3.sinaimg.cn 拿到 122.228.117.169
$ curl https://122.228.117.169/large/ad14ad59jw1emnimmgt62j20k00zk0ux.jpg -v -I -k
* Server certificate:
* subject: C=CN; ST=Beijing; L=Beijing; O=Sina.com Technology(China)Co.,ltd; OU=Sina.com Technology(China)Co.,ltd; CN=*.sinaimg.cn
* start date: 2014-06-25 00:00:00 GMT
* expire date: 2016-06-24 23:59:59 GMT
* common name: *.sinaimg.cn (does not match '122.228.117.169')
* issuer: C=US; O=GeoTrust Inc.; CN=GeoTrust SSL CA - G2
* SSL certificate verify result: unable to get local issuer certificate (20), continuing anyway.
这次的证书终于对了……
2014-11-25 20:50:21 +08:00
回复了 JackNo1 创建的主题 问与答 关于局域网网站的证书和载入速度问题
因为 OCSP 需要连接外网服务器做验证?
ctrl + shift + j 打开 browser console
然后勾选 net -> log
观察在哪些请求上卡住了
或许更简单粗暴的就是直接尝试在外网连不上时禁用 OCSP 看效果
2014-11-25 20:26:57 +08:00
回复了 egen 创建的主题 V2EX https 页面使用 http 资源导致的 https 告警
@egen

从日本某服务器
> curl https://ww3.sinaimg.cn/large/628ab35egw1emngb8igz4j20kn0dpwfy.jpg -I -v -k
* Server certificate:
* subject: /C=CN/O=Sinorail Certification Authority/OU=\x94\xC1\x8D\xEF[\xA2b7g\x0DR\xA1N-_\xC3/CN=kyfw.12306.cn
* start date: 2014-05-26 01:44:36 GMT
* expire date: 2019-05-25 01:44:36 GMT
* common name: kyfw.12306.cn (does not match 'ww3.sinaimg.cn')
* issuer: /C=CN/O=Sinorail Certification Authority/CN=SRCA
< HTTP/1.1 200 OK
这证书……
本地电信也一样是这张证书

另一个日本 ip
> curl https://ww3.sinaimg.cn/large/628ab35egw1emngb8igz4j20kn0dpwfy.jpg -I -v -k
* Server certificate:
* subject: C=SG; ST=Some-State; L=Singapore; O=Thunderbird CDN; CN=Thunderbird CDN
* start date: 2011-11-09 21:54:17 GMT
* expire date: 2012-11-08 21:54:17 GMT
* issuer: C=SG; ST=Some-State; L=Singapore; O=Thunderbird CDN; CN=Thunderbird CDN
* SSL certificate verify result: self signed certificate (18), continuing anyway.
< HTTP/1.1 404 Not Found
自签 + 过期 + 404

aws
> curl https://ww3.sinaimg.cn/large/628ab35egw1emngb8igz4j20kn0dpwfy.jpg -I -v -k
* Server certificate:
* subject: CN=ssl.cdngc.net,O=CDNetworks Inc.,L=San Jose,ST=California,C=US
* start date: Feb 17 00:00:00 2014 GMT
* expire date: Mar 09 12:00:00 2016 GMT
* common name: ssl.cdngc.net
* issuer: CN=DigiCert High Assurance CA-3,OU=www.digicert.com,O=DigiCert Inc,C=US
< HTTP/1.1 403 Forbidden
403
2014-11-25 19:59:27 +08:00
回复了 llhh 创建的主题 问与答 请教下下面这个表( mysql)可否生成一张折线图呢?
1、ok
2、要省事,直接输出相应的格式喂给 google chart api、d3.js 之类
2014-11-25 19:52:48 +08:00
回复了 JackNo1 创建的主题 问与答 关于局域网网站的证书和载入速度问题
@metas 可以运行,没有大问题
@letv 的意思可能是你没注意到系统的权限问题
比如在 win7 下并且 c 盘是系统盘
不给 python 提权(以管理员权限运行)默认是没法往系统盘 c 盘根目录写文件的
2014-11-22 17:55:29 +08:00
回复了 tommark 创建的主题 Python python 正则提取一个字符串时如何只返回字符串而不返回边界?
@decken
RTFM
https://docs.python.org/3/library/re.html#re.sub
> Backreferences, such as \6, are replaced with the substring matched by group 6 in the pattern.
> In string-type repl arguments, in addition to the character escapes and backreferences described above, \g<name> will use the substring matched by the group named name, as defined by the (?P<name>...) syntax. \g<number> uses the corresponding group number; \g<2> is therefore equivalent to \2, but isn’t ambiguous in a replacement such as \g<2>0. \20 would be interpreted as a reference to group 20, not a reference to group 2 followed by the literal character '0'. The backreference \g<0> substitutes in the entire substring matched by the RE.
2014-11-21 22:44:50 +08:00
回复了 hccbook 创建的主题 问与答 发现 Python 中一个模块需要修正,请问如何提交修改
2014-11-20 21:41:16 +08:00
回复了 papatoytoy 创建的主题 问与答 大家访问 TechCruch 能看到图片么?
这里有几个问题
1. 部分域名被 dns 污染,比如前几天的 *.wp.com、*.rpcdn.com
2. 部分域名被 reset,比如 *.files.wordpress.com
3. ISP 出国线路问题,比如中国电信,导致图片加载时间过长最终超时失败
4. 部分图片用了 lazyload,需要开启 javascript 才能正确显示,配合上面 3 点,雪上加霜
刚才看了下 techcrunch.cn 的图片已经改域名了
解析是没问题了
但是加载速度仍然惨不忍睹
终极解决方法就是找一条不受干扰的线路去访问

另外,如果用了浏览器的反广告扩展,检查下有没有误杀
不知道为什么一开始会想到后缀树……
刚才想了下
这不是有向图的遍历问题么
然后看到更新
又糊涂了
假设有
A-B-C-D
A-B-C-E
A-F-C-G
那么输入 3|C 输出应该是什么?
那个“同一层级下不能有相同的名字”的前提是问题中已经确定的还是你自己假设的?
1 ... 8  9  10  11  12  13  14  15  16  17 ... 18  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   2172 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 28ms · UTC 10:43 · PVG 18:43 · LAX 03:43 · JFK 06:43
Developed with CodeLauncher
♥ Do have faith in what you're doing.