Instance Constructor vs. The Class Constructor
A good explanation of difference between the instance constructors and the class constructors.
Class constructors are used for static field initialization. Only one class constructor per type is permitted, and it cannot use the vararg (variable argument) calling convention. Normally, class constructors are never called from the IL code. If a type has a class constructor, this constructor is executed automatically after the type is loaded. However, a class constructor, like any other static method, can be called explicitly. As a result of such a call, the global fields of the type are reset to their initial values. Calling class constructor explicitly does not lead to type reloading.
Some C++, C#, .Net, windows service, GIS thoughts posted by me. 有度量去容忍那些不能改变的事,有勇气去改变那些可能改变的事,有智慧去区分上述两件事。
Sunday, May 08, 2005
MS Access Application With C#
MS Access Application With C#
I encountered this problem when I wrote the map projection function for the DTMap, since I need to get some data from the EPSG_v66.mdb and write it to the xml file. I think this is a good start.
I encountered this problem when I wrote the map projection function for the DTMap, since I need to get some data from the EPSG_v66.mdb and write it to the xml file. I think this is a good start.
Thursday, May 05, 2005
Waiting for the I-140 aproval.
Waiting for the I-140 approval is one of the most painful thing in my life, the response to the RFE has been submitted last week, and USCIS records shows that they have received the response on Apr 26. Then in the following three days, 27, 28, 29, the LUD keeps change, so I guess that somebody is working on my case. However, after that, nothing happens. Well, this is also normal, accoridng to the pattern observerd on the immigration.com, a lot of people have the similar experience.
Hopefully, I will have it approved by next week.
God bless me!
Hopefully, I will have it approved by next week.
God bless me!
Monday, May 02, 2005
Split a string by double pipe.
How to split a string like "TEST1||TEST2".
I raised this question in C# MS newsgroup, and Tim Wilson answered my question that I should use
string[] asTest = Regex.Split(sTest, @"\|\|");
Well, this works beautifully. But it takes ome time for me to fully understand it. Fristly of all, "|" is considered one of the special characters (. $ ^ { [ ( | ) * + ? \) in the regular expression , so \ signals to the regular expression parser that the character following the backslash is not an operator. Then, how about string[] asTest = Regex.Split(sTest, "\|\|"), The compiler complains error CS1009: Unrecognized escape sequence. Will it make sense? According to MSDN , it means that "An unexpected character followed a backslash (\) in astring . The compiler expects one of the valid escape characters", then what is valid escape characters, | is a NOT a valid character following \, by using @ , we mean \| Unicode character 007C, do you understand, I am NOT.
I raised this question in C# MS newsgroup, and Tim Wilson answered my question that I should use
string[] asTest = Regex.Split(sTest, @"\|\|");
Well, this works beautifully. But it takes ome time for me to fully understand it. Fristly of all, "|" is considered one of the special characters (. $ ^ { [ ( | ) * + ? \) in the regular expression , so \ signals to the regular expression parser that the character following the backslash is not an operator. Then, how about string[] asTest = Regex.Split(sTest, "\|\|"), The compiler complains error CS1009: Unrecognized escape sequence. Will it make sense? According to MSDN , it means that "An unexpected character followed a backslash (\) in a
Friday, April 29, 2005
Saturday, April 23, 2005
Finally the response to my I-140 RFE is filed.
The RFE was issued on Feb 25, 2005, so it was almost two months ago. Firstly, it took some time to get the supporting letter from CHINA, then the attorney started to look at my case after two weeks. Then after that, we found that ODJFS screwed up the priority date, so we waited another two weeks to deal with issue.
Finally, the package was sent out on Thursday night, hopefully, I can get it approved next week.
It will be such a relief.
Finally, the package was sent out on Thursday night, hopefully, I can get it approved next week.
It will be such a relief.
Friday, April 22, 2005
Sunday, April 10, 2005
Too many things to do.
Always feel too many things to do everyday. Working is the most important, but also a lot of reading. I am always exciting to get a new book, but rarely get enough time to go through. Well, maybe, just try my best.
Browsing web has been the worst thing I can ever do to waste the time, sometimes, I just cannot control myself, reading those stupid news.
Answering other people's questions in newsgroup seems a better way to relaxing.
Wait for the pictures of Albany trip from Lingling and Dawei.
Browsing web has been the worst thing I can ever do to waste the time, sometimes, I just cannot control myself, reading those stupid news.
Answering other people's questions in newsgroup seems a better way to relaxing.
Wait for the pictures of Albany trip from Lingling and Dawei.
Tuesday, March 22, 2005
Excited trip to Albany, NY
I am excited to visit my freind, Lingling and Dawei. They just bought a new house , and we are excited to check it out.
One house, two cars, and a dog is a typical American life which I have seen in movies and imagined in my head. I still have one house, one car, and a dog left. Maybe, I need to work harder on this.
One house, two cars, and a dog is a typical American life which I have seen in movies and imagined in my head. I still have one house, one car, and a dog left. Maybe, I need to work harder on this.
TDD: Testing Internal classes
TDD: Testing Internal classes
Nice trick to test the internal class, plus another trick to test private methods( http://www.codeproject.com/csharp/TestNonPublicMembers.asp). I should be able to test whatever I want to test.
Nice trick to test the internal class, plus another trick to test private methods( http://www.codeproject.com/csharp/TestNonPublicMembers.asp). I should be able to test whatever I want to test.
Sunday, March 20, 2005
Essential .Net by Don Box.
Like all other books written by Don Box, I can always learn something which I cannot learn by day to day programming. Though I still insist the best way to learn programming is still through coding.
The chapter 7 "Advanced Methods" has a lot of similarities with the ideas expressed in "Transactional COM+". All objects are living in context, and context decides the behavior of the objects.
Good book, recommend for reading.
The chapter 7 "Advanced Methods" has a lot of similarities with the ideas expressed in "Transactional COM+". All objects are living in context, and context decides the behavior of the objects.
Good book, recommend for reading.
Tuesday, March 08, 2005
C# and .NET articles and links
C# and .NET articles and links
A very good C# resources. I read about this person from MS C# newsgroup, and then find this out. Really easy understanding tutorial. Compared to a lot of C# books, this one has a lot of practical approaches. Strong recommended , A++.
A very good C# resources. I read about this person from MS C# newsgroup, and then find this out. Really easy understanding tutorial. Compared to a lot of C# books, this one has a lot of practical approaches. Strong recommended , A++.
Sunday, March 06, 2005
The best online Computer Science resources I have ever found.
CS Classes
I start to read this when I prepare the CS GRE subject test, this is by far the best online resources I have ever found on Internet. Though I didn't do well on Nov, 2004 test, but I think I learned a lot in the process of preparing it. I got a lot of trouble in ansewring those questions related to virtual memory, cache, pipeline, and also computation theory. Well, I won't say the questions are too difficult, it's just all about myself. I don't have a solid understanding on those concepts , it's also understandable for a geography major. But I still think I am on the right track.
I start to read this when I prepare the CS GRE subject test, this is by far the best online resources I have ever found on Internet. Though I didn't do well on Nov, 2004 test, but I think I learned a lot in the process of preparing it. I got a lot of trouble in ansewring those questions related to virtual memory, cache, pipeline, and also computation theory. Well, I won't say the questions are too difficult, it's just all about myself. I don't have a solid understanding on those concepts , it's also understandable for a geography major. But I still think I am on the right track.
Sunday, February 27, 2005
The Code Project - Testing TCP and UDP socket servers using C# and .NET - C# Programming
The Code Project - Testing TCP and UDP socket servers using C# and .NET - C# Programming
I am starting to write a serious TCP/UDP socket testing for the E911server . Honestly, the version I wrote before using visual basic is too simple, and naive. Thanks for Len Holgate. It's always joyful to find something exciting on codeproject.
The E911 server really hasn't passed a stress test yet, there are only limited connections so far. And I am sure the synchronous TCP/IP socket programming is not the best way to approach.
I am glad that I have restructured the program completely, it's always good to separate the business logic out of the programming logic.
I am starting to write a serious TCP/UDP socket testing for the E911server . Honestly, the version I wrote before using visual basic is too simple, and naive. Thanks for Len Holgate. It's always joyful to find something exciting on codeproject.
The E911 server really hasn't passed a stress test yet, there are only limited connections so far. And I am sure the synchronous TCP/IP socket programming is not the best way to approach.
I am glad that I have restructured the program completely, it's always good to separate the business logic out of the programming logic.
Monday, September 27, 2004
Geometry in DTMap
I have read through all the papers and the codes on the JTS. It seems a pretty good chance for me to implement the geometry operation into the DTMap.
Two key issues will be considered: 1> Robust issue . 2> Graph Algorithm.
It is pretty enjoyful to read through those codes, and I can feel the difference between me and those people who wrote the jts. Have been working for about four years, but I am still not statisfied the code which I wrote.
Two key issues will be considered: 1> Robust issue . 2> Graph Algorithm.
It is pretty enjoyful to read through those codes, and I can feel the difference between me and those people who wrote the jts. Have been working for about four years, but I am still not statisfied the code which I wrote.
Subscribe to:
Posts (Atom)