首页
学习
活动
专区
工具
TVP
发布

眯眯眼猫头鹰的小树杈

专栏作者
152
文章
86719
阅读量
25
订阅数
从零开始JVM(一):初探JVM运行时数据区域
最近重新开始阅读《深入了解Java虚拟机》这本书,就想着用一个系列文章来记录和分享自己的心得。为什么要说”重新“呢?是因为这本书我在多年前就买了,中间也曾翻来覆去的看过。这个”翻来覆去“可以说是非常的生动形象,因为我不仅从前往后看,也从后往前看了这本书。但是,这并不是一个值得骄傲的过程,因为我之前看的时候经常被卡住(俗称看不懂),导致我中途放弃。再次拾起的时候为了多一些新鲜感,就尝试从后往前看,事实证明效果依旧不佳。今年我又拿起这本书(生活所迫),这次阅读下来,相比之前要流畅许多,可能是因为有了一些工作经验吧(社会的毒打)。感觉这本书难以坚持阅读主要有几个几个原因:
眯眯眼的猫头鹰
2022-03-23
1720
一劳永逸的优化!并发RPC调用小工具
系统的性能优化是每一个程序员的必经之路,但也可能是走过的最深的套路。它不仅需要对各种工具的深入了解,有时还需要结合具体的业务场景得出定制化的优化方案。当然,你也可以在代码中悄悄藏上一个Thread.sleep,在需要优化的时候少睡几毫秒(手动狗头)。性能优化这个课题实在是太浩瀚了,以至于目前市面上没有一本优质的书能够全面的总结这个课题。不仅如此,即使是深入到各个细分领域上,性能优化的手段也非常丰富,令人眼花缭乱。
眯眯眼的猫头鹰
2022-03-23
6330
日志分析常规操作
日志是开发者用来分析程序和排查问题的重要工具。随着系统架构从早期的单体应用,演变到如今的微服务架构,日志的重要性也逐步提升。除了用日志辅助问题排查,还可以通过日志对微服务请求的全链路进行性能分析,甚至可以它用来解决分布式系统中的一致性问题。与此同时,系统产生的日志量和日志管理难度也显著增加。于是,日志管理工具随之诞生并迭代升级。从最开始登录到跳板机上查看日志,到自建分布式日志中心来统一管理日志流,到云平台厂商提供专门的日志管理服务。开发者只需要在应用中接入SDK将日志回流到日志平台,就可以使用日志平台提供智能检索、数据分析以及链路分析等能力,平台中易用的图形化界面和成熟的数据管理能力极大的提升了开发效率。
眯眯眼的猫头鹰
2022-03-23
4370
猫头鹰的深夜翻译:开发者最常踩到的六个低效陷阱
高效的时间管理是大部分成功的软件工程师具备的能力。它能够帮助你在职业生涯上快速进步,而不是每个敏捷迭代末疯狂加班。
眯眯眼的猫头鹰
2022-03-23
2480
猫头鹰的深夜翻译:趣谈Java Exception
Java异常类(Exception)是用来处理异常程序行为的一组类。在这篇文章中,我将介绍如何使用Java异常类,以及在程序中如何设计Java异常体系。Exception类是Java体系中非常重要的一环,每一个程序员都必须熟悉并掌握它。
眯眯眼的猫头鹰
2022-03-23
4800
Mybatis Generator Plugin悲观锁实现
Mybatis Generator插件可以快速的实现基础的数据库CRUD操作,它同时支持JAVA语言和Kotlin语言,将程序员从重复的Mapper和Dao层代码编写中释放出来。Mybatis Generator可以自动生成大部分的SQL代码,如update,updateSelectively,insert,insertSelectively,select语句等。但是,当程序中需要SQL不在自动生成的SQL范围内时,就需要使用自定义Mapper来实现,即手动编写DAO层和Mapper文件(这里有一个小坑,当数据库实体增加字段时,对应的自定义Mapper也要及时手动更新)。抛开复杂的定制化SQL如join,group by等,其实还是有一些比较常用的SQL在基础的Mybatis Generator工具中没有自动生成,比如分页能力,悲观锁,乐观锁等,而Mybatis Generator也为这些诉求提供了Plugin的能力。通过自定义实现Plugin可以改变Mybatis Generator在生成Mapper和Dao文件时的行为。本文将从悲观锁为例,让你快速了解如何实现Mybatis Generator Plugin。
眯眯眼的猫头鹰
2022-03-23
5070
记一次PageHelper分页未生效问题排查
最近在项目中使用PageHelper分页工具+Mybatis实现分页查询逻辑,但是发现分页逻辑并没有生效,代码片段如下:
眯眯眼的猫头鹰
2022-03-23
1.2K0
记一次logback配置文件未生效问题排查
最近在公司新建了一个JAVA微服务,采用的是springboot框架,logback作为日志模块的实现。在搭建的的过程中想起之前在文档中看到springboot支持用logback-spring.xml作为定制的logback配置文件。在这个文件中可以使用spring的定制化标签,比如可以根据当前生效的profile对日志文件进行配置,从而省去配置多份日志文件并在profile中指定具体当前生效的配置。在阅读了一下教程之后,我在resources目录下新建了logback-spring.xml的配置文件,内容如下:
眯眯眼的猫头鹰
2022-03-23
3.6K0
每个开发必须了解的Unicode和字符集的那些事!
你曾经对神秘的Content-Type标签感到好奇吗?就是那个在HTML中经常用到但是很少有人了解为什么要去使用它的标签。
眯眯眼的猫头鹰
2021-04-01
1.3K0
leetcode529. Minesweeper
Let's play the minesweeper game (Wikipedia),online game)!
眯眯眼的猫头鹰
2020-05-12
4540
leetcode540. Single Element in a Sorted Array
You are given a sorted array consisting of only integers where every element appears exactly twice, except for one element which appears exactly once. Find this single element that appears only once.
眯眯眼的猫头鹰
2020-05-12
3390
leetcode535. Encode and Decode TinyURL
TinyURL is a URL shortening service where you enter a URL such as https://leetcode.com/problems/design-tinyurl and it returns a short URL such as http://tinyurl.com/4e9iAk.
眯眯眼的猫头鹰
2020-05-12
3650
leetcode543. Diameter of Binary Tree
Given a binary tree, you need to compute the length of the diameter of the tree. The diameter of a binary tree is the length of the longest path between any two nodes in a tree. This path may or may not pass through the root.
眯眯眼的猫头鹰
2020-05-12
3100
leetcode495. Teemo Attacking
In LOL world, there is a hero called Teemo and his attacking can make his enemy Ashe be in poisoned condition. Now, given the Teemo's attacking ascending time series towards Ashe and the poisoning time duration per Teemo's attacking, you need to output the total time that Ashe is in poisoned condition.
眯眯眼的猫头鹰
2020-05-12
3080
leetcode460. LFU Cache
Design and implement a data structure for Least Frequently Used (LFU) cache. It should support the following operations: get and put.
眯眯眼的猫头鹰
2020-05-12
3790
leetcode480. Sliding Window Median
Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two middle value.
眯眯眼的猫头鹰
2020-05-11
3600
leetcode516. Longest Palindromic Subsequence
Given a string s, find the longest palindromic subsequence's length in s. You may assume that the maximum length of s is 1000.
眯眯眼的猫头鹰
2020-05-11
4080
leetcode464. Can I Win
In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach or exceed 100 wins.
眯眯眼的猫头鹰
2020-05-11
2870
leetcode519. Random Flip Matrix
You are given the number of rows n_rows and number of columns n_cols of a 2D binary matrix where all values are initially 0. Write a function flip which chooses a 0 value uniformly at random, changes it to 1, and then returns the position [row.id, col.id] of that value. Also, write a function reset which sets all values back to 0. Try to minimize the number of calls to system's Math.random() and optimize the time and space complexity.
眯眯眼的猫头鹰
2020-05-11
4520
leetcode503. Next Greater Element II
Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The Next Greater Number of a number x is the first greater number to its traversing-order next in the array, which means you could search circularly to find its next greater number. If it doesn't exist, output -1 for this number.
眯眯眼的猫头鹰
2020-05-11
4420
点击加载更多
社区活动
Python精品学习库
代码在线跑,知识轻松学
热点技术征文第五期
新风口Sora来袭,普通人该如何把握机会?
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
技术创作特训营·精选知识专栏
往期视频·干货材料·成员作品·最新动态
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档