$ python3 generate_grid.py --help
usage: generate_grid.py [-h] --rows ROWS --cols COLS --cell-size CELL_SIZE [--grid-color GRID_COLOR] [--h-padding H_PADDING] [--v-padding V_PADDING] --output OUTPUT
Generate a grid image
options:
-h, --help show this help message and exit
Use this as a base template. Create your own repository on GitHub and start logging your work daily!
Today's Progress: Fixed CSS, worked on canvas functionality for the app.
Thoughts: I really struggled with CSS, but, overall, I feel like I am slowly getting better at it. Canvas is still new for me, but I managed to figure out some basic functionality.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Функція яка виконує розбиття масиву | |
Аргумент kind відповідає за вибір опорного елемента: | |
m - обирається середнє значення з медіани, першого та останнього елементів; | |
значення за замовчуванням | |
s - перший елемент стає опорним | |
e - останній елемент стає опорним | |
Складність - O(e - s) (лінійна від розміру підмасиву що розбивається) | |
Повертає правильну позицію опорного елемента | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Функція яка виконує злиття двох відсортованих масив та підраховує інверсії | |
повертає пару значень (відсортований_масив, кількість_інверсій_при_злитті) | |
Складнійсть - O(n) (лінійно залежить від n - довжини всідних масивів) | |
Використовує додаткову память розміром 2n | |
""" | |
def merge_inversion(l, r): | |
# індекси які будуть рухатися по масивах | |
i = j = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout ... | |
> | |
<android.support.design.widget.CoordinatorLayout | |
... | |
> | |
<android.support.design.widget.AppBarLayout | |
android:layout_width="match_parent" |