<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>hot-time</title>
    <link>https://hot-time.tistory.com/</link>
    <description>핫~ 타임! Hot한 정보들을 공유합니다.
</description>
    <language>ko</language>
    <pubDate>Thu, 25 Jun 2026 09:12:50 +0900</pubDate>
    <generator>TISTORY</generator>
    <ttl>100</ttl>
    <managingEditor>hot-time</managingEditor>
    <image>
      <title>hot-time</title>
      <url>https://tistory1.daumcdn.net/tistory/2881875/attach/a1c2f0b0145b4c5e95963a21a3e925d8</url>
      <link>https://hot-time.tistory.com</link>
    </image>
    <item>
      <title>Google Analytics-한 페이지에 여러 추적기 (쿠키 충돌)</title>
      <link>https://hot-time.tistory.com/5123</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Google Analytics-한 페이지에 여러 추적기 (쿠키 충돌)&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 다른 사람들의 웹 사이트 (위젯의 일종)에 내장되어야하는 웹 애플리케이션을 작성하고 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Google Analytics를 사용하여 임베딩 웹 사이트에서 내 스크립트의 모든 인스턴스를 방문하는 모든 사람들을 추적하고 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문제는 해당 웹 사이트의 자체 Google Analytics 계정을 방해하지 않도록 사용 방법을 모른다는 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추적기 변수를 네임 스페이스에 저장하고 있으므로 그렇게해야한다고 생각했지만 GA가 쿠키 (__utma, __utmz 등)에 설정을 저장하고 두 추적기에서 해당 쿠키를 사용한다는 사실을 깨닫지 못했습니다. 같은 페이지에 두 개가 있습니다. 예를 들어 _setVar를 사용하여 Google Analytics에 일종의 사용자 정의 변수를 저장하고 임베딩 사이트가 동일한 작업을 수행하면 서로의 값을 덮어 씁니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;물론 Google이 쿠키 이름을 사용자 지정 이름으로 변경하는 방법을 제공하면 가장 쉬울 수 있지만 방법을 찾을 수 없습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;쿠키 도메인 또는 경로를 사용하여 별도의 쿠키를 강제하는 것에 대해 생각했지만 도메인 또는 경로를 실제 도메인 / 경로가 아닌 다른 것으로 설정하면 다시로드 한 후 페이지에서 쿠키를 읽을 수 없기 때문에 작동하지 않습니다. ..&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;한 페이지에 두 개의 추적기를두고 서로의 설정을 덮어 쓰지 않도록 별도의 쿠키를 사용하는 방법을 아는 사람이 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 그것이 완전히 불가능하다면 GA와 유사한 기능을 가진 다른 분석 서비스가 있습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(이벤트 및 캠페인 추적과 같은 고급 기능이 있어야합니다 ...)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 새로운 비동기 추적 코드로 쉽게 만들 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;:)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://developers.google.com/analytics/devguides/collection/gajs/#MultipleCommands&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://developers.google.com/analytics/devguides/collection/gajs/#MultipleCommands&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 페이지에 Google 애널리틱스 추적 코드의 여러 인스턴스를 설치하여 계정의 여러 속성으로 데이터를 보낼 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://support.google.com/analytics/answer/1032400?hl=en&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://support.google.com/analytics/answer/1032400?hl=ko&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 창의력을 발휘하고 Google의 지침에 따라 다음을 수행 할 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#multipletrackers&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://developers.google.com/analytics/devguides/collection/analyticsjs/advanced#multipletrackers&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;script&amp;gt;&lt;font&gt;&lt;/font&gt;
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){&lt;font&gt;&lt;/font&gt;
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),&lt;font&gt;&lt;/font&gt;
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)&lt;font&gt;&lt;/font&gt;
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  ga('create', 'UA-XXXX-Y', 'auto');&lt;font&gt;&lt;/font&gt;
  ga('create', 'UA-XXXX-Y', 'auto', {'name': 'newTracker'});&lt;font&gt;&lt;/font&gt;
  ga('send', 'pageview');&lt;font&gt;&lt;/font&gt;
  ga('newTracker.send', 'pageview');&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&amp;lt;/script&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Google Analytics는 동일한 페이지에있는 여러 추적기와 원활하게 작동하므로 다른 쿠키 이름을 사용할 필요가 없습니다. &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;a href=&quot;https://stackoverflow.com/questions/1264630/google-analytics-multiple-trackers-for-several-accounts&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Google Analytics-여러 계정에 대한 다중 추적기&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 질문에 대한 답변을 참조하십시오 &lt;/font&gt;&lt;em&gt;&lt;a href=&quot;https://stackoverflow.com/questions/1264630/google-analytics-multiple-trackers-for-several-accounts&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/a&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;최신 정보&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;http://www.lunametrics.com/blog/2009/02/26/pitfalls-tracking-multiple-accounts-ga/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여러 추적기&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 사용 &lt;/font&gt;&lt;a href=&quot;http://www.lunametrics.com/blog/2009/02/26/pitfalls-tracking-multiple-accounts-ga/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 것은 작동 방법이지만 몇 가지 함정이&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그 중 하나, 즉 각각에 대해 서로 다른 사용자 세분화를 적용 할 수 없습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;John Henson은 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.lunametrics.com/blog/2009/03/06/cookies-tracking-multiple-accounts-ga/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;GA가 다른 쿠키를 사용하도록 강제&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 하는 해결 방법을 보여줍니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. 확인해야 할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;누군가 여전히이 문제가 있고 쉽게 붙여 넣기를 원하는 경우, 내 문제는 Google 추적을 사용하고있을 수있는 다른 사람의 페이지에 추가되는 내 코드에 대해 내 Google 추적을 사용하는 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 이것을 테스트하고 예상대로 작동하는지 확인했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;var _gaq = _gaq || [];&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
_gaq.push(['some_unique_name._setAccount', 'UA-xxxxxxxx-1']);&lt;font&gt;&lt;/font&gt;
_gaq.push(['some_unique_name._trackPageview']);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
(function() {&lt;font&gt;&lt;/font&gt;
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;&lt;font&gt;&lt;/font&gt;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';&lt;font&gt;&lt;/font&gt;
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);&lt;font&gt;&lt;/font&gt;
})();&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이벤트도 사용하고 있습니다&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;_gaq.push(['some_unique_name._trackEvent', 'Event Category', 'Event Action', 'Event Label']);
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;누구든지 문제를 발견하면 알려주세요.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Török에 의해 나열된 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.lunametrics.com/blog/2009/03/06/cookies-tracking-multiple-accounts-ga/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문서&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;따르면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정답은 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://code.google.com/apis/analytics/docs/gaJS/gaJSApiDomainDirectory.html#_gat.GA_Tracker_._setCookiePath&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;_setCookiePath&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 사용 &lt;/font&gt;&lt;a href=&quot;http://code.google.com/apis/analytics/docs/gaJS/gaJSApiDomainDirectory.html#_gat.GA_Tracker_._setCookiePath&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 것 같습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이로 인해 각 추적기는 완전히 다른 쿠키를 사용합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 사이트의 예제 코드 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;script type=”text/javascript”&amp;gt;&lt;font&gt;&lt;/font&gt;
    var pageTracker = _gat._getTracker(”UA-11111-1″);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    pageTracker._setDomainName(’domain.com’);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    pageTracker._setCookiePath(’/subdirectory/’);&lt;font&gt;&lt;/font&gt;
    pageTracker._trackPageview();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    var otherTracker = _gat._getTracker(”UA-22222-1″);&lt;font&gt;&lt;/font&gt;
    otherTracker._setDomainName(’domain.com’);&lt;font&gt;&lt;/font&gt;
    otherTracker._trackPageview();&lt;font&gt;&lt;/font&gt;
&amp;lt;/script&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;한 도메인에서 다른 도메인으로 링크 할 때 다른 도메인에 게시하는 모든 링크는 다음과 같아야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;pageTracker._linkByPost('otherdomain.com/petStoreCart/legalTerms.php');&quot;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이렇게하면 위 스크립트에서 쿠키 ( &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;소스&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; ) &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 설정하는 데 사용할 Google 애널리틱스 특정 쿼리 문자열 값이 추가됩니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Google에서이 관행에 대해 권장하는 것 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;단일 웹 페이지에 Google 웹 로그 분석 추적 코드의 여러 인스턴스를 설치하는 것은 지원되는 구현이 아닙니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하나를 제외한 모든 인스턴스를 제거하고 추적하려는 모든 페이지에 올바른 프로필의 코드가 설치되어 있는지 확인하는 것이 좋습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;a href=&quot;https://support.google.com/analytics/bin/answer.py?hl=en-GB&amp;amp;answer=1032400&quot; rel=&quot;nofollow&quot;&gt;https://support.google.com/analytics/bin/answer.py?hl=en-GB&amp;amp;answer=1032400&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;I have used this structure on our site and clients sites and it works like a charm... &lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &lt;font&gt;&lt;/font&gt;
var gaJsHost = ((&quot;https:&quot; == document.location.protocol) ? &quot;https://ssl.&quot; : &quot;http://www.&quot;);    &lt;font&gt;&lt;/font&gt;
document.write(unescape(&quot;%3Cscript src='&quot; + gaJsHost + &quot;google-analytics.com/ga.js'     type='text/javascript'%3E%3C/script%3E&quot;)); &lt;font&gt;&lt;/font&gt;
&amp;lt;/script&amp;gt; &amp;lt;script type=&quot;text/javascript&quot;&amp;gt; &lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
try {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
//Original tracking&lt;font&gt;&lt;/font&gt;
var pageTracker_ORIG = _gat._getTracker(&quot;UA-XXXXXXX-1&quot;);&lt;font&gt;&lt;/font&gt;
pageTracker_ORIG._setDomainName('.sleepinggiantmedia.co.uk');&lt;font&gt;&lt;/font&gt;
pageTracker_ORIG._trackPageview();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
//New Analytics tag&lt;font&gt;&lt;/font&gt;
var pageTracker_SGM = _gat._getTracker(&quot;UA-XXXXXXX-1&quot;);&lt;font&gt;&lt;/font&gt;
pageTracker_SGM._setDomainName('.sleepinggiantmedia.co.uk');&lt;font&gt;&lt;/font&gt;
pageTracker_SGM._trackPageview();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
} catch(err) {}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;pre&gt;&lt;code&gt;var otherTracker = _gat._getTracker(”UA-22222-1″);&lt;font&gt;&lt;/font&gt;
otherTracker._setDomainName(’domain.com’);&lt;font&gt;&lt;/font&gt;
otherTracker._trackPageview();&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;a href=&quot;http://www.google.com/support/forum/p/Google%20Analytics/thread?tid=4731d8a407382376&amp;amp;hl=en&quot; rel=&quot;nofollow noreferrer&quot;&gt;This person&lt;/a&gt; is having the same problem on the Google Analytics help fourm. I'd suggest taking a look at the thread. But regularly GA doesn't support multiple trackers.&lt;/p&gt; 
&lt;p&gt;I like &lt;a href=&quot;http://getclicky.com&quot; rel=&quot;nofollow noreferrer&quot;&gt;Clicky&lt;/a&gt; myself, but it costs money.&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/1239042/google-analytics-multiple-trackers-on-one-page-cookie-conflict&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/1239042/google-analytics-multiple-trackers-on-one-page-cookie-conflict&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5123</guid>
      <comments>https://hot-time.tistory.com/5123#entry5123comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:03:44 +0900</pubDate>
    </item>
    <item>
      <title>한 Git 저장소를 다른 저장소로 리베이스하는 방법은 무엇입니까?</title>
      <link>https://hot-time.tistory.com/5122</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;한 Git 저장소를 다른 저장소로 리베이스하는 방법은 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;특정 시점까지 프로젝트 개발을 포함하는 Git 저장소 (A)가 하나있었습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음이 저장소 A가있는 USB 스틱을 잃어 버렸습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다행히도 최신 커밋의 백업이 있었기 때문에 나중에 최신 프로젝트의 상태를 가져오고 개발을 계속할 새 저장소 (B)를 만들 수있었습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 잃어버린 USB 스틱을 복구 했으므로 두 개의 Git 저장소가 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;어떻게 든 repo B를 repo A로 rebase해야한다고 생각하지만 fetch / pull 및 rebase를 사용하여 수행하는 방법을 모르겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;A와 B가 동일한 리포지토리가 아닌 경우 (최신 작업 복사본을 사용하여 B를 만들었습니다), &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://git.wiki.kernel.org/index.php/GraftPoint&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이식편&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용하여 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;공통 기록이있는 척해야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하자 당신이 따라 B에 대한 원격 같이 추가했다고 가정 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/a/2428224&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;VonC의 대답은&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; ,이 같은 환매 특약 외모 &lt;/font&gt;&lt;/font&gt;&lt;sup&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/sup&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;~/B$ git tnylog &lt;font&gt;&lt;/font&gt;
* 6506232 (HEAD, master) Latest work on B&lt;font&gt;&lt;/font&gt;
* 799d6ae Imported backup from USB stick&lt;font&gt;&lt;/font&gt;
~/B$ git tnylog A/master&lt;font&gt;&lt;/font&gt;
* 33b5b16 (A/master) Head of A&lt;font&gt;&lt;/font&gt;
* 6092517 Initial commit&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;B의 루트에 부모가 A의 머리임을 알리는 이식편을 만듭니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;echo '799d6aeb41095a8469d0a12167de8b45db02459c 33b5b16dde3af6f5592c2ca6a1a51d2e97357060' \&lt;font&gt;&lt;/font&gt;
 &amp;gt;&amp;gt; .git/info/grafts&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 B에 대한 이력을 요청할 때 위의 두 이력이 하나로 나타납니다. 이식편을 영구적으로 만드는 것은 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;git filter-branch&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;논쟁없이 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지만 필터 브랜치 이후에는 브랜치에 있지 않으므로 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;git branch -D master; git checkout -b master&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;hr&gt; 
&lt;p&gt;&lt;sup&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1&lt;/font&gt;&lt;/font&gt;&lt;/sup&gt; &lt;code&gt;git tnylog&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; =&lt;/font&gt;&lt;/font&gt;&lt;code&gt;git log --oneline --graph --decorate&lt;/code&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;A와 B가 동일한 저장소 인 경우 (첫 번째 SHA1이 공통 임) 다음을 수행 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;A를 B에 대한 리모컨으로 선언하십시오. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;git remote add A /path/to/A&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;git fetch A&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;B 저장소의 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/1070496/having-a-hard-time-understanding-git-fetch&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 원격 A 분기&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 &lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/1070496/having-a-hard-time-understanding-git-fetch&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;업데이트&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 하려면&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;git checkout dev&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; (개발중인 B)&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;git rebase A/devBranch&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;B (즉, 백업에서 개발하거나 재개발 한 것)를 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;A/devBranch&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(잃어버린 개발) 위에 재생합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/1457248/how-do-i-re-play-my-commits-of-a-local-git-repo-on-top-of-a-project-i-forked-on/1458069#1458069&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;질문&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 과 비슷합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막 단계에서는 잃어버린 개발자와 개발자를 동기화 할 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 실제로 A에서 가져 오면 완료됩니다. B에는 이제 &quot; &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;all&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; &quot;내역 (잃어버린 내역과 현재 작업)이 포함됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우선 repo A의 작업 클론을 만드는 것으로 시작합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 B에서 끌어와 병합하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새 분기를 만들고 끌어온 다음 두 분기를 병합하는 것을 선호 할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;강제 플래그가 필요할 수도 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Mercurial에서 이와 같은 작업을 수행했으며 (명백하게 관련이없는 두 저장소를 함께 접목) &quot;-f&quot;가 필요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/2428137/how-to-rebase-one-git-repository-onto-another-one&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/2428137/how-to-rebase-one-git-repository-onto-another-one&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5122</guid>
      <comments>https://hot-time.tistory.com/5122#entry5122comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:03:34 +0900</pubDate>
    </item>
    <item>
      <title>이 정규식은 어떻게 소수를 찾습니까?</title>
      <link>https://hot-time.tistory.com/5121</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 정규식은 어떻게 소수를 찾습니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;blockquote&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;중복 가능성 : &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;br&gt; &lt;a href=&quot;https://stackoverflow.com/questions/2795065/how-to-determine-if-a-number-is-a-prime-with-regex&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정규식에서 숫자가 소수인지 확인하는 방법은 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/a&gt; &lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;a href=&quot;http://www.noulakaz.net/weblog/2007/03/18/a-regular-expression-to-check-for-prime-numbers/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 페이지&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 는이 정규 표현식이 소수가 아닌 숫자를 발견한다고 주장합니다 (반대로 예 : 소수).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;/^1?$|^(11+?)\1+$/
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 어떻게 소수를 찾습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기사가 잘 설명하고 있다고 생각하지만 손으로 ​​직접 시도해 보겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입력은 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Unary_numeral_system&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;단항&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 형식입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1은 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;1&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 2는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;11&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 3은 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;111&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;등입니다. 0은 빈 문자열입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정규식의 첫 번째 부분은 0과 1을 비 프라임으로 일치시킵니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 번째는 마법이 시작되는 곳입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;(11+?)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;제수를 찾는 것으로 시작합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로 정의되는 것으로 시작 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;11&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하거나 2 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;\1&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;는 이전에 캡처 된 일치를 참조하는 변수이므로 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;\1+&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;숫자가 해당 제수로 나눌 수 있는지 판별합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/font&gt;&lt;/font&gt;&lt;code&gt;111111&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 변수를 할당하여 시작한 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;11&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 나머지 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;1111&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;11&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;반복됨 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;을 결정 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하므로 6은 2로 나눌 수 있습니다.)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;숫자가 2로 나눌 수없는 경우 정규식 엔진은 제수를 증가시킵니다. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;(11+?)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가되고 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;111&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다시 시도합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;어느 시점에서 정규식이 일치하면 숫자에는 나머지를 산출하지 않는 제수가 있으므로 소수가 될 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것이 1 진법 (단항?)의 숫자를위한 것이라는 것을 깨달았습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;http://news.ycombinator.com/item?id=1486158&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 ycombinator 토론에 참여한&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 몇몇 사람들은 &lt;/font&gt;&lt;a href=&quot;http://news.ycombinator.com/item?id=1486158&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것을&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 아주 잘 설명합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사실 그 설명은 내가 얻을 수 있다고 생각하는 것보다 더 간결하므로 링크에 남겨 두겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/3296050/how-does-this-regex-find-primes&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/3296050/how-does-this-regex-find-primes&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5121</guid>
      <comments>https://hot-time.tistory.com/5121#entry5121comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:03:26 +0900</pubDate>
    </item>
    <item>
      <title>Visual Studio 디버거에서 하나의 프로세스 분리</title>
      <link>https://hot-time.tistory.com/5120</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Visual Studio 디버거에서 하나의 프로세스 분리&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 질문은 &lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/2671503/how-to-stop-debugging-or-detach-process-without-stopping-the-process&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;프로세스를 중지하지 않고 디버깅을 중지 (또는 프로세스 분리)하는 방법&quot;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 과 다소 유사합니다.&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/2671503/how-to-stop-debugging-or-detach-process-without-stopping-the-process&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지만 한 프로세스에서 분리하고 싶습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어, Windows 서비스에도 연결하는 Windows Form 앱이 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;서비스 만 분리하고 싶습니다 (모두 분리하면 모든 실행에서 디버깅이 제거되므로 다른 응용 프로그램을 디버깅 할 수 없습니다).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추신 : 가능하면 Visual Studio 2008 및 2010에 대해 언급하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프로세스 창 (디버그-&amp;gt; Windows-&amp;gt; 프로세스)에서 분리 할 프로세스 이름을 마우스 오른쪽 버튼으로 클릭하고 바로 가기 메뉴에서 프로세스 분리를 ​​클릭합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;바로 가기 키 콤보 (VS2013에서)가 &lt;/font&gt;&lt;/font&gt;&lt;kbd&gt;Ctrl&lt;/kbd&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;+ &lt;/font&gt;&lt;/font&gt;&lt;kbd&gt;Alt&lt;/kbd&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;+ &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;임을 공유 &lt;/font&gt;&lt;/font&gt;&lt;kbd&gt;Z&lt;/kbd&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하여 프로세스 창을 표시 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 싶었 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;창이 하나 이상의 프로세스가 연결된 경우에만 팝업됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;당신이있는 경우 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;비주얼 스튜디오 익스프레스를&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , 존재하지 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아니하는 윈도우&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 와 나는 단지 하나의 프로세스를 분리하는 방법을 실현되지 않았다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/5964661/detach-one-process-from-visual-studio-debugger&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/5964661/detach-one-process-from-visual-studio-debugger&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5120</guid>
      <comments>https://hot-time.tistory.com/5120#entry5120comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:03:18 +0900</pubDate>
    </item>
    <item>
      <title>Apt-Get 설치 설치의 Jenkins 사용자</title>
      <link>https://hot-time.tistory.com/5119</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Apt-Get 설치 설치의 Jenkins 사용자&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;데비안 설치 단계를 통해 Ubuntu 서버에 Jenkins를 설치했습니다 (apt-get install 사용). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 빌드가 GitHub의 비공개 git 저장소에서 가져 오기를 원합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이를 통해 SSH 액세스를 사용하여 저장소에 액세스해야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 검색 결과의 대부분은 Jenkins 사용자로 로그인하고 내 GitHub 계정에 대한 SSH 키를 생성한다고 말했지만 데비안 패키지 관리자를 통해 설치하면 Jenkins 사용자의 비밀번호가 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그렇다면 Jenkins 서버에서 사용할 SSH 키를 어떻게 생성합니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;때때로 다른 작업을 수행하기 위해 jenkins로 로그인 할 수 있기를 원할 것으로 예상되므로보다 일반적인 문제를 해결하겠습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;질문에 대한 엄격한 답변이 끝에 포함되어 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;알지 못하는 사이 젠킨스의 비밀번호 변경&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;http://manpages.ubuntu.com/manpages/lucid/en/man8/sudo.8.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;sudo&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 권한 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이있는 계정에서 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jenkins의 비밀번호를 원하는 것으로 재설정 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;sudo passwd jenkins
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;sudo를 사용하려면 먼저 자신의 암호를 묻는 메시지가 표시 될 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 젠킨스에 설정할 새 비밀번호를 입력하고 마지막으로 새 비밀번호를 확인하라는 메시지가 표시됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;sudo 권한이있는 사용자가 joe 인 경우 세션은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;joe $ sudo passwd jenkins&lt;font&gt;&lt;/font&gt;
[sudo] password for joe:     **you enter joe's passwd**&lt;font&gt;&lt;/font&gt;
Enter new UNIX password:     ** you enter new jenkins passwd**&lt;font&gt;&lt;/font&gt;
Retype new UNIX password:    ** you enter new jenkins passwd**&lt;font&gt;&lt;/font&gt;
passwd: password updated successfully&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대안 : 비밀번호없이 젠킨스로 로그인&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 적절한 다른 계정에서 sudo를 다시 사용하면 비밀번호를 묻지 않고 jenkins로 로그인 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;sudo su - jenkins
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;곁에 : 암호 프롬프트 혼동 방지&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 발행하기 전에 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;sudo passwd jenkins&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 &quot;지금 내가 누구의 비밀번호를 요청하고 있습니까?&quot;라는 질문에 대한 혼동을 피하기 위해 sudo로 별도로 인증하는 것이 좋습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;sudo -v&lt;font&gt;&lt;/font&gt;
sudo passwd jenkins&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;sudo에 의한 인증이 성공하면 다시 인증하라는 메시지가 표시되지 않는 창 (예 : 15 분)이 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/font&gt;&lt;/font&gt;&lt;code&gt;sudo -k&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;실험하려는 경우를 사용 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하여이 세션을 즉시 무효화 (종료) 할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;약속 된 엄격한 답변&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;sudo -u jenkins ssh-keygen
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 cat을 사용하여 github에 전달할 공개 키의 내용을 확인합니다 (하지만 경로는 예일뿐입니다).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;  sudo cat ~jenkins/.ssh/id_rsa.pub
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;공개 키 파일의 정확한 위치와 이름은 위의 ssh-keygen 프롬프트에 입력 한 내용에 따라 다릅니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;젠킨스의 집 디렉토리에 바로 가기를 사용했습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;~jenkins&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;관련된 링크들&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;http://manpages.ubuntu.com/manpages/lucid/en/man8/sudo.8.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;sudo 맨 페이지&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/6234016/jenkins-user-on-apt-get-install-installation&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/6234016/jenkins-user-on-apt-get-install-installation&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5119</guid>
      <comments>https://hot-time.tistory.com/5119#entry5119comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:03:10 +0900</pubDate>
    </item>
    <item>
      <title>jQuery Mobile이 동적으로 삽입 된 콘텐츠의 스타일 / 테마를 재평가하도록 강제</title>
      <link>https://hot-time.tistory.com/5118</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jQuery Mobile이 동적으로 삽입 된 콘텐츠의 스타일 / 테마를 재평가하도록 강제&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;목표 :&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 통해 HTML 콘텐츠를로드 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;$.ajax&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고, DOM에 삽입하고, jQuery Mobile이 테마 스타일을 적용하도록합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문제 :&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 콘텐츠가 삽입되지만 jQuery Mobile 테마가 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;암호:&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$.ajax({&lt;font&gt;&lt;/font&gt;
    ...&lt;font&gt;&lt;/font&gt;
    success: function(html) {&lt;font&gt;&lt;/font&gt;
        $('#container').append(html);&lt;font&gt;&lt;/font&gt;
        $('#page').page('refresh', true);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
});&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;반환 된 HTML에는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;data-role&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jQM이 스타일을 지정해야하는 태그가 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;포함됩니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;a data-role=&quot;button&quot;&amp;gt;Do Something&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스타일을 적용하는 대신 다음과 같은 오류가 발생합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;포착되지 않은 예외 : 페이지 위젯 인스턴스에 대해 '새로 고침'메소드가 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;hr&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 코드는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;http://code.jquery.com/mobile/latest/jquery.mobile.js&lt;/code&gt;&lt;/p&gt; 
&lt;hr&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 오류 메시지가 표시되는 유사한 질문 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/5157386/consistently-update-page-with-appropriate-jquery-mobile-styles&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;적절한 jQuery Mobile 스타일로 페이지를 일관되게 업데이트&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/5249250/jqm-jquerymobile-dynamically-added-elements-not-displaying-correctly-and-css-is&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JQM (jQueryMobile) 동적으로 추가 된 요소가 올바르게 표시되지 않고 CSS가 적용되지 않음&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/4039428/jquery-mobile-dynamically-creating-form-elements&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jQuery Mobile-동적으로 양식 요소 생성&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;비슷한 질문에 대한 답을 얻었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;.trigger(&quot;create&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;콘텐츠가 추가되는 요소에&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기를보십시오 : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/7999436/jquery-mobile-does-not-apply-styles-after-dynamically-adding-content&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jQuery Mobile은 콘텐츠를 동적으로 추가 한 후 스타일을 적용하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;목록보기에 항목을 추가하는 경우 해당 항목에서 refresh () 메서드를 호출하여 스타일을 업데이트하고 추가 된 중첩 목록을 만들어야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들면 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$('#mylist').listview('refresh');
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;동적 페이지를 렌더링해야하는 경우 &quot; &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://jquerymobile.com/test/docs/pages/page-dynamic.html&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jQuery Mobile 및 동적 페이지 생성&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; &quot;을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;읽어보십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 기사의 샘플 코드 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;// Load the data for a specific category, based on&lt;font&gt;&lt;/font&gt;
// the URL passed in. Generate markup for the items in the&lt;font&gt;&lt;/font&gt;
// category, inject it into an embedded page, and then make&lt;font&gt;&lt;/font&gt;
// that page the current active page.&lt;font&gt;&lt;/font&gt;
function showCategory( urlObj, options )&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    var categoryName = urlObj.hash.replace( /.*category=/, &quot;&quot; ),&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Get the object that represents the category we&lt;font&gt;&lt;/font&gt;
        // are interested in. Note, that at this point we could&lt;font&gt;&lt;/font&gt;
        // instead fire off an ajax request to fetch the data, but&lt;font&gt;&lt;/font&gt;
        // for the purposes of this sample, it's already in memory.&lt;font&gt;&lt;/font&gt;
        category = categoryData[ categoryName ],&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // The pages we use to display our content are already in&lt;font&gt;&lt;/font&gt;
        // the DOM. The id of the page we are going to write our&lt;font&gt;&lt;/font&gt;
        // content into is specified in the hash before the '?'.&lt;font&gt;&lt;/font&gt;
        pageSelector = urlObj.hash.replace( /\?.*$/, &quot;&quot; );&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    if ( category ) {&lt;font&gt;&lt;/font&gt;
        // Get the page we are going to dump our content into.&lt;font&gt;&lt;/font&gt;
        var $page = $( pageSelector ),&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            // Get the header for the page.&lt;font&gt;&lt;/font&gt;
            $header = $page.children( &quot;:jqmData(role=header)&quot; ),&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            // Get the content area element for the page.&lt;font&gt;&lt;/font&gt;
            $content = $page.children( &quot;:jqmData(role=content)&quot; ),&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            // The markup we are going to inject into the content&lt;font&gt;&lt;/font&gt;
            // area of the page.&lt;font&gt;&lt;/font&gt;
            markup = &quot;&amp;lt;p&amp;gt;&quot; + category.description + &quot;&amp;lt;/p&amp;gt;&amp;lt;ul data-role='listview' data-inset='true'&amp;gt;&quot;,&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            // The array of items for this category.&lt;font&gt;&lt;/font&gt;
            cItems = category.items,&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            // The number of items in the category.&lt;font&gt;&lt;/font&gt;
            numItems = cItems.length;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Generate a list item for each item in the category&lt;font&gt;&lt;/font&gt;
        // and add it to our markup.&lt;font&gt;&lt;/font&gt;
        for ( var i = 0; i &amp;lt; numItems; i++ ) {&lt;font&gt;&lt;/font&gt;
            markup += &quot;&amp;lt;li&amp;gt;&quot; + cItems[i].name + &quot;&amp;lt;/li&amp;gt;&quot;;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        markup += &quot;&amp;lt;/ul&amp;gt;&quot;;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Find the h1 element in our header and inject the name of&lt;font&gt;&lt;/font&gt;
        // the category into it.&lt;font&gt;&lt;/font&gt;
        $header.find( &quot;h1&quot; ).html( category.name );&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Inject the category items markup into the content element.&lt;font&gt;&lt;/font&gt;
        $content.html( markup );&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Pages are lazily enhanced. We call page() on the page&lt;font&gt;&lt;/font&gt;
        // element to make sure it is always enhanced before we&lt;font&gt;&lt;/font&gt;
        // attempt to enhance the listview markup we just injected.&lt;font&gt;&lt;/font&gt;
        // Subsequent calls to page() are ignored since a page/widget&lt;font&gt;&lt;/font&gt;
        // can only be enhanced once.&lt;font&gt;&lt;/font&gt;
        $page.page();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Enhance the listview we just injected.&lt;font&gt;&lt;/font&gt;
        $content.find( &quot;:jqmData(role=listview)&quot; ).listview();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // We don't want the data-url of the page we just modified&lt;font&gt;&lt;/font&gt;
        // to be the url that shows up in the browser's location field,&lt;font&gt;&lt;/font&gt;
        // so set the dataUrl option to the URL for the category&lt;font&gt;&lt;/font&gt;
        // we just loaded.&lt;font&gt;&lt;/font&gt;
        options.dataUrl = urlObj.href;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Now call changePage() and tell it to switch to&lt;font&gt;&lt;/font&gt;
        // the page we just modified.&lt;font&gt;&lt;/font&gt;
        $.mobile.changePage( $page, options );&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;콘텐츠에로드하기 위해 ajax 메서드를 사용하는 경우 이것이 스타일링 및 jquery 모바일 기능이 작동하는 방법입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 제안과 거의 동일하지만 일부 사람들에게는 더 완전한 예를보고 싶을 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음은 코드입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$.ajax({&lt;font&gt;&lt;/font&gt;
url: 'url.php',&lt;font&gt;&lt;/font&gt;
success: function(data) {    &lt;font&gt;&lt;/font&gt;
$(&quot;#div&quot;).html(data).trigger('create');&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
});&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;As an update to the answers provided. As of v1.45 you can select your content and use &lt;code&gt;.enhanceWithin()&lt;/code&gt; to enhance the child elements.&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;http://api.jquerymobile.com/enhanceWithin/&quot; rel=&quot;nofollow&quot;&gt;http://api.jquerymobile.com/enhanceWithin/&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;strong&gt;In jQuery Mobile Framework alpha4.1 and earlier&lt;/strong&gt; this was done by using the &lt;code&gt;.page()&lt;/code&gt; method.&lt;/p&gt; 
&lt;p&gt;Example to show there's not much of a difference: &lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$( ... lots of HTML ...).appendTo(&quot;.ui-content&quot;).page();
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;More info: &lt;a href=&quot;http://jquerymobiledictionary.dyndns.org/faq.html&quot; rel=&quot;nofollow&quot;&gt;http://jquerymobiledictionary.dyndns.org/faq.html&lt;/a&gt; &lt;/p&gt; 
&lt;p&gt;Why the new way (see T. Stone's answer) was introduced? &lt;code&gt;.page()&lt;/code&gt; was written with an assumprion that the DOM element was not enhanced before. &lt;/p&gt; 
&lt;p&gt;For the sake of decoupling tje jQuery Mobile team introduces event-driven enhancement that will not only allow triggering the event, but also will make creating new widgets for new &lt;code&gt;data-role&lt;/code&gt;s possible without modifying the code of JQM's .page method.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;code&gt;$('.selector').trigger('create');&lt;/code&gt; seems to be the best approach, see the official FAQ below:&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;http://view.jquerymobile.com/master/demos/faq/injected-content-is-not-enhanced.php&quot; rel=&quot;nofollow&quot;&gt;http://view.jquerymobile.com/master/demos/faq/injected-content-is-not-enhanced.php&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;For others searching for an answer for this, as of 6/9/2011 the jQuery mobile team has implemented this feature in a development branch. According to this issue, it will work in this manor:&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;$(&quot;.ui-content&quot;).append( ... lots of HTML ...).trigger( &quot;enhance&quot; );&lt;/code&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://github.com/jquery/jquery-mobile/issues/1799&quot; rel=&quot;nofollow&quot;&gt;https://github.com/jquery/jquery-mobile/issues/1799&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/6297470/forcing-jquery-mobile-to-re-evaluate-styles-theme-on-dynamically-inserted-conten&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/6297470/forcing-jquery-mobile-to-re-evaluate-styles-theme-on-dynamically-inserted-conten&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5118</guid>
      <comments>https://hot-time.tistory.com/5118#entry5118comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:03:02 +0900</pubDate>
    </item>
    <item>
      <title>밀리 초 단위의 C ++ 크로노 시스템 시간, 시간 작업</title>
      <link>https://hot-time.tistory.com/5117</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;밀리 초 단위의 C ++ 크로노 시스템 시간, 시간 작업&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;C ++ 11 문서가 부족하여 작은 문제가 발생했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;밀리 초 또는 나노초 또는 초 단위의 epoch 이후 시간을 얻고 싶습니다.이 값을 다른 해상도로 &quot;캐스트&quot;해야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 gettimeofday ()를 사용하여 할 수 있지만 쉬울 것이므로 std :: chrono를 사용하여 달성하려고했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 시도했다 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;std::chrono::time_point&amp;lt;std::chrono::system_clock&amp;gt; now = &lt;font&gt;&lt;/font&gt;
    std::chrono::system_clock::now();&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 나는 이런 식으로 얻은 해상도가 time_point인지 전혀 모르고,이 시간을 단순한 unsigned long long으로 얻는 방법을 모르고, 그것을 다른 해상도로 캐스팅하는 방법에 대한 개념도 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://stackoverflow.com/q/8386128&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;시계의 해상도로&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;code&gt;now.time_since_epoch()&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; epoch 이후 시간을 나타내는 기간을 얻을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;밀리 초로 변환하려면 다음을 사용하십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/q/8386128&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;http://en.cppreference.com/w/cpp/chrono/duration/duration_cast&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;duration_cast&lt;/code&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;auto duration = now.time_since_epoch();&lt;font&gt;&lt;/font&gt;
auto millis = std::chrono::duration_cast&amp;lt;std::chrono::milliseconds&amp;gt;(duration).count();&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/9089842/c-chrono-system-time-in-milliseconds-time-operations&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/9089842/c-chrono-system-time-in-milliseconds-time-operations&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5117</guid>
      <comments>https://hot-time.tistory.com/5117#entry5117comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:02:52 +0900</pubDate>
    </item>
    <item>
      <title>Dapper로 DateTime을 UTC로 가져 오기</title>
      <link>https://hot-time.tistory.com/5116</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Dapper로 DateTime을 UTC로 가져 오기&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Dapper를 사용하여 엔터티를 SQL Server CE에 매핑하고 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 이름으로 저장 나는 경우 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;DateTime&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Kind=Utc&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그것을 다시 내가 읽을 때, 나는 얻을 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;DateTime&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Kind=Unspecified&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 어떤 문제의 모든 종류의 리드.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;var f = new Foo { Id = 42, ModificationDate = DateTime.UtcNow };&lt;font&gt;&lt;/font&gt;
Console.WriteLine(&quot;{0} ({1})&quot;, f.ModificationDate, f.ModificationDate.Kind);&lt;font&gt;&lt;/font&gt;
connection.Execute(&quot;insert into Foo(Id, ModificationDate) values(@Id, @ModificationDate)&quot;, f);&lt;font&gt;&lt;/font&gt;
var f2 = connection.Query&amp;lt;Foo&amp;gt;(&quot;select * from Foo where Id = @Id&quot;, f).Single();&lt;font&gt;&lt;/font&gt;
Console.WriteLine(&quot;{0} ({1})&quot;, f2.ModificationDate, f2.ModificationDate.Kind);&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 코드는 다음 출력을 제공합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;20/09/2012 10:04:16 (Utc)&lt;font&gt;&lt;/font&gt;
20/09/2012 10:04:16 (Unspecified)&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 사용해야한다는 것을 알고 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;DateTimeOffset&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있지만, 불행히도 SQL CE는이 유형을 지원하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;해결 방법이 있습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Dapper에게 모든 날짜가 있다고 가정 할 수 있습니까 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;DateTimeKind.Utc&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;보다 일반적으로 매핑을 사용자 지정하는 옵션은 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;hr&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;편집 : 내 현재 해결 방법은 Dapper가 결과를 구체화 한 후 날짜를 패치하는 것이지만 일종의 냄새가납니다 ...&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;var results = _connection.Query&amp;lt;Foo&amp;gt;(sql, param).Select(PatchDate);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
...&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
static Foo PatchDate(Foo f)&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    if (f.ModificationDate.Kind == DateTimeKind.Unspecified)&lt;font&gt;&lt;/font&gt;
        f.ModificationDate = DateTime.SpecifyKind(f.ModificationDate, DateTimeKind.Utc);&lt;font&gt;&lt;/font&gt;
    return f;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단한 수정을 찾고 오는 다른 사람을 위해이 답변을 추가하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Dapper에 SqlMapper.TypeHandler를 추가하면 가능합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 클래스를 추가하여 db의 값을 UTC로 지정된 종류의 datetime으로 변환합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public class DateTimeHandler : SqlMapper.TypeHandler&amp;lt;DateTime&amp;gt;&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    public override void SetValue(IDbDataParameter parameter, DateTime value)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        parameter.Value = value;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public override DateTime Parse(object value)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return DateTime.SpecifyKind((DateTime)value, DateTimeKind.Utc);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 내 Web API의 Global.asax 파일에서 유형 처리기를 dapper에 추가합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;SqlMapper.AddTypeHandler(new DateTimeHandler());
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;날짜를 항상 UTC로 삽입해야하는 경우 SetValue 메서드에서 다음을 사용할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;parameter.Value = DateTime.SpecifyKind(value, DateTimeKind.Utc);
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Dapper 코드를 살펴 보았습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 것이 오래된 것이 아니라면 datetime과 같은 값 유형 (DbType.DateTime에 매핑 됨)의 경우 dapper는 IDataReader 개체에서 간단한 캐스트를 수행합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;의사 : yield return (DateTime) IDataReader.GetValue (0); &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그것은 일련의 일반 코드와 람다에서 Datetime의 특정 경우입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;AFAIK, SQL datetime은 오프셋 / 시간대를 저장하지 않으므로 저장하고 가져 오는 모든 날짜 시간에 종류가 항상 &quot;Unspecified&quot;라고 표시됩니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;따라서 &lt;/font&gt;&lt;/font&gt;&lt;i&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;깔끔하게&lt;/font&gt;&lt;/font&gt;&lt;/i&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 수행 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하려면 &lt;/font&gt;&lt;i&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;깔끔한&lt;/font&gt;&lt;/i&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 내부를 만질 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;큰 IL 생성 방법 (DataRow Deserializer)을 만지고 DateTime의 경우 if 케이스에 넣어야하므로 고통 스럽습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTC가 문제인 DateTime props에 setter를 넣으면됩니다 (POCO에 반하지만 비교적 정상입니다).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;class Foo&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    private DateTime _modificationDate;&lt;font&gt;&lt;/font&gt;
    public DateTime ModificationDate&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        get { return _modificationDate; }&lt;font&gt;&lt;/font&gt;
        set { _modificationDate = DateTime.SpecifyKind(value, DateTimeKind.Utc); }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
    //Ifs optional? since it's always going to be a UTC date, and any DB call will return unspecified anyways&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 @ matt-jenkins 답변을 기반으로 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;DateTimeOffset&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;/ &lt;/font&gt;&lt;/font&gt;&lt;code&gt;DateTimeOffset?&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필드 / 속성을 MySQL 5.7 데이터베이스 (지원하지 않음 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;DbType.DateTimeOffset&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;와 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원활하게 통합하기 위해 여기에 전체 솔루션을 넣고 싶었습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public static class DapperExtensions&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    class DateTimeOffsetTypeHandler : SqlMapper.TypeHandler&amp;lt;DateTimeOffset&amp;gt;&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        public override void SetValue(IDbDataParameter parameter, DateTimeOffset value)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            switch (parameter.DbType)&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                case DbType.DateTime:&lt;font&gt;&lt;/font&gt;
                case DbType.DateTime2:&lt;font&gt;&lt;/font&gt;
                case DbType.AnsiString: // Seems to be some MySQL type mapping here&lt;font&gt;&lt;/font&gt;
                    parameter.Value = value.UtcDateTime;&lt;font&gt;&lt;/font&gt;
                    break;&lt;font&gt;&lt;/font&gt;
                case DbType.DateTimeOffset:&lt;font&gt;&lt;/font&gt;
                    parameter.Value = value;&lt;font&gt;&lt;/font&gt;
                    break;&lt;font&gt;&lt;/font&gt;
                default:&lt;font&gt;&lt;/font&gt;
                    throw new InvalidOperationException(&quot;DateTimeOffset must be assigned to a DbType.DateTime SQL field.&quot;);&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        public override DateTimeOffset Parse(object value)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            switch (value)&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                case DateTime time:&lt;font&gt;&lt;/font&gt;
                    return new DateTimeOffset(DateTime.SpecifyKind(time, DateTimeKind.Utc), TimeSpan.Zero);&lt;font&gt;&lt;/font&gt;
                case DateTimeOffset dto:&lt;font&gt;&lt;/font&gt;
                    return dto;&lt;font&gt;&lt;/font&gt;
                default:&lt;font&gt;&lt;/font&gt;
                    throw new InvalidOperationException(&quot;Must be DateTime or DateTimeOffset object to be mapped.&quot;);&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private static int DateTimeOffsetMapperInstalled = 0;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public static void InstallDateTimeOffsetMapper()&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        // Assumes SqlMapper.ResetTypeHandlers() is never called.&lt;font&gt;&lt;/font&gt;
        if (Interlocked.CompareExchange(ref DateTimeOffsetMapperInstalled, 1, 0) == 0)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            // First remove the default type map between typeof(DateTimeOffset) =&amp;gt; DbType.DateTimeOffset (not valid for MySQL)&lt;font&gt;&lt;/font&gt;
            SqlMapper.RemoveTypeMap(typeof(DateTimeOffset));&lt;font&gt;&lt;/font&gt;
            SqlMapper.RemoveTypeMap(typeof(DateTimeOffset?));&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            // This handles nullable value types automatically e.g. DateTimeOffset?&lt;font&gt;&lt;/font&gt;
            SqlMapper.AddTypeHandler(typeof(DateTimeOffset), new DateTimeOffsetTypeHandler());&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;If you are using Dapper from source (not nuget), you could tweak the code to always force DateTimeKind of UTC. A more configurable option might be to create a new attribute for DateTime property values that allow you to specify date time kind as a hint to dapper. Dapper could look for DateTime properties with this attribute and when found could use it to specify the DateTime kind during ORM mapping. This might be a nice feature for core dapper as you are not the only one with this issue :)&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/12510299/get-datetime-as-utc-with-dapper&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/12510299/get-datetime-as-utc-with-dapper&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5116</guid>
      <comments>https://hot-time.tistory.com/5116#entry5116comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:02:45 +0900</pubDate>
    </item>
    <item>
      <title>CSV 파일을 사용하여 플로팅</title>
      <link>https://hot-time.tistory.com/5115</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;CSV 파일을 사용하여 플로팅&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 행에 5 개의 항목이있는 csv 파일이 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 항목은 네트워크 패킷이 트리거되는지 여부입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 행의 마지막 항목은 패킷의 크기입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 행 = 경과 된 시간 (ms).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예 : 행 &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;1 , 0 , 1 , 2 , 117
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 x 축이 행 번호이고 y가 모든 행의 첫 번째 항목에 대한 값인 경우 그래프를 어떻게 플로팅합니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;시작해야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;set datafile separator &quot;,&quot;&lt;font&gt;&lt;/font&gt;
plot 'infile' using 0:1&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;gnuplot (무료)을 사용하여 png 파일로 플롯 할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;터미널 명령&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;gnuplot&amp;gt; set title '&amp;lt;title&amp;gt;'&lt;font&gt;&lt;/font&gt;
gnuplot&amp;gt; set ylabel '&amp;lt;yLabel&amp;gt;'&lt;font&gt;&lt;/font&gt;
gnuplot&amp;gt; set xlabel '&amp;lt;xLabel&amp;gt;'&lt;font&gt;&lt;/font&gt;
gnuplot&amp;gt; set grid&lt;font&gt;&lt;/font&gt;
gnuplot&amp;gt; set term png&lt;font&gt;&lt;/font&gt;
gnuplot&amp;gt; set output '&amp;lt;Output file name&amp;gt;.png'&lt;font&gt;&lt;/font&gt;
gnuplot&amp;gt; plot '&amp;lt;fromfile.csv&amp;gt;'&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참고 : 항상 올바른 확장자 (.png 여기)를 제공해야합니다. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;set output&lt;/code&gt;&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러면 데이터가 계속되지 않기 때문에 출력이 라인이 아닐 수도 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 문제를 해결하려면 '플롯'줄을 다음과 같이 변경하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;plot '&amp;lt;Fromfile.csv&amp;gt;' with line lt -1 lw 2
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추가 라인 편집 옵션 (대시 및 라인 색상 등) : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://gnuplot.sourceforge.net/demo_canvas/dashcolor.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://gnuplot.sourceforge.net/demo_canvas/dashcolor.html&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;gnuplot은 패키지 관리자를 통해 대부분의 Linux 배포판에서 사용할 수 있습니다 (예 : apt 기반 배포판에서 실행 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;apt-get install gnuplot&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;).&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;gnuplot은 Cygwin을 통해 Windows에서 사용할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;gnuplot은 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://brew.sh&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;homebrew&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; (run &lt;/font&gt;&lt;/font&gt;&lt;code&gt;brew install gnuplot&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;) &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 통해 macOS에서 사용할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/14871272/plotting-using-a-csv-file&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/14871272/plotting-using-a-csv-file&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5115</guid>
      <comments>https://hot-time.tistory.com/5115#entry5115comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:02:35 +0900</pubDate>
    </item>
    <item>
      <title>루프의 Python Lambda</title>
      <link>https://hot-time.tistory.com/5114</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;루프의 Python Lambda&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 코드 스 니펫을 고려하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;# directorys == {'login': &amp;lt;object at ...&amp;gt;, 'home': &amp;lt;object at ...&amp;gt;}&lt;font&gt;&lt;/font&gt;
for d in directorys:&lt;font&gt;&lt;/font&gt;
    self.command[&quot;cd &quot; + d] = (lambda : self.root.change_directory(d))&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음과 같이 두 가지 기능의 사전을 만들 것으로 예상합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;# Expected :&lt;font&gt;&lt;/font&gt;
self.command == {&lt;font&gt;&lt;/font&gt;
    &quot;cd login&quot;: lambda: self.root.change_directory(&quot;login&quot;),&lt;font&gt;&lt;/font&gt;
    &quot;cd home&quot;: lambda: self.root.change_directory(&quot;home&quot;)&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 생성 된 두 개의 람다 함수가 정확히 동일한 것처럼 보입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;# Result :&lt;font&gt;&lt;/font&gt;
self.command == {&lt;font&gt;&lt;/font&gt;
    &quot;cd login&quot;: lambda: self.root.change_directory(&quot;login&quot;),&lt;font&gt;&lt;/font&gt;
    &quot;cd home&quot;: lambda: self.root.change_directory(&quot;login&quot;)   # &amp;lt;- Why login ?&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;왜 그런지 정말 모르겠어요. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;의견 있으십니까 ?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;생성 된 각 함수에 대해 d를 바인딩해야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이를 수행하는 한 가지 방법은 기본값을 사용하여 매개 변수로 전달하는 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;lambda d=d: self.root.change_directory(d)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 함수 내부의 d는 이름이 같더라도 매개 변수를 사용하고 함수가 생성 될 때 그 기본값이 평가됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것을 볼 수 있도록 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;lambda bound_d=d: self.root.change_directory(bound_d)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;개체를 바인딩하기 때문에 목록 및 사전과 같은 변경 가능한 개체의 경우와 같이 기본값이 작동하는 방식을 기억하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본값이있는이 매개 변수 관용구는 충분히 일반적이지만 함수 매개 변수를 조사하고 그 존재에 따라 수행 할 작업을 결정하면 실패 할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 클로저로 매개 변수를 피할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;(lambda d=d: lambda: self.root.change_directory(d))()&lt;font&gt;&lt;/font&gt;
# or&lt;font&gt;&lt;/font&gt;
(lambda d: lambda: self.root.change_directory(d))(d)&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 d가 바인딩되는 지점 때문입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;람다 함수는 모두 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;현재 &lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;값&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 이 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아닌 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;변수를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt; &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 가리 키 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;므로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 반복에서 업데이트하면이 업데이트가 모든 함수에 표시됩니다.&lt;/font&gt;&lt;/font&gt;&lt;code&gt;d&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;d&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;더 간단한 예 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;funcs = []&lt;font&gt;&lt;/font&gt;
for x in [1,2,3]:&lt;font&gt;&lt;/font&gt;
  funcs.append(lambda: x)&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
for f in funcs:&lt;font&gt;&lt;/font&gt;
  print f()&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
# output:&lt;font&gt;&lt;/font&gt;
3&lt;font&gt;&lt;/font&gt;
3&lt;font&gt;&lt;/font&gt;
3&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음과 같이 추가 기능을 추가하여이 문제를 해결할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;def makeFunc(x):&lt;font&gt;&lt;/font&gt;
  return lambda: x&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
funcs = []&lt;font&gt;&lt;/font&gt;
for x in [1,2,3]:&lt;font&gt;&lt;/font&gt;
  funcs.append(makeFunc(x))&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
for f in funcs:&lt;font&gt;&lt;/font&gt;
  print f()&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
# output:&lt;font&gt;&lt;/font&gt;
1&lt;font&gt;&lt;/font&gt;
2&lt;font&gt;&lt;/font&gt;
3&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;람다 식 내부의 범위를 수정할 수도 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;lambda bound_x=x: bound_x
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 일반적으로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;함수의 시그니처를 변경했기 때문에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;좋은 습관 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아닙니다&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;I met the same problem. The selected solution helped me a lot, but I consider necessary to add a precision to make functional the code of the question: define the lambda function outside of the loop. By the way, default value is not necessary.&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;foo = lambda d: lambda : self.root.change_directory(d)&lt;font&gt;&lt;/font&gt;
for d in directorys:&lt;font&gt;&lt;/font&gt;
    self.command[&quot;cd &quot; + d] = (foo(d))&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Alternatively, instead of &lt;code&gt;lambda&lt;/code&gt;, you can use &lt;a href=&quot;https://docs.python.org/3/library/functools.html#functools.partial&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;functools.partial&lt;/code&gt;&lt;/a&gt; which, in my opinion, has a cleaner syntax. &lt;/p&gt; 
&lt;p&gt;Instead of:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;for d in directorys:&lt;font&gt;&lt;/font&gt;
    self.command[&quot;cd &quot; + d] = (lambda d=d: self.root.change_directory(d))&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;it will be:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;for d in directorys:&lt;font&gt;&lt;/font&gt;
    self.command[&quot;cd &quot; + d] = partial(self.root.change_directory, d)&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;hr&gt; 
&lt;p&gt;Or, here is another simple example:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;numbers = [1, 2, 3]&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
lambdas = [lambda: print(number) &lt;font&gt;&lt;/font&gt;
           for number in numbers]&lt;font&gt;&lt;/font&gt;
lambdas_with_binding = [lambda number=number: print(number) &lt;font&gt;&lt;/font&gt;
                        for number in numbers]&lt;font&gt;&lt;/font&gt;
partials = [partial(print, number) &lt;font&gt;&lt;/font&gt;
            for number in numbers]&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
for function in lambdas:&lt;font&gt;&lt;/font&gt;
    function()&lt;font&gt;&lt;/font&gt;
# 3 3 3&lt;font&gt;&lt;/font&gt;
for function in lambdas_with_binding:&lt;font&gt;&lt;/font&gt;
    function()&lt;font&gt;&lt;/font&gt;
# 1 2 3&lt;font&gt;&lt;/font&gt;
for function in partials:&lt;font&gt;&lt;/font&gt;
    function()&lt;font&gt;&lt;/font&gt;
# 1 2 3&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/19837486/python-lambda-in-a-loop&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/19837486/python-lambda-in-a-loop&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5114</guid>
      <comments>https://hot-time.tistory.com/5114#entry5114comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:02:27 +0900</pubDate>
    </item>
    <item>
      <title>DOM 리플 로우 란 무엇입니까?</title>
      <link>https://hot-time.tistory.com/5113</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;DOM 리플 로우 란 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는이 개 CSS 속성의 차이에 대해 읽고 있었다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;display:none&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;및 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;visibility:hidden&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;및 발견 된 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;DOM 리플 로우&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 용어.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;진술은&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;code&gt;display: none&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;없는 DOM 리플 로우가 발생합니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;visibility: hidden&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래서 제 질문은 : &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;h3&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;DOM 리플 로우 란 무엇이며 어떻게 작동합니까?&lt;/font&gt;&lt;/font&gt;&lt;/h3&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;리플 로우&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 페이지의 레이아웃을 계산한다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요소에 대한 리플 로우는 요소의 크기와 위치를 재 계산하고 해당 요소의 자식, 조상 및 DOM에서 그 뒤에 나타나는 요소에 대한 추가 리플 로우를 트리거합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 최종 다시 그리기를 호출합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;리플 로우는 매우 비싸지 만 안타깝게도 쉽게 트리거 될 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;리플 로우는 다음과 같은 경우에 발생합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;DOM에서 요소 삽입, 제거 또는 업데이트&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;페이지의 내용 수정 (예 : 입력 상자의 텍스트)&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;DOM 요소 이동&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;DOM 요소 애니메이션&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;offsetHeight 또는 getComputedStyle과 같은 요소 측정&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;CSS 스타일 변경&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요소의 className 변경&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스타일 시트 추가 또는 제거&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;창 크기 조정&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스크롤&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;/ul&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자세한 내용은 여기를 참조하십시오 : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://sites.google.com/site/getsnippet/javascript/dom/repaints-and-reflows-manipulating-the-dom-responsibly&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Repaints 및 Reflows : 책임감있는 DOM 조작&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Reflow는 문서의 일부 또는 전체를 다시 렌더링 할 목적으로 문서에있는 요소의 위치와 형상을 다시 계산하기위한 웹 브라우저 프로세스의 이름입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;a href=&quot;https://developers.google.com/speed/articles/reflow&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://developers.google.com/speed/articles/reflow&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;display:none&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;을 숨길 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;div&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;는 것처럼 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;div&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;반면 렌더링되지 않습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;visibility:hidden&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;만 숨 깁니다하지만 공간이 여전히 점유&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;즉,을 설정 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;display: none;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하면 visible : hidden; 경우 브라우저가 DOM 요소의 위치를 ​​다시 계산합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;-아니. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;visibility: hidden;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;DOM에서 요소 크기를 변경하지 않기 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;때문에 생각하십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/27637184/what-is-dom-reflow&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/27637184/what-is-dom-reflow&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5113</guid>
      <comments>https://hot-time.tistory.com/5113#entry5113comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:02:18 +0900</pubDate>
    </item>
    <item>
      <title>Dataframe의 모든 열에서 NaN이 아닌 항목 수 계산</title>
      <link>https://hot-time.tistory.com/5112</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Dataframe의 모든 열에서 NaN이 아닌 항목 수 계산&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 정말 큰 DataFrame을 가지고 있으며 DataFrame에서 NaN이 아닌 항목의 수를 얻는 짧은 (하나 또는 두 개의 라이너) 방법이 있는지 궁금합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1,000 개에 가까운 열이 있으므로 한 번에 한 열씩 수행하고 싶지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;df1 = pd.DataFrame([(1,2,None),(None,4,None),(5,None,7),(5,None,None)], &lt;font&gt;&lt;/font&gt;
                    columns=['a','b','d'], index = ['A', 'B','C','D'])&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    a   b   d&lt;font&gt;&lt;/font&gt;
A   1   2 NaN&lt;font&gt;&lt;/font&gt;
B NaN   4 NaN&lt;font&gt;&lt;/font&gt;
C   5 NaN   7&lt;font&gt;&lt;/font&gt;
D   5 NaN NaN&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;산출:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;a: 3&lt;font&gt;&lt;/font&gt;
b: 2&lt;font&gt;&lt;/font&gt;
d: 1&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.count.html&quot;&gt;&lt;code&gt;count()&lt;/code&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;메서드는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;NaN&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;각 열에있는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;비값의 수를 반환합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; df1.count()&lt;font&gt;&lt;/font&gt;
a    3&lt;font&gt;&lt;/font&gt;
b    2&lt;font&gt;&lt;/font&gt;
d    1&lt;font&gt;&lt;/font&gt;
dtype: int64&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마찬가지로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;각 행 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;count(axis=1)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에있는 비값의 수를 반환합니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;NaN&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/29971075/count-number-of-non-nan-entries-in-every-column-of-dataframe&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/29971075/count-number-of-non-nan-entries-in-every-column-of-dataframe&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5112</guid>
      <comments>https://hot-time.tistory.com/5112#entry5112comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:02:10 +0900</pubDate>
    </item>
    <item>
      <title>.NET 솔루션에서 사용하지 않는 리소스 찾기</title>
      <link>https://hot-time.tistory.com/5111</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.NET 솔루션에서 사용하지 않는 리소스 찾기&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;'분리'되어 더 이상 필요하지 않은 .resx 파일에서 사용하지 않는 아이콘, 이미지, 문자열을 찾는 방법은 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 알고리즘이 안정적으로 계산할 수있는 정보가 아닙니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;검사 된 프로그램은 모든 리소스 목록을 가져 와서 사용자가 여러 아이콘 중에서 선택하도록하는 것과 같은 작업을 수행 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가장 좋은 방법은 선택한 리소스 액세스 API에 대한 모든 참조를 검색하고 수동으로 검사하는 것입니다. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;grep&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;/ &lt;/font&gt;&lt;/font&gt;&lt;code&gt;sed&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하면 간단한 문자열이 사용되는 &quot;쉬운&quot;사이트를 모두 처리하여 수동으로 검사해야하는 사이트를 줄일 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;최근 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/tom-englert/ResXResourceManager&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ResXManager 1.0.0.41&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 은 문자열 리소스에 대한 참조 수를 표시하는 기능을 추가했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/X3fwm.png&quot; alt=&quot;새로운 참조 열을 보여주는 스크린 샷&quot;&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;XAML 파일에서 문자열 리소스 참조를 검색하고 사용하지 않는 항목을 일괄 제거하는 기존 솔루션을 찾을 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래서 저는 이것을 썼습니다 : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/Microsoft/RESX-Unused-Finder&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://github.com/Microsoft/RESX-Unused-Finder&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/5AvvO.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/5AvvO.png&quot; alt=&quot;RESX 미사용 파인더 스크린 샷&quot;&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프로젝트 디렉터리에서 문자열 리소스에 대한 참조를 검색 한 다음 일치 항목을 찾을 수없는 목록을 표시합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;XAML 파일에서 참조를 찾을 수 있도록 검색 할 템플릿을 지정할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프로젝트에서 사용하지 않는 이미지를 찾는 무료 오픈 소스 VS 확장을 만들었고 방금 첫 번째 버전을 게시했습니다 : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://marketplace.visualstudio.com/items?itemName=Jitbit1.VSUnusedImagesFinder&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://marketplace.visualstudio.com/items?itemName=Jitbit1.VSUnusedImagesFinder&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아직 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 하고 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;빠른&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 솔루션을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;찾을 수 없었기 때문에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 시간이 좀 걸리더라도 (게으른 일요일 오후에 이상적) 원하는 결과를 얻을 수있는 솔루션을 적어도 찾았습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;솔루션에는 Visual Studio .NET 2010 및 ReSharper (버전 7.1을 사용하고 있음)가 포함되며 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;단계별 솔루션&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1.)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; VS.NET에서 기본 RESX 파일을 마우스 오른쪽 단추로 클릭하고 상황에 맞는 메뉴에서 &quot;사용 찾기&quot;를 선택합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/MlvHI.png&quot; alt=&quot;여기에 이미지 설명 입력&quot;&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ReSharper의 &quot;결과 찾기&quot;창이 나타납니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2.)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 솔루션 창에서 각 항목을 두 번 클릭합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/3RKDS.png&quot; alt=&quot;여기에 이미지 설명 입력&quot;&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러면 리소스가있는 소스 코드 창이 열립니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3.)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 소스 코드 창에서이 리소스의 이름을 바꿉니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/FTPAC.png&quot; alt=&quot;여기에 이미지 설명 입력&quot;&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ReSharper의 &quot;Rename Resource&quot;대화 상자가 나타납니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;4.)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 리소스에 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;고유 한 접두사가&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 있는 새 이름을 지정 &lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 예에서는 &quot;TaskDialog_&quot;입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/9o5Gp.png&quot; alt=&quot;여기에 이미지 설명 입력&quot;&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;리소스와 자동 생성 된 C # 래퍼 / 액세스 클래스의 이름을 모두 바꿉니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;5.)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; &quot;사용&quot;창의 모든 리소스에 대해 위의 2, 3 및 4 단계를 반복합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;6.)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Visual Studio의 리소스 편집기에서 RESX 파일을 열고 접두사가없는 모든 파일을 선택합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/tyQ2A.png&quot; alt=&quot;여기에 이미지 설명 입력&quot;&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;7.)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 이제 창 상단의 &quot;리소스 제거&quot;버튼을 클릭하거나 간단히 &lt;/font&gt;&lt;/font&gt;&lt;kbd&gt;Del&lt;/kbd&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;키 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 누르십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/UHmkg.png&quot; alt=&quot;여기에 이미지 설명 입력&quot;&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 파일에 사용 된 리소스 만 포함 된 RESX 파일이 생겼습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;8.)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; (선택 사항) 여러 언어로 된 리소스 (예 : 독일어의 경우 &quot;Resources.de.resx&quot;)가있는 경우 해당 RESX 파일에 대해서도 7 단계와 8 단계를 반복합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;경고&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;강력한 형식의 자동 생성 C # 클래스를 통하지 않고 다른 문자열에 액세스하는 경우에는 작동하지 않습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Resources&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;최근에 사용하지 않는 문자열 리소스를 감지하고 제거하는 도구를 만들었습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 게시물의 정보를 참고 자료로 사용했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 도구는 완벽하지 않을 수 있지만 무거운 작업을 수행하며 오랜 역사를 가진 큰 프로젝트가있는 경우 유용 할 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 도구를 내부적으로 사용하여 리소스 파일을 통합하고 사용하지 않는 리소스를 제거했습니다 (10,000 개 중 4,000 개 이상의 리소스 제거).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;소스 코드를 보거나 여기에서 ClickOnce를 설치할 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://resxutils.codeplex.com/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://resxutils.codeplex.com/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;비슷한 문제가있었습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;번역 테이블을 위해 만든 수천 개의 리소스 문자열 중 많은 부분이 더 이상 코드에서 필요하지 않거나 참조되지 않았습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;약 180 개의 종속 코드 파일이 있으므로 각 리소스 문자열을 수동으로 살펴볼 방법이 없었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 코드 (vb.net)는 고아 리소스 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;개별 양식의 리소스가 아닌 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프로젝트 리소스&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서)를&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 찾는 프로젝트를 살펴 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;봅니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 프로젝트에는 약 1 분이 걸렸습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문자열, 이미지 또는 기타 리소스 유형을 찾도록 수정할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요약하면,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1) 솔루션 프로젝트 파일을 사용하여 포함 된 모든 코드 모듈을 수집하고 단일 문자열 변수에 추가합니다. &lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2) 모든 프로젝트 리소스 개체를 반복하고 문자열 인 목록 (제 경우에는)을 만듭니다. &lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;3) Does a string search finding resource string codes in the combined project text variable; &lt;/li&gt; 
 &lt;li&gt;4) Reports resource objects that are not referenced.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;The function returns the object names on the windows clipboard for pasting in a spreadsheet or as a list array of the resource names.&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;em&gt;edit&lt;/em&gt;&lt;/strong&gt; : example call in module : modTest&lt;br&gt; &lt;code&gt;? modTest.GetUnusedResources(&quot;C:\Documents and Settings\me\My Documents\Visual Studio 2010\Projects\myProj\myProj.vbproj&quot;, True, true)&lt;/code&gt;&lt;/p&gt; 
&lt;pre class=&quot;lang-vb prettyprint-override&quot;&gt;&lt;code&gt;'project file is the vbproj file for my solution&lt;font&gt;&lt;/font&gt;
Public Function GetUnusedResources(projectFile As String, useClipboard As Boolean, strict As Boolean) As List(Of String)&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    Dim myProjectFiles As New List(Of String)&lt;font&gt;&lt;/font&gt;
    Dim baseFolder = System.IO.Path.GetDirectoryName(projectFile) + &quot;\&quot;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    'get list of project files &lt;font&gt;&lt;/font&gt;
    Dim reader As Xml.XmlTextReader = New Xml.XmlTextReader(projectFile)&lt;font&gt;&lt;/font&gt;
    Do While (reader.Read())&lt;font&gt;&lt;/font&gt;
        Select Case reader.NodeType&lt;font&gt;&lt;/font&gt;
            Case Xml.XmlNodeType.Element 'Display beginning of element.&lt;font&gt;&lt;/font&gt;
                If reader.Name.ToLowerInvariant() = &quot;compile&quot; Then ' only get compile included files&lt;font&gt;&lt;/font&gt;
                    If reader.HasAttributes Then 'If attributes exist&lt;font&gt;&lt;/font&gt;
                        While reader.MoveToNextAttribute()&lt;font&gt;&lt;/font&gt;
                            If reader.Name.ToLowerInvariant() = &quot;include&quot; Then myProjectFiles.Add((reader.Value))&lt;font&gt;&lt;/font&gt;
                        End While&lt;font&gt;&lt;/font&gt;
                    End If&lt;font&gt;&lt;/font&gt;
                End If&lt;font&gt;&lt;/font&gt;
        End Select&lt;font&gt;&lt;/font&gt;
    Loop&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    'now collect files into a single string&lt;font&gt;&lt;/font&gt;
    Dim fileText As New System.Text.StringBuilder&lt;font&gt;&lt;/font&gt;
    For Each fileItem As String In myProjectFiles&lt;font&gt;&lt;/font&gt;
        Dim textFileStream As System.IO.TextReader&lt;font&gt;&lt;/font&gt;
        textFileStream = System.IO.File.OpenText(baseFolder + fileItem)&lt;font&gt;&lt;/font&gt;
        fileText.Append(textFileStream.ReadToEnd)&lt;font&gt;&lt;/font&gt;
        textFileStream.Close()&lt;font&gt;&lt;/font&gt;
    Next&lt;font&gt;&lt;/font&gt;
    '  Debug.WriteLine(fileText)&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    ' Create a ResXResourceReader for the file items.resx.&lt;font&gt;&lt;/font&gt;
    Dim rsxr As New System.Resources.ResXResourceReader(baseFolder + &quot;My Project\Resources.resx&quot;)&lt;font&gt;&lt;/font&gt;
    rsxr.BasePath = baseFolder + &quot;Resources&quot;&lt;font&gt;&lt;/font&gt;
    Dim resourceList As New List(Of String)&lt;font&gt;&lt;/font&gt;
    ' Iterate through the resources and display the contents to the console.&lt;font&gt;&lt;/font&gt;
    For Each resourceValue As DictionaryEntry In rsxr&lt;font&gt;&lt;/font&gt;
        ' Debug.WriteLine(resourceValue.Key.ToString())&lt;font&gt;&lt;/font&gt;
        If TypeOf resourceValue.Value Is String Then ' or bitmap or other type if required&lt;font&gt;&lt;/font&gt;
            resourceList.Add(resourceValue.Key.ToString())&lt;font&gt;&lt;/font&gt;
        End If&lt;font&gt;&lt;/font&gt;
    Next&lt;font&gt;&lt;/font&gt;
    rsxr.Close()  'Close the reader.&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    'finally search file string for occurances of each resource string&lt;font&gt;&lt;/font&gt;
    Dim unusedResources As New List(Of String)&lt;font&gt;&lt;/font&gt;
    Dim clipBoardText As New System.Text.StringBuilder&lt;font&gt;&lt;/font&gt;
    Dim searchText = fileText.ToString()&lt;font&gt;&lt;/font&gt;
    For Each resourceString As String In resourceList&lt;font&gt;&lt;/font&gt;
        Dim resourceCall = &quot;My.Resources.&quot; + resourceString ' find code reference to the resource name&lt;font&gt;&lt;/font&gt;
        Dim resourceAttribute = &quot;(&quot;&quot;&quot; + resourceString + &quot;&quot;&quot;)&quot; ' find attribute reference to the resource name&lt;font&gt;&lt;/font&gt;
        Dim searchResult As Boolean = False&lt;font&gt;&lt;/font&gt;
        searchResult = searchResult Or searchText.Contains(resourceCall)&lt;font&gt;&lt;/font&gt;
        searchResult = searchResult Or searchText.Contains(resourceAttribute)&lt;font&gt;&lt;/font&gt;
        If Not strict Then searchResult = searchResult Or searchText.Contains(resourceString)&lt;font&gt;&lt;/font&gt;
        If Not searchResult Then ' resource name no found so add to list&lt;font&gt;&lt;/font&gt;
            unusedResources.Add(resourceString)&lt;font&gt;&lt;/font&gt;
            clipBoardText.Append(resourceString + vbCrLf)&lt;font&gt;&lt;/font&gt;
        End If&lt;font&gt;&lt;/font&gt;
    Next&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    'make clipboard object&lt;font&gt;&lt;/font&gt;
    If useClipboard Then&lt;font&gt;&lt;/font&gt;
        Dim dataObject As New DataObject ' Make a DataObject clipboard&lt;font&gt;&lt;/font&gt;
        dataObject.SetData(DataFormats.Text, clipBoardText.ToString())        ' Add the data in string format.&lt;font&gt;&lt;/font&gt;
        Clipboard.SetDataObject(dataObject) ' Copy data to the clipboard.&lt;font&gt;&lt;/font&gt;
    End If&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    Return unusedResources&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
End Function&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;I use ReSharper for finding unused resource fields and then remove them manually if project contains small amount of resources. Some short script can be used if we already have list of unused items.&lt;/p&gt; 
&lt;p&gt;The solution is next:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;show all unused members as described in &lt;a href=&quot;http://chrisseroka.wordpress.com/2013/10/28/find-unused-private-and-public-methods-with-resharper/&quot; rel=&quot;nofollow noreferrer&quot;&gt;this article&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;temporary remove *.Designer.cs from Generated file masks (ReSharper → Options → CodeInspection → GeneratedCode)&lt;/li&gt; 
 &lt;li&gt;Also comment or remove comment (that indicates that code is auto generated) from top of Designer.cs file attached to resource file.&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;You will have list of all unused resources, left to remove them from resx.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;I've been considering this myself and I believe I have two options. Both of these rely on the fact that I use a helper method to extract the required resource from the resource files. &lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;p&gt;&lt;strong&gt;Logging&lt;/strong&gt;&lt;br&gt; Add some code to the &quot;getresource&quot; method or methods so that every time a resource is accessed, the resource key is written to a log. Then try to access every part of the site (a testing script might be helpful here). The resultant log entries should give a list of all the active resource keys, the rest can be junked.&lt;/p&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;p&gt;&lt;strong&gt;Code Analysis&lt;/strong&gt;&lt;br&gt; I am looking at whether &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb126445.aspx&quot; rel=&quot;nofollow noreferrer&quot; title=&quot;T4&quot;&gt;T4&lt;/a&gt; is capable of working through the solution and creating a list of all references to the &quot;getresource&quot; helper method. The resultant list of keys will be active, the rest can be deleted.&lt;/p&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;There are limitations of both methods. The logging method is only as good as the code covered by the test and the code analysis might not always find keys rather than strings containg the keys so there will be some extra manual work required there.&lt;/p&gt; 
&lt;p&gt;I think I'll try both. I'll let you know how it goes.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;현재 이미지 디렉토리의 이름을 바꾼 다음 새 디렉토리를 만들고 VS 내에서 이미지 경로 (예 : '/ content / images')를 검색하고 사용 된 모든 이미지를 다중 선택하여 새 이미지 폴더로 드래그합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 프로젝트에서 이전 디렉토리를 제외하거나 삭제할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/245956/find-unused-resources-in-a-net-solution&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/245956/find-unused-resources-in-a-net-solution&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5111</guid>
      <comments>https://hot-time.tistory.com/5111#entry5111comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:02:01 +0900</pubDate>
    </item>
    <item>
      <title>iPhone에서 텍스트 음성 변환</title>
      <link>https://hot-time.tistory.com/5110</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;iPhone에서 텍스트 음성 변환&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;iPhone 앱에서 텍스트를 음성으로 변환 할 수있는 방법이 있습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;SDK를 사용할 수 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;iPhone SDK가 내부적으로 TTS 기능을 제공하지 않는다고 생각합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;타사 TTS 엔진을 사용하거나 직접 작성해야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Flite 음성 합성 엔진은 iPhone에서 실행될 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://artofsystems.blogspot.com/2009/02/speech-synthesis-on-iphone-with-flite.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://artofsystems.blogspot.com/2009/02/speech-synthesis-on-iphone-with-flite.html&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;a href=&quot;http://www.politepix.com/openears/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;OpenEars&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 는 또한 iPhone에서 텍스트 음성 변환을 수행합니다 (참고 : 개발자입니다).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 아마도 죽은 스레드를 부딪 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://bitbucket.org/sfoster/iphone-tts/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;히고&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 있지만 &lt;/font&gt;&lt;a href=&quot;http://bitbucket.org/sfoster/iphone-tts/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Flite 텍스트 음성 변환 엔진&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 은 나를 위해 놀라운 일을했습니다!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;도움이 되었기를 바랍니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음은 또 다른 음성 텍스트입니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://bitbucket.org/sfoster/iphone-tts/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://bitbucket.org/sfoster/iphone-tts/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다운로드하고 API로 설치해야 다음과 같이 사용할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;[fliteEngine speakText:@&quot;Hi there&quot;];                    // Make it talk&lt;font&gt;&lt;/font&gt;
[fliteEngine setPitch:90.0 variance:50.0 speed:0.9];    // Change the voice properties&lt;font&gt;&lt;/font&gt;
[fliteEngine setVoice:@&quot;cmu_us_awb&quot;];                   // Switch to a different voice&lt;font&gt;&lt;/font&gt;
[fliteEngine stopTalking];                              // stop talking&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;API로 올바르게 설치하면 사용하기가 매우 쉽습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;a href=&quot;http://github.com/KingOfBrian/VocalKit&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://github.com/KingOfBrian/VocalKit&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 포켓 스핑크스와 flite 주위에 래퍼를 썼다. 당신은 그것을 꽤 빨리 확인할 수있을 것이다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomsoft 엔진은 사용자 지정 음성에서만 느립니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이유를 잘 모르겠습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 다른 음성과 통합 된 기본 KAL 음성 만 제거하면 거의 즉시 말합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;도움이 필요하시면 제 웹 사이트의 문의 양식을 사용하여 저에게 이메일을 보내주십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;텍스트에서 사운드 파일로의 경우 위의 파일을 조사 할 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;http://www.ivona.com/online/editor.php&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://www.ivona.com/online/editor.php&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;http://www.acapela-box.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://www.acapela-box.com/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;IVONA에는 IPhone SDK도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;http://www.ivona.com/developer.php&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://www.ivona.com/developer.php&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Hoya VoiceText는 TTS 엔진의 원래 공급자입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;미국의 대부분의 상업 회사는 VocieText를 둘러싼 래퍼를 만들어 재판매합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 일본의 거대 기업인 Hoya가 인수 한 Pentax (LG의 한국인)가 개발했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;TTS 엔진에 대한 요청을 보내려면 여기를 방문하십시오 : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://voicetext.jp/blog/122.html&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://voicetext.jp/blog/122.html&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;영어 웹 사이트에 Google 번역을 사용하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Hoya는 일본에 있지만 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;미국에서 VoiceText Engine을 제공하는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://neospeech.com/&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;NeoSpeech&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 소유하고 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 사이트에서 데모를 확인하세요.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/416064/text-to-speech-on-iphone&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/416064/text-to-speech-on-iphone&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5110</guid>
      <comments>https://hot-time.tistory.com/5110#entry5110comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:01:48 +0900</pubDate>
    </item>
    <item>
      <title>Java 가비지 수집 로그 분석 도구를 알고 있습니까?</title>
      <link>https://hot-time.tistory.com/5109</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Java 가비지 수집 로그 분석 도구를 알고 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 웹 앱에서 콘솔 로그를 가져와 가비지 수집 정보를 구문 분석하여 의미있는 방식으로 표시하는 도구 또는 스크립트를 찾고 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 플래그를 사용하여 Sun Java 1.4.2 JVM에서 시작하고 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;-verbose:gc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로그 출력은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;54.736: [Full GC 54.737: [Tenured: 172798K-&amp;gt;18092K(174784K), 2.3792658 secs] 257598K-&amp;gt;18092K(259584K), [Perm : 20476K-&amp;gt;20476K(20480K)], 2.4715398 secs]
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가비지 수집 추세를 시각적으로 그래프로 표시하는 도구가 있다면 이러한 종류의 로그 항목 수백 개를 이해하는 것이 훨씬 쉬울 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;IBM의 GC 툴킷은 고객이 요청한대로 정확하게 수행합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://www.ibm.com/developerworks/java/jdk/tools/gcmv/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://www.ibm.com/developerworks/java/jdk/tools/gcmv/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래도 Sun의 JVM의 GC 로그와 호환되는지 확실하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;a href=&quot;http://www.tagtraum.com/gcviewer.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;gcviewer&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 는 원하는 작업을 수행합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일부 사람들은 질문에 나와있는 것처럼 가비지 수집 로그를 실제로 구문 분석하지 않는 Java 프로브를 추가하고 있다고 생각합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 사람 (gcviewer, gchisto, IBM)을 사용해 보았으며 GC 로그 분석을 위해 찾은 최고의 도구는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://web.archive.org/web/20150907141409/https://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=HPJMETER&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;HPjmeter입니다.&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;주로 HP-UX JVM 용이지만 일반적으로 Sun JVM에서도 작동하며 훌륭한 작업을 수행합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/ELnke.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/ELnke.jpg&quot; alt=&quot;대체 텍스트&quot;&gt;&lt;/a&gt;&lt;br&gt; &lt;sub&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(출처 : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://blog.xebia.com/wp-content/uploads/2008/09/hpjmeter-gctime.jpg&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;xebia.com&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; )&lt;/font&gt;&lt;/font&gt;&lt;/sub&gt; &lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;온라인 도구 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://gceasy.io&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://gceasy.io를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용해 보았는데 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 sun jdk 1.8 gc 로그를 읽을 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jconsole보다 더 나은 것은 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://visualvm.dev.java.net/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;visualvm입니다&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . 이는 Sun에서 자유롭게 개발하고 배포합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;도움이 될 수있는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://gchisto.dev.java.net/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;gchisto&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 라는 GC 분석 플러그인 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;편집 :&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 죄송합니다. JDK 1.4.2 요구 사항을 보지 못했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 경우 visualvm이 도움이되지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 찾은 가장 강력한 도구는 IBM 및 Hotspot JVM 로그 모두에서 작동하고이를 시각화하는 IBM의 PMAT입니다. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=22d56091-3a7b-4497-b36e-634b51838e11&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://www.ibm.com/developerworks/mydeveloperworks/groups/service/html/communityview?communityUuid=22d56091- 3a7b-4497-b36e-634b51838e11&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;IBM Support Assistant의 도구보다 더 빠르고 더 자세한 정보를 제공합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이는 지난 7 월 12 일에 지속적으로 업데이트되고 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 정책 CMS로 로그를 구문 분석하는 데 몇 가지 문제가있는 것 같지만이 문제를 해결할 수 있기를 바랍니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PrintGCStats도 꽤 훌륭하고 좋은 통계를 제공하지만 시간이 지남에 따라 시각화를위한 것이 아니므로 작업이 필요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;저는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.yourkit.com/overview/index.jsp&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;YourKit 자바 프로파일 러&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 사용합니다.이 &lt;/font&gt;&lt;a href=&quot;http://www.yourkit.com/overview/index.jsp&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프로파일 러&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 사용하면 이런 종류의 것을 측정 할 수 있습니다.하지만 로그를 분석하는 대신 자체 형식을 사용합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Java 5에서는 더 많은 작업을 수행 할 수 있지만 1.4에서는 작동합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Sun의 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://java.sun.com/performance/jvmstat/visualgc.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;VisualGC&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용해보십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에덴, 세대 및 파마 공간에서 무슨 일이 벌어지고 있는지에 대한 멋진 시각을 제공하는 JDK 4 및 5 버전이 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JAR을 추가하고 PID를 얻어야하며 Bob은 삼촌입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;몇 년 전 John Coomes (Hotspot GC 그룹)는 &quot;가비지 수집에 대한 통계, 특히 gc 일시 중지 시간 합계, 평균, 최대 및 표준 편차&quot;를 요약하는 awk 스크립트 인 PrintGCStats를 출시했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스크립트 사본은 java.net에서 호스팅됩니다. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://java.net/projects/printgcstats&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://java.net/projects/printgcstats&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;a href=&quot;http://java.sun.com/developer/technicalArticles/J2SE/jconsole.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;code&gt;jconsole&lt;/code&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;많은 도움이 될 수 있지만 Java 5 이상인 것 같습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우리 대학에서 SUN의 누군가가 말하는 것을 들었을 때 그는 Java 6의 가비지 수집기가 큰 응용 프로그램을 위해 거의 항상 복잡한 조정이 필요한 이전 것보다 훨씬 낫다고 말했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Java 6 GC는 SMP에서 훨씬 더 잘 확장되는 것 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;VisualVM 용 gchisto 플러그인이 작동하지 않습니다 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://gchisto.dev.java.net/&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://gchisto.dev.java.net/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;jdk1.6에 대한 printgc의 모든 세부 정보가 포함 된 파일이 있지만이를 읽을 수있는 도구를 찾을 수 없습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이전에는 jdk1.5에서 HPjmeter를 사용했지만 제대로 작동했지만 이제 jdk1.6에서는 그렇지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 시도 : Java Garbage Collector 용 IBM 패턴 모델링 및 분석 도구-파일을 인식하지 못합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;GCCollector가 작동하지 않고 분석을 위해 파일을 계속 읽습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JProbe Freeware (Eclipse 플러그인)와 같은 프로파일 링 도구를 사용해 보는 것은 어떻습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/541832/know-of-any-java-garbage-collection-log-analysis-tools&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/541832/know-of-any-java-garbage-collection-log-analysis-tools&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5109</guid>
      <comments>https://hot-time.tistory.com/5109#entry5109comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:01:40 +0900</pubDate>
    </item>
    <item>
      <title>web.xml에서 HttpSession을 끌 수 있습니까?</title>
      <link>https://hot-time.tistory.com/5108</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;web.xml에서 HttpSession을 끌 수 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;HttpSession을 완전히 제거하고 싶습니다. web.xml에서이 작업을 수행 할 수 있습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 그것을 할 수있는 컨테이너 특정 방법이 있다고 확신합니다 (Google 검색을 할 때 검색 결과를 복잡하게 만드는 것입니다).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추신 이것은 나쁜 생각입니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;실제로 필요할 때까지 완전히 비활성화하는 것을 선호합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;blockquote&gt; 
 &lt;p&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;HttpSession을 완전히 제거하고 싶습니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;완전히 비활성화 할 수는 없습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;당신이해야 할 모든 단지입니다 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 의해 하나 그것의 핸들을 얻기 위해 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;request.getSession()&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;request.getSession(true)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;어디서든 웹 어플리케이션의 코드에 있는지 JSP를 암시 적으로 설정하여 해당하지 않는 만들기 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&amp;lt;%@page session=&quot;false&quot;%&amp;gt;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;주요 관심사가 실제로에서 사용 된 쿠키를 비활성화하는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;HttpSession&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;것이라면 Java EE 5 / Servlet 2.5에서는 서버 별 웹 애플리케이션 구성에서만 그렇게 할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어, 당신은 설정할 수 있습니다 바람둥이 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;cookies&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 속성 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;false&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&amp;lt;Context&amp;gt;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요소입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;Context cookies=&quot;false&quot;&amp;gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한이 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://tomcat.apache.org/tomcat-6.0-doc/config/context.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Tomcat 관련 문서를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 참조하십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이런 식으로 세션은 URL 재 작성되지 않은 후속 요청에서 유지되지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;결국, 당신이 필요하지 않은 경우, &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;단지&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 모두에서 유지 /가 작성되지 않습니다 다음, 그것을 잡아하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 이미 Java EE 6 / Servlet 3.0 이상을 사용 중이고을 통해 실제로 수행하려는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;web.xml&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;경우 다음 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;과 같이 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&amp;lt;cookie-config&amp;gt;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요소를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;web.xml&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하여 최대 연령을 제로 아웃 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;session-config&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;session-timeout&amp;gt;1&amp;lt;/session-timeout&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;cookie-config&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;max-age&amp;gt;0&amp;lt;/max-age&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/cookie-config&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/session-config&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그 때문에 당신이 당신의 웹 어플리케이션에 하드 코드 원하는 경우 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;getSession()&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다시 발생하지 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;HttpSession&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(또는이 &quot;비어&quot; &lt;/font&gt;&lt;/font&gt;&lt;code&gt;HttpSession&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;), 당신은에 필터 청취을 만들어야 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;url-pattern&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;의 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;/*&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 것은 대체 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;HttpServletRequest&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequestWrapper.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;HttpServletRequestWrapper&lt;/code&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;구현하는 모든 수익률 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;getSession()&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;방법 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;null&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 또는 더미 사용자 정의 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;HttpSession&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아무것도하지 않거나 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;UnsupportedOperationException&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Override&lt;font&gt;&lt;/font&gt;
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {&lt;font&gt;&lt;/font&gt;
    chain.doFilter(new HttpServletRequestWrapper((HttpServletRequest) request) {&lt;font&gt;&lt;/font&gt;
        @Override&lt;font&gt;&lt;/font&gt;
        public HttpSession getSession() {&lt;font&gt;&lt;/font&gt;
            return null;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        @Override&lt;font&gt;&lt;/font&gt;
        public HttpSession getSession(boolean create) {&lt;font&gt;&lt;/font&gt;
            return null;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }, response);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;hr&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추신 이것은 나쁜 생각입니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;실제로 필요할 때까지 완전히 비활성화하는 것을 선호합니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필요하지 않으면 사용하지 마십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그게 다야. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정말 :)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;상태 비 저장 고부하 애플리케이션을 빌드하는 경우 다음과 같이 세션 추적을 위해 쿠키 사용을 비활성화 할 수 있습니다 (비침 입적, 아마도 컨테이너에 구애받지 않음).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;session-config&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;tracking-mode&amp;gt;URL&amp;lt;/tracking-mode&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/session-config&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 아키텍처 결정을 적용하려면 다음과 같이 작성하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public class PreventSessionListener implements HttpSessionListener {&lt;font&gt;&lt;/font&gt;
@Override&lt;font&gt;&lt;/font&gt;
public void sessionCreated(HttpSessionEvent se) {&lt;font&gt;&lt;/font&gt;
    throw new IllegalStateException(&quot;Session use is forbidden&quot;);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
@Override&lt;font&gt;&lt;/font&gt;
public void sessionDestroyed(HttpSessionEvent se) {&lt;font&gt;&lt;/font&gt;
    throw new IllegalStateException(&quot;Session use is forbidden&quot;);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그리고 그것을 web.xml에 추가하고 예외로 실패한 곳을 수정하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;listener&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;listener-class&amp;gt;com.ideas.bucketlist.web.PreventSessionListener&amp;lt;/listener-class&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/listener&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;RESTful 앱에 대해 다음 방법을 사용하여 의도하지 않은 세션 쿠키가 생성 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;되고&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;되지 않도록 제거합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;session-config&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;session-timeout&amp;gt;1&amp;lt;/session-timeout&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;cookie-config&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;max-age&amp;gt;0&amp;lt;/max-age&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/cookie-config&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/session-config&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 이것은 HttpSession을 완전히 끄지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;세션이 1 분 안에 사라지고 악성 클라이언트가 쿠키에 대한 max-age 요청을 무시하더라도 응용 프로그램에서 부주의하게 세션을 생성 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;The advantage of this approach is you don't need to change your application, just &lt;code&gt;web.xml&lt;/code&gt;. I would recommend you create an &lt;code&gt;HttpSessionListener&lt;/code&gt; that will log when a session is created or destroyed so you can track when it occurs.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;In Spring Security 3 with Java Config, you can use HttpSecurity.sessionManagement():&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Override&lt;font&gt;&lt;/font&gt;
protected void configure(final HttpSecurity http) throws Exception {&lt;font&gt;&lt;/font&gt;
    http&lt;font&gt;&lt;/font&gt;
        .sessionManagement()&lt;font&gt;&lt;/font&gt;
            .sessionCreationPolicy(SessionCreationPolicy.STATELESS);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Xml looks like this;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;http create-session=&quot;stateless&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;!-- config --&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/http&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;By the way, the difference between NEVER and STATELESS&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;NEVER:Spring Security will never create an HttpSession, but will use the HttpSession if it already exists&lt;/p&gt; 
 &lt;p&gt;STATELESS:Spring Security will never create an HttpSession and it will never use it to obtain the SecurityContext&lt;/p&gt; 
&lt;/blockquote&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Rather than disabling you can rewrite the URL using a URL rewrite filter eg &lt;a href=&quot;http://tuckey.org/urlrewrite/&quot; rel=&quot;nofollow noreferrer&quot;&gt;tuckey rewrite filter&lt;/a&gt;. This will give Google friendly results but still allow cookie based session handling.&lt;/p&gt; 
&lt;p&gt;However, you should probably disable it for all responses as it's worse than just search engine unfriendly. It exposes the session ID which can be used for &lt;a href=&quot;http://randomcoder.com/articles/jsessionid-considered-harmful&quot; rel=&quot;nofollow noreferrer&quot;&gt;certain security exploits&lt;/a&gt;.&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;http://urlrewritefilter.googlecode.com/svn/trunk/src/doc/manual/3.2/guide.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Example config&lt;/a&gt; for Tuckey filter:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;outbound-rule encodefirst=&quot;true&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;name&amp;gt;Strip URL Session ID's&amp;lt;/name&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;from&amp;gt;^(.*?)(?:\;jsessionid=[^\?#]*)?(\?[^#]*)?(#.*)?$&amp;lt;/from&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;to&amp;gt;$1$2$3&amp;lt;/to&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/outbound-rule&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;blockquote&gt; 
 &lt;p&gt;I would like to eliminate the HttpSession completely - can I do this in web.xml? I'm sure there are container specific ways to do it&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;I don't think so. Disabling the &lt;code&gt;HttpSession&lt;/code&gt; would be a violation of the Servlet spec which states that &lt;code&gt;HttpServletRequest#getSession&lt;/code&gt; should return a session or create one. So I wouldn't expect a Java EE container to provide such a configuration option (that would make it non compliant).&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;Is this a bad idea? I prefer to completely disable things until I actually need them.&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;Well, I don't really get the point, just don't put anything in the session if you don't want to use it. Now, if you really want to prevent the use of the session, you can use a &lt;code&gt;Filter&lt;/code&gt; to replace the request with a implementation of &lt;code&gt;HttpServletRequestWrapper&lt;/code&gt; overriding &lt;code&gt;getSession()&lt;/code&gt;. But I wouldn't waste time implementing this :)&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; My initial suggestion was not optimal, the &quot;right&quot; (&lt;em&gt;cough&lt;/em&gt;) way would be to replace the request.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;As of Servlet 3.0, you can make it so sessions are not tracked by the servlet container in any way, by adding code like this to the &lt;code&gt;contextInitialized&lt;/code&gt; method of a &lt;code&gt;ServletContextListener&lt;/code&gt;:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;servletContext.setSessionTrackingModes(Collections.emptySet());
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;a href=&quot;https://docs.oracle.com/javaee/6/api/javax/servlet/ServletContext.html#setSessionTrackingModes(java.util.Set)&quot; rel=&quot;nofollow noreferrer&quot;&gt;Javadoc.&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;For RESTful application, I simply invalidate it every time the request's lifecycle ends. There may be some web server that always creates new session when new client access whether you call &lt;code&gt;request.getSession()&lt;/code&gt; or not.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;One cannot avoid the session creation. But you can check if you violate your own requirement at the end of a request cycle. So, create a simple servlet filter, which you place as first and after chain.doFilter throw an exception if a session was created:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;chain.doFilter(request, response);&lt;font&gt;&lt;/font&gt;
if(request.getSession(false) != null)&lt;font&gt;&lt;/font&gt;
    throw new RuntimeException(&quot;Somewhere request.getSession() was called&quot;);&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/2255814/can-i-turn-off-the-httpsession-in-web-xml&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/2255814/can-i-turn-off-the-httpsession-in-web-xml&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5108</guid>
      <comments>https://hot-time.tistory.com/5108#entry5108comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:01:31 +0900</pubDate>
    </item>
    <item>
      <title>Asp.net MVC 페이지가 이미지 파일에 대한 Mime 유형 경고를 제공합니다.</title>
      <link>https://hot-time.tistory.com/5107</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Asp.net MVC 페이지가 이미지 파일에 대한 Mime 유형 경고를 제공합니다.&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이로 인해 영향을받는 기능적 또는 jquery UI 요소가 표시되지 않지만 asp.net mvc 웹 페이지에 액세스 할 때 크롬 개발자 콘솔에 다음과 같은 오류 메시지가 기록됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자원은 이미지로 해석되지만 MIME 유형 application / octet-stream으로 전송됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 경고는 jquery UI 이미지에 대한 것입니다 (사용자 지정 이미지가 없기 때문에 jquery UI 만 있는지 알 수 없습니다). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 jquery 이미지는 여전히 올바르게로드됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;왜 이런 일이 일어나는지에 대한 통찰력이 있습니까? &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Visual Studio의 기본 제공 웹 서버에서 사이트를 실행하고 있습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;분명히 해당 환경에서 MIME 유형을 많이 제어 할 수 없습니다 ( &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://forums.asp.net/p/1230087/2217745.aspx&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;this&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 참조 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 똑같은 행동을 보았고 마침내 IIS에서 호스팅되는 응용 프로그램을 보지 않는다는 것을 깨닫기 전에 그것에 대해 스트레스를 받기 시작했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/2925888/asp-net-mvc-page-is-giving-mime-type-warnings-for-image-files&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/2925888/asp-net-mvc-page-is-giving-mime-type-warnings-for-image-files&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5107</guid>
      <comments>https://hot-time.tistory.com/5107#entry5107comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:01:21 +0900</pubDate>
    </item>
    <item>
      <title>Razor actionlink 자동 생성? length = 7 in URL?</title>
      <link>https://hot-time.tistory.com/5106</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Razor actionlink 자동 생성? length = 7 in URL?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;면도기 페이지에 아래 링크가 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Html.ActionLink(&quot;Create New Profile&quot;, &quot;Create&quot;, &quot;Profile&quot;, new { @class=&quot;toplink&quot; })
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아래와 같이보기 페이지의 소스에 나타납니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;/admin/profile/create?length=7&quot; class=&quot;toplink&quot;&amp;gt;Create New Profile&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;링크를 클릭하면 URL은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;http://localhost:54876/admin/profile/create?length=7
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 원하지 않는다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;?length=7&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 자동 생성 이유는 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;ActionLink&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;재정의 당신은에 일치 사용 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd492124(v=VS.90).aspx&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(문자열 링크 텍스트 문자열 actionName, 개체 routeValues 개체 htmlAttributes)&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 재정의합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;따라서 &quot;Profile&quot;값이 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;routeValues&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;매개 변수 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 전달됩니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 매개 변수와 관련하여이 함수의 동작은 모든 공용 속성을 가져 와서 링크를 생성하는 데 사용되는 경로 값 목록에 추가하는 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;String에는 하나의 공용 속성 (Length) 만 있으므로 &quot;length = 7&quot;이됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용하려는 올바른 오버로드는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd504972(v=VS.90).aspx&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(string linkText, string actionName, string controllerName, Object routeValues, Object htmlAttributes)&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 이며 다음과 &lt;/font&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/dd504972(v=VS.90).aspx&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;같이&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; loke라고 부릅니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Html.ActionLink(&quot;Create New Profile&quot;, &quot;Create&quot;, &quot;Profile&quot;, new {}, new { @class=&quot;toplink&quot;})
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정확한 원인은 모르겠지만 다음과 같이 변경합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Html.ActionLink(&quot;Create New Profile&quot;, &quot;Create&quot;, &quot;Profile&quot;, new {}, new { @class=&quot;toplink&quot; })
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막 매개 변수 ( &lt;/font&gt;&lt;/font&gt;&lt;code&gt;htmlattributes&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추가 된 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;매개 변수)를 생략 할 때 어떤 오버로드 MVC가 선택하는지 모르겠지만 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 수정 될 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;언젠가는 정확히 무슨 일이 일어나고 있는지 조사하고 알아낼 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;주의해야 할 또 다른 사항은에서 컨트롤러를 정의하고 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;@ActionLink&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있으므로 수행 할 필요가 없을 수 있습니다. 예를 들어 &quot;Create New Profile&quot; &lt;/font&gt;&lt;/font&gt;&lt;code&gt;@ActionLink&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 표시되는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;뷰는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;/admin/profile/index.cshtml&quot;일 수 있습니다. 목록이 경우, 프로파일을 기존의 것을 볼 수, 당신은에서 컨트롤러를 정의 할 필요가 없습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;@ActionLink&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(가)로 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;@ActionLink&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이미 상대적입니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;ProfileController&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;당신이 있도록, &lt;/font&gt;&lt;/font&gt;&lt;code&gt;@ActionLink&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Html.ActionLink(&quot;Create New Profile&quot;, &quot;Create&quot;, null, new { @class=&quot;toplink&quot; })
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;표시된 답변 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;null&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대신 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;했지만 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;new{}&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것이 더 적절하다고 생각합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ActionLink 오버로드는 지금까지 가장 간단한 것이 아닙니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/4357856/razor-actionlink-autogenerating-length-7-in-url&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/4357856/razor-actionlink-autogenerating-length-7-in-url&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5106</guid>
      <comments>https://hot-time.tistory.com/5106#entry5106comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:01:14 +0900</pubDate>
    </item>
    <item>
      <title>정규식, 여러 줄을 일치시키는 방법?</title>
      <link>https://hot-time.tistory.com/5105</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정규식, 여러 줄을 일치시키는 방법?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;From&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에서 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Subject&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;줄 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;끝까지 줄 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;을 일치 시키려고합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;....&lt;font&gt;&lt;/font&gt;
From: XXXXXX &lt;font&gt;&lt;/font&gt;
Date: Tue, 8 Mar 2011 10:52:42 -0800 &lt;font&gt;&lt;/font&gt;
To: XXXXXXX&lt;font&gt;&lt;/font&gt;
Subject: XXXXXXX&lt;font&gt;&lt;/font&gt;
....&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;지금까지 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;/From:.*Date:.*To:.*Subject/m
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 그것은 제목 줄의 끝과 일치하지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추가를 시도 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;$&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;했지만 효과가 없었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;/m&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수정자를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용하여 여러 줄 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모드를 활성화 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;할 수 있으며 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(예 : 줄 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;.&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;바꿈 일치 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;허용) &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;을 사용 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;?&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하여 비 탐욕 일치를 수행 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;message = &amp;lt;&amp;lt;-MSG&lt;font&gt;&lt;/font&gt;
Random Line 1&lt;font&gt;&lt;/font&gt;
Random Line 2&lt;font&gt;&lt;/font&gt;
From: person@example.com&lt;font&gt;&lt;/font&gt;
Date: 01-01-2011&lt;font&gt;&lt;/font&gt;
To: friend@example.com&lt;font&gt;&lt;/font&gt;
Subject: This is the subject line&lt;font&gt;&lt;/font&gt;
Random Line 3&lt;font&gt;&lt;/font&gt;
Random Line 4&lt;font&gt;&lt;/font&gt;
MSG&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
message.match(/(From:.*Subject.*?)\n/m)[1]&lt;font&gt;&lt;/font&gt;
=&amp;gt; &quot;From: person@example.com\nDate: 01-01-2011\nTo: friend@example.com\nSubject: This is the subject line&quot;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;http://ruby-doc.org/core/Regexp.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://ruby-doc.org/core/Regexp.html을&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 참조 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 &quot;multiline mode&quot;와 &quot;greedy by default&quot;를 검색하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;루비를 사용하는 경우 다음을 시도해 볼 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;Regexp.new(&quot;some reg&quot;, Regexp::MULTILINE)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;루비를 사용하지 않는 경우 다음 질문을 해킹하는 것이 좋습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 &quot;\ n&quot;을 SOME_SPECIAL_TOKEN으로 바꿉니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정규 표현식을 검색하고 다른 작업을 수행하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;복원 : SOME_SPECIAL_TOKEN을 &quot;\ n&quot;으로 바꿉니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ol&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;줄 바꿈을 일치 시키려면 먼저 모든 줄 바꿈 문자를 텍스트에 표시되지 않는 다른 문자 (또는 문자 시퀀스)로 대체하는 것이 좋습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어, 하나의 문자열 변수에 모든 텍스트가 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;aString.split(&quot;\n&quot;).join(&quot;|&quot;)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있는 경우 문자열의 모든 줄 바꿈을 파이프 문자로 바꾸는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;것과 같은 작업을 수행 할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정규 표현식에서 개행 문자를 일치시키는 방법에 관한 이전 질문에 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/4975459/regex-matching-again-multiple-lines/4976197#4976197&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대한 Alan Moore의 답변&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 을 참조하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;hr&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;시험:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;/...^Subject:[^\n]*/m
&lt;/code&gt;&lt;/pre&gt; 
&lt;hr&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 데이터 사용 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;From: XXXXXX&lt;font&gt;&lt;/font&gt;
Date: Tue, 8 Mar 2011 10:52:42 -0800&lt;font&gt;&lt;/font&gt;
To: XXXXXXX&lt;font&gt;&lt;/font&gt;
Subject: XXXXXXX&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 정규식이 마법을 수행합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;From:([^\r\n]+)[\r\n]+Date:([^\r\n]+)[\r\n]+To:([^\r\n]+)[\r\n]+Subject:([^\r\n]+)[\r\n]+
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;But I would recommend that you don't try and do this in 1 regex. Push into a regex &quot;^(\w+):(.+)$&quot; line by line, unless you are sure that the sequence of the FROM/DATE/TO/SUBJECT is not going to change ;)&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/5239997/regex-how-to-match-multiple-lines&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/5239997/regex-how-to-match-multiple-lines&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5105</guid>
      <comments>https://hot-time.tistory.com/5105#entry5105comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:01:06 +0900</pubDate>
    </item>
    <item>
      <title>열거 형에 패키지 전용 생성자가있는 이유는 무엇입니까?</title>
      <link>https://hot-time.tistory.com/5104</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;열거 형에 패키지 전용 생성자가있는 이유는 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;열거 형 생성자는 상수에 의해서만 호출 될 수 있기 때문에 왜 패키지 전용이 될 수 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;생성자는 실제로 패키지 전용 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 아닙니다. 키워드를 추가하지 않더라도 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;private&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;인터페이스 메서드가 암시 적으로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;암시 적으로 사용 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;되는 방식 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;public&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JLS ( &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html#jls-8.8.3&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;§8.8.3&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; ) &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;의 관련 섹션은 다음과 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;같이 설명합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일반 클래스의 생성자에 대한 액세스 수정자가 지정되지 않은 경우 생성자는 기본 액세스 권한을 갖습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;열거 형 유형의 생성자에 대한 액세스 수정자가 지정되지 않은 경우 생성자는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;private&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;enum 형식 (§8.9)의 생성자가 선언 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;public&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;되거나 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;protected&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 언어의 특징입니다. 열거 형 생성자는 암시 적으로 비공개입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;흥미롭게도 다음과 같이 패키지 표시 열거 형 생성자를 선언하면 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public enum MyEnum {&lt;font&gt;&lt;/font&gt;
    A(0),&lt;font&gt;&lt;/font&gt;
    B(1);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private final int i;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    MyEnum(int i) {&lt;font&gt;&lt;/font&gt;
        this.i = i;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public int getI() {&lt;font&gt;&lt;/font&gt;
        return i;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;패키지의 다른 클래스에서 참조 할 수 없습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;시도하면 컴파일러 오류가 발생합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;MyEnum 유형을 인스턴스화 할 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/7747948/why-can-a-enum-have-a-package-private-constructor&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/7747948/why-can-a-enum-have-a-package-private-constructor&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5104</guid>
      <comments>https://hot-time.tistory.com/5104#entry5104comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:00:57 +0900</pubDate>
    </item>
    <item>
      <title>프록시 함수를 통해 console.log에 첫 번째 클래스 인수로 인수 전달</title>
      <link>https://hot-time.tistory.com/5103</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프록시 함수를 통해 console.log에 첫 번째 클래스 인수로 인수 전달&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;code&gt;console.log&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 지정되지 않은 수의 인수를 취하고 해당 내용을 한 줄에 덤프합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;console.log&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그 동작을 유지하기 위해 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;직접 전달 된 인수를 전달하는 함수를 작성할 수있는 방법이 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들면 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;function log(){&lt;font&gt;&lt;/font&gt;
    if(console){&lt;font&gt;&lt;/font&gt;
        /* code here */&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 다음과 같지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;function log(){&lt;font&gt;&lt;/font&gt;
    if(console){&lt;font&gt;&lt;/font&gt;
        console.log(arguments);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;arguments&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;는 배열 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이므로 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;console.log&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;해당 배열의 내용을 덤프합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 다음과 동일하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;function log(){&lt;font&gt;&lt;/font&gt;
    if(console){&lt;font&gt;&lt;/font&gt;
        for(i=0;i&amp;lt;arguments.length;console.log(arguments[i]),i++);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 것을 다른 줄로 인쇄하기 때문입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요점은 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;console.log&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;의 동작 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;을 유지 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 것이지만 프록시 기능을 통해서 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;log&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;+ ---&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;앞으로 모든 함수에 적용 할 수있는 솔루션을 찾고있었습니다 (인수 처리를 그대로 유지하는 함수에 대한 프록시 만들기). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 그렇게 할 수 없다면 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;console.log&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;구체적인 답변을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수락하겠습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이렇게해야 ..&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;function log() {&lt;font&gt;&lt;/font&gt;
    if(typeof(console) !== 'undefined') {&lt;font&gt;&lt;/font&gt;
        console.log.apply(console, arguments);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;hr&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(그냥 다른 옵션 추가 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;확산&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 연산자와 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/rest_parameters&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나머지&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; - 비록 매개 변수를 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;arguments&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;확산와 직접 사용될 수&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; )&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;function log(...args) {&lt;font&gt;&lt;/font&gt;
    if(typeof(console) !== 'undefined') {&lt;font&gt;&lt;/font&gt;
        console.log(...args);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;유사한 방식으로 console.log를 래핑하는 html5boilerplate 코드에서이를 인식하지 못하는 브라우저를 방해하지 않도록하는 좋은 예가 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 히스토리를 추가하고 console.log 구현의 차이점을 부드럽게합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그것은 Paul Irish에 의해 개발되었고 그는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 그것에 포스트를 썼습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아래에 관련 코드를 붙여 넣었습니다. 여기에 프로젝트의 파일 링크가 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/h5bp/html5-boilerplate/blob/master/js/plugins.js&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://github.com/h5bp/html5-boilerplate/blob/master/js/plugins.js&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;// usage: log('inside coolFunc', this, arguments);&lt;font&gt;&lt;/font&gt;
// paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/&lt;font&gt;&lt;/font&gt;
window.log = function(){&lt;font&gt;&lt;/font&gt;
  log.history = log.history || [];   // store logs to an array for reference&lt;font&gt;&lt;/font&gt;
  log.history.push(arguments);&lt;font&gt;&lt;/font&gt;
  if(this.console) {&lt;font&gt;&lt;/font&gt;
    arguments.callee = arguments.callee.caller;&lt;font&gt;&lt;/font&gt;
    var newarr = [].slice.call(arguments);&lt;font&gt;&lt;/font&gt;
    (typeof console.log === 'object' ? log.apply.call(console.log, console, newarr) : console.log.apply(console, newarr));&lt;font&gt;&lt;/font&gt;
  }&lt;font&gt;&lt;/font&gt;
};&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
// make it safe to use console.log always&lt;font&gt;&lt;/font&gt;
(function(b){function c(){}for(var d=&quot;assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,timeStamp,profile,profileEnd,time,timeEnd,trace,warn&quot;.split(&quot;,&quot;),a;a=d.pop();){b[a]=b[a]||c}}((function(){try {console.log();return window.console;}catch(err){return window.console={};}})());&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;console.log.apply(null,arguments);
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Although, you may need to loop through the arguments object and create a regular array from it, but apart from that that's how you do it.&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/7942323/pass-arguments-to-console-log-as-first-class-arguments-via-proxy-function&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/7942323/pass-arguments-to-console-log-as-first-class-arguments-via-proxy-function&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5103</guid>
      <comments>https://hot-time.tistory.com/5103#entry5103comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:00:49 +0900</pubDate>
    </item>
    <item>
      <title>Android OpenGL 텍스처 압축</title>
      <link>https://hot-time.tistory.com/5102</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Android OpenGL 텍스처 압축&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Android에서 텍스처 압축을 사용하는 방법에 대한 정보 (또는 예)를 찾는 데 도움이 필요합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 지금 많은 PNG를 가지고 있고 그들이 차지하는 메모리 양을 줄여야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PVR 압축을보고 있었지만 OpenGL 내에서 이것을 사용하는 방법을 알 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;어떤 사람은 나를 올바른 방향으로 안내하거나 아무것도 찾을 수 없기 때문에 몇 가지 예를 제시 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Android에서 지원되는 주로 네 가지 텍스처 압축 유형이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ETC1 (Ericsson 텍스처 압축)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 형식은 모든 Android 휴대폰에서 지원됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 알파 채널을 지원하지 않으므로 불투명 텍스처에만 사용할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PVRTC (PowerVR 텍스처 압축)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PowerVR GPU (Nexus S, Kindle fire 등)가있는 장치에서 지원됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ATITC (ATI 텍스처 압축)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Qualcomm (Nexus One 등)의 Adreno GPU가있는 기기에서 사용됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;S3TC (S3 텍스처 압축)&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 텍스처 압축은 NVIDIA 칩셋 통합 장치 (Motorola Xoom 등)에서 사용됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;http://developer.motorola.com/docstools/library/understanding-texture-compression/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 와 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/graphics/opengl.html#textures&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 더 자세한 정보가 &lt;/font&gt;&lt;a href=&quot;http://developer.android.com/guide/topics/graphics/opengl.html#textures&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있습니다&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;즉, 텍스처에 알파가 없으면 ETC1을 사용할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;알파가 있고 모든 장치를 지원하려면 다른 세 가지 유형으로 텍스처를 압축하고 장치에 따라로드해야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용하는 방법:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;png 파일을 &lt;/font&gt;&lt;a href=&quot;http://developer.amd.com/tools/compressonator/Pages/default.aspx&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;압축&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 하고 ( &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;텍스처 유형에 따라 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://devtools.ericsson.com/etc&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ETC-Pack&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.imgtec.com/powervr/insider/powervr-pvrtextool.asp&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PVRTexTool&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://developer.amd.com/tools/compressonator/Pages/default.aspx&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ATI Compressonator&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://developer.nvidia.com/gpu-accelerated-texture-compression&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Nvidia Texure Tools&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 와 같은 도구를 사용할 수 있음 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;) 프로젝트 자산에 추가합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ETC1을 사용하지 않는 경우 장치에서 사용할 수있는 확장을 확인합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;pre&gt;&lt;code&gt;public void onSurfaceCreated(GL10 gl, EGLConfig config) {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
     String s = gl.glGetString(GL10.GL_EXTENSIONS);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
     if (s.contains(&quot;GL_IMG_texture_compression_pvrtc&quot;)){&lt;font&gt;&lt;/font&gt;
          //Use PVR compressed textures         &lt;font&gt;&lt;/font&gt;
     }else if (s.contains(&quot;GL_AMD_compressed_ATC_texture&quot;) ||&lt;font&gt;&lt;/font&gt;
              s.contains(&quot;GL_ATI_texture_compression_atitc&quot;)){&lt;font&gt;&lt;/font&gt;
          //Load ATI Textures           &lt;font&gt;&lt;/font&gt;
     }else if (s.contains(&quot;GL_OES_texture_compression_S3TC&quot;) ||&lt;font&gt;&lt;/font&gt;
                s.contains(&quot;GL_EXT_texture_compression_s3tc&quot;)){&lt;font&gt;&lt;/font&gt;
         //Use DTX Textures&lt;font&gt;&lt;/font&gt;
     }else{&lt;font&gt;&lt;/font&gt;
         //Handle no texture compression founded.               &lt;font&gt;&lt;/font&gt;
     }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
}           &lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;압축 된 텍스처를 원시 데이터로로드합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;glTexImage2D 대신 glCompressedTexImage2D를 사용합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; &lt;pre&gt;&lt;code&gt;public void onDrawFrame(GL10 gl) {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
   ....&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
   gl.glCompressedTexImage2D(GL10.GL_TEXTURE_2D, level, internalformat, width, &lt;font&gt;&lt;/font&gt;
                             height, border, imageSize, data);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt; 
&lt;/ol&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 ol 스레드이므로 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://devtools.ericsson.com/etc&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://devtools.ericsson.com/etc에서&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용할 수있는 정보로 업데이트 할 것이라고 생각했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ETC2는 Khronos 표준 OpenGL ES 3.0 및 OpenGL 4.3에서 필수입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;You should not use just PVR compression on Android, since that will not work with all models. To get around that you should either only use ETC1 (mandated on all GLES 2.0 devices) or have separate texture packs for separate GPU modes. &lt;a href=&quot;http://developer.android.com/reference/android/opengl/ETC1Util.html&quot; rel=&quot;nofollow&quot;&gt;The android dev guide&lt;/a&gt; has a helper class to load the compression format.&lt;/p&gt; 
&lt;p&gt;You can use &lt;a href=&quot;http://devtools.ericsson.com/etc&quot; rel=&quot;nofollow&quot;&gt;etcpack&lt;/a&gt; to do compression.&lt;/p&gt; 
&lt;p&gt;Note that you will not get an alpha channel with ETC1 - you can do some fancy fragment shading tricks to get around that by having the alpha channel as a separate texture.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Just wanted to point out etc1 isn't supported by all android devices, contrary to what &lt;a href=&quot;https://stackoverflow.com/users/973036/gergonzalez&quot;&gt;gergonzalez&lt;/a&gt; said&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;Caution: The ETC1 format is supported by most Android devices, but it not guaranteed to be available. To check if the ETC1 format is supported on a device, call the ETC1Util.isETC1Supported() method.&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;a href=&quot;https://developer.android.com/guide/topics/graphics/opengl.html#textures&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://developer.android.com/guide/topics/graphics/opengl.html#textures&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/9148795/android-opengl-texture-compression&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/9148795/android-opengl-texture-compression&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5102</guid>
      <comments>https://hot-time.tistory.com/5102#entry5102comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:00:40 +0900</pubDate>
    </item>
    <item>
      <title>SAPI 란 무엇이며 언제 사용합니까?</title>
      <link>https://hot-time.tistory.com/5101</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;SAPI 란 무엇이며 언제 사용합니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 최근에 PHP의 오류 처리에 대해 배우고 있으며 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://docs.php.net/manual/en/function.error-log.php&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;error_log()&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;함수를 발견했습니다&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PHP 매뉴얼에서 모든 오류 로그 유형에 대해 이야기하고 있으며 오류 메시지가 SAPI 로깅 처리기로 직접 전송된다는 유형 3을 제외하고 모두 이해합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;제 질문은 SAPI가 정확히 무엇이며 언제 사용하고 싶습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;SAPI는 &quot;서버 API&quot;를 의미합니다 (그리고 API는 &quot;응용 프로그래밍 인터페이스&quot;를 의미 함). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;외부 세계&quot;와 PHP / Zend 엔진 간의 상호 작용을 제어하는 ​​메커니즘입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;따라서 항상 사용하고 싶을 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사실 CLI조차도 SAPI로 간주되기 때문에 많은 노력 없이는 사용을 피할 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;SAPI&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; (Server Application Programming Interface)는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Microsoft의 경우 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ISAPI&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; (Internet Server Application Programming Interface), &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Netscape의 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;경우 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;NSAPI&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; (Netscape Server Application Programming Interface) &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로도 &lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;알려져&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;API&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의미.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 개발자에게는 REST, SOAP와 같은 API를 생각할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;서버에서 데이터를 가져 오는 링크를 호출합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 서버와 상호 작용할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;SAPI는 REST 또는 SOAP와 다르며 SAPI는 서버에 사용되는 API (계약)입니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예 : Common Gateway Interface는 SAPI입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 서버가 CGI를 지원하고 다른 실행 프로그램이이를 구현하면 웹 서버가 웹 페이지를 동적으로 인터페이스하고 생성 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아래 그림을보십시오 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/j6JFL.jpg&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/j6JFL.jpg&quot; alt=&quot;SAPI 아파치 및 PHP&quot;&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mod_php는 아파치와 PHP가 서로 이해할 수있는 인터페이스를 구현합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래서 정확히 SAPI는 무엇인가&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; : 그것은 서버 (모든 종류의 서버)와 프로그램 간의 계약입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;계약을 따르기 만하면 다른 세부 사항을 알 필요가 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에서 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Server_Application_Programming_Interface&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위키 백과&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;즉, SAPI는 실제로 다른 개발자가 웹 서버 기능을 확장 할 수 있도록 웹 서버에서 제공하는 API (응용 프로그래밍 인터페이스)입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어, PHP에는 다른 웹 서버에 대해 SAPI라는 직접 모듈 인터페이스가 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Windows에서 PHP 5 및 Apache 2.0의 경우 php5apache2.dll이라는 DLL 파일 형태로 제공되며, 다른 기능 중에서도 PHP와 웹 서버 간의 인터페이스를 제공하는 모듈로 다음과 같은 형태로 구현됩니다. 서버가 이해합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 양식을 SAPI라고합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다양한 웹 서버 확장을위한 다양한 종류의 SAPI가 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 PHP 언어에 대한 또 다른 두 가지 SAPI는 CGI (Common Gateway Interface)와 CLI (명령 줄 인터페이스)입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PHP에서 사용 가능한 SAPI는 Apache2 (mod_php), FPM, CGI, FastCGI 및 CLI입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;API가 서버에서 실행되는 경우에는 SAPI라고 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;FPM (FastCGI Process Manager)은로드가 많은 사이트에 유용한 몇 가지 추가 기능 (주로)을 포함하여 PHP FastCGI 구현에 매우 가깝습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;오늘날 속도와 효율성의 관점에서 FPM은 가장 발전된 SAPI가 될 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Apache 또는 Nginx는 언급 된 다른 SAPI와 비교하여 더 나은 성능을 발휘합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/9948008/what-is-sapi-and-when-would-you-use-it&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/9948008/what-is-sapi-and-when-would-you-use-it&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5101</guid>
      <comments>https://hot-time.tistory.com/5101#entry5101comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:00:32 +0900</pubDate>
    </item>
    <item>
      <title>CSS 재정의 규칙 및 특이성</title>
      <link>https://hot-time.tistory.com/5100</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;CSS 재정의 규칙 및 특이성&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;저는 종종 CSS 재정의 규칙에 혼란스러워합니다. 일반적으로 좀 더 구체적인 스타일 시트가 덜 구체적인 스타일 시트를 재정의하고 그 특이성은 지정된 선택자 수에 따라 결정된다는 것을 알고 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;!important&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;역할을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;키워드 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;도 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에 간단한 예가 있습니다. 두 개의 테이블 셀이있는 테이블이 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;테이블 자체에는 테이블 내의 모든 셀에 적용되는 CSS 규칙이 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 두 번째 테이블 셀에는 일반 테이블 규칙을 재정의해야하는 자체 규칙이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;html&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;head&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;style type = &quot;text/css&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
table.rule1 tr td {&lt;font&gt;&lt;/font&gt;
    background-color: #ff0000;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
td.rule2 {&lt;font&gt;&lt;/font&gt;
    background-color: #ffff00;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&amp;lt;/style&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&amp;lt;/head&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;body&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;table class = &quot;rule1&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;tr&amp;gt;&lt;font&gt;&lt;/font&gt;
            &amp;lt;td&amp;gt;abc&amp;lt;/td&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;/tr&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;tr&amp;gt;&lt;font&gt;&lt;/font&gt;
            &amp;lt;td class = &quot;rule2&quot;&amp;gt;abc&amp;lt;/td&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;/tr&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/table&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/body&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/html&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 브라우저에서 열면하지만 ..., 그보고 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;rule2&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;무시하지 않습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;rule1&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;좋아-그래서 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;rule2&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;좀 더 &quot;구체적으로&quot; &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;만들어야한다고 생각 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지만, 특정 테이블 셀에 적용하고 싶기 때문에 더 이상 선택자를 정의 할 수 없습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래서 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;! important&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;키워드를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;넣어 보았지만 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;작동하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;rule2&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;텍스트 노드를 다음 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&amp;lt;div&amp;gt;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;과 같이 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;래핑하면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;재정의 할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;        &amp;lt;td class = &quot;rule2&quot;&amp;gt;&amp;lt;div&amp;gt;abc&amp;lt;/div&amp;gt;&amp;lt;/td&amp;gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;... 그리고 CSS 규칙을 더 구체적으로 만드십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;td.rule2 div {&lt;font&gt;&lt;/font&gt;
    background-color: #ffff00; !important&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 작동하지만 정확히 내가 원하는 것은 아닙니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우선 규칙을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;DIV가 아닌 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;테이블 셀&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 적용하고 싶습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;rule1&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;div 주변의 테두리로의 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배경색을 여전히 볼 수 있기 때문에 차이가 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그렇다면 CSS &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요소 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;rule2&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 무시 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 싶다고 알리려면 어떻게해야 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니까?&lt;/font&gt;&lt;/font&gt;&lt;code&gt;rule1&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;td&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 번째 규칙에 더 높은 특이성을 부여하려면 항상 첫 번째 규칙의 일부를 사용할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 경우 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;table.rule1 tr&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;규칙 1에서 추가하고 규칙 2에 추가합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;table.rule1 tr td {&lt;font&gt;&lt;/font&gt;
    background-color: #ff0000;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
table.rule1 tr td.rule2 {&lt;font&gt;&lt;/font&gt;
    background-color: #ffff00;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;잠시 후 나는 이것이 자연스러워지는 것을 알지만 어떤 사람들은 동의하지 않는다는 것을 압니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 사람들에게는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://lesscss.org/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;LESS&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 또는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://sass-lang.com/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;SASS를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 살펴 보는 것이 좋습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;특이성은 규칙의 ID, 클래스 및 태그 선택기의 양을 기반으로 계산됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Id는 가장 높은 특이성을 가지고 있으며, 클래스, 태그 순입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 번째 규칙에는 모두 클래스 선택기가 있지만 첫 번째 규칙에는 두 개의 태그 선택기가 있으므로 이제 첫 번째 규칙이 두 번째 규칙보다 더 구체적입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;To make the second one override the first one, you can make more specific by adding information of it's parents:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;table.rule1 tr td.rule2 {&lt;font&gt;&lt;/font&gt;
    background-color: #ffff00;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;a href=&quot;http://www.vanseodesign.com/css/css-specificity-inheritance-cascaade/&quot; rel=&quot;noreferrer&quot;&gt;Here&lt;/a&gt; is a nice article for more information on selector precedence.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;The important needs to be inside the ;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;td.rule2 div {     background-color: #ffff00 !important; } 
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;in fact i believe this should override it&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;td.rule2 { background-color: #ffff00 !important; } 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/11263488/css-override-rules-and-specificity&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/11263488/css-override-rules-and-specificity&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5100</guid>
      <comments>https://hot-time.tistory.com/5100#entry5100comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:00:23 +0900</pubDate>
    </item>
    <item>
      <title>Windows에 npm (Node.js 패키지 관리자) 설치 (Node.js MSI를 사용하지 않음)</title>
      <link>https://hot-time.tistory.com/5099</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Windows에 npm (Node.js 패키지 관리자) 설치 (Node.js MSI를 사용하지 않음)&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문제 : &lt;/font&gt;&lt;/font&gt;&lt;code&gt;nvm&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Node.js를 설치 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 동안 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필요한 Node.js 버전을 설치할 수 있었지만 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자동으로 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;nvm&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설치되지는 않습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;npm&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;NPM 페이지는 설치에 대한 정보를 제공하지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나 자신이 Windows 사용자가 아니기 때문에 완전히 헤매고 있습니다 ...&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Google의 모든 결과는 Node.js MSI 설치 프로그램을 사용하여 작동하는 것으로 보입니다. 이것은 제 경우에는 옵션이 아닙니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래서 어떻게합니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Windows에 npm을 설치하려면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;노드가 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있는 npm &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://nodejs.org/dist/npm/&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아카이브의&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 압축을 풉니 다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자세한 내용은 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/isaacs/npm#fancy-windows-install&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문서&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조하십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;npm은 노드와 함께 제공되므로 설치해야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;nvm은 노드 버전 변경 전용이며 npm을 설치하지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;npm 및 nvm을 사용하는 더 깨끗한 방법은 먼저 노드를있는 그대로 (npm 사용) 설치 한 다음 다음을 수행하여 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://npmjs.org/package/nvm&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;nvm&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 패키지 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 설치하는 &lt;/font&gt;&lt;a href=&quot;https://npmjs.org/package/nvm&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;것입니다.&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;code&gt;npm install nvm&lt;/code&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;a href=&quot;https://nodejs.org/download/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://nodejs.org/download/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 페이지에는 Windows Installer (.msi)와 기타 설치 프로그램 및 바이너리가 있습니다. Windows 용 다운로드 및 설치.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Node.js는 NPM과 함께 제공됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;NPM은 Node.js가 설치된 디렉토리에 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 꽤 @Eyuel 방법을 사용했습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://nodejs.org/en/#download&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://nodejs.org/en/#download&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 nodejs msi를 다운로드합니다.&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://nodejs.org/en/#download&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;github &lt;/font&gt;&lt;a href=&quot;https://github.com/npm/npm&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://github.com/npm/npm&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 npm zip 다운로드&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/npm/npm&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;node&quot;디렉토리에서 msi (7 Zip 포함)를 추출합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;node&quot;디렉토리를 추가하려면 PATH 환경 변수를 설정하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 디렉토리 (노드 디렉토리 아님)의 npm에서 zip 파일을 추출하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;npm 디렉토리에 CD를 넣고 명령을 실행합니다. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;node cli.js install npm -gf&lt;/code&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 노드 + NPM 작업을해야 사용이 논문 명령은 확인 : &lt;/font&gt;&lt;/font&gt;&lt;code&gt;node --version&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;및&lt;/font&gt;&lt;/font&gt;&lt;code&gt;npm --version&lt;/code&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;업데이트 27/07/2017&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; : 최신 버전의 npm을 사용하는 노드 8.2.1의 최신 버전이이 답변 당시 사용했던 것과 상당히 다르다는 것을 알았습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 버전으로 설치하면 작동하지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;노드 6.11.1 및 npm 5.2.3에서 작동합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 프록시로 실행하는 경우 인터넷에 연결하는 것을 잊지 마십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내보내기 http_proxy = &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://proxy:8080&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http : // proxy : 8080&lt;/font&gt;&lt;/font&gt;&lt;/a&gt; &lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내보내기 https_proxy = &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://proxy:8080&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http : // proxy : 8080&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;npm 구성 설정 프록시 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://proxy:8080&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http : // proxy : 8080&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 Windows에 npm을 설치해야했고 Chocolatey pacakage 관리자를 통해 가져 왔습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;들어 본 적이없는 사람들을 위해 Chocolatey는 Windows 용 패키지 관리자로, Windows 환경에서 편리하게 사용할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다운로드 및 설치를위한 PowerShell 스크립트가있는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://chocolatey.org/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://chocolatey.org/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이동 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그 후에 다음을 실행할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;chocolatey install npm
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그리고 당신은 갈 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;독립형 npm은 더 이상 업데이트되지 않으며 최신 버전은 Windows에서 문제가있는 것으로 알려져 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;살펴볼 수있는 또 다른 옵션은 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://chocolatey.org/packages/lessmsi&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;LessMSI를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하여 MSI에서 npm을 추출하는 &lt;/font&gt;&lt;a href=&quot;https://chocolatey.org/packages/lessmsi&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;것&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Windows CMD를 사용하여 node (nodejs)가 설치된 첫 번째 CD, 다음 단계를 따르십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;C:...\node&amp;gt; git config --system http.sslcainfo /bin/curl-ca-bundle.crt&lt;font&gt;&lt;/font&gt;
C:...\node&amp;gt; git clone --recursive git://github.com/isaacs/npm.git&lt;font&gt;&lt;/font&gt;
C:...\node&amp;gt; cd node=modules\npm&lt;font&gt;&lt;/font&gt;
C:...\node=modules\npm&amp;gt; node cli.js install npm -gf&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;http://nodejs.org/dist/&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://nodejs.org/dist/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 &quot;node.exe&quot;를 다운로드하고 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;좋아하는 &quot;node.js&quot;버전을 선택하거나 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://nodejs.org/dist/latest/&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;최신&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;x64&quot;하위 디렉토리에서 64 비트 버전을 가져올 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://nodejs.org/dist/npm/&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://nodejs.org/dist/npm/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 으로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이동 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하여 좋아하는 &quot;npm&quot;버전의 Zip 아카이브를 검색합니다 (권장 :) &lt;/font&gt;&lt;/font&gt;&lt;code&gt;1.4.10&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;node.exe&quot;를 따라 아카이브를 추출하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 편의를 위해 &quot;node.js&quot;디렉토리를 PATH에 추가하는 것이 좋습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;편집 : &lt;/font&gt;&lt;/font&gt;&lt;code&gt;npm install npm -g&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;nodejs.org에서 제공하는 버전이 매우 오래 되었기 때문에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;npm을 업데이트 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 것이 좋습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원래 npm 버전을 유지하려면 npm을 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&quot;node.exe&quot;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;디렉토리를 만들고 동일한 명령을 &quot;global&quot;플래그와 함께 사용한 다음 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;.\node_modules\.bin\npm.cmd&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새 디렉토리에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;복사 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;mkdir c:\app\npm\_latest&lt;font&gt;&lt;/font&gt;
cd c:\app\npm\_latest&lt;font&gt;&lt;/font&gt;
&amp;lt;NPM_ORIGINAL_PATH&amp;gt;\npm install npm&lt;font&gt;&lt;/font&gt;
cp node_modules\.bin\npm.cmd npm.cmd&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 사용할 경로를 변경하십시오. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;c:\app\npm\_latest&lt;/code&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;최근에 다양한 버전의 노드 및 npm 관리를 처리하는 간단한 앱을 작성했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 버전의 노드와 npm을 선택하여 다운로드하고 사용할 버전을 선택할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그것을 확인하고 그것이 유용한 지 확인하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://github.com/nhatkthanh/wnm&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://github.com/nhatkthanh/wnm&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Window-&amp;gt; Preferences-&amp;gt; Nodeclipse로 이동하여 &quot;find node on PATH ...&quot;상자를 선택 취소하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 아래의 &quot;Node.js 경로&quot;가 node.exe 파일의 위치로 설정되어 있는지 확인합니다 (저는 C : \ Program Files (x86) \ nodejs \ node.exe).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;최신 Node.js MSI (4.x 또는 5.x) 설치 프로그램을 다운로드하고 명령 줄을 통해 다음을 실행합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;msiexec /a node-v4.4.3-x64.msi /qb TARGETDIR=&quot;C:\Node.js&quot;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;바이너리를 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;C:\Node.js\nodejs&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;C:\Node.js\nodejs&lt;/code&gt; &lt;code&gt;PATH&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;환경 변수 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 추가하고 싶을 것 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;NPM을 업데이트하려면 다음을 수행하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;cd C:\Node.js\nodejs&lt;font&gt;&lt;/font&gt;
npm install npm@latest&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;완료되면 버전을 확인할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;node --version&lt;font&gt;&lt;/font&gt;
npm --version&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;노드는 4.4.3+ (설치 한 항목) 여야하며 npm은 3.8.7+ 여야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;h1&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요약 : Chocolatey, Node (및 NPM) 설치&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; 
&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Chocolatey 설치&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참고 : &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;시간이 지남에 따라 변경 될 수 있으므로 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://chocolatey.org/install&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설치 페이지&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 정확한 명령을 복사 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;표준 Windows 명령 줄을 엽니 다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;@powershell -NoProfile -ExecutionPolicy unrestricted -Command &quot;(iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))) &amp;gt;$null 2&amp;gt;&amp;amp;1&quot; &amp;amp;&amp;amp; SET PATH=&quot;%PATH%;%ALLUSERSPROFILE%\chocolatey\bin&quot;&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;콘솔 다시 시작&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;끝난!&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;노드 (및 NPM) 설치&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Chocolatey는 MSI 설치와 다른 디렉토리를 설치하므로 시스템 구성으로 이동하여 이전 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;node&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설치를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;삭제하십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(있는 경우).&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;Install Chocolatey as described above&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;choco install nodejs&lt;/code&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;NOTE I used &lt;code&gt;nodejs&lt;/code&gt;. I am not even sure what &lt;code&gt;node&lt;/code&gt; is, but having had my fair share of troubles with &lt;code&gt;node&lt;/code&gt; already being taken by something else in other systems, I thought, &lt;code&gt;nodejs&lt;/code&gt; would be the safer bet right away&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;Restart your console&lt;/li&gt; 
 &lt;li&gt;Beware: &lt;code&gt;node -v&lt;/code&gt; works! 
  &lt;ul&gt; 
   &lt;li&gt;And &lt;code&gt;npm -v&lt;/code&gt; also works! Awesome.&lt;/li&gt; 
  &lt;/ul&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;After this, I was able to install &lt;code&gt;firebase-tools&lt;/code&gt; without problems (which I was not able to do previously), so something must have gone terribly right! :)&lt;/p&gt; 
&lt;h1&gt;My rather complete story the first time around&lt;/h1&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&quot;Chocolatey installs in seconds&quot;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;If you don't care about sarcasm or lamenting engineers on a Sunday afternoon, skip ahead to the installation instructions in the &lt;strong&gt;TL;DR&lt;/strong&gt; section below.&lt;/p&gt; 
&lt;p&gt;For everyone else: I want to amend &lt;a href=&quot;https://stackoverflow.com/questions/16000173/install-npm-node-js-package-manager-on-windows-w-o-using-node-js-msi/25980740#25980740&quot;&gt;this answer&lt;/a&gt; which recommends using (what seems to be the hottest package management solution for Windows right now): &lt;a href=&quot;https://chocolatey.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Chocolatey&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;It gets the job done nice and quick. However, when I gave it a first try, it took me a while to make sense of the install instructions which are kinda convoluted. The install instructions go a bit like this (complete with what went through my head while going through it):&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;NOTE:&lt;/strong&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;NOTE:&lt;/strong&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;three big-ass NOTEs before even knowing the basics... this makes me anxious... how wrong could things go!?&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Installing With Restricted TLS&lt;/strong&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;not even sure what &lt;code&gt;TLS&lt;/code&gt; is... Oh it's a good friend of &lt;code&gt;SSL&lt;/code&gt; - Shouldn't this just be the default and just work out of the box? My browser can do &lt;code&gt;HTTPS&lt;/code&gt;, NO PROBLEM! (just kidding... I know that &lt;code&gt;SSL&lt;/code&gt; and &lt;code&gt;TSL&lt;/code&gt; frequently cause a lot of pain in environments that have high security needs)&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Option 1&lt;/strong&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Option 2&lt;/strong&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;eeh... great... Can't I just install?&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Installing Behind a Proxy?&lt;/strong&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;Just... no...&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Requirements&lt;/strong&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;uh boi...&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Why does Chocolatey install where it does by default?&lt;/strong&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;Seriously!?!&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;p&gt;&lt;strong&gt;Before You Install&lt;/strong&gt;&lt;/p&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/nTnlV.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/nTnlV.png&quot; alt=&quot;sad&quot;&gt;&lt;/a&gt;&lt;br&gt; &lt;sub&gt;(source: &lt;a href=&quot;http://www.clipartbest.com/cliparts/jix/Ekx/jixEkxaGT.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;clipartbest.com&lt;/a&gt;)&lt;/sub&gt; &lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;p&gt;&lt;strong&gt;Can I install with a proxy?&lt;/strong&gt;&lt;/p&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;again with the proxy...&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Can I install a particular version of Chocolatey?&lt;/strong&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;just any version would be fine, thank you...&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Can I use Windows built-in compression instead of downloading 7zip?&lt;/strong&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;7zip?! Why do you even mention this?!&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Non-Administrative Install&lt;/strong&gt;&lt;/li&gt; 
 &lt;li&gt;
  &lt;blockquote&gt; 
   &lt;p&gt;Now that sounds great!&lt;/p&gt; 
  &lt;/blockquote&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&quot;&lt;strong&gt;NOTE&lt;/strong&gt;: This option should be a last resort and is considered to be an advanced scenario.&quot; 
    &lt;ul&gt; 
     &lt;li&gt;
      &lt;blockquote&gt; 
       &lt;p&gt;Sh$%!@T.&lt;/p&gt; 
      &lt;/blockquote&gt;&lt;/li&gt; 
    &lt;/ul&gt;&lt;/li&gt; 
  &lt;/ul&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Alternative Installation Options&lt;/strong&gt; 
  &lt;blockquote&gt; 
   &lt;p&gt;&lt;em&gt;giddy&lt;/em&gt;&lt;/p&gt; 
  &lt;/blockquote&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;Command Line&lt;/strong&gt; 
  &lt;ul&gt; 
   &lt;li&gt;&quot;This really is the easiest method because it requires no configuration of PowerShell prior to executing it.&quot; 
    &lt;blockquote&gt; 
     &lt;p&gt;And there you go!&lt;/p&gt; 
    &lt;/blockquote&gt;&lt;/li&gt; 
  &lt;/ul&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;While I really appreciate the fact that pitfalls and their possible solutions are discussed so extensively, maybe re-organizing them as such, and putting the &lt;code&gt;Chocolatey installs in seconds&lt;/code&gt; promise to work by putting the &quot;easiest method&quot; first would be just awesome!&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;If you're running Windows 10 Creators Update (1703) and are comfortable navigating around a Unix terminal, you could potentially achieve this using the native Feature &lt;strong&gt;&lt;a href=&quot;https://msdn.microsoft.com/commandline/wsl/about&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bash on Ubuntu on Windows&lt;/a&gt;&lt;/strong&gt; (aka &lt;em&gt;Bash/WSL&lt;/em&gt;)&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;This was originally introduced on the launch of Build 2016 but many additions and bug fixes were addressed at the Creators update but please be warned this is still in Beta.&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;To enable simply navigate to &lt;strong&gt;Control Panel\All Control Panel Items\Programs and Features\Turn Windows features on or off&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;Then select the &lt;strong&gt;Windows Subsystem for Linux (Beta)&lt;/strong&gt; as below &lt;a href=&quot;https://i.stack.imgur.com/yovel.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;Bash on Windows Feature&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/16000173/install-npm-node-js-package-manager-on-windows-w-o-using-node-js-msi&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/16000173/install-npm-node-js-package-manager-on-windows-w-o-using-node-js-msi&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5099</guid>
      <comments>https://hot-time.tistory.com/5099#entry5099comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:00:14 +0900</pubDate>
    </item>
    <item>
      <title>Mac OS X 10.9-영구 환경 변수 설정</title>
      <link>https://hot-time.tistory.com/5098</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Mac OS X 10.9-영구 환경 변수 설정&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Mac OS X 10.9에서 영구 환경 변수 (예 : 새 터미널 세션을 시작할 때마다 내보낼 필요가없는 변수)를 어떻게 설정합니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;.bash_profile&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;및 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수정에 대한 많은 답변을 찾았 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;.profile&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;지만 이러한 옵션 중 어느 것도 영구적 인 솔루션으로 작동하지 않는 것 같습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설정하려는 변수는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;MULE_HOME&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 bash 프로필에 다음 줄이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;export MULE_HOME=$(/opt/mule-standalone-3.4.0)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 터미널을 시작하면 다음 줄이 나타납니다 (정상적인 동작인지 확실하지 않습니까?).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;-bash: /opt/mule-standalone-3.4.0: is a directory
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단한 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;env&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;명령을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;실행 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하면 다음이 반환됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;TERM_PROGRAM=Apple_Terminal&lt;font&gt;&lt;/font&gt;
SHELL=/bin/bash&lt;font&gt;&lt;/font&gt;
TERM=xterm-256color&lt;font&gt;&lt;/font&gt;
TMPDIR=/var/folders/fc/68bqp4jj411gynj5qvwhq6z1shs1fy/T/&lt;font&gt;&lt;/font&gt;
Apple_PubSub_Socket_Render=/tmp/launch-xKtkql/Render&lt;font&gt;&lt;/font&gt;
TERM_PROGRAM_VERSION=326&lt;font&gt;&lt;/font&gt;
TERM_SESSION_ID=E97BFE4B-AF85-4933-B252-0883CC085349&lt;font&gt;&lt;/font&gt;
USER=dan&lt;font&gt;&lt;/font&gt;
SSH_AUTH_SOCK=/tmp/launch-rEmTWW/Listeners&lt;font&gt;&lt;/font&gt;
__CF_USER_TEXT_ENCODING=0x730C85DE:0:0&lt;font&gt;&lt;/font&gt;
PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin&lt;font&gt;&lt;/font&gt;
__CHECKFIX1436934=1&lt;font&gt;&lt;/font&gt;
PWD=/Users/dan&lt;font&gt;&lt;/font&gt;
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home&lt;font&gt;&lt;/font&gt;
LANG=en_GB.UTF-8&lt;font&gt;&lt;/font&gt;
MULE_HOME=&lt;font&gt;&lt;/font&gt;
SHLVL=1&lt;font&gt;&lt;/font&gt;
HOME=/Users/dan&lt;font&gt;&lt;/font&gt;
LOGNAME=danwiseman&lt;font&gt;&lt;/font&gt;
_=/usr/bin/env&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 문제를 해결하기 위해 저는 현재 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;export MULE_HOME=/opt/mule-standalone-3.4.0&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새 터미널 세션을 시작할 때마다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입력해야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;힘들지는 않지만 약간 불편합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;변수가 일시적으로 만 설정되도록하는 여기서 내가 뭘 잘못하고 있는가? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;미리 감사드립니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;$(...)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;괄호 안에있는 명령을 실행하고 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;$MULE_HOME&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;생성되는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;값 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;으로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설정 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;비트를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;삭제 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;귀하의 경우 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;/opt/mule-standalone-3.4.0&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에는 실행 파일이 아니므로 오류가 발생합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;export MULE_HOME=/opt/mule-standalone-3.4.0
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;
 &lt;strike&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;
  사용 
   &lt;/font&gt;&lt;/font&gt;&lt;code&gt;~/.bashrc&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지 마십시오 
   &lt;/font&gt;&lt;/font&gt;&lt;code&gt;~/.bash_profile&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.
 &lt;/font&gt;&lt;/font&gt;&lt;/strike&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;편집 : &lt;/font&gt;&lt;/font&gt;&lt;code&gt;~/.bash_profile&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스크립트가 아닌 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;~/.bashrc&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스크립트 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 환경 변수를 설정해야한다는 의견이 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정말 쉽고 빠르게했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;터미널에서 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;~ / .bash_profile&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;만듭니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;touch ~/.bash_profile
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그때&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;open -a TextEdit.app ~/.bash_profile
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;더하다&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;export TOMCAT_HOME=/Library/Tomcat/Home
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문서를 TextEdit에 저장하면 완료됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;.bash_profile&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래픽 응용 프로그램에서 환경 변수를 표시하려는 경우 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 명령을에 추가 할 수도 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Mac OS X에서 그래픽 응용 프로그램은 .bash_profile 구성을 상속하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;launchctl setenv MYPATH myvar
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수출 명세서를 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;~/.bashrc&lt;/code&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;애플은이를 수행하는 방법을 계속 변경하고있는 것 같습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그리고 그것은 맥락에 관한 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;한 가지 방법은 다른 방법이 작동 할 때 반드시 작동하지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;IDE에서 작업하기 위해 필요했고 여기에 언급 된 bash 파일 (Linux 스타일) 중 어느 것도 그렇게하지 않았습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;GUI 앱이이를 영구적으로 존중하는 현재의 방법은 Windows 및 Linux에 비해 매우 복잡합니다!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;In a nutshell, you have write a huge pile of ugly XML into a plist file to run some bash. That goes into your &quot;launch agents&quot; directory, i.e. &lt;code&gt;~/Library/LaunchAgents/my.startup.plist&lt;/code&gt;. Here's another Stack Exchange thread on the subject:&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://apple.stackexchange.com/questions/106355/setting-the-system-wide-path-environment-variable-in-mavericks&quot;&gt;https://apple.stackexchange.com/questions/106355/setting-the-system-wide-path-environment-variable-in-mavericks&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;That gives you a full copy &amp;amp; paste which you can tweak to set your specific variable. &lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/22502759/mac-os-x-10-9-setting-permanent-environment-variables&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/22502759/mac-os-x-10-9-setting-permanent-environment-variables&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5098</guid>
      <comments>https://hot-time.tistory.com/5098#entry5098comment</comments>
      <pubDate>Thu, 7 Jan 2021 20:00:04 +0900</pubDate>
    </item>
    <item>
      <title>일반 Java 메소드의 일반 유형을 사용하여 인수 유형을 적용 할 수 있습니까?</title>
      <link>https://hot-time.tistory.com/5097</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일반 Java 메소드의 일반 유형을 사용하여 인수 유형을 적용 할 수 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;메서드의 인수가 다음과 같이 동일한 유형인지 확인하기 위해 제네릭 유형을 사용하고 싶습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public static &amp;lt;T&amp;gt; void x(T a, T b)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 메서드에 전달되는 두 인수 (a 및 b)는 항상 동일한 유형이어야한다고 가정합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 놀랍게도 어떤 인수가 전달 되더라도 T가 Object에 지워지는 것처럼 모든 유형의 인수 (기본 요소 포함)를 메서드 x에 전달할 수있었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;지금까지 찾은 유일한 해결 방법은 다음과 같이 '확장'을 사용하는 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public static &amp;lt;T, U extends T&amp;gt; void x(T a, U b)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지만 그것으로 살 수는 있지만 내가 원했던 것은 아니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;제네릭 형식을 사용하여 메서드의 모든 인수 형식을 강제하는 방법이 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;귀하의 질문을 올바르게 이해하면 다음을 원합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;x(10, &quot;x&quot;);
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컴파일 타임에 실패합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 이것을 고려하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;Integer i = 10;&lt;font&gt;&lt;/font&gt;
String s = &quot;x&quot;;&lt;font&gt;&lt;/font&gt;
Object o1 = i;&lt;font&gt;&lt;/font&gt;
Object o2 = s;&lt;font&gt;&lt;/font&gt;
x(o1, o2);&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 경우 둘 다 동일한 유형의 객체입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원하는 것을 실제로 시행 할 수있는 방법은 없다고 생각합니다. 인수를 Object로 캐스트 할 때 경고 / 오류없이 두 가지 유형으로 호출 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음과 같이 사용하여 사용할 유형을 지정할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;ClassName.&amp;lt;Type&amp;gt;x(obj1, obj2);
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그리고 그것은 아마도 그것을 할 수있는 유일한 방법 일 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 올바르게 이해한다면,이를 수행하는 한 가지 방법 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;은 컴파일러가 다른 유형의 두 개체가 인수로 전달되는 경우 해당 유형이 가장 직접적인 수퍼 클래스라고 추론하도록하는 대신 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://docs.oracle.com/javase/tutorial/java/generics/methods.html&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;명시 적으로 T 유형을 지정하는&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들면 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public class Test {&lt;font&gt;&lt;/font&gt;
    public static void main(String[] args) {&lt;font&gt;&lt;/font&gt;
        Test.x(5.0, 5);          // This works since type is inferred to be Number&lt;font&gt;&lt;/font&gt;
        Test.&amp;lt;Integer&amp;gt;x(5, 5);   // This works since type is stated to be Integer&lt;font&gt;&lt;/font&gt;
        Test.&amp;lt;Integer&amp;gt;x(5.0, 5); // This doesn't; type is stated to be Integer and Double is passed in&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public static &amp;lt;T&amp;gt; void x(T a, T b) {&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;애초에 이것이 문제가되어야하는 이유는 나에게 다소 모호하다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대신 타입 시스템이 유용한 방식에 대해 오해 한 것 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우리는 무엇을 할 수 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&amp;lt;T&amp;gt;&amp;nbsp;void&amp;nbsp;x(T&amp;nbsp;a,&amp;nbsp;T&amp;nbsp;b)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;글쎄, 많이는 아니야. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;본체 내부 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;x&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/font&gt;&lt;/font&gt;&lt;code&gt;T&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;과 동일 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Object&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우리는 단지 전화 같은 것을 할 수 있도록, &lt;/font&gt;&lt;/font&gt;&lt;code&gt;toString&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에을 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;a&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;b&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이를 인쇄 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;거기에 정말 실용적 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이유&lt;/font&gt;&lt;/font&gt;&lt;/em&gt; &lt;code&gt;a&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 와 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;b&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;같은 유형이 있어야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;공통된 유형이 있고 그 유형은 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Object&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 그 하위 유형입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사실, &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&amp;lt;T&amp;gt;&amp;nbsp;void&amp;nbsp;x(T&amp;nbsp;a,&amp;nbsp;T&amp;nbsp;b)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;실제로 일반화해야하는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;명확한 이유가 없습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 방법의 몸은 무엇의 실제 유형에 상관하지 않는다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;a&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;및 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;b&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;어쨌든 사용하지 수 있기 때문이다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;호출 사이트는 무엇의 실제 유형에 상관하지 않는다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;a&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;b&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있기 때문이다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;x&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;A는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;void&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 블랙홀 그래서 방법.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;메서드가 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&amp;lt;T&amp;gt;&amp;nbsp;List&amp;lt;T&amp;gt;&amp;nbsp;Arrays.asList(T...)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;과 같은 결과를 얻는 것이 더 일반적입니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;// This will cause a compile error because&lt;font&gt;&lt;/font&gt;
// the type inferred must be compatible&lt;font&gt;&lt;/font&gt;
// with the return assignment.&lt;font&gt;&lt;/font&gt;
List&amp;lt;Integer&amp;gt; r = Arrays.asList(1, 1.0);&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 경계 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;// We don't care what the actual types of&lt;font&gt;&lt;/font&gt;
// a and b are, just that we can call bar()&lt;font&gt;&lt;/font&gt;
// on them.&lt;font&gt;&lt;/font&gt;
// Note: this method does not need to be generic.&lt;font&gt;&lt;/font&gt;
&amp;lt;T extends Foo&amp;gt; void x(T a, T b) {&lt;font&gt;&lt;/font&gt;
    a.bar();&lt;font&gt;&lt;/font&gt;
    a.bar();&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 어떤 종류의 관계를 주장하는 경계 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;// We don't care what the actual types of&lt;font&gt;&lt;/font&gt;
// a and b are, just that we can compare&lt;font&gt;&lt;/font&gt;
// them to each other.&lt;font&gt;&lt;/font&gt;
&amp;lt;T extends Comparable&amp;lt;T&amp;gt;&amp;gt; T max(T a, T b) {&lt;font&gt;&lt;/font&gt;
    return (a.compareTo(b) &amp;lt; 0) ? b : a;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;메서드를 호출 할 때 형식 매개 변수를 명시 적으로 지정할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들면 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt; &amp;lt;String&amp;gt;x(&quot;hello&quot;, &quot;world&quot;);
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;유형 매개 변수를 명시 적으로 지정 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지 않고&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; Java의 유형 추론 기능에만 의존한다면 Generics뿐만 아니라 일반적으로 할 수 있다고 생각하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;메소드 매개 변수의 유형은 구체적인 유형이 아니라 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;적용 가능한 유형 집합&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 을 나타내는 것입니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 클래스 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;의 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;경우이 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;집합&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 도 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하나의 유형으로 만 구성 될 수 있음 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;final&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어이 방법은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public void x(Something a) { }
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;denotes a method, which parameter should be of a type from the &lt;em&gt;set of types&lt;/em&gt;, which are compatible with &lt;code&gt;Something&lt;/code&gt; (i.e. &lt;code&gt;Something&lt;/code&gt; and all its subtypes).&lt;/p&gt; 
&lt;p&gt;The same applies for Generics.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Presumably, you are not calling your generic method in a generic fashion, so it's treated like a call to &lt;code&gt;x(Object a, Object b)&lt;/code&gt;. In this example:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public class Test {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  static &amp;lt;T&amp;gt; void x(T a, T b) {&lt;font&gt;&lt;/font&gt;
  }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  public static void main(String[] args) {&lt;font&gt;&lt;/font&gt;
    x(1, 2); // compiles&lt;font&gt;&lt;/font&gt;
    Test.&amp;lt;String&amp;gt;x(1, 2); // does not compile&lt;font&gt;&lt;/font&gt;
    Test.&amp;lt;String&amp;gt;x(&quot;a&quot;, &quot;b&quot;); // compiles&lt;font&gt;&lt;/font&gt;
  }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The first call to x is not made generically so it compiles. The second call equates &lt;code&gt;T&lt;/code&gt; to &lt;code&gt;String&lt;/code&gt;, so it fails because &lt;code&gt;1&lt;/code&gt; and &lt;code&gt;2&lt;/code&gt; are not &lt;code&gt;Strings&lt;/code&gt;. The third call compiles because it properly passes in &lt;code&gt;Strings&lt;/code&gt;.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;This worked for me&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public static &amp;lt;T&amp;gt; void x(T a, T b, Class&amp;lt;T&amp;gt; cls) {&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;now this compiles&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public static void main(String[] args) throws Exception {&lt;font&gt;&lt;/font&gt;
    x(1, 2, Integer.class);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;and this does not &lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public static void main(String[] args) throws Exception {&lt;font&gt;&lt;/font&gt;
    x(1, &quot;&quot;, Integer.class);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/30217236/can-the-generic-type-of-a-generic-java-method-be-used-to-enforce-the-type-of-arg&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/30217236/can-the-generic-type-of-a-generic-java-method-be-used-to-enforce-the-type-of-arg&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5097</guid>
      <comments>https://hot-time.tistory.com/5097#entry5097comment</comments>
      <pubDate>Thu, 7 Jan 2021 19:59:56 +0900</pubDate>
    </item>
    <item>
      <title>Redis 키의 이름 지정 규칙 및 유효한 문자</title>
      <link>https://hot-time.tistory.com/5096</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Redis 키의 이름 지정 규칙 및 유효한 문자&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Redis 키에서 어떤 문자가 유효한 것으로 간주되는지 궁금합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 얼마 동안 봤는데 유용한 정보를 찾을 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Python과 마찬가지로 유효한 변수 이름은 클래스에 속해야합니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;[a-zA-Z0-9_]&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Redis 키에 대한 요구 사항과 규칙은 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것의 일부는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/6965451/redis-key-naming-conventions&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;답변 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;되어 있지만 허용되는 문자와 규칙에 대해 묻기 때문에 완전히 중복되는 것은 아닙니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 관해서는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;레디 스 키에 유효한 문자&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://redis.io/topics/data-types-intro&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설명서는 완전히이 설명&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Redis 키는 바이너리에 안전합니다. 즉, &quot;foo&quot;와 같은 문자열에서 JPEG 파일의 내용에 이르기까지 모든 바이너리 시퀀스를 키로 사용할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;빈 문자열도 유효한 키입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;키에 대한 몇 가지 다른 규칙 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;매우 긴 키는 좋은 생각이 아닙니다. 예를 들어 1024 바이트의 키는 메모리 측면에서뿐만 아니라 데이터 세트에서 키를 조회하는 데 몇 가지 비용이 많이 드는 키 비교가 필요할 수 있기 때문에 나쁜 생각입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;당면한 작업이 큰 값의 존재와 일치하는 경우에도이를 해싱 (예 : SHA1 사용)하는 것이 특히 메모리 및 대역폭의 관점에서 더 나은 생각입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아주 짧은 키는 종종 좋은 생각이 아닙니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대신 &quot;user : 1000 : followers&quot;를 쓸 수 있다면 &quot;u1000flw&quot;를 키로 쓰는 데는 별 의미가 없습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;후자는 더 읽기 쉽고 추가 된 공간은 키 객체 자체와 값 객체가 사용하는 공간에 비해 작습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;짧은 키는 분명히 메모리를 조금 덜 사용하지만 올바른 균형을 찾는 것이 당신의 임무입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스키마를 고수하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 &quot;object-type : id&quot;는 &quot;user : 1000&quot;에서와 같이 좋은 생각입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;점 또는 대시는 &quot;comment : 1234 : reply.to&quot;또는 &quot;comment : 1234 : reply-to&quot;와 같이 여러 단어로 된 필드에 자주 사용됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;허용되는 최대 키 크기는 512MB입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/30271808/naming-convention-and-valid-characters-for-a-redis-key&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/30271808/naming-convention-and-valid-characters-for-a-redis-key&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5096</guid>
      <comments>https://hot-time.tistory.com/5096#entry5096comment</comments>
      <pubDate>Thu, 7 Jan 2021 19:59:46 +0900</pubDate>
    </item>
    <item>
      <title>C ++의 UTF-8에서 std :: string을 올바르게 사용하려면 어떻게해야합니까?</title>
      <link>https://hot-time.tistory.com/5095</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;C ++의 UTF-8에서 std :: string을 올바르게 사용하려면 어떻게해야합니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 플랫폼은 Mac 및 C ++ 11 (또는 그 이상)입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;저는 C ++ 초보자이며 중국어와 영어를 처리하는 개인 프로젝트를 진행하고 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-8은이 프로젝트의 기본 인코딩입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 Stack Overflow에 대한 몇 가지 게시물을 읽었으며 그중 많은 사람들이 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-8을 다룰 때 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 UTF-8에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대한 현재가 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;wchar_t&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;없으므로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;피하는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;것이 좋습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;char8_t&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 그들 중 누구도 제대로 같은 기능을 처리하는 방법에 대해 이야기하지 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;str[i]&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string::size()&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string::find_first_of()&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::regex&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-8에 직면 할 때 이러한 기능은 일반적으로 예기치 않은 결과를 반환한다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;계속 진행 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하거나로 전환해야 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::wstring&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 머물러야한다면 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 문제를 처리하는 가장 좋은 방법은 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;h1&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;유니 코드 용어집&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;유니 코드는 방대하고 복잡한 주제입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;너무 깊이 들어가고 싶지는 않지만 빠른 용어집이 필요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;코드 포인트&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; : 코드 포인트는 유니 코드의 기본 구성 요소이며, 코드 포인트는 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;의미에&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 매핑 된 정수일뿐입니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정수 부분은 32 비트 (실제로는 24 비트)에 적합하며 그 의미는 문자, 분음 부호, 공백, 기호, 스마일리, 반쪽 플래그 등이 될 수 있습니다. 다음 부분은 오른쪽에서 왼쪽으로 읽습니다. &quot;&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Grapheme Clusters&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; : Grapheme Clusters는 의미 적으로 관련된 코드 포인트의 그룹입니다. 예를 들어 유니 코드의 플래그는 두 개의 코드 포인트를 연결하여 표시됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 두 가지 각각은 따로 의미가 없지만 Grapheme Cluster에서 함께 연결되어 플래그를 나타냅니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Grapheme Clusters는 일부 스크립트에서 문자를 분음 부호와 쌍을 이루는데도 사용됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것이 유니 코드의 기본입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대부분의 현대 언어의 경우 각 &quot;문자&quot;가 단일 코드 포인트에 매핑되기 때문에 코드 포인트와 Grapheme 클러스터 사이의 차이는 대체로 간과 될 수 있습니다 (일반적으로 사용되는 문자 + 분음 부호 조합에 대한 전용 악센트 형식이 있습니다). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래도 스마일리, 깃발 등을 사용한다면 구별에주의를 기울여야 할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;hr&gt; 
&lt;h1&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF 입문서&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 일련의 유니 코드 코드 포인트를 인코딩해야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일반적인 인코딩은 UTF-8, UTF-16 및 UTF-32이며, 후자의 두 가지는 Little-Endian 및 Big-Endian 형식으로 존재하며 총 5 개의 공통 인코딩이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-X에서 X는 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;코드 단위의&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 비트 크기이며 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 각 코드 포인트는 크기에 따라 하나 또는 여러 코드 단위로 표시됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-8 : 1 ~ 4 코드 단위,&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-16 : 1 개 또는 2 개의 코드 단위,&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-32 : 1 코드 단위.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;hr&gt; 
&lt;h1&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;및 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::wstring&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;std::wstring&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이식성에 관심이 있다면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용하지 마십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/font&gt;&lt;/font&gt;&lt;code&gt;wchar_t&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Windows에서는 16 비트 만 가능). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용하는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::u32string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대신 (일명 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::basic_string&amp;lt;char32_t&amp;gt;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;).&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;메모리 내 표현 ( &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::wstring&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;)은 디스크상의 표현 (UTF-8, UTF-16 또는 UTF-32)과 무관하므로 경계 (읽기 및 쓰기)에서 변환해야 할 준비를하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;32 비트 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;wchar_t&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;는 코드 단위가 전체 코드 포인트를 나타내도록 보장하지만 여전히 완전한 Grapheme 클러스터를 나타내지는 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문자열을 읽거나 작성하는 경우 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::wstring&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;슬라이싱과 다이 싱을 시작할 때 문제가 시작되면 (1) 코드 포인트 경계 (UTF-8 또는 UTF-16) 및 (2) Grapheme 클러스터 경계에주의를 기울여야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전자는 쉽게 처리 할 수 ​​있으며 후자는 유니 코드 인식 라이브러리를 사용해야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;hr&gt; 
&lt;h1&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;따기 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::u32string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;?&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;성능이 문제라면 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;메모리 사용량이 적기 때문에 더 나은 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;성능을 발휘할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;중국어를 많이 사용하면 거래가 달라질 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;항상 그렇듯이 프로필.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Grapheme Clusters가 문제가되지 않는다면 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::u32string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일을 단순화하는 이점이 있습니다. 1 Code &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Unit- &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&amp;gt; 1 Code Point는 실수로 코드 포인트를 분리 할 수 ​​없음을 의미하며 모든 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::basic_string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;작업 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기능을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;즉시 사용할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;당신이 소프트웨어 복용과 인터페이스하는 경우 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;char*&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;/ &lt;/font&gt;&lt;/font&gt;&lt;code&gt;char const*&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음에 충실 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;앞뒤로 변환을 방지하기 위해. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그렇지 않으면 고통이 될 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;hr&gt; 
&lt;h1&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-8 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-8은 실제로 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;std::string&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-8 인코딩이 자체 동기화되고 ASCII와 역 호환되기 때문에 대부분의 작업은 기본적으로 작동합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;코드 포인트가 인코딩되는 방식으로 인해 코드 포인트를 찾는 것은 실수로 다른 코드 포인트의 중간과 일치 할 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;code&gt;str.find('\n')&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 공장,&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;str.find(&quot;...&quot;)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;sup&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1 &lt;/font&gt;&lt;/sup&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;바이트 단위로 일치하는&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 작업 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;,&lt;/font&gt;&lt;/font&gt;&lt;sup&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/sup&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;str.find_first_of(&quot;\r\n&quot;)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ASCII 문자를 검색하는 경우&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 작동 &lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;유사하게, &lt;/font&gt;&lt;/font&gt;&lt;code&gt;regex&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대부분은 즉시 작동합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일련의 문자 ( &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&quot;haha&quot;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;)는 단순히 일련의 바이트 ( &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&quot;哈&quot;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;)이므로 기본 검색 패턴이 즉시 작동합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;[:alphanum:]&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정규식 버전 및 구현에 따라 유니 코드 문자와 일치 할 수도 있고 일치하지 않을 수도 있으므로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문자 클래스 (예 :)에주의하십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마찬가지로 비 ASCII &quot;문자&quot;에 repeater를 적용하는 것에주의 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&quot;哈?&quot;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하십시오. 마지막 바이트 만 선택 사항으로 간주 할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음과 같은 경우 괄호를 사용하여 반복되는 바이트 시퀀스를 명확하게 설명 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&quot;(哈)?&quot;&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다..&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;sup&gt;1&lt;/sup&gt; &lt;em&gt;The key concepts to look-up are normalization and collation; this affects all comparison operations. &lt;code&gt;std::string&lt;/code&gt; will always compare (and thus sort) byte by byte, without regard for comparison rules specific to a language or a usage. If you need to handle full normalization/collation, you need a complete Unicode library, such as ICU.&lt;/em&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Both &lt;code&gt;std::string&lt;/code&gt;&amp;nbsp;and &lt;code&gt;std::wstring&lt;/code&gt; must use UTF encoding to represent Unicode. On macOS specifically, &lt;code&gt;std::string&lt;/code&gt; is UTF-8 (8-bit code units), and &lt;code&gt;std::wstring&lt;/code&gt;&amp;nbsp;is UTF-32 (32-bit code units); note that the size of &lt;code&gt;wchar_t&lt;/code&gt; is platform-dependent.&lt;/p&gt; 
&lt;p&gt;For both, &lt;code&gt;size&lt;/code&gt; tracks the number of code units instead of the number of code points, or grapheme clusters. (A code point is one named Unicode entity, one or more of which form a grapheme cluster. Grapheme clusters are the visible characters that users interact with, like letters or emojis.)&lt;/p&gt; 
&lt;p&gt;Although I'm not familiar with the Unicode representation of Chinese, it's very possible that when you use UTF-32, the number of code units is often very close to the number of grapheme clusters. Obviously, however, this comes at the cost of using up to 4x more memory.&lt;/p&gt; 
&lt;p&gt;The most accurate solution would be to use a Unicode library, such as ICU, to calculate the Unicode properties that you are after.&lt;/p&gt; 
&lt;p&gt;Finally, UTF strings in human languages that don't use combining characters usually do pretty well with &lt;code&gt;find&lt;/code&gt;/&lt;code&gt;regex&lt;/code&gt;. I'm not sure about Chinese, but English is one of them.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;code&gt;std::string&lt;/code&gt; and friends are encoding-agnostic. The only difference between &lt;code&gt;std::wstring&lt;/code&gt; and &lt;code&gt;std::string&lt;/code&gt; are that &lt;code&gt;std::wstring&lt;/code&gt; uses &lt;code&gt;wchar_t&lt;/code&gt; as the individual element, not &lt;code&gt;char&lt;/code&gt;. For most compilers the latter is 8-bit. The former is supposed to be large enough to hold any unicode character, but in practice on some systems it isn't (Microsoft's compiler, for example, uses a 16-bit type). You can't store UTF-8 in &lt;code&gt;std::wstring&lt;/code&gt;; that's not what it's designed for. It's designed to be an equivalent of UTF-32 - a string where each element is a single Unicode codepoint.&lt;/p&gt; 
&lt;p&gt;If you want to index UTF-8 strings by Unicode codepoint or composed unicode glyph (or some other thing), count the length of a UTF-8 string in Unicode codepoints or some other unicode object, or find by Unicode codepoint, you're going to need to use something other than the standard library. &lt;a href=&quot;http://site.icu-project.org/&quot; rel=&quot;noreferrer&quot;&gt;ICU&lt;/a&gt; is one of the libraries in the field; there may be others.&lt;/p&gt; 
&lt;p&gt;Something that's probably worth noting is that if you're searching for ASCII characters, you can mostly treat a UTF-8 bytestream as if it were byte-by-byte. Each ASCII character encodes the same in UTF-8 as it does in ASCII, and every multi-byte unit in UTF-8 is guaranteed not to include any bytes in the ASCII range.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Consider upgrading to C++20 and &lt;code&gt;std::u8string&lt;/code&gt; that is the best thing we have as of 2019 for holding UTF-8. There are no standard library facilities to access individual code points or grapheme clusters but at least your type is strong enough to at least say it is true UTF-8.&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/50403342/how-do-i-properly-use-stdstring-on-utf-8-in-c&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/50403342/how-do-i-properly-use-stdstring-on-utf-8-in-c&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5095</guid>
      <comments>https://hot-time.tistory.com/5095#entry5095comment</comments>
      <pubDate>Thu, 7 Jan 2021 19:59:38 +0900</pubDate>
    </item>
    <item>
      <title>스크립트를로드 할 수 없습니다. Metro 서버를 실행 중인지 또는 번들 'index.android.bundle'이 릴리스 용으로 올바르게 패키징되었는지 확인하십시오.</title>
      <link>https://hot-time.tistory.com/5094</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스크립트를로드 할 수 없습니다. Metro 서버를 실행 중인지 또는 번들 'index.android.bundle'이 릴리스 용으로 올바르게 패키징되었는지 확인하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;react-native run-android는 android simulator의 메시지에 메시지를 남겨 종료합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;메시지는 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스크립트를로드 할 수 없습니다. Metro 서버를 실행 중인지 또는 번들 'index.android.bundle'이 릴리스 용으로 올바르게 패키징되었는지 확인하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;무엇을 잘못하고 있는지 완전히 혼란 스럽습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;hr&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;편집 : 오류 스크린 샷 추가&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt; &lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/vCZZs.png&quot; rel=&quot;noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/vCZZs.png&quot; alt=&quot;여기에 이미지 설명 입력&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아직 번 들러를 시작하지 않았습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이전에 프로젝트의 루트에서 직접 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;실행 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;npm start&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하거나&lt;/font&gt;&lt;/font&gt;&lt;code&gt;react-native start&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;react-native run-android&lt;/code&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 단계는 정말 도움이됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;1 단계 :&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; android / app / src / main / assets에 디렉토리 생성&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Linux 명령&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; :&lt;/font&gt;&lt;/font&gt;&lt;code&gt;mkdir android/app/src/main/assets&lt;/code&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;2 단계 :&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 이름 바꾸기 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;index.android.js&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(루트 디렉토리)가에 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;index.js&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;( &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;어쩌면이 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;index.js&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이름을 바꿀 필요가없는 경우에 파일&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; ) 다음 명령을 실행합니다 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;code&gt;react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res&lt;/code&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;3 단계 :&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; APK 빌드 :&lt;/font&gt;&lt;/font&gt;&lt;code&gt;react-native run-android&lt;/code&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;최신 버전에서 index.js를 사용하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;즐겨 :)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나 에게이 오류는 react-native의 업그레이드로 인해 발생했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Android 9.0 (API 레벨 28)부터 일반 텍스트 지원은 기본적으로 비활성화되어 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;업그레이드 차이를 확인하는 경우 디버그 매니페스트를 만들어야합니다. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;android/app/src/debug/AndroidManifest.xml&lt;/code&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;&lt;font&gt;&lt;/font&gt;
    xmlns:tools=&quot;http://schemas.android.com/tools&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;uses-permission android:name=&quot;android.permission.SYSTEM_ALERT_WINDOW&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;application android:usesCleartextTraffic=&quot;true&quot; tools:targetApi=&quot;28&quot; tools:ignore=&quot;GoogleAppIndexingWarning&quot; /&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/manifest&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자세한 정보는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/a/50834600/1713216&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/a/50834600/1713216을 참조하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://react-native-community.github.io/upgrade-helper/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://react-native-community.github.io/upgrade-helper/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;비슷한 문제가 저에게 발생했습니다. 분명히 Mcafee는 8081 포트를 차단했습니다.이 문제를 해결하는 데 몇 시간이 걸렸습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;react-native run-android --port = 1234 실행 시도&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;앱이 에뮬레이터에 오류와 함께 표시되면 dev 설정으로 이동합니다 (crtl + M을 클릭하여 액세스 할 수 있음).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;디바이스 용 디버그 서버 호스트 및 포트&quot;를 &quot;localhost : 1234&quot;로 변경합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;앱을 닫고 앱 서랍에서 시작&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것이 당신에게도 도움이되기를 바랍니다 !!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음을 시도 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;AndroidManifest.xml에이 줄을 추가하세요.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;application&lt;font&gt;&lt;/font&gt;
[...]&lt;font&gt;&lt;/font&gt;
android:usesCleartextTraffic=&quot;true&quot;&lt;font&gt;&lt;/font&gt;
/&amp;gt;&lt;font&gt;&lt;/font&gt;
[...]&lt;font&gt;&lt;/font&gt;
&amp;lt;/application&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 것이 올바르게 구성되어 있으면 다음을 시도하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;adb 역방향 tcp : 8081 tcp : 8081&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;왜? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;RN 패키저가 실행 중일 때 브라우저에서 액세스 할 수있는 활성 웹 서버 (127.0.0.1:8081)가 있습니다.이 서버에서 변경 사항을 적용 할 때 애플리케이션 용 JS 번들이 제공되고 새로 고쳐집니다. 리버스 프록시가 없으면 휴대 전화가 해당 주소에 연결할 수 없습니다. &quot;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://www.reddit.com/r/reactnative/comments/5etpqw/what_do_you_call_what_adb_reverse_is_doing/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Swingline0에 대한&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 모든 크레딧&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://www.reddit.com/r/reactnative/comments/5etpqw/what_do_you_call_what_adb_reverse_is_doing/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 똑같은 문제를 겪고 있었는데, 나에게 문제는 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;adb&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 가 올바른 환경 경로에 있지 않고 오류가 메트로 포트를 알려주고 adb에있는 동안 포트가 죽고 다시 시작된다는 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;환경 변수 (ADB) 추가&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;개방형 환경 변수&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 번째 프레임 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PATH 변수&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에서 선택하고 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아래 편집 옵션을 클릭하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추가 옵션을 클릭하십시오&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;sdk 플랫폼 도구 경로 C : \ Users \ My User \ AppData \ Local \ Android \ Sdk \ platform-tools를 제출합니다. &lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참고&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; : 또는 컴퓨터의 adb.exe 위치에 따라&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;ol start=&quot;5&quot;&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;변경 사항을 저장하다&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Android 빌드를 다시 실행하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;pre class=&quot;lang-html prettyprint-override&quot;&gt;&lt;code&gt;$ react-native run-android
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$ react-native start
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt; &lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$ react-native run-android
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이에 대한 내 해결책은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Metro 서버 시작&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;pre class=&quot;lang-sh prettyprint-override&quot;&gt;&lt;code&gt;$ react-native start
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Android 시작&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;pre class=&quot;lang-sh prettyprint-override&quot;&gt;&lt;code&gt;$ react-native run-android
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;포트 8081이 이미 사용 중&quot;이라는 오류가 표시되면 해당 프로세스를 종료하고 다시 실행할 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre class=&quot;lang-sh prettyprint-override&quot;&gt;&lt;code&gt;$ react-native start
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;https://facebook.github.io/react-native/docs/troubleshooting#content&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;React Native 문제 해결 페이지를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 참조하십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;몇 시간 후 답변을 검색합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;해결책은 노드를 버전 12.4로 다운 그레이드하는 것이 었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;제 경우에는 노드 버전 12.6과 네이티브 0.60 반응 버전에서 오류가 발생한다는 것을 알고 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;중요-환경에 많은 가상 장치가있을 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;AVD를 변경하는 경우 설정을 다시 반복하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;h1&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;디버그 정보&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 오류가 발생하는 경우 먼저 포트 8081에서 실행중인 항목을 확인해야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;터미널에서 다음 명령을 사용하는 가장 빠른 방법&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;netstat -aon | &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;findstr 8081&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그것이 당신에게 뭔가를 보여 주면 포트가 차단되었음을 의미합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가능하면 해당 포트를 차단 해제하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그렇지 않으면 포트를 변경해야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이를 수행하는 프로세스는 Naveen Kumar가 위의 주석에서 이미 언급했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;반응 네이티브 실행 안드로이드 --port = 9001&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;9001이 사용되지 않았는지 확인하십시오. :)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음을 시도하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Android 및 IOS 폴더 제거&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;run react-native eject&lt;/li&gt; 
 &lt;li&gt;run react-native run-android&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;Maybe after the previous steps you have executions npm start - --reset-cache&lt;/p&gt; 
&lt;p&gt;I work, I hope it helps you.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;I just want to add a non-obvious possibility not covered here. I am using &lt;a href=&quot;https://github.com/react-native-community/react-native-netinfo&quot; rel=&quot;nofollow noreferrer&quot;&gt;@react-native-community/netinfo&lt;/a&gt; for detecting network changes, primarily network state. To test network-off state, the WIFI switch (on the emulator) needs to be switched off. This also effectively cuts off the bridge between the emulator and the debug environment. I had not re-enabled WIFI after my tests since i was away from the computer and promptly forgot about it when i got back.&lt;/p&gt; 
&lt;p&gt;There is a possibility that this could be the case for somebody else as well and worth checking before taking any other drastic steps.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;For me this problem started with upgrading react-native. The upgrade was necessary to add 64-bit support.&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;Before:&lt;font&gt;&lt;/font&gt;
-------- &lt;font&gt;&lt;/font&gt;
Environment:&lt;font&gt;&lt;/font&gt;
Node: 10.15.0&lt;font&gt;&lt;/font&gt;
npm: 6.9.0&lt;font&gt;&lt;/font&gt;
Watchman: 4.9.0&lt;font&gt;&lt;/font&gt;
Xcode: Not Found&lt;font&gt;&lt;/font&gt;
Android Studio: 3.4 AI-183.6156.11.34.5692245&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
Packages: (wanted =&amp;gt; installed)&lt;font&gt;&lt;/font&gt;
react: 16.0.0-alpha.12 =&amp;gt; 16.0.0-alpha.12&lt;font&gt;&lt;/font&gt;
react-native: ~0.55.2 =&amp;gt; 0.55.4&lt;font&gt;&lt;/font&gt;
react-native-cli: 2.0.1&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
After:&lt;font&gt;&lt;/font&gt;
------&lt;font&gt;&lt;/font&gt;
info &lt;font&gt;&lt;/font&gt;
React Native Environment Info:&lt;font&gt;&lt;/font&gt;
Binaries:&lt;font&gt;&lt;/font&gt;
Node: 10.15.0&lt;font&gt;&lt;/font&gt;
npm: 6.9.0&lt;font&gt;&lt;/font&gt;
Watchman: 4.9.0&lt;font&gt;&lt;/font&gt;
SDKs:&lt;font&gt;&lt;/font&gt;
Android SDK:&lt;font&gt;&lt;/font&gt;
API Levels: 23, 26, 27, 28&lt;font&gt;&lt;/font&gt;
Build Tools: 27.0.3, 28.0.3&lt;font&gt;&lt;/font&gt;
System Images: android-28 | Google APIs Intel x86 Atom&lt;font&gt;&lt;/font&gt;
IDEs:&lt;font&gt;&lt;/font&gt;
Android Studio: 3.4 AI-183.6156.11.34.5692245&lt;font&gt;&lt;/font&gt;
Xcode: /undefined - /usr/bin/xcodebuild&lt;font&gt;&lt;/font&gt;
npmPackages:&lt;font&gt;&lt;/font&gt;
react: ^16.8.6 =&amp;gt; 16.9.0 &lt;font&gt;&lt;/font&gt;
react-native: 0.59.9 =&amp;gt; 0.59.9 &lt;font&gt;&lt;/font&gt;
npmGlobalPackages:&lt;font&gt;&lt;/font&gt;
create-react-native-app: 2.0.2&lt;font&gt;&lt;/font&gt;
react-native-cli: 2.0.1&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Also, One important change that I made for the upgrade was in ../android/build/build.gradle&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;android {&lt;font&gt;&lt;/font&gt;
    ...&lt;font&gt;&lt;/font&gt;
    defaultConfig {&lt;font&gt;&lt;/font&gt;
        ...&lt;font&gt;&lt;/font&gt;
        targetSdkVersion 28&lt;font&gt;&lt;/font&gt;
        ...&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
    ...&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;I had to change the targetSdkVersion from 27 to 28 following warning when I tried to upload the build(.apk) to goole play console. Little did i realise that this was the root cause of the above error for me. Immediatly answers by @tom and @tinmarfrutos made absolute sense. &lt;/p&gt; 
&lt;p&gt;I solved the problem by adding android:usesCleartextTraffic=&quot;true&quot; to my android/app/src/debug/AndroidManifest.xml&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;By default a tiny JavaScript server called &quot;Metro Server&quot; runs on the port 8081. &lt;/p&gt; 
&lt;p&gt;You need to make this port available for this Server to start. So, &lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;release the port&lt;/li&gt; 
 &lt;li&gt;close your virtual device &lt;/li&gt; 
 &lt;li&gt;&quot;react-native run-android&quot; again. &lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;How to release the port? &lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;http://tenbull.blogspot.com/2019/05/how-to-kill-process-currently-using.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://tenbull.blogspot.com/2019/05/how-to-kill-process-currently-using.html&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://stackoverflow.com/questions/39632667/how-to-kill-the-process-currently-using-a-port-on-localhost-in-windows&quot;&gt;How to kill the process currently using a port on localhost in windows?&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;and most importantly, I upgraded my node version from 8.x to 10.x(latest), as suggested by facebook @ &lt;a href=&quot;https://facebook.github.io/react-native/docs/getting-started&quot; rel=&quot;nofollow noreferrer&quot;&gt;https://facebook.github.io/react-native/docs/getting-started&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;I experienced this just because my Wifi was mistakenly turned off on my emulator.i turned it back on and it started working fine. Hope it's helpful to someone&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;If you are running on Linux OS,there might be case where your npm remote server is not running. Open another terminal (with project directory) and run this command &lt;strong&gt;sudo npm start&lt;/strong&gt; or &lt;strong&gt;sudo react-native start&lt;/strong&gt; before doing &lt;strong&gt;sudo react-native run-android&lt;/strong&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;In my case, I've set a proxy in my emulator. It works back to normal after I removing that proxy.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;The error message on the emulator is kind of misleading. In my case, I used a Macbook. I needed to change the permissions on android/gradlew by running &lt;code&gt;$ chmod 755 ./gradlew&lt;/code&gt;, and then the app could be built and deployed to the android emulator.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;If you are on linux open the terminal from the App root dir and run&lt;/p&gt; 
&lt;p&gt;npm start&lt;/p&gt; 
&lt;p&gt;then open another terminal window and run reactive-native run-around&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;In Some Cases You Might Want To Close the port Of React-native bundler and Rerun the App With the same process&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;1.sudo kill -9 $(sudo lsof -t -i:9001)&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
2.npm start inside the project&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
3. react-native run-android&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;strong&gt;What worked for me was:&lt;/strong&gt;&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;close all consoles&lt;/li&gt; 
 &lt;li&gt;open a new console&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;$ adb devices&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;make sure you got only one devices connected&lt;/li&gt; 
 &lt;li&gt;&lt;code&gt;$ react-native run-android&lt;/code&gt;&lt;/li&gt; 
&lt;/ol&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/55441230/unable-to-load-script-make-sure-you-are-either-running-a-metro-server-or-that-yo&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/55441230/unable-to-load-script-make-sure-you-are- either-&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; running-a- &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/55441230/unable-to-load-script-make-sure-you-are-either-running-a-metro-server-or-that-yo&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;metro-server-or-that-yo&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5094</guid>
      <comments>https://hot-time.tistory.com/5094#entry5094comment</comments>
      <pubDate>Thu, 7 Jan 2021 19:59:29 +0900</pubDate>
    </item>
    <item>
      <title>키에 대시가있는 Ruby 1.9 해시</title>
      <link>https://hot-time.tistory.com/5093</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;키에 대시가있는 Ruby 1.9 해시&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;루비 1.9에서 새로운 구문으로이 해시를 정의하는 방법이 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;irb&amp;gt; { a:  2 }&lt;font&gt;&lt;/font&gt;
=&amp;gt; {:a=&amp;gt;2}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
irb&amp;gt; { a-b:  2 }&lt;font&gt;&lt;/font&gt;
SyntaxError: (irb):5: syntax error, unexpected tLABEL&lt;font&gt;&lt;/font&gt;
{ a-b:  2 }&lt;font&gt;&lt;/font&gt;
      ^&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이전 버전에서는 작동합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;irb&amp;gt; { :&quot;a-b&quot; =&amp;gt;  2 }&lt;font&gt;&lt;/font&gt;
=&amp;gt; {:&quot;a-b&quot;=&amp;gt;2}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 구문을 사용할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;{a: 1, b: 2, 'c-c': 3, d: 4}
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새 구문에서 사용할 수없는 합법적 인 기호가 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조를 찾을 수 없지만 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;/^[a-zA-Z_][a-zA-Z_0-9]*[!?]?$/&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새 구문과 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일치하는 기호 이름 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 허용되는 것 같습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막 문자는 특수 문자 &quot;!&quot;일 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 &quot;?&quot;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이러한 제한 사항을 충족하지 않는 기호의 경우 Ruby 1.8 구문을 사용해야합니다. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;:'my-symbol-name'&lt;/code&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새 구문에 대시를 사용하려면 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;%= link_to &quot;Link&quot;, link_path, {data: {something: 'value1', somethingelse: 'value2'}} %&amp;gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러면 다음이 생성됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;/link&quot; data-something='value1' data-somethingelse='value2'&amp;gt;Link&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 귀하의 특정 사용 사례가 아닐 수도 있지만 직접 답변을 찾으려고 노력 하면서이 게시물을 찾았으므로 결과를 공유 할 것이라고 생각했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이전 구문과 새 구문을 결합 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;{a: 1, b: 2, :'c-c' =&amp;gt; 3, d: 4}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/2134702/ruby-1-9-hash-with-a-dash-in-a-key&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/2134702/ruby-1-9-hash-with-a-dash-in-a-key&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5093</guid>
      <comments>https://hot-time.tistory.com/5093#entry5093comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:26:36 +0900</pubDate>
    </item>
    <item>
      <title>C # 4.0 : pdf를 byte []로 또는 그 반대로 변환</title>
      <link>https://hot-time.tistory.com/5092</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;C # 4.0 : pdf를 byte []로 또는 그 반대로 변환&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;pdf 파일을 byte []로 또는 그 반대로 변환하려면 어떻게합니까? &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;pre&gt;&lt;code&gt;// loading bytes from a file is very easy in C#. The built in System.IO.File.ReadAll* methods take care of making sure every byte is read properly.&lt;font&gt;&lt;/font&gt;
// note that for Linux, you will not need the c: part&lt;font&gt;&lt;/font&gt;
// just swap out the example folder here with your actual full file path&lt;font&gt;&lt;/font&gt;
string pdfFilePath = &quot;c:/pdfdocuments/myfile.pdf&quot;;&lt;font&gt;&lt;/font&gt;
byte[] bytes = System.IO.File.ReadAllBytes(pdfFilePath);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
// munge bytes with whatever pdf software you want, i.e. http://sourceforge.net/projects/itextsharp/&lt;font&gt;&lt;/font&gt;
// bytes = MungePdfBytes(bytes); // MungePdfBytes is your custom method to change the PDF data&lt;font&gt;&lt;/font&gt;
// ...&lt;font&gt;&lt;/font&gt;
// make sure to cleanup after yourself&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
// and save back - System.IO.File.WriteAll* makes sure all bytes are written properly.&lt;font&gt;&lt;/font&gt;
System.IO.File.WriteAllBytes(pdfFilePath, bytes);&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가장 쉬운 방법:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;byte[] buffer;&lt;font&gt;&lt;/font&gt;
using (Stream stream = new IO.FileStream(&quot;file.pdf&quot;))&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
   buffer = new byte[stream.Length - 1];&lt;font&gt;&lt;/font&gt;
   stream.Read(buffer, 0, buffer.Length);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
using (Stream stream = new IO.FileStream(&quot;newFile.pdf&quot;))&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
   stream.Write(buffer, 0, buffer.Length);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아니면이 라인을 따라 뭔가 ...&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/2451864/c-sharp-4-0-convert-pdf-to-byte-and-vice-versa&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/2451864/c-sharp-4-0-convert-pdf-to-byte-and-vice-versa&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5092</guid>
      <comments>https://hot-time.tistory.com/5092#entry5092comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:26:28 +0900</pubDate>
    </item>
    <item>
      <title>서블릿 대 필터</title>
      <link>https://hot-time.tistory.com/5091</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;서블릿 대 필터&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;서블릿&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 과 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필터&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 차이점은 무엇입니까 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;페이지 승인을 위해 무엇을 사용하는 것이 좋습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;특정 조건에 따라 요청 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Filter&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;을 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필터링 및 / 또는 수정&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 하려면을 사용하십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요청 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Servlet&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;을 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;제어, 전처리 및 / 또는 후 처리하려면를&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용하십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;http://docs.oracle.com/javaee/6/tutorial/doc/bnagb.html&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자바 EE 튜토리얼은&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 필터에 대한 다음과 같은 언급 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필터는 요청 또는 응답의 헤더와 콘텐츠 (또는 둘 다)를 변환 할 수있는 개체입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필터는 일반적으로 자체적으로 응답을 생성하지 않는다는 점에서 웹 구성 요소와 다릅니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대신 필터는 모든 종류의 웹 리소스에 &quot;연결&quot;할 수있는 기능을 제공합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;따라서 필터는 필터 역할을하는 웹 리소스에 대한 종속성이 없어야합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이런 식으로 하나 이상의 웹 리소스 유형으로 구성 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필터가 수행 할 수있는 주요 작업은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요청을 쿼리하고 그에 따라 조치를 취하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요청 및 응답 쌍이 더 이상 전달되지 않도록 차단합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;요청 헤더 및 데이터를 수정합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자 정의 된 버전의 요청을 제공하여이를 수행합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;응답 헤더 및 데이터를 수정하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자 정의 된 버전의 응답을 제공하여이를 수행합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
  &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;외부 리소스와 상호 작용합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;/ul&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;권한 부여의 경우 a &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Filter&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가 가장 적합합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음은 필터가 로그인 한 사용자에 대한 요청을 확인하는 방법에 대한 기본적인 시작 예입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws ServletException, IOException {&lt;font&gt;&lt;/font&gt;
    if (((HttpServletRequest) request).getSession().getAttribute(&quot;user&quot;) == null) {&lt;font&gt;&lt;/font&gt;
        // User is not logged in. Redirect to login page.&lt;font&gt;&lt;/font&gt;
        ((HttpServletResponse) response).sendRedirect(&quot;login&quot;);&lt;font&gt;&lt;/font&gt;
    } else {&lt;font&gt;&lt;/font&gt;
        // User is logged in. Just continue with request.&lt;font&gt;&lt;/font&gt;
        chain.doFilter(request, response);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필터는 인증에 가장 적합합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사이트의 모든 페이지에 대해 실행되도록 구성 할 수 있기 때문입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;따라서 모든 페이지를 보호하기 위해 하나의 필터 만 필요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필터를 사용하면 서블릿 성능을 향상시킬 수 있습니다. 요청이 오면 요청에 따라 전처리를 수행 할 수 있고, 요청이 충족되면 서블릿으로 전달할 수 있습니다. 그렇지 않으면 요청시 적절한 정보를 클라이언트에 제공 할 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/2957165/servlet-vs-filter&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/2957165/servlet-vs-filter&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5091</guid>
      <comments>https://hot-time.tistory.com/5091#entry5091comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:26:20 +0900</pubDate>
    </item>
    <item>
      <title>명령 줄의 어셈블리 버전?</title>
      <link>https://hot-time.tistory.com/5090</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;명령 줄의 어셈블리 버전?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;명령 줄에서 DLL 파일의 어셈블리 버전을 가져 오는 Microsoft 도구가 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(내 자신의 도구를 코딩 할 수 있다는 것을 알고 있습니다.)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 PowerShell이 ​​빛나는 영역입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아직 설치하지 않은 경우 설치하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Windows 7과 함께 사전 설치되어 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 명령 줄 실행 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;[System.Reflection.Assembly]::LoadFrom(&quot;C:\full\path\to\YourDllName.dll&quot;).GetName().Version
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음을 출력합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;Major  Minor  Build  Revision&lt;font&gt;&lt;/font&gt;
-----  -----  -----  --------&lt;font&gt;&lt;/font&gt;
3      0      8      0&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;LoadFrom은 어셈블리 개체를 반환하므로 원하는 모든 작업을 수행 할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;프로그램을 작성할 필요가 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모노 및 Linux를 사용하는 경우 다음을 시도하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;monodis --assembly MyAssembly.dll&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
find . -name MyAssembly.dll -exec monodis --assembly {} ';' | grep Version &lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;저와 같은 도구를 찾고있는 사람들을 위해 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;using System;&lt;font&gt;&lt;/font&gt;
using System.IO;&lt;font&gt;&lt;/font&gt;
using System.Reflection;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
class Program&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    public static void Main(string[] args)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        foreach (string arg in args)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            try&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                string path = Path.GetFullPath(arg);&lt;font&gt;&lt;/font&gt;
                var assembly = Assembly.LoadFile(path);&lt;font&gt;&lt;/font&gt;
                Console.Out.WriteLine(assembly.GetName().FullName);&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
            catch (Exception exception)&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                Console.Out.WriteLine(string.Format(&quot;{0}: {1}&quot;, arg, exception.Message));&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Powershell에서&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$version = [System.Diagnostics.FileVersionInfo]::GetVersionInfo(&quot;filepath.exe&quot;).FileVersion.ToString()
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;Reference assemblies should not be loaded for execution. They can only be loaded in the Reflection-only loader context.&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여러 어셈블리에 대해 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 오류가 발생할 때까지 선택한 답변을 사용했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용 &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;[System.Reflection.Assembly]::ReflectionOnlyLoadFrom(&quot;C:\full\path\to\YourDllName.dll&quot;).GetName().Version
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이러한 경우에 작동해야합니다 (아마 모든 경우).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;와우, 오래된 악용 가능한 gdiplus.dll이 떠 다니는 것과 같은 것들을 고려할 때 이것은 나쁩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 솔루션은 간단합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배치 파일 프로그래밍.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;This puts an nfo file in the same dir with the version&lt;/p&gt; 
&lt;p&gt;You can GET filever.exe, which can be downloaded as part of the Windows XP SP2 Support Tools package - only 4.7MB of download.&lt;/p&gt; 
&lt;p&gt;adobe_air_version.bat&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;c:\z\filever.exe /A /D /B &quot;C:\Program Files\Common Files\Adobe AIR\Versions\1.0\Adobe AIR.dll&quot; &amp;gt;000_adobe_air.dll_VERSION.nfo&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
exit&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Variation. &lt;/p&gt; 
&lt;p&gt;Get all the versions in a directory to a text file.&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;c:\z\filever.exe /A /D /B &quot;c:\somedirectory\ *.dll *.exe &amp;gt;000_file_versions.nfo&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
exit&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;There's also Sigcheck by systernals.&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;http://technet.microsoft.com/en-us/sysinternals/bb897441.aspx&quot; rel=&quot;nofollow&quot;&gt;http://technet.microsoft.com/en-us/sysinternals/bb897441.aspx&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;File Version tool will help:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;filever /V YourDllName.dll
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Adding some sugar to the other powershell-ish answers...&lt;/p&gt; 
&lt;p&gt;To get extended properties like 'FullName'&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$dllPath = &quot;C:\full\path\to\YourDllName.dll&quot;;&lt;font&gt;&lt;/font&gt;
$ass  = [System.Reflection.Assembly]::LoadFrom($dllPath);&lt;font&gt;&lt;/font&gt;
$ass.GetName();&lt;font&gt;&lt;/font&gt;
$ass&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Do you use &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/ex0ss12c%28v=vs.80%29.aspx&quot; rel=&quot;nofollow&quot;&gt;GACUTIL&lt;/a&gt;? &lt;/p&gt; 
&lt;p&gt;You can get the assembly version from this command below.&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\gacutil.exe /L &quot;&amp;lt;your assembly name&amp;gt;&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/3037008/assembly-version-from-command-line&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/3037008/assembly-version-from-command-line&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5090</guid>
      <comments>https://hot-time.tistory.com/5090#entry5090comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:26:12 +0900</pubDate>
    </item>
    <item>
      <title>CSS 만 사용하여 텍스트 뒤집기 / 반전 / 미러링</title>
      <link>https://hot-time.tistory.com/5089</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;CSS 만 사용하여 텍스트 뒤집기 / 반전 / 미러링&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;인터넷 검색을했고 여기에 내 대답이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;!--[if IE]&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;style&amp;gt;&lt;font&gt;&lt;/font&gt;
    .mirror {&lt;font&gt;&lt;/font&gt;
        filter: progid:DXImageTransform.Microsoft.BasicImage(mirror=1);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&amp;lt;/style&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;![endif]--&amp;gt; &lt;font&gt;&lt;/font&gt;
&amp;lt;style&amp;gt;&lt;font&gt;&lt;/font&gt;
.mirror {&lt;font&gt;&lt;/font&gt;
    display:block; &lt;font&gt;&lt;/font&gt;
    -moz-transform: matrix(-1, 0, 0, 1, 0, 0);&lt;font&gt;&lt;/font&gt;
    -webkit-transform: matrix(-1, 0, 0, 1, 0, 0);&lt;font&gt;&lt;/font&gt;
    -o-transform:matrix(-1, 0, 0, 1, 0, 0);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&amp;lt;/style&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;div class=&quot;mirror&quot;&amp;gt;testing&amp;lt;/div&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기서 유일한 문제는 미러링의 중심이 객체의 중심이 아니므로 객체를 원하는 위치로 이동하려면 자바 스크립트가 필요할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;코드는 정확하지만이를 수행하는 더 쉬운 방법이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;img.flip {&lt;font&gt;&lt;/font&gt;
  -moz-transform:    scaleX(-1); /* Gecko */&lt;font&gt;&lt;/font&gt;
  -o-transform:      scaleX(-1); /* Opera */&lt;font&gt;&lt;/font&gt;
  -webkit-transform: scaleX(-1); /* Webkit */&lt;font&gt;&lt;/font&gt;
  transform:         scaleX(-1); /* Standard */&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  filter: FlipH;                 /* IE 6/7/8 */&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 이것이 당신의 중앙 미러링 문제를 해결한다고 생각합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;언급했듯이 블록, 인라인 블록 등의 디스플레이를 사용하려면 요소를 설정해야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;transform: scaleX(-1);&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;을 뒤집기 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위해 미러 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용&lt;/font&gt;&lt;/font&gt;&lt;code&gt;transform: scaleX(-1) rotate(180deg);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/3433641/flipping-inverting-mirroring-text-using-css-only&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/3433641/flipping-inverting-mirroring-text-using-css-only&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5089</guid>
      <comments>https://hot-time.tistory.com/5089#entry5089comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:26:03 +0900</pubDate>
    </item>
    <item>
      <title>for 루프를 사용하지 않고 String 배열을 인쇄 할 수있는 방법이 있습니까?</title>
      <link>https://hot-time.tistory.com/5088</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;for 루프를 사용하지 않고 String 배열을 인쇄 할 수있는 방법이 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;div class=&quot;question-status question-originals-of-duplicate&quot;&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 질문에 이미 답변이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
 &lt;ul&gt; 
  &lt;li&gt; &lt;a href=&quot;/questions/409784/whats-the-simplest-way-to-print-a-java-array&quot; dir=&quot;ltr&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Java 배열을 인쇄하는 가장 간단한 방법은 무엇입니까? &lt;/font&gt;&lt;/font&gt;&lt;/a&gt; &lt;span class=&quot;question-originals-answer-count&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;32 답변&lt;/font&gt;&lt;/font&gt;&lt;/span&gt; &lt;/li&gt; 
 &lt;/ul&gt; 
&lt;/div&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;String 배열을 인쇄하는 toString ()과 같은 Java 함수가 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 어리석은 질문이지만 for 루프를 작성하는 것 외에 다른 방법이 있는지 알고 싶습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;감사.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;pre&gt;&lt;code&gt;String[] array = { &quot;a&quot;, &quot;b&quot;, &quot;c&quot; };&lt;font&gt;&lt;/font&gt;
System.out.println(Arrays.toString(array));&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;와 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://commons.apache.org/lang/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아파치 코 몬즈 랭&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; ,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;System.out.println(StringUtils.join(anArray,&quot;,&quot;));
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;http://download-llnw.oracle.com/javase/6/docs/api/java/util/Arrays.html#toString(java.lang.Object[])&quot; rel=&quot;noreferrer&quot;&gt;&lt;code&gt;Arrays.toString()&lt;/code&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배열을 그 내용의 문자열 표현으로 변환하는 방법 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 해당 문자열 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;System.out.println&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;을 인쇄하는 데 사용하는 무엇이든 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;전달할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문자열 표현을 좀 더 제어해야한다면 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/base/Joiner.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Google Collections Joiner&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 사용하세요!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;String[] myArray = new String[] {&quot;a&quot;, &quot;b&quot;, &quot;c&quot;};&lt;font&gt;&lt;/font&gt;
String joined = Joiner.on(&quot; + &quot;).join(myArray);&lt;font&gt;&lt;/font&gt;
// =&amp;gt;  &quot;a + b + c&quot;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 당신이 찾고 있다고 생각합니다&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;System.out.printf(String fmtString, Object ... args)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자 정의 Java 마크 업을 사용하여 출력 형식을 지정하는 경우 (배워야하는 유일한 부분입니다). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 번째 매개 변수는 객체, 귀하의 경우 문자열 배열입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추가 정보 : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.java2s.com/Tutorial/Java/0120__Development/UsingJavasprintfMethod.htm&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Java의 Printf 메서드 사용&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;와 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.op4j.org/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;op4j&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; ,&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;String[] myArray = new String[] {&quot;a&quot;, &quot;b&quot;, &quot;c&quot;};&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
System.out.println(Op.on(myArray).toList().get());&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;pre&gt;&lt;code&gt;String[] values= { ... }&lt;font&gt;&lt;/font&gt;
System.out.println(Arrays.asList(values));&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/3481491/is-there-any-way-i-can-print-string-array-without-using-for-loop&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/3481491/is-there-any-way-i-can-print-string-array-without-using-for-loop&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5088</guid>
      <comments>https://hot-time.tistory.com/5088#entry5088comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:25:55 +0900</pubDate>
    </item>
    <item>
      <title>C #에서 글로벌 키워드를 사용하는 이유는 무엇입니까?</title>
      <link>https://hot-time.tistory.com/5087</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;C #에서 글로벌 키워드를 사용하는 이유는 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;global::&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;접두사 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 사용하는 이유를 이해하고 싶습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 코드에서 ReSharper는이를 중복으로 식별하고 제거 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://farm5.static.flickr.com/4141/4922038418_f6906070c3_o.png&quot; alt=&quot;대체 텍스트&quot;&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;생성 된 코드에서 전역 네임 스페이스 접두사를 사용하는 것이 가장 좋습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이는 네임 스페이스에 유사한 명명 된 유형이 존재하는 상황을 방지하기 위해 수행됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;System.Diagnostics.DebuggerNonUserCodeAttribute&lt;/code&gt; &lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;네임 스페이스 내에&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 이름이 지정된 유형을 생성하면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ReSharper에서 더 이상 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;global::&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 필요하지 않다고 표시하지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;코드 생성기는 단순히 자신의 유형 이름과의 충돌을 피하기를 원합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 키워드 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;global::&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;는 컴파일러가 현재 컨텍스트가 아닌 전역 네임 스페이스에서 시작하는 이름을 바인딩하도록합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;바인딩 가능한 멤버가 글로벌 멤버와 동일한 이름을 가진 주어진 컨텍스트에 존재하고 글로벌 멤버가 필요한 곳에서 필요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들면&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;class Test {&lt;font&gt;&lt;/font&gt;
  class System {}&lt;font&gt;&lt;/font&gt;
  public void Example() {&lt;font&gt;&lt;/font&gt;
    System.Console.WriteLine(&quot;here&quot;); // Error since System binds to Test.System&lt;font&gt;&lt;/font&gt;
    global::System.Console.WriteLine(&quot;here&quot;); // Works&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;해당 MSDN 페이지에는 위의 예를 포함하여 몇 가지 예가 더 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/c3ay4x3d.aspx&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://msdn.microsoft.com/en-us/library/c3ay4x3d.aspx&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;전역 문맥 키워드는 :: 연산자 앞에 올 때 모든 C # 프로그램의 기본 네임 스페이스 인 전역 네임 스페이스를 참조하며 그렇지 않으면 이름이 지정되지 않습니다.&quot;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;출처 : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://msdn.microsoft.com/en-us/library/cc713620.aspx&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://msdn.microsoft.com/en-us/library/cc713620.aspx&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/3552763/why-use-the-global-keyword-in-c&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/3552763/why-use-the-global-keyword-in-c&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5087</guid>
      <comments>https://hot-time.tistory.com/5087#entry5087comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:25:47 +0900</pubDate>
    </item>
    <item>
      <title>JSON 문자 인코딩</title>
      <link>https://hot-time.tistory.com/5086</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JSON 문자 인코딩&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 Java 웹 애플리케이션은 다음과 같은 JSON을 반환하는 AJAX 요청을 제출합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;{'value': 'aériennes'}
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;웹 페이지에 'aériennes'가 표시되면 'a'riennes'로 표시되어 문자 인코딩 문제가있는 것 같습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;AJAX 응답 헤더에는 다음이 포함됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;Content-Type    application/json
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문자 세트 정보를 포함하지 않는 것 같습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 이것을 다음과 같이 변경해야한다고 생각한다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;Content-Type    text/html; charset=iso-8859-1      (or charset=utf8)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;앱의 서버 측은 Spring MVC이며 각 응답에 대한 기본 문자 집합을 설정하는 방법이 있어야한다고 생각합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;증상은 원래 UTF-8 인코딩이었던 JSON 문자열이 ISO-8859-1 인코딩을 사용하여 HTTP 응답에 기록되었고 웹 브라우저가이를 UTF-8로 표시하도록 지시했음을 나타냅니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UTF-8을 사용하여 작성되었고 ISO-8859-1로 표시 되었다면 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;aÃ©riennes&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ISO-8859-1을 사용하여 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;작성 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;및&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 표시 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;되었다면 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;aï¿½riennes&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ISO-8859-1로 잘못 쓰여진 JSON 문자열 문제를 해결하려면 HTTP 응답 인코딩으로 UTF-8을 사용하도록 webapp / Spring을 구성해야합니다. &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본적으로&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 다음 작업을 수행해야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;response.setCharacterEncoding(&quot;UTF-8&quot;);
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;콘텐츠 유형 헤더를 변경하지 마십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JSON에는 완벽하게 괜찮으며 UTF-8로 표시되었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것이 더 이상 관련이 있는지 모르겠지만 @RequestMapping 주석으로 수정했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@RequestMapping(method=RequestMethod.GET, produces={&quot;application/json; charset=UTF-8&quot;})
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;첫째, 게시 된 데이터가 유효한 JSON이 아닙니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;{&quot;value&quot;: &quot;aériennes&quot;}
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;큰 따옴표에 유의하십시오. 필수입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JSON 데이터에 대한 콘텐츠 형식이 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.ietf.org/rfc/rfc4627.txt&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;되어야합니다&lt;/font&gt;&lt;/font&gt;&lt;/a&gt; &lt;code&gt;application/json&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;실제 JSON 데이터 (위에있는 데이터)는 UTF-8, UTF-16 또는 UTF-32를 사용하여 인코딩해야합니다. UTF-8을 사용하는 것이 좋습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Wireshark와 같은 도구를 사용하여 네트워크 트래픽을 모니터링하고 데이터가 어떻게 보이는지 확인할 수 있습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;c3 89&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. é에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대한 바이트 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;확인해야합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 Spring과 함께 일한 적이 없지만 JSON 인코딩을 수행하는 경우 아마도 제대로 처리 될 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JSON이 브라우저에 도달하면 유효하면 좋습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 JSON 응답의 데이터를 웹 페이지에 어떻게 삽입합니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마침내 해결책을 얻었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 줄만 넣어 &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@RequestMapping(value = &quot;/YOUR_URL_Name&quot;,method = RequestMethod.POST,produces = &quot;application/json; charset=utf-8&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 확실히 도움이 될 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그것은 나에게 정확히 똑같이 일어났습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;%@ page language=&quot;java&quot; contentType=&quot;application/json&quot; pageEncoding=&quot;UTF-8&quot;%&amp;gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 이것은 나를 위해 작동합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;%@ page language=&quot;java&quot; contentType=&quot;application/json; charset=UTF-8&quot; pageEncoding=&quot;UTF-8&quot;%&amp;gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추가 시도&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt; ;charset=UTF-8
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;contentType에.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;pre&gt;&lt;code&gt;response.setContentType(&quot;application/json;charset=utf-8&quot;);
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기의 답변은 완전히 관련이 없지만 문제를 해결하는 데 도움이되었습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;javax.ws.rs API와 @Produces 및 @Consumes 주석을 사용하고 동일한 문제가 발생했습니다. 웹 서비스에서 반환 한 JSON은 UTF-8이 아닙니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 컨트롤러 기능 위에 다음 주석으로 해결했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Produces(javax.ws.rs.core.MediaType.APPLICATION_JSON + &quot;; charset=UTF-8&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;과&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Consumes(javax.ws.rs.core.MediaType.APPLICATION_JSON + &quot;; charset=UTF-8&quot;)
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 엔드 포인트의 get 및 post 기능에서. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 문자 세트를 설정하지 않았고 이것이 해결되었습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 저지의 일부이므로 Maven 종속성을 추가해야 할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용하는 경우 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;선택한 문자 인코딩을 사용 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하여 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;StringEntity&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;시도 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/24762641/posting-foreign-characters-using-json-produces-400/24765275#24765275&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하십시오&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;외국 문자도 처리합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 응답에서 &lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;application / json; utf-8&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 을 수신하기 위해 컨트롤러 클래스 위에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스프링 주석 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;RequestMapping을&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용할 수 있습니다 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Controller&lt;font&gt;&lt;/font&gt;
@RequestMapping(produces = {&quot;application/json; charset=UTF-8&quot;,&quot;*/*;charset=UTF-8&quot;})&lt;font&gt;&lt;/font&gt;
public class MyController{&lt;font&gt;&lt;/font&gt;
 ...&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 제안 된 해결 방법으로 문제가 해결되지 않은 경우 (나의 경우) 도움이 될 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 문제는 Springs를 사용하여 응답에서 json 문자열을 반환한다는 것 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;@ResponseBody&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 작업을 수행하는 경우 도움이 될 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;디스패처 서블릿에 다음 Bean을 추가하십시오. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;bean&lt;font&gt;&lt;/font&gt;
    class=&quot;org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;property name=&quot;messageConverters&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;list&amp;gt;&lt;font&gt;&lt;/font&gt;
            &amp;lt;bean&lt;font&gt;&lt;/font&gt;
                class=&quot;org.springframework.http.converter.StringHttpMessageConverter&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
                &amp;lt;property name=&quot;supportedMediaTypes&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
                    &amp;lt;list&amp;gt;&lt;font&gt;&lt;/font&gt;
                        &amp;lt;value&amp;gt;text/plain;charset=UTF-8&amp;lt;/value&amp;gt;&lt;font&gt;&lt;/font&gt;
                    &amp;lt;/list&amp;gt;&lt;font&gt;&lt;/font&gt;
                &amp;lt;/property&amp;gt;&lt;font&gt;&lt;/font&gt;
            &amp;lt;/bean&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;/list&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/property&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/bean&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(여기에서 찾았습니다 : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://forum.spring.io/forum/spring-projects/web/74209-responsebody-and-utf-8&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://forum.spring.io/forum/spring-projects/web/74209-responsebody-and-utf-8&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; )&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/3995559/json-character-encoding&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/3995559/json-character-encoding&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5086</guid>
      <comments>https://hot-time.tistory.com/5086#entry5086comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:25:39 +0900</pubDate>
    </item>
    <item>
      <title>래퍼 내 두 범위 중 하나의 텍스트 오버플로 줄임표</title>
      <link>https://hot-time.tistory.com/5085</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;래퍼 내 두 범위 중 하나의 텍스트 오버플로 줄임표&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;줄임표에 문제가 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 HTML은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;div id=&quot;wrapper&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;span id=&quot;firstText&quot;&amp;gt;This text should be effected by ellipsis&amp;lt;/span&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;span id=&quot;lastText&quot;&amp;gt;this text should not change size&amp;lt;/span&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/div&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;순수한 CSS로 이것을 수행하는 방법이 있습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 시도한 것은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;#firstText&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    overflow: hidden;&lt;font&gt;&lt;/font&gt;
    white-space:nowrap;&lt;font&gt;&lt;/font&gt;
    text-overflow:ellipsis;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
#lastText&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    white-space:nowrap;&lt;font&gt;&lt;/font&gt;
    overflow:visible;   &lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음과 같이 표시됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 텍스트는 줄임표로 표시되어야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것이 내가 원하는 결과이지만 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 텍스트는 e 여야합니다 ...이 텍스트는 크기를 변경해서는 안됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;width&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;#firstText&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;과 같이 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;줄 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;#firstText&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    overflow: hidden;&lt;font&gt;&lt;/font&gt;
    white-space:nowrap;&lt;font&gt;&lt;/font&gt;
    text-overflow:ellipsis;&lt;font&gt;&lt;/font&gt;
    width:150px;&lt;font&gt;&lt;/font&gt;
    display:inline-block;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 예를 확인하십시오. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;h2&gt;&lt;a href=&quot;http://jsfiddle.net/Qhdaz/5/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://jsfiddle.net/Qhdaz/5/&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스팬의 순서를 변경하고 첫 번째 스팬에 부동 소수점을 부여하여이를 달성 할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이렇게하면 요소에 너비를 설정할 필요가 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;/p&gt;
&lt;div class=&quot;snippet&quot; data-lang=&quot;js&quot; data-hide=&quot;false&quot;&gt; 
 &lt;div class=&quot;snippet-code&quot;&gt; 
  &lt;pre class=&quot;snippet-code-css lang-css prettyprint-override&quot;&gt;&lt;code&gt;#firstText&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
  display: block;&lt;font&gt;&lt;/font&gt;
  overflow: hidden;&lt;font&gt;&lt;/font&gt;
  text-overflow: ellipsis;&lt;font&gt;&lt;/font&gt;
  white-space: nowrap;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
#lastText&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    float:right;&lt;font&gt;&lt;/font&gt;
    white-space:nowrap;&lt;font&gt;&lt;/font&gt;
}&lt;/code&gt;&lt;/pre&gt; 
  &lt;pre class=&quot;snippet-code-html lang-html prettyprint-override&quot;&gt;&lt;code&gt;&amp;lt;div id=&quot;wrapper&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;span id=&quot;lastText&quot;&amp;gt;this text should not change size&amp;lt;/span&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;span id=&quot;firstText&quot;&amp;gt;This text should be effected by ellipsis&amp;lt;/span&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/div&amp;gt;&lt;/code&gt;&lt;/pre&gt; 
 &lt;/div&gt; 
&lt;/div&gt; 
&lt;p&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아직 처리되지 않은 작은 케이스가 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;알 수 없거나 동적 래퍼 크기가 있고 첫 번째 자식이 사용 가능한 모든 공간을 차지하지만 여전히 너무 긴 경우 줄임표를 사용하려는 경우. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;Here is my solution using &lt;code&gt;flex&lt;/code&gt; CSS properties :&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;#wrapper{&lt;font&gt;&lt;/font&gt;
    display: inline-flex;&lt;font&gt;&lt;/font&gt;
    flex-flow:row nowrap;&lt;font&gt;&lt;/font&gt;
    max-width:100%; /* or width:100% if you want the spans to take all available space */&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
#firstText{&lt;font&gt;&lt;/font&gt;
    flex:1;&lt;font&gt;&lt;/font&gt;
    white-space:pre;&lt;font&gt;&lt;/font&gt;
    overflow: hidden;&lt;font&gt;&lt;/font&gt;
    text-overflow: ellipsis;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
#lastText{&lt;font&gt;&lt;/font&gt;
    white-space:nowrap;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;You could fake it like this: change your &lt;code&gt;span&lt;/code&gt; to &lt;code&gt;div&lt;/code&gt; and change your CSS:&lt;/p&gt; 
&lt;pre class=&quot;lang-css prettyprint-override&quot;&gt;&lt;code&gt;#firstText&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    float: left;&lt;font&gt;&lt;/font&gt;
    width: 250px;&lt;font&gt;&lt;/font&gt;
    height: 20px;&lt;font&gt;&lt;/font&gt;
    overflow: hidden;&lt;font&gt;&lt;/font&gt;
    white-space:nowrap;&lt;font&gt;&lt;/font&gt;
    text-overflow:ellipsis;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
#lastText&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    float: left;&lt;font&gt;&lt;/font&gt;
    white-space:nowrap;&lt;font&gt;&lt;/font&gt;
    overflow:visible;   &lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/8122042/text-overflow-ellipsis-on-one-of-two-spans-inside-a-wrapper&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/8122042/text-overflow-ellipsis-on-one-of-two-spans-inside-a-wrapper&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5085</guid>
      <comments>https://hot-time.tistory.com/5085#entry5085comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:25:30 +0900</pubDate>
    </item>
    <item>
      <title>Nested Fragment (Android 4.2)를 사용하여 ViewPager 내에 Fragment를 추가하는 방법</title>
      <link>https://hot-time.tistory.com/5084</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Nested Fragment (Android 4.2)를 사용하여 ViewPager 내에 Fragment를 추가하는 방법&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;ViewPager&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;세 개를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가지고 있으며 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Fragments&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 각각은 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;List&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(또는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Grid&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;)을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;보여줍니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새로운 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Android API level 17&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(Jelly Bean 4.2)에서 기능 중 하나는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://developer.android.com/about/versions/android-4.2.html#NestedFragments&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Nested Fragments&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새로운 기능 설명은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ViewPager를 사용하여 왼쪽과 오른쪽으로 스 와이프하고 화면 공간의 대부분을 차지하는 조각을 만드는 경우 이제 각 조각 페이지에 조각을 삽입 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래서 내가 이해한다면, 이제 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내부에 (예를 들어 버튼이 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있는) &lt;/font&gt;&lt;/font&gt;&lt;code&gt;ViewPager&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;with를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;만들 수 있으며 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Fragments&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 사용자가 버튼을 누르면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 새로운 기능을 사용하여 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;Fragment&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;느슨하게 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 것을 보여줄 수 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;ViewPager&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;저는 아침에 이것을 여러 가지 방법으로 구현하려고 노력했지만 작동하지 않습니다. 누군가 이것을 구현하는 방법에 대한 간단한 예제를 추가 할 수 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;추신 : 저는 이런 식으로하는 일에만 관심이 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;getChildFragmentManager&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;올바른 xml 레이아웃을 만들었다 고 가정합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 다른 Fragment에서 호스팅하는 ViewPager에 조각을 표시하는 것은 매우 간단합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음은 자식 조각을 표시하는 부모 조각입니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;class ParentViewPagerFragment : Fragment() {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {&lt;font&gt;&lt;/font&gt;
    val root = inflater.inflate(R.layout.fragment_parent_viewpager, container, false)&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    val viewPager = root.findViewById(R.id.viewPager) as ViewPager&lt;font&gt;&lt;/font&gt;
    // Important: Must use the child FragmentManager or you will see side effects.&lt;font&gt;&lt;/font&gt;
    viewPager.adapter = MyAdapter(childFragmentManager)&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    val tabStrip = root.findViewById&amp;lt;TabLayout&amp;gt;(R.id.pagerTabStrip)&lt;font&gt;&lt;/font&gt;
    tabStrip.setupWithViewPager(viewPager)&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    return root&lt;font&gt;&lt;/font&gt;
  }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  class MyAdapter internal constructor(fm: FragmentManager) : FragmentPagerAdapter(fm) {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    override fun getCount(): Int = 4&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    override fun getItem(position: Int): Fragment {&lt;font&gt;&lt;/font&gt;
      val args = Bundle().apply { putInt(ChildFragment.POSITION_KEY, position) }&lt;font&gt;&lt;/font&gt;
      return ChildFragment.newInstance(args)&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    override fun getPageTitle(position: Int): CharSequence = &quot;Tab $position&quot;&lt;font&gt;&lt;/font&gt;
  }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  companion object {&lt;font&gt;&lt;/font&gt;
    val TAG: String = ParentViewPagerFragment::class.java.name&lt;font&gt;&lt;/font&gt;
  }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;FragmentPagerAdapter&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 인스턴스화 할 때 &lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Fragment.getChildFragmentManager ()&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 사용하는 것이 중요합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자식 조각에 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Fragment.setRetainInstance ()&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용할 수 없으며 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예외가 발생합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간결성을 위해 수입품은 생략되었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;소스 코드는 &lt;/font&gt;&lt;/font&gt;&lt;/strong&gt; &lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://github.com/marcoRS/nested-fragments&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://github.com/marcoRS/nested-fragments &lt;/font&gt;&lt;/a&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에서 찾을 수 있습니다.&lt;/font&gt;&lt;/strong&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/marcoRS/nested-fragments&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;편집 :&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 페이지의 모든 내용을 바꾸려면 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;ViewPager&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;중첩 된 조각을 사용할 수 있지만 일부 변경이 필요합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아래 샘플을 확인하십시오 ( &lt;/font&gt;&lt;/font&gt;&lt;code&gt;FragmentActivity&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 설정 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;ViewPager&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;및 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설정 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;PagerAdapter&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;은 이전 코드 스 니펫과 동일 함).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;// this will act as a fragment container, representing one page in the ViewPager&lt;font&gt;&lt;/font&gt;
public static class WrapperFragment extends Fragment implements&lt;font&gt;&lt;/font&gt;
        ReplaceListener {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public static WrapperFragment newInstance(int position) {&lt;font&gt;&lt;/font&gt;
        WrapperFragment wp = new WrapperFragment();&lt;font&gt;&lt;/font&gt;
        Bundle args = new Bundle();&lt;font&gt;&lt;/font&gt;
        args.putInt(&quot;position&quot;, position);&lt;font&gt;&lt;/font&gt;
        wp.setArguments(args);&lt;font&gt;&lt;/font&gt;
        return wp;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    @Override&lt;font&gt;&lt;/font&gt;
    public View onCreateView(LayoutInflater inflater, ViewGroup container,&lt;font&gt;&lt;/font&gt;
            Bundle savedInstanceState) {&lt;font&gt;&lt;/font&gt;
        FrameLayout fl = new FrameLayout(getActivity());&lt;font&gt;&lt;/font&gt;
        fl.setId(10000);&lt;font&gt;&lt;/font&gt;
        if (getChildFragmentManager().findFragmentByTag(&quot;initialTag&quot;) == null) {&lt;font&gt;&lt;/font&gt;
            InitialInnerFragment iif = new InitialInnerFragment();&lt;font&gt;&lt;/font&gt;
            Bundle args = new Bundle();&lt;font&gt;&lt;/font&gt;
            args.putInt(&quot;position&quot;, getArguments().getInt(&quot;position&quot;));&lt;font&gt;&lt;/font&gt;
            iif.setArguments(args);&lt;font&gt;&lt;/font&gt;
            getChildFragmentManager().beginTransaction()&lt;font&gt;&lt;/font&gt;
                    .add(10000, iif, &quot;initialTag&quot;).commit();&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        return fl;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    // required because it seems the getChildFragmentManager only &quot;sees&quot;&lt;font&gt;&lt;/font&gt;
    // containers in the View of the parent Fragment.   &lt;font&gt;&lt;/font&gt;
    @Override&lt;font&gt;&lt;/font&gt;
    public void onReplace(Bundle args) {&lt;font&gt;&lt;/font&gt;
        if (getChildFragmentManager().findFragmentByTag(&quot;afterTag&quot;) == null) {&lt;font&gt;&lt;/font&gt;
            InnerFragment iif = new InnerFragment();&lt;font&gt;&lt;/font&gt;
            iif.setArguments(args);&lt;font&gt;&lt;/font&gt;
            getChildFragmentManager().beginTransaction()&lt;font&gt;&lt;/font&gt;
                    .replace(10000, iif, &quot;afterTag&quot;).addToBackStack(null)&lt;font&gt;&lt;/font&gt;
                    .commit();&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
// the fragment that would initially be in the wrapper fragment&lt;font&gt;&lt;/font&gt;
public static class InitialInnerFragment extends Fragment {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private ReplaceListener mListener;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    @Override&lt;font&gt;&lt;/font&gt;
    public View onCreateView(LayoutInflater inflater, ViewGroup container,&lt;font&gt;&lt;/font&gt;
            Bundle savedInstanceState) {&lt;font&gt;&lt;/font&gt;
        mListener = (ReplaceListener) this.getParentFragment();&lt;font&gt;&lt;/font&gt;
        LinearLayout ll = new LinearLayout(getActivity());&lt;font&gt;&lt;/font&gt;
        Button b = new Button(getActivity());&lt;font&gt;&lt;/font&gt;
        b.setGravity(Gravity.CENTER_HORIZONTAL);&lt;font&gt;&lt;/font&gt;
        b.setText(&quot;Frame &quot; + getArguments().getInt(&quot;position&quot;));&lt;font&gt;&lt;/font&gt;
        b.setOnClickListener(new OnClickListener() {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            @Override&lt;font&gt;&lt;/font&gt;
            public void onClick(View v) {&lt;font&gt;&lt;/font&gt;
                Bundle args = new Bundle();&lt;font&gt;&lt;/font&gt;
                args.putInt(&quot;positionInner&quot;,&lt;font&gt;&lt;/font&gt;
                        getArguments().getInt(&quot;position&quot;));&lt;font&gt;&lt;/font&gt;
                if (mListener != null) {&lt;font&gt;&lt;/font&gt;
                    mListener.onReplace(args);&lt;font&gt;&lt;/font&gt;
                }&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
        });&lt;font&gt;&lt;/font&gt;
        ll.setOrientation(LinearLayout.VERTICAL);&lt;font&gt;&lt;/font&gt;
        ll.addView(b, new LinearLayout.LayoutParams(250,&lt;font&gt;&lt;/font&gt;
                LinearLayout.LayoutParams.WRAP_CONTENT));&lt;font&gt;&lt;/font&gt;
        return ll;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
public static class InnerFragment extends Fragment {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    @Override&lt;font&gt;&lt;/font&gt;
    public View onCreateView(LayoutInflater inflater, ViewGroup container,&lt;font&gt;&lt;/font&gt;
            Bundle savedInstanceState) {&lt;font&gt;&lt;/font&gt;
        TextView tv = new TextView(getActivity());&lt;font&gt;&lt;/font&gt;
        tv.setText(&quot;InnerFragment in the outher Fragment with position &quot;&lt;font&gt;&lt;/font&gt;
                + getArguments().getInt(&quot;positionInner&quot;));&lt;font&gt;&lt;/font&gt;
        return tv;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
public interface ReplaceListener {&lt;font&gt;&lt;/font&gt;
    void onReplace(Bundle args);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;빠르게 살펴보면 작동하지만 많이 테스트하지 않았기 때문에 문제가 나타날 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;누군가 이것을 수행하는 방법에 대한 간단한 예를 보여줄 수 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Commonsware가 더 정교한 샘플을 제공하기 전까지는 중첩 된 조각을 사용하는 것이 매우 쉬워 보입니다. 아래 코드를 시도해 볼 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public class NestedFragments extends FragmentActivity {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    @Override&lt;font&gt;&lt;/font&gt;
    protected void onCreate(Bundle arg0) {&lt;font&gt;&lt;/font&gt;
        super.onCreate(arg0);&lt;font&gt;&lt;/font&gt;
        ViewPager vp = new ViewPager(this);&lt;font&gt;&lt;/font&gt;
        vp.setId(5000);&lt;font&gt;&lt;/font&gt;
        vp.setAdapter(new MyAdapter(getSupportFragmentManager()));&lt;font&gt;&lt;/font&gt;
        setContentView(vp);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private static class MyAdapter extends FragmentPagerAdapter {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        public MyAdapter(FragmentManager fm) {&lt;font&gt;&lt;/font&gt;
            super(fm);&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        @Override&lt;font&gt;&lt;/font&gt;
        public Fragment getItem(int position) {&lt;font&gt;&lt;/font&gt;
            return WrapperFragment.newInstance(position);&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        @Override&lt;font&gt;&lt;/font&gt;
        public int getCount() {&lt;font&gt;&lt;/font&gt;
            return 8;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public static class WrapperFragment extends Fragment {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        public static WrapperFragment newInstance(int position) {&lt;font&gt;&lt;/font&gt;
            WrapperFragment wp = new WrapperFragment();&lt;font&gt;&lt;/font&gt;
            Bundle args = new Bundle();&lt;font&gt;&lt;/font&gt;
            args.putInt(&quot;position&quot;, position);&lt;font&gt;&lt;/font&gt;
            wp.setArguments(args);&lt;font&gt;&lt;/font&gt;
            return wp;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        @Override&lt;font&gt;&lt;/font&gt;
        public View onCreateView(LayoutInflater inflater, ViewGroup container,&lt;font&gt;&lt;/font&gt;
                Bundle savedInstanceState) {&lt;font&gt;&lt;/font&gt;
            LinearLayout ll = new LinearLayout(getActivity());&lt;font&gt;&lt;/font&gt;
            FrameLayout innerFragContainer = new FrameLayout(getActivity());&lt;font&gt;&lt;/font&gt;
            innerFragContainer.setId(1111);&lt;font&gt;&lt;/font&gt;
            Button b = new Button(getActivity());&lt;font&gt;&lt;/font&gt;
            b.setText(&quot;Frame &quot; + getArguments().getInt(&quot;position&quot;));&lt;font&gt;&lt;/font&gt;
            b.setOnClickListener(new OnClickListener() {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
                @Override&lt;font&gt;&lt;/font&gt;
                public void onClick(View v) {&lt;font&gt;&lt;/font&gt;
                    InnerFragment innerFragment = new InnerFragment();&lt;font&gt;&lt;/font&gt;
                    Bundle args = new Bundle();&lt;font&gt;&lt;/font&gt;
                    args.putInt(&quot;positionInner&quot;,&lt;font&gt;&lt;/font&gt;
                            getArguments().getInt(&quot;position&quot;));&lt;font&gt;&lt;/font&gt;
                    innerFragment.setArguments(args);&lt;font&gt;&lt;/font&gt;
                    FragmentTransaction transaction = getChildFragmentManager()&lt;font&gt;&lt;/font&gt;
                            .beginTransaction();&lt;font&gt;&lt;/font&gt;
                    transaction.add(1111, innerFragment).commit();&lt;font&gt;&lt;/font&gt;
                }&lt;font&gt;&lt;/font&gt;
            });&lt;font&gt;&lt;/font&gt;
            ll.setOrientation(LinearLayout.VERTICAL);&lt;font&gt;&lt;/font&gt;
            ll.addView(b, new LinearLayout.LayoutParams(&lt;font&gt;&lt;/font&gt;
                    LinearLayout.LayoutParams.MATCH_PARENT,&lt;font&gt;&lt;/font&gt;
                    LinearLayout.LayoutParams.WRAP_CONTENT));&lt;font&gt;&lt;/font&gt;
            ll.addView(innerFragContainer, new LinearLayout.LayoutParams(&lt;font&gt;&lt;/font&gt;
                    LinearLayout.LayoutParams.MATCH_PARENT,&lt;font&gt;&lt;/font&gt;
                    LinearLayout.LayoutParams.MATCH_PARENT));&lt;font&gt;&lt;/font&gt;
            return ll;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public static class InnerFragment extends Fragment {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        @Override&lt;font&gt;&lt;/font&gt;
        public View onCreateView(LayoutInflater inflater, ViewGroup container,&lt;font&gt;&lt;/font&gt;
                Bundle savedInstanceState) {&lt;font&gt;&lt;/font&gt;
            TextView tv = new TextView(getActivity());&lt;font&gt;&lt;/font&gt;
            tv.setText(&quot;InnerFragment in the outher Fragment with position &quot;&lt;font&gt;&lt;/font&gt;
                    + getArguments().getInt(&quot;positionInner&quot;));&lt;font&gt;&lt;/font&gt;
            return tv;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 게으르고 모든 것을 코드로 만들었지 만 팽창 된 xml 레이아웃과 함께 작동 할 수 있다고 확신합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;인덱스 2와 3에 대해 3 개의 요소와 2 개의 하위 요소가있는 ViewPager를 만들었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/M0sXA.png&quot; alt=&quot;enter image description here&quot;&gt;&lt;/p&gt; 
&lt;p&gt;I have implemented this with the help from previous questions and answers from StackOverFlow and here is the link.&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://github.com/rukmaldias/ViewPagerChildFragments&quot; rel=&quot;nofollow noreferrer&quot;&gt;ViewPagerChildFragments&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/13379194/how-to-add-a-fragment-inside-a-viewpager-using-nested-fragment-android-4-2&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/13379194/how-to-add-a-fragment-inside-a-viewpager-using-nested-fragment-android-4-2&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5084</guid>
      <comments>https://hot-time.tistory.com/5084#entry5084comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:25:21 +0900</pubDate>
    </item>
    <item>
      <title>통합 테스트 전체 객체를 Spring MVC 컨트롤러에 게시</title>
      <link>https://hot-time.tistory.com/5083</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;통합 테스트 전체 객체를 Spring MVC 컨트롤러에 게시&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스프링 mvc 웹 앱을 통합 테스트 할 때 모의 요청에 전체 양식 객체를 전달하는 방법이 있습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 찾을 수있는 것은 다음과 같은 매개 변수로 각 필드를 개별적으로 전달하는 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;mockMvc.perform(post(&quot;/somehwere/new&quot;).param(&quot;items[0].value&quot;,&quot;value&quot;));
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;작은 형태에는 괜찮습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지만 게시 된 개체가 커지면 어떻게됩니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 전체 객체를 게시 할 수 있다면 테스트 코드가 더 멋지게 보입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;특히 체크 박스를 통해 여러 항목의 선택을 테스트 한 다음 게시하고 싶습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;당연히 하나의 아이템 만 게시해볼 수 있지만 ..&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;spring-test-mvc가 포함 된 스프링 3.2.2를 사용하고 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;양식의 내 모델은 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;NewObject {&lt;font&gt;&lt;/font&gt;
    List&amp;lt;Item&amp;gt; selection;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음과 같은 호출을 시도했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;mockMvc.perform(post(&quot;/somehwere/new&quot;).requestAttr(&quot;newObject&quot;, newObject) 
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음과 같은 컨트롤러에 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Controller&lt;font&gt;&lt;/font&gt;
@RequestMapping(value = &quot;/somewhere/new&quot;)&lt;font&gt;&lt;/font&gt;
public class SomewhereController {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    @RequestMapping(method = RequestMethod.POST)&lt;font&gt;&lt;/font&gt;
    public String post(&lt;font&gt;&lt;/font&gt;
            @ModelAttribute(&quot;newObject&quot;) NewObject newObject) {&lt;font&gt;&lt;/font&gt;
        // ...&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 개체는 비어있을 것입니다 (예, 테스트에서 이전에 채웠습니다)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 찾은 유일한 솔루션은 @SessionAttribute를 다음과 같이 사용하는 것 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.petrikainulainen.net/programming/spring-framework/integration-testing-of-spring-mvc-applications-forms/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입니다. Spring MVC 애플리케이션의 통합 테스트 : Forms&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 나는 이것이 필요한 모든 컨트롤러의 끝에서 complete 호출을 기억해야한다는 생각을 싫어합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 양식 데이터가 세션 내부에있을 필요는 없지만 하나의 요청에만 필요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래서 지금 당장 생각할 수있는 유일한 것은 MockHttpServletRequestBuilder를 사용하는 Util 클래스를 작성하여 리플렉션을 사용하여 모든 개체 필드를 .param으로 추가하거나 각 테스트 케이스에 대해 개별적으로 추가하는 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;몰라, 직관적이지 않은 느낌 .. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 좋아하는 것을 더 쉽게 만들 수있는 방법에 대한 생각 / 아이디어가 있습니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(컨트롤러를 직접 호출하는 것 외에는)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;감사!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;통합 테스트의 주요 목적 중 하나는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;MockMvc&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모델 개체가 양식 데이터로 올바르게 채워져 있는지 확인하는 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이를 위해서는 실제 양식에서 전달되는 양식 데이터를 전달해야합니다 (사용 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;.param()&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;). &lt;/font&gt;&lt;/font&gt;&lt;code&gt;NewObject&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;데이터에서 데이터로의 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자동 변환을 사용하는 경우 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;테스트는 특정 클래스의 가능한 문제 ( &lt;/font&gt;&lt;/font&gt;&lt;code&gt;NewObject&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;실제 형식과 호환되지 않는 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수정)를 다루지 않습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 똑같은 질문을했고 JSON 마샬 러를 사용하여 솔루션이 상당히 간단하다는 것이 밝혀졌습니다. &lt;/font&gt;&lt;/font&gt;&lt;br&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컨트롤러 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;@ModelAttribute(&quot;newObject&quot;)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;@RequestBody&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이렇게 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Controller&lt;font&gt;&lt;/font&gt;
@RequestMapping(value = &quot;/somewhere/new&quot;)&lt;font&gt;&lt;/font&gt;
public class SomewhereController {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    @RequestMapping(method = RequestMethod.POST)&lt;font&gt;&lt;/font&gt;
    public String post(@RequestBody NewObject newObject) {&lt;font&gt;&lt;/font&gt;
        // ...&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 테스트에서 다음과 같이 간단히 말할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;NewObject newObjectInstance = new NewObject();&lt;font&gt;&lt;/font&gt;
// setting fields for the NewObject  &lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
mockMvc.perform(MockMvcRequestBuilders.post(uri)&lt;font&gt;&lt;/font&gt;
  .content(asJsonString(newObjectInstance))&lt;font&gt;&lt;/font&gt;
  .contentType(MediaType.APPLICATION_JSON)&lt;font&gt;&lt;/font&gt;
  .accept(MediaType.APPLICATION_JSON));&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;어디 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;asJsonString&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;방법은 그냥 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public static String asJsonString(final Object obj) {&lt;font&gt;&lt;/font&gt;
    try {&lt;font&gt;&lt;/font&gt;
        final ObjectMapper mapper = new ObjectMapper();&lt;font&gt;&lt;/font&gt;
        final String jsonContent = mapper.writeValueAsString(obj);&lt;font&gt;&lt;/font&gt;
        return jsonContent;&lt;font&gt;&lt;/font&gt;
    } catch (Exception e) {&lt;font&gt;&lt;/font&gt;
        throw new RuntimeException(e);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}  &lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;테스트 클래스에 대한 가져 오기를 포함하여 Spring Boot 1.4를 사용하는 가장 간단한 대답이 있다고 생각합니다. :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public class SomeClass {  /// this goes in it's own file&lt;font&gt;&lt;/font&gt;
//// fields go here&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
import org.junit.Before&lt;font&gt;&lt;/font&gt;
import org.junit.Test&lt;font&gt;&lt;/font&gt;
import org.junit.runner.RunWith&lt;font&gt;&lt;/font&gt;
import org.springframework.beans.factory.annotation.Autowired&lt;font&gt;&lt;/font&gt;
import org.springframework.boot.test.autoconfigure.web.servlet.WebMvcTest&lt;font&gt;&lt;/font&gt;
import org.springframework.http.MediaType&lt;font&gt;&lt;/font&gt;
import org.springframework.test.context.junit4.SpringRunner&lt;font&gt;&lt;/font&gt;
import org.springframework.test.web.servlet.MockMvc&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post&lt;font&gt;&lt;/font&gt;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
@RunWith(SpringRunner.class)&lt;font&gt;&lt;/font&gt;
@WebMvcTest(SomeController.class)&lt;font&gt;&lt;/font&gt;
public class ControllerTest {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  @Autowired private MockMvc mvc;&lt;font&gt;&lt;/font&gt;
  @Autowired private ObjectMapper mapper;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  private SomeClass someClass;  //this could be Autowired&lt;font&gt;&lt;/font&gt;
                                //, initialized in the test method&lt;font&gt;&lt;/font&gt;
                                //, or created in setup block&lt;font&gt;&lt;/font&gt;
  @Before&lt;font&gt;&lt;/font&gt;
  public void setup() {&lt;font&gt;&lt;/font&gt;
    someClass = new SomeClass(); &lt;font&gt;&lt;/font&gt;
  }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  @Test&lt;font&gt;&lt;/font&gt;
  public void postTest() {&lt;font&gt;&lt;/font&gt;
    String json = mapper.writeValueAsString(someClass);&lt;font&gt;&lt;/font&gt;
    mvc.perform(post(&quot;/someControllerUrl&quot;)&lt;font&gt;&lt;/font&gt;
       .contentType(MediaType.APPLICATION_JSON)&lt;font&gt;&lt;/font&gt;
       .content(json)&lt;font&gt;&lt;/font&gt;
       .accept(MediaType.APPLICATION_JSON))&lt;font&gt;&lt;/font&gt;
       .andExpect(status().isOk());&lt;font&gt;&lt;/font&gt;
  }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이러한 솔루션의 대부분은 너무 복잡하다고 생각합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 당신의 테스트 컨트롤러에 이것을 가지고 있다고 가정합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt; @Autowired&lt;font&gt;&lt;/font&gt;
 private ObjectMapper objectMapper;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;휴식 서비스라면&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt; &lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;@Test&lt;font&gt;&lt;/font&gt;
public void test() throws Exception {&lt;font&gt;&lt;/font&gt;
   mockMvc.perform(post(&quot;/person&quot;))&lt;font&gt;&lt;/font&gt;
          .contentType(MediaType.APPLICATION_JSON)&lt;font&gt;&lt;/font&gt;
          .content(objectMapper.writeValueAsString(new Person()))&lt;font&gt;&lt;/font&gt;
          ...etc&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;게시 된 양식을 사용하는 봄 mvc의&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 경우이 솔루션을 생각해 냈습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(아직 좋은 아이디어인지 확실하지 않음)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;private MultiValueMap&amp;lt;String, String&amp;gt; toFormParams(Object o, Set&amp;lt;String&amp;gt; excludeFields) throws Exception {&lt;font&gt;&lt;/font&gt;
    ObjectReader reader = objectMapper.readerFor(Map.class);&lt;font&gt;&lt;/font&gt;
    Map&amp;lt;String, String&amp;gt; map = reader.readValue(objectMapper.writeValueAsString(o));&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    MultiValueMap&amp;lt;String, String&amp;gt; multiValueMap = new LinkedMultiValueMap&amp;lt;&amp;gt;();&lt;font&gt;&lt;/font&gt;
    map.entrySet().stream()&lt;font&gt;&lt;/font&gt;
            .filter(e -&amp;gt; !excludeFields.contains(e.getKey()))&lt;font&gt;&lt;/font&gt;
            .forEach(e -&amp;gt; multiValueMap.add(e.getKey(), (e.getValue() == null ? &quot;&quot; : e.getValue())));&lt;font&gt;&lt;/font&gt;
    return multiValueMap;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
@Test&lt;font&gt;&lt;/font&gt;
public void test() throws Exception {&lt;font&gt;&lt;/font&gt;
  MultiValueMap&amp;lt;String, String&amp;gt; formParams = toFormParams(new Phone(), &lt;font&gt;&lt;/font&gt;
  Set.of(&quot;id&quot;, &quot;created&quot;));&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
   mockMvc.perform(post(&quot;/person&quot;))&lt;font&gt;&lt;/font&gt;
          .contentType(MediaType.APPLICATION_FORM_URLENCODED)&lt;font&gt;&lt;/font&gt;
          .params(formParams))&lt;font&gt;&lt;/font&gt;
          ...etc&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본 아이디어는 모든 필드 이름을 쉽게 얻기 위해 먼저 객체를 json 문자열로 변환하는 것입니다.이 json 문자열을 맵으로 변환 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;MultiValueMap&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하고 스프링이 예상 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는대로 덤프합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;선택적으로 포함하지 않으려는 필드를 필터링합니다 (또는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;@JsonIgnore&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 추가 단계를 피하기 위해 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필드에 주석을 달 수 있음 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;리플렉션으로 해결하는 또 다른 방법이지만 마샬링은 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 추상 도우미 클래스가 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public abstract class MvcIntegrationTestUtils {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
       public static MockHttpServletRequestBuilder postForm(String url,&lt;font&gt;&lt;/font&gt;
                 Object modelAttribute, String... propertyPaths) {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
              try {&lt;font&gt;&lt;/font&gt;
                     MockHttpServletRequestBuilder form = post(url).characterEncoding(&lt;font&gt;&lt;/font&gt;
                           &quot;UTF-8&quot;).contentType(MediaType.APPLICATION_FORM_URLENCODED);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
                     for (String path : propertyPaths) {&lt;font&gt;&lt;/font&gt;
                            form.param(path, BeanUtils.getProperty(modelAttribute, path));&lt;font&gt;&lt;/font&gt;
                     }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
                     return form;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
              } catch (Exception e) {&lt;font&gt;&lt;/font&gt;
                     throw new RuntimeException(e);&lt;font&gt;&lt;/font&gt;
              }&lt;font&gt;&lt;/font&gt;
     }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음과 같이 사용합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;// static import (optional)&lt;font&gt;&lt;/font&gt;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
// in your test method, populate your model attribute object (yes, works with nested properties)&lt;font&gt;&lt;/font&gt;
BlogSetup bgs = new BlogSetup();&lt;font&gt;&lt;/font&gt;
      bgs.getBlog().setBlogTitle(&quot;Test Blog&quot;);&lt;font&gt;&lt;/font&gt;
      bgs.getUser().setEmail(&quot;admin.localhost@example.com&quot;);&lt;font&gt;&lt;/font&gt;
    bgs.getUser().setFirstName(&quot;Administrator&quot;);&lt;font&gt;&lt;/font&gt;
      bgs.getUser().setLastName(&quot;Localhost&quot;);&lt;font&gt;&lt;/font&gt;
      bgs.getUser().setPassword(&quot;password&quot;);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
// finally put it together&lt;font&gt;&lt;/font&gt;
mockMvc.perform(&lt;font&gt;&lt;/font&gt;
            postForm(&quot;/blogs/create&quot;, bgs, &quot;blog.blogTitle&quot;, &quot;user.email&quot;,&lt;font&gt;&lt;/font&gt;
                    &quot;user.firstName&quot;, &quot;user.lastName&quot;, &quot;user.password&quot;))&lt;font&gt;&lt;/font&gt;
            .andExpect(status().isOk())&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;테스트에서 변경해야하기 때문에 양식을 작성할 때 속성 경로를 언급 할 수있는 것이 더 낫다고 추론했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 누락 된 입력에 대해 유효성 검사 오류가 발생하는지 확인하고 조건을 시뮬레이션하기 위해 속성 경로를 생략합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 @Before 메서드에서 모델 속성을 빌드하는 것이 더 쉽습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;BeanUtils는 commons-beanutils에서 가져 왔습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;    &amp;lt;dependency&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;groupId&amp;gt;commons-beanutils&amp;lt;/groupId&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;artifactId&amp;gt;commons-beanutils&amp;lt;/artifactId&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;version&amp;gt;1.8.3&amp;lt;/version&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/dependency&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 얼마 전에 같은 문제를 만났고 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/FasterXML/jackson&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Jackson의&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 도움을 받아 반사를 사용하여 해결했습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;먼저 오브젝트의 모든 필드로 맵을 채 웁니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그런 다음 해당 맵 항목을 MockHttpServletRequestBuilder에 매개 변수로 추가합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이러한 방식으로 모든 Object를 사용할 수 있으며 요청 매개 변수로 전달합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 거기에 다른 해결책이 있다고 확신하지만 이것은 우리를 위해 일했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;    @Test&lt;font&gt;&lt;/font&gt;
    public void testFormEdit() throws Exception {&lt;font&gt;&lt;/font&gt;
        getMockMvc()&lt;font&gt;&lt;/font&gt;
                .perform(&lt;font&gt;&lt;/font&gt;
                        addFormParameters(post(servletPath + tableRootUrl + &quot;/&quot; + POST_FORM_EDIT_URL).servletPath(servletPath)&lt;font&gt;&lt;/font&gt;
                                .param(&quot;entityID&quot;, entityId), validEntity)).andDo(print()).andExpect(status().isOk())&lt;font&gt;&lt;/font&gt;
                .andExpect(content().contentType(MediaType.APPLICATION_JSON)).andExpect(content().string(equalTo(entityId)));&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private MockHttpServletRequestBuilder addFormParameters(MockHttpServletRequestBuilder builder, Object object)&lt;font&gt;&lt;/font&gt;
            throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        SimpleDateFormat dateFormat = new SimpleDateFormat(applicationSettings.getApplicationDateFormat());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        Map&amp;lt;String, ?&amp;gt; propertyValues = getPropertyValues(object, dateFormat);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        for (Entry&amp;lt;String, ?&amp;gt; entry : propertyValues.entrySet()) {&lt;font&gt;&lt;/font&gt;
            builder.param(entry.getKey(),&lt;font&gt;&lt;/font&gt;
                    Util.prepareDisplayValue(entry.getValue(), applicationSettings.getApplicationDateFormat()));&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return builder;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private Map&amp;lt;String, ?&amp;gt; getPropertyValues(Object object, DateFormat dateFormat) {&lt;font&gt;&lt;/font&gt;
        ObjectMapper mapper = new ObjectMapper();&lt;font&gt;&lt;/font&gt;
        mapper.setDateFormat(dateFormat);&lt;font&gt;&lt;/font&gt;
        mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);&lt;font&gt;&lt;/font&gt;
        mapper.registerModule(new JodaModule());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        TypeReference&amp;lt;HashMap&amp;lt;String, ?&amp;gt;&amp;gt; typeRef = new TypeReference&amp;lt;HashMap&amp;lt;String, ?&amp;gt;&amp;gt;() {};&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        Map&amp;lt;String, ?&amp;gt; returnValues = mapper.convertValue(object, typeRef);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return returnValues;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Here is the method I made to transform recursively the fields of an object in a map ready to be used with a &lt;code&gt;MockHttpServletRequestBuilder&lt;/code&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public static void objectToPostParams(final String key, final Object value, final Map&amp;lt;String, String&amp;gt; map) throws IllegalAccessException {&lt;font&gt;&lt;/font&gt;
    if ((value instanceof Number) || (value instanceof Enum) || (value instanceof String)) {&lt;font&gt;&lt;/font&gt;
        map.put(key, value.toString());&lt;font&gt;&lt;/font&gt;
    } else if (value instanceof Date) {&lt;font&gt;&lt;/font&gt;
        map.put(key, new SimpleDateFormat(&quot;yyyy-MM-dd HH:mm&quot;).format((Date) value));&lt;font&gt;&lt;/font&gt;
    } else if (value instanceof GenericDTO) {&lt;font&gt;&lt;/font&gt;
        final Map&amp;lt;String, Object&amp;gt; fieldsMap = ReflectionUtils.getFieldsMap((GenericDTO) value);&lt;font&gt;&lt;/font&gt;
        for (final Entry&amp;lt;String, Object&amp;gt; entry : fieldsMap.entrySet()) {&lt;font&gt;&lt;/font&gt;
            final StringBuilder sb = new StringBuilder();&lt;font&gt;&lt;/font&gt;
            if (!GenericValidator.isEmpty(key)) {&lt;font&gt;&lt;/font&gt;
                sb.append(key).append('.');&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
            sb.append(entry.getKey());&lt;font&gt;&lt;/font&gt;
            objectToPostParams(sb.toString(), entry.getValue(), map);&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    } else if (value instanceof List) {&lt;font&gt;&lt;/font&gt;
        for (int i = 0; i &amp;lt; ((List) value).size(); i++) {&lt;font&gt;&lt;/font&gt;
            objectToPostParams(key + '[' + i + ']', ((List) value).get(i), map);&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;code&gt;GenericDTO&lt;/code&gt; is a simple class extending &lt;code&gt;Serializable&lt;/code&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public interface GenericDTO extends Serializable {}
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;and here is the &lt;code&gt;ReflectionUtils&lt;/code&gt; class&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public final class ReflectionUtils {&lt;font&gt;&lt;/font&gt;
    public static List&amp;lt;Field&amp;gt; getAllFields(final List&amp;lt;Field&amp;gt; fields, final Class&amp;lt;?&amp;gt; type) {&lt;font&gt;&lt;/font&gt;
        if (type.getSuperclass() != null) {&lt;font&gt;&lt;/font&gt;
            getAllFields(fields, type.getSuperclass());&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        // if a field is overwritten in the child class, the one in the parent is removed&lt;font&gt;&lt;/font&gt;
        fields.addAll(Arrays.asList(type.getDeclaredFields()).stream().map(field -&amp;gt; {&lt;font&gt;&lt;/font&gt;
            final Iterator&amp;lt;Field&amp;gt; iterator = fields.iterator();&lt;font&gt;&lt;/font&gt;
            while(iterator.hasNext()){&lt;font&gt;&lt;/font&gt;
                final Field fieldTmp = iterator.next();&lt;font&gt;&lt;/font&gt;
                if (fieldTmp.getName().equals(field.getName())) {&lt;font&gt;&lt;/font&gt;
                    iterator.remove();&lt;font&gt;&lt;/font&gt;
                    break;&lt;font&gt;&lt;/font&gt;
                }&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
            return field;&lt;font&gt;&lt;/font&gt;
        }).collect(Collectors.toList()));&lt;font&gt;&lt;/font&gt;
        return fields;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public static Map&amp;lt;String, Object&amp;gt; getFieldsMap(final GenericDTO genericDTO) throws IllegalAccessException {&lt;font&gt;&lt;/font&gt;
        final Map&amp;lt;String, Object&amp;gt; map = new HashMap&amp;lt;&amp;gt;();&lt;font&gt;&lt;/font&gt;
        final List&amp;lt;Field&amp;gt; fields = new ArrayList&amp;lt;&amp;gt;();&lt;font&gt;&lt;/font&gt;
        getAllFields(fields, genericDTO.getClass());&lt;font&gt;&lt;/font&gt;
        for (final Field field : fields) {&lt;font&gt;&lt;/font&gt;
            final boolean isFieldAccessible = field.isAccessible();&lt;font&gt;&lt;/font&gt;
            field.setAccessible(true);&lt;font&gt;&lt;/font&gt;
            map.put(field.getName(), field.get(genericDTO));&lt;font&gt;&lt;/font&gt;
            field.setAccessible(isFieldAccessible);&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        return map;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;You can use it like&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;final MockHttpServletRequestBuilder post = post(&quot;/&quot;);&lt;font&gt;&lt;/font&gt;
final Map&amp;lt;String, String&amp;gt; map = new TreeMap&amp;lt;&amp;gt;();&lt;font&gt;&lt;/font&gt;
objectToPostParams(&quot;&quot;, genericDTO, map);&lt;font&gt;&lt;/font&gt;
for (final Entry&amp;lt;String, String&amp;gt; entry : map.entrySet()) {&lt;font&gt;&lt;/font&gt;
    post.param(entry.getKey(), entry.getValue());&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;I didn't tested it extensively, but it seems to work.&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/17143116/integration-testing-posting-an-entire-object-to-spring-mvc-controller&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/17143116/integration-testing-posting-an-entire-object-to-spring-mvc-controller&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5083</guid>
      <comments>https://hot-time.tistory.com/5083#entry5083comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:25:08 +0900</pubDate>
    </item>
    <item>
      <title>고 루틴에서 반환 값 잡기</title>
      <link>https://hot-time.tistory.com/5082</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;고 루틴에서 반환 값 잡기&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아래 코드는 '예기치 않은 이동'이라는 컴파일 오류를 제공합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;x := go doSomething(arg)&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
func doSomething(arg int) int{&lt;font&gt;&lt;/font&gt;
    ...&lt;font&gt;&lt;/font&gt;
    return my_int_value&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;고 루틴을 사용하지 않고 정상적으로 함수를 호출하면 반환 값을 가져올 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 채널 등을 사용할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 질문은 고 루틴에서 이와 같은 반환 값을 가져올 수없는 이유입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;엄격한 대답은 그렇게 할 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수 있다는&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그것은 아마도 좋은 생각이 아닐 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이를 수행하는 코드는 다음과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;var x int&lt;font&gt;&lt;/font&gt;
go func() {&lt;font&gt;&lt;/font&gt;
    x = doSomething()&lt;font&gt;&lt;/font&gt;
}()&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 계산 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;doSomething()&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;한 다음 결과를에 할당 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 새로운 고 루틴을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;생성합니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;x&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문제는 : &lt;/font&gt;&lt;/font&gt;&lt;code&gt;x&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원래 고 루틴에서 어떻게 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용할 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;것인가? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;경합 상태가 없도록 생성 된 고 루틴이 완료되었는지 확인하고 싶을 것입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지만 그렇게하려면 고 루틴과 통신 할 방법이 필요합니다. 그렇게 할 방법이 있다면 값을 다시 보내는 데 사용하는 것이 어떻습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;h3&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;고 루틴에서 반환 값을 가져와 변수에 할당 할 수없는 이유는 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/h3&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;goroutine을 (비동기 적으로) 실행하고 함수에서 반환 값을 가져 오는 것은 본질적으로 모순되는 작업입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;당신이 말할 때 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;go&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;당신은 의미 &quot;비동기 적으로 그것을&quot;또는 간단 : &quot;할 일에 이동 완료 될 기능 실행을 위해 기다릴 수 없다&quot;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 함수 반환 값을 변수에 할당하면 변수 내에이 값이있을 것으로 예상합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그래서 당신이 그렇게 할 때 당신은 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;x := go doSomething(arg)&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;계속, 함수를 기다리지 마십시오! Wait-wait-wait! 반환 된 값이 필요합니다. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;x&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;바로 아래 줄 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에서 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;var에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;접근 할 수 있어야 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다!&quot;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;h3&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;채널&lt;/font&gt;&lt;/font&gt;&lt;/h3&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;고 루틴에서 값을 가져 오는 가장 자연스러운 방법은 채널입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;채널은 동시 고 루틴을 연결하는 파이프입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;한 고 루틴에서 채널로 값을 보내고 다른 고 루틴이나 동기 함수에서 해당 값을 수신 할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음을 사용하여 동시성을 깨지 않고 goroutine에서 값을 쉽게 얻을 수 있습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;select&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;func main() {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    c1 := make(chan string)&lt;font&gt;&lt;/font&gt;
    c2 := make(chan string)&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    go func() {&lt;font&gt;&lt;/font&gt;
        time.Sleep(time.Second * 1)&lt;font&gt;&lt;/font&gt;
        c1 &amp;lt;- &quot;one&quot;&lt;font&gt;&lt;/font&gt;
    }()&lt;font&gt;&lt;/font&gt;
    go func() {&lt;font&gt;&lt;/font&gt;
        time.Sleep(time.Second * 2)&lt;font&gt;&lt;/font&gt;
        c2 &amp;lt;- &quot;two&quot;&lt;font&gt;&lt;/font&gt;
    }()&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    for i := 0; i &amp;lt; 2; i++ {&lt;font&gt;&lt;/font&gt;
        // Await both of these values&lt;font&gt;&lt;/font&gt;
        // simultaneously, printing each one as it arrives.&lt;font&gt;&lt;/font&gt;
        select {&lt;font&gt;&lt;/font&gt;
        case msg1 := &amp;lt;-c1:&lt;font&gt;&lt;/font&gt;
            fmt.Println(&quot;received&quot;, msg1)&lt;font&gt;&lt;/font&gt;
        case msg2 := &amp;lt;-c2:&lt;font&gt;&lt;/font&gt;
            fmt.Println(&quot;received&quot;, msg2)&lt;font&gt;&lt;/font&gt;
        } &lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예제는 Go By Example에서 가져온 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;/p&gt; 
&lt;h3&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;CSP 및 메시지 전달&lt;/font&gt;&lt;/font&gt;&lt;/h3&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Go는 대체로 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://en.wikipedia.org/wiki/Communicating_sequential_processes&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;CSP 이론을&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 기반으로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 순진한 설명은 CSP 측면에서 정확하게 설명 될 수 있습니다 (물론 문제의 범위를 벗어난 것으로 생각합니다). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;적어도 RAD이기 때문에 CSP 이론에 익숙해지는 것이 좋습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 짧은 인용문은 생각의 방향을 제시합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;As its name suggests, CSP allows the description of systems in terms of component processes that &lt;strong&gt;operate independently&lt;/strong&gt;, and interact with each other solely through &lt;strong&gt;message-passing communication&lt;/strong&gt;. &lt;/p&gt; 
 &lt;p&gt;In computer science, message passing sends a message to a process and relies on the process and the supporting infrastructure to select and invoke the actual code to run. Message passing differs from conventional programming where a process, subroutine, or function is directly invoked by name.&lt;/p&gt; 
&lt;/blockquote&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;The idea of the &lt;code&gt;go&lt;/code&gt; keyword is that you run the doSomething function asynchronously, and continue the current goroutine without waiting for the result, kind of like executing a command in a Bash shell with an '&amp;amp;' after it. If you want to do&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;x := doSomething(arg)&lt;font&gt;&lt;/font&gt;
// Now do something with x&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;then you need the current goroutine to block until doSomething finishes. So why not just call doSomething &lt;em&gt;in&lt;/em&gt; the current goroutine? There are other options (like, doSomething could post a result to a channel, which the current goroutine receives values from) but simply calling doSomething and assigning the result to a variable is obviously simpler.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;It's a design choice by Go creators. There's a whole lot of abstractions/APIs to represent the value of async I/O operations - &lt;code&gt;promise&lt;/code&gt;, &lt;code&gt;future&lt;/code&gt;, &lt;code&gt;async/await&lt;/code&gt;, &lt;code&gt;callback&lt;/code&gt;, &lt;code&gt;observable&lt;/code&gt;, etc. These abstractions/APIs are inherently tied to the unit of scheduling - &lt;strong&gt;coroutines&lt;/strong&gt; - and these abstractions/APIs dictate how coroutines (or more precisely the return value of async I/O represented by them) can be &lt;em&gt;composed&lt;/em&gt;. &lt;/p&gt; 
&lt;p&gt;Go chose message passing (aka &lt;em&gt;channels&lt;/em&gt;) as the abstraction/API to represent the return value of async I/O operations. And of course, goroutines and channels give you a composable tool to implement async I/O operations.&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/20945069/catching-return-values-from-goroutines&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/20945069/catching-return-values-from-goroutines&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5082</guid>
      <comments>https://hot-time.tistory.com/5082#entry5082comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:24:55 +0900</pubDate>
    </item>
    <item>
      <title>enum에서 내부 인터페이스를 구현할 때 순환 상속</title>
      <link>https://hot-time.tistory.com/5081</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;enum에서 내부 인터페이스를 구현할 때 순환 상속&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컴파일러 오류를 제공하는 다음 구현이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public enum FusionStat implements MonsterStatBuilderHelper {&lt;font&gt;&lt;/font&gt;
    ATTACK {&lt;font&gt;&lt;/font&gt;
        @Override&lt;font&gt;&lt;/font&gt;
        public MonsterCard.MonsterCardBuilder safeCreateBuilder(final MonsterCard baseMonsterCard, final MonsterCard fusedMonsterCard, final FusionCard fusionCard) {&lt;font&gt;&lt;/font&gt;
            Objects.requireNonNull(baseMonsterCard);&lt;font&gt;&lt;/font&gt;
            Objects.requireNonNull(fusedMonsterCard);&lt;font&gt;&lt;/font&gt;
            Objects.requireNonNull(fusionCard);&lt;font&gt;&lt;/font&gt;
            if (baseMonsterCard.equals(fusedMonsterCard)) {&lt;font&gt;&lt;/font&gt;
                throw new IllegalArgumentException(&quot;baseMonsterCard and fusedMonsterCard need to be different&quot;);&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
            return new MonsterCard.MonsterCardBuilder(baseMonsterCard)&lt;font&gt;&lt;/font&gt;
                    .attack(baseMonsterCard.getAttack() + (fusionCard.getFusionPower() * fusedMonsterCard.getAttack()));&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    },&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    HITPOINTS {&lt;font&gt;&lt;/font&gt;
        @Override&lt;font&gt;&lt;/font&gt;
        public MonsterCard.MonsterCardBuilder safeCreateBuilder(final MonsterCard baseMonsterCard, final MonsterCard fusedMonsterCard, final FusionCard fusionCard) {&lt;font&gt;&lt;/font&gt;
            Objects.requireNonNull(baseMonsterCard);&lt;font&gt;&lt;/font&gt;
            Objects.requireNonNull(fusedMonsterCard);&lt;font&gt;&lt;/font&gt;
            Objects.requireNonNull(fusionCard);&lt;font&gt;&lt;/font&gt;
            if (baseMonsterCard.equals(fusedMonsterCard)) {&lt;font&gt;&lt;/font&gt;
                throw new IllegalArgumentException(&quot;baseMonsterCard and fusedMonsterCard need to be different&quot;);&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
            return new MonsterCard.MonsterCardBuilder(baseMonsterCard)&lt;font&gt;&lt;/font&gt;
                    .maximumHitpoints((int)(baseMonsterCard.getMaximumHitpoints() + (fusionCard.getFusionPower() / 100d * fusedMonsterCard.getMaximumHitpoints())))&lt;font&gt;&lt;/font&gt;
                    .hitpoints((int)(baseMonsterCard.getHitpoints() + (fusionCard.getFusionPower() / 100d * fusedMonsterCard.getHitpoints())));&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    };&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    protected interface MonsterStatBuilderHelper extends MonsterStatBuilder {&lt;font&gt;&lt;/font&gt;
        default MonsterCard.MonsterCardBuilder safeCreateBuilder(final MonsterCard baseMonsterCard, final MonsterCard fusedMonsterCard, final FusionCard fusionCard) {&lt;font&gt;&lt;/font&gt;
            return createBuilder(baseMonsterCard, fusedMonsterCard, fusionCard);&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
@FunctionalInterface&lt;font&gt;&lt;/font&gt;
interface MonsterStatBuilder {&lt;font&gt;&lt;/font&gt;
    MonsterCard.MonsterCardBuilder createBuilder(final MonsterCard baseMonsterCard, final MonsterCard fusedMonsterCard, final FusionCard fusionCard);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;첫 번째 줄에 순환 상속 오류가 발생합니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;involving FusionStat&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 무슨 일이 일어나고 있는지 정확히 보지 못합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 처음에 추상 클래스를 구현했고 enum이 클래스를 확장 할 수 없다는 것을 깨달을 때까지 enum이 그것을 확장하도록하고 싶었습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 Java 8의 기본 메서드를 (남용) 사용하려고합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 코드가 컴파일되지 않는 이유에 대한 생각 프로세스에 관심이 있습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;safeCreateBuilder&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;중복 된 코드를 내부로 가져 와서 코드 중복을 제거하려고했습니다 (여전히 그렇게해야 함) &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이는 해당 클래스에서 상속하는 클래스 내부에서 구현 (상속)하는 인터페이스를 구현 (코딩)하고 있기 때문입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그 문장을 더 좋게 만들 수 있으면 좋겠다 ...&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 여기에 시각적 인 예가 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;Class A implements Interface B {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    Interface B {&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;As far as I know, this is not allowed. You need to define the interface outside of the class (in this case, an Enum).&lt;/p&gt; 
&lt;p&gt;Like so:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;Interface B {&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
Class A implements Interface B {&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Best practice is probably to break them up into different files.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;code&gt;FusionStat&lt;/code&gt; is defined as implementing &lt;code&gt;MonsterStatBuilderHelper&lt;/code&gt;, yet inside this enum you try to declare the interface &lt;code&gt;MonsterStatBuilderHelper&lt;/code&gt; which extends &lt;code&gt;MonsterStatBuilder&lt;/code&gt;.&lt;/p&gt; 
&lt;p&gt;I suspect that what you want to do is simply define the method &lt;code&gt;createBuilder()&lt;/code&gt; inside your enum.&lt;/p&gt; 
&lt;p&gt;If you do actually want to define the &lt;code&gt;MonsterStatBuilderHelper&lt;/code&gt; interface, this needs to be done outside the class/enum.&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/23811904/cyclic-inheritance-when-implementing-inner-interface-in-enum&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/23811904/cyclic-inheritance-when-implementing-inner-interface-in-enum&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5081</guid>
      <comments>https://hot-time.tistory.com/5081#entry5081comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:24:46 +0900</pubDate>
    </item>
    <item>
      <title>휠 형식에서 numpy를 설치할 수 없습니다.</title>
      <link>https://hot-time.tistory.com/5080</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;휠 형식에서 numpy를 설치할 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;whl 파일에서 numpy를 설치하려고합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;오류가 발생합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;numpy-1.9.1%2Bmkl-cp34-none-win_amd64.whl is not a supported wheel on this platform.
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;세부 정보 : Windows 8.1 pro x64, 관리자 권한 명령 프롬프트&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;파이썬 3.4.2&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Gohlke 사이트의&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 패키지 numpy&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;numpy-1.9.1 % 2Bmkl-cp34-none-win_amd64.whl이 pip.exe 폴더에 복사되었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로그 파일에는 다음이 표시됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;hr&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;d : \ Program Files \ WinPython-64bit-3.4.2.4 \ python-3.4.2.amd64 \ Scripts \ pip run on 01/23/15 11:55:21 numpy-1.9.1 % 2Bmkl-cp34-none-win_amd64 .whl은이 플랫폼에서 지원되는 휠이 아닙니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예외 정보 : 역 추적 (최근 호출 마지막) : 파일 &quot;D : \ Python34 \ lib \ site-packages \ pip \ basecommand.py&quot;, 줄 122, 기본 상태 = self.run (options, args) 파일 &quot;D : \ Python34 \ lib \ site-packages \ pip \ commands \ install.py &quot;, 257 행, 실행 InstallRequirement.from_line (name, None)) 파일&quot;D : \ Python34 \ lib \ site-packages \ pip \ req.py &quot;, 167 행, from_line raise UnsupportedWheel (&quot;% s는이 플랫폼에서 지원되는 휠이 아닙니다. &quot;% wheel.filename) pip.exceptions.UnsupportedWheel : numpy-1.9.1 % 2Bmkl-cp34-none-win_amd64.whl은 이 플랫폼에서 지원되는 휠이 아닙니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;뭐가 잘못 되었 니?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단한 대답 : 파일 이름을로 변경하여 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;numpy-1.9.1%2Bmkl-cp34-none-win32.whl&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;설치하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;pip&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;을 실행 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하여 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;도구가 설치에 허용 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 태그를 확인할 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;import pip; print(pip.pep425tags.get_supported())
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 경우 pip는 운영 체제가 32 비트 인 것을 잘못 감지하고 설치하려는 파일이 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;win_amd64&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;파일 이름에 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;파일의 이름을 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;numpy-1.9.1%2Bmkl-cp34-none-win32.whl&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(이제 지원되는 것으로 간주되는 태그를 포함 함) &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;로 바꾸면 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;패키지를 설치할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;파일이 여전히 64 비트 용으로 빌드되었지만 의도 한대로 패키지를 설치할 수 있기 때문에 트릭입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;몇 번의 테스트 후 문제는 &quot;win32&quot;또는 &quot;amd64&quot;자체라고 생각합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 그 둘을 &quot;any&quot;로 바꾸려고 시도했고 그것은 작동했다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;저는 이런 종류의 설치 / 컴파일에 대한 초보자이기 때문에 누군가를 오도했다면 실례합니다. 저에게 효과가 있다면 다른 사람에게도 효과가있을 것이라고 생각했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;필자의 경우 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;파이썬 (3.4.4 (AMD64))에 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;gohlke&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 패키지 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;를 설치하는 해결 방법 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;은 위의 &quot;win *&quot;부분이 아닌 &quot;cp34m&quot;부분을 변경하는 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;python -c &quot;import pip; print (pip.pep425tags.get_supported ())&quot;:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;[('cp34', 'none', 'win_amd64'), ('py3', 'none', 'win_amd64'), &lt;font&gt;&lt;/font&gt;
('cp34', 'none', 'any'), ...&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ls -ld * :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;matplotlib-2.0.0b3-cp34-cp34m-win_amd64.whl&lt;font&gt;&lt;/font&gt;
numpy-1.11.1+mkl-cp34-cp34m-win_amd64.whl&lt;font&gt;&lt;/font&gt;
pandas-0.18.1-cp34-cp34m-win_amd64.whl&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;위의 이름을 다음으로 변경 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;matplotlib-2.0.0b3-cp34-none-win_amd64.whl&lt;font&gt;&lt;/font&gt;
numpy-1.11.1+mkl-cp34-none-win_amd64.whl&lt;font&gt;&lt;/font&gt;
pandas-0.18.1-cp34-none-win_amd64.whl&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예 : pip install matplotlib-2.0.0b3-cp34-none-win_amd64.whl&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;Processing ...&lt;font&gt;&lt;/font&gt;
...Successfully installed matplotlib-2.0.0b3&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 가능한 솔루션 목록에 추가하려면 pip 자체를 업그레이드해야했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Gholke 사이트의 최신 바이너리에는 &quot;cp27m&quot;태그가 있었는데, 다음을 사용하여 pip 태그를 확인할 때 표시되지 않았습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;import pip; print(pip.pep425tags.get_supported())
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;pip를 업그레이드 한 후 휠이 작동하지 않았지만 정기적으로 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;pip install numpy&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;작동했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;현재 Winpython 패키지 관리자는 새로운 numpy + mkl 'wheel'을 인식하기 위해 2 자 수정이 필요합니다. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/stonebig/winpython/commit/5e13230609a2e9f4d66d98c3776207ce4b4dd050&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://github.com/stonebig/winpython/commit/5e13230609a2e9f4d66d98c3776207ce4b4dd050&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;해결 방법으로 numpy 패키지를 제거하십시오. pip uninstall numpy 다음 캐시에서 다시 설치하십시오. pip install numpy 3.4.1에서 3.4.2로 업그레이드 한 후 여러 패키지에서 동일한 문제가 발생했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용자가있는 디렉토리로 이동 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;'pip.py'&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;한 다음 win 명령에 다음을 입력 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;'..\python.exe pip.py install name_of_package.whl'&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;작동합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 제안 된 해결책으로 해결하려고 같은 문제를 겪었습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;win64를 win32로 변경했는데 제대로 작동하지 않았습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 나는 이름을 원본으로 변경했고 이번에는 작동했습니다! &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 한 유일한 추가 작업은 오프라인으로 전환하는 것이 었습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;If you have, say, Python 3.4 installed, make sure to install the &lt;code&gt;-cp34-&lt;/code&gt; version of the wheel and not &lt;code&gt;-cp35-&lt;/code&gt;.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;This has nothing to do with your operating system. Uninstall Python 32bit and install Python 64bit rather or alternatively find a 32bit wheel file.&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/28107123/cannot-install-numpy-from-wheel-format&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/28107123/cannot-install-numpy-from-wheel-format&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5080</guid>
      <comments>https://hot-time.tistory.com/5080#entry5080comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:24:37 +0900</pubDate>
    </item>
    <item>
      <title>수학 파서의 스마트 디자인?</title>
      <link>https://hot-time.tistory.com/5079</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수학 파서의 스마트 디자인?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수학 파서를 디자인하는 가장 현명한 방법은 무엇입니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 말은 수학 문자열 (예 : &quot;2 + 3/2 + (2 * 5)&quot;)을 받아서 계산 된 값을 반환하는 함수입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 오래 전에 VB6에서 하나를 작성했지만 결국 부풀어 오르고 휴대 성이 좋지 않습니다 (또는 그 문제에 대해 똑똑합니다 ...). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일반적인 아이디어, 의사 코드 또는 실제 코드가 높이 평가됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;꽤 좋은 접근법은 두 단계를 포함합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;첫 번째 단계는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://scriptasylum.com/tutorials/infix_postfix/algorithms/infix-postfix/index.htm&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;식을 infix에서 postfix로 변환하는 것입니다&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; (예 : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Shunting-yard_algorithm&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Dijkstra의 shunting yard 사용&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; ). &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;완료되면 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://scriptasylum.com/tutorials/infix_postfix/algorithms/postfix-evaluation/index.htm&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;후위 평가자&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 를 작성하는 것은 매우 간단합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수학 파서 설계에 대한 몇 가지 블로그 게시물을 작성했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일반적인 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://lukaszwrobel.pl/blog/math-parser-part-1-introduction&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;소개&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://lukaszwrobel.pl/blog/math-parser-part-2-grammar&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;문법&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대한 기본 지식 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://lukaszwrobel.pl/blog/math-parser-part-3-implementation&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Ruby로 작성된 샘플 구현&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 및 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://lukaszwrobel.pl/blog/math-parser-part-4-tests&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;테스트 스위트가&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아마도 이러한 자료가 유용 할 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;몇 가지 접근 방식이 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;많은 코드를 작성할 필요없이 답을 얻기 위해 동적 코드를 생성하고 실행할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.NET에서 런타임 생성 코드를 검색하기 만하면 주변에 많은 예제가 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 실제 파서를 만들고 식을 평가하는 데 사용되는 작은 구문 분석 트리를 생성 할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다시 말하지만 이것은 기본 표현에 대해 매우 간단합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 거기에 수학 파서를 가지고 있다고 생각하는 codeplex를 확인하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 예제를 포함 할 BNF를 찾으십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컴파일러 개념을 소개하는 모든 웹 사이트에는이를 기본 예제로 포함합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;http://www.codeplex.com/Flee&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Codeplex 표현식 평가 기&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 이것이 오래되었다는 것을 알고 있지만 더 큰 앱의 일부로 계산기를 개발하려고 시도하고 수용 된 답변을 사용하여 몇 가지 문제를 겪었습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;링크는이 문제를 이해하고 해결하는 데 대단히 도움이되었으며 할인되어서는 안됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;저는 Java로 Android 앱을 작성하고 &quot;문자열&quot;이라는 표현의 각 항목에 대해 사용자가 키패드에 입력 할 때 실제로 ArrayList에 문자열을 저장했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;중위에서 후 위로 변환하기 위해 ArrayList의 각 문자열을 반복 한 다음 새로 배열 된 후위 Strings ArrayList를 평가했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 소수의 피연산자 / 연산자에게는 환상적 이었지만 특히식이 정수가 아닌 것으로 평가되기 시작하면서 더 긴 계산이 일관되게 꺼져있었습니다. &lt;/font&gt;&lt;a href=&quot;http://scriptasylum.com/tutorials/infix_postfix/algorithms/infix-postfix/index.htm&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Infix에서 Postfix 로의 변환을&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 위해 제공된 링크에서&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://scriptasylum.com/tutorials/infix_postfix/algorithms/infix-postfix/index.htm&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;, 스캔 된 항목이 연산자이고 topStack 항목이 더 높은 우선 순위를 갖는 경우 스택을 팝업하도록 제안합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 이것이 거의 정확하다는 것을 알았습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우선 순위가 더 높거나 스캔 한 연산자와 같으면 topStack 항목을 팝하면 마침내 내 계산이 올바르게 나왔습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 문제를 해결하는 모든 사람에게 도움이되기를 바랍니다. 귀중한 링크를 제공 한 Justin Poliey (및 fas?)에게 감사드립니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;항상 켜져있는&quot;응용 프로그램이있는 경우 수학 문자열을 Google에 게시하고 결과를 구문 분석하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;간단한 방법이지만 그것이 필요한지 확실하지 않지만 어떤면에서 똑똑합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/28256/equation-expression-parser-with-precedence&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우선 순위가&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 있는 관련 질문 &lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/28256/equation-expression-parser-with-precedence&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;방정식 (표현식) 파서? &lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;시작하는 방법에 대한 좋은 정보도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;-아담&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;입력이 문자열 형식의 중위식이라고 가정하면이를 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Reverse_Polish_notation&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;접미사&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 로 변환하고 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;한 쌍의 스택 (연산자 스택 및 피연산자 스택)을 사용하여 거기에서 솔루션을 작동 할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Wikipedia 링크에서 일반적인 알고리즘 정보를 찾을 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ANTLR은 매우 멋진 LL (*) 파서 생성기입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 그것을 적극 추천합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;개발자는 항상 깨끗한 접근 방식을 원하고 파싱 로직을 처음부터 구현하려고 시도하며 일반적으로 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://en.wikipedia.org/wiki/Shunting-yard_algorithm&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Dijkstra Shunting-Yard 알고리즘&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 으로 끝납니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;결과는 깔끔하게 보이는 코드이지만 버그가있을 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;저는 이러한 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 작업을 수행 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 API 인 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://code.google.com/p/jmep/&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;JMEP를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 개발 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;했지만 안정적인 코드를 만드는 데 몇 년이 걸렸습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 작업을 수행하더라도 이미 작업이 완료된 후에도 JavaCC 또는 ANTLR 사용으로 전환하려고 진지하게 고려하고있는 프로젝트 페이지에서도 볼 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 질문이 제기 된 후 11 년 후 : 바퀴를 재발 명하고 싶지 않다면 이국적인 수학 파서가 많이 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;산술 연산, 방정식 풀이, 미분 미적분, 적분 미적분, 기본 통계, 함수 / 공식 정의, 그래프 등을 지원하는 몇 년 전에 제가 쓴 글이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/gbenroscience/ParserNG&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ParserNG&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 라고 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하며 무료입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;표현식 평가는 다음과 같이 간단합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;    MathExpression expr = new MathExpression(&quot;(34+32)-44/(8+9(3+2))-22&quot;); &lt;font&gt;&lt;/font&gt;
    System.out.println(&quot;result: &quot; + expr.solve());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    result: 43.16981132075472&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 변수 사용 및 간단한 표현식 계산 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt; MathExpression expr = new MathExpression(&quot;r=3;P=2*pi*r;&quot;); &lt;font&gt;&lt;/font&gt;
System.out.println(&quot;result: &quot; + expr.getValue(&quot;P&quot;));&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 기능 사용 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;MathExpression expr = new MathExpression(&quot;f(x)=39*sin(x^2)+x^3*cos(x);f(3)&quot;); &lt;font&gt;&lt;/font&gt;
System.out.println(&quot;result: &quot; + expr.solve());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
result: -10.65717648378352&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 주어진 지점에서 미분을 평가하려면 (수치가 아닌 기호 미분을 수행하므로 정확도가 수치 근사 오류에 의해 제한되지 않습니다) :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;MathExpression expr = new MathExpression(&quot;f(x)=x^3*ln(x); diff(f,3,1)&quot;); &lt;font&gt;&lt;/font&gt;
System.out.println(&quot;result: &quot; + expr.solve());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
 result: 38.66253179403897&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;code&gt;x^3 * ln(x)&lt;/code&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;x = 3에서 한 번 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;차별화 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;지금은 미분 할 수있는 횟수가 1 회입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또는 수치 적분의 경우 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;MathExpression expr = new MathExpression(&quot;f(x)=2*x; intg(f,1,3)&quot;); &lt;font&gt;&lt;/font&gt;
System.out.println(&quot;result: &quot; + expr.solve());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
result: 7.999999999998261... approx: 8&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 파서는 상당히 빠르며 다른 많은 기능이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Objective C에 대한 바인딩을 통해 Swift로 이식하는 작업이 완료되었으며 다른 반복적 사용 사례 중에서 그래프 응용 프로그램에 사용했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;면책 조항 : ParserNG는 내가 작성했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/114586/smart-design-of-a-math-parser&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/114586/smart-design-of-a-math-parser&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5079</guid>
      <comments>https://hot-time.tistory.com/5079#entry5079comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:24:29 +0900</pubDate>
    </item>
    <item>
      <title>원형 차트의 색상을 선택하는 방법은 무엇입니까?</title>
      <link>https://hot-time.tistory.com/5078</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;원형 차트의 색상을 선택하는 방법은 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;파이 차트 이미지를 생성하는 코드가 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;범용 클래스이므로 원하는 수의 슬라이스를 입력으로 제공 할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 슬라이스에 적합한 색상을 선택하는 데 문제가 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그것에 능숙한 알고리즘이 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아니면 고정 된 색상을 직접 골라 나열해야할까요? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 얼마나 많은가. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아마도 10 가지 색상과 10 조각 이하가되기를 바랍니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 어떤 10 가지 색상을 고를까요?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;색상은 몇 가지 규칙을 따라야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그들은 멋지게 보일 필요가있다&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;인접한 색상은 비슷하지 않아야합니다 (녹색 옆의 파란색은 금지됨).&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;파이 배경색은 흰색이므로 흰색은 옵션에서 제외됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;RGB 값으로 조작하는 일부 알고리즘이 선호되는 솔루션입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;약 20 개의 색상 목록을 미리 컴파일 한 다음 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 번째&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 색상으로 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;반복하기 시작 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이렇게하면 두 번째 규칙을 어 기지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 누군가가 조각이 20 개 이상인 원형 차트를 만들면 더 큰 문제가 발생합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;:)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음과 같이 해결했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본 색상을&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 선택합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;색상&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; ( &lt;/font&gt;&lt;/font&gt;&lt;code&gt;baseHue&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;)을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;계산합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;채도와 광도가 같은 색상을 만듭니다. 색상은 다음과 같이 계산됩니다.&lt;/font&gt;&lt;/font&gt;&lt;pre&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;  hue = baseHue + ((240 / pieces) * 조각 % 240
&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;C #에서 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;int n = 12;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
Color baseColor = System.Drawing.ColorTranslator.FromHtml(&quot;#8A56E2&quot;);&lt;font&gt;&lt;/font&gt;
double baseHue = (new HSLColor(baseColor)).Hue;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
List&amp;lt;Color&amp;gt; colors = new List&amp;lt;Color&amp;gt;();&lt;font&gt;&lt;/font&gt;
colors.Add(baseColor);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
double step = (240.0 / (double)n);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
for (int i = 1; i &amp;lt; n; ++i)&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    HSLColor nextColor = new HSLColor(baseColor);&lt;font&gt;&lt;/font&gt;
    nextColor.Hue = (baseHue + step * ((double)i)) % 240.0;&lt;font&gt;&lt;/font&gt;
    colors.Add((Color)nextColor);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
string colors = string.Join(&quot;,&quot;, colors.Select(e =&amp;gt; e.Name.Substring(2)).ToArray());&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;a href=&quot;http://richnewman.wordpress.com/hslcolor-class/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;HSLColor 클래스를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 사용했습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;12 개 조각과 # 8A56E2의 기본 색상을 사용 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하는 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://chart.apis.google.com/chart?chs=400x225&amp;amp;cht=p&amp;amp;chco=8a56e2,cf56e2,e256ae,e25668,e28956,e2cf56,aee256,68e256,56e289,56e2cf,56aee2,5668e2&amp;amp;chd=t:10,10,10,10,10,10,10,10,10,10,10,10&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Google 차트 예&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/DWsLK.png&quot; alt=&quot;차트 예&quot;&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;정 성적 또는 정량적 정보를 전달하기 위해 색 구성표를 정의하는 데 도움이되는 도구 인 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://colorbrewer.org&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Color Brewer를&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 살펴보십시오 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;:지도, 차트 등.이 도구가 생성 할 수있는 세 가지 &quot;유형&quot;팔레트 (순차적, 정 성적 및 발산) 중 후자가 필요할 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;모든 팔레트의 RGB 정의가 포함 된 Excel 파일을 다운로드 할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 구축 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/a/5651670/59087&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 솔루션은&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 문제의 규칙 # 2, 파이의 중간 점을 중심으로 다음과 같은 알고리즘 스왑 색상을 해결합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 가지 매개 변수 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;pNbColors&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 는 파이의 조각 수입니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;pNonAdjacentSimilarColor&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 인접한 유사한 색상을 가질 것인지 여부를 나타내는 부울입니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 사용하고 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ColorHSL&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; , &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ColorRGB&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 및 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ColorUtils&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; (아래 제공을).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre class=&quot;lang-c# prettyprint-override&quot;&gt;&lt;code&gt;public static function ColorArrayGenerator(&lt;font&gt;&lt;/font&gt;
    pNbColors:int,&lt;font&gt;&lt;/font&gt;
    pNonAdjacentSimilarColor:Boolean = false):Array&lt;font&gt;&lt;/font&gt;
{       &lt;font&gt;&lt;/font&gt;
    var colors:Array = new Array();&lt;font&gt;&lt;/font&gt;
    var baseRGB:ColorRGB = new ColorRGB();&lt;font&gt;&lt;/font&gt;
    baseRGB.setRGBFromUint(0x8A56E2);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    var baseHSL:ColorHSL = new ColorHSL();&lt;font&gt;&lt;/font&gt;
    rgbToHsl(baseHSL, baseRGB);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    var currentHue:Number = baseHSL.Hue;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    colors.push(baseRGB.getUintFromRGB());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    var step:Number = (360.0 / pNbColors);&lt;font&gt;&lt;/font&gt;
    var nextHSL:ColorHSL;&lt;font&gt;&lt;/font&gt;
    var nextRGB:ColorRGB;&lt;font&gt;&lt;/font&gt;
    var i:int;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    for (i = 1; i &amp;lt; pNbColors; i++)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        currentHue += step;&lt;font&gt;&lt;/font&gt;
        if (currentHue &amp;gt; 360)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            currentHue -= 360;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        nextHSL = new ColorHSL(currentHue, baseHSL.Saturation, aseHSL.Luminance);&lt;font&gt;&lt;/font&gt;
        nextRGB = new ColorRGB();&lt;font&gt;&lt;/font&gt;
        hslToRgb(nextRGB, nextHSL);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        colors.push(nextRGB.getUintFromRGB());&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    if (pNonAdjacentSimilarColor == true &amp;amp;&amp;amp;&lt;font&gt;&lt;/font&gt;
        pNbColors &amp;gt; 2)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        var holder:uint = 0;&lt;font&gt;&lt;/font&gt;
        var j:int;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        for (i = 0, j = pNbColors / 2; i &amp;lt; pNbColors / 2; i += 2, j += 2)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            holder = colors[i];&lt;font&gt;&lt;/font&gt;
            colors[i] = colors[j];&lt;font&gt;&lt;/font&gt;
            colors[j] = holder;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    return colors;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러면 오른쪽 출력이 생성됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/lCuiy.png&quot; alt=&quot;비교 이미지&quot;&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ColorHSL 클래스 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;    final public class ColorHSL&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    private var _hue:Number;    // 0.0 .. 359.99999&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private var _sat:Number;    // 0.0 .. 100.0&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private var _lum:Number;    // 0.0 .. 100.0&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function ColorHSL(&lt;font&gt;&lt;/font&gt;
        hue:Number = 0,&lt;font&gt;&lt;/font&gt;
        sat:Number = 0,&lt;font&gt;&lt;/font&gt;
        lum:Number = 0)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        _hue = hue;&lt;font&gt;&lt;/font&gt;
        _sat = sat;&lt;font&gt;&lt;/font&gt;
        _lum = lum;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    [Bindable]public function get Hue():Number&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return _hue;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function set Hue(value:Number):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        if (value &amp;gt; 360) &lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            _hue = value % 360;&lt;font&gt;&lt;/font&gt;
        }    // remember, hue is modulo 360&lt;font&gt;&lt;/font&gt;
        else if (value &amp;lt; 0)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            _hue = 0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            _hue = value;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    [Bindable]public function get Saturation():Number&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return _sat;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function set Saturation(value:Number):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        if (value &amp;gt; 100.0)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            _sat = 100.0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (value &amp;lt; 0)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            _sat = 0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            _sat = value;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    [Bindable]public function get Luminance():Number&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return _lum;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function set Luminance(value:Number):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        if (value &amp;gt; 100.0)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            _lum = 100.0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (value &amp;lt; 0)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            _lum = 0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            _lum = value;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ColorRGB 클래스 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;    final public class ColorRGB&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    private var _red:uint;&lt;font&gt;&lt;/font&gt;
    private var _grn:uint;&lt;font&gt;&lt;/font&gt;
    private var _blu:uint;&lt;font&gt;&lt;/font&gt;
    private var _rgb:uint;        // composite form: 0xRRGGBB or #RRGGBB&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function ColorRGB(red:uint = 0, grn:uint = 0, blu:uint = 0)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        setRGB(red, grn, blu);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    [Bindable]public function get red():uint&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return _red;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function set red(value:uint):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        _red = (value &amp;amp; 0xFF);&lt;font&gt;&lt;/font&gt;
        updateRGB();&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    [Bindable]public function get grn():uint&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return _grn;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function set grn(value:uint):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        _grn = (value &amp;amp; 0xFF);&lt;font&gt;&lt;/font&gt;
        updateRGB();&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    [Bindable]public function get blu():uint&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return _blu;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function set blu(value:uint):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        _blu = (value &amp;amp; 0xFF);&lt;font&gt;&lt;/font&gt;
        updateRGB();&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    [Bindable]public function get rgb():uint&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return _rgb;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function set rgb(value:uint):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        _rgb = value;&lt;font&gt;&lt;/font&gt;
        _red = (value &amp;gt;&amp;gt; 16) &amp;amp; 0xFF;&lt;font&gt;&lt;/font&gt;
        _grn = (value &amp;gt;&amp;gt;  8) &amp;amp; 0xFF;&lt;font&gt;&lt;/font&gt;
        _blu =  value        &amp;amp; 0xFF;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function setRGB(red:uint, grn:uint, blu:uint):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        this.red = red;&lt;font&gt;&lt;/font&gt;
        this.grn = grn;&lt;font&gt;&lt;/font&gt;
        this.blu = blu;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function setRGBFromUint(pValue:uint):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        setRGB((( pValue &amp;gt;&amp;gt; 16 ) &amp;amp; 0xFF ), ( (pValue &amp;gt;&amp;gt; 8) &amp;amp; 0xFF ), ( pValue &amp;amp; 0xFF ));&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public function getUintFromRGB():uint&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return ( ( red &amp;lt;&amp;lt; 16 ) | ( grn &amp;lt;&amp;lt; 8 ) | blu );&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private function updateRGB():void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        _rgb = (_red &amp;lt;&amp;lt; 16) + (_grn &amp;lt;&amp;lt; 8) + blu;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ColorUtils 클래스 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;final public class ColorUtils&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    public static function HSV2RGB(hue:Number, sat:Number, val:Number):uint&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        var red:Number = 0;&lt;font&gt;&lt;/font&gt;
        var grn:Number = 0;&lt;font&gt;&lt;/font&gt;
        var blu:Number = 0;&lt;font&gt;&lt;/font&gt;
        var i:Number;&lt;font&gt;&lt;/font&gt;
        var f:Number;&lt;font&gt;&lt;/font&gt;
        var p:Number;&lt;font&gt;&lt;/font&gt;
        var q:Number;&lt;font&gt;&lt;/font&gt;
        var t:Number;&lt;font&gt;&lt;/font&gt;
        hue%=360;&lt;font&gt;&lt;/font&gt;
        sat/=100;&lt;font&gt;&lt;/font&gt;
        val/=100;&lt;font&gt;&lt;/font&gt;
        hue/=60;&lt;font&gt;&lt;/font&gt;
        i = Math.floor(hue);&lt;font&gt;&lt;/font&gt;
        f = hue-i;&lt;font&gt;&lt;/font&gt;
        p = val*(1-sat);&lt;font&gt;&lt;/font&gt;
        q = val*(1-(sat*f));&lt;font&gt;&lt;/font&gt;
        t = val*(1-(sat*(1-f)));&lt;font&gt;&lt;/font&gt;
        if (i==0)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            red=val;&lt;font&gt;&lt;/font&gt;
            grn=t;&lt;font&gt;&lt;/font&gt;
            blu=p;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (i==1)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            red=q;&lt;font&gt;&lt;/font&gt;
            grn=val;&lt;font&gt;&lt;/font&gt;
            blu=p;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (i==2)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            red=p;&lt;font&gt;&lt;/font&gt;
            grn=val;&lt;font&gt;&lt;/font&gt;
            blu=t;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (i==3)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            red=p;&lt;font&gt;&lt;/font&gt;
            grn=q;&lt;font&gt;&lt;/font&gt;
            blu=val;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (i==4)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            red=t;&lt;font&gt;&lt;/font&gt;
            grn=p;&lt;font&gt;&lt;/font&gt;
            blu=val;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (i==5)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            red=val;&lt;font&gt;&lt;/font&gt;
            grn=p;&lt;font&gt;&lt;/font&gt;
            blu=q;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        red = Math.floor(red*255);&lt;font&gt;&lt;/font&gt;
        grn = Math.floor(grn*255);&lt;font&gt;&lt;/font&gt;
        blu = Math.floor(blu*255);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return (red&amp;lt;&amp;lt;16) | (grn &amp;lt;&amp;lt; 8) | (blu);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    //&lt;font&gt;&lt;/font&gt;
    public static function RGB2HSV(pColor:uint):Object&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        var red:uint = (pColor &amp;gt;&amp;gt; 16) &amp;amp; 0xff;&lt;font&gt;&lt;/font&gt;
        var grn:uint = (pColor &amp;gt;&amp;gt; 8) &amp;amp; 0xff;&lt;font&gt;&lt;/font&gt;
        var blu:uint = pColor &amp;amp; 0xff;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        var x:Number;&lt;font&gt;&lt;/font&gt;
        var val:Number;&lt;font&gt;&lt;/font&gt;
        var f:Number;&lt;font&gt;&lt;/font&gt;
        var i:Number;&lt;font&gt;&lt;/font&gt;
        var hue:Number;&lt;font&gt;&lt;/font&gt;
        var sat:Number;&lt;font&gt;&lt;/font&gt;
        red/=255;&lt;font&gt;&lt;/font&gt;
        grn/=255;&lt;font&gt;&lt;/font&gt;
        blu/=255;&lt;font&gt;&lt;/font&gt;
        x = Math.min(Math.min(red, grn), blu);&lt;font&gt;&lt;/font&gt;
        val = Math.max(Math.max(red, grn), blu);&lt;font&gt;&lt;/font&gt;
        if (x==val){&lt;font&gt;&lt;/font&gt;
            return({h:undefined, s:0, v:val*100});&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        f = (red == x) ? grn-blu : ((grn == x) ? blu-red : red-grn);&lt;font&gt;&lt;/font&gt;
        i = (red == x) ? 3 : ((grn == x) ? 5 : 1);&lt;font&gt;&lt;/font&gt;
        hue = Math.floor((i-f/(val-x))*60)%360;&lt;font&gt;&lt;/font&gt;
        sat = Math.floor(((val-x)/val)*100);&lt;font&gt;&lt;/font&gt;
        val = Math.floor(val*100);&lt;font&gt;&lt;/font&gt;
        return({h:hue, s:sat, v:val});&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    /**&lt;font&gt;&lt;/font&gt;
     * Generates an array of pNbColors colors (uint) &lt;font&gt;&lt;/font&gt;
     * The colors are generated to fill a pie chart (meaning that they circle back to the starting color)&lt;font&gt;&lt;/font&gt;
     * @param pNbColors The number of colors to generate (ex: Number of slices in the pie chart)&lt;font&gt;&lt;/font&gt;
     * @param pNonAdjacentSimilarColor Should the colors stay Adjacent or not ?&lt;font&gt;&lt;/font&gt;
     */&lt;font&gt;&lt;/font&gt;
    public static function ColorArrayGenerator(&lt;font&gt;&lt;/font&gt;
        pNbColors:int,&lt;font&gt;&lt;/font&gt;
        pNonAdjacentSimilarColor:Boolean = false):Array&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        // Based on http://www.flexspectrum.com/?p=10&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        var colors:Array = [];&lt;font&gt;&lt;/font&gt;
        var baseRGB:ColorRGB = new ColorRGB();&lt;font&gt;&lt;/font&gt;
        baseRGB.setRGBFromUint(0x8A56E2);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        var baseHSL:ColorHSL = new ColorHSL();&lt;font&gt;&lt;/font&gt;
        rgbToHsl(baseHSL, baseRGB);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        var currentHue:Number = baseHSL.Hue;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        colors.push(baseRGB.getUintFromRGB());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        var step:Number = (360.0 / pNbColors);&lt;font&gt;&lt;/font&gt;
        var nextHSL:ColorHSL;&lt;font&gt;&lt;/font&gt;
        var nextRGB:ColorRGB;&lt;font&gt;&lt;/font&gt;
        var i:int;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        for (i = 1; i &amp;lt; pNbColors; i++)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            currentHue += step;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            if (currentHue &amp;gt; 360)&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                currentHue -= 360;&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            nextHSL = new ColorHSL(currentHue, baseHSL.Saturation, baseHSL.Luminance);&lt;font&gt;&lt;/font&gt;
            nextRGB = new ColorRGB();&lt;font&gt;&lt;/font&gt;
            hslToRgb(nextRGB, nextHSL);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            colors.push(nextRGB.getUintFromRGB());&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        if (pNonAdjacentSimilarColor == true &amp;amp;&amp;amp;&lt;font&gt;&lt;/font&gt;
            pNbColors &amp;gt; 2)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            var holder:uint = 0;&lt;font&gt;&lt;/font&gt;
            var j:int;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            for (i = 0, j = pNbColors / 2; i &amp;lt; pNbColors / 2; i += 2, j += 2)&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                holder = colors[i];&lt;font&gt;&lt;/font&gt;
                colors[i] = colors[j];&lt;font&gt;&lt;/font&gt;
                colors[j] = holder;&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return colors;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    static public function rgbToHsl(hsl:ColorHSL, rgb:ColorRGB):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        var h:Number = 0;&lt;font&gt;&lt;/font&gt;
        var s:Number = 0;&lt;font&gt;&lt;/font&gt;
        var l:Number = 0;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Normalizes incoming RGB values.&lt;font&gt;&lt;/font&gt;
        //&lt;font&gt;&lt;/font&gt;
        var dRed:Number = (Number)(rgb.red / 255.0);&lt;font&gt;&lt;/font&gt;
        var dGrn:Number = (Number)(rgb.grn / 255.0);&lt;font&gt;&lt;/font&gt;
        var dBlu:Number = (Number)(rgb.blu / 255.0);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        var dMax:Number = Math.max(dRed, Math.max(dGrn, dBlu));&lt;font&gt;&lt;/font&gt;
        var dMin:Number = Math.min(dRed, Math.min(dGrn, dBlu));&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        //-------------------------&lt;font&gt;&lt;/font&gt;
        // hue&lt;font&gt;&lt;/font&gt;
        //&lt;font&gt;&lt;/font&gt;
        if (dMax == dMin)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            h = 0;                 // undefined&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (dMax == dRed &amp;amp;&amp;amp; dGrn &amp;gt;= dBlu)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            h = 60.0 * (dGrn - dBlu) / (dMax - dMin);&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (dMax == dRed &amp;amp;&amp;amp; dGrn &amp;lt; dBlu)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            h = 60.0 * (dGrn - dBlu) / (dMax - dMin) + 360.0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (dMax == dGrn)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            h = 60.0 * (dBlu - dRed) / (dMax-dMin) + 120.0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (dMax == dBlu)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            h = 60.0 * (dRed - dGrn) / (dMax - dMin) + 240.0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        //-------------------------&lt;font&gt;&lt;/font&gt;
        // luminance&lt;font&gt;&lt;/font&gt;
        //&lt;font&gt;&lt;/font&gt;
        l = (dMax + dMin) / 2.0;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        //-------------------------&lt;font&gt;&lt;/font&gt;
        // saturation&lt;font&gt;&lt;/font&gt;
        //&lt;font&gt;&lt;/font&gt;
        if (l == 0 || dMax == dMin)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            s = 0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (0 &amp;lt; l &amp;amp;&amp;amp; l &amp;lt;= 0.5)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            s = (dMax - dMin) / (dMax + dMin);&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
        else if (l&amp;gt;0.5)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            s = (dMax - dMin) / (2 - (dMax + dMin));    //(dMax-dMin &amp;gt; 0)?&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        hsl.Hue = h;&lt;font&gt;&lt;/font&gt;
        hsl.Luminance = l;&lt;font&gt;&lt;/font&gt;
        hsl.Saturation = s;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    } // rgbToHsl&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    //---------------------------------------&lt;font&gt;&lt;/font&gt;
    // Convert the input RGB values to the corresponding HSL values.&lt;font&gt;&lt;/font&gt;
    //&lt;font&gt;&lt;/font&gt;
    static public function hslToRgb(rgb:ColorRGB, hsl:ColorHSL):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        if (hsl.Saturation == 0)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            // Achromatic color case, luminance only.&lt;font&gt;&lt;/font&gt;
            //&lt;font&gt;&lt;/font&gt;
            var lumScaled:int = (int)(hsl.Luminance * 255.0); &lt;font&gt;&lt;/font&gt;
            rgb.setRGB(lumScaled, lumScaled, lumScaled);&lt;font&gt;&lt;/font&gt;
            return;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Chromatic case...&lt;font&gt;&lt;/font&gt;
        //&lt;font&gt;&lt;/font&gt;
        var dQ:Number = (hsl.Luminance &amp;lt; 0.5) ? (hsl.Luminance * (1.0 + hsl.Saturation)): ((hsl.Luminance + hsl.Saturation) - (hsl.Luminance * hsl.Saturation));&lt;font&gt;&lt;/font&gt;
        var dP:Number = (2.0 * hsl.Luminance) - dQ;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        var dHueAng:Number = hsl.Hue / 360.0;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        var dFactor:Number = 1.0 / 3.0;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        var adT:Array = [];&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        adT[0] = dHueAng + dFactor;                // Tr&lt;font&gt;&lt;/font&gt;
        adT[1] = dHueAng;                        // Tg&lt;font&gt;&lt;/font&gt;
        adT[2] = dHueAng - dFactor;                // Tb&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        for (var i:int = 0; i &amp;lt; 3; i++)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            if (adT[i] &amp;lt; 0)&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                adT[i] += 1.0;&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            if (adT[i] &amp;gt; 1)&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                adT[i] -= 1.0;&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            if ((adT[i] * 6) &amp;lt; 1)&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                adT[i] = dP + ((dQ - dP) * 6.0 * adT[i]);&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
            else if ((adT[i] * 2.0) &amp;lt; 1)        // (1.0 / 6.0) &amp;lt;= adT[i] &amp;amp;&amp;amp; adT[i] &amp;lt; 0.5&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                adT[i] = dQ;&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
            else if ((adT[i] * 3.0) &amp;lt; 2)        // 0.5 &amp;lt;= adT[i] &amp;amp;&amp;amp; adT[i] &amp;lt; (2.0 / 3.0)&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                adT[i] = dP + (dQ-dP) * ((2.0/3.0) - adT[i]) * 6.0;&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
            else&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                adT[i] = dP;&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        rgb.setRGB(adT[0] * 255.0, adT[1] * 255.0, adT[2] * 255.0);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    } // hslToRgb&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    //---------------------------------------&lt;font&gt;&lt;/font&gt;
    // Adjust the luminance value by the specified factor.&lt;font&gt;&lt;/font&gt;
    //&lt;font&gt;&lt;/font&gt;
    static public function adjustRgbLuminance(rgb:ColorRGB, factor:Number):void&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        var hsl:ColorHSL = new ColorHSL();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        rgbToHsl(hsl, rgb);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        hsl.Luminance *= factor;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        if (hsl.Luminance &amp;lt; 0.0)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            hsl.Luminance = 0.0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        if (hsl.Luminance &amp;gt; 1.0)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            hsl.Luminance = 1.0;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        hslToRgb(rgb, hsl);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    //---------------------------------------&lt;font&gt;&lt;/font&gt;
    //&lt;font&gt;&lt;/font&gt;
    static public function uintTo2DigitHex(value:uint):String&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        var str:String = value.toString(16).toUpperCase();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        if (1 == str.length)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            str = &quot;0&quot; + str;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return str;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    //---------------------------------------&lt;font&gt;&lt;/font&gt;
    //&lt;font&gt;&lt;/font&gt;
    static public function uintTo6DigitHex(value:uint):String&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        var str:String = value.toString(16).toUpperCase();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        if (1 == str.length)    {return &quot;00000&quot; + str;}&lt;font&gt;&lt;/font&gt;
        if (2 == str.length)    {return &quot;0000&quot; + str;}&lt;font&gt;&lt;/font&gt;
        if (3 == str.length)    {return &quot;000&quot; + str;}&lt;font&gt;&lt;/font&gt;
        if (4 == str.length)    {return &quot;00&quot; + str;}&lt;font&gt;&lt;/font&gt;
        if (5 == str.length)    {return &quot;0&quot; + str;}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return str;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;h1&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;개요&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;RGB에서 HSV로 변환 한 다음 색조를 조정하면 ( &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/a/5651670/59087&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에 설명 된대로&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; ) 일관되지 않은 인식 밝기가 생성됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;노란색 / 녹색은 파란색 / 보라색보다 눈에 띄게 밝습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/1ONdx.png&quot; alt=&quot;불일치&quot;&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이러한 변화없이 유사한 결과가 가능합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;img src=&quot;https://i.stack.imgur.com/sHtyh.png&quot; alt=&quot;일관된&quot;&gt;&lt;/p&gt; 
&lt;h1&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;연산&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 알고리즘은 훨씬 더 복잡합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ol&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;HTML 16 진수 코드를 공칭 RGB 값으로 변환합니다 (구성 요소를 255로 나눕니다).&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;RGB 값을 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_RGB_to_XYZ.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;XYZ 색상 공간으로&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 변환 &lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_RGB_to_XYZ.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; . &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;D65 참조 흰색&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 의 sRGB &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?WorkingSpaceInfo.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;작업 공간&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;XYZ에서 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_Lab.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;L &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;a&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; b 색 공간으로&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 변환 &lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_Lab.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;L &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;a&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; b에서 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_Lab_to_LCH.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;LCH 색 공간으로&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 변환 &lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_Lab_to_LCH.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;LCH 색상 공간에서 파이 쐐기 색상 색조 계산 :&lt;/font&gt;&lt;/font&gt;&lt;pre&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(360.0 div $ wedges) * $ wedge&lt;/font&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;라디안 단위로 새 색조를 다시 계산합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;새로운 색조를 사용하여 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;LCH에서 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_LCH_to_Lab.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;L &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;a&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; b 색 공간으로&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 다시 변환 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;L &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;a&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; b에서 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_Lab_to_XYZ.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;XYZ 색 공간으로&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 변환 &lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_Lab_to_XYZ.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;XYZ에서 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;sRGB 색 공간으로&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 변환 &lt;/font&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니다&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;RGB 값에 255를 곱합니다.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ol&gt; 
&lt;h1&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이행&lt;/font&gt;&lt;/font&gt;&lt;/h1&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음은 XSLT 1.0의 구현 예입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;?xml version=&quot;1.0&quot;?&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;!--&lt;font&gt;&lt;/font&gt;
 | The MIT License&lt;font&gt;&lt;/font&gt;
 |&lt;font&gt;&lt;/font&gt;
 | Copyright 2014 White Magic Software, Inc.&lt;font&gt;&lt;/font&gt;
 | &lt;font&gt;&lt;/font&gt;
 | Permission is hereby granted, free of charge, to any person&lt;font&gt;&lt;/font&gt;
 | obtaining a copy of this software and associated documentation&lt;font&gt;&lt;/font&gt;
 | files (the &quot;Software&quot;), to deal in the Software without&lt;font&gt;&lt;/font&gt;
 | restriction, including without limitation the rights to use,&lt;font&gt;&lt;/font&gt;
 | copy, modify, merge, publish, distribute, sublicense, and/or&lt;font&gt;&lt;/font&gt;
 | sell copies of the Software, and to permit persons to whom the&lt;font&gt;&lt;/font&gt;
 | Software is furnished to do so, subject to the following&lt;font&gt;&lt;/font&gt;
 | conditions:&lt;font&gt;&lt;/font&gt;
 | &lt;font&gt;&lt;/font&gt;
 | The above copyright notice and this permission notice shall be&lt;font&gt;&lt;/font&gt;
 | included in all copies or substantial portions of the Software.&lt;font&gt;&lt;/font&gt;
 | &lt;font&gt;&lt;/font&gt;
 | THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,&lt;font&gt;&lt;/font&gt;
 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES&lt;font&gt;&lt;/font&gt;
 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND&lt;font&gt;&lt;/font&gt;
 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT&lt;font&gt;&lt;/font&gt;
 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,&lt;font&gt;&lt;/font&gt;
 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING&lt;font&gt;&lt;/font&gt;
 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR&lt;font&gt;&lt;/font&gt;
 | OTHER DEALINGS IN THE SOFTWARE.&lt;font&gt;&lt;/font&gt;
 +--&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:stylesheet version=&quot;1.0&quot;&lt;font&gt;&lt;/font&gt;
  xmlns:xsl=&quot;http://www.w3.org/1999/XSL/Transform&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&amp;lt;!-- Reference white (X, Y, and Z components) --&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:variable name=&quot;X_r&quot; select=&quot;0.950456&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:variable name=&quot;Y_r&quot; select=&quot;1.000000&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:variable name=&quot;Z_r&quot; select=&quot;1.088754&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:variable name=&quot;LAB_EPSILON&quot; select=&quot;216.0 div 24389.0&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:variable name=&quot;LAB_K&quot; select=&quot;24389.0 div 27.0&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&amp;lt;!-- Pie wedge colours based on this hue. --&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:variable name=&quot;base_colour&quot; select=&quot;'46A5E5'&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&amp;lt;!-- Pie wedge stroke colour. --&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:variable name=&quot;stroke_colour&quot; select=&quot;'white'&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&amp;lt;!--&lt;font&gt;&lt;/font&gt;
 | Creates a colour for a particular pie wedge.&lt;font&gt;&lt;/font&gt;
 |&lt;font&gt;&lt;/font&gt;
 | http://en.wikipedia.org/wiki/HSL_and_HSV &lt;font&gt;&lt;/font&gt;
 +--&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:template name=&quot;fill&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;!-- Current wedge number for generating a colour. --&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:param name=&quot;wedge&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;!-- Total number of wedges in the pie. --&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:param name=&quot;wedges&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;!-- RGB colour in hexadecimal. --&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:param name=&quot;colour&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;!-- Derive the colour decimal values from $colour's HEX code. --&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;r&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;hex2dec&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;hex&quot;&lt;font&gt;&lt;/font&gt;
        select=&quot;substring( $colour, 1, 2 )&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;g&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;hex2dec&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;hex&quot;&lt;font&gt;&lt;/font&gt;
        select=&quot;substring( $colour, 3, 2 )&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;b&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;hex2dec&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;hex&quot;&lt;font&gt;&lt;/font&gt;
        select=&quot;substring( $colour, 5, 2 )&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;!--&lt;font&gt;&lt;/font&gt;
   | Convert RGB to XYZ, using nominal range for RGB.&lt;font&gt;&lt;/font&gt;
   | http://www.brucelindbloom.com/index.html?Eqn_RGB_to_XYZ.html&lt;font&gt;&lt;/font&gt;
   +--&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;r_n&quot; select=&quot;$r div 255&quot; /&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;g_n&quot; select=&quot;$g div 255&quot; /&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;b_n&quot; select=&quot;$b div 255&quot; /&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;!--&lt;font&gt;&lt;/font&gt;
   | Assume colours are in sRGB.&lt;font&gt;&lt;/font&gt;
   | http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html&lt;font&gt;&lt;/font&gt;
   --&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;x&quot;&lt;font&gt;&lt;/font&gt;
    select=&quot;.4124564 * $r_n + .3575761 * $g_n + .1804375 * $b_n&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;y&quot;&lt;font&gt;&lt;/font&gt;
    select=&quot;.2126729 * $r_n + .7151522 * $g_n + .0721750 * $b_n&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;z&quot;&lt;font&gt;&lt;/font&gt;
    select=&quot;.0193339 * $r_n + .1191920 * $g_n + .9503041 * $b_n&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;!--&lt;font&gt;&lt;/font&gt;
   | Convert XYZ to L*a*b.&lt;font&gt;&lt;/font&gt;
   | http://www.brucelindbloom.com/index.html?Eqn_XYZ_to_Lab.html&lt;font&gt;&lt;/font&gt;
   +--&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;if_x&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;lab_f&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;xyz_n&quot; select=&quot;$x div $X_r&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;if_y&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;lab_f&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;xyz_n&quot; select=&quot;$y div $Y_r&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;if_z&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;lab_f&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;xyz_n&quot; select=&quot;$z div $Z_r&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;lab_l&quot; select=&quot;(116.0 * $if_y) - 16.0&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;lab_a&quot; select=&quot;500.0 * ($if_x - $if_y)&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;lab_b&quot; select=&quot;200.0 * ($if_y - $if_z)&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;!--&lt;font&gt;&lt;/font&gt;
   | Convert L*a*b to LCH.&lt;font&gt;&lt;/font&gt;
   | http://www.brucelindbloom.com/index.html?Eqn_Lab_to_LCH.html&lt;font&gt;&lt;/font&gt;
   +--&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;lch_l&quot; select=&quot;$lab_l&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;lch_c&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;sqrt&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;n&quot; select=&quot;($lab_a * $lab_a) + ($lab_b * $lab_b)&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;lch_h&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;atan2&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;x&quot; select=&quot;$lab_b&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;y&quot; select=&quot;$lab_a&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;!--&lt;font&gt;&lt;/font&gt;
   | Prevent similar adjacent colours.&lt;font&gt;&lt;/font&gt;
   | http://math.stackexchange.com/a/936767/7932&lt;font&gt;&lt;/font&gt;
   +--&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;wi&quot; select=&quot;$wedge&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;wt&quot; select=&quot;$wedges&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;w&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:choose&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:when test=&quot;$wt &amp;amp;gt; 5&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:variable name=&quot;weven&quot; select=&quot;(($wi+4) mod ($wt + $wt mod 2))&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:value-of&lt;font&gt;&lt;/font&gt;
          select=&quot;$weven * (1-($wi mod 2)) + ($wi mod 2 * $wi)&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;/xsl:when&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:otherwise&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:value-of select=&quot;$wedge&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;/xsl:otherwise&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:choose&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;!-- lch_l, lch_c, and lch_h are now set; rotate the hue. --&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;lch_wedge_h&quot; select=&quot;(360.0 div $wedges) * $wedge&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;!--&lt;font&gt;&lt;/font&gt;
   | Convert wedge's hue-adjusted LCH to L*a*b.&lt;font&gt;&lt;/font&gt;
   | http://www.brucelindbloom.com/index.html?Eqn_LCH_to_Lab.html&lt;font&gt;&lt;/font&gt;
   +--&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;lab_sin_h&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;sine&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;degrees&quot; select=&quot;$lch_wedge_h&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;lab_cos_h&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;cosine&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;degrees&quot; select=&quot;$lch_wedge_h&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;final_lab_l&quot; select=&quot;$lch_l&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;final_lab_a&quot; select=&quot;$lch_c * $lab_cos_h&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;final_lab_b&quot; select=&quot;$lch_c * $lab_sin_h&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;!--&lt;font&gt;&lt;/font&gt;
   | Convert L*a*b to XYZ.&lt;font&gt;&lt;/font&gt;
   | http://www.brucelindbloom.com/index.html?Eqn_Lab_to_XYZ.html&lt;font&gt;&lt;/font&gt;
   +--&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;of_y&quot; select=&quot;($final_lab_l + 16.0) div 116.0&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;of_x&quot; select=&quot;($final_lab_a div 500.0) + $of_y&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;of_z&quot; select=&quot;$of_y - ($final_lab_b div 200.0)&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;of_x_pow&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;power&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;base&quot; select=&quot;$of_x&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;exponent&quot; select=&quot;3&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;of_z_pow&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:call-template name=&quot;power&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;base&quot; select=&quot;$of_z&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:with-param name=&quot;exponent&quot; select=&quot;3&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;ox_r&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:choose&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:when test=&quot;$of_x_pow &amp;amp;gt; $LAB_EPSILON&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:value-of select=&quot;$of_x_pow&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;/xsl:when&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:otherwise&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:value-of select=&quot;((116.0 * $of_x) - 16.0) div $LAB_K&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;/xsl:otherwise&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:choose&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;oy_r&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:choose&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:when test=&quot;$final_lab_l &amp;amp;gt; ($LAB_K * $LAB_EPSILON)&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:call-template name=&quot;power&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
          &amp;lt;xsl:with-param name=&quot;base&quot;&lt;font&gt;&lt;/font&gt;
            select=&quot;($final_lab_l + 16.0) div 116.0&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
          &amp;lt;xsl:with-param name=&quot;exponent&quot;&lt;font&gt;&lt;/font&gt;
            select=&quot;3&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;/xsl:when&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:otherwise&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:value-of select=&quot;$final_lab_l div $LAB_K&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;/xsl:otherwise&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:choose&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;oz_r&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:choose&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:when test=&quot;$of_z_pow &amp;amp;gt; $LAB_EPSILON&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:value-of select=&quot;$of_z_pow&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;/xsl:when&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:otherwise&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:value-of select=&quot;((116.0 * $of_z) - 16.0) div $LAB_K&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;/xsl:otherwise&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:choose&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:variable&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;X&quot; select=&quot;$ox_r * $X_r&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;Y&quot; select=&quot;$oy_r * $Y_r&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;Z&quot; select=&quot;$oz_r * $Z_r&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;!--&lt;font&gt;&lt;/font&gt;
   | Convert XYZ to sRGB.&lt;font&gt;&lt;/font&gt;
   | http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html&lt;font&gt;&lt;/font&gt;
   +--&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;R&quot;&lt;font&gt;&lt;/font&gt;
    select=&quot;3.2404542 * $X + -1.5371385 * $Y + -0.4985314 * $Z&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;G&quot;&lt;font&gt;&lt;/font&gt;
    select=&quot;-0.9692660 * $X + 1.8760108 * $Y + 0.0415560 * $Z&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;B&quot;&lt;font&gt;&lt;/font&gt;
    select=&quot;0.0556434 * $X + -0.2040259 * $Y + 1.0572252 * $Z&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;!-- Round the result. --&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;R_r&quot; select=&quot;round( $R * 255 )&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;G_r&quot; select=&quot;round( $G * 255 )&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;B_r&quot; select=&quot;round( $B * 255 )&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:text&amp;gt;rgb(&amp;lt;/xsl:text&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:value-of select=&quot;concat( $R_r, ',', $G_r, ',', $B_r )&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:text&amp;gt;)&amp;lt;/xsl:text&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/xsl:template&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:template name=&quot;lab_f&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:param name=&quot;xyz_n&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:choose&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:when test=&quot;$xyz_n &amp;amp;gt; $LAB_EPSILON&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:call-template name=&quot;nthroot&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:with-param name=&quot;index&quot; select=&quot;3&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
        &amp;lt;xsl:with-param name=&quot;radicand&quot; select=&quot;$xyz_n&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;/xsl:call-template&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:when&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;xsl:otherwise&amp;gt;&lt;font&gt;&lt;/font&gt;
      &amp;lt;xsl:value-of select=&quot;($LAB_K * $xyz_n + 16.0) div 116.0&quot; /&amp;gt;&lt;font&gt;&lt;/font&gt;
    &amp;lt;/xsl:otherwise&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;/xsl:choose&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/xsl:template&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&amp;lt;!-- Converts a two-digit hexadecimal number to decimal. --&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;xsl:template name=&quot;hex2dec&quot;&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:param name=&quot;hex&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;digits&quot; select=&quot;'0123456789ABCDEF'&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;X&quot; select=&quot;substring( $hex, 1, 1 )&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;Y&quot; select=&quot;substring( $hex, 2, 1 )&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;Xval&quot;&lt;font&gt;&lt;/font&gt;
    select=&quot;string-length(substring-before($digits,$X))&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:variable name=&quot;Yval&quot;&lt;font&gt;&lt;/font&gt;
    select=&quot;string-length(substring-before($digits,$Y))&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
  &amp;lt;xsl:value-of select=&quot;16 * $Xval + $Yval&quot;/&amp;gt;&lt;font&gt;&lt;/font&gt;
&amp;lt;/xsl:template&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&amp;lt;/xsl:stylesheet&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;The trig, root, and miscellaneous math functions are left as an exercise for the reader. Also, nobody in their right mind would want to code all this in XSLT 1.0. XSLT 2.0, on the other hand, has an &lt;a href=&quot;https://bitbucket.org/djarvis/world-politics/src/master/source/xsl/chart.xsl&quot; rel=&quot;nofollow noreferrer&quot;&gt;implementation here&lt;/a&gt;.&lt;/p&gt; 
&lt;h1&gt;Resources&lt;/h1&gt; 
&lt;p&gt;Further reading:&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;a href=&quot;https://pdfs.semanticscholar.org/0977/49c130c1cf35b8b9c236916de3b0455ffce0.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Generating color palettes using intuitive parameters&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;http://alexandria.tue.nl/extra1/afstversl/wsk-i/wijffelaars2008.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Synthesis of Color Palettes&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;http://www.brucelindbloom.com/index.html?Equations.html&quot; rel=&quot;nofollow noreferrer&quot;&gt;Useful Color Equations&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;http://www.colourphil.co.uk/lab_lch_colour_space.shtml&quot; rel=&quot;nofollow noreferrer&quot;&gt;Introduction to colour spaces&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;http://tools.medialab.sciences-po.fr/iwanthue/theory.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;Evenly distributed colors in a perceptively coherent space&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;http://www.researchgate.net/publication/230497323_An_algorithm_for_the_selection_of_highcontrast_color_sets&quot; rel=&quot;nofollow noreferrer&quot;&gt;An algorithm for the selection of high-contrast color sets&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;http://epub.wu.ac.at/1692/1/document.pdf&quot; rel=&quot;nofollow noreferrer&quot;&gt;Selecting colors for statistical graphics&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;http://paulbourke.net/texture_colour/colourspace/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Colourspace conversions&lt;/a&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;a href=&quot;http://mkweb.bcgsc.ca/brewer/&quot; rel=&quot;nofollow noreferrer&quot;&gt;Brewer palettes&lt;/a&gt;&lt;/li&gt; 
&lt;/ul&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;This 1985 paper by &quot;ROSS E. ROLEY, CAPT&quot; gives an algorithm for maximizing color separation for an arbitrary set of colors (&lt;a href=&quot;http://www.dtic.mil/dtic/tr/fulltext/u2/a272919.pdf&quot; rel=&quot;nofollow&quot;&gt;complete with code in FORTRAN&lt;/a&gt;).&lt;/p&gt; 
&lt;p&gt;(Color separation appears to be an important visualization issue for military forces to prevent blue-on-blue incidents.)&lt;/p&gt; 
&lt;p&gt;However if you want to stick to a set of 20 colors, a quick and simple solution would be to pick the vertexes of a dodecahedron and convert the (x,y,z) co-ordinates (suitably scaled) to (r,g,b).&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;There is a generator &lt;a href=&quot;http://colorschemedesigner.com/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;. It is intended for web design, but the colours would look great on a pie chart, too.&lt;/p&gt; 
&lt;p&gt;You could either pre-compile a list of nice colours, or examine the logic behind the generator and do something similar yourself.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;I found this pseudocode formula that might help. You could start with a set to seed it.&lt;/p&gt; 
&lt;p&gt;Colour Difference Formula&lt;/p&gt; 
&lt;p&gt;The following is the formula suggested by the W3C to determine the difference between two colours.&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(최대 (빨간색 값 1, 빨간색 값 2)-최소값 (빨간색 값 1, 빨간색 값 2)) + (최대 값 (녹색 값 1, 녹색 값 2)-최소값 (녹색 값 1, 녹색 값 2)) + (최대 (파란색 값 1, 파란색 값 2)-최소값 (파란색 값 1, 파란색 값 2))&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;배경색과 전경색의 차이는 500보다 커야합니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;http://juicystudio.com/services/colourcontrast.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기에 소스가 있습니다&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/236936/how-pick-colors-for-a-pie-chart&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/236936/how-pick-colors-for-a-pie-chart&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5078</guid>
      <comments>https://hot-time.tistory.com/5078#entry5078comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:24:20 +0900</pubDate>
    </item>
    <item>
      <title>C #에서 믹스 인을 구현할 수 있습니까?</title>
      <link>https://hot-time.tistory.com/5077</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;C #에서 믹스 인을 구현할 수 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;확장 방법으로 가능하다는 말을 들었지만 스스로 알아낼 수는 없습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가능하다면 구체적인 예를보고 싶습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;감사!&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&quot;믹신&quot;이 의미하는 바에 따라 다릅니다. 모든 사람이 약간 다른 생각을 가지고있는 것 같습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 것 믹스 인의 종류 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;처럼&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 보고 구현을 통해 조성 간단하고있다 (그러나 C #에서 사용할 수 없습니다)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public class Mixin : ISomeInterface&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    private SomeImplementation impl implements ISomeInterface;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public void OneMethod()&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        // Specialise just this method&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;컴파일러는 클래스에 직접 다른 구현이없는 한 모든 멤버를 &quot;impl&quot;로 프록시하여 ISomeInterface를 구현합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지만 현재로서는 불가능합니다. :)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;C #을 통해 믹스 인을 구현할 수있는 오픈 소스 프레임 워크가 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://remix.codeplex.com/&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;http://remix.codeplex.com/을&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 살펴보세요 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 프레임 워크로 믹스 인을 구현하는 것은 매우 쉽습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;샘플과 페이지에 제공된 &quot;추가 정보&quot;링크를 살펴보십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 일반적으로 다음 패턴을 사용합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public interface IColor&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    byte Red   {get;}&lt;font&gt;&lt;/font&gt;
    byte Green {get;}&lt;font&gt;&lt;/font&gt;
    byte Blue  {get;}&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
public static class ColorExtensions&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    public static byte Luminance(this IColor c)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return (byte)(c.Red*0.3 + c.Green*0.59+ c.Blue*0.11);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;동일한 소스 파일 / 네임 스페이스에 두 가지 정의가 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이렇게하면 인터페이스를 사용할 때 ( 'using'사용) 항상 확장 기능을 사용할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;CMS의 첫 번째 링크에 설명 된대로 &lt;/font&gt;&lt;/font&gt;&lt;em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;제한된 믹스 인&lt;/font&gt;&lt;/font&gt;&lt;/em&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;제공합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;제한 사항 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;데이터 필드 없음 &lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;속성 없음 (괄호로 myColor.Luminance (), &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/619033/c-extension-properties&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;확장 속성&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 을 호출해야 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니까?)&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;많은 상황에서 여전히 충분합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(MS)가 확장 클래스를 자동 생성하기 위해 컴파일러 마법을 추가 할 수 있다면 좋을 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public interface IColor&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    byte Red   {get;}&lt;font&gt;&lt;/font&gt;
    byte Green {get;}&lt;font&gt;&lt;/font&gt;
    byte Blue  {get;}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    // compiler generates anonymous extension class&lt;font&gt;&lt;/font&gt;
    public static byte Luminance(this IColor c)     &lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return (byte)(c.Red*0.3 + c.Green*0.59+ c.Blue*0.11);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Jon이 제안한 컴파일러 트릭이 더 좋을지라도.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;a href=&quot;http://code.google.com/p/linfu/&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;LinFu&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 와 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/castleproject/Core/tree/master/src/Castle.Core.Tests/Mixins&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Castle의 DynamicProxy&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 는 믹스 인을 구현합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;COP (Composite Oriented Programming)는 믹스 인에서 전체 패러다임을 만드는 것으로 간주 될 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://web.archive.org/web/20081228224052/http://andersnoras.com/blogs/anoras/archive/2008/08/27/cop-c-4-0-and-doing-open-source-stuff.aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;Anders Noras의이 게시물&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 에는 유용한 정보와 링크가 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;편집 : 이것은 확장 메서드없이 C # 2.0에서 모두 가능합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;WPF의 연결된 속성과 다르지 않은 패턴으로 상태를 통합하기 위해 확장 메서드 접근 방식을 확장 할 수도 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음은 최소 상용구를 사용한 예입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대상 클래스를 다형성으로 다룰 필요가없는 한 인터페이스 추가를 포함하여 대상 클래스에 대한 수정이 필요하지 않습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;// Mixin class: mixin infrastructure and mixin component definitions&lt;font&gt;&lt;/font&gt;
public static class Mixin&lt;font&gt;&lt;/font&gt;
{ &lt;font&gt;&lt;/font&gt;
    // =====================================&lt;font&gt;&lt;/font&gt;
    // ComponentFoo: Sample mixin component&lt;font&gt;&lt;/font&gt;
    // =====================================&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    //  ComponentFooState: ComponentFoo contents&lt;font&gt;&lt;/font&gt;
    class ComponentFooState&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        public ComponentFooState() {&lt;font&gt;&lt;/font&gt;
            // initialize as you like&lt;font&gt;&lt;/font&gt;
            this.Name = &quot;default name&quot;;&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        public string Name { get; set; }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    // ComponentFoo methods&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    // if you like, replace T with some interface &lt;font&gt;&lt;/font&gt;
    // implemented by your target class(es)&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public static void &lt;font&gt;&lt;/font&gt;
    SetName&amp;lt;T&amp;gt;(this T obj, string name) {&lt;font&gt;&lt;/font&gt;
        var state = GetState(component_foo_states, obj);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // do something with &quot;obj&quot; and &quot;state&quot;&lt;font&gt;&lt;/font&gt;
        // for example: &lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        state.Name = name + &quot; the &quot; + obj.GetType();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
    public static string&lt;font&gt;&lt;/font&gt;
    GetName&amp;lt;T&amp;gt;(this T obj) {&lt;font&gt;&lt;/font&gt;
        var state = GetState(component_foo_states, obj);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return state.Name; &lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    // =====================================&lt;font&gt;&lt;/font&gt;
    // boilerplate&lt;font&gt;&lt;/font&gt;
    // =====================================&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    //  instances of ComponentFoo's state container class,&lt;font&gt;&lt;/font&gt;
    //  indexed by target object&lt;font&gt;&lt;/font&gt;
    static readonly Dictionary&amp;lt;object, ComponentFooState&amp;gt;&lt;font&gt;&lt;/font&gt;
    component_foo_states = new Dictionary&amp;lt;object, ComponentFooState&amp;gt;();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    // get a target class object's associated state&lt;font&gt;&lt;/font&gt;
    // note lazy instantiation&lt;font&gt;&lt;/font&gt;
    static TState&lt;font&gt;&lt;/font&gt;
    GetState&amp;lt;TState&amp;gt;(Dictionary&amp;lt;object, TState&amp;gt; dict, object obj) &lt;font&gt;&lt;/font&gt;
    where TState : new() {&lt;font&gt;&lt;/font&gt;
        TState ret;&lt;font&gt;&lt;/font&gt;
        if(!dict.TryGet(obj, out ret))&lt;font&gt;&lt;/font&gt;
            dict[obj] = ret = new TState();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return ret;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;용법:&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;var some_obj = new SomeClass();&lt;font&gt;&lt;/font&gt;
some_obj.SetName(&quot;Johny&quot;);&lt;font&gt;&lt;/font&gt;
Console.WriteLine(some_obj.GetName()); // &quot;Johny the SomeClass&quot;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;확장 메서드는 자연스럽게 작동하므로 null 인스턴스에서도 작동합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;또한 컬렉션이 대상 클래스 참조를 키로 유지하여 발생하는 메모리 누수를 방지하기 위해 WeakDictionary 구현을 사용할 수도 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;비슷한 것이 필요했기 때문에 Reflection.Emit을 사용하여 다음을 생각해 냈습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음 코드에서는 'mixin'유형의 개인 멤버가있는 새 유형이 동적으로 생성됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;'mixin'인터페이스의 메서드에 대한 모든 호출은이 개인 멤버에게 전달됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;'mixin'인터페이스를 구현하는 인스턴스를 취하는 단일 매개 변수 생성자가 정의됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;기본적으로 주어진 구체적인 유형 T 및 인터페이스 I에 대해 다음 코드를 작성하는 것과 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;class Z : T, I&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    I impl;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public Z(I impl)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        this.impl = impl;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    // Implement all methods of I by proxying them through this.impl&lt;font&gt;&lt;/font&gt;
    // as follows: &lt;font&gt;&lt;/font&gt;
    //&lt;font&gt;&lt;/font&gt;
    // I.Foo()&lt;font&gt;&lt;/font&gt;
    // {&lt;font&gt;&lt;/font&gt;
    //    return this.impl.Foo();&lt;font&gt;&lt;/font&gt;
    // }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 수업입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public class MixinGenerator&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    public static Type CreateMixin(Type @base, Type mixin)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        // Mixin must be an interface&lt;font&gt;&lt;/font&gt;
        if (!mixin.IsInterface)&lt;font&gt;&lt;/font&gt;
            throw new ArgumentException(&quot;mixin not an interface&quot;);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        TypeBuilder typeBuilder = DefineType(@base, new Type[]{mixin});&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        FieldBuilder fb = typeBuilder.DefineField(&quot;impl&quot;, mixin, FieldAttributes.Private);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        DefineConstructor(typeBuilder, fb);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        DefineInterfaceMethods(typeBuilder, mixin, fb);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        Type t = typeBuilder.CreateType();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return t;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    static AssemblyBuilder assemblyBuilder;&lt;font&gt;&lt;/font&gt;
    private static TypeBuilder DefineType(Type @base, Type [] interfaces)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly(&lt;font&gt;&lt;/font&gt;
            new AssemblyName(Guid.NewGuid().ToString()), AssemblyBuilderAccess.RunAndSave);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule(Guid.NewGuid().ToString());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        TypeBuilder b = moduleBuilder.DefineType(Guid.NewGuid().ToString(),&lt;font&gt;&lt;/font&gt;
            @base.Attributes,&lt;font&gt;&lt;/font&gt;
            @base,&lt;font&gt;&lt;/font&gt;
            interfaces);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return b;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
    private static void DefineConstructor(TypeBuilder typeBuilder, FieldBuilder fieldBuilder)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        ConstructorBuilder ctor = typeBuilder.DefineConstructor(&lt;font&gt;&lt;/font&gt;
            MethodAttributes.Public, CallingConventions.Standard, new Type[] { fieldBuilder.FieldType });&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        ILGenerator il = ctor.GetILGenerator();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Call base constructor&lt;font&gt;&lt;/font&gt;
        ConstructorInfo baseCtorInfo =  typeBuilder.BaseType.GetConstructor(new Type[]{});&lt;font&gt;&lt;/font&gt;
        il.Emit(OpCodes.Ldarg_0);&lt;font&gt;&lt;/font&gt;
        il.Emit(OpCodes.Call, typeBuilder.BaseType.GetConstructor(new Type[0]));&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        // Store type parameter in private field&lt;font&gt;&lt;/font&gt;
        il.Emit(OpCodes.Ldarg_0);&lt;font&gt;&lt;/font&gt;
        il.Emit(OpCodes.Ldarg_1);&lt;font&gt;&lt;/font&gt;
        il.Emit(OpCodes.Stfld, fieldBuilder);&lt;font&gt;&lt;/font&gt;
        il.Emit(OpCodes.Ret);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private static void DefineInterfaceMethods(TypeBuilder typeBuilder, Type mixin, FieldInfo instanceField)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        MethodInfo[] methods = mixin.GetMethods();&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        foreach (MethodInfo method in methods)&lt;font&gt;&lt;/font&gt;
        {&lt;font&gt;&lt;/font&gt;
            MethodInfo fwdMethod = instanceField.FieldType.GetMethod(method.Name,&lt;font&gt;&lt;/font&gt;
                method.GetParameters().Select((pi) =&amp;gt; { return pi.ParameterType; }).ToArray&amp;lt;Type&amp;gt;());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            MethodBuilder methodBuilder = typeBuilder.DefineMethod(&lt;font&gt;&lt;/font&gt;
                                            fwdMethod.Name,&lt;font&gt;&lt;/font&gt;
                                            // Could not call absract method, so remove flag&lt;font&gt;&lt;/font&gt;
                                            fwdMethod.Attributes &amp;amp; (~MethodAttributes.Abstract),&lt;font&gt;&lt;/font&gt;
                                            fwdMethod.ReturnType,&lt;font&gt;&lt;/font&gt;
                                            fwdMethod.GetParameters().Select(p =&amp;gt; p.ParameterType).ToArray());&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            methodBuilder.SetReturnType(method.ReturnType);&lt;font&gt;&lt;/font&gt;
            typeBuilder.DefineMethodOverride(methodBuilder, method);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            // Emit method body&lt;font&gt;&lt;/font&gt;
            ILGenerator il = methodBuilder.GetILGenerator();&lt;font&gt;&lt;/font&gt;
            il.Emit(OpCodes.Ldarg_0);&lt;font&gt;&lt;/font&gt;
            il.Emit(OpCodes.Ldfld, instanceField);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
            // Call with same parameters&lt;font&gt;&lt;/font&gt;
            for (int i = 0; i &amp;lt; method.GetParameters().Length; i++)&lt;font&gt;&lt;/font&gt;
            {&lt;font&gt;&lt;/font&gt;
                il.Emit(OpCodes.Ldarg, i + 1);&lt;font&gt;&lt;/font&gt;
            }&lt;font&gt;&lt;/font&gt;
            il.Emit(OpCodes.Call, fwdMethod);&lt;font&gt;&lt;/font&gt;
            il.Emit(OpCodes.Ret);&lt;font&gt;&lt;/font&gt;
        }&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 사용법입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public interface ISum&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    int Sum(int x, int y);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
public class SumImpl : ISum&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    public int Sum(int x, int y)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return x + y;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
public class Multiply&lt;font&gt;&lt;/font&gt;
{        &lt;font&gt;&lt;/font&gt;
    public int Mul(int x, int y)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        return x * y;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
// Generate a type that does multiply and sum&lt;font&gt;&lt;/font&gt;
Type newType = MixinGenerator.CreateMixin(typeof(Multiply), typeof(ISum));&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
object instance = Activator.CreateInstance(newType, new object[] { new SumImpl() });&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
int res = ((Multiply)instance).Mul(2, 4);&lt;font&gt;&lt;/font&gt;
Console.WriteLine(res);&lt;font&gt;&lt;/font&gt;
res = ((ISum)instance).Sum(1, 4);&lt;font&gt;&lt;/font&gt;
Console.WriteLine(res);&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;데이터를 저장할 수있는 기본 클래스가있는 경우 컴파일러 안전을 적용하고 마커 인터페이스를 사용할 수 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그것은 받아 들여진 대답의 &quot;Mixins in C # 3.0&quot;이 제안하는 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public static class ModelBaseMixins&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    public interface IHasStuff{ }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    public static void AddStuff&amp;lt;TObjectBase&amp;gt;(this TObjectBase objectBase, Stuff stuff) where TObjectBase: ObjectBase, IHasStuff&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        var stuffStore = objectBase.Get&amp;lt;IList&amp;lt;Stuff&amp;gt;&amp;gt;(&quot;stuffStore&quot;);&lt;font&gt;&lt;/font&gt;
        stuffStore.Add(stuff);&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ObjectBase :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public abstract class ObjectBase&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    protected ModelBase()&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        _objects = new Dictionary&amp;lt;string, object&amp;gt;();&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private readonly Dictionary&amp;lt;string, object&amp;gt; _objects;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    internal void Add&amp;lt;T&amp;gt;(T thing, string name)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        _objects[name] = thing;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    internal T Get&amp;lt;T&amp;gt;(string name)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        T thing = null;&lt;font&gt;&lt;/font&gt;
        _objects.TryGetValue(name, out thing);&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
        return (T) thing;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;따라서 클래스가있는 경우 'ObjectBase'에서 상속하고 IHasStuff로 장식 할 수 있습니다. 이제 sutff를 추가 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;여기 내가 방금 생각 해낸 믹스 인 구현이 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아마 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/Imms/Imms&quot; rel=&quot;nofollow&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내 라이브러리&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 와 함께 사용할 것입니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아마 전에 어딘가에서했을 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사전이나 무언가없이 모두 정적으로 입력됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;유형 당 약간의 추가 코드가 필요하며 인스턴스 당 스토리지가 필요하지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 한편으로, 원하는 경우 믹스 인 구현을 즉석에서 변경할 수있는 유연성도 제공합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;빌드 후, 사전 빌드, 중간 빌드 도구가 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;몇 가지 제한 사항이 있지만 재정의 등과 같은 작업을 허용합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마커 인터페이스를 정의하는 것으로 시작합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나중에 뭔가 추가 될 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public interface Mixin {}
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 인터페이스는 mixins에 의해 구현됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;믹스 인은 정규 수업입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;유형은 믹스 인을 직접 상속하거나 구현하지 않습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대신 인터페이스를 사용하여 믹스 인의 인스턴스를 노출합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public interface HasMixins {}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
public interface Has&amp;lt;TMixin&amp;gt; : HasMixins&lt;font&gt;&lt;/font&gt;
    where TMixin : Mixin {&lt;font&gt;&lt;/font&gt;
    TMixin Mixin { get; }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 인터페이스를 구현한다는 것은 믹스 인을 지원하는 것을 의미합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;유형별로 여러 개를 가질 것이기 때문에 명시 적으로 구현하는 것이 중요합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 확장 메서드를 사용하는 약간의 트릭입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;우리는 다음을 정의합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public static class MixinUtils {&lt;font&gt;&lt;/font&gt;
    public static TMixin Mixout&amp;lt;TMixin&amp;gt;(this Has&amp;lt;TMixin&amp;gt; what)&lt;font&gt;&lt;/font&gt;
        where TMixin : Mixin {&lt;font&gt;&lt;/font&gt;
        return what.Mixin;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;code&gt;Mixout&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;적절한 유형의 믹스 인을 노출합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이제 이것을 테스트하기 위해 다음을 정의하겠습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public abstract class Mixin1 : Mixin {}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
public abstract class Mixin2 : Mixin {}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
public abstract class Mixin3 : Mixin {}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
public class Test : Has&amp;lt;Mixin1&amp;gt;, Has&amp;lt;Mixin2&amp;gt; {&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private class Mixin1Impl : Mixin1 {&lt;font&gt;&lt;/font&gt;
        public static readonly Mixin1Impl Instance = new Mixin1Impl();&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    private class Mixin2Impl : Mixin2 {&lt;font&gt;&lt;/font&gt;
        public static readonly Mixin2Impl Instance = new Mixin2Impl();&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    Mixin1 Has&amp;lt;Mixin1&amp;gt;.Mixin =&amp;gt; Mixin1Impl.Instance;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
    Mixin2 Has&amp;lt;Mixin2&amp;gt;.Mixin =&amp;gt; Mixin2Impl.Instance;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
static class TestThis {&lt;font&gt;&lt;/font&gt;
    public static void run() {&lt;font&gt;&lt;/font&gt;
        var t = new Test();&lt;font&gt;&lt;/font&gt;
        var a = t.Mixout&amp;lt;Mixin1&amp;gt;();&lt;font&gt;&lt;/font&gt;
        var b = t.Mixout&amp;lt;Mixin2&amp;gt;();&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;Rather amusingly (though in retrospect, it does make sense), IntelliSense does not detect that the extension method &lt;code&gt;Mixout&lt;/code&gt; applies to &lt;code&gt;Test&lt;/code&gt;, but the compiler does accept it, as long as &lt;code&gt;Test&lt;/code&gt; actually has the mixin. If you try,&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;t.Mixout&amp;lt;Mixin3&amp;gt;();
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;It gives you a compilation error.&lt;/p&gt; 
&lt;p&gt;You can go a bit fancy, and define the following method too:&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;[Obsolete(&quot;The object does not have this mixin.&quot;, true)]&lt;font&gt;&lt;/font&gt;
public static TSome Mixout&amp;lt;TSome&amp;gt;(this HasMixins something) where TSome : Mixin {&lt;font&gt;&lt;/font&gt;
    return default(TSome);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;What this does is, a) display a method called &lt;code&gt;Mixout&lt;/code&gt; in IntelliSense, reminding you of its existence, and b) provide a somewhat more descriptive error message (generated by the &lt;code&gt;Obsolete&lt;/code&gt; attribute).&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;I've found a workaround &lt;a href=&quot;https://www.c-sharpcorner.com/UploadFile/b942f9/how-to-create-mixin-using-C-Sharp-4-0/&quot; rel=&quot;nofollow noreferrer&quot;&gt;here&lt;/a&gt;, which while not entirely elegant, allows you to achieve fully observable mixin behavior. Additionally, IntelliSense still works!&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;using System;&lt;font&gt;&lt;/font&gt;
using System.Runtime.CompilerServices; //needed for ConditionalWeakTable&lt;font&gt;&lt;/font&gt;
public interface MAgeProvider // use 'M' prefix to indicate mixin interface&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    // nothing needed in here, it's just a 'marker' interface&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
public static class AgeProvider // implements the mixin using extensions methods&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    static ConditionalWeakTable&amp;lt;MAgeProvider, Fields&amp;gt; table;&lt;font&gt;&lt;/font&gt;
    static AgeProvider()&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        table = new ConditionalWeakTable&amp;lt;MAgeProvider, Fields&amp;gt;();&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
    private sealed class Fields // mixin's fields held in private nested class&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        internal DateTime BirthDate = DateTime.UtcNow;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
    public static int GetAge(this MAgeProvider map)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        DateTime dtNow = DateTime.UtcNow;&lt;font&gt;&lt;/font&gt;
        DateTime dtBorn = table.GetOrCreateValue(map).BirthDate;&lt;font&gt;&lt;/font&gt;
        int age = ((dtNow.Year - dtBorn.Year) * 372&lt;font&gt;&lt;/font&gt;
                   + (dtNow.Month - dtBorn.Month) * 31&lt;font&gt;&lt;/font&gt;
                   + (dtNow.Day - dtBorn.Day)) / 372;&lt;font&gt;&lt;/font&gt;
        return age;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
    public static void SetBirthDate(this MAgeProvider map, DateTime birthDate)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        table.GetOrCreateValue(map).BirthDate = birthDate;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
public abstract class Animal&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    // contents unimportant&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
public class Human : Animal, MAgeProvider&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    public string Name;&lt;font&gt;&lt;/font&gt;
    public Human(string name)&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        Name = name;&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
    // nothing needed in here to implement MAgeProvider&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
static class Test&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    static void Main()&lt;font&gt;&lt;/font&gt;
    {&lt;font&gt;&lt;/font&gt;
        Human h = new Human(&quot;Jim&quot;);&lt;font&gt;&lt;/font&gt;
        h.SetBirthDate(new DateTime(1980, 1, 1));&lt;font&gt;&lt;/font&gt;
        Console.WriteLine(&quot;Name {0}, Age = {1}&quot;, h.Name, h.GetAge());&lt;font&gt;&lt;/font&gt;
        Human h2 = new Human(&quot;Fred&quot;);&lt;font&gt;&lt;/font&gt;
        h2.SetBirthDate(new DateTime(1960, 6, 1));&lt;font&gt;&lt;/font&gt;
        Console.WriteLine(&quot;Name {0}, Age = {1}&quot;, h2.Name, h2.GetAge());&lt;font&gt;&lt;/font&gt;
        Console.ReadKey();&lt;font&gt;&lt;/font&gt;
    }&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/255553/is-it-possible-to-implement-mixins-in-c&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/255553/is-it-possible-to-implement-mixins-in-c&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5077</guid>
      <comments>https://hot-time.tistory.com/5077#entry5077comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:23:55 +0900</pubDate>
    </item>
    <item>
      <title>C #의 부분 인터페이스</title>
      <link>https://hot-time.tistory.com/5076</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;C #의 부분 인터페이스&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;C #은 부분 인터페이스를 허용합니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;즉, ManagerFactory1.cs 클래스에서&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public partial interface IManagerFactory&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    // Get Methods&lt;font&gt;&lt;/font&gt;
    ITescoManager GetTescoManager();&lt;font&gt;&lt;/font&gt;
    ITescoManager GetTescoManager(INHibernateSession session);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ManagerFactory.cs 클래스에는 다음이 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;public partial interface IManagerFactory&lt;font&gt;&lt;/font&gt;
{&lt;font&gt;&lt;/font&gt;
    // Get Methods&lt;font&gt;&lt;/font&gt;
    IEmployeeManager GetEmployeeManager();&lt;font&gt;&lt;/font&gt;
    IEmployeeManager GetEmployeeManager(INHibernateSession session);&lt;font&gt;&lt;/font&gt;
    IProductManager GetProductManager();&lt;font&gt;&lt;/font&gt;
    IProductManager GetProductManager(INHibernateSession session);&lt;font&gt;&lt;/font&gt;
    IStoreManager GetStoreManager();&lt;font&gt;&lt;/font&gt;
    IStoreManager GetStoreManager(INHibernateSession session);&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ManagerFactory 및 ManagerFactory1은 모두 동일한 어셈블리에 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;가장 간단한 방법은 시도하는 것입니다. :)&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 예, 부분 인터페이스가 허용됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;partial&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수정 자의 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;유효한 위치 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(C # 3.0 사양 참조 포함) :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;클래스 (10.1.2)&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;구조체 (11.1.2)&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;인터페이스 (13.1.2)&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;메서드 (C # 3.0 +) (10.2.7; 10.6.8)&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;스펙의 섹션 10.2에는 부분 유형에 대한 대부분의 일반 세부 사항이 포함되어 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;잘못된 위치 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;열거 형&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;대표자&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지만 중요한 질문은 &lt;/font&gt;&lt;/font&gt;&lt;strong&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;왜일까요?&lt;/font&gt;&lt;/font&gt;&lt;/strong&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;자동 생성 코드를 확장 할 수 있도록 부분 클래스가 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;VS는 양식 파일, 코드 숨김 또는 Linq to SQL 접근자를 생성 할 수 있으며 부분을 사용하여 확장 할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;일반적으로 가치가있는 것보다 더 많은 혼란을 야기하는 클래스 (또는이 경우 인터페이스)를 분할하기 위해 부분을 사용하는 것을 피할 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 경우에는 이것이 여러 파일에 걸쳐 있어야하는 이유를 조사 할 것입니다. 팩토리 패턴 인터페이스는 코드를 통해 추적을 더 복잡하게 만들 수 있지만 여기서는 여러 파일을 통해 추적하게됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;h3&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;네, 그렇습니다.&lt;/font&gt;&lt;/font&gt;&lt;/h3&gt; 
&lt;p&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/wa80x488.aspx&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;MSDN의 &lt;/font&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/wa80x488.aspx&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;부분 클래스 및 메서드 (C # 프로그래밍 가이드)&lt;/font&gt;&lt;/a&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;h3&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;제한 사항 :&lt;/font&gt;&lt;/font&gt;&lt;/h3&gt; 
&lt;ul&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;동일한 유형의 일부인 모든 부분 유형 인터페이스 정의는 다음을 사용하여 수정해야합니다. &lt;/font&gt;&lt;/font&gt;&lt;code&gt;&lt;strong&gt;partial&lt;/strong&gt;&lt;/code&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;부분 수정자는 키워드 바로 앞에만 나타날 수 있습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;interface&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
 &lt;li&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;동일한 유형의 일부를 의미하는 모든 부분 유형 정의는 동일한 어셈블리와 동일한 모듈 (.exe 또는 .dll 파일)에 정의되어야합니다. &lt;/font&gt;&lt;/font&gt;&lt;/li&gt; 
&lt;/ul&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;부분 인터페이스는 코드 생성이 관련 될 때 기본적으로 사용됩니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예를 들어 인터페이스의 한 부분이 생성되고 다른 부분은 사용자가 작성한 경우입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;예, &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/wbx7zzdd.aspx&quot; rel=&quot;noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그렇습니다&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;인터페이스를 부분적으로 만들기 전에 두 번 생각하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;두 개의 itnerface로 분할하는 것이 더 낫습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;인터페이스를 작고 집중적으로 유지하십시오. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;부분은 코드 냄새입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;좋은.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;나는 이것이 냄새가 될 수 있다는 데 동의하지만 여전히 그것을 할 한 가지 이유를 생각할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;현재 WPF 및 Silverlight 용 응용 프로그램 MVVM 프레임 워크를 작업 중입니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 만난 것은 WPF와 Silverlight가 너무 다르기 때문에 코드 전체에서 정의를 사용하는 것보다 부분 인터페이스 / 클래스가 실제로 두 프레임 워크 간의 차이점을 분리하고 코드를 깔끔하고 거의 단일 소스로 유지할 수 있다는 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;See the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/wa80x488.aspx&quot; rel=&quot;nofollow noreferrer&quot;&gt;docs&lt;/a&gt; which state that it can be used on classes, structs or interfaces&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Short and simple: YES!&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Yes, it does. Are both partial interfaces defined in the same namespace?&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/734112/partial-interface-in-c-sharp&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/734112/partial-interface-in-c-sharp&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5076</guid>
      <comments>https://hot-time.tistory.com/5076#entry5076comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:23:39 +0900</pubDate>
    </item>
    <item>
      <title>UIView의 clipsToBounds와 CALayer의 masksToBounds 사이의 관계는 어떻습니까?</title>
      <link>https://hot-time.tistory.com/5075</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UIView의 clipsToBounds와 CALayer의 masksToBounds 사이의 관계는 어떻습니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;A &lt;/font&gt;&lt;/font&gt;&lt;code&gt;UIView&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;CALayer&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;꽤 확실합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;그러나 둘 다 같은 것을 의미하는 것을 제공하는 것 같습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;내가 설정 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;clipsToBounds=YES&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하면 이것은 또한 레이어를 설정 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;masksToBounds=YES&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;합니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;왜 다른 이름입니까? &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아는 사람 있나요?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;때문에 그들은 다른 이름입니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;UIView&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;및 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;CALayer&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다른 및 그와 관련된 다른 용어를 가지고 있지만 기능적으로 동일합니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;디스 어셈블 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;clipsToBounds&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하면 호출 만 표시됩니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;masksToBounds&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;(시뮬레이터 프레임 워크에서 디스 어셈블리이므로 x86).&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;-(BOOL)[UIView(Rendering) clipsToBounds]&lt;font&gt;&lt;/font&gt;
    +0  3091938a  55              pushl    %ebp&lt;font&gt;&lt;/font&gt;
    +1  3091938b  89e5            movl     %esp,%ebp&lt;font&gt;&lt;/font&gt;
    +3  3091938d  e800000000      calll    0x30919392&lt;font&gt;&lt;/font&gt;
    +8  30919392  59              popl     %ecx&lt;font&gt;&lt;/font&gt;
    +9  30919393  8b4508          movl     0x08(%ebp),%eax&lt;font&gt;&lt;/font&gt;
   +12  30919396  8b5004          movl     0x04(%eax),%edx         (CALayer)_layer&lt;font&gt;&lt;/font&gt;
   +15  30919399  8b8186cb1301    movl     0x0113cb86(%ecx),%eax    masksToBounds&lt;font&gt;&lt;/font&gt;
   +21  3091939f  89450c          movl     %eax,0x0c(%ebp)&lt;font&gt;&lt;/font&gt;
   +24  309193a2  895508          movl     %edx,0x08(%ebp)&lt;font&gt;&lt;/font&gt;
   +27  309193a5  c9              leave&lt;font&gt;&lt;/font&gt;
   +28  309193a6  e92e211801      jmpl     0x31a9b4d9&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;어떤 사람은 clipToBounds가 false로 설정되고 maskToBounds가 true로 설정되면 어떤 일이 발생하는지 물었습니다. 또는 누군가가 스크린 샷을 추가하면 더 좋을 수 있습니다. &lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;코너 반경과 그림자를 모두 뷰에 설정하려는 동일한 문제를 발견했습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;하지만 masksToBound를 YES로 설정하자마자 그림자를 제거하지만 콘텐츠를 자르고 NO로 설정하면 그림자를 표시하지만 콘텐츠를 자르지 않기 때문에 불가능합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;a href=&quot;https://github.com/vikram-rajpuro/LayerMTB.git&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;ClipToBound 및 MasksToBound 이해&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 하기 더 잘 설명하는 프로젝트를 만들었습니다.&lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://github.com/vikram-rajpuro/LayerMTB.git&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;CALayer는 컨테이너가 아니라 단순히 시각적 콘텐츠가있는 화면의 사각형을 나타내는 클래스라는 결론에 도달했습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;UIView에서 수행 된 모든 드로잉은 CALayer로 이동하여 시각적 콘텐츠가 그려집니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;a href=&quot;https://i.stack.imgur.com/FysNi.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/FysNi.png&quot; alt=&quot;masksToBound가 NO로 설정 됨&quot;&gt;&lt;/a&gt; &lt;a href=&quot;https://i.stack.imgur.com/Tpvvv.png&quot; rel=&quot;nofollow noreferrer&quot;&gt;&lt;img src=&quot;https://i.stack.imgur.com/Tpvvv.png&quot; alt=&quot;masksToBound가 YES로 설정 됨&quot;&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;참조 URL : &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;https://stackoverflow.com/questions/1177775/how-is-the-relation-between-uiviews-clipstobounds-and-calayers-maskstobounds&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;https://stackoverflow.com/questions/1177775/how-is-the-relation-between-uiviews-clipstobounds-and-calayers-maskstobounds&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5075</guid>
      <comments>https://hot-time.tistory.com/5075#entry5075comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:23:30 +0900</pubDate>
    </item>
    <item>
      <title>MySQLnd가 활성 드라이버인지 확인하는 방법은 무엇입니까?</title>
      <link>https://hot-time.tistory.com/5074</link>
      <description>&lt;h2&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;MySQLnd가 활성 드라이버인지 확인하는 방법은 무엇입니까?&lt;/font&gt;&lt;/font&gt;&lt;/h2&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;당연한 질문 일 수도 있지만 확실히하고 싶습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;MySQLnd가 활성 드라이버인지 어떻게 알 수 있습니까?&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PHP 5.3 및 MySQL 5.1.37을 실행하고 있습니다. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;phpinfo () mysqlnd가 나열되어 있지만 이것만으로는 MySQLnd 또는 이전 드라이버를 사용하고 있는지 확인할 수 없습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;phpinfo () 출력 추출&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;mysql&lt;font&gt;&lt;/font&gt;
MySQL Support   enabled&lt;font&gt;&lt;/font&gt;
Active Persistent Links     0&lt;font&gt;&lt;/font&gt;
Active Links    0&lt;font&gt;&lt;/font&gt;
Client API version  mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $ &lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
mysqli&lt;font&gt;&lt;/font&gt;
MysqlI Support  enabled&lt;font&gt;&lt;/font&gt;
Client API library version  mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $&lt;font&gt;&lt;/font&gt;
Active Persistent Links     0&lt;font&gt;&lt;/font&gt;
Inactive Persistent Links   0&lt;font&gt;&lt;/font&gt;
Active Links    26 &lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
mysqlnd&lt;font&gt;&lt;/font&gt;
mysqlnd enabled&lt;font&gt;&lt;/font&gt;
Version     mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $ &lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
PDO&lt;font&gt;&lt;/font&gt;
PDO support enabled&lt;font&gt;&lt;/font&gt;
PDO drivers     mysql&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
pdo_mysql&lt;font&gt;&lt;/font&gt;
PDO Driver for MySQL    enabled&lt;font&gt;&lt;/font&gt;
Client API version  mysqlnd 5.0.5-dev - 081106 - $Revision: 1.3.2.27 $ &lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;PDO를 사용하고 있는데 PDO 드라이버에 mysql이 표시됩니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 트릭을 수행해야합니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;?php&lt;font&gt;&lt;/font&gt;
$mysqlnd = function_exists('mysqli_fetch_all');&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
if ($mysqlnd) {&lt;font&gt;&lt;/font&gt;
    echo 'mysqlnd enabled!';&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;활성 PDO 드라이버인지 감지하려면 MySQL PDO 개체를 만든 다음 다음을 수행하십시오.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;if (strpos($pdo-&amp;gt;getAttribute(PDO::ATTR_CLIENT_VERSION), 'mysqlnd') !== false) {&lt;font&gt;&lt;/font&gt;
    echo 'PDO MySQLnd enabled!';&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;에 대한 확인 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;mysqli_fetch_all&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;은 사용 중인지 여부를 설명하지 않습니다 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;mysqlnd&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;. &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;오히려 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://au1.php.net/manual/en/mysqli.overview.php&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mysqli 확장이&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 활성화되어 있음을 나타냅니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;MySQLi는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;mysql&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이전 버전의 PHP에서 제공되었던 확장 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;의 업데이트 된 버전입니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;blockquote&gt; 
 &lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;/font&gt;&lt;code&gt;mysql&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;확장의 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;mysqli&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;확장 및 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;PDO MySQL driver&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;수있는 각각의 개별적으로 또는 하나 libmysqlclient mysqlnd을 사용하도록 구성 될&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;/blockquote&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이 코드 :&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;?php&lt;font&gt;&lt;/font&gt;
$mysqlnd = function_exists('mysqli_fetch_all');&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
if ($mysqlnd) {&lt;font&gt;&lt;/font&gt;
    echo 'mysqlnd enabled!';&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;아무것도 에코하지 않으면 mysqli가 컴파일 / 활성화 / 설치되지 않았으며 이전 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;mysql&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;확장을 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;사용하고있을 수 있습니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mysqlnd를 사용하는 mysqli와 libmysqlclient를 사용하는 mysql을 확인하는 더 좋은 방법은 다음과 같이하는 것입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;?php&lt;font&gt;&lt;/font&gt;
if (function_exists('mysql_connect')) {&lt;font&gt;&lt;/font&gt;
    echo &quot;- MySQL &amp;lt;b&amp;gt;is installed&amp;lt;/b&amp;gt;.&amp;lt;br&amp;gt;&quot;;&lt;font&gt;&lt;/font&gt;
} else  {&lt;font&gt;&lt;/font&gt;
    echo &quot;- MySQL &amp;lt;b&amp;gt;is not&amp;lt;/b&amp;gt; installed.&amp;lt;br&amp;gt;&quot;;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
if (function_exists('mysqli_connect')) {&lt;font&gt;&lt;/font&gt;
    echo &quot;- MySQLi &amp;lt;b&amp;gt;is installed&amp;lt;/b&amp;gt;.&amp;lt;br&amp;gt;&quot;;&lt;font&gt;&lt;/font&gt;
} else {&lt;font&gt;&lt;/font&gt;
    echo &quot;- MySQLi &amp;lt;b&amp;gt;is not installed&amp;lt;/b&amp;gt;.&amp;lt;br&amp;gt;&quot;;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
if (function_exists('mysqli_get_client_stats')) {&lt;font&gt;&lt;/font&gt;
    echo &quot;- MySQLnd driver is being used.&amp;lt;br&amp;gt;&quot;;&lt;font&gt;&lt;/font&gt;
} else {&lt;font&gt;&lt;/font&gt;
    echo &quot;- libmysqlclient driver is being used.&amp;lt;br&amp;gt;&quot;;&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;이것은 &lt;/font&gt;&lt;/font&gt;&lt;a href=&quot;http://www.php.net/manual/en/mysqlnd.stats.php&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;mysqlnd가 드라이버로 mysqlnd를 사용할 때만 작동하는 세 가지 추가 기능을 제공&lt;/font&gt;&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; 하기 때문에 &lt;/font&gt;&lt;a href=&quot;http://www.php.net/manual/en/mysqlnd.stats.php&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;작동합니다&lt;/font&gt;&lt;/a&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt; .&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;마지막으로 PDO 검사는 &lt;/font&gt;&lt;/font&gt;&lt;code&gt;$pdo&lt;/code&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;변수를 먼저 정의 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;해야합니다 &lt;/font&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;$dbHost = &quot;localhost&quot;;&lt;font&gt;&lt;/font&gt;
$dbUser = &quot;root&quot;;&lt;font&gt;&lt;/font&gt;
$dbPass = &quot;password&quot;;&lt;font&gt;&lt;/font&gt;
$dbName = &quot;database&quot;;&lt;font&gt;&lt;/font&gt;
&lt;font&gt;&lt;/font&gt;
$pdo = new PDO('mysql:host='.$dbHost.';dbname='.$dbName, $dbUser, $dbPass);&lt;font&gt;&lt;/font&gt;
if (strpos($pdo-&amp;gt;getAttribute(PDO::ATTR_CLIENT_VERSION), 'mysqlnd') !== false) {&lt;font&gt;&lt;/font&gt;
    echo '- PDO MySQLnd &amp;lt;b&amp;gt;is enabled&amp;lt;/b&amp;gt;.&amp;lt;br&amp;gt;';&lt;font&gt;&lt;/font&gt;
} else {&lt;font&gt;&lt;/font&gt;
    echo '- PDO MySQLnd &amp;lt;b&amp;gt;is not enabled&amp;lt;/b&amp;gt;.&amp;lt;br&amp;gt;';&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
?&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;드라이버 (libmysql 또는 mysqlnd)는 컴파일 타임에 선택되며,이 둘 중 하나는 mysql, mysqli 및 pdo_mysql에 대해 독립적으로 지정할 수 있습니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;p&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;&lt;font style=&quot;vertical-align: inherit;&quot;&gt;다음은 mysqlnd에 해당하는 세 가지 구성 옵션입니다.&lt;/font&gt;&lt;/font&gt;&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;  --with-mysql[=DIR]      Include MySQL support.  DIR is the MySQL base&lt;font&gt;&lt;/font&gt;
                          directory.  If mysqlnd is passed as DIR,&lt;font&gt;&lt;/font&gt;
                          the MySQL native driver will be used [/usr/local]&lt;font&gt;&lt;/font&gt;
  --with-mysqli[=FILE]    Include MySQLi support.  FILE is the path&lt;font&gt;&lt;/font&gt;
                          to mysql_config.  If mysqlnd is passed as FILE,&lt;font&gt;&lt;/font&gt;
                          the MySQL native driver will be used [mysql_config]&lt;font&gt;&lt;/font&gt;
  --with-pdo-mysql[=DIR]    PDO: MySQL support. DIR is the MySQL base directoy&lt;font&gt;&lt;/font&gt;
                                 If mysqlnd is passed as DIR, the MySQL native&lt;font&gt;&lt;/font&gt;
                                 native driver will be used [/usr/local]&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt; 
&lt;p&gt;&lt;br&gt; In your case, the &quot;Client API version&quot; is &quot;mysqlnd 5.0.5-dev&quot; for both mysql, mysqli, and pdo_mysql.&lt;/p&gt; 
&lt;p&gt;So it seems you ahre using mysqlnd in either three cases.&lt;/p&gt; 
&lt;p&gt;In the case of PDO, you have the MySQL driver installed -- and that one is compiled based on mysqlnd.&lt;/p&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;This is what I was looking for&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;&amp;lt;?php&lt;font&gt;&lt;/font&gt;
if (extension_loaded('mysqlnd')) {&lt;font&gt;&lt;/font&gt;
}&lt;font&gt;&lt;/font&gt;
?&amp;gt;&lt;font&gt;&lt;/font&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;Maybe check if &lt;a href=&quot;http://php.net/mysqlnd.config.php&quot; rel=&quot;nofollow&quot;&gt;these settings&lt;/a&gt; exist? phpinfo() renders them differently from other ini settings for some reason. Works for 5.4, not sure about 5.3.&lt;/p&gt; 
&lt;pre&gt;&lt;code&gt;ini_get('mysqlnd.debug') !== false
&lt;/code&gt;&lt;/pre&gt;
&lt;hr contenteditable=&quot;false&quot; data-ke-type=&quot;horizontalRule&quot; data-ke-style=&quot;style5&quot;&gt;
&lt;p&gt;phpinfo() in the beginning lists the &quot;Configure Command&quot; used to compile PHP.&lt;/p&gt; 
&lt;p&gt;As they state in other answers mysqlnd is 1 (the default) of 2 choices during the php install/compile process.&lt;/p&gt; 
&lt;p&gt;My phpinfo Configure Command for 7.0.33 is:&lt;/p&gt; 
&lt;p&gt;'./configure' '--prefix=/opt/php70' '--with-libdir=lib64' '--enable-bcmath' '--enable-calendar' '--enable-dbase' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-intl' '--enable-libxml' '--enable-mbstring' '--enable-pdo' '--enable-soap' '--enable-sockets' '--enable-sqlite-utf8' '--enable-wddx' '--enable-zip' '--with-bz2' '--with-curl' '--with-freetype-dir' '--with-gd' '--with-gettext' '--with-gmp' '--with-imap' '--with-imap-ssl' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-mcrypt' '--with-mhash' '--with-mssql' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl' '--with-pdo-mysql=/usr' '--with-pdo-pgsql=/usr' '--with-pgsql=/usr' '--with-pdo-sqlite' '--with-png-dir' '--with-pspell' '--with-sqlite' '--with-system-tzdata' '--with-tidy' '--with-unixODBC' '--with-xmlrpc' '--with-xsl' '--with-zlib'&lt;/p&gt; 
&lt;p&gt;Note --with-mysqli=/usr/bin/mysql_config' '&lt;/p&gt; 
&lt;p&gt;and --enable-mysqlnd' ' (Not in this one but a readout on a 5.6 php build)&lt;/p&gt; 
&lt;p&gt;--with-mysqli= is pointing to a directory meaning it is using libmysqlclient If it was mysqlnd instead then it is using the native driver. &lt;/p&gt; 
&lt;p&gt;For more info on this &lt;a href=&quot;http://php.net/manual/en/mysqlinfo.library.choosing.php&quot; rel=&quot;nofollow noreferrer&quot;&gt;http://php.net/manual/en/mysqlinfo.library.choosing.php&lt;/a&gt;&lt;/p&gt; 
&lt;p&gt;(I know this is way old however this knowledge would have saved me hours of tech support debate and I seen this first.)&lt;/p&gt;
&lt;p&gt;ReferenceURL : &lt;a href=&quot;https://stackoverflow.com/questions/1475701/how-to-know-if-mysqlnd-is-the-active-driver&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;https://stackoverflow.com/questions/1475701/how-to-know-if-mysqlnd-is-the-active-driver&lt;/a&gt;&lt;/p&gt;</description>
      <category>IT story</category>
      <category>C#</category>
      <category>c++</category>
      <category>Java</category>
      <category>javascript</category>
      <category>jquery</category>
      <category>spring</category>
      <category>spring3</category>
      <author>hot-time</author>
      <guid isPermaLink="true">https://hot-time.tistory.com/5074</guid>
      <comments>https://hot-time.tistory.com/5074#entry5074comment</comments>
      <pubDate>Wed, 6 Jan 2021 20:23:21 +0900</pubDate>
    </item>
  </channel>
</rss>