小编Ada*_*dam的帖子

我如何找到Python在Unix上的位置?

我正在为一个新的工作场所开发一个新服务器,我正在尝试重用我今年早些时候在Python中编写的CGI脚本.我的CGI脚本开始于

#!/local/usr/bin/python
Run Code Online (Sandbox Code Playgroud)

但是当我在新服务器上运行它时,它会抱怨没有这样的文件夹.显然Python在这个盒子上保存在不同的位置,但我不知道在哪里.

我之前没有做过很多unix,只是足以绕过,所以如果有一些巧妙的技巧我应该知道在这里我会很感激:)

谢谢!

python unix directory shell shebang

10
推荐指数
2
解决办法
3万
查看次数

Diesel:BoxableExpressions 在表及其连接上通用吗?

我正在尝试在运行时构建一些过滤器,这些过滤器可以应用于表tunneltunnel LEFT OUTER JOIN connection ON (tunnel.id = connection.tunnel_id).

这些表的定义如下:


// Define the tunnel table and struct
table! {
    #[allow(unused_imports)]
    use diesel::sql_types::*;
    tunnel (id) {
        id -> BigInt,
        name -> Text,
    }
}
#[derive(Queryable, Identifiable, Clone, Debug, PartialEq, Eq)]
#[table_name = "tunnel"]
pub struct Tunnel {
    pub id: i64,
    pub name: String,
}

// Define the connection table and struct
table! {
    #[allow(unused_imports)]
    use diesel::sql_types::*;
    connection(id) {
        id -> BigInt,
        tunnel_id -> BigInt,
    }
}

#[derive(Debug, …
Run Code Online (Sandbox Code Playgroud)

rust rust-diesel

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

标签 统计

directory ×1

python ×1

rust ×1

rust-diesel ×1

shebang ×1

shell ×1

unix ×1