123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?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><div class="gdoc-toc gdoc-toc__level--6">
- <nav id="TableOfContents">
- <ul>
- <li>
- <ul>
- <li><a href="#преобразование-числа-в-ip-адрес">Преобразование числа в IP-адрес</a></li>
- <li><a href="#преобразование-ip-адреса-в-число-в-прямом-порядке-be">Преобразование IP-адреса в число в прямом порядке (BE)</a></li>
- </ul>
- </li>
- </ul>
- </nav>
- <hr />
- </div>
- <div class="flex align-center gdoc-page__anchorwrap">
- <h2 id="преобразование-числа-в-ip-адрес"
- >
- Преобразование числа в IP-адрес
- </h2>
- <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">
- <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg>
- </a>
- </div>
- <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-c#" data-lang="c#"><span class="line"><span class="cl"><span class="k">new</span> <span class="n">System</span><span class="p">.</span><span class="n">Net</span><span class="p">.</span><span class="n">IPAddress</span><span class="p">(</span><span class="m">36546</span><span class="p">)).</span><span class="n">ToString</span><span class="p">();</span>
- </span></span></code></pre></div><div class="flex align-center gdoc-page__anchorwrap">
- <h2 id="преобразование-ip-адреса-в-число-в-прямом-порядке-be"
- >
- Преобразование IP-адреса в число в прямом порядке (BE)
- </h2>
- <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">
- <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg>
- </a>
- </div>
- <div class="highlight"><pre tabindex="0" class="chroma"><code class="language-c#" data-lang="c#"><span class="line"><span class="cl"><span class="p">{</span>
- </span></span><span class="line"><span class="cl"> <span class="kt">byte</span><span class="p">[]</span> <span class="n">ipNums</span> <span class="p">=</span> <span class="n">ip</span><span class="p">.</span><span class="n">Split</span><span class="p">(</span><span class="sc">&#39;.&#39;</span><span class="p">).</span><span class="n">Select</span><span class="p">(</span><span class="n">s</span> <span class="p">=&gt;</span> <span class="kt">byte</span><span class="p">.</span><span class="n">Parse</span><span class="p">(</span><span class="n">s</span><span class="p">)).</span><span class="n">ToArray</span><span class="p">();</span>
- </span></span><span class="line"><span class="cl"> <span class="kt">uint</span> <span class="n">res</span> <span class="p">=</span> <span class="m">0</span><span class="p">;</span>
- </span></span><span class="line"><span class="cl">
- </span></span><span class="line"><span class="cl"> <span class="n">res</span> <span class="p">=</span> <span class="n">res</span> <span class="p">+</span> <span class="n">ipNums</span><span class="p">[</span><span class="m">0</span><span class="p">]</span> <span class="p">&lt;&lt;</span> <span class="m">8</span><span class="p">;</span>
- </span></span><span class="line"><span class="cl"> <span class="n">res</span> <span class="p">=</span> <span class="n">res</span> <span class="p">+</span> <span class="n">ipNums</span><span class="p">[</span><span class="m">1</span><span class="p">]</span> <span class="p">&lt;&lt;</span> <span class="m">8</span><span class="p">;</span>
- </span></span><span class="line"><span class="cl"> <span class="n">res</span> <span class="p">=</span> <span class="n">res</span> <span class="p">+</span> <span class="n">ipNums</span><span class="p">[</span><span class="m">2</span><span class="p">]</span> <span class="p">&lt;&lt;</span> <span class="m">8</span><span class="p">;</span>
- </span></span><span class="line"><span class="cl"> <span class="n">res</span> <span class="p">=</span> <span class="n">res</span> <span class="p">+</span> <span class="n">ipNums</span><span class="p">[</span><span class="m">3</span><span class="p">];</span>
- </span></span><span class="line"><span class="cl"> <span class="k">return</span> <span class="n">res</span><span class="p">;</span>
- </span></span><span class="line"><span class="cl"><span class="p">}</span>
- </span></span></code></pre></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><div class="flex align-center gdoc-page__anchorwrap">
- <h2 id="работа-с-базой"
- >
- Работа с базой
- </h2>
- <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">
- <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg>
- </a>
- </div>
- <ul>
- <li><a href="https://github.com/StackExchange/Dapper" target="_blank" >Dapper<svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg></a></li>
- </ul>
- <div class="flex align-center gdoc-page__anchorwrap">
- <h2 id="работа-с-ssh"
- >
- Работа с SSH
- </h2>
- <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">
- <svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg>
- </a>
- </div>
- <ul>
- <li><a href="https://github.com/sshnet/SSH.NET" target="_blank" >SSH.NET<svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg></a>. <a href="https:/gist.github.com/piccaso/d963331dcbf20611b094" target="_blank" >Некоторые примеры<svg class="gdoc-icon gdoc_link"><use xlink:href="#gdoc_link"></use></svg></a>.</li>
- </ul></description></item></channel></rss>
|