Похожие чаты

Do you include your parameter names in your function names? I

am struggling to name a function that counts events keyed by their type for a specific device (by id).
Suggestions for better names:
* countEventsByTypeByDevice
* getEventCountsByDevice
* getEventTypeCountsByDevice

8 ответов

7 просмотров

gerEvents().countBy(some fn)

Misan- Автор вопроса
Wojciech Pawlik
gerEvents().countBy(some fn)

In reality, what this does is it does select sum(id) from events where type = 'error' So splitting in such a manner does not really help

What are the arguments to this function?

Misan- Автор вопроса
Thomas
What are the arguments to this function?

the id of a device. types are all provided within the function.

Misan
the id of a device. types are all provided within ...

Ahh, right, it returns a table of types?

Misan- Автор вопроса
Thomas
Ahh, right, it returns a table of types?

it returns an object keyed by the event type and with the value of amount of events for this type

Misan
it returns an object keyed by the event type and w...

yeah, that's what I meant heh, it's hard to say this

Похожие вопросы

Обсуждают сегодня

а зачем этот вопрос для удаления из чата?
Mёdkinson Medvezhkin
63
Есть рассчет для Таллинна? https://x.com/dr_enderlin/status/1784581592003850496
Vladimir Ivanov
23
Добрый день. Хочу сделать отрисовку по команде на панели. Почему-то рисуется только при втором вызове. С чем может быть связано, не подскажете? procedure TForm1.FormDblClick(...
Kirill Filippenok
20
Any dog on Fantom ?
Bitcoin Magic
19
Добрый день Как поставить vscode из флэтпака как дефолтный редактор в filezilla?
Daniel
18
using next image component with s3 image: "url" parameter is valid but upstream response is invalid code: <Image fill src={s...
Fasil
3
Интересно, а в чём прикол мак оси?
Лисицка
16
Whatever happened with the one way bridge to AVAX? Was there ever any volume from that? BASED team never really provided any update
John Doe 52
33
Всем доброго дня! Подскажите может кто использовал связку Pagebuilder + Clientsetting. Сами параметры с типом pagebuilder в модуле Clientsetting работают нормально, можно такж...
Александр Добриков
12
Tax his land, Tax his bed, Tax the table At which he's fed. Tax his work, Tax his pay, He works for peanuts Anyway! Tax his cow, Tax his goat, Tax his pants, Tax his coat....
Forge
5
Карта сайта