Learning code: DI dependency injection of hand written Spring

I wrote the IOC implementation of spring before, but now I write the implementation of DI dependency injection Paste class diagram Because junit package will be used when DI is implemented for testing, import dependency in pom.xml <!--SpringDI--> <dependency> &lt ...

Posted by Kingskin on Sat, 11 Jan 2020 18:06:09 +0100

android Google map's icon page turning effect

Recently, I was looking at the hencoder custom view series of the throwing line. There is an icon turning the page and rotating the effect is cool. After thinking about it and seeing the thought of a great God, I finally made it. (GIF recorded a bit of card, the real effect can be run and viewed by yourself) thinking The w ...

Posted by stickman373 on Sat, 11 Jan 2020 18:03:09 +0100

Understanding of metaclasses in python

1. Class is also an object In most programming languages, a class is a set of code snippets that describe how to generate an object. This is still true in Python: >>> class ObjectCreator(object): ... pass ... >>> my_object = ObjectCreator() >>> print my_object <__main__.ObjectCreator object at 0x8974f2c> ...

Posted by Varma69 on Tue, 07 Jan 2020 15:25:06 +0100

Go Network File Transfer

Process analysis With the help of TCP, the basic idea is as follows: The sender (client) sends the file name to the server, and the server saves the file name. The receiver (server) returns a message ok to the client to confirm that the file name is saved successfully. After receiving the message, the sender (client) begins to send the file da ...

Posted by evdawg80 on Tue, 07 Jan 2020 09:53:27 +0100

Three ways to parse xml

The first native parsing method DOM When parsing XML documents, the parser will write the contents of the documents into memory. If the document nodes are added, deleted or modified, they must be used Transformer transformer = TransformerFactory.newInstance().newTransformer(); transformer.transform(new DOMSource(doc), new Str ...

Posted by khan kaka on Tue, 07 Jan 2020 06:45:03 +0100

HTML5 file upload progress bar based on HT for Web vector

In HTML, in the process of file upload, there are many cases where there is no prompt, which is very bad in the experience. Users don't know whether there is a successful upload or not, so the content introduced to you today is through HT for Web Vector to achieve HTML5 file upload progress bar, vector in< Application of embedding vector Cha ...

Posted by LarryK on Tue, 07 Jan 2020 04:26:36 +0100

The difference of innerHTML, innerText, value in JS

I. difference innerHTML Adding HTML code to the control is to set the HTML in an element. The tag is effective for text information. innerTEXT Print the plain text information between the labels, display the labels, the labels are invalid, and the lower version of Firefox does not support it. value Display all contents in ...

Posted by imarockstar on Mon, 06 Jan 2020 00:36:37 +0100

Waiting cache events for img

Demand: Ensure that the printing method is executed after all pictures are loaded successfully Implementation of final code: printMail = () => { this.btnDisplay='none'; //Get the window object of iframe let iframe = document.getElementsByClassName('wea-email-content-iframe')[0].contentWindow; let img_lengt ...

Posted by Gladiator2043 on Sun, 05 Jan 2020 12:42:28 +0100

Redis data basic operation

@ overview Some common operations of key value pairs and other data types are listed here; For more operation commands and definitions, please refer to: http://redis.cn/commands.html @String operation example set name bill //set key value setex name 20 bill //Key expires in 20 seconds mset age 60 gender male //Store multi ...

Posted by gotornot on Sat, 04 Jan 2020 04:12:20 +0100

The iOS property modifier atomic is not absolutely secure

Atomicity of atomic, is it absolute thread safety, not absolute thread safety? First, look at the code and print results @property (atomic, assign) NSInteger intA; //There is an attribute of atomic, indicating that it is atomic - (void)viewDidLoad { [super viewDidLoad]; //Start the value of a thread to the intA + 1 ...

Posted by Minor Threat on Sat, 04 Jan 2020 00:09:13 +0100