• Cocos2dx Lua recursively turns on the transparency setting of multi-level child nodes


    preface In cocos2dx Lua, if you want to set the transparency of the parent node and the child node, you can use the setcascade opacity enabled method of the parent node to set the transparency of the node, otherwise you cannot set the transparency of the node.However, this method has a drawback. When a node […]

  • Es9 (2)—— Promise.finally


    catalog How to operate promise? Want to know all about promise? Es6-learning landscape How to operate promise? usePromise.finally, regardless of executionthenstillcatchWill be implementedfinallyThe body of functions inside. For example, a pop-up window can be usedresolveandrejectSave the values of the variables separately,But in the endfinallyTo control the pop-up window. Here’s an example of the code: const […]

  • Open the Lua test project of cocos2d-x in cocos code ide


    Cocos code ide creates a new cocos Lua project named luatests Copy all files in cocos2d-x / tests / Lua tests / SRC to luatests / SRC Take luatests/ config.json Medium init_ Change the entry value under CFG to “SRC”/ controller.lua “ Copy all files in cocos2d-x / tests / Lua tests / res and […]

  • The difference between union and union all can be seen through an example


    【UNION ALL】 select a,b,sum(sm) AS s1, SUM(qm) AS s2 from ( select ‘a’ AS a, ‘b’ AS b, 2 AS sm, 200 AS qm UNION ALL select ‘a’ AS a, ‘b’ AS b, 2 AS sm, 200 AS qm )r group by a,b ab4400 【UNION】 select a,b,sum(sm) AS s1, SUM(qm) AS s2 from ( select […]

  • Summary of Python methods


    Any() and all() usage Any (x): judge whether a tuple or list is all empty, 0, false If all are empty, 0, ‘, false, false is returned Returns true if at least one is not empty, 0, ‘, false All (x): judge whether a tuple or list is not empty, 0, false Returns true if […]

  • Small program go IP source code – use golang to get the native IP


    How to get IP address of local network card Application scenarios Do not need all kinds of tedious operations, directly double-click to open go- ip.exe , you can see all the IP addresses of the local network card Golang can compile all platform (win / MAC / Linux) programs Running effect (win10 operating system) code […]

  • Usage of maxsetsize and maxpecesize in RMAN


    MAXSETSIZEFollowMAXPIECESIZEusage difference:maxpiecesizeIt sets the size of the backup piece after the backup is completed. It has no effect on the overall size of the backup, such as aGThe backup completion file of,maxpiecesizeSet to100MIn the end, it will become10individual100MBackup file for.MaxsetsizeSetting limit is the overall size, I think this function is more chicken ribs, generally as […]

  • [deep learning]: gradient descent, random gradient descent (SGD), and mini batch gradient descent


    1、 Gradient descent Gradient descent is the simplest method used to update parameters in neural networks. The formula for calculating loss is as follows:   With the loss function, we immediately solve the gradient through this loss, and use the gradient to update the parameter theta, as follows:   After doing so, we only need […]

  • Tips for developing Flash + mongoengine (2)


    1. All atomic operations of mongoengine set – set a particular value unset – delete a particular value (since MongoDB v1.3+) inc – increment a value by a given amount dec – decrement a value by a given amount push – append a value to a list push_all – append several values to a list […]

  • 6.1 logical operators


    Logical operator 1. & & short circuit and Expression 1 & expression 2 01. The expression 1 is true and the expression 2 is also true. The overall return is true 02. If the expression 1 is false, the expression 2 will not be executed and the whole return is false 03. As long as […]

  • [pl / SQL] – backup table idea create table and insert into


    After reading this article, you will learn the following: Make a backup when creating or writing complex logic Two methods are introduced 1)INSERT INTO Table SELECT * FROM TABLE 2)CREATE TABLE AS …. …. Select * from TABLE The difference between them is as follows Insert into must first create a table before it can […]

  • Webpack.02 – how to package


    Initialize in empty folder: CMD npm init -y -Y means all yes cnpm install -D webpack webpack-cli file structure SRC (folder) — > index.js console.log(‘hello webpack’) Test (folder) — > main.js console.log(‘hello webpack2’) package.json Add in the scripts build:webpackBy default, webpack is packaged under Src index.js It can be customized, such as: build:webpack server/index.js { […]