Very good regular expression site.
The world of regular expression is very exciting, but it is also very error prone when you try to build those complex rules. A good rule is very helpful to understand and build the rules. Regular Expression Workbench at goddotnet.com is very powerful tool to build the expression rules dynamically.
I mainly use the regular expression rule for the address parsing. The previous method I used is brute-force parsing, it's not very pleasant though it does the work. In the newer version, I hope I can build a much powerful tool to parse the address, and hopefully, publish it to the codeproject.com
Some C++, C#, .Net, windows service, GIS thoughts posted by me. 有度量去容忍那些不能改变的事,有勇气去改变那些可能改变的事,有智慧去区分上述两件事。
Monday, July 11, 2005
Thursday, July 07, 2005
Thursday, June 16, 2005
Finally get a way out.
The dead hard drive has made me in a disaster in the last three days, thanks for Dave's help, without his help, I may spend much more time to recover the data.
The hard drive we ordered from CompUSA finally came this morning, but it is not what we had hoped. We hoped that there is an internal SATA that we can swap my bad disk in, but it's not the case. Another way dead.
Then Dave suggested that I can try another SATA - IDE bridge card, I went to microcenter to get it, tried it again on his computer. The computer cannot recogize the drive. Another way dead.
The only way left is to run the system on WinPE from CD-ROM based on suggestions from http://www.runtime.org./peb.htm before putting it into the freezer. Dave helped me burn a CD again. You know what, it worked!!!!!
The hard drive we ordered from CompUSA finally came this morning, but it is not what we had hoped. We hoped that there is an internal SATA that we can swap my bad disk in, but it's not the case. Another way dead.
Then Dave suggested that I can try another SATA - IDE bridge card, I went to microcenter to get it, tried it again on his computer. The computer cannot recogize the drive. Another way dead.
The only way left is to run the system on WinPE from CD-ROM based on suggestions from http://www.runtime.org./peb.htm before putting it into the freezer. Dave helped me burn a CD again. You know what, it worked!!!!!
Wednesday, June 15, 2005
Dead hard drive.
I have tried to run the Maxtor Hard Drive Self -checking utility (with Chris's suggestion) , and the drive is not good.
We have tried to put the hard drive in another computer yesterday, it is not even starting.
I also checked the order you made yesterday, and that hard drive is supposed to come tomorrow, I am going to swap my drive into that USB box, and I hope this at least will make the main computer with good drive boot.
I am suggesting the following steps:
1> If the drive is readable , we can simply copy the data out. ( I seriously doubt on that).
2> If the drive is not readable, we can try the GetDataBack, the good thing about this is that you can check how much files you can recover before buying the license code. (Scan is free, and copying needs license).
3> If 2> doesn't work, I read some posts that some people successfully get the data out by freezing the hard drive overnight, I will give it a try.
4> If nono of them work, then I probably have to rewrite some codes. As I told you guys, most of my codes are in source safe, especially important ones, but there are still quite a few recent updates not in source safe , and some utility programs I wrote. I will spend some extra hours to do some code recovering from my brain.
But I think Dave and you have much more experiences on that, so give me hints if you guys have.
I will take this afternoon off, and work on Saturday morning.
We have tried to put the hard drive in another computer yesterday, it is not even starting.
I also checked the order you made yesterday, and that hard drive is supposed to come tomorrow, I am going to swap my drive into that USB box, and I hope this at least will make the main computer with good drive boot.
I am suggesting the following steps:
1> If the drive is readable , we can simply copy the data out. ( I seriously doubt on that).
2> If the drive is not readable, we can try the GetDataBack, the good thing about this is that you can check how much files you can recover before buying the license code. (Scan is free, and copying needs license).
3> If 2> doesn't work, I read some posts that some people successfully get the data out by freezing the hard drive overnight, I will give it a try.
4> If nono of them work, then I probably have to rewrite some codes. As I told you guys, most of my codes are in source safe, especially important ones, but there are still quite a few recent updates not in source safe , and some utility programs I wrote. I will spend some extra hours to do some code recovering from my brain.
But I think Dave and you have much more experiences on that, so give me hints if you guys have.
I will take this afternoon off, and work on Saturday morning.
Monday, June 06, 2005
Roland Weigelt's GhostDoc
Roland Weigelt's GhostDoc
I have been looking for this plug-in for the whole day. I firstly heard about that in the Day of .Net Columbus meeting, but really didn't pay attention to that. Suddenly today, I find I desperately need this tool to help me write some comments.
It is good that I find it finally.
I have been looking for this plug-in for the whole day. I firstly heard about that in the Day of .Net Columbus meeting, but really didn't pay attention to that. Suddenly today, I find I desperately need this tool to help me write some comments.
It is good that I find it finally.
Microsoft AntiSpyware blocks tests from running.
I had tried using Team System Test in VS2005 to develop test projects, but everytime when I started the test, the result shows "aborted", and Microsoft AntiSpyware pops up a box quickly.
This issuue has driven me nuts for a while until I found a known issue here:
Issue: Microsoft AntiSpyware blocks tests from running.
Details: If Microsoft AntiSpyware's real-time protection is enabled with the default configuration, the running of unit tests will be blocked and all tests will end in Aborted.
Workaround: Deactivate the Script Blocking Checkpoint in Microsoft AntiSpyware.
1. Open Microsoft AntiSpyware.
2. Select Real-time Protection.
3. Click the "Application Agents" link in the Security Agents Status panel.
4. A list of Application Agent Checkpoints will be displayed. Scroll down to find "Script Blocking."
5. Click on the "Script Blocking" checkpoint.
6. From the "Checkpoint Details" pane, choose "Deactivate Checkpoint."
This issuue has driven me nuts for a while until I found a known issue here:
Issue: Microsoft AntiSpyware blocks tests from running.
Details: If Microsoft AntiSpyware's real-time protection is enabled with the default configuration, the running of unit tests will be blocked and all tests will end in Aborted.
Workaround: Deactivate the Script Blocking Checkpoint in Microsoft AntiSpyware.
1. Open Microsoft AntiSpyware.
2. Select Real-time Protection.
3. Click the "Application Agents" link in the Security Agents Status panel.
4. A list of Application Agent Checkpoints will be displayed. Scroll down to find "Script Blocking."
5. Click on the "Script Blocking" checkpoint.
6. From the "Checkpoint Details" pane, choose "Deactivate Checkpoint."
Sunday, May 08, 2005
Instance Constructor vs. The Class Constructor
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.
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.
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.
Subscribe to:
Posts (Atom)