如果第三方接口获取到的数据,返回为csv文档时,可以先把csv文档保存到本地某路径,再通过fs的createReadStream读取数据,保存到本地数据库。
1 | const processConversations = async (dateObj) => { |
如果第三方接口获取到的数据,返回为csv文档时,可以先把csv文档保存到本地某路径,再通过fs的createReadStream读取数据,保存到本地数据库。
1 | const processConversations = async (dateObj) => { |
当想要快速查找到自己想要的数据时,可以用索引。通过索引,可以在检索数据时直接定位到,省去时间,就好比一本书前面的目录,能让你快速找到自己想看的内容。如果索引包含多列,那么按照从左到右的顺序,即最左前缀列来进行。
1 | ADD UNIQUE INDEX uni_sf (sf); |
也可以给列添加唯一约束,而不创建唯一索引,列具有唯一性。
1 | ADD CONSTRAINT uni_name UNIQUE (name); |
1 | ALTER TABLE table_name ADD PRIMARY KEY (column); |
1 | ALTER TABLE table_name ADD INDEX index_name (column); |
测试、UI要求的会比较高,比如滑动图标改成自定义图片等,所以传统的@react-native-community/slider已经不能满足所需,所以采取自定义形式,在网上找了很久才发现的一个宝藏依赖:https://github.com/miblanchard/react-native-slider
1 | import React, { PureComponent } from 'react'; |
1 | import { Slider } from '所放的上述组件路径' |
最开始我想的是有多少个输入框,就放多少个input,做完会发现有各种bug。比如键盘突然消失、没聚焦下个输入框、操作不丝滑等。
正确思路是一个输入框就够了,然后通过改变样式(间隔、高亮)来实现,就是表面看起来是六个输入框,本质上只有一个input
1 | <view class="w-80 h-100 rad-10 b-a-9 tc f-50" v-for="(item,index) in 6"> |
1 | data(){ |
https://blog.csdn.net/u011423258/article/details/106683068?spm=1001.2014.3001.5506
在 TCP 通道里传输的数据只能是二进制形式的,所以将数据结构或对象转化成二进制的形式就叫序列化。反过来就叫反序列化,他们之间的规则就叫协议。
全称是Remote Procedure Call, 中文名字叫远程过程调用。大部份的 RPC 是基于TCP的。具体实现流程如下:
1、前端通过 Proxy 代理调用相应的接口, Proxy 将 RPC 的服务名,方法名,参数等信息转换成 RPC Request 对象,交给 RPC 框架
2、RPC 框架通过 RPC 协议将 RPC Request 对象序列化成二进制形式
3、RPC 通过 TCP 通道把二进制数据传递给后端
4、后端将二进制数据反序列化成 RPC Request 对象
5、后端将反序列化后的数据对应到自己写的方法内,传入参数,获取数据,将获取后的数据进行封装,封装成 RPC Response 交给 RPC 框架
6、RPC 框架通过 RPC 协议将 RPC Response 对象序列化成二进制形式, 通过 TCP 通道传递给前端
6、前端将收到的二进制数据反序列化成 RPC response 对象,将结果通过 Proxy 返回给业务代码
The intonation.(语调)
Express the different feelings of the speaker.
We often use the falling tone when we read a statement, a special question, an exclamatory or imperative sentence(祈使句、感叹句). We often use rising tone when we ask a Yes/No question. We often use rising-falling tone to read an alternative question and a coordinate clause(选择疑问句、并列句). There are two parts in a tag question(反义疑问句). The first part is often in a falling tone and for second part, there are two cases. If we are not sure about the question, we often use a rising tone. If we are sure about that, we offen use a falling tone.
We choose different intonations to express different feelings and moods.
The word stress(单词重音)
Read words more exactly
When we say a word with more than one syllable, some of the syllables need to be stressed.
When we read two-syllable words, normally we stress the first syllable for nouns, and stress the second syllable for verbs. As for the multi-syllable words, we stress the third from the bottom.
The sentence stress(句子重读)
Draw attention to certain information.
We usually stress the lexical words such as nouns, verbs, adjectives, adverbs and numbers. We don’t stress the function words such as a, the, is, of and so on. Besides, you can stress some information you want to emphasis.
We should change it according to the situation and feelings of the speaker.
The liaison/ˈlēəˌzän,lēˈāˌzän//Word linking.(连读)
Speak English more fluently and naturally.
In one sense group, we can read the two words together if the former word ends with a consonant/ˈkänsənənt/, a vowel or “r” sound, and the following word begins with a vowel. If the two words finish and start with the same consonant, we only read one of the consonants.
The two words must be in one sense group.
incomplete plosion/‘pləʊʒ(ə)n/(不完全爆破)
Speak English more fluently and naturally.
There are six plosive sounds /t/ /d/ /p/ /b/ /k/ /g/ in English.When two consonants of them are next to each other, we read the former sound silently.
The two words must be in one sense group.
Weak form(弱读)
speak English more fluently and naturally.
Some words often appear in a weak form such as function words, articles, auxiliary verbs and modal verbs.
there are mainly three ways to change function words to weak forms. They are shortening, elision[ i’liʒən ] and vowel changed to schwa [ʃwɑ:] sound.
Assimilation(同化)
We use it to speak English more fluently and naturally.
As we can see, Two different sounds affect each other and become more alike.
/s+ j/ -> /F/this year,/d+j/ -> /d3/ would you
Sense group(意群)
We use it to make our expression more easily to understand.
As we can see, a sentence may consists of several groups according to meaning or structure. Each group is called a sense group. It can be a word, a phrase, a clause. After a sense group, there should be a short pause.
We should remind that we should change it according to the situation and feelings of the speaker.
The pause(停顿)
We use to speak English more fluently and naturally.
As we can see, in a long sentence, we should pause several times according to the sense group. Normally, we pause based on meaning and grammatical structure.
We should remind that there should be no pause in a sense group. Where to pause also depends on the situation and the feelings of the speaker.
Dear Judges, Now I’ll start the lesson. Good morning, Boys and girls. How are you today? Good? Fine? I’m fine, too. Before the class, Let’s sing a song together. If you can sing, sing along with me . “You are my sunshine, my only sunshine, you make me happy.” Do you feel better? Great, let’s start the lesson.
At the beginning, I’ll show you a video, and you should try to answer the question: What can you see in the video? Who would like to try? Blair, please. You saw the girl had much fun. She had dinner and went shopping with friends. Thank you, Blair, you set a good example for us. You know so much about this topic. Do you want to learn more? Today, let’s learn a new lesson — How was your day off.
OK, everyone, here is a passage. I’ll read it for you. You should listen carefully and tell me the main idea, OK? Here we go! …….OK, Please share your ideas. Jenny, you please. It talks about the Bermuda Triangle, where a number of planes and ships disappeared.Do you agree? I totally agree with her.
Boys and girls, since we already know the content of the letter, Let’s look at the structure of the letter.There are 4 parts of it, right?
The first one is to whom. We call it salutation/ˌsalyəˈtāSH(ə)n/, such as Hi Henry, Dear Lucy and so on. The second part is body part. You can write whatever you want. The third part, we often add complementary close/wishes, such as ‘yours’, ‘sincerely’. The last part is from whom, we call it signature. Am I clear? So when we write a letter, we can imitate it. Brilliant!
the first part is introduction. It’s a fun day last Saturday. The second part is main body, it’s about what they did in the morning, afternoon and so on. The third part is conclusion. So if we want to write out our everyday life, we can imitate this structure, OK?
Before writing, let’s have a brainstorm. As Tom, what information can you write to reply to Nick’s letter? You can have a discussion in groups. 3 minutes for you. Stop! Who can try, this boy? You will write some activities during camping. Your ideas are wonderful. Bravo! Thank you.
OK,I can see you all have many ideas. How about writing down your ideas with the structure we just learned. You have 2 minutes to design your outline.OK, time is up. Finished? I see all of you nod your heads. Very good!
It’s time to finish the whole letter. While writing, you should pay attention to the grammar.We should use simple past tense to talk about the experience in the past.And for the signature, you should write”Tom”. If you have any problems, just raise your hands, and I will help you. Are you ready? Let’s do it.
Have you finished your writing? Show me your hands. Well done. Next, go over your writing one more time and then exchange it with your group members.Try to check and correct the mistakes, got it? You have 2 minutes.
Stop here.Who wants to share your writing? Cindy, please. Wow, good pronunciation. You state the story vividly. The logic is clear! OK, anyone else? Tony. Please. Oh, you want to present Tina’s article.Can you read it? Very good. Thank you, Tony. Guys, Let’s look at Tina’s work together. “Tom” went to a mountain for camping. I think her article is perfect. We can learn a lot from it. Boys and girls, you all did a good job!
How time files! The class is almost over. Before ending our class, let’s have a summary. Who can summarize what we have learned this class? Fiona please. Very good. I hope you can apply what we have learned in your daily life so that we can improve our reading and speaking ability, right?
Our homework is as follows: You should finish the exercise book and search for more information about ask your parents about their day off. Next class, we will share them together.
Class is over, see you next time.
Dear Judges, Now I’ll start the lesson. Good morning, Boys and girls. How are you today? Good? Fine? I’m fine, too. Before the class, Let’s sing a song together. If you can sing, sing along with me . “You are my sunshine, my only sunshine, you make me happy.” Do you feel better? Great, let’s start the lesson.
基本跟上一篇一样,只是换了问题,根据材料的主题来问问题。比如:little prince and harry porter. Today, we’re going to learn a new grammar about it , the present perfect tense.
Now boys and girls, let’s have a prediction according to the title and the conversation on your book. I will read for you.When you listen, think about this question: What’s the material mainly about? Try to think out as many answers as you can.(let’s begin,…..)OK, who wants to have a try?Justin, you please. The passage is about some books they have read. Nice try! Do you agree? OK, maybe you are right. You got the correct answer.
Now boys and girls, let’s have a prediction according to the title and the pictures on your book. Take a guess:What’s the passage mainly about? Try to think out as many answers as you can. OK, who wants to have a try?Justin, you please. The passage is about a cartoon Mickey Mouse. Nice try! Do you agree? OK, maybe you are right.Next, Let’s find out the truth in this passage.
All right guys, it’s time to learn something new. Here are some sentences. (板书)Let’s look at the first one. Can you read it together? Yes,1……2…
3…. Wonderful! It’s not difficult for you, right?
Now, boys and girls, please try to find the similarity among these sentences? You can work in groups and share your ideas with each other. Here we go.
So, did you find something in common? OK, who would like to try? Amanda, please. You have sharp eyes.Yes, they have the word “have/has” and these are “yes/no” questions.Yes, exactly!
Now, let’s put all your views/points together. Boys and girls, This is what we will learn today, the present perfect tense.
We use it to talk about things that happened in the past but have a connection to the present in some way.
As we can see, the main structure of this grammar is “has/have done”, right? We often use “yet” in this grammar. But we should remind that normally the rules of past participle form are the same as the past form, such as live/lived. However, there are some irregular verbs, such as, put/put/put, read/read/read. We make the negative sentences like this:”has/have not done”.Clear? You are so smart!
practice makes perfect, so let’s do some exercises. Let’s “Fill in the blanks”. Now look at the Power Point. Please finish it as quickly as you can and we will check the answers later. Here we go.
Have you finished? What’s your answer, Cindy? Have you found your pen yet?-No, I haven’t. Do you agree with Cindy? Good, next one? Mike? He has turned off the light! All right, I think you have mastered it.
How time files! The class is almost over. Before ending our class, let’s have a summary. Who can summarize what we have learned this class? Fiona please. Very good. I hope you can apply what we have learned in your daily life so that we can improve our reading and speaking ability, right?
Our homework is as follows: You should finish the exercise book and search for more information about famous cartoons on the Internet. Next class, we will share them together.
Class is over, see you next time.
The simple present tense(一般现在时)
the things or actions that happen regularly.
“Verb to be” has three forms: am/is/are. “Verb to do” has two forms: do/does.
If the subject(主语) is first person or plural form, we should use do, if not, we use does.For the third singular form, normally we add s to the end, such as help/helps. The second type is to add es, such as guess/guesses. And the last type is to change y to i and add es, such as study/studies.
the simple past tense.(一般过去时)
We use it to talk about the past events. (When)
As we can see, “verb to be” has two forms:was/were, and we have to the change the
“verb to do” into past form, right? (Details)
We should remind that normally we add ed/d to the end, such as look/looked,
live/lived. The second type is to double write the last letter and add ed, such as
stop/stopped. And the last type is to change y to i and add ed, such as study/studied.
There are also some irregular verbs, such as, put/put, catch/caught.
the simple future tense.(一般将来时中的will/shall + do)
We use it to talk about our intentions or make predictions. (When)
As we can see, the main structure of this grammar is “will+do” , right?(Details)
We should remind that We should use the original form of the verbs. We make the
negative sentence like this: “will not do”. If the subject is the first person, we can
also use ‘shall’ instead of ‘will’.
the simple future tense.(一般将来时中的be going to + do)
We use it to talk about things that happen in the future. (When)
As we can see, the main structure of this grammar is “be going to do” , right?(Details)
We should remind that We should use the original form of the verbs. We make the
negative sentence like this: “be not going to do”.
the present progressive tense(现在进行时)
We use it to talk about what people are doing or what’s going on. (When)
As we can see, the main structure of this grammar is “be doing” , right? (Details)
We should remind that “verb to be” has three forms: am/is/are.We make the negative
sentences like this: “be not doing”.And we should change the verbs into ‘-ing’ form.
Normally we add -ing to the end, such as look/looking. The second type is to remove e
and add -ing, such as write/writing. And the last type is to double write the last letter
and add -ing, such as get/getting.
the past progressive tense.(过去进行时)
We use it to talk about the past events in certain time. (When)
As we can see, the main structure of this grammar is “was/were doing”, right? (Details)
We should remind that we should change the verbs into -ing form. Normally we add
ing to the end, such as look/looking. The second type is to remove ‘e’ and add “ing” ,
such as write/writing. And the last type is to double write the last letter and add ing,
such as get/getting. We make the negative sentences like this: “was/were not doing”.
the present perfect tense.(现在完成时)
We use it to talk about things that happened in the past but have a connection to the present in some way.
As we can see, the main structure of this grammar is “has/have done”, right? We often use “yet” in this grammar. But we should remind that normally the rules of past participle form are the same as the past form, such as live/lived. However, there are some irregular verbs, such as, put/put/put, read/read/read. We make the negative sentences like this:”has/have not done”.
the present passive voice.(一般现在时的被动语态)
We use it to talk about the passive relationships between the subject and the object.(When)
As we can see, the main structure of this grammar is “be+done”, right? (Details)
We should remind that “verb to be” has three forms: am/is/are. We should use the
past participle form of transitive verbs. And there are some irregular verbs, such as,
put/put/put, catch/caught/caught.We make the negative sentences like this: “be not
done”.
the past passive voice.(一般过去时的被动语态)
We use it to talk about the passive relationships between the subject and the object.(When)
As we can see, the main structure of this grammar is “was/were+done”, right? (Details)
We should remind that we should use the past participle form of transitive verbs. And
there are some irregular verbs, such as, put/put/put, catch/caught/caught.We make the
negative sentences like this: “w as/were not done”.
the attributive clause. (定语从句-名词之后出现)
Describe the nouns more exactly.
the relative pronouns(代词) should be used to link the main clause and the clause.They are ‘that/which/who/whom/whose’.
’that/which/who’ can be used as subject(主语) or object(宾语) of a clause, ‘whom’ can be as object, whose can be as attributive(定语). ’That’ can be used to refer to the things or people, ‘which’ for things, ‘who/whom’ for people.
the objective clause.(宾语从句-谓语动词后面出现)
express our thoughts more exactly.
There are three kinds of objective clauses. The first one is with ‘that’, the second one is with ‘if/whether’, the last one is with ‘wh-words’.
The order of words in the objective clauses should be written in statements and the tense should be changed according to the main clause.
The first conditional if.
Talk about the things happen in certain condition.
The main structure of this grammar is “First conditional if+will”(板书例句)
The main clause is in the future tense. The clause is in the present tense.(主将从现) And the first conditional if can be put before or after the main clause.
the imperative sentence.(祈使句)
Ask for permission, order or warn sb (not) to do sth.
The imperatives begin with the original form of the verb
The subject of the imperative is ‘you’ which is omitted. We make the negative sentences like this. “Don’t do sth”.
There be sentences.
we use it to Describe things or people.
As we can see, The main structure of this grammar is There be something/somebody in someplace/sometime, right?
But we should remind that “verb to be” has two forms: is/are. We should change it according to the nouns after it. We make the negative sentences like this: “There is/ are not.”
the nouns.(名词)
Describe things or people.
There are countable nouns and uncountable nouns, right?
Countable nouns have two forms: the singular and the plural. Normally, we add s to the end, such as book/books. The second type is to add es, such as class/classes. And the last type is to change y to i and add es, such as family/families. There are also some irregular nouns, such as man/men, sheep/sheep, child/children.
the comparatives.(比较级)
Compare different objects or people.
We usually add ‘er/r’ to the end of adjectives or adverbs, such as tall/taller, slow/slower, late/later. And add ‘more’ before the multi-syllable words, such as ‘more beautiful’.
There are some irregular changes, such as good/better, bad/worse.
The superlatives.(最高级)
Compare different objects or people.
We usually add est/st to the end of the adjectives or adverbs, such as tall/tallest, slow/slowest, late/latest.And add ‘most’ before the words, such as most beautiful.
There are some irregular changes, such as good/best, bad/worst. And we should add ‘the’ before the superlatives.
Adverbs of frequency.(频率副词)
Talk about how often we do things.
There are always, usually, often, sometimes, hardly ever(seldom), never.
If we put them in order, it will be like that always>usually>often>sometimes>hardly ever(seldom)>never.
The indefinite pronouns some and any.(普通不定代词)
Refer to people or things.
Normally some is used in statements(肯定句), any is used in negative statements or questions, right? They can both replace or modify the plural nouns and uncountable nouns.(可数名词复数以及不可数名词)
If we want the answer to the question is yes, we can also use some in questions. For example, would you like some tea?
The indefinite pronouns many and much.
Refer to people or things.
Many can replace or modify plural nouns, and much can replace or modify the uncountable nouns, right?
We use “How many…” questions to ask about the plural nouns, and “How much…” question to ask about the uncountable nouns.
the compound indefinite pronouns something, anything, nothing(复合不定代词)
Refer to people or things.
If the subject is something, anything… it is seen as singular(单数形式), right?
We should put the adjectives after the indefinite pronouns. For example, something important.
the modal verbs.(情态动词)
Make inferences.(作出推断)
The main structure of this grammar is “modal verbs + be”, right?
Some modal verbs can be used for making inferences. They are must, can’t, could, may, might. We use must to show that we think something is probably true. And use may, might and could to show that we think something is possibly true. Use can’t to show that you are almost sure something is not true.
Dear Judges, Now I’ll start the lesson. Good morning, Boys and girls. How are you today? Good? Fine? I’m fine, too. Before the class, Let’s sing a song together. If you can sing, sing along with me . “You are my sunshine, my only sunshine, you make me happy.” Do you feel better? Great, let’s start the lesson.
At the beginning, I’ll show you a video, and you should try to answer the question: What can you see in the video? Who would like to try? Blair, please. You see different cartoons, such as Snow White and Tom and Jerry.Thank you, Blair, you set a good example for us. You know so much about cartoons.Do you want to learn more? Today, let’s learn a new lesson — Cartoon.
Before reading, To help you understand the passage better, let’s learn some words. Now, Look at the first one. Smart.Form example, Zhu Geliang is very smart and he can solve many problems. Can you understand now? Great! The next one cute. Look at the picture. What’s that? A cat. So cats are very cute and it’s very lovely. So cute means lovely. You are so cute. Cats are so cute. Birds are so cute, okay, wonderful How about the last one? Ivory. Here is a picture about ivory. It forms long teeth of elephants. Read after me, ivory, ivory. Well done! All of you did a good job.
Now boys and girls, let’s have a prediction according to the title and the pictures on your book. Take a guess:What’s the passage mainly about? Try to think out as many answers as you can. OK, who wants to have a try?Justin, you please. The passage is about a cartoon Mickey Mouse. Nice try! Do you agree? OK, maybe you are right.Next, Let’s find out the truth in this passage.
Let’s read it together.When you read, think about this question:What’s the passage mainly about? You should read quickly and check your prediction.Let’s begin.
OK, guys, are you right? Wow, I heard John said he had the correct prediction.The passage tells us some information about Mickey Mouse. Oh, most of you are right! I am so proud of you.
For the second time, you should read it carefully and catch some detail informations. After that, you should answer some true or false question. Okay? Let’s start. Time is up. The first one, It’s easy, right? Answer me together. It’s true. Then the second question. Lily, what’s your answer? It ’s false. Can you correct it ? Great. Thank you. The last one, boys come on. Eric please. It’s true.perfect.
We have done so many exercises.It’s time for fun. Let’s have a group discussion. Think about the topic: Introducing your favorite cartoon characters to group members. Work in group of 4 and discuss with your partners. Then show your work on the stage. You have 5 minutes to prepare.Are you ready? Go! Time is up. Which group goes first? Christina and your partners, please. Wow, your ideas are very creative and Your pronunciation is perfect.Let’s give them a big hand.
How time files! The class is almost over. Before ending our class, let’s have a summary. Who can summarize what we have learned this class? Fiona please. Very good. I hope you can apply what we have learned in your daily life so that we can improve our reading and speaking ability, right?
Our homework is as follows: You should finish the exercise book and search for more information about famous cartoons on the Internet. Next class, we will share them together.
Class is over, see you next time.
本配置文件用以生成 Vue 应用的骨架屏。
1 | const dpsConfig = { |