原创 配置編譯win7+VS2017+opencv4.0.1+contrib4.0.1

一、注意 1、opencv個各個版本並不是支持所有的VS版本,如opencv4.0.1支持vc14和vc15,而VS2013是vc12,配置起來會出錯。        VS是一個集成開發環境,有不同的版本如VS2013,VS2015;  

原创 VS2017無法啓動

新安裝了VS2017,安裝沒問題,但是總出現啓動時沒反應的狀況,鼠標雙擊後轉圈,然後就沒然後了。。 解決辦法: 第一步: 開始-->所有程序-->Microsoft Visual Studio 2017文件夾-->VisualStudio

原创 Java迭代器contains的問題

功能:ArrayList去除集合中字符串的重複值(字符串的內容相同),思路:創建新集合方式。 第一種編譯運行沒問題,第二種寫法出錯,原因是不可以兩次使用it.next()。 錯誤提示:Exception in thread "main"

原创 LeetCode--palindrome-number迴文數

1、問題 Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Cou

原创 求1+2+3+...+n

題目描述 求1+2+3+...+n,要求不能使用乘除法、for、while、if、else、switch、case等關鍵字及條件判斷語句(A?B:C)。 1、根據基本公式展開,利用java的冪函數代替乘法,利用位移運算代替除法 publ

原创 Java靜態方法與非靜態方法的泛型

Java中,非靜態方法可以使用類的泛型,也可以定義自己的泛型;靜態方法由於隨着類的加載而加載,不能訪問類的泛型(因爲在創建對象的時候才確定),因此必須定義自己的泛型類型。 詳細請參考:https://blog.csdn.net/weixi

原创 Java內部類

參考鏈接:菜鳥教程 https://www.cnblogs.com/dolphin0520/p/3811445.html https://blog.csdn.net/weixin_42762133/article/details/8289

原创 JAVA錯誤:無法從靜態上下文中引用非靜態變量 this

新學習:構造方法的重載,給成員變量賦值 錯誤代碼: class Student { public static void main(String[] args) { Person p = new Person(); p.set

原创 內存結構 堆 棧 全局區 常量區 代碼區

轉載:https://blog.csdn.net/levy1021/article/details/45419381

原创 opencv圖像前景目標提取

1、功能      論文圖片處理需要用到簡單的前景目標提取,這裏採用opencv的grabCut函數;      前期可以採用selectROI獲取矩形框(需要添加contrib庫),也可以手動設定rect;      添加了一個圖片批處

原创 LeetCode-best time to buy and sell stock 1 數組

1.問題 Say you have an array for which the i th element is the price of a given stock on day i. If you were only permitte

原创 LeetCode-best time to buy and sell stock 2 數組

1、問題: Say you have an array for which the i th element is the price of a given stock on day i. Design an algorithm to f

原创 LeetCode-reverse integer複雜度

1、題目: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321 Have you thought about

原创 LeetCode--single-number複雜度

1、題目 給定一個整數數組,每個元素都出現了兩次,但有一個只出現了一次,請找出這個數。 Note:算法要求有線性時間複雜度,並且不佔用額外的空間。 2、解法: public class Solution { public int

原创 配置編譯win7+VS2013+opencv4.0.1+contrib4.0.1

一、注意 1、opencv個各個版本並不是支持所有的VS版本,如opencv4.0.1支持vc14和vc15,而VS2013是vc12,配置起來會出錯。        VS是一個集成開發環境,有不同的版本如VS2013,VS2015;