C# 2차원 배열 응용
Remark : 2차원 배열에서 특정 비번 데이타 찾아보기
Remark : 2차원 배열에서 특정 비번 데이타 찾아보기
Remark : 정수의 크기(길이) 범위 C# 형식/키워드 범위 크기 byte 0 ~ 255 부호 없는 8비트 정수 short –32,768 ~ 32,767 부호 있는 16비트 정수 ushort […]
Remark : 경과 시간 계산 하기 1,TimeSpan 사용 2.Stopwatch 사용/ 버전에 상관없이 쓸수 있는 방식 (추천)
C# 에서 항상 디비값이 null이면 DBNull 로 리턴한다. DBNull 은 String 으로 변경하여 비교할 수가 있다.
Remark : LINQ to Entities does not recognize the method ‘get_Item(Int32)’ 메서드를 인식하지 않으므로 이 메서드는 저장소 식으로 변환될 수 없습니다. Solution : R_Data[1] 를 […]
Remark : 일자별 log 데이타 저장 Log 상태
Remark : Soap xml 을 조회하는 웹서비스를 만들어 보자
1 2 3 4 5 6 |
<?xml version="1.0" encoding="UTF-8"?> <WTEXT> <![CDATA[Clr 유형이 'ConcatString'인 확장 함수 매개 변수 또는 반환 값은 지원되지 않습니다.]]> </WTEXT> |
Extension function parameters or return values which have Clr type ‘ConcatString’ are not supported.
1 2 3 4 5 |
for(int i=0;i<10;i++){ temp = temp + res[i]; // Error => Clr 유형이 'ConcatString'인 확장 함수 매개 변수 또는 반환 값은 지원되지 않습니다. } |
참조 : https://stackoverflow.com/questions/12917802/javascript-with-xlt-formatting-error
HTTP 오류 403.14 – Forbidden 웹 서버가 이 디렉터리의 내용을 표시하지 못하도록 구성되었습니다. 가능성이 높은 원인: 요청된 URL에 대해 기본 문서가 구성되지 않았으며 서버에서 디렉터리 […]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
각 패키지는 해당 소유자에 의해 사용이 허가됩니다. Microsoft는 타사 패키지에 대해 책임을 지거나 사용권을 부여하지 않습니다. 일부 패키지에는 추가 라이선스에 의해 관리되는 종속성이 포함되어 있을 수 있습니다. 패키지 소스(피드) URL로 이동하여 종속성을 확인하십시오. 패키지 관리자 콘솔 호스트 버전 2.0.30625.9003 사용 가능한 NuGet 명령을 보려면 'get-help NuGet'을 입력하십시오. PM> Install-Package Newtonsoft.Json -Version 9.0.1 Install-Package : 패키지 'Newtonsoft.Json'의 버전 '9.0.1'을(를) 찾을 수 없습니다. 위치 줄:1 문자:16 + Install-Package <<<< Newtonsoft.Json -Version 9.0.1 + CategoryInfo : NotSpecified: (:) [Install-Package], InvalidOperationException + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand PM> |
NuGet 패키지 관리로 다운로드
1 2 3 4 5 6 7 8 9 |
PM> Install-Package Newtonsoft.Json 'Newtonsoft.Json 9.0.1'을(를) 설치하는 중입니다. 'Newtonsoft.Json 9.0.1'을(를) 설치했습니다. 'Newtonsoft.Json 9.0.1'을(를) ConsoleApplication1에 추가하는 중입니다. ConsoleApplication1에 'Newtonsoft.Json 9.0.1'을(를) 추가했습니다. PM> |
소스: SQL Datetime Conversion – String Date Convert Formats – SQLUSA
1 2 3 4 |
select CONVERT(VARCHAR(10), GETDATE(), 112) 20190303 |
번호 쿼리 결과 코드 0 CONVERT(CHAR(19), DATETIME, 0) 01 02 2000 1:14PM […]
VB Source 한글을 2byte 로 계산하기 위해 아래로 같은 변경하여 위치의 byte들을 가져온다.
1 2 3 4 5 6 7 8 |
Public Function Data_Cut(sDat, Start_len, last_len) As String Dim Tmp_Chk As String Tmp_Chk = StrConv(MidB(StrConv(sDat, vbFromUnicode), Start_len, last_len), vbUnicode) Data_Cut = Tmp_Chk End Function |
To C# Source C# 으로 변경하면 다음과 같이 사용할수 있다. ks_c_5601-1987 […]
지정된 트러스트 공급자가, 주제에 대해 지정된 형식을 지원하지 않거나 알 수 없습니다. ISO 파일 풀지 말고 CD 나 USB 로 구워 설치 하면 됩니다. iso […]
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
public static class TestEmail { /// <summary> /// Regular expression, which is used to validate an E-Mail address. /// </summary> public const string MatchEmailPattern = @"^(([\w-]+\.)+[\w-]+|([a-zA-Z]{1}|[\w-]{2,}))@" + @"((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]? [0-9]{1,2}|25[0-5]|2[0-4][0-9])\." + @"([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\.([0-1]? [0-9]{1,2}|25[0-5]|2[0-4][0-9])){1}|" + @"([a-zA-Z0-9]+[\w-]+\.)+[a-zA-Z]{1}[a-zA-Z0-9-]{1,23})$"; /// <summary> /// Checks whether the given Email-Parameter is a valid E-Mail address. /// </summary> /// <param name="email">Parameter-string that contains an E-Mail address.</param> /// <returns>True, when Parameter-string is not null and /// contains a valid E-Mail address; /// otherwise false.</returns> public static bool IsEmail(string email) { if (email != null) return Regex.IsMatch(email, MatchEmailPattern); else return false; } } |
참조 : http://www.codeproject.com/Articles/22777/Email-Address-Validation-Using-Regular-Expression
Remark : 많은 Get 데이타 받기, Web.conf 파일을 수정하여 쿼리 문자열 길이 제한을 설 정하는 방법입니다. targetFramework 4.6 기준 Step 1: httpRuntime 요소 수정 위 […]
이벤트 로그 확인으로 DotNet 프로그램의 상태를 알 수 있다.
소스
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 |
public static void RegistrySet() { // // This code example produces output similar to the following: // //NoSuchName: Return this default if NoSuchName does not exist. //(Default): 5280 //TestLong: 12345678901234 //TestArray(0): One //TestArray(1): Two //TestArray(2): Three //TestExpand: My path: %path% //TestExpand2: My path: D:\Program Files\Microsoft.NET\… // //Use the registry editor to examine the key. //Press the Enter key to delete the key // The name of the key must include a valid root. const string userRoot = "HKEY_CURRENT_USER"; const string subkey = "RegistrySetValueExample"; const string keyName = userRoot + "\\" + subkey; // An int value can be stored without specifying the // registry data type, but long values will be stored // as strings unless you specify the type. Note that // the int is stored in the default name/value // pair. Registry.SetValue(keyName, "", 5280); Registry.SetValue(keyName, "TestLong", 12345678901234, RegistryValueKind.QWord); // Strings with expandable environment variables are // stored as ordinary strings unless you specify the // data type. Registry.SetValue(keyName, "TestExpand", "My path: %path%"); Registry.SetValue(keyName, "TestExpand2", "My path: %path%", RegistryValueKind.ExpandString); // Arrays of strings are stored automatically as // MultiString. Similarly, arrays of Byte are stored // automatically as Binary. string[] strings = { "One", "Two", "Three" }; Registry.SetValue(keyName, "TestArray", strings); // Your default value is returned if the name/value pair // does not exist. string noSuch = (string)Registry.GetValue(keyName, "NoSuchName", "Return this default if NoSuchName does not exist."); Console.WriteLine("\r\nNoSuchName: {0}", noSuch); // Retrieve the int and long values, specifying // numeric default values in case the name/value pairs // do not exist. The int value is retrieved from the // default (nameless) name/value pair for the key. int tInteger = (int)Registry.GetValue(keyName, "", -1); Console.WriteLine("(Default): {0}", tInteger); long tLong = (long)Registry.GetValue(keyName, "TestLong", long.MinValue); Console.WriteLine("TestLong: {0}", tLong); // When retrieving a MultiString value, you can specify // an array for the default return value. string[] tArray = (string[])Registry.GetValue(keyName, "TestArray", new string[] { "Default if TestArray does not exist." }); for (int i = 0; i < tArray.Length; i++) { Console.WriteLine("TestArray({0}): {1}", i, tArray[i]); } // A string with embedded environment variables is not // expanded if it was stored as an ordinary string. string tExpand = (string)Registry.GetValue(keyName, "TestExpand", "Default if TestExpand does not exist."); Console.WriteLine("TestExpand: {0}", tExpand); // A string stored as ExpandString is expanded. string tExpand2 = (string)Registry.GetValue(keyName, "TestExpand2", "Default if TestExpand2 does not exist."); Console.WriteLine("TestExpand2: {0}…", tExpand2.Substring(0, 40)); Console.WriteLine("\r\nUse the registry editor to examine the key."); Console.WriteLine("Press the Enter key to delete the key."); Console.ReadLine(); Registry.CurrentUser.DeleteSubKey(subkey); } |
방법: 쿠키 작성.
ASP.NET AJAX Control Toolkit Welcome to the ASP.NET AJAX Control Toolkit. Choose from any of the samples on the left to see the live […]
Creating custom, language specific error pages in IIS – benjamin perkins – Site Home – MSDN Blogs.
Copyright © 2025 | WordPress Theme by MH Themes