原创 Decode Ways --lintcode

,Description A message containing letters from A-Z is being encoded to numbers using the following mapping: ‘A’ ->

原创 Perfect Squares--lintcode

Description Given a positive integer n, find the least number of perfect square numbers (for example, 1, 4, 9, 16,

原创 ArrayList Source Code

ArrayList Source Code 說明 承了RanddomAccess —->遍歷的話用for最好 elementData是數組 所以在順序插入和隨機訪問的情況下使用這個最好 list可以放入重複的值 構造方法 ​ 先將繼

原创 Session && Cookie

Session && Cookie Before, i only knew session is used to store data in the server and cookie is used to store data i

原创 angular6 ------ build multiple environments

At the first place, before version 6, ng build --env=dev its ok. but in angular6, –env is not supported . –env got c

原创 協同過濾算法代碼

此算法主要用來推薦的. //找出ui,uj兩個用戶同時打過分的課程集合 function getPSet($uid, $ujd) { //"select 課程編號 from 評分 where 用戶編號=@ui

原创 排序

1.交換排序: 冒泡排序和快速排序2.插入排序:直接插入 和折半插入 和希爾排序3.選擇排序:簡單選擇排序和堆排序4.歸併排序冒泡排序:時間複雜度爲O(n2),而空間複雜度爲O(1)。public static void bubbleSo

原创 網絡編程TCP

TCP特點:1.面向連接的傳輸服務        程序在用TCP協議傳輸數據時 需在源進程端口與目的進程端口之間建立一條TCP傳輸連接2. 支持字節流的傳輸    TCP在傳輸過程中將程序提交的數據看成一連串 無結構的字節流,因此接收端程

原创 集合之java.lang.UnsupportedOperationException

List<Integer>toList=Arrays.asList(1,2,52); toList.add(5);報錯:java.lang.UnsupportedOperationException好奇怪,add爲什麼會報錯呢?

原创 集合中的對象比較

法1:類繼承Compare<T>接口import lombok.Data; @Data public class UserTest implements Comparable<UserTest> { private int age;

原创 網絡編程UDP

UDP協議特點:1.面向無連接的傳輸層協議       (1)UDP協議在傳輸報文之前不需要在通信雙方建立連接 因此減少了協議開銷與傳輸延遲         (2)UDP對報文除了提供校驗和之外幾乎沒有提供其他的保證數據傳輸可靠性的措施 

原创 java回調機制

異步調用:類A的一個方法methodA()開啓了一個新的線程調用了類B的方法methodB(),程序繼續執行。無論methodB()執行多久都不會阻塞methodA()。如果想要methodB()方法的執行結果 則可以用Future+Ca

原创 HTTP協議 學習

HTTP協議 學習 首先 附上 官方解釋 和 別人的總結 官方解釋 打開後 第14 Header Field Definitions 將header說的很清楚 http協議總結–厲害 http prot

原创 IO

IO體系抽象基類節點流(文件流)   緩存流InputStreamFileInputStreamBufferedInputStreamOutputStreamFileOutputStreamBufferedOutputStreamRead

原创 how to configure mybatis plus?

​ <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId>