Toggle navigation shitcode
  • Latest
  • Browse
  • Top
  • Worst
  • Add
  • All 400
  • ActionScript 2
  • Bash 6
  • Brainfuck 1
  • LSL 19
  • C++ 24
  • C# 48
  • CSS 4
  • Pascal 1
  • Django 1
  • Erlang 1
  • GLSL 1
  • Go 6
  • Groovy 1
  • HTML 8
  • Java 63
  • JavaScript 79
  • Less 1
  • Lua 1
  • Nix 1
  • Obj-C 3
  • OCaml 1
  • PHP 64
  • PowerShell 1
  • Python 40
  • Ruby 2
  • Scala 3
  • SQL 6
  • Swift 4
  • TypeScript 6
  • VBScript 2
#806 Who needs build in functions for converting to GB when you can divide three times? PowerShell -1
$MaxSizeGB = [math]::Round($MaxSize/1024/1024/1024,2)
Write-Output "    the maximum size is $MaxSizeGB GB"

At least [math] is used. So close, and yet so far...

Comments
By Anonymous, 2020-04-03 20:59:34

© Shitcode.net 2021, Powered by Yii Framework

GitHub • About • Admin