Python syntax foundation of day

Basic Python learning day_02 Use method to change the case of a string Change the initial of a string to uppercase >>> name = "ada lovelace" >>> print(name.title()) Ada Lovelace Make all strings uppercase >>> print(name.upper()) ADA LOVELACE Make all strings lowercase >>> print(name.lower()) ada lovelace ...

Posted on Sat, 16 May 2020 23:07:20 -0700 by Harry57

python from introduction to practice Chapter 6 exercises (Advanced Programming Technology week3-2)

python from introduction to practice Chapter 6 exercises (Advanced Programming Technology week3-2) This lesson is mainly about the use of dictionary data structure in python. Basic use of dictionary 6-1 person dict={ "first_name" : "Walker", "last_name" : "Mike", "age" : "18", "city" : "New York", } p ...

Posted on Tue, 31 Mar 2020 06:43:19 -0700 by scratchwax2003

Ruby: calling class methods from instances

In Ruby, how do you call class methods from instances in this class? Say I have class Truck def self.default_make # Class method. "mac" end def initialize # Instance method. Truck.default_make # gets the default via the class's method. # But: I wish to avoid mentioning Truck. Seems I'm repeating myself. end end ...

Posted on Wed, 18 Mar 2020 07:18:05 -0700 by wih

SPI Principle of dubbo Source Analysis 1 and IOC and AOP Principles

1. What is Dubbo SPI First, look at the description of the dubbo website: The SPI is called Service Provider Interface and is a service discovery mechanism.The essence of SPI is to configure the fully qualified name of the interface implementation class in a file and load the implementation class by r ...

Posted on Sat, 11 Jan 2020 16:41:54 -0800 by sfmnetsys

Centos7 install and upgrade Ruby

background When doing the redis cluster, you need to use Ruby tools to operate. It is found that the version of ruby installed online is too low, and the version supported by redis is at least 2.2.2   Install ruby Online Install ruby online using yum with version 2.0.0. yum install ruby ruby -v Add ruby repository ...

Posted on Tue, 31 Dec 2019 09:43:53 -0800 by mark_kccs

Advanced Feature Use for Redis

Optimistic Locks and Transactions Use watch to monitor a key; Open transaction for operation; Submit the transaction after the operation is completed; If the watch key changes before committing, the committed transaction will not work; /** * Test transactions and optimistic locks */ @RunWith(SpringRunner.class) @SpringBootTest ...

Posted on Mon, 23 Dec 2019 10:21:11 -0800 by dvdflashbacks

Redis Clustering on a Single Linux Server

1. Introduction to Redis Redis is currently a large-scale cache middleware, which is widely used because of its powerful, efficient and convenient functions. Redis released 3.0.0 in 2015, officially supporting redis clusters.The redis cluster was designed with decentralization and Middleware in mind.That is, each node in the cluster has an equ ...

Posted on Sat, 21 Dec 2019 13:14:06 -0800 by Rabioza123

Non relational database - redis cluster

redis cluster, experimental environment: two servers, six nodes, three network cards for each server Six nodes, three masters, three replicas Install redis on the primary server [root@localhost ~]# yum install gcc gcc-c++ make -y #Install environment package [root@localhost ~]# mkdir /abc [root@localhost ~]# Mount.cifs / / 192.168.100.25/redi ...

Posted on Tue, 17 Dec 2019 14:54:45 -0800 by nvidia

Redis5.0.7 cluster building (latest version of actual combat!!!)

Experimental environment Two Centos 7 virtual machines are added with three network cards to simulate the real situation of six servers Server role IP address Master node M1 192.168.142.130 Master node M2 192.168.142.145 Master node M3 192.168.142.146 Slave node S1 192.168.142.143 Slave node S2 192.168.142.147 Slave node S3 19 ...

Posted on Wed, 11 Dec 2019 13:10:58 -0800 by hwttdz

redis three master three slave deployment

Server A: 192.168.3.188 centos7Server B: 192.168.3.189 centos7Turn off firewalld firewall and selinux;Redis version 4.0.1, at least 6 sets of redis cluster yum -y install wget vim tcl gcc make mkdir –p /usr/local/redis cd !$ wget http://download.redis.io/releases/redis-4.0.1.tar.gz tar –xvf redis-4.0.1.tar.gz make make test-No mistake. Go on / ...

Posted on Mon, 09 Dec 2019 14:40:48 -0800 by Ruud Hermans