Simple example of reading incoming data from the COM port using SerialPort in C#. Everything is quite simple, to get the data, we will need to use the DataReceived event. Example: private string stroka=""; private void se…
СУБД MySQL имеет различные инструменты для осуществления поиска, среди которых оператор LIKE , осуществляющий простейшие операции поиска, оператор RLIKE , предоставляющий возможности поиска по регулярным выражениям. Оператор LIKE Оператор L…
Interpolated string in C# is a string preceded by the $ symbol. Such a string may contain special expressions in curly brackets: int x = 18; Console.Write($"Specified age {x} years."); // Outputs: Specified age 18 years.
Example of XML conversion to DYNAMIC and its use. To start, we will need some libraries: using System; using System.ComponentModel; using System.Xml.Linq; using Newtonsoft.Json; Code: string str = "<response><setter><name>K…
Example configuration for FTP (vsftpd) with user blocking in home directory. IInstalling FTP in Ubuntu: sudo apt install vsftpd This is simple. Now, open the configuration file: /etc/vsftpd.conf Check that the parameters in this file are as follows: ... Also, create a file ... (if it does not exist) and add user codes, for example: ... User codes can be viewed in /etc/passwd ...
Example of creating a SEQUENCE in MSSQL: CREATE SEQUENCE [dbo].[CardNum] AS [bigint] START WITH 1 INCREMENT BY 1 MINVALUE -9223372036854775808 MAXVALUE 9223372036854775807 CACHE GO This script will create a SEQUENCE…
To enable xp_cmdshell usage in MSSQL, you need to: -- Allow changing advanced options. EXEC sp_configure '\show advanced options\', 1 GO -- Update the current configured value for advanced options...