思路:函数先计算数值加减乘除,case赋值输出对应的加减乘除#!/bin/bashadd(){add=$[$1+$2]echo"outcome:$1+$2=$add"}minus(){min=$[$1-$2]echo"outcome:$1-$2=$min"}multiply(){mult=$[$1*$2]echo"outcome:$1x$2=$mult"}divide(){div=$[$1/$2]
分类:
系统相关 时间:
2020-11-20 11:18:50
阅读次数:
15
1 怎么new出来一个ThreadLocal 1 private ThreadLocal<Integer> num=new ThreadLocal<Integer>(){ 2 public Integer initialValue(){ 3 return 0; 4 } 5 }; 2 实现 initi ...
分类:
其他好文 时间:
2020-11-17 12:50:01
阅读次数:
8
1.Set集合 1.1Set集合概述和特点【应用】 可以去除重复 存取顺序不一致 没有带索引的方法,所以不能使用普通for循环遍历,也不能通过索引来获取,删除Set集合里面的元素 1.2Set集合的使用【应用】 存储字符串并遍历 package com.itheima.myset; import j ...
分类:
其他好文 时间:
2020-11-17 12:49:44
阅读次数:
7
Given an array of integers nums and an integer threshold, we will choose a positive integer divisor and divide all the array by it and sum the result ...
分类:
其他好文 时间:
2020-11-13 13:21:44
阅读次数:
33
经典dfs将当前位置传入,标记和当前点一类的点,同时进行计数 class Solution { public int[] pondSizes(int[][] land) { List<Integer> res = new LinkedList<>(); int m = land.length,n = ...
分类:
其他好文 时间:
2020-11-13 13:11:37
阅读次数:
9
Config 简介 分布式系统中,由于服务数量非常多,配置文件分散在不同微服务项目中,管理极其不方便。为了方便配置文件集中管理,需要分布式配置中心组件。在Spring Cloud中,提供了Spring Cloud Config,它支持配置文件放在配置服务的本地,也支持配置文件放在远程仓库Git(Gi ...
分类:
编程语言 时间:
2020-11-13 12:46:07
阅读次数:
9
class MinStack { Deque<Integer> stack; Deque<Integer> min_stack; /** initialize your data structure here. */ public MinStack() { stack = new LinkedLis ...
分类:
其他好文 时间:
2020-11-11 16:27:13
阅读次数:
9
tf.app.flags.DEFINE_integer('num_blocks', 1, 'Number of blocks in each attention') tf.app.flags.DEFINE_integer('num_heads', 8, 'Number of heads in eac ...
分类:
其他好文 时间:
2020-11-10 11:08:36
阅读次数:
6
class Solution { public List<List<Integer>> subsets(int[] nums) { List<List<Integer>> res = new ArrayList<>(); res.add(new ArrayList<>()); for(int i = ...
分类:
其他好文 时间:
2020-11-08 16:53:04
阅读次数:
16
<el-select v-model="value" filterable placeholder="请选择" @change="select"> <el-option v-for="item in options" :key="item.value" :label="item.label" :va ...
分类:
其他好文 时间:
2020-11-08 16:50:04
阅读次数:
14