Today, I was trying to use VLookup function in excel to find a particular item in one column with multiple criteria in other columns. It can be done with adding extra columns first to create one real column to look up for and attach the data column you are looking for after that artificial column. For example, you can combine column A&B&C to merge them into one column, so that you can use VLOOKUP(item_A&item_B&item_C, A&B&C&data_column, 2, 0) to find the result.
To avoid making extra columns, in this case, A&B&C&data_column, I found we can also use IF({1, 0}, A&B&C, data_column) to make such matrix instead of actually copying & pasting to create one. Because IF function can work with array {1, 0} as logical tests, so basically it runs the first test with 1 (i.e. True) and then again with 0 (i.e False), in the end, it generates the result matrix A&B&C & data_column. Really impressive because it looks simple and elegant.
I am reading the book called Code: The hidden Language of Computer Hardware and Software. It is quite informative and fun. It took some chapters to build some small pieces of hardware. At that moment you have no idea where this is going, because you don’t know how to use this hardware. It did lead you somewhere in the end that you can put them together to build an entire computer.
What a great experience. It helps me to understand how computers work and especially how things work in small scales and how things evolve historically. Thank you Charles Petzold, it’s a good book.
These notes are for easy reference since I am new to Git.
You can clone the particular branch in the repo.
1
git clone -b branch-name
After you have done the git clone your repo to the local device, go inside the repo folder via terminal. You can check git status or check which branch you are in.
1 2
git status git branch -a
If you want to double check if origin is correct.
1
git remote -v
You can fetch the branches along with their respective commits, but not the actual files.
1
git fetch
If you need to synchronize your branch list, for example, a branch is delete on github but not on your local machine.
1
git fetch -p
You can pull actual files with info such as the branches with the respective commits.
1
git pull
You can create and checkout the new branch at the same time.
1
git checkout -b new-branch
After working on your file you can add the particular file to this branch.
1
git add filename
Or add all file in the current folder to this branch.
1
git add .
Then you can make a commit locally, remember always to add some comments for your commit.
1
git commit -m "Fixed some typos"
If you are using GPG to sign your commit, add -S in the end.
1
git commit -m "Fixed some typos" -S
Normally, you can now push your new-branch together with the new commit to Github. Later you can go to pull request on Github.
1
git push origin new-branch
Or perhaps you want to merge the new-branch locally with your master branch. First, go back to master branch then merge.
1 2
git checkout master git merge new-branch
If you have sucessfully merged the branches, you can choose to delete your previous new-branch locally. Be careful here.
The -d option stands for –delete, which would delete the local branch, only if you have already pushed and merged it with your remote branches.
The -D option stands for –delete –force, so by the name, you can guess it will delete the local branch no matter if you have pushed/merged or not.
So, please be extra careful. I suggest you use -d unless you are totally sure and have double checked the git status.
1 2
git branch -d new-branch git branch -D new-branch
If you previously have pushed the new-branch to Github and now you want to delete it remotely, yes, you can.
As required by Database course, both software is expected to be installed on the laptop. Unfortunately, there are no mac versions for neither SQL Server 2019 nor SQL Server Management Studio (SSMS). So, here is the plan. I will not talk about details, please use Google.
Register and get a free ‘Personal Use’ License for VMware Fusion
Install VMware Fusion and activate it using the license
Install Windows 10 on VMware Fusion
Install SQL Server 2019
Install SQL Server Management Studio (SSMS)
Register and get a free ‘Personal Use’ License for VMware Fusion
“Let it be told to the future world…that in the depth of winter, when nothing but hope and virtue could survive… that the city and the country, alarmed at one common danger, came forth to meet [it].”
I am on the road to somewhere, hopefully we will get there.
Got promotion on Project Euler to Level 2. Yesterday, I tried to run some code on iOS Pythonista and actually answered 2 problems on the way home by taxi. It feels good when I can leverage the Python power to crack some code.
By the way, even after adding https to the src of the external link of 163 music, it still seems not working.