This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; (:= a 1) a = 1 | |
| ;; (:= a (list 1 2 3)) a = (1 2 3) | |
| ;; (:= (a b c) (1 2 3)) a = 1, b = 2, c = 3 | |
| (defmacro := (places values) | |
| `(cond ((and (listp (quote ,places)) | |
| (listp ,values)) | |
| (if (eq (length (quote ,places)) (length ,values)) | |
| (map 'list (lambda (sym val) (set sym val)) (quote ,places) ,values) | |
| (error "The length of two args are not equal"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun run-length (results) | |
| (if (null results) | |
| results | |
| (let ((tmp (run 1 (car results) (cdr results)))) | |
| (cons (car tmp) (run-length (cdr tmp)))))) | |
| (defun run (times elem remains) | |
| (cond ((equal elem (car remains)) (run (1+ times) elem (cdr remains))) | |
| ((= times 1) (cons elem remains)) | |
| ((> times 1) (cons (list times elem) remains)))) |
朋友裝了新系統,變色龍帶綠色的皮膚與圓睜睜的大眼睛,當她拿給我們看時,一位對Linux十分感與趣的同學說:
「啊,桌布的Geeko好可愛!」
「我沒用過openSUSE耶,好用嗎?」我說。
「根本糞distro。不用Arch的人都智能不足啦。」一位見到人就要傳教、外號叫「引戰客」的同學緊接著說。
我們不禁啞然失笑,同樣的一個distro,每個人卻有不同的感覺。那位朋友連忙把筆電蓋上,她覺得openSUSE就是openSUSE,不是變色龍,也不是智力測驗,更不是宗教。
此僅為備份,因為原文在Facebook中。 作者:顏華容 https://www.facebook.com/artemis.yen/posts/10207549044542275
一點關於練琴效率的小心得 如果大家有興趣的話,在連假的這幾天可以實驗
實驗材料:沒有彈過的曲子(有沒有聽過無妨,因為聽過你也不見得會彈,哈哈。)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Site Configuration | |
| site_title: ________________ | |
| site_subtitle: _________________ | |
| admin_email: _________________ | |
| admin_phone: _________________ | |
| [Save] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import hashlib, os, sys, math, threading, time, argparse, datetime, sqlite3 | |
| # filePath is relative path | |
| # list.append() set.add() | |
| class Hasher(threading.Thread): | |
| def __init__(self, lock, file_walker): | |
| threading.Thread.__init__(self) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {# accounts/includes/login.html #} | |
| {% load crispy_forms_tags %} | |
| <h1>Login</h1> | |
| <div class="col-sm-12"> | |
| <form class="login-form" method="post"> | |
| {% csrf_token %} | |
| {{ form|crispy }} | |
| <button type="submit" class="btn btn-primary">Login!!!!!</button> | |
| </form> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ProductCreate(StaffuserRequiredMixin, CreateView): | |
| ''' | |
| Use URL parameter (GET) to decide if currently is under a category | |
| ''' | |
| form_class = ProductForm | |
| template_name = 'console/create_product.html' | |
| submit_title = "建立商品" | |
| def get_context_data(self, *args, **kwargs): | |
| context = CreateView.get_context_data(self, *args, **kwargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @namespace url(http://www.w3.org/1999/xhtml); | |
| @-moz-document domain("www.gnu.org") { | |
| code, kbd { | |
| border-radius: 2px; | |
| padding:1px 10px; | |
| } | |
| code{ | |
| color: #006 !important; | |
| background-color: #ddf !important; | |
| } |