【國立臺灣大學109學年度畢業典禮 致詞代表 資訊工程學系韓哈斯】
Student Address, National Taiwan University Commencement 2021
International student Seth Austin Harding from Department of Computer Science and Information Engineering
.
校長、教授、以及在螢幕前的各位同學,大家好。非常感謝臺大給我這個機會。我是韓哈斯,來自美國華盛頓特區。我會以自身的真實經驗出發,來跟大家分享臺大帶給我的收穫。
我當初為什麼選擇來台灣求學呢?我小時候非常喜歡看武打片,然後我十歲的時候去看了一部電影叫做「功夫熊貓」。這部電影成為了我最喜歡的電影,主角「阿波」的故事跟我的故事很像。我看完了之後就決定要開始學功夫,所以去了「美國武術學院」。那個時候我每天都聽旁邊的人講中文,到了高中我就決定開始學中文。當時我遇到了一位貴人,她是從台北到美國來教書的中文老師,她教的課是我當時最喜歡的課,我每天去她的教室跟好朋友練習。到了高中畢業時,我是全高中中文最好的非母語人士。同時,我第二喜歡的課程是電腦科學,那時候我是程式能力數一數二的學生。後來在成功錄取夢寐以求的學校:臺灣大學之後,我感到雀躍不已,因為我既可以繼續學習中文,也可以持續在世界頂尖的學府中,往電腦科學的方向精進自我。
不過老實說,當我回顧大一的時期,我也曾迷失自我。雖然我修了很多很多的中文課,但是我那時只聽得懂大概一半的課程內容。跟大家對美國人的印象不同,我其實很害羞,也很害怕舉手提問,我甚至不太敢參與社交,所以當時朋友也很少。我開始想家,也變得有一點憂鬱。那時籃球是我唯一的紓壓方式。
但更不幸的是,我在打籃球時弄傷了我的前十字韌帶,做了兩次手術,需要一年半才能恢復。許多的負面情緒壓得我喘不過氣。我被困在人生的低谷,不知如何是好。我覺得我的中文不夠好,我也被診斷出失眠跟ADHD,另外,美國高中的數學太簡單了,來這邊不夠用。種種壓力讓我足不出戶,找不到自己的人生方向。後來,我向臺大心輔中心以及我的心理醫師尋求協助,然後我也開始跟系上有更多互動。有一位教授叫徐宏民跟我說,"Never give up",雖然那時候我覺得這句話太過於簡化了我的問題,不過,在我仔細思考了一個禮拜之後,我下定決心,發誓不讓自己被這些事擊敗。我決定要克盡全力,認真做好每件事。這是我人生的轉捩點,我開始變得異常自律。當時廖世偉教授和洪士灝系主任帶我進入它們的研究室鑽研學術。這重燃了我對資訊工程的熱忱,提醒了我當初會愛上這個領域的原因。我開始研究人工智慧以及區塊鏈,也開始跟其他系上同學交朋友,一起成立臺大人工智慧應用社NTUAI。NTUAI現在是校內頗具規模的技術研究社團,致力於推廣人工智慧給任何對該領域有熱忱的學生。歡迎加入NTUAI,可以掃描我們的QR CODE。
最近,由於疫情的緣故,我已經一年半沒回美國了。但是沒關係,因為我已經找到了我第二個家。我很愛臺大,以及台灣的人事物。雖然我經歷了人生的低潮,但這裡的一切總是給我滿滿的祝福與協助。最後,我想送給大家「功夫熊貓」裡的一句台詞: "You just need to believe"。只要用樂觀的態度去面對困難,就有能力改變自己,甚至改變身旁所愛的人。就像阿波的父親說的,"心誠則靈,只要你相信,點石就能成金。根本沒有什麼秘笈。只有你。"謝謝大家。
.
==============================
.
President, professors, and classmates, I'm very honored to be here. Thank you to NTU for giving me this opportunity. My name's Seth Austin Harding, and I'm from the D.C. metropolitan area. I'm going to tell a real story that's personal but that's relatable and what I see as the real me.
What motivated and guided me to take my undergraduate studies in Taiwan? When I was very young, I really loved watching kung fu movies, and when I was 10 years old, I went to the theater to watch "Kung Fu Panda". This became my favorite movie as I felt like the story of the main character Po was one to which I could very much relate. After watching this movie, I decided that I wanted to start learning kung fu, so I went to the United States Wushu Academy. At the time, I began hearing Mandarin on a daily basis, so when I was in high school, I decided to begin formally studying Chinese. It ended up being my Chinese teacher from Taipei who was my favorite teacher who taught my favorite class, so I decided I'd hang out in the Chinese classroom every day and practice lots. By the time graduation came around, I had attained the highest proficiency in Chinese among any non-native speaker in my school. My second favorite class was computer science, and I ended up attaining among the best coding skills in my school. After getting accepted to the school of my dreams -- National Taiwan University -- I felt honored, humbled, and excited; I could now spend time at among the world's finest universities studying Chinese and at the same time advancing my knowledge of computer science.
But when I look back at my freshman year, to be honest with you, I didn't know what I was doing. Despite having taken very many Chinese classes, when I went to the NTU lectures, I understood only about half of what the teachers were saying. Contrary to most people's impressions of an American, I was actually too shy to raise my hand, to ask questions, or to even meet with teachers after class, so I had very few friends at the time. I started to become homesick and depressed. At that time, I found that basketball was the only way I knew of relieving my stress. However, while playing basketball, I had torn my ACL and it would take two surgeries and a year and a half in time to fully recover. At this point, I felt caught between a rock and a hard place. In fact, this was the lowest point of my life, and I didn't know what to do. I felt like my Chinese wasn't good enough, I had been diagnosed with insomnia and ADHD, and I felt like the math taught in America was too simple to allow for me to keep up with my classmates. I was under immense pressure, and at this time, I lost any sense of purpose or direction. Later on, I went to seek help from NTU counseling, from my psychiatrist, and from my department. I reached out to Professor Winston Hsu from CSIE, and he told me this: "Never give up"; it was such an oversimplified way to approach such a complex series of problems, I had thought. However, I pondered these words intensely for one week, and by the end of that week, I had made a firm decision. This would NOT be another example of me giving up. I decided to go all out, to work diligently and passionately on all tasks at hand. This was the turning point of my life; I started to discipline myself to a very high degree. At this time, I met my then-to-become advisors Professor Shih-Wei Liao and Professor Shih-Hao Hung and entered their labs to begin research. Finally, the passion that I had for computer science that I had previously held in high school was kindled again, and I was finally reminded why I loved this field. I began my research life in blockchain and AI, and at the time I entered the lab, I also began creating NTUAI. NTUAI is now a large and highly successful NTU club that is dedicated to the research and public understanding of AI. Welcome one and all to join us; please scan our QR code here.
For a year and a half I haven't returned to America because of covid. But not to worry; I have found my second home, away from home. I love it here in NTU and I cherish all of the things I've had the privilege to experience in Taiwan. I've gone through the most difficult of struggles in my life here, but I've also had the most fortunate and blessed of experiences. To conclude, I'd like to quote a line from "Kung Fu Panda": "You just need to believe". As long as you are willing to adopt an optimistic attitude in facing challenges and hardships, you may become a positive force in changing the lives of those around you as well as your own life. It all depends on how you view it; just like what Po's father says, "there is no secret ingredient. It's just you." Thank you, everyone.
詳見:
https://www.facebook.com/NTUCommencement/posts/2718185771805180
.
#臺灣大學 #畢業典禮 #NTUCommencement2021 #學生致詞代表 #臺大資訊工程學系 #韓哈斯 #SethAustinHarding
同時也有10000部Youtube影片,追蹤數超過2,910的網紅コバにゃんチャンネル,也在其Youtube影片中提到,...
「quote of the day中文」的推薦目錄:
- 關於quote of the day中文 在 國立臺灣大學 National Taiwan University Facebook 的最佳解答
- 關於quote of the day中文 在 Brett 林熙老師 Facebook 的最佳解答
- 關於quote of the day中文 在 Nereid, Elle Rêve 五更飛夢 Facebook 的最佳貼文
- 關於quote of the day中文 在 コバにゃんチャンネル Youtube 的最讚貼文
- 關於quote of the day中文 在 大象中醫 Youtube 的最佳解答
- 關於quote of the day中文 在 大象中醫 Youtube 的精選貼文
- 關於quote of the day中文 在 120 Quotes, 中文ideas in 2021 - Pinterest 的評價
- 關於quote of the day中文 在 quote of the day意思的推薦與評價,PINTEREST和網紅們這樣 ... 的評價
- 關於quote of the day中文 在 【Quote of the Day】 基督教的牧師查爾斯Charles... - 英語島 ... 的評價
- 關於quote of the day中文 在 YouTube Data API Overview | Google Developers 的評價
quote of the day中文 在 Brett 林熙老師 Facebook 的最佳解答
(打英文還是輕鬆+快多了😉 中文版下面有連結)
Why taking the SAT or ACT when you’re not ready is a terrible mistake.
For several years now, I’ve noticed that many of my students who study at international schools tend to take an SAT test just to “test the waters.”
This is such a bad move it’s not funny!
What’s so bad about it?
American admissions officers dislike students who only focus on tests. So, even if you manage to get a high score after you’ve taken the SAT too many times, you might be rejected anyway.
Your SAT score is so important! Please do not waste any opportunity to get a high score!
I read the following quote on Dartmouth’s website:
“We don't recommend excessive testing. Making the most out of your high school opportunities is more important than repeatedly taking standardized tests."
Is it only Dartmouth?
Actually, this kind of statement isn’t unique to Dartmouth - it’s pretty standard. Most of the top universities say exactly the same thing. This causes many people to believe that colleges don’t really care much about your SAT score.
Nothing could be further from the truth!
All you have to do is to look at the average SAT/ACT scores that enrolling students receive. As an example, successful applicants to Dartmouth average around 1500 (out of 1600). That’s pretty high! What do they mean then?
They mean that students need to focus on non-academic pursuits AS WELL AS getting a very high score on their SATs.
So, you definitely need a high SAT score, but you can’t look like you care that much. If you take a test before you’re ready, there will be a record of your lower-than-ideal score. You’ll naturally need to retake the exam a second, third, and, possibly, fourth, time.
Let’s say that you do achieve your ideal score on the fourth or fifth attempt. How will the admissions officer view you when you have exactly the same score as another applicant who only took the test twice or three times? Who will they select?
Naturally, they will not choose you because you look like a testing machine.
In the US, everybody knows that it’s foolish to take the SAT or ACT more than three times. That means that you should NEVER waste an attempt. You should be ready before you ever take the test.
So, what should you do?
First, “test the waters” in a safe environment: your home.
You can do some practice questions on Khan Academy to get a feel for the test. Then, when you feel ready to tackle the whole test, do one of the Official Tests found on Khan or CollegeBoard:
https://www.khanacademy.org/mission/sat/exams
https://collegereadiness.collegeboard.org/sat/practice/full-length-practice-tests
Make sure you download the test, print it out and do it on paper. If you do it on the computer, you will NOT be simulating the real test.
Presently, there are a total of 9 released tests. CollegeBoard and Khan have released 8, and there is one more floating about on the internet. (As an aside, I actually use this test in my classes. I purposely avoid the other released tests because most schools use them and so do many students. I hate it when students say, “I’ve done that test before!”)
Simply using these tests will give you a good idea of what score you would get if you took the real test. And you can do this without risking being labelled a testing machine.
Also, as there are only 9 official tests out there, don’t waste them. Granted, there are other “official” tests online or in some schools, but these are usually riddled with errors or are incomplete. (I personally hate doing a test and not knowing which questions are faulty before doing it. Most of the time, students spend a lot of time trying to figure out the answers to questions that do not even have answers. It can be very frustrating.)
Another thing: of the nine, only 5 of them are previously administered tests. The first four “official tests” were designed before CollegeBoard switched from the old SAT to the new one in 2016. These four tests are quite easy compared to what is being tested now, so are not a great indicator of your future score. They are great for practicing question types - just understand that if you get a really high score on them it doesn’t mean that you will do just as well on test day.
Only tests 5-9 (also easier than the current tests) are the closest thing we have to the current SAT tests. Still, these are easier than the current test, especially in the reading section, so be aware that the reading will most probably be even tougher than what is in all of the officially released tests.
If you have any other questions related to how to prep for your SATs, feel free to leave a message below or PM me.
Enjoy your SAT studies!
本文的中文版:
https://brettlindsay.blogspot.tw/2018/01/satact.html
#SAT寒密班 (適合11年級 & 3月和5月的考生) https://goo.gl/17Uz1e
#SAT週六衝刺班 (針對3月和5月的考生)
https://goo.gl/3ZEEWj
#SAT暑密班 (適合10年級 & 10月和12月的考生) https://goo.gl/6Ypwsi
quote of the day中文 在 Nereid, Elle Rêve 五更飛夢 Facebook 的最佳貼文
不曉得大家有沒有發現這兩天我的Instagram內文好像不太一樣?
除了一些日常有感而發的小廢文之外,
還加上了時尚界的名言佳句,
更重要的是還囊括了三種語言!
從現在開始,
我會努力收集格式各樣時尚圈的名言佳句,
不論是出自於名人,設計師電影或影集,
都會竭盡所能地翻成英文,法文與中文。
當然,
如果有出錯也歡迎向我提出修正 🙌
在Instagram搜尋Hashtag
#妮芮的時尚名人每日一句
就可以看到每次的時尚佳句囉 😘
-\-\-\-\-
Have you ever noticed that there's something different on my Instagram these 2 days?
"Fashion quote of the day? "You may say.
Well, not exactly my main point.
It's TRILINGUAL!
Now I'm collecting those fashion quotes I found interesting and trying my best to translate them into English, French and Chinese.
It's also welcome to correct my errors if there's any.
Find out more using the tags
#NereidTellsAFashionQuote
or
#NereidDitLaCitationDeLaMode
on Instagram 💋
quote of the day中文 在 コバにゃんチャンネル Youtube 的最讚貼文
quote of the day中文 在 大象中醫 Youtube 的最佳解答
quote of the day中文 在 大象中醫 Youtube 的精選貼文
quote of the day中文 在 【Quote of the Day】 基督教的牧師查爾斯Charles... - 英語島 ... 的推薦與評價
【Quote of the Day】 基督教的牧師查爾斯Charles Swindoll,同時也是教育家以及作家, 創辦Insight for Living (生活的領悟) 廣播電台,以15 種語言在全世界製作 ... ... <看更多>
quote of the day中文 在 YouTube Data API Overview | Google Developers 的推薦與評價
Introduction
This document is intended for developers who want to write applications that interact with YouTube. It explains basic concepts of YouTube and of the API itself. It also provides an overview of the different functions that the API supports.
Before you startYou need a Google Account to access the Google API Console, request an API key, and register your application.
Create a project in the Google Developers Console and obtain authorization credentials so your application can submit API requests.
After creating your project, make sure the YouTube Data API is one of the services that your application is registered to use:
Go to the API Console and select the project that you just registered.
Visit the Enabled APIs page.
In the list of APIs, make sure the status is ON for the YouTube Data API v3.
If your application will use any API methods that require user authorization, read the authentication guide to learn how to implement OAuth 2.0 authorization.
Select a client library to simplify your API implementation.
Familiarize yourself with the core concepts of the JSON (JavaScript Object Notation) data format. JSON is a common, language-independent data format that provides a simple text representation of arbitrary data structures. For more information, see json.org.
Resources and resource types
A resource is an individual data entity with a unique identifier. The table below describes the different types of resources that you can interact with using the API.
Resources
activity
Contains information about an action that a particular user has taken on the YouTube site. User actions that are reported in activity feeds include rating a video, sharing a video, marking a video as a favorite, and posting a channel bulletin, among others.
channel
Contains information about a single YouTube channel.
channelBanner
Identifies the URL to use to set a newly uploaded image as the banner image for a channel.
channelSection
Contains information about a set of videos that a channel has chosen to feature. For example, a section could feature a channel's latest uploads, most popular uploads, or videos from one or more playlists.
guideCategory
Identifies a category that YouTube associates with channels based on their content or other indicators, such as popularity. Guide categories seek to organize channels in a way that makes it easier for YouTube users to find the content they're looking for. While channels could be associated with one or more guide categories, they are not guaranteed to be in any guide categories.
i18nLanguage
Identifies an application language that the YouTube website supports. The application language can also be referred to as a UI language.
i18nRegion
Identifies a geographic area that a YouTube user can select as the preferred content region. The content region can also be referred to as a content locale.
playlist
Represents a single YouTube playlist. A playlist is a collection of videos that can be viewed sequentially and shared with other users.
playlistItem
Identifies a resource, such as a video, that is part of a playlist. The playlistItem resource also contains details that explain how the included resource is used in the playlist.
search result
Contains information about a YouTube video, channel, or playlist that matches the search parameters specified in an API request. While a search result points to a uniquely identifiable resource, like a video, it does not have its own persistent data.
subscription
Contains information about a YouTube user subscription. A subscription notifies a user when new videos are added to a channel or when another user takes one of several actions on YouTube, such as uploading a video, rating a video, or commenting on a video.
thumbnail
Identifies thumbnail images associated with a resource.
video
Represents a single YouTube video.
videoCategory
Identifies a category that has been or could be associated with uploaded videos.
watermark
Identifies an image that displays during playbacks of a specified channel's videos. The channel owner can also specify a target channel to which the image links as well as timing details that determine when the watermark appears during video playbacks and then length of time it is visible.
Note that, in many cases, a resource contains references to other resources. For example, a playlistItem
resource's snippet.resourceId.videoId
property identifies a video resource that, in turn, contains complete information about the video. As another example, a search result contains either a videoId
, playlistId
, or channelId
property that identifies a particular video, playlist, or channel resource.
The following table shows the most common methods that the API supports. Some resources also support other methods that perform functions more specific to those resources. For example, the videos.rate
method associates a user rating with a video, and the thumbnails.set
method uploads a video thumbnail image to YouTube and associates it with a video.
Operations
list
Retrieves (
GET
) a list of zero or more resources.insert
Creates (
POST
) a new resource.update
Modifies (
PUT
) an existing resource to reflect data in your request.delete
Removes (
DELETE
) a specific resource.The API currently supports methods to list each of the supported resource types, and it supports write operations for many resources as well.
The table below identifies the operations that are supported for different types of resources. Operations that insert, update, or delete resources always require user authorization. In some cases, list
methods support both authorized and unauthorized requests, where unauthorized requests only retrieve public data while authorized requests can also retrieve information about or private to the currently authenticated user.
Supported Operations
list
insert
update
delete
activity
caption
channel
channelBanner
channelSection
comment
commentThread
guideCategory
i18nLanguage
i18nRegion
playlist
playlistItem
search result
subscription
thumbnail
video
videoCategory
watermark
Quota usage
The YouTube Data API uses a quota to ensure that developers use the service as intended and do not create applications that unfairly reduce service quality or limit access for others. All API requests, including invalid requests, incur at least a one-point quota cost. You can find the quota available to your application in the API Console.
Projects that enable the YouTube Data API have a default quota allocation of 10,000 units per day, an amount sufficient for the overwhelming majority of our API users. Default quota, which is subject to change, helps us optimize quota allocations and scale our infrastructure in a way that is more meaningful to our API users. You can see your quota usage on the Quotas page in the API Console.
Note: If you reach the quota limit, you can request additional quota by
completing the Quota extension
request form for YouTube API Services.
Google calculates your quota usage by assigning a cost to each request. Different types of
operations have different quota costs. For example:
A read operation that retrieves a list of resources -- channels, videos, playlists -- usually
costs 1 unit.
A write operation that creates, updates, or deletes a resource usually has costs
50
units.A search request costs
100
units.A video upload costs
1600
units.The Quota costs for API requests table shows the
quota cost of each API method. With these rules in mind, you can estimate the number of requests
that your application could send per day without exceeding your quota.
The API allows, and actually requires, the retrieval of partial resources so that applications avoid transferring, parsing, and storing unneeded data. This approach also ensures that the API uses network, CPU, and memory resources more efficiently.
The API supports two request parameters, which are explained in the following sections, that enable you to identify the resource properties that should be included in API responses.
The part
parameter identifies groups of properties that should be returned for a resource.
The fields
parameter filters the API response to only return specific properties within the requested resource parts.
part
parameterThe part
parameter is a required parameter for any API request that retrieves or returns a resource. The parameter identifies one or more top-level (non-nested) resource properties that should be included in an API response. For example, a video
resource has the following parts:
snippet
contentDetails
fileDetails
player
processingDetails
recordingDetails
statistics
status
suggestions
topicDetails
All of these parts are objects that contain nested properties, and you can think of these objects as groups of metadata fields that the API server might (or might not) retrieve. As such, the part
parameter requires you to select the resource components that your application actually uses. This requirement serves two key purposes:
It reduces latency by preventing the API server from spending time retrieving metadata fields that your application doesn't use.
It reduces bandwidth usage by reducing (or eliminating) the amount of unnecessary data that your application might retrieve.
Over time, as resources add more parts, these benefits will only increase since your application will not be requesting newly introduced properties that it doesn't support.
How to use thefields
parameterThe fields
parameter filters the API response, which only contains the resource parts identified in the part
parameter value, so that the response only includes a specific set of fields. The fields
parameter lets you remove nested properties from an API response and thereby further reduce your bandwidth usage. (The part
parameter cannot be used to filter nested properties from a response.)
The following rules explain the supported syntax for the fields
parameter value, which is loosely based on XPath syntax:
Use a comma-separated list (fields=a,b
) to select multiple fields.
Use an asterisk (fields=*
) as a wildcard to identify all fields.
Use parentheses (fields=a(b,c)
) to specify a group of nested properties that will be included in the API response.
Use a forward slash (fields=a/b
) to identify a nested property.
In practice, these rules often allow several different fields
parameter values to retrieve the same API response. For example, if you want to retrieve the playlist item ID, title, and position for every item in a playlist, you could use any of the following values:
fields=items/id,playlistItems/snippet/title,playlistItems/snippet/position
fields=items(id,snippet/title,snippet/position)
fields=items(id,snippet(title,position))
Note: As with all query parameter values, the fields
parameter value must be URL encoded. For better readability, the examples in this document omit the encoding.
The examples below demonstrate how you can use the part
and fields
parameters to ensure that API responses only include the data that your application uses:
Example 1 returns a video resource that includes four parts as well as
kind
and etag
properties.Example 2 returns a video resource that includes two parts as well as
kind
and etag
properties.Example 3 returns a video resource that includes two parts but excludes
kind
and etag
properties.Example 4 returns a video resource that includes two parts but excludes
kind
and etag
as well as some nested properties in the resource's snippet
object.Example 1
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&part=snippet,contentDetails,statistics,statusDescription: This example retrieves avideo
resource and identifies several
resource parts that should be included in the API response.API response:
{
"kind": "youtube#videoListResponse",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/sDAlsG9NGKfr6v5AlPZKSEZdtqA\"",
"videos": [
{
"id": "7lCDEYXw3mM",
"kind": "youtube#video",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/iYynQR8AtacsFUwWmrVaw4Smb_Q\"",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
}
},
"categoryId": "28"
},
"contentDetails": {
"duration": "PT15M51S",
"aspectRatio": "RATIO_16_9"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
},
"status": {
"uploadStatus": "STATUS_PROCESSED",
"privacyStatus": "PRIVACY_PUBLIC"
}
}
]
}
Example 2
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&part=snippet,statisticsDescription: This example modifies thepart
parameter value so that the
contentDetails
andstatus
properties are not included
in the response.API response:
{
"kind": "youtube#videoListResponse",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/sDAlsG9NGKfr6v5AlPZKSEZdtqA\"",
"videos": [
{
"id": "7lCDEYXw3mM",
"kind": "youtube#video",
"etag": "\"UCBpFjp2h75_b92t44sqraUcyu0/iYynQR8AtacsFUwWmrVaw4Smb_Q\"",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
}
},
"categoryId": "28"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
}
}
]
}
Example 3
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&part=snippet,statistics&fields=items(id,snippet,statistics)Description: This example adds thefields
parameter to remove all
kind
andetag
properties from the API response.API response:
{
"videos": [
{
"id": "7lCDEYXw3mM",
"snippet": {
"publishedAt": "2012-06-20T22:45:24.000Z",
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"description": "Antonio Fuentes speaks to us and takes questions on working with Google APIs and OAuth 2.0.",
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/default.jpg"
},
"medium": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/mqdefault.jpg"
},
"high": {
"url": "https://i.ytimg.com/vi/7lCDEYXw3mM/hqdefault.jpg"
}
},
"categoryId": "28"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
}
}
]
}
Example 4
URL: https://www.googleapis.com/youtube/v3/videos?id=7lCDEYXw3mM&key=YOUR_API_KEY
&fields=items(id,snippet(channelId,title,categoryId),statistics)&part=snippet,statisticsDescription: This example modifies thefields
parameter from example 3
so that in the API response, each video resource'ssnippet
object only includes thechannelId
,title
,
andcategoryId
properties.API response:
{
"videos": [
{
"id": "7lCDEYXw3mM",
"snippet": {
"channelId": "UC_x5XG1OV2P6uZZ5FSM9Ttw",
"title": "Google I/O 101: Q&A On Using Google APIs",
"categoryId": "28"
},
"statistics": {
"viewCount": "3057",
"likeCount": "25",
"dislikeCount": "0",
"favoriteCount": "17",
"commentCount": "12"
}
}
]
}
Optimizing performance
Using ETags
ETags, a standard part of the HTTP protocol, allow applications to refer to a specific version of a particular API resource. The resource could be an entire feed or an item in that feed. This functionality supports the following use cases:
Caching and conditional retrieval – Your application can cache API resources and their ETags. Then, when your application requests a stored resource again, it specifies the ETag associated with that resource. If the resource has changed, the API returns the modified resource and the ETag associated with that version of the resource. If the resource has not changed, the API returns an HTTP 304 response (Not Modified
), which indicates that the resource has not changed. Your application can reduce latency and bandwidth usage by serving cached resources in this manner.
The client libraries for Google APIs differ in their support of ETags. For example, the JavaScript client library supports ETags via a whitelist for allowed request headers that includes If-Match
and If-None-Match
. The whitelist allows normal browser caching to occur so that if a resource's ETag has not changed, the resource can be served from the browser cache. The Obj-C client, on the other hand, does not support ETags.
Protecting against inadvertent overwrites of changes – ETags help to ensure that multiple API clients don't inadvertently overwrite each other's changes. When updating or deleting a resource, your application can specify the resource's ETag. If the ETag doesn't match the most recent version of that resource, then the API request fails.
Using ETags in your application provides several benefits:
The API responds more quickly to requests for cached but unchanged resources, yielding lower latency and lower bandwidth usage.Your application will not inadvertently overwrite changes to a resource that were made from another API client.
The Google APIs Client Library for JavaScript supports If-Match
and If-None-Match
HTTP request headers, thereby enabling ETags to work within the context of normal browser caching.
Using gzip
You can also reduce the bandwidth needed for each API response by enabling gzip compression. While your application will need additional CPU time to uncompress API responses, the benefit of consuming fewer network resources usually outweighs that cost.
To receive a gzip-encoded response you must do two things:
Set the Accept-Encoding
HTTP request header to gzip
.
Modify your user agent to contain the string gzip
.
The sample HTTP headers below demonstrate these requirements for enabling gzip compression:
Accept-Encoding: gzip
User-Agent: my program (gzip)
... <看更多>
quote of the day中文 在 120 Quotes, 中文ideas in 2021 - Pinterest 的推薦與評價
Jul 1, 2021 - Explore JSHMomma's board "Quotes, 中文" on Pinterest. See more ideas about chinese quotes, chinese phrases, quotes. ... Quote Of The Day. ... <看更多>