Archive for Coding

TIL: Apostrophe in MySQL data

It took a long time for me to discover why one particular update/insert in a MySQL database failed while most updates worked OK.  And the failed transactions did not throw an error – they came back via the ‘success’ path. Turns out any single quotes in MySQL string data cause this behavior.  Once I escaped […]

TIL: jQuery dialogs – button and title font size

There are many solutions in StackOverflow and jQuery Forums for changing the font size in a jQuery dialog panel. Unless you do something about it, the buttons and title appear much too large for most tastes. I tried five ideas from answers given (there are many more) but only one worked for me – I put this in […]

TIL: Javascript newline replacement

Trying to get rid of any newline characters in a field of an HTML text input form is not straightforward. These can be input by a user pressing Shift+Enter, or pasting in text that already includes newlines. I thought this would do it: var sp = ” “; var stripped = userInput.replace(/[\ca-\cz]/gm, sp); That didn’t […]

A personal blog about a few of my interests … other than Visual Thinking