Laravel full text searchelasticsearch
Using Elasticsearch search search engine, configure ik Chinese word segmentation, associate with Laravel model, and then realize the business logic of search. This is the end of the article. Use the Scout extension package of Laravel to complete the search function
To continue, Scout and Elastic enabled expansion packs have been installed and c ...
Posted by fpyontek on Sat, 02 Nov 2019 21:57:24 +0100
[leetcode]73. Set Matrix Zeroes to 0
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in-place.
Example 1:
Input:
[
[1,1,1],
[1,0,1],
[1,1,1]
]
Output:
[
[1,0,1],
[0,0,0],
[1,0,1]
]
Example 2:
Input:
[
[0,1,2,0],
[3,4,5,2],
[1,3,1,5]
]
Output:
[
[0,0,0,0],
[0,4,5,0],
[0,3,1,0]
]
...
Posted by glowball on Sat, 02 Nov 2019 10:57:19 +0100
Reverse list & exchange list node
leetcode list reverse link
Summary of requirements:
Invert a single chain table
Input: 1 - > 2 - > 3 - > 4 - > 5 - > null
Output: 5 - > 4 - > 3 - > 2 - > 1 - > null
The approach is to consider the next of the node in the linked list to point to its previous node, so as to reverse.
/**
* Definition for singly-linke ...
Posted by BenGilbert on Sat, 02 Nov 2019 09:22:35 +0100
Struts2 -- add, delete, modify and query
Using struts to complete adding, deleting, modifying and checkingIdeas: 1. Import related pom dependencies (struts, custom tag library dependency) 2. Import the paginated tag class, z.tld, and complete the configuration of web.xml 3. dao layer to access data 4. The web layer calls the dao layer to return data to the foreground. 5. Configur ...
Posted by GateGuardian on Sat, 02 Nov 2019 08:29:39 +0100
mysql master-slave dual master configuration
mysql dual primary configuration
mysql dual masters are actually synchronous and subordinate to each other.
Any one can perform the insert action
The production environment is used very little, because there are still concerns about data consistency.
The production environment is generally enough
The configuration of 172.19.132.121 starts ...
Posted by misterph on Sat, 02 Nov 2019 08:19:58 +0100
Discue forum of LNMP architecture
LNMP architecture
LNMP platform is the combined architecture of Linux, Nginx, MySQL and PHP. It requires Linux server, MySQL server and PHP parsing environment
Component component
Linux is a kind of Unix computer operating system, which is the most popular free operating system.
Nginx is a high-performance HTTP and reverse proxy server.
Mysql ...
Posted by sampledformat on Sat, 02 Nov 2019 06:51:53 +0100
Flexible use of [laralve] accessor
author: Ka Ka
WeChat: fangkangfk
This is material.
Database:
Source code:
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Commodity classification
*/
class GoodsCategory extends Model
{
protected $fillable = ['name', 'category_image'];
protected $ ...
Posted by prometheuzz on Sat, 02 Nov 2019 05:21:44 +0100
PHP algorithm -- binary search
Two points search
Binary Search, also known as Binary Search, is an efficient search method. However, half search requires that the linear table must adopt the sequential storage structure, and the elements in the table are ordered by keywords.
Algorithm requirements
1. Sequential storage structure must be adopted.2. The keywords must be arran ...
Posted by PHP'er on Sat, 02 Nov 2019 00:59:55 +0100
Trouble of router view in Vue router
When I first contacted vue, I was puzzled by the rendering of router view for a long time. I don't know why there are many router links and different router views, but why is there no confusion in rendering?
This is a demo I wrote myself
On the left is the primary route, on the right is the component corresponding to the primary route. On t ...
Posted by deeessay on Fri, 01 Nov 2019 20:33:35 +0100
CF1168C And Reachability [structure, dp]
Title Link: Luo Gu
Title Description: give the number of $n $$a_i $, if $I < J $and $a_i & a_j > 0 $, then $I $to $J $are connected with a directed side, $q $times, and ask if it can reach $r $from $l $.
Data range: $n,q\leq 3*10^5$
A wonderful thought problem. (binary is used for the following)
Maintain two arrays, $g {i, j} $ind ...
Posted by icedude on Fri, 01 Nov 2019 16:39:38 +0100