小编SIG*_*ULT的帖子

Makefile-获取传递给make的参数

我有一个像这样的makefile:

.SILENT: #don't echo commands as we run them.

###
# here, set $1 (in the latter bash script) to the first make arg.
# $2 to the second one.
# et cetera.
# ($0 being set properly is optional)
###

foo:
    echo "you passed to make: $1 $2 $3 $4 $5 $6"
Run Code Online (Sandbox Code Playgroud)

所以我可以做:

make foo
You passed to make: foo
Run Code Online (Sandbox Code Playgroud)

(不要告诉任何人,但我正在创建“给我做三明治”的东西)

makefile

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

curl 查询参数获取

我收到此 CURL 命令的错误,而在 Chrome DHC 应用程序上同样有效。我在这里错过了什么

[root@host125]# curl -sk -X 'GET' -H 'X-Auth-Token: [REDACTED]' -H 'Content-type: application/json' https://10.1.1.132/rest/rm-central/v1/recovery-sets?query="volumeType EQ 'vvol'"
{"badRequest": {"message": "QueryFilter Error :: Given Query Filter syntax 'query=' is not valid ", "code": 400}}
[root@host125]#
[root@host125]#
[root@host125]#
Run Code Online (Sandbox Code Playgroud)

curl get

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

大型数组上的Python MemoryError

这是我正在尝试运行的python脚本:

n = 50000000000 ##50 billion 
b = [0]*n
for x in range(0,n):
    b[x] = random.randint(1,899999)
Run Code Online (Sandbox Code Playgroud)

......但我得到的输出是:

E:\python\> python sort.py
Traceback (most recent call last):
  File "E:\python\sort.py", line 8, in <module>
    b = [0]*n
MemoryError
Run Code Online (Sandbox Code Playgroud)

那么,我现在该怎么办?

python memory

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

标签 统计

curl ×1

get ×1

makefile ×1

memory ×1

python ×1