V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  whoami9894  ›  全部回复第 16 页 / 共 34 页
回复总数  661
1 ... 12  13  14  15  16  17  18  19  20  21 ... 34  
2019-05-08 23:03:54 +08:00
回复了 liulaomo 创建的主题 Go 编程语言 Go 语言中关于断行规则的一个细节
> switch 代码块中开大括号{前的比较表达式可以省略,其默认值为 true

这句话的含义是?

```
switch {
case true:
xx
case false:
xx
}

switch a{
case 1:
xx
case 2:
xx
}
```

只有第一种类似 cond 的语义可以忽略吧
2019-05-08 13:04:23 +08:00
回复了 sunhk25 创建的主题 Python Python 字符串替换效率 replace> re.sub
@sunhk25
用 abc 做变量名和用 str 做变量名可不是一回事
youke812726
2019-05-07 12:52:08 +08:00
回复了 wzw 创建的主题 问与答 Python 代码加密的 pyprotect 有人用过吗? 进来说说效果吧
不了解,但不可逆应该不至于吧。uncompyle 反编译后即使被混淆也可以慢慢还原
2019-05-04 10:15:02 +08:00
回复了 29EtwXn6t5wgM3fD 创建的主题 程序员 Firefox 证书过期导致插件全炸
已将 FF 书签导出到 Chrome,再见 FF :)
2019-04-29 18:04:48 +08:00
回复了 EridanusSora 创建的主题 Node.js 有什么办法让 Node 里发起的请求的 DNS 请求走 Socks 代理
@whoami9894
我明白 lz 的意思了…… socks5 的控制报文里写域名,让 socks5 server 拿到后去解析
2019-04-29 16:29:31 +08:00
回复了 codechaser 创建的主题 问与答 真心请教关于阅读源码的问题
从 v0.1 的源码看起
2019-04-29 16:23:44 +08:00
回复了 EridanusSora 创建的主题 Node.js 有什么办法让 Node 里发起的请求的 DNS 请求走 Socks 代理
udp 包为什么会走应用层代理
2019-04-26 20:17:44 +08:00
回复了 xq1309583 创建的主题 Python 基于模糊测试的 XSS 漏洞检测有人会吗?
去 github 搜索关键字 xss fuzz 能有一堆
2019-04-26 00:59:59 +08:00
回复了 tail2 创建的主题 程序员 毕设网站防篡改系统老师说我难度不够?
没看懂防篡改到底要干嘛,防存储 XSS 插入恶意前端代码?防上传后端可执行代码?还是防 mitm 导致客户端拿到的代码被篡改?
而且 watchdog 貌似就是监控目录下文件变动吧,所以就是我说的第二种。。感觉意义不大。。。而且监控其他服务器的 web 目录要先有权限吧,那到头来还是和本机没啥区别
2019-04-26 00:31:52 +08:00
回复了 thomaswang 创建的主题 问与答 这段 go 代码如何理解
@mengzhuo
不太了解 goroutine 的调度机制,如果是多核多调度器是有可能打印出非十个 10 吧
2019-04-25 18:15:23 +08:00
回复了 whoami9894 创建的主题 问与答 Linux 中如何解析一个带有下划线的域名
@ysc3839
@dog
不好意思,已 append 修改为`ss_.cors.example.com`
2019-04-25 17:03:36 +08:00
回复了 whoami9894 创建的主题 问与答 Linux 中如何解析一个带有下划线的域名
@xcai
exp.com 是举个栗子...没想到真有这个站
2019-04-25 17:02:22 +08:00
回复了 whoami9894 创建的主题 问与答 Linux 中如何解析一个带有下划线的域名
@dog
您说的我没理解...是 ping 返回了 unknown host,网络层协议为什么会有 404 响应。我在 Windows 下 ff, chrome, curl 都是可以的
len 不就是个 duck typing 吗,跟 Java 一个静态类型的拉到一起比啥……
仅仅是函数和方法的区别,而且这个函数内部还是调用了方法,确定这叫化繁为简?
2019-04-22 11:34:54 +08:00
回复了 whoami9894 创建的主题 问与答 求助,有 V 友了解 J 语言吗
@cpdyj0
不像 lisp,连))))))))))都没有,要说有点像 haskell
@ccraohng
JS,type==type 感觉是笔误而已

@jxf2008
?从哪儿看出长得像的?你确定你用过 Python 吗
2019-04-14 17:12:01 +08:00
回复了 hahaayaoyaoyao 创建的主题 JavaScript Js 写了一个 “狼吃羊” 小游戏。
想起我最开始上学习的 VB 课,最后的大作业一个游戏就是这样的风格

```vb
If keyascii = 119 Then
Image1.Top = Image1.Top - 200
End If
If keyascii = 115 Then
Image1.Top = Image1.Top + 200
End If
If keyascii = 97 Then
Image1.Left = Image1.Left - 200
End If
If keyascii = 100 Then
Image1.Left = Image1.Left + 200
End If
If keyascii = 32 Then
If Image3(4).Visible = False Then
Call m3
Else
Call m1
WindowsMediaPlayer1.Enabled = False
Image3(i).Visible = False
i = i + 1
If i = 5 Then i = 0
If Abs((Image1.Left + Image1.Width / 2) - (Image2.Left + Image2.Width / 2)) <= Image2.Width / 3 And Abs((Image1.Top + Image1.Height / 2) - (Image2.Top + Image2.Height / 2)) <= (9 / 10) * Image2.Height Then
If Image2.Picture = Image4.Picture Then
p = 1
Else
a = a - 1
Label2.Caption = a
End If
Image2.Picture = Image4.Picture
End If
If Abs((Image1.Left + Image1.Width / 2) - (Image11.Left + Image11.Width / 2)) <= Image11.Width / 3 And Abs((Image1.Top + Image1.Height / 2) - (Image11.Top + Image11.Height / 2)) <= (9 / 10) * Image11.Height Then
If Image11.Picture = Image12.Picture Then
p = 1
Else
a = a - 1
Label2.Caption = a
End If
Image11.Picture = Image12.Picture
Timer1.Enabled = False
End If
If Abs((Image1.Left + Image1.Width / 2) - (Image7.Left + Image7.Width / 2)) <= Image7.Width / 3 And Abs((Image1.Top + Image1.Height / 2) - (Image7.Top + Image7.Height / 2)) <= (9 / 10) * Image7.Height Then
If Image7.Picture = Image13.Picture Then
p = 1
Else
a = a - 1
Label2.Caption = a
End If
Image7.Picture = Image13.Picture
End If
If Abs((Image1.Left + Image1.Width / 2) - (Image8.Left + Image8.Width / 2)) <= Image8.Width / 3 And Abs((Image1.Top + Image1.Height / 2) - (Image8.Top + Image8.Height / 2)) <= (9 / 10) * Image8.Height Then
If Image8.Picture = Image14.Picture Then
p = 1
Else
a = a - 1
Label2.Caption = a
End If
Image8.Picture = Image14.Picture
End If
If Abs((Image1.Left + Image1.Width / 2) - (Image9.Left + Image9.Width / 2)) <= Image9.Width / 3 And Abs((Image1.Top + Image1.Height / 2) - (Image9.Top + Image9.Height / 2)) <= (9 / 10) * Image9.Height Then
If Image9.Picture = Image15.Picture Then
p = 1
Else
a = a - 1
Label2.Caption = a
End If
Image9.Picture = Image15.Picture
Image9.Move 15000
Timer2.Enabled = True
End If
```
祝平安
2019-04-10 18:48:05 +08:00
回复了 nvksie 创建的主题 Python 请问,这是 Python 的 bug 吗?
是的,这是解释器的 bug,楼主快去社区反馈
1 ... 12  13  14  15  16  17  18  19  20  21 ... 34  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   901 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 34ms · UTC 19:32 · PVG 03:32 · LAX 12:32 · JFK 15:32
Developed with CodeLauncher
♥ Do have faith in what you're doing.