This file contains hidden or 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
# 可引用 $filter 處理 | |
# ref → https://docs.angularjs.org/api/ng/filter/date | |
// 日期格式處理 | |
$scope.checkTimeFmt = $filter('date')($scope.checkTime, 'yyyy/MM/dd HH:mm:ss'); | |
// 等同在html | |
{{checkTime | date:'yyyy/MM/dd HH:mm:ss' }} | |
//------------------- |
This file contains hidden or 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
//# sub-sequence | |
$scope.convertDateFormat = function() | |
{ | |
// 子檔 | |
if (Array.isArray($scope.dataItems.POP_HANDLING_CARGO_LIST)) { | |
$scope.dataItems.POP_HANDLING_CARGO_LIST | |
.forEach(function (itm) { | |
itm.START_DT = new Date(itm.START_DT).dateFormat("Y/m/d h:i"); | |
itm.END_DT = new Date(itm.END_DT).dateFormat("Y/m/d h:i"); | |
}); |
This file contains hidden or 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
參考自: http://stackoverflow.com/questions/831030/how-to-get-get-request-parameters-in-javascript | |
答案如下,只需解析出來。 | |
window.location.search | |
解析函數 | |
function getRequestParam(name){ | |
if(name=(new RegExp('[?&]'+encodeURIComponent(name)+'=([^&]*)')).exec(location.search)) | |
return decodeURIComponent(name[1]); | |
} |
This file contains hidden or 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
--參考自:http://blog.xuite.net/dlnk/work/38263590-SQL+Server+%E5%AE%9A%E5%BA%8F%E8%A1%9D%E7%AA%81+ | |
--SQL Server 定序衝突 無法解析equal to 作業中"Chinese_Taiwan_Stroke_CI_AS" | |
--只要將定序不統一的欄位用COLLATE轉換就可以了 | |
select | |
AutoId, | |
Account, | |
CharName, |
This file contains hidden or 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
// 有三種方式使用ComboBox | |
// 直接看例子比較快 | |
// 法一:純文字 | |
cbxAuthLevel.Items.Add("選項一"); | |
cbxAuthLevel.Items.Add("選項二"); | |
cbxAuthLevel.Items.Add("選項三"); | |
cbxAuthLevel.Text //<-- 操作時,使用此屬性 |
This file contains hidden or 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
//參考來源1:http://blog.darkthread.net/post-2010-05-06-webclient-ssl-dismatch.aspx | |
//參考來源2:http://awei791129.pixnet.net/blog/post/24463385-%5Bc%23%5D-%E7%95%B6%E8%A6%81%E6%B1%82https%E9%80%A3%E7%B7%9A%E5%87%BA%E7%8F%BE%EF%BC%8C%E5%9F%BA%E7%A4%8E%E9%80%A3%E6%8E%A5%E5%B7%B2%E9%97%9C%E9%96%89%3A-%E7%84%A1 | |
關鍵參教 | |
xxx.ServerCertificateValidationCallback = delegate { return true; }; | |
// 狀況一:改連線設定-範例 | |
System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; | |
// 狀況一:使用HttpWebRequest的解法-範例 |
This file contains hidden or 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
'類別名稱:ComWithoutRegister | |
'程式語言:Visual Basic | |
'開發平台:Microsft Viaual Basic 6(VB6) | |
'說明:VB6不註冊調用ActiveX Dll。以下為本人案例, 請依你的需求變更“your”的部份。 | |
'注意:此範例無法處理動態調用。 | |
'注意2:需設定引用項目olelib.tlb (Edanmo's OLE interfaces & functions v1.81),http://www.mvps.org/emorcillo/download/vb6/tl_ole.zip | |
'注意3:在引用不註冊的COM Class時,其中的 ReDim 指令只能用 private 型態,不然會失效。這不科學但存在。若非用不可需自己多加一道額外的轉換 public 操作。 | |
'參考資料:http://blog.yam.com/wyattkid/article/16416433 | |
Option Explicit |
This file contains hidden or 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
Option Explicit | |
Private Declare Function GetPrivateProfileString Lib "kernel32" Alias "GetPrivateProfileStringA" (ByVal lpSectionName As String, ByVal lpKeyName As Any, ByVal lpDefault As String, ByVal lpbuffurnedString As String, ByVal nBuffSize As Long, ByVal lpFileName As String) As Long | |
Private Declare Function WritePrivateProfileString Lib "kernel32" Alias "WritePrivateProfileStringA" (ByVal lpSectionName As String, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lpFileName As String) As Long | |
Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long | |
Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long | |
Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long | |
Private Declare Function GetModuleHandle Lib "kernel32.dll" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long | |
Private Declare Function DispCallFunc Lib "oleaut32.dll" (ByVal pvInstance A |
This file contains hidden or 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
// 引言:工作上需要,比較電話號碼,排除大小寫與dash | |
// 使用時搭配LINQ語法,用於 LINQ.Distinct() | |
// 參考文件:https://msdn.microsoft.com/zh-tw/library/ms132151(v=vs.110).aspx | |
/// <summary> | |
/// 自訂電話號碼比較 | |
/// </summary> | |
class MyTelephoneEqualityComparer : IEqualityComparer<string> | |
{ | |
public bool Equals(string s1, string s2) |
This file contains hidden or 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.Text.RegularExpressions; | |
internal class AddressParser | |
{ | |
public AddressParser(string address) | |
{ | |
this.OrginalAddress = address; | |
this.ParseByRegex(address); | |
} |
OlderNewer