V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  lxilu  ›  全部回复第 13 页 / 共 22 页
回复总数  435
1 ... 5  6  7  8  9  10  11  12  13  14 ... 22  
2020-10-11 00:19:58 +08:00
回复了 unii23i 创建的主题 生活 室友总带女朋友回家怎么办?
我迷惑了,你和室友组成的家?…?
2020-10-10 16:35:59 +08:00
回复了 raaaaaar 创建的主题 程序员 win10 下怎么设置修饰键位修改?
按快就坏了……又试了 AHK 好像没问题
2020-10-10 14:42:20 +08:00
回复了 raaaaaar 创建的主题 程序员 win10 下怎么设置修饰键位修改?
刚才试了,PowerToys 不用重按 Alt
微软 DeepCorder
按详细信息,签名有效吗
我看错了,测向没错
量纲 测向
Direction Finding 笑死我了,太不严肃了,想到无头苍蝇
我觉得 AR 更好
既有股票,其他交易市场也可
Intel DRNG
2020-10-05 10:36:39 +08:00
回复了 ufo22940268 创建的主题 分享发现 一个实时同步内置显示器亮度到外部显示器亮度的工具
系统没有亮度改变事件吗?再翻翻文档?
2020-10-04 22:53:35 +08:00
回复了 ganymedenil590 创建的主题 PHP PHP 7:真实世界的应用开发(中文翻译)
名叫 PHP,看着难受,只此一家别无分店
一般不会认为这是语吧,感觉成文 /成法 /惯用法更好,你这样好似句柄
2020-10-04 11:36:15 +08:00
回复了 Apol1oBelvedere 创建的主题 问与答 快速将 9.6GB 视频分割为 8Gb+1.6GB 的软件方便推荐吗?
糊了一个 PowerShell:
$file=$args[0];
.\ffmpeg -i "$file" -c copy -fs 8G "$file-1.mp4";
$dur=(.\ffmpeg.exe -i "$file-1.mp4" 2>&1|Select-String -SimpleMatch "Duration"|findstr "Duration").Split(',')[0].Split(' ')[3];
.\ffmpeg -i "$file" -c copy -ss $dur "$file-2.mp4";
成语?
#49 加拿大也配做帝国主义?[惊喜]
2020-10-03 20:24:42 +08:00
回复了 Apol1oBelvedere 创建的主题 问与答 快速将 9.6GB 视频分割为 8Gb+1.6GB 的软件方便推荐吗?
就两行命令啊
2020-10-03 20:08:02 +08:00
回复了 richards64 创建的主题 程序员 一个感觉难以理解的的 C#代码片段,想知道这是为什么
ECMA-334
5th Edition/December 2017
C# Language Specification

12. Expressions
12.16 Anonymous function expressions
12.16.6 Outer variables

If a for-loop declares an iteration variable, that variable itself is considered to be declared outside of the loop.
=> i 在 for 外
Any local variable, value parameter, or parameter array whose scope includes the lambda-expression or anonymous-method-expression is called an outer variable of the anonymous function.
=> i 也在匿名函数外
A local variable is considered to be instantiated when execution enters the scope of the variable.
=> i 仅一实例
When an outer variable is referenced by an anonymous function, the outer variable is said to have been captured by the anonymous function.
=> 匿名函数用了那唯一 i

标准里的例子:
░░static D[] F() {
░░░░D[] result = new D[3];
░░░░for (int i = 0; i < 3; i++) {
░░░░░░result[i] = () => { Console.WriteLine(i); };
░░░░}
░░░░return result;
░░}
only one instance of the iteration variable is captured, which produces the output:
░░3
░░3
░░3
2020-10-03 18:23:00 +08:00
回复了 richards64 创建的主题 程序员 一个感觉难以理解的的 C#代码片段,想知道这是为什么
[CompilerGenerated]
private sealed class a_0
{
public int i;

internal void <M>b__0()
{
Console.Write(string.Format("{0} ", i));
}
}

public void M()
{
Action[] array = new Action[4];
a_0 a_ = new a_0();
a_.i = 0;
while (a_.i < 4)
{
array[a_.i] = new Action(a_.<M>b__0);
a_.i++;
}
Action[] array2 = array;
for (int i = 0; i < array2.Length; i++)
{
array2[i]();
}
}

注:为便于观看有改名;编译器实现,准确见标准;来自 sharplab.io
1 ... 5  6  7  8  9  10  11  12  13  14 ... 22  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   927 人在线   最高记录 6543   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 36ms · UTC 22:32 · PVG 06:32 · LAX 15:32 · JFK 18:32
Developed with CodeLauncher
♥ Do have faith in what you're doing.