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/configure b/configure | |
index a1e1f5e..9d5d6e0 100755 | |
--- a/configure | |
+++ b/configure | |
@@ -12,7 +12,6 @@ QXT_MODULES="docs berkeley core designer gui network sql web zeroconf" | |
if uname -a | grep -iq Darwin; then | |
QXT_MAC=1 | |
DEFAULT_LIBS="/Library/Frameworks" | |
- QMAKE_PARAMS="-spec macx-g++" | |
NO_XRANDR=1 |
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
TITLE: 手把手學 Django | |
Django 是什麼? | |
Short Version (不是一節) | |
Python | |
Django 的歷史 | |
現在的 Django | |
我應該學 Django 嗎? | |
先行技能 | |
Command line 使用技能 |
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
if (argc < 2) | |
{ | |
// Launch normally. | |
return; | |
} | |
NSString *path = [NSString stringWithUTF8String:argv[1]]; | |
path = [path stringByStandardizingPath]; // You should do this, BTW. | |
if ([[NSFileManager defaultManager] fileExistsAtPath:path]) | |
{ | |
// Open the file. |
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
@echo off | |
setlocal | |
set /p PYTHONEXE="Drag and drop python.exe here, and press ENTER: " | |
for %%d in (%PYTHONEXE%) do set PYTHONROOT=%%~dpd | |
:: Strip trailing backslash. | |
set PYTHONROOT=%PYTHONROOT:~0,-1% |
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
\\[ | |
1*2*3 multi-line math | |
\\] | |
\\( 1*2*3 inline-math \\) | |
$$ 1*2*3 math with dollar $$ | |
$$ 1*2*3 \$ \\ \text{dollar with escapes} $$ |
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
# ↓↓↓ Scroll to bottom for an example. ↓↓↓ | |
import importlib | |
import pkgutil | |
def pythonize(qt_package): | |
proxy = _PackageProxy(qt_package) | |
return proxy |
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
' Requirements: | |
' * Windows 7 or later. (Might work on Vista; XP is definitely out.) | |
' * Python 3 installation. (Will prompt for installation path.) | |
' The installation path should be both readable and *writable*. | |
Set fs = CreateObject("Scripting.FileSystemObject") | |
Set shell = CreateObject("WScript.Shell") | |
home = shell.ExpandEnvironmentStrings("%HOMEPATH%") |
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 toga | |
f_input = toga.TextInput() | |
c_input = toga.TextInput(readonly=True) | |
c_label = toga.Label('Celcius', alignment=toga.LEFT_ALIGNED) | |
f_label = toga.Label('Fahrenheit', alignment=toga.LEFT_ALIGNED) | |
join_label = toga.Label('is equivalent to', alignment=toga.RIGHT_ALIGNED) |
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 functools | |
class Api: | |
def __init__(self): | |
self.apis = [] | |
def register(self, f): | |
self.apis.append(f.__name__) |
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
def _show_items(items): | |
template = '{name:20}{price:>5}' | |
if not items: | |
print("No items. Use 'add' to add some!") | |
return | |
print() | |
print(template.format(name='Item', price='Price')) | |
print('-' * 25) | |
for item in items: | |
print(template.format( |
OlderNewer