I was using PHP to calculate sunrise and sunset using the built-in functions date_sunrise and date_sunset. But initially, the resulting time was ignoring British Summer Times (BST). The solution was to specify whether daylight saving was in force.
Technical
Elementor Nav Menu Dropdown: Fixing overlay layer
WordPress’s Elementor’s Nav Menu when set to “Dropdown”, was opening “inline” and moving subsequent header content down the page, rather than opening in a separate layer over the top of my header. The solution…
Mnemonic for remembering metric prefixes
1,000 (103) | 1,000,0000 (106) | 109 | 1012 | 1015 | 1018 | 1021 | 1024 |
kilo | mega | giga | tera | peta | exa | zetta | yotta |
Killer | megalomaniac | giggles | terribly. | Peter | exaggerates | Zeta-Jones’s | yacht |
How to remove a known Acrobat PDF password
I had some Adobe Acrobat PDF files that I knew the password, but wanted to remove. The following options did not work, because they required a Permission Password (which I did not have):
- File | Properties | Security, then change the Security Method from Password Security to No Security
- File | Print, then Print to Adobe PDF.
My solution follows:
Firefox bookmark menu hidden and restored
My Firefox Bookmark menu was hidden. It would appear for a few seconds, and then appear to be over-written by the main Firefox window. I tried most options suggestions involving Customisation, and to Restore Defaults, none of which worked for me. This solution worked for me:
Change lock screen wallpaper on Xiaomi with MIUI 10
I couldn’t change the wallpaper on my Xiaomi Mi Max 3 mobile running Android 8.1 Oreo.
This did not work:
(1) Long-press the desktop (2) Select Wallpapers (3) Choose an image (4) Press Set wallpaper (5) Specify whether the selecting wallpaper appears on the Lock Screen, Home page, or both.
This might have been due to the Xiaomi MIUI 10 (Mi User Inteface), my Nova launcher app, or something else.
This worked:
Changing colour gradients
A reoccurring issue, is to change the colour in an image to another, but retaining the color gradient. For example, changing a greyscale image to green, but the light greys change to light green, the dark grays to dark green. The image is greyscale because the black drawing is anti-aliased with varying shades of grey.
Corel Paintshop Pro includes the Color Replacer, which is supposed to do just this. Either I do not understand how it works, or it does not quite do what I was expecting, and it ignores the lightest pixels, or changes all pixels to the same shade of colour.
The solution is to the use the Red/Green/Blue color affect. For black text on a white background, the trick is to invert the image first, to white on back. Then use the Red/Green/Blue color affect.
There must be an easier way!
WordPress permalinks 403 Forbidden error
After installing a fresh copy of WordPress, I was finding that when I created a new page, and tried viewing it, I received an error message: 403 Forbidden. Research suggested a permissions error, mine was different.
Firefox FireFTP addon “Unresponsive script” fix
When using the FireFTP add-on in Firefox, and trying to show the contents of a directory with lots (500+) of entries, after 20 seconds or so, a window pops up suggesting “Unresponsive script” with the option to Stop or Continue. The solution is as follows…
How to cure one common form of dizziness
In my older age (over 50) I found that I was experiencing dizzy spells (a) at night lying down my head on the in bed (b) exaggerated movement of the head (c) occasionally when walking, in time with my steps. This particular kind of vertigo (“BPPV”) can be self-diagnosed and treated. I am not a doctor, and this treatment should not replace the advice of a medical doctor. Here’s how…