VTK – Rotate Vector To Special Direction
I take notes about how to rotate vector to a special direction.
I take notes about how to rotate vector to a special direction.
We need to install PyMuPDF which is a Python binding with support for MuPDF (current version 1.19.*), a lightweight PDF toolkit before our work. pip3 install –upgrade pip pip3 install –upgrade pymupdf Write python script for saving PDF page to image. import sys, fitz # import the bindings if __name__ Read more…
Somtimes the user’s browser is not the newest version. It may not support WebAssembly or a few functions. So we have to test it before using. Is WebAssembly Supported? Import a WebAssembly module and create an instance of it. Track this process to see if any problems arise. <!doctype html> Read more…
Create a small program by computer language C, it print primers in range (1, 6000). Let’s compile it by emcc and generate a template html file. #include <stdio.h> const int N = 6000; int primer[N],count; char visit[N] = { 0 }; void GetPrimers() { count = 0; for (int i Read more…
Here is a demo for showing tips when users input keys on an HTML page. Result:
Inspiration: the famous fork bomb in the Linux world.Fork bomb::(){:|:&};. It’s like a crazy binary tree that consumes the resources of the system constantly. Fork bomb has an impact size of . The script here can’t do that terrible damage. Keep the size , use curl to access the target Read more…
Here is a bash script helps you to rename files *.c.gz to new files *.c. Code snippet: #! /bin/bash cmd1=$(ls |grep c.gz) cmd2=$(ls |grep c.gz |sed ‘s/\.gz//g’) array1=() len1=0 for i in $cmd1; do array1[$len1]=$i len1=$(expr $len1 + 1) done array2=() len2=0 for i in $cmd2; do array2[$len2]=$i len2=$(expr $len2 Read more…
Here is a convex object and an origin point outside it. is an arbitrary point in the boundary. Find the farthest point on the boundary along the vector . Name the farthest point . We get a new vector to find the farthest point on the boundary along the direction Read more…
Do kegel exercises for 10 minutes a day, improve pelvic muscles, treat urinary incontinence, improve sexual satisfaction and help reduce premature ejaculation.