ILUVWBQDPH UDZBLQSXW7\SH \RXU ILUVW QDPH VHFRQGBQDPH UDZBLQSXW7\SH \RXU VXUQDPH

Một phần của tài liệu Ultimate Guide to Raspberry Pi (Trang 73 - 75)

LV QRZ DOW QRWD VWULQJ VR WKH LWHUDWRU QRZ HDFK HOHPHQW LQ WKH OW QRW WKH LQGLYLGXDO FKDUDFWHUV LQ WKH VWULQJ ,Q IDFW LWởV PXFK PRUH FRPPRQ WR LWHUDWH RYHU

ILUVWBQDPH UDZBLQSXW7\SH \RXU ILUVW QDPH VHFRQGBQDPH UDZBLQSXW7\SH \RXU VXUQDPH

VHFRQGBQDPH UDZBLQSXW7\SH \RXU VXUQDPH VDYHILOH RSHQGDWDGDWZ VDYHILOHZULWHILUVWBQDPH?Q VDYHILOHZULWHVHFRQGBQDPH?Q VDYHILOHFORVH SULQW6DYHG ILUVWBQDPH 1RQH VHFRQGBQDPH 1RQH RSHQILOH RSHQGDWDGDWU QDPH RSHQILOHUHDGVSOLW ILUVWBQDPH QDPH>@ VHFRQGBQDPH QDPH>@ SULQW ILUVWBQDPH VHFRQGBQDPH

:’đỐ đỐo A’f ề} -ợ†A¡o ’đứử Ửềửử’R›o đề ủԒđo ỬÔề}oửử’ềẩA›‘ĨắA›’đợ †A¡oử ’ẩ -ợđỐềẩ

WorldMags.net WorldMags.net WorldMags.net

4›đ’¡Ađo ắ’fo đề /AửỬRoÔÔợ -’

ỵ„

&OHDUO\ WKH ILUVW WZR OLQHV DVN WKH XVHU WR W\SH LQ WKHLU ILUVW DQG VHFRQG QDPHV 7KH LQWHUHVWLQJ VWXII EHJLQV RQ OLQH ZKHUH ZH FUHDWH D QHZ YDULDEOH XVLQJ WKH

ILOHREMHFWởVRSHQPHWKRG UHPHPEHU ƠIXQFWLRQVộ DUH FDOOHG ƠPHWKRGVộ ZKHQ LQVLGH REMHFWV :H SDVV LQ WKH QDPH RI WKH WH[W ILOH WKLV FDQ EH DQ\ QDPH ZH FKRRVH DV ORQJ DV LWởV YDOLG IRU RXU RSHUDWLQJ V\VWHP LI WKH ILOH GRHVQởW H[LVW LW ZLOO EH FUHDWHG E\ 3\WKRQ DW WKLV SRLQW 7KHZSDUDPHWHU PHDQV WKDW ZH ZDQW WR ZULWH WR WKH ILOH LQ RWKHU ZRUGV ZH ZDQW WR VDYH VRPH GDWD

,Q OLQH ZH ZULWH WKH ILUVW QDPH %\ DSSHQGLQJ?QZH DGG D QHZ OLQH 7KLV LV WKHILOH HTXLYDOHQW RI SUHVVLQJ WKH (QWHU NH\ ỗ HVVHQWLDOO\ ZHởUH XVLQJILOH

WR RUJDQLVH WH[W E\ OLQH VR E\ LQVHUWLQJ D?QDW WKLV SRLQW WKH VXUQDPH ZLOO DSSHDU VHSDUDWHO\ D OLQH EHORZ <RX FRXOG DOVR VLPSO\ DGG DGHOLPLWHUWR HDFK VDYHG UHFRUG ỗ WKH SLSH V\PERO Ơ_ộ IRU H[DPSOH ỗ EXW \RX PXVW FKRRVH D FKDUDFWHU WKDW \RX ZRXOG QHYHU XVH ZLWKLQ D UHFRUG

+DYLQJ ZULWWHQ WKH VHFRQG QDPH WR WKH ILOH ZH WKHQ FORVH LW 7KLV WHOOV WKH RSHUDWLQJ V\VWHP WR VDYH WKH ILOH ZLWK LWV QHZ FRQWHQWV

:HởUH QRZ JRLQJ WR RSHQ LW XS DJDLQ DQG UHDG WKH FRQWHQWV EDFN LQ /LQHV DQG FOHDU WKH QDPH YDULDEOHV VR ZH FDQ EH VXUH ZHởYH UHDG LQ WKH ILOH DQG QRW VLPSO\ NHSW ZKDW WKH XVHU W\SHG 2Q OLQH ZH FUHDWH D QHZILOHREMHFW XVLQJ WKH VDPH QDPH EXW WKLV WLPH ZLWK WKH SDUDPHWHUUZKLFK UHDGV LQ WKH FRQWHQWV RI D ILOH EXW OHDYHV LW XQFKDQJHG 6LQFH ILOHV RQO\ FRQWDLQ WH[WRSHQILOH

LV D VWULQJ DW WKH PRPHQW WKLV PHDQV ZH FDQ XVH WKHVSOLWIXQFWLRQ WR WDNH WKLV WH[W DQG FUHDWH IURP LW D OLVW ZLWK HDFK RI WKH OLQHV DV D VHSDUDWH HOHPHQW ử’¡Ử›o oýoÔ\’ửo ắử’ẩ† đỐoƯOHềR™o\đ w đỐ’ử đ’¡o Ôắẩẩ’ẩ† ềẩ Aẩ

4Rắẩđắ ũ’ÔđắA› ¡A\Ố’ẩo

WorldMags.net

WorldMags.net

4›đ’¡Ađo ắ’fo đề /AửỬRoÔÔợ -’

ỵẮ

)RU H[DPSOH LI WKH XVHUởV QDPH ZDV -R %ORJJV SULQWLQJQDPHZRXOG UHVXOW LQ

>-R%ORJJV@

7R UHWULHYH WKH ILUVW QDPH ZH XVHQDPH>@ IRU WKH VXUQDPH ZH XVHQDPH>@ 5XQ WKH SURJUDP DQG \RXởOO VHH \RXU QDPH UHDSSHDU LQ WKH WHUPLQDO 7KHUHởV DQ HYHQ EHWWHU WHVW KRZHYHU ILQG WKH ILOHGDWDGDWLI \RXởYH XVHG WKH VDPH QDPH DQG RSHQ LW LQ D WH[W HGLWRU <RX VKRXOG VHH WKH QDPHV RQH SHU OLQH 7KHILOH

REMHFW LV WKH ZRUNKRUVH RI 3\WKRQ ILOH LQSXWRXWSXW LWởV SUHWW\ VLPSOH WR XVH

3LFNOH

7KH JUHDW EHQHILW RISLFNOHLV WKDW XQOLNHILOH LW FDQ WDNH DQ\ GDWD IRUP DQG VDYH LW WR D ILOH ,W FDQ DOVR ƠXQSLFNOHộ WKH GDWD EDFN WR H[DFWO\ LWV RULJLQDO IRUP ,Q IDFWSLFNOHLV VSHFLILFDOO\ EXLOW WR DXJPHQW WKH EXLOWLQILOHREMHFW DQG PDNH LW PRUH XVHIXO $JDLQ WKLV LV EHVW XQGHUVWRRG WKURXJK D VKRUW H[DPSOH ZKLFK ZHởOO FDOOSLFNOH([DPSOHS\

Một phần của tài liệu Ultimate Guide to Raspberry Pi (Trang 73 - 75)

Tải bản đầy đủ (PDF)

(164 trang)