diff --git a/_i18n/en.yml b/_i18n/en.yml index ef1ec3d..71f3764 100644 --- a/_i18n/en.yml +++ b/_i18n/en.yml @@ -87,7 +87,7 @@ sidebar: - pure_functions - closures - applying - - title: Gotchas + - title: "Gotchas" url: gotchas submenus: - surprising @@ -127,7 +127,7 @@ sidebar: - dynamic_dispatch - dynamic_method - dynamic_proxies - - title: Solid Principles + - title: "Solid Principles" url: solid_principles submenus: - single @@ -137,7 +137,7 @@ sidebar: - di - title: "Become Ruby Meister" url: ruby_meister - - title: Threads + - title: "Threads" url: threads submenus: - green @@ -163,19 +163,39 @@ pages: worst: "Worst" sorting: title: "Sorting" - description: "A sorting algorithm is an algorithm that puts elements of a list in a certain order. The most-used orders are numerical order and lexicographical order. Efficient sorting is important for optimizing the use of other algorithms (such as search and merge algorithms) which require input data to be in sorted lists; it is also often useful for canonicalizing data and for producing human-readable output." + description: "A sorting algorithm is an algorithm that puts elements of a list in a certain order. The most-used orders are numerical order and + lexicographical order. Efficient sorting is important for optimizing the use of other algorithms (such as search and merge algorithms) + which require input data to be in sorted lists; it is also often useful for canonicalizing data and for producing human-readable output." bubble_sort: title: "Bubble sort" - description: "Bubble sort has many of the same properties as insertion sort, but has slightly higher overhead. In the case of nearly sorted data, bubble sort takes O(n), but requires at least 2 passes through the data (whereas insertion sort requires something more like 1 pass)." + description: "Bubble sort has many of the same properties as insertion sort, but has slightly higher overhead. + In the case of nearly sorted data, bubble sort takes O(n), + but requires at least 2 passes through the data (whereas insertion sort requires something more like 1 pass)." insertion_sort: title: "Insertion sort" - description: "Although it is one of the elementary sorting algorithms with O(n2) worst-case time, insertion sort is the algorithm of choice either when the data is nearly sorted (because it is adaptive) or when the problem size is small (because it has low overhead). For these reasons, and because it is also stable, insertion sort is often used as the recursive base case (when the problem size is small) for higher overhead divide-and-conquer sorting algorithms, such as merge sort or quick sort." + description: "Although it is one of the elementary sorting algorithms with O(n2) worst-case time, + insertion sort is the algorithm of choice either when the data is nearly sorted (because it is adaptive) or when the problem size is small + (because it has low overhead). For these reasons, and because it is also stable, insertion sort is often used as the recursive base case + (when the problem size is small) for higher overhead divide-and-conquer sorting algorithms, such as merge sort or quick sort." selection_sort: title: "Selection Sort" - description: "From the comparison presented here, one might conclude that selection sort should never be used. It does not adapt to the data in any way (notice that the four animations above run in lockstep), so its runtime is always quadratic. However, selection sort has the property of minimizing the number of swaps. In applications where the cost of swapping items is high, selection sort very well may be the algorithm of choice." + description: "From the comparison presented here, one might conclude that selection sort should never be used. It does not adapt to + the data in any way (notice that the four animations above run in lockstep), so its runtime is always quadratic. However, selection + sort has the property of minimizing the number of swaps. In applications where the cost of swapping items is high, selection sort very + well may be the algorithm of choice." shell_sort: title: "Shell sort" - description: "The worst-case time complexity of shell sort depends on the increment sequence. For the increments 1 4 13 40 121 ...,which is what is used here, the time complexity is O(n32). For other increments, time complexity is known to be O(n43) and even O(n·lg2(n)). Neither tight upper bounds on time complexity nor the best increment sequence is known. Because shell sort is based on insertion sort, shell sort inherits insertion sort’s adaptive properties. The adaptation is not as dramatic because shell sort requires one pass through the data for each increment, but it is significant. For the increment sequence shown above, there are log3(n) increments, so the time complexity for nearly sorted data is O(n·log3(n)). Because of its low overhead, relatively simple implementation, adaptive properties, and sub-quadratic time complexity, shell sort may be a viable alternative to the O(n·lg(n)) sorting algorithms for some applications when the data to be sorted is not very large." + description: "The worst-case time complexity of shell sort depends on the increment sequence. For the increments 1 4 13 40 121 + ...,which is what is used here, the time complexity is O(n32). + For other increments, time complexity is known to be O(n43) + and even O(n·lg2(n)). Neither tight upper bounds on time complexity nor the best increment + sequence is known. Because shell sort is based on insertion sort, shell sort inherits insertion sort’s adaptive properties. + The adaptation is not as dramatic because shell sort requires one pass through the data for each increment, but it is significant. + For the increment sequence shown above, there are log3(n) + increments, so the time complexity for nearly sorted data is O(n·log3(n)). + Because of its low overhead, relatively simple implementation, adaptive properties, and sub-quadratic time complexity, + shell sort may be a viable alternative to the O(n·lg(n)) sorting algorithms for some applications when + the data to be sorted is not very large." heap_sort: title: "Heap sort" description: "Heapsort is simple to implement, performs an O(n·lg(n)) in-place sort, but is not stable. The first loop, the Θ(n) “heapify” phase, puts the array into heap order. The second loop, the O(n·lg(n)) “sort down” phase, repeatedly extracts the maximum and restores heap order. The sink function is written recursively for clarity. Thus, as shown, the code requires Θ(lg(n)) space for the recursive call stack. However, the tail recursion in sink() is easily converted to iteration, which yields the O(1) space bound. Both phases are slightly adaptive, though not in any particularly useful manner. In the nearly sorted case, the heapify phase destroys the original order. In the reversed case, the heapify phase is as fast as possible since the array starts in heap order, but then the sort down phase is typical. In the few unique keys case, there is some speedup but not as much as in shell sort or 3-way quicksort." diff --git a/_i18n/pl.yml b/_i18n/pl.yml index eb78da5..0113eac 100644 --- a/_i18n/pl.yml +++ b/_i18n/pl.yml @@ -1,19 +1,19 @@ head: - title: BetterDocs + title: "Podstawy Ruby" metatags: - description: Podstawowe programowanie z przykładami rubinów i referencjami. Obejmuje - wątki, zasady SOLID, wzorce projektowe, struktury danych, algorytmy. - keywords: Lepsze dokumenty, Ruby, Fundamentals, podstawy programowania Ruby. Ruby - gotchas, programowanie funkcjonalne, metaprogramowanie, wątki, solidne podstawy - Rubiego z przykładami, wzorce projektowe Rubiego z przykładami, algorytmy Rubiego - z przykładami, struktury danych Rubiego z przykładami. + description: "Podstawowe programowanie z przykładami ruby i referencjami. Obejmuje + wątki, zasady SOLID, wzorce projektowe, struktury danych, algorytmy." + keywords: "Lepsze dokumenty, Ruby, Fundamentals, podstawy programowania Ruby. Ruby + gotchas, programowanie funkcjonalne, metaprogramowanie, wątki, zasady SOLID + Ruby z przykładami, wzorce projektowe Ruby z przykładami, algorytmy Ruby + z przykładami, struktury danych Ruby z przykładami." content: menu: - open: Otwórz menu - close: Zamknij menu + open: "Otwórz menu" + close: "Zamknij menu" sidebar: - - title: Algorytmy + - title: "Algorytmy" url: algorithms submenus: - key: sorting @@ -29,7 +29,7 @@ sidebar: submenus: - binary_search - knuth_moriss_pratt_search - - title: Struktury danych + - title: "Struktury danych" url: data_structures submenus: - key: axioms @@ -54,7 +54,7 @@ sidebar: - b_tree - binary_heap - - title: Wzorce projektowe + - title: "Wzorce projektowe" url: design_patterns submenus: - key: creational @@ -84,13 +84,13 @@ sidebar: - strategy - template - visitor - - title: Programowanie funkcjonalne + - title: "Programowanie funkcjonalne" url: functional_programming submenus: - pure_functions - closures - applying - - title: Gotchas + - title: "Gotchas" url: gotchas submenus: - surprising @@ -122,25 +122,25 @@ sidebar: - private - braces - module - - title: Pytania do wywiadu + - title: "Pytania do rozmów kwalifikacyjnych" url: interview_questions - - title: Meta programowania + - title: "Meta programowanie" url: meta_programming submenus: - dynamic_dispatch - dynamic_method - dynamic_proxies - - title: Solidne zasady + - title: "Zasady solid" url: solid_principles submenus: - single - open_close - liskov - - segregation + - segregation - di - - title: Zostań Ruby Meister + - title: "Zostań Ruby Meister" url: ruby_meister - - title: Wątki + - title: "Wątki" url: threads submenus: - green @@ -151,44 +151,44 @@ sidebar: - config pages: - wiki: Czytaj wiki - credits: Kredyty + wiki: "Czytaj wiki" + credits: "Credits" page404: - title: Strona nie znaleziona :( - description: Żądana strona nie została znaleziona. + title: "Strona nie znaleziona :(" + description: "Żądana strona nie została znaleziona." page500: - title: "Something was going wrong :(" + title: "Coś poszło nie tak :(" algorithms: - title: Algorytmy + title: "Algorytmy" complexity: - best: Najlepiej - average: Średni - worst: Najgorszy + best: "Najlepiej" + average: "Średnio" + worst: "Najgorzej" sorting: - title: Sortowanie - description: Algorytm sortowania to algorytm, który umieszcza elementy listy w - określonej kolejności. Najczęściej używane zamówienia to porządek liczbowy i + title: "Sortowanie" + description: "Algorytm sortowania to algorytm, który umieszcza elementy listy w + określonej kolejności. Najczęściej stosowane to porządek liczbowy i porządek leksykograficzny. Efektywne sortowanie jest ważne dla optymalizacji wykorzystania innych algorytmów (takich jak algorytmy wyszukiwania i scalania), które wymagają danych wejściowych do posortowania list; jest również często - przydatna do kanonalizacji danych i do generowania danych czytelnych dla człowieka. + przydatna do kanonalizacji danych i do generowania danych czytelnych dla człowieka." bubble_sort: - title: Sortowanie bąbelkowe - description: Sortowanie bąbelkowe ma wiele takich samych właściwości jak sortowanie - wstawiania, ale ma nieco wyższy narzut. W przypadku prawie posortowanych danych - sortowanie bąbelkowe zajmuje O(n) , - ale wymaga co najmniej 2 przebiegów przez dane (podczas sortowania wstawiania - wymaga czegoś więcej niż 1 podanie). + title: "Sortowanie bąbelkowe" + description: "Sortowanie bąbelkowe ma wiele takich samych właściwości jak sortowanie + przez wstawianie, ale ma nieco wyższy koszt eksploatacji. W przypadku prawie posortowanych danych + sortowanie bąbelkowe zajmuje O(n), + ale wymaga co najmniej dwukrotnego przekazania danych (podczas gdy sortowanie przez wstawianie + wymaga raczej jednego przekazu)." insertion_sort: - title: Sortowanie przez wstawianie - description: Chociaż jest to jeden z podstawowych algorytmów sortowania o najgorszym - możliwym czasie O(n2) , sortowanie - wtrąceniowe jest algorytmem z wyboru, gdy dane są prawie posortowane (ponieważ + title: "Sortowanie przez wstawianie" + description: "Chociaż jest to jeden z podstawowych algorytmów sortowania o najgorszym + możliwym czasie O(n2), sortowanie + przez wstawianie jest podstawowym wyborem, gdy dane są prawie posortowane (ponieważ są adaptacyjne) lub gdy rozmiar problemu jest mały (ponieważ ma niski narzut). - Z tych powodów, a także dlatego, że jest również stabilny, sortowanie wstawiania + Z tych powodów, a także dlatego, że jest również stabilny, sortowanie przez wstawianie jest często używane jako rekurencyjny podstawowy przypadek (gdy rozmiar problemu - jest mały) dla wyższych algorytmów sortowania dziel i przegrywaj, takich jak - sortowanie scalone lub sortowanie szybkie. + jest mały) dla wyższych algorytmów sortowania dziel i rządź, takich jak + sortowanie scalone lub sortowanie szybkie." selection_sort: title: Wybór Sortuj description: Z przedstawionego tu porównania można wyciągnąć wniosek, że nigdy @@ -199,7 +199,7 @@ pages: wymiany przedmiotów jest wysoki, wybór sortowania bardzo dobrze może być wybranym algorytmem. shell_sort: - title: Sortowanie za pomocą powłoki + title: "Sortowanie Shella" description: Najgorsza złożoność czasu sortowania powłoki zależy od sekwencji przyrostu. Dla odstępach co 1 4 13 40 121 ..., która jest, co jest tutaj używany, złożoność czas O(n3/2) @@ -219,7 +219,7 @@ pages: class="code-inline">O(n·lg(n)) dla niektórych aplikacji, gdy dane do posortowania są niezbyt duże. heap_sort: - title: Sortowanie sterty + title: "Sortowanie stogowe" description: Sortowanie sterty jest prosty w implementacji, wykonuje sortowanie w miejscu O(n·lg(n)) , ale nie jest stabilny. Pierwsza pętla, faza Θ(n) "scalify", umieszcza diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 1e2a322..b1d9b4a 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -65,7 +65,7 @@ "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", "dev": true, "requires": { "sprintf-js": "~1.0.2" @@ -544,7 +544,7 @@ "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha1-E7BM2z5sXRnfkatph6hpVhmwqnE=", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, "esquery": { @@ -870,9 +870,9 @@ "dev": true }, "js-yaml": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.0.tgz", - "integrity": "sha1-6u1lbsg0TxD1J8a/obbiJE3hZ9E=", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", + "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", "dev": true, "requires": { "argparse": "^1.0.7", @@ -932,9 +932,9 @@ } }, "lodash": { - "version": "4.17.11", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", - "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", "dev": true }, "lru-cache": {