The 110th blog post of Xiao Liu
It's going to blow up. I've been trying to render the user's picture tonight, but I can't show it
I don't know where the problem is, but today I really understand a lesson, and I still need help from others. Today it's 9 o'clock, so I won't bother the teacher.
Tomorrow we must ask the teacher what's the matter, the code is the same, why can't m ...
Posted by koddos on Fri, 03 Apr 2020 03:36:50 -0700
How to upload pictures and post-processing in rich text editor of layui
The front page and JS are as follows:
<form class="layui-form" action="" >
<textarea name="tweets" id="tweets" style="display: none;"></textarea>
<script>
layui.use('layedit', function(){
var layedit = layui.layedit;
layedit.build('demo'); //Build editor
});
</sc ...
Posted by tacojohn on Fri, 03 Apr 2020 03:24:35 -0700
Simple RPC framework based on Socket+Zookeeper
RPC process details
Implementation content
json serialization
zookeeper implements service registration on the server side and service discovery and load balancing on the client side
Automatically scan the interface provided by the server and register it in zookeeper
Automatically generate client dynamic proxy objects
socket communication
M ...
Posted by alvinkoh on Fri, 03 Apr 2020 03:14:29 -0700
Python thread pool / process pool memory management
concurrent.futures thread pool / process pool memory management
cause
In the past, there was a need for a crawler task. A machine with 1G memory ran a crawler and crawled the data of a website. Previously, this method was used:
futures = list()
with ThreadPool(max_workers=20) as exc:
for tr in table.selec ...
Posted by knowj on Fri, 03 Apr 2020 00:03:35 -0700
PHP utility code snippet (2)
1. Convert URL: from string to hyperlink
If you're developing a forum, a blog, or a regular form submission, you often need users to visit a website. With this function, the URL string can be automatically converted to a hyperlink.
function makeClickableLinks($text)
{
$text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_+.~#?&//=]+)' ...
Posted by jonathanellis on Fri, 03 Apr 2020 00:01:20 -0700
Django + clipper to preview, cut and upload the Avatar
Train of thought:
Using the front-end plug-in of clipper, the pictures are cropped. The screenshot generated by clipper is a series of base64 codes, and then it is converted to blob format, which is transmitted to the back-end for storage. In short, it means that the front-end cut pictures are sent to the back-end, rat ...
Posted by Chinese on Thu, 02 Apr 2020 22:24:03 -0700
Method summary of jQuery serializing form (serialize(), serializeArray())
Summary of jQuery serializing forms
Now the static html page content in the case is posted here:
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="../js/jquery-3.2.1.js"></script>
</head>
<body>
&l ...
Posted by guru2k9 on Thu, 02 Apr 2020 20:23:37 -0700
Done a very simple front-end verification plus back-end jump
Today's release of this may be the most careless one of their own, a lot of problems want to understand, but when doing it, they found that not as they imagined, but also slowly debugging, on-line check a lot of methods are always not working, or their own grope out!
Front end display + verification + background query, ...
Posted by alexsaidani on Thu, 02 Apr 2020 17:54:43 -0700
[iOS KVC+Runtime, get the property name in the class, assign a value to the nonexistent key]
Sometimes, the json object distributed by the backend does not have a key (a field is not distributed),
In this case, kvc is used to get the value of the object. Although no error will be reported (the Convention returns strings), in fact, a property value of the model object is nil
such as
UserInfo.h has an attribute
@pr ...
Posted by JC99 on Thu, 02 Apr 2020 13:02:49 -0700
Wechat applet order insert (calendar)
Recently done Small program Development, out of hands-on, but also work needs, made a wechat app similar to the hotel booking calendar plug-in.
First of all:
This plug-in is divided into two parts: the upper part is the tab column, which will automatically locate to the current according to the current date, and displa ...
Posted by furtivefelon on Thu, 02 Apr 2020 09:42:36 -0700