phpmailer
phpmailer 是在 php 底下一個很不錯的送信 package
具有發群組信件、發送附件、崁入 image 等一定會用到的功能
許多 php base 的 web 程式會 reference 這個 package, 不用重複開發相同的功能
相關資訊可以到 phpmailer 瀏覽相關資料
Outlook 裡存在一種檔案格式,可以將重要的 schedule 自訂成假日檔案 (Outlook.hol),可以將自訂的檔案發佈給多人,每個人都是使用相同的行事曆
檔案自訂方式只需要開啟文字編輯器 (例如,記事本) ,建立一個命名為 Outlook.hol 的檔案 (檔案名稱可自訂,副檔名需為 .hol)
內容建立如以下格式
[國家/地區或描述] ###
事件描述, yyyy/mm/dd
事件描述, yyyy/mm/dd
(### 代表項目總數)
注意:[國家/地區或描述]的中括號和數字之間必須插入一個空格,在行的結尾加上換行字元
舉例說明:
[財務請款] 3
一月份月底截止, 2009/1/30
二月份月底截止, 2009/2/27
三月份月底截止, 2009/3/27
儲存後 Outlook.hol 即可將檔案發佈給其他人,新增這些日期到自己的行事曆
範例檔案可參考以下附件
outlook hol sample
隨手記下來,當做筆記用
— 1. 查詢所有 session, 確認是否有人使用某一個 package
SELECT * FROM v$access va, v$session vs WHERE va.object = 'XXWIP_CLOT_TEMP_T' AND va.sid = vs.sid;
— 2. 查詢是否有人正 lock 某一個 package
SELECT * FROM sys.dba_ddl_locks WHERE NAME = 'XXINVPKG';
— 3. 查詢某個 table 是否被人 lock
SELECT oracle_username, os_user_name, locked_mode, object_name, object_type FROM v$locked_object a, all_objects b WHERE a.object_id = b.object_id AND object_name LIKE 'XXWIP_CLOT%';
— 4. 所有執行 session 的 sql command
SELECT c.spid unix_pid, --b1, b.osuser os_user, --c1, b.username oracle_user, --c2, b.sid sid, --b2, b.serial# serial#, --b3, a.sql_text FROM v$sqltext a, v$session b, v$process c WHERE a.address = b.sql_address -- and b.status = 'ACTIVE' /* YOU CAN CHOOSE THIS OPTION ONLY TO SEE ACTVE TRANSACTION ON THAT MOMENT */ AND b.paddr = c.addr AND a.hash_value = b.sql_hash_value ORDER BY c.spid, a.hash_value, a.piece
在公司或有使用 proxy 環境之下, 優先取得 LAN ip address 的自訂 function
Notice:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | $_SERVER['HTTP_X_FORWARDED_FOR'] 在 IE6、chrome 下, 回傳 NULL, firefox3.0x 之下則回傳本 local ip address $_SERVER[REMOTE_ADDR] 在 IE6、chrome 下, 回傳 local ip address, firefox3.0x 之下則回傳本 proxy ip address <?php function getIp() { $ip_address=$_SERVER['HTTP_X_FORWARDED_FOR']; if ($ip_address==NULL){ $ip_address=$_SERVER[REMOTE_ADDR]; } return $ip_address; } ?> |
$_SERVER['HTTP_X_FORWARDED_FOR'] 在 IE6、chrome 下, 回傳 NULL, firefox3.0x 之下則回傳本 local ip address $_SERVER[REMOTE_ADDR] 在 IE6、chrome 下, 回傳 local ip address, firefox3.0x 之下則回傳本 proxy ip address <?php function getIp() { $ip_address=$_SERVER['HTTP_X_FORWARDED_FOR']; if ($ip_address==NULL){ $ip_address=$_SERVER[REMOTE_ADDR]; } return $ip_address; } ?>
目的: mantis 預設 handler 可處理任一 issue (bug), 修改程式功能, 限制只有被指派的 issue (bug) handler 才能更新狀態
註: 需回收 assign sponsor 權限給更高權限者, ex. , manager
mantis 版本 1.2.a03
開啟 root 目錄底下, 檔案: bug_change_status_page.php
搜尋
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | $t_status_label = str_replace( " ", "_", MantisEnum::getLabel( config_get( 'status_enum_string' ), $f_new_status ) ); 在這一行之前, 插入以下程式碼 /* 修改 -- 2009.04.20 */ /* 限制只有 owner 以及有權限的人(assign_sponsor)才可以 access*/ if (( $f_handler_id != NO_USER ) ) { if ( !access_has_bug_level( config_get( 'assign_sponsored_bugs_threshold' ), $f_bug_id ) ) { if ( access_has_bug_level( config_get( 'handle_sponsored_bugs_threshold' ), $f_bug_id, $f_handler_id ) ) { if (!(bug_get_field( $f_bug_id, 'handler_id' ) == auth_get_current_user_id() )) { ## 權限不足, stop trigger_error( ERROR_HANDLER_ACCESS_TOO_LOW, ERROR ); } } } } /* 修改 -- 2009.04.20 */ |
$t_status_label = str_replace( " ", "_", MantisEnum::getLabel( config_get( 'status_enum_string' ), $f_new_status ) ); 在這一行之前, 插入以下程式碼 /* 修改 -- 2009.04.20 */ /* 限制只有 owner 以及有權限的人(assign_sponsor)才可以 access*/ if (( $f_handler_id != NO_USER ) ) { if ( !access_has_bug_level( config_get( 'assign_sponsored_bugs_threshold' ), $f_bug_id ) ) { if ( access_has_bug_level( config_get( 'handle_sponsored_bugs_threshold' ), $f_bug_id, $f_handler_id ) ) { if (!(bug_get_field( $f_bug_id, 'handler_id' ) == auth_get_current_user_id() )) { ## 權限不足, stop trigger_error( ERROR_HANDLER_ACCESS_TOO_LOW, ERROR ); } } } } /* 修改 -- 2009.04.20 */
很討厭網路上無所不在的廣告
管他是 pop up、浮動式、關鍵字廣告,還是其他有的沒的
如果使用的瀏覽器,有內文過濾功能,例如 firefox、maxthon 等
可針對特定網址進行過濾,讓這些廣告消失在眼前
google: 設定禁止以下網址
*.googlesyndication.com/*
yahoo (taiwan): 設定禁止以下網址
http://l.yimg.com/tw.yimg.com/a/tw/*
簡單設定完畢,等哪天失效,再來找其他方法
原文轉貼自 (部落格 but,or bug…)
程式設計師的格言(盜作不少)
譯自
http://www2.biglobe.ne.jp/~oni_page/other/etc/pr03.html
http://mixi.jp/view_community.pl?id=1772737
(版本4 2008/12/16更新)
譯註
SE是日本軟體公司里程式設計師的頭子。自己不太寫程式,主要工作是跟客戶確認規格。
程式設計師多半自己不面對客戶。
在台灣隨公司不同,比較接近SA或PM。
總之就保留原樣寫SE囉。
—————
(閱讀全文…)