Archive for category Programming
Retry Policy in C# for dotnet core
Posted by senseicris in C Sharp, C#, dotnet, Software Development, Software Engineering on January 1, 2019
I just published a new article on Code Project with the full source code. How to create and use a Retry Policy utility class to add some resilience to your dotnet projects. This will help in situations where a temporary network or disk failure might cause a transient error in an app. https://www.codeproject.com/Articles/1273180/Retry-Policy
jQuery Error 80020101: A fix
Posted by senseicris in HTML, JavaScript, jQuery, Programming on May 19, 2012
I ran into the annoying Could not complete the operation due to error 80020101 bug today. I clearly am not the only one (Google: Could not complete the operation due to error 80020101). This was an old bug in jQuery that was squashed and apparently is back in jQuery 1.7.2 except it isn’t back.
The original bug was related to HTML comments. This was not the cause in my case. It was a query string variable. The fix is simple, take out the query string from the URL.
Change it from this
/Reports.aspx?ReportID=24to this
/Reports.aspxEDIT: Alternate Solution
Bruno commented below he this fix was not applicable in his situation. In his case, he needs the querystring. To that end, here is a way to eliminate the issue with a little bit of JavaScript.
You can leave the query string intact and remove it from the webservice URL before making the webservice call with a little bit of javascript. Before calling the webservice, use the following JavaScript to clean the URL and prevent the error
var url = window.location.href.replace(window.location.search, '');
Voilà!
No more Could not complete the operation due to error 80020101
LTRIM RTRIM don’t always work –UDF (UPDATED)
Posted by senseicris in Programming, SQL, TSQL on February 17, 2012
I previously posted on the LTRIM and RTRIM inability to remove certain not printing whitespace characters which can sometimes cause problems. I have updated the SQL page with a User Defined Function (UDF) which can be used in queries or in a stored procedure. I have also included a link to the Code Project article.
LTRIM RTRIM don’t work
Posted by senseicris in Programming, SQL, TSQL on September 29, 2011
LTRIM and RTRIM does not work sometimes if the whitespace character is not actually character ASCII 32. This stumped me for a while. The data entry screen used to enter the information somehow allows users to enter other white space characters other than the regular space from the space bar. It could be related to the system encoding, I don’t know. Here is the code I used to fix the LTRIM and RTRM.