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
javascript:window.fetch('https://gist.githubusercontent.com/omo/647295fa5839d336f09a/raw/780042003a85963fcee30acf4440103e32a673a5/titledialog.js').then(function(r) { r.text().then(function(j) { eval(j); }); }).catch(function(e) { console.log(e); }); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
class Mysql | |
def async_query(sql) | |
send_query(sql) | |
select [ (@sockets ||= {})[socket] ||= IO.new(socket) ], nil, nil, nil | |
get_result | |
end | |
end |
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
/* send_query */ | |
static VALUE send_query(VALUE obj, VALUE sql) | |
{ | |
MYSQL* m = GetHandler(obj); | |
Check_Type(sql, T_STRING); | |
if (GetMysqlStruct(obj)->connection == Qfalse) { | |
rb_raise(eMysql, "query: not connected"); | |
} | |
if (mysql_send_query(m, RSTRING_PTR(sql), RSTRING_LEN(sql)) != 0) | |
mysql_raise(m); |
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
/* sql/client.c */ | |
int STDCALL | |
mysql_real_query(MYSQL *mysql, const char *query, ulong length) | |
{ | |
... | |
if (mysql_send_query(mysql,query,length)) | |
DBUG_RETURN(1); | |
DBUG_RETURN((int) (*mysql->methods->read_query_result)(mysql)); | |
} |
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
/* socket */ | |
static VALUE socket(VALUE obj) | |
{ | |
MYSQL* m = GetHandler(obj); | |
return INT2NUM(vio_fd(m->net.vio)); | |
} |
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
;; modified http://www.emacswiki.org/emacs/TinyUrl | |
(require 'thingatpt) | |
(defun my-get-shorter-bug-url(longer-uri) | |
(cond ((string-match "bugs.webkit.org" longer-uri) | |
(let ((num-start (string-match "[[:digit:]]" longer-uri))) | |
(concat "http://webkit.org/b/" (substring longer-uri num-start)))) | |
((string-match "http://code.google.com/p/chromium/issues" longer-uri) | |
(let ((num-start (string-match "[[:digit:]]" longer-uri))) | |
(concat "http://crbug.com/" (substring longer-uri num-start)))) | |
((error (concat longer-uri " is not bug url"))))) |
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
var testDbCardStoragePutSouldCount = function() { | |
doTestDbCardStorage( | |
"test1", | |
function(done, target) { | |
target.count( | |
function(cnt) { | |
assertEquals(0, cnt); | |
target.put( | |
tfil.test.HELLO_CARD_RECORD, | |
function() { |