Skip to content

Instantly share code, notes, and snippets.

Avatar
😉
On vacation

Viktor Knyazik01

😉
On vacation
View GitHub Profile
View main.dart
import 'dart:async';
import 'dart:convert';
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
void sortList(list) {
return list.sort((a, b) => a.toString().compareTo(b.toString()));
}
View Lesson 1. BinaryGap
function solution(N) {
Numb = String(N.toString(2));
N = 0;
var m1 = Numb.indexOf('1', 0);
var count = 0;
var pos = Numb.indexOf('1');
var m2 = 0;
View idea. html
But
<input type="button">
cursor: pointer;
https://www.w3schools.com/tags/tag_input.asp
@Knyazik01
Knyazik01 / all.html
Last active Aug 15, 2019
Rating Point Callculator
View all.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Ratig calc by V_Kn</title>
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="js/script.js">
<link href="https://fonts.googleapis.com/css?family=Dancing+Script&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Indie+Flower&display=swap" rel="stylesheet">
View index1.html
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<script>
function addClass(obj, cls) {
var classes = obj.className ? obj.className.split(' ') : [];
View 2-1findPrimes.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>findPrimes(a, b)</title>
</head>
<script>
function findPrimes(min, max) {
var sieve = [], i, j, primes = [], ans = [];
View 00.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Завдання 0</title>
</head>
<script>
function pow(x, n) {
var result = 1;
for (var i = 0; i < n; i++) {
@Knyazik01
Knyazik01 / 155.py
Last active Feb 9, 2019
Идея: создание строки, путем перебора символов исходной строки и счетчика, затем сравнение длин полученой и исходной строк и выводом кратчайшей.
View 155.py
##155 Python https://tgraph.io/Anons-155-Algoritm-szhatiya-RLE-02-05
string = str(input('Введите строку: '))
string += ' '
string2 = ''
j = 1
for i in range(len(string)):
if i == len(string) - 1:
break
else:
if string[i] == string[i+1]: