Category:Program Language

  • PHP implementation of redis distributed lock

    Time:2019-11-20

    Lock in our daily development can be used more. It is usually used to solve the problem of resource concurrency. Especially in the case of multi machine cluster, the problem of resource contention. However, many novices often make some problems in dealing with locks. Today we have a deeper understanding of locks. I. one of […]

  • Spring boot2.1. X configuration activiti7 separate data source problem

    Time:2019-11-20

    Spring boot2.1. X configuration activiti7 separate data source problem brief introduction Recently based on the latestActiviti7ConfiguredSpringBoot2。It’s easy to use. Find solutions on the marketActiviti7There are few tutorials and many mining pitsActiviti6Configure data sources andActiviti7Different, based onActiviti6stayActiviti7It can’t be used normally. Next let’s look at the difference. problem Activiti6Multi data source configuration The configuration of 6 […]

  • Rabbitmq message queue

    Time:2019-11-20

    Rabbitmq message queue Introduction of.MQ Full name isMessage Queue, message queuing(MQ)Is a method of application to application communication.MQIt is a typical representative of the consumption producer model. One end writes messages to the message queue continuously, while the other end can read the messages in the queue. The message publisher only publishes the message to […]

  • The issue of C + + relief

    Time:2019-11-20

    N (n < 20) people stand in a circle, and the number is 1 ~ n anticlockwise. There are two officials. A counts counter clockwise from 1, and B counts clockwise from n. In each round, the number of officials a is k, and the number of officials B is m. The next person (1 […]

  • Go interview once a day (day 2)

    Time:2019-11-20

    What is the output of the following code? Explain the reason. func main() { slice := []int{0,1,2,3} m := make(map[int]*int) for key,val := range slice { m[key] = &val } for k,v := range m { fmt.Println(k,”->”,*v) } } Reference answer: 0 -> 3 1 -> 3 2 -> 3 3 -> 3 This is […]

  • Laravel validator custom error returns a prompt message and displays it in the front end

    Time:2019-11-20

    Preface By default, laravel validator returns prompt messages in English. In most cases, we need to customize error return prompt messages. This article will show you how to customize error messages and show them in the front end. Custom error message Don’t blame me for being too direct $messages = [ ‘phone. Unique’ = > […]

  • Solution of connection exhaustion caused by unreasonable lock of DBCP connection pool

    Time:2019-11-20

    Solution of connection exhaustion caused by unreasonable lock of DBCP connection pool The application reports an error. It seems that the connection pool is full. org.springframework.transaction.CannotCreateTransactionException: Could not open JDBC Connection for transaction; nested exception is org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted at org.springframework.jdbc.datasource.DataSourceTransactionManager.doBegin(DataSourceTransactionManager.java:241) ~[spring-jdbc-3.2.2.RELEASE.jar:3.2.2.RELEASE] at com.alibaba.dubbo.remoting.transport.dispatcher.ChannelEventRunnable.run(ChannelEventRunnable.java:82) [dubbo-2.5.3.jar:2.5.3] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_33] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_33] […]

  • Using skill of return value of InputBox function in vbs

    Time:2019-11-20

    If the user clicks OK or presses enter, the InputBox function returns the contents of the text box. If the user clicks cancel, the function returns a zero length string (”). This is a simple and clear description of the return value of the InputBox function in the reference manual. It is also necessary to […]

  • Visual explanation of Python seismic data

    Time:2019-11-20

    In this paper, we share the specific code of Python seismic data visualization for your reference. The specific content is as follows Source code: seisplot preparation: Install Python 3.7 under Windows 10, download the reference source code to local. 1. Demo drawing test Demo drawing instruction cmd> python seisplot.py –demo Problem 1) lack of dependency […]

  • A tutorial for creating a custom Ruby gem package

    Time:2019-11-20

    Write a simple example 1. Create the following folders Note: there must be a RB file with the same name as your gem in the Lib directory. Copy codeThe code is as follows:     $ cd hola      $ tree      .      ├── hola.gemspec      └── lib          └── hola.rb  2. Write code . […]

  • Go language multi person chat room project practice

    Time:2019-11-20

    This article has shared the actual combat of go language multi person chat room project for your reference. The specific content is as follows functional requirement Realizing single lifting Realization of groups Realize the whole network notification of users online Implement user nicknames Realize the storage and view of chat log Server implementation type Client […]

  • Tips for making thumbnails using WordPress’s built-in image warehouse

    Time:2019-11-20

    WordPress is not only a blog, but also a CMS (content management system) for many times. Bloggers like to add thumbnails of a uniform size for each article, especially for information platforms. Among them, the more commonly used method is to insert pictures into the article with custom field, upload small pictures of the same […]