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

Clairvoyance Game Waiting Tutorial

Clairvoyance Game Waiting Tutorial

Clairvoyance Game Waiting Tutorial

The recent Clairvoyance Game Objectify Tutorial work is revisited today, with the news that we’ve introduced …

implied invitations

… when the user enters a “player name” (looking a lot like an IP address) from that list of “potential players online” that is not any form of their own IP address player name. It will be apparent to regular readers that this methodology was intended to be the “usual methodology” at the beginning of our project, and so “we’ll allow a leave pass” for you to ask …

How come this took so long?

And then we’d say …

Huh?!

And there you go! Just “keep those cards and letters” flowing in!

So what do we mean by “implied invitations”? Well, in between a user “Wait” answer and the next, any other user can ask to play that waiting user, and the next time out of the prompt window they may find they’re in the midst of a game of some sort, invited by another player. We hope this does not offend?!

The concept of a “formal invitation” still exists for the email or SMS collaboration conduits, we hasten to add.

And so “day ?whatevvvvvvvvvvveeeeerrrrrrrr” got us to …


Previous relevant Clairvoyance Game Objectify Tutorial is shown below.

Clairvoyance Game Objectify Tutorial

Clairvoyance Game Objectify Tutorial

Extending yesterday’s Clairvoyance Game Sharing Scores Tutorial, it’s not exactly OOP (Object Oriented Programming) we are doing, but what we’d describe as “objectify” the proceedings we’re attending to today. Take a look at the following Javascript initialization code (now versus before) …


var zener_cards=['/circle_yellow.jpg#circle_yellow','/cross_red.jpg#cross_red','/waves_blue.jpg#waves_blue','/square_black.jpg#square_black','/star_green.jpg#star_green'];

var theword='Clairvoyance';
var thenoun='Zener Card';
var theelem="<img style='object-fit:contain;' src=";
var thewords=['Clairvoyance', 'Fruit', 'Food'];
var theelems=["<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src="];
var theihs=[">", ">", ">"];
var thenouns=['Zener Card', 'Fruit', 'Food'];
var theiw=(document.URL.indexOf('itype=') != -1 ? eval(-1 + eval('' + document.URL.split('itype=')[1].split('&')[0].split('#'))) : 0);

var ppsuff='';
var youare='';
var otheris='';
var score=0, goes=0;
var woois=null;
var pick=-1, awaiting=false, holdon=false;
var bihnull=true;
var anchor=null;
var initval='';
var lastafterscore='';
var wherewrong=false;
var sharemyscore=false, allowsdone=false;
var zcblurb=' You can enter ? to find out more about the history of Zener Cards. ';

if (theiw > 0) {
zcblurb='';
document.title=document.title.replace('Clairvoyance ', thewords[theiw] + ' ');
if (thenouns[theiw] == 'Food') {
theelems[theiw]='<button style=font-size:100px; title=';
theihs[theiw]='>';
zener_cards[0]+='|&#x1f35b;';
zener_cards[1]+='|&#x1f371;';
zener_cards[2]+='|&#x1f358;';
zener_cards[3]+='|&#x1f359;';
zener_cards[4]+='|&#x1f363;';
} else if (thenouns[theiw] == 'Fruit') { // '127825', '127825', '127818', '127827', '127821'
theelems[theiw]='&lt;button style=font-size:100px; title=';
theihs[theiw]='&gt;';
zener_cards[0]+='|&#127817;';
zener_cards[1]+='|&#127825;';
zener_cards[2]+='|&#127818;';
zener_cards[3]+='|&#127827;';
zener_cards[4]+='|&#127821;';
}
}


var sideas=['Awaiting Other Player Choosing a ' + thenouns[theiw] + ' to Guess','Select the ' + thenouns[theiw] + ' Your Player Partner Selected','Select a ' + thenouns[theiw] + ' You Are Asking Your Player Partner to Guess','Awaiting Guess from Your Player Partner','Awaiting a ' + thenouns[theiw] + ' Selection from Your Playing Partner'];

… helping build up HTML for a new dropdown (versus what was there before) …


function multimaybe() {
var selbit='', jsel=0;
if (eval('' + thenouns.length) > 1) {
selbit="<sup><select style=width:30px; onchange=\"if (eval('' + this.value) != eval(1 + eval('' + theiw))) { location.href=document.URL.split('?')[0].split('#')[0] + '?itype=' + this.value; }\"><option value=" + eval(1 + theiw) + ">?</option></select> </sup> ";
for (jsel=0; jsel<thenouns.length; jsel++) {
selbit=selbit.replace('</select>', '<option value=' + eval(1 + jsel) + '>' + thewords[jsel] + ' Game</option></select>');
}
}
return selbit;
}

… and then later within the HTML <body> section …


<script type=text/javascript>
document.write("<h1 id=muh1>" + thewords[theiw] + " Game " + multimaybe() + "<input type=checkbox id=allows style=display:none; onchange=chscal(this);><font size=1 id=fshare style=display:none;>Share Score</font></input> <input type=checkbox id=allowstwo style=display:none; onchange=chscaltwo(this);><font size=1 id=fsharetwo style=display:none;>Be Told Where You Went Wrong</font></input></h1>");
</script>

… and am sure you can see where an initial “Clairvoyance” noun “hardcoding” feel of logic gets expanded to an “array of nouns” (where lots of programmers will immediately shout “objects”), as an alternative way of thinking to the ways our Javascript functions are like “verbs”. If you “abstract” the “what was a hardcoding” into “a dynamically selectable list of nouns” this objectifying process can be quite useful.

And so “day six” got us to …


Previous relevant Clairvoyance Game Sharing Scores Tutorial is shown below.

Clairvoyance Game Sharing Scores Tutorial

Clairvoyance Game Sharing Scores Tutorial

Onto the day before yesterday’s (yes, another two dayer!) Clairvoyance Game Invitations Tutorial primarily we have a checkbox part regarding …

  • Be Told Where You Went Wrong … guessing within our two player Clairvoyance Game … easy peasy … but …
  • Share Your Score … was really difficult … go figure …

… though the latter did ask a lot regarding timing and the sleep patterns of the PHP interlocutor … ?

Let’s just “move on” … shall we?!

Also on the agenda was some colour coding … and who doesn’t like a bit of colour coding! We purloined CSS into play, with “the kind of kludgy / kind of cute (well, you had to be there)” introduction of a title attribute to the status wording element and then apply that CSS …


<style>
#tdstatus[title^='Awaiting Other '] {
border: 3px solid red;
}

#tdstatus[title^='Awaiting a '] {
border: 3px solid rgb(127,0,0);
}


#tdstatus[title^='Awaiting Guess '] {
border: 3px solid orange;
}

#tdstatus[title^='Select the '] {
border: 6px solid lightgreen;
}

#tdstatus[title^='Select a '] {
border: 6px solid green;
}

$tdstatus { padding: 5 5 5 5; }
</style>

We often find it the way, when it comes to colour coding, we borrow from “the traffic light creed” regarding the colours used, where a reddish colour means “hang on” and a greenish colour is an invitation to the user. One could also think of “beeps” or “notifications” here, but not with us here, as of yet.

And so “day four” and “day five” saw …


Previous relevant Clairvoyance Game Invitations Tutorial is shown below.

Clairvoyance Game Invitations Tutorial

Clairvoyance Game Invitations Tutorial

In yesterday’s Clairvoyance Game Tutorial, with our Clairvoyance Game, really a game for two, downplayed invitations to the end of the blog posting blurb. But really, invitations are the “be all and end all” for a two player game shared over the Internet and just using a “PHP and HTML/Javascript” level of sophistication.

And, of course, two days later (when we think it should have only been “one day later”), it might be me, but making this work for email or SMS invitations was not trivial, partly because …

  • we launched into this “phase two public invitational sharing” on a false premise … our “phase one window.open and window.opener” Javascript logics were flawed (further into the logic than the first foray, shall we say) … bad news … we reckon one out of two days “getting there” would have to be put down to the lack of testing on day one … whereas …
  • our thought that “phase two” is just phase one window.open and window.opener transfers to PHP writes Javascript equivalents was “more or less” true, but we all know “programming life” throws up unexpected roadblocks

… and that is the excuse today, which we are sticking to … so there, ngaaahhhh!

This calls into play the importance, often, of “project planning”, and the compartmentalizing of testing, including really tight unit testing, especially if your software plan has so much dependency in “day two” on the “day one” quality. As far as that goes, in our defence, regarding a networking web application, that this Clairvoyance Game “more or less is” (though yesterday’s work simplistically pared that down so that we never needed more than our local MAMP Apache/PHP web server involved) sometimes you find it is hard to recognize “units” within the big picture.

And so “day two” and “day three” were all about “online invitation” logic for email or SMS invitations in …


Previous relevant Clairvoyance Game Tutorial is shown below.

Clairvoyance Game Tutorial

Clairvoyance Game Tutorial

Are you sixth sensical? Can you read tea leaves? If it’s one out of two, that will do.

We’re starting down the road to a new …

Clairvoyance Game

… today, that on today’s first draft, as a design for two players …

  • starts you playing yourself, or a nearby other player willing to share windows on your one common web browser incarnation …
  • kind of ludicrous on this day one but the building blocks are there, they being …
    1. HTML and Javascript parent … talking to …
    2. PHP interlocutor

    … which we’re going to extend, on day two, simulating what a window.open and window.opener (just on client) can do, just with a few more calls, and sleeping

Two players take it in turns …

  1. selecting a Zener Card the other player is asked to guess
  2. other player trying to guess that Zener Card selected

… to score, or not, in this first draft Clairvoyance Game helped out by PHP first draft interlocutor.

In days to come, we think we’ll also be coding for email or SMS invitations to play, as well. This will be old news to some of you telepathic genii.

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, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Opera Web Browser Snapshot Tutorial

Opera Web Browser Snapshot Tutorial

Opera Web Browser Snapshot Tutorial

The Opera web browser, at least here on our macOS MacBook Air features a …

Snapshot

… menu of functionality, that, separate to any macOS desktop applications capable of screen snapshot creation or command-control-3 snapshots, that is the best we’ve seen among the web browser brands.

It’s Snapshot menu features …

  • Capture Visible Page
  • Capture Full Page
  • Save Page as PDF
  • user controllable Cropping rectangle of interest snapshotting

… and that Capture Full Page can sometimes bypass those black screens you occasionally get using some other methods, even command-control-3 (and the Windows equivalent is the PrtScrn button here).

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

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

Clairvoyance Game Objectify Tutorial

Clairvoyance Game Objectify Tutorial

Clairvoyance Game Objectify Tutorial

Extending yesterday’s Clairvoyance Game Sharing Scores Tutorial, it’s not exactly OOP (Object Oriented Programming) we are doing, but what we’d describe as “objectify” the proceedings we’re attending to today. Take a look at the following Javascript initialization code (now versus before) …


var zener_cards=['/circle_yellow.jpg#circle_yellow','/cross_red.jpg#cross_red','/waves_blue.jpg#waves_blue','/square_black.jpg#square_black','/star_green.jpg#star_green'];

var theword='Clairvoyance';
var thenoun='Zener Card';
var theelem="<img style='object-fit:contain;' src=";
var thewords=['Clairvoyance', 'Fruit', 'Food'];
var theelems=["<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src=", "<img style='object-fit:contain;' src="];
var theihs=[">", ">", ">"];
var thenouns=['Zener Card', 'Fruit', 'Food'];
var theiw=(document.URL.indexOf('itype=') != -1 ? eval(-1 + eval('' + document.URL.split('itype=')[1].split('&')[0].split('#'))) : 0);

var ppsuff='';
var youare='';
var otheris='';
var score=0, goes=0;
var woois=null;
var pick=-1, awaiting=false, holdon=false;
var bihnull=true;
var anchor=null;
var initval='';
var lastafterscore='';
var wherewrong=false;
var sharemyscore=false, allowsdone=false;
var zcblurb=' You can enter ? to find out more about the history of Zener Cards. ';

if (theiw > 0) {
zcblurb='';
document.title=document.title.replace('Clairvoyance ', thewords[theiw] + ' ');
if (thenouns[theiw] == 'Food') {
theelems[theiw]='<button style=font-size:100px; title=';
theihs[theiw]='>';
zener_cards[0]+='|&#x1f35b;';
zener_cards[1]+='|&#x1f371;';
zener_cards[2]+='|&#x1f358;';
zener_cards[3]+='|&#x1f359;';
zener_cards[4]+='|&#x1f363;';
} else if (thenouns[theiw] == 'Fruit') { // '127825', '127825', '127818', '127827', '127821'
theelems[theiw]='&lt;button style=font-size:100px; title=';
theihs[theiw]='&gt;';
zener_cards[0]+='|&#127817;';
zener_cards[1]+='|&#127825;';
zener_cards[2]+='|&#127818;';
zener_cards[3]+='|&#127827;';
zener_cards[4]+='|&#127821;';
}
}


var sideas=['Awaiting Other Player Choosing a ' + thenouns[theiw] + ' to Guess','Select the ' + thenouns[theiw] + ' Your Player Partner Selected','Select a ' + thenouns[theiw] + ' You Are Asking Your Player Partner to Guess','Awaiting Guess from Your Player Partner','Awaiting a ' + thenouns[theiw] + ' Selection from Your Playing Partner'];

… helping build up HTML for a new dropdown (versus what was there before) …


function multimaybe() {
var selbit='', jsel=0;
if (eval('' + thenouns.length) > 1) {
selbit="<sup><select style=width:30px; onchange=\"if (eval('' + this.value) != eval(1 + eval('' + theiw))) { location.href=document.URL.split('?')[0].split('#')[0] + '?itype=' + this.value; }\"><option value=" + eval(1 + theiw) + ">?</option></select> </sup> ";
for (jsel=0; jsel<thenouns.length; jsel++) {
selbit=selbit.replace('</select>', '<option value=' + eval(1 + jsel) + '>' + thewords[jsel] + ' Game</option></select>');
}
}
return selbit;
}

… and then later within the HTML <body> section …


<script type=text/javascript>
document.write("<h1 id=muh1>" + thewords[theiw] + " Game " + multimaybe() + "<input type=checkbox id=allows style=display:none; onchange=chscal(this);><font size=1 id=fshare style=display:none;>Share Score</font></input> <input type=checkbox id=allowstwo style=display:none; onchange=chscaltwo(this);><font size=1 id=fsharetwo style=display:none;>Be Told Where You Went Wrong</font></input></h1>");
</script>

… and am sure you can see where an initial “Clairvoyance” noun “hardcoding” feel of logic gets expanded to an “array of nouns” (where lots of programmers will immediately shout “objects”), as an alternative way of thinking to the ways our Javascript functions are like “verbs”. If you “abstract” the “what was a hardcoding” into “a dynamically selectable list of nouns” this objectifying process can be quite useful.

And so “day six” got us to …


Previous relevant Clairvoyance Game Sharing Scores Tutorial is shown below.

Clairvoyance Game Sharing Scores Tutorial

Clairvoyance Game Sharing Scores Tutorial

Onto the day before yesterday’s (yes, another two dayer!) Clairvoyance Game Invitations Tutorial primarily we have a checkbox part regarding …

  • Be Told Where You Went Wrong … guessing within our two player Clairvoyance Game … easy peasy … but …
  • Share Your Score … was really difficult … go figure …

… though the latter did ask a lot regarding timing and the sleep patterns of the PHP interlocutor … ?

Let’s just “move on” … shall we?!

Also on the agenda was some colour coding … and who doesn’t like a bit of colour coding! We purloined CSS into play, with “the kind of kludgy / kind of cute (well, you had to be there)” introduction of a title attribute to the status wording element and then apply that CSS …


<style>
#tdstatus[title^='Awaiting Other '] {
border: 3px solid red;
}

#tdstatus[title^='Awaiting a '] {
border: 3px solid rgb(127,0,0);
}


#tdstatus[title^='Awaiting Guess '] {
border: 3px solid orange;
}

#tdstatus[title^='Select the '] {
border: 6px solid lightgreen;
}

#tdstatus[title^='Select a '] {
border: 6px solid green;
}

$tdstatus { padding: 5 5 5 5; }
</style>

We often find it the way, when it comes to colour coding, we borrow from “the traffic light creed” regarding the colours used, where a reddish colour means “hang on” and a greenish colour is an invitation to the user. One could also think of “beeps” or “notifications” here, but not with us here, as of yet.

And so “day four” and “day five” saw …


Previous relevant Clairvoyance Game Invitations Tutorial is shown below.

Clairvoyance Game Invitations Tutorial

Clairvoyance Game Invitations Tutorial

In yesterday’s Clairvoyance Game Tutorial, with our Clairvoyance Game, really a game for two, downplayed invitations to the end of the blog posting blurb. But really, invitations are the “be all and end all” for a two player game shared over the Internet and just using a “PHP and HTML/Javascript” level of sophistication.

And, of course, two days later (when we think it should have only been “one day later”), it might be me, but making this work for email or SMS invitations was not trivial, partly because …

  • we launched into this “phase two public invitational sharing” on a false premise … our “phase one window.open and window.opener” Javascript logics were flawed (further into the logic than the first foray, shall we say) … bad news … we reckon one out of two days “getting there” would have to be put down to the lack of testing on day one … whereas …
  • our thought that “phase two” is just phase one window.open and window.opener transfers to PHP writes Javascript equivalents was “more or less” true, but we all know “programming life” throws up unexpected roadblocks

… and that is the excuse today, which we are sticking to … so there, ngaaahhhh!

This calls into play the importance, often, of “project planning”, and the compartmentalizing of testing, including really tight unit testing, especially if your software plan has so much dependency in “day two” on the “day one” quality. As far as that goes, in our defence, regarding a networking web application, that this Clairvoyance Game “more or less is” (though yesterday’s work simplistically pared that down so that we never needed more than our local MAMP Apache/PHP web server involved) sometimes you find it is hard to recognize “units” within the big picture.

And so “day two” and “day three” were all about “online invitation” logic for email or SMS invitations in …


Previous relevant Clairvoyance Game Tutorial is shown below.

Clairvoyance Game Tutorial

Clairvoyance Game Tutorial

Are you sixth sensical? Can you read tea leaves? If it’s one out of two, that will do.

We’re starting down the road to a new …

Clairvoyance Game

… today, that on today’s first draft, as a design for two players …

  • starts you playing yourself, or a nearby other player willing to share windows on your one common web browser incarnation …
  • kind of ludicrous on this day one but the building blocks are there, they being …
    1. HTML and Javascript parent … talking to …
    2. PHP interlocutor

    … which we’re going to extend, on day two, simulating what a window.open and window.opener (just on client) can do, just with a few more calls, and sleeping

Two players take it in turns …

  1. selecting a Zener Card the other player is asked to guess
  2. other player trying to guess that Zener Card selected

… to score, or not, in this first draft Clairvoyance Game helped out by PHP first draft interlocutor.

In days to come, we think we’ll also be coding for email or SMS invitations to play, as well. This will be old news to some of you telepathic genii.

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, Games, Not Categorised, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Clairvoyance Game Sharing Scores Tutorial

Clairvoyance Game Sharing Scores Tutorial

Clairvoyance Game Sharing Scores Tutorial

Onto the day before yesterday’s (yes, another two dayer!) Clairvoyance Game Invitations Tutorial primarily we have a checkbox part regarding …

  • Be Told Where You Went Wrong … guessing within our two player Clairvoyance Game … easy peasy … but …
  • Share Your Score … was really difficult … go figure …

… though the latter did ask a lot regarding timing and the sleep patterns of the PHP interlocutor … ?

Let’s just “move on” … shall we?!

Also on the agenda was some colour coding … and who doesn’t like a bit of colour coding! We purloined CSS into play, with “the kind of kludgy / kind of cute (well, you had to be there)” introduction of a title attribute to the status wording element and then apply that CSS …


<style>
#tdstatus[title^='Awaiting Other '] {
border: 3px solid red;
}

#tdstatus[title^='Awaiting a '] {
border: 3px solid rgb(127,0,0);
}


#tdstatus[title^='Awaiting Guess '] {
border: 3px solid orange;
}

#tdstatus[title^='Select the '] {
border: 6px solid lightgreen;
}

#tdstatus[title^='Select a '] {
border: 6px solid green;
}

$tdstatus { padding: 5 5 5 5; }
</style>

We often find it the way, when it comes to colour coding, we borrow from “the traffic light creed” regarding the colours used, where a reddish colour means “hang on” and a greenish colour is an invitation to the user. One could also think of “beeps” or “notifications” here, but not with us here, as of yet.

And so “day four” and “day five” saw …


Previous relevant Clairvoyance Game Invitations Tutorial is shown below.

Clairvoyance Game Invitations Tutorial

Clairvoyance Game Invitations Tutorial

In yesterday’s Clairvoyance Game Tutorial, with our Clairvoyance Game, really a game for two, downplayed invitations to the end of the blog posting blurb. But really, invitations are the “be all and end all” for a two player game shared over the Internet and just using a “PHP and HTML/Javascript” level of sophistication.

And, of course, two days later (when we think it should have only been “one day later”), it might be me, but making this work for email or SMS invitations was not trivial, partly because …

  • we launched into this “phase two public invitational sharing” on a false premise … our “phase one window.open and window.opener” Javascript logics were flawed (further into the logic than the first foray, shall we say) … bad news … we reckon one out of two days “getting there” would have to be put down to the lack of testing on day one … whereas …
  • our thought that “phase two” is just phase one window.open and window.opener transfers to PHP writes Javascript equivalents was “more or less” true, but we all know “programming life” throws up unexpected roadblocks

… and that is the excuse today, which we are sticking to … so there, ngaaahhhh!

This calls into play the importance, often, of “project planning”, and the compartmentalizing of testing, including really tight unit testing, especially if your software plan has so much dependency in “day two” on the “day one” quality. As far as that goes, in our defence, regarding a networking web application, that this Clairvoyance Game “more or less is” (though yesterday’s work simplistically pared that down so that we never needed more than our local MAMP Apache/PHP web server involved) sometimes you find it is hard to recognize “units” within the big picture.

And so “day two” and “day three” were all about “online invitation” logic for email or SMS invitations in …


Previous relevant Clairvoyance Game Tutorial is shown below.

Clairvoyance Game Tutorial

Clairvoyance Game Tutorial

Are you sixth sensical? Can you read tea leaves? If it’s one out of two, that will do.

We’re starting down the road to a new …

Clairvoyance Game

… today, that on today’s first draft, as a design for two players …

  • starts you playing yourself, or a nearby other player willing to share windows on your one common web browser incarnation …
  • kind of ludicrous on this day one but the building blocks are there, they being …
    1. HTML and Javascript parent … talking to …
    2. PHP interlocutor

    … which we’re going to extend, on day two, simulating what a window.open and window.opener (just on client) can do, just with a few more calls, and sleeping

Two players take it in turns …

  1. selecting a Zener Card the other player is asked to guess
  2. other player trying to guess that Zener Card selected

… to score, or not, in this first draft Clairvoyance Game helped out by PHP first draft interlocutor.

In days to come, we think we’ll also be coding for email or SMS invitations to play, as well. This will be old news to some of you telepathic genii.

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, Games, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Asynchronous Clientside Fetch Idea Tutorial

Asynchronous Clientside Fetch Idea Tutorial

Asynchronous Clientside Fetch Idea Tutorial

Further to the recent Asynchronous Clientside Ideas Tutorial today we introduce

… as another clientside tool for your armoury of asynchronous processing credentials.

So feel free to (re-)try the changed second draft sleepjs.html Asynchronous Ideas web application’s execution run (also below), helped out by our changed jssleep.js external Javascript helper.

Did you know?

Today’s work made Fetch our preferred third column choice rather than a second Ajax incarnation idea. Why? Well, we found there were issues when two or more Ajax object sets were existent at any one point in time. Fetch, thankfully, can live happily and concurrently with an existent Ajax object set in play.


Previous relevant Asynchronous Clientside Ideas Tutorial is shown below.

Asynchronous Clientside Ideas Tutorial

Asynchronous Clientside Ideas Tutorial

The recent Ajax (clientside) calling (serverside) PHP work of Shower Song Sharing Tutorial reminded us of …

And so we were saved from the tautological blunder of our “first thought of” today’s blog posting title being “Asynchronous Ajax Clientside Ideas Tutorial” … though, into the future, who knows … you could have two (or even more, come to think of it) cleaners promising to use Ajax concurrently while working on their “for loop” drills?! Hmmmmmm. Watcha doin’ in 2029?

With this in mind we wanted to “compare the pair” with a triple pike, whereby we wrote a proof of concept …

… offering three modes of asynchronous usage mode scenarios, they being …

Promise Ajax (processing then delay) Ajax (working within delay)

… that if you click that top button can be set off (almost) synchronously, in their asynchronous pursuits, that are logged in a rudimentary way within the first draft sleepjs.html Asynchronous Ideas web application’s execution run, helped out by our jssleep.js external Javascript helper.

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


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

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

Clairvoyance Game Invitations Tutorial

Clairvoyance Game Invitations Tutorial

Clairvoyance Game Invitations Tutorial

In yesterday’s Clairvoyance Game Tutorial, with our Clairvoyance Game, really a game for two, downplayed invitations to the end of the blog posting blurb. But really, invitations are the “be all and end all” for a two player game shared over the Internet and just using a “PHP and HTML/Javascript” level of sophistication.

And, of course, two days later (when we think it should have only been “one day later”), it might be me, but making this work for email or SMS invitations was not trivial, partly because …

  • we launched into this “phase two public invitational sharing” on a false premise … our “phase one window.open and window.opener” Javascript logics were flawed (further into the logic than the first foray, shall we say) … bad news … we reckon one out of two days “getting there” would have to be put down to the lack of testing on day one … whereas …
  • our thought that “phase two” is just phase one window.open and window.opener transfers to PHP writes Javascript equivalents was “more or less” true, but we all know “programming life” throws up unexpected roadblocks

… and that is the excuse today, which we are sticking to … so there, ngaaahhhh!

This calls into play the importance, often, of “project planning”, and the compartmentalizing of testing, including really tight unit testing, especially if your software plan has so much dependency in “day two” on the “day one” quality. As far as that goes, in our defence, regarding a networking web application, that this Clairvoyance Game “more or less is” (though yesterday’s work simplistically pared that down so that we never needed more than our local MAMP Apache/PHP web server involved) sometimes you find it is hard to recognize “units” within the big picture.

And so “day two” and “day three” were all about “online invitation” logic for email or SMS invitations in …


Previous relevant Clairvoyance Game Tutorial is shown below.

Clairvoyance Game Tutorial

Clairvoyance Game Tutorial

Are you sixth sensical? Can you read tea leaves? If it’s one out of two, that will do.

We’re starting down the road to a new …

Clairvoyance Game

… today, that on today’s first draft, as a design for two players …

  • starts you playing yourself, or a nearby other player willing to share windows on your one common web browser incarnation …
  • kind of ludicrous on this day one but the building blocks are there, they being …
    1. HTML and Javascript parent … talking to …
    2. PHP interlocutor

    … which we’re going to extend, on day two, simulating what a window.open and window.opener (just on client) can do, just with a few more calls, and sleeping

Two players take it in turns …

  1. selecting a Zener Card the other player is asked to guess
  2. other player trying to guess that Zener Card selected

… to score, or not, in this first draft Clairvoyance Game helped out by PHP first draft interlocutor.

In days to come, we think we’ll also be coding for email or SMS invitations to play, as well. This will be old news to some of you telepathic genii.

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, Networking, Software, Tutorials | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Clairvoyance Game Tutorial

Clairvoyance Game Tutorial

Clairvoyance Game Tutorial

Are you sixth sensical? Can you read tea leaves? If it’s one out of two, that will do.

We’re starting down the road to a new …

Clairvoyance Game

… today, that on today’s first draft, as a design for two players …

  • starts you playing yourself, or a nearby other player willing to share windows on your one common web browser incarnation …
  • kind of ludicrous on this day one but the building blocks are there, they being …
    1. HTML and Javascript parent … talking to …
    2. PHP interlocutor

    … which we’re going to extend, on day two, simulating what a window.open and window.opener (just on client) can do, just with a few more calls, and sleeping

Two players take it in turns …

  1. selecting a Zener Card the other player is asked to guess
  2. other player trying to guess that Zener Card selected

… to score, or not, in this first draft Clairvoyance Game helped out by PHP first draft interlocutor.

In days to come, we think we’ll also be coding for email or SMS invitations to play, as well. This will be old news to some of you telepathic genii.

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

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

MySql SQL Mindset Tutorial

MySql SQL Mindset Tutorial

MySql SQL Mindset Tutorial

We spend a lot of the working time with this blog in a “what we’d describe as” a …

Javascript mindset

… which “we’d describe as” …

This optimistic, and can be chaotic for choice, “anything’s possible”, but is “syntactically logical”, mindset, where Javascript is this “sponge of the Internet” not missing out on anything?! Sound familiar?! Huh?!

With yesterday’s WordPress Same Action Item Tutorial though, we got a bit of a lesson bringing that “Javascript mindset” into an issue where “MySql SQL” was the duck doing all the paddling coming up with a solution to that “Same Cut to the Chase Action Item” dropdown idea.

We found out, probably four hours later …

Regarding MySql SQL work (which we debug and “live in” the great incredible stupendous phpMyAdmin environment wooooorrrrlllllldddd regarding) just because an SQL statement looks “syntactically logical” does not always guarantee success.

Take a look at …

What did not work Error Message

SELECT wps_posts.post_title, wps_posts.guid, wps_posts.post_content, LOCATE('/PHP/animegif/tutorial_to_animated_gif.php',wps_posts.post_content) as tfind, LOCATE('/PHP/animegif/tutorial_to_animated_gif.php',wps_posts.post_title) as tother, wps_posts.post_date as post_date FROM wps_posts
WHERE wps_posts.post_status = 'publish'
AND (1 = 11 OR LOWER(wps_posts.post_title) = LOWER('/PHP/animegif/tutorial_to_animated_gif.php'))
AND (wps_posts.post_content like CONCAT(CONCAT('%?p=',wps_posts.guid), '%')
OR
SUBSTRING(wps_posts.post_content,1,240) like '%/PHP/animegif/tutorial_to_animated_gif.php"%') UNION SELECT 'Code Download Table' as post_title, wps_posts.post_content as guid, '' as post_content, 1 as tfind, 0 as tother, CURTIME() as post_date FROM wps_posts
WHERE wps_posts.post_status = 'publish'
AND LOWER(wps_posts.post_title) = LOWER('/PHP/animegif/tutorial_to_animated_gif.php')
AND wps_posts.post_content like '%GETME%' ORDER BY post_date
MySQL returned an empty result set (ie. zero rows). (Query took 5.8648 seconds).
Versus what did work

SELECT wps_posts.post_title, wps_posts.guid, wps_posts.post_content, LOCATE('/PHP/animegif/tutorial_to_animated_gif.php',wps_posts.post_content) as tfind, LOCATE('/PHP/animegif/tutorial_to_animated_gif.php',wps_posts.post_title) as tother, wps_posts.post_date as post_date FROM wps_posts
WHERE wps_posts.post_status = 'publish'
AND SUBSTRING(wps_posts.post_content,1,240) like '%/PHP/animegif/tutorial_to_animated_gif.php"%' UNION SELECT 'Code Download Table' as post_title, wps_posts.post_content as guid, '' as post_content, 1 as tfind, 0 as tother, CURTIME() as post_date FROM wps_posts
WHERE wps_posts.post_status = 'publish'
AND LOWER(wps_posts.post_title) = LOWER('/PHP/animegif/tutorial_to_animated_gif.php')
AND wps_posts.post_content like '%GETME%' ORDER BY post_date

… as a case in point?! We tried this ask (can mysql sql return zero rows just because of the overly complex where clause?) of Google to try to find out why, regarding “relative database” mindsets this might be so

Yes, a complex WHERE clause in MySQL can cause a query to return zero rows if it inadvertently filters out all data. This often happens due to logical errors, such as conflicting conditions, NULL values treated as equal to other values, or using NOT IN with subqueries that include NULL.

Interesting, huh?!

Perhaps the KISS principle should apply here, especially if you are doing MySql SQL outside the original indexing database design thoughts ( as we were needing to use here with the MySql SQL function SUBSTRING ). Also, if we’re into the “blame game” here, question whether a solution you are achieving is inefficient, and wasteful, before applying it as your final offering!

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

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