<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7418930532614105480</id><updated>2024-03-05T18:21:14.112+09:00</updated><category term="blog"/><category term="mac"/><category term="マッサージ"/><category term="会社"/><category term="映画"/><category term="sns"/><category term="出来事"/><category term="考え事"/><title type='text'>fc-vista</title><subtitle type='html'>思ったこと、考えたこと</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>255</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-1822534171928687495</id><published>2016-09-21T23:08:00.000+09:00</published><updated>2016-09-21T23:13:37.778+09:00</updated><title type='text'>タスクマネージャの代わりになるコマンド tasklist,taskkill,Get-Process,Process-Stop</title><content type='html'>タスクマネージャの代わりに打つことができる&lt;a href=&quot;http://technet2.microsoft.com/WindowsServer/ja/library/b917a345-4e90-451e-954a-2cec44e360a31041.mspx?mfr=true&quot;&gt;tasklist&lt;/a&gt;と&lt;a href=&quot;http://technet2.microsoft.com/WindowsServer/ja/library/c1db6dae-41c3-4c94-a038-d87baa0fee091041.mspx?mfr=true&quot;&gt;taskkill&lt;/a&gt;というコマンドがありましたので紹介します。これを使うとコマンドプロンプト上で現在実行されているタスクを表示したりタスクを終了したりすることができます。&lt;br /&gt;
&lt;br /&gt;
使い方は下の通りです。&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;・現在実行されているすべてのタスクを表示する&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 75%;&quot;&gt;C:\&amp;gt;tasklist

イメージ名                     PID セッション名     セッション# メモリ使用量
========================= ======== ================ =========== ============
System Idle Process              0 Services                   0         24 K
System                           4 Services                   0        248 K
smss.exe                       504 Services                   0         48 K
　　　　　　　　　　　　　　　　　・
　　　　　　　　　　　　　　　　　・
　　　　　　　　　　　　　　　　　・
tasklist.exe                  5456 Console                    1      5,088 K&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 75%;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 10px;&quot;&gt;PowerShellの場合 &amp;gt;&lt;span style=&quot;color: blue;&quot;&gt;Get-Process&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;・特定のタスクを表示する。&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 75%;&quot;&gt;
C:\&amp;gt;tasklist /fi &quot;imagename eq notepad.exe&quot;

イメージ名                     PID セッション名     セッション# メモリ使用量
========================= ======== ================ =========== ============
notepad.exe                   4612 Console                    1     14,900 K&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
ここではイメージ名がnotepad.exe（メモ帳）のタスクを表示しています。&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 10px;&quot;&gt;PowerShellの場合 &amp;gt;&lt;span style=&quot;color: blue;&quot;&gt;Get-Process -name chrome&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;・タスクをPIDから終了する。&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 75%;&quot;&gt;
C:\&amp;gt;taskkill /pid 4612
成功: PID 4612 のプロセスに強制終了のシグナルを送信しました。&lt;/span&gt;

PIDが4612のプロセスが終了し、ここではメモ帳が終了します。&lt;/pre&gt;
&lt;pre&gt;
&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 10px;&quot;&gt;PowerShellの場合 &amp;gt;&lt;span style=&quot;color: blue;&quot;&gt;Process-Stop -id &amp;lt;プロセスID&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 10px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;・タスクをイメージ名から終了する。&lt;/span&gt;&lt;br /&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 75%;&quot;&gt;C:\&amp;gt;taskkill /im notepad.exe
成功: プロセス &quot;notepad.exe&quot; (PID 4196) に強制終了のシグナルを送信しました。&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 75%;&quot;&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span style=&quot;font-size: 75%;&quot;&gt;&lt;pre&gt;PowerShellの場合 &amp;gt;&lt;span style=&quot;color: blue;&quot;&gt;Process-Stop -id chrome&lt;/span&gt;&lt;/pre&gt;
&lt;/span&gt;&lt;/pre&gt;
&lt;br /&gt;
ここではメモ帳が終了します。&lt;br /&gt;
&lt;br /&gt;
このようにタスクマネージャで行うことが簡単にコマンドプロンプトでできるのでかなり使えるのではないかと思います。ただtasklistにはイメージ名でソートするような機能がなかったのでそれが残念ですね。&lt;br /&gt;
&lt;br /&gt;
またこの機能はWindows XPのHome Editionだと使えないようですがWindows VistaのHome Premiumだと使えるみたいです。さすがVistaですね。&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;(2016/9/21 追加)&lt;/b&gt;&lt;br /&gt;
時代はPowerShellに変わったのでPowerShellのコマンドも追加してみました。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/1822534171928687495/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/1822534171928687495' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/1822534171928687495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/1822534171928687495'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2008/07/tasklisttaskkill.html' title='タスクマネージャの代わりになるコマンド tasklist,taskkill,Get-Process,Process-Stop'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-221342565413804492</id><published>2015-12-25T04:12:00.001+09:00</published><updated>2015-12-31T03:08:52.999+09:00</updated><title type='text'>熱伝導方程式を陰解法で解いてみるで</title><content type='html'>熱伝導方程式の数値解法は割と現代(近代)科学の真骨頂やと思ったのでまとめるで。
こういう風に数式からプログラムまでなんとなくまとめてある資料はなかったので大学生とかは重宝すると思ってるで。
けどコピーはいかんで。

&lt;h3&gt;熱伝導方程式&lt;/h3&gt;
一次元の熱伝導方程式は次式で表される。&lt;br /&gt;
\begin{equation}
\frac{\partial T}{\partial t} = \alpha \frac{\partial^2T}{\partial^2x}
\end{equation}
$T$は温度、$\alpha$は温度伝導率であり、次式より求まる。
\begin{equation}
\alpha=\frac{\lambda}{\rho c_{p}}
\end{equation}
$\lambda$は熱伝導率、$\rho$は密度、$c_{p}$は定圧比熱である。
&lt;br/&gt;
&lt;h3&gt;偏導関数の近似&lt;/h3&gt;
差分法では偏導関数を前進差分、後退差分で次のように近似する。
\begin{equation}
\frac{\partial f}{\partial x}=\frac{f_{i+1}-f_{i}}{\Delta x}
\end{equation}
\begin{equation}
\frac{\partial f}{\partial x}=\frac{f_{i}-f_{i-1}}{\Delta x}
\end{equation}
2階の偏導関数は1階の偏導関数であるから前進差分と後退差分を用いれば次式を得られる。
\begin{equation}
\frac{\partial^2 f}{\partial^2 x} = \frac{f_{i+1}-2f_{i}+f_{i-1}}{\Delta x^2}
\end{equation}
&lt;br/&gt;
&lt;h3&gt;陽解法&lt;/h3&gt;
前進差分を用いて数値解を求める方法は陽解法と呼ばれる。
$T_{x,t}$として陽解法による差分近似式は次式になる。
\begin{equation}
\frac{T_{i,j+1} - T_{i,j}}{\Delta t} = \alpha\frac{T_{i+1,j}-2T_{i,j}+T_{i-1,j}}{\Delta x^2}
 \end{equation}
$T_{i,j+1}$について解くと次式になる。ここで$\gamma$は$\frac{\Delta t}{\Delta x^2}$となる。
\begin{equation}
T_{i,j+1}=\alpha \gamma T_{i+1,j} + (1-2 \alpha \gamma)T_{i,j}+\alpha \gamma T_{i-1,j}
\end{equation}
&lt;br/&gt;
&lt;h3&gt;陰解法&lt;/h3&gt;
後退差分を用いて数値解を求める方法は陰解法と呼ばれる。
差分近似式は次式となる。
\begin{equation}
\frac{T_{i,j+1}-T_{i,j}}{\Delta t} = \alpha \frac{T_{i+1,j+1}-2T_{i,j+1}+T_{i-1,j+1}}{\Delta x^2}
\end{equation}
これを整理すると次式になる。
\begin{equation}
-\alpha \gamma T_{i+1,j+1}+(1+2 \alpha \gamma)T_{i,j+1} - \alpha \gamma T_{i-1,j+1} = T_{i,j}
\end{equation}
陽解法とは異なり$T_{i,j}$から、次の時刻での$T_{i-1,j+1},T_{i,j+1},T_{i+1,j+1}$の3点を求める。
前式を行列で表すと次の式のようになる。

\[
  \left(
    \begin{array}{ccccc}
      1+2 \alpha \gamma &amp; -\alpha \gamma  &amp; 0 &amp; \ldots &amp; 0 \\
      -\alpha \gamma  &amp; 1+2 \alpha \gamma &amp; -\alpha \gamma &amp; \ldots &amp; 0 \\
       &amp; \vdots &amp;  &amp; \ddots &amp; \vdots \\
      0 &amp; \ldots &amp; -\alpha \gamma  &amp; 1+2 \alpha \gamma &amp; -\alpha \gamma \\
      0 &amp; \ldots &amp; 0 &amp;  -\alpha \gamma  &amp; 1+2 \alpha \gamma
    \end{array}
  \right)
  \left(
   \begin{array}{c}
    T_{1,j+1} \\ T_{2,j+1} \\ \vdots \\ T_{M-1,j+1} \\ T_{M,j+1} 
   \end{array}
  \right)
  =
  \left(
   \begin{array}{c}
   T_{1,j} \\ T_{2,j} \\ \vdots \\ T_{M-1,j} \\ T_{M,j} 
   \end{array}
  \right)
\]

前式の連立一次方程式を数値解法によって解く。このとき行列の$T_{i,j+1}$と$T_{M,j+1}$には境界条件を設定する。
&lt;br/&gt;
&lt;h3&gt;連立一次方程式の数値解法&lt;/h3&gt;
熱伝導方程式を陰解法で解くためには連立一次方程式を解く必要がある。
連立一次方程式を解く方法は数多くあるが、ここでは反復法のヤコビ反復法とガウス・サイデル法について記載する。

以下の三元連立一次方程式を考える。

\begin{equation}
 \left(
  \begin{array}{ccc}
   a_{11} &amp; a_{12} &amp; a_{13} \\
   a_{21} &amp; a_{22} &amp; a_{23} \\
   a_{31} &amp; a_{32} &amp; a_{33}
  \end{array}
 \right)
 \left(
  \begin{array}{c}
   x_{1} \\ x_{2} \\ x_{3}
  \end{array}
 \right)
 =
 \left(
  \begin{array}{c}
   b_{1} \\ b_{2} \\ b_{3}
  \end{array}
 \right)
\end{equation}
前式の行列は次式に書き下せる。
\begin{eqnarray}
  \begin{cases}
    a_{11} x_{1} + a_{12} x_{2} + a_{13} x_{3} = b_{1} &amp; \\
    a_{21} x_{1} + a_{22} x_{2} + a_{23} x_{3} = b_{2} &amp; \\
    a_{31} x_{1} + a_{32} x_{2} + a_{33} x_{3} = b_{3} &amp; \\
  \end{cases}
\end{eqnarray}
この時、$x_{i}$について次式が導かれる。
\begin{eqnarray}
 \begin{cases}
  x_{1}^{(k+1)} = \cfrac{b_{1} - a_{12}x_{2}^{(k)} - a_{12}x_{3}^{(k)}}{a_{11}} &amp; \\
  x_{2}^{(k+1)} = \cfrac{b_{2} - a_{21}x_{1}^{(k)} - a_{22}x_{3}^{(k)}}{a_{22}} &amp; \\
  x_{3}^{(k+1)} = \cfrac{b_{3} - a_{31}x_{1}^{(k)} - a_{31}x_{3}^{(k)}}{a_{33}}
 \end{cases}
\end{eqnarray}
$x_{i}^{(0)}$を初期値として与え、上式に基づき$x_{i}^{(0)},x_{i}^{(1)},x_{i}^{(2)},...$と計算する。
反復回数を$k$とし、$k$を十分大きくすると,$x_{i}^{(k)}$は解に収束し、n元連立一次方程式の場合は次式により計算する。
\begin{equation}
x_{i}^{(k+1)} = \frac{b_{i}}{a_{ii}} - \sum_{j=1,j \ne i}^{n} \frac{a_{ij}}{a_{ii}}x_{j}
\end{equation}
このように解を求める方法がヤコビ反復法である。
解が収束したかどうかは$x_{i}^{(k)}$と$x_{i}^{(k+1)}$の値を比べてその差が許容誤差内に収まっているかどうかで判断する。

ヤコビ反復法では$k$ステップの$x$だけを使って$k+1$の値を求める。
ガウス・サイデル法では$x_{1},x_{2}...x_{n}$と順番に計算した場合、$x_{2}^{k+1}$を求める時には$x_{1}^{k+1}$がすでに計算されており、これらの最新の値を$k+1$の値の計算で使う。
&lt;br/&gt;
&lt;h3&gt;プログラム例&lt;/h3&gt;
陽解法の場合、CFL条件によりタイムステップ幅に厳しい条件を付ける必要がある。
陰解法の場合はタイムステップ幅により解が不安定になることはない。
ここでは陰解法を用いてガウスサイデル法により一次元の熱伝導方程式を解いたPythonのプログラム例とその結果を以下に示す。
&lt;script src=&quot;https://gist.github.com/sanofc/5e87e1e913c9387fdf6d.js&quot;&gt;&lt;/script&gt;
&lt;br/&gt;
最後の絵はプログラムの出力をプロットしたもので右軸が長さ、上軸が温度を表し、時間ごとに左の線から右の線に変わっている。
図を見ると最初は左端だけ300度であるのが徐々に全体に温度が拡がっていく様子がわかる。
&lt;br/&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid8rQ-qnSnEnhw99ZTaVM1PedpfeViszANNy65GT0pUir6MHkNXhjNOjcjGWzzuG3EyaxCXkfRX1ieM3bpCsa4L786B_FiUo_6sdV2Mh3Uq8rfUWK0hMl6KXi_r_ScRsuElcc5Wi351MSO/s1600/heat.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEid8rQ-qnSnEnhw99ZTaVM1PedpfeViszANNy65GT0pUir6MHkNXhjNOjcjGWzzuG3EyaxCXkfRX1ieM3bpCsa4L786B_FiUo_6sdV2Mh3Uq8rfUWK0hMl6KXi_r_ScRsuElcc5Wi351MSO/s320/heat.png&quot; /&gt;&lt;/a&gt;
&lt;br/&gt;
&lt;h3&gt;実践的な解法&lt;/h3&gt;
後退差分による差分近似式を$T_{i,j+1}$について整理すると次式になる。
\begin{equation}
T_{i,j+1}=\frac{T_{i,j}+\alpha \gamma (T_{i+1,j+1} + T_{i-1,j+1})}{1+2 \alpha \gamma}
\end{equation}
上式を線形反復式として解くこともできる。この場合は行列を意識することがなく簡潔になる。
プログラム例は以下になり、同様の結果を得ることができる。
&lt;script src=&quot;https://gist.github.com/sanofc/065f52ac7dcd66768367.js&quot;&gt;&lt;/script&gt;
&lt;br/&gt;
正直をいうと教科書的なガウスサイデル法を使っている例はほとんどなくて実践的な解法に記載したようなサンプルが多かったので絶賛混乱中や。</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/221342565413804492/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/221342565413804492' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/221342565413804492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/221342565413804492'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/12/blog-post.html' title='熱伝導方程式を陰解法で解いてみるで'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-2068030415205668661</id><published>2015-10-13T20:36:00.001+09:00</published><updated>2015-10-13T20:36:45.361+09:00</updated><title type='text'>クロスプラットフォームの幻想</title><content type='html'>&lt;p&gt;
今現在クロスプラットフォームに対応しました!という場合、Mac,Windows,Unixとかだろう。
モバイルだったらiOS,Androidもあるかもしれない。
&lt;p/&gt;
&lt;p&gt;
この場合、バージョンは一年に一回上がるとして対応するバージョンが5個増えることになる。
その間にも新しいOSが増えるかもしれない。
アーキテクチャが変わるかもしれない。
新しいアーキテクチャが出てくるかもしれない。
呼び出していたAPIがなくなるかもしれない。
ブラウザとかが関わるのであればさらに掛け算して評価が必要だ。
Javaや.NETだったらRuntimeが対応していないかもしれない。
3DTouchのような操作やGUIの見た目が微妙に違うかもしれない。
ライセンス形態が変わるかもしれない。
Windows3.1とか古いOSはもう対応しなくていいかもしれない。
同じものでもOSごとに性能が違うかもしれない。
仮想環境で動かさないといけないかもしれない。
今だとコンテナ技術なんてのもある。
TVとか家電用のOSもあるかもしれない。
使いたい言語をライセンス的に使ったらいけないかもしれない。
&lt;p/&gt;
&lt;p&gt;
要はJavaが言っていたような Write Once Run Anywhere というのは幻想で、
こんなに色んな技術が出てくるとハードウェアやOSに合う方法や言語を使うのが
結局早くなってしまうんでないかなあと思った次第です。
&lt;/p&gt;
</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/2068030415205668661/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/2068030415205668661' title='1 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/2068030415205668661'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/2068030415205668661'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/10/blog-post_13.html' title='クロスプラットフォームの幻想'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-1669628927345364724</id><published>2015-10-09T21:53:00.003+09:00</published><updated>2015-10-09T21:53:48.503+09:00</updated><title type='text'>コピペプログラミング</title><content type='html'>ほとんどこのブログをqiita的に使っていたので素直にqiitaに書くことにした。
qiitaとかstackoverflowとか見て思うのが最近はほとんどググれば答えが載っていること。
訳のわからないバグもエラーコードで大体理由がわかってしまう。
コピペプログラミングはダメだとかいう人もいるけどそもそも意味がわかっていなければコピペで組むこともできないわけで。
ソフトウエアはオブジェクト指向に代表されるように組み合わせるが基本だと思うので、コピペプログラミングも技術の一つと言ってもいいと思う。
実はコピペプログラミングは生産性を10倍ぐらい上げているはずだと思うんだけどそういうことを研究している人はいるんだろうか？
</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/1669628927345364724/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/1669628927345364724' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/1669628927345364724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/1669628927345364724'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/10/blog-post.html' title='コピペプログラミング'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-2702749353194612370</id><published>2015-09-24T02:52:00.001+09:00</published><updated>2015-09-24T02:53:28.452+09:00</updated><title type='text'>古き良きteapot</title><content type='html'>&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD4f0CcIjCYUxZ9B9bb4z_MfXALjNQYlMdBddH8zOf72bnGTftsyVqP2RCD-M33p0FmATYKQwFEiNcbWDUtUOVX5Y_9vNI4aA4L4jQE5lopJO-gNxscXh47Dpx3UNc08Mi0KM-Koi1MLvP/s1600/Screen+Shot+2015-09-24+at+2.49.11+AM.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD4f0CcIjCYUxZ9B9bb4z_MfXALjNQYlMdBddH8zOf72bnGTftsyVqP2RCD-M33p0FmATYKQwFEiNcbWDUtUOVX5Y_9vNI4aA4L4jQE5lopJO-gNxscXh47Dpx3UNc08Mi0KM-Koi1MLvP/s320/Screen+Shot+2015-09-24+at+2.49.11+AM.png&quot; /&gt;&lt;/a&gt;
&lt;br&gt;
3D的なことをしたくなったのでデバッグ用にいろいろOpenGLを調べていたのですが今はOpenGL3.1ごろやらで必須になったCore Profileとかいうのが主流らしいです。
ただデバッグ用に確認したいだけで高速化を求めなければGLUTで十分だなあと思った次第です。
teapotを回転するだけですが時代を感じてよいですね。

&lt;script src=&quot;https://gist.github.com/sanofc/9b277d70d9f098eb1614.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/2702749353194612370/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/2702749353194612370' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/2702749353194612370'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/2702749353194612370'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/09/teapot.html' title='古き良きteapot'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhD4f0CcIjCYUxZ9B9bb4z_MfXALjNQYlMdBddH8zOf72bnGTftsyVqP2RCD-M33p0FmATYKQwFEiNcbWDUtUOVX5Y_9vNI4aA4L4jQE5lopJO-gNxscXh47Dpx3UNc08Mi0KM-Koi1MLvP/s72-c/Screen+Shot+2015-09-24+at+2.49.11+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-4443509347239993821</id><published>2015-09-19T02:41:00.002+09:00</published><updated>2015-09-19T02:41:47.670+09:00</updated><title type='text'>C++からCを呼んでみる</title><content type='html'>かなり使い古されていると思うけどC++からCを呼んでみました。
数値計算や簡単なロジックだけであればC言語だけで十分なのでC++の闇に触れないでC言語で作って他の言語から呼ぶのが、
今から性能を求めるシステムを作る場合はよいのではないかと思います。
&lt;script src=&quot;https://gist.github.com/sanofc/95db1ce93db09cd18484.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/4443509347239993821/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/4443509347239993821' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/4443509347239993821'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/4443509347239993821'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/09/cc.html' title='C++からCを呼んでみる'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-3885737507245775344</id><published>2015-09-15T01:05:00.001+09:00</published><updated>2015-09-15T01:05:51.094+09:00</updated><title type='text'>iPhoneでOpenGLを使って四角を書く</title><content type='html'>iPhoneで四角だけを書くものを作りました。
OpenGL ESがわからない上にObjective-Cはしんどいです。
これ正方形を書いたつもりなんだけど長くなっているということは
解像度によって調整しないといけないということなんやろうか。。
ただこの前作った流体シミュレーションと組み合わせると面白いことができそうです。
&lt;br/&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh4RTEZybRQi8fy2s6DK-lsbcNMSpwjSstCWiRQ_Ds-trwPuLsJ97UFrFOJ5q86P_3k_Q1YKBM5oYOxkKthi9uhvVvWvHpfPaeya5zXXFvbRY-udtiaAEv2uV__uwZ9WglicTk1rSz5K2_/s1600/Screen+Shot+2015-09-15+at+1.00.24+AM.png&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh4RTEZybRQi8fy2s6DK-lsbcNMSpwjSstCWiRQ_Ds-trwPuLsJ97UFrFOJ5q86P_3k_Q1YKBM5oYOxkKthi9uhvVvWvHpfPaeya5zXXFvbRY-udtiaAEv2uV__uwZ9WglicTk1rSz5K2_/s320/Screen+Shot+2015-09-15+at+1.00.24+AM.png&quot; /&gt;&lt;/a&gt;
&lt;script src=&quot;https://gist.github.com/sanofc/09922ef6db43345f2830.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/3885737507245775344/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/3885737507245775344' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3885737507245775344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3885737507245775344'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/09/iphoneopengl.html' title='iPhoneでOpenGLを使って四角を書く'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjh4RTEZybRQi8fy2s6DK-lsbcNMSpwjSstCWiRQ_Ds-trwPuLsJ97UFrFOJ5q86P_3k_Q1YKBM5oYOxkKthi9uhvVvWvHpfPaeya5zXXFvbRY-udtiaAEv2uV__uwZ9WglicTk1rSz5K2_/s72-c/Screen+Shot+2015-09-15+at+1.00.24+AM.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-488431950295070886</id><published>2015-09-13T00:22:00.003+09:00</published><updated>2015-09-13T00:52:23.219+09:00</updated><title type='text'>もくもくする何か</title><content type='html'>もくもくする何かを作ってみました。
ナビエストークス方程式的な流体をスタガード格子でコンパクトに書いているサンプルがないので作ってみました。
もともと同じようなものがあったのでほとんど佐野ってきています。
時間ができたらiPhoneアプリみたいにしたいですね。
&lt;iframe width=&quot;420&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/BpO9UJYw7Cc&quot; frameborder=&quot;0&quot; allowfullscreen&gt;&lt;/iframe&gt;
&lt;script src=&quot;https://gist.github.com/sanofc/bf713525835ed9ba629c.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/488431950295070886/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/488431950295070886' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/488431950295070886'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/488431950295070886'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/09/blog-post.html' title='もくもくする何か'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://img.youtube.com/vi/BpO9UJYw7Cc/default.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-1336624767467244894</id><published>2015-08-16T17:06:00.001+09:00</published><updated>2015-08-16T17:12:44.811+09:00</updated><title type='text'>いろんな言語でOOPする</title><content type='html'>&lt;p&gt;
そろそろObjective-Cの勉強もしたくなったのいろんな言語でOOPしてみました。
Javaで書いた1+2だけをするプログラムををC++/Objective-C/Swiftで書いてみます。
これで少しiPhoneアプリのソースも読めそうです。
あとObjective-Cの硬い感じに慣れるとSwiftのチャラっとした感じは受け付けないのも少し理解できました。
ただ結局iPhoneもAndroidもロジックは同じC++が使えるのでC++が結局生き残るだろうなとも思います。
リソース管理はスマートポインタで少し改善できているし、最終的にC++でないとできないことも多いだろうし。
&lt;/p&gt;
&lt;p&gt;
Java
&lt;script src=&quot;https://gist.github.com/sanofc/175bb739f99af7458596.js&quot;&gt;&lt;/script&gt;
&lt;/p&gt;
&lt;p&gt;
C++
&lt;script src=&quot;https://gist.github.com/sanofc/15beea5d8f9df82f5f22.js&quot;&gt;&lt;/script&gt;
&lt;/p&gt;
&lt;p&gt;
Objective-C
&lt;script src=&quot;https://gist.github.com/sanofc/3dcfc7c2331c7a859aa4.js&quot;&gt;&lt;/script&gt;
&lt;/p&gt;
&lt;p&gt;
Swift
&lt;script src=&quot;https://gist.github.com/sanofc/c644733be12bb52aab01.js&quot;&gt;&lt;/script&gt;
&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/1336624767467244894/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/1336624767467244894' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/1336624767467244894'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/1336624767467244894'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/08/oop.html' title='いろんな言語でOOPする'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-7593091647672711205</id><published>2015-06-06T13:24:00.001+09:00</published><updated>2015-06-06T13:24:46.274+09:00</updated><title type='text'>ポインタの威力</title><content type='html'>C言語の復習にポインタの威力を改めて勉強してみました。
やはり 3つ以上のポインタは訳がわからなくなりそうですね。
&lt;script src=&quot;https://gist.github.com/sanofc/106fcbcaa30846981e99.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/7593091647672711205/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/7593091647672711205' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/7593091647672711205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/7593091647672711205'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/06/blog-post.html' title='ポインタの威力'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-3296069675792282436</id><published>2015-03-10T00:04:00.001+09:00</published><updated>2015-03-11T22:16:05.032+09:00</updated><title type='text'>Singleton Collection</title><content type='html'>いろんな言語でSingletonを実装してみると言語ごとの違いがよく出て面白い。
ただ、C言語はかなりノリで作ったものなので、こうこともできるという参考ということで。

&lt;script src=&quot;https://gist.github.com/sanofc/c9915fc314aafbd5f403.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/3296069675792282436/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/3296069675792282436' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3296069675792282436'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3296069675792282436'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/03/singleton-collection.html' title='Singleton Collection'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-3298935012768125085</id><published>2015-02-11T20:06:00.003+09:00</published><updated>2015-02-11T20:07:09.320+09:00</updated><title type='text'>glMatrix2.x系の互換性</title><content type='html'>WebGLのサンプルを見ているとよくglMatrix0.9を使っていることがあるけど新しいglMatrix2.2を使うと若干引数の位置とかが違ったのでメモ。&lt;br /&gt;
&lt;br /&gt;

&lt;script src=&quot;https://gist.github.com/sanofc/e0d61720b3d5b4ec9d7a.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/3298935012768125085/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/3298935012768125085' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3298935012768125085'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3298935012768125085'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/02/glmatrix2x.html' title='glMatrix2.x系の互換性'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-3308001958360147492</id><published>2015-01-27T01:24:00.001+09:00</published><updated>2015-01-27T01:24:48.006+09:00</updated><title type='text'>明けましておめでとうございます。</title><content type='html'>明けましておめでとうございます。&lt;br /&gt;
WebGLとGithub Pagesの勉強がてら日章旗を描いてみました。&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;
&lt;a href=&quot;http://sanofc.github.io/webgl/08/&quot;&gt;http://sanofc.github.io/webgl/08/&amp;nbsp;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
色々めんどくさいことも多いですが、来年ははためかせたいです。。</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/3308001958360147492/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/3308001958360147492' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3308001958360147492'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3308001958360147492'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/01/blog-post_27.html' title='明けましておめでとうございます。'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-292008636241945640</id><published>2015-01-23T02:18:00.000+09:00</published><updated>2015-01-23T02:18:06.178+09:00</updated><title type='text'>一人バイキング</title><content type='html'>&lt;p class=&quot;mobile-photo&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh24p_hxkVyGxyi2bWl3S6vyXdu2U51ZWtlAflomgGkJlYbLnLxEKJC2S_Y360MfDo0_lftbpzINoUwePsalcLmh9PjLQ2fjteLly8Xv6Z1g9vh23nkQ3irj8if9peDDCiDYSOIJSrO7Yl-/s1600-h/downloadfile-1-763527.jpeg&quot;&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh24p_hxkVyGxyi2bWl3S6vyXdu2U51ZWtlAflomgGkJlYbLnLxEKJC2S_Y360MfDo0_lftbpzINoUwePsalcLmh9PjLQ2fjteLly8Xv6Z1g9vh23nkQ3irj8if9peDDCiDYSOIJSrO7Yl-/s320/downloadfile-1-763527.jpeg&quot;  border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5428404282608967026&quot; /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;楽しかったです。&lt;/p&gt; </content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/292008636241945640/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/292008636241945640' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/292008636241945640'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/292008636241945640'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2015/01/blog-post.html' title='一人バイキング'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh24p_hxkVyGxyi2bWl3S6vyXdu2U51ZWtlAflomgGkJlYbLnLxEKJC2S_Y360MfDo0_lftbpzINoUwePsalcLmh9PjLQ2fjteLly8Xv6Z1g9vh23nkQ3irj8if9peDDCiDYSOIJSrO7Yl-/s72-c/downloadfile-1-763527.jpeg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-2614856453023443501</id><published>2014-10-04T15:37:00.000+09:00</published><updated>2014-10-04T19:00:52.104+09:00</updated><title type='text'>放送大学大学院の過去問を解いてみる。</title><content type='html'>&lt;a href=&quot;http://www.ouj.ac.jp/hp/gakuin/kakomon.html&quot;&gt;放送大学大学院の修士全科生入学者選考筆記試験問題&lt;/a&gt;の平成26年と平成25年の第２問ソフトウエア分野だけ一応解いてみました。&lt;br&gt;
&lt;p&gt;
平成26年度大学院修士全科生入学者選考筆記試験問題 第２問&lt;br&gt;
(1)&lt;br&gt;
 (ア)完全2分木の葉の数は$2^n$、葉以外のノードの数は$2^n-1$&lt;br&gt;
 (イ)木が持ち得る葉の最小の数は$2^1$で$2$、最大の数は$2^\infty$で$\infty$だろうか...&lt;br&gt;
(2)&lt;br&gt;
 (ア)10011&lt;br&gt;
 (イ)引数の値を2進数に変換する&lt;br&gt;
&lt;br&gt;
こういうのは実際に書くのが一番確実ですね。
&lt;script src=&quot;https://gist.github.com/sanofc/8e6a57c263d9854398e8.js&quot;&gt;&lt;/script&gt;
&lt;br&gt;
平成25年度大学院修士全科生入学者選考筆記試験問題 第２問&lt;br&gt;
(1)C言語の特徴とよく使われる分野はまとめるのは大変なので&lt;a href=&quot;http://ja.wikipedia.org/wiki/C%E8%A8%80%E8%AA%9E&quot;&gt;wikipedia&lt;/a&gt;を見てね。&lt;br&gt;
(2)&lt;br&gt;
 (ア)34512 -&gt; 34152 -&gt; 34125 -&gt; 31425-&gt; 31245 -&gt; 13245 -&gt; 12345 &lt;br&gt;
 (イ)数字を降順にソートする機能。根拠は...すべての値に対してデータの比較と交換を行っているからでしょうか？&lt;br&gt;
 (ウ)$(n-1)+(n-2)+\cdots+3+2+1=\dfrac{n(n-1)}{2}$&lt;br&gt;
 (エ)$O(n^2)$</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/2614856453023443501/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/2614856453023443501' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/2614856453023443501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/2614856453023443501'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/10/blog-post.html' title='放送大学大学院の過去問を解いてみる。'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-2800080576055057341</id><published>2014-09-27T08:46:00.000+09:00</published><updated>2014-09-27T08:46:08.583+09:00</updated><title type='text'>AsynchronousSocketChannelとAsynchronousServerSocketChannelを使ったサンプル</title><content type='html'>AsynchronousSocketChannelとAsynchronousServerSocketChannelを使って簡単なサーバクライアントサンプルを書いてみました。
Futureが返却されるので非同期タスクを細かく制御できるようです。これだけ長いクラスを使うのだから、それだけの恩恵は欲しいですね。
&lt;script src=&quot;https://gist.github.com/sanofc/091e96feb6d4e7368011.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/2800080576055057341/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/2800080576055057341' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/2800080576055057341'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/2800080576055057341'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/09/asynchronoussocketchannelasynchronousse.html' title='AsynchronousSocketChannelとAsynchronousServerSocketChannelを使ったサンプル'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-1607088776126705741</id><published>2014-09-15T14:57:00.001+09:00</published><updated>2014-09-15T14:57:57.925+09:00</updated><title type='text'>少しましなWebGLサンプル</title><content type='html'>&lt;a href=&quot;http://sanofc.blogspot.jp/2014/08/webgl.html&quot;&gt;はじめてのWebGL&lt;/a&gt;のサンプルはindex.htmlにGLSLもJavaScriptもすべて詰め込んでしまっていたので、GLSLをHTMLに書いて、JavaScriptは切り分けるように書き直した。webgl-debug.jsは&lt;a href=&quot;www.khronos.org/webgl/wiki/Debugging&quot;&gt;Debugging - WebGL Public Wiki&lt;/a&gt;の物を使えばいいです。

&lt;script src=&quot;https://gist.github.com/sanofc/1f5571a642d26c96df48.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/1607088776126705741/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/1607088776126705741' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/1607088776126705741'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/1607088776126705741'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/09/webgl.html' title='少しましなWebGLサンプル'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-3345145198199797805</id><published>2014-09-08T23:21:00.000+09:00</published><updated>2014-09-15T14:53:02.530+09:00</updated><title type='text'>必要条件と十分条件</title><content type='html'>少し前に考えていたけど必要条件と十分条件という言葉を日常生活や仕事でドヤ顔で使ってしまうと数学ばっかりやってる人にとっては混乱すると思った。まず数学ではこんな感じで定義されていた。
&lt;p&gt;
\[
p \rightarrow q が真のとき\\
pはqであるため十分条件である\\
qはpであるための必要条件である\\
集合で表すとp \subset q
\]
&lt;/p&gt;
でも日常生活や仕事では
&lt;p&gt;
&lt;center&gt;
「ナシ(p)であるための必要条件は果物(q)であることだが十分条件ではない。&lt;br&gt;
ナシ(p)であるための十分条件は果物(q)であることと黄緑(r)であることだ。」
&lt;/center&gt;
&lt;/p&gt;
のような使われ方をすることがあるんじゃないだろうか。(多分ない)&lt;br&gt;
つまり何かを定義するために「必要な」条件と「十分な」条件という意味で使っている例をよく見る。
この文章を、論理式的に書くとこんな形になると思う。
&lt;p&gt;
\[
q \rightarrow p = False \\
p \rightarrow q = True \\
q \land r \rightarrow p = True\\
集合で表すとq \land r \subset p \subset q
\]
&lt;/p&gt;

このとき$q$が必要条件となって$q \land r$が十分条件になるはずなので数学の意味とは若干乖離がある。ここで混乱するのは表現方法や発想は数学と全く異なるのに結果的には数学の必要条件、十分条件の意味としても辻褄があってしまうことだ。
また集合として表現する場合、必要条件が十分条件を含むので十分条件が小さいはずなのだが日常で使う方が条件が
多くなるので最初大きく見えてしまうのも混乱してしまう。
&lt;br&gt;
結論としては&lt;b&gt;十分条件と必要条件という言葉は数学以外で使わない方がよい&lt;/b&gt;と思った。
あとmathjaxで論理式を使いたかっただけなので間違えていたら指摘してください。</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/3345145198199797805/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/3345145198199797805' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3345145198199797805'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3345145198199797805'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/09/blog-post_8.html' title='必要条件と十分条件'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-7077525790550612397</id><published>2014-09-06T01:51:00.000+09:00</published><updated>2014-09-06T02:08:43.655+09:00</updated><title type='text'>対数微分法を試す</title><content type='html'>対数微分法はなんか難しそうな関数を微分する方法らしいです。
おそらく両辺をxで微分するところで左辺で合成関数の微分をするところが結構の数の受験生には分かりづらいと思うので式を略さないで書いてみた。
&lt;br&gt;&lt;br&gt;

$
①関数 y = x^x を微分することにする\\
$
&lt;br&gt;
$
両辺の自然対数をとる \\
\log y = x\log x \\
両辺をxで微分する \\
\dfrac{d}{dx} \log y = \dfrac{d}{dy}  \log y \dfrac{dy}{dx} = \dfrac{1}{y} y&#39; = \dfrac{y&#39;}{y} ... 合成関数の微分 \\
\dfrac{d}{dx} x \log x =  x&#39; \log x + x(\log )&#39; = 1 \log x + x \dfrac{1}{x} = \log x + 1 ... 積の微分 \\
上記から \\
\dfrac{y&#39;}{y} = \log x + 1 \\
y&#39; = y(\log x + 1) = x^x (\log x + 1)
$
&lt;br&gt;&lt;br&gt;
$
②関数 y = a^x を微分することにする\\
$
&lt;br&gt;
$
両辺の自然対数をとる \\
\log y = x\log a \\
両辺をxで微分する \\
\dfrac{d}{dx} \log y = \dfrac{d}{dy}  \log y \dfrac{dy}{dx} = \dfrac{1}{y} y&#39; = \dfrac{y&#39;}{y} ... 合成関数の微分 \\
\dfrac{d}{dx} x \log a =  x&#39; \log a + x(\log a)&#39; = 1 \log a + x 0 = \log a ... 積の微分 \\
上記から \\
\dfrac{y&#39;}{y} = \log a \\
y&#39; = y \log a = a^x \log a
$</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/7077525790550612397/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/7077525790550612397' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/7077525790550612397'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/7077525790550612397'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/09/blog-post.html' title='対数微分法を試す'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-9115161923068313846</id><published>2014-08-31T00:17:00.001+09:00</published><updated>2014-08-31T00:19:57.798+09:00</updated><title type='text'>両替問題を解いてみる。</title><content type='html'>両替問題を解いてみました。
やっていることは1000円を日本の硬貨(500円,100円,50円,10円,5円,1円)の6種類で払った場合の支払うすべての組み合わせの数を計算します。
アルゴリズムとしては高い硬貨から任意の数とっていくことを1000円になるまで再帰的に繰り返しています。
結果としては24万8908通りありました。手で計算するのはやり方が分かりませんが大変そうですね。あとなぜかC言語で書きましたが残念ながら完全に忘れていることが分かりました。

&lt;script src=&quot;https://gist.github.com/sanofc/91d42e3650b1c854adc1.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/9115161923068313846/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/9115161923068313846' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/9115161923068313846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/9115161923068313846'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/08/blog-post_31.html' title='両替問題を解いてみる。'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-3496015887236496572</id><published>2014-08-27T21:48:00.003+09:00</published><updated>2014-08-27T22:29:53.820+09:00</updated><title type='text'>2次方程式の解の証明をMathJaxで書く</title><content type='html'>MathJaxを試してみました。2次方程式の解の証明も簡単に書くことができました。
&lt;p&gt;
$
ax^2+bx+c=0\\
\Rightarrow x^2 + \dfrac{b}{a}x + \dfrac{c}{a}=0 
\Rightarrow \displaystyle \left(x^2 + \dfrac{b}{a}x + \dfrac{b^2}{4a^2} \right)-\dfrac{b^2}{4a^2}+\dfrac{c}{a}=0\\
\Rightarrow \displaystyle \left(x + \dfrac{b}{2a} \right)^2 = \dfrac{b^2-4ac}{4a^2}
\Rightarrow x + \dfrac{b}{2a}=\dfrac{\pm \sqrt{b^2-4ac}}{2a}\\
\Rightarrow x=\dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$
&lt;/p&gt;
MathJaxの内容はこんな感じです。
&lt;p&gt;

&lt;pre class=&quot;prettyprint&quot;&gt;
$
ax^2+bx+c=0\\
\Rightarrow x^2 + \dfrac{b}{a}x + \dfrac{c}{a}=0 
\Rightarrow \displaystyle \left(x^2 + \dfrac{b}{a}x + \dfrac{b^2}{4a^2} \right)-\dfrac{b^2}{4a^2}+\dfrac{c}{a}=0\\
\Rightarrow \displaystyle \left(x + \dfrac{b}{2a} \right)^2 = \dfrac{b^2-4ac}{4a^2}
\Rightarrow x + \dfrac{b}{2a}=\dfrac{\pm \sqrt{b^2-4ac}}{2a}\\
\Rightarrow x=\dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a}
$
&lt;/pre&gt;
&lt;/p&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/3496015887236496572/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/3496015887236496572' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3496015887236496572'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/3496015887236496572'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/08/2.html' title='2次方程式の解の証明をMathJaxで書く'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-7719233208753930623</id><published>2014-08-23T02:00:00.001+09:00</published><updated>2014-08-23T02:13:49.707+09:00</updated><title type='text'>はじめてのWebGL</title><content type='html'>かなり前だがOpenGLを少し触ったことがあるので、そのWeb版のWebGLを試してみた。
白い三角形を表示するだけど、さすがOpenGLでめちゃめちゃやることが多い。
ただ&lt;b&gt;three.jsやglMatrix.jsは甘え&lt;/b&gt;の思想のもと素のJavaScript/htmlで書いたのでサンプル的にはいいと思います。

&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrEkIcavtyf05molDA31wZBbLreFq88uD2PClvJvZ4t3nht0nDqzXYmwm3BkSmBz9hZKfV-hAgNGuN_zzDQLTwNy1weraU9zp_buqnFY2IPpLDNdLenyuZ0wG0HNoQH63lNWp44uKcV5FZ/s1600/webgl.jpg&quot; imageanchor=&quot;1&quot; &gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrEkIcavtyf05molDA31wZBbLreFq88uD2PClvJvZ4t3nht0nDqzXYmwm3BkSmBz9hZKfV-hAgNGuN_zzDQLTwNy1weraU9zp_buqnFY2IPpLDNdLenyuZ0wG0HNoQH63lNWp44uKcV5FZ/s320/webgl.jpg&quot; /&gt;&lt;/a&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;script src=&quot;https://gist.github.com/sanofc/d994ac7e0e844bb08485.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/7719233208753930623/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/7719233208753930623' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/7719233208753930623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/7719233208753930623'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/08/webgl.html' title='はじめてのWebGL'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrEkIcavtyf05molDA31wZBbLreFq88uD2PClvJvZ4t3nht0nDqzXYmwm3BkSmBz9hZKfV-hAgNGuN_zzDQLTwNy1weraU9zp_buqnFY2IPpLDNdLenyuZ0wG0HNoQH63lNWp44uKcV5FZ/s72-c/webgl.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-4352169589828556857</id><published>2014-08-19T02:43:00.001+09:00</published><updated>2014-08-19T02:43:31.935+09:00</updated><title type='text'>ノンブロッキングチャネルを試す</title><content type='html'>SocketChannel/SocketServerChannelを使ってマルチスレッドでなくても複数のクライアントに対応できるようなサーバができます。これでNode.jsはいらないですね。それにしてもByteBufferは慣れない。
&lt;script src=&quot;https://gist.github.com/sanofc/1f0293b724a9adad2937.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/4352169589828556857/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/4352169589828556857' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/4352169589828556857'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/4352169589828556857'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/08/blog-post_19.html' title='ノンブロッキングチャネルを試す'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-4367935381705369865</id><published>2014-08-14T03:08:00.001+09:00</published><updated>2014-08-14T03:12:41.152+09:00</updated><title type='text'>Javaだけで作るWebSocketサーバ</title><content type='html'>JavaだけでWebSocketを動かすサーバを作りました。
動作としてはブラウザでHTMLを表示した後にWebSocket経由でtestという文字を送受信するだけです。
後は双方向にメッセージをやり取りできるようにするのと、処理を汎用化すれば実用的に使えるようになるはず。
ほとんどは&lt;a href=&quot;http://jxck.hatenablog.com/entry/20120725/1343174392&quot;&gt;WebSocket サーバの実装とプロトコル解説&lt;/a&gt;を参考にさせてもらいました。
引っかかったところとしては、WebSocketのレスポンスヘッダの改行コードがCRLFじゃないといけないところ、慣れていないということもありましたがbyteを使ってバイナリ処理を書くところでした。Java(SE)だけで作ろうとしていたため暗号化部分の処理ができるか心配でしたが幸運なことにJava8で&lt;a href=&quot;http://docs.oracle.com/javase/8/docs/api/java/util/Base64.html&quot;&gt;Base64の処理クラス&lt;/a&gt;が追加されていたのでBase64の処理を素で書かずにすんでよかったです。

&lt;script src=&quot;https://gist.github.com/sanofc/6765c9678f1777da8575.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/4367935381705369865/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/4367935381705369865' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/4367935381705369865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/4367935381705369865'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/08/javawebsocket.html' title='Javaだけで作るWebSocketサーバ'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7418930532614105480.post-471111348958277255</id><published>2014-08-13T15:44:00.001+09:00</published><updated>2014-08-13T15:52:20.091+09:00</updated><title type='text'>文字列の重複順列を出力する</title><content type='html'>文字列の重複順列を出力する例をerlangとJavaで書いてみました。
erlangのほうがJavaの5倍も短く書けるので5倍の生産性がありまぁす!といえば経営者たちもerlangを使うことに納得してくれることでしょう。
&lt;br&gt;
&lt;br&gt;
&lt;b&gt;erlang版&lt;/b&gt;
&lt;script src=&quot;https://gist.github.com/sanofc/5c2426d1a33e3b9fa704.js&quot;&gt;&lt;/script&gt;
&lt;br&gt;
&lt;b&gt;Java版&lt;/b&gt;
&lt;script src=&quot;https://gist.github.com/sanofc/c37a49819b482e4b2f7c.js&quot;&gt;&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://sanofc.blogspot.com/feeds/471111348958277255/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/7418930532614105480/471111348958277255' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/471111348958277255'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7418930532614105480/posts/default/471111348958277255'/><link rel='alternate' type='text/html' href='http://sanofc.blogspot.com/2014/08/erlang_13.html' title='文字列の重複順列を出力する'/><author><name>sanofc</name><uri>http://www.blogger.com/profile/08576871619248037048</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//photos1.blogger.com/blogger/1642/2144/320/nashi.0.jpg'/></author><thr:total>0</thr:total></entry></feed>