HanG321 Blog
Be Shine, Be Smile, Be Wild
  • Home
  • Blog
    • 好文閱讀 readings
    • 生活記事 diary
    • 時事評論 commentary
    • 科技資訊 technology
    • 電腦編程 programming
    • 金融財經 finance
    • 音樂電影 music/movie
  • About

運氣

March 3, 2007|生活記事

近來的運氣可算是差極了……

一個未能解決的case …. 由過年拖到宜家…
始終未有 100% 既證據證明係我地既bug ….反之…佢地都俾唔到足夠料我去prove…
要log, send 一堆file 但冇用的…冇turn on debug mode 的…send 俾我做乜!!
今日仲要send 封email 黎

“i think we have spent a lot of time to assist to help you here and recommend that you should take this forward from here with your test plan etc….”

天呀…..而家係邊個幫邊個呀 ?! 幫你trace 埋log, 俾埋suggestion, 寫埋test plan, 教你開debug mode……
激死 !! 好心冇好報 !!!

先有例入傷兵名單, 過兩日打的出荃灣睇跌打…遇上十五先啟市. waste $$
係青衣睇.. 又遇著 1:00 – 3:00 休息 …
不過我都好唔客氣推門入去, 都2:45 lor, 訓少 陣午睡 ~~
電腦又神奇地boot 唔著…. 重插一次又得返….
六合彩一個字都唔中 ~~ 要機位又冇…….
連申請google adsense 都reject (理由係網頁未完成…)
唉…… 投降 ~~

change srt time

February 28, 2007|Java, srt|電腦編程
Java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.Iterator;
import java.util.StringTokenizer;
 
public class ChangeSrtTime {
  public static void main(String[] args) {
   File file = new File("C:\\The.departed.2of2.en.srt");
   String startTime, endTime;
   String result = "";
   int tunePara = 13;      //parameter for tuning
   ArrayList comp = new ArrayList();  //debug use
   boolean isDebug = false;    //set debug mode
   try {
    // Create a FileReader and then wrap it with BufferedReader.
    FileReader file_reader = new FileReader (file);
    BufferedReader buf_reader = new BufferedReader (file_reader);
    // Read each line of the file
    do {
     String line = buf_reader.readLine();
     if (line == null){
      break;
     }else if (line.startsWith("0") && (line.indexOf(":") == 2)){
      //e.g. 00:00:02,798 --> 00:00:06,296
      if(isDebug){ comp.add("org: " + line); }
      StringTokenizer st = new StringTokenizer(line, "-->");
      if (st.hasMoreTokens()){
       startTime = st.nextToken().trim();
       try {
        DateFormat formatter = new SimpleDateFormat("HH:mm:ss,SSS");
        Date date = (Date)formatter.parse(startTime);
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        cal.add(Calendar.SECOND, tunePara);
        result = formatter.format(cal.getTime());
       } catch (ParseException e) {}
      }
      if(st.hasMoreTokens()) {
       endTime = st.nextToken().trim();
       try {
        DateFormat formatter = new SimpleDateFormat("HH:mm:ss,SSS");
        Date date = (Date)formatter.parse(endTime);
        Calendar cal = Calendar.getInstance();
        cal.setTime(date);
        cal.add(Calendar.SECOND, tunePara);
        result += " --> " + formatter.format(cal.getTime());
        if(isDebug){ comp.add("new: " + result);}
       } catch (ParseException e) {}
      }
      System.out.println(result);
     }else{
      System.out.println(line);
     }
    } while (true);
    buf_reader.close ();
   }
   catch (IOException e) {
    System.out.println ("IO exception =" + e );
   }
   if (isDebug){
    System.out.println("nnnn ==========debug console======== ");
    Iterator iterator = comp.iterator();
    while(iterator.hasNext()) {
     System.out.println(iterator.next());
    }
    System.out.println("n ==========END========= ");
   }
  }
}
 

資訊科技發達的壞處

February 28, 2007|生活記事

資訊科技發達的壞處 — 就係你係屋企都仲可以做野…..
vpn 既出現令人又愛又恨….
電話, email, 麻煩事依舊接種而黎….不同的…只是不用搭車同埋一隻扎左既腳

既然the departed 羅咁多獎, 當然要睇下啦….都係”無間道” 好睇好多….
超無聊….係又 fuuk 唔係又 fcck . 又冇第二d 表達方式架?

個字幕檔disc 2 慢左13sec …唯有….
可能用 perl / python 會快d, 簡單d ~~ 不過我唔識 🙂

...102030...69707172...100...

 

如果你喜歡我的文章,請幫忙按 1-10次 LikeButton 化讚為賞,非常感謝!越喜歡當然可以越按越多 😛

搜尋 Search

簡介 Bio

香港人,現居南十字星空下。

為人貪心,科技、生活、財經、散文 皆有興趣,周身刀冇張利。

思想矛盾,喜歡現在work-life balance 既生活又懷念a city never sleep。

 

每月送我一杯咖啡支持我: liker.land/hang321




分類 Categories

  • 好文閱讀
  • 時事評論
  • 未分類
  • 生活記事
  • 科技資訊
  • 金融財經
  • 電腦編程
  • 音樂電影

文章存檔 Archives




熱門文章 Popular Posts

  • Install XPEnology (DSM) 5.1 on ESXi 6 (HP MicroServer Gen 8)
    Install XPEnology (DSM) 5.1 on ESXi 6 (HP MicroServer Gen 8) June 8, 2015
  • 呢幾日個blogger 有問題….
    呢幾日個blogger 有問題…. October 28, 2004
  • assembly
    assembly February 11, 2006
  • 新工作
    新工作 January 6, 2009
  • 嫁人要嫁工程師
    嫁人要嫁工程師 April 27, 2006

標籤雲 Tag Cloud

CentOS Character chroot Cluster crash cryptography DD-WRT debug Domino DSM Dual Core DWA email ESXi GCP git google HylaFax IE Java Javascript JRE LikeCoin Linux log LotusScript mint MX MySQL nginx PKI PowerShell Qwiklabs srt telent VMware vpn vSphere WinXP wordpress XPEnology 專欄 網絡資訊 選股 風帆

日曆 Calendar

May 2025
M T W T F S S
  « Feb    
 1234
567891011
12131415161718
19202122232425
262728293031  

Follow Me

Follow Us on RSSFollow Us on TwitterFollow Us on YouTube

文章存檔 Archives

Copyright © 2004-2021 hang321.net. All Rights Reserved