Thinking logic of computer programs (80) and thinking 80
This section describes scheduled tasks. There are many application scenarios for scheduled tasks, such:
An alarm program or task reminder. You can call a bed at a specified time or return a credit card on a specified date.
The monitoring system collects system data at intervals to trigger alarms for abnormal events.
Statistical System, which usual
Thinking logic of computer programs (78) and thinking 78
In the previous section, we initially discussed the task execution service in Java and package. In reality, the main implementation mechanism of the task execution service is the thread pool. In this section, we will discuss the thread pool.
Basic Concepts
A thread pool, as its name implies, is a thread pool. There are several threads in it. They are
Thinking logic of computer programs (74) and thinking 74
This section describes a commonly used concurrent container-ConcurrentHashMap, which is a concurrent version of HashMap. Compared with HashMap, it has the following features:
Concurrency Security
Directly supports atomic composite operations
Supports high concurrency, fully parallel read operations, and parallel write operations to a certain exten
Thinking logic of computer programs (39) and thinking 39
In the previous section, we introduced the ArrayList. the random access efficiency of ArrayList is very high, but the insertion and deletion performance is relatively low. We mentioned that the List interface's parallel List is also implemented, its features are almost the opposite of that of ArrayList. This section describes the feature list in detai
Thinking logic of computer programs (45) and thinking 45
The previous sections introduced the basic container classes in Java. Each container class has a data structure behind it. ArrayList is a dynamic array, sorted list is a linked list, And HashMap/HashSet is a hash table, treeMap/TreeSet is a red-black tree. This section describes another data structure-heap.
Introduce heap
We mentioned heap before, whe
Thinking logic of computer programs (53), thinking 53
The previous sections introduced various specific container classes and abstract container classes. As we mentioned above, Java has a collection class that provides many common functions for container interfaces, these functions are provided in static mode.
What functions are available? There are two possible types:
For the first type, operations can be
Part 2: Full BIOS ManualI. Award bios settings Manual Award BIOS is a type of BIOS widely used on compatible computers. However, the information in Award BIOS is in English and requires a deep understanding of relevant professional knowledge, therefore, it is difficult to set up some users. If the information is improperly set, the performance of the entire computer host will be greatly affected. The following describes the meanings and methods of se
Thinking logic of computer programs (58) and thinking 58
In the previous section, we introduced how to process files in byte streams. we mentioned that for text files, byte streams do not have the encoding concept and cannot be processed by row, which is inconvenient to use, it is more suitable to use the streaming. This section describes the streaming.
First, we will briefly introduce the basic concepts of
It is planned that the book "construction and interpretation of computer programs" will be completed in half a year, and more than half of the exercises will be completed.
Software used:
System: windows xp
Interpreter: DrRacket, version 5.1
Language: SICP (PLaneT 1.13). For details about how to obtain this language, see here.
Exercise answer directory:
Chapter 2 constructor process Abstraction
Section 1.1
1. Assume that a C program has two files: p1.c and p2.c. On an ia32 server, we compile the code using the Unix Command Line as follows:
UNIX> gcc-O1-o p p1.c p2.c
In fact, the GCC command calls a series of programs to convert the source code into executable code. First, the C Preprocessor extends the source code, inserts all files specified with the # include command, and extends all the macros specified with the # define declaration. Then, the compil
"This is the answer I wrote:# Your code hereIf Len (aStr) = = 0:Return FalseElif len (aStr) = = 1:if aStr = = Char:Return TrueElseReturn FalseElseif char = = Astr[len (aStr)//2]:Return TrueElif Char Return IsIn (char, Astr[:len (ASTR)//2])else:Return IsIn (char, Astr[len (ASTR)//2+1:])def isIn (char, ASTR): "This is the standard answer: char:a single character Astr:an alphabetized string returns:true if char I s in AStr; False otherwise ' # Base case:if aStr is empty, we do not find the char.
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.