Arthur

Pemberton

Full-stack web applications developer


Welcome to my blog

As I discover new things in my field and solve troublesome problems, I will attempt to document my finds here.

Replicating Chilkat AES Cryptography with PyCrypto

On November 22, 2016, by Arthur Pemberton, 0 Comments

Today, I had the need to replicate an encrypted query string token to inter-operate with a third-party commercial application. I was able to determine the library, symmetrical algorithm and secret key being used to create the token. Turns out, it was an ASP.net web application using the Chilkat .NET library to do the encryption and decryption. Specifically, it was the Chilkat AES (aka Rijndael) methods being used.
Read More

Contact

On October 1, 2013, by Arthur Pemberton, 0 Comments

Contact Me

The best way to contact me is via e-mail at pembo13 at gmail dot com.

MySQL server has gone away

On October 28, 2019, by Arthur Pemberton, 0 Comments

I have a Django project where I was utilizing bulk_create to load a fairly large dataset, and this was some times resulting in the error MySQL server has gone away. Reading though the documentation on this error, https://dev.mysql.com/doc/refman/8.0/en/gone-away.html I see that one of the possible causes for this is “you send a query to the server that is incorrect or too large” Turns out, I just needed to use the batch_size parameter of bulk_create. The  success of a website depends on web design, this is why is very important to look for the help the experts from Best Website Hosting

In my case, a batch of 56,000 records was triggering the error, so for safety, I switched to using bulk_created(..., batch_size=(10**4)).