部落格文章訂閱


貧窮不能等,因為時間久了,你就會貧窮習慣了;
夢想不能等,因為努力晚了,人老就無能為力了;
學習不能等,因為懂得少了,就沒本事夢想成真了;
健康不能等,因為身體垮了,人生的一切就都沒了。


自訂搜尋

找不到想要的文章嗎? 請直接再下面的搜尋框裡輸入要查詢文章內容關鍵字 ,就能夠更快速的取得想要閱讀的問題喔~~謝謝大家的支持與愛護~若有任何建議事項, 歡迎透過留言板留言給我喔!!


  • 你不能決定生命的長度,但可以控制它的寬度;
  • 你不能左右天氣,但可以改變心情;
  • 你不能改變容顏,但可以展現笑容;
  • 你不能控制他人,但可以掌握自己;
  • 你不能預知明天,但可以利用今天;
  • 你不能樣樣勝利,但可以事事盡力。

free counters

I have been using git to keep two copies of my project in sync, one is my local box, the other the test server. This is an issue which occurs when I log onto our remote development server using ssh;

git clone me@me.mydevbox.com:/home/chris/myproject Initialized empty Git repository in /tmp/myproject/.git/ Password: bash: git-upload-pack: command not found fatal: The remote end hung up unexpectedly fetch-pack from 'me@me.mydevbox.com:/home/chris/myproject' failed. 

(the file-names have been changed to protect the guilty... !)

Both boxes run Solaris 10 AMD. I have done some digging, if I add --upload-pack=which git-upload-pack the command works, (and proves that $PATH contains the path to 'git-upload-pack' as per the RTFM solution) but this is really annoying, plus 'git push' doesn't work, because I don't think there is a --unpack= option.

Incidentally, all the git commands work fine from my local box, it is the same version of the software (1.5.4.2), installed on the same NFS mount at /usr/local/bin.

Can anybody help?

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

為了臺灣,我必須去投票

一個中間選民

首先,怎麼定義中間選民?
1.
可藍可綠,時藍時綠(如果藍的人選好,投藍,如果綠的人選好,投綠)

2.
有時投票,有時不投票(如果藍綠人選都不好,會找個理由不投票,說是偷懶也好,說是
起某季不好也罷,就是投也是賭爛票)

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

Q:

I am developing a GWT application that render a text on a canvas. I want to resize the canvas whenever browser window resized. The problem is if I used Window.addResizeHandler, the rendering process with each resize will be very slow. So I need a way to resize the canvas only when the user release the mouse button after finishing resize. Is there anyway to do that?

A:

You could add a delay, so that the resize is only processed after the window hasn't been resized for some number of milliseconds:

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

Q: Using GWT 1.6.4, I have the following code to retrieve the dimensions of the browser window:

RootPanel panel = RootPanel.get();

int height = panel.getOffsetHeight(); 

int width = panel.getOffsetWidth();

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

We just changed our Subversion repository's url from something terrible with custom port number hideousness to a URL so clean, concise and georgeous that I became brain damaged. The old URL still works but I wanted to repoint all my checked out code to the new URL. I tried switch and it didn't work until Bret mentioned that Eclipse had something called relocate for this issue. A google search later...

command line:

svn switch --relocate  <from URL> <to URL> 

Tortoise SVN:

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()


Frank 發表在 痞客邦 留言(0) 人氣()

Assume your personal repository is in the directory ~/proj. We first create a new clone of the repository and tell git-daemon that it is meant to be public:

$ git clone --bare ~/proj proj.git $ touch proj.git/git-daemon-export-ok 

The resulting directory proj.git contains a "bare" git repository--it is just the contents of the ".git" directory, without any files checked out around it.

Next, copy proj.git to the server where you plan to host the public repository. You can use scp, rsync, or whatever is most convenient.

Exporting a git repository via the git protocol

This is the preferred method.

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

Java 日期轉字串範列

1.//目前時間
2.Date date = new Date();
3.//設定日期格式

Frank 發表在 痞客邦 留言(0) 人氣()

Question:

I'm new to Java but not to programming (I normally code in Ruby). One thing I've seen in Java code examples is the use of <> instead of () to pass params to an object. Below is a code example (taken from a Google Web Toolkit tutorial):

publicvoid onValueChange(ValueChangeEvent<String> event){
String token = event.getValue();
文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

I assumed the new date picker would entail also an edit field (based on readings in the corresponding wiki).

However this is not the case and you need to display it yourself on a panel. Ok admitted; it is better to have the flexibility to customize it yourself. For those – who like me are a bit rusty on their GWT – a sample piece of code of how to create a button with a popup panel containing the date picker and showing the date in a text box:

It is similar to the sample app that the webAppCreator cmd creates; it assumes an html with two elements defined.

##--CODE_START--##

文章標籤

Frank 發表在 痞客邦 留言(0) 人氣()

MySQL 伺服器版本: 5.0.22-log
問題點:寫入 UTF-8編碼中文字進MySQL DB,變成亂碼


修改: adodb/drivers/adodb-mysql.inc.php
兩個連線function _connect _pconnect

Frank 發表在 痞客邦 留言(0) 人氣()

在 MySQL 資料庫中想產生一組獨一無二的 key,這樣可以做為比對的依據。打算直接在資料庫上操作新增欄位,至於 key 的產生是很直覺地想用 md5() 這個 function 來處理。但是因為要拿什麼資料來雜湊呢? 想說就用其他欄位加一加,再加上時間來湊。

很直覺地寫下這樣的 query

SELECT md5( id + name + now() )

可惜這樣的結果會因為 id 是 int,而且 name 是 string 而產生非預期的結果。解決方法是把所有的欄位轉成 string 來處理,這時候需要 concat() 來組合字串。

SELECT md5( concat( id, name, now() ) )

這樣就可以得到正確的 md5 值了。

deaf03c84d18a56b70e0b7d6438ada3e

Frank 發表在 痞客邦 留言(0) 人氣()

1、如果發簡訊給一個人,他一直不回,不要再發了。沒有這麼卑微的等待。


2、如果沒有人陪,學著一個人聽音樂看書寫點心情日記。這是個好習慣。

3、如果一個人很難過,找個角落或者在被子裏哭一下,不需要別人同情可憐,哭過之後一樣開心生活。

Frank 發表在 痞客邦 留言(0) 人氣()

Part 1: 不用二七八歲 我現在已經是這樣了 耐心看完

 

我今年二十七八歲
每天起床的時間,從中午12點,變成了早上七點。
睡覺的時間,從凌晨,變成了晚上12點。

Frank 發表在 痞客邦 留言(0) 人氣()

Ecshop是著名的B2C商城开源程序,很多朋友采用Ecshop进行二次开发,但是Ecshop对于未商业授权版本进行了版权限制,主要表现在以下两个地方:

1。标题后面显示:powered by ecshop v2.7.2

2。底部显示:powered by ecshop v2.7.2

按照国际开源协议,未商业授权的开源软件不能应用于商业活动,但是目前国内很多小企业为了降低成本同时兼顾网站美观效果,希望去掉这些开源软件的版 权,大秦数据工程师为大家提供一种方式可以去掉Ecshop V2.7.2的版权,不过我们希望有实力的公司还是购买Ecshop的商业授权。

如何去掉Ecshop V2.7.2头部版权信息:powered by Ecshop V2.72

Frank 發表在 痞客邦 留言(0) 人氣()