您好我已经注意到使用REST API获取内容的几种方法.虽然我想知道是否有办法直接从网址获取内容而不调用空格和标题.
如果我有意义http://localhost:8080/display/TST/myPage
而不是这样做
curl -u admin:admin -X GET "http://localhost:8080/confluence/rest/api/content?title=myPage&spaceKey=TST" | python -mjson.tool
我可以在其余的api上使用url.也许这样的事情
curl -u admin:admin -X GET "http://localhost:8080/confluence/rest/api/content/display/TST/myPage" | python -mjson.tool
有没有办法做到这一点?
这是我看过的文档
https://docs.atlassian.com/atlassian-confluence/REST/latest/#d3e865
我试图从网址获取一个csv文件,但似乎在一分钟后超时.csv文件是在请求时创建的,因此需要一分多钟.我试图增加超时但它没有工作,一分钟后它仍然失败.
我正在使用url,read.csv如下:
# Start the timer
ptm <- proc.time()
urlCSV <- getURL("http://someurl.com/getcsv", timeout = 200)
txtCSV <- textConnection(urlCSV)
csvFile <- read.csv(txtCSV)
close(txtCSV)
# Stop the timer
proc.time() - ptm
Run Code Online (Sandbox Code Playgroud)
结果日志:
Error in open.connection(file, "rt") : cannot open the connection
In addition: Warning message:
In open.connection(file, "rt") :
cannot open: HTTP status was '500 Internal Server Error'
user system elapsed
0.225 0.353 60.445
Run Code Online (Sandbox Code Playgroud)
当它达到一分钟时它会一直失败,可能是什么问题?或者我如何增加超时?
我在浏览器中尝试了网址并且工作正常,但加载csv需要一分多钟
我正在尝试使用MASS的write.matrix将矩阵写入.csv文件,但我遇到了一些问题.当我打印矩阵时,它看起来像这样
p q s S2 R2 R2adj Cp AIC PRESS
1 0 1 167.27779 27981.8583 NA NA 3679.294476 NA NA
2 1 2 160.32254 25703.3165 0.08866209 0.08142925 3343.909110 1666.993 3338167.3
3 1 2 86.73559 7523.0630 0.73326195 0.73114498 891.016823 1509.726 1045980.3
4 1 2 67.50458 4556.8690 0.83843145 0.83714916 490.815893 1445.555 693993.5
Run Code Online (Sandbox Code Playgroud)
但是当我这样做的时候
write.matrix(moDat2, file = paste(targetPath, "dat2.csv", sep="/"), sep=",")
它将它保存到这样的文件中
p,q,s,S2,R2,R2adj,Cp,AIC,PRESS
0.000000e+00,1.000000e+00,1.672778e+02,2.798186e+04, NA, NA,3.679294e+03, NA, NA
1.000000e+00,2.000000e+00,1.603225e+02,2.570332e+04,8.866209e-02,8.142925e-02,3.343909e+03,1.666993e+03,3.338167e+06
1.000000e+00,2.000000e+00,8.673559e+01,7.523063e+03,7.332620e-01,7.311450e-01,8.910168e+02,1.509726e+03,1.045980e+06
Run Code Online (Sandbox Code Playgroud)
无论如何,我可以将它保存到文件而不将数据转换为科学记数法吗?
我正在使用 gwt-maven-plugin 在 Maven 中构建 GWT 项目。
最近,我注意到一个类上有一个错误,其中在客户端类上调用了一些服务器代码。起初我以为gwt编译有问题(不包括这个类)。但后来我注意到它正在编译该类,并且在信息日志级别抛出错误。
[INFO] Tracing compile failure path for type 'com.mycompany.shared.IElement'
[INFO] Errors in 'jar:file:/Users/myuser/.m2/repository/com/mycompany/package/package-java/1.0.0-SNAPSHOT/package-java-1.0.0-SNAPSHOT-sources.jar!/com/mycompany/shared/IElement.java'
[INFO] Line 45: No source code is available for type com.mycompany.test.Tester; did you forget to inherit a required module?
Run Code Online (Sandbox Code Playgroud)
为什么这只是一个信息日志?为什么这不会破坏构建?我可以强制构建在出现此类错误时中断吗?
你好,我正在使用 MySQL 创建一个函数:
CREATE FUNCTION INSERTGROUP(name VARCHAR(50))
RETURNS INT
NOT DETERMINISTIC
BEGIN
DECLARE 'idGroup' INT;
IF (NOT EXISTS (SELECT groupID FROM groupsTable WHERE groupName = 'name'))
THEN INSERT INTO groupsTable (groupName) VALUES ('name');
SELECT groupID INTO 'idGroup' FROM groupsTable WHERE groupName='name';
RETURN 'idGroup';
END//
Run Code Online (Sandbox Code Playgroud)
但是当我尝试创建它时出现此错误:
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near
''idGroup' INT;
IF (NOT EXISTS (SELECT groupID …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Tomcat MVN插件将我的项目部署到Tomcat,但是我收到以下错误:
Uploading: http://localhost:8080/manager/text/deploy?path=%2FSample
Uploaded: http://localhost:8080/manager/text/deploy?path=%2FSample (90810 KB at 62283.7 KB/sec)
[ERROR] Tomcat return http status error: 404, Reason Phrase: Not Found
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
Run Code Online (Sandbox Code Playgroud)
pom中的插件配置
<build>
<plugins>
.
.
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<version>2.2</version>
</plugin>
.
.
.
Run Code Online (Sandbox Code Playgroud)
我没有在pom中设置Tomcat用户,因为在我的Tomcat配置中,我没有任何用户,需要保持这种方式.
当我手动将战争复制到tomcat文件夹"webapps"时,它没有任何问题.
我不知道遗失了什么......我尝试了以下但没有结果
部署到Tomcat时出错:tomcatManager状态码:404,ReasonPhrase:未找到 tomcatManager状态码:404,ReasonPhrase:Not Found