XStream parsing XML message

One, XML data in one format is converted to object. pom.xmlIntroduce <!--javaBeanBidirectional conversion of XML and -->< dependency>< groupId> com.thoughtworks.xstream< /groupId>≪ artifactId> xstream< /artifactId>< version>1.4.10</version> </dependency> xmlFile template <?xml version="1.0" encoding="GBK"?> <MESSAGE> <MESSAGEHEAD> <MESSAGEID/> <SRC/> </MESSAGEHEAD> <MESSAGEBODY> <TRANLIST> <TRAN_DATE/> <TRAN_TIME/> ...

Vue2.0’s three commonly used values, parent, child and non parent components.

In Vue framework development projects, components are often used to manage different functions, and some common components are extracted. There must be some doubts and needs at this time. For example, if one component calls another component as its own subcomponent, how do we pass values to the subcomponentWhat? If it is the development of e-commerce website system, will also involve shopping cart options, this time will involve non-parent component value transfer. Of course, you can also use the Vuex state management tool to implement this part, which we will introduce later. Let me first in...

IOS Android click the copy button to copy text to paste board.

html: <ul class="code_ul"> </ul>       css: .code_ul>li{ color: #00a28c6c; display: -webkit-flex; height: .4rem; line-height: .4rem; font-weight: 600; font-size: .14rem; align-items: center; } .code_ul>li .button{ flex: 1; width: .6rem; color: #fff; background: #ff6c72; border:none; border-radius: 20px; text-align: center; margin-left:.3rem; }          js: Here is the addition of dynamic data. 1 if (res.code == 1) { 2 res.data.forEach(function (element, ind) { 3 ...

Mxonline actual combat 13, lecture lecturer list page, details page, index page global navigation

    Corresponding GitHub address: thirteenth days.   Copy teacher-list.html and teacher-detail.html.   List of lecture lecturers   1. Modify HTML file Copy the contents of the org-list.html page to teacher-list.html to replace crumbs and conteng content.   2. Writing URL and VIEW Because Teacher’s model is in the defined organization / models. py, you can define the instructor’s URL in organization / urls. PY   organization/views.pyCompiling class TeacherListView(View): def get(self, request): all_teacher = Teacher.objects.all() teacher_nums = all_te...

Hihocoder 1509 XOR sort

Here are the questions.       Considering the first and second numbers x, y, we can find that S is determined only on the highest bit of (x XOR y) (if x = = y is not restricted), and we can deduce what is 1/0.     So let’s simulate this operation and decide if there’s any contradiction in the restriction. If there’s no contradiction, the answer is 2 ^ free bit.   #include<bits/stdc++.h> #define ll long long using namespace std; int n,ban[67]; ll now,pre,Xor,c[67],ans=1; int main(){ scanf("%d",&n),fill(ban,ban+60,-1); c[0]=1; for(int i=1;i<=60;i++) c[i...

TOS/DSCP/COSl difference and connection

Difference: TOSAnd DSCP are the fields in the three tier protocol (IP layer). COSIt is the field in the two tier protocol. Detailed: TOSDefined in different protocols, RFC 791, RFC 122, RFC 1349; RFC 1349 abolished the previous two RFC definitions, and now most devices use RFC 1349. DSCPDefined by RFC2474, the 1 byte of the TOS and Traffic Class in the IPv4 header is renamed. The new name is the DS field, which is still used by QoS tools to annotate data.   0   1   2   3   4   5   6   7+—+—+—+—+—+—+—+—+|         DSCP    ...

Python novice how to write a guessing game

This article is aimed only at novice, I hope you do not spray, thank you! If you don’t say much, you should first code. import random if __name__ == '__main__': yourname = input("Hello! What's your name? \n"); print ("Welcome to guessing game." + yourname) print ("I guess a number is between 1 and 20. Can you guess it?") random_num = random.randint(1,20) time = 0 while time < 5: num = int(input("Please input your number:")) if num == random_num: break; elif num < random_num: print ("Smaller than mine.") ...