CAS operation based on Redis
introduction
Yes NET, we can use interlocked Compareexchange to implement CAS (Compare And Swap) operation. In the distributed scenario, we often use redis. Recently, a wechat game project before the change was run on a single machine. Some data storage is based on memory and directly based on object operation. Recently, redis is introduced to ...
Added by cfemocha on Sat, 18 Dec 2021 20:07:00 +0200
unity shader - fur rendering, flowing fur
Rendering principle:
Step 1:
Layered layer, rendering fur of different lengths. The more layers, the more detail you draw.
Because the hair is long and short, in the upper layer, the alpha of the part without hair is set to 0 and will not be displayed
Multiple layer s can be drawn using multiple pass es such as shader s
...
Added by Cooper94 on Sat, 20 Nov 2021 10:19:54 +0200
C++ MFC calls Lua
These days, I've studied lua. The main focus is on the integration between Lua and vc. Write the code in the host program and then call the host program's code (or interface, component, whatever you like) in lua. I want to use scripts to control the host program's behavior. This is actually a separate, script-controlled architecture, which some ...
Added by mikeschuld on Tue, 09 Nov 2021 19:40:45 +0200
Jedis simple operation, Redis pipeline, Lua script and jedis simple example
1. Overall code example
public class JedisSingleTest {
public static void main(String[] args) throws IOException {
JedisPoolConfig jedisPoolConfig = new JedisPoolConfig();
jedisPoolConfig.setMaxTotal(20);
jedisPoolConfig.setMaxIdle(10);
jedisPoolConfig.setMinIdle(5);
// Timeout, which is both a ...
Added by DeathRipple on Thu, 21 Oct 2021 21:51:59 +0300