This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
關於緩衝區 | |
上課的時候老師提到了一個例子,讓我們回去自己試試 | |
#include <stdio.h> | |
#include <unistd.h> | |
int main(){ | |
pid_t pid; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
第三層︰網路層(Network Layer) | |
網路層定義網路路由及定址功能,讓資料能夠在網路間傳遞。這一層中最主要的通訊協定是網際網路協定(Internet Protocol,IP),資料在傳輸時,該協定將IP位址加入傳輸資料內,並把資料組成封包(Packet)。在網路上傳輸時,封包裡面的IP位址會告訴網路設備這筆資料的來源及目的地。由於網路層主要以IP運作為主,故又稱為「IP層」。除了IP,在網路層上運作的協定還包含IPX及X.25。 | |
路由器及Layer 3交換器即屬於第三層的網路設備,主要以IP作為資料傳輸依據,它們大多在企業機房內運作,不過我們也常看到有些設備也同時包含網路層功能,如IP分享器,以及俗稱小烏龜的ADSL用戶終端設備(ADSL Terminal Unit-Remote,ATU-R)。 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
網路核心(network core) | |
類型 | |
路由器 | |
網際網路本身 | |
資料的傳送方式 | |
線路交換(Circuit Switching) | |
連線時資源專屬(dedicated),故效率與頻寬保證 | |
技術上是以電路方式進行傳輸,系統保留一條點對點傳輸的頻寬,以64Kbps速率傳送語音,當電話接通,這段頻 寬便完全佔線,直到兩端通完電話為止,這樣的技術是以全雙工(full duplex) 的傳輸方式,也稱為 connection oriented。 | |
連結頻寬有二種方式分配 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1.2 Network Core | |
Submitted by xu3m6 on 四, 2008-07-17 15:46 | |
1. Circuit Switching: | |
把網路資源分成很多份 每個call都有專屬的連線 資源不共享 如果一個連線無人使用 則會閒置 不會分給其他人使用 | |
Multiplexing (多工) 有2種方式 FDM vs. TDM | |
FDM(Frequency-division multiplexing): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
values from_unixtime(0); | |
======== | |
1970-01-01 07:30:00.000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
378664196,"1981-12-31 23:59:56.000" | |
378664197,"1981-12-31 23:59:57.000" | |
378664198,"1981-12-31 23:59:58.000" | |
378664199,"1981-12-31 23:59:59.000" 1981-12-31T16:29:59+00:00 in ISO 8601 | |
378664200,"1982-01-01 00:30:00.000" 1981-12-31T16:30:00+00:00 in ISO 8601 | |
378664201,"1982-01-01 00:30:01.000" | |
378664202,"1982-01-01 00:30:02.000" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
values TIMESTAMP '1982-01-01 00:00:00.000' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from | |
( | |
select date_add('millisecond', (t3.i*1000 + t2.i*100 + t1.i*10 + t0.i), TIMESTAMP '1981-12-31 23:59:59.5') mytime from | |
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t0, | |
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t1, | |
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t2, | |
(select 0 i union select 1 union select 2 union select 3 union select 4 union select 5 union select 6 union select 7 union select 8 union select 9) t3 | |
) | |
mytime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myFunction() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var data = sheet.getDataRange().getValues(); | |
var tmp = []; | |
var row_name = 25; // the seen number - 1 // 有商品名的row number - 1 | |
var row_score = 46; // the seen number - 1 // 有總分的row number - 1 | |
var col_start = 10; // 第一個商品的column number -1 | |
var col_end = 100; // 比最後一個商品的column number 大就好 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myFunction() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var data = sheet.getDataRange().getValues(); | |
var col_num_of_id = 0; | |
var col_num_of_val = 1; | |
var pre_id = -1; | |
var my_max = -1; | |
var cur_id = -1; |