Category Archives: How to Fix

Mac php7.4.13 using PECL installation extension to report error

A recent installation of PHP7.4, after successful installation using PECL to install the extension to report an error

In file included from /usr/local/Cellar/[email protected]/7.4.13_1/include/php/Zend/zend.h:356:
/usr/local/Cellar/[email protected]/7.4.13_1/include/php/Zend/zend_operators.h:523:10: error: 'asm goto' constructs are not supported yet
        __asm__ goto(
                ^
/usr/local/Cellar/[email protected]/7.4.13_1/include/php/Zend/zend_operators.h:586:10: error: 'asm goto' constructs are not supported yet
        __asm__ goto(
                ^
/usr/local/Cellar/[email protected]/7.4.13_1/include/php/Zend/zend_operators.h:656:10: error: 'asm goto' constructs are not supported yet
        __asm__ goto(
                ^
/usr/local/Cellar/[email protected]/7.4.13_1/include/php/Zend/zend_operators.h:766:10: error: 'asm goto' constructs are not supported yet
        __asm__ goto(
                ^
4 errors generated.
make: *** [src/php7/igbinary.lo] Error 1
ERROR: `make' failed12345678910111213141516

/usr/local/Cellar/[email protected]/7.4.13_1/include/ PHP /Zend/ zend_operator. h
Zend_use_asm_arithmetic = 0

#if defined(HAVE_ASM_GOTO) && !__has_feature(memory_sanitizer)
#  define ZEND_USE_ASM_ARITHMETIC 0
#else
#  define ZEND_USE_ASM_ARITHMETIC 0
#endif12345

Never mind that both values of # are set to 0

How to set vscode interface to Chinese

How to set VSCode to Chinese?In this article, we will introduce the method of setting the VSCode interface to Chinese. There is a certain reference value, there is a need for friends can refer to, hope to be helpful to everyone.

the relevant recommendation: basic course “vscode

vscode interface is set to the Chinese method

1. Visual Studio Code

br> 2> Open Visual Studio Code

br> <>bb3 3. At the same time, press the Ctrl + Shift + X shortcut

the “Expansion” view text box on the left and type “Language Packs”. Click on the Language you want. Here we install simplified Chinese

com.alibaba.fastjson .JSONException: For input string: “3000-01-01” or “9999-12-31”

FastJSON Parser exception after 2999 time range

Exception in thread "main" com.alibaba.fastjson.JSONException: For input string: "9999-12-31 00:00:00.000+0000"
    at com.alibaba.fastjson.parser.DefaultJSONParser.parseObject(DefaultJSONParser.java:665)
    at com.alibaba.fastjson.JSON.parseObject(JSON.java:365)
    at com.alibaba.fastjson.JSON.parseObject(JSON.java:269)
    at com.alibaba.fastjson.JSON.parseObject(JSON.java:488)
    at com.xxx.xxx.main(StpBpmVariableSetter.java:146)
Caused by: java.lang.NumberFormatException: For input string: "9999-12-31 00:00:00.000+0000"

FastJSON is known to be fixed in version 1.2.49, and can be fixed with an upgrade

<dependency>
    <groupId>com.alibaba</groupId>
    <artifactId>fastjson</artifactId>
    <version>1.2.49</version>
</dependency>

 

Windchill: object rename record

IdentityChangeHistory: OrganizationReference, OrganizationReference, OrganizationReference, OrganizationReference, OrganizationReference, OrganizationReference, OrganizationReference, OrganizationReference… And other properties

SELECT h.oldvalue, h.newvalue
  FROM identitychangehistory h, wtpartmaster m
 WHERE h.ida3a3 = m.ida2a2
   AND m.wtpartnumber = '<partNumber>'

How to handle exception in springboot

SpringBoot exception handling in five ways: a, a custom error page:

SpringBoot default exception handling mechanism need to be in SRC/main/resources/templates directory to create the error. The HTML page (no matter what exceptions will intercept). Different to intercept errors is necessary under the templates to create the error folder named with error code to the HTML

2: @ ControllerAdvice + @ ExceptionHandler annotation processing abnormal
you need to create a global exception class that can handle the exception. You need to add the @ControllerAdvice annotation on this class.
@ ControllerAdvice
public class GlobalException {
@ ExceptionHandler (value = {Java. Lang. ArithmeticException. Class})
public ModelAndView arithmeticExceptionHandler (Exception e) {
ModelAndView mv = new ModelAndView();
mv. AddObject (” error “, e. oString ());
mv. SetViewName (” error “);
return mv;
}
}

> All you need to do is add the following method to the controller:
@ExceptionHandler(value={java.lang.ArithmeticException.class})
public ModelAndView arithmeticExceptionHandler(Exception e) {
ModelAndView mv = new ModelAndView();
mv. AddObject (” error “, e. oString ());
mv. SetViewName (” error “);
return mv;
}

requires the implementation of the HandlerExceptionResolver interface in the global exception class
@Configuration
public class GlobalException implements HandlerExceptionResolver {
@Override
public ModelAndView resolverException(HttpServletRequest request, HttpServletResponse response, Object object, Exception exception) {
ModelAndView mv = new ModelAndView();
if(Exception instanceof ArithMeticException) {
.setViewName (” error “);
}
mv. AddObject (” error “, the exception. The toString ());
return mv;

}}
5, configuration, exception handling SimpleMappingExceptionResolver
in the global exception class to add a method to complete the unification of the exception class
@Configuration
public class GlobalException {
public SimpleMappingExceptionResolver getSimpleMappingExceptionResolver() {
SimpleMappingExceptionResolver resolver = new SimpleMappingExceptionResolver();
Properties properties = new Properties();
properties. The put (” Java. Lang. ArithmeticException “, “error”);
resolver.setExceptionMappings(properties);
return resolver;
}
}

How to replace strings in VIM

Replacement string
Global, replace string:
Command mode :% s/old/new/g
Old, new does not need double quotes, g is global, without g is the first line to be changed example: % s/test_shm_tool.c/$(SOURCE)/g local, replace string:
: n1, n2 s/old_str/new_str/g, add c if each line is confirmed

JavaScript to achieve image rotation effect

JavaScript implements the image rotation effect
Process is as follows:
create a div element in the body, two pictures in the div definition, add links to images, and set up the hyperlink tag a name attribute value of I.

<div id="tabs">
        <a name="i" href="#"><img src="images/1.jpg" width="100%" height="350px" alt=""></a>
        <a name="i" href="#"><img src="images/2.jpg" width="100%" height="350px" alt=""></a>
    </div>

The CSS part:

 #tabs{
            width:100%;
            height: 350px;
            overflow: hidden;
            float: left;
            position: relative;
        }

Javascript parts:
application document object getElementsByName () way to get the name attribute value for the I element, and then create a custom function changeimage (), the application of the setInterval () method, to do this every few seconds changeimage () function, control the rotation time.

Python combined with Matplotlib to add button

This article reprinted from https://www.it610.com/article/1282212275846922240.htm
if you have offended, please contact me
I looked for Matplotlib button for a long time before I found something I could understand. I don’t know if it was too simple, so no one wrote it.
ttonAxe = PLT.axes ([0.94, 0.03, 0.03, 0.03]) u>to set the position of the button.
tton1 = Button(buttonAxe, 'p2',color='khaki', overcolor='yellow') i>ed to create the Button and to set the color and the color of the Button when the mouse is over the Button.
third line tton1.on_clicked (show2) s>the function triggered after the button is clicked.
in addition to write after click the button to trigger functions should pay attention to write the event in the brackets, such as def show2 (event) :

buttonaxe = plt.axes([0.94, 0.03, 0.03, 0.03])
button1 = Button(buttonaxe, 'p2',color='khaki', hovercolor='yellow')
button1.on_clicked(show2)