How to run a single instance of WinForm application?

Following tutorial provides an example to run a single instance of WinForms application using Mutex. There are multiple ways to achieve the same result but this is kind of neat solution in my opinion. Add following SingleInstance class in your project. Here is how to use it in Program.cs > Main function

Fixed – WordPress User Role dropdown is blank

Issue When I try to add a new user in WordPress under Admin > Users > Add New User, it shows blank dropdown. Root Cause I manually tried to change the WordPress prefix after WordPress blog was created. I made change only within wp-config.php and renamed tables but it required change in data as well.… Read More »

Fixed – Media Library Folders plugin TypeError XYZ is undefined

Issue When I tried to use Media Library Folders WordPress plugin, it shows following errors Root Cause I manually tried to change the WordPress prefix after WordPress blog was created. I made change only within wp-config.php and renamed tabled but it required change in data as well. This caused the issue. Fix Table PREFIX_options has… Read More »

FabricJS Image.applyFilters trims image

Issue When you apply filters to an image, it trims on the right or bottom part. Cause Internally by default image is painted over a tile of 2048×2048. If the height or width of the image is greater than 2048, remaining part of the image will be trimmed. Fix Increase textureSize to 4096 at the… Read More »

Webmin: How to change the size of Swap?

Even after searching on internet, I could not find a way to change the Swap size. Various online tutorials only showed us how to create swap space but did not explicitly address how to change the size of swap space using Webmin. Of course, this tutorial does not use Webmin but instead it uses commands… Read More »

mailto Invalid URI: The hostname could not be parsed.

If the Uri is “mailto”, the Uri format must be in the following format. I encountered following error It was difficult to find the root cause. Finally I found that I used “&subject” (ampersand) for the first parameter instead of “?subject” (question mark). Once I used “?subject”, everything worked as expected.

CsvHelper – Cannot write to a closed TextWriter.

If you are using CsvHelper and get the error “Cannot write to a closed TextWriter”, here is a solution. You are trying to reuse the same underlying stream to write using CsvWriter Instead, you don’t want to close the underlying stream so change your code to “true” parameter will leave the underlying stream open.