自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(14)
  • 收藏
  • 关注

原创 黑马头条-文章审核

其核心思想是:使用41bit作为毫秒数,10bit作为机器的ID(5个bit是数据中心,5个bit的机器ID),12bit作为毫秒内的流水号(意味着每个节点在每毫秒可以产生 4096 个 ID),最后还有一个符号位,永远是0。如果数据库中该表选用ID自增策略,则可能产生重复的ID,此时应该使用分布式ID生成策略来生成ID。文章端相关的表都使用雪花算法生成id,包括ap_article、 ap_article_config、 ap_article_content。1 自媒体端发布文章后,开始审核文章。

2024-12-22 14:16:19 401

原创 Java HashMap中Map.entry原理

所以Entry的主要作用就是获取Map中的键和值,使用场景就是便利整个映射,获取相应的值。中的一个键值对(key-value pair)。结构中每个元素的基本表示形式。是一个静态内部接口,定义在。通常用于遍历整个映射(例如。),以便同时获取键和值。

2024-11-15 20:46:59 159

原创 Mybaits底层原理

MyBatis的底层操作封装了JDBC的API,MyBatis的工作原理以及核心流程与JDBC的使用步骤一脉相承,MyBatis的核心对象(SqlSession,Executor)与JDBC的核心对象(Connection,Statement)相互对应。

2024-10-23 21:24:40 224 1

原创 BaseContext的使用

在http的一次请求中,一些特定情境下,我们无法通过request.getSession.getAttribute获取当前所登录用户的id,此时若需要获取当前所登录用户的id,我们可以采用ThreadLocal来解决问题,首先要明确一个问题就是,ThreadLocal并不是一个Thread,而是Thread的局部变量。当使用ThreadLocal维护变量时,ThreadLocal为每个使用该变量的线程提供独立的变量副本,所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。

2024-10-22 23:20:29 316

原创 English translate

BackgroundHugo Heavy is happy. After the breakdown of the Cargolifter project he can now expand business. But he needs a clever man who tells him whether there really is a way from the place his customer has build his giant steel crane to the place where

2022-02-10 21:33:33 197

原创 English translate

A group of N people wishes to go across a river with only one boat, which can at most carry two persons. Therefore some sort of shuttle arrangement must be arranged in order to row the boat back and forth so that all people may cross. Each person has a dif

2022-02-08 15:45:39 325

原创 English translat

We can number binary trees using the following scheme:The empty tree is numbered 0.The single-node tree is numbered 1.All binary trees having m nodes have numbers less than all those having m+1 nodes.Any binary tree having m nodes with left and right s

2022-02-08 15:44:34 7109

原创 English translate

"The item is locked in a Klein safe behind a painting in the second-floor library. Klein safes are extremely rare; most of them, along with Klein and his factory, were destroyed in World War II. Fortunately old Brumbaugh from research knew Klein's secrets

2022-02-06 20:37:35 238

原创 English translate

Reverse Polish notation (or just RPN) by analogy with the related Polish notation, a prefix notation introduced in 1920 by the Polish mathematician Jan Łukasiewicz, is a mathematical notation wherein every operator follows all of its operands. It is also k

2022-01-23 22:12:54 711

原创 English translate

Sally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit even though its color and size make it indistinguishable from the real silver dollars. The counterfeit coin has a different

2022-01-21 12:14:59 320

原创 English translate

Bessie was poking around the ant hill one day watching the ants march to and fro while gathering food. She realized that many of the ants were siblings, indistinguishable from one another. She also realized the sometimes only one ant would go for food, som

2022-01-20 17:44:09 1539

原创 English translate

OpenJudge - 755:Flip GameFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying either it's black or white side up. Each ro

2022-01-19 15:55:21 2893

原创 English translate

The item is locked in a Klein safe behind a painting in the second-floor library. Klein safes are extremely rare; most of them, along with Klein and his factory, were destroyed in World War II. Fortunately old Brumbaugh from research knew Klein's secrets a

2022-01-19 15:52:02 79

原创 English translate

We can number binary trees using the following scheme:The empty tree is numbered 0.The single-node tree is numbered 1.All binary trees having m nodes have numbers less than all those having m+1 nodes.Any binary tree having m nodes with left and right s

2022-01-17 19:43:47 330

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除