小编Dav*_*sen的帖子

无法验证iOS应用程序(已获得有效证书)

当切换到优胜美地时,我干净安装了我的Mac,现在我在将iOS提交到商店时遇到了问题.

当我验证我的存档时,我不断收到"您的帐户已经拥有有效的iOS分发证书".

我已尝试从会员中心重命名和重新下载我的证书,但这不起作用.

validation certificate app-store ios

7
推荐指数
2
解决办法
6142
查看次数

pg_restore到在docker容器中运行的postgres

我有一个数据库的备份,我将恢复到在docker容器内运行的postgres数据库.

我在OS X上使用的是docker-
machine.Postgres图像是postgres:9.4.

这是我到目前为止提出的脚本:

pg_restore --verbose --clean --no-acl --no-owner \
  -h tcp://`docker-machine ip default`:5432 \
  -U postgres \
  -d tonsser-api_development latest.dump
Run Code Online (Sandbox Code Playgroud)

但这不起作用.我收到错误:

pg_restore: connecting to database for restore
pg_restore: [archiver (db)] connection to database "tonsser-api_development" failed: could not translate host name "tcp://192.168.99.100:5432" to address: nodename nor servname provided, or not known
Run Code Online (Sandbox Code Playgroud)

postgresql pg-restore docker docker-machine

6
推荐指数
2
解决办法
2521
查看次数

一个可变借用和多个不可变借用

我正在尝试编写一个程序,它生成一个后台线程,不断地将数据插入到某个集合中.同时,我想继续获取输入stdin并检查该输入是否在线程正在运行的集合中.

这是一个简单的例子:

use std::collections::HashSet;
use std::thread;

fn main() {
    let mut set: HashSet<String> = HashSet::new();

    thread::spawn(move || {
        loop {
            set.insert("foo".to_string());
        }
    });

    loop {
        let input: String = get_input_from_stdin();

        if set.contains(&input) {
            // Do something...
        }
    }
}

fn get_input_from_stdin() -> String {
    String::new()
}
Run Code Online (Sandbox Code Playgroud)

但是由于所有权的原因,这不起作用.

我还是Rust的新手,但这似乎应该是可行的.我只是找不到正确的Arcs,Rcs,Mutexes等组合来包装我的数据.

concurrency multithreading ownership rust

3
推荐指数
1
解决办法
342
查看次数