• About exports; module.exports ; export; export default distinguish


    1. About exports and module.exports (node is operational) When a node executes a file, an exports and module object will be generated in the file,Module has an exports attribute. exports = module.exports = {}; exports.js var frist1 = 1 module.exports = frist1 importm.js const frist1 = require(‘./exports.js’); console.log(frist1) Run: node importm.js 2. About export and […]

  • In cocos2d-x + Lua scenarios, we can’t use setonentercallback (func) and other functions to set the callback solution


    Cocos2d-x + Lua is not perfect. When using these functions, an error will be reported node:setOnEnterCallback(func) node:setonEnterTransitionDidFinishCallback(func) node:setOnExitCallback(func) node:setonExitTransitionDidStartCallback(func) as a result oflua_cocos2dx_auto.cppIt didn’t come true at all A typical scenario of this problem is that a scene does not know when it is loaded or removed, and this requirement is particularly useful. For example, […]

  • Java class file password


    brief introduction Everything starts with javac. From that moment on, java files have changed from text files that can be distinguished by our naked eyes into cold binary files. Does it mean that we can’t learn more about Java class files? The answer is No. Machines can read, why can’t people read? As long as […]

  • [QT] qtconcurrent:: run() + qtthreadpool to implement multithreading


    Previous links: Analysis of qthread source code Subclassing qthread for multithreading Subclassing QObject + movetothread for multithreading Inheriting qrunnable + qthreadpool for multithreading This article example source code address: https://gitee.com/CogenCG/QThreadExample.git In the scenario of Qt development, I feel that this method is used less, so this paper only makes a simple introduction. QT current is […]

  • Awk, it’s really an amazing artifact!


    Author: chuanshanjiaSource: https://www.cnblogs.com/baoch… #Preface The product manager (PM) comes to you for the latest data of XX, and you know that these data can only be analyzed through log files at present, because we know that we can’t put all the data into dB (this is unscientific!). Whenever there is such a task, you use […]

  • How to learn dart quickly with JavaScript?


    Write it at the front With the release of flutter 1.12, its support for the web is better. I believe that in the future, it will be more widely used A month ago, we received a project to develop a cross platform application. After discussion (the big PK between Rn and router), we decided to […]

  • Native Ajax encapsulation


    1、 Introduction to Ajax AJAX is called asynchronous JavaScript and XML, which is asynchronous JS and XML. Ajax can send asynchronous requests to the server in the browser, the biggest advantage: no refresh to get data. AJAX is not a new programming language, not a new independent technology, but a new way to use existing […]

  • What the hell is fastthreadlocal? The existence of ThreadLocal!!


    We all know that ThreadLocal is a thread local variable. Today, the stack leader introduces another artifact:FastThreadLocalIt is literally: fast + ThreadLocal, a fast ThreadLocal? What the hell is this? 1、 Introduction to fastthreadlocal Fastthreadlocal is not provided by JDK, but a wheel built in netty. Why does netty build wheels repeatedly? Take a look […]

  • Let and const of ecmscript6


    According to the development trend of front-end technology, some top-level front-end frameworks, such as Vue, which is popular in China, have already used ES6 syntax, and vue3 will also use typescript. Therefore, it is imperative to upgrade the technology. In the next period of time, I will sort out and study the series of articles […]

  • build.gradle Principle analysis of Maven central implementation of repositories


    If the build.gradle What happens if you change Maven central to Maven central 2? Error message: could not find method mavencentral2() for arguments [] on repository container of type org.gradle.api . internal.artifacts.dsl .DefaultRepositoryHandler. For this defaultrepository handler, search the gradle directory and find the corresponding java file: DEFAULT_ MAVEN_ CENTRAL_ REPO_ The name constant is […]

  • C + + keyword — const


    Const modifies variables of common type Const modifies variables. The following two definitions are essentially the same. Its meaning is: const modified variable value of type is immutable. TYPE const ValueName = value; const TYPE ValueName = value; (2) If const is changed to external connection, it can be extended to global. During compilation, memory […]

  • PHP basic grammar learning [constant]


    Write the wrong place, welcome to correct, thank you! Constants and variables in PHP are the same. They are the place to save data. The difference is that when you declare a constant, you don’t need to add it before it$, and the constant name is usually in uppercase letters (including numbers and underscores). Once […]