How to store Ethereum balance data
Publish: 2021-05-12 02:22:57
1. Buffer of IO stream custom byte stream:
idea: the working principle of read() method in bufferedinput stream class
1) read bytes from byte stream one by one, read a certain amount (custom), store in a byte array (buffer) (FileInputStream. Read (byte [] b)), and get the number of storage (return value of read method)
2) return one byte at a time, return one, rece the storage quantity by 1, and then move the pointer back one bit to get the next one
3) if the storage quantity is 0, it means that all the data in the current array have been fetched out. At this time, read (byte [] b)) again to get the storage quantity
4) if the number of stores (i.e. the read method returns - 1), it means that it will return - 1 after reading to the end of the file
therefore, the following variables need to be used:
the number of bytes read, the pointer to which one to take in the array, and the byte variable to be returned.
idea: the working principle of read() method in bufferedinput stream class
1) read bytes from byte stream one by one, read a certain amount (custom), store in a byte array (buffer) (FileInputStream. Read (byte [] b)), and get the number of storage (return value of read method)
2) return one byte at a time, return one, rece the storage quantity by 1, and then move the pointer back one bit to get the next one
3) if the storage quantity is 0, it means that all the data in the current array have been fetched out. At this time, read (byte [] b)) again to get the storage quantity
4) if the number of stores (i.e. the read method returns - 1), it means that it will return - 1 after reading to the end of the file
therefore, the following variables need to be used:
the number of bytes read, the pointer to which one to take in the array, and the byte variable to be returned.
2. Storage of data is the technology of disk
data structure storage is generally array, structure,
structure string useful array, the form of linked list
tree and graph appear when the structure of linked list is complicated
so data structure only cares about the relationship between data
data structure storage is generally array, structure,
structure string useful array, the form of linked list
tree and graph appear when the structure of linked list is complicated
so data structure only cares about the relationship between data
3. There are many kinds of information to be processed by computer, such as numbers, words, symbols, graphics, audio, video and so on. These information are different in people's eyes. But for the computer, they are the same in memory, are expressed in binary form
in order to learn programming, we must understand binary, which is the basis of computer processing data
memory mole is a very precise component, which contains hundreds of millions of electronic components. They are very small, reaching the nanometer level. These components are actually circuits; The voltage of the circuit will change, either 0V or 5V, only these two kinds of voltage. 5V is power on, indicated by 1, 0V is power off, indicated by 0. Therefore, a component has two states, 0 or 1
if we control the power on and power off of these components through the circuit, we will get many combinations of 0 and 1. For example, 8 components have 28 = 256 different combinations, 16 components have 216 = 65536 different combinations. Although a component can only represent two values, many values can be represented by combining multiple values
we can give specific meaning to each combination. For example, we can use 1101000, 00011100, 11111111, 00000000, 01010101, 10101010 to represent C, language, speech, Chinese, text and Internet respectively. Then, combined with 1101000, 00011100, 11111111, 00000000, 01010101 and 10101010, we can mean "C language Chinese network"
in general, we don't use components one by one, but take 8 components as a unit. Even if it represents a very small number, such as 1, we need 8 components, that is, 00000001
one component is called 1 bit or 1 bit, eight components are called 1 byte, then 16 components are 2byte, 32 components are 4byte, and so on:
8 × 1024 components is 1024byte, short for 1KB< br />8 × one thousand and twenty-four × 1024 components is 1024KB, abbreviated as 1MB< br />8 × one thousand and twenty-four × one thousand and twenty-four × 1024 components is 1024MB, short for 1GB
now, you know how many components there are in 1GB memory. This is what we usually mean by the file size of KB and MB
unit conversion:
1byte = 8 bit
1KB = 1024byte = 210byte
1MB = 1024KB = 220byte
1GB = 1024MB = 230byte
1TB = 1024gb = 240byte
1PB = 1024tb = 250byte
1eb = 1024pb = 260byte
when we use computers, we usually only design KB, MB, GB and TB units, Pb and EB, two advanced units, are generally used in big data processing
you see, there are no characters like ABC in memory, no pictures like GIF and JPG, only 0 and 1, and the computer only knows 0 and 1. Therefore, the computer uses the binary system instead of the decimal system that we are familiar with. The data written into the memory will be converted into the combination of 0 and 1.
in order to learn programming, we must understand binary, which is the basis of computer processing data
memory mole is a very precise component, which contains hundreds of millions of electronic components. They are very small, reaching the nanometer level. These components are actually circuits; The voltage of the circuit will change, either 0V or 5V, only these two kinds of voltage. 5V is power on, indicated by 1, 0V is power off, indicated by 0. Therefore, a component has two states, 0 or 1
if we control the power on and power off of these components through the circuit, we will get many combinations of 0 and 1. For example, 8 components have 28 = 256 different combinations, 16 components have 216 = 65536 different combinations. Although a component can only represent two values, many values can be represented by combining multiple values
we can give specific meaning to each combination. For example, we can use 1101000, 00011100, 11111111, 00000000, 01010101, 10101010 to represent C, language, speech, Chinese, text and Internet respectively. Then, combined with 1101000, 00011100, 11111111, 00000000, 01010101 and 10101010, we can mean "C language Chinese network"
in general, we don't use components one by one, but take 8 components as a unit. Even if it represents a very small number, such as 1, we need 8 components, that is, 00000001
one component is called 1 bit or 1 bit, eight components are called 1 byte, then 16 components are 2byte, 32 components are 4byte, and so on:
8 × 1024 components is 1024byte, short for 1KB< br />8 × one thousand and twenty-four × 1024 components is 1024KB, abbreviated as 1MB< br />8 × one thousand and twenty-four × one thousand and twenty-four × 1024 components is 1024MB, short for 1GB
now, you know how many components there are in 1GB memory. This is what we usually mean by the file size of KB and MB
unit conversion:
1byte = 8 bit
1KB = 1024byte = 210byte
1MB = 1024KB = 220byte
1GB = 1024MB = 230byte
1TB = 1024gb = 240byte
1PB = 1024tb = 250byte
1eb = 1024pb = 260byte
when we use computers, we usually only design KB, MB, GB and TB units, Pb and EB, two advanced units, are generally used in big data processing
you see, there are no characters like ABC in memory, no pictures like GIF and JPG, only 0 and 1, and the computer only knows 0 and 1. Therefore, the computer uses the binary system instead of the decimal system that we are familiar with. The data written into the memory will be converted into the combination of 0 and 1.
4. All kinds of data, such as video, audio, etc., are converted into 0, 1 digital form and stored on the disk··
5. Database is a file system, which can export data to specified format
6. The total capacity of the disk is (n-1) * n, n is the number of disks. At least 3 hard disks are needed to make RAID5
7. elect语句查询出来给一个参数啊 create or replace procere show_tab As v_tab Varchar2(200); begin select table_name Into v_tab from user_tables; dbms_output.put_line(v_tab); end; 如果是多个个值就得用游标了
8. The storage files of the database are stored on the hard disk in 8K pages http://blog.csdn.net/feixianxxx/archive/2010/01/24/5249919.aspx
9. Modeshape is a distributed, hierarchical, transactional, consistent data store. Support query, full text search, event, version control, reference and flexible dynamic architecture. It's very fast, highly available, highly scalable, 100% open source and written in Java. The client uses (jsr-283) standard Java API for content repository (aka, JCR) or rest API of modeshape, and can query content through JDBC and SQL
modeshape supports all features required by JCR 2.0:
repository acquisition
authentication
reading / navigation
query
export
node type discovery
permissions and capability checking
and most optional features of JCR 2.0:
Writing
Import
observation
workspace management
< br />access control management
versioning
locking
node type management
same-name siblings
orderable child nodes
shareable nodes
mix:etag , mix:created and mix:lastModified mixins With Autocreated properties
event journal (only in 4. X)
modeshape supports five query languages: the jcr-sql2 and jcr-jqom query languages defined in jsr-283, the XPath, jcr-sql query languages defined in JCR 1.0 (JSR-170), and a full text search engine like language
modeshape supports all features required by JCR 2.0:
repository acquisition
authentication
reading / navigation
query
export
node type discovery
permissions and capability checking
and most optional features of JCR 2.0:
Writing
Import
observation
workspace management
< br />access control management
versioning
locking
node type management
same-name siblings
orderable child nodes
shareable nodes
mix:etag , mix:created and mix:lastModified mixins With Autocreated properties
event journal (only in 4. X)
modeshape supports five query languages: the jcr-sql2 and jcr-jqom query languages defined in jsr-283, the XPath, jcr-sql query languages defined in JCR 1.0 (JSR-170), and a full text search engine like language
10. What is blob? Blob is the acronym of binary large object. It is a collection of binary data stored as a single entity in SQL server. Blobs are mainly used to store multimedia objects, such as images, videos and sounds, but they can also store programs and even code fragments.
Hot content
