Frp install on Raspberry Pi Zero
Github:https://github.com/fatedier/frp wget https://github.com/fatedier/frp/relea... sudo tar -zxvf frp_XXXXX.tar.gz cd frp_XXXXX // frps.ini configuration [common] bind_port = 7000 vhost_http_port = 54321 vhost_https_port = 54322 token = XXXXXX // frpc.ini configuration [common] server_addr = 1582.getmemap.com server_port = 7000 token = XXXXXX [web] type = http local_ip = 127.0.0.1 local_port = 80 remote_port = 54321 custom_domains = 1582.getmemap.com [https] type = https local_ip = 127.0.0.1 local_port = 443 remote_port = 54322 custom_domains = 1582.
Flutter State Management
setState setState will mix the state management with the UI code, only for simple app. ================================================================================ Bloc build the model class which will be imutable, which means when state changes, there will be an new model instance: enum FormType { signIn, register } class EmailSignModel { EmailSignModel({ this.email = "", this.password = "", this.formType = FormType.signIn, this.isLoading = false, this.submitted = false, }); final String email; final String password; final FormType formType; final bool isLoading; final bool submitted; EmailSignModel copyWith({ String?
Kalman Filter Learning Note
Kalman Filter Algebra Formula ================================================================================ Linear Algebra Formula ================================================================================ State Transition Equations Example ================================================================================ Uncertainty Matrix P (Covariance Matrix) Example End
C++ Learning Note
C++ program to demonstrate shared_ptr #include <iostream> #include <memory> using namespace std; class A { public: void show() { cout << "A::show1()" << endl; } }; int main() { shared_ptr<A> p1(new A); cout << "after p1 created, p1.use_count()=" << p1.use_count() << endl; cout << "p1.get()=" << p1.get() << endl; p1->show(); shared_ptr<A> p2(p1); cout << "after shared_ptr<A> p2(p1), p2=" << p2 << endl; cout << "after p2 created, p1.use_count()=" << p1.use_count() << endl; cout << "after p2 created, p2.
ROS2 Learning Note
Install ROS2 on Ubuntu \$ sudo apt update \$ sudo apt upgrade \$ sudo apt install build-essential gcc make perl dkms VirtualBox VM=>Device =>Insert Guest Additional CD Image Then click run, after installation finished, restart the VM If error like VBoxGuestAdditions.iso' (VERR_PDM_MEDIA_LOCKED) Shut down all your VMs. And I don't mean "Saved State" or "Paused", but completely shut them down. If you already have them in "Saved State" or "Paused", then resume the VM and from within the guest OS shutdown the guest OS.
Ubuntu Setup Note
SSh Into Ubuntu VM Virtualbox Method 1. Port forwarding from GUI For the guest VM, then open “Settings” >> “Network” >> “Advanced” section. Click on “Port Forwarding” button, add a new port forwarding rule. For example, set up the rule from the panel as To confirm that port 2522 is listening, we check using the netstat command. Now, we can SSH to the guest VM using ssh -p 2522 <login>@127.0.0.1
Flutter Gists
Flutter RaisedButton: callback function See below example: int result = 0; void calculate(num1, num2) { setState(() { result = num1 + num2; }); } new RaisedButton( onPressed: () => calculate(1, 100), ... ), new Text("$result") onPressed: calculate(1, 100), calculate(1, 100) will be called every time Flutter runs build() onPressed: () => calculate(1, 100), The same as onPressed: () {calculate(1,100);} When the button pressed, then call back the function
Vehicle Kinematic Model
$\dot{x}_c = v \cos{(\theta + \beta)}$ $\dot{y}_c = v \sin{(\theta + \beta)}$ $\dot{\theta} = \frac{v \cos{\beta} \tan{\delta}}{L}$ $\dot{\delta} = \omega$ $\beta = \tan^{-1}(\frac{l_r \tan{\delta}}{L})$ where the inputs are the bicycle speed $v$ and steering angle rate $\omega$. The input can also directly be the steering angle $\delta$ rather than its rate in the simplified case. The Python model will allow us both implementations. In order to create this model, it’s a good idea to make use of Python class objects.
Git and Hugo Common Commands
git log git status git add -A . git commit -m ‘Initial commit’ git remote -v git remote remove origin git remote add origin https://github.com/stone0351/stone0351.github.io git push -u origin master git pull origin git merge origin/master hugo server –disableFastRender // update the public files hugo -t <theme name> e.g. hugo -t Tale ================================================================================ End