小编hoo*_*die的帖子

Coffeescript 1.1.3只能观看一次

我有nodejs v0.6.3和coffeescript 1.1.3.在Archlinux上.

我知道他们在最新版本的coffeescript中改变了手表的工作方式,并且该手表至少需要节点v0.6.2.

在我的情况下,它只工作一次.之后,当我再次保存文件时,咖啡没有注意到.这可能是什么问题?

archlinux node.js coffeescript

8
推荐指数
1
解决办法
895
查看次数

使用dbus-rs的D-Bus桌面通知

我想使用https://crates.io/crates/dbus通过D-BUS发送桌面通知.

我目前的做法是:

    let c = Connection::get_private(BusType::Session).unwrap();
//let m = Message::new_method_call("org.freedesktop.DBus", "/", "org.freedesktop.DBus", "ListNames").unwrap();
let mut m = Message::new_method_call(
    "org.freedesktop.Notifications",
    "/org/freedesktop/Notifications",
    "org.freedesktop.Notifications",
    "Notify"
    ).unwrap();
m.append_items(&[
       MessageItem::Str("appname".to_string()),         // appname
       MessageItem::UInt32(0),                          // notification to update
       MessageItem::Str("icon".to_string()),            // icon
       MessageItem::Str("summary".to_string()),         // summary (title)
       MessageItem::Str("body".to_string()),            // body
       ???,                                             // actions
       ???,                                             // hints
       MessageItem::UInt32(9000),                       // timeout

]);
Run Code Online (Sandbox Code Playgroud)

我想不出有意义的方法来满足Notify方法的接口.根据D-Feet,它看起来像这样:

Notify(
    String app_name,
    UInt32 replaces_id,
    String app_icon,
    String summary,
    String body,
    Array of [String] actions,
    Dict of {String, Variant} hints,
    Int32
)
Run Code Online (Sandbox Code Playgroud)

特别是 …

notifications dbus rust freedesktop.org

6
推荐指数
1
解决办法
878
查看次数