js打字机动画效果实现
坦白使人心地轻松的妙药。——西塞罗 实现打字机效果 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <title>Title</title> <style> ...
set取交集、并集、差集
蜡烛的美是绝唱的美,它以自焚的痛苦将自己化为光和热,照亮了别人。——鲁迅 123456789101112131415HashSet<String> hashSet = new HashSet<>(Arrays.asList("0", "1", "2"));HashSet<String> hashSet2 = new HashSet<>(Arrays.asList("1", "2", "3"));// 取交集hashSet.retainAll(hashSet2);hashSet.forEach(System.out::println);System.out.println();HashSet<String> hashSet3 = new HashSet<>(Arrays.asList("0", "1", "2"));// 取并集h...
mybatis-plus基本使用
如果一个人不知道他要驶向哪个码头,那么任何风都不会是顺风。——小塞涅卡 上回我们写到封装了axios的工具类 今天我把OSS上传文件接了,可以去项目目录自取 前端项目:https://gitee.com/VampireAchao/my-vue-app.git 后端项目:https://gitee.com/VampireAchao/simple-springboot.git 传统代码以点到为止,所以这里就不再多聊OSS,想了解可以看这篇博客 然后我们聊聊mybatis-plus的基本使用 首先引入依赖,这个没什么好说的 12345<dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>3.1.0</version></dependency> 然后我们按照之前创的表去对应新建一个DO 因为之前我们的表结构为这样【T...
Streamのlist链表转换
如果人生有也能有第二版,我将会如何认真地修改校对!——克莱尔 直接上代码! 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970package com.ruben;/** * @ClassName: ListNodeDemo * @Date: 2020/11/21 0021 00:06 * @Description: */import java.util.Comparator;import java.util.List;import java.util.concurrent.atomic.AtomicInteger;import java.util.function.Function;import java.util.stream.Collectors;import java.util.stream.Stream;/** * @ClassName: ListNodeDe...
vue封装axios请求工具类
以勇气面对人生的巨大悲恸,用耐心对待生活的小小哀伤。——雨果 首先安装 12345678# axioscnpm i --save axios# 格式化参数插件cnpm i -- save qs# 对象合并插件cnpm i -- save lodash# cookie操作cnpm i -- save vue-cookie 然后我们自己封装一个请求组件 首先创建文件 然后放入我们的代码。。。 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132import ...
使用stream流连接两个list
生命如同寓言,其价值不在于长短,而在于内容—— 塞涅卡 1234567List<Integer> integerList = Arrays.stream(new int[]{1, 2, 3}).boxed().collect(Collectors.toList());List<Integer> collect = Stream.concat(integerList.stream(), integerList.stream()).collect(Collectors.toList());collect.forEach(System.out::print);System.out.println();collect = Stream.of(integerList, integerList).flatMap(List::stream).collect(Collectors.toList());collect.forEach(System.out::print);System.out.println();
Stream流の二维数组List<List>互转
少而好学,如日出之阳;壮而好学,如日中之光;老而好学,如炳烛之明。一一刘向 数组转List<List<Integer>> 1List<List<Integer>> collect = Arrays.stream(array).map(a1 -> Arrays.stream(a1).boxed().collect(Collectors.toList())).collect(Collectors.toList()); List<List<Integer>>转int[][] 1array = collect.stream().map(integers -> integers.stream().mapToInt(value -> value).toArray()).toArray(int[][]::new); 二维数组和List<List<Integer>>之间的转换使用stream的话就非常简单了 12345678910int[][] array = new in...
一个有点好用的工具类
就算人生是出悲剧,我们要有声有色地演这出悲剧,不要失掉了悲剧的壮丽和快慰。――尼采 官网 这是apache官方提供的工具类,功能强大 标准Java库无法提供用于操纵其核心类的足够方法。Apache Commons Lang提供了这些额外的方法。 Lang为java.lang API提供了大量帮助程序实用程序,特别是字符串操作方法,基本数值方法,对象反射,并发,创建和序列化以及系统属性。此外,它包含对java.util.Date的基本增强,以及一系列专用于帮助构建方法的实用程序,例如hashCode,toString和equals。 api 依赖 123456<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --><dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> &l...
android隐藏软键盘
聪明出于勤奋,天才在于积累。——华罗庚 代码 1234567/** * 隐藏软键盘 在dialog的编辑界面时 */public static void hideSoftKeyboard(Activity activity, View view) { InputMethodManager inputMethodManager = (InputMethodManager) activity.getSystemService(Activity.INPUT_METHOD_SERVICE); inputMethodManager.hideSoftInputFromWindow(view.getWindowToken(), 0);}
qq邮箱发送
宁鸣而死,不默而生。——胡适 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566package com.ruben.utils; /** * @ClassName: SendEmail * @Date: 2020/11/7 0007 19:36 * @Description: */import com.ruben.pojo.EmailDataTransferObject;import javax.mail.*;import javax.mail.internet.InternetAddress;import javax.mail.internet.MimeMessage;import java.util.Properties;/** * @ClassName: SendEmail * @Description: 我还没有写描述 * @Date: 2020/11/7 0007 19:3...
