This file contains hidden or 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 <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++) { |
This file contains hidden or 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 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) |
This file contains hidden or 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 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") | |
} |
This file contains hidden or 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 { 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} /> |
This file contains hidden or 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 { 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' |
This file contains hidden or 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, { 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 }, |