Newstrong's 博客

Kratos
专注于用户阅读体验的响应式博客主题
Android

git类图形化log

git图形化log git查看commit的命令是 输入之后的效果如下: 上图非常不直观,没有分支的概念,只有每次提交的commit的相关信息。试一试下面的一段代码吧。 如果你使用的是 Windows 系统,请参考以下对应版本的命令: PowerShell 版本 CMD 版本 CMD 中 % 需要用 %% 转义。 输入下面的代码,查看修改后的效果。 附注:此命令将git log的输出格式化为彩色图形化显示,通过--graph选项展示分支结构,--all显示所有分支,%Cgreen/%Cblue/%Creset添加颜…

2026年7月7日 8点热度 0人点赞 newstrong 阅读全文
git

ZSH Git Plugin 别名表格

      ZSH Git Plugin 别名表格 包含所有别名、对应命令和详细描述 导出 Excel 文件 导出 CSV 文件   分类标题   命令代码   普通行   缩写/Alias 命令/Command 描述/Description  

2026年1月5日 30点热度 0人点赞 newstrong 阅读全文
未分类

Prefer Function Reference over Lambda in Kotlin? Wrong!

Using lambda as callback is very common in Jetpack compose, but do you know you can also use function reference to replace the lambda? When I first heard about this function reference, I thought the function reference must be better. Unlike anonymous function …

2025年3月21日 25点热度 0人点赞 newstrong 阅读全文
未分类

ZonedDateTime toString compatability with ISO 8601

I am trying to ensure that calling toString() on my ZonedDateTime Object will comply with ISO-8601 format. The documentation for the toString() method states: ...The output is compatible with ISO-8601 if the offset and ID are the same Does this mean that there…

2024年10月29日 17点热度 0人点赞 newstrong 阅读全文
未分类

Jetpack 自定义 DropDownMenu

@Composable fun DropDownMenu(initPosition: Int, values: List<String>, onValueChange: (String) -> Unit) { val expanded = remember { mutableStateOf(false) } val itemPosition = remember { mutableIntStateOf(initPosition) } Box( modifier = Modifier .backgr…

2024年10月11日 16点热度 0人点赞 newstrong 阅读全文
未分类

Compose 动画 (三) : AnimatedVisibility 从入门到深入,实现组件的隐藏和显示

1. AnimatedVisibility 是什么 AnimatedVisibility是Android Compose中的一个高级别动画API。 可以实现Compose组件的显示和隐藏,并且可以指定显示/隐藏时候的动画效果。(EnterTransition/ExitTransition) 和 animateXxxAsState、animateContentSize、Crossfade、AnimatedContent 这几个API一起,都是Compose的高级别动画API,是比较易用的。 2. AnimatedVi…

2024年10月10日 30点热度 0人点赞 newstrong 阅读全文
未分类

moshi 极简封装

目录 前言 Jackson的基本使用 Jackson获取泛型类型的巧妙处理 借鉴jackson优化moshi的封装 使用 总结 前言 之前写了一篇文章是介绍moshi的基本使用和实战,感兴趣的可以先看一下对kotlin友好的现代 JSON 库 moshi 基本使用和实战 在那篇文章中,我们最后针对moshi做了个封装,代码大致如下: import com.squareup.moshi.JsonAdapter import com.squareup.moshi.Moshi import com.squareup.mo…

2024年9月28日 23点热度 0人点赞 newstrong 阅读全文
性能优化

内存泄露(十)-- KOOM(高性能线上内存监控方案)

KOOM介绍 OOMMonitor 介绍 KOOM线上APM监控最全剖析 一文看懂快手KOOM高性能监控方案 KOOM 浅析 【开源库剖析】KOOM V1.0.5 源码解析 目录 KOOM 功能 1. Java Heap 泄漏监控 1.1 OOMMonitor 介绍 1.2 OOMMonitor 适用范围 1.3 OOMMonitor 接入 2. Native Heap 泄漏监控 2.1 LeakMonitor 介绍 2.2 LeakMonitor 适用范围 2.3 LeakMonitor 接入 3. Thread…

2024年9月28日 20点热度 0人点赞 newstrong 阅读全文
未分类

自定义的BasicTextField,只包含 BasicTextField 的基本功能和 placeHolder

/** * 自定义的BasicTextField,只包含 @see BasicTextField 的基本功能和 placeHolder * * @param placeHolder 没有输入的占位符 */ @Composable fun CustomBasicTextField( value: String, onValueChange: (String) -> Unit, placeHolder: (@Composable BoxScope.() -> Unit)? = null, modifier:…

2024年9月25日 30点热度 0人点赞 newstrong 阅读全文
未分类

FindClass from any thread in Android JNI

JavaVM* gJvm = nullptr; static jobject gClassLoader; static jmethodID gFindClassMethod; JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *pjvm, void *reserved) { gJvm = pjvm; // cache the JavaVM pointer auto env = getEnv(); //replace with one of your classes in the li…

2024年9月20日 185点热度 0人点赞 newstrong 阅读全文
123

近期文章

  • git类图形化log
  • ZSH Git Plugin 别名表格
  • Prefer Function Reference over Lambda in Kotlin? Wrong!
  • ZonedDateTime toString compatability with ISO 8601
  • Jetpack 自定义 DropDownMenu
标签聚合
googleplay gpt kotlin 开发 技术

COPYRIGHT © 2026 Newstrong's 博客. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang

蜀ICP备2024057367