DateUtils

To be sorted out package com.icil.esolution.utils; /** * ******************************************** * @ClassName: DateUtils * @Description: * @author Sea * @date 28 Aug 2018 9:51:49 PM * *************************************************** */ import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.Instant; import java.time.LocalDateTime; import java.time.ZoneId; import java.time.format.DateTimeFormatter; import java.util.Date; import org.springframework.util.Assert; public class DateUtils { /** * @Desc Date to String like: yyy...

Using yaml to write configuration files

yamlIt is a data serialization standard which is suitable for all development languages, and the biggest feature is good readability. yamlOne of the main application directions is to write configuration files. There are many systems and frameworks configured with yaml. yamlThere are the following basic rules: 1、Case sensitive2、Use indentation to represent hierarchical relationships3、No tab indentation is allowed, only space key is allowed.4、The indentation length is not limited, as long as element alignment means that these elements belong to a hierarchy.  5、Use notes to indicate ...

VS2017 package registration IE plug-in and modify IE security options settings

  .title2 { padding: 5px; font-weight: bold; background-color: #f6f6f6 } .bordered { border: 1px solid #ccc; background-color: #f8f8f8; margin-bottom: 5px } Preface Recently, the project needs to read employee ID card information in the browser environment. To realize the communication between web pages and hardware devices, several implementation methods are considered. 1.With ActiveX plug-in, it communicates directly with the device through the library.        Advantages: manufacturers provide IE plug-ins, simple development.        Disadvantages: it can only run in IE browsers. U...

design_model(15)Strategy

1.Policy pattern: The policy container does not know the details of the internal policy, because the container does not implement the same interface as the internal policy, that is, the container and the internal policy is simply a combination relationship, the container only extracts the behavior of the internal policy, and carries out a unified implementation. 2.Example public interface Client { public abstract void test() ; } public class Big implements Client{ @Override public void test() { System.out.println("3Fold ");}}Public class Min implements Client{@OverridePu...

Definition of defects

1、    The function of requirement is not realized. 2、    Realized the function that the demand has no requirement. 3、    There are clearly specified mistakes that should not be made in the software.   (Extension: what are the two basic elements of software?     1)    Function should be able to achieve     2)    To have strong exception handling capability (robustness) 4、    Although demand is not mentioned explicitly, the function that should be realized has not been realized. (Note: Requirements may have omissions, we can not test the wor...

design_model(14)Mediator

1.Mediator pattern / / do not need to coordinate the relationship between themselves. 2.Example public interface Mediator { void register(String dname,Department d); void command(String dname); } public class President implements Mediator { private Map<String,Department> map = new HashMap<String , Department>(); @Override public void command(String dname) { map.get(dname).selfAction(); } @Override public void register(String dname, Department d) { map.put(dname, d); } } public interface Department { void selfAction(); voi...

Python in Ubuntu system

  UbuntuIn the system, Python version 2.7.x is installed by default, and python command is executed directly. Pthon version 2.7.x will be opened; Python version 3 needs to be installed by itself, and after successful installation, Python 3 will open pyt.Hon 3.x version.   pythonIt is installed in the /usr/bin directory; the python library is installed in /usr/local/lib/python XX. XX is the version number.   This article introduces the installation of Python source code in Ubuntu system:         Official website download source: WGet https://www.python.org/ftp/python/3.5...