This file contains 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 { | |
Directive, | |
ElementRef, | |
forwardRef, | |
HostListener, | |
Renderer2, | |
} from '@angular/core'; | |
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms'; | |
@Directive({ |
This file contains 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, Provider } from '@angular/core'; | |
import { | |
HTTP_INTERCEPTORS, | |
HttpErrorResponse, | |
HttpEvent, | |
HttpHandler, | |
HttpHeaders, | |
HttpInterceptor, | |
HttpParams, | |
HttpRequest, |
This file contains 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
<html> | |
<head> | |
<title>Web3 Metamask Login</title> | |
<link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet"> | |
</head> | |
<body class="flex w-screen h-screen justify-center items-center"> | |
<div class="flex-col space-y-2 justify-center items-center"> | |
<button id='loginButton' onclick="" class="mx-auto rounded-md p-2 bg-purple-500 text-white"> |
This file contains 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
# Language support for dates ESPAÑOL | |
# https://github.com/jenssegers/date | |
composer require jenssegers/date | |
# Debug bar | |
# https://github.com/barryvdh/laravel-debugbar | |
composer require barryvdh/laravel-debugbar --dev | |
# Populate factories from models | |
# https://github.com/coderello/laravel-populated-factory |
This file contains 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
formatDate(_date: Date, separator = '/') { | |
const day = _date.getDate(); | |
const month = _date.getMonth() + 1; | |
const year = _date.getFullYear(); | |
if (month < 10) { | |
return `${day}${separator}0${month}${separator}${year}`; | |
} else { | |
return `${day}${separator}${month}${separator}${year}`; | |
} |
This file contains 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
export function getDistanceFromLocationsInKm( | |
latStart: number, | |
longStart: number, | |
latEnd: number, | |
longEnd: number | |
): number { | |
const R = 6371; // Radius of the earth in km | |
const dLat = _deg2rad(latEnd - latStart); | |
const dLong = _deg2rad(longEnd - longStart); | |
const a = |
This file contains 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
{ | |
"21_WATCHING": { | |
"predominant": "Beta", | |
"responding_ratio": 1.299, | |
"preparation_ratio": 1.372 | |
}, | |
"21_RESPONDING": { | |
"predominant": "Alpha", | |
"responding_ratio": 1.565, | |
"preparation_ratio": 1.372 |
This file contains 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
try { | |
$rows = Excel::toArray(new ResultsImport, $csvFile); | |
// $rows = $results[0]; | |
$rowsCount = count($rows); | |
$baseline_rows = 0; | |
$baseline_alphasum = 0; | |
$baseline_betasum = 0; | |
$tempArray = array(); |
This file contains 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
var debug = process.env.NODE_ENV !== "production"; | |
var webpack = require('webpack'); | |
module.exports = { | |
context: __dirname, | |
devtool: debug ? "inline-sourcemap" : null, | |
entry: "./js/scripts.js", | |
output: { | |
path: __dirname + "/js", | |
filename: "scripts.min.js" |
This file contains 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
function readURL(input) { | |
if (input.files && input.files[0]) { | |
var reader = new FileReader(); | |
reader.onload = function(e) { | |
$('#preview').attr('src', e.target.result); | |
} | |
reader.readAsDataURL(input.files[0]); | |
} |
NewerOlder