Hello Everyone π
π Creating a Web Application for Docker using Java Script π
π Here, we have created a simple UI using HTML AND CSS with our async function in JS file which will render the div component when the response is returned without stopping other functionalities.
GITHUB URL :- https://github.com/Mjking18/Docker-cgi-using-JS
function lw() {
var i = document.getElementById("input").value;
var xhr = new XMLHttpRequest();xhr.open("GET", "http://IP ADDRESS /cgi-bin/docker.py?cmd=" + i, true);
xhr.send();
xhr.onload = function () {
var output = xhr.responseText;
document.getElementById("d1").innerHTML = output;
};
}
The XMLHttpRequest object can be used to request data from a web server.
The XMLHttpRequest object is a developers work, because its functions are:
- Update a web page without reloading the page.
- Request data from a server β after the page has loaded.
- Receive data from a server β after the page has loaded.
- Send data to a server β in the background.
All modern browsers have a built-in XMLHttpRequest object to request data from a server.
XML stands for eXtensible Markup Language.
XML was designed to store and transport data.
XML was designed to be both human- and machine-readable.
Also, give sudo permissions in server to apache and disable selinux.
π Blog explaining the usecase of javascript in one of my favorite ongoing industries Technology
π TensorFlow.js: The Javascript library for Machine Learning in the browser
TensorFlow.js is a JavaScript library created by Google as an open-source framework for training and using machine learning models in the browser. In short, the framework helps JavaScript developers build and deploy ML models within client-side applications.
Developers have swarmed to using TensorFlow.js as they can use it to both:
- Create new machine-learning models from scratch
- As well as run β or retrain β existing, pre-trained models
The language is also a companion to its namesake TensorFlow (the ML library used with Python), meaning any machine learning model built using TensorFlow can be converted to run in the browser using TensorFlow.js.
π why do we need a Javascript machine learning library?
The fact that TensorFlow.js runs within the browser opens up a range of exciting possibilities for businesses and developers alike.
As browsers are an interactive space: one that offers access to various sensors β including webcams and microphones β which can provide visuals and sounds as an input into any machine learning model.
π¨ developers are moving from handling ML on back-end servers to front-end applications.
And thanks to TensorFlow.js, teams can now create and run ML models in static HTML documents without ever setting up a server or even database β enabling the following services, hosted entirely client-side.
- Automatic Picture Manipulation: auto-adjust images based on a predefined rule-set using a browser-based application β even generate art using convolutional neural networks, as Google has done.
- Offline Game Opponents: play against an AI-operated adversary, even when a video game is offline β as you can do against Chromeβs built-in Trex opponent.
- Content Recommendation Engine: build and train an ML algorithm in the browser, identifying what users like to look at and surfacing more relevant content β just as Twitter have done to rank tweets.
- Activity Monitoring: install a client-side application that learns usage patterns on a local network or device β to monitor and flag unusual activity.
- Object Detection: use a client-side application to detect documents or objects in pictures β such as Airbnb uses to alert users to the presence of sensitive information when they upload a passport or driving license photo.
π THANK YOU FOR READING π