2021年11月2日 星期二

qqPlotMultiWafer

 samples = Data

Result <- NULL 
 for(WAFERPART in unique(samples$WAFER)) { 
 rawDataPart<-subset(samples, WAFER == WAFERPART )
    length<- nrow(rawDataPart)#wafer data count
rawDataPart$rank <- NA
rawDataPart$qnorm <- NA
rawDataPart$waferCount <- NA
    rawDataPart$rank[order(rawDataPart$x)] <- 1:nrow(rawDataPart)
rawDataPart$qnorm<-qnorm(rawDataPart$rank/(length+1))
rawDataPart$waferCount<-length
newData<-rawDataPart
    data <- rawDataPart$x
    colnames(newData) <- c('parameter','rawData','wafer','rank','gnorm','waferCount')
    if(is.null(Result)) { Result <- newData }
    else { Result = rbind(Result, newData) } 

2021年10月31日 星期日

chart.js使用心得

不同的版本的chart.js寫的方式不一樣,所以網路上有些寫的方式可以有的不行,如果要寫在後面必須要把html與法中的空格去掉,例如< br >變成<br>,網頁才會產生你要的語法。

2021年8月9日 星期一

MS Access

 連接字串為檔案位置,例如C://xx/xx/xx

表格轉逗號隔開字串

    rtrim(xmlagg(XMLELEMENT(e, lot || ':' || sample,',').EXTRACT('//text()')).GetClobVal(),',') "sample"

how to code copy file to build or release folder

 1.

專案 

屬性

 建置事件 

鑑識後事件命列輸入

 if not exist "$(ProjectDir)$(OutDir)configs" mkdir "$(ProjectDir)$(OutDir)configs"

 copy "$(ProjectDir)configs\"  "$(ProjectDir)$(OutDir)configs\"



2.

按下檔案

屬性

properties 

copy to output directory 

選擇copy always

















2019年12月3日 星期二

[asp.net core] swagger 注意事項

1.
要有裝
dotnet add package Microsoft.EntityFrameworkCore.SqlServer
再裝
dotnet add TodoApi.csproj package Swashbuckle.AspNetCore -v 5.0.0-rc4

不然會一直出錯

2019年4月4日 星期四

[Xamarin]Incompatible HAX module version 3,requires minimum version 4 No accelerator found. failed to initialize HAX: Invalid argument 2019

原因:Incompatible HAX module version 3,requires minimum version 4 No accelerator found. failed to initialize HAX: Invalid argument 2019

方法:因為下載 HAXM is installed in the Android SDK Manager,但是沒有安裝,找到安裝檔案位置,手動安裝

2018年6月9日 星期六

在chrome 要打開

http://www.codedata.com.tw/javascript/es6-testable-platforms/

才能用es6 import and export

主 script要加 module
<script module src="compiled.js"></script>

2017年11月1日 星期三

url不同使用方式

如果只想用自己電腦上的檔案,使用C://xxx/xxx/xxx,
如果只用在自己網路上的檔案,使用http://www.xxx/xxx/xxx。

2017年10月19日 星期四

jquery的intellisense

visual studio 2017
在工具選項的javascript/TypeScript的Language Service 把啟用新的JavaScript Language Service的打勾移除


另外作法:
在js檔中加入下列一段,會自動參考(版本自行替換)
 /// <reference path="Scripts/jquery-2.0.0.min.js" /> /// <reference path="Scripts/jquery-2.0.0.intellisense.js" />

dapper 連接資料庫

連接資料庫有ado.net,dapper,Entity Framework

Imports System.Transactions //可以加快速度


1.開啟NuGet管理視窗下載Dapper


C#
顯示在gridview
protected void Page_Load(object sender, EventArgs e)
        {
            GridView1.DataSource = ReadAll();
            GridView1.DataBind();
        }
        public class conference
        {
           
            public 資料庫欄位型別 資料庫欄位名稱 { get; set; }

            //出來的資料也只有定義在類別(這裡)的資料
        }
        public List<con> ReadAll()
        {
            using (IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["xxx"].ConnectionString))
            {
                return db.Query<con>
                ("Select * From 資料庫 m" Where xxx=@xxx", 
                                        new { xxx = 1 }).ToList();
            }
        }

2017年10月18日 星期三

MVC api教學網站

http://kirkchen.logdown.com/pages/use-aspnet-mvc-to-develop-api


http://kirkchen.logdown.com/posts/246422-aspnet-mvc-using-aspnet-idetity-integrate-google-login

[IIS]上傳到伺服器

網頁的config加上

 <system.web>
        <customErrors mode =“Off”/>
    </system.web>

heperv docker 都像是虛擬電腦

heperv docker 都像是虛擬電腦

SqlConnection

http://ithelp.ithome.com.tw/articles/10156403

2017年10月17日 星期二

C#return和yield return心得

return
yield return


yield return 會回到以前的程式執行,看起來都是迴圈之類的程式 ,不斷地把符合程式的資料丟出來,return大概只會丟一次

public static void foreach(Collection<String> collection) {
    Iterator<String> iterator = collection.iterator();
    while(iterator.hasNext()) {
        System.out.println(iterator.next());
    }
}

現在,無論是List或Set,無論真正的實作是ArrayList、LinkedList、HashSet...,都可以使用這個foreach方法來 顯示內部所收集的物件。





             int x = (int)Days.Sun;
            string y = Days.Sun.ToString();
            Console.WriteLine("Sun = {0}", x);---->得到位置的值   0
            Console.WriteLine("Fri = {0}", y);------>得到值   sum

  enum Days { Sun, Mon, Tue, Wed, Thu, Fri, Sat };


可能是方便給值又有數字  就是每個值都要代表的數字 方便取值


和swich使用


structure

structure enum class 一ㄗ
可不用宣告
不用new

表某一個群組

像是 structure 農場
{


}
class TheClass
{
    public int x;
}

struct TheStruct
{
    public int x;
}

class TestClass
{
    public static void structtaker(TheStruct s)
    {
        s.x = 5;
    }
    public static void classtaker(TheClass c)
    {
        c.x = 5;
    }
    public static void Main()
    {
        TheStruct a = new TheStruct();
        TheClass b = new TheClass();
        a.x = 1;
        b.x = 1;
        structtaker(a);
        classtaker(b);
        Console.WriteLine("a.x = {0}", a.x);
        Console.WriteLine("b.x = {0}", b.x);
    }
}
雖然感覺用不到

C#專案開成網頁

問題:
嚴重性 程式碼 說明 專案 檔案 行 隱藏項目狀態 錯誤 無法辨認的屬性 'xmlns:xdt'。請注意,屬性名稱必須區分大小寫。

解決方式:
專案開成網頁

C#unity教學網頁

http://www.cg.com.tw/Unity/

http://readandplay.pixnet.net/blog/post/203728573-unity%E6%95%99%E5%AD%B8-2d%E5%B0%8F%E9%81%8A%E6%88%B2%E8%A3%BD%E4%BD%9C-part-4-%28end%29