Wordpress site with timer that works in preview but not when published - preview

I have a timer script (see it working standalone at http://pointy-end.com/timer/timer.php)
that I have copy/pasted into customloop.php. It works fine when the post is previewed, but when published it's no longer possible to select a time (3,5,10 minutes) to kickstart it.
I'm a newbie, and I can't figure out why this would work in preview but not when published.
I've disabled all my plugins (except for Single Post Template, Jetpack by WordPress.com,PHP Code for posts & WP Super Cache.
You can see it NOT working at http://pointy-end.com/image-writing-prompt-may-24/
I'd REALLY appreciate some help. Thanks guys, Cheryl

Related

Electron Remote Upgrade Issue

I have a working Electron app which I wrote about two years ago. I'm not an employee of a company, but just some guy that wrote an app that a few people use to make the world a better place. Anyway, I need to make some changes to the app but my computer crashed a while back so I downloaded my old code from Github onto my new computer and started to get to work. But immediately I found the app wouldn't work in the new 17.0.0 version of electron because the REMOTE module in Electron was deprecated and then removed in previous versions. I tried to follow the instructions here... https://www.npmjs.com/package/#electron/remote?activeTab=readme to replace REMOTE with the new #electron/remote module. I've had several problems, my most recent is:
JavaScript Error: Uncaught Exception: TypeError BrowserWindow is not a constuctor at app.createWindows (C:...\main.js:89:17).
I use the remote functionality (properties?) over 50 times in my app, including .dialogue, .getGlobal, .getCurrentWindow, and .BrowserWindow.getAllWindows
I'm not including my code here because I'm not really looking for a a coding solution (unless that's the easy/best/only thing I should do and you can give me a solution from the information I've written) but more general advice on what direction I should go to solve this problem. I'm a good programmer in a language that is not Electron, or JavaScript, or NodeJS! So, with the right instruction I can get by, but please be easy on me. (For example I get lost in the instructions for #electron/remote around the API Reference section.) Thanks for any help you can provide.
Mike
Some big changes have been made to Electron over the past couple of years, especially with the use of remote. I would hate to say it but it looks like you are in for a bit of work to get it operational again.
You will want to look at ipcMain, ipcRender and contextBridge.
The inclusion of webPreferences: {preload: ""} in your new BrowserWindow() method plus the use of the above Electron methods will place you in a good starting position for safe, quick, thread seperated code.
See Context Isolation and Inter-Process Communication for more info.
PS: If you need a quick bit of code to get you going / give you an idea then let me know.

Developing an API project

I recently created a project and the scripts were working fine.
Then the stopped loading the requests.
I looked at my dashboard to find there were several days with 10,000+ queries
which didn't make any sense.
I created a new key and restricted access to the IP only.
I changed the key on all of my scripts and it still does not display like it was.
Any suggestions about what to try next?
Thanks

Today suddenly: Java live reload unavailable

I had been happily using Java live reload while debugging my Vaadin application over the past few months.
Today, after I started my browser and directed it to my locally running Vaadin application I got a popup in the lower right corner stating:
Java live reload unavailable. Live reload for Java changes is currently not set up. Find out how to make use of this functionality to boost your workflow. Read more
Clicking onto the read more link (pointing to 'https://vaadin.com/docs/v14/flow/workflow/workflow-overview') just brings me to a "404 Page Not Found" error page.
So - two or actually three questions:
what could cause my live-reload functionality go missing? I am using MS Edge and the Live-reload plugin is enabled (and it used to work until yesterday).
where has the page gone explaining how to set that up?
and finally: Any idea, what to check or fix to get this working again? I consider that pretty essential functionality for efficient UI development!
For question 2, you can find the documentation here: https://vaadin.com/docs/v14/guide/live-reload

Why does the angular-material `Getting Started` example not actually work?

Is it just me, or is the angular-material "Getting Started" example broken?
On that page (link above), there's an inline codepen to show using angular-material. But the demo doesn't work! (In particular, I don't see a button to collapse the sidebar.)
Since I used this example in my started project, I spent quite some time troubleshooting it -- to no avail. Then, I realized the example itself it may be broken. And sure 'nuff, it is!
Does anyone know what the actual bug is, so I can work around it on my test app? It must have worked at some time; but I can't figure out why it's broken now.
Thanks!
That particular pen is working fine for me but I have noticed a few are not working, and it's due to the angular-material.js link being incorrect in the dependencies (under the pen's settings) the link provided redirects to the CSS.
This is intentional - the sidebar only becomes collapsable on smaller screens and is open on larger screens. Shrinking your browser window will show the collapse button.
That being said, the Getting Started page is definitely in need of an update. It is a good guide for a basic page structure, but the individual demo pages will be a lot better if you're looking to try out some of the components. (Every demo has a CodePen link to open an editable version.)

django admin not showing project

Hi I'm sure i am doing something dumb! Fairly new to django and pycharm. I am learning by writing two projects: the tango with django one and another to test ideas and learning (about old girlfriends!).
I am working on the rango project. I've scheme-migrated, syncdb, migrate, debugged and no errors. But when i run server, the admin page shows the other project only. I have not worked on it today.
As far as I can tell I have all the right code including registering the models and admin.autodiscover plus i have cleared the cache.
SO the question is: which projects does it show on the admin page - all? How does it know?
Final odd point the windows circle on the site admin tab is still going round as though its looking for something else.
Many thanks for help. I haven't pasted any code as not sure what would be helpful.
I eventually realized that the admin server was still running. As laptops don't have a ctrl break key (and i couldn't find my Samsung mapping) i killed the server using task manager and all was fine.

Resources