{"id":58572,"date":"2023-03-11T03:01:16","date_gmt":"2023-03-10T17:01:16","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=58572"},"modified":"2023-03-11T09:18:59","modified_gmt":"2023-03-10T23:18:59","slug":"keyboard-typing-practice-word-lists-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-typing-practice-word-lists-tutorial\/","title":{"rendered":"Keyboard Typing Practice Word Lists Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Keyboard Typing Practice Word Lists Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste_dict.jpg\" title=\"Keyboard Typing Word Lists Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Keyboard Typing Practice Word Lists Tutorial<\/p><\/div>\n<p>On most Linux or Unix or macOS operating systems there exists a folder \/usr\/share\/dict (usually) &#8230;<\/p>\n<blockquote cite='https:\/\/unix.stackexchange.com\/questions\/213628\/where-do-the-words-in-usr-share-dict-words-come-from#:~:text=The%20%2Fusr%2Fshare%2Fdict,Checker%20Oriented%20Word%20Lists)%20project.'><p>\nThe \/usr\/share\/dict\/words file is a symbolic link managed using the Debian \u201calternatives\u201d system. A common word list package providing that link is the wamerican package. The package documentation for wamerican states its word list comes from the SCOWL (Spell Checker Oriented Word Lists) project.\n<\/p><\/blockquote>\n<p>With this in mind, and <font color=blue>building on yesterday<\/font>&#8216;s <a title='Keyboard Typing Practice Choices Tutorial' href='#ktpct'>Keyboard Typing Practice Choices Tutorial<\/a> progress on our Keyboard Typing Tester web application <font color=purple>in today&#8217;s work we add<\/font> &#8230;<\/p>\n<ul>\n<li><font color=blue>quotes (thanks to <a target=_blank title='goodreads' ... thanks' href='https:\/\/www.goodreads.com\/quotes'>https:\/\/www.goodreads.com\/quotes<\/a>) &#8230; with &#8230;<\/font><\/li>\n<li><font color=blue>random thoughts (thanks to <a target=_blank title='https:\/\/randomthingstodo.com\/thoughts' href='https:\/\/randomthingstodo.com\/thoughts'>https:\/\/randomthingstodo.com\/thoughts<\/a>) &#8230; and &#8230;<\/font><\/li>\n<li><font color=blue>news headline (thanks to <a target=_blank title='https:\/\/newsapi.org' href='https:\/\/newsapi.org'>https:\/\/newsapi.org<\/a>)<\/font><\/li>\n<li><font color=purple>Names List<\/font><\/li>\n<li><font color=purple>Words List<\/font><\/li>\n<li><font color=purple>Phrases<\/font><\/li>\n<\/ul>\n<p> &#8230; input source dropdown options, all using inhouse (HTML <a target=_blank href='http:\/\/www.w3schools.com\/tags\/tag_iframe.asp' title='HTML iframe tag information from w3schools'>iframe<\/a>) means to populate the left hand textarea with \/usr\/share\/dict based content the user can practise typing out in the right hand textarea element with <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/no_copy_paste.html---GETME\" title=\"no_copy_paste.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.html---GETME\" title=\"no_copy_paste.htm\">no_copy_paste.htm<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.htm\" title=\"Click picture\">Keyboard Typing Practising web application<\/a> you can <a href='#ifncp'>also try below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-typing-practice-word-lists-tutorial\/'>Keyboard Typing Practice Word Lists Tutorial<\/a>.<\/p-->\n<hr>\n<p id='ktpct'>Previous relevant <a target=_blank title='Keyboard Typing Practice Choices Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-typing-practice-choices-tutorial\/'>Keyboard Typing Practice Choices Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Keyboard Typing Practice Choices Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste_choices.jpg\" title=\"Keyboard Typing Practice Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Keyboard Typing Practice Choices Tutorial<\/p><\/div>\n<p>Yesterday&#8217;s <a title='Keyboard Typing Practice Tutorial' href='#ktpt'>Keyboard Typing Practice Tutorial<\/a>&#8216;s web application gets improved today by adding to the variety of input typing ideas on top of the default &#8230;<\/p>\n<ul>\n<li>quotes (thanks to <a target=_blank title='goodreads' ... thanks' href='https:\/\/www.goodreads.com\/quotes'>https:\/\/www.goodreads.com\/quotes<\/a>) &#8230; with &#8230;<\/li>\n<li>random thoughts (thanks to <a target=_blank title='https:\/\/randomthingstodo.com\/thoughts' href='https:\/\/randomthingstodo.com\/thoughts'>https:\/\/randomthingstodo.com\/thoughts<\/a>) &#8230; and &#8230;<\/li>\n<li>news headline (thanks to <a target=_blank title='https:\/\/newsapi.org' href='https:\/\/newsapi.org'>https:\/\/newsapi.org<\/a>)<\/li>\n<\/ul>\n<p> &#8230; input data choices, that last option&#8217;s output being in JSON format, and so asking us to convert JSON to HTML.  Luckily for us, we can use a global substitution logic set and succeed because the HTML is not needed for display purposes but just as a data source that holds together in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/remote_files.php------GETME\">recently changed<\/a> <a target=_blank title='remote_files.php' href='http:\/\/www.rjmprogramming.com.au\/remote_files.php------GETME'>remote_files.php<\/a> (usage of PHP fopen URL <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/remote_files.php\" title=\"Click picture\">web application<\/a>) &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n$isjson=false;<br \/>\n<br \/>\nfunction lastjson($intl) {<br \/>\n  global $isjson;<br \/>\n  $outtl=$intl;<br \/>\n  if ($isjson) {<br \/>\n   $huhs=explode(']\"', $intl);<br \/>\n   if (sizeof($huhs) &gt; 1) {<br \/>\n     if (trim($huhs[1]) != \"\") {<br \/>\n       $outtl=\"\";<br \/>\n       for ($i=0; $i&lt;sizeof($huhs); $i++) {<br \/>\n         $outtl.='\"' . str_replace(\"\\\\\" . 'n', '&lt;br&gt;', str_replace(\"\\\\\" . 'r' . \"\\\\\" . 'n', '&lt;br&gt;',  explode('\"', explode(']\"', $intl)[$i] )[-1 + sizeof(explode('\"', explode(']\"', $intl)[$i]))]   )) . ']\"&lt;br&gt;';<br \/>\n       }<br \/>\n     }<br \/>\n   }<br \/>\n  }<br \/>\n  return $outtl;<br \/>\n}<br \/>\n<br \/>\nfunction fixforjson($iln) {<br \/>\n  global $isjson;<br \/>\n  if ($isjson) {<br \/>\n    $wasiln=$iln;<br \/>\n    $iln=str_replace('},{','&lt;\/td&gt;&lt;\/tr&gt;&lt;tr&gt;&lt;td&gt;',$iln);<br \/>\n    $iln=str_replace('}]}','&lt;\/td&gt;&lt;\/tr&gt;&lt;\/table&gt;',$iln);<br \/>\n    $iln=str_replace('{[{','&lt;table&gt;&lt;tr&gt;&lt;td&gt;',$iln);<br \/>\n    $iln=str_replace(':[{',':&lt;\/td&gt;&lt;\/tr&gt;&lt;\/thead&gt;&lt;tr&gt;&lt;td&gt;',$iln);<br \/>\n    if (substr($iln,0,1) == '{') { $iln='&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;td&gt;' . substr($iln,1); }<br \/>\n    $iln=str_replace('\":{','\":&lt;span&gt;',$iln);<br \/>\n    $iln=str_replace('},','&lt;\/span&gt;,',$iln);<br \/>\n    $iln=str_replace(',\"','&lt;\/td&gt;&lt;td&gt;\"',$iln);<br \/>\n    $iln=str_replace('&gt;\"',' class=\"',$iln);<br \/>\n    $iln=str_replace('\":','\"&gt;',$iln);<br \/>\n    \/\/if (file_exists('iln.html')) {<br \/>\n    \/\/file_put_contents('iln.html', file_get_contents('iln.html') . \"\\n\\n\" . $iln . \"\\n\\n\" . $wasiln);<br \/>\n    \/\/} else {<br \/>\n    \/\/file_put_contents('iln.html', $iln . \"\\n\\n\" . $wasiln);<br \/>\n    \/\/}<br \/>\n  }<br \/>\n  return $iln;<br \/>\n}<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; worked via a new dropdown (select) HTML element in <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/no_copy_paste.html--GETME\" title=\"no_copy_paste.html\">the changed<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.html--GETME\" title=\"no_copy_paste.htm\">no_copy_paste.htm<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.htm\" title=\"Click picture\">Keyboard Typing Practising web application<\/a> you can <a href='#ifncp'>also try below<\/a>.<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-typing-practice-choices-tutorial\/'>Keyboard Typing Practice Choices Tutorial<\/a>.<\/p-->\n<hr>\n<p id='ktpt'>Previous relevant <a target=_blank title='Keyboard Typing Practice Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-typing-practice-tutorial\/'>Keyboard Typing Practice Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Keyboard Typing Practice Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/keyboard_typing_practice.jpg\" title=\"Keyboard Typing Practice Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Keyboard Typing Practice Tutorial<\/p><\/div>\n<p>Yes, as a lot of you will have guessed, from <a title='Paste Disabling Primer Tutorial' href='#pdpt'>Paste Disabling Primer Tutorial<\/a>, that today we use it in a new &#8220;Keyboard Typing Practice&#8221; web application, knowing that we&#8217;ll be testing typing rather than &#8220;copy\/pasting&#8221;.<\/p>\n<p>And another <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/remote_files.php------GETME\">recently changed<\/a> <a target=_blank title='remote_files.php' href='http:\/\/www.rjmprogramming.com.au\/remote_files.php------GETME'>remote_files.php<\/a> (usage of PHP fopen URL <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/remote_files.php\" title=\"Click picture\">web application<\/a>) last talked about at <a target=_blank title='PHP Remote Files Refined Containing Attribute Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/php-remote-files-refined-containing-attribute-tutorial\/'>PHP Remote Files Refined Containing Attribute Tutorial<\/a> joins us, helping us randomize a quote that the user is asked to type, and we calculate the user &#8230;<\/p>\n<ul>\n<li>typing <i>words per minute<\/i> rate<\/li>\n<li>typing <i>characters per minute<\/i> rate<\/li>\n<li>typing <i>accuracy<\/i> percentage &#8230; aim for 100%<\/li>\n<li>typing <i>retake<\/i> percentage &#8230; aim for 0%<\/li>\n<\/ul>\n<p> &#8230; as guidelines the user can note to monitor for improvement.<\/p>\n<p>So try our <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/no_copy_paste.html-GETME\" title=\"no_copy_paste.html\">&#8220;how we got there from proof of concept&#8221;<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.html-GETME\" title=\"no_copy_paste.htm\">no_copy_paste.htm<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.htm\" title=\"Click picture\">Keyboard Typing Practising web application<\/a> you can also try below &#8230;<\/p>\n<p><iframe id=ifncp src=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.htm\" style=\"width:100%;height:800px;\"><\/iframe><\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-typing-practice-tutorial\/'>Keyboard Typing Practice Tutorial<\/a>.<\/p-->\n<hr>\n<p id='pdpt'>Previous relevant <a target=_blank title='Paste Disabling Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/paste-disabling-primer-tutorial\/'>Paste Disabling Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.html\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Paste Disabling Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.jpg\" title=\"Paste Disabling Primer Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Paste Disabling Primer Tutorial<\/p><\/div>\n<p>We have an unusual request to make to even consider a new project, which we&#8217;ll reveal over time, and which we want to take on, today.  It&#8217;s a requirement to disable any &#8220;paste&#8221; parts (of the copy\/cut\/paste paradigm) to the use of any HTML elements the event logic is applied too.<\/p>\n<p>Luckily for us a <a target=_blank title='Google search of set textarea to not allowing copy and paste' href='https:\/\/www.google.com\/search?q=set+textarea+to+not+allowing+copy+and+paste&#038;rlz=1C5CHFA_enAU973AU973&#038;sxsrf=AJOqlzVofxNPAu2UWNRy8gZUww6LxNh_Gw%3A1678051100564&#038;ei=HAcFZIaMIpDF4-EPwtC2cA&#038;ved=0ahUKEwiGio6-28X9AhWQ4jgGHUKoDQ4Q4dUDCA8&#038;uact=5&#038;oq=set+textarea+to+not+allowing+copy+and+paste&#038;gs_lcp=Cgxnd3Mtd2l6LXNlcnAQAzIFCAAQogQyBQgAEKIEOggIABCGAxCwAzoHCCMQsAIQJzoKCCEQoAEQwwQQCkoECEEYAVDEB1jQKGDkM2gBcAB4AIAB7wKIAe8MkgEHMC40LjEuMpgBAKABAcgBA8ABAQ&#038;sclient=gws-wiz-serp'>Google search &#8220;set textarea to not allowing copy and paste&#8221;<\/a> got us to <a target=_blank title='Disable pasting text into HTML form' href='https:\/\/stackoverflow.com\/questions\/1226574\/disable-pasting-text-into-html-form'>javascript &#8211; Disable pasting text into HTML form &#8211; Stack Overflow<\/a> webpage, thanks, which helped us out here in compiling our first draft <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.html_GETME\" title=\"no_copy_paste.html\">&#8220;proof of concept&#8221; no_copy_paste.html<\/a> <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.html\" title=\"Click picture\">HTML\/Javascript web application<\/a> you can also try below &#8230;<\/p>\n<p><iframe src=\"http:\/\/www.rjmprogramming.com.au\/no_copy_paste.html\" style=\"width:100%;height:800px;\"><\/iframe><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58545' onclick='var dv=document.getElementById(\"d58545\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/paste\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58545' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58550' onclick='var dv=document.getElementById(\"d58550\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/keyboard\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58550' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58563' onclick='var dv=document.getElementById(\"d58563\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/dropdown\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58563' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d58572' onclick='var dv=document.getElementById(\"d58572\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/word\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d58572' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>On most Linux or Unix or macOS operating systems there exists a folder \/usr\/share\/dict (usually) &#8230; The \/usr\/share\/dict\/words file is a symbolic link managed using the Debian \u201calternatives\u201d system. A common word list package providing that link is the wamerican &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/keyboard-typing-practice-word-lists-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,37],"tags":[4271,1824,4273,326,2971,367,576,587,652,664,673,710,2505,4272,4267,907,939,4269,4270,997,3184,1866,1262,4268,1319,1671,3594,1452,4224],"class_list":["post-58572","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-tutorials","tag-accuracy","tag-character","tag-dict","tag-dictionary","tag-disable","tag-dropdown","tag-html","tag-iframe","tag-javascript","tag-json","tag-keyboard","tag-list","tag-name","tag-name-list","tag-onpaste","tag-paste","tag-phrase","tag-practice","tag-practising","tag-programming","tag-quote","tag-select","tag-textarea","tag-touch-typing","tag-tutorial","tag-type","tag-typing","tag-word","tag-word-list"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58572"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=58572"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58572\/revisions"}],"predecessor-version":[{"id":58579,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/58572\/revisions\/58579"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=58572"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=58572"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=58572"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}