'; break; default: $ unit = 'unknown unit';} return sprintf ('%. 2f ', $ B ). $ unit ;}}
Call:
echo formatSize('20667564');
The result is:
19.71MB
Note:
Here, the $ B parameter is a number in the unit of B, and $ times is used to identify the number of recursion of this function.
For the unit TB, PB, EB, and ZB that are not commonly used, refer to the following remarks (from the network ):
1 bit (this bit represents a binary number) 1 Byte (this word is also called "bit" but represents a he
sprintf ('%.2f ', $b). $unit;}}
Call:Copy the Code code as follows: Echo formatsize (' 20667564 ');The result is:
19.71MB
Description
Where the parameter $b is a number in B, $times is used to identify how many times the function is recursive.
The non-commonly used units TB, PB, EB, ZB please refer to the following notes (from the network):
1bit (this bit represents a binary number)1Byte (this word is also called "bit") but it represents a hexadecimal number.1b=1byte=8bit1 KB = 1024x768 B (kb-k
';
Switch ($ times ){
Case '0': $ unit = 'B'; break;
Case '1': $ unit = 'kb'; break;
Case '2': $ unit = 'mb'; break;
Case '3': $ unit = 'gb'; break;
Case '4': $ unit = 'tb'; break;
Case '5': $ unit = 'petab'; break;
Case '6': $ unit = 'EB '; break;
Case '7': $ unit = 'zb'; break;
Default: $ unit = 'unknown unit ';
}
Return sprintf ('%. 2f', $ B). $ unit;
}
}
Call:
The Code is as follows:Echo formatSize ('000000 ');
The result is:
19.71 MB
Note:
Here, the $ B parameter is a number in the uni
Exposure to computers all day, inevitably with a variety of measurement units to deal with, especially data, but you know bit, Byte, KB, GB, TB and so on all means how much data? Have you heard of EB, ZB, YB?
Bit (bit) is the initials of binary digit, the unit that measures information, and the smallest unit that represents the amount of content, only 0 or 12 binary states. 8 bits make up a byte (byte), can hold an English character, and a Chinese character requires two bytes of storage space,
)
Trillion
M (Mebibyte)
1 MB = KB, Million bytes
Thousand trillion
G (Gigabyte)
1 GB = 1024x768, 1 billion bytes, gigabytes
Too
T (Terabyte)
1 TB = 1024x768, trillion bytes, MBytes
Take
P (Petabyte)
1 PB = 1024x768 TB, petabyte bytes, Pat Byte
Ai
E (Exabyte)
1 EB = 1024x768 PB, exascale bytes, Ai byte
Ze
Z (Z
harqprocess number field)
(3) Each terabyte in space-division multiplexing has its own Rv/ndi purpose: to allow only one terabyte to be re-transmitted. That is, the 2 TB of empty division multiplexing is irrelevant, and when one of the terabytes fails, another successfully received TB does not need to be re-transmitted, and a successful TB harqprocess can be used for the next new pass. (upstream processing
ASM-scalability and limits [ID 370921.1]
ASM imposes the following limits:
(1) 63 disk groups in a storage system(2) 10,000 ASM disks in a storage system(3) 2 terabyte maximum storage for each ASM disk (the bug 6453944 allowed larger sizes, but that led to problems, see note 736891.1 "ORA-15196 with ASM disks larger than 2 TB ")(4) 40 exabyte maximum storage for each Storage System(5) 1 million files for each disk group(6) 2.4
bigfile tablespace is a tablespace with a single, but potentially very large (up to 4G blocks) data file. Traditional Smallfile tablespaces, in contrast, can contain multiple data files, and the files cannot be as large. The benefits of Bigfile tablespaces is the following:
A bigfile tablespace with 8K blocks can contain a + terabyte data file. A bigfile tablespace with 32K blocks can contain a, terabyte
MySQL Group takes the first few records of each group (rank) with group by and order byHttp://www.jb51.net/article/31590.htm--group The data of the row with the maximum (small) value by a fieldThe code is as follows:/**/--Create the table and insert the data:The code is as follows:Create TableTB (namevarchar(Ten), Valint, Memovarchar( -)) Insert intoTbValues('a',2,'A2 (second value of a)') Insert intoTbValues('a',1,'the first value of a a1--a') Insert intoTbValues('a',3,'the third value of th
. Yahoo! Opened an independent team to goug cutting specializing in the development of Hadoop.In January 2008, Hadoop became the top project for Apache. Hadoop was then successfully applied to other companies, including Last.fm, Facebook, the New York Times, and so on.In February 2008, Yahoo! announced that its search engine products were deployed on a Hadoop cluster with 10,000 cores.In April 2008, Hadoop broke the world record, known as the fastest system for sorting 1TB data. For a record of
Tags: Oracle training Oracle Tutorial Oracle video Oracle Video tutorial Oracle Database tutorialOracle Video Tutorial Goals Oracle Video tutorial, wind Brother this set of Oracle Tutorial training learning how Oracle database design an Rman backup strategy for a terabyte database, Rman Backup and recovery case-lost all files, lost individual data files, lost entire data and system table space, Loss of control files and parameter files, storage of c
") =1024MB, 1TB (Trillionbyte trillion bytes byte) =1024g B, where 1024=2^10 (2 of 10), 1PB (petabyte quadrillion byte) =1024TB, 1EB (exabyte Bai byte bytes) =1024pb, 1ZB (Zett Abyte 10 trillion byte ze byte) = 1024 EB, 1YB (yottabyte 100 million bytes) = 1024 ZB, 1BB (brontobyte 100 billion bytes) = 1024 YB.
Note: "Trillion" is a millions quantity unit.Attached: Full name and transliteration of the unit in the systemYotta, [Yao] it, Y. 10^21,Z
Computer storage unit bit (BIT) (binary digits): stores a bit of binary, that is, 0 or 1, the smallest storage unit. Byte: eight binary bits are one byte (B), the most common unit. That is, 1B (byte bytes) = 8 bit computer storage units are generally represented by B, kb, MB, GB, TB, Pb, EB, ZB, Yb, BB, the relationship between them is: 1 kb (kilobyte kilobytes) = 1024b, 1 MB (megabyte megabytes referred to as "megabytes") = 1024kb, 1 GB (gigabyte gigabytes, also known as "Gigabytes ") = 1024 MB
1bit=1 bit 2 binary information 1B (byte byte)1KB (kilobyte KB) =2 (Ten) b=1024b=2 (ten) B;1MB (Megabyte MBytes) =2 (Ten) kb=1024kb=2 B; equivalent to the content of a short story.1GB (Gigabyte gigabytes) =2 (mb=1024mb=2) B; the equivalent of a short story.1TB (Trillionbyte) =2 (gb=1024gb=2) B; equivalent to the music content of Beethoven's fifth movement Symphony.1PB (Petabyte) =2 (tb=1024tb=2) B; the equivalent of all the X-ray picture information in a large hospital.1EB (Exabyte-byte) =2 (pb=
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.