Category Archives: Error

How to Solve DB2 uses Limit Error

preface

Prepare DB2 to use a simple limit query, and the result reports an error
Baidu has a wave. The previous articles are of no use at all, but they still report errors
later, we finally found a correct one and recorded a wave.

Text

SQL sample for DB2:

select * from sname.usertable fetch first 10 rows only

DB2 uses fetch first 10 rows only to return the first 10 rows of data
MySQL uses limit 10 to return the first 10 rows of data
Oracle uses rownum & lt= 10 returns the first 10 rows of data.

How to Solve Kotlin unresolved reference error

A crazy problem is that after the project is transferred to kotlin, it always reports: unresolved reference: XXXXXXX
the pre compilation of the project can report no error, but the problem is reported as soon as the mark is marked. The location of the problem is related to the interface defined by kotlin in in the project,
so it begins to solve:
check whether there are bugs in the definition code of the interface. The conclusion is no problem. Check whether there are bugs in the implementation of the interface. The conclusion is that the implementation class has not been executed to the environment, whether there are problems, and the version of gradle and other related tools has not been upgraded. Therefore, create a new kotlin module to import the error interface class, Results it works normally

conclusion:
when defining the interface of kotlin in the module of Java environment, an error will be reported during compilation.

How to Solve canal & MYSQL or “Kafka cannot consume data” Error

Error 1: interaction between canal and MySQL

Explanation: the essential reason is that the same IP generates too many interrupted database connections (exceeding the maximum value of max_connect_errors) in a short time

If the MySQL server continuously receives requests from the same host, and all these continuous requests are unsuccessful, the established connection will be interrupted. When the cumulative value of these continuous requests is greater than When you set the value of max_connect_errors, the MySQL server will block all subsequent requests from this host.

Solution:   Mysqladmin flush hosts – H 127.0.0.1 – uroot – P password

Error 2: Kafka cannot consume data

Reason: the number of partitions of the theme I created is insufficient. You can manually add the same number of partitions as those set in instance.properties in conf/example of canal

Execute the following command:

//1. View the subject details and the number of partitions

kafka-topics.sh –bootstrap-server hadoop102:9092 –describe –topic ODS_BASE_DB_C

//2. Manually add the number of partitions

kafka-topics.sh –bootstrap-server hadoop102:9092 –alter –partitions 4 –topic ODS_BASE_DB_C

TensorRT model quantization error: Error Code 1: Cuda Runtime (an illegal memory access was encountered)

When using tensorrt for model quantization on A10 graphics card, the following error is reported.

[W] [TRT] Calibration Profile is not defined. Running calibration with Profile 0
[I] calib data processed : 0/4680batch
[E] [TRT] 1: [calibrator.cpp::add::779] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
[E] [TRT] [executionContext.cpp::commonEmitDebugTensor::1258] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
[E] [TRT] [executionContext.cpp::executeInternal::610] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
[F] [TRT] [defaultAllocator.cpp::free::85] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
[F] [TRT] [defaultAllocator.cpp::free::85] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
[F] [TRT] [defaultAllocator.cpp::free::85] Error Code 1: Cuda Runtime (an illegal memory access was encountered)
terminate called after throwing an instance of 'nvinfer1::CudaRuntimeError'
  what():  an illegal memory access was encountered
Aborted

This is because the architecture does not match. Add 86 to a10

Therefore, modify my makefile. Here is my makefile fragment, originally SMS= 60 61 62 70 72 75, I added 86

# Gencode arguments
SMS ?= 60 61 62 70 72 75 86

ifeq ($(GENCODE_FLAGS),)
# Generate SASS code for each SM architecture listed in $(SMS)
$(foreach sm,$(SMS),$(eval GENCODE_FLAGS += -gencode arch=compute_$(sm),code=sm_$(sm)))

[Solved] PSPICE Error: ERROR(ORPSIM-16276): Can‘t find library

Pspice encountered error (orpsim-16276): can’t find library

The nom.lib file is shown in the figure. In the correct position, the components are also dragged out of the library, but the error is still reported. Solution: select the nom.lib file and add as global again. It will pop up saying that it has been added and ignored directly. Then click apply and then click OK to solve the error
this error is encountered many times later. I don’t know the reason, Delete the original and add it again

error: expected ‘;‘ at end of member declaration and expected ‘)‘ before ‘&‘ toke Errors

error: expected ‘;’ at end of member declaration
error: expected ‘)’ before ‘&’ Token
error reporting

When developing c + + in Linux environment, the following compilation errors or other inexplicable errors occur while ensuring that there are no errors in the code

	error: expected ';' at end of member declaration
	error: expected ‘)’ before ‘&’ toke

Solution:
check whether the header file contains circularly. For example, a.cpp contains B.H, b.cpp contains C.H, and c.cpp contains A.H to form a ring. In this case, an error will be reported.

Keil Compile Error: ..\OBJ\USART.axf: error: L6002U: Could not open file ..\obj\sys.o: No such file or directory

This is not the first time that this problem has occurred. When I go to the Internet for help, it mostly refers to the problem of environment variables. After I change it, I find that keil flashes back. When I see someone saying that it is impossible to generate. O files, I add them manually, but my intuition tells me that this is the most correct choice. After consulting the data, I find that the following problems occur.

One reason for the error is that your computer user name is Chinese, which is the problem of environment variables, but I did not report an error when running the routine, indicating that there is no problem with my environment;

Another reason is that there was a low version of keil software installed before, and the registry was not deleted after uninstallation. At this time, just delete it.

My problem is that I didn’t pay attention when creating a new project. I copied the routine directly, and then added the file manually, resulting in an existing. O file. At this time, I compiled it again, resulting in a problem. Because preprocessing, compilation, assembly and linking are indispensable, the. O file is generated in the assembly stage. If it already exists, it will trigger the error report. I would like to remind you that the new project should not be as easy as me, but step by step

[Solved] VScode sftp Code synchronizate Error: Error: No such file

Cause

After the extension is successfully installed, the file upload prompt error: no such file
but the code has actually been uploaded successfully**

Solution:

Open ~ /.Vscode/extensions/liximomo.sftp-1.12.9/node_modules/ssh2streams/lib/sftp.js

search

options.emitClose= false;

Add under each search term

options.autoDestroy = false;

Remember to restart vscode for the changes to take effect.

Code screenshot