Lenix

Vanilla JS – the world’s lightest JavaScript framework (no one)

Vanilla JS is a fast, lightweight, cross-platform JavaScript framework. We can build powerful JavaScript applications with it. introduce Vanilla JS is small and intuitive. Which companies have adopted Vanilla JS? Many, many, here are just some of the most well-known: Facebook Google YouTube Yahoo Wikipedia Windows Live Twitter Amazon LinkedIn MSN eBay Microsoft Tumblr Apple […]

Vanilla JS – the world’s lightest JavaScript framework (no one) Read More »

Linux performance tuning dry goods, [dry goods sharing] Detailed explanation of the tuned feature of Linux performance tuning

Introduction to uned For ordinary users, it is more difficult to optimize the Linux application environment. There are many fields and a wide range: parameters involved in CPU, storage, cache strategy, memory management, etc. Although there are default settings in Linux, which can deal with most scenarios, but for some special scenarios, such as high-performance,

Linux performance tuning dry goods, [dry goods sharing] Detailed explanation of the tuned feature of Linux performance tuning Read More »

Usage of then() in js

The then() method is executed asynchronously. It means: that is, when the method before .then() is executed, the program inside then() is executed, which avoids the problem of data not being obtained. Syntax: promise.then(onCompleted, onRejected); parameter Required for promise. Promise object. onCompleted Required. A fulfillment handler function to run when the promise completes successfully. onRejected

Usage of then() in js Read More »

Introduction to WebSockets

WebSocket : is a computer communication protocol that provides a full-duplex communication channel over a single TCP connection. The IETF standardized the WebSocket protocol as RFC 6455 in 2011. The current API specification that allows web applications to use this protocol is called WebSockets. [1] It is an active standard maintained by the WHATWG and

Introduction to WebSockets Read More »

Ajax technology introduction

Ajax : (also written as AJAX pronounced /ˈeɪdʒæks/ or Ajax. Abbreviation for “Asynchronous JavaScript and XML”) is a set of web development techniques that use various web technologies on the client side to create asynchronous web applications. Using Ajax, web applications can send and retrieve data from the server asynchronously (in the background) without interfering

Ajax technology introduction Read More »

Browser quirks and standards mode

Weird Mode and Standard Mode On the web long ago, there were usually two versions of pages: a version for Netscape’s Navigator, and a version for Microsoft’s Internet Explorer. When the W3C created web standards, in order not to break existing websites at the time, browsers couldn’t just drop these standards. As a result, browsers

Browser quirks and standards mode Read More »

javascript get parameters from URL

javascript gets parameters from the URL: such as getting the username query parameter in the url: var url = new URL(window.location); var username = url.searchParams.get(‘username’); refer to: https://webdoc.p2hp.com/javascript/bom/location.html … The post javascript to get parameters from URL first appeared on Lenix Blog . This article is reprinted from https://blog.p2hp.com/archives/9701 This site is for inclusion only,

javascript get parameters from URL Read More »

js calls the method of angularJs

Method 1: Get it through the controller var appElement = document.querySelector(‘[ng-controller=mainController]’); // Get the $scope variable: var $scope = angular.element(appElement).scope(); // 如果先调用Controller 里面的方法的话$scope.somefunc(‘xxx’); // 改变了值之后还需要调用一下下面的方法, 才可以刷新最新改变的内容$scope.$apply() Method 2: Obtaining through DOM manipulation //Get the app object through DOM operation var element = angular.element($document.getElementById(“app”)); // app is the value of the id of the DOM element

js calls the method of angularJs Read More »

Execute headless chrome on ubuntu (linux)

Open a terminal and execute the following command google-chrome –headless –disable-gpu –remote-debugging-port=9222 –disk-cache-dir=/tmp –user-data-dir=/tmp –crash-dumps-dir=/tmp “https://www .baidu.com” … The post headless chrome execution on ubuntu (linux) first appeared on Lenix Blog . This article is reprinted from https://blog.p2hp.com/archives/9694 This site is for inclusion only, and the copyright belongs to the original author.

Execute headless chrome on ubuntu (linux) Read More »

Linux installation, compilation and configuration of ffmpeg

1. Download ffmpeg Download URL: http://www.ffmpeg.org/download.html 2. Unzip tar -zxvf ffmpeg-2.0.1.tar.gz 3. Edit the profile file: vi /etc/profile Add two sentences at the end of the file: export FFMPEG_HOME=/usr/local/ffmpeg export PATH=$FFMPEG_HOME/bin:$PATH If the original java environment variable has been configured export PATH=$FFMPEG_HOME/bin:$ JAVA_HOME /bin:$PATH Execute source etc/profile output variable echo $FFMPEG_HOME 4. Configure the installation

Linux installation, compilation and configuration of ffmpeg Read More »