Mongodb update array $pull modifier
1. $pull modifier deletes qualifying elements from the array in the following format:
{ $pull: { <field1>: <value|condition>, <field2>: <value|condition>, ... } }
2. Specify a value to delete all lists
Give a document under a stores collection
{
_id: 1,
fruits: [ "apples", "pears", "oranges", "grapes", "bana ...
Posted by vex__ on Mon, 20 Jul 2020 16:51:29 +0200
SpringBoot implements multiple data source configuration
Spring boot for multi data source configuration
springBoot implements the configuration of multiple data sources application.properties Configure two data sources in
spring.datasource.primary.url=jdbc:mysql://localhost:3306/test1
spring.datasource.primary.username=root
spring.datasource.primary.password=root
spring.datasource.primary.driv ...
Posted by AtomicRax on Mon, 20 Jul 2020 18:01:36 +0200
Several methods to find the maximum and minimum values in an integer array
In integer arrays, we need to get the maximum and minimum values of array elements from them:
Method 1: Sort using Array first, then from the sorted array, the first element is the smallest and the last element is the largest.
public static int FindMaxNumber(params int[] stringValue)
{
Array.Sort(stringV ...
Posted by gmp on Sun, 19 Jul 2020 16:30:03 +0200
Learn Python together: thread
thread
The thread module of python is a lower level module, and the threading module of python is a package for thread, which can be used more conveniently
Using the threading module
Single thread execution
#coding=utf-8
import time
def saySorry():
print("Honey, I'm wrong. Can I eat now?")
time.sleep(1)
if __name__ == "__main__":
...
Posted by Toshiba23 on Sun, 19 Jul 2020 18:09:13 +0200
android system camera returns picture (original)
Jurisdiction
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"></uses-permission>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></u ...
Posted by pharcyde0 on Mon, 20 Jul 2020 16:29:32 +0200