小编Vic*_*nko的帖子

如何添加包含双引号和百分号的默认值的注册表项?

我无法成功运行包含此内容的批处理文件:

REG ADD HKEY_CLASSES_ROOT\hlpfile\shell\compress\command /d "compact.exe /C \"%1\"" /f

REG ADD HKEY_CLASSES_ROOT\hlpfile\shell\uncompress\command /d "compact.exe /U \"%1\"" /f
Run Code Online (Sandbox Code Playgroud)

它导致输出错误消息:

错误:无效的命令行参数.

我想在Windows XP SP2上创建上下文菜单元素并指定操作:

[HKEY_CLASSES_ROOT\hlpfile\shell\compress]

[HKEY_CLASSES_ROOT\hlpfile\shell\compress\command]
@="compact.exe /C \"%1\""

[HKEY_CLASSES_ROOT\hlpfile\shell\uncompress]

[HKEY_CLASSES_ROOT\hlpfile\shell\uncompress\command]
@="compact.exe /U \"%1\""
Run Code Online (Sandbox Code Playgroud)

批处理文件中的两个命令行有什么问题?

windows registry cmd batch-file

5
推荐指数
1
解决办法
1万
查看次数

Haskell 函数 foldl (\xy -> x*2 + y*2) 0 行为

我遇到了一个问题。这两个函数有什么区别:

foldl (\x y -> x*2 + y*2) 0 [1,2,3] = 22
foldr (\x y -> x*2 + y*2) 0 [1,2,3] = 34

foldl (\x y -> x*2 + y*2) 0 [1,2,3] ? f( f( f(0,1),2 ),3 )
foldr (\x y -> x*2 + y*2) 0 [1,2,3] ? f( 3,f( 2, f(1,0) ) )
Run Code Online (Sandbox Code Playgroud)

在哪里 f = \x y -> x*2 + y*2

我理解的结果foldl

x = f(0,1) = 2
y = f(x,2) = 8
z = f(y,3) …
Run Code Online (Sandbox Code Playgroud)

haskell fold

1
推荐指数
1
解决办法
533
查看次数

标签 统计

batch-file ×1

cmd ×1

fold ×1

haskell ×1

registry ×1

windows ×1