bestlong 怕失憶筆記

當健忘由隨機逐漸趨向常態時,作筆記是非常必要的

Delphi 好料

http://fundementals.sourceforge.net/

Fundamentals is a collection of open source code libaries for use with the Delphi language.

The collection consists of:

  • Utility functions:
  • String operations, Dynamic array operations, System functions and Date & Time operations.

  • Unicode functions:
  • Unicode codecs and Unicode character and string functions.

  • Streams:
  • Common stream implementations that includes parsing support and binary packing.

  • Datastructures:
  • Commonly used data structures, including efficient array and dictionary implementations.

  • Sockets:
  • UDP and TCP server and client classes. Support for asynchronous or threaded modes.

  • Mathematics:
  • Units included for vectors, matrices, rational numbers and complex numbers.

    Leave a Comment

    MS-SQL 改變 Database 中 Table 的 Owner

    1. 更改某個 Table 的 Owner
    exec sp_changeobjectowner ‘tablename’,’dbo’

    2. 使用預儲程序變更全部的 Table 的 Owner

    1
    2
    3
    4
    CREATE PROCEDURE dbo.User_ChangeObjectOwnerBatch
    @OldOwner as NVARCHAR(128),
    @NewOwner as NVARCHAR(128)
    AS
    1
    2
    3
    DECLARE @Name as NVARCHAR(128)
    DECLARE @Owner as NVARCHAR(128)
    DECLARE @OwnerName as NVARCHAR(128)
    1
     
    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
    DECLARE curObject CURSOR FOR
    select 'Name' = name,
    'Owner' = user_name(uid)
    from sysobjects
    where user_name(uid)=@OldOwner
    order by name

    OPEN curObject
    FETCH NEXT FROM curObject INTO @Name, @Owner
    WHILE(@@FETCH_STATUS=0)
    BEGIN
    if @Owner=@OldOwner
    begin
    set @OwnerName = @OldOwner + '.' + rtrim(@Name)
    exec sp_changeobjectowner @OwnerName, @NewOwner
    end
    -- select @name,@NewOwner,@OldOwner

    FETCH NEXT FROM curObject INTO @Name, @Owner
    END

    close curObject
    deallocate curObject

    GO

    Leave a Comment

    10個你不是富人的原因

    其實你沒有成為百萬富翁的原因非常的簡單,並不是你沒有賺到足夠多的錢,而是你沒有樹立起正確的對待金錢的態度。
    下面列出10條最可能阻礙你成為富豪的原因:

    1.你在意你的鄰居怎麼看你:你是否把很多錢花在為了向鄰居或是朋友炫耀而買的無用物上了?

    2.你沒有耐心:也許你欠下了一屁股的信用卡債務只是因為你沒有耐心去存下錢一次性付清它。

    3.你有一些壞習慣:吸煙、酗酒、賭博不止浪費你的金錢,也讓你的精神沉淪。

    4.你沒有目標:如果你沒有設立自己的財務目標,又怎麼指望去實踐它?

    5.你沒有做好準備:意外可能發生在任何人身上,你是否有足夠的保險去應對它們?

    6.你總想著一夜致富:天上不會掉餡餅。

    7.你依賴別人來管理你的財產:記住,當別人告訴你該怎麼投資的時候,他們只是想賺自己的錢。傾聽別人的意見,但做自己的決定。

    8.你投資在自己不懂的領域上:當你聽到別人在某個領域獲利頗豐就急急忙忙的想要衝進去的時候不要忘了這個前提,別人能夠贏利是因為他了解自己的領域。

    9.你極端的害怕失敗:你是否因為害怕一丁點的損失而把所有的錢都存在銀行呢?

    10.你忽視自己的財務狀況:認為自己不夠富只是因為沒有賺到足夠的錢,而從來不去審視自己的開銷和投資情況。

    Leave a Comment

    WebCalendar language translation: Holo-Big5

    國際化的軟體系統都會提供語系檔來讓熱心的使用者來支援翻譯,而 WebCalendar 也是其中一套。中文化有正體(繁體)語系、簡體語系都可說司空見慣,不過這可還有一個 Holo-Big5 語系檔(河洛語系檔),其中對英文的翻譯可就很令人會心一笑。以下節錄部份翻譯內容讓各位看官感覺一下:

    Yes: 好
    No: Mai
    Allow public access: 允準公眾 access
    Are you sure you want to delete this entry?: 你敢確定 beh 刪除這個記事?
    Sun: 禮拜
    Mon: 拜一
    Tue: 拜二
    Wed: 拜三
    Thu: 拜四
    Fri: 拜五
    Sat: 拜六
    Access public calendar: 入去公眾行事曆
    Back to My Calendar: 轉去我 e 行事曆

    以上翻譯自己念起來感覺很有趣也真的很傳神。也很佩服這些熱心人士的努力。

    參考網站:WebCalendar

    Leave a Comment

    [PHP] Web Page No Cache

    設計動態網頁一定需要避免被瀏覽器 Cache 網頁。在 PHP 程式當中加入此一函數並且在適當位置呼叫執行即可。

    function send_no_cache_header () {
    header ( “Expires: Mon, 26 Jul 1997 05:00:00 GMT” );
    header ( “Last-Modified: ” . gmdate ( “D, d M Y H:i:s” ) . ” GMT” );
    header ( “Cache-Control: no-store, no-cache, must-revalidate” );
    header ( “Cache-Control: post-check=0, pre-check=0”, false );
    header ( “Pragma: no-cache” );
    }

    Leave a Comment

    • 近期留言

    • 標籤

    • 彙整