原创 LeetCode-Easy刷題(11) Maximum Subarray

Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, g

原创 Bazel和Springboot中使用Jython的方法

    最近重構一個Java寫的計算器項目.項目中核心實現是用Jython來進行計算過程的.由於是老項目,直接使用的是Maven+Javaweb方式. 依賴: <dependency> <groupId>org.python</gr

原创 Java高併發程序設計

第一章  走入並行世界   關於並行的兩個定律: Amdahl定律 和Gustafson定律 考慮方向不同   Java內存模型 JMM 原子性 可見性 有序性   第二章 Java並行程序基礎          線程創建: new Th

原创 深入理解Java虛擬機--垃圾收集及故障診斷

1.垃圾收集算法     1.1 標記-清除算法           算法分爲標記和清除兩個階段:首先標記出所有需要回收的對象,在標記完成後統一回收所有被標記的對象,標記過程上一篇博客說過, 後續的幾種算法都是基於這個算法對其不足進行改進

原创 關於docker運行Java程序JVM配置參數使用jconsole的簡單量化過程

1.如果服務可以本地啓動那麼儘量在本地進行參數預估 2.如果服務不能本地啓動,可以使用遠程連接方式進行預估   3.衡量要點: Java程序運行大致分爲三塊:堆內存,非堆內存(虛擬機棧,方法區,本地方法棧,程序計數器),堆外內存. doc

原创 深入理解Java虛擬機--初探

1.走近Java         這一章主要介紹了Java的發展歷史,JVM種類,最後的編譯OpenJDK.我編譯的OpenJDK10. 2.Java內存區域與內存溢出異常     2.1 JVM中幾個數據區            方法區

原创 Docker的安裝和常用功能

一.如何安裝Dockerdocker(mac) 下載:https://www.docker.com/community-edition#/download其餘直接參考:centos需要到7纔可.https://yq.aliyun.com/

原创 紀錄一下我看過的那些書籍

         古語云:溫故而知新.可謂道出學習的真諦.雖然讀了很多書,寫了很多博客,也不敢說都已經會了,只能說當時會了.而作爲學習閉環的最後一個過程.溫故是十分重要,故而寫此篇博文,紀錄那些我讀過的書籍,忘有空暇時間,將其中值得再次品

原创 LeetCode-Easy刷題(28) Pascal's Triangle II

Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Coul

原创 LeetCode-Easy刷題(29) Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to

原创 Spring Boot 要點小結

    對於Web開發而言,Spring Boot 最近比較有名氣.我覺得主要的原因在於開箱即用及功能廣泛的特點.    明白Spring Boot 是什麼?說到底,其實底層的實現都是一致的,Spring Boot 以Pom.xml依賴的

原创 LeetCode-Easy刷題(30) Best Time to Buy and Sell Stock II

Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find th

原创 LeetCode-Easy刷題(33) Min Stack

Design a stack that supports push, pop, top, and retrieving the minimum element in constant time. push(x) -- Push eleme

原创 LeetCode-Easy刷題(24) Balanced Binary Tree

Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary tree is defined a

原创 LeetCode-Easy刷題(26) Path Sum

Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along