Mybatis (2) Parameters transfer

Mybatis parameter (Parameters) pass 1.. Single parameter Values of basic type, object type, collection type can be accepted.In this case, MyBatis can use this parameter directly without any processing.   <!-- according to id Query a record in a data table and encapsulate it User object --> <select id="selectById" resultType="com.s ...

Posted by Errant_Shadow on Tue, 14 Jul 2020 17:19:34 +0200

redis-sentinel cluster (k8s script)

1 redis backup It is recommended that rdb and aof be turned on simultaneously.rdb is on by default and aof is off by default.Refer to rdb and aof for additional details http://blog.csdn.net/guoxingege/article/details/48780745 1.1Redis.confConfiguration Details requirepass 123456 ## The following is the rdb confi ...

Posted by Alt_F4 on Tue, 14 Jul 2020 16:40:04 +0200

Solution with empty list in foreach tag in Mybatis

In the previous article Optimizing Mybatis in-query through interceptor Interceptor In, we have resolved the case of an empty in() list in the mybatis query. However, because the list in the foreach tag is empty, not only is an in() empty list, but another common situation occurs when data is inserted in batches, as follows: INSERT INTO table1( ...

Posted by eurozaf on Mon, 13 Jul 2020 17:30:03 +0200

docker builds redis cluster

docker builds redis cluster 1. Download the redis image docker pull redis 2. Prepare the configuration fileRedis.conf mkdir /home/docker/redis/ wget https://raw.githubusercontent.com/antirez/redis/3.0/redis.conf -O /home/docker/redis/redis.conf cd /home/docker/redis/ sed -i 's/# slaveof <masterip> <masterport>/slaveof red ...

Posted by legacyblade on Mon, 13 Jul 2020 16:48:41 +0200

Angular template reference variable (#var)

1. Template Reference Variables Template reference variables use the pound sign (#) to declare reference variables. Template reference variables are often used to reference a DOM element in a template, which can reference Angular components or directives or Web Component s. We can use a template to reference variables anywhere in the current ...

Posted by q1234ask on Mon, 13 Jul 2020 16:35:15 +0200

Use ContentObserver to listen for text messages to receive onChange method calls twice

I used to use BroadcastReceiver to listen for text messages, but I later learned that ContentObserver can also do this, and it's more convenient.So try this. ContentObserver works by observing (capturing) changes in the database caused by a particular Uri and then doing some appropriate work. During the process of listening for text messages ...

Posted by samvelyano on Sun, 12 Jul 2020 18:29:20 +0200

About how to set the default number of sms center number center, a huge question mark, solve!

For beginners, android 4.4 doesn't know how the default number for SMS centers is set, but now it's a rule to write a short summary of what you see every day, so let's just tell it! First I found a place to set the SMS center number on the display of the control: Filename: SimSettingPreferenceActivity.java @Override protected voi ...

Posted by bazza84 on Sun, 12 Jul 2020 18:24:47 +0200

Android Design Mode - Builder Mode

Builder mode is also a very common mode, such as AlertDialog in Android, which uses Builder design mode. Here is an example to illustrate. 1. First let's create a Person class class Persion { public String name; //Full name public int age; //Age public int income; //income public String getName() { return name; ...

Posted by eideticmnemonic on Sun, 12 Jul 2020 18:22:25 +0200

Solving Chinese Scrambling Problem of mysql+python on mac Platform

First, for mysql databases, the default character is latin1 This latin1 is the culprit that we can't write in Chinese.The solution, then, is to change the character set to UTF-8 The easiest way to do this is to modify the windowMy.iniProfile),My.iniWhere and how to modify it to UTF-8 is as follows: https://www.cnblogs.com/Ray-xujianguo/p/332 ...

Posted by htcilt on Sun, 12 Jul 2020 17:34:44 +0200

Experience with async/await

Running Environment This method is supported above node7 This feature is supported above chrome55 and is typically used in node development Introduction to async Async is actually the syntax sugar of promise, a method marked by async that returns a promise object async is defined as follows: async function name([param[, param[, ... par ...

Posted by alexguz79 on Sun, 12 Jul 2020 17:10:50 +0200