This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 25_403 -> 25.4B | |
| // 255_113 -> 255.1B | |
| // 2_013 -> 2B | |
| // 1_350_413 -> 1.4M | |
| // 1_000 -> 1B | |
| // 999 -> 999 | |
| func FormatNumbers(number float64) string { | |
| unit := "" | |
| num := number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import ( | |
| "fmt" | |
| "strconv" | |
| ) | |
| // 6543 -> 6.543 (dot separator) | |
| // 10000 -> 10.000 | |
| func FormatNum(num int, separator string) string { | |
| if num <= 1000 || separator == "" { | |
| return strconv.Itoa(num) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Injectable } from "@angular/core"; | |
| import { environment } from "../../../environments/environment"; | |
| import axios, { AxiosInstance } from 'axios'; | |
| interface JSONResponse<T> { | |
| success: boolean, | |
| data?: T | |
| error?: any | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="item html"> | |
| <h2>{{i}}</h2> | |
| <svg width="160" height="160" xmlns="http://www.w3.org/2000/svg"> | |
| <g> | |
| <title>Layer 1</title> | |
| <circle id="circle" [ngStyle]="{'stroke-dashoffset': strokeDashOffset, 'stroke': strokeColor}" class="circle_animation" r="69.85699" cy="81" cx="81" stroke-width="8" fill="none"/> | |
| </g> | |
| </svg> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .item { | |
| position: relative; | |
| float: left; | |
| } | |
| .item h2 { | |
| text-align: center; | |
| position: absolute; | |
| line-height: 125px; | |
| width: 100%; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit, Input } from '@angular/core'; | |
| @Component({ | |
| selector: 'circle-countdown', | |
| templateUrl: './circle-countdown.component.html', | |
| styleUrls: [ './circle-countdown.component.css' ], | |
| }) | |
| export class CircleCountdownComponent implements OnInit { | |
| @Input() time: number; | |
| @Input() strokeColor: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| After you have changed the settings at "Your code goes here", | |
| run this with one of these options: | |
| "grunt" alone creates a new, completed images directory | |
| "grunt clean" removes the images directory | |
| "grunt responsive_images" re-processes images without removing the old ones | |
| */ | |
| module.exports = function(grunt) { |