Tag: JAVASCRIPT

Not an Hotdog
AI-ML

Not an Hotdog

I love the silicon valley tv series. and lately I've been doing some machine learning and deep learning studies, so what's the most famous image classification problem of the silicon valley series? Obviously Jin Yang's not an hotdog The following is the Keras model

davide
DAGs visualization using dagre-3d
JAVASCRIPT

DAGs visualization using dagre-3d

Directed Acyclic Graphs are directed graphs, that have a topological ordering, a sequence of the vertices such that every edge is directed from earlier to later in the sequence. DAGs are often used in ETL processes to define pipelines for ingestion/transform of files and lately as a replacement of

davide
Sleep-sort in javascript
JAVASCRIPT

Sleep-sort in javascript

Sleep sort is a joke sorting algorithm. Sleep sort spawns off one process for each argument. Each process waits for n milliseconds, then prints out n, meaning it takes 1 millisecond to print out "1", 2 millisecond to print out "2", 100 millisecond to print out

davide
Removing the hashbang from react-router navigation
JAVASCRIPT

Removing the hashbang from react-router navigation

By default, react-router add the annoying and hated hashbang to the URL, here is how to remove it. import React from 'react'; import ReactDOM from 'react-dom'; import {BrowserRouter, Route, Switch} from 'react-router-dom'; //Container import Full from './containers/Full/' //Views import Login from

davide
ThreeJS rotating icosahedron with images on vertices
JAVASCRIPT

ThreeJS rotating icosahedron with images on vertices

Simple clone of the Stripe element @ https://stripe.com/radar I had some fun replicating the rotating icosahedron of the Stripe page, and in the end, it came out pretty good. I know that on Stripe they have created their own solid using Cinema 4d. <!DOCTYPE html> <

davide
Charge Stripe Processing Fee to the user
JAVASCRIPT

Charge Stripe Processing Fee to the user

Following is how I've implemented the possibility to charge the stripe fee onto the user. Unfortunately, Stripe does not offer any API endpoint to get the stripe fees for a specified country so I had to do it manually. It is not perfect nor elegant but it works.

davide
First react app
JAVASCRIPT

First react app

So it's been two days that I'm trying to figure out how React works and how to use it for my projects. I have to admit that I don't like React and I prefer to work with frameworks like Angular or Ember. I know

davide
Control flow with promises
BOOK

Control flow with promises

Promises are very powerful and allow us to create really complex asynchronous data flows. When we want to execute tasks at the same time we can use Promise.all(), but if we want to execute tasks one after the other, we need to use a different solution. Here is an

davide
Camera tracking with NodeJS and Arduino
HARDWARE

Camera tracking with NodeJS and Arduino

Lately I had some fun using the Arduino micro-controller with NodeJS. One of my last project is a camera mounted on a Pan&Tilt that can track colors and even faces. Materials * Arduino UNO * Mini breadboard * 2 servos * Pan & tilt frame * A webcam * A computer This is the

davide
ESC
// awaiting input_