- For creating new branch
git checkout -b [new-branch-name]
Example: we want to create new branch named: new-branch-1
git checkout -b new-branch-1
- For swicthing existing branch
git checkout -b [new-branch-name]
Example: we want to create new branch named: new-branch-1
git checkout -b new-branch-1
| Suppose we have the following document in users_exams collection: | |
| { | |
| "answers" : [ | |
| { | |
| "auto_score" : 0, | |
| "question_id" : "579733a97e6b58a0616b2c55", | |
| "user_answers" : "na", | |
| "isCorrect" : false, |
server ip: server-ip password: password user: root
using SSh command: -> ssh root@server-ip then it will asked for password like bellow root@server-ip's password: write password and press enter
| How to install mobx in create-react-app | |
| 1) Run create-react-app. | |
| 2) Run npm run eject. | |
| 3) Run npm install --saveDev babel-plugin-transform-decorators-legacy. | |
| 4) Open package.json, find the "babel" section (line 78 for me), and add 4 lines so it looks like this: |
| Let’s create a new virtual envirnoment, named myenv, using pyvenv: | |
| pyvenv myenv3 | |
| source myenv3/bin/activate | |
| and you can start Python 3 by just typing: | |
| $ python | |
| Note that as you are inside the virtual environment, you don’t need to use the command python3 to open Python 3. |
| Link: | |
| https://www.microsoft.com/net/core#macos |
| # To Show installed versions | |
| nvm ls | |
| # Set 6.1.0 (or another version) as default | |
| nvm alias default 6.1.0 |
| array[start:end:step] # start through not past end, by step | |
| start: the beginning index of the slice, it will include the element at this index unless it is the same as end, defaults to 0, i.e. the first index. | |
| If it's negative, it means to start n items from the end. | |
| end: the ending index of the slice, it does not include the element at this index, | |
| defaults to length of the sequence being sliced, that is, up to and including the end. | |
| step: the amount by which the index increases, defaults to 1. If it's negative, you're slicing over the iterable in reverse. |
| import numpy as np | |
| # Manual construction of arrays | |
| # one dimension array | |
| a = np.array([0,1,2,3]) | |
| print(a) | |
| print ('dimension', a.ndim) |
| Suppose we have following situation | |
| $('#dom1').remove(); | |
| $('#dom2').remove(); | |
| $('#dom3').remove(); | |
| $('#dom4').remove(); | |
| So, we can write unit test as follows: | |
| this.removeStub = sinon.stub($.fn, 'remove'); | |
| it('Should remove dom', function(){ |