Docker deploys Laravel applications - export PDF using wkhtmltopdf
Let's write about how to use this passage. wkhtmltopdf Export HTML as PDF.
I. Installation of fonts
WORKDIR /tmp
# Installation software
RUN set -eux \
&& apt-get update \
&& apt-get install -y --no-install-recommends wget unzip fontconfig
# Install Noto Sans SC font
RUN wget https://fonts.google.com/download?family=No ...
Posted by DarkEden on Wed, 09 Oct 2019 07:08:20 -0700
Shell script three swordsmen - Grep (advanced version of egrep), Sed, Awk commands
Grep command
1. Examples of Basic Regular Expressions - Finding Specific Characters
Here we will take the / etc/passwd file of all the local users as an example.
Demo1
[root@localhost ~]# Grep-n "root"/etc/passwd//-n denotes the display line number
1:root:x:0:0:root:/root:/bin/bash
10:operator:x:11:0:operator:/root:/sbin/nologin
2. E ...
Posted by Buddski on Wed, 09 Oct 2019 04:30:29 -0700
c++ Design Patterns 23 Command Patterns
Command mode
Definition:
Encapsulate different requests into abstract commands and call real class implementations through command internals
Advantage:
(1) Decoupling the requester and the recipient. The requester only needs to issue relevant commands to call the recipient method internally.
( ...
Posted by BuzzLY on Mon, 07 Oct 2019 18:11:57 -0700
Introduction to Audio and Video-05-RGB-TO-BMP Using Open Source Library
Directory of Audio and Video Introduction Articles
RGB-TO-BMP Review
Convert RGB data into BMP images:
Understanding BMP file format
Preparing BMP header information
Prepare BMP header
BMP stores RG B in B-G-R order
In the biHeight field of BitmapInfoHeader, biHeight is positive, bitmap is scanned from bottom to top, biHeight is negative, a ...
Posted by duke on Sun, 06 Oct 2019 13:20:52 -0700
springboot starts with a screen that resolves multithreaded [restarted Main]
Because the springboot project needs to add the function of startup waiting, that is, when the project is loaded and started, it needs to pop up a customized screen on the desktop, under which there is a progress bar.
1. Add file JWindows.java in the same place as Application
import com.CIDataCompare.a ...
Posted by JC99 on Sat, 05 Oct 2019 20:43:59 -0700
java threads: mutex and read-write locks
Links to the original text: https://my.oschina.net/u/580135/blog/612244
Two mutex mechanisms:
1,synchronized
2,ReentrantLock
ReentrantLock is a new feature of jdk5. ReentrantLoc ...
Posted by moberemk on Thu, 03 Oct 2019 18:47:40 -0700
Using guava cache to cache hot data locally
Some hot data may be visited thousands of times in a short time, so besides placing it in redis, it can also be placed in local memory, which is JVM's memory.
We can use google's guava cache component to implement local caching. We chose guava because it can control the size and timeout of key s and value s, configure LRU policies, and guava i ...
Posted by TropicalBeach on Wed, 02 Oct 2019 10:57:30 -0700
Providing an external http interface API based on grpc through grpc-gateway
The advantages of grpc are no longer described, but how to provide Restful interface to the outside world and how to use grpc-gateway to convert grpc to Restful API when there is no desire to develop the same function repeatedly.
install
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get -u github.com/micro/protobuf ...
Posted by kmussel on Mon, 30 Sep 2019 16:21:48 -0700
Detection of capital letters
Given a word, you need to determine whether it is capitalized correctly.
We define that the capitalization of a word is correct in the following cases:
All letters are capitalized, such as "USA".
All letters in a word are not capitalized, such as "leetcode".
If the word contains ...
Posted by kristen on Mon, 30 Sep 2019 07:13:48 -0700
The meaning of setting ConnectionTimeout and SetReadTimeout in jdk (in detail)
Let's start with an example.
Client:
package top.quartz.util;
/**
* description: //connect timeout Setting up connection timeout time;
* //read timeout,Is the timeout for data transfer.
* Both values must be set. If only one is set, either case will block.
* Then the current application present ...
Posted by mediabox on Mon, 30 Sep 2019 06:25:26 -0700