Walking Trip …

Walking Trip

Walking Trip

Offenbach's Suite ... Warts 'n All

Offenbach's Suite ... Warts 'n All

 📅  

If this was interesting you may be interested in this too.

Posted in Photography, Trips | Tagged , , | 34 Comments

AlmaLinux Apache Status Report Fail Tutorial

AlmaLinux Apache Status Report Fail Tutorial

AlmaLinux Apache Status Report Fail Tutorial

This morning, on 11/06/2026, we woke up to our RJM Programming’s AlmaLinux WHM and cPanel Apache Status report option, last talked about at AlmaLinux Apache Status Report Inspiration Tutorial, come up with the error …

Failed to receive status information from Apache.
Unable to connect to local httpd server.

… while there was nothing wrong with the HTTP Server (Apache) service which allows you to read this blog posting. Huh?! Well, we’re not sure what caused it, and if it becomes apparent down the line, we’ll probably add a Stop Press below, but what more interests is how to get that report back, because it is a very useful resource to us to see what content gels with users. And so, we asked of Google …

Failed to receive status information from Apache. Unable to connect to local httpd server.

It was very helpful information, thanks. We’d never “tweaked” …

  1. Server Configuration ->
  2.                         Tweak Settings ->
  3.                                           System tab ->
  4.                                                         Allow server-info and server-status … make sure includes 127.0.0.1 … and Save (as required)

… in any way, so definitely made for an interesting morning, reaching into these new configuration areas?!


Previous relevant AlmaLinux Apache Status Report Inspiration Tutorial is shown below.

AlmaLinux Apache Status Report Inspiration Tutorial

AlmaLinux Apache Status Report Inspiration Tutorial

Examining the RJM Programming’s Apache web server’s cPanel‘s …


Apache Status

… report, showing RJM Programming URL accesses in real time, can be very eye opening. Among recent surprises we got there were accesses ( regarding PHP $_SERVER[‘REQUEST_URI’] … ie. the stuff after www.rjmprogramming.com.au ) starting with …

Starting
with …
… then. Our initial response … The action we took …
/wiki/ Sai_Baba_of_Shirdi What the …? Who are those guys? Redirected to English
relevant Wikipedia webpage …
404.shtml (in Apache
Document Root) change …

function onPageLoad() {
if (document.URL.indexOf('/currency/') != -1) {
location.href='//www.rjmprogramming.com.au/PHP/country_currency_quiz.php#showcur=' + document.URL.split('/currency/')[1];
}

if (document.URL.indexOf('/wiki/') != -1) {
location.href='//wikipedia.org/wiki/' + document.URL.split('/wiki/')[1];
}

// rest of code follows
}
/currency/ lbp-lebanese-pound We’re officially gobsmacked! 404.shtml (in Apache
Document Root) change … then …
country_currency_quiz.php
(with this live run link),
featuring these changes

… that last one today’s work, borne out of Apache Status Fascination!

Making something out of nothing?! We’ve got nothing to lose, and we may surprise some user out there (perhaps just mucking around).

And so, with similar themes to HTML5 Time Tag Timeline AlmaLinux Debug Tutorial we set out to make something out of nothing here, and we’ve closely documented what we did regarding today’s animated GIF presentation.


Previous relevant HTML5 Time Tag Timeline AlmaLinux Debug Tutorial is shown below.

HTML5 Time Tag Timeline AlmaLinux Debug Tutorial

HTML5 Time Tag Timeline AlmaLinux Debug Tutorial

Another day, another use for (in our case Google Chrome web browser) web inspector functionality. Yes, even if the source of the issue is PHP (which we moved on from a CentOS starting with 5 version to an AlmaLinux version starting with an 8) we’re yet to see an issue that could not be resolved with the help of a clientside web inspector debugging arrangement. Of course, the simpler the PHP the more likely this is to happen, but we can’t emphasise enough how useful these web inspectors are.

Today’s case in point revisits the use_time.htm clientside web application we talked about at HTML5 Time Tag Timeline Tutorial. Moving to AlmaLinux, and revisiting it on trying …

… as a reason we should add to the list (of two we talked about at PHP Migration Software Strategies Tutorial) …

  • fgrep … preemptive approach … and/or …
  • error_log … reactive approach
  • examining Apache Status log every now and then … via (now AlmaLinux cPanel but used to also be on CentOS cPanel) Apache Status report we talked about at CentOS Web Server cPanel Apache Status Tutorial

… as a “what the users are trying” resource available for AlmaLinux (cPanel using) web masters to keep in touch with goings on … was fun.

The fix, again, was to do with our “assumptive” PHP5 associative array logics … will Nala ever learn?!

And so, though our Time Tag clientside web application did not change, the underlying Google Chart Timeline Chart interfacing timeline_chart.php‘s web application did!


Previous relevant HTML5 Time Tag Timeline Tutorial is shown below.

HTML5 Time Tag Timeline Tutorial

HTML5 Time Tag Timeline Tutorial

The recent HTML5 Time Tag Primer Tutorial introduced the time tag, an HTML5 initiative, into our frame of reference here at this blog. As soon as date and/or time come into the picture the “when” of life comes into focus, and the use of the fourth dimension. As such, this HTML time tag can be the launching pad for interfacing to other “when” based web applications we’ve developed here.

With this in mind we …

With changes like this it can be important to leave the door open for people to not access this new Timeline (in an HTML iframe element), in terms of backward compatibility “friendliness”, and we allow for that via either/both bold (part of) ways below …

But we are of the view that interfacing to other web applications with synergies is generally a good thing to do, and can inspire other ideas to develop regarding improvements to functionality.


Previous relevant HTML5 Time Tag Primer Tutorial is shown below.

HTML5 Time Tag Primer Tutorial

HTML5 Time Tag Primer Tutorial

You might be forgiven reading this webpage about the time tag introduced with HTML5 that it is not of much use, because it doesn’t show any distinguishing feature yet, in any of the web browsers.

But you can tailor the use of it yourself, and to show this we took the HTML lacking a <head></head> section and not change this HTML at all, but add our own CSS and Javascript (DOM) <head></head> section to embellish its functionality considerably.

We use a combination of …

  • CSS ::after { content: ‘blah blah’; } pseudo-element
  • CSS :hover selector
  • window.onload = init; // Javascript onload functionality
  • document.body.innerHTML+=styles; // Javascript where styles variable contains dynamically constructed <body></body> section CSS <style></style> (an important thing to remember you can do (at a document.body onload event Javascript function, for example)) … and for this we used …
  • dynamically classed HTML time elements and moving on the onclick event (for mobile device use) as per …

    times[iw].onclick = function() { };
    times[iw].className+=' atime' + iw; // the times array which is derived via

  • var times=document.getElementsByTagName('time');
  • to be able to dynamically populate that styles variable as per codelines like …

    styles=styles.replace("</style>"," .atime" + iw + ":hover::after { content: ' is " + sin(yyyy2,4) + "/" + sin(mm2,2) + "/" + sin(dd2,2) + " " + sin(hh2,2) + ":" + sin(minm2,2) + ":" + sin(ss2,2) + "'; } </style>");

Here is a link to some downloadable HTML programming source code which you may want to rename to use_time.html for this live run link.

Stop Press

If you were an “early bird” reading the early editions of this blog post, sorry, but you will have missed this, perhaps, and then again, maybe I am wasting my time pointing this out, but, since those early editions we’ve added a couple of iw links that harness some new functionality we have in our “highlighting” armoury (shall we say) making use of the new HTML5 mark tag, which we’ll be detailing more about in tomorrow’s blog posting. Clicking these links effectively does a web browser “View Page Source” type of functionality, but also highlights and positions (to first find), in situations like the “iw” one, where it is just a counter, but is unexplained, so we leave it up to curious users to find out something about its context.

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Networking, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , | Leave a comment

Home Assistant Primer Tutorial

Home Assistant Primer Tutorial

Home Assistant Primer Tutorial

We discussed some EV Charging ideas when we presented the recent Ocular EV Charging App RFIDs Primer Tutorial. That Ocular App functionality for home AC charging features three modes of use, those being …

  • Fast
  • Solar Assist
  • Solar

… that last one sounding ideal if you have solar battery storage at home, but in reality, the conditions of it’s usage have been a bit elusive for us to achieve yet this year. Perhaps the height of summer will see this different, but today, we’re pointing you to another idea we have not yet implemented ourselves, but known out there by a lot of people as a good generic idea regarding the control of your energy setup in a home environment, as our electrician gave us “the heads up” about. It’s a hardware and software product called …


Home Assistant

… as described …

Awaken your home
Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts.

… by this great not-for-profit enterprise.

We went researching and have come up with today’s tutorial animated GIF for your perusal, should you be interested.


Previous relevant Ocular EV Charging App RFIDs Primer Tutorial is shown below.

Ocular EV Charging App RFIDs Primer Tutorial

Ocular EV Charging App RFIDs Primer Tutorial

We recently got helped hugely acclimatizing to a new EV (electric vehicle) via a …

  • Solar Panel and Battery install to house … solar battery specialists …
  • EV Charging via Private Pole to house and grid … electrician …
  • EV Car … car sales specialist

… flurry of advice recently, leaving us with mobile apps for …

  • the house solar panels and battery
  • the car
  • the EV charger … it being today’s focus, and called the Ocular App, helping with AC (the top “trickle feed” slower (top car plug, and as you buy the EV Charger you get supplied the unsuitable lead) charging approach, as distinct from Evie App charging (oh, that makes four) at public charging stations where, hopefully available, is faster DC charging (the bottom car plug) many Australians will be getting a handle on this coming school holidays) …

Since then, the car people upgraded our car software in an indescribable set of steps … was this firmware?! Anyway, an ongoing matter of interest (it took us a month to address but read on) was the electrician leaving us with two RFIDs … these quite small rigid but smaller and fatter credit card …

… feeling do-dahs EV charging Plug and Charge precursor arrangements … in what you might categorize as a “security thaing”.

You’re probably getting the gist here …

Stick to the day job … software!

But luckily, yours truly gets inspiration in these “onboard hardware matters” from the gumption and fearlessness of my partner! Yayyy! So we found ourselves …

  1. at the iPhone open with the Ocular App with the RFIDs and the EV Charger while it was not charging, but near The Car when …
  2. the butler did it … no … at the Ocular App “My” tab …

    … tapped “My Card” option …
  3. tapped “Bind New Card” option
  4. filled in a new Card Name
  5. checked the Serial Number of the EV Charger serial number that appeared
  6. tapped “Bind” option …
  7. waved RFID card in front of front scanner (see image two down) … and the EV Charger beeped … and the app displayed “Success” … who’d have thought?!
  8. and this is where security might happen if … back at “Group” tab “EV Charger of interest” tap screen unchecked Plug and Charge

    … … meaning to charge you need to wave RFID card in front of front sensor …

    … of EV charger

… and so it made sense to associate car fob with the RFID card as per …

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Hardware, Installers, Networking, Software, Tutorials | Tagged , , , , , , , , , , , , , , | Leave a comment

Seek and Ye Shall Find Tutorial

Seek and Ye Shall Find Tutorial

Seek and Ye Shall Find Tutorial

We asked Google …


How can iOS differentiate a tap for focus from tap for click from an out of focus position.

… and received this reply …

iOS differentiates these three touch intentions (focusing, clicking, and interacting out-of-focus) by measuring touch duration, the presence of UI elements, and hardware-level gesture recognizers.

Here is how the system tells them apart:

Tap for Click:

Uses UIControlEventTouchUpInside (or equivalent gesture recognizers). A tap is registered when a finger touches and releases the screen in the same location over a button or active element. It fires an action instantaneously.

Tap for Focus: Uses long-press (touch-and-hold) gesture recognizers. If the finger is held down instead of immediately releasing, the system recognizes a “hold” rather than a click. In photography apps, for example, holding locks the focus distance (AE/AF Lock). In system navigation, this brings up the contextual menu.

Tapping Out of Focus: This occurs when a tap misses an interactive element. In iOS, a tap on “dead space” (a blank area) dismisses active elements (like the keyboard), cancels a focused state, or triggers continuous autofocus in the Camera app.

… which satisfied us. So, on a roll, we decided to ask Google …


How can iOS stop play when a phone call comes in and resume it when playing the media from a web browser app.

… and received this reply …

iOS is designed to automatically pause media playback when you receive a phone call. When the call ends, simply swipe down to open your Control Center and tap the Play button on the media controls widget.

Because browser-based media depends on the app’s specific site code to support system background audio, exact behavior can vary depending on the web browser (e.g., Safari, Chrome) and the website you are viewing.

… which satisfied us too.


How does a car's bluetooth speakers work out what media can be streamed through it's speakers, or not?

… and received this reply …

A car’s Bluetooth system determines what media can play by using a set of rules called Bluetooth profiles. When your phone and car connect, they trade a list of capabilities. If both devices support the profile for high-quality stereo music, media will stream. If the car only supports the profile for phone calls, music is blocked.

Bluetooth Profiles
A2DP (Advanced Audio Distribution Profile):
This is the main rulebook for streaming stereo music, podcasts, and high-quality audio. If your car stereo lacks A2DP, it cannot play media wirelessly even though it connects to your phone.HFP (Hands-Free Profile): This rulebook handles phone calls and voice commands using low-quality, single-channel audio. Many older cars have HFP for calls but lack A2DP for music.AVRCP (Audio/Video Remote Control Profile): This works alongside A2DP. It lets your car stereo send remote commands like play, pause, or skip track back to your phone.

Codecs and Compression
Codecs: Software like SBC or AAC acts as a translator. Your phone compresses the audio data into a small package using a shared codec. The car stereo receives the package and decodes it back into sound.Compatibility: Both your phone and car must agree on the same codec during the handshake process. If they cannot match a codec, streaming fails.

Why Some Media Works and Other Media Fails
Call vs. Media Separation:
Your phone treats phone calls and media apps as separate audio streams. You can be connected to the car for calls (HFP) while your phone fumbles media playback because the car denies the A2DP data stream.
App Settings:
Navigation apps like Google Maps have individual settings that force voice directions over a phone call profile or a media profile. If set incorrectly, instructions may fail to break through the car speakers

… which tripled our satisfaction. Then we asked …


Why would it be when you pass a fire station the radio signal disappears for a second?

… and received this reply …

Your car radio signal likely drops near a fire station due to local radio frequency interference (RFI) or receiver overload from high-powered emergency transmitters. [1] (https://www.firerescue1.com/fire-products/communications/articles/iaff-voice-radio-communications-guide-for-the-fire-service-section-2-basic-radio-communication-technology-RgQG1khps2pimfXd/), [2] (https://ham.stackexchange.com/questions/5133/why-did-i-lose-my-fm-radio-signal)

High-Power Transmitters: Fire stations often house base stations, dispatch antennas, or local repeaters that broadcast on high power to reach emergency crews. [1] (https://en.wikipedia.org/wiki/Radio_repeater), [2] (https://www.firerescue1.com/fire-products/communications/articles/iaff-voice-radio-communications-guide-for-the-fire-service-section-2-basic-radio-communication-technology-RgQG1khps2pimfXd/)

Receiver Desensitization: When you drive past, these strong local signals temporarily overwhelm or “overload” your car radio’s tuner. [1] (https://www.firerescue1.com/fire-products/communications/articles/iaff-voice-radio-communications-guide-for-the-fire-service-section-2-basic-radio-communication-technology-RgQG1khps2pimfXd/)

Signal Blocking: Large metal apparatus bays, reinforced concrete structures, or emergency vehicle electronics can also create a brief physical shadow or localized electromagnetic interference. [1] (https://www.reddit.com/r/explainlikeimfive/comments/40ll7l/eli5_why_do_you_lose_your_radio_signalfm_when/), [2] (https://antesky.com/what-are-the-interferences-to-radio-waves/)

… which quadrupled our satisfaction.

But there the roll ended, because we came upon a rock disguised as an island.

If this was interesting you may be interested in this too.

Posted in eLearning, Not Categorised, Tutorials | Tagged , , , , , , , , , , , , | Leave a comment

CSS Variables at the Root Level Tutorial

CSS Variables at the Root Level Tutorial

CSS Variables at the Root Level Tutorial

For us, to think …

CSS variables computes … is a lot harder to fathom and “more of a stretch” than …
Javascript variables computes

… but this is true, and it can be dynamic too, though we’re using Javascript to make it dynamic and using the …

:root

… CSS selector (globally to the whole webpage) repository to allow for this, when we wrote a simple proof of concept web application you can also try below with similarities to concepts to can read more about at the reecent CSS Variables Textarea Tutorial below.


Previous relevant CSS Variables Textarea Tutorial is shown below.

CSS Variables Textarea Tutorial

CSS Variables Textarea Tutorial

Today we’ve got a “proof of concept” CSS web application idea that is inspired by this W3school’s webpage, thanks, but adding user interaction functionality, regarding …


CSS @property variables

… bringing some Javascript feeling logic excitement to CSS styling smarts. You can try this user interactive approach with this first draft CSS @property variables web application …

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Tutorials | Tagged , , , , , , , , , , , , , | Leave a comment

CD Playing on Sonos Bluetooth Speaker Tutorial

CD Playing on Sonos Bluetooth Speaker Tutorial

CD Playing on Sonos Bluetooth Speaker Tutorial

Is playing CD (ie. compact disc) music, not via a streaming means, but using a CD player, dead?! We hope not, but the options to playing a physical CD are getting harder, because the range of mechanical CD players available seems to be dwindling.

But we’ve been trying out a CD player known as …


FIIO-DM13

… as you do, R2-D2, and you too, CP-O3 (needing repairs to feel better again).

Anyway, setting it up, we‘re not saying it was all plain sailing, but with perseverance regarding the supplied configuration instructions supplied, in what felt like “delayed pairing”, we got it talking to the same Sonos bluetooth speaker talked about at Spotify and Sonos Bluetooth Speaker Tutorial, which pleased us “more than somewhat”, though, exactly how much more … well …

Okay, just need some CD cleaning ideas (and throw in some car upholstery ideas), now?!


Previous relevant Spotify and Sonos Bluetooth Speaker Tutorial is shown below.

Spotify and Sonos Bluetooth Speaker Tutorial

Spotify and Sonos Bluetooth Speaker Tutorial

We can only sit back and admire the “hardware and networking and software aspects” to using a …

  1. Spotify music playing subscription iOS app software arrangement (paid for avoids advertisements) … played via Bluetooth through …
  2. Sonos (Era 100) single speaker

… combination of products. Once arranged, given we had the Spotify app and subscription organized already (as we alluded to with Spotify Bluetooth Speaker Volume Tutorial below), and that is pretty simple as far as Sonos goes (it’s Era 100 pamphlette describing it …

1 Connect the power cord
2 Download the Sonos app for setup

… and we did not find it much worse than that (even with our FOBP (“Fear of Bluetooth Pairing”) phobia)), any day or hour of listening is just a case of …

  • on our iPhone with the Spotify app associated with the subscription and used to set up the Sonos speaker (and we’re not even going into some additional Wi-Fi functionality available too) …
  • Settings -> Bluetooth … tap (hopefully) On >
  • as required, if Room Name (SONOS) “Not Connected” tap to make it “Connected”
  • open Spotify app
  • pick music to play and tap it’s icon …
  • tap the Play button (perhaps only this once, for the day (and as a sometime media interfacing iOS programmer, that is a feat!))

That’s it! But let’s just hope all those great and entertaining musicians are getting rewarded appropriately too.


Previous relevant Spotify Bluetooth Speaker Volume Tutorial is shown below.

Spotify Bluetooth Speaker Volume Tutorial

Spotify Bluetooth Speaker Volume Tutorial

Am wondering whether anybody else out there is like me and cannot commit to “day to day working memory” …

? Do you think I can nail that last step?! I mean, that last step confounds me every time! Maybe this blog posting can help me, and maybe you, to commit to memory, where on Spotify you can get to change the volume on those bluetooth speakers …


There's a bluetooth icon down near the bottom of the screen a little right of centre (with special consideration for people who think Spotify is all smoke and mirrors)

… which gets you to a draggable volume controller. Yayyyyyyyy!


Previous relevant Spotify Queue Album in Order Primer Tutorial is shown below.

Spotify Queue Album in Order Primer Tutorial

Spotify Queue Album in Order Primer Tutorial

Spotify has changed the way a lot of us listen to music online. The huge pull for its audience are the number of arrangements it has with music labels to be able to build a huge music repository publicly available online.

Using Spotify though, the easiest way to arrange the music playing is via a “Shuffle Play” of the songs of the sources you choose, whether that be by individual artist or podcast or album or genre. Some albums though, at least to our mind, are like a story, and they have been developed with a purpose or theme in mind, and as such, can be best played in the song order chosen by the artist or that artist’s agents, for that album. Don’t think there are any buttons as such for this on the Spotify app, today’s video showing the iOS app version on an iPhone. But this is possible, and the purpose of today’s tutorial is to talk about the Spotify “play queue” and in the process how to achieve this.

  1. Clear the existing queue first by …
    • Tap on song currently playing
    • Tap top right icon … shows songs on the queue
    • Check all the boxes on left
    • Tap “Remove” button at bottom left to clear the queue
    • Go back with down arrow top left icon tap
  2. Search for album name via bottom magnifying glass icon tap … type in album name in resultant textbox … go (swipe) down to Album section and tap the album
  3. Swipe to right on each song of that album in order … and a “Queued” message will briefly verify that operation
  4. Optionally choose more music to be queued up by returning to step 2 above
  5. Your choices will be played in that order after any currently playing song

Have a geek at this demonstrated by us, below …

We hope this might be of some use to some Spotify users out there! Happy listening!

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Hardware, Installers, Networking, Tutorials | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Bird Identification via Merlin Bird ID App Tutorial

Bird Identification via Merlin Bird ID App Tutorial

Bird Identification via Merlin Bird ID App Tutorial

Here, in Australia, a study of the Wallace Line explains a lot why we have a proliferation of birds. The Bird Quiz Peerage Tutorial below is inspired by the birds my sister sees up in south-eastern Queensland, for instance.

We’re hearing the “ornithology thing” is catching on with the younger crowd here in Australia, too, which is encouraging, because it is “Citizen Science” that might help push things along ecologically, in the right direction, as far as educating us all, we’re thinking.

A great mobile app we’ve come across, in this regard, is the …


Merlin Bird ID

… app (we’re accessing on an iPhone) by Cornell Lab. We’ve been using it our way to identify birds via their bird calls, though the app admits to only knowing 66% of them … but budding “Citizen Scientists” are informed on the app about how they can help improve that figure. Anyway, today’s animated GIF presentation gives a feel for some of this.

Did you know?

Fancy a fat bear?! Fancy voting about your favourite fat bear?!!


Previous relevant Bird Identification via Merlin Bird ID App Tutorial is shown below.

Bird Quiz Peerage Tutorial

Bird Quiz Peerage Tutorial

There are a couple of “peerage moves” we like for their simplicity around here, they being toggling between …

  • the just about totally equivalent [webApplicationName].html and [webApplicationName].htm usages … and/or …
  • the just about totally equivalent [imageFileName].jpg and [imageFileName].jpeg usages (starts with latter, with no local knowledge shown and Javascript DOM changes to former, after quiz questions all touched upon)

… and today, further to yesterday’s Bird Quiz Primer Tutorial, for the first time we can remember both feature in today’s work to set up a “couple of Bird Quiz” peers we allow either to call on the other via a user dropdown element onchange …


function changeit(osel) {
if ((document.URL.split('?')[0].split('#')[0] + '#').indexOf(osel.value + '#') == -1) {
location.href=osel.value;
}
}

… event function based on a new dropdown (ie. select element) …


<select size=2 onchange=changeit(this);><option value='bird_quiz.htm' selected>Out and About</option><option value='bird_quiz.html'>Bird Bath</option></select>

… which swaps around in option order for the other peer. Very simple means of extending functionality in the image map form (and thanks to mobilefish here) involving my sister’s great photography again, thanks, of the changed bird_quiz.htm‘s Bird Quiz you can try, again, below …


Previous relevant Bird Quiz Primer Tutorial is shown below.

Bird Quiz Primer Tutorial

Bird Quiz Primer Tutorial

In Australia, a lot of our wildlife is of the bird variety, and you may want to research the Wallace Line for further research into why this is the case. The variety of birdlife can be tremendous, even in urban areas.

My sister lives in a great part of Australia for birdlife, and thanks to her great photography, and, no doubt, patience, today’s new …


Bird Quiz

… game asks quite a bit of the user as far as identifying (today’s fast and small) birds goes, but there are lots of Australians into ornithology, as, no doubt, in other parts of the world.

We’ve based the game on an image in a form without the local knowledge, and if the user completes the quiz, revealing that local knowledge, in the image map form (and thanks to mobilefish here) of bird_quiz.html‘s Bird Quiz you can try below …

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

Posted in eLearning, Hardware, iOS, Networking, Software, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , | Leave a comment

Python Matplotlib Chart Sharing Tutorial

Python Matplotlib Chart Sharing Tutorial

Python Matplotlib Chart Sharing Tutorial

Our Python Matplotlib More Involved Charts Tutorial‘s Python Matplotlib module accessing PHP web application is full of URLs featuring ? and & argumented parts via it’s use of an HTML form method=GET paradigm. As such, it is straightforward to add some …

  • email … or …
  • SMS

… based “a” link means to sharing user defined Python Matplotlib module based chart data with recipients …

<?php echo ”

<a target=_blank onclick=\"document.getElementById('aemailsms').href='mailto:?subject=" . str_replace('+','%20',urlencode($chartname)) . "&body=' + encodeURIComponent(document.URL); document.getElementById('aemailsms').click();\" id=aemail title=Email>&#128231;</a> <a target=_blank onmouseover=\"if (smsee.length == 0) { smsee=prompt('Please enter SMS number to send to.', ''); if (smsee == null) { smsee=''; } else { document.getElementById('aemailsms').href='sms:' + smsee + '&body=' + encodeURIComponent(document.URL); document.getElementById('aemailsms').click(); } }\" id=asms title=SMS>&#128223;</a>
<a target=_top id=aemailsms href='mailto:' style='display:none;'>Email or SMS</a>

“; ?>

We did most of the work, yesterday, on a short foray into some CSS styling, on this project, via …

<?php echo ”

<style>
input[type=submit]:focus { border: 4px dotted green; }
input[type=submit] { border-radius: 20px; padding: 7 7 7 7; }
input[type=text] { width: 98%; border-radius: 120px; padding: 7 7 7 7; background-color: #fafafa; }
textarea { width: 98%; border-radius: 5px; padding: 7 7 7 7; background-color: #fafafa; }
select { width: 60px; border-radius: 6px; background-color: #f0f0f0; }
</style>

“; ?>

… where, also, in the changed pie_chart_python.php PHP Python Matplotlib Chart Interfacing web application you can also try below, we decided textarea elements should replace those input type=text textboxes presented when the form has the device screen to itself. Those textarea elements have a great feature where their resizing talents are infectious when a few textarea elements are adjacent to each other!


Previous relevant Python Matplotlib More Involved Charts Tutorial is shown below.

Python Matplotlib More Involved Charts Tutorial

Python Matplotlib More Involved Charts Tutorial

Further to yesterday’s Python Matplotlib Yet More Charts Tutorial‘s simpler Python Matplotlib module chart type interfacings today it was more involved with the new …

  • Sankey Chart
  • Bubble Chart
  • Timeline Chart
  • Histogram Chart

… in …

We hope you start trying these charts out for yourself!


Previous relevant Python Matplotlib Yet More Charts Tutorial is shown below.

Python Matplotlib Yet More Charts Tutorial

Python Matplotlib Yet More Charts Tutorial

We’ve had a day of grappling with reality sizing up yesterday’s Python Matplotlib More Charts Tutorial‘s …

… interesting in that the difference between the presentation of various chart types amounts to a couple of lines of Python code, in essence …

… assertion, and yes, as with today’s changes, some Python Matplotlib module chart type interfacings do only involve a couple of lines of code that change, and this amounts to today’s forward progress, but some other chart interfacings are more involved and we’ll be trying into the future … doh!

Today, we, in addition to Pie Chart and Bar Chart and Column Chart interfacing, are introducing Matplotlib module chart type interfacing to …

  • Scatter Chart
  • Pseudocolour Chart
  • Hexbin Chart
  • Stairs Chart
  • Stem Chart

… in …


Previous relevant Python Matplotlib More Charts Tutorial is shown below.

Python Matplotlib More Charts Tutorial

Python Matplotlib More Charts Tutorial

We doubt you’ll meet many programmers not interested in “peer to peer” software suite arrangements. Thinking about Python Matplotlib module, of course, “peer to peer” becomes interesting in that the difference between the presentation of various chart types amounts to a couple of lines of Python code, in essence.

With that in mind, we think to rewrite wholly fleshed out new code file pairs consisting of …

  • a Python code file specializing in creation of a display of a particular Matplotlib module chart type … supervised by a …
  • PHP supervising code file specializing in helping Python code file creation of a display of a particular Matplotlib module chart type

… for any one newly considered Matplotlib module chart type sounds like “too much hard work”. Why not add intelligence to that original Pie Chart code file pairing Python and PHP set and work off that? We came up with this idea, and it came to fruition.

And so, that is the long answer to yesterday’s question as to whether our …

strange idea

… would work?! The short answer …

Yes … the strange idea worked

… in the new workflow to getting up a new Matplotlib module chart type into the mix of our “peer to peer” web application software suite …

  1. clone these two crontab records …

    ksh -c 'for i in `find /home/rjmprogr/public_html/Python -name "piechartpython_*.py"`; do /usr/bin/python3 $i ${i##*/} /home/rjmprogr/public_html/Python/ ; done'
    ksh -c 'for i in `find /home/rjmprogr/public_html/Python -name "piechartpython_*.py"`; do rm -f "$i"; done'

    ksh -c 'for i in `find /home/rjmprogr/public_html/Python -name "plot_*.png" -mmin +122`; do rm -f "$i"; done'
    ksh -c 'for i in `find /home/rjmprogr/public_html/Python -name "output_image_*.png" -mmin +122`; do rm -f "$i"; done'

    … to new ones, for the example of a Column Chart …

    ksh -c 'for i in `find /home/rjmprogr/public_html/Python -name "columnchartpython_*.py"`; do /usr/bin/python3 $i ${i##*/} /home/rjmprogr/public_html/Python/ ; done'
    ksh -c 'for i in `find /home/rjmprogr/public_html/Python -name "columnchartpython_*.py"`; do rm -f "$i"; done'

  2. make the coding changes … as per …
    the changed pie_chart_python.py Python … brought in a new Bar Chart …
    the changed pie_chart_python.php PHP … helped bring in a new Bar Chart
    … but then, thinking on it …
    the changed pie_chart_python.py Python … brought in new Column and Bar Charts (in their traditional guises) …
    the changed pie_chart_python.php PHP … helped bring in new Column and Bar Charts (in their traditional guises)
  3. and then … yay!!!! … the time saver … Linux web server command line soft links to the rescue again …

    cd /home/rjmprogr/public_html/Python
    ln -s pie_chart_python.py bar_chart_python.py
    ln -s pie_chart_python.php bar_chart_python.php
    ln -s pie_chart_python.py column_chart_python.py
    ln -s pie_chart_python.php column_chart_python.php

    … to add onto the existant Matplotlib module Pie Chart coding, as of yesterday’s Python Matplotlib Pie Chart Labels Tutorial, interfacing now for Matplotlib module Bar Charts and Column Charts, where the logic for the new dropdown “peer to peer” links all happening via …

    file naming conventions

    … getting both Python and PHP to code differentiate chart types via what appears as the action URL/file name on the address bar/command line.

    Feel free, as such, to try the Pie Chart++ (now public) web application you can also try below.


    Previous relevant Python Matplotlib Pie Chart Labels Tutorial is shown below.

    Python Matplotlib Pie Chart Labels Tutorial

    Python Matplotlib Pie Chart Labels Tutorial

    Today, further to yesterday’s Python Matplotlib Pie Chart PHP Crontab Tutorial‘s Pie Chart via Python Matplotlib “guinea pig” phase, fleshing out Pie Chart labelling …

    … begging the question …

    Guinea pig to what?

    Do you cavye in?! Chortle, chortle. Well, our answer is …

    Cater for lots of other chart types Python Matplotlib can help interface to.

    … and we have a bit of a strange idea we want to try regarding this, while today’s second “not so strange” task preparatory work was to “abstract” the term “Pie Chart” and associated phrases out of being hardcodings to be a derivative of what URL is showing in the web browser address bar. Even if our “strange idea” disappoints, and we’ll let you know tomorrow, we think, we’d want to embark on this genericization anyway, the Earth being the distance away from Mars and Venus the way it is. As such …

    … are definitely worth a peruse.


    Previous relevant Python Matplotlib Pie Chart PHP Crontab Tutorial is shown below.

    Python Matplotlib Pie Chart PHP Crontab Tutorial

    Python Matplotlib Pie Chart PHP Crontab Tutorial

    Onto yesterday’s Python Matplotlib Pie Chart Primer Tutorial‘s work …

    • further to local Apache/PHP web server, like MAMP, PHP understanding and supervising a Python Matplotlib module based Pie Chart web application … today …
    • extending that PHP meets Python theme on the public RJM Programming we involve …
      1. updated PHP … to suit the use of …
      2. crontab …

        ksh -c 'for i in `find /home/rjmprogr/public_html/Python -name "piechartpython_*.py"`; do /usr/bin/python3 $i ${i##*/} /home/rjmprogr/public_html/Python/ ; done'
        ksh -c 'for i in `find /home/rjmprogr/public_html/Python -name "piechartpython_*.py"`; do rm -f "$i"; done'
        ksh -c 'for i in `find /home/rjmprogr/public_html/Python -name "plot_*.png" -mmin +122`; do rm -f "$i"; done'
        ksh -c 'for i in `find /home/rjmprogr/public_html/Python -name "output_image_*.png" -mmin +122`; do rm -f "$i"; done'

        … means to run Python code where new arguments add image file folder and IP address personalization parts so that users do not stumble on other user Pie Chart specifications

    … all still dealing with a minimalist Pie Chart we’ll add complexity to into the future with …


    Previous relevant Python Matplotlib Pie Chart Primer Tutorial is shown below.

    Python Matplotlib Pie Chart Primer Tutorial

    Python Matplotlib Pie Chart Primer Tutorial

    We’re off on a new discovery tour regarding …

    • Python … as a programming language, and it’s module …
    • Matplotlib
    • … starting down this road with a simple …

      • command line Pie Chart application … Python pie_chart_python.py (superceeding this) …

        # pie_chart_python.py
        # September - 2026
        # RJM Programming
        # Thanks to https://www.w3schools.com/python/default.asp

        import os
        import matplotlib

        # Set backend to Agg before importing pyplot
        matplotlib.use('Agg')

        import matplotlib.pyplot as plt
        import matplotlib.image as mpimg

        import numpy as np
        #import plotly.express as px
        from PIL import Image

        nums = []
        sofar = 0

        if len(nums) <= 0:
        while sofar < 100:
        print(f"Enter your percentage value regarding a pie chart where so far {sofar} has already been allocated.")
        anum = input()
        nums.append(int(anum))
        sofar += int(anum)

        y = np.array(nums)

        fig, ax = plt.subplots()

        ax.pie(y)

        fig.savefig("plot.png")

        # 1. Load the image
        img = mpimg.imread('plot.png')

        # 2. Process or manipulate the image (Optional)
        # For example, let's look at the shape or apply changes
        #print(f"Image shape: {img.shape}")

        # 3. Create the plot without displaying it
        plt.imshow(img)
        plt.axis('off') # Hide axis lines and labels

        # 4. Save the result to a file instead of showing it
        plt.savefig('output_image.png', bbox_inches='tight', pad_inches=0)
        plt.close()

        # Open the PNG image file
        #with Image.open("plot.png") as img:
        # Display the image using your system's default viewer
        #img.show()

        # Optional: Load the data into memory so you can safely close the file
        #img.load()

        exit()

        … and …
      • working on our local Apache/PHP MAMP web server (only, so far, the reason being our public web server has no graphical $DISPLAY existant, and so the plt.show() Python codeline cannot be used, so we need to think more on integrations there) … PHP pie_chart_python.php …

        <?php
        // pie_chart_python.php
        // RJM Programming - September, 2026
        if (php_sapi_name() === 'cli') {
        $command = '/usr/local/bin/python3 ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'piechartpython.py'; // Your command
        if (1 == 1) {
        exec($command);
        } else {
        // Open the process pointer for reading
        $handle = popen($command, 'r');

        if ($handle) {
        // Read and output the buffer until the end of the file
        while (!feof($handle)) {
        echo fread($handle, 2048);
        flush(); // Send it to the browser immediately
        }
        pclose($handle);
        }
        }
        exit;
        } else if (strpos(str_replace('?','',$_SERVER['QUERY_STRING']), '&') === false) {
        $waspy=file_get_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pie_chart_python.py');
        if (strpos($waspy, "nums = []") !== false) {
        if (isset($_GET['array'])) {
        file_put_contents(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'piechartpython.py', str_replace("nums = []","nums = [" . str_replace('+',' ',urldecode($_GET['array'])) . "]",$waspy));
        }
        }
        //exec('php ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . 'pie_chart_python.php > /dev/null 2> /dev/null');
        exec('cd ' . dirname(__FILE__) . DIRECTORY_SEPARATOR . ' ; /Applications/MAMP/bin/php/php7.4.33/bin/php -n ./pie_chart_python.php > /dev/null 2> /dev/null ; open ./plot.png');
        sleep(3);
        }
        echo "<html><body style=\"background:url(./plot.png);background-repeat:no-repeat;background-size:contain;\"></body></html>";
        ?>

      … allowing a web browser address bar URL such as …


      http://localhost:8888/pie_chart_python.php?array=12,5,1,68

      … working for us, here, locally, displaying a Pie Chart …

      … via our local Python3 Matplotlib modularized environment.

      Did you know?

      Your installer for Python modules is likely to be one of, for the example of matplotlib module …


      pip install matplotlib

      … or …


      pip3 install matplotlib

      … corresponding to whether command line …


      python pie_chart_python.py

      … or …


      python3 pie_chart_python.py

      … works for you at your local system command line.

      If this was interesting you may be interested in this too.


      If this was interesting you may be interested in this too.


      If this was interesting you may be interested in this too.


      If this was interesting you may be interested in this too.


      If this was interesting you may be interested in this too.


      If this was interesting you may be interested in this too.


      If this was interesting you may be interested in this too.

Posted in eLearning, Event-Driven Programming, Operating System, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment