7-2 product category list shows dao, service, controller, web, resultType and resultMap

I. Development of Dao layer 1. Develop dao interface public interface ProductCategoryDao { /** * Query the commodity category of the shop through the shop id * @param shopId * @return List<ProductCategory> */ List<ProductCategory> queryProductCategoryList(long shopId); } 2. Develop dao implementation class ...

Posted by riyaz on Sat, 09 Nov 2019 09:12:52 -0800

Python: record a Web interface optimization

background We are responsible for a business platform. Once we found that the loading of the settings page was particularly slow, which was just outrageous It is impossible for users to wait for 36s, so we are going to start the optimization journey. Throw a stone to clear the road Since it is the response of the website, we can use Chrome as ...

Posted by krio on Sat, 09 Nov 2019 08:38:26 -0800

Fluent python example: download the national flag image asynchronously

Asynchronous download of national flag picture and country name data import aiohttp import asyncio import os import time import sys POP20_CC = ('CN IN US ID BR PK NG BD RU JP MX PH VN ET EG DE IR CD FR').split() BASE_URL = 'http://flupy.org/data/flags' DEST_DIR = 'downloads/' class FetchError(Exception): #Used to catch exceptions def __i ...

Posted by sith717 on Fri, 08 Nov 2019 10:52:42 -0800

zabbix Sends WeChat Alerts with Pictures

zabbix Sends WeChat Alerts with Pictures 2.1 Realization Ideas 2.2 Preparing the environment The script uses python scripts, running in python 2.7.5 Dependent libraries are installed in advance: requests 2.3 ×××tid,secret This section allows you to see a detailed description of the previous article without a diagram 2.4 Script Implementati ...

Posted by Toby on Thu, 07 Nov 2019 13:51:47 -0800

Application skin change - Summary

(I) storage strategy <1> database You can add skin fields to the database user table for access. If the user table is not convenient for adding fields, you can add an intermediate table to store user and skin information.< 2 > read write configuration Users and skin information can be stored by reading an ...

Posted by veronicabend on Thu, 07 Nov 2019 10:40:59 -0800

File upload and download based on formdata and blob

First, introduce the basic knowledge used formdata Definition on MDN: the FormData interface provides a way to construct key value pairs that represent form data. After that, the data can be sent out using the XMLHttpRequest.send() method.In short, it is the parameter used to construct http request (it can carry file data). Common methods:FormD ...

Posted by grazzman on Wed, 06 Nov 2019 20:15:06 -0800

10. pytest -- skip and xfail marks

Catalog 1. Skip execution of test cases 1.1. @pytest.mark.skip decorator 1.2. pytest.skip method 1.3. @pytest.mark.skipif decorator 1.4. pytest.importorskip method 1.5. Skip test class 1.6. Skip test module 1.7. Skip specified file or directory 1.8. summary ...

Posted by dabigchz on Wed, 06 Nov 2019 00:43:01 -0800

pytorch learning note 5 - Case Study

The first is a two-tier network, using the numpy version and the python version In fact, if you compare carefully, the difference is not big. The amount of code is similar. Because there is no automatic gradient calculation using pytorch. numpy version # -*- coding: utf-8 -*- import numpy as np # N is batch size; ...

Posted by sms.sanal on Tue, 05 Nov 2019 13:24:48 -0800

Front end routing Hash and History mode

Understanding SPA Modern front-end projects are mostly single page Web applications (SPA), in which the path is an important part.SPA is the abbreviation of single page web application, which is translated into single page web application. In short, SPA is a WEB project with only one HTML page. Once the page is loaded, SPA will not reload or ...

Posted by melittle on Sun, 03 Nov 2019 20:18:39 -0800

With MySQL, what are the pits in SQL mode, do you know?

SQL MODE is a system variable in MySQL, which can be composed of multiple modes. Each MODE controls a behavior, such as whether to allow the divisor to be 0, and whether to allow the value of '0000-00-00' in the date. Why should we pay attention to SQL mode? First, look at three simple demos (MySQL 5.6). 1. mysql> create table t1(c1 da ...

Posted by austrainer on Sun, 03 Nov 2019 17:44:30 -0800