我不久前在RVM上安装了几个版本的Ruby解释器.我如何更新它,因为新版本已经发布?
我发现只有一种方式:rvm install 1.9.2-rc1 && rvm remove 1.9.2-preview1
但我的宝石丢失了.我可以不时更新分支机构吗?我没有在文档中找到任何提示.
我正在使用Rails,Puma,Capistrano3.我也安装了宝石capistrano3-puma
.我和Puma Jungle一起创办了Puma https://github.com/puma/puma/tree/master/tools/jungle/upstart
如何在部署期间重新启动Puma?
我有这个代码:
task fatJar(type: Jar) << {
manifest {
attributes 'Implementation-Title': 'Gradle Jar File Example',
'Implementation-Version': version,
'Main-Class': 'mvc.MvcMain'
}
baseName = project.name + '-all'
with jar
}
Run Code Online (Sandbox Code Playgroud)
我收到了这个警告:
在任务执行时配置复制任务的子规范已被弃用,并计划在Gradle 4.0中删除.请考虑在配置时配置规范,或使用单独的任务进行配置.在build_b2xrs1xny0xxt8527sk0dvm2y $ _run_closure4.doCall
这个警告:
不推荐使用Task.leftShift(Closure)方法,并计划在Gradle 5.0中删除它.请改用Task.doLast(Action).
如何重写我的任务?
我在表中有一个带有jsonb字段的表.
CREATE TABLE data.items
(
id serial NOT NULL,
datab jsonb
)
Run Code Online (Sandbox Code Playgroud)
如何在这样的查询中获取此字段的大小:
select id, size(datab) from data.items
Run Code Online (Sandbox Code Playgroud) 我正在寻找导轨4的授权宝石.在我使用cancan之前,它现在看起来已经过时了......
我在这里找到了the_role https://github.com/the-teacher/the_role 这几乎是我想要的,但有一些恼人的问题.也许存在类似的宝石?我需要角色,在数据库中存储角色以及在规则中存储关联操作.如果宝石与bootstrap合作,它会很棒.
PS对于身份验证我使用设计.
JavaFX很久以前就已经发布了.但我没有听说过使用这项技术建造的任何流行或大型生产就绪项目.
我有swagger / openapi规范。是否存在生成javascript客户端然后在vue.js组件中使用它的解决方案?
谷歌搜索后,我发现了这一点:https : //github.com/swagger-api/swagger-codegen但我想为vue.js / webpack找到更多的“本地”解决方案
如果我使用 pgx 池,我找不到如何记录 sql 查询的文档。例如我创建了这样的池:
func DB() *pgxpool.Pool {
connStr := os.Getenv("DATABASE_URL")
conn, err := pgxpool.Connect(context.Background(), connStr)
if err != nil {
fmt.Fprintf(os.Stderr, "Unable to connect to database: %v\n", err)
os.Exit(1)
}
return conn
}
Run Code Online (Sandbox Code Playgroud)
请告诉我如何记录我的查询?
例如,libre office有一个带下拉菜单的按钮,但它不是组合框:
Swing有模拟或类似的东西吗?
例如我有这样的方法:
public CompletableFuture<Page> getPage(int i) {
...
}
public CompletableFuture<Document> getDocument(int i) {
...
}
public CompletableFuture<Void> parseLinks(Document doc) {
...
}
Run Code Online (Sandbox Code Playgroud)
而我的流程:
List<CompletableFuture> list = IntStream
.range(0, 10)
.mapToObj(i -> getPage(i))
// I want method like this:
.thenApplyAndSplit(CompletableFuture<Page> page -> {
List<CompletableFuture<Document>> docs = page.getDocsId()
.stream()
.map(i -> getDocument(i))
.collect(Collectors.toList());
return docs;
})
.map(CompletableFuture<Document> future -> {
return future.thenApply(Document doc -> parseLink(doc);
})
.collect(Collectors.toList());
Run Code Online (Sandbox Code Playgroud)
它应该类似于flatMap()
for CompletableFuture
,所以我想实现这个流程:
List<Integer> -> Stream<CompletableFuture<Page>>
-> Stream<CompletableFuture<Document>>
-> parse each
Run Code Online (Sandbox Code Playgroud)
更新
Stream<CompletableFuture<Page>> …
Run Code Online (Sandbox Code Playgroud) java ×3
capistrano3 ×1
deployment ×1
go ×1
gradle ×1
java-8 ×1
java-stream ×1
javafx ×1
jsonb ×1
pgx ×1
postgresql ×1
production ×1
puma ×1
ruby ×1
rvm ×1
swagger ×1
swing ×1
vue.js ×1