Array and string methods that must be remembered

array 1. concat() is used to connect two or more arrays and return a new array (without changing the original array) let arr1=[1,2,3,4] let arr2=[5,6] console.log(arr1.concat(arr2))//[1,2,3,4,5,6] 2. pop() is used to delete and return the last element of the array (changing the original array) let arr=[1,2,3,4] let res=arr.pop() console.log ...

Posted by Grant Holmes on Fri, 24 Sep 2021 08:05:42 -0700

Spring MVC exception handling mechanism,

First, exception handling belongs to the spring MVC module, not the spring core. Having this awareness can help us better understand the spring framework. There are two spring MVC unified exception handling mechanisms. The first is to implement the HandlerExceptionResolver interface. The second is to add @ ControllerAdvice annotation on the exc ...

Posted by phencesgirl on Fri, 24 Sep 2021 07:01:12 -0700

Parameter management of deep learning

         After selecting the architecture and setting the super parameters, we enter the training stage. Our goal is to find the parameter value that minimizes the loss function. After training, we need to use these parameters to make future predictions. Sometimes we need to extract parameters to reuse th ...

Posted by teongkia on Fri, 24 Sep 2021 06:35:37 -0700

Leetcode 18 sum of four numbers

Problem description Give you an array of n integers, nums, and a target value, target. Please find and return the quads [nums[a], nums[b], nums[c], nums[d]]: 0 <= a, b, c, d < n a. b, c and d are different from each other nums[a] + nums[b] + nums[c] + nums[d] == target You can return answers in any order. Example 1: Input: num = [1 ...

Posted by therealchuckles on Fri, 24 Sep 2021 07:22:26 -0700

The way of Java learning - Set interface, HashSet interface implementation class (important)

Work hard and see you at the top! come on. 1, Set interface 1. Introduction to set interface Out of order (the order of addition and extraction is inconsistent) and there is no indexDuplicate elements are not allowed and contain at most one null 2. Traversal mode iterator Enhanced for loop (the underlying is also an iterator)Cannot g ...

Posted by bnownlater on Fri, 24 Sep 2021 08:13:08 -0700

ubuntu monitoring keyboard input

background         In the project, I used a hook function of windows, mainly the keyboard hook, which is very interesting. So I want to see the hook function under linux and realize a function of monitoring keyboard input, so that I can shield the input of some keys. process         I only have a ...

Posted by aragon1337 on Fri, 24 Sep 2021 07:22:13 -0700