問題タブ [deluge]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
0 に答える
78 参照

python - .Popen() と .shlex() を使用してファイルを deluge-console にロードする

.Popen() と .shlex() を使用して、deluge-console 経由でファイルをロードするスクリプトを取得するのに問題があります。gnome-terminal で xubuntu と byobu を使用しています。

def torrentLoad(url): #client_run = subprocess.Popen(['deluged']]) sourceList = torrentWrite(sortXML(url)) print(sourceList) for s in sourceList: sleep(2) delugeList = ['deluge-console', 'add', s] load = subprocess.Popen(delugeList, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = load.communicate() print(out, err) 変数 sourceList には、xml を解析して torrent ファイルの場所のリストを返す関数が含まれています。(例: '/home/YOURHOME/Documents/torrents/file.torrent')

理論的には、これはコマンドをフィードするはずです: deluge-console add /home/YOURHOME/Documents/torrents/file.torrent をターミナルに直接追加します。私もByobuを運営しています。それがこれに関与するかどうかはわかりません。

私が得ている出力はnoddaです。助けてくれてありがとう。

0 投票する
1 に答える
1510 参照

aggregate-functions - Zohoでさまざまなレコードをカウントして合計を表示

Zoho Creator には、リンクする必要がある 2 つのフォームがあります。


フォーム A:特定の質問に対して特定のポイントが与えられる報酬カウンターであり、エントリごとに「Points_Earned」という列に保存されます。

フォーム B: ID データベースであり、名前、姓、DB のメンバーシップなど、個人の基本的な詳細が含まれています。

2 つのフォーム間の PK は、次の形式の個人 ID です"UID - Lastname, Firstname"(これらのフィールドは、フォーム Bでは個別の列として表示されますが、フォーム Aでは、ドロップダウン ボックスに 1 つの連結された文字列として表示されます。フィールド名Reward_Member)。


目的:

フォーム B には という列があり、特定の UIDTotal_Pointsのすべての合計を表示する必要があります。Points_Earned

SQL 式は次のようになります。select SUM(Points_Earned) from Form_A where Reward_Member = Form_B.UID + " - " + Form_B.Lastname + ", " + Form_B.Firstname;


問題:

Delugeで前述のロジックを実行する方法がわかりません。Aggregate メソッドを試してみましたが、レコードの合計をカウントしていないようで、ナレッジ ベースの記事もあまり役に立ちません。結果は空白のままです。

これは、Sum を表示するために使用したスクリプトです (EDIT>>ON_LOAD に配置):


サンプルデータ:

フォーム A:

フォーム B:


デバッグ情報

次の式を使用して、格納されているデータがどのように見えるかを確認しReward_Member、式の後に結果を示しました。

式:alert input.Reward_Member.toString() + " earned " + input.Points_Earned + " Point(s)."; 結果: 3485853000000015046 earned 1 Point(s).... BigInt のように見える