wsl 问题记录

安装wsl控制面板->程序->程序和功能->左侧->启用或关闭Windows功能->适用于Linux的Windows子系统windows应用商店输入ubuntu 下载安装 然后输入账户密码换源sudo vim /etc/apt/sources.list deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe...

dpkg: warning 问题处理

首先这类问题一般是动了/var/lib/dpkg/info创建一个 warning.txt 把所有的warning复制进去创建一个run脚本#!/bin/bash i=1 for package in $(cat warning.txt | grep "dpkg: warning: files list file for package " | grep -Po "'[^']*'" | sed "s/'//g"); do echo "No.${i} ==================start intall ${...

C++ 服务器配置文件读取

Singleton.hServerConfig.h#ifndef AURORA_SERVERCONFIG_H #define AURORA_SERVERCONFIG_H #include "Singleton.h" #include <string> #include <map> namespace aurora { class ServerConfig { public: ServerConfig() = default; ~ServerConfig() = default; ...

C++ 单例(Singleton)

Singleton.h#ifndef NET_SINGLETON_H #define NET_SINGLETON_H template<typename T> class Singleton { public: static T &instance() { static T t; return t; } Singleton() = delete; ~Singleton() = delete; Singleton(const Singleton &) = delete; ...

asio noncopyable

class noncopyable { public: const noncopyable &operator=(const noncopyable &) = delete; noncopyable(const noncopyable &) = delete; protected: noncopyable() = default; ~noncopyable() = default; };

Clion 使用问题记录

安装插件File->Plugins->Marketplace显示内存指示File->Appearance->Window Opetions->Show memory indicator修改内存大小HELP->Edit Custum VM Options-Xss8m-Xms1024m-Xmx4196m代码格式化修改File->Editor->Code Style控制台乱码HELP->Edit Custum VM Options-Dfile.encoding=UTF-8-Dconsole.encoding=UTF-8文件中文乱码File-...

c++11 并发的简单应用

future.cpp#include <chrono> #include <iostream> #include <future> #include <thread> std::string call_back(std::string name) { std::cout << "call_back run start " << "thread_name: " << name << " thread_id: " <<...