Developing WebSocket online chat communication system with PHP framework

To use Swoole in ThinkPHP, you need to install the think Swoole composer package, provided that the system has installed the Swoole PECL extension To install think swoole, execute the composer command in the project root directory of tp5: composer require topthink/think-swoole If you don't say much, go straight to the code: To create a WebSocke ...

Posted on Wed, 13 Nov 2019 09:41:38 -0500 by jsladek

js publish / subscribe mode

There are five ways to program asynchronously in JavaScript 1. Callback function 2. Event monitoring 3. Publish and subscribe 4.Promise object 5.Generator function Publish / subscribe mode For example, in Taobao shopping, Xiaohong sees a pair of shoes on Taobao, but they are sold out. Xiaohong contacts the seller when they have the goods. ...

Posted on Tue, 12 Nov 2019 16:07:32 -0500 by kurky

The conflict between jquery3 and layeui leads to a height of 152px when using layeui.layer.full to pop up a full screen iframe window

The jQuery version used in the project is jquery-3.2.1. When using the layui to pop up the full screen iframe window, there is always a 152px high scroll window at the top of the iframe window, which can't realize the true full screen. The code is as follows: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> ...

Posted on Tue, 12 Nov 2019 15:56:57 -0500 by Stille

Common JSON operations in java

I. what is Jason Json refers to JavaScript object notation Json is a lightweight text data exchange format Json is language and platform independent: the Json parser and the Json library support many different programming languages Jason is self descriptive and easy to understand II. Several ways to operate Json in Java JSON library develope ...

Posted on Tue, 12 Nov 2019 14:31:19 -0500 by croakingtoad

Parallel and serial of JavaScript promise

Promise parallel Promise.all is a promise object returned after all promises are executed (reject|resolve). Recently, in the development of a project, you need to refresh the page after the interface gets all the data and cancel the losing effect 1 // Request interface in project 2 function getShowProject(resolve, reject) { 3 $.ajax({ ...

Posted on Tue, 12 Nov 2019 13:46:28 -0500 by blr32

ASP.NET MVC to realize the application of lay UI rich text editor

First look at the visual layer In the view layer, we use the view assistant -- HtmlHelper, instead of the traditional form label elements in our web pages, where m represents the entity model. Through the view assistant, we can generate textarea tags with the same id and name attributes for us. Remarks: In ASP.NET MVC, the elements that can ...

Posted on Tue, 12 Nov 2019 12:17:00 -0500 by kittrellbj

JavaScript - dynamically loading script and style styles

The content of a web page is understood as an XML or web page itself is an XML document. XML documents have a very special symbol: "tag" is also called "node". A basic web page format <!DOCTYPE /> <head></head> <body><body /> These are the most basic forms, but in fact it omits the oute ...

Posted on Tue, 12 Nov 2019 11:51:42 -0500 by man12_patil3

Drag function in vue

The requirement is simple. Drag the box or number to adjust the order. Following chart I. find the wheel I searched the Internet for a while and found a good plug-in—— vue-draggable II. Usage 1. installationnpm i -S vuedraggable2. Quotesimport draggable from 'vuedraggable'3. Realization of requirements <template> <div cl ...

Posted on Tue, 12 Nov 2019 11:03:17 -0500 by snaack

Getting started with Ajax

1. What is ajax ajax is the abbreviation of technical terms: Asynchronous: asynchronous; JavaScript:JavaScript language; And: and, and; XML: data transfer format ajax is a client sending a request to the server over HTTP 2. Properties and methods of Ajax objects Attribute readyState: Ajax state code   ...

Posted on Tue, 12 Nov 2019 10:56:20 -0500 by Dracolas

vue-cli3 and element make a simple landing page

1. Create a project with vue-cli3 2. Install element module Global installation npm i element-ui -S 3. Introduce module in main.js import ElementUI from 'element-ui'; import 'element-ui/lib/theme-chalk/index.css';Vue.use(ElementUI); 4. Expand a small knowledge point here Find the scripts service in the package.json file, and add -- open to ...

Posted on Tue, 12 Nov 2019 10:18:18 -0500 by pelleas1022