歡迎跟我連絡

本頁最下方有Web MSN可以直接跟我交談喔!
免安裝程式...哈哈 歡迎聊天

2009年8月5日 星期三

新一代的Windows XP Embedded

新版的XPE除了集合前兩代的功能(2007 Feature Pack也算一代),新增了下列功能
1.Microsoft Silverlight:跨瀏覽器、跨平台 plug-in,帶給您全新的媒體體驗.
2..NET Framework 3.5 :Windows 專用的最新 managed 程式碼程式設計模組.
3.支援 Windows Server 2008 (RDP 6.1):包含安全性及管理技術,可使裝置完美連結 Windows Vista,並使用 Windows Server 2008 的全新功能.
3.Windows Media Player 11:包含全新的媒體功能,可有效協助管理數位音樂、相片及影像媒體櫃.
4.Internet Explorer 7 :進一步改善瀏覽、搜尋、列印及 RSS 摘要存取等功能.
5.Windows Server Update Services (支援):軟體更新服務.
6.System Center Configuration Manager (支援):可全面評估、安裝及更新裝置的解決方案.
7.MBSA :Microsoft Baseline Security Analyzer 工具.
8.Future Platform Innovation (功能與技術) .



Windows Embedded Standard 2009 Target Designer



Navigating Windows Embedded Standard's Target Designer


開發人員可將 Windows Embedded Standard 用於各種智慧型、連線式及服務導向的先進商業或消費用途裝置,亦可執行數千種現有的 Windows 應用程式及驅動程式,範圍涵蓋精簡型電腦至多功能印表機。

高階機上盒
加油機 (Fuel Pumps)
全功能 Point Of Service 裝置
遊戲裝置
家用自動化閘道設備 (Home Automation Gateway)
工業控制器
智慧型應用裝置
多媒體網際網路裝置
Kiosk
媒體伺服器
Point Of Service 行動裝置
監控裝置
多功能印表機
可連結網路的媒體裝置與伺服器
使用 Windows 作業系統的終端機

前往下載(試用版,期限為120天,並提供完整功能 )

2009年8月3日 星期一

內湖國小

一所美美的國小,921全毀後重建重生...











其他新關資訊
學校名稱:
南投縣內湖國民小學
Nei Hu Elementary School

學校地址:
南投縣鹿谷鄉558內湖村興產路51號
No.51, Xingchan Rd., Neihu Village ,Lugu Shiang, Nantou County 558, Taiwan (R.O.C.)

.建築特色
• 全區採木構造建築—骨架使用 美國南方松 。
• 主體採用西方結構 (剪力牆系統)、東方之行架系統。
• 整體建築設計融合美、日式風格。
• 多就地取材,以原有塊石築牆、礫石鋪路。
• 保留校地原始杉樹林遍布之風貌。
• 校區置高點設有可觀察自然生態之「樹屋」。
• 校區地標 --「尼泊爾式雙塔」,通風效果良好。
• 校區內特設生態池,供學生觀察研究。

內湖森林小學位於通往溪頭森林遊樂區的台151號縣道旁,在九二一地震之後,由於遷校土地取得一波三折,使內湖國小成為重建的二百九十三所學校當中最後一所重建的學校,也是一所以發展生態教育為目標的森林生態小學。
    內湖森林小學全部採用原木為建材,照建築計劃進行重建,總經費約為七千五百萬元,規劃上儘量減少對基地原有生態的破壞,並充分配合當地景觀特色進行設計,全校共分為教學區、生態區、專科教室、行政區、宿舍區、活動區等,是一所坐落於蓊鬱林木間的森林小學。

參觀時間和注意事項

假日都開放參觀
上課日則開放四點以後參觀
但若遇學生於四點後在校學習
還請遊客避開教室等
以免影響到學生和老師
另外,要有公德心喔
不要亂丟圾垃,使用廁所後請保持乾淨
不然,小朋友和老師就累了
下雨天後,地面容易濕滑,也請自行小心。
由於地處山區,偶有蛇類出沒,也請小心。

2009年7月31日 星期五

認證登錄系統圖片產生 .Net 控制項 (續)

下面圖片中的Circle或是Pie的圖形邊緣都有鋸齒出現不怎麼美觀.


找到IdentifyPictureControl.cs中這個DrawANewPicture() Function
加入下面粗體字那行,修正後就可以美觀一點了...
//Private Function
private void DrawANewPicture()
{
myPictureSize = this.Size;
GraphicsPath myGP = new GraphicsPath();
myBitmap = new Bitmap(this.Width, this.Height);
Graphics myG = Graphics.FromImage(myBitmap);
//GDI+ 修飾用屬性
myG.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
myG.Clear(Color.White);
....

修正後,看起來舒服多了...

母親給出的答案

有個孩子對一個問題一直想不通:為什麼他的同桌的同學想考第一名就考上第一,而自己想考第一卻才考了全班第二十一名?

回家後他問道:"媽媽我是不是比別人笨?我覺得我和他一樣聽老師的話,一樣認真地做作業,可是,為什麼我總是比落後他?"媽媽聽了兒子的話,感覺到兒子開始有自 尊心了,而這種自尊心正在被學校的排名傷害著。她望著兒子,沒有回答,因為她不知道該怎樣回答。

又一次考試後,孩子考了第十七名,而他的同學還是第一名。回家後,兒子又問了同樣的問題。她真想說,人的智力確實有三六九等,考第一的人,腦子就是比一般的人靈活。然而這樣的回答,難道是孩子真想知道的答案嗎?她慶幸自己沒說出口。

應該怎樣回答兒子的問題呢?有幾次,她真想重覆那幾句被上萬個父母重覆了上萬次的話--你太貪玩了,你在學習上還不夠勤奮,和別人比起來還不夠努力……以此來搪塞兒子。然而,像她兒子這樣腦袋不夠聰明,在班上成績不甚突出的孩子,平時活得還不夠辛苦嗎?所以她沒有那麼做,她想為兒子的問題找到一個完美的答案。

兒子小學畢業了,雖然他比過去更加努力,但依然沒有趕上他的同學,不過與過去相比,他的成績一直在進步。為了對兒子的進步表示讚賞,她帶他去看了一次大海。就是在這次旅行中,這位母親回答了兒子的問題。
現在這位兒子再也不擔心自己的名次了,也再沒有人追問他小學時成績排第幾名,因為他已經以全校第一名的成績考上了大學。放寒假回來時,母校請他給同學及家長們做一段演說。其中他講小時候的一段經歷:「我和母親坐在沙灘上,她指著前面對我說,你看那些在海邊爭食的鳥兒,當海浪打來的時候,小麻雀總能迅速地起飛,牠們拍打兩三下翅膀就升入天空;而海鷗總顯得非常笨拙,牠們從沙灘飛入天空總要很長時間,然而,真正能飛越大海橫過大洋的還是海鷗。」這場演說使很多母親流下了眼淚,其中包括他自己的母親。
這位母親從不說一些令孩子洩氣的話,在找不到適當的答案前寧可沉默,以自身之受去支持孩子的一步步成長,孩子在這樣寬容的環境下,最後交出優秀的成績。

教育,是對生命個體的尊重和喚醒,是對人的內在潛能的開發和拓展,讓孩子健康地生長,需要一種平和的心境,一種智慧的胸襟,一種獨特的魅力,這一切必須以寬容為基礎!


雨季說:
一段刻苦銘心的話,可以改變聽的懂的人的一生...
但是絕大部分,都是對牛彈琴 聽者無心

2009年7月30日 星期四

認證登錄系統圖片產生 .Net 控制項

繼續上一篇文章,將Class改寫為.Net控制項

新增一個Event,如果USER點選到圓圈(Circle),會產生Identify_OK Event.
新增一個屬性SharpNumber,可以設定圖形的複雜度.
新增一個Method GetNext(),可以重新繪製新的認證圖片.

程式碼:
1.IdentifyPictureControl.cspublic partial class IdentifyPictureControl : UserControl
{
//Private Variable
private Random myRandom = new Random();
private int mySharpNo;
private Size myPictureSize;
private Bitmap myBitmap;
private Region myRegion;
private Point myMouseLocation;
public int SharpNumber
{
set { mySharpNo = value; }
get { return mySharpNo; }
}
public IdentifyPictureControl()
{
InitializeComponent();
mySharpNo = 20;
myRegion = new Region();
myMouseLocation = new Point(-1, -1);
}

//Event
public event EventHandler Identify_OK;
protected virtual void OnIdentify_OK(EventArgs e)
{
if (Identify_OK != null)
{
Identify_OK(this, e);
}
}

//Private Component Event
private void IdentifyPictureControl_Load(object sender, EventArgs e)
{
DrawANewPicture();
this.BackgroundImage = myBitmap;
}
private void IdentifyPictureControl_Click(object sender, EventArgs e)
{
if (myRegion.IsVisible(myMouseLocation))
{
OnIdentify_OK(EventArgs.Empty);
}

}
private void IdentifyPictureControl_MouseMove(object sender, MouseEventArgs e)
{
myMouseLocation = e.Location;
}
private void IdentifyPictureControl_MouseLeave(object sender, EventArgs e)
{
myMouseLocation = new Point(-1, -1);
}

//Private Function
private void DrawANewPicture()
{
myPictureSize = this.Size;
GraphicsPath myGP = new GraphicsPath();
myBitmap = new Bitmap(this.Width, this.Height);
Graphics myG = Graphics.FromImage(myBitmap);
myG.Clear(Color.White);

//DrawEllipse
int mySize = GetSize(myPictureSize.Height);
Point myPoint = GetLocation(myPictureSize, mySize);
Pen myPen = new Pen(GetColor(), 3);
myG.DrawEllipse(myPen, new Rectangle(myPoint, new Size(mySize, mySize)));
myGP.AddEllipse(new Rectangle(myPoint, new Size(mySize, mySize)));
myRegion = new Region(myGP);

//DrawRectangle
for (int i = 0; i < mySharpNo/2; i++)
{
mySize = GetSize(myPictureSize.Height);
myPoint = GetLocation(myPictureSize, mySize);
myPen = new Pen(GetColor(), 3);
myG.DrawRectangle(myPen, new Rectangle(myPoint, new Size(mySize, mySize)));
}
for (int i = 0; i < mySharpNo/2; i++)
{
mySize = GetSize(myPictureSize.Height);
myPoint = GetLocation(myPictureSize, mySize);
myPen = new Pen(GetColor(), 3);
myG.DrawPie(myPen, new Rectangle(myPoint, new Size(mySize, mySize)), GetAngle(), GetAngle());
}
}
private Point GetLocation(Size PictureSize, int SharpWidth)
{
int X = myRandom.Next(0, PictureSize.Width - SharpWidth - 3); //3 Pen Width
int Y = myRandom.Next(0, PictureSize.Height - SharpWidth - 3); //3 Pen Width
return new Point(X, Y);
}
private int GetSize(int PictureWidth)
{
return (int)(PictureWidth / myRandom.Next(2, 6));
}
private Color GetColor()
{
switch (myRandom.Next(0, 10))
{
case 0:
return Color.Yellow;
case 1:
return Color.Violet;
case 2:
return Color.Green;
case 3:
return Color.DeepPink;
case 4:
return Color.DarkSlateBlue;
case 5:
return Color.DarkRed;
case 6:
return Color.CornflowerBlue;
case 7:
return Color.DarkSalmon;
case 8:
return Color.Gainsboro;
case 9:
return Color.Gold;
case 10:
return Color.Indigo;
default:
return Color.Black;
}
}
private float GetAngle()
{
return (float)(myRandom.Next(10, 350));
}

//Public method
public void GetNext()
{
DrawANewPicture();
this.BackgroundImage = myBitmap;
}
}

2.IdentifyPictureControl.Designer.cs
partial class IdentifyPictureControl
{
///


/// 設計工具所需的變數。
///

private System.ComponentModel.IContainer components = null;

///
/// 清除任何使用中的資源。
///

/// 如果應該公開 Managed 資源則為 true,否則為 false。
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}

#region 元件設計工具產生的程式碼

///
/// 此為設計工具支援所需的方法 - 請勿使用程式碼編輯器修改這個方法的內容。
///
///

private void InitializeComponent()
{
this.SuspendLayout();
//
// IdentifyPictureControl
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.Name = "IdentifyPictureControl";
this.Size = new System.Drawing.Size(148, 148);
this.Load += new System.EventHandler(this.IdentifyPictureControl_Load);
this.MouseLeave += new System.EventHandler(this.IdentifyPictureControl_MouseLeave);
this.Click += new System.EventHandler(this.IdentifyPictureControl_Click);
this.MouseMove += new System.Windows.Forms.MouseEventHandler(this.IdentifyPictureControl_MouseMove);
this.ResumeLayout(false);

}

#endregion

}

範例引用程式碼:
private void button1_Click(object sender, EventArgs e)
{
identifyPictureControl1.SharpNumber = 30;
identifyPictureControl1.GetNext();
}


private void identifyPictureControl1_Identify_OK(object sender, EventArgs e)
{
MessageBox.Show("OK");
}

認證登錄系統圖片產生物件

目前網路上有很多防止程式自動登錄註冊...攻擊網頁的方式...
常見的方式有底下兩種...



今天利用C#寫了一個認證圖片產生物件IdentifyPicture,效果如下圖
只要USER點選到圖中唯一圓形的區塊就算認證成功(箭頭所指)...


程式碼:
public class IdentifyPicture
{
private Random myRandon;
private int mySharpNo;
private Size myPictureSize;
private Bitmap myBitmap;
public Bitmap IdPicture //產生的圖片
{
get { return myBitmap; }
}
private Region myRegion;
public Region IdRegion //驗證圓形於圖上範圍
{
get { return myRegion; }
}
public IdentifyPicture(Size PictureSize , int SharpNumber)
{
myRandon = new Random();
mySharpNo = SharpNumber;
myPictureSize = PictureSize;
myBitmap = new Bitmap(PictureSize.Width, PictureSize.Height);
myRegion = new Region();
DrawANewPicture();
}
private void DrawANewPicture()
{
GraphicsPath myGP = new GraphicsPath();
Graphics myG = Graphics.FromImage(myBitmap);
myG.Clear(Color.White);

//DrawEllipse
int mySize = GetSize(myPictureSize.Height);
Point myPoint = GetLocation(myPictureSize, mySize);
Pen myPen = new Pen(GetColor(), 3);
myG.DrawEllipse(myPen, new Rectangle(myPoint, new Size(mySize, mySize)));
myGP.AddEllipse(new Rectangle(myPoint, new Size(mySize, mySize)));
myRegion = new Region(myGP);

//DrawRectangle
for (int i = 0; i < mySharpNo; i++)
{
mySize = GetSize(myPictureSize.Height);
myPoint = GetLocation(myPictureSize, mySize);
myPen = new Pen(GetColor(), 3);
myG.DrawRectangle(myPen, new Rectangle(myPoint, new Size(mySize, mySize)));
}
for (int i = 0; i < mySharpNo; i++)
{
mySize = GetSize(myPictureSize.Height);
myPoint = GetLocation(myPictureSize, mySize);
myPen = new Pen(GetColor(), 3);
myG.DrawPie(myPen, new Rectangle(myPoint, new Size(mySize, mySize)), GetAngle(), GetAngle());
}
}
private Point GetLocation(Size PictureSize, int SharpWidth)
{
int X = myRandon.Next(0, PictureSize.Width - SharpWidth - 3); //3 Pen Width
int Y = myRandon.Next(0, PictureSize.Height - SharpWidth - 3);//3 Pen Width
return new Point(X, Y);
}
private int GetSize(int PictureWidth)
{
return (int)(PictureWidth / myRandon.Next(2, 6));
}
private Color GetColor()
{
switch (myRandon.Next(0, 10))
{
case 0:
return Color.Yellow;
case 1:
return Color.Violet;
case 2:
return Color.Green;
case 3:
return Color.DeepPink;
case 4:
return Color.DarkSlateBlue;
case 5:
return Color.DarkRed;
case 6:
return Color.CornflowerBlue;
case 7:
return Color.DarkSalmon;
case 8:
return Color.Gainsboro;
case 9:
return Color.Gold;
case 10:
return Color.Indigo;
default:
return Color.Black;
}
}
private float GetAngle()
{
return (float)(myRandon.Next(10, 350));
}
}

應用範例如下:

程式碼:
public partial class Form1 : Form
{
Region CheckRegion;
Point MouseLocation;
IdentifyPicture myIDPicture;
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
CheckRegion = new Region();
MouseLocation = new Point(0, 0);
myIDPicture = new IdentifyPicture(pictureBox_CP.Size, 10);
pictureBox_CP.Image = myIDPicture.IdPicture;
CheckRegion = myIDPicture.IdRegion;
}

private void button_NewPicture_Click(object sender, EventArgs e)
{
myIDPicture = new IdentifyPicture(pictureBox_CP.Size, 10);
pictureBox_CP.Image = myIDPicture.IdPicture;
CheckRegion = myIDPicture.IdRegion;
label_Result.Text = "?";
}
private void pictureBox_CP_Click(object sender, EventArgs e)
{
if (CheckRegion.IsVisible(MouseLocation))
label_Result.Text = "OK";
else
label_Result.Text = "?";
}
private void pictureBox_CP_MouseMove(object sender, MouseEventArgs e)
{
MouseLocation = e.Location;
}
private void pictureBox_CP_MouseLeave(object sender, EventArgs e)
{
MouseLocation = new Point(0, 0);
}

}

提供大家參考(重點用粗體字表示)...
若有錯請不吝指教...
有機會在改成.Net 控制項(Control)...

2009年7月22日 星期三

Google 的日全蝕


今天早上8點20分,全亞洲都在屏息以待一個天文奇觀,本世紀最長的日蝕現象將從上演,時間長達六分多鐘,是去年新疆日全蝕的近三倍,不過台灣只能看到日偏蝕...
其餘亞洲地區包括印度、尼泊爾、不丹、孟加拉、日本南部等地都可以看到日全蝕的景象,根據美國太空總署(NASA)運用Google Map的介面,在地圖上畫出了日全蝕所經過的地帶,其中中國大陸佔據了最大的區塊,日蝕最長的地區則是日本鹿兒島縣十島村的惡石島,時間長達6分20秒。日本的直播網站為:http://www.live-eclipse.org/

今年台灣只能看到日偏蝕的現象,不過到2012年3月21日台灣的基隆、台北、桃園、新竹、苗栗一代將可見到日環蝕;至於日全蝕的現象,則要等到2070年4月11日,地點在墾丁及蘭嶼一帶。

2009年7月20日 星期一

Windows7內建桌布







雨季說:
新版Windows的內建桌布風格,比以往鮮明許多...
或許Microsoft想要抓住更多使用者的心吧...

2009年7月10日 星期五

Parallel運算 in .NetFramework 4.0出現

架構圖


使用前必須先Using
System.Threading
System.Threading.Tasks
這兩個NameSpace

簡單範例:
....
Parallel.Invoke(
() => MethodA(),
() => MethodB(),
() => MethodC() );
....

private void MethodA()
{
MessageBox.Show("This is Method A");
}

private void MethodB()
{
MessageBox.Show("This is Method B");
}

private void MethodC()
{
MessageBox.Show("This is Method C");
}


相關文章:
http://msdn.microsoft.com/zh-tw/dd996613.aspx
http://msdn.microsoft.com/en-us/concurrency/default.aspx
http://msdn.microsoft.com/en-us/library/dd460693(VS.100).aspx

2009年7月6日 星期一

VS2005 屬性視窗 (Property Window) 不見了

今天早上開啟VS2005時發現,屬性視窗 (Property Window) 不見了,怎麼都叫不出來,這還得了...

趕緊上網用Google及Bing查詢結果,好像只有重新安裝一途,因為也嘗試過修復,依然是叫不出屬性視窗...
正打算重新安裝時,突然想到"工具"->"匯出及匯入設定",試看看說不一定可以死馬當活馬醫...

打開候選取"匯入選取的環境設定"

然後"瀏覽",選取檔案

然後選擇"CurrentSettings.vssettings",按OK.
檔案位於->..\Documents and Settings\(user name)\My Documents\Visual Studio 2005\Settings

匯入成功後,重新啟動VS2005,終於可以叫出"屬性視窗",哈哈....成功了,不用重新安裝....

MSN狀態(我在線上時,可以跟我交談喔)