原创 【LeetCode】7. Reverse Integer

7. Reverse Integer:https://leetcode.com/problems/reverse-integer/description/ 【runtime = 12ms】 hint:新結果賦值前檢查是否overflow,

原创 【C++/Cplex/Benders】bug:2000,2002,2004

【CPLEX Error  2002: Invalid Benders decomposition.】CPXERR_BAD_DECOMPOSITION 2002Benders decomposition i

原创 【Excel】vs2015利用mfc讀excel時的類型

含義參考:http://blog.sina.com.cn/s/blog_6bc073950101045j.html enum VARENUM     {         VT_EMPTY    = 0,         VT_NULL  

原创 【Python|Pandas】dataFrame簡單操作:根據某些列生成新列

# -*- coding: utf-8 -*- """ Created on Tue Apr 24 16:42:16 2018 @author: zhoulei """ import pandas as pd #import nump

原创 【c++/euler】套圈法解有向圖的歐拉回路

【參考】Matching_Euler_Tours_and_the_Chinese_Postman [REPRESENTATION]The edge-pairingrepresentation【表示方法】邊對錶示法 【核心方法】 v

原创 【統計】NormalTable,PossionTable

NormalTable https://d37djvu3ytnwxt.cloudfront.net/assets/courseware/v1/a4b7d57500ed27156eedd13ce46c6832/asset-v1:MITx+C

原创 Unix時間與Excel時間轉換

可以先通過cout << vResult.vt << ",";查看讀到的數據類型 Unix時間轉Excel時間 Excel時間=(Unix時間+8*3600)/86400+70*365+19 Excel時間轉Unix時間 Unix時間

原创 【Python|matplotlib】簡單作圖:散點圖,條形圖,頻數分佈直方圖

官網大法好:https://matplotlib.org/index.html決策樹(迴歸)結果作圖的例子:http://scikit-learn.org/stable/auto_examples/tree/plot_tree_regre

原创 【VS/CPLEX】C++用cplex解線性規劃問題舉例

問題: Maximize x1 + 2x2 + 3x3subject to–x1 + x2 + x 3 ≤ 20 x1 – 3x2 + x 3 ≤ 30with these bounds0 ≤ x1 ≤ 40 0 ≤ x2 ≤ infin

原创 【C2065】未聲明的標識符

【問題】明明定義的類,也包含了頭文件,爲什麼還是C2065呢? 【可能原因】 1.頭文件包含的順序問題 #pragma once #include<iostream> using namespace std; #include<vect

原创 【python/熱力圖】從csv文件讀入(x,y,z)畫簡單熱力圖

# -*- coding: utf-8 -*- """ Created on Fri Nov 10 21:20:25 2017 @author: zhoulei """ # Required Packages # 迴歸 import m

原创 【Python】【矩陣】協方差矩陣;特徵值;特徵向量

import numpy as np x = np.array([[1,1,1], [0,0,-1], [1,-1,1],[-1,1,0]]).T print(x) print('---------') y = np.cov(x)#協方

原创 【VS2015】社區版(個人版)彈窗許可證過期

【問題】VS2015 Community社區版是免費的VS版本,打開工程卻提示30天許可已經到期; 【解決】在彈窗頁面註冊新賬號,並更新許可證; 【備註】可能遇到許可證未成功下載,提示檢查網絡,可以先檢查自己是否將默認瀏覽器設置爲最新的i