4、compute:default V compute(K key,BiFunction<? super K, ? super V, ? extends V> remappingFunction)
defaultVcompute(K key,BiFunction<?superK,?superV,?extendsV> remappingFunction){Objects.requireNonNull(remappingFunction);// 获取key对应的值V oldValue =get(key);//获取新值V newValue = remappingFunction.apply(key, oldValue);// 如果新值为null,并且key存在,则删除key;否则把新值赋值给keyif(newValue ==null){// delete mappingif(oldValue !=null||containsKey(key)){// something to removeremove(key);returnnull;}else{// nothing to do. Leave things as they were.returnnull;}}else{// add or replace old mappingput(key, newValue);return newValue;}}
5、computeIfAbsent:default V computeIfAbsent(K key,Function<? super K, ? extends V> mappingFunction)
Vue中按需引入Element-plus时,报错TypeError: Components is not a function。
1、参考Element-plus官方文档
安装unplugin-vue-components 和 unplugin-auto-import这两款插件
2、然后需要在vue.config.js中配置webPack打包plugin配置 3、重新启动项目会报错
T…
一、级数符号求和 求无穷级数的和需要 符号表达式求和函数 symsum ,其调用 格式为: symsum(s,v,n,m) 其中 s 表示一个级数的通项,是一个符号表达式。 v 是求和变 量, v 省略时使用系统的默认变量。 n 和 m 是求和的开始项 和…