Dynamically Create an instance of class in code
In C#, you can create an instance of class dynamically. For example, you can create an instance of class according to database values, rather than hard coded.
You just need to use reflection.
Code
ObjectHandle obj = Activator.CreateInstance(AssemblyName,className); | |
Controller = (IApp) obj.Unwrap(); |
Please note that, Assembly Name is without ".dll", such as "AdvgenContact.App.WPF", and the class name need to be full qualified, for example, "AdvgenContact.App.WPF.MainApp".
If you wish to know more, please check out our open source project, AdvgenContact.
b2evolution.Widget Cache
I just upgraded my blog to b2evolution.5.0.7. I found it ate a lot of memory. The workaround is enable all levels of caching. Moreover, please do not forget to enable widget cache. The widget ate a ton of memory!
Leap Motion in Dick smith
A few days ago, I found a device calls "Leap Motion" which is a 3D motion and gestures controls. That is a kind of "3D" Mouse. For example, you can move your hand in the middle air to control a block in the screen left and right, up and down. That is very similar what Tom Cruise did in Minority Report. I listened a lot of report from some online gadget shows about this.
Now, you can find it in a local disk smith store for $129.98, but that is a quite expensive. $129.98 for doing some 3D gestures to my computer is a bit too much for me.
Gantry's CSS LESS compiler Error
I just got a new website built which is a Gantry template. I got some error, e.g. Fatal error: Out of memory. That is from Gantry's CSS LESS compiler. I tried to comment out the codes to by-pass compiler. It does not 100% work. Finally, I put a request to web host for increasing the buffer to 128MB. Then all works fine.
(Note that, I know you can use define function in php to increase your memory buffer, but some web hosts will not allow it.)
Aglie - Quick Response!
There is one advantage of aglie, we can get the clients to test the system when the parts built during the sprint, rather waiting the testing stage. If the bugs can be found as near as the time of its creation, that would be the best. The developer should be the best memory about the buggy parts. That is better to wait for the testing stage. Maybe a month, we need to understand the bug report and "search" our memory, how those parts works, how come the bug is created. That is not good!
Thus, getting bugs fixed should be carried as easily as possible!