~relax~
- Apr 19 Wed 2017 15:33
[敗家] Jane Iredale 愛芮兒珍 防曬粉撲 Powder-Me SPF30
- Apr 18 Tue 2017 15:40
[敗家] 雅詩蘭黛官網購物初體驗
由於一直買不到SK-II青春精華露(30ml 4900元)買一送一, 今年母親節就開始研究其他品牌的精華液.
也沒怎麼做功課, 就被雅詩蘭黛美麗的官網及很有誠意的新客活動給吸過去了~
雅詩蘭黛官網購物畫面很簡單 好操作, 且流程順暢, 讓我沒考慮多久就刷卡結帳了! (汗
主要是購買特潤精華液, 不小心手滑也買了特潤眼霜...
- Aug 05 Fri 2016 14:17
[C#] 不安裝 Office Excel 也可以產生Excel檔
參考:http://no2don.blogspot.com/2013/02/c-nopi-excel-xls.html
下載NPOI的dll,放到專案 (共五個dll)
using NPOI.XSSF.UserModel; using NPOI.SS.UserModel; //建立 Workbook XSSFWorkbook wb = new XSSFWorkbook(); //建立一個叫做"Sheet1"的 Sheet XSSFSheet st = (XSSFSheet)wb.CreateSheet("Sheet1"); //生成一個新Row (第一列:0, 第二列:1, ...類推) int row_index = 0; st.CreateRow(row_index); //生成這個Row的Cell, 且放值進去 (第一格:0, 第二格:1, ...類推) st.GetRow(row_index).CreateCell(0, CellType.String).SetCellValue("內容值"); //A1 st.GetRow(row_index).CreateCell(1, CellType.String).SetCellValue("內容值"); //B1 //再生成一個新Row st.CreateRow(++row_index); //生成這個Row的Cell, 且放值進去 st.GetRow(row_index).CreateCell(0, CellType.String).SetCellValue("內容值"); //A2 st.GetRow(row_index).CreateCell(1, CellType.String).SetCellValue("內容值"); //B2 //寫入 var file = new FileStream("檔案路徑\\檔案名稱.xlsx", FileMode.Create); wb.Write(file); file.Close(); //關閉 Workbook wb = null;
- Jul 06 Wed 2016 14:22
[SQL] 遞迴的寫法
工作上突然有一個遞迴的需求
需求並不複雜, 用程式就能簡簡單單的寫完
但是SQL語法非常不熟練的我, 突然想說 來練練SQL語法好了 (加上懶得再改程式...)
所以就來研究了一下SQL的遞迴寫法
- Feb 17 Wed 2016 15:31
[T-SQL] Transaction 用法
[T-SQL] Transaction 用法
Transaction(交易,大陸譯名:事务)
將多個資料庫操作的 SQL 指令 group 成一個執行的單元區塊( a single execution unit ),以特定的字串( Begin Transaction )來標記交易開始,一個交易可能包括了多個資料庫操作指令來完成,交易結束時的動作有兩個,若所有的操作全部執行成功,交易才算成功並提交變更( Commit Transaction ),若當中有發生錯誤失敗,則整個交易宣告失敗並回復所有變更( Rollback Transaction )。
例:
DECLARE @chk tinyint
- Jun 10 Wed 2015 11:46
[C#] SAP RFC 連線+取Table 範例程式碼
//設定連線參數 RfcConfigParameters parms = new RfcConfigParameters(); parms.Add(RfcConfigParameters.AppServerHost, ServerIP); //172.16.0.1 parms.Add(RfcConfigParameters.SystemNumber, SystemNumber); //00 parms.Add(RfcConfigParameters.SystemID, SystemID); //PRD parms.Add(RfcConfigParameters.User, User); //SAPUSER parms.Add(RfcConfigParameters.Password, Password); //SAPPWD parms.Add(RfcConfigParameters.Client, Client); //225 parms.Add(RfcConfigParameters.Language, "EN"); parms.Add(RfcConfigParameters.PoolSize, "5"); parms.Add(RfcConfigParameters.PeakConnectionsLimit, "10"); parms.Add(RfcConfigParameters.ConnectionIdleTimeout, "600"); parms.Add(RfcConfigParameters.Name, "LIPS"); //取得連線 RfcDestination destination = RfcDestinationManager.GetDestination(parms); RfcSessionManager.BeginContext(destination); destination.Ping(); //宣告RfcFunction IRfcFunction rfcFunction = destination.Repository.CreateFunction(RfcFunctionName); //設定RfcFunction Table參數 rfcFunction.SetValue("AUFNR", 傳入參數); //傳入型別: 字串(string), 代表意義 工單 rfcFunction.SetValue("LOC_TYPE", 傳入參數); //傳入型別: 字元(character), 代表意義 R:電阻 C:電容 L:電感 //執行此RfcFunction以產生RfcFunction Table rfcFunction.Invoke(destination); //取回RfcFunction產生的Table IRfcTable table = rfcFunction.GetTable(TableName); //destination = null;//關閉連線 if (destination != null) { RfcSessionManager.EndContext(destination); destination = null; } DataTable dt = new DataTable(); //新建表格 dt.Columns.Add("Part"); //表格添加一列 dt.Columns.Add("Location"); //表格添加一列 for (int i = 0; i < table.RowCount; i++) { table.CurrentIndex = i; //当前内表的索引行 string PartName = string.Empty; string Location = string.Empty; PartName = table.GetString("MATNR"); //获取表格的某行某列的值 Location += table.GetString("LOC1"); Location += table.GetString("LOC2"); Location += table.GetString("LOC3"); //Console.WriteLine(PartName); //Console.WriteLine(Location); //開始Parser資訊... }
- Mar 19 Thu 2015 18:16
[SQL Server] 複製DB資料庫(包含格式)
1. DB > Task > Copy Database
2. Next
- Feb 13 Fri 2015 10:06
政府補助 資格及限制
高雄市 中低收入老人生活津貼
申請資格與內容
1. 年滿65歲設籍並實際居住本市,且最近一年居住國內超過183日之市民。
2. 未接受政府其他生活補助亦未經收容安置者。