Skip to content

Instantly share code, notes, and snippets.

View inomdzhon's full-sized avatar
🏠
Working from home

Inomdzhon Mirdzhamolov inomdzhon

🏠
Working from home
View GitHub Profile
const validateMethods = {
noMeta: function (arrayHashtag) {
return arrayHashtag.some((hashtag) => hashtag.trim() === '#');
},
countExceeded: function (arrayHashtag, maxCount) {
return arrayHashtag.length > maxCount;
},
lengthExceeded: function (arrayHashtag, maxLength) {
// other way
function isNumber(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57)) {
return false;
}
return true;
}
button,
html input[type="button"],
input[type="reset"] {
  border: none;
  -webkit-appearance: none;
  cursor: pointer;
}
button[disabled],
html input[disabled] {

Прелюдия

Назовём пакет example.

tsconfig.json

{
  "compilerOptions": {
    "baseUrl": "src",
 "jsx": "react",
// TODO check to `passive` param
function clearEventListener(target) {
var listeners = getEventListeners(target);
for (const key in listeners) {
if (!listeners.hasOwnProperty(key)) {
continue;
}
function collectIncorrectAnswersAndCopyToBuffer(withSpoiler) {
const elsList = document.querySelector('main > ol');
function getAnswerFromStorage(key) {
const value = localStorage.getItem(key);
if (!value) {
return 'Unknown';
}

Задание

Описание

Матрицу можно представить в виде двумерного списка. Например, список [[1, 2, 3], [4, 5, 6], [7, 8, 9]] — это отображение матрицы:

1 2 3
4 5 6
7 8 9

Android Studio emulator (Mac OS)

emulator-commandline documentation

For first download Android Studio.

Quick start

For start emulator

HOC typing

Typescript

function higherOrderFn<T extends (...args: any[]) => any>(fn: T): (...args: Parameters<T>) => ReturnType<T> {
  return (...args: Parameters<T>) => {
    return fn(args);
  };
}