作者归档:Rocket Mao

奥地利日常生活小记

这一块就让我记录下奥地利工作生活发生的有意思的事。

今天见到了S,S是坚决不打疫苗的,所谓的顽固派。但是奥地利政府明年要立法强制打疫苗,不然的话就罚款,3600欧。S说了,明年准备给投诉信给政府,而且要找很多人(several millions),这样政府就忙不过来了,看他们怎么办。我称之为人力DDoS攻击, good luck。

2022年1月3日

和S又聊了下政府的政策,S说政府不可能拿到罚款的,S已经准备做老赖了。

2022年1月24日

今天去边上的学校操场跑步,中途来了辆车,下来个大爷。大爷看着我跑了两圈,我就停下来和大爷聊了聊,互相问候了下。原来大爷的腿换了假肢,晚上过来锻炼锻炼适应下新的腿。难怪会看着我跑,估计大爷心里想着他年轻的时候。

Shortcomings of the Bluetooth speaker Sony SRS-XB12

There are two shortcomings of the Sony SRS-XB12. First, it can not be held on or stay asleep without connection to any device. It will automatically shut down. So you need to turn it on every time when u use it. If you have two of them and make them as a pair, then you need to turn on each of them. The most dissatisfying stuff is that if you have two of them as a pair and you want to connect them with another device, then you will have trouble. You need to operate many times, press the “power button” and the “add button” to successfully connect them to another device. All in a word, it is not recommended to buy this model.

Davinci 17 is not running well on Windows 11

It takes sveral mins to load the project on windows 11 which only takes 1 second on windows 10. The hardware is the same, no idea what happened. I do not recommend upgrading to windows11.

不能理解达芬奇的软件设计,自从更新了windows11之后,打开project奇慢无比。loading界面也是。

重装软件之后运行又快了。这里不能安装davinci的control panel。

Nature 投稿记录

Decision sent to author 24th February 22, Declined

Manuscript under consideration 22th February 22

All Reviewers Assigned 2nd February 22

Editor发邮件通知送审,同时要求填写两份表格,report summary以及policy check (一定要用adobe reader 打开兼容性最好). 28th January 22

Editor Decision Started 27th January 22

Manuscript under consideration 18th January 22

Manuscript received 17th January 22

Manuscript under submission 17th January 22

Rejected 之后按照审稿人的意见大修了一轮,后面就是重投了。

Decision sent to author (Rejected) 20th September 21

Manuscript under consideration 09th Sept 21

All Reviewers Assigned 25th Aug 21

这之后editor会给corresponding author发邮件问confirmation form,顺便通知准备送审 26th July 2021。

Editor Decision Started 26th July 21

Manuscript under consideration 23rd July 21

Editor assigned 23rd July 21

Manuscript received 22nd July 21

Manuscript under submission 22nd July 21

How to Run Matlab with Visual Studio Code (vs code)

visual studio code 与matlab的配置方法

In order to have a more decent program editor for windows, I try to use vs code to write the m file for Matlab, however, I cannot run it in vs code. Then I start to search for a way to run Matlab script in vs code. Because of the updates of the vs code and related plugins, it takes me about one hour to figure out how to do this. I have read a Chinese tutorial, which is helpful but not enough. Here, I try to list the key steps for the configuration in vs code.

First, install plugins: Code runner (publisher:”Jun Han”), Matlab (publisher:”Xavier Hahn”), Matlab-formatter (publisher:”AffenWiesel”). Just choose the most popular one. Here, matlab-formatter is not necessary.

Second, modify the settings.json of vs code. the file of the setting.json is located in “C:\Users\Rocket\AppData\Roaming\Code\User\settings.json” if you install the vs code in the default directory. The modification parts are highlighted below. You may install Matlab in other folders that you need to change the related path as well.

{
    "python.pythonPath": "C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.9_3.9.1776.0_x64__qbz5n2kfra8p0\\python3.9.exe",
    "editor.renderControlCharacters": true,
    "workbench.editorAssociations": {
        "*.ipynb": "jupyter-notebook",
        "*.m": "default"
    },
    "python.languageServer": "Pylance",
    "auto-build.defaultEnv.name": "STM32F103RET6_creality",
    "security.workspace.trust.untrustedFiles": "open",
    "python.defaultInterpreterPath": "C:\\Program Files\\Python39\\python.exe",
    "diffEditor.renderSideBySide": false,
    "matlab.matlabpath": "C:\\Program Files\\MATLAB\\R2021a\\bin\\matlab.exe",
    "matlab.mlintpath": "C:\\Program Files\\MATLAB\\R2021a\\bin\\win64\\mlint.exe",
    "matlab.linterEncoding": "utf8",
    "code-runner.runInTerminal": true,
    "code-runner.executorMapByFileExtension": {
        ".m" :"cd $dir && matlab -nosplash -nodesktop -r $fileNameWithoutExt",
        ".vb": "cd $dir && vbc /nologo $fileName && $dir$fileNameWithoutExt",
        ".vbs": "cscript //Nologo",
        ".scala": "scala",
        ".jl": "julia",
        ".cr": "crystal",
        ".ml": "ocaml",
        ".exs": "elixir",
        ".hx": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
        ".rkt": "racket",
        ".scm": "csi -script",
        ".ahk": "autohotkey",
        ".au3": "autoit3",
        ".kt": "cd $dir && kotlinc $fileName -include-runtime -d $fileNameWithoutExt.jar && java -jar $fileNameWithoutExt.jar",
        ".kts": "kotlinc -script",
        ".dart": "dart",
        ".pas": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
        ".pp": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
        ".d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
        ".hs": "runhaskell",
        ".nim": "nim compile --verbosity:0 --hints:off --run",
        ".csproj": "dotnet run --project",
        ".fsproj": "dotnet run --project",
        ".lisp": "sbcl --script",
        ".kit": "kitc --run",
        ".v": "v run",
        ".vsh": "v run",
        ".sass": "sass --style expanded",
        ".cu": "cd $dir && nvcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt"
    }
}

The third step, save the JSON files and try to run the Matlab file in vs code.

To use matlab-formatter, you need to right-click the open m file and choose the command ” format document”.

the running window is as follows:

The drawback of this method is that the running result will show up in a new window rather than in the terminal of vs code. And also be careful of the name of the running script, the program (Matlab ) may run the script with the same name but in a different folder.

after using this several times, it is not convenient. it is better to editor the script with vs code but run the script in Matlab GUI, then no need to close the pop-up windows. The MathWorks company should do something, even the live script is developed, but not convenient to use.

A review of 3d printer, Ender5 pro from Creality 3D

Recently buy the Ender5 pro, a very cheap version, and only 299 euros from 3Djake.at. The frame of the 3D printer is very solid, no complaints.

Do a simple modification of the 3D printer and update the printer with a BLTouch sensor and use a Raspberry Pi (with Octoprinter) to control it.

Because the motherboard is V4.2.2 which is special and it costs some time to figure out how to connect the BLtouch with the 3D printer. We change the firmware with Marlin. Before this mode, I also install the BLtouch with CR-10S which is simpler. And be careful of the compatibility between the Marlin Version and the build environment. For the Ender 5 pro, you need to use PlatformIO. I suggest using Microsoft visual studio code with the Marlin plugin (quite easy to modify).

Marlin Version Platform(s)Instructions

1.1.x or 2.x8-bit AVRInstall Marlin with Arduino IDE

1.1.9 or 2.x8-bit AVR, 32-bit ARMInstall Marlin with PlatformIO

2.0LPC1768 (Re-Arm)Install Marlin on Re-ARM

https://marlinfw.org/docs/basics/install.html

The print bed is very nice, easy to clean, and also easy to remove the printed parts. however, because of the open-frame design, sometimes the 3D printer will have trouble reaching a high temperature, especially for the bed. One suggestion is not to turn the side cooling fan on if the temperature of the printing head is higher than 250 degrees.

The bearings for the z-axis threaded rod are low quality which generates a lot of high-frequency noise. By lubricate with some oil, the noise is released. a similar problem can be found in https://forums.creality3dofficial.com/community/ender-55pro/ender-5-pro-noisy-bearings/.

One bad thing for this printer is once there is an error from the printer, for example when the bed loses too much heat, the printer will shut down and generate an extremely loud warning sound also the connection between the Octoprinter is cut off. A full restart is required to reboot the 3D printer meanwhile the raspberry Pi needs disconnecting from the 3D printer. After the 3D printer works again, then plug the raspberry Pi into the 3D printer and reconnect the printer with the Octoprinter. A little bit sad about this design and don’t want to change it at this moment by myself. with the older CR-10s, when there is an error, the printer will restart by itself and just need to reconnect the Octoprinter with the 3D printer in the browser by clicking a button.

For the printing head, we have tried both 0.4 mm and 0.2 mm nozzles. Quality is fine. 0.1 mm nozzle is not support.