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>Fill JavaScript Array #jsbench #jsperf</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
"G Specify a directory for plugins | |
" - For Neovim: stdpath('data') . '/plugged' | |
" - Avoid using standard Vim directory names like 'plugin' | |
call plug#begin('~/.vim/plugged') | |
" Make sure you use single quotes | |
Plug 'christianchiarulli/nvcode-color-schemes.vim' | |
Plug 'pangloss/vim-javascript' " JavaScript support | |
Plug 'leafgarland/typescript-vim' " TypeScript syntax |
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
/** | |
* для форматирования валюты | |
* @param n - число | |
* @param r - сколько знаков после запятой | |
*/ | |
export const fNumToStr = (n: number, r?: number): string => { | |
let resp = '0'; | |
if (r) { |
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 <iostream> | |
#include <windows.h> | |
void fFeel(int aMatrix[20][20]) | |
{ | |
for (int x = 0; x < 20; x++) | |
{ | |
for (int y = 0; y < 20; y++) | |
{ | |
aMatrix[x][y] = 0; |
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
process.env.TS_NODE_PROJECT = './tsconfig.json'; | |
import * as moment from 'moment' | |
import * as mocha from 'mocha'; | |
import { assert } from 'chai'; | |
import axios from "axios"; | |
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
<?php | |
class SeekableFileReader { | |
/* указатель на файл */ | |
private $handle; | |
/* длина файла (кол-во строк)*/ | |
private $fileLength = 0; | |
/* массив позиций для ф-и fseek() */ | |
private $seekArr = []; | |
/* текущая позиция */ |
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
-- таблица категорий | |
-- индексное поле только PRIMARY KEY | |
CREATE TABLE IF NOT EXISTS `category` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`title` varchar(50) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=0 DEFAULT CHARSET=utf8; | |
-- таблица лайков | |
-- индексное поле PRIMARY KEY |
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
<?php | |
/* тут подключения к базе и т.д. */ | |
/* лучше такую обработку делать на C++ */ | |
/* php будет трудно работать с памятью, может течь */ | |
class EmailData { | |
/* список доменов */ | |
/* $domain['gmail.com'] = 20; */ |
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 React, { Component } from 'react'; | |
import TextField from 'components/base/TextField'; | |
const WAIT_INTERVAL = 1000; | |
const ENTER_KEY = 13; | |
export default class TextSearch extends Component { | |
constructor(props) { | |
super(); |
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 interface Review { | |
id: number, | |
published: number, | |
date: string, | |
review: string, | |
user_img: string, | |
username: string | |
} | |