Size: a a a

2021 March 20

J

Jabascripter in fronteam.js
Геннадий Орешка
Хорошо, буду пытаться, если что можно задавать вопросы, где не понятно?
хорошо но не факт что сам отвечу)
источник

ГО

Геннадий Орешка... in fronteam.js
Jabascripter
хорошо но не факт что сам отвечу)
Спасибо, большое.
источник

.

. in fronteam.js
Геннадий Орешка
function duplicateEncode(word){
   let str = word.toLowerCase();
 let result = "";
 for (i = 0; i < str.length; i++) {
   if (str.charAt(i) == str.charAt(i + 1)) {
     result += ')';
   } else if (str.charAt(i) == str.charAt(1) && str.charAt(i) == str.charAt(3)) {
     result += ')';
   } else {
     result += '(';
   }

 }
 return result;
}
function duplicateEncode(word){
   return [...word.toLowerCase()].map((c, _, a) => a.indexOf(c) == a.lastIndexOf(c) ? '(' : ')' ).join('');
};
источник

.

. in fronteam.js
так как i мы не используем, можно просто _ поставить, говоря о том что нам этот параметр не нужен
источник

ГО

Геннадий Орешка... in fronteam.js
.
function duplicateEncode(word){
   return [...word.toLowerCase()].map((c, _, a) => a.indexOf(c) == a.lastIndexOf(c) ? '(' : ')' ).join('');
};
Спасибо
источник
2021 March 26

ГО

Геннадий Орешка... in fronteam.js
Добрый, день, друзья подскажите, пожалуйста, как решить такую задачу   Tower of Hanoi is famous mathematical puzzle of the 18th century. It consists of three rods and a number of disks of different sizes, which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape.

The objective of the puzzle is to move the entire stack to another rod, obeying the following simple rules:

Only one disk can be moved at a time.
Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod.
No larger disk may be placed on top of a smaller disk.
Your task is much easier than coming up with an algorithm that solves this puzzle :)

Implement the function calculateHanoi that accepts diskNumber and turnsSpeed parameters. diskNumber is a number of disks and turnsSpeed is the speed of moving discs (in turns per hour). Both parameters are numbers.

calculateHanoi function returns an object with 2 properties:

turns (minimum number of turns to solve the puzzle)
seconds (minimum number of seconds to solve the puzzle at a given turnsSpeed, seconds must be an integer, obtained from rounded down (floor) calculation result)
You don't need to validate parameters.

For example:

calculateHanoi(9, 4308) => { turns: 511, seconds: 427 }
источник

J

Jabascripter in fronteam.js
Геннадий Орешка
Добрый, день, друзья подскажите, пожалуйста, как решить такую задачу   Tower of Hanoi is famous mathematical puzzle of the 18th century. It consists of three rods and a number of disks of different sizes, which can slide onto any rod. The puzzle starts with the disks in a neat stack in ascending order of size on one rod, the smallest at the top, thus making a conical shape.

The objective of the puzzle is to move the entire stack to another rod, obeying the following simple rules:

Only one disk can be moved at a time.
Each move consists of taking the upper disk from one of the stacks and placing it on top of another stack or on an empty rod.
No larger disk may be placed on top of a smaller disk.
Your task is much easier than coming up with an algorithm that solves this puzzle :)

Implement the function calculateHanoi that accepts diskNumber and turnsSpeed parameters. diskNumber is a number of disks and turnsSpeed is the speed of moving discs (in turns per hour). Both parameters are numbers.

calculateHanoi function returns an object with 2 properties:

turns (minimum number of turns to solve the puzzle)
seconds (minimum number of seconds to solve the puzzle at a given turnsSpeed, seconds must be an integer, obtained from rounded down (floor) calculation result)
You don't need to validate parameters.

For example:

calculateHanoi(9, 4308) => { turns: 511, seconds: 427 }
function calculateHanoi(diskNumber,turnsSpeed){
 return {
   "turns" : 2**diskNumber-1,
   "seconds" : Math.floor(((2**diskNumber)-1) / turnsSpeed * 3600)
 }
}
источник

ГО

Геннадий Орешка... in fronteam.js
Jabascripter
function calculateHanoi(diskNumber,turnsSpeed){
 return {
   "turns" : 2**diskNumber-1,
   "seconds" : Math.floor(((2**diskNumber)-1) / turnsSpeed * 3600)
 }
}
Спасибо, большое
источник
2021 April 01

ГО

Геннадий Орешка... in fronteam.js
Друзья, подскажите, пожалуйста, как иконки привязываются к карте к определённому месту
источник

А

Антипов in fronteam.js
Геннадий Орешка
Друзья, подскажите, пожалуйста, как иконки привязываются к карте к определённому месту
Если карта и иконки это просто изображения, то иконки поверх карты с position: absolute + top, left для сдвига
источник

ГО

Геннадий Орешка... in fronteam.js
А как понять просто изображения или нет? При нажатии дожжён цвет меняться, но это можно просто картинку менять
источник

А

Антипов in fronteam.js
Геннадий Орешка
А как понять просто изображения или нет? При нажатии дожжён цвет меняться, но это можно просто картинку менять
Ну скрин я так понимаю с figma
источник

А

Антипов in fronteam.js
значит там просто картинки
источник

ГО

Геннадий Орешка... in fronteam.js
Антипов
Ну скрин я так понимаю с figma
Да
источник

А

Антипов in fronteam.js
да по клику можно просто изображение менять, как вариант
источник

А

Антипов in fronteam.js
Геннадий Орешка
А как понять просто изображения или нет? При нажатии дожжён цвет меняться, но это можно просто картинку менять
ну это же вам виднее, у вас тех. задание)
источник

А

Антипов in fronteam.js
Геннадий Орешка
А как понять просто изображения или нет? При нажатии дожжён цвет меняться, но это можно просто картинку менять
цвет чего?
источник

ГО

Геннадий Орешка... in fronteam.js
Блок Map
Иконки животных должны занимать свою позицию относительно карты.
При наведении на иконку животного должен появится тултип с названием животного, локация. Обязательно для 4х животных, упомянутых в дизайне. Для остальных нужно иконки сделать неинтерактивными. По желанию, можно добавить подходящее описание в тултип. — Тут в принципе ничего об этом не сказано
источник

А

Антипов in fronteam.js
Если ничего не сказано значит изображением )))
источник

ГО

Геннадий Орешка... in fronteam.js
Спасибо
источник