原创 maven 構建 mysql數據庫利用 properties連接

//這裏是 properties文件讀取工具 public class PropertiesUtil { static Properties properties = new Properties(); publ

原创 JDBC事務 隔離級別 介紹 與理解

事務隔離級別 事務是用戶定義的一個數據庫操作系列,這些操作要麼全做,要麼全不做,是一個不可分割的工作單位。 定義事務的語句 Begin transaction; Commit; Roll back; 事務的Atomicity C

原创 Spring 事務

理解Spring 事務的使用 Spring 事務策略是通過 PlateformTransactionManager 接口體現的。 PlateformTransactionManager 接口 有許多不同的實現類,應用程序面向與

原创 ArrayDeque

取模運算與位運算的轉換 **(tail = (tail + 1) & (elements.length - 1)) == head 可以看出tail+1& 1111 tail+1的值始終小於等於15 (assume that el

原创 prim 算法 最小生成 樹

public void prim(Graph1 graph1){ int k ; int j; //初始化 lowCost[0] = 0; adj

原创 leetcode 下一個排列

//第一次解法錯誤正在重寫

原创 生成全排列

如何使用序數法來生成全排列 思考了一上午的僞代碼最後寫出來的,不理解可以與我討論!代碼片段可以直接運行 public void GenReverseOrder(int n){ int[] rvs_num = new

原创 Vue 父子組件的雙向數據傳遞

html <div id="father"> <p @click="change">{{bar}}</p> <child-comp :message.sync="bar" > </child-cmp

原创 非迭代遞歸樹

class Solution { public: vector<int> postorderTraversal(TreeNode* root) { vector<int> res; stac

原创 java核心技術筆記

枚舉類型:實際仍爲類,繼承Enum。繼承了許多有用的方法,toString() 靜態的values()返回包含全部枚舉值的數組。ordinal()返回枚舉常量的位置,從0開始。valueOf()返回枚舉類實例。與toString

原创 java基礎

對於byte char short int long float double之間的轉換,若操作數中有double ,另一個操作數就會轉化爲double,否則若其中一個操作數爲float ,另一個操作數會轉化爲float,否則若

原创 float所表示的範圍

**關於float 表示的數的範圍的計算問題?** float 在計算機中表示是32位 sign(1bit)+exponent(8)+fraction(23) 階碼用移碼來表示,8位移碼(偏移量爲127) 本來應該可以表示-128~

原创 Leetcode 1

題目:Given a binary tree, find its minimum depth.The minimum depth is the number of nodes along the shortest path from