原创 unique_ptr的日常使用

一、對於new一個字符數組,可以在其返回指針的時候析構。 unique_ptr的第一個參數爲指針數據類型,第二個參數爲該指針自定義的析構器,function指示回調函數(即析構函數),然後在指針初始化時指定具體的析構函數,下面的例子中直接

原创 SDK(IPC)遠程調用之模擬網關轉發信令[內網穿透小Demo]

網絡拓撲如下所示: SwitchTest.cpp(轉發程序) #include<stdio.h> #include<stdlib.h> #include<string.h> #include<errno.h> #include<sys

原创 使用openssl實現對稱性加解密AES128並封裝成動態庫

項目github地址:項目地址 頭文件 aes128.h #include <stdio.h> #include <string.h> #include <stdlib.h> #include <time.h> #include

原创 以區間爲單位的二分查找

【2019回家過年前的一記】 問題場景: 區間的格式如下,整體爲一個Json字符串,每個區間的startTime和endTime都是按照從小到大的順序排列的。 "[{\"endTime\":1578633955,\"startTime\"

原创 電路佈線問題

#include <iostream> #include <queue> using namespace std; #define M 10 #de

原创 Web應用程序測試工具/框架對比及Jmeter的入門級使用

【注】圖片顯示不出來,請移步個人有道雲筆記: 文檔:各種·軟件自動化測試工具.note 鏈接:http://note.youdao.com/noteshare?id=26324df7b908c39c7eff55bf8ea004fb&sub

原创 string轉int類型:坑貨stoi的替代者strtol

string maxFrameRate = to_string(stoi(maxFrameRate)*100); //上述代碼在轉換時如果maxFrameRate爲“dad66”這樣的字符串而不是純數字字符串, //那麼就會導致程序直接

原创 Linux下創建進程的三種方式及特點

原文鏈接:https://blog.csdn.net/wujiafei_njgcxy/article/details/77116175 https://blog.csdn.net/wujiafe

原创 692. Top K Frequent Words(Map+桶排序)

Given a non-empty list of words, return the k most frequent elements. Your answer should be sorted by frequency from hi

原创 931. Minimum Falling Path Sum(DP,亦可暴力)

Given a square array of integers A, we want the minimum sum of a falling path through A. A falling path starts at any e

原创 338. Counting Bits(DP)

Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1's in th

原创 877. Stone Game(DP)

Alex and Lee play a game with piles of stones.  There are an even number of piles arranged in a row, and each pile has

原创 920. Number of Music Playlists

Your music player contains N different songs and she wants to listen to L (not necessarily different) songs during your

原创 312. Burst Balloons(DP)

  Given n balloons, indexed from 0 to n-1. Each balloon is painted with a number on it represented by array nums. You a

原创 Median of Two Sorted Arrays(計算兩個數組的中數)

There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The