Tag:Terms of settlement

  • Mysql8 initialization settings

    Time:2021-7-25

    Reference environment: Ubuntu 20.04 + mysql8.0.23Installation: apt install -y mysql-server mysql-client 1、 General operation1. Initialize root password sudo mysql_secure_installation 2. Login to MySQL: #Login to MySQL: mysql -u root -p 3. Let’s look at the encrypted password: #mysql> use mysql; select host, user, authentication_string from user; 2、 Remote root access (not recommended): 1. After logging […]

  • Content-Type header is “text/html”, not “application/json”

    Time:2021-7-25

    report errorsDRF operation error valueerror: content type header is “text / HTML”, not “application / JSON” ———————————————————————- Traceback (most recent call last): File “C:\Users\17293\Desktop\Coder\Python\Django\twitter\newsfeeds\api\tests.py”, line 41, in test_list print(response.json()) File “C:\Users\17293\AppData\Local\Programs\Python\Python39\lib\site-packages\django\test\client.py”, line 662, in _parse_json raise ValueError( ValueError: Content-Type header is “text/html”, not “application/json” ———————————————————————- Ran 1 test in 0.362s FAILED (errors=1) Destroying test database […]

  • Problems encountered by sublime in running Python

    Time:2021-7-16

    1. Create a new test.py through sublime, input the following code and save it: print(“Hello wujunsong”); Press “Ctrl + B” to run, and error 2 will be prompted. The specific error code is as follows: [Error 2] [cmd: [u’python’, u’-u’, u’F:\\Python\\MyPython\\hw.py’]] [dir: F:\Python\MyPython] [path: F:/Python/python.exe] [Finished] Solution: enter “path” through the CMD window to check […]

  • Maven packing prompt failed to execute goal

    Time:2021-7-16

    This is generally caused by test case execution errorterms of settlement:1. Make the test case run through without error2. Do not perform the testOne is the command line mvn clean package -Dmaven.test.skip=true Second, write to POM file <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> <skipTests>true</skipTests> </configuration> </plugin> PS: welcome to join my QQ group 1057838553

  • Error: Cannot find module ‘commander‘

    Time:2021-7-7

    1. Error description ​ 2. Cause of error Check the prompt of Vue cli version. The module commander cannot be found 3. Solutions Method 1: re install the commander, NPM install   commander –save Key tips: don’t install it in the directory where node is installed. It doesn’t work; Method 2: install Vue cli globally, […]

  • Loading JS in yii2 view

    Time:2021-6-25

    class AppAsset extends AssetBundle { public $basePath = ‘@webroot’; public $baseUrl = ‘@web’; public $css = [ ‘css/bootstrap.css’, ‘css/cesi.css?20201111’, ‘css/bootstrap-select.min.css?r202012’ ]; public $js = [ [‘js/jquery-2.1.4.js’ ], [‘js/bootstrap.min.js’ ], [‘js/echarts.min.js’ ], [‘js/bootstrap-select.min.js’ ] ]; public $depends = [ ‘yii\web\YiiAsset’, ‘yii\bootstrap\BootstrapAsset’ ]; } Generally, the default JS file will be loaded at the bottomThis will lead […]

  • When adding a dot before a new folder name in windows, you are prompted to type a file name

    Time:2021-6-24

    Because some open source software uses the folder at the beginning of dot as a hidden directory, it is inevitable to create such a folder. However, if you change the name directly in the resource manager on windows, an error message like the following will appear: The solution is to create a folder with batch […]

  • Go cannot find package “go-sql-driver/mysql” in any of

    Time:2021-6-14

    The solution of cannot find package “GitHub. COM / go SQL driver / MySQL” in any of The main problem is lack of informationgo.modDocuments.To solve the problem, you need to initialize ago.modDocuments; Use the following command: go mod init Gone This work adoptsCC agreementReprint must indicate the author and the link of this article

  • After installing Dlib and face_ Recognition, but it can’t be imported in Python ide

    Time:2021-6-12

    In Dlib and face_ After recognition is successfully installed through PIP (how to install through pip is mentioned in the blog’s last essay), it cannot be imported in pychar. After synthesizing all kinds of opinions on the Internet, I found the reasons and shared the solutions below. In pychar   File→Settings→P roject:xxx →Project Interpreter   […]

  • Time format solution of golang structure JSON

    Time:2021-6-9

    There is a problem in today’s development process. There is a date field (type: date) in the database. After it is queried, it will be in the format of 2021-01-01 t20:08:23.000000028 + 08:00. I only need 2021-01. The solutions are listed below //Define a type alias type JsonTime time.Time //The JSON serialization method to realize […]

  • LNMP: to solve the problem of upstream timeout in nginx proxy

    Time:2021-6-5

    Causes This happens when the interface is requested. The interface request time exceeds the maximum execution time allowed by nginx or PHP, or the length of the data returned by the interface is too long, resulting in truncation. resolvent Check the php.ini file Modify Max in php.ini file_ execution_ After modification, restart the corresponding service. […]

  • Data frame data storage CSV — data conversion problem

    Time:2021-5-14

    problem In the process of dataframe data processing, sometimes the elements of a column are all lists or tensors, such as: import pandas as pd import numpy as np data_test = { “a”:[[1,2],[3,4],[5,6]], “b”:[4,5,6], “c”:[7,8,9] } df_test = pd.DataFrame(data_test) At this time, if the data is saved in the CSV format df_ test.to_ CSV (“. […]