Reference the Lua interpreter in Visual Studio, compile the Lua source code, and execute the Lua script

Preface What is this article talking about Introduce lua interpreter in Visual Studio Use C++ to call Lua files What is this article suitable for Suitable for beginners beginner Lua Suitable for people who need to combine development of C/C++ and lua What is needed for this article Have a simple understanding of Lua syntax […]

How to dynamically refresh the configuration of SpringBoot (scheme)

For microservices, configuration localization is a big problem. It is impossible to restart the service every time you need to change the configuration. Therefore, the final solution is to externalize the configuration and host it on a platform to achieve unnecessary Restart the service to modify multiple valid purposes at once. But for the Spring […]

SwitchPreference customization – use analysis

Introduction to SwitchPreference SwitchPreference is a UI component in Android, which is used to display the switch button in the setting interface of the application, and allows the user to toggle the state of some functions or options. SwitchPreference inherits from Preference class, so it can be used in PreferenceScreen like other preferences. When the […]

How to dynamically refresh the configuration of SpringBoot (custom)

The custom part of this article includes 1. Custom refresh event (with RefreshScope to achieve automatic refresh) 2. Force refresh the context (restart the entire ApplicationContext) 3. Implement Http interface loading of configuration files (similar to Nacos) Custom refresh event (with RefreshScope to achieve automatic refresh) Manual refresh of configuration based on org.springframework.cloud.context.config.annotation.RefreshScope Spring uses […]

Inheritance-reflects the reuse of class design levels

Inheritance Object-oriented three major features: encapsulation, inheritance, polymorphism Among them, inheritance embodies the reuse of class design levels It allows programmers to extend and add functions on the basis of maintaining the characteristics of the original friend class, so as to generate new classes and become derived classes. Format : class Tiger: public Animal { […]

How to dynamically refresh the configuration of SpringBoot (implemented by Nacos)

Nacos startup loading configuration Load NacosConfigBootstrapConfiguration through META-INF/spring.factories org.springframework.cloud.bootstrap.BootstrapConfiguration=\ com.alibaba.cloud.nacos.NacosConfigBootstrapConfiguration Initialize NacosConfigProperties and NacosPropertySourceLocator @Configuration @ConditionalOnProperty(name = “spring.cloud.nacos.config.enabled”, matchIfMissing = true) public class NacosConfigBootstrapConfiguration { @Bean @ConditionalOnMissingBean public NacosConfigProperties nacosConfigProperties() { return new NacosConfigProperties(); } @Bean public NacosPropertySourceLocator nacosPropertySourceLocator( NacosConfigProperties nacosConfigProperties) { return new NacosPropertySourceLocator(nacosConfigProperties); } } Load configuration to org.springframework.core.env.Environment via com.alibaba.cloud.nacos.client.NacosPropertySourceLocator @Override public […]

MatterMatter environment construction reference document

Article directory Matter Environment Build Reference Documentation Tested operating system Features of the build system Check Matter’s code Synchronization submodule prerequisites 1. Install Prerequisites on Linux Construction of the user interface 2. Install Prerequisites on macOS Construction of the user interface 3. Install Prerequisites on Raspberry Pi 4 Configure wpa_supplicant to store permanent changes Install […]

In-depth component communication of Vue3-props–custom events-mitt use-v-model principle in vue3-useAttrs–ref and $parent–provide and inject–pina–slot

The last time I wrote an in-depth article on component communication, it was about vue2. I recently browsed station b and saw a new video released by Shang Silicon Valley. I found that there are some differences in usage and writing of component communication between vue3 and vue2, so record it. The following are all […]