Posted in AJAX, Artykuły, Ciekawostki, Frameworki JS, JavaScript, Kursy, Praktyka, Prototype JS, Teoria Tags: ajax, BOM, cross-browser, DOM, dziedziczenie, JS, przykłady, Template, zdarzenia Brak komentarzy Czytaj dalej
An iterator is invalidated only when the corresponding element is deleted.
Iterator jest unieważniany tylko wtedy, gdy odpowiadający mu element jest usuwany.
The primary purpose of an iterator is to allow a user to process every element of a container while isolating the user from the internal structure of the container.
Podstawowym celem iteratora jest pozwolić użytkownikowi przetworzyć każdy element w kolekcji bez konieczności zagłębiania się w jej wewnętrzną strukturę.
By using an iterator one is isolated from these sorts of consequences.
Użycie iteratora izoluje od tego rodzaju problemów.
This construction in loop is often used as an iterator in the algorithms using a list.
Taka konstrukcja w pętli jest często wykorzystywana jako iterator w algorytmach korzystających z list.
This function works like the Python function list, creating a copy of a sequence or materialzing an iterator.
Funkcja ta działa podobnie jak lista funkcji Pythona, tworzenia kopii sekwencji lub materialzing iterator.
For instance, once an iterator has advanced beyond the first element it may be possible to insert additional elements into the beginning of the container with predictable results.
Na przykład po przejściu za pierwszy element może on umożliwiać wstawianie nowych elementów na początek kolekcji z przewidywalnymi skutkami.
An iterator class is usually designed in tight coordination with the corresponding container class.
Klasa iteratora jest zwykle projektowana wraz z klasą odpowiadającej mu kolekcji i jest z nią ściśle powiązana.
An iterator can enforce additional restrictions on access, such as ensuring that elements cannot be skipped or that a previously visited element cannot be accessed a second time.
Iterator może nakładać dodatkowe ograniczenia na dostęp, np. uniemożliwiając pominięcie elementów lub powtórny dostęp do wcześniej odwiedzonych elementów.
There must also be a way to create an iterator so it points to some first element as well as some way to determine when the iterator has exhausted all of the elements in the container.
Musi także istnieć sposób utworzenia iteratora tak, by wskazywał na pierwszy element, oraz sposób określenia, kiedy iterator wyczerpał wszystkie elementy w kolekcji.
The difference between range and xrange is that the range function returns a new list with numbers of that specified range, whereas xrange returns an iterator, which is more efficient.
Różnica między nimi polega na tym, że range zwraca nową tablicę liczb zawartych w określonym przedziale, natomiast xrange zwraca pojedyńczą liczbę, co czyni ją w pętlach bardziej wydajną.
Conținut posibil inadecvat
Exemplele au rolul de a te ajuta să traduci cuvinte sau expresii corect si adaptat la context. Nu sunt selectate sau validate manual, așadar pot conține termeni inadecvați. Te rugăm să raportezi exemplele pe care le consideri inadecvate. Traducerile vulgare sau colocviale sunt în general marcate cu roșu sau cu portocaliu.
Înregistrează-te pentru a accesa mai multe exemple