When I am trying to use the AT command in terminal, it prompt with such a message.

1
“Terminal” would like to administer your computer. 
1
Administration can include modifying passwords, networking and system settings.

It seems you have to grant futher access to the terminal so it can work properly.

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.

1
git push origin --delete new-branch

When in doubt, please read documentations.
https://www.git-scm.com/doc

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.

  1. Register and get a free ‘Personal Use’ License for VMware Fusion
  2. Install VMware Fusion and activate it using the license
  3. Install Windows 10 on VMware Fusion
  4. Install SQL Server 2019
  5. Install SQL Server Management Studio (SSMS)

Register and get a free ‘Personal Use’ License for VMware Fusion

Go to VMware Fusion website and create a personal account
https://my.vmware.com/web/vmware/evalcenter?p=fusion-player-personal#tab_register

After your account is activated (email confirmed), login and you will see the license information and download packages link. Download it and install.

Install VMware Fusion and activate it using the license

In the previous step, you should have received your personal license for VMware Fusion. Just use it.

Install Windows 10 on VMware Fusion

Go to Microsoft website to download Windows 10 Disc Image (ISO File)
https://www.microsoft.com/en-ca/software-download/windows10

Select edition: Windows 10
Select product language: English

Then you will have the ISO file, go and install it (without a Product Key) on VMware Fusion. Don’t worry about Windows 10 activation (for now).

Install SQL Server 2019

Since you have Windows 10, the rest will be easy.

Download the express version of SQL Server 2019 and install. (Choose basic mode when you install it, so you don’t need to worry about the configurations.)
https://www.microsoft.com/en-ca/sql-server/sql-server-downloads

Install SQL Server Management Studio (SSMS)

Here is the link.
https://docs.microsoft.com/en-ca/sql/ssms/download-sql-server-management-studio-ssms

That’s it.

Update:

If you are a student, your school might offer free Product Keys for windows 10 Education version.
https://onthehub.com

Once you have the Product Key, activate your windows as you always do.

I am back.

“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.

It feels great when receiving the very first star on github for the open-source project I shared without any marketing.

Actually, I am surprised. Thank you no matter who you are.

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.

One nice module to find.

1
2
3
4
from fake_useragent import UserAgent
ua = UserAgent()
ua.random # this would be enough
ua.update() # once a while
0%