2019年9月19日 星期四

0920

學號 姓名 畢業學校/最高學歷 科/系/所 從事行業或工作領域 課程後希望的工作目標
16 余祥文 海洋大學 機械所 機構工程師:負責機械繪圖與
生產工程問題分析及解決
ASP.NET 軟體工程師(桃園);
Internet程式設計師

2019年9月18日 星期三

2019年9月17日 星期二

0918 - xampp build & workspace build

使用 本機 web browser test VM xammp web site

1. 本機 修改 C:\Windows\System32\drivers\etc\hosts
增加
127.0.0.1                        web108b.wda.edu.tw
192.168.67.123        web108b.wda.edu.tw

2. VM modify D:\xampp\apache\conf\extra\httpd-vhosts.conf

<VirtualHost *:80>
    ##ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "/xampp/htdocs/web108b"
    ServerName web108b.wda.edu.tw
    ##ErrorLog "logs/dummy-host2.example.com-error.log"
    ##CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>

3. 建立 html folder
D:\xampp\htdocs\web108b

------------ VM <<< >>> 本機 連線 test ---------------------

** VM 裝 -----
* VM 的 xampp location
    DocumentRoot "/xampp/htdocs/web108b"
    ServerName web108b.wda.edu.tw

* 本機的 system 32
192.168.67.123        web108bvm.wda.edu.tw ?? 兩個都寫 ?? OK
* <result 本機連 vm ok -- chrome>
** 本機裝的 相反----

本機 的 xampp location ;; (注意 資料夾只能放在 /xampp-web108b/htdocs/ 底下)
    DocumentRoot "/xampp-web108b/htdocs/user108b"
    ServerName web108b.wda.edu.tw

VM的 system 32

192.168.67.23 web108b.wda.edu.tw ?? 兩個都寫 ?? OK

----------------------------------
=========joey- vs code - settings.json============
{
    "extensions.autoUpdate": false, //禁止擴展更新
    "extensions.ignoreRecommendations": true,
    "update.mode": "none", //禁止軟件版本更新
    // 在儲存時設定檔案格式。格式器必須處於可用狀態、檔案不得自動儲存,且編輯器不得關機。
    "diffEditor.ignoreTrimWhitespace": true,
    // 設定預設存檔時不做格式化,使用分別啟動
    "editor.formatOnSave": false,
    // 分別啟用指定語言
    "[php]": {
        "editor.formatOnSave": true,
    },
    "[css]": {
        "editor.formatOnSave": true
    },
    "[html]": {
        "editor.formatOnSave": true
    },
    "[javascript]": {
        "editor.formatOnSave": true
    },
    // 控制編輯器是否應自動設定貼上的內容格式。格式器必須可供使用,而且格式器應該能夠設定文件中一個範圍的格式。
    "editor.formatOnPaste": true,// 貼上程式碼時會自動幫你排版(縮排)
    "editor.formatOnSaveTimeout": 1250,
    "editor.cursorStyle": "block",
    "editor.fontFamily": "Fira Code",  //"'Courier New'"
    // - 'bounded' (當檢視區縮至最小並設定 'editor.wordWrapColumn' 時換行).
    "editor.wordWrap": "on",//每行如果超出視圖範圍就自動換行顯示。
    "editor.lineHeight": 28,
    "editor.fontLigatures": true,
    "editor.fontSize": 16, // 字體大小
    "editor.lineNumbers": "on",
    "editor.minimap.enabled": false, // 關掉右側滑動預覽檔
    "editor.renderIndentGuides": false,
    //設定的 Snippet 放在最上面顯示
    "editor.snippetSuggestions": "top",
    //1 tab = 4 spaces
    "editor.tabSize": 4,
    "editor.rulers": [
        120
    ],
    //用ctrl+滑鼠滾輪去放大縮小使
    "editor.mouseWheelZoom": true,
    //"editor.fontWeight": "300",  // Light
    //"editor.fontWeight": "400",  // Regular
    //"editor.fontWeight": "500",  // Medium
    "editor.fontWeight": "600",
    "editor.quickSuggestions": { //智慧提示
        "other": true,
        "comments": true,
        "strings": true
    },
    "workbench.colorTheme": "Seti Monokai", //Solarized Dark、Monokai
    "workbench.iconTheme": "vscode-icons", //增加文件夾圖示。 vscode-great-icons、 要先下載vscode-icons套件(後面會提到)
    "window.zoomLevel": 1,
    // Windows 的換行是 \r\n (CRLF),而 Linux 是 \n (LF),會遇到 Windows 開發後放在 Linux 跑時會 error,為了讓事情簡單化就預設是 LF 吧,這是針對新增的,舊的可以從右下角去改變它
    "files.eol": "\n",
    "files.autoSave": "onFocusChange",
    "files.autoSaveDelay": 3000,
    //設定其它副檔名的檔案跟 php 是有關係的
    "files.associations": {
        "*.inc": "php",
        "*.tpl": "html"
    },
    //新檔為 UTF8
    "files.encoding": "utf8",
    "files.trimTrailingWhitespace": true,
 //------------------------------  HTML CSS SUPPORT ------------------------------//
"css.fileExtensions": [
    "css",
    "scss"
],
"css.remoteStyleSheets": [
    "https://maxcdn.bootstrapcdn.com/bootstrap/ 4.0.0-alpha.6/css/bootstrap.min.css"
],
//============================== VSCode Browser Sync ==============================//
"browserSync.config": {
    "browser": [
        "chrome",
    ],
    "files": [
        "*.html",
        "*.log",
        "*.php",
        "/css/*.css",
        "/js/*.js"
    ],
    "codeSync": true
},
    //============================== LiveServer For Web ================================//
    "liveServer.settings.useWebExt": true,
    "liveServer.settings.host": "localhost",
    "liveServer.settings.port": 5500,

}

===========joey==================

2019年9月16日 星期一

0916

GDS
blog
Xmind
Trello

-----------------------------------
* M2432 VM 轉移 SOP test ok 9/16
1. install driver again
2. 橋接網路 choose NAT (not NAT 網路)
3. IP4 網路 改 自動取得 IP
4. 共用資夾 改 J:
-----------------------------------
9/10 刷卡說明 & PC ID 共用槽
9/11 VM build - test 龜 & classroom ok
web
共用夾
D:
9/12 sql server 2012 install
9/16 sql server db 資料庫備份與還原 與 操作
還原比較容易出錯 (還原演練; 災難復原計畫)


=========TSQL 程式碼==============

use [master]
-- 開啟 xp_cmdshell
EXEC sp_configure 'show advanced options', 1;
GO
RECONFIGURE;
GO
EXEC sp_configure 'xp_cmdshell', 1;
GO
RECONFIGURE;
GO 

--宣告變數
DECLARE @FolderName nvarchar(100) 
DECLARE @FileName nvarchar(100)
DECLARE @BackupFolderName nvarchar(100)
DECLARE @FileDate nvarchar(100)
DECLARE @DataBaseName nvarchar(100)
DECLARE @JobName nvarchar(100)
DECLARE @Command nvarchar(100)

--設定變數
------ 要改的地方 以下 name & 路徑
SET @DataBaseName = 'db1'
SET @BackupFolderName = 'D:\dbbackup\sql2012'
------ 要改的地方 以上 name & 路徑

SET @JobName = @DataBaseName + ' 備份'

--取得日期變數 , 例 2013-01-01 12:30:40.001
SET @FileDate = CONVERT(nvarchar(100), GETDATE(), 121)

--除去日期變數中的 - : . 符號 , 例 20130101_123040_001
SET @FileDate = REPLACE( @FileDate , '-' , '' )
SET @FileDate = REPLACE( @FileDate , ':' , '' )
SET @FileDate = REPLACE( @FileDate , '.' , '_' )
SET @FileDate = REPLACE( @FileDate , ' ' , '_' )

--設定備份目錄,並自動以年、月建立目錄
SET @FolderName = @BackupFolderName
SET @Command = 'mkdir ' + @FolderName
EXEC xp_cmdshell @Command, no_output

SET @FolderName = @FolderName + '\' + @DataBaseName 
SET @Command = 'mkdir ' + @FolderName
EXEC xp_cmdshell @Command, no_output

SET @FolderName = @FolderName + '\' + SUBSTRING(@FileDate , 1 , 4)
SET @Command = 'mkdir ' + @FolderName
EXEC xp_cmdshell @Command, no_output

SET @FolderName = @FolderName + '\' + SUBSTRING(@FileDate , 5 , 2)
SET @Command = 'mkdir ' + @FolderName
EXEC xp_cmdshell @Command, no_output

--設定檔案名稱
SET @FileName = @FolderName + '\' + @DataBaseName  + '_' + SUBSTRING(@FileDate , 1 , 15) + '.bak'

--執行備份作業
BACKUP DATABASE @DataBaseName TO DISK = @FileName WITH NOINIT , NOUNLOAD , NAME = @JobName , NOSKIP , STATS = 10, NOFORMAT


-- 關閉 xp_cmdshell
use [master]
EXEC sp_configure 'show advanced options', 0;
GO
EXEC sp_configure 'xp_cmdshell', 0;
GO
RECONFIGURE;
GO 

==========TSQL 程式碼============