When evaluating the performance of an application it makes sense to run the code several times to get better view on how it performs. But getting a good look at the performance is still hard.
Python: Overwrite file with text (utf-8)
def overwriteFile(file_path, text): f = codecs.open(file_path, ‘r+’, “utf-8-sig”) f.seek(0) f.write(text) f.truncate() f.close()
[Java] String zu File mit Encoding
Hier ein kleines Snippet, welches einen Text bekommt und ihn mit dem gewünschten Charset in eine Datei schreibt.
[C#] Generic Circular Buffer
Circular buffers are awesome! For those who don’t know them: It’s basically a list where the end is connected to the start.. like a circle..Read More
[Java] SSLContext with client certificate
If you want to connect somewhere using an ssl-connection you will need an SSLContext object. I had some trouble creating one with a client certificateRead More