| 居住地 | 東京都23区 |
| @typename_ | |
| Qiita | @muumu |
| 資格 | 認定スクラムマスター 応用情報技術者 色彩検定 2級 TOEIC 915点 |
| 経歴 | Webエンジニアとして8年 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <utility> | |
| #include <string> | |
| #include <vector> | |
| #include <map> | |
| #include <unordered_map> | |
| #include <set> | |
| #include <algorithm> | |
| template<typename T> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
| ; #Warn ; Enable warnings to assist with detecting common errors. | |
| SendMode Input ; Recommended for new scripts due to its superior speed and reliability. | |
| SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory. | |
| ; 事前にChangeKeyで「CapsLock」 -> 「無変換」、「左Ctrl」 -> 「CapsLock」、 | |
| ; 「無変換」->「Backspace」、「左Alt」 -> 「左Ctrl」にリマップしておく | |
| vk1C & 9::Reload ;このスクリプトをリロードして適用 | |
| vk1C & 8::Edit ;このスクリプトを編集 |
スレッドはfutureを取得して他のことをしながら定期的にチェックするか、他のことをしてから単にfutureがreadyになるのを待つこともできる
C++標準ライブラリのfutureにはstd::futureとstd::shared_futureの2種類ある。
スマートポインタに例えると前者はunique_ptrに、後者はshared_ptrに対応する。
つまりstd::futureはコピーできない唯一のインスタンスを提供するのに対して、std::shared_futureはコピーできる。
コピーされたstd::shared_futureはそれを見ている全てのスレッドに同時にreadyになったことを知らせる。
std::futureを複数のスレッドで見る場合はロックによる排他制御が必要。
futureはスレッドで実行した関数の戻り値を受け取る簡単なインターフェースを提供する。
futureのテンプレートパラメータには戻り値の型を指定し、戻り値が無い場合はvoidを指定する。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| アジャイルの原則 | |
| イテレーティブ(反復的) | |
| - 間違いや失敗が起こった後でなければ正解は分からないという前提 | |
| - 計画的な手戻り戦略により優れたソリューションを目指す | |
| インクルメンタル(漸進的)な開発 | |
| - 少しずつ作ることで短期間の間にフィードバックを受け、手戻りのコストを最小限にする | |
| スクラムの定義と目的 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 金利と設備投資との関係 | |
| 利潤率 = 設備が生み出す年間利益 / 設備の価格 | |
| 投資を増やすほど利潤率は通常下がる | |
| 最適な設備投資: 金利=利潤率となるまで投資 | |
| 利潤率がプラスなら投資を増やせば増やすほど利益は増やせるが、 | |
| 借り入れ資金を使う場合はその金利以上の利益を上げなければならない | |
| 自己資本を使う場合は長期金利以上の利潤率じゃないと国債に投資した方が良いことになるので設備投資の意味がない | |
| 金利の自社株買いへの影響 | |
| 自社株買い: 自社株を買って発行済株式数を減らすこと。BSでは現金が減って純資産のところに自己株式のマイナス表示が追加される |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| C++11ではstd::threadが比較的容易にスレッド管理ができる | |
| 単純でない操作も基盤となる構成要素で柔軟性を提供してくれる | |
| 2.1 | |
| C++プログラムでは起動時にmain関数を実行しているスレッドを持っている | |
| そこから並行してスレッドを立ち上げることが可能 | |
| main関数から戻ったら全てのスレッドは終了する | |
| 2.1.1 | |
| std::threadには任意のcallable(関数オブジェクト、関数ポインタ)を渡せる |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // shared_message.h | |
| #pragma once | |
| #include <boost/interprocess/sync/interprocess_semaphore.hpp> | |
| using namespace boost::interprocess; | |
| struct shared_memory_buffer { | |
| //writer initialized with one to start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <iostream> | |
| #include <boost/type_traits.hpp> | |
| #include <boost/utility/enable_if.hpp> | |
| #include <boost/preprocessor.hpp> | |
| #define NUMERICS_LOOP_UNROLL 10 | |
| #define NUMERICS_INNER_LOOP_PREFIX(z, x, data) \ | |
| if (value != 0) { \ | |
| const char ch = value % Base + '0'; \ |
NewerOlder