2022년 6월 5일 일요일

ASP.NET 6.0 IIS 10 Release Error

 Better Install .NET Core Hosting Bundle

2019년 3월 13일 수요일

Difference between Dictionary and Hashtable

Dictionary
  1. Dictionary is generic type Dictionary<TKey,TValue>
  2. Dictionary class is a strong type < TKey,TValue > Hence, you must specify the data types for key and value.
  3. There is no need of boxing/unboxing.
  4. When you try to access non existing key dictionary, it gives runtime error.
  5. Dictionary maintains an order of the stored values.
  6. There is no need of boxing/unboxing, so it is faster than Hashtable.
Hashtable
  1. Hashtable is non-generic type.
  2. Hashtable is a weakly typed data structure, so you can add keys and values of any object type.
  3. Values need to have boxing/unboxing.
  4. When you try to access non existing key Hashtable, it gives null values.
  5. Hashtable never maintains an order of the stored values.
  6. Hashtable needs boxing/unboxing, so it is slower than Dictionary.

2018년 9월 27일 목요일

Difference with f10 and f11 in Visual Studio Debug

F10 ("step over") does not descend any further into the call stack. It moves to the next line of the current function.
F11 ("step into") drills down into the function being called.
void function1()
{
    function2();
    function3();
}
If you hit a breakpoint on function2(), F10 will advance to the line function3(). F11 will advance to the first line inside function2.


2018년 7월 5일 목요일

트랜잭션 로그/NGRAM 함수


트랜잭션로그 정리

SELECT [name], [recovery_model_desc] FROM sys.databases WHERE [name] = DB_NAME()

ALTER DATABASE SyncAddress SET RECOVERY SIMPLE

     (SELECT 논리적파일이름 = [Name] FROM sys.database_files WHERE type = 1)

DBCC SHRINKFILE('SyncAddress_log', 500000)

ALTER DATABASE SyncAddress SET RECOVERY FULL



NGRAM

USE [SyncAddress]
GO
/****** Object:  UserDefinedFunction [dbo].[FN_PARSE]    Script Date: 2018-07-06 오후 2:05:57 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:               <Author,,Name>
-- Create date: <Create Date, ,>
-- Description:  <Description, ,>
-- =============================================
ALTER FUNCTION [dbo].[FN_PARSE]
(
        -- Add the parameters for the function here
        @STR NVARCHAR(4000)
)
RETURNS NVARCHAR(MAX)
AS
BEGIN
        -- Declare the return variable here
        DECLARE @RETVAL NVARCHAR(MAX) = ''
        DECLARE @MODSTR NVARCHAR(4000) = REPLACE(@STR, ' ', '')
        -- Add the T-SQL statements to compute the return value here
       

        DECLARE @GRAM INT = 1
        DECLARE @POS INT =  1

        WHILE(@GRAM <= LEN(@MODSTR))
        BEGIN
IF @GRAM > 5 BREAK
                 WHILE(@POS + @GRAM <= LEN(@MODSTR))
                 BEGIN
                         SET @RETVAL += SUBSTRING(@MODSTR, @POS, @GRAM) + ' '
                         SET @POS = @POS + 1             
                 END
                 SET @POS = 1
                 SET @GRAM = @GRAM + 1
        END

        -- Return the result of the function
        RETURN @RETVAL

END

2018년 3월 26일 월요일

SET NOCOUNT ON

SET NOCOUNT ON 이 빠져있거나 SET NOCOUNT OFF로 설정이 되어 있으면 프로시저는 항상 자신의 마지막 로직에 의해서 SELECT, UPDATE, INSERT, DELETE된 행의 갯수를 리턴하게 된다. 그 수를 받아서 'nn개의 행이 적용되었습니다.'라는 메세지를 뿌려주게 된다. 제아무리 RecordSet을 반환한다 할 지라도 실제로는 RecordSet이 넘어오지 않는 것이다.

2017년 12월 27일 수요일

11.1 How to use special characters in XML?


11.1 How to use special characters in XML?

Because XML syntax uses some characters for tags and attributes it is not possible to directly use those characters inside XML tags or attribute values.

To include special characters inside XML files you must use the numeric character reference instead of that character. The numeric character reference must be UTF-8 because the supported encoding for XML files is defined in the prolog as encoding="UTF-8" and should not be changed.

The numeric character reference uses the format:

&#nn; decimal form

&#xhh; hexadecimal form

Code Name Displayed as
&#09;Horizontal tabnon-printing
&#10;Line feednon-printing
&#13;Carriage Returnnon-printing
&#32;Spacenon-printing
&#33;Exclamation mark!
&#34;Quotation mark"
&#35;Number sign#
&#36;Dollar sign$
&#37;Percent sign%
&#38;Ampersand&
&#39;Apostrophe'
&#40;Left parenthesis(
&#41;Right parenthesis)
&#42;Asterisk*
&#43;Plus sign+
&#44;Comma,
&#45;Hyphen-
&#46;Period.
&#47;Slash/
&#58;Colon:
&#59;Semi-colon;
&#60;Less than<
&#61;Equals sign=
&#62;Greater than>
&#63;Question mark?
&#64;At@
&#91;Left square bracket[
&#92;Bbackslash\
&#93;Right square bracket]
&#94;Caret^
&#95;Underscore_
&#96;Acute accent`
&#123;Left curly brace{
&#124;Vertical bar|
&#125;Right curly brace}
&#126;Tilde~

이 글은 Evernote에서 작성되었습니다. Evernote는 하나의 업무 공간입니다. Evernote를 다운로드하세요.