o module named urls問題的解決方案如下: 在配置Django管理介面的時候,遇到了No module named urlsGoogle一把,大部分的解決方案是:urlpatterns = patterns('', (r'^admin/(.*)', admin.site.root), ) 不過最新Django要使用下面的配置(r'^admin/(.*)',include(admin.site.urls)) 尤其要注意: # Uncomment the next two
如何把一個DataTable中的內容變成Excel然後輸出出來。本方法解決了兩個問題:1、利用response.write寫出檔案後,檔案名稱為亂碼2、數字會自動格式化。如會把00.1自動格式化成0.1,有時候你的確需要00.1,總之,你希望輸出的是一個文本,而不是excel預設的東西。代碼Code highlighting produced by Actipro CodeHighlighter
公司的系統有一個新的要求,很簡單,就是在顯示文章的時候署名、日期、本文的顏色和字體要各不相同。這是個簡單的不要再簡單的要求了。但是在實現的時候卻花了我一個小時,是不是有點不可思議?呵呵,就是一個小地方的偏差。 這個功能需要用到RichTextBox這個控制項,於是我寫了一個添加文本的方法來簡單實現:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.
最近為了提高Silverlight項目的使用體驗,在項目中加了一個全屏支援。Silverlight全屏是非常方便的,給全屏按鈕加上處理邏輯,將IsFullScreen屬性設為true即可。範例程式碼如下:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->this.fullScreen = new DelegateCommand(o => {
Loopback check security feature是在Microsoft Windows Server 2003 Service Pack 1 (SP1)中新加入的. 它的目的是在你的電腦上阻止reflection攻擊. 所以, 如果使用FQDN或者自訂的跟電腦名稱字不匹配的host header的來訪問電腦原生時候, authentication會失敗.如何關掉loopback check?Set the DisableStrictNameChecking registry
Time Limit: 10 Seconds Memory Limit: 32768 KBFor hundreds of years Fermat's Last Theorem, which stated simply that for n > 2 there exist no integers a, b, c > 1 such that a^n = b^n + c^n, has remained elusively unproven. (A recent proof