Author Archives: Robins

This application has no explicit mapping for /error, so you are seeing this as a fallback (How to Fix)

directory
I. Error Prompt:
Ii. Reasons:
Iii. Solution 1: Package of the mobile control layer:
4. Solution 2: Add @SpringBootApplication(scanBasePackages=” Controller “)
5. Summarize the reasons for possible errors:
Reason 1:
Reason 2:
Reason 3:
Vi. Cause of Error of Eclipse starting Springboot:


An error was reported when Springboot was running, other configurations were fine, and after a long look I found the cause.
I. Error Prompt:

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Mon Jun 24 14:56:23 CST 2019
There was an unexpected error (type=Not Found, status=404).
No message available

Ii. Reasons:
Problem with IDEA directory structure, the location of the Application startup class is wrong. To place the Application class on the outermost side, it contains all the subpackages. And my Controller is in the outermost package. The page could not be found.

Iii. Solution 1: Package of the mobile control layer:
Move the Controller class in, and it will run successfully.

Refresh again and the page will open successfully.

4. Solution 2: Add @SpringBootApplication(scanBasePackages=” Controller “)
In your Demo01Application class that you started, add a comment specifying the location of your Controller, and you can specify the load and solve the problem successfully.

package com.hh.demo01;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication(scanBasePackages="controller")
public class Demo01Application {

	public static void main(String[] args) {
		SpringApplication.run(Demo01Application.class, args);
	}

}

5. Summarize the reasons for possible errors:
This exception indicates that the url for the jump page has no corresponding value.
Reason 1:
The Application startup class is not in the right place. To place the Application class on the outermost side, it contains all subpackages
reason :spring-boot automatically loads all components under the package where the startup class is located and under its subpackages.
Reason 2:
In springboot configuration file: application. Yml or application. The properties on the view of the parser configuration problem:
when the spring under the pom file – the boot – starter – paren version used when high:
spring. MVC. The prefix/spring. MVC. The suffix
As spring under the pom file – the boot – starter – paren version low when use:
spring. The prefix/spring. The suffix
Reason 3:
Controller URL path writing problem
@RequestMapping(” XXXXXXXXXXXXXX “)
actual access path and “XXX” does not conform.
Refer to the article: https://www.cnblogs.com/lilinzhiyu/p/7921890.html

Vi. Cause of Error of Eclipse starting Springboot:
When the eclipse deployed project is launched, This application has no explicit mapping for /error, so you are seeing This as a fallback. At the same time, his log shows port 8080 being started.

And my configuration file has configured the port:

Later, it turned out that it was also because of the location of the package, that is, the above reason 1: the location of the Application startup class is wrong. To place the Application class on the outermost side, you include all subpackages because Spring-Boot automatically loads all components under the package where the startup class is located and under its subpackages.
After changing the position, it starts successfully, and the port is correct and the page is opened correctly.


Personal Summary:
I’m going to have to do some careful checking.

Latex Error pdfTeX error (ext4): \pdfendlink ended up in different nesting level than \pd fstartl

Recently wrote AAAI article, downloaded its template, but the pain is that it always gives an error, plus the references are always wrong:
As follows:

! pdfTeX error (ext4): \pdfendlink ended up in different nesting level than \pd
fstartlink.
\AtBegShi@Output … ipout \box \AtBeginShipoutBox
\fi \fi
l.119 \begin{equation}

! ==> Fatal error occurred, no output PDF file produced!
Transcript written on “Sample Mining AAAI 2017 — V3.log”.

Recently, I finally found out the reason, because it is better not to use hyperlink symbol macro package in this template, could it be incompatible??
You can see that I originally used the macro package \usepackage{hyperref}…

Now comment it out and see if it’s still an error?

You can see, well, that’s the reason…
Do not use this hyperlinked macro package on AAAI templates… Just..

Tensorflow training could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR error

Tensorflow1.10 Gpu: 2080 cuda: 9
Question:
Even if the batchsize is set to 1, there will be a problem when performing the training
could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
Solutions:
Searched a lot of methods, the following list of solutions
A,

config = tf.ConfigProto()
config.gpu_options.per_process_gpu_memory_fraction = 1.0
session = tf.Session(config=config, ...)

It doesn’t work for me…

config = tf.ConfigProto() 
config.gpu_options.allow_growth = True 
sess = tf.Session(config=config)

It doesn’t work for me…
Three,
Execute SUdo RM-f ~/.nv to solve the problem
It doesn’t work for me…
Four,
Set existing automatic growth in this way; That’s how I solved it,
Note that this is different from the second one, the green one, depending on the tensorFlow version, the import is different, and I’ve listed two;

from tensorflow.compat.v1 import ConfigProto
from tensorflow.compat.v1 import InteractiveSession
From tensorflow import ConfigProto
from tensorflow import InteractiveSession
config = ConfigProto()
config.gpu_options.allow_growth = True
session = InteractiveSession(config=config)

pathspec commit did not match any files known to git

Quotes can actually go wrong.
C:\lysoftware\gitprj\fsdgit>git commit -m ‘first commit’
Error: pathspec ‘commit’ does not match any known git file
C:\lysoftware\gitprj\fsdgit>git submission -m “first submission”
93 document changes, 4453 insertions (+)
Create schema 100644 .classpath
Create mode 100644 .project
Create mode 100644 .settings/org.eclipse.core.resources. create mode 100644 .settings/org.eclipse. jdk .apt.core. create mode 100644 .settings/org.eclipse. jdk .core. create mode 100644 .settings/org.eclipse. jdk .core. prefs
Create schema 100644 .settings/org.eclipse. t2 .core.prefs

Arduino ide 1.6.9 problems encountered error:’TKD2′ was not declared in this scope

Previously, I used an Arduino link to an infrared receiver to receive commands from the remote control. Control some peripherals. Using a library downloaded from Github.
I need to use it again these days. I’ve got a problem. The first error is
D:\Tools\Arduino\libraries\RobotIRremote\ SRC \ irremotetools.cpp :5:16: error: ‘TKD2’ was not declared in this scope
int RECV_PIN = TKD2; // the pin the IR receiver is connected to

            ^

Exit status 1
error for development board Arduino/Genuino Uno at compile time.
Tip me. TKD2 not found.
and then there’s the problem of finding two IRremote libraries. One of the libraries is used. So we can just delete the library that he gave the path to instead of the Arduino IDE installation directory. Write using the IRemote library provided by the Library in the Arduino IDE.
D:\Tools\Arduino\ Srtirremote \IRremoteTools. CPP :5:16: Error: ‘TKD2’ was not declared in this scope
int RECV_PIN = TKD2; // the pin the IR receiver is connected to

            ^

Exit status 1
error for development board Arduino/Genuino Uno at compile time.
I used an example of the arduino-CC remote control.
https://www.arduino.cc/en/Tutorial/RobotRemoteControl
He has too many examples. A lot I don’t need. I just want the code for his remote reception button. It is enough. But there is an error with a CPP in the library.
It looks like a CPP in the Library provided by Arduino IDE has an error. As a result. Open it up.
opens the CPP file prompted by the error.
D:\Tools\Arduino\libraries\RobotIRremote\src\IRremoteTools.cpp

#include "IRremote.h"
#include "IRremoteTools.h"
#include <Arduino.h>

int RECV_PIN = TKD2; // the pin the IR receiver is connected to
IRrecv irrecv(RECV_PIN); // an instance of the IR receiver object
decode_results results; // container for received IR codes

void beginIRremote(){
    irrecv.enableIRIn(); // Start the receiver
}

bool IRrecived(){
    return irrecv.decode(&results);
}

void resumeIRremote(){
    irrecv.resume(); // resume receiver
}

unsigned long getIRresult(){
    return results.value;
}

We found out he had this thing called TKD2. But there’s no declaration or define on it and then we’re going to look for his H header file.

#ifndef IRREMOTETOOLS_H
#define IRREMOTETOOLS_H

extern void beginIRremote();

extern bool IRrecived();

extern void resumeIRremote();

extern unsigned long getIRresult();

#endif

There is no declaration of TKD2
Then move on to D:\Tools\Arduino\libraries\RobotIRremote\ SRC \ irremotetools.cpp
to find the introduced.h header files. Let’s see if we have TKD2.
however. I am!

#include "IRremote.h"
#include "IRremoteTools.h"

I looked for both of them. There’s no such thing as TKD2. As for the

#include <Arduino.h>

You don’t have to look for this one. Because that’s what the Arduino environment comes with. The external library is definitely not going to have a variable or define in there.
so we come to the conclusion that there is a problem with the library code provided by the arduinio ide??Lie to me. I don’t read much. But as far as we can find out, the reason is that the library file code provided by his official is wrong… All right.
I went to the official place to get feedback. I did a little bit of searching. Some people say that 1.6.7 has this problem.
however. They either use something they don’t know why. Or code not written in the official tutorial. Then there are some messages and replies and so on that don’t make sense.
and of course I’m going to talk about it here. I got this error right here. Arduino.cc is a copy and paste of the code from the official arduino.CC tutorial. And check for basic syntax errors. Compile and you get this error

error: 'TKD2' was not declared in this scope

Arduino. Cc official remote library tutorial
https://www.arduino.cc/en/Tutorial/RobotRemoteControl
Let me just copy and paste it again. There’s still this mistake.
Ah. Let’s just do it ourselves. It’s easier.
We have two ways to solve this problem.
the first type:
modifier this CPP
D:\Tools\Arduino\libraries\RobotIRremote\ SRC \ irremotetools.cpp
bar

#include "IRremote.h"
#include "IRremoteTools.h"
#include <Arduino.h>

int RECV_PIN = TKD2; // the pin the IR receiver is connected to
IRrecv irrecv(RECV_PIN); // an instance of the IR receiver object
decode_results results; // container for received IR codes

void beginIRremote(){
    irrecv.enableIRIn(); // Start the receiver
}

bool IRrecived(){
    return irrecv.decode(&results);
}

void resumeIRremote(){
    irrecv.resume(); // resume receiver
}

unsigned long getIRresult(){
    return results.value;
}

Change TKD2 inside to 11 or the IO port on the data receiving port that you use to plug into the infrared receiver header to
to look like this

#include "IRremote.h"
#include "IRremoteTools.h"
#include <Arduino.h>

int RECV_PIN = 11; // the pin the IR receiver is connected to
IRrecv irrecv(RECV_PIN); // an instance of the IR receiver object
decode_results results; // container for received IR codes

void beginIRremote(){
    irrecv.enableIRIn(); // Start the receiver
}

bool IRrecived(){
    return irrecv.decode(&results);
}

void resumeIRremote(){
    irrecv.resume(); // resume receiver
}

unsigned long getIRresult(){
    return results.value;
}

I changed it to 11
Of course. So if you need to modify the port. Also modify the CPP file for the library of the Arduino IDE’s library. This is a bit of bull. Let’s do the second amendment.
second method. It’s written in C++ syntax.
of course. You can just copy my code.
modified
D:\Tools\Arduino\libraries\RobotIRremote\ SRC \ irremotetools.h

#ifndef IRREMOTETOOLS_H
#define IRREMOTETOOLS_H

extern void beginIRremote();

extern bool IRrecived();

extern void resumeIRremote();

extern unsigned long getIRresult();

#endif

Change the h file to

#ifndef IRREMOTETOOLS_H
#define IRREMOTETOOLS_H

extern void beginIRremote( int receivePin );

extern bool IRrecived();

extern void resumeIRremote();

extern unsigned long getIRresult();

#endif

It is an extern void beginIRremote(int receivePin);
this method adds a parameter
. Then we modify
D:\Tools\Arduino\libraries\RobotIRremote\ SRC \ irremotetools.cpp

#include "IRremote.h"
#include "IRremoteTools.h"
#include <Arduino.h>

int RECV_PIN = TKD2; // the pin the IR receiver is connected to
IRrecv irrecv(RECV_PIN); // an instance of the IR receiver object
decode_results results; // container for received IR codes

void beginIRremote(){
    irrecv.enableIRIn(); // Start the receiver
}

bool IRrecived(){
    return irrecv.decode(&results);
}

void resumeIRremote(){
    irrecv.resume(); // resume receiver
}

unsigned long getIRresult(){
    return results.value;
}

to

#include "IRremote.h"
#include "IRremoteTools.h"
#include <Arduino.h>

//int RECV_PIN = TKD2; // the pin the IR receiver is connected to
//IRrecv irrecv(RECV_PIN); // an instance of the IR receiver object
IRrecv *irr;
decode_results results; // container for received IR codes

void beginIRremote( int receivePin ){
    //irrecv.enableIRIn(); // Start the receiver
    irr = new IRrecv( receivePin );
    irr->enableIRIn(); 
}

bool IRrecived(){
    //return irrecv.decode(&results);
    return irr->decode(&results);
}

void resumeIRremote(){
    //irrecv.resume(); // resume receiver
    irr->resume();
}

unsigned long getIRresult(){
    return results.value;
}

All right. And then you fix it. Let’s look at the code we’re using

#include <IRremote.h>
#include <IRremoteTools.h>

void setup() {
  Serial.begin(9600);

  beginIRremote(11); // Start the receiver
}

void loop() {
  if (IRrecived()) {
    unsigned long res = getIRresult();
    Serial.println( res );
    resumeIRremote(); // resume receiver
  }
}

Then compile


The project uses 4,772 bytes and takes up (14%) of program memory. The maximum is 32,256 bytes.
Global variables use 432 bytes, (21%) of dynamic memory, leaving 1,616 bytes for local variables. The maximum is 2,048 bytes.

OK, that’s it.
Once again given the arduino. Cc official the use of remote control library tutorial address

error: a label can only be part of a statement and a declaration is not a statement (How to Fix)

The reason is an error caused by my declaration of variables after the case
Analysis of this problem:
Due to switch a few case statement in the same scope (because a case statement is label, but they belong to a switch beyond constant-like block), so if in some case the following statement variables, the scope of the object is between two curly braces, that is, the entire switch statement, other case statement can also see that such things can lead to errors. We can do this by adding curly braces to the statements that follow the case. The reason for the braces is to specify the scope of the variables we are declaring, just in this case. In fact, to write the switch-case statement more formally, we should add curly braces after the case statement.
Source code is as follows:

#include <stdio.h>

int main(int argc, char *argv[])
{
    int zt_num1 = 1, zt_num2 = 2;

    if (argc < 2) {
        printf("please input again\n");
        return -1;
    }

    if (!argv[1]) {
        printf("please input again\n");
        return -1;
    }

    switch(*argv[1])
    {
    case '+':
        zt_num1 = zt_num1 + zt_num2;
        break;
    case '$':
        zt_num1 = zt_num1 - zt_num2;
        break;
    case '#':
        int num = 3;
        zt_num1 = zt_num1 + zt_num2 + num;
        break;
    default:
        printf("please input again\n");
        break;
    }
    printf("%d\n", zt_num1);

    return 0;
}

The compilation results are as follows:

The modified code is as follows:

#include <stdio.h>

int main(int argc, char *argv[])
{
    int zt_num1 = 1, zt_num2 = 2;

    if (argc < 2) {
        printf("please input again\n");
        return -1;
    }

    if (!argv[1]) {
        printf("please input again\n");
        return -1;
    }

    switch(*argv[1])
    {
    case '+':
        zt_num1 = zt_num1 + zt_num2;
        break;
    case '$':
        zt_num1 = zt_num1 - zt_num2;
        break;
    case '#':
    {
        int num = 3;
        zt_num1 = zt_num1 + zt_num2 + num;
        break;
    }
    default:
        printf("please input again\n");
        break;
    }
    printf("%d\n", zt_num1);

    return 0;
}

The compilation and operation results are:

macos LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

The following error occurred while submitting Git today:

LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

Then I tried git clone other repositories, also reporting this error.
The proxy is used, but the solutions given by others, such as restart and reset commands, do not work.
Finally, a solution was found:

vim ~/.gitconfig

Delete the HTTPS configuration and you’re done. The proxy configuration was written to a file, so it’s no wonder Git doesn’t work.
reference
[1]. SSL_connect: SSL_ERROR_SYSCALL in connection to github.com: 443. https://stackoverflow.com/questions/48987512/ssl-connect-ssl-error-syscall-in-connection-to-github-com443
 

SQL Server calls Database Mail to send mail error: Msg 229, Level 14, State 5, Procedure sp_send_dbmail, Line 1 EXECUTE

  

Msg 229, Level 14, State 5, Procedure SP_send_dbmail, Line 1, EXECUTE Permission denied on Object ‘sp_send_dbmail’, Database ‘MSDB ‘, Schema’ dbO ‘.
This is because the current SQL Server login account (login) does not have permission to send database mail in the MSDB database, so you need to join the MSDB database user and give permission by joining the SP_addrolemEMBER role.
Assume that the SQL Server login account name is “DBA”
use msdb
The go
create user dba for login dba
go
Exec dbo.sp_addrolemember @rolename = ‘DatabaseMailUserRole’,
@ membername = ‘dbas’
go
 
At this point, if you send the database mail again, you may still have an error:
Msg 14607, Level 16, State 1, Procedure sp_send_dbmail, Line 119
profile name is not valid
Although the database user “DBA” already has permission to send messages in MSDB, this is not enough; he also needs permission to use profile: “dba_profile”.
 
use msdb
go
Exec sysmail_add_principalprofile_sp@principal_name = ‘DBA’
, @ profile_name = ‘dba_profile’
@ is_default = 1
 
This allows you to call Database Mail to send messages using your new account.

Solve the problem of Python in Windows environment: Fatal error in launcher: Unable to create process using'”‘ in pip installation

Resolve Fatal Error in Launcher: Unable to create process using ‘”‘ in Python: PIP installation in Windows environment
Python. Exe added to the system environment variables solution Python. Exe added to the system environment variables solution

directory
Python. Exe added to the system environment variable solution
When installing the requests package with PIP on the Windows Python2.7 environment, there was an error: Fatal error in launcher: Unable to create process using “”. At this point, you won’t know which one to use. The above error will occur.
you can use the command where PIP
to see how many pips have been installed.

you can see that there is only one PIP on this computer, which is very strange.
if the following 1 situation occurs:

indicates that there are multiple pips, you can use the following command 1 to solve the installation problem:

python2-m PIP install XXX
or
python3-m PIP install XXX using the specified version of python
Python. Exe system environment variables not added to the solution
This same problem occurs when python.exe is not added to a system environment variable, and there is only one version of the system environment variable PIP.
= 1.Python. Exe is not added to the environment variable
2. PIP in the environment variable only one version
this time to use Python. Exe full path to perform PIP,
command:
D:\DevFiles\python2.7\ python-m PIP install XXX
that is Python installation path -m PIP install XXX
as shown in the figure below: