Skip to main content

Posts

naming conventions in Javascript

I personally like  kebab-case: https://wiki.c2.com/?KebabCase kebab-case  is by far the most common convention today. The only use of underscores is for internal node packages, and this is simply a convention from the early days. https://docs.npmjs.com/files/package.json#name for Node -  Node Starter https://github.com/rickyrauch/nodejs-starter From google: https://google.github.io/styleguide/jsguide.html#file-name From airbnb: https://github.com/airbnb/javascript#naming-conventions

Handwritten Text Recognition with TensorFlow / Python

In order to use wordbeam search: python main.py --train --beamsearch 1.  Compile wordbeam search https://github.com/githubharald/CTCWordBeamSearch 2. download IAM Handwriting Database http://www.fki.inf.unibe.ch/databases/iam-handwriting-database

React way to use D3 - ( Python as API )

The Inspiration Andmap is trying to build new BI product, the tech stacks would be D3 + ReactJS as data visualization frontend, Web API, and Python provides data. As with most new projects, it didn’t take long to figure out the major roadblocks. D3.js is a JavaScript library for manipulating documents based on data. D3 helps you bring data to life using HTML, SVG, and CSS. D3’s emphasis on web standards gives you the full capabilities of modern browsers without tying yourself to a proprietary framework, combining powerful visualization components and a data-driven approach to DOM manipulation. In one of our initial discovery sessions, we realized that our application needs to be able to adapt D3 library in ReactJS way. More than that, we prefer utilizing new feature of React - Hooks. Finally, we build  component for each chart and Helpers file for drawing each chart. Here is sample for map chart: index.js: map.js - map chart container - using useEf...

useReducer Hook + Context API for Towneley project

To ger rid of Redux!! A  simpler, more straightforward way to handle global state management library we are using for this project are: 1. Formik 2. Material Design 3. Redux 1. Index.js 2. store.js 3. reducer.js 4. actions.js 5. middleware.js 6. typeOfActions.js 7. profileForm.js ======= Same idea - use hook for Material Design

SVG, and SVG for ReactJS - D3, and other library

Demo for Ingram Micro: https://andmap.co/svgdemo Tutorial D3 for React: https://towardsdatascience.com/react-d3-the-macaroni-and-cheese-of-the-data-visualization-world-12bafde1f922 style for path https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes Cool SVG example: https://bost.ocks.org/mike/example/ path data for us map chart : http://bl.ocks.org/NPashaP/a74faf20b492ad377312  D3 cool template: https://github.com/d3/d3/wiki/Gallery Other Data Visualization Library: https://blog.bitsrc.io/11-javascript-charts-and-data-visualization-libraries-for-2018-f01a283a5727 https://archive.nytimes.com/www.nytimes.com/interactive/2013/04/08/business/global/asia-map.html