I want to use the Google translation from a server side.
My Ideas are 1. run javascript on a server or 2. Direct http call to Google from server with PHP.
RESULT:
I selected "#2 Direct http call".
DETAIL:
1. run javascript on a server
I found "V8 JavaScript Engine".
"V8 JavaScript Engine" is a very good Engine,
but for me, it will take much time to make goolge objects in the V8.
How to install memo.
DOWNLOAD scons-2.0.1.tar.gz
# tar xzf scons-2.0.1.tar.gz
# cd scons-2.0.1
# python setup.py install --prefix=$HOME
# svn co http://google..... V8
# tar xzf scons-2.0.1.tar.gz
# cd v8
# scon
# cd samples
# g++ -I../include shell.cc -o shellv8 ../libv8.a -lpthread -m32
Test run javascript.
#./shellv8 test.js
test.js is:
print ('Hello' + ', World');
var x = 100;
var y = 200;
print ("x * y = " + (x * y));
Some objects, window and google, not implemented in shell.
It will take much time to make these objects.
2. Direct http call to Google from server PHP.
I re-read "Google Translate API Version 2".
it's is in Labs, but it has REST API.
REST is "Representational State Transfer".
like.
https://www.googleapis.com/language/translate/v2?key=AIzaSdkdN4TfYc0&q=flowers&source=en&target=fr&callback=handleResponse&prettyprint=true
Jan 28, 2011
Jan 5, 2011
How to quickly, randomly select and sort using MySQL?
(ENGLISH)
How to quickly, randomly select and sort a specified number of records from a table under some conditions using MySQL?
I think that it is very difficult.
My solution has an almost randomness.
Here, "much_more_number" is about twice or greater than "specified_number".
SQL likes...
"SELECT * (SELECT *, RAND() as random FROM (SELECT * FROM table WHERE conditions LIMIT much_more_number) as x ORDER random LIMIT specified_number) as y ORDER sort_conditions"
(JAPANESE)
MySQLを用いて、一定の検索条件に該当するレコードを指定された数だけランダムに抽出しそれをソートすることを高速に行う方法とは、
これを実現することはとても難しいと思われる。
私の解答は、まあまたランダムというものです。
ここで、"much_more_number"というのは、"specified_number"の二倍とかもっと大きな数です。
SQLは、こんな感じです。
"SELECT * (SELECT *, RAND() as random FROM (SELECT * FROM table WHERE conditions LIMIT much_more_number) as x ORDER random LIMIT specified_number) as y ORDER sort_conditions"
How to quickly, randomly select and sort a specified number of records from a table under some conditions using MySQL?
I think that it is very difficult.
My solution has an almost randomness.
Here, "much_more_number" is about twice or greater than "specified_number".
SQL likes...
"SELECT * (SELECT *, RAND() as random FROM (SELECT * FROM table WHERE conditions LIMIT much_more_number) as x ORDER random LIMIT specified_number) as y ORDER sort_conditions"
(JAPANESE)
MySQLを用いて、一定の検索条件に該当するレコードを指定された数だけランダムに抽出しそれをソートすることを高速に行う方法とは、
これを実現することはとても難しいと思われる。
私の解答は、まあまたランダムというものです。
ここで、"much_more_number"というのは、"specified_number"の二倍とかもっと大きな数です。
SQLは、こんな感じです。
"SELECT * (SELECT *, RAND() as random FROM (SELECT * FROM table WHERE conditions LIMIT much_more_number) as x ORDER random LIMIT specified_number) as y ORDER sort_conditions"
Dec 30, 2010
Oh My God! SSL Certs automatically renewed
My SSL certificate is automatically renewed !
They said,
"We just want to let you know we've automatically
renewed the following items according to our agreement:"
$49.99
$199.99
Wooooops!
They said,
"We just want to let you know we've automatically
renewed the following items according to our agreement:"
$49.99
$199.99
Wooooops!
Dec 15, 2010
How to get "set A - set B" in MySQL
How to get "set A - set B" in MySQL.
A is a table. Like a group of members.
B is a table. Like a woman list of people.
A has fields. "name, role, ...".
B has fields. "name, sex (= only woman), age, ...".
We want to get "set A - set B".
This is, in set operation, "A inter (not B)".
Also, this is "Not woman subet of A".
And the SQL is:
"SELECT * FROM A LEFT JOIN B ON A.name = B.name WHERE B.name is null;"
A is a table. Like a group of members.
B is a table. Like a woman list of people.
A has fields. "name, role, ...".
B has fields. "name, sex (= only woman), age, ...".
We want to get "set A - set B".
This is, in set operation, "A inter (not B)".
Also, this is "Not woman subet of A".
And the SQL is:
"SELECT * FROM A LEFT JOIN B ON A.name = B.name WHERE B.name is null;"
Dec 13, 2010
Our new SSL Certificate
Our new SSL Certificate
1. serached a cheaper SSL certs seller on Google.
2. found "CheapSSLs.com" and went there.
3. thought which is better "Geotrust Rapid SSL 9.95/yr" OR "Comodo PositiveSSL $8.95 ?"
I selected Rapid SSL. becuase PositiveSSL is 1024 bit, it's samll.
4. thought which is better 1 year or 3 years or more?
I choosed 1 year. bacause in the next year, it'll be more chaaper.
and I'll be able to try it again.
5. Buy, it is very easy.
6. Next I must activate it. but my old SSL is not still expired,
It'll be expired After Dec 17 16:07:40 2010 GMT.
to be continued.
1. serached a cheaper SSL certs seller on Google.
2. found "CheapSSLs.com" and went there.
3. thought which is better "Geotrust Rapid SSL 9.95/yr" OR "Comodo PositiveSSL $8.95 ?"
I selected Rapid SSL. becuase PositiveSSL is 1024 bit, it's samll.
4. thought which is better 1 year or 3 years or more?
I choosed 1 year. bacause in the next year, it'll be more chaaper.
and I'll be able to try it again.
5. Buy, it is very easy.
6. Next I must activate it. but my old SSL is not still expired,
It'll be expired After Dec 17 16:07:40 2010 GMT.
to be continued.
Dec 9, 2010
improved PHP mathpublisher
I improved "PHP mathpublisher 0.3".
- new features
"sqrt()" "blace" sizes are optimized.
mp : minus plus mark
$ : use NON-Italic font for a word
(Japanese font) : support Japanese font
(You must need IPA font http://ossipedia.ipa.go.jp/ipafont/index.html)
- new features
"sqrt()" "blace" sizes are optimized.
mp : minus plus mark
$ : use NON-Italic font for a word
(Japanese font) : support Japanese font
(You must need IPA font http://ossipedia.ipa.go.jp/ipafont/index.html)
- Download
You can get it from
http://www.mylovewill.com/ya/phpmathpublisher-0.3-yaruben.tar.gz
Oct 9, 2010
高校生・中学生の勉強サイト「やる勉」つくりました。
やる勉とは
すぐログイン画面へ
●中高生の勉強をもっと楽しく
友人と一緒に、 ケータイを使って ゲーム感覚で 楽しく勉強したい。
やる勉は、 そんな高校生・中学生 の皆さんのためのサービスです。
やる勉を使えば、 いつでも、 どこでも、 気軽に、 素早く、 勉強できます。
やる勉は、 そんな高校生・中学生 の皆さんのためのサービスです。
やる勉を使えば、 いつでも、 どこでも、 気軽に、 素早く、 勉強できます。
ケータイ用ログイン画面のQRコード

●やる勉の特徴
1. 誰でも自由に教材を作れます。
2. 友人と一緒に教材を作れます。
3. 教材をユーザ全体で共有できます。
4. 教材作成者へ感謝のメッセージを送信できます。
5. 学習記録が残り復習が自動でできます。
6. ケータイだけでなく、iPhoneやパソコンからも使えます。
2. 友人と一緒に教材を作れます。
3. 教材をユーザ全体で共有できます。
4. 教材作成者へ感謝のメッセージを送信できます。
5. 学習記録が残り復習が自動でできます。
6. ケータイだけでなく、iPhoneやパソコンからも使えます。
●どんな教材
1. 単語カード : 英単語の暗記に
2. 片方向カード : 公式や計算に
3. 両方向カード : 元素記号や化学式に
4. 語順並べ : 英作文に
5. 三択カード : 社会や地理に
6. 5W1Hカード : 歴史に
7. 漢字カード : 漢字や熟語の読み書きに
2. 片方向カード : 公式や計算に
3. 両方向カード : 元素記号や化学式に
4. 語順並べ : 英作文に
5. 三択カード : 社会や地理に
6. 5W1Hカード : 歴史に
7. 漢字カード : 漢字や熟語の読み書きに
●中高生の保護
高校生・中学生のために 安全なネット環境に配慮しています。
1. メールアドレスは他のユーザに非公開
2. 掲示板・プログ機能は、無し
3. ハンドル名、アイコンの公開は承認制
4. 教材の公開は承認制
5. 感謝のメッセージは承認制
1. メールアドレスは他のユーザに非公開
2. 掲示板・プログ機能は、無し
3. ハンドル名、アイコンの公開は承認制
4. 教材の公開は承認制
5. 感謝のメッセージは承認制
●料金
高校生・中学生のために 低料金を心がけています。
1. 2011年03月31日までは、試験運用のため無料
2. 月額315円(税込み・予定)
3. ユーザ登録後、一ヶ月無料
4. 教材作成で利用期間の延長
5. 携帯電話のパケット通信料は別途必要です。
1. 2011年03月31日までは、試験運用のため無料
2. 月額315円(税込み・予定)
3. ユーザ登録後、一ヶ月無料
4. 教材作成で利用期間の延長
5. 携帯電話のパケット通信料は別途必要です。
Subscribe to:
Posts (Atom)