-
VISIONSBOX GmbH
- Offenburg, Germany
- http://www.offen-siv.de/
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). 1var formatFilesize = function (size, decimals, system) {
2size = parseInt(size, 10)
3if (!decimals && decimals!==0) decimals = 1
4if (!system) system = 'decimal'
5var fileSizes = {
-
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). 1enum FileSizeSystems {
2Decimal = 'decimal',
3Binary = 'binary',
4}
5const formatFilesize = (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). 1public enum FileSizeSystem { Decimal, Binary }
2public static string FormatFilesize (int Size) { return FormatFilesize(Size, 1, FileSizeSystem.Decimal); }
3public static string FormatFilesize (int Size, int Decimals) { return FormatFilesize(Size, Decimals, FileSizeSystem.Decimal); }
4public static string FormatFilesize (int Size, FileSizeSystem System) { return FormatFilesize(Size, 1, System); }
5public static string FormatFilesize (int Size, int Decimals, FileSizeSystem SizeSystem) {
-
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<?php
2function format_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.