-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.js
More file actions
93 lines (90 loc) · 8.2 KB
/
Copy pathapp.js
File metadata and controls
93 lines (90 loc) · 8.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
const tests = [
"'Ha! ha! happy to catch you just at dinner-time. I hope our friend Thud has left something for me!' cried the jovial doctor, as he laid down his sun-hat and umbrella, and wiped his heated forehead. Then, advancing to the table, Pinfold greeted his god-daughter in very paternal fashion. The doctor considered himself to be a privileged person, one who need never wait for an invitation, being always certain to find a welcome. ",
"In the meanwhile, Mr. Swift, if he did not improve any, at least held his own. This the doctors said was a sign of hope, and, though Tom was filled with anxiety, he tried to think that fate would be kind to him, and that his father would recover. Dr. Hendrix left, saying there was nothing more he could do, and that the rest depended on the local physicians, and on the nurse.'Und ve vill do our duty!' ponderously exclaimed Dr. Kurtz. 'You go off to dot bird race, Dom, und doant vorry. Ve vill send der with-out-vire messages to you venever dere is anyt'ing to report. Go mit a light heart! ",
"Mrs. Bates, the widow of a former vicar of Highbury, was a very old lady, almost past every thing but tea and quadrille. She lived with hersingle daughter in a very small way, and was considered with all theregard and respect which a harmless old lady, under such untowardcircumstances, can excite. Her daughter enjoyed a most uncommon degreeof popularity for a woman neither young, handsome, rich, nor married.Miss Bates stood in the very worst predicament in the world for having much of the public favour; and she had no intellectual superiority to make atonement to herself, or frighten those who might hate her into outward respect. She had never boasted either beauty or cleverness. ",
"Proofreader applicants are tested primarily on their spelling, speed, and skill in finding errors in the sample text. Toward that end, they may be given a list of ten or twenty classically difficult words and a proofreading test, both tightly timed. The proofreading test will often have a maximum number of errors per quantity of text and a minimum amount of time to find them. The goal of this approach is to identify those with the best skill set ",
"When we talk about motivating others, the justification is the end result (either we want to avoid the pain or go towards pleasure) or what we want to get the person to do. How we achieve the end result, are our alternatives. As a manager, we need to understand the other person's justification and then come up with alternatives. We may then choose the right alternative. However, in general, we choose the first or the emotionally satisfying one. Typically people stop at this level of analysis and start to act. But a good manager would think of the following also: Will the action guarantee the consequence? What about other unintended consequences? This requires a certain experience. Are we capable of doing this action? Intention and the selection of the most ideal alternative do not guarantee execution, if we do not have the skills and the experience. Most motivational tactics fail, because without execution capability, they is only wishful thinking. ",
"Business meetings, and professional recordings can contain sensitive data, so security is something a transcription company should not overlook when providing services. Companies should therefore follow the various laws and industry best practice, especially so when serving law firms, government agencies or courts. Medical Transcription specifically is governed by HIPAA, which elaborates data security practices and compliance measures to be strictly followed, failure of which leads to legal action and penalties. Transcription security includes maintaining confidentiality of the data through information security practices including limiting access with passwords and ensuring a secure environment for data and appropriate methods of disposal of all materials and deletion of files. Personnel may be required to sign non-disclosure agreements on a regular basis as well as take various oaths regarding confidentiality and accuracy. ",
"A paralegal is a person trained in legal matters who performs tasks requiring knowledge of the law and legal procedures. A paralegal is not a lawyer but can be employed by a law office or work freelance at a company or law office. Paralegals are not allowed to offer legal services directly to the public on their own and must perform their legal work under an attorney or law firm. ",
"Web designers are expected to have an awareness of usability and if their role involves creating mark up then they are also expected to be up to date with web accessibility guidelines. The different areas of web design include web graphic design; interface design; authoring, including standardised code and proprietary software; user experience design; and search engine optimization. ",
"A freelancer or freelance worker, is a term commonly used for a person who is self-employed and is not necessarily committed to a particular employer long-term. Freelance workers are sometimes represented by a company or a temporary agency that resells freelance labor to clients; others work independently or use professional associations or websites to get work. While the term 'independent contractor' would be used in a higher register of English to designate the tax and employment classes of this type of worker, the term freelancing is most common in culture and creative industries and this term specifically motions to participation therein. Fields, professions, and industries where freelancing is predominant include: music, writing, acting, computer programming, web design, graphic design, translating and illustrating, film and video production and other forms of piece work which some cultural theorists consider as central to the cognitive-cultural economy. ",
"Closed captions were created for deaf or hard of hearing individuals to assist in comprehension. They can also be used as a tool by those learning to read, learning to speak a non-native language, or in an environment where the audio is difficult to hear or is intentionally muted. ",
"This is the smallest test. ",
"This is the smallest test. ",
"This is the smallest test. ",
"This is the smallest test. ",
"This is the smallest test. ",
"This is the smallest test. ",
"This is the smallest test. "
]
let num = Math.floor(Math.random()*19);
let words = tests[num].split(" ");
let letters = tests[num].split("");
let seen = document.getElementById("Check");
let single = document.getElementById("single");
let text = document.getElementById("InpText");
let timer = document.getElementById("count");
seen.innerText = tests[num];
let l = 0;
let w = 0;
let ans = "";
let interval;
let val;
let timeCheck = false;
let temp=0;
function time(){
val = parseInt(timer.value);
timeCheck = true;
interval = setInterval(() => {
timer.value = ++val;
}, 1000);
}
function highlight(word, work)
{
ans = "";
for(let i=0;i<words.length;i++)
{
if(i<word)
ans += `<span style = "color: green;">${words[i]}</span> `;
else if(i==word)
{
if(work == 0)
ans += `<span style = "color: blue;">${words[i]}</span> `;
else if(work == 1)
ans += `<span style = "color: green;">${words[i]}</span> `;
else
ans += `<span style = "color: red;">${words[i]}</span> `;
}
else
ans += `<span>${words[i]}</span> `;
}
seen.innerHTML = ans;
}
single.innerText = words[w];
text.addEventListener("keydown",(e)=>{
if(timeCheck == false)
time();
if(w+1 == words.length){
clearInterval(interval);
alert("This has ended");
return;
}
if(letters[l] == e.key ){
l++;
single.style.color = "Green";
highlight(w,0);
if(e.key == " " && words[w] == text.value.trim()){
text.value = "";
highlight(w,1);
single.innerText = words[++w];
temp = l;
}
}
else
{
text.value = "";
l=temp;
highlight(w,-1);
single.style.color = "Red";
}
})