A technical blog covering programming problem solutions, contest strategies, algorithms, data structures, and handy tech tools for developers.
Horner rule
Get link
Facebook
X
Pinterest
Email
Other Apps
-
Given a polynomial of the form cnxn + cn-1xn-1 + cn-2xn-2 + … + c1x + c0and a value of x, find the value of polynomial for a given value of x. Here cn, cn-1, .. are integers (may be negative) and n is a positive integer.
We are using GTID-based master-slave replication. In this replication, both master and slave should have the same GTID. This blog post aims to provide a step-by-step guide to help you set up MySQL Replication using GTIDs and help you replicate your MySQL data with ease. Prerequisite Master Source 1 Channel name: DEVELOPMENT Database: mydb1 Enable Replication For Tables testing1 testing2 testing3 Mysql Server Running: 192.168.0.201:3307 Master Source 2 Channel name: PRODUCTION Database: mydb1 Enable Replication For Tables testing4 testing5 testing6 Mysql Server Running: 192.168.0.201:3308 Slave Mysql Server Running: 192.168.0.209:3306 Configuration of masters(192.168.0.201:3307/192.168.0.201:3308) and slave (192.168.0.209:3306) my.cnf config for master (192.168.0.201:3307) my.cnf config for master (192.168.0.201:3308) my.cnf config for slave (192.168.0.209:3306) Steps for taking a dump and restoring it Run the following commands in both masters 192.168.0.201:3307 and 1...
Hi everyone 😀, Sorry😅 for not posting any blogs; I was stuck in other work. In the previous post, we saw that we enabled MySQL Replication using GTID . Today, we see how to allow Postgres Logical Replication in our local setup using docker-compose. Environment Setup We have two PostgreSQL instances configured using Docker Compose: Publisher (postgres-1): The source server where changes are captured. Subscriber (postgres-2): The destination server that receives replicated data. Docker Compose Configuration Publisher (docker-compose.yml) version: '3.8' services: postgres-1: build: ./ container_name: postgres-1 environment: POSTGRES_USER: postgresadmin POSTGRES_PASSWORD: admin123 POSTGRES_DB: postgresdb PGDATA: "/data" volumes: - ./postgres-1/pgdata:/data - ./postgres-1/config:/config - ./postgres-1/archive:/mnt/server/archive ports: - "5000:5432" networks: - custom_network ...
Regular expressions (regex) are a powerful tool for searching and manipulating text. They allow you to describe patterns of characters that you want to match, rather than specifying every possible combination of characters. In this blog, we will go over some common regex operations and provide examples for each one. Matching a literal string: regex: hello will match the string "hello". Matching any character: regex: . will match any single character. Matching a set of characters: regex: [aeiou] will match any single vowel. Matching a range of characters: regex: [a-z] will match any single lowercase letter. Matching a negated set of characters: regex: [^aeiou] will match any single non-vowel character. Matching zero or one occurrence: regex: a? will match either the string "a" or an empty string. Matching zero or more occurrences: regex: a* will match any string that contains zero or more "a" characters. Matching one or more occurrences: regex: a+ will matc...
Comments
Post a Comment
Please give us your valuable feedback