Breakpoint will not be hit?

Visual Studio Community edition is great… except sometimes you get an error like “The breakpoint will not currently be hit. No symbols have been loaded for this document.

Whats’s going on? And how to solve? Google! and find this, except it sounds too complicated. Simply go into your menu:

- Debug
- Options
- General
AND: Remove the check-mark for "Enable Just My Code"

That’s all folks!
Have a nice day…

Data size troubles 1406

When the scripts start compaining, “[Native code: 1406] [Native message: Data too long for column …]”, check how much data you are actually trying to squeeze into a single field.
source: maximum length of data I can put in a BLOB column in MySQL?

BLOB ≈ 64KB,
MEDIUMBLOB ≈ 16MB and
LONGBLOB ≈ 4GB

Also: “The maximum size of a BLOB or TEXT object is determined by its type, but the largest value you actually can transmit between the client and server is determined by the amount of available memory and the size of the communications buffers.”
https://dev.mysql.com/doc/refman/8.0/en/storage-requirements.html

Row size too large (> 8126)

Error Code: 1118
Row size too large (> 8126). Changing some columns to TEXT or BLOB may help. In current row format, BLOB prefix of 0 bytes is stored inline.

See the possible solutions here:
https://mariadb.com/kb/en/troubleshooting-row-size-too-large-errors-with-innodb/

Get your ‘create table’ sql code and add:

SET GLOBAL innodb_default_row_format='dynamic';
SET SESSION innodb_strict_mode=OFF;
Continue reading Row size too large (> 8126)

jQuery set a radio input

I finally found the answer here:
https://stackoverflow.com/questions/9525128/jquery-set-radio-button
https://web.archive.org/web/20160421163524/http://vijayt.com/Post/Set-RadioButton-value-using-jQuery

Basically, if you want to check one radio button, you MUST pass the value as an array:

$('input:radio[name=cols]').val(['4']);
$('input:radio[name=rows]').val(['3']);

So no more of these pre/post v1.6 versions:

$("#radio_1").prop("checked", true);
$("#radio_1").attr('checked', 'checked');
$("input[name=background][value='some value']").prop("checked",true);
$("#radio_1").prop("checked", true).change();
$(this).attr({"checked":true}).prop({"checked":true});
$("[name='type']").click(function(){
  $("[name='type']").removeAttr("checked");
  $(this).attr({"checked":true}).prop({"checked":true});
});
// JQueryUI
$("#option2").prop("checked", true); // Check id option2
$("input[name='radio_options']").button("refresh"); // Refresh button set

Have a nice day!