Negative Time Values In Excel

I was trying to set up a simple time sheet in Excel. I know that ready-made ones exist, but it’s more fun and educating to make your own, right? And I came across a nasty problem: Excel doesn’t like to display negative time:

Turns out there’s a simple solution for this: Enable the 1904 dating system. There is also a workaround formatting the result as text, but Microsoft states that this then can not be used for further calculations – not a viable solution for a time sheet!

To enable the 1904 dating system, go to your Excel options. It can be found under “Advanced” – you need to scroll quite a bit down:

Enable the option, and lo and behold – it works:


WordPress Error “please fill the required fields (name, email).”

I have been having a problem with one of my WordPress blogs that had me stumped: Whenever I would comment on it, being logged in as my WordPress user, I would get the error message:

“please fill the required fields (name, email).”

This started happening out of nowhere, without any connection to an update as far as I could tell. I even went so far as to check the code of my child theme – nothing. And I could not find any matching posts on the WordPress forums either…

It turned out to have a very simple solution. I disabled Jetpack, re-enabled it, and authorized Jetpack with WordPress.com again and lo and behold, the problem is gone.

No idea what the actual cause was, but this was one solution I did not try for some time – so I hope this helps anybody who is similarly stuck. 😉

Summing up times in Excel

It’s the small things, sometimes – something I never needed to do in my old jobs is calculating with time. One very simple task is to just add up a set of times – Excel will “wrap around” at 24h:

There’s a simple solutions for this problem. Just surround your hours with square brackets when formatting the cell, like so:

Works like a charm:

Times wrap around

25h not 1h

🙂

WordPress Image Scaling Incorrect

I just noticed that WordPress is not resizing images correctly: It would appear correct in the blog itself, but the IMG SRC tag would link to the original, unscaled image: This meant that the image was downloaded at the maximum size and scaled on the client side. I never really noticed this because modern PC’s – even my outdated one – have enough processing power to just do it on the fly and browsers use quality scaling filters that smooth out the pictures.

Still, it makes the site unnecessarily slow. After some investigation, I found out that it looks like WordPress uses 32MB of memory by default – and that’s really not much.

Editing your wp-config.php file, you can add the line:

define(‘WP_MEMORY_LIMIT’, ’96M’);

to increase the limit. I decided on 96MB for a start, but maybe 64MB will be enough for you – I’ll leave that to you.

Anyway, now WordPress scales images I upload correctly. It won’t fix older images, but I can live with the big pictures in my archives.

Postfix error – fatal: parameter “smtpd_recipient_restrictions”

I encountered this error when I added a check_sender_access clause to my smtpd_recipient_restrictions in postfixes “main.cf”:

fatal: parameter “smtpd_recipient_restrictions”: specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit.

I haven’t really checked, but I am guessing this is because smtpd_recipient_restrictions as the last clause isn’t specifically rejecting all mails that aren’t wanted, and so you risk turning your system into an open relay. I did as the error advised, adding reject_unauth_destination to my restrictions, and all was well.

Cube Root in OpenOffice

OpenOffice.org doesn’t seem to have any built-in functions for cube roots, but there’s an easy workaround. To find the nth root, use powers to the nth fraction. Probably easier to illustrate than to explain with my rusty math skills. 😉

I mean this:

You need to use the brackets because otherwise the power would take precedence over the division.