Monday, June 22, 2020

How to set CurrentCulture for all threads in a domain in .NET 4.5


In your Main-Method add the following lines:


System.Globalization.CultureInfo.DefaultThreadCurrentCulture = new System.Globalization.CultureInfo("en-US");
System.Globalization.CultureInfo.DefaultThreadCurrentUICulture = new System.Globalization.CultureInfo("en-US");

References:
morteza/how-to-set-currentculture-for-all-threads-in-a-domain-in-net-4-5
https://docs.microsoft.com/en-us/dotnet/api/system.globalization.cultureinfo?view=netcore-3.1

Tuesday, April 28, 2020

Need <, >, & in an XML-Message? Use the XML escape characters!


For Errors like this in SoapUI?


Name cannot begin with the ' ' character, hexadecimal value 0x20.

Then please try escaping the critical characters!

Have a look here:

https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents


"   &quot;
'   &apos;
<   &lt;
>   &gt;
&   &amp;


https://validator.w3.org/#validate_by_input






Sunday, December 15, 2019

ORACLE: Remove Whitespaces from a string

To remove whitespaces from a string use a regex:

REGEXP_REPLACE(text,'(^[[:space:]]*|[[:space:]]*$)')

Source:
https://stackoverflow.com/


Thursday, August 1, 2019

Replace/Remove Timestamps in Files with Notepad++


Text:


31.07.2019 21:47:47 Roses are Red
31.07.2019 21:47:50 Trees are Green
31.07.2019 21:47:50 Sky is Blue
31.07.2019 21:47:50 ...and a Black Hole is lurking in the centre of every fucking Galaxy!


Find what: \d{2}.\d{2}.\d{4} \d{2}:\d{2}:\d{2}
Replace with: <what/you/like>






Replaced Text


00.00.0000 00:00:00 Roses are Red
00.00.0000 00:00:00 Trees are Green
00.00.0000 00:00:00 Sky is Blue
00.00.0000 00:00:00 ...and a Black Hole is lurking in the centre of every fucking Galaxy!