Tag:java

  • Android 2019 latest interview practice summary

    Time:2019-12-9

    Android: How does the headline screen fit today? 1: first calculate the density. Calculation formula: the total screen width of the current device (in pixels) / the total width of the design drawing (in DP) = the reason why 1 DP accounts for the number of pixels of the current device to calculate the density: […]

  • Best in-depth study list in 2018

    Time:2019-12-9

    Abstract: AI talent gap is huge? If you want to be part of the AI revolution, then you have to study in depth. Look at these 12 books, they will be your weapon! I believe you should know that AI, especially deep learning, has made good progress in the past five years or so. Deep […]

  • On Java generics

    Time:2019-12-9

    What is generics? Generic is a new feature of JDK 1.5. Its essence is the application of parameterized type, that is to say, the data type to be operated is specified as a parameter, and the specific type is specified when it is used. This parameter type can be used in the creation of classes, […]

  • Using Maven plug-in to build docker image for spring boot application

    Time:2019-12-9

    Spring boot actual e-commerce project Mall (20k + star) address: https://github.com/macrozheng/mall abstract This article mainly introduces how to use Maven plug-in to package spring boot application as docker image and upload it to docker registry, a private image warehouse. Docker Registry Docker registry 2.0 building docker run -d -p 5000:5000 –restart=always –name registry2 registry:2 If […]

  • Spring 3. X upgrade spring 4 Practice

    Time:2019-12-9

    Why upgrade spring 4 The reason for upgrading spring 4 is that you want to upgrade the old project from JDK1.6 to 1.8, while the previous version of spring 4 is not compatible with jdk8. Compared with spring 3, spring 4 introduces many new features. Here are a few more important ones: Support for jdk8 […]

  • The method of accumulating the number of songs to be listened to by java + selenium Netease cloud music brush

    Time:2019-12-9

    background It should have been last year. Brush Zhihu saw a question about how to brush the accumulated number of songs that Netease cloud music individuals listened to. Then he had a highly praised answer, posted a section of JS code, and executed it directly in the browser console. At that time, I tried it […]

  • Spring boot plus v1.2.3 release, CentOS quick install environment / build / deploy / start project

    Time:2019-12-8

    Spring boot plus v1.2.3 release, CentOS quick install environment / build / deploy / start project [V1.2.3-RELEASE] 2019.09.09 Spring boot plus v1.2.3 release, CentOS quick install environment / build / deploy / start project ⭐️ New Features Project running environment installation script CentOS quick build / deploy / launch project script ⚡️ Optimization optimizationmaven-assembly-pluginProject packaging […]

  • Leetcode plus one (Java, python3)

    Time:2019-12-8

    add one-tenth Given a byintegerComposedNot emptyThe nonnegative integer represented by an array. Add one to the number. The highest number is placed at the top of the array, and each element of the array only stores one number. You can assume that except for the integer 0, this integer does not start with zero. Given […]

  • Java | spring boot and redis realize cache and session sharing

    Time:2019-12-8

    Completion status [] under preparation [] completed [x] under maintenance original text Redis Redis is an open source, network enabled, memory based, optional persistent key value pair storage database written in ANSI C —— Wikipedia Redis is a widely used memory based key value database in the industry. It provides rich data structures, not only […]

  • Springboot2. X file upload

    Time:2019-12-8

    Configuration of POM package <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> Start item class modification /** *Prevent Tomcat connection reset when file is greater than 10m * * @return */ @Bean public TomcatServletWebServerFactory tomcatEmbedded() { TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory(); tomcat.addConnectorCustomizers((TomcatConnectorCustomizer) connector -> { if ((connector.getProtocolHandler() instanceof AbstractHttp11Protocol<?>)) { ((AbstractHttp11Protocol<?>) connector.getProtocolHandler()).setMaxSwallowSize(-1); } }); return tomcat; } Profile modification […]

  • 【LeetCode Easy】021 Merge Two Sorted Lists

    Time:2019-12-8

    Easy 021 Merge Two Sorted Lists Description: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.Input: 1->2->4, 1->3->4Output: 1->1->2->3->4->4 My Solution: In order to reduce the space complexity, the final result is directly modified on LIST1 […]

  • Java HTTP tool class

    Time:2019-12-8

    HTTP request tool I. add dependency <dependency> <groupId>cn.gjing</groupId> <artifactId>tools-httpclient</artifactId> <version>1.2.1</version> </dependency> II. Instructions The return value type should preferably be the same as the target methodOtherwise, conversion exceptions may occur, which is best used when the return type is not confirmedStringTo receive. At the end of the request, you can use theget()Method can also be […]