Category Archives: How to Fix

syntax error on token “catch”,Identifier expected

today, I suddenly found that the jquery-3.2.1.js introduced in the project gave an error, and one line was

syntax error on token “catch”, Identifier expected

I used the STS tool, searched the solution and found that validate problem, the solution is as follows:

window –> Preferences –> Validation –> Restore Defaults


in jquery-3.2.1.js right -> Validate it.

EEROR:Windows named pipe error: The system cannot find the file specified. (code:2)

executes the docker-compose. Exe up-d command and returns the following error:

ERROR: Windows named pipe error: The system cannot find the file specified. (code:2)

solution:

1. Check the status of docker for Windows software. The status should be running

2. View the Task Manager in Performance to Virtualization, and change it to Enable if not.

modify Virtualization method refer to this link: https://zhidao.baidu.com/question/339098469.html
3. Run the command window for CMD in the directory where the docker-compose. Yml file is located, and then type the command

for docker-compose. Exe upd

On the coercion of C language

programming encountered such an error

error: aggregate value used where an integer was expected
printf(“t1 = %d\n”,(unsigned char)t1;
error: aggregate value used where an integer was expected
printf(“t1 = %d\n”,(unsigned char)t1;

the reason is that
C language Type casting can only be converted between quantitative types. The structural types (including union and struct) are not Scalar types, so the casting cannot be performed.

quantitative types include arithmetic types and pointer types, and arithmetic types include integer types and floating point types.

can use union instead of data conversion

I generally use union instead of type conversion

union {
long l;
struct {
long a:10;
loing b: 10;

long c: 12} bits;
}

opencv cvtColor dtype issue(error: (-215) )

opencv cvtColor dtype issue(error: (-215) )

Cvb0

more detailed error information is as follows, color.cpp:9710: error: (-215) depth == CV_8U || depth == CV_16U || depth == CV_32F in function CV ::cvtColor;

error is caused by the simple fact that the input image data type (pixel value) of the color space to be converted is not uint8 (0-255, integer value in the interval), but other type,

cv2.cvtColor(X, cv2.COLOR_RGB2HSV) ⇒ cv2.cvtColor(X.astype(np.uint8), cv2.COLOR_RGB2HSV)

Merging is not possible because you have unmerged files


git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches, git merges branches

When I was doing project work, my colleague modified a CPP code, and I also modified the code. The two codes clashed. After submission, his code git merged automatically and was prompted: [master| MERGEING]

$ git merge my_new_branch
error: Merging is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.

or error:

Auto-merging src/ui/menu/wizardGroup.c
Auto-merging src/ui/menu/drawmenu5.c
Auto-merging src/ui/menu/drawmenu3.c
Auto-merging src/ui/menu/drawmenu2.c
Auto-merging src/ui/menu/drawmenu1.c
Auto-merging src/ui/menu/drawmenu0.c
Auto-merging src/string/language_d.h
CONFLICT (content): Merge conflict in src/string/language_d.h
Auto-merging src/string/languageDict.h
CONFLICT (content): Merge conflict in src/string/languageDict.h
Auto-merging src/drawui.c
Auto-merging src/dev/dev_phascan.c
Auto-merging src/dev/dev_flexscan.c
Auto-merging src/callback.c
Automatic merge failed; fix conflicts and then commit the result.

* solution:

If you have fixed the files you need to add the files to the stage with git add [filename], then commit as normal. Git add [modified conflicting files], and finally, commit the conflicting issues as normal: git commit [modified conflicting files] -m “comment content”

* is simply:

  • use git diff or git status to check which files are in conflict, the conflict will prompt:

++< < < < < < < HEAD

++< < < < < < < new_branch

  • modify your conflicting files, after the modification, save.

  • use git add XXX and add all the files you have modified.

  • finally, with git commit-a-m “note information” commit, complete.

How to Fix SQL Error: 1054, SQLState: 42S22 Unknown column ‘markcardex0_.art_service_time’ in ‘field list’

SQL Error: 1054, SQLState: 42S22 this is the Error caused by the missing field, first attach the Error log:

2020-03-04 10:30:00. 221 WARN [pool – 8 – thread – 1] [org. Hibernate. Engine. JDBC. Spi. SqlExceptionHelper. Java: 127] – SQL Error: 1054, SQLState: 42 s22
the 2020-03-04 10:30:00. 221 ERROR [pool – 8 – thread – 1] [org. Hibernate. Engine. JDBC. Spi. SqlExceptionHelper. Java: 129] – Unknown column ‘markcardex0_. Art_service_time’ in ‘field List ‘
the 2020-03-04 10:30:00. 225 ERROR [pool – 8 – thread – 1] [org. Springframework. Scheduling. Support. TaskUtils $LoggingErrorHandler. Java: 95] – Unexpected ERROR occurred in scheduled task.
org.springframework.dao.InvalidDataAccessResourceUsageException: could not extract ResultSet; SQL [n/a]; Nested exception is org. Hibernate. Exception….

under Caused by: org. Hibernate. Exception. SQLGrammarException: could not extract the ResultSet
… 24 common frames omitted
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘markcardex0_. Art_service_time’ in ‘the field list’
the at sun, reflect the NativeConstructorAccessorImpl. NewInstance0 (Native Method)
the at Sun. Reflect. NativeConstructorAccessorImpl. NewInstance (NativeConstructorAccessorImpl. Java: 62)
the at Sun. Reflect. DelegatingConstructorAccessorImpl. NewInstance (DelegatingConstructorAccessorImpl. Java: 45)
the at Java lang. Reflect. Constructor. NewInstance (423) Constructor. Java:
the at Com. Mysql. JDBC. Util. HandleNewInstance Util. Java: (411)
at the mysql. JDBC. Util. GetInstance (Util. Java: 386)
at the mysql. JDBC. SQLError. CreateSQLException (SQLError. Java: 1053)
the at Com. Mysql. JDBC. MysqlIO. CheckErrorPacket MysqlIO. Java: (4074)
at the mysql. JDBC. MysqlIO. CheckErrorPacket (MysqlIO. Java: 4006)
at the mysql. JDBC. MysqlIO. SendCommand (MysqlIO. Java: 2468)
At com. Mysql. JDBC. MysqlIO. SqlQueryDirect (MysqlIO. Java: 2629)
at the mysql. JDBC. ConnectionImpl. ExecSQL (ConnectionImpl. Java: 2719)
the at . Com. Mysql. JDBC PreparedStatement. ExecuteInternal (PreparedStatement. Java: 2155)
at the mysql.. JDBC PreparedStatement. ExecuteQuery (2318) a PreparedStatement. Java:
the at Com. Alibaba. Druid. Filter. FilterChainImpl. PreparedStatement_executeQuery (FilterChainImpl. Java: 2714)
the at Com. Alibaba. Druid. Filter. FilterEventAdapter. PreparedStatement_executeQuery (FilterEventAdapter. Java: 465)
the at Com. Alibaba. Druid. Filter. FilterChainImpl. PreparedStatement_executeQuery (FilterChainImpl. Java: 2711)
the at Com. Alibaba. Druid. Proxy. JDBC. PreparedStatementProxyImpl. ExecuteQuery (PreparedStatementProxyImpl. Java: 145)
the at Com. Alibaba. Druid. Pool. DruidPooledPreparedStatement. ExecuteQuery (DruidPooledPreparedStatement. Java: 227)
the at Org. Hibernate. Engine. JDBC. Internal. ResultSetReturnImpl. Extract (ResultSetReturnImpl. Java: 70)
… 60 common frames omitted

error occurs mainly because the variables in the entity class do not match the classes in the database table, which is a headache, especially when the data is complex. I used to be stupid, one by one, but now I can sum up a simple method:

1. Look at the reason for this error: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘markcardex0_. Art_service_time ‘in ‘field List’ is Unknown column ‘markcardex0_. Art_service_time ‘in ‘field list’ is Unknown column’ mark_service_time ‘in ‘field list’ Find –> Find In Path) quickly search artServiceTime, Find the entity class that defines the variable artServiceTime, click In, as follows:

2. After entering the entity class corresponding to this variable, you can see the database Table corresponding to this entity through the annotation @table (name = “uk_markcard_xxxx”) :

opens the database and verifies the existence of this attribute in the table through the query, as follows:

as shown in the figure above, we found the same error as the console, at this time we add the corresponding entity variable property on the table, note:

(1) attribute type must be the same as the entity variable type

(2) MySQL makes no case difference, but if the variable in the entity class is named aaaBcc, the attribute name in the database should be aaa_bcc, not

107_ Error report and solution of erc20 token transfer

problem screenshot paste:

just sent COINS, and then made token transfer, the result is reported as follows:

Warning! Error during contract execution [Out of gas]
erc-20 Token Transfer Error (Unable to locate and Corresponding Transfer Event Logs), Check with Sender.

looks like gas is not enough, so raise the gas limit, but it will not work in the end, from the default of 21000 to 25000 and then increase to 50000. At last, gas is always consumed, the prompt fails.

possible causes and solutions:

reason: just after the coin, I tried to turn all token out.

solution: transfer less than 1% out first, and then transfer the rest, such as 1 out first. (that’s how mine works)


There seems to be another reason for the

error, but I’ve missed it, so I’ll leave it at that.

other posts on this issue were posted at the end for your reference, and some of them came up with the same solution as mine and succeeded. Then I found several tokens of ERC20. According to their records, they all transferred a small amount of tokens after issuing COINS, and then transferred the rest.

post address: https://bitcointalk.org/index.php?Topic = 2737894.0

Error of reading character c + +

this is a very subtle error
this error means that the memory that the variable reads holds a data type that is actually a sequence of characters, not the data type specified by the variable type.

the general reason for this error is:

char* buffer = (char*)malloc(sizeof(char) * 1024);
char *p =  NULL;

what happens when the buffer contains more than 1024 bytes of data?
yes, the value of p is overwritten by buffer. When checking p during debugging, it will be found that p is no longer NULL, and the error will be “error reading character of string”.

C++, we still try to use STL containers, because STL containers will automatically expand. If above code is:

std::string buffer;
char *p =  NULL;

I believe this error will not occur again.

Error: cocoa error 3840

false

when using AFNetworking POST to connect to WEB API, error:
“The operation couldn’t e completed. (Cocoa error 3840).”

Error Domain=NSCocoaErrorDomain Code=3840 “The operation couldn’t be completed. (Cocoa Error 3840.)” (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x1667f670 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.}

solution

this is a JSON parsing error, which in general is probably caused by the incorrect format of the JSON data returned by your WEB API.

therefore, make sure that the return value of the WEB API is in the correct and valid JSON format. You can check with the following online JSON validation tool.

recommendation article: network requests and various error Code summary (Errors Code)

Android media player error (38,0)

android multimedia programs, mediaplayer (-38, 0) error occurs when mediaplayer is called when mediaplayer is not synchronized (Prepared), or getDuration method is called.

A good solution is to set up the OnPreparedLisnter listener:

MediaPlayer.OnPreparedListener preparedListener = new MediaPlayer.OnPreparedListener() {

    @Override
    public void onPrepared(MediaPlayer mp) {
        mp.start();
        total = mp.getDuration();// 总时长
    }
};
mp.setOnPreparedListener(preparedListener);
mp.prepare();

This ensures that the start and getDuration methods are called after prepare.