.Net Framework 2.0
Before I start cramming code, I’ll like to know what you guys think. I’ve been working heavily on my key value store and it has been working as expected, however, the main reason for me building this store does not seem to be completely eliminated with the functionalities that I have in place so far. therefore, I’ll like to add an extra piece to the jigsaw but before I do so I’ll like to hear what you have to say. The storage engine itself is solid and it works with the minimal functionalities that it currently has. As a...
As I stated in my previous posts here and here, I have set out to write my own NoSQL database simply because I can – well not really but because it will give me the edge, learning experience will be great and there isn’t really too many options when it comes to native .NET NoSQL Databases. I want to be able to build web applications without the RDBMS overhead and schema design time. I haven’t done much yet with distributed or replicating side of things yet, so far all I wanted was a prototype to show that it...
Here is a very simple way to resize an image using a bitmap as a canvas and the graphics object as a the resizing tool. Don’t forget to reference System.Drawing. /// <summary>
/// Resizes an image from a source file to a destination file
/// the destination file will contain the exact image at the size specified
/// </summary>
/// <param name="sourceImagePath">the source image file that needs to be resized</param>
/// <param name="destinationImagePath">the destination path that the source
/// image file needs to be resized to</param>
/// <param name="width">the new width</param>
/// <param name="height">the new height</param>
static void ResizeImage(string sourceImagePath,
...
One of the most efficient and non-intrusive ways you can implement an intercepting procedure is via an HttpModule. An HttpModule simply receives every request going to or coming from IIS and it allows you to manipulate the content as you see fit and pass it along. I wanted to spit out the time it takes from receiving a request to writing the response on one or more web pages and there was no other better way of doing it except writing an HttpModule, it toke me all but 10mins. Here is the code, feel free to blow it up. ...
/// <summary>
/// using reflection to create an instance of a generic type
/// </summary>
/// <returns>T as the generic type</returns>
private static T GetNewObject()
{
try
{
return (T)typeof(T).GetConstructor(new Type[] { }).Invoke(new object[] { });
}
catch...
As my forever quest for simple & reusable code keeps growing, I stumble across some bottlenecks once in a while. Anyway, I have a simple class that is called "PopulateObjectFromFormRequest" and as descriptive as the name is, it does one simple yet helpful task. Given an object as a generic type I.e (user) and a web form as a parameter I.e (aspnetform), it will scan through all the controls of that web form and use reflection on the object and assign values to the object properties that matches controls from within the form. How does this help me? Well if I my...
Sometimes working with pure XML is our only option and we may just want it as clean as it can be. I usually use the XmlDocument object to load and/or create the XML and manipulate it and then at the end of the day, I'll use the InnerXml property to get pure XML, which I usually save to a file or do something with or I may just be serializing a Serializable object to XML. The XmlDocument object by default assigns a namespace to the XML string and also includes the declaration as the first line of the XML document....
Who knew that installing 3.5 will bring me down to my knees. I can't do anything 2.0 anymore since I installed 3.5, it seems it installed SP1 for 2.0 and that broke everything that has to do with 2.0 and check out the icon, found out the icon was different after an hour of research trying to figure out what was wrong with my .NET applications. Off course my first step was to re-install 2.0, however, I got the following message. Therefore, I had no other choice but to remove 3.0 and 3.5. I couldn't...
Next entries »