發表文章

目前顯示的是 4月, 2019的文章

JavaScript / JQuery 常用外掛

JQuery: http://code.jquery.com/ http://code.jquery.com/ui/ JQuery DOM Windows http://swip.codylindley.com/ JQuery Sweet alert https://sweetalert.js.org/guides/#installation Tether Selection http://tether.io/docs/welcome/ 感謝以上大神的分享

Linux下的sed 指令常用語法

$ sed -i 's/<?/<?php/g' test.php # 參數 -i :直接修改檔案,而不須標準輸出,將 test.php 內的 <? 全部置換為 <?php,g代表全部行,s代表置換 $ sed 's/^192.168./&112.1/' test.php # 開頭行192.168的行,會在該行最後面增加 112.1 $ sed -i '13,$d' test.php #刪除  檔案 test.php 第13行開始到最後一行,並直接修改檔案 $ sed '/require_once(/d' test.php #刪除包含 require_once的所有行,並印出標準輸出 $ sed -n '/$var_config/w test2.php' test.php # 把有$var_config字串的行寫入 test2.php $ sed -i '/^$/d test.php # 刪除所有空白行 $ sed -i 's?/n?/r/n?g' test2.php # 把換行符號換成Windows環境下,為了辨別區隔符號,可以在s後接上?當區隔符號   各系統文件行換行符號 Mac: /r Windows: /r/n Linux/Unix: /n   參考資料 https://www.gnu.org/software/sed/manual/sed.html

產生QRcode之網站

感謝以下大神提供之服務: https://tw.piliapp.com/generator/qr-code/ http://qr.calm9.com/tw/ https://www.34qr.com/ https://qr.ioi.tw/zh/#copyright https://www.funcode-tech.com/LOGOQR_Encoder.aspx

MS Windows 7 更新檔 kb4493472造成更新無法登入

1. 使用安全模式或是windows PE進入windows 7 2. 安全模式登入後從新增移除程式移除更新檔kb4493472,由windows PE進入可移除 c:\Windows\software distribution 3. 重開機,會回復未更新狀態 或利用安全模式進入 控制台->新增移除程式->左方更新檔案,找到kb4493472並移除 參考資料 https://www.ghacks.net/2019/04/11/oh-look-another-broken-windows-update-kb4493472-and-kb4493446-causing-issues/

MySQL取消索引值與改變欄位順序

1. 取消欄位索引標籤 drop index [field_name] on [table_name]; 2. 列出索引鍵 show keys from [table_name]; 3.改變欄位順序 alter table [table_name] modify [field_A] charvar(64) after [field_C]; #field_A 移到 field_C 後面 alter table [table_name] modify [field_A] charvar(64) first [field_D]; #field_A 移到 field_D 後面

NVIDIA CUDA tool + Python + Tensorflow/Tensorflow-gpu + Theano + pytorch 安裝順序 on MS Windows 10

圖片
1. 安裝Nvidia驅動程式 https://www.nvidia.com.tw/Download/index.aspx?lang=tw   2. 安裝python 3.6.x版本 https://www.python.org/downloads/release/python-368/     安裝好設定環境變數PATH 3. 安裝 pip 版本 https://bootstrap.pypa.io/get-pip.py 開始->cmd -> 執行 python get-pip.py      安裝後 升級 pip, python -m pip install --upgrade pip 4. 安裝 visualstudio 2015 或以上 https://visualstudio.microsoft.com/vs/older-downloads/?rr=https%3A%2F%2Fwww.google.com%2F 5. 安裝 cuda toolkit https://developer.nvidia.com/cuda-downloads 6. 透過 pip 安裝 jupyter    開始->cmd -> pip3 install jupyter 利用 where 指令找到 jupyter 位置並新增至桌面為捷徑,再加上notebook參數,就可直接開啟 jupyter notebook 7. 透過pip 安裝 tensorflow    開始->cmd -> pip3 install tensorflow->pip install tensorflow-gpu 8.透過 pip 安裝 theano   開始->cmd -> pip3 install theano 9. 透過pip 安裝 pytorch(https://pytorch.org/)   開始->cmd-> pip3 install  https://download.pytorch.org/whl/cu100/torch-1.0.11-cp36-cp36m-win_amd64.wh