Tag Archives: error

syntax error near unexpected token `else’

I wrote it this way at first, but I got an error

#!/bin/bash
filename=$1
if [ -e /home/xx/$filename ]
echo "exist"
else
echo "inexistence"
fi 

It turned out there was a then missing

#!/bin/bash
filename=$1
if [ -e /home/xx/$filename ]
then
echo "exist"
else
echo "inexistence"
fi 


It’s ok after modification!

Solution for Error Code: s1023 when installing DirectX SDK

Today when installing DXSDK_Jun10 (download address: http://download.microsoft.com/download/A/E/7/AE743F1F-632B-4809-87A9-AA1BB3458E31/DXSDK_Jun10.exe), the Error Code shown below mistakes: s1023.

Reason for error:
I also installed Microsoft Visual C++ 2010 Redistributable with the updated version on your computer. I also opened “programs and functions” in the control panel. Sure enough, there was “Microsoft Visual C++ 2010 x86 redistributable-1010.0.40219” and “Microsoft Visual C++ 2010 x64 redistributable-1010.0.40219” installed on the computer. DXSDK_Jun10 also shipped with “Microsoft Visual C++ 2010 x86 redistributable-1010.0.30319” and “Microsoft Visual C++ 2010 x64 redistributable-1010.0.30319”, which versions were lower than the installed versions of the machine, so s1023 error occurred in the installation.

Solutions:
Uninstall higher versions of “Microsoft Visual C++ 2010 x86 redistributable-1010.0.40219” and “Microsoft Visual C++ 2010 x64 redistributable-1010.0.40219”, and then reinstall DXSDK_Jun10.

Q:
Will it be affected to undistribute “Microsoft Visual C++ 2010 x86 redistributable-1010.0.40219” and “Microsoft Visual C++ 2010 x64 redistributable-1010.0.40219”?
A:
After DXSDK_Jun10 is installed, the above two components are still there, but the version is lower, so the impact is not significant.

If you really need “Microsoft Visual C++ 2010 x86 redistributable-1010.0.40219” and “Microsoft Visual C++ 2010 x64 redistributable-1010.0.40219”, you can install it after you finish installing DXSDK_Jun10. Download page address (https://www.microsoft.com/en-us/download/details.aspx?Id = 26999).

Original link; http://blog.csdn.net/ts1030746080/article/details/8681550

mysql ERROR 1025 (HY000): Error on rename of

Today, when I was working on mysql, I wanted to drop the primary key, but there was an ERROR: mysql ERROR 1025 (HY000): ERROR on rename of… After searching the data, the solution is to remove the auto_increment if the primary key is auto_increment before dropping xx. If the primary key also has a foreign key constraint, the foreign key constraint is removed first. Once all of these additional constraints are removed, the primary key can be dropped safely.

modelsim actually error loading design?

After a semester of EDA courses, I finally unloaded the ModelSim five times.

I believe that many students have encountered such problems when using ModelSim. Even though every design file has been compiled, the following sentence still appears:
Error loading design.
And then… There’s no then, there’s no hint.

At this point, you may need to do the following:
1. Check whether the file is not included and not added to the project.
2. Check that the port declaration of the design file is consistent with the port when instantiated.
3. Check that the module name of the design file is the same as the module name when instantiated.
4. Check if the port that has not been modified in the top-level file is wire (it has been poked for two weeks).
Ask your teacher or boss for help.

Virgin paste, please forgive me.
Uncle Huang in 2018.6.19 17:06

[Qt] error: call to non-static member function without an object argument


error: calls a non-static member function with no object arguments.
this error occurs because the class is not instantiated with .
Take a chestnut, for example:

 class Student
 {
 public:
 int getAge();
 };

The reason for this error may be that when you call the function getAge(), you are doing this:

 Student::getAge();

Or do it this way:

  Student.getAge();

This means that the member function is called without instantiating the class Student.
Fix one: Instantiate an object first

 Student XiaoWang;
 int age = XiaoWang.getAge();

Correction 2: Declare member functions as static functions

 class Student
 {
 public:
static  int getAge(); 
 };
 
 Student::getAge();

Take chestnuts, for example:


  QDir::mkpath(Path);

Error: Calling a non-static member function with no object arguments.
the reasons for this error is that the class does not instantiate and call mkpath function need to first class instantiation,
to:

   QDir tempDir;   
    tempDir.mkpath(Path); 

That’s right.
If you write your own class, you can also add the static keyword before the function’s declaration in the class body to declare the function as a static member and call it without instantiation.
such as:


QMessageBox::warning(this,tr("Warning"),tr("No Exist"));

Static member functions can be called directly with “ class :: function name “.

Module build failed Error Plugin/Preset files are not allowed to export objects, only functions (How to Fix)

As a way to make a project of nuxt, this exception occurred. Module build failed: Error: Plugin/ prefiles are not allowed to export objects, only functions : make of the following figure:

Ii. Problem Analysis and Solution: Babel version conflict, Babel dependency package is not compatible, package.json dependency package contains both Babel 7.0 version and Babel 6.0 version, the two versions are obviously incompatible, We can upgrade to Babel 7.0 version, through NPM install [email protected] command all upgrade to Babel 7.0 version, so the conflict problem of the versions can be solved.

How to Fix Error in module RSQL of the database interface

keywords
Error in module RSQL of the database interface error key: RFC_ERROR_SYSTEM_FAILUREdbtran ERROR (set_input_da_spec): statement too big[dbtran.c#4854] marker count = 18655 > max. marker count = 16000 [dbtran.c#4854] sap note:13607


Problem description
[Problem] After EP was tested by the development machine, the EP was executed after it was released to the production machine, and this Problem occurred:

Error message:
Error in module RSQL of the database interface, Error key: RFC_ERROR_SYSTEM_FAILURE
Problem analysis
You can first try the following operations:
1, check, test the RFC, and transfer the related requests to the production environment; 2. Reimport RFC in NWDS and republish the project (note that the operation of production environment release is different from that of development machine); 3. Restart EP;
if the problem is still unresolved, read on.
Check the ABAP Runtime Error log

through the transport code ST22. Double-click the corresponding Error log to enter the Runtime Error Long Text interface, where there are detailed Error reports.
Some of the error messages I picked:
Kategorie (category) : ABAP Programming Error
Laufzeitfehler (runtime Error) : DBIF_RSQL_INVALID_RSQL
Ausnahme (exception) : CX_SY_OPEN_SQL_DB
ABAP Programm: SAPLZEWM_RFC2
【Kurztext】 (German, meaning category)
Error in module RSQL of the database interface

Error in the ABAP Application Program
the current ABAP Program “SAPLZEWM_RFC2” had to be terminated because it has come across a statement that unfortunately cannot be executed.

An exception that is explained in detail below once again occurred.
The Exception, which is assigned to class ‘CX_SY_OPEN_SQL_DB’, was not caught in procedure “ZTM_RFC_YSQSD_GETORDER_V2” (FUNCTION) “, nor was it propagated by a RAISING clause.
Since the caller of the procedure could not have anticipated that the exception would occur, the current program is terminated.
The reason for the exception is:
The SQL statement generated from the SAP Open SQL statement violates a restriction imposed by the underlying database system of the ABAP system.
Possible error causes:
o The maximum size of an SQL statement was exceeded.
o The statement contains too many input variables.
o The input data requires more space than is available.
You can generally find details in the system log (SM21) and in the developer trace of the relevant work process (ST11).
Cause analysis,
1. In the ABAP Select statement, when range Table is used in the WHERE clause, the type of range Table exceeds the maximum limit of the database (the maximum value is determined by DB).
2. The source code location is already listed above the error message:

The solution
1. Search SAP Note: 13607. Extract the contents of Note


2. So I modified my code:

DATA r_so LIKE RANGE OF vbak-vbeln WITH HEADER LINE. 
DATA lines LIKE LINE OF r_so.
DESCRIBE TABLE r_so LINES lines.
IF lines EQ 0.
    SELECT
      vbak~vbeln AS vbeln
      adrc~name1 AS name1 
      vbpa~kunnr AS kunnr
      vbpa~parvw AS parvw
      adrc~city1 AS city1
      FROM vbpa
      INNER JOIN vbak ON vbak~vbeln EQ vbpa~vbeln
      INNER JOIN adrc ON vbpa~adrnr EQ adrc~addrnumber
      INTO CORRESPONDING FIELDS OF TABLE gt_display_vbpa_ag
      WHERE adrc~name1 IN r_shippername 
        AND vbpa~kunnr IN r_shipper     
        AND vbpa~parvw EQ 'AG'.
...
ELSE.
    TRY.
      SELECT
         vbak~vbeln AS vbeln
         adrc~name1 AS name1
         vbpa~kunnr AS kunnr
         vbpa~parvw AS parvw
         adrc~city1 AS city1
         FROM vbpa
         INNER JOIN vbak ON vbak~vbeln EQ vbpa~vbeln
         INNER JOIN adrc ON vbpa~adrnr EQ adrc~addrnumber
         INTO CORRESPONDING FIELDS OF TABLE gt_display_vbpa_ag
         FOR ALL ENTRIES IN r_so 
         WHERE vbak~vbeln EQ r_so-low
           AND adrc~name1 IN r_shippername 
           AND vbpa~kunnr IN r_shipper     
           AND vbpa~parvw EQ 'AG'.

   CATCH cx_sy_open_sql_db.
   ENDTRY.
...
ENDIF.

3. After modifying the RFC, it is necessary to re-import Model
in WD4J
4. Re-transmit the Request to production and re-publish it to EP. Problem solved
Summarize the ideas for solving THE SAP problem
1, do not do hand party, do not ask a mistake, be sure to read the error message, analysis of the possible part of the error, is RFC error or WD4J error; 2. Error messages can be viewed through Tcode ST22 or ST11 or sm21; 3. About search engines:
SAP search: http://search.sap.com/ (this SAP note the number 13607 is found in the above) SAP note: https://websmp206.sap-ag.de/NOTES (search keywords are provided in the error log)

SAP custom Google search engine, https://cse.google.com/cse/home?cx=013447253335410278659:k8ob9ipscwg

Error resolving version for plugin ‘org.apache.maven.plugins:maven-compiler-plugin’ from the repo…

Error resolving version for the plugin ‘. Org, apache maven plugins: maven — the compiler plugin ‘from the repositories [local (E: \ apache maven – 3.5.3 \ repository). Nexus
(http://localhost:8080/nexus-2.14.5-02/content/groups/public)]] : plugins not found in any Plugin repository
The above error occurred at the beginning of the parent project to create the Maven aggregation project. You can see that the maven-Complier-plugin version of org.apache.maven.plugin resolves the error. The wrong configuration is as follows:

Solution: Declare a version for the plug-in:
Add & lt; version> Tags:

  <build>
      <plugins>
          <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-compiler-plugin</artifactId>
              <version>2.5.1</version>
              <configuration>
                  <source>1.7</source>
                  <target>1.7</target>
                  <encoding>UTF-8</encoding>
              </configuration>
          </plugin>
      </plugins>
  </build>

Importerror using tensorflow: DLL load failed: the specified program cannot be found

introduction

will encounter a variety of problems in the process of using tensorflow, which will be recorded here for my review and later learning.

problem description

has tensorflow installed in anaconda, and the call has this problem:

>>> import tensorflow
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "D:\Anaconda\envs\dl\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "D:\Anaconda\envs\dl\lib\site-packages\tensorflow\python\__init__.py", line 59, in <module>
    from tensorflow.core.framework.graph_pb2 import *
  File "D:\Anaconda\envs\dl\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
    from google.protobuf import descriptor as _descriptor
  File "D:\Anaconda\envs\dl\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
    from google.protobuf.pyext import _message
ImportError: DLL load failed: 找不到指定的程序。

solution

through careful review, yesterday I upgraded to protobuf when installing object-detection, so, call back the protobuf version, it should be ok.

pip install protobuf==3.6.0
![在这里插入图片描述](https://img-blog.csdnimg.cn/20190708150939546.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L2x2c2VoYWl5YW5nMTk5Mw==,size_16,color_FFFFFF,t_70)

Module build failed: SyntaxError: Unexpected token

vue router loading on demand times error

{
	path: '/product',
	component: () => import('./pages/product'),
},

error: Module build failed: SyntaxError: Unexpected token

solution:

1. In the beginning, I was in a hurry to write something, but instead of studying it carefully, I changed it to another way:
{
	path: '/product',
	component:resolve => require(['./pages/product'], resolve),
},

found no error and ran successfully. Later baidu checked that the original Babel needs to be added with syntax-dynamic-import plug-in, so that the Babel can correctly parse the syntax.

2. Download the plug-in
npm install babel-plugin-syntax-dynamic-import --save-dev
3. Then modify the loader configuration

in webpack

{
	test: /\.js$/,
	loader:'babel-loader',
	options:{
		plugins:['syntax-dynamic-import']
	},
},

so far, problem solved

my personal blog, drop by sometime

Error: /usr/bin/python: Error while finding module specification for ‘virtualenvwrapper.hook_loader’

reasons: workon command fails, the Python version changes, is to use the previous python3.6 install Python virtual environment, relevant documents is in the/Library/Frameworks/Python framework Versions/3.6/bin
solution 1: to install a virtual environment in new python3.7 environment

$sudo pip3 install virtualenv virtualenvwrapper
$source .bashrc

the solution 2: will/Library/Frameworks/Python framework Versions/3.6/bin three files in the directory, copy it to/usr/local/bin directory in

$cd /Library/Frameworks/Python.framework/Versions/3.6/bin
$cp virtualenv-clone virtualenvwrapper.sh virtualenvwrapper_lazy.sh /usr/local/bin