index.xml 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>C# on Max Wiki Site</title><link>https://maxtar.github.io/programming/csharp/</link><description>Recent content in C# on Max Wiki Site</description><generator>Hugo</generator><language>ru-RU</language><lastBuildDate>Wed, 05 Oct 2022 01:42:05 +0300</lastBuildDate><atom:link href="https://maxtar.github.io/programming/csharp/index.xml" rel="self" type="application/rss+xml"/><item><title>Полезные функции</title><link>https://maxtar.github.io/programming/csharp/useful-func/</link><pubDate>Wed, 05 Oct 2022 01:42:05 +0300</pubDate><guid>https://maxtar.github.io/programming/csharp/useful-func/</guid><description>&lt;div class="gdoc-toc gdoc-toc__level--6">
  2. &lt;nav id="TableOfContents">
  3. &lt;ul>
  4. &lt;li>
  5. &lt;ul>
  6. &lt;li>&lt;a href="#преобразование-числа-в-ip-адрес">Преобразование числа в IP-адрес&lt;/a>&lt;/li>
  7. &lt;li>&lt;a href="#преобразование-ip-адреса-в-число-в-прямом-порядке-be">Преобразование IP-адреса в число в прямом порядке (BE)&lt;/a>&lt;/li>
  8. &lt;/ul>
  9. &lt;/li>
  10. &lt;/ul>
  11. &lt;/nav>
  12. &lt;hr />
  13. &lt;/div>
  14. &lt;div class="flex align-center gdoc-page__anchorwrap">
  15. &lt;h2 id="преобразование-числа-в-ip-адрес"
  16. >
  17. Преобразование числа в IP-адрес
  18. &lt;/h2>
  19. &lt;a data-clipboard-text="https://maxtar.github.io/programming/csharp/useful-func/#преобразование-числа-в-ip-адрес" class="gdoc-page__anchor clip flex align-center" title=" Преобразование числа в IP-адрес" aria-label=" Преобразование числа в IP-адрес" href="#%d0%bf%d1%80%d0%b5%d0%be%d0%b1%d1%80%d0%b0%d0%b7%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-%d1%87%d0%b8%d1%81%d0%bb%d0%b0-%d0%b2-ip-%d0%b0%d0%b4%d1%80%d0%b5%d1%81">
  20. &lt;svg class="gdoc-icon gdoc_link">&lt;use xlink:href="#gdoc_link">&lt;/use>&lt;/svg>
  21. &lt;/a>
  22. &lt;/div>
  23. &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-c#" data-lang="c#">&lt;span class="line">&lt;span class="cl">&lt;span class="k">new&lt;/span> &lt;span class="n">System&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">Net&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">IPAddress&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="m">36546&lt;/span>&lt;span class="p">)).&lt;/span>&lt;span class="n">ToString&lt;/span>&lt;span class="p">();&lt;/span>
  24. &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;div class="flex align-center gdoc-page__anchorwrap">
  25. &lt;h2 id="преобразование-ip-адреса-в-число-в-прямом-порядке-be"
  26. >
  27. Преобразование IP-адреса в число в прямом порядке (BE)
  28. &lt;/h2>
  29. &lt;a data-clipboard-text="https://maxtar.github.io/programming/csharp/useful-func/#преобразование-ip-адреса-в-число-в-прямом-порядке-be" class="gdoc-page__anchor clip flex align-center" title=" Преобразование IP-адреса в число в прямом порядке (BE)" aria-label=" Преобразование IP-адреса в число в прямом порядке (BE)" href="#%d0%bf%d1%80%d0%b5%d0%be%d0%b1%d1%80%d0%b0%d0%b7%d0%be%d0%b2%d0%b0%d0%bd%d0%b8%d0%b5-ip-%d0%b0%d0%b4%d1%80%d0%b5%d1%81%d0%b0-%d0%b2-%d1%87%d0%b8%d1%81%d0%bb%d0%be-%d0%b2-%d0%bf%d1%80%d1%8f%d0%bc%d0%be%d0%bc-%d0%bf%d0%be%d1%80%d1%8f%d0%b4%d0%ba%d0%b5-be">
  30. &lt;svg class="gdoc-icon gdoc_link">&lt;use xlink:href="#gdoc_link">&lt;/use>&lt;/svg>
  31. &lt;/a>
  32. &lt;/div>
  33. &lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-c#" data-lang="c#">&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
  34. &lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kt">byte&lt;/span>&lt;span class="p">[]&lt;/span> &lt;span class="n">ipNums&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="n">ip&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">Split&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="sc">&amp;#39;.&amp;#39;&lt;/span>&lt;span class="p">).&lt;/span>&lt;span class="n">Select&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">s&lt;/span> &lt;span class="p">=&amp;gt;&lt;/span> &lt;span class="kt">byte&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">Parse&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="n">s&lt;/span>&lt;span class="p">)).&lt;/span>&lt;span class="n">ToArray&lt;/span>&lt;span class="p">();&lt;/span>
  35. &lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="kt">uint&lt;/span> &lt;span class="n">res&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="m">0&lt;/span>&lt;span class="p">;&lt;/span>
  36. &lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
  37. &lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">res&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="n">res&lt;/span> &lt;span class="p">+&lt;/span> &lt;span class="n">ipNums&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="m">0&lt;/span>&lt;span class="p">]&lt;/span> &lt;span class="p">&amp;lt;&amp;lt;&lt;/span> &lt;span class="m">8&lt;/span>&lt;span class="p">;&lt;/span>
  38. &lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">res&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="n">res&lt;/span> &lt;span class="p">+&lt;/span> &lt;span class="n">ipNums&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="m">1&lt;/span>&lt;span class="p">]&lt;/span> &lt;span class="p">&amp;lt;&amp;lt;&lt;/span> &lt;span class="m">8&lt;/span>&lt;span class="p">;&lt;/span>
  39. &lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">res&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="n">res&lt;/span> &lt;span class="p">+&lt;/span> &lt;span class="n">ipNums&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="m">2&lt;/span>&lt;span class="p">]&lt;/span> &lt;span class="p">&amp;lt;&amp;lt;&lt;/span> &lt;span class="m">8&lt;/span>&lt;span class="p">;&lt;/span>
  40. &lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">res&lt;/span> &lt;span class="p">=&lt;/span> &lt;span class="n">res&lt;/span> &lt;span class="p">+&lt;/span> &lt;span class="n">ipNums&lt;/span>&lt;span class="p">[&lt;/span>&lt;span class="m">3&lt;/span>&lt;span class="p">];&lt;/span>
  41. &lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="k">return&lt;/span> &lt;span class="n">res&lt;/span>&lt;span class="p">;&lt;/span>
  42. &lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">}&lt;/span>
  43. &lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div></description></item><item><title>Полезные библиотеки</title><link>https://maxtar.github.io/programming/csharp/useful-libs/</link><pubDate>Wed, 05 Oct 2022 01:28:55 +0300</pubDate><guid>https://maxtar.github.io/programming/csharp/useful-libs/</guid><description>&lt;div class="flex align-center gdoc-page__anchorwrap">
  44. &lt;h2 id="работа-с-базой"
  45. >
  46. Работа с базой
  47. &lt;/h2>
  48. &lt;a data-clipboard-text="https://maxtar.github.io/programming/csharp/useful-libs/#работа-с-базой" class="gdoc-page__anchor clip flex align-center" title=" Работа с базой" aria-label=" Работа с базой" href="#%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0-%d1%81-%d0%b1%d0%b0%d0%b7%d0%be%d0%b9">
  49. &lt;svg class="gdoc-icon gdoc_link">&lt;use xlink:href="#gdoc_link">&lt;/use>&lt;/svg>
  50. &lt;/a>
  51. &lt;/div>
  52. &lt;ul>
  53. &lt;li>&lt;a href="https://github.com/StackExchange/Dapper" target="_blank" >Dapper&lt;svg class="gdoc-icon gdoc_link">&lt;use xlink:href="#gdoc_link">&lt;/use>&lt;/svg>&lt;/a>&lt;/li>
  54. &lt;/ul>
  55. &lt;div class="flex align-center gdoc-page__anchorwrap">
  56. &lt;h2 id="работа-с-ssh"
  57. >
  58. Работа с SSH
  59. &lt;/h2>
  60. &lt;a data-clipboard-text="https://maxtar.github.io/programming/csharp/useful-libs/#работа-с-ssh" class="gdoc-page__anchor clip flex align-center" title=" Работа с SSH" aria-label=" Работа с SSH" href="#%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0-%d1%81-ssh">
  61. &lt;svg class="gdoc-icon gdoc_link">&lt;use xlink:href="#gdoc_link">&lt;/use>&lt;/svg>
  62. &lt;/a>
  63. &lt;/div>
  64. &lt;ul>
  65. &lt;li>&lt;a href="https://github.com/sshnet/SSH.NET" target="_blank" >SSH.NET&lt;svg class="gdoc-icon gdoc_link">&lt;use xlink:href="#gdoc_link">&lt;/use>&lt;/svg>&lt;/a>. &lt;a href="https:/gist.github.com/piccaso/d963331dcbf20611b094" target="_blank" >Некоторые примеры&lt;svg class="gdoc-icon gdoc_link">&lt;use xlink:href="#gdoc_link">&lt;/use>&lt;/svg>&lt;/a>.&lt;/li>
  66. &lt;/ul></description></item></channel></rss>