PIXNET Logo登入

是 我的部落格

跳到主文

歡迎光臨是 我在痞客邦的小天地

部落格全站分類:美食情報

  • 相簿
  • 部落格
  • 留言
  • 名片
  • 6月 30 週二 200919:47
  • 專案監控(Project Monitoring and Control, PMC)


專案監控(Project Monitoring and Control, PMC)的目的在瞭解專案進度,以便在專案執行績效嚴重偏離專案計畫時,可採取適當的矯正措施。


 


文件化的專案計畫是監控各項活動、溝通狀態及採取矯正措施的基礎。專案進度主要決定於工作產品、工作屬性、工作量,以及成本的實際值與規定於里程碑或專案時程之控制階層或分工結構圖(WBS)之規劃值的比較結果。當執行績效重大偏離原訂計畫時,適當的能見度可促使採取及時的矯正措施。如果重大偏離未解決,則會阻礙專案達成目標。這些執行方法使用「專案計畫」一詞,以代表管制專案的全盤計畫。當專案實際狀況重大偏離預期值時,適當地採取矯正措施。所採取的矯正措施可能需要重新進行專案規劃,而重新規劃可能包括修訂原計畫、訂定新的協議,或在現行計畫中增加額外的降低活動。


 


SG 1 依計畫監控專案:依專案計畫監控專案實際執行績效與進度。


SP 1.1 監控專案規劃之各項參數:依專案計畫監控專案實際執行績效與進度。


SP 1.2 監控承諾事項:依專案計畫監控所界定的承諾。


SP 1.3 監控專案風險:依專案計畫監控所界定的風險。


SP 1.4 監控資料管理:依專案計畫監控專案資料的管理。


SP 1.5 監控關鍵人員的參與:依專案計畫監控關鍵人員的參與。


SP 1.6 進行進度審查:定期審查專案的進度、執行績效及議題。


SP 1.7 進行里程碑審查:於專案里程碑,審查專案的完成情形及執行結果。


 


SG 2 管理矯正措施直到結案:當專案的執行績效或結果重大偏離計畫時,管理矯正措施直到結案。


SP 2.1 分析議題:蒐集與分析議題,並決定採取必要的矯正措施以解決議題


SP 2.2 採取矯正措施:對界定的議題,採取矯正措施。


SP 2.3 管理矯正措施:管理矯正措施直到結案。


 


GG 1 達成特定目標:本流程將界定之輸入的工作產品轉換為輸出的工作產品,並支援與促成流程領域特定目標的達成。


GP 1.1 實施特定執行方法:實施專案監控流程的特定執行方法,以發展工作產品與提供服務,達成流程領域的特定目標。


 


GG 2 制度化已管理流程:將流程制度化為已管理流程。


GP 2.1 建立組織政策:建立並維謢組織政策,以規劃並執行專案監控流程。


GP 2.2 規劃流程:建立並維謢執行專案監控流程的計畫。


GP 2.3 提供資源:提供充足的資源,以執行專案監控流程、發展工作產品及提供流程服務。


GP 2.4 指派責任:指派專案監控流程的責任與授權,以執行流程、發展工作產品及提供流程服務。


GP 2.5 訓練人員:依需要訓練人員,以執行或支援專案監控流程。


GP 2.6 管理建構:將指定的專案監控流程工作產品,納入適當層級的控制。


GP 2.7 界定並納入相關的關鍵人員:依計畫界定並納入相關關鍵人員。


GP 2.8 監控流程:依本流程的執行計畫,監控專案監控流程,並採取適當的矯正措施。


GP 2.9 客觀評估遵循程度:依本流程的說明、標準及程序,客觀評估專案監控流程的遵循程度,並解決不符合的情況。


 
(繼續閱讀...)
文章標籤

是 我 發表在 痞客邦 留言(0) 人氣(2,417)

  • 個人分類:電腦和網際網路
▲top
  • 6月 24 週三 200921:19
  • CMMI 建構管理(Configuration Management CM)

建構管理(Configuration Management, CM)的目的,在使用建構識別、建構控制、建構狀態紀錄及建構稽核,來達到建立與維護工作產品之完整性。
 

SG 1 建立基準:建立由已界定的工作產品所組成的基準。


SP 1.1 界定建構項目:界定將納入建構管理的建構項目、組件及相關的工作產品。


SP 1.2 建立建構管理系統:建立並維護一個建構管理與變更管理的系統,以便管制工作產品。


SP 1.3 建立或發行基準:建立或發行供內部使用和交付給客戶的基準。


 


SG 2 追蹤並管制變更:追蹤並管制已納入建構管理工作產品的變更。


SP 2.1 追蹤變更申請:追蹤建構項目的變更申請。


SP 2.2 管制建構項目:管制建構項目的變更。


 


SG 3 建立完整性:建立並維護基準的完整性。


SP 3.1 建立建構管理紀錄:建立並維護描述建構項目的紀錄。


SP 3.2 實施建構稽核 實施建構稽核以維護建構基準的完整性。

 
(繼續閱讀...)
文章標籤

是 我 發表在 痞客邦 留言(1) 人氣(1,731)

  • 個人分類:
▲top
  • 6月 22 週一 200921:50
  • ~~阿明結婚了~~


 

= = 這是下一對嗎?!
(繼續閱讀...)
文章標籤

是 我 發表在 痞客邦 留言(0) 人氣(15)

  • 個人分類:旅行
▲top
  • 5月 29 週五 200912:34
  • 病了

mimi 最近身體出現狀況,放它出來跑的時候,發現它有尿血,還是一攤;趕緊上網查可能發生了那些事,( 兔子常發生的問題,結石及子宮有問題) 。帶它去看醫生的時候,又是一個新的革命的開始,它愛好自由,不讓別人抓的,處理起來真的很麻煩;要照 X 光片看有沒有結石、照超音波看子宮和膀胱有沒有發炎的現像(事先要把腹部的毛剔了)。
 
果然如預期想的子官出現問題~~ 醫生先開了一些口服藥,看狀況如何,如果還是很嚴重的話,就要「動刀」了;回來後,它開始不出籠子,一直待在家,應該是怕了而且不爽吧!原本每天早上我起床的時候,看到我就是咬籠子,要我放它出來跑跑,可是現在就是待在那邊,不想出來,(也許是身體狀況不好,不想跑,不過這個機率滿低的,= = 它的食量還是一樣大);每天的早晚喂藥又是個問題,要叫它出來,還要用它愛吃的點心騙它出來~~~ 現在的寵物真的愈來愈好命了。
 
好家在,吃幾天的口服藥,狀況有點改善了,要是真的要「動刀」,我就要考慮了,那麼小隻,給它挨一刀,會不會很痛,撐不撐的過去?!動完刀之後的康復期怎麼處理;但是讓它這樣流血尿也不是辦法,煩腦呀!~~~~ 我只是它的主人不是它,不知道它想選擇那條路,總不能像狗那樣,叫它叫個兩聲來聽聽,看要選那個吧! ><
(繼續閱讀...)
文章標籤

是 我 發表在 痞客邦 留言(1) 人氣(2)

  • 個人分類:
▲top
  • 5月 29 週五 200912:09
  • 何時再相聚

大學畢業那麼久,部份同學和室友才真正碰面出來聚一次,有沒有搞錯 = = ,雖然大家天天都在線上可以拉賽,但碰面的感覺還是不一樣。我就想起大學的時候,室友們都沒有一起出去聯誼過 = = ,有次別人找我們聯誼,還放別人鴿子呀。大家利用了一點時間去殺去澎湖逛一下,看看風景(七美人塚、望夫石、雙心石滬、小台灣、龍埕、石獅 ...... ) 吹吹風。現在的交通真的很方便,原本大家是約好各自從北部與南部出發,去嘉義一起坐船過去澎湖,結果有人睡過頭,改成從臺北坐飛機去 = = ,時間也沒差很多。下次要再去玩的時候,一定要坐飛機,坐船真的好痛苦,當你看到左邊一個吐,右邊一個吐,聽那聲音、聞到的味道、看到的動作!中間的人很慘也~~ 還可以知道其它人,今天吃了那些東西,那是啥,綠豆也~~~ 超噁的。可惜沒有全員到齊,有的跑去國外唸書、有的要代班工作、有的不知在搞啥鬼 = = ~~
相簿區有放其它的風景照和煙火照,這邊應該風的流動很好,所以煙火放起來都沒有積煙~~~ 非常好看,感覺比之前 雙十節的煙火還好~~~~ 過程有錄了十分鐘的影片,原本應該不只的,=  = 手殘忘了開啟錄放模式。

雙心石滬

端午節 -- 雙龍搶珠 = =

背影-- 流星花園!!

仙人掌冰,吃起來的感覺跟桑椹差不多。

印度阿三 = =

力量的線條

~~就是很有喜感~~

玩水上活動,出發前的照片!時間去的不太對,天氣不是很好海底暗暗的,加上魚還沒回流,浮涽的感覺沒有很好,跟之前去綠島比較其來有落差,看下次了~~~

 
 
 
(繼續閱讀...)
文章標籤

是 我 發表在 痞客邦 留言(2) 人氣(12)

  • 個人分類:旅行
▲top
  • 5月 28 週四 200921:54
  • Convert VB.NET to C#

OO 的語言,其實寫起來是差不多,只是語法熟係度問題,但還是有點差異;最近有在用 VB.net 跟 C# ,這兩個混在一起,說真的有亂到,有時候不知道問題出在那。
後來我用了較偷懶的做法,「用轉的」 = = ,開個小網頁出來,把要寫的 code 或找到的範例程式選一種, 放下去互轉,省了不少時間,不然 [ ]  ,  ( ) , 語法, 變數宣告的差異,A 看到花了 @@。
 
 
http://www.developerfusion.com/tools/convert/vb-to-csharp/
http://codeconverter.sharpdevelop.net/SnippetConverter.aspx
 
(繼續閱讀...)
文章標籤

是 我 發表在 痞客邦 留言(0) 人氣(452)

  • 個人分類:電腦和網際網路
▲top
  • 5月 18 週一 200915:18
  • CMMI kick off

能力成熟度整合模式 (Capability Maturity Model® Integration,CMMI®)是一個針對產品與服務發展的流程改善成熟度模式。它包含發展與維護活動的最佳執行方法,涵蓋產品從起始到交付與維護的生命週期...............................   公司開始出錢,上以前我覺的跟「塞」差不多的東西 = = ~~~~  內容有用是有用,只是要時間來吸收;目標降低專案開發成本、降低專案維護成本、減少需求變動率、增加專案準時率。
 
http://www.sei.cmu.edu/cmmi/models/SVC-v12-comparetoDEV.html   英文版
http://www.sei.cmu.edu/cmmi/translations/trad-chinese/models/dev-v12-abstract-c.html  中文版
 
系統(軟體)工程改善三個要素:PPT; people , process , technology .
 
 
 
(繼續閱讀...)
文章標籤

是 我 發表在 痞客邦 留言(1) 人氣(27)

  • 個人分類:電腦和網際網路
▲top
  • 5月 15 週五 200917:30
  • VB.NET and C# Comparison























































































































VB.NET

 


 


Program Structure

C#
Imports System
Namespace Hello
   Class HelloWorld
      Overloads Shared Sub Main(ByVal args() As String)
         Dim name As String = "VB.NET"
         'See if an argument was passed from the command line
          If args.Length = 1 Then name = args(0)
          Console.WriteLine("Hello, " & name & "!")
      End Sub
   End Class
End Namespace
using System;
namespace Hello {
   public class HelloWorld {
      public static void Main(string[] args) {
         string name = "C#";
         // See if an argument was passed from the command line
         if (args.Length == 1)
            name = args[0];
         Console.WriteLine("Hello, " + name + "!");
      }
   }
}






VB.NETCommentsC#
' Single line only
REM Single line only
''' <summary>XML comments</summary>

// Single line
/* Multiple
    line  */
/// <summary>XML comments on single line</summary>
/** <summary>XML comments on multiple lines</summary> */







VB.NETData TypesC#

Value Types
Boolean
Byte, SByte
Char
Short, UShort, Integer, UInteger, Long, ULong
Single, Double
Decimal
Date


Reference Types
Object
String


Initializing
Dim correct As Boolean = True
Dim b As Byte = &H2A   'hex
Dim o As Byte = &O52   'octal
Dim person As Object = Nothing
Dim name As String = "Dwight"
Dim grade As Char = "B"c
Dim today As Date = #12/31/2007 12:15:00 PM#
Dim amount As Decimal = 35.99@
Dim gpa As Single = 2.9!
Dim pi As Double = 3.14159265
Dim lTotal As Long = 123456L
Dim sTotal As Short = 123S
Dim usTotal As UShort = 123US
Dim uiTotal As UInteger = 123UI
Dim ulTotal As ULong = 123UL


Type Information
Dim x As Integer
Console.WriteLine(x.GetType())          ' Prints System.Int32
Console.WriteLine(GetType(Integer))   ' Prints System.Int32
Console.WriteLine(TypeName(x))        ' Prints Integer


Type Conversion
Dim d As Single = 3.5
Dim i As Integer = CType(d, Integer)   ' set to 4 (Banker's rounding)
i = CInt(d)  ' same result as CType
i = Int(d)    ' set to 3 (Int function truncates the decimal)


Value Types
bool
byte, sbyte
char
short, ushort, int, uint, long, ulong
float, double
decimal
DateTime   (not a built-in C# type)


Reference Types
object
string


Initializing
bool correct = true;
byte b = 0x2A;   // hex
object person = null;
string name = "Dwight";
char grade = 'B';
DateTime today = DateTime.Parse("12/31/2007 12:15:00");
decimal amount = 35.99m;
float gpa = 2.9f;
double pi = 3.14159265;
long lTotal = 123456L;
short sTotal = 123;
ushort usTotal = 123;
uint uiTotal = 123;
ulong ulTotal = 123;


Type Information
int x;
Console.WriteLine(x.GetType());              // Prints System.Int32
Console.WriteLine(typeof(int));               // Prints System.Int32
Console.WriteLine(x.GetType().Name);   // prints Int32


Type Conversion
float d = 3.5f;
int i = (int)d;   // set to 3  (truncates decimal)







VB.NETConstantsC#
Const MAX_STUDENTS As Integer = 25

' Can set to a const or var; may be initialized in a constructor
ReadOnly MIN_DIAMETER As Single = 4.93

const int MAX_STUDENTS = 25;

// Can set to a const or var; may be initialized in a constructor
readonly float MIN_DIAMETER = 4.93f;







VB.NETEnumerationsC#
Enum Action
  Start 
  [Stop]   ' Stop is a reserved word
  Rewind
  Forward
End Enum
Enum Status
  Flunk = 50
  Pass = 70
  Excel = 90
End Enum

Dim a As Action = Action.Stop
If a <> Action.Start Then _
   Console.WriteLine(a.ToString & " is " & a)     ' Prints "Stop is 1"
Console.WriteLine(Status.Pass)     ' Prints 70
Console.WriteLine(Status.Pass.ToString())     ' Prints Pass
enum Action {Start, Stop, Rewind, Forward};
enum Status {Flunk = 50, Pass = 70, Excel = 90};
Action a = Action.Stop;
if (a != Action.Start)
  Console.WriteLine(a + " is " + (int) a);    // Prints "Stop is 1"
Console.WriteLine((int) Status.Pass);    // Prints 70
Console.WriteLine(Status.Pass);      // Prints Pass






VB.NETOperatorsC#

Comparison
=  <  >  <=  >=  <>


Arithmetic
+  -  *  /
Mod
\  (integer division)
^  (raise to a power)


Assignment
=  +=  -=  *=  /=  \=  ^=  <<=  >>=  &=


Bitwise
And   Or   Xor   Not   <<   >>


Logical
AndAlso   OrElse   And   Or   Xor   Not


Note: AndAlso and OrElse perform short-circuit logical evaluations


String Concatenation
&


Comparison
==  <  >  <=  >=  !=


Arithmetic
+  -  *  /
%  (mod)
/  (integer division if both operands are ints)
Math.Pow(x, y)


Assignment
=  +=  -=  *=  /=   %=  &=  |=  ^=  <<=  >>=  ++  --


Bitwise
&   |   ^   ~   <<   >>


Logical
&&   ||   &   |   ^   !


Note: && and || perform short-circuit logical evaluations


String Concatenation
+







VB.NETChoicesC#

greeting = IIf(age < 20, "What's up?", "Hello")


' One line doesn't require "End If"
If age < 20 Then greeting = "What's up?"
If age < 20 Then greeting = "What's up?" Else greeting = "Hello"


' Use : to put two commands on same line
If x <> 100 And y < 5 Then x *= 5 : y *= 2  


' Preferred
If x <> 100 And y < 5 Then
  x *= 5
  y *= 2
End If


' To break up any long single line use _
If whenYouHaveAReally < longLine And _
  itNeedsToBeBrokenInto2 > Lines Then _
  UseTheUnderscore(charToBreakItUp)


'If x > 5 Then
  x *= y
ElseIf x = 5 Then
  x += y
ElseIf x < 10 Then
  x -= y
Else
  x /= y
End If


Select Case color   ' Must be a primitive data type
  Case "pink", "red"
    r += 1
  Case "blue"
    b += 1
  Case "green"
    g += 1
  Case Else
    other += 1
End Select


greeting = age < 20 ? "What's up?" : "Hello";


if (age < 20)
  greeting = "What's up?";
else
  greeting = "Hello";


// Multiple statements must be enclosed in {}
if (x != 100 && y < 5) {   
  x *= 5;
  y *= 2;
}


No need for _ or : since ; is used to terminate each statement.




if
(x > 5)
  x *= y;
else if (x == 5)
  x += y;
else if (x < 10)
  x -= y;
else
  x /= y;



// Every case must end with break or goto case
switch (color) {                          // Must be integer or string
  case "pink":
  case "red":    r++;    break;
  case "blue":   b++;   break;
  case "green": g++;   break;
  default:    other++;   break;       // break necessary on default
}







VB.NETLoopsC#















Pre-test Loops:
While c < 10
  c += 1
End While

Do Until c = 10 
  c += 1
Loop

Do While c < 10
  c += 1
Loop

For c = 2 To 10 Step 2
  Console.WriteLine(c)
Next


Post-test Loops:
Do 
  c += 1
Loop While c < 10
Do 
  c += 1
Loop Until c = 10

'  Array or collection looping
Dim names As String() = {"Fred", "Sue", "Barney"}
For Each s As String In names
  Console.WriteLine(s)
Next


' Breaking out of loops
Dim i As Integer = 0
While (True)
  If (i = 5) Then Exit While
  i += 1
End While


' Continue to next iteration
For i = 0 To 4
  If i < 4 Then Continue For
  Console.WriteLine(i)   ' Only prints 4
Next

Pre-test Loops:  

// no "until" keyword
while (c < 10)
  c++;
for (c = 2; c <= 10; c += 2)
  Console.WriteLine(c);



Post-test Loop:
do
  c++;
while (c < 10);


// Array or collection looping
string[] names = {"Fred", "Sue", "Barney"};
foreach (string s in names)
  Console.WriteLine(s);



// Breaking out of loops
int i = 0;
while (true) {
  if (i == 5)
    break;
  i++;
}


// Continue to next iteration
for (i = 0; i < 5; i++) {
  if (i < 4)
    continue;
  Console.WriteLine(i);   // Only prints 4
}







VB.NETArraysC#

Dim nums() As Integer = {1, 2, 3} 
For i As Integer = 0 To nums.Length - 1
  Console.WriteLine(nums(i))
Next
' 4 is the index of the last element, so it holds 5 elements
Dim names(4) As String
names(0) = "David"
names(5) = "Bobby"  ' Throws System.IndexOutOfRangeException
' Resize the array, keeping the existing values (Preserve is optional)
ReDim Preserve names(6)



Dim twoD(rows-1, cols-1) As Single
twoD(2, 0) = 4.5
Dim jagged()() As Integer = { _
  New Integer(4) {}, New Integer(1) {}, New Integer(2) {} }
jagged(0)(4) = 5


int[] nums = {1, 2, 3};
for (int i = 0; i < nums.Length; i++)
  Console.WriteLine(nums[i]);
// 5 is the size of the array
string[] names = new string[5];
names[0] = "David";
names[5] = "Bobby";   // Throws System.IndexOutOfRangeException
// C# can't dynamically resize an array.  Just copy into new array.
string[] names2 = new string[7];
Array.Copy(names, names2, names.Length);   // or names.CopyTo(names2, 0); 


float[,] twoD = new float[rows, cols];
twoD[2,0] = 4.5f; 

int[][] jagged = new int[3][] {
  new int[5], new int[2], new int[3] };
jagged[0][4] = 5;







VB.NETFunctionsC#

' Pass by value (in, default), reference (in/out), and reference (out) 
Sub TestFunc(ByVal x As Integer, ByRef y As Integer, ByRef z As Integer)
  x += 1
  y += 1
  z = 5
End Sub

Dim a = 1, b = 1, c As Integer   ' c set to zero by default 
TestFunc(a, b, c)
Console.WriteLine("{0} {1} {2}", a, b, c)   ' 1 2 5


' Accept variable number of arguments
Function Sum(ByVal ParamArray nums As Integer()) As Integer
  Sum = 0 
  For Each i As Integer In nums
    Sum += i
  Next
End Function   ' Or use Return statement like C#
Dim total As Integer = Sum(4, 3, 2, 1)   ' returns 10


' Optional parameters must be listed last and must have a default value
Sub SayHello(ByVal name As String, Optional ByVal prefix As String = "")
  Console.WriteLine("Greetings, " & prefix & " " & name)
End Sub
SayHello("Strangelove", "Dr.")
SayHello("Madonna")

// Pass by value (in, default), reference (in/out), and reference (out)
void TestFunc(int x, ref int y, out int z) {
  x++;  
  y++;
  z = 5;
}

int a = 1, b = 1, c;  // c doesn't need initializing
TestFunc(a, ref b, out c);
Console.WriteLine("{0} {1} {2}", a, b, c);  // 1 2 5


// Accept variable number of arguments
int Sum(params int[] nums) {
  int sum = 0;
  foreach (int i in nums)
    sum += i;
  return sum;
}


int total = Sum(4, 3, 2, 1);   // returns 10


/* C# doesn't support optional arguments/parameters.  Just create two different versions of the same function. */ 
void SayHello(string name, string prefix) {
  Console.WriteLine("Greetings, " + prefix + " " + name);
} 
void SayHello(string name) {
  SayHello(name, "");
}







VB.NETStringsC#

Special character constants (all also accessible from ControlChars class)
vbCrLf, vbCr, vbLf, vbNewLine
vbNullString
vbTab
vbBack
vbFormFeed
vbVerticalTab
""


' String concatenation (use & or +)
Dim school As String = "Harding" & vbTab
school = school & "University" ' school is "Harding (tab) University"


' Chars
Dim letter As Char = school.Chars(0)   ' letter is H
letter = Convert.ToChar(65)                ' letter is A
letter = Chr(65)                                 ' same thing
Dim word() As Char = school.ToCharArray() ' word holds Harding


' No string literal operator
Dim msg As String = "File is c:\temp\x.dat"


' String comparison
Dim mascot As String = "Bisons"
If (mascot = "Bisons") Then   ' true
If (mascot.Equals("Bisons")) Then   ' true
If (mascot.ToUpper().Equals("BISONS")) Then  ' true
If (mascot.CompareTo("Bisons") = 0) Then   ' true


' String matching with Like - Regex is more powerful
If ("John 3:16" Like "Jo[Hh]? #:*") Then   'true


' Substring
s = mascot.Substring(2, 3)) ' s is "son"


' Replacement
s = mascot.Replace("sons", "nomial")) ' s is "Binomial"


' Split
Dim names As String = "Frank,Becky,Ethan,Braden"
Dim parts() As String = names.Split(",".ToCharArray())   ' One name in each slot


' Date to string
Dim dt As New DateTime(1973, 10, 12)
Dim s As String = "My birthday: " & dt.ToString("MMM dd, yyyy")   ' Oct 12, 1973


' Integer to String
Dim x As Integer = 2
Dim y As String = x.ToString()     ' y is "2"


' String to Integer
Dim x As Integer = Convert.ToInt32("-5")     ' x is -5


' Mutable string
Dim buffer As New System.Text.StringBuilder("two ")
buffer.Append("three ")
buffer.Insert(0, "one ")
buffer.Replace("two", "TWO")
Console.WriteLine(buffer)         ' Prints "one TWO three"


Escape sequences
\r    // carriage-return
\n    // line-feed
\t    // tab
\\    // backslash
\"    // quote


// String concatenation
string school = "Harding\t";
school = school + "University";   // school is "Harding (tab) University"


// Chars
char letter = school[0];            // letter is H
letter = Convert.ToChar(65);     // letter is A
letter = (char)65;                    // same thing
char[] word = school.ToCharArray();   // word holds Harding


// String literal
string msg = @"File is c:\temp\x.dat";
// same as
string msg = "File is c:\\temp\\x.dat";


// String comparison
string mascot = "Bisons";
if (mascot == "Bisons")    // true
if (mascot.Equals("Bisons"))   // true
if (mascot.ToUpper().Equals("BISONS"))   // true
if (mascot.CompareTo("Bisons") == 0)    // true


// String matching - No Like equivalent, use Regex



// Substring
s = mascot.Substring(2, 3))     // s is "son"


// Replacement
s = mascot.Replace("sons", "nomial"))     // s is "Binomial"


// Split
string names = "Frank,Becky,Ethan,Braden";
string[] parts = names.Split(",".ToCharArray());   // One name in each slot


// Date to string
DateTime dt = new DateTime(1973, 10, 12);
string s = dt.ToString("MMM dd, yyyy");     // Oct 12, 1973


// int to string
int x = 2;
string y = x.ToString();     // y is "2"

// string to int
int x = Convert.ToInt32("-5");     // x is -5


// Mutable string
System.Text.StringBuilder buffer = new System.Text.StringBuilder("two ");
buffer.Append("three ");
buffer.Insert(0, "one ");
buffer.Replace("two", "TWO");
Console.WriteLine(buffer);     // Prints "one TWO three"







VB.NETRegular ExpressionsC#

Imports System.Text.RegularExpressions


' Match a string pattern
Dim r As New Regex("j[aeiou]h?. \d:*", RegexOptions.IgnoreCase Or _
        RegexOptions.Compiled)
If (r.Match("John 3:16").Success) Then   'true
    Console.WriteLine("Match")
End If


' Find and remember all matching patterns
Dim s As String = "My number is 305-1881, not 305-1818."
Dim r As New Regex("(\d+-\d+)")
Dim m As Match = r.Match(s)     ' Matches 305-1881 and 305-1818
While m.Success
    Console.WriteLine("Found number: " & m.Groups(1).Value & " at position " _
            & m.Groups(1).Index.ToString)
    m = m.NextMatch()
End While


' Remeber multiple parts of matched pattern
Dim r As New Regex("(\d\d):(\d\d) (am|pm)")
Dim m As Match = r.Match("We left at 03:15 pm.")
If m.Success Then
    Console.WriteLine("Hour: " & m.Groups(1).ToString)       ' 03
    Console.WriteLine("Min: " & m.Groups(2).ToString)         ' 15
    Console.WriteLine("Ending: " & m.Groups(3).ToString)   ' pm
End If


' Replace all occurrances of a pattern
Dim r As New Regex("h\w+?d", RegexOptions.IgnoreCase)
Dim s As String = r.Replace("I heard this was HARD!", "easy")   ' I easy this was easy!


' Replace matched patterns
Dim s As String = Regex.Replace("123 < 456", "(\d+) . (\d+)", "$2 > $1")   ' 456 > 123


' Split a string based on a pattern
Dim names As String = "Frank, Becky, Ethan, Braden"
Dim r As New Regex(",\s*")
Dim parts() As String = r.Split(names)   ' One name in each slot


using System.Text.RegularExpressions;


// Match a string pattern
Regex r = new Regex(@"j[aeiou]h?. \d:*", RegexOptions.IgnoreCase |
        RegexOptions.Compiled);
if (r.Match("John 3:16").Success)   // true
    Console.WriteLine("Match");



// Find and remember all matching patterns
string s = "My number is 305-1881, not 305-1818.";
Regex r = new Regex("(\\d+-\\d+)");
// Matches 305-1881 and 305-1818
for (Match m = r.Match(s); m.Success; m = m.NextMatch())
    Console.WriteLine("Found number: " + m.Groups[1] + " at position " +
        m.Groups[1].Index);



// Remeber multiple parts of matched pattern
Regex r = new Regex("@(\d\d):(\d\d) (am|pm)");
Match m = r.Match("We left at 03:15 pm.");
if (m.Success) {
    Console.WriteLine("Hour: " + m.Groups[1]);       // 03
    Console.WriteLine("Min: " + m.Groups[2]);         // 15
    Console.WriteLine("Ending: " + m.Groups[3]);   // pm
}


// Replace all occurrances of a pattern
Regex r = new Regex("h\\w+?d", RegexOptions.IgnoreCase);
string s = r.Replace("I heard this was HARD!", "easy"));   // I easy this was easy!


// Replace matched patterns
string s = Regex.Replace("123 < 456", @"(\d+) . (\d+)", "$2 > $1");   // 456 > 123

// Split a string based on a pattern
string names = "Frank, Becky, Ethan, Braden";
Regex r = new Regex(@",\s*");
string[] parts = r.Split(names);   // One name in each slot







VB.NETException HandlingC#

' Throw an exception
Dim ex As New Exception("Something is really wrong.")
Throw  ex 


' Catch an exception
Try 
  y = 0
  x = 10 / y
Catch ex As Exception When y = 0 ' Argument and When is optional
  Console.WriteLine(ex.Message)
Finally
  Beep()
End Try


' Deprecated unstructured error handling
On Error GoTo MyErrorHandler
...
MyErrorHandler: Console.WriteLine(Err.Description)


// Throw an exception
Exception up = new Exception("Something is really wrong.");
throw up;  // ha ha


// Catch an exception
try { 
  y = 0;
  x = 10 / y;
}
catch (Exception ex) {   // Argument is optional, no "When" keyword 
  Console.WriteLine(ex.Message);
}
finally {
  Microsoft.VisualBasic.Interaction.Beep();
}







VB.NETNamespacesC#

Namespace Harding.Compsci.Graphics 
  ...
End Namespace


' or


Namespace Harding
  Namespace Compsci
    Namespace Graphics 
      ...
    End Namespace
  End Namespace
End Namespace


Imports Harding.Compsci.Graphics


namespace Harding.Compsci.Graphics {
  ...
}


// or


namespace Harding {
  namespace Compsci {
    namespace Graphics {
      ...
    }
  }
}


using Harding.Compsci.Graphics;







VB.NETClasses / InterfacesC#

Accessibility keywords
Public
Private
Friend                   
Protected
Protected Friend
Shared


' Inheritance
Class FootballGame
  Inherits Competition
  ...
End Class 


' Interface definition
Interface IAlarmClock 
  ...
End Interface


// Extending an interface 
Interface IAlarmClock
  Inherits IClock
  ...
End Interface


// Interface implementation
Class WristWatch 
  Implements IAlarmClock, ITimer 
   ...
End Class 


Accessibility keywords
public
private
internal
protected
protected internal
static


// Inheritance
class FootballGame : Competition {
  ...
}



// Interface definition

interface IAlarmClock {
  ...
}


// Extending an interface 
interface IAlarmClock : IClock {
  ...
}



// Interface implementation

class WristWatch : IAlarmClock, ITimer {
   ...
}







VB.NETConstructors / DestructorsC#
Class SuperHero
  Private _powerLevel As Integer
  Public Sub New()
    _powerLevel = 0
  End Sub
  Public Sub New(ByVal powerLevel As Integer)
    Me._powerLevel = powerLevel
  End Sub
  Protected Overrides Sub Finalize() 
   ' Desctructor code to free unmanaged resources
    MyBase.Finalize()
  End Sub
End Class

class SuperHero {
  private int _powerLevel;
  public SuperHero() {
     _powerLevel = 0;
  }
  public SuperHero(int powerLevel) {
    this._powerLevel= powerLevel; 
  }
  ~SuperHero() {
    // Destructor code to free unmanaged resources.
    // Implicitly creates a Finalize method

  }
}







VB.NETUsing ObjectsC#

Dim hero As SuperHero = New SuperHero
' or
Dim hero As New SuperHero


With hero
  .Name = "SpamMan"
  .PowerLevel = 3
End With


hero.Defend("Laura Jones")
hero.Rest()     ' Calling Shared method
' or
SuperHero.Rest()


Dim hero2 As SuperHero = hero  ' Both reference the same object
hero2.Name = "WormWoman"
Console.WriteLine(hero.Name)   ' Prints WormWoman


hero = Nothing    ' Free the object


If hero Is Nothing Then _
  hero = New SuperHero


Dim obj As Object = New SuperHero
If TypeOf obj Is SuperHero Then _
  Console.WriteLine("Is a SuperHero object.")


' Mark object for quick disposal
Using reader As StreamReader = File.OpenText("test.txt")
  Dim line As String = reader.ReadLine()
  While Not line Is Nothing
    Console.WriteLine(line)
    line = reader.ReadLine()
  End While
End Using


SuperHero hero = new SuperHero();


// No "With" construct
hero.Name = "SpamMan";
hero.PowerLevel = 3;


hero.Defend("Laura Jones");
SuperHero.Rest();   // Calling static method



SuperHero hero2 = hero;   // Both reference the same object
hero2.Name = "WormWoman";
Console.WriteLine(hero.Name);   // Prints WormWoman


hero = null ;   // Free the object


if (hero == null)
  hero = new SuperHero();


Object obj = new SuperHero(); 
if (obj is SuperHero)
  Console.WriteLine("Is a SuperHero object.");

// Mark object for quick disposal
using (StreamReader reader = File.OpenText("test.txt")) {
  string line;
  while ((line = reader.ReadLine()) != null)
    Console.WriteLine(line);
}






VB.NETStructsC#

Structure StudentRecord
  Public name As String
  Public gpa As Single
  Public Sub New(ByVal name As String, ByVal gpa As Single)
    Me.name = name
    Me.gpa = gpa
  End Sub
End Structure


Dim stu As StudentRecord = New StudentRecord("Bob", 3.5)
Dim stu2 As StudentRecord = stu  
stu2.name = "Sue"
Console.WriteLine(stu.name)    ' Prints Bob
Console.WriteLine(stu2.name)  ' Prints Sue

struct StudentRecord {
  public string name;
  public float gpa;
  public StudentRecord(string name, float gpa) {
    this.name = name;
    this.gpa = gpa;
  }
}

StudentRecord stu = new StudentRecord("Bob", 3.5f);
StudentRecord stu2 = stu;  
stu2.name = "Sue";
Console.WriteLine(stu.name);    // Prints Bob
Console.WriteLine(stu2.name);   // Prints Sue







VB.NETPropertiesC#

Private _size As Integer
Public Property Size() As Integer
  Get
    Return _size
  End Get
  Set (ByVal Value As Integer)
    If Value < 0 Then
      _size = 0
    Else
      _size = Value
    End If
  End Set
End Property


foo.Size += 1

private int _size;
public int Size {
  get {
    return _size;
  }
  set {
    if (value < 0)
      _size = 0;
    else
      _size = value;
  }
}


foo.Size++;







VB.NETDelegates / EventsC#

Delegate Sub MsgArrivedEventHandler(ByVal message As String)


Event MsgArrivedEvent As MsgArrivedEventHandler


' or to define an event which declares a delegate implicitly
Event MsgArrivedEvent(ByVal message As String)


AddHandler MsgArrivedEvent, AddressOf My_MsgArrivedCallback
' Won't throw an exception if obj is Nothing
RaiseEvent MsgArrivedEvent("Test message")
RemoveHandler MsgArrivedEvent, AddressOf My_MsgArrivedCallback


Imports System.Windows.Forms


Dim WithEvents MyButton As Button   ' WithEvents can't be used on local variable
MyButton = New Button


Private Sub MyButton_Click(ByVal sender As System.Object, _
  ByVal e As System.EventArgs) Handles MyButton.Click
  MessageBox.Show(Me, "Button was clicked", "Info", _
    MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub


delegate void MsgArrivedEventHandler(string message);


event MsgArrivedEventHandler MsgArrivedEvent;


// Delegates must be used with events in C#
MsgArrivedEvent += new MsgArrivedEventHandler(My_MsgArrivedEventCallback);
MsgArrivedEvent("Test message");    // Throws exception if obj is null
MsgArrivedEvent -= new MsgArrivedEventHandler(My_MsgArrivedEventCallback);



using System.Windows.Forms;


Button MyButton = new Button(); 
MyButton.Click += new System.EventHandler(MyButton_Click);


private void MyButton_Click(object sender, System.EventArgs e) {
  MessageBox.Show(this, "Button was clicked", "Info",
    MessageBoxButtons.OK, MessageBoxIcon.Information);
}







VB.NETConsole I/OC#

Console.Write("What's your name? ")
Dim name As String = Console.ReadLine()
Console.Write("How old are you? ")
Dim age As Integer = Val(Console.ReadLine())
Console.WriteLine("{0} is {1} years old.", name, age) 
' or
Console.WriteLine(name & " is " & age & " years old.")
Dim c As Integer
c = Console.Read()    ' Read single char
Console.WriteLine(c)   ' Prints 65 if user enters "A"


Console.Write("What's your name? ");
string name = Console.ReadLine();
Console.Write("How old are you? ");
int age = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("{0} is {1} years old.", name, age);
// or
Console.WriteLine(name + " is " + age + " years old.");



int c = Console.Read();  // Read single char
Console.WriteLine(c);    // Prints 65 if user enters "A"







VB.NETFile I/OC#

Imports System.IO


' Write out to text file
Dim writer As StreamWriter = File.CreateText("c:\myfile.txt")
writer.WriteLine("Out to file.")
writer.Close()


' Read all lines from text file
Dim reader As StreamReader = File.OpenText("c:\myfile.txt")
Dim line As String = reader.ReadLine()
While Not line Is Nothing
  Console.WriteLine(line)
  line = reader.ReadLine()
End While
reader.Close()


' Write out to binary file
Dim str As String = "Text data"
Dim num As Integer = 123
Dim binWriter As New BinaryWriter(File.OpenWrite("c:\myfile.dat")) 
binWriter.Write(str) 
binWriter.Write(num) 
binWriter.Close()


' Read from binary file
Dim binReader As New BinaryReader(File.OpenRead("c:\myfile.dat"))
str = binReader.ReadString()
num = binReader.ReadInt32()
binReader.Close()


using System.IO;


// Write out to text file
StreamWriter writer = File.CreateText("c:\\myfile.txt");
writer.WriteLine("Out to file.");
writer.Close();


// Read all lines from text file
StreamReader reader = File.OpenText("c:\\myfile.txt");
string line = reader.ReadLine();
while (line != null) {
  Console.WriteLine(line);
  line = reader.ReadLine();
}
reader.Close();


// Write out to binary file
string str = "Text data";
int num = 123;
BinaryWriter binWriter = new BinaryWriter(File.OpenWrite("c:\\myfile.dat"));
binWriter.Write(str);
binWriter.Write(num);
binWriter.Close();


// Read from binary file
BinaryReader binReader = new BinaryReader(File.OpenRead("c:\\myfile.dat"));
str = binReader.ReadString();
num = binReader.ReadInt32();
binReader.Close();


 


 


出自於 http://www.harding.edu/fmccown/vbnet_csharp_comparison.html  網址


 

(繼續閱讀...)
文章標籤

是 我 發表在 痞客邦 留言(0) 人氣(230)

  • 個人分類:電腦和網際網路
▲top
  • 4月 05 週日 200922:09
  • 電影心得-2



 

 Defiance 聖戰家園:新一代 007丹尼爾克雷格主演,劇情就是德國戰爭記錄片,故事背景第二次世界大戰,1941年時,東歐的猶太人被無情屠殺,為了逃離死亡厄運,三名兄弟躲入森林深處裡避難,在那裡展開對納粹的反撲,就一部闡述親情、榮譽、復仇與救贖的劇情,總之就是不自由毋寧死, 最後就是拯救數千名無辜生命,評價普普。

 

 

Knowing 末日預言:小吉的新片,這部片普普,原以為可以看到很好的「特效」,但實際在預告片的時候就看光了 ,其它的時間就是一直為劇情鋪陳,但是還是有很多莫明奇妙的橋段, 過程中一度會令人以為這是鬼片,到了最後變成科幻片外星人也出來了;劇情特別的地方是地球終於被幹掉了,不再有個人英雄出現了,像是過去的「世界末日」、「慧星撞地球」那樣的有「人」挺生拯救地球;不過結局還是不可能真的讓人全死光,搞個外星人出來 = = ,抓一些去當亞當夏娃的~~ 有點鳥,變成末日無言了!!看開一點的話就是 X 檔案電影版 3,這樣想就不會難過了~~

 

 

The Reader 為愛朗讀:愛情文藝片,開頭一開始就很火辣了  = = ,如果初戀就是那樣的迷人,一生應該也忘不掉;男主角陪伴女主角的時候,除了做愛外,就是朗讀書給女主角聽,在劇情一開始沒多久就可以發現女主角其實不認識字,也因此有點自卑,但她的個性卻又是屬於強勢的人,不願意承認這個事實,所以都叫別人朗故事給她聽,感覺滿矛盾(好好的重學就好)~~ ;忽然有一天,女主角不告而別,男主角就這樣失戀,也影響到往日的性格了;相會的那日,地點是在法庭,女主角昔日參與納粹活動被審判,也許是因為「過去的不告而別」或「世俗對於審判內容」的看法,影響到男主角原本可以幫忙她脫罪或減情罪刑,但最後選擇不敢面對, 女主角就此終身坐牢;怪的就是男主角忘不了這段不倫之戀~  過了好幾年,他錄了幾卷故事書錄音帶給女主角~~ 女主角的生活重心又變開有了轉變,她也開始慢慢學習如何寫字,試著與男主角溝通,無奈男主角就是不願意見面與回信,只是一昧寄錄音帶而已;其實這樣是很心痛的,如果就這樣結束,那就算了,何必要玩惡魔尾巴呢?(弄一下弄一下,國小生 = =) ,勾起那段情的回憶;這都還好,女主角獲假釋,牢方希望男主角能為她安排後路,終於不得不來見她一面了!最心痛的地方出現了,聊了幾句話,(細節請看電影)女主角問了一句「結束了嗎?」,心痛呀!如果男主角願意給她一個擁抱,也許結局就是不同了, 可是也可以看出來男主角也是很貼心的幫忙她,他還是忘不了過去,只是就是無法好好的表達而已,愛一個人真的是好好的說出來。 這部片值的去看看。




(繼續閱讀...)
文章標籤

是 我 發表在 痞客邦 留言(0) 人氣(35)

  • 個人分類:電影心得
▲top
  • 3月 22 週日 200913:33
  • 百岳-塔關山

09/3/20 日,看完星光結局躺平睡覺, 零晨 0400 起床, 0500 點九如交流道集合,經岡山、寶來、桃源辦入山證,約1000 到達塔關山登山口,開始攻向南橫三星之塔關山頂端!
塔關山百岳排名第71,海拔3,222公尺,與庫哈諾辛山及關山嶺山,合稱為南橫三星。 
 
憑藉之前上玉山經驗(因天氣不佳,沒攻上頂,可惜),覺的塔關山應該也滿ok 的,其實大錯特錯了 = = ,在攻完塔關山之後,才知道玉山容易多了,玉山雖然較路長,但是較好走,但這次的經驗真的是「爬」山~~~  , 攻頂的路上,許多路真的都是要用雙手雙腳並用,不是直接就上的去;回程下山的時候更難,往下看很可怕也 @@,好佳在也有帶登山杖,可以有較好的支撐點,山上的氣候又很舒適,加上睡眠不足,山風一吹來,爬到很睡覺,一失神,要是不小心「下去」,就是真的完了! 好佳在才退伍三個月而已,要是有半年沒運動的話,我想我也是會爬的很難過吧!今天天氣雖然不錯,但是霧卻多了點,看不到玉山;下山的時候,有人想照一下,登山入口的牌子,但是手一直在發抖,手殘機也發揮不了作用,還是照的不清楚。人生最正式的第一座百岳完成。今日身體狀況~~ 酸酸酸.....
 
 
 
(繼續閱讀...)
文章標籤

是 我 發表在 痞客邦 留言(2) 人氣(147)

  • 個人分類:旅行
▲top
«1...45617»

自訂側欄

自訂側欄

個人資訊

是 我
暱稱:
是 我
分類:
美食情報
好友:
累積中
地區:

熱門文章

  • (7,400)RUP (Rational Unified Process)
  • (5,916)狐狸知道很多事情,但刺蝟只知道一件大事
  • (2,417)專案監控(Project Monitoring and Control, PMC)
  • (2,208)CMMI 需求管理(Requirements Management, REQM)
  • (1,721)CMMI - 專案規劃(Project Planning, PP)
  • (1,338)流程與產品品質保證(PPQA)
  • (649)CMMI 供應商協議管理(Supplier Agreement Management, SAM)
  • (230)VB.NET and C# Comparison
  • (7)Making love out nothing at all(讓愛一切成空)
  • (2)花蓮宜蘭-2

文章分類

  • 電影心得 (3)
  • 娛樂 (2)
  • 學生 (17)
  • 嗜好 (5)
  • 當兵 (19)
  • 圖書 (19)
  • 旅行 (16)
  • 電腦和網際網路 (35)
  • 飲食 (9)
  • 未分類文章 (1)

最新文章

  • 我要結婚了..
  • WINCE 下載檔案
  • 食神
  • 真是好用的 MSN 部落落
  • Window+GCC+CDT用Eclipse開發C or C++ -2
  • Window+GCC+CDT用Eclipse開發C or C++ - 1
  • 關鍵需求決定架構
  • 花蓮宜蘭-2
  • 中山大學
  • 宜蘭花蓮-1

最新留言

  • [20/10/29] olivermode 於文章「Window+GCC+CDT用Eclip...」留言:
    ◎步驟五.設定Make Targets。 Windows-...
  • [17/03/23] 學生 於文章「RUP (Rational Unifie...」留言:
    有幫助,推一下。...
  • [12/01/08] 曹語康 於文章「WINCE 下載檔案...」留言:
    欣賞你的文章是我的榮幸...
  • [10/09/01] 我 於文章「食神...」留言:
    = = 正統饅魚飯; only 白飯和 一片饅魚 19...
  • [10/08/31] Chao 於文章「食神...」留言:
    我是走精緻路線的…...
  • [10/08/31] Chao 於文章「食神...」留言:
    這是和俗稱的"牛肉湯麵"一樣嗎? 只見其名,不見其"肉"...
  • [10/08/26] 我 於文章「食神...」留言:
    大手町 的饅魚飯讓你吃到爽! = =...
  • [10/08/26] Chao 於文章「食神...」留言:
    …一句話…胖死你… 先把店掃一遍也好… 等我南下時…請拿出你...
  • [10/07/27] 我 於文章「食神...」留言:
    能吃是福呀! 明年的目標,把高雄明誠路上吃的店全掃一遍!...
  • [10/07/27] 我 於文章「Window+GCC+CDT用Eclip...」留言:
    = = 剪剪貼貼咩...

動態訂閱

文章精選

文章搜尋

誰來我家

參觀人氣

  • 本日人氣:
  • 累積人氣: