Using canvas to save web pages as pdf files supports cross domain

Preface The previous essay said that Canvas screenshots are pictures. Next new requirement is to save the screenshots as PDF files for users to download. The screenshot page of Canvas in the previous article is picture: https://www.cnblogs.com/bubububu/p/9951185.html text Requirements: users click download to save the page as a PDF file and dow ...

Posted on Sun, 08 Dec 2019 19:37:39 -0500 by sigmon

Native JavaScript for sliding drag validation

Usually, to prevent users from maliciously submitting forms, we allow users to complete sliding-drag validation before submitting, which can sometimes be a bit of a backcrawl. Of course, there is more than one way to implement sliding validation, and here we use native JavaScript directly. Now you can Here See the full source code. Native impl ...

Posted on Sun, 08 Dec 2019 17:56:08 -0500 by kamy99

Copying the real traffic manometry ES cluster using gor

In production environments, we generally use esrally for benchmarking of es.However, it may be different from the real production request scenario.( Therefore, it is necessary to consider using real traffic to measure ES clusters. Common traffic replication tools are tcpcopy and so on. Here we introduce a simpler and easier-to-use tool, gor. ...

Posted on Sun, 08 Dec 2019 15:44:34 -0500 by riddlejk

Cross domain AJAX for IE8 and IE9

1. There is a code like this, ajax $.ajax({ url: "http://127.0.0.1:9001", type: "POST", data: JSON.stringify({"reqMsg":"12345"}), dataType: 'json', timeout: 1000 * 30, success: function (response) { if(response.n=='6'){ dosomething(); init(); ...

Posted on Sun, 08 Dec 2019 08:14:00 -0500 by dharprog

mongodb monitoring tool Mongo monitor installation and deployment

mongo monitor installation and deployment During the debugging of mongodb cluster, a small artifact was found. You dare not enjoy it alone! The related introduction is as follows:Mongo monitor cli is a simple and simple tool to check MongoDB services. During cluster debugging and upgrading, when troubleshooting, adding nodes, adjusting fragmen ...

Posted on Sun, 08 Dec 2019 06:45:23 -0500 by Daleeburg

Implementation of Web watermark SDK

In web browsing, web watermark is often needed to prevent users from tracking the source of users after exposing sensitive information in screenshots or video recordings. For example, our common pin software, chat background will have your name. So how to achieve the watermark effect? Web watermark SDK, implementation ideas 1. It can get more c ...

Posted on Sun, 08 Dec 2019 03:36:37 -0500 by Leveecius

H5 small game [Part 1] group word game

H5 a group of words game Project function introduction Thesaurus function, the project file is equipped with csv format Chinese common phrase thesaurus, each time randomly selected words for the game Match elimination function, automatically matching and eliminating selected words in Thesaurus Both the selected animation and the eliminated ani ...

Posted on Sun, 08 Dec 2019 01:21:52 -0500 by tycoon79

SpringBoot Unified Exception Handling

Sample code in https://github.com/laolunsi/spring-boot-examples 1. Global Unified Exception Handling Configuration Let's start with an interface: @RestController @RequestMapping(value = "") public class IndexAction { @GetMapping(value = "add") public Integer add(Integer a, Integer b) { return a+b; } } Think: What happens i ...

Posted on Sat, 07 Dec 2019 23:19:59 -0500 by sdaniels

NodeJs implements a simple crawler

1. Crawler: crawler is a program or script that automatically grabs web page information according to certain rules; use NodeJS to implement a simple case of crawler, and crawl the recruitment information related to the web front end of Boss direct employment website, taking Guangzhou as an example; 2. nodejs module used in the script express i ...

Posted on Sat, 07 Dec 2019 11:22:46 -0500 by unsider

Write a beautiful form page

How to write a beautiful form page Preface Recently, there are always various and strange demands for projects. The ui framework such as bootstrap can not meet the needs of customers. I can only use my brain and write some styles myself. How to adjust input style (including placeholder font style) /*placeholder Font color*/ ::-webkit-input-pla ...

Posted on Sat, 07 Dec 2019 11:14:31 -0500 by habanero25