小新二三事 二三事 電視精/戲院 ASP .NET 新手工作日誌

2009年8月31日星期一

PHP Warning: Cannot send session cache limiter - headers already sent

PHP Warning: Cannot send session cache limiter - headers already sent

P: Warning: Cannot send session cache limiter - headers already sent

S: create .htaccess file
content
php_value output_buffering 4096

因為你唔可以改 php.ini, 要用 .htaccess

三十而立

三十而立
孔子的三十而立一段原是這樣的:

三十而立;四十而不惑;五十而知天命;六十而耳順;七十而從心所欲。

三十歲時候能夠自立,四十歲的時候不再被迷惑,五十歲的時候明白自己的本份,六十歲的時候聽到不中聽的話不會氣憤,七十歲的時候能夠心裡怎麼想就怎麼做。
from
http://putonghuactn.mysinablog.com/index.php?op=ViewArticle&articleId=1344336

小記錄
170磅 @ 2009-08-31

2009年8月29日星期六

工作日誌: Excel Daily Tracker 用途

工作日誌: Excel Daily Tracker 用途

用Excel 去log 低 d outstanding item 個idea 其實好好

做完一日之後update excel 再 send 比大家

一目了然

死都死得明白

不過比人賣豬仔個feel 就唔係幾好

...

神奇工具: ezs2113 EZScript.exe http://ezscript.seed.cx/

神奇工具: ezs2113 EZScript.exe http://ezscript.seed.cx/

朋友給我的神奇工具
可以自動化d麻煩website
不過可能舊 (2001年)
有d古怪問題

用左2 個鐘 (朋友教左 30 mins)
用example + tutorial 做左合隻 script
開頭估要四個鐘

成功感勁高

2009年8月26日星期三

ASP.Net Code: Connection Strings with MS SQL server 2005

ASP.Net Code: Connection Strings with MS SQL server 2005

<remove name="LocalSqlServer">
<add name="LocalSqlServer" connectionstring="Data Source=localhost;Initial Catalog=aspnetdb;Integrated Security=True" providername="System.Data.SqlClient">
<add name="golddbConnectionString" connectionstring="Data Source=localhost;Initial Catalog=golddb;Integrated Security=True" providername="System.Data.SqlClient">

+

exec sp_grantloginaccess 'NT AUTHORITY\NETWORK SERVICE'
exce sp_addsrvrolemember @loginame = 'NT AUTHORITY\NETWORK SERVICE', @rolename = 'sysadmin'

工作日誌: load DB, Asp.net 入 MS SQL 2005 Server

工作日誌: load DB, Asp.net 入 MS SQL 2005 Server

1. load SQL 入 MS SQL 2005 Server
2. set 唔到 Connection Strings
3. 唯有安Visual Web Developer 2008 Express
4. 都係 set 唔到 Connection Strings
跟 http://weblogs.asp.net/scottgu/archive/2005/08/25/423703.aspx
得左

Connection Strings 要 set LocalSqlServer
先見到 ASP.NET config

5. Asp.net 個web 係VWD ok, 出到 IIS 唔得
6. MS SQL 2005 Server access right problem
Connection Strings 無password

原來要係SSMS

exec sp_grantloginaccess 'NT AUTHORITY\NETWORK SERVICE'
exce sp_addsrvrolemember @loginame = 'NT AUTHORITY\NETWORK SERVICE', @rolename = 'sysadmin'

中文
http://www.cnblogs.com/windphoenix/archive/2008/11/03/1325321.html
英文
http://forums.asp.net/p/905865/1836699.aspx
http://social.msdn.microsoft.com/forums/en-US/adodotnetdataproviders/thread/26fd5295-e9e2-44e7-9a3d-6af69da77093/
http://stackoverflow.com/questions/764494/no-admin-rights-in-sql-management-studio

7. web ok la...
8. Asp.net 個網 access right problem
set 番 IIS 個right -> 唔得
set 番 folder 個right -> 終於得

set 完個頭出晒煙

2009年8月22日星期六

工作日誌: 廢 IT

工作日誌: 廢 IT

今日上去個客到
又見到個廢 IT

上到去先知 set 左 MS SQL 2005 Server

MS SQL 2005 Server attach 唔到 MS SQL 2008 Database
又要上去多次

安唔到都要吹下水
Present 緊 條廢 IT 又出聲
一同佢曹, 佢又唔出聲
無料到ar...

...

HSBC wire transfers SWIFT CODE

HSBC wire transfers SWIFT CODE

ACCOUNT NAME: 小新
BANK ACCOUNT: 151-1234567
SWIFT CODE: HSBC HKH HHKH / HSBCHKHHHKH
BANK NAME: HSBC
BANK CODE: 004
BANK ADDRESS: 1 Queen's Road Central, Hong Kong

2009年8月18日星期二

ASP.NET Code: HOW TO: Send email using System.Net.Mail 2

ASP.NET Code: HOW TO: Send email using System.Net.Mail 2

After set SMTP host, username, password in web.config

SmtpClient smtp = new SmtpClient();
smtp.Send(msg);

more at
http://blog.miniasp.com/?tag=/smtpclient

2009年8月16日星期日

Canon 500D 廣告

Canon 500D 廣告



之前就想買 DSLR,就趁這次加入攝影社的時候敗下去了。目標訂在 Canon 500D、Sony a350、Nikon D90,經過考量後,Sony a350 吃 CF 卡, D90 太重且貴,Nikon 入門款像是 D5000 沒有機身馬達一整個弱,所以 Nikon 完全就不考慮 D90 以下。最後挑了 Canon 500D,雖然又在 450D 拉鋸了一下,不過看在有更高的 ISO 可用,就還是買了 500D。

公司貨價格挺硬,看討論也頂多送些小配件,所以就決定在網路上買,但網路的一機一鏡組不是送小配件組合就是送 Golla 相機包,說是送,但官方定價一機一鏡組是 30900,網路卻都是 32900,根本是變相加價,手上已經有 SD 卡,有的沒的配件我也不太想要,於是就直衝一機兩鏡組 37900,算算只用二手價就可以多新的 EFS 55-250mm IS 鏡頭,還送了保護貼、Canon 相機包跟 Sandisk Class 2 SD 卡,雖然 SD 卡頗廢,不過本來就沒要用就算了,相機包雖然沒有 Golla 那麼時尚,不過也算堪用。

盒子不大,包的紮實,拿起來沉甸甸的,不過 Panasonic TZ5 已經賣掉,就沒有相機照開箱照了。跟看過的其他相機比起來略小一些,拿起來也較輕,輕的只要接 18-55 Kit 鏡,就會往前倒 XD,拿了一下倒不覺得手把太小不好拿,蒙皮感覺不錯。不過輕量化的結果就是橡膠感稍重。

direct copy from
http://bluecat.csie.net/2009/07/16/3826/

2009-08-16 夜晚 Project Runway 攝影師版 The Shot

2009-08-16 夜晚 Project Runway 攝影師版 The Shot

2007 TV Series
http://en.wikipedia.org/wiki/The_Shot_%28TV_series%29

攝影師版真人Show

Canon 比錢

500D 廣告好勁下

2009年8月15日星期六

2009-08-15 半夜 At First Sight

2009-08-15 半夜 At First Sight

http://en.wikipedia.org/wiki/At_First_Sight

幾好睇

"你不只見到拳頭, 你還需要有想法"

2009年8月14日星期五

小遊戲: Monkey Kick Off

小遊戲: Monkey Kick Off

http://miniclip.com/mko.php?c=pUorqEotsotEporFBoUBopBEosqEFoAZhAhNotFqu

4278 Meters

http://miniclip.com/mko.php?c=pUorqEotsotEporFBoUBopBEosqEFoAZhAhNotFqu

4487 Meters

工作日誌: 攝影日:急凍食品

工作日誌: 攝影日:急凍食品

琴日幫過客 搵左 攝影師 影d 急凍食品 product 相

d 野食好大隻
2 呎有多長腳蟹
手禁大帶子


一路影一路肚餓
好想快d 完job 去食餐勁

2009年8月12日星期三

2009年8月11日星期二

ASP.NET Code: copy file and folder recursively

ASP.NET Code: copy file and folder recursively

Private Sub CopyDirectory(ByVal sourcePath As String, ByVal destPath As String, ByVal overwrite As Boolean)
Dim sourceDir As System.IO.DirectoryInfo = New System.IO.DirectoryInfo(sourcePath)
Dim destDir As System.IO.DirectoryInfo = New System.IO.DirectoryInfo(destPath)
'the source directory must exist for our code to run
If (sourceDir.Exists) Then
'if the destination folder does not exist, create it
If Not (destDir.Exists) Then
destDir.Create()
End If
'loop through all the files of the current directory
'and copy them if overwrite=true or they do not exist
Dim file As System.IO.FileInfo
For Each file In sourceDir.GetFiles()
If (overwrite) Then
file.CopyTo(System.IO.Path.Combine(destDir.FullName, file.Name), True)
Else
If ((System.IO.File.Exists(System.IO.Path.Combine(destDir.FullName, file.Name))) = False) Then
file.CopyTo(System.IO.Path.Combine(destDir.FullName, file.Name), False)
End If
End If
Next
'loop through all the subfolders and call this method recursively
Dim dir As System.IO.DirectoryInfo
For Each dir In sourceDir.GetDirectories()
If (dir.FullName <> Server.MapPath(strDestinationDir)) Then
CopyDirectory(dir.FullName, System.IO.Path.Combine(destDir.FullName, dir.Name), overwrite)
End If
Next
lblStatusMessage.Text = "Folder copied successfully"
lblStatusMessage.Visible = True
'if source directory does not exist
Else
lblStatusMessage.Text = "Error: source folder does not exist!"
lblStatusMessage.Visible = True
End If
End Sub

code from
http://www.xefteri.com/articles/show.cfm?id=16

good example

ASP.NET Code: get website url path

ASP.NET Code: get website url path

Dim str_server As String
Dim sArr As String()
Dim str_region As String
Dim str_lang As String

str_server = Request.Path.Substring(0, Request.Path.LastIndexOf("/") + 1)
sArr = Split(str_server, "/")
str_region = sArr(2)
str_lang = sArr(3)

facebook 死左

facebook 死左

Youtube 死左

Youtube 死左

2009年8月9日星期日

咁至識食主持: Suki 徐淑敏

咁至識食主持: Suki 徐淑敏

見佢食野個樣, 真係好好食咁樣

高登圖:




2009年8月8日星期六

EDO 巨浪大切薯片

EDO 巨浪大切薯片



EDO 巨浪大切薯片 勁賣廣告
賣到王老虎都有

搵返酒井法子,不過即時拘捕

搵返酒井法子,不過即時拘捕

http://inews.mingpao.com/htm/INews/20090808/ta62024a.htm

六合彩頭獎 5注中, 得 100 萬

六合彩頭獎 5注中, 得 100 萬


如果中頭獎都係得果 100 萬
真黑仔

2009年8月7日星期五

無線劇集: 陳茵媺係差人

無線劇集: 陳茵媺係差人



畢打自己人 : 陳茵媺係差人

烈火雄心3 : 陳茵媺係差人

原來愛上賊 : 陳茵媺係差人



結論: 陳茵媺係差人

2009年8月4日星期二

天鵝 is here

天鵝 is here

too early for most ppl

工作日誌: Eric 仔新 Office 睇場

工作日誌: Eric 仔新 Office 睇場

新 Office 係荷里活商業中心
都未知 Eric 仔租唔租
租先算la...


檢視較大的地圖

天鵝 is coming

天鵝 is coming