轉載:[The Will Will Web] 如何讓 ASP.NET Web API 無論任何要求都回應 JSON 格式

// 須加入參考:「System.Net.Http.Formatting」、「System.Net.Http」.

        protected void Application_Start(object sender, EventArgs e)
        {            GlobalConfiguration.Configuration.Formatters.XmlFormatter.SupportedMediaTypes.Clear();  // 加入這一行.
        }

 


文章標籤

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

範例:

public class AutoStudent {

    // Singleton
    private static AutoStudent instance = null ;

    public static AutoStudent getInstance() {
        if ( instance == null ) {
            synchronized ( AutoStudent.class ) {
                if ( instance == null ) {
                    instance = new AutoStudent();
                }
            } // synchronized
        }
        return instance;
    } // getInstance()

    private AutoStudent()
    {
    }

} // public class AutoStudent

 

參考:[良葛格] Singleton 模式

文章標籤

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

在網路上找工具,下載免安裝版執行;
出現一個看不懂的錯誤訊息:(如圖)

2017-02-05_133744.png

文章標籤

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

1. 使用 Microsoft Office Document Imaging (MODI)

條件:TIFF 檔案格式。

*技巧:用小畫家另存成TIFF檔。

文章標籤

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

OCP: the Open-Closed Principle
Software entities (class, modules, functions, etc.) should be open for extension, but closed for modification.


一個軟體個體應該要夠開放使得它可以被擴充,但是也要夠封閉以避免不必要的修改。這樣解釋鄉民們應該還是看不懂,接著看 Robert 在書中所說得這段話就會很清楚了 (p. 99):


When a single change to a program results in a cascade of changes to dependent modules, the design smells of Rigidity. The OCP advises us to refactor the system so that further changes of that kind will not cause more modifications. If the OCP is applied well, then further changes of that kind are achieved by adding new code, not by changing old code that already works.

文章標籤

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

 

實際時間 8:07                                      
  信義國小站 O6 文化中心 O7 五塊厝 O8 技擊館 O9 衛武營 O10 鳳山西站 O11 鳳山 O12 大東 O13 鳳山國中 O14 大寮站 OT1
計時(累加) 00:00.00                                   15:35.43  
行駛時間(約)   01:30                                    
修正   +5   01:30   01:30   01:30   01:30   01:30   01:30   01:40   01:60    
                                +10(~20)   +20(~30)   +40(~100)

 

實際時間   計時(累加) 行駛時間(約) 修正
8:07 信義國小站 00:00.00    
  O6   01:30 +5
  文化中心      
  O7   01:30  
  五塊厝      
  O8   01:30  
  技擊館      
  O9   01:30  
  衛武營      
  O10   01:30  
  鳳山西站      
  O11   01:30  
  鳳山      
  O12   01:30  
  大東      
  O13   01:40 +10(~20)
  鳳山國中      
  O14   01:60 +20(~30)
  大寮站 15:35.43    
  OT1     +40(~100)

 

文章標籤

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

[Visual Studio 2012]

*.sln

文章標籤

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

在職場上..
有些好東西,好技術,非常稀少 會有人 欣賞、或稱讚 它是好方法...。 「你先做出來再說」的現實光景..。
他們不喜歡 在程式碼中,貼了一些有的沒的..,他們:「我不需要!」(我只要知道對於除錯、處理問題,有幫助的就好!) (其他的都給我砍掉!)

文章標籤

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

1. Web Boost

2. better Browser

3. The Great Suspender

文章標籤

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

原文:http://walker-a.com/archives/3117
觀看日期:2016/5/30

原文作者:ITWALKER

文章標籤

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