下記コマンドを入力して SSH 接続の Key を生成する。
ssh-keygen -t rsa
途中、保存先ディレクトリや、パスフレーズを聞かれるので必要があれば適宜設定する。
何も入力せずに Enter で先に進める事も可能。
/Users/name/.ssh/ に鍵が出来るので、id_rsa.pub を cat コマンドで開いてコピーする。
コピーした鍵を Github の Settings -> SSH and GPG keys に登録する。
#include <iostream> #include <vector> // ピクセルを表す構造体(RGB) struct Pixel { unsigned char r; unsigned char g; unsigned char b; }; // バイリニア補間関数 Pixel BilinearInterpolate( const Pixel& top_left, const Pixel& top_right, const Pixel& bottom_left, const Pixel& bottom_right, double x_ratio, double y_ratio) { Pixel result; result.r = (unsigned char)( top_left.r * (1 - x_ratio) * (1 - y_ratio) + top_right.r * x_ratio * (1 - y_ratio) + bottom_left.r * y_ratio * (1 - x_ratio) + bottom_right.r * x_ratio * y_ratio); result.g = (unsigned char)( top_left.g * (1 - x_ratio) * (1 - y_ratio) + top_right.g * x_ratio * (1 - y_ratio) + bottom_left.g * y_ratio * (1 - x_ratio) + bottom_right.g * x_ratio * y_ratio); result.b = (unsigned char)( top_left.b * (1 - x_ratio) * (1 - y_ratio) + top_right.b * x_ratio * (1 - y_ratio) + bottom_left.b * y_ratio * (1 - x_ratio) + bottom_right.b * x_ratio * y_ratio); return result; } // メイン関数 int main() { // 仮定:srcImageは512x512、dstImageは1024x1024の大きさ const int srcWidth = 512, srcHeight = 512; const int dstWidth = 1024, dstHeight = 1024; std::vector<std::vector<Pixel>> srcImage(srcHeight, std::vector<Pixel>(srcWidth)); std::vector<std::vector<Pixel>> dstImage(dstHeight, std::vector<Pixel>(dstWidth)); // ここで、srcImageに画像データを読み込む // リサイズ処理 for (int y = 0; y < dstHeight; ++y) { for (int x = 0; x < dstWidth; ++x) { double gx = ((double)x) / dstWidth * (srcWidth - 1); double gy = ((double)y) / dstHeight * (srcHeight - 1); int gxi = (int)gx; int gyi = (int)gy; Pixel top_left = srcImage[gyi][gxi]; Pixel top_right = srcImage[gyi][gxi + 1]; Pixel bottom_left = srcImage[gyi + 1][gxi]; Pixel bottom_right = srcImage[gyi + 1][gxi + 1]; double x_ratio = gx - gxi; double y_ratio = gy - gyi; dstImage[y][x] = BilinearInterpolate(top_left, top_right, bottom_left, bottom_right, x_ratio, y_ratio); } } // ここで、dstImageを画像ファイルに保存する return 0; }
#include <iostream> #include <thread> #include <mutex> #include <condition_variable> #include <chrono> std::mutex mtx; std::condition_variable cv; bool ready = false; void print_id(int id) { std::unique_lock<std::mutex> lck(mtx); while (!ready) { cv.wait(lck); } // スレッドが再開された後の処理 std::cout << "Thread " << id << '\n'; } void go() { std::unique_lock<std::mutex> lck(mtx); ready = true; cv.notify_all(); // 全てのスレッドに通知 } int main() { std::thread threads[10]; // スレッドの起動 for (int i = 0; i < 10; ++i) { threads[i] = std::thread(print_id, i); } std::this_thread::sleep_for(std::chrono::milliseconds(100)); // 全スレッドの再開 go(); // 全スレッドの終了を待機 for (auto& th : threads) { th.join(); } return 0; }
https://www.youtube.com/@CAPCOM_RandD/videos
https://www.docswell.com/user/CAPCOM_RandD
RE Engine。国内最高峰。自社エンジンが魅力。
2022年ごろから、自社エンジンの人材募集を行っている。
https://automaton-media.com/articles/hiring/20220203-190654/
https://www.bandainamcostudios.com/recruit/career/interview/13108
自社エンジンも進めているが、使用エンジンとしては Unreal Engine がまだ多そう。
https://mspoweruser.com/ja/konami-abandons-fox-engine-pes-2022-unreal-engine/
コナミは FOX Engine から Unreal Engine への乗り換えを行っている。
https://cgworld.jp/article/202307-uefest-sega.html
ドラゴンエンジンという自社エンジンから Unreal Engine への乗り換え。
Unreal Engine と自社エンジン
KATANA エンジン。
https://gamemakers.jp/article/2022_06_16_7692/
Unreal Engine が社内標準のよう
DECIMA Engine。元々 PS プラットフォーム向けのエンジンだったが、OD の開発も DECIMA を使うのだとしたら DirectX などにも対応するのだろうか。
OD は「Xboxクラウドゲーミング技術」を使うというニュースがあるが、なぜあえてクラウドなのだろうか。
内製エンジン。
https://cgworld.jp/interview/202012-triace.html
Aska Engine は健在。
Unreal Engine が社内標準のよう。
https://www.famitsu.com/news/202003/13194626.html
プラチナエンジンの開発。中途採用ページにもエンジン開発者の募集が乗っているので、引き続き自社開発に取り組んでいる。
ツール。ミドルウェア。
#include <windows.h> #include <iostream> void simulateExpensiveOperation() { // 時間のかかる操作をシミュレートします。 // 例えば、1秒間スリープするなど。 Sleep(1000); // 1000ミリ秒 = 1秒 } int main() { LARGE_INTEGER frequency; // カウンターの周波数 LARGE_INTEGER start; // 開始時間 LARGE_INTEGER end; // 終了時間 // カウンターの周波数を取得 if (!QueryPerformanceFrequency(&frequency)) { std::cerr << "High-resolution counter not supported." << std::endl; return 1; } // 開始時間を取得 QueryPerformanceCounter(&start); // 計測したい操作を実行 simulateExpensiveOperation(); // 終了時間を取得 QueryPerformanceCounter(&end); // 経過時間を計算(秒単位) double elapsedTime = static_cast<double>(end.QuadPart - start.QuadPart) / frequency.QuadPart; std::cout << "Operation took " << elapsedTime << " seconds.\n"; return 0; }
Xcode で Apple Watch 向けのアプリをビルドしようとしてハマった。
Xcode でビルドしたアプリをインストールするためには、開発者モードを有効にしないといけない。ネットの情報を元に、ペアリング済みの iPhone を USB で Mac 本体と接続。iPhone, Apple Watch を全て同じ wifi に接続したところ「設定」→「プライバシーとセキュリティー」の一番下にデベロッパーモードの項目が出現した。
Mac は Wifi に接続する必要は無かった気がする。iPhone と Watch が同じ wif に接続されていればうまくいきそう。
当初、充電器に繋いでいたところ、Disconnected になってしまうことが多かった。パスコードで解除しても Apple Watch が腕を検出できないと自動でロックがかかる仕様(設定で変更できる?)みたいで、充電器に接続している状態だと接続が不安定になっていた。
20分ぐらい待って、85%ぐらいまで進んだけど Disconnected になって 0% からやり直し。こちらの Wifi の問題なのか、接続がうまくいかないことがある。
Xcode でビルドしたアプリは転送はできていた。よく分からん。
Mac に USB で iPhone で接続し、iPhone と Watch が同じ wifi に繋がっていれば、Xcode からの転送が上手くいく可能性が高かった。失敗したときは恐らく wif への接続が不安定。