Map Map的遍历可以通过键找值得方式,也可以一个个键值对的遍历 使用key遍历 方法一 : iterator+key Map<String, Object> map = new HashMap<String, Object>(); map.put("name", "Tom"); map.put( ...
分类:
编程语言 时间:
2020-07-28 22:22:11
阅读次数:
75
#include<iostream> #include<cstdio> using namespace std; float a, b, c, d; float l, r; float clac(float x){ return a * x * x * x + b * x * x + c * x + ...
分类:
其他好文 时间:
2020-07-28 22:15:33
阅读次数:
72
面向对象总结 面向对象 1、scala包 1、声明包 1、在文件第一行通过package 包名 2、package 包名{ .... } 第二种方法,包名只能在target目录才能看到 2、导入包 1、导入包下所有类: import 包名._ 2、导入包下多个类: import 包名.{类名1,类名 ...
分类:
其他好文 时间:
2020-07-28 22:06:58
阅读次数:
61
1.字符串 package com.imooc.bigdata.scala_test object HelloWord { def main(args: Array[String]) { // 定义一个字符串 val 定义的不可变 var 可变 val greeting = "Hello,World ...
分类:
其他好文 时间:
2020-07-28 17:27:39
阅读次数:
89
/// <summary> /// 防XSS攻击 /// date:2020-07-28 /// </summary> public class XssFilter : ActionFilterAttribute { private const string strRegex = @"<[^>]+? ...
分类:
其他好文 时间:
2020-07-28 16:59:08
阅读次数:
62
题目链接:https://www.acwing.com/problem/content/279/ 题目给定一个长度为n的序列g,和一个数m,要求将m分成n份,设定为数列a,使得数列g与数列a的乘积最小。根据排序不不等式,在g是升序的情况下,a是降序才会使得结果最小。所以对g进行降序排序之后,题意中的 ...
分类:
编程语言 时间:
2020-07-28 14:39:38
阅读次数:
80
Leetcode.283 Move Zeroes Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero e ...
分类:
编程语言 时间:
2020-07-28 14:38:35
阅读次数:
91
AcWing 790. 数的三次方根 #include <bits/stdc++.h> using namespace std; int main(){ double n,mid; scanf("%lf",&n); double l=-1e6-10,r=1e6+10; while(r-l>1e-8) ...
转至:https://blog.csdn.net/dj0379/article/details/50946398/ declare -i iv=$svnvlet iv+=1shell中变量自增的实现方法Linux Shell中写循环时,常常要用到变量的自增,现在总结一下整型变量自增的方法。我所知道的 ...
分类:
系统相关 时间:
2020-07-28 14:23:57
阅读次数:
91
AcWing 801. 二进制中1的个数 #include <bits/stdc++.h> using namespace std; int lowbit(int x){ return x&-x; } int main(){ int n; cin>>n; while(n--){ int x,res= ...