via kwout
あ、あとMacでコンパイルする場合、Makefileが合わないのでシアノさんのページを見ながら書き換えること、また、標準Javaのエンコード指定が何故かSJISなので、"-D file.encoding=UTF-8"とする必要があります。
参考:ハタさんのブログ
via kwout
via kwout
via kwout
SELECT pg_cancel_backend(5220);
D:\work\Scala>jar cvf webProxy.jar webProxy.*
マニフェストが追加されました。
webProxy.class を追加中です。(入 = 596) (出 = 445)(25% 収縮されました)
D:\work\Scala>java -classpath ..\..\scala-2.7.2.RC2\lib\scala-library.jar;jakarta-oro-2.0.8.jar;.;libhttpd.jar webProxy
2008-11-03 11:36:17 thread0 [127.0.0.1] : /pacServer => (200) class : "pacServer"
2008-11-03 (月) 23:36:17.281 127.0.0.1 192.168.10.193
~snip~
・Solr本体をダウンロードして展開(今はRC2)
・例題用のSchema.xmlなどが入ったexample/example-DIHがあることを確認
・Solr本体のexample/conf以下に、example-DIHディレクトリ内のrss/以下をコピー(上書き)
・exampleのところで"java -jar start.jar"
・(稼動確認)ブラウザから"http://xxx:8983/solr/dataimport"にアクセス
・(取込指示)ブラウザから"http://xxx:8983/solr/dataimport?command=full-import"にアクセス
・(動作確認)ブラウザから"http://xxx:8983/solr/dataimport"にアクセス(statusMessagesが追加されてるハズ)
・(結果確認)ブラウザから"http://xxx:8983/solr/select/?q=NASA&version=2.2&start=0&rows=10&indent=on&hl=on&hl.fl=description"にアクセス(このときNASAで検索した)
・ちなみにdelta-importとすると差分更新ができるみたい
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.ngram.NGramTokenizer;
import org.apache.lucene.queryParser.QueryParser;
import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.Query;
import org.apache.lucene.search.highlight.Highlighter;
import org.apache.lucene.search.highlight.Scorer;
import org.apache.lucene.search.highlight.QueryScorer;
import org.apache.lucene.search.highlight.TextFragment;
import java.io.Reader;
object HighlightRunner {
val CONTENT = "東京特許許可局";
val QUERY_STRING = "許可";
val F = "f";
var analyzer: Analyzer = new NGramAnalyzer(1,3);
def main(args: Array[String]) {
try{
var qp :QueryParser = new QueryParser( F, analyzer );
var query :Query = qp.parse( QUERY_STRING );
var scorer :Scorer = new QueryScorer( query, F );
var h :Highlighter = new Highlighter( scorer );
println( h.getBestFragment( analyzer, F, CONTENT ) );
} catch {
case e:StringIndexOutOfBoundsException => ()
case e:Exception => {
e.printStackTrace
}
} finally {
// println("FINALLY");
}
}
}
// http://blog.goo.ne.jp/13th-floor/e/f694fdb1319134b40e4dee5ed8c15a92
class NGramAnalyzer(minGram:Int, maxGram:Int) extends Analyzer {
def tokenStream(fieldName:java.lang.String, reader:java.io.Reader): org.apache.lucene.analysis.TokenStream =
new NGramTokenizer(reader, minGram, maxGram);
}
via kwout
via kwout
D:\selenium-grid-1.0\examples\java>ant run-in-sequence
<target ... >
<setproxy proxyhost="xxx.digipepper.com" proxyport="8080"/>
clipped from www.enjoyxstudy.com
|
clipped from seleniumgrid.thoughtworks.com |
D:\selenium-grid-1.0>diff build.xml.f build.xml昨今AJAXなサイトが増えてきており、、、JMeterでは少しつらくなってきた気がしています。無論がんばってシナリオを作ればよいのですが。
10c10
< <property name="browser" value="*chrome" />
---
> <property name="browser" value="*iehta" />
75c75
< <property name="environment" value="*chrome"/>
---
> <property name="environment" value="*iehta"/>
D:\selenium-grid-1.0>
clipped from www.cove.org |
set http_proxy=squid.xxx.com:8080
clipped from disqus.com |
[tf0054@divers-high bird]$ db_dump -p tiedbfile
VERSION=3
format=print
type=hash
db_pagesize=4096
HEADER=END
/r/r/r.png
204,222
DATA=END
[tf0054@divers-high bird]$
#!/usr/bin/perl
use Data::Dumper;
use Sys::Syslog;
use Inline Python => <<'END_OF_PYTHON_CODE';
import sys, os, pgq, skytools
import syslog ,time
class zConsumer(pgq.Consumer):
def __init__(self, service_name, db_name):
self.procEvent = perl.procEvent;
pgq.Consumer.__init__(self, service_name, db_name, ["/tmp/var/mqueue/consumer.ini"])
def process_batch(self, src_db, batch_id, ev_list):
for ev in ev_list:
d = ev.data
self.log.debug ("event: %s | type: %s | extra1: %s" % (d, ev.type, ev.extra1))
if not self.procEvent(ev):
ev.tag_retry()
else:
ev.tag_done()
END_OF_PYTHON_CODE
my $objPgq = zConsumer->new("mqueue_consumer","src_db");
#print Dumper($objPgq);
$objPgq->start();
# イベント処理関数は、この関数を差し替えることでPerlで書けます
sub procEvent{
openlog(__FILE__, 'cons,pid', 'local4');
syslog('debug', 'this is Inline test');
closelog();
print Dumper(shift);
}
#!/usr/bin/python
import sys, os, pgq, skytools
import syslog
class Mailer(pgq.Consumer):
def sendWelcomeMail(self, params):
syslog.openlog("skycon")
syslog.syslog(params)
syslog.closelog()
return False
def process_batch(self, src_db, batch_id, ev_list):
for ev in ev_list:
d = ev.data
self.log.debug ("event: %s | type: %s | extra1: %s" % (d, ev.type, ev.extra1))
if not self.sendWelcomeMail(d):
ev.tag_retry()
else:
ev.tag_done()
if __name__ == '__main__':
script = Mailer("mailer_daemon","src_db",sys.argv[1:])
script.start()
tf0054=# select * from pgq.retry_queue;
-[ RECORD 1 ]--+------------------------------
ev_retry_after | 2008-04-26 01:30:40.307409+09
ev_id | 15
ev_time | 2008-04-26 01:15:17.024847+09
ev_txid |
ev_owner | 1
ev_retry | 1
ev_type | welcome_email
ev_data | root@gmail.com
ev_extra1 |
ev_extra2 |
ev_extra3 |
ev_extra4 |
tf0054=#
tf0054=# select * from pgq.subscription;
-[ RECORD 1 ]-+------------------------------
sub_id | 1
sub_queue | 1
sub_consumer | 1
sub_last_tick | 2118
sub_active | 2008-04-26 06:38:03.550572+09
sub_batch |
sub_next_tick |
tf0054=#
[pgqadm]
job_name = ticker_test
db = dbname=tf0054 port=5432 host=127.0.0.1
# how often to run maintenance [minutes]
maint_delay_min = 5
# how often to check for activity [secs]
loop_delay = 0.1
logfile = /tmp/var/log/%(job_name)s.log
pidfile = /tmp/var/pid/%(job_name)s.pid
use_skylog = 0
[mailer_daemon]
job_name = mailer_daemon
src_db = dbname=tf0054
pgq_queue_name = mailer
logfile = /tmp/var/log/%(job_name)s.log
pidfile = /tmp/var/pid/%(job_name)s.pid
#!/usr/bin/python
import sys, os, pgq, skytools
import syslog
class Mailer(pgq.Consumer):
def sendWelcomeMail(self, params):
syslog.openlog("skycon")
syslog.syslog(params)
syslog.closelog()
return True
def process_batch(self, src_db, batch_id, ev_list):
for ev in ev_list:
d = ev.data
self.log.debug ("event : %s | type : %s | inserted by : %s" % (d, ev.type, ev.extra1))
if not self.sendWelcomeMail(d):
sys.exit(1)
ev.tag_done()
if __name__ == '__main__':
script = Mailer("mailer_daemon","src_db",sys.argv[1:])
script.start()
./consumer.py ../etc/consumer.ini &
22439:20080410:024033 Query::select min(clock) from history_uint where itemid=18450
22439:20080410:024033 Query failed:PGRES_FATAL_ERROR:ERROR: index "history_uint_1" contains unexpected zero page at block 13758
HINT: Please REINDEX it.
zabbix=> reindex index history_uint_1;
REINDEX
zabbix=> \q
clipped from ebb.rubyforge.org |
<LocationMatch "(.*)css.r25.jp/common/(.*)">
ExpiresActive on
ExpiresDefault "access plus 4 weeks"
</LocationMatch>
clipped from www.optimizationweek.com |
HTTP/1.1 200 OK
Server: nginx/0.5.35
・・以下略・・
server {
listen 8090;
server_tokens off;
server_name divershigh;
#charset koi8-r;
charset utf-8;
・・以下略・・
http://s3.amazonaws.com/slideshare/high-performance-web-pages-20-new-best-practices-120577522992998-3-slide-1.swf
http://s3.amazonaws.com/slideshare/high-performance-web-pages-20-new-best-practices-120577522992998-3-slide-2.swf
・・・
http://s3.amazonaws.com/slideshare/high-performance-web-pages-20-new-best-practices-120577522992998-3-slide-76.swf
Invalid credentials
ngx_event_init_conf(ngx_cycle_t *cycle, void *conf)
{
ngx_event_conf_t *ecf = conf;
#if (NGX_HAVE_EPOLL) && !(NGX_TEST_BUILD_EPOLL)
int fd;
#endif
#if (NGX_HAVE_RTSIG)
ngx_uint_t rtsig;
ngx_core_conf_t *ccf;
#endif
ngx_int_t i, connections;
ngx_module_t *module;
ngx_event_module_t *event_module;
~snip~
~snip~
objs/src/event/modules/ngx_rtsig_module.o \
objs/src/event/modules/ngx_epoll_module.o \
objs/src/os/unix/ngx_linux_sendfile_chain.o \
~snip~
via kwout
max_clients = worker_processes * worker_connections
[tf0054@divers-high nginx-0.5.35]$ ./configure --prefix=/mnt/nginx-0.5.35 \
--with-http_stub_status_module \
--without-http_proxy_module \
--without-http_geo_module
~省略~
[tf0054@divers-high nginx-0.5.35]$ make
make -f objs/Makefile
make[1]: ディレクトリ `/home/tf0054/nginx-0.5.35' に入ります
cd /lib64 \
&& if [ -f Makefile ]; then make distclean; fi \
&& CC="gcc" CFLAGS="" \
./configure --disable-shared
/bin/sh: line 2: ./configure: そのようなファイルやディレクトリはありません
make[1]: *** [/lib64/Makefile] エラー 127
make[1]: ディレクトリ `/home/tf0054/nginx-0.5.35' から出ます
make: *** [build] エラー 2
[tf0054@divers-high nginx-0.5.35]$
touch -d "2 February 2002 10:00am" file1.txt
TinyGraphs via kwout
clipped from www.process-one.net |