Numbers Guessing Game
Your Numbers Game
Get
clueYour
answerYour
ScoreClue? Score 0/0
-
Recent Posts
- PHP Exif Quiz Geographicals Tutorial
- PHP Exif Quiz Tutorial
- PHP Exif Retention off iPhone Images Tutorial
- List to Grid Layout CSS Media Query Tutorial
- List to Grid Layout Primer Tutorial
- Out and About WordPress Blog Content Tweaks Just with iPhone Tutorial
- Command Line History By Date Tutorial
- Overseas Travel Global Roaming Mobile Primer Tutorial
Categories
- Ajax
- Android
- Animation
- Anything You Like
- Code::Blocks
- Coding
- Colour Matching
- Data Integration
- Database
- Delphi
- Eclipse
- eLearning
- ESL
- Event-Driven Programming
- Games
- GIMP
- GUI
- Hardware
- Installers
- iOS
- Land Surveying
- Moodle
- Music Poll
- NetBeans
- Networking
- News
- Not Categorised
- OOP
- Operating System
- Photography
- Projects
- Signage Poll
- Software
- SpectroPhotometer
- Tiki Wiki
- Trips
- Tutorials
- Uncategorized
- Visual Studio
- Xcode
Meta
Tags
Ajax animation background button canvas command line CSS Did you know DOM dropdown email emoji event form game Google Google chart hashtag HTML IFRAME image iOS Javascript MAMP media mobile navigation onclick overlay PHP popup programming select share sharing SMS SVG table text textarea tutorial url video web browser webpageYour Background Image
OnTopList
Tag Archives: FileReader
Command Line ImageMagick HEIC to JPEG Image Creation Tutorial
Lately, we’ve been finding that the image format of photographs taken by our iPad’s Camera mobile application come out in … IMG_9999.HEIC … HEIC format (and file naming style of convention) back downloaded into this MacBook Air’s “realm of interest” (and we base a lot of work, here, in MAMP‘s Document Root folder, as a place to base ourselves in). When browsing for these image/heic such files there are known issues, which we do not feel like addressing directly, just now at least. But we do have a workaround for it, for now … and just maybe forevvvvvvvvvvvveeeeeerrrrr?! Who knows? And that solution adds another “layer” to the way the recent crontab/curl scheduled macOS PHP command line approach last talked about with Command Line ImageMagick JPEG Image Creation Tutorial set up it’s solution, so that … on top of it’s existant “PaintBrush macOS can’t do *.jpeg” so we’ll get the PHP to ImageMagick convert *.png (recent) to *.jpeg and *.jpg … today “this other layer” goes … “Local File Browsing’s FileReader fails, natively, regarding File type image/heic files” so then we’ll get the PHP to ImageMagick convert *.HEIC (recent) to *.jpeG and *.jpG Kludge ☇alert☇ for Windows! Sorry, Windows, macOS has case sensitivity, but last time we looked Windows cannot differentiate this way?! And what do we do up at the local file browsing FileReader File object created interception point, in the Javascript? Code like … // Globally … var lastreject=”; // … then, near the top of it’s function readBlob(opt_startByte, opt_stopByte) { } … if (files[0].type.indexOf(“image/”) != -1 && files[0].name.indexOf(“.HEIC”) != -1) { if (lastreject != files[0].name.replace(“.HEIC”, “.jpeG”)) { lastreject=files[0].name.replace(“.HEIC”, “.jpeG”); alert(‘Please reselect using ‘ + files[0].name.replace(“.HEIC”, “.jpeG”) + ‘ assuming you have PHP paintbrush_png_jpg.php active in your scheduling’); } return; } The kludges keep coming?! But we’re pretty happy for now and might see about a better solution down the line. Meanwhile the changed paintbrush_png_jpg.php saves our bacon, for now! Stop Press Since, we’ve realized out of the iOS Camera app Photos app downloading, you can end up with *.heic (ie. lowercase) files, which we cater for with a further changed paintbrush_png_jpg.php PHP macOS (via Terminal app) command line application. Previous relevant Command Line ImageMagick JPEG Image Creation Tutorial is shown below. For a while now, on macOS, we’ve been putting up with a scenario with our beloved macOS Paintbrush desktop application version whereby it will not save images in … JPEG format … any more, so we have been saving in … PNG format … for some time now. Is this a big deal? Well, that is the question? We got a bit of a surprise in aspects of the solution we came up with. With that, pretty obvious to us, first aim of smaller sized output image media files to start producing, we decided to involve … macOS command line … PHP usage ( ending up … Continue reading →
Posted in eLearning, iOS, Operating System, Photography, Tutorials
|
Tagged browse, camera, camera app, case, commamd line, convert, crontab, curl, file, file browse, file extension, file name, filename, FileReader, glob, heic, image, image/heic, ImageMagick, iOS, iPad, jpeg, macOS, mimetype, photo, photograph, photography, photos, Photos app, PHP, programming, schedule, stop press, turorial
|
Leave a comment
Earth Scanner Initial Placename Popup Window Tutorial
With the Earth Bearing Distance Missing Two Hashtagged Mailto Sharing Tutorial it was the same Earth Scanner web application involved as talked about in Earth Scanner Placements Tutorial where it talked about the URL … https://www.rjmprogramming.com.au/HTMLCSS/earth_scanner.html?nontz=Alice_Springs%7C133.8807%7C_23.6980%7CAU#Alice_Springs … or equivalent in this case regarding real mantissa … remember rules? https://www.rjmprogramming.com.au/HTMLCSS/earth_scanner.html?nontz=Alice_Springs%7C133.8807%7C_23.6980%7CAU#Alice_Springs On revisiting this posting it occurred to us, that an improvement for our Earth Scanner web application would be to acknowledge this … initial place … especially given it might disappear from the maps presented too soon … if possible, and Wikipedia can help, present a popup window featuring background images regarding that place … to supplement map information with real life photography, thanks Wikipedia. A new Javascript function … var startwoo=null; function placetopretz(iois) { if (iois.src.indexOf(‘nickname=’) != -1) { var twaconto = (iois.contentWindow || iois.contentDocument); if (twaconto != null) { if (twaconto.document) { twaconto = twaconto.document; } //var xzs=prompt(twaconto.body.outerHTML,twaconto.body.outerHTML); //alert(89); if (twaconto.body.outerHTML.indexOf(‘.style.background’) != -1) { if (!startwoo) { startwoo=window.open(”,’_blank’,’top=50,left=50,width=800,height=800′); //document.getElementById(‘botif’).style.display=’block’; //document.getElementById(‘botif’).style.position=’absolute’; //document.getElementById(‘botif’).style.top=’0px’; //document.getElementById(‘botif’).style.left=’0px’; //document.getElementById(‘botif’).style.opacity=’0.5′; //document.getElementById(‘botif’).style.zIndex=’2222′; console.log(twaconto.body.outerHTML.split(‘} }’)[0].split(‘>’)[0].trim().replace(/parent\./g,”).replace(/\"\;/g,”‘”).replace(/\&\;/g,”&”).slice(-40)); var conlog=(‘<html>’ + (twaconto.body.outerHTML.split(‘} }’)[0].split(‘>’)[0].trim().replace(/parent\./g,”).replace(/\"\;/g,”‘”).replace(/\&\;/g,”&”).replace(/\”/g,”‘”).replace(” onload='”, ‘ onload=”‘) + ‘ } }”><div id=ourcanvas style=display:block;width:800px;height:800px;></div><br><div id=stz></div></body></html>’).replace(/\’\>/g,'”>’).replace(/\<\;/g,'<‘).replace(/\>\;/g,’>’).replace(/yourcanvas/g,’ourcanvas’).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘)); var inonl=conlog.split(‘ onload=”‘)[1].split(‘”‘)[0]; if (1 == 1) { console.log(‘<html><head><sc’ + ‘ript type=text/javascr’ + ‘ipt> function xyz() { ‘ + inonl.replace(/\ document.getE/g, ‘ ‘ + String.fromCharCode(10) + ‘ document.getE’) + ‘ } </scr’ + ‘ipt></head>’ + conlog.replace(inonl, ‘ xyz(); ‘)); startwoo.document.write(‘<html><head><scri’ + ‘pt type=text/javascr’ + ‘ipt> function xyz() { ‘ + inonl.replace(/\ document.getE/g, ‘ ‘ + String.fromCharCode(10) + ‘ document.getE’).replace(/\,URL\(/g, “,’ + ‘URL(“) + ‘ } setTimeout(xyz,5000); </scr’ + ‘ipt></head>’ + conlog.replace(inonl, ‘ xyz(); ‘)); startwoo.document.title=decodeURIComponent(iois.src.split(‘nickname=’)[1].split(‘&’)[0].split(‘#’)[0]).replace(/\_/g,’ ‘); //document.getElementById(‘botif’).srcdoc=(‘<html><head><scri’ + ‘pt type=text/javascr’ + ‘ipt> function xyz() { ‘ + inonl.replace(/\ document.getE/g, ‘ ‘ + String.fromCharCode(10) + ‘ document.getE’).replace(/\,URL\(/g, “,’ + ‘URL(“) + ‘ } </scr’ + ‘ipt></head>’ + conlog.replace(inonl, ‘ xyz(); ‘)); } else { console.log(‘<html>’ + (twaconto.body.outerHTML.split(‘} }’)[0].split(‘>’)[0].trim().replace(/parent\./g,”).replace(/\"\;/g,”‘”).replace(/\&\;/g,”&”).replace(/\”/g,”‘”).replace(” onload='”, ‘ onload=”‘) + ‘ } }”><div id=ourcanvas style=display:block;width:800px;height:800px;></div><br><div id=stz></div></body></html>’).replace(/\’\>/g,'”>’).replace(/\<\;/g,'<‘).replace(/\>\;/g,’>’).replace(/yourcanvas/g,’ourcanvas’).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘)); startwoo.document.write(‘<html>’ + (twaconto.body.outerHTML.split(‘} }’)[0].split(‘>’)[0].trim().replace(/parent\./g,”).replace(/\"\;/g,”‘”).replace(/\&\;/g,”&”).replace(/\”/g,”‘”).replace(” onload='”, ‘ onload=”‘) + ‘ } }”><div id=ourcanvas style=display:block;width:800px;height:800px;></div><br><div id=stz></div></body></html>’).replace(/\’\>/g,'”>’).replace(/\<\;/g,'<‘).replace(/\>\;/g,’>’).replace(/yourcanvas/g,’ourcanvas’).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘)); startwoo.document.title=decodeURIComponent(iois.src.split(‘nickname=’)[1].split(‘&’)[0].split(‘#’)[0]).replace(/\_/g,’ ‘); //document.getElementById(‘botif’).srcdoc=(‘<html>’ + (twaconto.body.outerHTML.split(‘} }’)[0].split(‘>’)[0].trim().replace(/parent\./g,”).replace(/\"\;/g,”‘”).replace(/\&\;/g,”&”).replace(/\”/g,”‘”).replace(” onload='”, ‘ onload=”‘) + ‘ } }”><div id=ourcanvas style=display:block;width:800px;height:800px;></div><br><div id=stz></div></body></html>’).replace(/\’\>/g,'”>’).replace(/\<\;/g,'<‘).replace(/\>\;/g,’>’).replace(/yourcanvas/g,’ourcanvas’).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘).replace(String.fromCharCode(10),’ ‘)); } } } } } } … helped us with this tweaking of the changed earth_scanner.html code for the Earth Scanner web application. Previous relevant Earth Bearing Distance Missing Two Hashtagged Mailto Sharing Tutorial is shown below. We’re returning to our Missing Two web application, after … the recent Earth Bearing Distance Missing Two Earth Scanner Integration Tutorial Earth Scanner integration … because, today … it becomes our “guinea pig” web application helping out the … Ajax … and … FormData … methodologies we use a lot around here in the past … calling PHP emailhtml.php … to send … emails containing (HTML perhaps) inline content or attachments … that being the “old way” being helped out by … intervention in … Continue reading →
Posted in eLearning, Event-Driven Programming, Not Categorised, Tutorials
|
Tagged absolute URL, address bar, Ajax, animation, annotate, annotating, annotation, antarctic circle, API, arctic circle, array, audio, autoplay, background image, background-position, base64, blog post, browse, browsing, clip-path, code, collaboration, collage, comma, comma separated list, CSS, curl, decode, delimitation, delimiter, delimiters, detail, device, Did you know, document.title, DOM, Earth, email, emoji, emoji flag, equator, external CSS, external Javascript, file, FileReader, filereader api, focus, geodata, geographicals, geography, geojson, Google, Google Chrome, Google Directions, greenwich meridian, hash, hashtag, hashtagging, horizontal rule, hotlink, HTML, IFRAME, image, img, interactive map, intranet, itinerary, Javascript, karaoke, keyframes, kinear-gradient, kludge, land, landscape, latitude, leg, legs, lengthy, line, linear gradient, lines, link, local web server, localStorage, longitude, making of, MAMP, mantissa, map, Mapping, margin, margin-left, margin-top, media, Mercator, meridian, microphone, mixed content, mobile, navigator.canShare, North Pole, onclick, one image website, operating system, order, orientation, overlay, Page Visibility API, Patsy Gallant, place, placement, placename, play, plot, pole, popup, portrait, programming, realtime, reference, Safari, screen height, screen width, screen.orientation, script, scroll, scrolling, sea, share, sharing, SMS, south pole, speech, speech to text, stop press, style, styling, syntax, tab, terrestrial, textarea, timestamp, timezone, timing, trip, trip leg, trip planning, trips, tropic of cancer, tropic of capricorn, tutorial, url, video, web browser, web browser tab.title, web share api, Web Speech, Web Speech API, when, where, Wikipedia, window, window.atob, window.open, wrapper, YouTube
|
Leave a comment
XML Lint Validation CSS Background Colour Tutorial
Onto the recent XML Lint Validation Shared Encoding Tutorial we’d say what could “cheer things up”, shall we say, is to add some colour into the look of the XML Lint Validation web application. And to do this with inline CSS <style></style> element within the <head></head> non-body part of the webpage. We allow the webpage to keep any of its “style=” specifications within the <body></body> section too, because, personally speaking, if we thought to do it as we were coding, then the chances are, these CSS specification must hold some weight and should stay. Today’s work is an “overall makeover” layer of CSS styling “just for aesthetics”, which is more the way we tend to organize web application CSS styling aesthetics around here. It’s up to you though, obviously, and if you have a dedicated CSS styling employee, then you may roll in a different direction … though Nala and Luna will tell you … Clockwise is best! But they would say that! They’ve never travelled north of the Equator! So what CSS styling got applied? <?php echo ” <style> th[colspan]:not([colspan=”1″]) { background-color: yellow; } textarea:nth-child(1) { background-color: silver; } textarea#preincoming { background-color: silver; } textarea:nth-child(2) { background-color: rgb(245,245,245); } textarea#incoming { background-color: rgb(245,245,245); } textarea:nth-child(3) { background-color: pink !important; } textarea#outgoing { background-color: pink !important; } </style> “; ?> … in our changed “sixth draft” xmllint_validation.php you might want to try for yourself. Previous relevant XML Lint Validation Shared Encoding Tutorial is shown below. There are a lot of web applications we’ve been involved with that … try to avoid (what we are most “peeved” by, as an issue) gobbledegook when dealing with non-ascii content we try, encoding wise, to corral towards UTF-8 encoding … and today we … add sharing and collaboration functionality, via email or SMS, to our current XML Lint Validation web application development … hence the “Shared Encoding” curiosity in our blog posting title … well, you had to be there … today, in the days after yesterday’s XML Lint Validation SelectionChange Tutorial … Fancy a pertinent riddle? What is always coming but never arrives? Anyone, anyone? Yes, Hoagy, do you have an answer? No Bull Cow No Bull Well, that’s quite rude and wise all at once, Hoagy! Anybody else? Yes, Edward, your answer … Rearrange the sycophant! … has merit too! But wish one of you would enunciate … use your words … . . . . . . . . . . . . . . . . . . . . . . . . . . . . You have the answer Tatsumi? Well … Today … excellent try! But no, not quite. The answer is … Tomorrow But, five points to Hufflepuff, and we add today’s voucher for a cup of tea (no rushing please)! But, back to business, as far as the encoding issue (of gobbledegook) goes, we … Continue reading →
Posted in eLearning, Event-Driven Programming, Not Categorised, Tutorials
|
Tagged aesthetics, background colour, broadband, browse, browsing, collaboration, colour, colour stop, connect, connection, CSS, DOM, email, emoji, encoding, event, fibre to the node, filename, FileReader, form, gobbledegook, Google, google home, google mesh, google wifi mesh, hardware, hashtag, hashtagging, install, iOS, iPhone, Javascript, keyboard, LAN, linear gradient, mesh, modem, NBN, network, onclick, ondblclick, onsubmit, port, readAsDataURL, readAsRext, selectionchange, setup, share, sharing, SMS, style, styling, submit, subnet, subnetwork, tutorial, utf-8, WiFi, wrap, wrapping
|
Leave a comment
XML Lint Validation Shared Encoding Tutorial
There are a lot of web applications we’ve been involved with that … try to avoid (what we are most “peeved” by, as an issue) gobbledegook when dealing with non-ascii content we try, encoding wise, to corral towards UTF-8 encoding … and today we … add sharing and collaboration functionality, via email or SMS, to our current XML Lint Validation web application development … hence the “Shared Encoding” curiosity in our blog posting title … well, you had to be there … today, in the days after yesterday’s XML Lint Validation SelectionChange Tutorial … Fancy a pertinent riddle? What is always coming but never arrives? Anyone, anyone? Yes, Hoagy, do you have an answer? No Bull Cow No Bull Well, that’s quite rude and wise all at once, Hoagy! Anybody else? Yes, Edward, your answer … Rearrange the sycophant! … has merit too! But wish one of you would enunciate … use your words … . . . . . . . . . . . . . . . . . . . . . . . . . . . . You have the answer Tatsumi? Well … Today … excellent try! But no, not quite. The answer is … Tomorrow But, five points to Hufflepuff, and we add today’s voucher for a cup of tea (no rushing please)! But, back to business, as far as the encoding issue (of gobbledegook) goes, we mucked around thinking the fault lay with “meta” tags, and such, in the parent, until we relooked at the FileReader arrangements we had going back at a changed client_browsing.htm client side HTML and Javascript inhouse helper. We were always using readAsDataURL() method for this URL call containing “straighttext=” argument pattern, but we found more success starting to use readAsText() method for HTML and XML data inputs. Makes sense really! Now we go … blob.push(file.slice(start, stop + 1)); if (parent.document.getElementById(‘txtresultout’)) { reader[ij].readAsText(blob[ij]); } else { if (document.URL.indexOf(‘straighttext=’) != -1) { if (window.parent) { if (parent.document.getElementById(‘result1’) && parent.document.getElementById(‘result2′)) { reader[ij].readAsText(blob[ij]); } else { reader[ij].readAsDataURL(blob[ij]); } } else { reader[ij].readAsDataURL(blob[ij]); } } else { reader[ij].readAsDataURL(blob[ij]); } } … as well as … reader[ij].onloadend = (function(mfile) { return function(evt) { var dp=”, ds=dssuffix, slideshowparent=false, ssuffix=’0′, nsuffix=’2′, blnks=’ ‘, xhsf=”, zhsfs=[]; var tomt=’video/mp4’, thext=”, ithext=0; if (evt.target.readyState == FileReader.DONE) { // DONE == 2 if (document.URL.indexOf(‘straighttext=’) != -1) { if (window.parent) { if (parent.document.getElementById(‘result1’) && parent.document.getElementById(‘result2’)) { if (parent.document.getElementById(‘result1’).innerHTML == ”) { parent.document.getElementById(‘result1’).innerHTML=(evt.target.result); // used to use window.atob and .replace(‘data:application/octet-stream;base64,’, ”) } else { parent.document.getElementById(‘result2’).innerHTML=(evt.target.result); // retest earth_scanner.html } } } } // rest of FileReader.DONE code follows } }; })(files[ij]); … as a solution to this issue, putting a smile to many an emoji out there. And as far as our email or SMS sharing goes, we avoided any need for PHP mail ideas by starting to involve hashtagged versions of the incoming XML or HTML input to the … Continue reading →
Posted in eLearning, Event-Driven Programming, Operating System, Tutorials
|
Tagged broadband, browse, browsing, collaboration, colour, colour stop, connect, connection, DOM, email, emoji, encoding, event, fibre to the node, filename, FileReader, form, gobbledegook, Google, google home, google mesh, google wifi mesh, hardware, hashtag, hashtagging, install, iOS, iPhone, Javascript, keyboard, LAN, linear gradient, mesh, modem, NBN, network, onclick, ondblclick, onsubmit, port, readAsDataURL, readAsRext, selectionchange, setup, share, sharing, SMS, submit, subnet, subnetwork, tutorial, utf-8, WiFi, wrap, wrapping
|
Leave a comment
Earth Scanner Google Chrome Speech to Text Tutorial
We’re interested in methodologies, even if they are not fully cross-browser and/or cross platform ones, if only to reassure that a concept is possible, and that applies to today’s … Google Chrome … only … non-mobile … only … https:// protocol … only … interfacing of our recent Earth Scanner web application to Google’s Web Speech API demonstration integration, further to yesterday’s Earth Scanner User Emoji Entities Tutorial. At first, reimagining how the Web Speech API worked, we remembered place names always coming out with a capitalized first letter, and so suits our requirements perfectly, but when testing the other two words we wanted to integrate … email SMS … guess what?! The email still reads as “Email” in the API. It just capitalizes starts of sentences or phrases. Game show da–dong buzzer goes here. Nevertheless, we can count on the infinite good sense of our readers and users, and know that out of their mouths we’ll only hear place names or “and” or “to” or “email” or “SMS” (coded for English, so far) and that no swear words (that aren’t place names) would ever pass their lips?! To make this integration happen, for us, involved … new HTML … <input type=hidden id=posturl style=display:none; value=””></input><input type=button id=dbutton onclick=checkforstt(); style=display:none;></input> new just after webpage onload event popup window opening of our inhouse Web Speech API interfacer … var speechtotextwo=null; var screenwidth=screen.width; if (document.URL.indexOf(‘https:’) != -1 && navigator.userAgent.toLowerCase().indexOf(‘chrome’) > -1 && !navigator.userAgent.match(/Android|BlackBerry|iPhone|iPad|iPod|Opera Mini|IEMobile/i)) { speechtotextwo=window.open(‘https://www.rjmprogramming.com.au/PHP/speech_supervisor.php?mode=3’, ‘_blank’, ‘top=0,left=’ + eval(-300 + screenwidth) + ‘,width=300,height=500′); setTimeout(checkforstt, 6000); setTimeout(function(){ speechtotextwo.document.title=’Places for Earth Scanner’; }, 5000); } new timed Javascript function acting on spoken findings … var stt=”, potentialstt=”; var firststt=true, firstdone=false; function checkforstt() { var azx=null; if (document.getElementById(‘posturl’).value.trim() != ”) { if (document.getElementById(‘posturl’).value == ‘Email’) { document.getElementById(‘posturl’).value = ’email’; } if (document.getElementById(‘posturl’).value == ‘SMS’) { document.getElementById(‘posturl’).value = ‘sms’; } if (document.getElementById(‘posturl’).value.substring(0,1) == document.getElementById(‘posturl’).value.substring(0,1).toUpperCase() && document.getElementById(‘posturl’).value.substring(0,1) != document.getElementById(‘posturl’).value.substring(0,1).toLowerCase()) { if (potentialstt.indexOf(document.getElementById(‘posturl’).value) == -1) { if (potentialstt.trim() == ”) { potentialstt=document.getElementById(‘posturl’).value; } else { if ((” + potentialstt + ‘ ‘).replace(‘ and ‘, ‘ to ‘).replace(/\ to\ $/g, ”) != (” + potentialstt + ‘ ‘)) { potentialstt+=’ ‘ + document.getElementById(‘posturl’).value; } else { potentialstt+=’,’ + document.getElementById(‘posturl’).value; } } //alert(potentialstt); if ((” + potentialstt + ‘ ‘).replace(‘ and ‘, ‘ to ‘).replace(/\ to\ $/g, ”) == (” + potentialstt + ‘ ‘)) { stt=potentialstt.replace(/\ and\ /g, ‘,’).replace(/\ to\ /g, ‘-‘); if (2 == 2) { gdefv=(stt + ‘?!’).replace(/\,/g, ‘?!,’).replace(/\-/g,’?!-‘); scmok=true; movesallowed=true; gmovesallowed=true; five=5; gfive=5; dountilnoquestion(); //document.getElementById(‘myimg’).click(); //scmove(); } else { document.getElementById(‘sdurl’).value=((document.getElementById(‘sdurl’).value.split(‘#’)[0].split(‘?’)[0] + thecssarg + ((argstuff + ‘#’) == ‘#’ ? argstuff + ‘#’ : ‘#’ + argstuff.substring(1) + ‘&’) + (‘#’ + (” + stt.replace(/\ /g,’_’)).substring(0).replace(/^\%2C/g,”)).replace(/^\#$/g, ”)).replace(‘&#’, ‘&’)).replace(‘##’,’#’); //alert(‘stt=’ + stt + ‘ and ‘ + document.getElementById(‘sdurl’).value); if (document.getElementById(‘sdurl’).value.indexOf(‘#’) != -1) { location.hash=’#’ + document.getElementById(‘sdurl’).value.split(‘#’)[1]; } } } } } else if (document.getElementById(‘posturl’).value == ’email’) { potentialstt=”; stt=”; if (1 == 1) { //if (shareb) { shareb.click(); … Continue reading →
Posted in eLearning, Event-Driven Programming, Tutorials
|
Tagged absolute URL, address bar, Ajax, animation, annotate, annotating, annotation, antarctic circle, API, arctic circle, array, audio, autoplay, background image, background-position, base64, blog post, browse, browsing, clip-path, code, collaboration, collage, comma, comma separated list, CSS, curl, decode, delimitation, delimiter, delimiters, detail, device, Did you know, document.title, DOM, Earth, email, emoji, emoji flag, equator, external CSS, external Javascript, file, FileReader, filereader api, focus, geodata, geographicals, geography, geojson, Google, Google Chrome, Google Directions, greenwich meridian, hash, hashtag, hashtagging, horizontal rule, hotlink, HTML, IFRAME, image, img, interactive map, intranet, itinerary, Javascript, karaoke, keyframes, kinear-gradient, kludge, land, landscape, latitude, leg, legs, lengthy, line, linear gradient, lines, link, local web server, localStorage, longitude, making of, MAMP, mantissa, map, Mapping, margin, margin-left, margin-top, media, Mercator, meridian, microphone, mixed content, mobile, navigator.canShare, North Pole, onclick, one image website, operating system, order, orientation, overlay, Page Visibility API, Patsy Gallant, place, placement, placename, play, plot, pole, popup, portrait, programming, realtime, reference, Safari, screen height, screen width, screen.orientation, script, scroll, scrolling, sea, share, sharing, SMS, south pole, speech, speech to text, stop press, style, styling, syntax, tab, terrestrial, textarea, timestamp, timezone, timing, trip, trip leg, trip planning, trips, tropic of cancer, tropic of capricorn, tutorial, url, video, web browser, web browser tab.title, web share api, Web Speech, Web Speech API, when, where, Wikipedia, window, window.atob, window.open, wrapper, YouTube
|
Leave a comment
Earth Scanner User Emoji Entities Tutorial
Recently we’ve been trying to add to the flexibility and power of the user using our recent Earth Scanner web application to tailor what it looks like and how it works via settings the user can control. Adding to this work up to yesterday’s Earth Scanner Intranet Feeling Externals Tutorial, today, we’d like to allow the user to control the look of two types of emojis used, they being … the pin emoji for place locations … and … the compass emoji in the middle of a trip leg Emojis, as we’ve said a few times now, are really useful, as that hybrid between text and graphics, for we graphically challenged, and as Internationalization aids, and clarifiers. But how are they defined. Our favourite way, of many, is via … HTML Decimal Entities … in HTML or Javascript code, but you can also use … HTML Hexadecimal Entity … in HTML or Javascript code, or … String.fromCodePoint([HTML Decimal Entity]) … in Javascript code or … CSS (selector) content property value expressed like content:’\000031\0020e3′; … ie. UTF-32 expression(s) The emoji contents, copied, within the CSS content or HTML or Javascript code, as applicable We like to look up the concept at Emojipedia. We … make initial example of Google Search (today, “Bow and Arrow emojipedia”) … leads to link to … get off Emojipedia, in its “Technical Information”, these days, the Codepoint eg. U+1F3F9 … then we just type that into an address bar … to get to a … relevant Google search … and in its list, for the more fundamental emoji arrangements we look for … relevant Fileformat.info web page … where this entity information is laid out for you … used by the Javascript of the Earth Scanner … var thepin=’📍’, thecompass=’🧭’; … used, now in code lines like … // Pin … bmeridian+='<span class=place style=”z-index:1675;position:’ + posval + ‘;top:’ + eval(0 + eval(eval(lglat – eval(” + plotlat[iplot])) / eval(lglat – smlat) * eval(screenheight))) + ‘px;left:’ + eval(0 + eval(eval(” + plotlong[iplot]) – smlong) / eval(lglong – smlong) * eval(screenwidth)) + ‘px;” onclick=”event.stopPropagation(); woit(‘ + “‘” + plotplace[iplot].split(‘, ‘)[0] + “‘” + ‘);”>’ + thepin + ‘</span>’; // Compass … bmeridian+='<hr’ + clabit + ‘ onclick=”event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(‘ + “‘//www.google.com/maps/dir/” + encodeURIComponent(plotplace[eval(thisleg.split(‘.’)[0])]) + ‘/’ + encodeURIComponent(plotplace[eval(thisleg.split(‘.’)[1])]) + “#In a minute we will start moving the map again’,’_blank’,’top=50,left=50,width=1000,height=900′)” + ‘; canlooknow=true; alert(this.title); ” ondblclick=”event.stopPropagation(); canlooknow=false; clearwo(); wo=window.open(‘ + “‘//www.google.com/maps/dir/” + plotlat[eval(thisleg.split(‘.’)[0])] + ‘,’ + plotlong[eval(thisleg.split(‘.’)[0])] + ‘/’ + plotlat[eval(thisleg.split(‘.’)[1])] + ‘,’ + plotlong[eval(thisleg.split(‘.’)[1])] + “#In a minute we will start moving the map again’,’_blank’,’top=50,left=50,width=1000,height=900′)” + ‘; canlooknow=true; alert(this.title); ” title=”‘ + plusbit + ” + plotplace[eval(thisleg.split(‘.’)[0])] + ‘ to ‘ + plotplace[eval(thisleg.split(‘.’)[1])] + ‘ has the crow flying (‘ + gbrgtoset + ‘ degrees setting off at versus on Mercator Projection …) ‘ + eval(eval(brgtoset + 450) % 360) + ‘ degrees for ‘ + eval(gdisttoset / 1000.0) … Continue reading →
Posted in eLearning, Event-Driven Programming, Tutorials
|
Tagged absolute URL, address bar, Ajax, animation, annotate, annotating, annotation, antarctic circle, API, arctic circle, array, audio, autoplay, background image, background-position, base64, blog post, browse, browsing, clip-path, code, collaboration, collage, comma, comma separated list, CSS, curl, decode, delimitation, delimiter, delimiters, detail, device, Did you know, document.title, DOM, Earth, email, emoji, emoji flag, equator, external CSS, external Javascript, file, FileReader, filereader api, focus, geodata, geographicals, geography, geojson, Google Chrome, Google Directions, greenwich meridian, hash, hashtag, hashtagging, horizontal rule, hotlink, HTML, IFRAME, image, img, interactive map, intranet, itinerary, Javascript, karaoke, keyframes, kinear-gradient, kludge, land, landscape, latitude, leg, legs, lengthy, line, linear gradient, lines, link, local web server, localStorage, longitude, making of, MAMP, mantissa, map, Mapping, margin, margin-left, margin-top, media, Mercator, meridian, mixed content, mobile, navigator.canShare, North Pole, onclick, one image website, operating system, order, orientation, overlay, Page Visibility API, Patsy Gallant, place, placement, placename, play, plot, pole, popup, portrait, programming, realtime, reference, Safari, screen height, screen width, screen.orientation, script, scroll, scrolling, sea, share, sharing, SMS, south pole, stop press, style, styling, syntax, tab, terrestrial, textarea, timestamp, timezone, timing, trip, trip leg, trip planning, trips, tropic of cancer, tropic of capricorn, tutorial, url, video, web browser, web browser tab.title, web share api, when, where, Wikipedia, window, window.atob, window.open, wrapper, YouTube
|
Leave a comment
Earth Scanner Intranet Feeling Externals Tutorial
Yesterday’s Earth Scanner Externals Tutorial left off with … HTTP://localhost:8888/newstuff.js … and if it had been called http://localhost:8888/newstuff.JS it could have persevered. … as an “Intranet feeling” idea for the styling and scripting that users can get involved with, working with our latest Earth Scanner web application. As you can imagine, to share this, in our case, local MAMP external Javascript, you can’t expect the recipient to necessarily have MAMP installed, let alone have MAMP and have your scripting and/or styling in place with its proper name. And so, to share with collaborators in this scenario, we have to convert the script URL types, as above into inline HTML script elements that will make their way into the location.hash (ie hashtagging) arrangements we’ve got going with our sharing functionalities. So here’s the thing. We perennially battle the “Intranet feeling” restrictions out there, trying HTML iframes and Ajax and PHP curl (via window.open within the Intranet realms) before settling on the non-automated but “user participation possible” idea of using the FileReader API to read the contents of the relevant external script file the user has browsed for (off their local computer system) and selected. It’s contents are held in base64 and we’re using window.atob (via our inhouse tweaked client_browsing.htm Client Browsing FileReader API interfacer) to bring it back from the decoding into the clientside wooooorrrrlllllddd. We warn here, we’ve seen flaky window.atob arrangements, and so we’ll ease into all this, starting with small amounts of scripting for now. This is wise, too, in that we don’t know yet, about the limits, even to hashtagged URLs in “a” link mailto: and sms: URLs. Our coding conduit into it all was a Javascript wrapper function also concerned with “user induced” mixed content issues … function nomc(hashttpmaybe) { var nohttp=hashttpmaybe; var ihp=0, hparts=nohttp.split(‘https://’); for (ihp=1; ihp<hparts.length; ihp++) { if (hparts[ihp].indexOf(‘localhost’) == -1) { nohttp=nohttp.replace(‘https://’ + hparts[ihp], ‘//’ + hparts[ihp]); } else if (hparts[ihp].indexOf(‘.js’) != -1) { if (scrto == ‘youllneverfindthis’) { scrto=’filescript:https://’ + hparts[ihp].split(‘.js’)[0] + ‘.js’; nohttp=nohttp.replace(‘filescript:https://’ + hparts[ihp].split(‘.js’)[0] + ‘.js’, ajaxit(scrto)); } else { scrfrom=’filescript:https://’ + hparts[ihp].split(‘.js’)[0] + ‘.js’; } } else if (hparts[ihp].indexOf(‘.JS’) != -1) { if (scrto == ‘youllneverfindthis’) { scrto=’filescript:https://’ + hparts[ihp].split(‘.JS’)[0] + ‘.JS’; nohttp=nohttp.replace(‘filescript:https://’ + hparts[ihp].split(‘.JS’)[0] + ‘.JS’, ajaxit(scrto)); } else { scrfrom=’filescript:https://’ + hparts[ihp].split(‘.JS’)[0] + ‘.JS’; } } else if (hparts[ihp].indexOf(‘.css’) != -1) { if (styto == ‘youllneverfindthis’) { styto=’filecss:https://’ + hparts[ihp].split(‘.css’)[0] + ‘.css’; nohttp=nohttp.replace(‘filecss:https://’ + hparts[ihp].split(‘.css’)[0] + ‘.css’, ajaxit(styto)); } else { styfrom=’filecss:https://’ + hparts[ihp].split(‘.css’)[0] + ‘.css’; } } else if (hparts[ihp].indexOf(‘.CSS’) != -1) { if (styto == ‘youllneverfindthis’) { styto=’filecss:https://’ + hparts[ihp].split(‘.CSS’)[0] + ‘.CSS’; nohttp=nohttp.replace(‘filecss:https://’ + hparts[ihp].split(‘.CSS’)[0] + ‘.CSS’, ajaxit(styto)); } else { styfrom=’filecss:https://’ + hparts[ihp].split(‘.CSS’)[0] + ‘.CSS’; } } } hparts=nohttp.split(‘HTTPS://’); for (ihp=1; ihp<hparts.length; ihp++) { if (hparts[ihp].indexOf(‘localhost’) == -1) { nohttp=nohttp.replace(‘HTTPS://’ + hparts[ihp], ‘//’ + hparts[ihp]); } else if (hparts[ihp].indexOf(‘.js’) != -1) { if (scrto == ‘youllneverfindthis’) { scrto=’filescript:HTTPS://’ + hparts[ihp].split(‘.js’)[0] + ‘.js’; nohttp=nohttp.replace(‘filescript:HTTPS://’ … Continue reading →
Posted in eLearning, Event-Driven Programming, Tutorials
|
Tagged absolute URL, address bar, Ajax, animation, annotate, annotating, annotation, antarctic circle, API, arctic circle, array, audio, autoplay, background image, background-position, base64, blog post, browse, browsing, clip-path, code, collaboration, collage, comma, comma separated list, CSS, curl, decode, delimitation, delimiter, delimiters, detail, device, Did you know, document.title, DOM, Earth, email, emoji, emoji flag, equator, external CSS, external Javascript, file, FileReader, filereader api, focus, geodata, geographicals, geography, geojson, Google Chrome, Google Directions, greenwich meridian, hash, hashtag, hashtagging, horizontal rule, hotlink, HTML, IFRAME, image, img, interactive map, intranet, itinerary, Javascript, karaoke, keyframes, kinear-gradient, kludge, land, landscape, latitude, leg, legs, lengthy, line, linear gradient, lines, link, local web server, localStorage, longitude, making of, MAMP, mantissa, map, Mapping, margin, margin-left, margin-top, media, Mercator, meridian, mixed content, mobile, navigator.canShare, North Pole, onclick, one image website, operating system, order, orientation, overlay, Page Visibility API, Patsy Gallant, place, placement, placename, play, plot, pole, popup, portrait, programming, realtime, reference, Safari, screen height, screen width, screen.orientation, script, scroll, scrolling, sea, share, sharing, SMS, south pole, stop press, style, styling, syntax, tab, terrestrial, textarea, timestamp, timezone, timing, trip, trip leg, trip planning, trips, tropic of cancer, tropic of capricorn, tutorial, url, video, web browser, web browser tab.title, web share api, when, where, Wikipedia, window, window.atob, window.open, wrapper, YouTube
|
Leave a comment
File API File and Reader Objects Video First Frame Tutorial
Yesterday’s File API File and Reader Objects Mimetype Tutorial‘s “Client Browsing” web application gets enhanced today using the knowledge from two days ago, when we presented Video File Browse Preview Tutorial, and started gleaning a “first frame” image given an HTML video element populated with data. And so we flag the “Image” summary element with a thumbnail “first frame” image should the user browse for a video file and use … File object … and … FileReader object … to display and, as applicably, play that element, whether that be … video display and be able to play, as well as adding a thumbnail img (image) that can be clicked to play the video or display a full sized “first frame” img (image) audio display and be able to play img display … via modified body onload logic, as per … var thecanvas = null; var thecontext = null; var thevideo = null; function dolhsh() { thecanvas = document.querySelector(“#video-canvas”); thecontext = thecanvas.getContext(“2d”); thevideo = document.querySelector(“#main-video”); if (document.URL.indexOf(‘vionly=’) != -1) { document.getElementById(‘files’).accept=’video/*,image/*’; } document.querySelector(“#files”).addEventListener(‘change’, function() { var xtomt=”, xthext=”, ixthext=0; if (document.querySelector(“#files”).files[0].type != ‘application/octet-stream’) { xtomt=document.querySelector(“#files”).files[0].type; } if (document.querySelector(“#files”).files[0].name.indexOf(‘.’) != -1) { xthext=’.’ + document.querySelector(“#files”).files[0].name.split(‘.’)[eval(-1 + file.name.split(‘.’).length)].toLowerCase(); } if (xthext != ”) { for (ixthext=0; ixthext<mexts.length; ixthext++) { if (mexts[ixthext] == xthext) { xtomt=mtypes[ixthext]; //alert(‘Tomt=’ + tomt); } } } //alert(‘xtomt=’ + xtomt); documentURL=document.URL; if (xtomt.indexOf(‘video/’) != 0 && document.getElementById(‘sumimg’)) { document.getElementById(‘sumimg’).innerHTML=’Image’; } if (xtomt.indexOf(‘video/’) == 0) { documentURL+=’#vionly=y’; // Object Url as the video source document.querySelector(“#main-video source”).setAttribute(‘src’, URL.createObjectURL(document.querySelector(“#files”).files[0])); // Load the video and show it thevideo.load(); // Load metadata of the video to get video duration and dimensions thevideo.addEventListener(‘loadedmetadata’, function() { // Set canvas dimensions same as video dimensions thecanvas.width = thevideo.videoWidth; thecanvas.height = thevideo.videoHeight; setTimeout(() => { //thecanvas.style.display = ‘inline’; //thecanvas.style.border = ‘2px solid pink’; thecontext.drawImage(thevideo, 0, 0, thevideo.videoWidth, thevideo.videoHeight); if (parent.document.getElementById(‘tdright’) || documentURL.indexOf(‘vionly=’) != -1) { if (!document.getElementById(‘ibchkbox’).checked && wponeokay) { if (document.getElementById(‘dtli’)) { if ((document.getElementById(‘dtli’).innerHTML + ‘~’).replace(‘<hr>’,”).trim().indexOf(‘</summary>~’) != -1) { if (document.getElementById(‘dtli’).innerHTML.indexOf(‘<hr’) != -1) { document.getElementById(‘dtli’).innerHTML=document.getElementById(‘dtli’).innerHTML.replace(‘<hr’, ‘<img title=”First frame of video” src=”‘ + thecanvas.toDataURL() + ‘”></img><hr’); } else { document.getElementById(‘dtli’).innerHTML+='<img title=”First frame of video” src=”‘ + thecanvas.toDataURL() + ‘”></img>’; } if (document.getElementById(‘sumimg’)) { document.getElementById(‘sumimg’).innerHTML=’Image <img onclick=”event.stopPropagation(); document.querySelector(‘ + “‘” + ‘video’ + “‘” + ‘).play(); setTimeout(dtlvize,2000); ” style=”width:60px;border:1px dotted yellow;” title=”First frame of video” src=”‘ + thecanvas.toDataURL() + ‘”></img>’; document.getElementById(‘dtli’).open=false; } } } ourwois=window.open(wp1,wp2); ourwois.document.write(‘<html><body><img title=”First frame of video” src=”‘ + thecanvas.toDataURL() + ‘”></img></body></html>’); ourwois.document.title=’First frame of video’; } else if (document.getElementById(‘dtli’)) { if ((document.getElementById(‘dtli’).innerHTML + ‘~’).replace(‘<hr>’,”).trim().indexOf(‘</summary>~’) != -1) { if (document.getElementById(‘dtli’).innerHTML.indexOf(‘<hr’) != -1) { document.getElementById(‘dtli’).innerHTML=document.getElementById(‘dtli’).innerHTML.replace(‘<hr’, ‘<img title=”First frame of video” src=”‘ + thecanvas.toDataURL() + ‘”></img><hr’); } else { document.getElementById(‘dtli’).innerHTML+='<img title=”First frame of video” src=”‘ + thecanvas.toDataURL() + ‘”></img>’; } if (document.getElementById(‘sumimg’)) { document.getElementById(‘sumimg’).innerHTML=’Image <img onclick=”event.stopPropagation(); document.querySelector(‘ + “‘” + ‘video’ + “‘” + ‘).play(); setTimeout(dtlvize,2000); ” style=”width:60px;border:1px dotted yellow;” title=”First frame of video” src=”‘ + thecanvas.toDataURL() + ‘”></img>’; document.getElementById(‘dtli’).open=false; } } } //document.body.style.background=’URL(‘ + thecanvas.toDataURL() + ‘)’; //document.body.style.backgroundRepeat=’no-repeat’; … Continue reading →
Posted in Animation, eLearning, Event-Driven Programming, Tutorials
|
Tagged audio, blob, browse, browsing, client, details, extension, file, file API, file extension, FileReader, first frame, frame, HTML, image, img, Javascript, media, mime, mimetype, operating system, programming, summary, thumbnail, tutorial, video
|
Leave a comment


Thanks. Since then, a Shower Songs project at https://www.rjmprogramming.com.au/HTMLCSS/shower_songs.html is an improvement regarding "Radio Play" on mobile platforms.