Skip to main content

Posts

C# Color.Equals() Color.ToArgb() 的小問題

Color tC; Bitmap tBitmap ; tBitmap = new Bitmap(100,100); BitmapDrawLine(tBitmap, new Point(49,49), new Point(51,51), Color.Gold, 3.0); tC =tBitmap.GetPixel(50, 50); // right if (tC.ToArgb() == Color.Gold.ToArgb()){ Console.Out.WriteLine("Find Gold"); // if( tC.Equals( Color.Gold) ){;} // This will not work //but currently don't know why  } public void BitmapDrawLine(Bitmap bM, Point sPoint, Point ePoint, Color lineColor,float lineThickness)         {             Graphics g = Graphics.FromImage(bM);             Pen myPen = new Pen(lineColor, lineThickness);             myPen.DashStyle = System.Drawing.Drawing2D.DashStyle.Solid;             myPen.SetLineCap(System.Drawing.Drawing2D.Lin...

C#: call by reference using "ref"

public void ChangeValue( ref uint cB1 , ref uint c12, ref uint c23){     // change value through reference     cB1 = 10;     cB2 = 20;     cB3 = 30; }   public void MainFunction(){     uint cxxB1, cxxB2, cxxB3;     cxxB1 = 0;     cxxB2 = 0;     cxxB3 = 0;     // pass the reference to the method     ChangeValue( ref cxxB1 , ref cxxB2, ref cxxB3);    // print out the value after change     Console.Out.WriteLine("cxxB1 = " + cxxB1); // 10     Console.Out.WriteLine("cxxB2 = " + cxxB2); // 20     Console.Out.WriteLine("cxxB3 = " + cxxB3); // 30 }

2008/03/29

蟲師,看到長角的小女孩就看不下去了,唉,有點噁 盛夏光年,跳著看,不知怎的,結局看完,整個人就悶掉了,寂寞真是   令人害怕的東西。 (每個人,生來就不應該孤獨)

2008/03/18

今天自己的想法還有跟許老師談過後的筆記 去找 toung 的 thesis 來看,看看這種跨領域的 thesis 要怎麼寫,看我有哪些跟它相像,哪些跟他不一樣,所以我該因此去找哪些相關的資訊來補足我現在不知道的地方 自己要知道自己厲害的地方在哪,自己做的東西哪裡好哪裡不好,自己哪些地方進步了,不管別人怎麼說,當建議聽就好,因為最懂得人應該就是你自己。 present 的時候要避重就輕,不是吹牛,也不是說謊,只是先把做的好的,做完成的先present 出來,接著在講哪裡還沒完成,或是哪裡還有 limitation。這樣先讓別人知道你做了什麼,有哪些東西做好了,再講哪些地方沒有做好。不然直接 present 沒做好的地方,會變成別人覺得都是問題,而忘記你其實也做了不少東西。 我太乖了,ORZ,已經不只一個人這樣講了,不是,是有很多很多人這樣講了。人當然要謙虛,但是,對自己也需要有自信,講話堅定穩重,決不口軟,但也決不要跟別人吵架,因為那樣不值得。 改變自己,不要期待別人改變,尤其是年紀越大的人越難改。 要學著去跟自己不同性子的人去相處,你既然明知到對方喜歡怎樣的interaction 方式,雖然必是要直接照著對方的方法做,但是可以試著去改變自己去和它相處的順利一點。