Skip to main content

Posts

Showing posts with the label javscript

Build A Simple Sales System using Google Drive

Google Drive is a free-to-use cloud service with a 15 GB limit storage. 15 GB is large enough to store documents, and "program" too. Yes, it's correct. We can program Google Drive. This blog is a step-by-step tutorial to show you how to build a simple P.O.S. system on Google Drive. Create a Google Sheets to define the products 1. Login to Google Drive using your Gmail account and create a Google Sheets: 2. Input the products in the Google Sheets Create a Google Forms for sale input 1. Create a new Google Form 2. Edit the form and the first field Note that leave the option field unchanged. We'll assign it programmatically in below 3. Add a quantity field 4.  Add a last field for the price input How to copy data from Google Sheets to Google Forms? We need to add a script to do that. Google developed Google App Script (GAS) for us to achieve that. Now go back to the Google Sheet we just created above. Then enter to the script editor You'll see the below screen. Then ...

WebAssembly experiment: C++ vs JS

Introduction WebAssembly brings the webapp executes as fast as running machine code. It is now supported in all major browsers (Chrome, Firefox, Edge, Safari). I’m very excited about the potential so I started to evaluate it. This is an experimental webapp to demonstrate how to call the external C++ module from Javascript. In addition, here also compares the performance for manipulating a list of products in C++ (with STL) versus Javascript (with Lodash ). Contents of this Blog: Development environment setup Develop C++ module Develop the web interface Develop Javascript module Performance comparison result 1. Development Environment Setup In my development environment, I’m using MacOSX 10.11 EI Capitan. The programming language versions I installed as below: $ node -v # v8.9.1 $ python -V # Python 2.7.13 $ java -version # java version "1.8.0_171" $ clang++ -v # clang version 6.0.1  (emscripten 1.38.6 : 1.38.6) $ cmake -version # cmake version 3.11.4 Install Visual Studio Co...