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
#include <stdio.h> | |
#include <stdlib.h> | |
struct course { | |
int mark; | |
char subject[30]; | |
} mark; | |
struct course *ptr; // we don't allocate memory at that point because we don't know amount yet | |
int numberOfRecords; |
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
Необходимые максимальные показатели (wi-fi, 200 mb/s, октябрь 2020): | |
Desktop: | |
1. FCP - 0.6s | |
2. Time To Interactive - 1.9s | |
3. Speed Index - 1.2s | |
4. LCP - 0.8s | |
5. CLS - 0.001s | |
6. Total Blocking Time - 0.1s | |
7. DomContentLoaded - 1.5s |
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 default class Storage { | |
static get(key) { | |
const value = localStorage.getItem(key); | |
if (!value) return undefined; | |
try { | |
return JSON.parse(value); | |
} catch { | |
localStorage.removeItem(key); | |
return undefined; | |
} |
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
async function tryAsyncUntilOk(func, times = 4, timeout = 1250) { | |
function delay(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
for (let i = 0; i < times; i++) { | |
try { | |
const res = await func(); | |
if (typeof res !== "undefined") { | |
return res; |
OlderNewer