• MySQL Introduction (2) – database information reference


    We talked about MySQL and SQL structured query statements in the previous article, and we will learn about them step by step. 1. Login MySQLMySQL – u user name – P passwordFor example: mysql-uroot-pabc123The results are as follows: 2. Check the databaseshow databases;The results are as follows: 3. Use the specified databaseUse specified databaseFor example: […]

  • On HTML string regular judgment and matching


    Preface Recently, when writing a component, you need to pass in an HTML string, which uses a lot of regularities to determine whether it is an HTML tag or matches the text in the tag, etc., which is recorded here. How to judge whether the incoming string contains a closed HTML tag /<\/?[a-z][\s\S]*>/i In fact, […]

  • Use cookies to prevent malicious clicks


    /Set cookies to avoid malicious clicks/ function setCookie(key,value,times) { var exdate=new Date(); Exdate. SetTime (exdate. Gettime() + (times * 60 * 1000)); // times if it is 6, the cookie life cycle is 6 minutes document.cookie=key+ “=” +escape(value)+ ((times==null) ? “” : “;expires=”+exdate.toGMTString()); } function getCookie(key) { if (document.cookie.length>0) { c_start=document.cookie.indexOf(key + “=”); if (c_start!=-1) […]

  • Getting started with simple MD


    An entry note of mark down Experience I always thought that the writing method of MD file would be very complex, and then I found it was so simple after contacting it that I could start in 3 minutes. With some simple symbols, you can write a clean page. Use her, will gradually fall in […]

  • learning OpenCV3 – data type


    three classes of initials basic data types Usually inherited from C + + int, float, etc vectors,matrices,simple geometric concepts like points, rectangles,sizes helper objects Represents some more abstract concepts garbage-collecting pointer class range objects used for slicing abstractions such as termination criteria large array types contain arrays or other assemblies of primitives or, more often, […]

  • Linux crontab command parameters and time format description


    Crontab is used to let users execute programs at a fixed time or interval Parameter description option function -e Edit crontab scheduled tasks -l Query crontab task -r Delete all crontab tasks of the current user Time format project Meaning Range First “*” The first few minutes of an hour 0-59 Second “*” Hours of […]

  • Group by LINQ expression based on multiple fields in C × set


        void Main() { var empList =new List { new Employee {ID = 1, FName = “John”, Age = 23, Sex = ‘M’}, new Employee {ID = 2, FName = “Mary”, Age = 25, Sex = ‘F’}, new Employee {ID = 3, FName = “Amber”, Age = 23, Sex = ‘M’}, new Employee {ID […]

  • Single table serialization and single table deserialization


    from rest_framework import serializers from django.db import models Student list class Student(models.Model):   Name = models. Charfield (max? Length = 32) ා student name   IMG = models. Charfield (max? Length = 255)   class Meta:     DB table =’student ‘ා table name Student list的序列化 class StudentSerializer(serializers.ModelSerializer):   class Meta:     Model = student table name     Fields = ‘× all × […]

  • Ubuntu install gitlab runner


    Step one: Add gitlab’s official Repository: curl-L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash The second step: Install the latest version of gitlab runner: apt getinstall gitlab-runner It’s already installed You can start to register the runner The command is: gitlab runner register After input, the first step will appear: Please enter the gitlab CI coordinator URL (e.g. […]

  • 1. Pyplot basic syntax


    Catalog 1. Pyplot basic syntax 2. Scatter chart and line chart 3. 3D map and contour map 1. Pyplot basic syntax (1) Create canvasFigure () creates a blank canvas. You can specify the size of the canvas, figsize, and set the resolution DPI plt.figure() PLT. Figure (figsize = (8,6), DPI = 80) ා (8,6) represents […]

  • Cross domain problem handling between yii2 and Vue


    Add the following to the controller header(“Access-Control-Allow-Origin: *”); //If you need to set up a cross domain request that allows all domain names to initiate, you can use the wildcard * to write your own domain name if you restrict your domain name. //The response type * represents a wildcard, which can indicate fixed types […]

  • Getting started with regular expressions written to the front end


    1. overview stayJavaScriptUse in//To create a regular expression object, you can also usenew RegExp() Common methods related to regularization arematch、testandreplace。amongmatch,replaceThey’re all methods on strings,testIs a method on a regular object. See the specific figure below: 2. Match single character /reg/You can match specific strings directlyreg。 /[arzy]/Brackets in[]MatcharzyAny single character in /[f-h]/Middle bar-In the matching alphabet […]