banner
RustyNail

RustyNail

coder. 【blog】https://rustynail.me 【nostr】wss://ts.relays.world/ wss://relays.world/nostr
springMVC 处理Multipart 类型的请求
处理表单的时候,可能会传过来一个文件。 配置 multipart 解析器 解析器是 MultipartResolver 的子类,一般使用standardServletMultipartResolver就行了。 直接在 spring 配置文件里添加 Copy <bean class…
cover

【调包侠的机器学习】dont-call-me-turkey 火鸡叫声识别

Copy import tensorflow as tf import numpy as np from matplotlib.pyplot import plot import pandas as pd Copy train_data = pd.read_json("..…
sql 分隔逗号
Copy select distinct substring_index(substring_index(a.m, ',' , b.help_topic_id + 1), ',', -1)…
ajax统一预处理响应数据
Copy $.ajaxSetup({ contentType: "application/x-www-form-urlencoded;charset=utf-8", headers: { 'ConnectionA': 'yes' },…
如果天空总是黑暗,那就在黑夜中生存
如果天空总是黑暗,那就在黑夜中生存, 如果发出声音是危险的,那就保持沉默; 如果自觉无力发光,那就蜷伏于墙角, 但不要习惯了黑暗就为黑暗辩护; 不要为自己的苟且而得意; 不要嘲讽那些比自己更勇敢的人们。 我们可以卑微如尘土,不可扭曲如蛆虫。
Markdown插入音频文件
markdown 也是可以插入 html 的 Copy <audio controls> <source src="https://someonedeng-1253259777.cos.ap-guangzhou.myqcloud.com/blog%2Fmedia%2FAlan…
cover

定制收集器Collector-实现GroupingBy

确定类型 定制 collector 要实现 Collector 接口,首先要确定类型 待收集元素的类型 累加器 /accumulate 的类型 最终结果的类型 假设要实现这么个收集器: Copy public class GroupingBy<T,K> implements…
cover

な形容词

な形容词 な形容词跟名词基本一样,所以很好学。な形容词和名词的活用规则是一样的,主要区别在于用な形容词形容词修饰名词的时候中间要加一个「な」(这就是な形容词这个名字的由来)。 例子: 静かな人。 綺麗な人。 友達は親切な人だ。 な 形容词的活用和名词是一样的 adj +…
cover

南湖

DES加密的java使用
加密 Copy public byte[] encrypt(byte[] data, String key) throws Exception { try{ SecureRandom random = new SecureRandom…
cover

突然变欧

哈哈哈哈哈哈嗝
cover

Flutter的stateful widget

Flutter 的 stateful widget 在 flutte 里面的 widget,分为 stateless 和 stateful 两种,不过他们的相同点是,他们都是不可变的(immutable)。 在 StatelessWidget 里面通过重写build方法来返回界面…
cover
cover

【调包侠的机器学习】Kaggle手写数字识别

Copy # kaggle: https://www.kaggle.com/competitions/digit-recognizer/data Copy import tensorflow as tf import numpy as np from matplotlib…
cover
cover

SkipList(跳表)

在看《Redis 设计与实现》的时候看到有涉及跳表(SkipList)的相关应用,就想了解一下。作记录如下。 跳表其实就是一个同时维护多条链表的数据结构。换句话说,就是为了加快查询速度,而占用更多的空间来储存数据,算是空间换时间了。 结构看起来是这样的: 结构 在一般的链表里…
Redis is configured to save RDB snapshots 错误
redis 出现 Copy redis.clients.jedis.exceptions.JedisDataException: MISCONF Redis is configured to save RDB snapshots, but is currently not able…
cover
cover

Spring Security 的登录密码验证

spring security 在配置登陆的时候可以加密。 一般来说,数据库中不会存放明文密码,而是存放密码的 hash 值,而且是加过盐的密码哈希值。 而 spring security 提供了相关的加密方案。 BCryptPasswordEncoder 目前 spring…
cover

哈哈哈哈哈哈哈哈哈嗝

TextView 动态改变Drawble的背景颜色
碰到动态改变 Drawble 的颜色的需要,记录一下 创建一个 shape 在 /drawble/t_shape.xml Copy <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http…
Ownership of this blog data is guaranteed by blockchain and smart contracts to the creator alone.