V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  codechaser  ›  全部回复第 7 页 / 共 25 页
回复总数  486
1 ... 3  4  5  6  7  8  9  10  11  12 ... 25  
2019-04-22 10:11:40 +08:00
回复了 jht 创建的主题 C vs code 运行 c 语言 task 提示系统找不到指定的路径
反正我用 vscode 调试都是 launch.json 里把 program 设置成要调试的 exe 的完整路径。把 preluanch 注释掉。每次点击 build 之后才去 debug。这样不会有稀奇古怪的问题。
2019-04-22 09:49:28 +08:00
回复了 Kuonji 创建的主题 Python 局部变量疑惑,为什么这里的不用 global
如果只是引用外层变量的话,是不需要 global 的。但是要是涉及到赋值时则需要使用 global,前提是那个全局变量已经被引入到了当前作用域。
```python
def f():
print(s)

#不会出错
s = "foo"
f()

def foo():
s = 100
print(s)

#也不会出错
foo()

def test():
print(s)
#这里会出错
s = 555
print(s)

test()
# local variable 's' referenced before assignment
```

> We only need to use global keyword in a function if we want to do assignments / change them. global is not needed for printing and accessing. Why? Python “ assumes ” that we want a local variable due to the assignment to s inside of f(), so the first print statement throws this error message. Any variable which is changed or created inside of a function is local, if it hasn ’ t been declared as a global variable. To tell Python, that we want to use the global variable, we have to use the keyword “ global ”, as can be seen in the following
2019-04-16 01:08:02 +08:00
回复了 codechaser 创建的主题 C 为什么总是显示我重定义?
@choury
@geelaw
@ysc3839
各位晚上好!我好像明白了,因为我在`frame.h`引用了`camera.h`,然后`map.h`里又引用了`frame.h`导致了重定义.我也明白了为啥放在 camera.cpp 里不会报错.但是为啥放在`camera.h`类定义里面不会报错呢?我试了一下,会报错,显示构造函数 can not be overloaded
2019-04-15 20:54:12 +08:00
回复了 codechaser 创建的主题 问与答 一共 10 队报名比赛,怎么安排赛制呢?
@c6h6benzene 现在又有一个队报名了,变成11个队了...
2019-04-15 20:36:57 +08:00
回复了 codechaser 创建的主题 问与答 一共 10 队报名比赛,怎么安排赛制呢?
@crazylinus 是个思路,谢谢!
2019-04-15 20:36:38 +08:00
回复了 codechaser 创建的主题 问与答 一共 10 队报名比赛,怎么安排赛制呢?
@c6h6benzene 你好!这个能公平吗?
2019-04-13 08:55:54 +08:00
回复了 codechaser 创建的主题 程序员 后缀为"tw"的域名是不是无法在国内访问啊?
@hhhsuan 去年有人说网路中文可以申请免费域名,我就申了一个,结果昨天用不能访问
2019-04-12 22:44:13 +08:00
回复了 codechaser 创建的主题 C C++里的`::`作用域运算符和`.`运算符怎么总感觉有点奇怪?
@wutiantong 百度一下只是习惯😁
2019-04-12 22:43:44 +08:00
回复了 codechaser 创建的主题 C C++里的`::`作用域运算符和`.`运算符怎么总感觉有点奇怪?
@GeruzoniAnsasu 感谢!因为之前主要用 python 和 java,最近转学 c++,照着写代码总感觉这个"::"充满不解😂
@Stevenv 死机了怎么换内核?
2019-04-08 21:16:21 +08:00
回复了 codechaser 创建的主题 程序员 coding.net 为什么进去就跳到腾讯云了?
@CodingNET coding 是没了吗?我不想升级到腾讯云啊。完全一致?这个腾讯云开发者平台用着是真的难受,还特么强制绑定微信,而且因为我对前端 web 不了解,想用 pages 搭个博客特别烦,完全没 coding 好。
2019-04-08 18:38:55 +08:00
回复了 codechaser 创建的主题 git 怎么消除`Merge & pull request`这个东西?
@ysc3839 我这样方便一点。因为这个是 hexo,master 分之放的是生成之后的 html。
2019-04-04 22:46:53 +08:00
回复了 codechaser 创建的主题 C C 中这样的代码块有什么作用?
@cherishxzh 谢谢!
2019-04-04 22:46:45 +08:00
回复了 codechaser 创建的主题 C C 中这样的代码块有什么作用?
@andyhuzhill 谢谢!想起来了!
2019-03-30 14:29:25 +08:00
回复了 codechaser 创建的主题 Visual Studio Code vscode 自动补全问题
@Trim21 我之前试了,但是这个快捷键在 ubuntu 里被搜狗拼音占了用来切换输入法。
2019-03-29 10:48:51 +08:00
回复了 plqws 创建的主题 分享创造 在 V 站众筹一款正在开发的 SSH 客户端: Termix
不错
2019-03-28 22:12:44 +08:00
回复了 codechaser 创建的主题 Linux clone 下来的仓库编译安装之后可以删掉吗?
@lwh0328 以 OpenCV 为例,官方教程都是源码编译安装。包管理器平常不都是 apt 之类的吗
1 ... 3  4  5  6  7  8  9  10  11  12 ... 25  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2770 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 36ms · UTC 10:08 · PVG 18:08 · LAX 03:08 · JFK 06:08
Developed with CodeLauncher
♥ Do have faith in what you're doing.