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
| <?php | |
| /** | |
| * Usage: | |
| * $obj = new DNSQuery('www.google.com', '8.8.8.8', 1, 'A', 'IN'); | |
| * if ($obj->isSuccess()) var_dump(DNSQuery::parse($obj->response)); | |
| */ | |
| class DNSQuery | |
| { | |
| private $name; |
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 Test : Object { | |
| public static int main (string[] args) { | |
| int[] r = {1,2,3,4,5}; | |
| stdout.printf ("original: %d %d\n", r[1], r[2]); | |
| int[] a = r[1:2]; | |
| a[0] = a[1] = 9; | |
| stdout.printf ("default : %d %d\n", r[1], r[2]); | |
| unowned int[] b = r[1:2]; |
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
| <?php | |
| // (`model1` LEFT JOIN `model2` ON `model2`.`col2`=`model1`.`id`) | |
| $from = $b->tables( | |
| $b->left_join($m1, $m2, $b->eq($m2->col2, $m1->id)) | |
| ); | |
| // `model1`,`model2`,`model3` | |
| $from = $b->tables($m1, $m2, $m3); |
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
| <?php | |
| $where = $b->o( // OR | |
| $b->o( | |
| $b->eq($m2->col2, 1), | |
| $b->a( //AND | |
| $b->ne($m1->id, 2), | |
| $b->lt($m1->id, $b->raw('3*', $m2->id, '-10')) | |
| ) | |
| ), | |
| $b->not($b->like($m2->col1, 'abc')), |
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
| function _ps1_git(){ | |
| local ref cnt branch clean | |
| ref=$(git symbolic-ref HEAD 2> /dev/null) | |
| cnt=$(git branch 2> /dev/null|grep -c -E '*') | |
| branch=$(echo "${ref#refs/heads/}") | |
| if [[ "${branch}" == "" ]] | |
| then | |
| return | |
| fi |
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 plurk_sorryla () | |
| "Project sorryla from BobChao" | |
| (interactive) | |
| (insert "對不起,都是我的錯! http://bit.ly/sorryla")) | |
| (defun plurk_c9s () | |
| "入師直奸" | |
| (interactive) | |
| (insert "人 @c9s 真好 (worship)")) | |
| (global-set-key "\C-cps" 'plurk_sorryla) |
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
| deb http://ftp.debian.org/debian lenny main contrib non-free | |
| deb http://ftp.debian.org/debian squeeze main contrib non-free |
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
| #!/bin/bash | |
| input=$(xinput list |grep 'SynPS/2 Synaptics TouchPad'|sed -E 's;.*id=([0-9]+).*;\1;'|head -n 1) | |
| xinput set-button-map "${input}" 1 2 3 17 18 19 20 8 9 10 11 12 13 14 15 16 | |
| exec xbindkeys |
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
| ERROR:dbus.service:Unable to append ({u'source': 2877035514, u'message': u'\u5f9e0.2\u4ee5\u4f86wallbox\u90fd\u4e00\u76f4\u6253\u4e0d\u958b...', u'uid': 1377620908, u'status_id': 406159419125},) to message with signature a{sv}: <type 'exceptions.OverflowError'>: Value -1417931782 out of range for Int32 | |
| Traceback (most recent call last): | |
| File "/usr/bin/wallbox-applet", line 8, in <module> | |
| wallbox.run_wallbox () | |
| File "/usr/lib/pymodules/python2.6/wallbox/wallbox.py", line 219, in run_wallbox | |
| w = wallbox () | |
| File "/usr/lib/pymodules/python2.6/wallbox/wallbox.py", line 56, in __init__ | |
| self.make_ui () | |
| File "/usr/lib/pymodules/python2.6/wallbox/wallbox.py", line 96, in make_ui | |
| self.notification = notification.Notification () |
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
| diff --git a/configure.ac b/configure.ac | |
| index f943c3c..a179e41 100644 | |
| --- a/configure.ac | |
| +++ b/configure.ac | |
| @@ -60,7 +60,7 @@ AC_SUBST(desktopentrydir) | |
| AS_AC_EXPAND(DATADIR, $datarootdir) | |
| AC_SUBST(DATADIR) | |
| -AS_AC_EXPAND(PYEXECDIR, $pyexecdir) | |
| +AS_AC_EXPAND(PYEXECDIR, $pkgpythondir) |
NewerOlder