原创 容器核心技術知識點整理

容器本身就是一個進程,通過Namespace、Cgroups和rootfs組成。 namespace:對容器進行隔離,讓他活在自己的世界 cgroups:在linux內核提供的一種可以限制單個進程的或者多個進程所使用資源的限制。 root

原创 Mysql的鎖。

樂觀鎖 線程在讀取數據時對讀取數據不進行加鎖,在準備寫會數據時,會先查詢原值,操作的時候比較原值是否修改,若違背其他線程修改則寫回,若已被修改,則重新執行讀取流程。 悲觀鎖 悲觀鎖從宏觀的角度,就是認爲你是個渣男時刻會綠她,所以時刻防止你

原创 基於Golang編寫的詞法分析

package main import ( "bufio" "fmt" "io" "os" ) var key = make(map[string]int) var ( FileName = "mai

原创 gorm的自定義主外鍵連接

package main import ( "fmt" _ "github.com/go-sql-driver/mysql" "github.com/jinzhu/gorm" ) //type PackageMan

原创 Springboot重定向靜態頁面

Controller @Controller public class BcdController { @RequestMapping(value = "/dd") public String bcd(){

原创 y=ax+b最小二乘c++實現

#include<iostream> #include<vector> typedef std::vector<std::vector<double>> Matrix; typedef std::vector<double> Line;

原创 cifar的圖像分類

import os #圖像讀取庫 from PIL import Image #矩陣運算庫 import numpy as np import keras from keras.layers import Dense,Dropout,F

原创 八數碼非優化版本的A*算法

#include<iostream> #include<queue> #include<cmath> #include<string> #include<utility> #include<vector> #include<time.h

原创 c++ socket 入門練手

#include<iostream> #include "winsock2.h" #pragma comment(lib,"ws2_32.lib") using namespace std; int main() { int RetV

原创 VS2019+Opencv4.0+Win10配置

  一.下載OpenCV4.0的安裝文件: OpenCV官網 然後安裝到你想要的地方 二.添加到Path裏面: 並且把文件opencv_world400.dll和opencv_world400d.dll文件複製到   C:\Window

原创 Win10系統安裝Torch的方法

我選擇的是Win10+Cuda9.0+Python3.7的安裝 conda install pytorch torchvision cudatoolkit=9.0 -c pytorch 如果想選擇pip3下載的話 pip3 insta

原创 線段樹

#include<iostream> const int MAX_LEN = 1000; void build_tree(int arr[], int tree[], int node, int start, int end) {

原创 Python用matplotlib繪製3D圖片

from matplotlib import pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D def gauss(x, y, c1, c

原创 簡單用golang實現鏈表

package main import "fmt" type Node struct{ key interface{} next *Node } type Link struct { root *Node } type li

原创 POJ 1837-Balance

http://blog.csdn.net/lyy289065406/article/details/6648094(參考此人代碼和思路)#include <iostream> #include <cstdio> #include