Webギョーカイの歩き方
第6回「インプットとアウトプット」
http://jobzine.jp/special/2007/08/6.phpブックマークレットを登録して、閲覧中のサイトやブログから、文章や画像などを数秒で引用が可能です。クリッピング専用に使われることが多いようです。これを「リブログ」(reblog)と呼ばれたりしています。
グレモンもようやくなのに…w.
#技術は知っていても略称や使い方まではついていけてないんだよなぁ….
高確率で思い込みによる説明.間違っていることが多い./「無知だったり、勘違いしていたり、底意を押しつけたり、いいかげんだったり、噂や疑惑を信じていたりして、狂気じみてさえいるかもしれません」( http://bit.ly/gs23zg )
Webギョーカイの歩き方
第6回「インプットとアウトプット」
http://jobzine.jp/special/2007/08/6.phpブックマークレットを登録して、閲覧中のサイトやブログから、文章や画像などを数秒で引用が可能です。クリッピング専用に使われることが多いようです。これを「リブログ」(reblog)と呼ばれたりしています。
Wikipedia
ユーザーエクスペリエンスデザイン
http://ja.wikipedia.org/wiki/ユーザーエクスペリエンスデザイン
- (BOOL)validateMenuItem:(NSMenuItem *)item {
SEL action = [item action];
if (action == @selector(myAction:)) {
[item setStatus:NSOnState]; //or NSOffState or NSMixState
return YES; // or NO;
}
return YES;
}
- (void)windowControllerDidLoadNib:(NSWindowController *) aController
{
[super windowControllerDidLoadNib:aController];
NSUserDefaultsController * udc= [NSUserDefaultsController sharedUserDefaultsController];
NSUserDefaults *ud= [udc defaults];
if ([ud valueForKey:@"isTrue"]==nil) {
[ud setBool:YES forKey:@"isTrue"];
}
}
NSUserDefaults *ud= [[NSUserDefaultsController sharedUserDefaultsController] defaults];
id choice= [ud valueForKey:@"isTrue"];
BOOL b= CFBooleanGetValue(choice);
BOOL b= [ud boolForKey:@"isTrue"];
Developer Connection
Binding your Preferences in Cocoa
http://developer.apple.com/cocoa/cocoabindings.html
NSUserDefaultsController * udc= [NSUserDefaultsController sharedUserDefaultsController];
NSUserDefaults *ud= [udc defaults];
id obj= [ud valueForKey:@"textSize"];
FULLTEXT:英語ベースなので半角スペースでパースされたwordによるインデックス?
問題は日本語は単語単位で半角スペースは入らないこと.
LIKE検索:WHERE句で使うマッチング.
問題は大変遅いこと.
CREATE TABLE t (c VARCHAR(255), FULLTEXT (c) WITH PARSER bi_gram);
INSERT INTO t VALUES('昨日はよい天気だった.');
INSERT INTO t VALUES('今日はよい天気です.');
INSERT INTO t VALUES('明日は良い天気でしょう.');
SELECT c FROM t WHERE MATCH(c) AGAINST('天気で' IN BOOLEAN MODE);
>mysql5 -u root -p test < table.txt
Enter password: [password]
>mysql5 -u root -p test < query.txt
Enter password: [password]
c
今日はよい天気です.
明日は良い天気でしょう.
MySQL用N-Gram全文検索プラグイン
http://mysqlbigram.googlepages.com/mysql用n-gram全文検索プラグイン
追記: 動かした記事
以下のURLのコンパイル項にあるtar.gz.
http://mysqlbigram.googlepages.com/mysql用n-gram全文検索プラグイン
http://mysqlbigram.googlepages.com/home-j(URL変わってた 2008/07/06)
1. > tar xvzf bi_gram-src-1.0.1.tar.gz
2. > cd bi_gram
3. > ./configure --prefix=/opt/local --includedir=/opt/local/include/mysql5-devel
4. > vi Makefile
4.1 "pkglibdir = $(libdir)/mysql"を"pkglibdir = $(libdir)/mysql5-devel/mysql"と変更
5. > make
6. > sudo make install
#/opt/local/lib/mysql5-devel/mysqlの下にbi_gramlib*がある
> cd /opt/local/etc/mysql5-devel/
> sudo vi my.cnf
[mysqld]
ft_min_word_len=1
>mysql5 -u root -p
mysql> INSTALL PLUGIN bi_gram SONAME 'bi_gramlib.so';
mysql> SHOW PLUGINS;
javascript:d=document;w=window;t='';if(d.selection){t=d.selection.createRange().text;}else%20if(d.getSelection){t=d.getSelection();}else%20if(w.getSelection){t=w.getSelection();}%20;void(w.open('http://eow.alc.co.jp/'+encodeURIComponent(t)+'/UTF-8/',%20'_blank',%20''))
[[NSURL URLWithString:@"http://www.apple.com/" propertyForKey:NSHTTPPropertyHTTPProxy];
//SystemConfiguration.frameworkを追加
//includeなりimportで次のheaderを読込む<SystemConfiguration/SystemConfiguration.h>
CFDictionaryRef proxyDict = SCDynamicStoreCopyProxies(NULL);
CFNumberRef enableNum = (CFStringRef) CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPEnable);
CFStringRef hostStr = (CFStringRef) CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPProxy);
CFNumberRef portNum = (CFNumberRef) CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPPort);
CFDictionaryRef proxyDict = SCDynamicStoreCopyProxies(NULL);
CFNumberRef enableNum = (CFStringRef) CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPEnable);
if ([enableNum intValue]==1) {
CFStringRef hostStr = (CFStringRef) CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPProxy);
CFNumberRef portNum = (CFNumberRef) CFDictionaryGetValue(proxyDict, kSCPropNetProxiesHTTPPort);
NSString* proxyURLStr= [NSString stringWithFormat:@"http://%@:%@", hostStr, portNum];
NSURL* proxyURL = [NSURL URLWithString:proxyURLStr];
WSMethodInvocationSetProperty(ref, kWSHTTPProxy, proxyURL);
}
追記(20100829): でどうしたかを書いたのへリンク付け忘れてた.
else {
WSMethodInvocationSetProperty(ref, kWSHTTPProxy, [NSURL URLWithString:@"http://proxyhost:proxyport"]); //これ
WSMethodInvocationSetProperty(ref, kWSSOAPBodyEncodingStyle, style);
NSURL *url= [NSURL URLWithString:@"http://www.apple.com/"];
NSLog(@"%@", [[url propertyForKey:NSHTTPPropertyHTTPProxy] description]);
このエントリーにはまとめのエントリーが書かれました.新しいエントリーを参照してください.NSArrayController(NSTableView)の選択結果の取得について
http://edotprintstacktrace.blogspot.com/2007/11/nsarraycontrollernstableview.html
[_nsArrayController addObserver:self
forKeyPath:@"selectionIndexes"
options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionOld)
context:NULL];
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context {
if ([keyPath isEqual:@"selectionIndexes"]){
//event!
}
}
追記(2008/10/06):GUIのKVO(?)について書いた.