Skip to content

Instantly share code, notes, and snippets.

View MaximGordiyenko's full-sized avatar
🎯
Focusing

Maksym Gordiyenko MaximGordiyenko

🎯
Focusing
View GitHub Profile
@MaximGordiyenko
MaximGordiyenko / App.js
Created November 12, 2020 10:33
React Redux Thunk - fetch data use StackOverFlow API
import React, { Component } from "react";
import { connect } from "react-redux";
import { fetchStackOverFlowData } from './actions';
import Card from "./Card";
class App extends Component {
componentDidMount() {
this.props.onFetchStackOverFlowData();
}
@MaximGordiyenko
MaximGordiyenko / Closures.html
Created January 25, 2019 02:11
Closures, Замыкание
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Closures</title>
</head>
<body>
<button></button>
<button></button>
<button></button>
@MaximGordiyenko
MaximGordiyenko / Sprites-Football-Score.css
Created January 25, 2019 00:48
Sprites - its background image which consist of one big image. Спрат состит из одной большой картинки, что подставляется под поле
h1, h2 {
text-align: center;
}
h1:hover {
color: #55aacc;
}
/*Add image that consist with many different images and with transparent background - called "sprite"*/
.sprite {
@MaximGordiyenko
MaximGordiyenko / Equalizer.html
Created January 25, 2019 00:43
Equalizer, Эквалайзер
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Equalizer</title>
<link rel="stylesheet" href="equalizer.css">
</head>
<body>
<div class="blocks">
<ul>
@MaximGordiyenko
MaximGordiyenko / Countdown-Timer.html
Created January 24, 2019 23:35
Countdown specify date. Счетчик времени оставшегося до окончания указанной даты
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Timer</title>
<style>
div span:nth-of-type(1){
color: deeppink;
font-size: 5em;
}
@MaximGordiyenko
MaximGordiyenko / Rotate-Object-Use-Keyboard.html
Created January 24, 2019 23:15
Поворот объекта используется клавиша клавиатуры. Rotate object used keyboard key
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>KeyRotate</title>
</head>
<body>
<h1>Поворачивание квадрата срелками: < и ></h1>
<div></div>
<script src="keyRotate.js"></script>
@MaximGordiyenko
MaximGordiyenko / Coordinate-OF-Cursor.html
Created January 24, 2019 23:12
отслеживать координаты мыши. track mouse coordinate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>event handler - mouse move</title>
</head>
<body>
<div id="log"></div>
<div id="reg"></div>
<script>
@MaximGordiyenko
MaximGordiyenko / Move-Object-By-Keyboard.html
Created January 24, 2019 23:10
Поворачивают обьект за чисовой и против чисовой используя стрелки на клавиатуре. Rotate an object clockwise or counterclockwise using the arrows on the keyboard.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>move object by keyboard</title>
<style>
div {
width: 30px;
height: 30px;
background: lightgreen;
@MaximGordiyenko
MaximGordiyenko / Object-Follow-By-Mouse.js
Last active January 24, 2019 23:07
Водим мышкой по екрану, а дивка двигается за мышкой, курсор по центру обьекта. We move the mouse on the screen and object follow by mouse.
//ДЗ-2: Водим мышкой по екрану, а дивка двигается за мышкой, курсор по центру обьекта
//Короче вариант
window.addEventListener('mousemove', mouseFollow);
function mouseFollow(event) {
let btn1 = document.querySelector("#btn1");
btn1.style.position = `absolute`;
btn1.style.background = `red`;
btn1.style.width = `30px`;
btn1.style.height = `30px`;
@MaximGordiyenko
MaximGordiyenko / Find-Number-Between-Specify-Arrange.js
Last active January 24, 2019 14:29
Определить количество натуральных чисел и интервала от 100 до 500 сума цифр которых равна 15. Determine the number of natural numbers and interval
//Определить количество натуральных чисел и интервала от 100 до 500 сума цифр которых равна 15
let res = 0;
let sum = 0;
let total = 0;
for (let i = 100; i < 500; i++) {
let x = Math.floor(i / 100);
// console.log(`x ${x}`);
let y = Math.floor(i / 10 % 10);