I have a canvas window and there is an element that i want to programmatically add to it. If a user adds a background image, i want to be able to toggle a semi transparent overlay that makes the text above stand out more clearer and is the main focus instead of it being the…
I have a bit of an awkward example but I am trying to extract a value from a dictionary if the key contains a substring. I have this part working, but I need to know when it does not find a match. The response from this request does not seem to accept a null. Here…
I have a numeric string that contains leading zeros that I want to remove before I perform any comparisons with it on other objects. How can I trim an undefined number of zeros from a string without having to loop through the characters in the string and remove all the zeros that come first?
I have an array of items where they are key value pairs. I want to select one at random, but I do not know how to get the key for a random item in the array. I can use Math.random() to generate a random index but how do i get the key? Here is the…
I want to try and add some override code that will perform a specific action if the user making the request is using a particular user agent. I have the two following methods that are overridden from the base ActionFilterAttributeĀ  class. public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext) public override void OnActionExecuting(HttpActionContext actionContext) I have seen other…
Is there a way to check if an Expando object contains a property before interacting with it. For example, If i were to say var test = Expando.Something and Something didn't exist, it will throw an exception. How do i check to see if "Something" exists in the expando object before I query it?
I just found one of these images and I have never heard of it before. What is it and what is the difference between a JPG-LARGE and a standard JPG image.
When creating a post using TinyMCE, the output contains the HTML doctype along with other HTML tags that I do not want. I only want the output to contain the content of the post that will be stored in the database and used on other pages of the website. Is there a way to make…
XML Serialization in C# works fairly well and is relatively easy, but XML itself makes life hard at times. JSON is always the best route to go, but when you have no option, you must deal with some badly formatted XML objects that do not map very well to the object hierarchy you have for…