Hibernate learning notes (6)

1, Object navigation query Previous relationships between customers and contacts were one to many: One to many Scenario: query the customer according to the customer id, and find out all contacts of the customer @Test public void selectTest(){ SessionFactory sessionFactory = null; Session session = null; Transacti ...

Posted by 01706 on Thu, 30 Apr 2020 11:07:51 -0700

Download a few pictures on Weibo

Today, when I was playing Weibo, I accidentally thought of using python to crawl and download a few pictures. However, it is found that Weibo is different from ordinary websites, To get a little content, you need to get a cookie from the browser first. Otherwise, it can't jump automatically. At present, I haven't found a good solution, so I fo ...

Posted by nekoanz on Thu, 30 Apr 2020 07:01:10 -0700

pytest document 37 - Custom use case ordering

Preface In the design of test cases, we generally require that there is no order. Use cases can disrupt the execution, so as to achieve the test effect When some students write use cases, they write the order of use cases. After the order, there will be new problems (for example, the data returned from the previous use case is used as the para ...

Posted by Wolverine68 on Wed, 29 Apr 2020 07:55:00 -0700

Front end routing (history+hash)

Blog address changed before, republish! In traditional website development, we usually use technologies such as asp, php and jsp to develop. After the development is completed, we will deploy them on the server. When we visit, we will send them with '. asp', '. php' in the browser, For url requests with suffix paths such as'. jsp ', the server ...

Posted by maybl8r03 on Tue, 28 Apr 2020 23:08:35 -0700

Basic knowledge of Flask

Introduction: Flask is based on python and relies on jinjia2 and werkzeug WSGI services as a micro framework Werkzeug is essentially a Socket server, which is used to receive http requests and preprocess them, then trigger the Flask framework, Developers process the request based on the functions provided by the Flask framework and return it to ...

Posted by lessthanthree on Tue, 28 Apr 2020 01:53:50 -0700

System Library_03_stats Library for ProxySQL Official Translation_u 09_ProxySQL Configuration

System Library _03_stats Library for 09_ProxySQL Configuration Note: Subsequent official updates to github were not written between 201904 and 201905~~Statistics] Stats library [The stats database] This database contains indicators for data collection of ProxySQL's internal capabilities.Here, you'll find information about how often certain cou ...

Posted by Matty999555 on Mon, 27 Apr 2020 10:21:14 -0700

Play Django 2.0 --- Django notes foundation 11 (music website development)

11.5 song Leaderboard The song leaderboard is accessed through the navigation link on the home page and displayed in descending order according to the number of songs played. From the design diagram of the leaderboard page, we can see that the web page has three functions: search at the top of the web page, song classification and filtering, a ...

Posted by damisi on Sun, 26 Apr 2020 20:24:08 -0700

MyBatis level 1 cache implementation details and precautions

Introduction to L1 cache In the process of application running, it is possible for us to execute multiple SQL queries with the same query conditions in a database session. MyBatis provides the scenario of optimizing the first level cache. If the SQL statements are the same, the first level cache will be hit first, so as to avoid directly queryi ...

Posted by phpORcaffine on Sun, 26 Apr 2020 09:16:35 -0700

Write decorator to implement python request error retry function

When doing interface automation test, we always encounter interface script failure due to connection timeout and other errors. Official method: max_retries=5 error retries 5 timesNote that this is only for DNS, connection error retry. from requests.adapters import HTTPAdapter s = requests.Session() s.mount('http://',HTTPAdapter( ...

Posted by irving on Sat, 25 Apr 2020 08:41:56 -0700

Smart socket: active Push message from server to client

In the communication scenario, the common mode is that the client sends the request to the server, and the server responds again. Another communication mode is that the server actively pushes messages to the client. There are usually two scenarios for this communication. Scenario 1 A client sends instructions to the server and triggers the serv ...

Posted by madhouse92 on Sat, 25 Apr 2020 06:58:27 -0700