HP LaserJet Pro M280 M281 Printer series 20200612 firmware downgrade

The source of the solution is here, my problem was real!
After a firmware upgrade for my HP M281fdw all-in-one printer, it suddenly started complaining about communication problems with one of the supplies. “Supply problem.” on the screen and “The indicated supplies are not communicating correctly with the printer. Try reinstalling the supplies. If the problem persists, replace the supplies to continue printing.” in the help-text. Uncertain about the level of toner in my K container I simply ordered a new one. Of course no one wants to pay ridiculous prices, so I go for the home-brand of 123inkt.nl
Since I knew my CMY had been low for months I decided to change those three at the same time. To my surprise this suddenly gave errors on all four supplies, making me go ‘hmmmm’.

I started googleing and getting more frustrated about my printer not doing what it is supposed to, I remembered I clicked something about a firmware update and forgot about it. Then I found this article which gave me the option to downgrade… AND IT WORKED! My toner was actually still at 90%

So, HP, Hewlett Packard, you F@!^%#$-ing B@#&$%ards, blocking non-HP toners is so stupid, low-blowing and unbelievable, I am thinking about calling my lawyer to see if that is even legal, blocking me to use the more enonomical printer-supplies-brand I prefer and costing me a day of waiting for a newly ordered toner and a couple of hours of aggravation before I could solve this issue with finally a firmware downgrade.
Anyway, below the solution, which I copied from the other website:

Continue reading HP LaserJet Pro M280 M281 Printer series 20200612 firmware downgrade

IDE1006 Naming rule violation

Thank you visual studio with your strange default settings, causing the error/warning all throughout my code: “IDE1006 Naming rule violation: These words must begin with upper case characters”.

Go Google, find this, and solve it actually like so:

  • By going to Tools > Options… > Text Editor > Basic > Code Style > Naming
  • Click ‘Manage Naming Styles’, add new style ‘camelCase’ (or whatever else you require), and save.
  • Set the Required Styles to camelCase and save by clicking OK
  • Thank You Microsoft!

Have a nice day!

Icepay cURL 60 SSL problem

To be precise, the error is: “Unable to reach the ICEPAY payment server (60):SSL certificate problem: unable to get local issuer certificate

The solution could be:

curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, 0);

or, which also works in my case:

curl_setopt($this->ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($this->ch, CURLOPT_SSL_VERIFYPEER, false);

Of course bypassing SSL security is never the correct option, but for a development server we all make exceptions sometimes.
Have a nice day!

Mac time synch

Using vmware I always suspend my mac-os machine, so the time at revival is never correct… so how to force a time-synch:

source: here

10.14 Mojave

Mojave still uses timed, but ntpdate and the helpers ntpq are removed. To check and update your system time, you can call sntp directly.

$ sudo sntp -sS pool.ntp.org
Password:
sntp 4.2.8p10@1.3728-o Tue Mar 21 14:36:42 UTC 2017 (136.200.1~2533)
2018-09-29 19:42:41.448103 (-0200) +1087.742403 +/- 725.183462 pool.ntp.org 188.68.36.203 s2 no-leap

Out of the box, a tracking file is missing. So if you get the error below when checking time:

kod_init_kod_db(): Cannot open KoD db file /var/db/ntp-kod: No such file or directory

create the file and change ownership to root. Some people reported this was actually breaking the ntp synchronization.

sudo touch /var/db/ntp-kod
sudo chown root:wheel /var/db/ntp-kod

Then run again to check if the error message is gone.

sudo sntp -sS pool.ntp.org

In case you have the same issue, i used to use the following commands before, but they hasn’t worked since whatever previous os version/update:

sudo ntpd -sS time.apple.com
sudo ntpdate -u time.apple.com

Have a nice day!

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!

MySql Query cache on Windows

Slow server? Check if your query cache is set by querying:

mysql> show variables like 'have_query_cache';
 +------------------+-------+
 | Variable_name | Value |
 +------------------+-------+
 | have_query_cache | NO  |
 +------------------+-------+

How to enable this?
Find your my.ini … in my case in: C:\ProgramData\MySQL\MySQL Server 8.0
Add under [mysqld]

query_cache_size = 268435456
query_cache_type=1
query_cache_limit=1048576

More info here: https://dev.mysql.com/doc/refman/5.6/en/query-cache-configuration.html
And as you will notice this is 5.6 documentation. In my case this does not work, because I am using MySQL8.0 …. The query cache is deprecated as of MySQL 5.7.20, and is removed in MySQL 8.0.

The search to speed up my server continues….