This file contains 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
# coding: utf-8 | |
import ui | |
v = ui.load_view('Untitled') | |
i = 0 | |
lbl = v['label1'] | |
def btn_action(sender): | |
global i |
This file contains 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
import shutil | |
import os | |
import sys | |
import pickle | |
from dropbox.rest import ErrorResponse | |
STATE_FILE = '.dropbox_state' | |
REMOTE_ROOT_PATH = '/Apps/my-pythonista-app' # sync root in dropbox where code is |
This file contains 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
$ python inheritance.py | |
At SuperClass.echo: SuperClass | |
---------- | |
Before calling super at AClass.echo: AClass | |
At SuperClass.echo: AClass | |
After calling super at AClass.echo: AClass | |
---------- | |
Before calling super at BClass.echo: BClass | |
At SuperClass.echo: BClass | |
After calling super at BClass.echo: BClass |
This file contains 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
error_log logs/error.log error; | |
http { | |
access_log logs/access.log combined; | |
server { | |
listen 8081; | |
root /tmp/; | |
} | |
server { | |
listen 8080; |
This file contains 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 using-azerty? () | |
(condition-case nil | |
(let ((buffer (get-buffer-create "*using-azerty?*")) | |
return) | |
(set-buffer buffer) | |
(erase-buffer) | |
(call-process-shell-command "setxkbmap" nil buffer nil "-print") | |
(goto-char (point-min)) | |
(setq return (search-forward "azerty" nil t)) | |
(kill-buffer buffer) |
This file contains 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
diff --git a/AppKit/CPWindow/CPWindow.j b/AppKit/CPWindow/CPWindow.j | |
index fc82ea3..86b1f58 100644 | |
--- a/AppKit/CPWindow/CPWindow.j | |
+++ b/AppKit/CPWindow/CPWindow.j | |
@@ -176,6 +176,7 @@ CPWindowWillCloseNotification = @"CPWindowWillCloseNotification"; | |
CPWindowDidBecomeMainNotification = @"CPWindowDidBecomeMainNotification"; | |
CPWindowDidResignMainNotification = @"CPWindowDidResignMainNotification"; | |
CPWindowDidMoveNotification = @"CPWindowDidMoveNotification"; | |
+CPWindowDidResizeNotification = @"CPWindowDidResizeNotification"; | |
CPWindowWillBeginSheetNotification = @"CPWindowWillBeginSheetNotification"; |
This file contains 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
diff -r 66c307b0b7f9 docs/source/erlang_in_practice.rst | |
--- a/docs/source/erlang_in_practice.rst Tue Dec 01 01:41:06 2009 +0900 | |
+++ b/docs/source/erlang_in_practice.rst Wed May 12 14:54:24 2010 +0900 | |
@@ -22,7 +22,7 @@ | |
- loop から始まるプロセスを常時起動しているコードを書く | |
- loop を拡張していき、なんかしらのアプリを書いてみる | |
-上記3つについて具体的にどのような内容で勉強をす滑るべきなのかを解説していきます。 | |
+上記3つについて具体的にどのような内容で勉強をするべきなのかを解説していきます。 |
This file contains 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
import os | |
import time | |
import socket | |
import xmlrpclib | |
import subprocess | |
here = os.path.dirname(os.path.abspath(__file__)) | |
target = os.path.join(here, 'server.py') | |
gateway = None |
This file contains 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
# -*- coding:utf-8 -*- | |
from datetime import date | |
class YearMonth(object): | |
""" List year/month from specified to today """ | |
def __init__(self, year, month, format='%Y/%m'): | |
self.year = year | |
self.month = month | |
self.format = format |
This file contains 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
nnoremap <expr> / ':<C-u>Unite -start-insert -buffer-name="search-' . buffer_number('%') . '" line<CR>' | |
nnoremap <expr> * ':<C-u>UniteWithCursorWord -buffer-name="search-' . buffer_number('%') . '" line<CR>' | |
nnoremap <expr> n ':<C-u>UniteResume -no-start-insert -buffer-name="search-' . buffer_number('%') . '"<CR>' |
OlderNewer