小编Bla*_*ght的帖子

aria2c可以下载每个具有特定文件名的网址列表吗?

例如,我有一个URL列表:

https://link.com/file/get/somefile.ext
https://go.com/download/anotherfile.ext
https://program.com/selection/download.php?id=26162
Run Code Online (Sandbox Code Playgroud)

我想为最后一个URL设置一个特定的名称,如下所示:

https://program.com/selection/download.php?id=26162 -o thirdfile.ext
Run Code Online (Sandbox Code Playgroud)

是否可以使用aria2c下载列表语法?

我知道我可以这样做:

aria2c https://link.com/file/get/somefile.ext
aria2c https://go.com/download/anotherfile.ext
aria2c https://program.com/selection/download.php?id=26162 -o thirdfile.ext
Run Code Online (Sandbox Code Playgroud)

但是这样我运行的aria2c太多了.._.

download aria2

10
推荐指数
2
解决办法
5460
查看次数

为什么列表不能用作字典键?

我想有一个列表,它是字典中的一个键,定义如下:

data = { 
  [24,48,96]: ["QN.FN.EQ", "OT.AR.LN", "BL.VL.TR"] 
}
Run Code Online (Sandbox Code Playgroud)

这不起作用......错误说因为"列表类型不可清除......".

有没有解决方法?为了能够从这个字典中获取数据,如下所示:

data[[24,48,96]] # => ["QN.FN.EQ", "OT.AR.LN", "BL.VL.TR"]
Run Code Online (Sandbox Code Playgroud)

我现在唯一的解决方案是 - 将列表转换为字符串并使用字符串作为键.

data = { 
  "24,48,96": ["QN.FN.EQ", "OT.AR.LN", "BL.VL.TR"] 
}
arr = [24,48,96]
print(data[','.join(map(str,arr))])
Run Code Online (Sandbox Code Playgroud)

python dictionary

4
推荐指数
2
解决办法
166
查看次数

Koa每次发送状态404是

export async function getPlaces(ctx, next) {
    const { error, data } = await PlaceModel.getPlaces(ctx.query);
    console.log(error, data);
    if (error) {
        return ctx.throw(422, error);
    }
    ctx.body = data;
}
Run Code Online (Sandbox Code Playgroud)

Koa 每次都会发送 404 状态和空正文,我做错了什么?

node.js koa koa-router koa2

3
推荐指数
2
解决办法
5861
查看次数

有什么方法可以使用LINQ吗?

我有一个foreach循环,我想用LINQ做

foreach (int i in indexes)
{
    char[] ch = new char[1];
    input.CopyTo(i, ch, 0, 1);
    chars.Add(ch[0]);
}
Run Code Online (Sandbox Code Playgroud)
  • indexes是一个整数列表
  • chars是一个字符列表
  • input是一个字符串

.net c# linq

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

对 vim 正则表达式中的 `\?` 很困惑

我一直在尝试在vim中进行简单的替换,并发现vim中的 不能与或 一起\?使用,也就是说,在vim中:*+(NFA regexp) Can't have a multi follow a multi

i want it to stop here, not here
~
~
~
[NORMAL] ...
:%s/^\(.*\?\)here//
Run Code Online (Sandbox Code Playgroud)

如果我删除\?它,它可以工作,但它的正则表达式最多匹配 2nd here

但使用普通的正则表达式它可以工作:https ://regex101.com/r/iHdxxl/1

为什么不能\?与vim 一起使用*\+在 vim 中使用?

regex vim

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

标签 统计

.net ×1

aria2 ×1

c# ×1

dictionary ×1

download ×1

koa ×1

koa-router ×1

koa2 ×1

linq ×1

node.js ×1

python ×1

regex ×1

vim ×1