Posts

Facebook login to hosting provider not work

Image
 I could not login into my hosting provider, Hostinger, with my Facebook login. Facebook gave the message: 'Facebook Login is currently unavailable for this app'. It seems this is because Facebook needs to verify Hostinger as a business. Codepen.io and Pinterest also stopped offering Facebook logins. When I created my acoount on Hostinger, I used a Facebook login because I had previously created an account with Hostinger using just my email address. I got around this problem by resetting the password for my email address on Hostinger. When I logged in, I could manage the website I had created with the Facebook login. Unfortunately, now when I login, Hostinger says this is a suspicious login and wants a verification code sent to my email address.   Instead I set up a login using my Google account.I used Hostinger's settings to set this up.

Payment declined for web hosting provider

Image
 My debit card company declined to pay a renewal of my hosting plan with Hostinger. The text message with the code did not come at all to start with. When the code came, Hostinger seemed to think the transaction had not succeeded. Then I got a text message from my bank saying they thought the transaction was a scam and asked me to reply 'Y' to confirm the transaction. But this was several minutes after the transaction seemed to fail with Hostinger. My bank said to first check my bank account to see if the money had been debited before trying to pay again. Hostinger automatically renews all its hosting plans. I found this out in the detailed terms and conditions. Maybe I had forgotten this or never knew. Hostinger had been asking me to update my payment details for a while and sent a email saying the auto-renewal would happen in a week or two, about two weeks before the end of my hosting plan. The terms and conditions said there was an option in the settings to stop the auto-ren...

Falling asleep while coding

Image
 I try to move around if I am falling asleep in the evenings while coding. At first, I wrongly tried having a nap. I drink lots of decaffeinated tea when coding.  Normal tea makes my anxiety worse. I tried hot milk for a while. I like Yorkshire tea.

Setting the 'class' of an SVG element

Image
 I could not set the 'class' of an SVG element using the 'className' property in JavaScript. For example:     var bfyvSVG =              document.createElementNS('http://www.w3.org/2000/svg', 'svg');     bfyvSVG.id = 'bfyvSVG';     bfyvSVG.className = 'bfyvSvg-defs'; One answer is to use 'setAttribute':     bfyvSVG.setAttribute("class","bfyvSvg-defs"); I found the answer on 'stackoverflow.com':     stackoverflow.com/questions/37943006/unable-to-change-class-name-of-svg-element For an SVG, 'className' means something a little different. I could have used 'className.baseVal'

Draw ellipses with 'border-radius'

Image
 You can draw ellipses and other curved shapes by giving two values to 'border-radius' in CSS. For example:      border-radius: 50% 49% 40% 40% /                     45% 45% 45% 45%; The first set of values are horizontal radii and the second are vertical radii. This is used in a Github icon that I adapted. See:       https://codepen.io/Bert-Beckwith/pen/yyNYeZm The border-radius value above is used for the head which has an 'aqua' color.

Old copies of Progressive Web Apps

Image
 If a webpage is a 'Progressive Web App' (PWA) then someone may have an installed copy of the webpage that is old. I copied some images into a sub-directory to try to speed up the access time. But I cannot remove the original images from the top directory because an old PWA might use the original images. So it is just a little bit slower accessing the new copies of the images in the sub-directory. I tell Chrome the webpage is a PWA by registerng a 'do-nothing' service-worker.  Chrome warns about having a 'do-nothing' service-worker as it needs to be loaded which takes time. 

One-person projects

Image
 I have been developing my game for fifteen years. I only spend a few hours a day on it, at most.  I mostly add animations which are fun and where you can soon see the results. In the early days I had a clear objective: to learn the language and have something to show for it. Now, I do it because I find it calming. The editor of 'osnews.com' said that most people working on one-person operating-system projects lose interest after a few years.