自由學習的風

幽夢影 張潮 少年讀書,如隙中窺月;中年讀書,如庭中望月;老年讀書,如臺上玩月。皆以閱歷之淺深,為所得之淺深耳。

[校園網路]校園無線網路無法連網 除錯步驟

2020年7月22日 星期三

早上低年級老師到校備課,打電話回報教室內電腦可以上網,但是手機連無線網路有問題。
首先,❶先請她走到附近的教室,再連一次無線看看是否正常;❷拿手機到辦公室測試手機是否正常(辦公室無線OK)。

結果,❶仍是無法上網,但是❷可以上網;嗯!看起來有點像是設備有點狀況,所以我就❸連上 Siraya 平台(nms.ntpc.edu.tw)檢查,點開 網路設備/基地台設備 後,發現所有教室內的  Cisco 無線 AP 都處理離線狀態,鑒於對第一大廠而言,發生大規模故障的機率實在微乎其微,其中還有一台是 AP Controller,❹就拿起電話打給駐點工程師,工程師做了簡單的測試確認有點問題後,留下我的聯絡電話,並說明待會兒會有人與我聯絡。


沒多久,另一位工程師打電話聯絡,請我到機房看看 AP Controller 目前的燈號情況,我拿著手機到機房後,發現機櫃上的 Cisco AP Controller 未過電,走到機櫃後一看,電源延長線壞了,先臨時接到另一個正常的插孔上後,通電,正常!

再打電話到教室給報修的老師,手機上網也正常了,結案!!

喔…忘了說,掛電話之後,就趕緊上網購買多孔插座回來更換,多孔插座也是有壽命的!!

下面這篇文章有介紹多孔插座,我覺得蠻詳細的,很有用!我買了蓋世特,不過不是該文中所列的機架式款式。



[網管] 用指令設定 IP、啟用檔案共用

2020年7月13日 星期一

  1. 防火牆 啟用 遠端桌面
    netsh advfirewall firewall set rule group="remote desktop" new enable=Yes
  2. 修改註冊機碼啟用 遠端桌面
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
  3. 防火牆 啟用 檔案及印表機共用
    netsh advfirewall firewall set rule group="File and Printer Sharing" new profile=private
    netsh advfirewall firewall set rule name="檔案及印表機共用 (SMB-In)" dir=in profile=private new enable=Yes
  4. To see a list of interfaces
    netsh interface show interface
  5. To set/change an address:
    netsh interface ip set address "Ethernet" static 10.0.0.100 255.255.0.0 10.0.0.1 1
  6. To see a list of NICs with their configured network settings
    netsh interface ip show config
  7. To set a static IP
    netsh interface ip set address "Local Area Connection 3" static 10.0.0.100 255.255.0.0 10.0.0.1 1
  8. If you are setting a static IP for the first time, you will also need to configure a DNS server:
    netsh interface ipv4 add dnsserver "Local Area Connection 3" address=8.8.8.8 index=1
  9. To change the connection back to DHCP 
    netsh interface ip set address "Local Area Connection 3" dhcp

[PHP]虛擬資料產生器

暑假研習,剛好需好一些資料來測試,有些沒有權限下載自己學校的學生資料,只好動手刻個虛擬資料產生器…,不得不說,巨人的肩膀夠硬啊!直接引用套件(專案)節省很多時間。

  1. 中文姓名
  2. 出生年月日
  3. 學號
  4. 住址
  5. 郵遞區號
  6. 身分證字號(這有點敏感,就不列出來了)




[Windows] 磁碟分割工具 - diskpart

2020年6月18日 星期四

fdisk 就讓它成為過去吧!
diskpart 似乎能處理的比較完整…

截錄----------------------------------------------

使用 diskpart /s 來執行腳本,以自動執行磁片相關工作,例如建立磁片區或將磁片轉換成動態磁碟。 如果您正使用自動安裝或 Sysprep 工具 (這不支援建立非開機磁碟區的磁碟區) 來部署 Windows,那麼以指令執行這些工作非常有用。

若要建立 diskpart 腳本,請建立一個文字檔,其中包含您想要執行的 Diskpart 命令,每行一個命令,而不是空白行。 您可以從開始一行, rem 讓這一行成為批註。 例如,以下腳本會抹除磁片,然後為 Windows 修復環境建立 300 MB 磁碟分割:

```
select disk 0
clean
convert gpt
create partition primary size=300
format quick fs=ntfs label=Windows RE tools
assign letter=T
```

範例

  • 若要執行 diskpart 腳本,請在命令提示字元中輸入下列命令,其中scriptname是包含腳本的文字檔名稱:

    diskpart /s scriptname.txt
    
  • 若要將 diskpart 的腳本輸出重新導向至檔案,請輸入下列命令,其中logfile是 diskpart 寫入其輸出的文字檔名稱:

    diskpart /s scriptname.txt > logfile.txt

[DB] Foxpro 資料型態

2020年6月17日 星期三


DBF DataTypes:
From the VFP help topic Data and Field Types
Data typeDescriptionSize (bytes)Range
CharacterAny text1 to 254Any characters
 VarcharAny text1 to 254Any characters
 VarbinaryBinary data1 to 254Binary data
DateChronological data consisting of month, year, and day8When using strict date formats, {^0001-01-01}, January 1st, 1 A.D to {^9999-12-31}, December 31st, 9999 A.D.
Date TimeChronological data consisting of month, year, day, and time8{^0001-01-01}, January 1st, 1 A.D to {^9999-12-31}, December 31st, 9999 A.D., plus 00:00:00 a.m. to 11:59:59 p.m.
NumericIntegers or fractions1 to 20- .9999999999E+19 to .9999999999E+20
FloatIntegers or fractions1 to 20- .9999999999E+19 to .9999999999E+20
IntegerIntegers4-2,147,483,647 to 2,147,483,647
Double1 to 20- .9999999999E+19 to .9999999999E+20
CurrencyMonetary amounts8 bytes- 922337203685477.5807 to 922337203685477.5807
LogicalBoolean value of true or false1 byteTrue (.T.) or False (.F.)
MemoAny textIn the DBF 4 bytes/memo
In the FPT allocated in chuncks based on SET BLOCKSIZE
Any characters
Generaldata and host programIn the DBF 4 bytes/memo
In the FPT allocated in chuncks based on SET BLOCKSIZE
OLE Documents
BlobBinary dataIn the DBF 4 bytes/memo
In the FPT allocated in chuncks based on SET BLOCKSIZE
Binary data

SSHFS - 在 Windows 10 底下透過 SSH 將遠端目錄掛載為磁碟

2020年6月15日 星期一

Github專案: https://github.com/billziss-gh/sshfs-win

安裝步驟:
  1. WinFsp
  2. SSHFS-Win
基本用法:
net use {磁碟代號:}  \\sshfs\REMOTE_USER@HOST[\PATH]

範例:
net use  X:  \\sshfs\username@myhost.local
net use  X:  \\sshfs\username@myhost.local\..\..\var\www\html

注意:使用者帳號一定要加上,不然會無法登入