0%

此文针对使用澎湃OS国行版本的小米手机,你无需刷机

此方法在我的小米12s,HyperOS 1.0.3.0 ULTCNXM 版本测试通过

步骤 1 - 启用谷歌基础服务

打开小米设置,在搜索框中输入google,在下面列出的选项中选择“谷歌基础服务”,然后点击选择按钮打开服务。

Read more »

When you try to directly parse a server side responed json to a JSON object ,it will popup an err.

1
2
3
4
5
const message = {"code":"200","msg":"Sample movement recorded succsfully"} 

var msg = JSON.parse(message);
// Log to console
console.log(msg.msg)
1
2
3
SyntaxError: "[object Object]" is not valid JSON
at <anonymous>:6:16
at mn (<anonymous>:16:5455)

you need to use JSON.stringify() method first, then parse the data to JSON object

1
2
3
4
5
6
const message = {"code":"200","msg":"Sample movement recorded succsfully"} 

var obj = JSON.stringify(message);
var msg = JSON.parse(obj);
// Log to console
console.log(msg.msg)

  1. Before you clone your repository or just copy your source code folder to a new windows computer, you need to install git and Node.js first.
  2. Clone your hexo repository to your local folder
    1
    git clone git@github.com:yourname/your_website.git
  3. Run the following command in your source folder
    1
    2
    3
    npm install hexo-cli -g
    npm install
    hexo clean

Now you can use your Hexo to continue your blogging.

Before you move the whole development, just login the vscode with your github account and sync all your settings to the cloud.

  1. Copy all your project folder to new laptop
  2. Install vscode and login your github account and sync
  3. open your powershell and run following commmand
    1
    ssh-keygen -t rsa -b 4096 -C “youremail@example.com”
  4. open folder C:\Users\yourUserName\.ssh and then open a file named id_rsa.pub with notepad or your favorite edit apps, then copy all content in this file to your clipboard.
  5. open your github -> settings -> SSH and GPG keys -> New SSH key
  6. copy all contents to the “key” field and put your new laptop name to the “title” field then save
  7. install git for windows and set up your git user information
    1
    2
    git config --global user.name "Your Name"
    git config --global user.email "email@example.com"
    if you forget your git user information on your old laptop use this
    1
    git config --list
  8. restart your vscode and enjoy

if your laravel project can not run after you move to new laptop you just clear the optimize

1
php artisan optimize:clear