C + + string input (getline is used correctly)
Correct use of getline 1. String input 1.1 common errors and causes
#include<iostream>
const int SIZE=50; //Array length
using namespace std;
int main()
{
char name[SIZE]; //name
int age; //Age
cout << "Enter your name:" <<endl;
cin >> name; //Enter name
cout << "Enter your age ...
Posted by devang23 on Thu, 10 Feb 2022 06:22:13 +0100
Qt open source works | young man, write a Launcher for your Linux system
Today, I'd like to share with you how to implement a launcher (program launcher) with Qt.
Operation effect:
github link:
https://github.com/alamminsalo/qml-launcher
There is little code, and the C + + part is about 100 lines of code.
The following is the implementation process.
1. Create QML application
In Qt Creator, click:
-> ...
Posted by billcoker on Thu, 10 Feb 2022 06:17:52 +0100
String matching Pabinkarp
Title:
Judge whether the string s contains the string p.
The input takes up two lines: String s and string p.
The output contains the starting subscript of string p in string s. if there are multiple matches, all of them will be output, and each output will occupy one line.
Case:
Input:
ABABABA
ABA
Output:
0
2
4
Preliminarily explore t ...
Posted by defect on Thu, 10 Feb 2022 06:11:37 +0100
rsync+inotify real-time synchronization
1, Rsync server
(1) Introduction to rsync
Rsync is an open source, fast, multifunctional and excellent tool that can realize full and incremental local or remote data synchronous backup. And the attribute information of the original data can not be changed to realize the backup and migration characteristics of the data.Rsync software is a ...
Posted by pbase on Thu, 10 Feb 2022 06:05:55 +0100
Get started with React routing quickly without nonsense
This article aims to be concise and help you get started quickly. By default, you have been exposed to routing related development
install
Enter the following command to install:
// npm
npm install react-router-dom
// yarn
yarn add react-router-dom
React router related labels
There are eight common components of react Router:
import {
...
Posted by xtiano77 on Thu, 10 Feb 2022 06:04:03 +0100
How does SQL split and intercept comma-separated strings?
This article was written because of a recent need: Known field values for a table are irregular comma-separated strings with the following styles: Now split the field into four fields by comma with the following styles: I have not had a ready-made function in Baidu for a long time, so I can only think of my own way. First of all, the simplest ...
Posted by harryman100 on Thu, 10 Feb 2022 06:01:59 +0100
From Map -> HashMap step by step, please feel free to ask
Author: Mr. SM\Source: www.cnblogs.com com/king0/p/14176609. html1, MapMap 1.1 interfaceIn Java, Map provides key value mapping. The mapping cannot contain duplicate keys, and each key can only be mapped to one value.Based on Map key value mapping, Java Util provides HashMap (the most commonly used), TreeMap, Hashtble, LinkedHashMap and other d ...
Posted by Trenchant on Thu, 10 Feb 2022 05:52:26 +0100
SpringBoot integrates Redisson to realize Redis cluster distributed lock
Distributed lock usage scenario
Protect shared resources with locks, such as generating a unique serial number, ensuring sufficient inventory before placing an order in the e-commerce system, etc.
The core principle of RedLock algorithm:
N Redis master nodes that are completely independent and have no master-slave relationship are used to en ...
Posted by waq2062 on Thu, 10 Feb 2022 05:51:34 +0100
Writing penetration test scripts and learning records in python
Learning record of writing penetration test script in python (4)
Writing penetration test script in python -- information collection host discovery based on two protocols
This is my first time to write a blog. As a beginner of network security, I hope to record, consolidate and strengthen what I have learned in the form of blogging. At the sa ...
Posted by abhic on Thu, 10 Feb 2022 05:46:15 +0100
Assign multiple IP addresses to a network card on CentOS 7
Sometimes you may want to give a network card multiple addresses. What should you do? Buy another network card to assign the address? You don't have to do this in small networks. We can now assign multiple ip addresses to a network card in CentOS/RHEL 7. Want to know what to do? OK, follow me. It's not difficult.
First, let's find the IP addre ...
Posted by lixid on Thu, 10 Feb 2022 05:43:52 +0100