2014年3月26日 星期三

[免費字型] 下載 Google Fonts (TTF / True Type)

http://www.dotblogs.com.tw/mis2000lab/archive/2014/03/17/google_font_download.aspx

[免費字型] 下載 Google Fonts (TTF / True Type)





這個網站有免費的字型 (google提供)

原則上,他提供的是網路字型,讓大家的網頁、軟體可以採用
如果您要修改自己的OS(如 Windows)裡面的字型

有兩種方法:

第二,我是沿用google建議的作法  https://code.google.com/p/googlefontdirectory/

Windows

  1. Download and install TortoiseHG, a graphical user interface for Mercurial.  請先下載這套軟體 -- TortoiseHG
  2. Make a new folder somewhere.  軟體安裝完成後,在您的硬碟設定(新增)一個目錄。空間大一點,全部字型約有3 GB
  3. Right click that folder, go to TortoiseHG, and click Clone  在您設定的目錄,按下滑鼠右鍵,選擇「TortoiseHG」然後選擇「Clone」。如下圖。
  4. Enter for the Source https://googlefontdirectory.googlecode.com/hg/  在「來源」這裡填入這個網址
  5. Click OK and wait for the download to complete
In future, to update you can then right click the folder you made and click 'Hg Synchronize'
To install a downloaded font, open the Control Panel, find the Fonts folder there, and drag and drop the OTF or TTF files inside that folder. You may need to restart your applications, but not the whole computer, for the fonts to be ready for use.



下載全部字型,大約需要 3GB硬碟空間
下載完成後,在您設定的目錄下,有一個 ofl 的子目錄,裡面就有 .ttf檔(字型檔)

每一個字型都有名字,您對照網站  https://www.google.com/fonts  就能照到自己想要的



 
............................. 寫信給我,mis2000lab (at) yahoo.com.台灣........................................................
.............................   facebook社團   https://www.facebook.com/mis2000lab   ............................
.............................   Google+   https://plus.google.com/100202398389206570368/posts ..............

網頁上的補充範例(售後服務)不一定能立即提供 VB / C#語法 (看時間夠不夠寫,請不要跟我們要)。
書本上面的範例,一定有 VB / C#雙語法給您學習。          請看我們的「售後服務」範圍(嚴格認定)

防範SQL Injection / XSS攻擊,請看:ASP.NET安全寫作    資料來源 -- TWISC@NTUST網路應用安全知識庫
......................................................................................................................................................


http://www.dotblogs.com.tw/mis2000lab/archive/2014/03/17/google_font_download.aspx

[免費字型] 下載 Google Fonts (TTF / True Type)


DropDownList使用者未曾挑選(沒選取)任何一個子項目,該如何警示?

http://www.dotblogs.com.tw/mis2000lab/archive/2014/03/24/dropdownlist_selectedindex_20140324.aspx

DropDownList使用者未曾挑選(沒選取)任何一個子項目,該如何警示?


DropDownList使用者未曾挑選(沒選取)任何一個子項目,該如何警示?
 
 
根據 msdn網站的說明:
SelectedIndex 屬性  -- 清單中選取項目的最低序數索引。 預設值為 -1,指出沒有選取任何項目。
 
 
 
經過測試
 
RadioButtonList / CheckBoxList / ListBox都可以這樣使用(如同下面程式),來偵測 User沒有點選任何一個項目
 
唯獨 DropDownList做不到???
 
    protected void Button3_Click(object sender, EventArgs e)
    {
        if (RadioButtonList1.SelectedIndex == -1)
        {
            Label1.Text = "
[Button3]--RadioButtonList1尚未選取";
        }
        else
        {
            Label1.Text = "
[Button3]--RadioButtonList1--" + RadioButtonList1.SelectedValue;
        }
    }
 
 
 
 
DropDownList當您按下按鈕之後,總是會抓到第一個子選項(selectedIndex = 0)
 
即使您根本沒有點選它、
也沒有設定它(第一個子選項)是預設選項 (.Selected)
 
不管您是否設定 DropDownList的 AutoPostBack都一樣。
 
(點選圖片,可以連結到解答)
 
 
 
解決方法:
 
 
 
       
                               OnSelectedIndexChanged="DropDownList2_SelectedIndexChanged">
 
                Value="0">未選取
                X111
                X222
                X333
                X444
       
       
 ID="RequiredFieldValidator2" runat="server"
             ControlToValidate="DropDownList2"
             ErrorMessage="RequiredFieldValidator未選取!" ForeColor="Red" InitialValue="0">
       
       
         
 
 
 
 


 
............................. 寫信給我,mis2000lab (at) yahoo.com.台灣........................................................
.............................   facebook社團   https://www.facebook.com/mis2000lab   ............................
.............................   Google+   https://plus.google.com/100202398389206570368/posts ..............


http://www.dotblogs.com.tw/mis2000lab/archive/2014/03/24/dropdownlist_selectedindex_20140324.aspx

DropDownList使用者未曾挑選(沒選取)任何一個子項目,該如何警示?

網頁的 ComboBox 怎麼做? ASP.NET 與 HTML5

http://www.dotblogs.com.tw/mis2000lab/archive/2014/03/25/combobox_aspnet_html5_datalist.aspx

網頁的 ComboBox 怎麼做? ASP.NET 與 HTML5


Windows Form上面的 ComboBox,
就是下拉式選單(DropDownList)加上文字輸入方塊(TextBox)的混合體(Hybrid)
 
網頁也能作出來嗎?
 
 
 
 
在此提供兩種作法:
 
第一種,ASP.NET
 
HTML畫面上,請使用下拉式選單(DropDownList)加上文字輸入方塊(TextBox)
 
建議下拉式選單(DropDownList)設定 AutoPostBack = true
 
    protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
    {
        TextBox1.Text = DropDownList1.SelectedItem.Text;
    }
 
如果您要做的更好,搭配ASP.NET AJAX (UpdatePanel)會更滑順一點
上面兩個範例在我的書籍已經收錄了。
 
 
 
 
第二種,HTML5的作法,
只要你的瀏覽器版本夠新,應該都能看見下面成果





 
............................. 寫信給我,mis2000lab (at) yahoo.com.台灣........................................................
.............................   facebook社團   https://www.facebook.com/mis2000lab   ............................
.............................   Google+   https://plus.google.com/100202398389206570368/posts ..............



網頁的 ComboBox 怎麼做? ASP.NET 與 HTML5

2014年1月28日 星期二

OutputCache在VS 2012/2013的錯誤 -- 張貼快取替換與IIS修改回應緩衝的Integrated不相容(Post cache substitution is not compatible with modules in the IIS integrated pipeline that modify the response buffers)

http://www.dotblogs.com.tw/mis2000lab/archive/2014/01/13/vs2013_iis_outputcache_substitution_error.aspx

OutputCache在VS 2012/2013的錯誤 -- 張貼快取替換與IIS修改回應緩衝的Integrated不相容(Post cache substitution is not compatible with modules in the IIS integrated pipeline that modify the response buffers)




執行以前的範例,在新版 VS 2013卻發現錯誤?


錯誤訊息:
 
 
If the application is hosted on IIS7 in Integrated Pipeline mode, an exception of type System.InvalidOperationException occurs with the following details:
 
Exception Details: System.InvalidOperationException: Post cache substitution is not compatible with modules in the IIS integrated pipeline that modify the response buffers.  Either a native module in the pipeline has modified an HTTP_DATA_CHUNK structure associated with a managed post cache substitution callback, or a managed filter has modified the response.
 

最主要是 Response.WriteSubstitution() 與 Substitution控制項引起


解決方法:
     請把您的網站、專案,修改成下面這樣。
    上圖的錯誤訊息,其實講得很清楚。


如果還無法解決,請重新開一個「空」網站來執行
也需做好上圖設定。


不過,程式裡面的「Response.WriteSubstitution() 與 Substitution控制項」仍無法運作

請看微軟的說明    http://support.microsoft.com/kb/2014472
To avoid the problem, choose one of the following options:
 
    Disable output caching on pages that are using substitution blocks.
 
OR
 
    Do not use the response filter module.


相關文章與解法(關閉 IIS的 Response Filter) 
 
                          
 
 
 
 




 
............................. 寫信給我,mis2000lab (at) yahoo.com.台灣........................................................
.............................   facebook社團   https://www.facebook.com/mis2000lab   ............................
.............................   Google+   https://plus.google.com/100202398389206570368/posts ..............

[RWD]黯然銷魂 之 HTML KickStart套件,太好用了,以後用不到怎麼辦? --響應式網頁 / 自適應網頁(Responsive Web)設計

http://www.dotblogs.com.tw/mis2000lab/archive/2014/01/15/super_easy_responsive_web_design_html_kickstart.aspx

[RWD]黯然銷魂 之 HTML KickStart套件,太好用了,以後用不到怎麼辦? --響應式網頁 / 自適應網頁(Responsive Web)設計



之前介紹的 Boostrap也很棒,
但我學習它的時間,稍微長了一點
裡面的CSS設定,字眼也長了些



今天在社群上面看見一篇介紹文:http://www.webdesignerdepot.com/2014/01/how-to-kickstart-your-html/

驚為天人啊!!

教學? HOW-TO?
都免啦!

直接看,喜歡的......立刻COPY就能用啦!
好簡單啊!

學習時間,10分鐘搞定


下面是我整理出來的範例,照著作(自己動手)
一定學得會。


簡單、直覺、立即上手......不可思議的 HTML KickStart
1. 官方網站,下載一個檔案。解開後放入您的網站
2. 網頁最上方,務必使用 HTML5 DocType  
3. 加入HTML表頭的 .js與 .css檔。

開始了,請慢用(太好學了,不用十分鐘。慢不下來啊~)

==== 以下是 ASP.NET檔案(.aspx)===========================
 
   
       
 
   
   
       
 
   
   
 
       

按鈕(Button)#1 Sizes

 
       
       
 
 
       
       
       
       
   
   
   




HTML KickStart套件,太好用了,以後用不到怎麼辦?
    太黯然了~~~
       太銷魂了




 
............................. 寫信給我,mis2000lab (at) yahoo.com.台灣........................................................
.............................   facebook社團   https://www.facebook.com/mis2000lab   ............................
.............................   Google+   https://plus.google.com/100202398389206570368/posts ..............

[MVA]微軟虛擬學院,從零開始的課程,HTML5 & CSS3

http://www.dotblogs.com.tw/mis2000lab/archive/2014/01/09/mva_html5_beginner_20140107.aspx

[MVA]微軟虛擬學院,從零開始的課程,HTML5 & CSS3

協助微軟廣宣

裡面有很多免費的課程與範例

今天與大家推薦的HTML5 課程,剛好我也在準備這方面的內容

這些課程也跟「微軟認證考試」串在一起
您在學習時,也可以對應微軟的認證科目,將來參加考試
一舉兩得。

下面的課程都是從零開始」,完全沒有負擔

即使英文不好(聽不懂),光是投影片的說明,也學到不少
更令人驚訝的是,其實IT的關鍵字就是那幾個單字,聽久了,無意間「英聽」也會進步

在這裡求學,還可以依照課程累積點數喔。
 
 
 
每一個「次主題」都有範例Code 可以下載
 
    我自己比較喜歡從範例裡面學
 
    老是講觀念,沒有範例可以作、可以改,我總是覺得不踏實
 
    MVA的課程在這一點尤其傑出。
 
 
 
 
 
 
 
這部分的課程,跟Windows App有點關連,但學習HTML5仍是很OK的
 
 
 
 
 
如果您是 ASP.NET 4.5的初學者
下面的課程從零開始,涵括了各大主題,您可以輕鬆學習
 
 
 
 


上一篇文章(轉貼)就有提到這件事 -- 
 
 
微軟MVA就是一個專業的、學校以外的學習管道






 
............................. 寫信給我,mis2000lab (at) yahoo.com.台灣........................................................
.............................   facebook社團   https://www.facebook.com/mis2000lab   ............................
.............................   Google+   https://plus.google.com/100202398389206570368/posts ..............