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 url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap'); | |
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,700&display=swap'); | |
body { | |
--inter: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | |
--ibm-plex-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; | |
font-family: var(--inter); | |
} | |
/* The title */ | |
[class^='EditableTitle__Title'] { |
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
[ | |
{ | |
"name": "Assistix", | |
"manager": "Fuelton", | |
"cagr": 3.720808713691426, | |
"createdDate": 1586810446274, | |
"avatar": "https://picsum.photos/id/133/200", | |
"volatility": "high", | |
"minInvestmentAmount": 49162.31361884028, | |
"description": "Lorem tempor consectetur minim laboris incididunt adipisicing voluptate Lorem ut eiusmod.", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Filtering vs Splicing</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
{ | |
"name": "Issues", | |
"children": [ | |
{ | |
"name": "Word 1", | |
"children": [ | |
{ | |
"value": 8052, | |
"name": "Word 1" | |
}, |
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 Vue from 'vue'; | |
import VueApollo from 'vue-apollo'; | |
import { | |
createApolloClient, | |
restartWebsockets | |
} from 'vue-cli-plugin-apollo/graphql-client'; | |
import ApolloClient from 'apollo-client'; | |
import { InMemoryCache } from 'apollo-cache-inmemory'; | |
import { SubscriptionClient } from 'subscriptions-transport-ws'; | |
import router from '@/router'; |
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
// Updated on 16th May, 2024 based on @chamie's suggestion. | |
const response = await fetch("http://path/to/audio.wav"); | |
const data = await response.arrayBuffer(); | |
const blob = new Blob([data], { type: "audio/wav" }); | |
const blobUrl = URL.createObjectURL(blob); | |
const audio = new Audio(); | |
audio.src = blobUrl; | |
audio.controls = true; | |
document.body.appendChild(audio); |
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 flatten(array) { | |
return array.reduce( (acc, e) => { | |
if(Array.isArray(e)) { | |
// if the element is an array, fall flatten on it again and then take the returned value and concat it. | |
return acc.concat(flatten(e)); | |
} else { | |
// otherwise just concat the value. | |
return acc.concat(e); | |
} | |
}, [] ) // initial value for the accumulator is [] |
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 quickSort(array, left = 0, right = array.length - 1) { | |
console.log("CALLED"); | |
let partitionIndex; | |
let pivotIndex; | |
if(left < right) { | |
pivotIndex = right; | |
partitionIndex = partition(array, left, right, pivotIndex); | |
quickSort(array, left, partitionIndex - 1); | |
quickSort(array, partitionIndex + 1, right); | |
} |
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
<!-- <div class="date-range"> | |
<div class="date-range__presets"> | |
<button #presetsTrigger | |
mat-raised-button | |
[matMenuTriggerFor]="presetMenu" | |
(click)="$event.stopPropagation()">{{selectedPreset.name}} | |
<mat-icon>arrow_drop_down</mat-icon> | |
</button> | |
<mat-menu #presetMenu="matMenu" | |
[overlapTrigger]="false"> |
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
@Effect({dispatch: false}) | |
entityCreationSuccess$: Observable<Action> = this.actions$.pipe( | |
ofType(UserActions.CREATE_USER_SUCCESS, PostActions.CREATE_POST_SUCCESS), | |
tap(action => { | |
this.router.navigate(['../'], {relativeTo: this.route}) | |
}) | |
); |
NewerOlder