我无法成功运行包含此内容的批处理文件:
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)
批处理文件中的两个命令行有什么问题?
我遇到了一个问题。这两个函数有什么区别:
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)