Web – The Template About Sending File To Server

The post shows a template about how to send file to our remote server. We need to prepare html page, javascript and php script. HTML Page Write a web page and import front.js that contains submit event. front.html: <!DOCTYPE html> <html> <body> <div key=”uploadMeshContent” id=”content”> <input type=”file” id=”uploadMesh” name=”uploadMesh”/> <progress Read more…

Open File By Browser & Set Mouse Position By VTK

Open File By Browser The FileReader object lets web applications asynchronously read the contents of file. You can feel the effect at: https://www.weiy.city/web-test/open-file/ <!doctype html> <html lang=”en”> <head> <title>Test</title> </head> <body> <input type=”file” id=”file-input” /> <h3>Contents of the file:</h3> <pre id=”file-content”></pre> <script> function displayContents(contents) { var element = document.getElementById(‘file-content’); element.textContent Read more…

Export CPlusPlus Algorithm To Javascript Code

I will show a way to export CPlusPlus algorithm to javascript code. Write Pollard’s rho algorithm in class Resolver for integer factorization. resolver.h #include <string> typedef long long LL; class Resolver { public: Resolver(); ~Resolver(); std::string GetResolvedResult(int x); protected: void find(LL n,LL c); bool Miller_rabin(LL p); LL Pollard_rho(LL n,LL c); Read more…

HTML: Render Math Formula By MathJax

We will render math Formula in browser by Js engine MathJax. Download the mathjax package to host it from our own server. git clone https://github.com/mathjax/MathJax.git mj-tmp mv mj-tmp/es5 <path-to-server-location>/mathjax rm -rf mj-tmp Write a JS file which import mathjax to analyze string which contains latex math code. check-for-tex.js: (function () Read more…

Tex To PDF
: convert the Latex file which suffix is tex to a PDF file

X