原创 HashMap&HashSet學習鏈接記錄

關於HashMap基礎與整體理解:Java容器(四):HashMap(Java 7)的實現原理 關於hash()函數的原理:java中的HashMap中hash函數,只是單純數學計算嗎,還是這樣設計目得又是爲什麼呢? 關於Has

原创 深入理解計算機時間系統-Java應用篇

注:本人原創,首發於https://mp.weixin.qq.com/s/oMQ–gLOGMXpblM4g8TnZA。轉載請註明出處。 文章目錄一. 常識知識1. 時區2. 夏令時3. UTC和GMT二. Java關於日期時間的

原创 springboot1.5.x 版本後使用 velocity 模板

由於springboot在1.5.x版本開始不支持velocity(https://jira.spring.io/browse/SPR-13235),之後的版本若想使用要自己配置,在此簡要記錄我的配置方法,springboot版本

原创 LeetCode_21. Merge Two Sorted Lists

題目 Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the

原创 LeetCode121. 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 permitt

原创 Hadoop_1 Hadoop概述和MapReduce簡介

Hadoop的基本概念 處理海量數據時,爲了降低成本,使用普通PC機,將硬件損壞視爲常態,通過軟件來保證可靠性。 Hadoop的核心組成: HDFS:分佈式文件系統,存儲海量數據; MapReduce:並行處理框架,實現任務處

原创 二叉樹的遍歷(Java實現)

列舉了二叉樹的前序、中序、後序的遞歸和非遞歸遍歷方法,以及層次遍歷、分層輸出的層次遍歷方法。 舉例如下: import java.util.LinkedList; import java.util.List; import j

原创 深入理解計算機時間系統-系統&硬件篇

注:本人原創,首發於https://mp.weixin.qq.com/s/cN1PrKaBoAe-b7RXSqh9iQ。轉載請註明出處。 文章目錄1. 奇怪的現象2. 深入探索 System.currentTimeMillis()

原创 安卓_利用Java反射技術阻止通過按鈕關閉對話框

轉自 Android系統原理與源碼分析(1):利用Java反射技術阻止通過按鈕關閉對話框 由於系統通過調用dismiss來關閉對話框,那麼我們可以在dismiss方法上做點文章。在系統調用dismiss方法時會首先判斷對話框是否已

原创 TensorFlow學習_(5)0~9數字識別程序

用MNIST數據集訓練,輸入要識別的圖片路徑,首先預處理,將圖片調成 28*28 ,轉成灰度圖,反色,取閾值二值化,變成 1*784 數組,輸入模型,算出被預測數字。程序如下: pre_pic.py from PIL import

原创 LeetCode110. Balanced Binary Tree

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

原创 LeetCode136. Single Number

題目 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algori

原创 LeetCode101. Symmetric Tree

題意: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, th

原创 LeetCode141. Linked List Cycle

題目 Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space?

原创 Java學習_String類型轉換等問題

String和其他數據類型轉換 1.String與int/double/float/long互相轉換 String s = "1234"; //parseInt()返回的是基本類型int, int i1 = Integer.pa