Skip to content

Instantly share code, notes, and snippets.

View prozoroff's full-sized avatar

Alex Prozorov prozoroff

  • Yaroslavl
View GitHub Profile
@import url("https://fonts.googleapis.com/css?family=Neucha|Cabin+Sketch&display=swap");
@import url("https://fonts.googleapis.com/css2?family=News+Cycle:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap");
.default {
font-family: Arial, Helvetica, sans-serif;
background: white;
color: rgb(73, 80, 87);
background: rgb(253, 253, 254);
}
This file has been truncated, but you can view the full file.
/*! For license information please see main.09104c93.js.LICENSE.txt */
(()=>{var e={5239:function(e){e.exports=function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var A in t=arguments[n])Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e},n.apply(this,arguments)};function r(e,t,n,r){function A(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{s(r.next(e))}catch(Mt){a(Mt)}}function o(e){try{s(r.throw(e))}catch(Mt){a(Mt)}}

Александр Прозоров

Россия, Ярославль, 150001
+7 (920) 108-22-96
alexprozoroff@gmail.com

Опыт

'use strict';
module.exports = particleFilter;
function nextDouble(maxValue, minValue) {
var max = maxValue || 1,
min = minValue || 0,
randomValue = Math.random();
if (!min) {
return randomValue * max;
}
@prozoroff
prozoroff / throttle.js
Created October 18, 2018 17:18
cancelable throttle function
const throttle = (func, ms) => {
let isThrottled = false,
savedArgs,
savedThis,
timeoutId;
const wrapper = function() {
if (isThrottled) {
@prozoroff
prozoroff / manachers.js
Last active October 17, 2018 12:46
Manacher's Algorithm
//transform N-character string into 2N+1 character one
//word => |w|o|r|d|
const interleave = str => `|${str.split('').join('|')}|`;
//return the result substring by the input string and calculated lengths
//canada, [0,1,0,1,0,3,0,1,0,3,0,1,0] -> ana
const getLongest = (str, pal) => {
//Maximum palindrome's length and index
const [length, index] = pal.reduce((max, x, i, arr) => x > arr[max[1]] ? [x, i] : max, [0, 0]),