小编Mor*_*itz的帖子

GitLab Runner 突然无法使用 Docker Machine 和 AWS Autoscaling 运行作业

我使用 GitLab Runner 在 AWS EC2 Spot 实例上运行 CI 作业,并使用 Docker Machine 的自动缩放功能。

突然,今天 GitLab CI 无法运行作业,并向我显示了我想要启动的所有作业的以下作业输出:

Running with gitlab-runner 14.9.1 (f188edd7)
  on AWS EC2 runner ...
Preparing the "docker+machine" executor
10:05
ERROR: Preparation failed: exit status 1
Will be retried in 3s ...
ERROR: Preparation failed: exit status 1
Will be retried in 3s ...
ERROR: Preparation failed: exit status 1
Will be retried in 3s ...
ERROR: Job failed (system failure): exit status 1
Run Code Online (Sandbox Code Playgroud)

我在 AWS 控制台中看到 EC2 …

amazon-web-services docker gitlab-ci gitlab-ci-runner docker-machine

18
推荐指数
1
解决办法
6810
查看次数

如何将@ConfigurationProperties 与记录一起使用?

Java 16 引入了Records,这有助于在编写携带不可变数据的类时减少样板代码。当我尝试@ConfigurationProperties如下使用 Record as bean 时,我收到以下错误消息:

@ConfigurationProperties("demo")
public record MyConfigurationProperties(
        String myProperty
) {
}
Run Code Online (Sandbox Code Playgroud)
***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of constructor in com.example.demo.MyConfigurationProperties required a bean of type 'java.lang.String' that could not be found.
Run Code Online (Sandbox Code Playgroud)

如何使用 Records as @ConfigurationProperties

java spring spring-boot java-16

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

如何在 M1 Macbook 上编译 OpenJDK 11?

我想为 M1 MacBook 编译 OpenJDK 11。

首先,我尝试使用 Zulu JDK,但我没有找到编译它的方法。

然后,我尝试在 M1 上尝试编译 OpenJDK,但是当我运行sh configure.

错误是:

配置:目标中测试的位数 (64) 不同于预期在目标中找到的位数 (32) 配置:错误:无法继续。

那么,我该如何编译它呢?

java java-11 openjdk-11

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

海龟:“rdf:type”和“a”之间的区别

我试图找出以下之间的区别:

<#blabla> rdf:type owl:Class
Run Code Online (Sandbox Code Playgroud)

和:

<#blabla> a owl:Class
Run Code Online (Sandbox Code Playgroud)

只是a一个捷径吗rdf:type

rdf semantic-web ontology rdfs turtle-rdf

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

有没有办法在 Pandas 中自定义清理一行?

我是 Pandas 的新手,我试图用它来清理由索引、艺术品标题和艺术品维度组成的数据库。

我所拥有的是:

db1 = {'title' : ['121 art1 magic world 100x82 2000.jpg', '383 art2 fantastic comic 61x61 2017.jpg']}
Run Code Online (Sandbox Code Playgroud)

我需要的是

db2 = {'index': [121,383],
       'title' : ['art1 magic world', 'art2 fantastic comic'],
       'dimension': ['100x82','61x61']
       'year': [2000, 2017]

Run Code Online (Sandbox Code Playgroud)

我尝试过的失败:

  • str.split(expand=True)方法,df = pd.DataFrame(dict)但我被困在标题由许多单词组成的事实中。

  • .replace()清洁方法, df['title']但我确信有最佳实践。

能否请你帮忙?提前致谢。

python regex pandas

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