Wind and Solar Power Grid Connection

Free energy is a nice idea; unfortunately you need to invest in some equipment to actually make it happen. Trying to build the following setup, thank you aliexpress:

The components are: windmill, wind charge controller, tiny solar panel, solar panel charge controller, a 12v battery, some 12v DC cables and wires and a couple of switches to tie it all together.
Still working on the choices for the grid tie converter.

* advertisement:

get a free coupon for new users here

That’s all folks!

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…

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
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 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

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
sudo ntpdate -u

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,

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.”

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:

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)