Skip to content

Instantly share code, notes, and snippets.

View Filimon4's full-sized avatar

Filmon Filimon4

  • Russia
View GitHub Profile
#include <iostream>
#include <vector>
#include <fstream>
#include <string>
std::vector<int> bubbleSort(std::vector<int> list) {
int listSize = list.size()-1;
if (listSize <= 1) return list;
for (int i = 0; i < listSize; i++) {
@Filimon4
Filimon4 / taskStandard.ts
Created April 25, 2024 10:20
Первый задача
function reverseTree(len: number) {
const stars = Array<number>(len).fill(0).map<number>((el, idx) => idx+1).reverse()
for (let row: number = 1; row < len * 2; row++) {
let offset: number = Math.abs((len - row)%len);
process.stdout.write(`${Array(offset).fill(" ").join('')}${Array(stars[offset]).fill("*").join(" ")}\n`)
}
}
reverseTree(5)
@Filimon4
Filimon4 / taskStar.ts
Created April 25, 2024 10:18
задача под звёздочкой
function square(bigX: number, bigY: number, smlX: number, smlY: number) {
const innerSquare = () => {
let square: string = ``
let part: string = `|${Array(smlX).fill("*").join('')}|`
for (let h: number = 0; h < smlY; h++) {
for (let bigW: number = 0; bigW < bigX; bigW++) {
process.stdout.write(part)
process.stdout.write("\t")
}
import { useMotionValue } from 'framer-motion';
import { animate } from 'framer-motion';
import { motion } from 'framer-motion'
import { useEffect } from 'react';
import useMeasure from 'react-use-measure';
const CarouselWords = () => {
return (
<div className="flex flex-col overflow-hidden">
<CarouselWord word={"Headless"} duration={40} />
@Filimon4
Filimon4 / .jsx
Created March 21, 2024 06:56
react infinity carousel
import { useTransform,motion,useAnimationFrame,useMotionValue } from 'framer-motion'
import { useRef } from 'react'
import logo1 from '../../../public/companies_img/logo1.svg'
import logo2 from '../../../public/companies_img/logo2.svg'
import logo3 from '../../../public/companies_img/logo3.svg'
import logo4 from '../../../public/companies_img/logo4.svg'
import logo5 from '../../../public/companies_img/logo5.svg'
import logo6 from '../../../public/companies_img/logo6.svg'
import logo7 from '../../../public/companies_img/logo7.svg'
@Filimon4
Filimon4 / Rectangle.jsx
Created January 15, 2024 12:54
It's a react component of my project
import React, { useEffect, useRef, useState } from "react";
import { Rect, Circle } from "react-konva";
const Rectangle = ({ width, height, x, y, ...props }) => {
const rect = useRef();
const [cords, setCords] = useState({
topLeft: { x: x, y: y },
topRight: { x: x + width, y: y },
bottomLeft: { x: x, y: y + height },
bottomRight: { x: x + width, y: y + height },