Pinned Loading
- https-record-generator
https-record-generator PublicAutomatically tries to detect and generate a fitting HTTPS record for any website.
HTML 1
- Formats a filesize into a human read...
Formats a filesize into a human readable format. First parameter is filesize in bytes, second parameter is the precision of the resulting float and the last parameter is the system (choose between 'decimal' aka SI-based or 'binary' based calculation). 1varformatFilesize=function(size,decimals,system){
2size=parseInt(size,10)
3if(!decimals&&decimals!==0)decimals=1
4if(!system)system='decimal'
5varfileSizes={
- Formats a filesize into a human read...
Formats a filesize into a human readable format. First parameter is filesize in bytes, second parameter is the precision of the resulting float and the last parameter is the system (choose between 'decimal' aka SI-based or 'binary' based calculation). 1enumFileSizeSystems{
2Decimal='decimal',
3Binary='binary',
4}5constformatFilesize=(size: number,decimals: number=1,system: FileSizeSystems=FileSizeSystems.Decimal): string=>{
- Formats a filesize into a human read...
Formats a filesize into a human readable format. First parameter is filesize in bytes, second parameter is the precision of the resulting decimal number and the last parameter is the system (choose between 'decimal' aka SI-based or 'binary' based calculation). 1publicenumFileSizeSystem{Decimal,Binary}
2publicstaticstringFormatFilesize(intSize){returnFormatFilesize(Size,1,FileSizeSystem.Decimal);}
3publicstaticstringFormatFilesize(intSize,intDecimals){returnFormatFilesize(Size,Decimals,FileSizeSystem.Decimal);}
4publicstaticstringFormatFilesize(intSize,FileSizeSystemSystem){returnFormatFilesize(Size,1,System);}
5publicstaticstringFormatFilesize(intSize,intDecimals,FileSizeSystemSizeSystem){
- Formats a filesize into a human read...
Formats a filesize into a human readable format. First parameter is filesize in bytes, second parameter is the precision of the resulting float and the last parameter is the system (choose between 'decimal' aka SI-based or 'binary' based calculation). 1<?php2functionformat_filesize($size, $decimals=1, $system='decimal') {
3$size = intval($size);
4$fileSizes = array(
5'decimal' => array('Byte', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'),
Something went wrong, please refresh the page to try again.
If the problem persists, check the GitHub status page or contact support.
If the problem persists, check the GitHub status page or contact support.
Uh oh!
There was an error while loading. Please reload this page.




