投稿

4月, 2013の投稿を表示しています

[GAE/J]cron.xmlの設定

cron.xmlの設定で<schedule>の指定を時刻帯によって 頻繁にしたり疎にできないか調べてて日本語のヘルプでは情報が足りてなくて 英語版みたらすぐに解決した。 https://developers.google.com/appengine/docs/java/config/cron?hl=ja 実行のタイミングをもっと細かく設定したい場合は、次のようにスケジュールを指定できます。 ("every"|ordinal) (days) ["of" (monthspec)] (time) https://developers.google.com/appengine/docs/java/config/cron?hl=en If you don't need to run a recurring job at a specific time, but instead only need to run it at regular intervals, use the form: every N (hours|mins|minutes) ["from" (time) "to" (time)] というわけで大体こんな感じで <?xml version="1.0" encoding="UTF-8"?> <cronentries>        <cron>     <url>/ss</url>     <description>Cron1-Evening</description>     <schedule>every 30 minutes from 18:00 to 21:00</schedule>     <timezone>Asia/Tokyo</timezone>   </cron>      <cron>     <url>/ss</url>     <descr

[java]Subject.txtスレ一覧からスレッドIDとタイトルとレス数を取り出す

package test; import java.io.*; import java.net.*; import java.util.*; public class Run { public static void main(String[] args) { List<String> entries = new ArrayList<String>(); URL url; BufferedReader reader; try { url = new URL("http://jbbs.livedoor.jp/otaku/12973/subject.txt"); reader = new BufferedReader(new InputStreamReader(url.openStream(),"EUC-JP")); String line; while ((line = reader.readLine()) != null) { entries.add(line); } reader.close(); } catch (Exception e1) { // TODO Auto-generated catch block e1.printStackTrace();     } for (String str:entries){ Integer id=Integer.parseInt(str.substring(0,10)); int resnum_start=str.lastIndexOf('('); int resnum_end=str.lastIndexOf(')'); Integer num = Integer.parseInt(str.substring(resnum_start+1,resnum_end)); String title=str.substring(0,resnum_start).split(",")[1]; System.out.print

玉ひで 2013年3月某日

イメージ

ロト7がちょっと当たったので

イメージ
ささやかな買い物。テラ銭こんな使い方してもバチは当たらんだろう   体系的に学ぶ 安全なWebアプリケーションの作り方 脆弱性が生まれる原理と対策の実践

自家製ジャムはたまらぬな

イメージ