• My mongodb is blackmailed by bitcoin, 600 dollars can recover data


    Finding anomalies At 10:00 a.m. on November 18, 2019, I randomly tested the app and found that I could not log in. It’s strange, because this user can’t exist. Then, I connected to the database and found an amazing scene. One more in mongodb, I don’t knowRECOVERAYDatabases, and other related application databases, are all gone. […]

  • How to check parameters gracefully in springboot


    Preface One of the most annoying things about web development is to check parameters. Basically, every interface needs to check parameters. For example, some format checks that are not empty are essential. If there are fewer parameters, it’s still easy to handle. But if there are more parameters, a large number of them will appear […]

  • JS advanced – regular expression practice ID number


    Write regular expression, write regular expression according to string to match Experience: 1. Find rules 2. Don’t pursue perfection   Regular expression of ID card 15 or 18 ([1-9][0-9]{14})|([1-9][0-9]{16}[0-9xX]) ([1-9][0-9]{14})([0-9]{2}[0-9xX])?     1. Regular expression of telephone number 010-19876754 0431-87123490 [0-9]{3,4}[-][0-9]{8} \d{3,4}[-]\d{8} \d{3,4}[-][0-9]{8}     2. Regular expression of QQ number [1-9][0-9]{4,10} \d{5,11}      […]

  • JS advanced – Case: verify whether the user input the mailbox or not


    Case: verify whether the user has entered a mailbox   title Please enter email address:* < span style = “background color:” f5f5f5; color: “008000;” ></span> < span style = “background color:” f5f5f5; color: “008000;” ></span> <span style=”background-color: #f5f5f5; color: #000000;”> document.getElementById(</span><span style=”background-color: #f5f5f5; color: #000000;”>”</span><span style=”background-color: #f5f5f5; color: #000000;”>email</span><span style=”background-color: #f5f5f5; color: #000000;”>”</span><span style=”background-color: #f5f5f5; […]

  • Swift_RfcComplianceException: Address in RFC 2822, 3.6.2


    Problem reason RFC is a mailbox checking rule. If the mailbox does not meet the rules, an error will be reported. Terms of settlement Changing mailboxes Modify source code and remove RFC restrictionsThe file directory is:/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Mime/Headers/MailboxHeader.php private function assertValidAddress($address) { if (!$this->emailValidator->isValid($address, new RFCValidation())) { throw new Swift_RfcComplianceException( ‘Address in mailbox given [‘.$address.’] does not […]

  • JS advanced – Case: validation form


    Case: validation form   Document <span style=”background-color: #f5f5f5; color: #800000;”> body </span><span style=”background-color: #f5f5f5; color: #000000;”>{</span><span style=”background-color: #f5f5f5; color: #ff0000;”> background</span><span style=”background-color: #f5f5f5; color: #000000;”>:</span><span style=”background-color: #f5f5f5; color: #0000ff;”> #ccc</span><span style=”background-color: #f5f5f5; color: #000000;”>;</span> <span style=”background-color: #f5f5f5; color: #000000;”>}</span><span style=”background-color: #f5f5f5; color: #800000;”> label </span><span style=”background-color: #f5f5f5; color: #000000;”>{</span><span style=”background-color: #f5f5f5; color: #ff0000;”> width</span><span style=”background-color: […]

  • GitHub: more people work together and move bricks more happily


    When we are writing large-scale projects, we often need cooperation and collaborative development. In this article, we will summarize three ways to achieve team cooperation on GitHub. GitHub is a very good code hosting tool. Please refer to my previous article “guide to GitHub, the world’s largest same-sex dating website”. Organization&Team Create organization Go to […]

  • The application of regular expression in IOS development


    In the process of code development, we often need to verify the mailbox, mobile phone number and so on. At this time, we need to use regular expressions. In IOS development, two can be used for regular verificationNSPredicateandNSRegularExpression 。 NSPredicate NSPredicateIt can be used for simple regular verification, but its problem is that it cannot […]

  • . net core – email sending (synchronous, asynchronous) underlying code (welcome to leave a message for discussion)


    using MailKit.Net.Smtp;using MimeKit;using System;using System.Collections.Generic;using System.IO;using System.Threading.Tasks; namespace ConsoleApp2{ class EmailEntity { /// ///Send mail synchronously /// /// mailbox /// Title /// text /// Attachment path collection /// Upload attachment or not public static void Send(string email, string subject, string message, List filesPath, bool IsPostFiles=true) { var emailMessage = new MimeMessage();/ / sender emailMessage.From.Add(new MailboxAddress(“Name”, […]

  • Node & single page application to make a complete user system!


    1. opening remarks User systems are the foundation of many websites. This article is mainly about how to write aNodeThe functions of this user system include: registration, login, automatic login, forget password, change password, email activation.If we use the template engine at the back end instead of the front-end and back-end separation scheme, the user […]

  • HTML 5 form validation (4 practical cases of form beautification)


    Multipart / form data must use theAutocomplete = “on” autocomplete functionNovalidate do not validate placeholder RequiredAutofocus default focusPattern regular verification Datalist’s memory of the selection boxList memory HTML5 constraint validation API Id.validity get validation constraints console.log(username.validity); If the length of the input value is greater than the required length, the required length part is truncated […]

  • Maven local submodules are interdependent


    Many times, our own project has many sub modules, which depend on each other, but we don’t have private server to publish the jar package The most common is that there is a local util package. Other projects written at will want to be referenced, but suffer from no private server. Throwing code into the […]