Skip to content

Instantly share code, notes, and snippets.

Error: invalid arguments. (gtags.vim requires GLOBAL 5.7 or later)
$ ./configure --disable-gtagscscope
$ make
$ make install
# WindowsからLinuxのターミナルを開くまで
以下の方法でターミナルを開いたあと、firefox &等のコマンドを打てばguiアプリケーションが立ち上がる。
方法2がおすすめ。
## 方法1
http://kaiseki-web.lhd.nifs.ac.jp/gecev/xming/Xming.htm
## 方法2
http://vogel.at.webry.info/201310/article_6.html
@yasukei
yasukei / 1_thread.cpp
Last active April 21, 2020 11:38
std::thread
#include <cstdio>
#include <string>
#include <thread>
class SomeClass
{
public:
SomeClass(std::string threadName, int loopNum) :
_threadName(threadName),
@yasukei
yasukei / 1_mutex.cpp
Created April 21, 2020 12:06
std::mutex
#include <cstdio>
#include <string>
#include <thread>
#include <mutex>
class SomeClass
{
public:
SomeClass(std::string threadName, std::mutex& mtx) :
@yasukei
yasukei / 1_lock_guard.cpp
Created April 22, 2020 12:03
std::lock_guard
#include <cstdio>
#include <string>
#include <thread>
#include <mutex>
class SomeClass
{
public:
SomeClass(std::string threadName, std::mutex& mtx) :
@yasukei
yasukei / 1_future.cpp
Created April 24, 2020 12:04
std::future
#include <cstdio>
#include <string>
#include <future>
int main()
{
auto f = [](std::string threadName) {
for (int i = 0; i < 10; i++)
{
@yasukei
yasukei / 1_bitset.cpp
Created May 2, 2020 01:16
std::bitset
#include <cstdio>
#include <bitset>
template <unsigned int N>
void __printBitset(std::bitset<N> bitset)
{
printf("size(): [%zu]\n", bitset.size());
printf("count(): [%zu]\n", bitset.count());
printf("all(): [%u]\n", bitset.all());
@yasukei
yasukei / 1_tuple.txt
Created May 2, 2020 01:40
std::tuple
#include <cstdio>
#include <tuple>
int main()
{
std::tuple<double, double, double> xyz = std::make_tuple(1.0, 2.0, 3.0);
std::get<0>(xyz) = 4.0;
printf("std::get<0>(xyz): [%lf]\n", std::get<0>(xyz));
printf("std::get<1>(xyz): [%lf]\n", std::get<1>(xyz));
@yasukei
yasukei / 1_chrono.cpp
Created May 2, 2020 04:25
std::chrono
#include <iostream>
#include <iomanip>
#include <ctime>
#include <chrono>
int main()
{
std::time_t t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
std::cout << "UTC: " << std::put_time(std::gmtime(&t), "%F %T") << '\n';