import 在typescript中的千奇百怪写法

学习angular的时候,有个使用第三方库query-string, 死活不对。老师使用的是ng8,我是ng10

老师写的是

import queryString from 'query-string';

我必须写成

import * as queryString from 'query-string';

其他时候格式都是

imprt {a, b, c } from "foo.bar"

从这里我找到了解释

https://zhuanlan.zhihu.com/p/137856912

sync the time/date in docker with host

Thanks for the tips from this post:

https://medium.com/better-programming/docker-tips-synchronize-container-timezone-with-host-machine-via-docker-compose-in-ubuntu-18-04-6f01615efc24

Two changes must be added in docker-compose.yml. First need to add TZ in enviroment, then add localtime and timezone in Volumns.

Like so

environment:
– TZ=Europe/Berlin

volumes:

- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro

upgrade nodejs from 8 to newest version in ubuntu

The default node version in Ubuntu 18 is 8.0. I need to update it.

  1. Download the newest version from https://nodejs.org/en/download/ and save it.

2. extact the file from tar and copy it to /usr/local

sudo tar –strip-components 1 -xJf node-v14.15.0-linux-x64.tar.xz -C /usr/local/

Please note, -C /usr/local/ must be the last params, otherweise it will not work, at most not work for me.

Now check version with

node -v

It should show like v14.15.0

solve winhq dependency hell in Ubuntu 18

today I need to install a new pc with xubuntu 18.04 bionic. But I got problem while installing winhq, the apt-get always says some dependency issues, and can not install it.

Finally I found the solution here:

The key is to install following package before wine:

sudo apt-get install libgnutls30:i386 libldap-2.4-2:i386 libgpg-error0:i386 libxml2:i386 libasound2-plugins:i386 libsdl2-2.0-0:i386 libfreetype6:i386 libdbus-1-3:i386 libsqlite3-0:i386

Thanks Ji M!