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
append | 48360 | |
---|---|---|
add | 11626 | |
put | 10803 | |
decode | 10319 | |
write | 7416 | |
get | 6568 | |
access | 6497 | |
create | 6418 | |
read | 6093 | |
value | 4416 |
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() { |
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
... | |
target.startRoundFor(new tfil.Round([card1])); | |
target.startReview(); | |
assertTrue(target.reviewBox_.isVisible()); | |
// here! | |
tfil.ui.takeAction(target.reviewBox_.scoreBox_.proceedButton_); | |
... |
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
(setq vc-handled-backends nil) |
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
#!/usr/bin/env ruby | |
require "date" | |
Dir::chdir(File::join(ENV["HOME"], "work/octopress")) | |
if (ARGV[0] == "pub") | |
system("bash -l -c 'rvm use 1.9.2 && rake generate deploy'") | |
exit | |
end |
OlderNewer