443. Compress string

Given a set of characters, compress them using the in place algorithm.The compressed length must always be less than or equal to the original array length.Each element of the array should be a character of length 1 (not an int integer type).After modifying the input array in place, returns the new length of the array.Example 1:Input: ["a&q ...

Posted by pixelgirl on Sun, 12 Apr 2020 09:08:30 -0700

Best practice of springboot + aop, no longer afraid to double-click 666

Talk nineteen to the dozen During the crazy overtime work less than a month after returning to work, I haven't had much time to write blog recently, which is a little bit slow. Fortunately, in the projects I do, not all are business logic of addition, deletion and modification, or some more interesting and practical technical points, so I sorte ...

Posted by betportal on Sun, 12 Apr 2020 04:25:05 -0700

Spring boot exception handling

Spring boot exception handling, usually in two ways One is to use @ ControllerAdvice The other is to use ErrorController, the default error handling BasicErrorController of springboot, which is the implemented interface The first one is called adding interceptor. It's not good. The second one is less error information. It's also bad. It miss ...

Posted by JBS103 on Fri, 10 Apr 2020 08:25:40 -0700

Python Data Analysis and Machine Learning Practice - Tang Yudi Reading Notes Chapter 9 - Random Forest Project Practice - Temperature Prediction (2/2)

python data analysis personal study notes-directory index Chapter 9 - Random Forest Project Actual Warfare - Temperature Prediction (2/2) Chapter 8 has explained the basic principles of random forests. From a practical point of view, this chapter will complete the task of temperature prediction with Python toolkit, which involves several mod ...

Posted by holiks on Thu, 09 Apr 2020 23:05:45 -0700

Python glitz operation: seven ways to merge Dictionaries

WeChat official account: Python programming time. Python language has many (and more and more) advanced features, which are very popular with Python enthusiasts. In the eyes of these people, to be able to write out the advanced features that ordinary developers can't understand is a master, a God. But you know, in teamwork, showing off your s ...

Posted by msing on Thu, 09 Apr 2020 10:28:23 -0700

Find the median of two ordered arrays

If we use the algorithm with time complexity O (m+n), it will be very simple. Today we will introduce an algorithm with time complexity O (log(m+n)). Here we use the idea of dichotomy to solve this problem. First, the array we give is two ordered arrays. In this way, we can easily divide the two arrays into two parts, and the median we are look ...

Posted by jaymoore_299 on Thu, 09 Apr 2020 07:38:09 -0700

Mongodb backup restored to any point in time

Description: According to the technical feedback, some people mistakenly deleted the online mongodb table data in the morning, the user has feedback to the customer service, now it is necessary to restore the data to the user. The first step is to determine the schema of the database for deleted data 1.1, Single point:If there is a backup, sta ...

Posted by eva21 on Thu, 09 Apr 2020 01:13:27 -0700

Remember some random thoughts caused by Task throwing exception and calling thread processing

Remember some random thoughts caused by Task throwing exception and calling thread processing Multithreaded call, the problem how to catch and handle in another thread (calling thread) when the task thread throws an exception. 1. The task thread throws an exception on the execution statement of the task thread. For example: 1 private void b ...

Posted by fael097 on Wed, 08 Apr 2020 07:36:57 -0700

Learn programming from python - vamei

Programming and computer Summary Computer Five structures of computer: input device, memory, controller, arithmetic unit, output device Memory and arithmetic unit are collectively called CPU The computer operating system is responsible for the management of computer hardware resources - > system call programming Programming is a way of int ...

Posted by bellaso on Wed, 08 Apr 2020 00:56:54 -0700

Gin framework series 02: routing and parameters

review In the previous section, we used the Gin framework to quickly build an interface for GET requests. Today, we will learn how to GET routes and parameters. Request verb Students who are familiar with RESTful should know that RESTful is a design style and development mode of network applications. Each URI represents a resource. The client u ...

Posted by endurox on Wed, 08 Apr 2020 00:54:57 -0700