Deprecated: Grav\Plugin\FormPlugin::onTwigVariables(): Implicitly marking parameter $event as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 416

Deprecated: Grav\Plugin\FormPlugin::form(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 1179

Deprecated: Grav\Plugin\FormPlugin::createForm(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 1231

Deprecated: Grav\Plugin\FormPlugin::createForm(): Implicitly marking parameter $form as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/form.php on line 1231

Deprecated: Grav\Plugin\Login\Login::checkLoginRateLimit(): Implicitly marking parameter $ip as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 314

Deprecated: Grav\Plugin\Login\Login::resetLoginRateLimit(): Implicitly marking parameter $ip as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 333

Deprecated: Grav\Plugin\Login\Login::getIpKey(): Implicitly marking parameter $ip as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 344

Deprecated: Grav\Plugin\Login\Login::sendInviteEmail(): Implicitly marking parameter $message as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 523

Deprecated: Grav\Plugin\Login\Login::sendInviteEmail(): Implicitly marking parameter $user as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 523

Deprecated: Grav\Plugin\Login\Login::getPage(): Implicitly marking parameter $route as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 626

Deprecated: Grav\Plugin\Login\Login::getPage(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 626

Deprecated: Grav\Plugin\Login\Login::addPage(): Implicitly marking parameter $route as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 666

Deprecated: Grav\Plugin\Login\Login::addPage(): Implicitly marking parameter $page as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 666

Deprecated: Grav\Plugin\Login\Login::getRoute(): Implicitly marking parameter $enabled as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 688

Deprecated: Grav\Plugin\Login\Login::isUserAuthorizedForPage(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Login.php on line 735

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $subject as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $body as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $contentType as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::message(): Implicitly marking parameter $charset as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 72

Deprecated: Grav\Plugin\Email\Email::send(): Implicitly marking parameter $envelope as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/email/classes/Email.php on line 92

Deprecated: Grav\Plugin\Form\Form::getFileUploadError(): Implicitly marking parameter $language as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Form.php on line 751

Deprecated: Grav\Plugin\Form\Form::removeFlashUpload(): Implicitly marking parameter $field as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Form.php on line 1259

Deprecated: Mf2\Parser::parse(): Implicitly marking parameter $context as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/webmention/classes/Parser.php on line 1100

Deprecated: Grav\Plugin\Form\TwigExtension::includeFormField(): Implicitly marking parameter $default as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/TwigExtension.php on line 146

Deprecated: Grav\Plugin\Login\Events\PageAuthorizeEvent::__construct(): Implicitly marking parameter $config as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/login/classes/Events/PageAuthorizeEvent.php on line 40

Deprecated: Grav\Plugin\Form\Forms::createPageForm(): Implicitly marking parameter $name as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Forms.php on line 65

Deprecated: Grav\Plugin\Form\Forms::createPageForm(): Implicitly marking parameter $form as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/user/plugins/form/classes/Forms.php on line 65
Blog | Matthew Miner's Blog

Matthew Miner's Basic-ish BlogMatthew Miner's Blog

Sometimes I might say something

References to items in PHP's arrays have a seemingly unexplainable quirk/bug. If one manipulates an array by using references to some items, then he makes a copy of the array and manipulates that afterwards, somehow this modifies the original array too. This isn't shallow copying of objects; this happens with primitive types like ints and strings.

Continue Reading…

Home Assistant's Logic-Lacking Variables

TECH PROGRAMMING HOME ASSISTANT
Deprecated: Parsedown::blockSetextHeader(): Implicitly marking parameter $Block as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/erusev/parsedown/Parsedown.php on line 715

Deprecated: Parsedown::blockTable(): Implicitly marking parameter $Block as nullable is deprecated, the explicit nullable type must be used instead in /home/public/blog/grav-admin/vendor/erusev/parsedown/Parsedown.php on line 853

The whole point of home automation is to do things conditionally. Maybe you want to change the light color depending on the time of day. Maybe you want to play a noise when someone hits a button. Or, in my case, I want to adjust the thermostat based on the temperature and people's locations. Regardless of what you want to do, the go-to software is the mostly-lovely Home Assistant. It makes it easy to integrate all your devices with whatever setup you want and then lets you run automations to…a...

Continue Reading…

How to Scope CSS by Moving an Element to the Shadow DOM

PROGRAMMING WEB DEVELOPMENT HTML CSS JAVASCRIPT SHADOW DOM TECH
Bakura demonstrating how to banish things to the shadow DOM in Yu-Gi-Oh!

(tl;dr: Jump to the actual moving)

Scope is an important concept in programming. It allows you to just write small sections of code to do what you need them to do without having to worry about something else in your code using the same name and messing everything up. Declarations (such as of variables or functions) will only be visible to code also in the same scope, usually some block of code.

MDN has a good example of the effects of scope in Javascript:

let x = 1;
if (x === 1) {...

Continue Reading…