This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
This file contains 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
#讀取資料 | |
mydata=read.table("30minUp_2.txt") | |
#檢視資料 | |
summary(mydata) | |
#繪製一個盒鬚圖 | |
boxplot(mydata$V1, staplewex = 1, xlab = "Process Time", col = "gray") | |
#加上標題 | |
title("Process time boxplot") | |
#在指定位置加上數值說明 | |
text(y = boxplot.stats(mydata$V1)$stats, labels = boxplot.stats(mydata$V1)$stats, x = 1.25) |
This file contains 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
#創造一個測試的資料集 | |
c<-1:100 | |
#對c會製一個盒鬚圖,並存入test_boxplot | |
test_boxplot<-boxplot(c, ylab = "value", col = "gray") | |
#檢視boxplot的敘述統計的值 | |
test_boxplot$stats | |
#透過text在目前的繪圖系統中的指定位置加入文字 | |
text(y = boxplot.stats(c)$stats, labels = boxplot.stats(c)$stats, x = 1.25) |
This file contains 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
//作者:李碩軒 | |
//日期:2018/06/17 | |
//說明:LBC為Line Balance Calculation的縮寫,目的在於計算生產線中,分段後的可能線平衡綠。 | |
//首先要根據可能的切點,找出所有可能組合,放到第一個可產出文件:AllPossibleSubset.txt。此處找出集合的方法,請參考http://www.applied-math.org/subset.pdf | |
//再設定第二個檔案串流,讀取AllPossibleSubset,然後計算可能解的數量(由於一個可能解,後面都會有一個\n,所以看有幾個\n就有幾組解) | |
//再逐一計算每個可能解於三種零件的分段工時加總,分別放到topSeg,botSeg,stdSeg(也就是生產上/下/立 管的生產線的分段加工時間加總) | |
//最終將檔案輸出到ConstraintResult.txt | |
#include <iostream> | |
#include <vector> | |
#include <algorithm> |
This file contains 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
/* | |
程式目的:查詢特定字元於某資料庫欄位(字元)出現次數。 | |
範例解釋:以123x456x123x456此字串為例,找尋字元x出現的次數,結果顯示會查詢到3次x | |
詳細解釋可參考http://shuohsuanli-bear.blogspot.tw/2018/01/sql.html | |
程式撰寫者:李碩軒 | |
日期:2018/01/24 | |
*/ | |
SELECT | |
T.STRING |
This file contains 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
<?php | |
$conn = mssql_connect("Localhost SQL Server Name", "sa", "Password"); | |
//select the database table and check if it exists or not | |
if($conn){ | |
echo '連接伺服器成功(Connection success)<br>'; | |
}else{ | |
echo '連接伺服器失敗(Connection fail)<br>'; | |
} | |
//The below two lines is help to remove the error message | |
$result = mssql_query("SET ANSI_NULLS ON") or die(mssql_get_last_message()); |
This file contains 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
private void ToolStripMenuItem_13_Click(object sender, EventArgs e) | |
{ | |
//new one savefiledialog | |
SaveFileDialog saveFileDialog1 = new SaveFileDialog(); | |
//Rename the title as 儲存檔案(Differentiate the dialog title from the 另存新檔) | |
saveFileDialog1.Title = "儲存檔案"; | |
//Set the default name | |
saveFileDialog1.FileName = "新記事本檔案.txt"; | |
saveFileDialog1.Filter = "Text File | *.txt"; | |
if (saveFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) |
This file contains 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
/* | |
課本練習題 | |
課本名稱:新思維系列 Visual C# 2015 程式設計 | |
題目:撰寫一個程式,令它使用二維陣列存放下列元素,然後在二維陣列內搜尋最 | |
大值及最小值,並顯示其索引。 | |
二維陣列: | |
{ { 21, 22, 23, 23, 25, 26 }, { 11, 12, 13, 14, 15, 16 }, { 1, 2, 3, 4, 5, 6 } } | |
程式撰寫者:李碩軒 | |
日期:2017/03/14 | |
*/ |
This file contains 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
//First part,for testing the AD server is work or not | |
//Second part,for searching the specified CN and listing them | |
<?php | |
$ldaphost="domain name"; | |
$ldapconn=ldap_connect($ldaphost); | |
if($ldapconn) | |
echo "Connect success<br>"; | |
else | |
echo "Connect Failure"; | |
//For simplification,you can wirte $ldapconn = ldap_connect($ldaphost)or die("Could not connect to ".$ldaphost); |
This file contains 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
//domain name(or URL),account,password should replace with actual string | |
<?php | |
//For testing the AD server is work or not | |
$ldaphost="domain name"; | |
$ldapconn=ldap_connect($ldaphost); | |
if($ldapconn) | |
echo "Connect success<br>"; | |
else | |
echo "Connect Failure"; | |
//For simplification,you can wirte $ldapconn = ldap_connect($ldaphost)or die("Could not connect to ".$ldaphost); |
NewerOlder