MySQL query and delete duplicate records
Table structure, data as follows:
CREATE TABLE `redis_num_mem` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Self increment id',
`cluster_id` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'Redis colony id',
`type` varchar(10) NOT NULL DEFAULT '' COMMENT 'key type',
`number` int(10) unsigned NOT NULL DEFAULT 0 COMMENT 'key ...
Posted by s4salman on Tue, 10 Dec 2019 16:00:02 -0800
Redis source reading notes - server startup and initialization
Start of server
The main function of Redis server is in server.c.
// server.c
int main(int argc, char **argv) {
struct timeval tv;
int j;
/* Set some constants of the server */
/* We need to initialize our libraries, and the server configuration. */
#ifdef INIT_SETPROCTITLE_REPLACEMENT
spt_init(argc, argv);
#endif
setl ...
Posted by jeff_papciak on Tue, 10 Dec 2019 00:11:57 -0800
If there is a problem in the Jedis case, can you help me see how to solve it? First of all, thank you for ordering in -- Day31
Today, I learned about Jedis, and then I made a case, but there was a mistake, and then I Baidu didn't solve it all night. I thought to see if I could have a big guy to help me see where the problem was. Baidu was a bit confused all night. Please help me out. I want to thank you very much in this place. Let's see. Thank you~
Here are the case r ...
Posted by Loafin on Mon, 09 Dec 2019 20:13:50 -0800
4. Construction and test of Redis connection pool
First, we will create a RedisPool class in our project
The code is as follows:
package com.mmall.common;
import com.mmall.util.PropertiesUtil;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
/**
* @author Chakid
* @since 2018-10-30 20:15
*/
public class RedisP ...
Posted by Virii on Mon, 09 Dec 2019 11:21:05 -0800
lua getting started demo (read by HelloWorld+redis)
1. lua introduction demo
1.1. Hello World!!
Because I am used to using docker to install various software, this lua script also runs on the docker container
Openresty is a variety of modules of nginx+lua, so you can install openresty directly in docker
Modify the nginx.conf configuration file, and add
lua_package_path "/usr/local/openresty/lu ...
Posted by HHawk on Sat, 07 Dec 2019 14:38:08 -0800
5. redis distributed lock
Reference link: https://www.cnblogs.com/linjiqin/p/8003838.html
1: Introduction
There are three ways to implement distributed lock: 1. Optimistic database lock; 2. redis based; 3. zookeeper based.
redis server is a single thread operation, which perfectly avoids the problem of multithreading synchronization and realizes atomicity.
First of all, ...
Posted by freshrod on Sat, 07 Dec 2019 12:19:12 -0800
Spring boot integrates shiro configuration
1. Configure lifecycle bean postprocessor to manage lifecycle
2. Configure ShiroFilterFactoryBean to set which paths require authentication and which do not
3. Enable shiro Aop annotation to support AuthorizationAttributeSourceAdvisor
4. Configure SecurityManager to manage custom realms, session s, and caches
Realm realizes logi ...
Posted by Wintergreen on Wed, 04 Dec 2019 20:33:14 -0800
python crawler project
python crawler scratch project (2)
Crawling target: fangtianxia national rental information website (starting url: http://zu.fang.com/cities.aspx)
Crawling content: City; name; rental method; price; house type; area; address; transportation
Anti creep measures: set random user agent, set request delay operation
1. Start to create project
1 scr ...
Posted by stelthius on Wed, 04 Dec 2019 03:37:38 -0800
Implementation of custom exception handling in CodeIgniter 3.0 + framework
background
The core code of ci3.0 framework automatically implements exceptions and the corresponding pages and methods thrown, which is not suitable for some personalized requirements, especially for the application of interface types. Therefore, it is necessary to change the handling of exceptions and 404 and other related exceptions without ...
Posted by mainewoods on Tue, 03 Dec 2019 06:09:04 -0800
Spring integration redis spring data redis
Spring data redis encapsulates the operation of redis. It is very convenient to use redis in projects
Integrating spring data redis is very simple. There are three files that need to be modified. 1.pom.xml 2.application-context.xml 3.redis.properties
1. Add spring data redis and redis dependencies in pom
<dependency>
...
Posted by big_al on Tue, 03 Dec 2019 05:17:41 -0800