You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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
Javascript documentfragment to string (w/ text selection)
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
В общем случае команда git rebase добавляет все коммиты из ветки, на которой вы находитесь, следующими за коммитом, который вы передаете git rebase как аргумент. Если передать первым аргументом ветку, Git найдет последний общий коммит между текущей веткой и целевой веткой и добавит коммиты из текущей в целевую один за одним. Можно представить себе, что git rebase по очереди "накатывает" каждый из коммитов вашей ветки на целевой коммит. При этом у всех "накатанных" коммитов изменяются метаданные (например, родительский коммит), поэтому с точки зрения Git это теперь новые коммиты.
На семинаре мы познакомились с двумя случаями применения git rebase.
Случай 1: объединение веток, git rebase как альтернатива git merge
Для того, чтобы объединить две ветки в одну (например, когда работа над задачей закончена и нужно влить это задачу в ветку master), часто используют команду git merge. Это команда объединяет ветки путем создания отдельного коммита, у которого два родителя - комм
This is a quick guide for people who don’t feel confident with OOP concepts yet, but want to make first steps towards improving their code using OOP principles.
Recipes
If you don’t know where to start, try to look for the following patterns and apply provided recipes. Here are some problem you can find and possible solutions:
Problem
Recipes
Code repetition: literals (numbers, string) that you use more than once
Use power of constants: remove code repetition (less literals in code), reduce typing errors, get better IDE support. Bonus: document your code by giving meaningful names to values.
Code repetition: expressions
Look for repeated patterns and put them into functions. Same bonuses with documenting your code.