Synonymous With Delimitation Primer Tutorial

Synonymous With Delimitation Primer Tutorial

Synonymous With Delimitation Primer Tutorial

We make inhouse rules regarding our Apache/PHP HTML web applications around here, at RJM Programming, quite often with the focus on …

delimitation

… rules and our favourite delimitation character is probably the comma ( ie. , ) when it comes to data. Think “comma separated values” data, that can go on to be a spreadsheet … that sort of thinking.

The work of the recent YouTube API Caller Radio Play Playlist Songname Search List Repeats Tutorial regarding web browser address bar comma related typing of that type of data has set us to thinking …

Can we extend this thinking?

Can we make synonymous some web applications with a delimitation rule so that around RJM Programming URLs that end up on the address bar, these having no arguments of their own, if appended to, that are (non-argumentative) words typed to match with a delimitation pattern our RJM Programming 404.shtml can detect and redirect appropriately?

And something made us remember it is not just “,” (synonymous with Tabular Single Row Media Gallery web application) that could be involved with the, so far just, “comma” based logics, it’s the ” , ” (ie. 2 spaces comma two spaces) rules of our inhouse Video Commentary (and/or if prefixed by ” , ” our inhouse Song Lyric Faux Pas) SubRip subtitles YouTube API facing web application(s) (last talked about with YouTube SubRip Subtitles Emoji Tutorial) that can enter the mix here too.

And because there are two delimitation rules (both comma based ones) so far here, we start today, not only …

  • setting up a Tabular Single Row Media Gallery web application based bracket (ie. relevant strings have to start with { or [ or { and end with } or ] or } respectively) hosting system for it’s new playlist defining keyboard logic capabilities …

    function onkd(e) {
    var charx = e.which || e.keyCode;
    if (String.fromCharCode(eval('' + charx)) >= '1' && String.fromCharCode(eval('' + charx)) <= '8' && okdsofar == '') {
    endmatch='';
    document.getElementById('fplaythft').style.border='3px dotted green';
    document.getElementById('fplaythft').title+=' ... fired up ' + firedup[eval('' + String.fromCharCode(eval('' + charx)))].replace(/^Yacht\ /g,'Yacht++ ');
    maybeinplayscenario=maybeso(true);
    genreideas(String.fromCharCode(eval('' + charx)));
    maybeinplayscenario=false;
    } else if (String.fromCharCode(eval('' + charx)) == ',' && okdsofar == '') {
    okdsofar+=String.fromCharCode(eval('' + charx));
    endmatch='';
    } else if (String.fromCharCode(eval('' + charx)) == '~' && okdsofar == '') {
    okdsofar+=',';
    endmatch='';
    } else if (String.fromCharCode(eval('' + charx)) == '`' && okdsofar == '') {
    okdsofar+=',';
    endmatch='';
    } else if (String.fromCharCode(eval('' + charx)) == '(' && okdsofar == '') {
    endmatch=')';
    okdsofar+=',';
    } else if (String.fromCharCode(eval('' + charx)) == '[' && okdsofar == '') {
    okdsofar+=',';
    endmatch=']';
    } else if (String.fromCharCode(eval('' + charx)) == '{' && okdsofar == '') {
    okdsofar+=',';
    endmatch='}';
    } else if (String.fromCharCode(eval('' + charx)) < '1' || String.fromCharCode(eval('' + charx)) > '8' || okdsofar != '') {
    okdsofar+=String.fromCharCode(eval('' + charx));
    if (okdsofar.substring(0,1) == ',') {
    if ((endmatch == '' && (okdsofar.slice(-1) == '~' || okdsofar.slice(-1) == '`')) || okdsofar.slice(-1) == endmatch) {
    adbarpl=okdsofar.replace(/^\,/g,'').replace(/\~$/g,'').replace(/\`$/g,'').replace(/\}$/g,'').replace(/\]$/g,'').replace(/\)$/g,'');
    andgo=(adbarpl.toLowerCase().indexOf('notgo') != -1 ? false : true);
    okdsofar='';
    endmatch='';
    //alert('andgo=' + andgo);
    createplaylist(null);
    return true;
    }
    } else {
    endmatch='';
    if (okdsofar.trim() != '' && okdsofar.trim() != okdsofar && okdsofar.toLowerCase() != 'solo ') {
    maybeinplayscenario=maybeso(true);
    genreideas(okdsofar.replace(/^Mr\ /g,'Washington ').replace(/^MR\ /g,'Washington ').replace(/^mr\ /g,'Washington ').replace(/^The\ /g,'wrecking ').replace(/^THE\ /g,'wrecking ').replace(/^the\ /g,'wrecking ').trim());
    maybeinplayscenario=false;
    okdsofar='';
    }
    }
    }
    setTimeout(function(){ document.getElementById('thev').innerHTML='V'; }, 20000);
    return true;
    }

    … of the changed swipe_media.html Tabular Single Row Media Gallery web application … but also …
  • it will redirect if it finds ” , ” related entries

    function overprompt(blb, defvl) {
    var tdsare=[], itdone=false, baeis='', itds=0, lastpassesmustard=true;
    var oklast=['A','E','I','M','Q','U','Y','c','g','k','o','s','w','0','4','8'];
    var ivb=0;
    if (adbarpl != '') {
    outplist=adbarpl;
    adbarpl='';
    } else {
    outplist=prompt(blb, defvl);
    }
    if (outplist != null) {
    if (outplist.indexOf(' , ') == 0 && outplist.replace(/^\ \ \,\ \ /g,'').indexOf(' , ') != -1) {
    window.open('//www.rjmprogramming.com.au/HTMLCSS/song_lyric_faux_pas.html?inlist=' + encodeURIComponent(outplist.replace(/^\ \ \,\ \ /g,''),'_blank','top=55,left=55,height=600,width=600');
    outplist='';
    return '';
    } else if (outplist.indexOf(' , ') != -1) {
    window.open('//www.rjmprogramming.com.au/HTMLCSS/video_commentary.html?inlist=' + encodeURIComponent(outplist.replace(/^\ \ \,\ \ /g,''),'_blank','top=55,left=55,height=600,width=600');
    outplist='';
    return '';
    }
    }

    // rest of overprompt(blb, defvl) logic follows
    }

    … and with all this …
  • regarding the RJM Programming 404.shtml …
    1. it redirects for this too … and …
    2. it now works it that an RJM Programming URL, not a WordPress one (where a 404.php paradigm handles it’s error 404s), and not one with ? arguments can be scrutinized for these “Synonymous With Delimitation” web application redirecting ideas …

      if (document.URL.indexOf('rjmprogramming.com.au/HTMLCSS/swipe_media.htm') != -1) { // comma related ideas
      if (decodeURIComponent(document.URL).indexOf(' , ') != -1) {
      // Feed it to SubRip subtitles
      if (decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'')).indexOf(' , ') == 0) {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/song_lyric_faux_pas.html?inlist=' + encodeURIComponent(decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'')).replace(/^\ \ \,\ \ /g,'').replace(/^\%20\%20\%2C\%20\%20/g,''));
      } else {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/video_commentary.html?inlist=' + encodeURIComponent(decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'')));
      }
      exit;
      } else if (decodeURIComponent(document.URL).indexOf(',') != -1) {
      if (decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'')).toLowerCase().indexOf('notgo') != -1) {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/swipe_media.html?thelist=' + encodeURIComponent(decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace('notgo','').replace('NOTGO','').replace('Notgo','')));
      } else {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/swipe_media.html?andgo=y&thelist=' + encodeURIComponent(decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'')));
      exit;
      }
      } else if (decodeURIComponent(document.URL.split('rjmprogramming.com.au/HTMLCSS/swipe_media.htm')[1].replace(/^l/g,'')).toLowerCase().indexOf('ask') != -1) {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/swipe_media.html?ask=y';
      exit;
      }
      } else if (document.URL.replace('.au ','.au/').replace('.au%20','.au/').indexOf('rjmprogramming.com.au/') != -1) {
      var anybitstoignore='youll_never_ever_find_this';
      if (document.URL.replace('.au ','.au/').replace('.au%20','.au/').substring(0,1).replace('+','%') == '%') {
      anybitstoignore='youll_never_ever_find_this';
      } else if (document.URL.replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].split('%')[0].toLowerCase().replace('/','~').replace('.htm','~').replace('.php','~').indexOf('~') != -1) {
      var maxfind=Math.max(eval('' + document.URL.replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].split('%')[0].toLowerCase().indexOf('.htm')),eval('' + document.URL.replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].split('%')[0].toLowerCase().indexOf('.php')), eval('' + document.URL.replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].split('%')[0].toLowerCase().indexOf('/')));
      if (maxfind != eval('' + document.URL.replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].split('%')[0].toLowerCase().indexOf('/'))) {
      if (maxfind == eval('' + document.URL.replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].split('%')[0].toLowerCase().indexOf('.php'))) {
      maxfind+=4;
      } else if (maxfind == eval('' + document.URL.replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].split('%')[0].toLowerCase().indexOf('.html'))) {
      maxfind+=5;
      } else {
      maxfind+=4;
      }
      } else {
      while (decodeURIComponent(document.URL.replace(anybitstoignore,'').split('rjmprogramming.com.au/')[1].substring(maxfind)).indexOf('/') != -1) {
      maxfind++;
      }
      }
      anybitstoignore=document.URL.replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].substring(0,maxfind);
      }
      if (decodeURIComponent(document.URL.replace(anybitstoignore,'')).indexOf(' , ') != -1) {
      // Feed it to SubRip subtitles
      if (decodeURIComponent(document.URL.replace(anybitstoignore,'').replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].replace(/^index\.php/g,'').replace(/^index\.html/g,'').replace(/^index\.htm/g,'')).indexOf(' , ') == 0) {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/song_lyric_faux_pas.html?inlist=' + encodeURIComponent(decodeURIComponent(document.URL.replace(anybitstoignore,'').replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].replace(/^index\.php/g,'').replace(/^index\.html/g,'').replace(/^index\.htm/g,'')).replace(/^\ \ \,\ \ /g,'').replace(/^\%20\%20\%2C\%20\%20/g,''));
      } else {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/video_commentary.html?inlist=' + encodeURIComponent(decodeURIComponent(document.URL.replace(anybitstoignore,'').replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].replace(/^index\.php/g,'').replace(/^index\.html/g,'').replace(/^index\.htm/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'')));
      }
      exit;
      } else if (decodeURIComponent(document.URL.replace(anybitstoignore,'').replace('.au ','.au/').replace('.au%20','.au/')).indexOf(',') != -1) {
      if (decodeURIComponent(document.URL.replace(anybitstoignore,'').replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].replace(/^index\.php/g,'').replace(/^index\.html/g,'').replace(/^index\.htm/g,'')).toLowerCase().indexOf('notgo') != -1) {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/swipe_media.html?thelist=' + encodeURIComponent(decodeURIComponent(document.URL.replace(anybitstoignore,'').replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].replace(/^index\.php/g,'').replace(/^index\.html/g,'').replace(/^index\.htm/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace('notgo','').replace('NOTGO','').replace('Notgo','')));
      } else {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/swipe_media.html?andgo=y&thelist=' + encodeURIComponent(decodeURIComponent(document.URL.replace(anybitstoignore,'').replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].replace(/^index\.php/g,'').replace(/^index\.html/g,'').replace(/^index\.htm/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'').replace(/^\%20/g,'')));
      exit;
      }
      } else if (decodeURIComponent(document.URL.replace(anybitstoignore,'').replace('.au ','.au/').replace('.au%20','.au/').split('rjmprogramming.com.au/')[1].replace(/^index\.php/g,'').replace(/^index\.html/g,'').replace(/^index\.htm/g,'')).toLowerCase().indexOf('ask') != -1) {
      location.href='//www.rjmprogramming.com.au/HTMLCSS/swipe_media.html?ask=y';
      exit;
      }
      }

See what we mean, in the table below …

Redirects to YouTube API Radio Play suiting (web browser address bar containing) Born to Run*4,Jungleland*3
YouTube API Radio Play of Born to Run*4,Jungleland*3
Redirects to YouTube API Video Commentary suiting (web browser address bar containing) Born to Run*4 , Jungleland*3 … just calling … so far …
Video Commentary of Born of Run*4 , Jungleland*3
Redirects to YouTube API Song Lyric Faux Pas suiting (web browser address bar containing) , Born to Run*4 , Jungleland*3 … just calling … so far …
Song Lyric Faux Pas of , Born to Run*4 , Jungleland*3

Still to go, to go further, is to code within the SubRips for understanding a potential new incoming argument …


?inlist=[encoded " , " based data]

… based input, but that is for another day!

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

This entry was posted in Ajax, eLearning, Event-Driven Programming, Operating System, Tutorials and tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *