Skip to content

Instantly share code, notes, and snippets.

package timerexample;
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Observable;
import java.util.Observer;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
@bracco23
bracco23 / file-size.pipe.ts
Last active March 2, 2018 13:11 — forked from tnqsoft/human-file-size.pipe.ts
Angular 4 Human file size in English
import { Pipe, PipeTransform } from '@angular/core';
/*
* Convert bytes into largest possible unit.
* Takes an precision argument that defaults to 2.
* Usage:
* bytes | fileSize:precision
* Example:
* {{ 1024 | fileSize}}
* formats to: 1 KB