How to Use Array.fill for Quick Init
fill(value). Mutates. Or Array(n).fill(0).

How to Use Array.fill for Quick Init
fill(value). Mutates. Or Array(n).fill(0).

Поиск в коллекциях или когда O(N) быстрее O(1)
На собеседованиях мы слышим или говорим сами, что поиск в массиве медленнее, чем в хеш-таблице. Кто-то даже вспоминает, что поиск в массиве имеет линейную сложность или O(n), а в хеш-таблице — константную O(1). Но работает ли это на практике? Что, если есть ситуации, когда поиск в массиве оказывается быстрее? Давайте не будем торопиться с выводами.
🇺🇸: You can listen to the video in English through the video settings panel. With version 5 of Blender the Array modifier has been completely renewed. I analyze it in detail.
https://youtu.be/yF09o_vxi5Q?si=i_mU9web4Wxvn6m7
#blender
#modifiers
#mazhuka
#israelcantillo
#b3d
#tutorial3d
#blendertutorial
#modeling3D
#array

How to Create Arrays From Ranges
Array.from with map. No loop. Generate 1-10 instantly.
#javascript #array.from #range #howto

I also added first?, more? and last? as functions defined inside each? for the purposes of being able to format playground output more easily, but also so that "print in a loop" can work more nicely w/o having to use Array's join.
#array: module/extend[
Playground/dump: fn[
Playground .[
you each[
first?[ "/#[ " dump/string ]
dump more?[ ", " dump/string ]
last?[ " ]" dump/string ]
]
]
]
]
^ this is the code that's motivated this batch of changes. Takes me from an awkward "dump array like an object (which honestly kinda sucks)" to "Dump array as it's own literal", which I like quite a bit.
And I like more? as a way to do join-like things.
How to Stop Array includes From Failing on NaN
indexOf misses NaN but includes finds it.

Долгожданный оператор _Countof
Одно из недооценённых событий уходящего года деревянной змеи - в проекте стандарта языка С появился оператор числа элементов. Как заметил один мудрый товарищ, Алексей Годин, даже полвека ещё не прошло, а наконец, дождались.
Los arrays en Go parecen simples, pero esconden decisiones de diseño importantes. En este artículo te explico cómo se usan y qué debes tener en cuenta al trabajar con ellos.