Each delegate object is really a wrapper around a method and an object to be operated on when the method is called.
The constructor takes an object and IntPtr value, in the constructor, these two arguments are saved in _target and _methodPtr private fields.
Some C++, C#, .Net, windows service, GIS thoughts posted by me. 有度量去容忍那些不能改变的事,有勇气去改变那些可能改变的事,有智慧去区分上述两件事。
Tuesday, May 30, 2006
Sunday, May 21, 2006
FreshTag stop working.
I use FreshTags to help organize my blogs since the blog service I use (www.blogger.com) lacks the built-in support for this functionality. Honestly, I think the blogger service is kind of far behind of the other services offered by google.
For mysterious reason, the freshtags stop working two days ago, and I tried to use build page to experience different settings. It seems the samples it offered work perfectly, but after I change certain settings to mine, it just stops working.
I am not familar with the javascript code, and the javascript code the freshtags uses seems pretty complicated to me, so I didn't try to examine the code at the beginning. And it proved wrong, I should look into the code at the very beginning.
The issue is somehow, del.icio.us starts to offer all its feed only to query built in lowercase. At the beginning, I querid the tags using the upper case like this : http://del.icio.us/feeds/json/tags/yuren1978/GISresearch?sort=freq&count=100,
And after I changed this to the lower case : http://del.icio.us/feeds/json/tags/yuren1978/gisresearch?sort=freq&count=100,
Those tags are returned in correct way.
For mysterious reason, the freshtags stop working two days ago, and I tried to use build page to experience different settings. It seems the samples it offered work perfectly, but after I change certain settings to mine, it just stops working.
I am not familar with the javascript code, and the javascript code the freshtags uses seems pretty complicated to me, so I didn't try to examine the code at the beginning. And it proved wrong, I should look into the code at the very beginning.
The issue is somehow, del.icio.us starts to offer all its feed only to query built in lowercase. At the beginning, I querid the tags using the upper case like this : http://del.icio.us/feeds/json/tags/yuren1978/GISresearch?sort=freq&count=100,
And after I changed this to the lower case : http://del.icio.us/feeds/json/tags/yuren1978/gisresearch?sort=freq&count=100,
Those tags are returned in correct way.
yuren1978
Friday, May 19, 2006
Private and GAC deployment.
I did a little test over the .Net dll deployment testing two nights ago. I thought I needed to write it down.
The thing confused me a little bit is if I install the same version of a dll both in the GAC and Private path ( the application path), will the application look for the dll in the GAC or Private Path.
I made a simple test dll, and there is a test method which will display a message box. In the dll which I depoloyed to GAC, I will disaplay a message box "Called from GAC", in the private deployed dll, I will display a message box "Called from Local".
I also made a simple test application which will refer to the test dll.
If I install the dll into GAC using the GACUtil /i, it will dispaly the following message box.
However, if I unistall the GAC , and then the test application will call the dll from the local private path, then the following message box will be displayed.
Conclusion, if an assembly is deployed both in the GAC and privately, the one in the GAC will be called firstly.
The thing confused me a little bit is if I install the same version of a dll both in the GAC and Private path ( the application path), will the application look for the dll in the GAC or Private Path.
I made a simple test dll, and there is a test method which will display a message box. In the dll which I depoloyed to GAC, I will disaplay a message box "Called from GAC", in the private deployed dll, I will display a message box "Called from Local".
I also made a simple test application which will refer to the test dll.
If I install the dll into GAC using the GACUtil /i, it will dispaly the following message box.
However, if I unistall the GAC , and then the test application will call the dll from the local private path, then the following message box will be displayed.
Conclusion, if an assembly is deployed both in the GAC and privately, the one in the GAC will be called firstly.
Tags:GISResearch
Wednesday, May 17, 2006
Non-generic - Generic mapping.
Comparer | Comparer |
Dictionary | HashTable |
LinkedList | - |
List | ArrayList |
Queue | Queue |
SortedDictionary | SortedList |
Stack | Stack |
ICollection | ICollection |
IComparable | System.IComparable |
IDictionary | IDictionary |
IEnumerable | IEnumerable |
IEnumerator | IEnumerator |
IList | IList |
Tags:GISResearch
Tuesday, May 16, 2006
Love the DPack.
DPack. http://www.usysware.com/dpack/
The most useful features missing in Visual Studio.
Alt + S : Solution Browser.
Alt + U: File Browser.
Alt + G: Code Browser.
This will increase code efficiency dramatically.
Love the DPack. Also on my favorites are GhostDoc, and SmartPaste.
The most useful features missing in Visual Studio.
Alt + S : Solution Browser.
Alt + U: File Browser.
Alt + G: Code Browser.
This will increase code efficiency dramatically.
Love the DPack. Also on my favorites are GhostDoc, and SmartPaste.
Sunday, May 14, 2006
A good web programmer needs.
1. Good understading of javascript.
2. Good understanding of CSS.
3. Good understanding of Photoshop.
4. Good understanding of Database.
5. Good understanding of server-side programming like asp.net.
2. Good understanding of CSS.
3. Good understanding of Photoshop.
4. Good understanding of Database.
5. Good understanding of server-side programming like asp.net.
GISResearch
Friday, May 12, 2006
You cannot simply pass the reference to user control.
We have a program which will host multiple map controls, and each map control will have its own legend. It's fine to host muliple maps on different tabs, but it's a little bit tricky to host multiple legends. The end user will only want to see the legend associated with the current active map.
The first approach I tried is to create a form-level legend, and also create each legend inside each map control. And when the map becomes visible, I will do something like this:
frmMain.legend = currentMap.legend.
frmMain.Legend.Refresh().
I thought this will make the frmMain.legend point to the active map legend, and draw the active map legend.
Actually, this is not the case. Simple reference passing won't make the active map legend become the visible legend. And the OnPaint method of the active map won't be called. The paint message will still be sent to original legend.
This issue looks simple, but does take me a while to figure it out.
The first approach I tried is to create a form-level legend, and also create each legend inside each map control. And when the map becomes visible, I will do something like this:
frmMain.legend = currentMap.legend.
frmMain.Legend.Refresh().
I thought this will make the frmMain.legend point to the active map legend, and draw the active map legend.
Actually, this is not the case. Simple reference passing won't make the active map legend become the visible legend. And the OnPaint method of the active map won't be called. The paint message will still be sent to original legend.
This issue looks simple, but does take me a while to figure it out.
GISResearch
Subscribe to:
Posts (Atom)