Tags: style blog Io ar use the for strong SP File
Continue with yesterday's topic. I mentioned yesterday that I/O: the indirect impact of format on data sharing. I am afraid it is more likely to become a "pitfall" in the following two cases. Well, I happened to have encountered it;
If the test code is as follows, what will happen? Guess!
s2()-> L=[1,2,3,4,5,6], L2=[L,L,L,L],erlang:display( {{erts_debug:size(L),erts_debug:flat_size(L)},{erts_debug:s
Functions of L1, L2, and L3 blocks:-facilitates the query of data blocks. L3 has pointers to L2, L2 has pointers to L1, and L1 has pointers and statuses of multiple data blocks. 1. Each L3 contains multiple L2 addresses (the first L3 is the segment header ). 2. Each L2 conta
# L1 = [111,222,333,444,555] Deletes an element indexed as an odd digit.# L1 = [111,222,333,444,555] # del L1[1::2] # print (L1)by removing elements from a list# For i in range (len (L1) -1,0,-1): # if i%2==0:# del l1[i-1]# print (L1)use a range to refer to the index position through a loop list for inch L1: if l1.index (i)%2==0: l2.append (i) L1=L2print(L1)assign a value to L1 by creating a new list of
You are given, linked lists representing, and non-negative numbers. The digits is stored in reverse order and all of their nodes contain a single digit. ADD the numbers and return it as a linked list.Input: (2, 4, 3) + (5, 6, 4)Output:7, 0, 8A very natural idea is to go through two linked lists separately, get two addend add1 and ADD2, then get SUM=ADD1+ADD2, and then save the sum with the list in reverse order. This approach ignores the problem that data cannot be stored in int or other integer
Copy is a copy, what is the depth of the word?In Python, there is a difference between the assignment of an object and the copy (deep/shallow copy), which can produce unexpected results if used without notice.Actually, this is the result of shared memory.Copy: The principle is to separate the data, copy its data, and later modify the non-impact.Let's look at a non-copy example.= Assignment: Data is fully shared (= assignment is pointing to the same object in memory, if it is a variable (mutable)
Merge sorted (ascending) linked lists and return it as a new sorted list. The new sorted list should is made by splicing together the nodes of the and lists in sorted order.Has you met this question in a real interview?YesExampleGiven 1->3->8->11->15->null , 2->null return 1->2->3->8->11->15->null .For the original topic on Leetcode, see my previous blog, merge, Sorted Lists.Solution One:classSolution { Public: /** * @param listnode L1 is the head of the linked list * @param ListNode
Coding:1,is = == = the value is compared.is memory address.for int STR: There is a concept of a small data pool.Why is there a small data pool? Save memory.INT-5 ~ 256STR all letters, numbers and a single letter want to multiply the number by no more than 20.Other data types: No concept of small data pools,L1 = [1] L2 = [1]Big environment: Python3:PYTHON3: encoded Unicode in STR memoryWhat if I want to store, or transfer strings (files) directly to ST
Copy is a copy, what is the depth of the word?In Python, there is a difference between the assignment of an object and the copy (deep/shallow copy), which can produce unexpected results if used without notice.Actually, this is the result of shared memory.Copy: The principle is to separate the data, copy its data, and later modify the non-impact.Let's look at a non-copy example.= Assignment: Data is fully shared (= assignment is pointing to the same object in memory, if it is a variable (mutable)
Merge Sorted ListsMerge sorted linked lists and return it as a new list. The new list should is made by splicing together the nodes of the first of the lists.Idea: Merge two sorted single-linked lists. The algorithm is relatively simple, similar to the merge sort. Just the data structure on the previous learning, now forget more, write the first time more laborious. and want to repeat the code to write the method, but the method can not change the value of parameters synchronously, there is no w
Merge sorted linked lists and return it as a new list. The new list should is made by splicing together the nodes of the first of the lists.Test instructions: Merging two sorted listsThe problem is not difficult, but there are a lot of details that need attention, direct sticker code1 /**2 * Definition for singly-linked list.3 * struct ListNode {4 * int val;5 * struct ListNode *next;6 * };7 */8 structlistnode* mergetwolists (structlistnode* L1,structlistnode*
Isis?
Word ISO routing area tag
Level-1 is-is level-1 routes only
Level-1-2 is-is level-1 and level-2 routes
Level-2 is-is level-2 routes only
Metric metric for redistributed routes
Route-map route map reference
R1 (config-router) # redistribute ISIS level-1 metric 2
Check R5 route table
R5 # Show IP Route
....
34.0.0.0/24 is subnetted, 1 subnets
I L2 34.0.0.0 [115/20] via 45.0.0.4, fastethernet0/1
16.0.0.0/24 is subnetted, 1 subnets
I
1. A list loop with duplicate data# The result is incorrect when you cycle through the data in the list for inch L: if i%2! =0: l.remove (i)print(l)The output is:[1, 2, 4, 6, 8]Why is not correct, because: the loop subscript 0 element is 1, the number of the deletion of the list at this time to [1,2,3,4,5,6,8], this time to cycle subscript 1, when the subscript is 0 or 1, subscript 1 is 2, so the subscript 0 has been circulating, so it was missing out.2. Memory address as memory addr
Gartner recently released the 2013 version of the application Delivery Market Magic Quadrant Analysis, comparing the October 2012 report with the overall pattern of this year's latest report chart, the leader Quadrant is still the F5,citrix,radware three-strong. It is worth noting that Citrix is more close to F5, and Radware from the edge of the leadership quadrant last year, and this year Radware has significantly improved both in vision and execute
This article will not explain the details of each of the network technology, and will not explain the implementation of neutron network details, but a high degree of summary of the technical nature of these basic network technology, trying to help you in these network technology and neutron between the establishment of a higher level of contact, so that everyone juchongruoqing, the global system to So before you read this article, understanding the following knowledge will help you understand th
suffering from this disease only with these 5 factors, the doctor is much better analysis. But if 1000 wi is not 0, doctors face these 1000 kinds of factors, tired sleep do not love.2, L2 norm
In addition to the L1 norm, there is a more popular rule-norm that is the L2 norm: | | w| | 2. It is also inferior to the L1 norm, it has two laudatory name, in the return inside, some people have its return called
continue to use the existing Windows version, instead of spending a lot of money porting all other applications to a new platform. Determine whether to replace the office toolkit and consider the problem of replacing the customer's operating system separately. Gartner created an automatic office migration cost model to help enterprises consider office migration issues.
2. Use Linux for free
Supported Linux versions are not free of charge. The so-c
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.