小编luc*_*cyb的帖子

使用cURL查看文件内容

我正在尝试找出使用 cURL 和 get 在命令提示符中显示文件(文本文件)内容的命令。我有正确的命令,但现在我似乎无法获得正确的语法来显示正确的文件信息:

curl -g 主机:端口@文件路径curl -d 文件名-g 主机:端口

我尝试了上述方法的许多变体,并查阅了 cURL 手册:

https://curl.haxx.se/docs/manpage.html

和其他 SO 资源...这里只需要一点提升,因为我有正确的语法,但现在花了几个小时试图获得正确的术语。

curl command cmd get prompt

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

Prolog Family Tree,表兄弟问题

我试图在我的prolog程序中列出特定人的所有表兄弟,但似乎无法让它工作.我检查了我的代码,看起来是正确的,但我没有得到我想要的输出.

father(john, johnny).
father(john, peter).
father(josh, william).
father(simone, betty).

mother(mary, johnny).
mother(mary, peter).
mother(catherine, william).
mother(kate, betty).

parent(A,B) :- father(A,B).
parent(A,B) :- mother(A,B).

siblings(B,G) :- parent(P,B), parent(P,G), B\=G.
cousins(X,Y) :- parent(A,X), parent(B,Y), siblings(A,B), X\=Y. 
Run Code Online (Sandbox Code Playgroud)

我希望当我查询cousins(X, william).返回2个表兄弟但我只是作为回报得到假.我究竟做错了什么?

编辑:继承人我现在拥有的,但只能得到1表兄弟

father(grandpa1, mary).
father(grandpa1, catherine).
father(grandpa2, john).
father(grandpa2, simone).
father(john, johnny).
father(john, peter).
father(josh, william).
father(simone, betty).

mother(grandma1, mary).
mother(grandma1, catherine).
mother(grandma2, john).
mother(grandma2, simone).
mother(mary, johnny).
mother(mary, peter).
mother(catherine, william).
mother(kate, betty).

parent(A,B) :- father(A,B).
parent(A,B) :- mother(A,B).

siblings(B,G) :- parent(P,B), …
Run Code Online (Sandbox Code Playgroud)

prolog

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

标签 统计

cmd ×1

command ×1

curl ×1

get ×1

prolog ×1

prompt ×1