China vs America (Sea Turtle Diaries)
schools
coffee
dating
marriage
drinks temperature
education
dress style
lessons I’ve learned from my past
China vs America (Sea Turtle Diaries)
schools
coffee
dating
marriage
drinks temperature
education
dress style
ref –
Present Perfect: Has/Have + Past Participle
e.g. He has passed his driving test
Present Perfect Continuous: Has/Have + Been + Present Participle
e.g. She has been reading a book
The broad rule is that although both tenses relate to the fact that something is being referred to in the past, the present perfect refers to something that has completed and the focus is on the result of that action, but the present perfect continuous refers to something that is continuing in the present and the focus is on the duration.
In some cases we can choose either of the tenses.
This is usually the case when we are referring to biographical type facts about someone’s life, often with the words for and since or some other time frame.
For example:
He’s eaten red meat his whole life
He’s been eating red meat his whole life
He’s worked for the company since he was a teenager
He’s been working for the company since he was a teenager
I’ve lived here for three years
I’ve been living here for three years
They’ve studied English since high school
They’ve been studying English since high school
These facts in the examples above tend to be long-term. However, we tend to use the present perfect continuous to emphasize the fact that an event or activity has been happening over a period of time that is relatively short-term.
I’ve been playing tennis for two hours (short-term)
Compare the long-term, which could be either present perfect or present perfect continuous:
I’ve played tennis most of my life (long-term)
I’ve been playing tennis most of my life (long-term)
Another difference between the present perfect and the present perfect continuous is when we want to show whether something is completed or not.
The continuous tense shows that it is not completed.
Compare these:
He has read the book about JFK (the book is finished)
He has been reading the book about JFK (the book’s still being read)
She has taken the medicine (action completed)
She has been taking the medicine (referring to medicine that is being taken over a period of time)
This is similar to the previous one, but it shows the continuous form can be used to show that something is repeated:
Your wife has phoned you (may have been only once)
Your wife has been phoning you – (she has rung several or many times)
I’ve gone to the local swimming pool (could just be once)
I’ve been going the local swimming pool (indicates going there on several or many occasions)
State verbs are those that represent a state of mind, such as thinking, knowing, wanting, seeing etc.
Though there are some we can use in the present perfect continuous tenses,
generally most are cannot be used in the continuous tense and
so they are only used with the present perfect:
For instance, we don’t say this:
She has been knowing him for 3 days (X)
He has been seeing the car go past every day (X)
We would say:
She has known him for 3 days (√)
He has seen the car go past every day (√)
ref – https://www.natterandramble.co.uk/future-perfect-continuous-uses-form-timeline/
[will] + [have] + [been] + [present participle]
The future perfect continuous depicts past/present/future actions that continue up until a certain point. Like the future perfect and future continuous, it’s used with a specified time.
sentence: By October, we will have been working on the project for over a year.
explanation: They started working on this project in the past or present.
It will continue up to October, which marks their 1 year.
sentence: In ten minutes, my parents will have been waiting in traffic for four hours.
explanation: Their parents were stuck in traffic. (past) When it continue up to a certain point (ten minutes), they will have waited for 4 hours.
ref – https://www.natterandramble.co.uk/future-continuous-form-uses-timeline/
[will] + [be] + verb [present participle ] + ing
Use the future continuous tense for future actions happening over a period of time, especially when a specific time is mentioned. The future continuous tense also shows more certainty and likelihood than the simple future.
By this time tomorrow, I will be drinking margaritas on the beach.
We will be attending a meeting from noon until 3 p.m.
ref – https://www.natterandramble.co.uk/future-simple-tense-form-uses-timeline/
Use the simple future for actions that have not happened yet but will later. To form the simple future, just place the modal verb will before the root form of the main verb. (Note that if the action will happen in the near future, you can use the present continuous instead.)
She will be president one day.
I will not go to the wedding without a date!
ref – https://www.natterandramble.co.uk/past-perfect-continuous-timeline-form-uses/
[had] + [been] + [present participle]
The past perfect continuous tense is used just like the past (perfect), except it describes ongoing actions that happened in the past instead of a one-time occurence. It’s often used with the words when, until, and before to connect it to another past action.
The past perfect continuous is a verb tense that indicates something that
began in the past, continued in the past, and also ended at a defined point in the past
note:
The past perfect tense uses the past participle—in this case, been—with the word had. Unlike the present perfect tense, the word had is used regardless of what the subject is.
For example, had been is correct in both of these sentences despite the fact that one sentence has a singular subject and the other has a plural subject:
The cat had been quiet all morning.
The cats had been quiet all morning.
It is combined with the present participle of verbs to form the past perfect continuous tense. For example:
By the time I arrived, they had been [waiting for hours] (present particple of verb ‘wait’).
[He had been drinking milk out the carton] when [Mom walked into the kitchen].
Both
His milk drinking began in the past, continued in the past, and ended at a defined point in the past when his Mom walked into the kitchen.
I [had] [been] [working at the company] for five years when I got the promotion.
He began workking at the compnay, continued in the past, and ended that line of work when he got the promotion.
Before he got his first job as a writer, he [had] [been] [working as a proofreader].
He began as a proofreader, continued in the past, and ended at a defined point in the past when he got his job as a writer.
I [had] [been] [living on my friend’s couch] for a year until they kicked me out.
The person began living at his friend’s couch, continued in the past, and ended in the past, when they kicked him out.
We [had] [been] [trying to open the door] for five minutes when Jane found her key
We tried opening the door in the past, continued in the past, and ended in the past when Jane found her keys.
It [had] [been] [raining hard] for several hours and the streets were very wet.
It started to rain, continued to rain, and after several hours, it stopped raining. Due to this, the streets were very wet.
Her friends [had] [been] [thinking of calling the police] when she walked in.
Her friends considered calling the police, which started in the past, continued in the past, and ended in the past at the exact point when she walked in.
So, what’s the difference between the past tense and the past participle?
Basically, the past tense is a tense while the past participle is a specific verb form used in the past and present perfect tenses.
The past participle is not a tense. It’s a form of a verb and can’t be used on its own. You need an auxiliary verb, such as “have” or “had.” Because of this, the past participle is commonly used as a compound verb.
Let’s take a look at two words in the past tense and then the past participle.
Past tense:
I lived in the United States for seven years.
I listened to this song five times.
We talked about this book.
I ate breakfast at 10 o’clock yesterday.
Past participle:
I had lived in the United States for seven years.
I have listened to this song five times.
The book has been talked about.
I had eaten breakfast by 10 o’clock yesterday.
First we have the controls. We have a button to record, and stop the recording.
1 2 |
<button id="recordButton">Record</button> <button id="stopButton">Stop</button> |
Then we have a recordingsList list tag to hold all the recordings.
1 2 |
<p><strong>Recordings:</strong></p> <ol id="recordingsList"></ol> |
We create a new AudioContext, which we use it as a parameter in Recorder class.
We must implement the onAnalysed callback handler.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
const audioContext = new (window.AudioContext || window.webkitAudioContext)(); const recorder = new Recorder(audioContext, { // An array of 255 Numbers // You can use this to visualize the audio stream // If you use react, check out react-wave-stream onAnalysed: data => { // console.log(data) } }); let isRecording = false; let myBlob = null; navigator.mediaDevices.getUserMedia({audio: true}) .then(stream => recorder.init(stream)) .catch(err => console.log('Uh oh... unable to get stream...', err)); |
Only then we can start to use the recorder
start record handler
1 2 3 4 |
function startRecording() { recorder.start() .then(() => isRecording = true); } |
stop record handler
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
function stopRecording() { recorder.stop() .then(({blob, buffer}) => { myBlob = blob; var recordingsList = document.getElementById("recordingsList"); var url = URL.createObjectURL(myBlob); var au = document.createElement('audio'); au.controls = true; au.src = url; var li = document.createElement('li'); // create the list item li.appendChild(au); //add the new audio element to li li.appendChild(document.createTextNode(" "))//add a space in between //add the li element to the ol recordingsList.appendChild(li); }); } |
Assign handlers to event listeners.
1 2 3 4 |
var recordButton = document.getElementById("recordButton"); var stopButton = document.getElementById("stopButton"); recordButton.addEventListener("click", startRecording); stopButton.addEventListener("click", stopRecording); |
Test url:
https://106.15.137.49/recorderJS/recorderJS/index.html
Audio Recorder used here works for almost all browsers if we run it as html5 web page.
For verification, it has been tested on:
– Apple 7 (Joy’s) Apple 14 (Ray’s)
– Wechat browser
– Chrome
– Safari
– Huawei browsers (latest updates)
– QQ browser
1) We remove all recording audios from the client app.
2) Instead, we’ll have a homework link, which opens the html5 web page (external).
In that html5 web page, we’ll list the homework words and sentences, then have them record it.
You can run that project and play around. But please remember the step order
1) create word – fill in word data, then press submit. When ID appears, the operation is successful.
2) create example – add example, fill in data, then press submit. When ID appears, the operation is successful.
3) update word – update new data in word, then press submit. No response yet.
4) update example – update new data in example, then press submit. No response yet.
5) delete example/word – just press delete button. UI will update