Skip to content

Instantly share code, notes, and snippets.

View oneshotimage's full-sized avatar
💭
I may be slow to respond.

Lila Thompson oneshotimage

💭
I may be slow to respond.
View GitHub Profile
@oneshotimage
oneshotimage / dfs.cpp
Last active March 26, 2018 03:09
deep first search
#include <iostream>
#include <vector>
using row_t = std::vector<double>;
using matrix_t = std::vector<row_t>;
// 遍历每个顶点
// 遍历当前顶点的邻接点
// 邻接点作为顶点,遍历当前顶点的邻接点
// 当遍历的深度等于树的高度时,结束遍历

测试平台:DigitalOcean VPS ubuntu14.04 x64, strongswan5.2.2

运行以下命令请使用root权限

一:安装strongswan

由于ubuntu软件仓库中strongswan版本较低,因此从官网源码编译安装

apt-get install build-essential     #编译环境
aptitude install libgmp10 libgmp3-dev libssl-dev pkg-config libpcsclite-dev libpam0g-dev     #编译所需要的软件
@oneshotimage
oneshotimage / UIView+frameAdjust.h
Created May 10, 2015 05:04 — forked from tangqiaoboy/UIView+frameAdjust.h
Adjust UIView frame category
//
// UIView+frameAdjust.h
// fenbi
//
// Created by Tang Qiao on 12-5-31.
// Copyright (c) 2012年 Fenbi.com . All rights reserved.
//
#import <Foundation/Foundation.h>