类型转换 低——————————————————高 byte->short->char->int->long->float->double 由于Java是强类型语言,所以进行有些运算的时候,需要用到类型转换 运算中,不同类型的数据先转化为同一类型,然后进行运算 强制类型转换 (类型)变量名 高——低 ...
分类:
编程语言 时间:
2021-02-10 12:58:59
阅读次数:
0
GEO底层是基于zset来实现的 常用命令:https://blog.csdn.net/liutao43/article/details/110576772 geoadd key 经度 纬度 member : 可以批量添加 geodist key member1 member2 [m/km/fm] ...
分类:
其他好文 时间:
2021-02-10 12:58:44
阅读次数:
0
数据类型 Java是强类型语言,要求变量的使用要严格符合规定,所有变量必须先定义后才能使用 基本类型 数值类型 整数类型(byte,short,int,long) byte占一个字节范围:-128—127 short占两个字节范围:-32768—32767 int占四个字节范围:-214748364 ...
分类:
编程语言 时间:
2021-02-09 12:24:02
阅读次数:
0
A:把多余的步数删掉即可。 #include<bits/stdc++.h> using namespace std; typedef long long LL; typedef pair<int,int> pii; const int N = 1e4 + 5; const int M = 1e4 + ...
分类:
其他好文 时间:
2021-02-09 12:16:59
阅读次数:
0
//更改I/O缓冲大小 //set_buffer.c#include <stdio.h>#include <stdlib.h>#include <unistd.h>#include <sys/socket.h>void error_handling(char*message); int main(i ...
分类:
其他好文 时间:
2021-02-09 12:11:39
阅读次数:
0
在Java中,8种基本数据类型并不能表示所有的数字。 整数无法表示比byte最小取值还小的,比long最大取值还大的。 浮点数本身有精度, 这就注定有很多数字用基本类型没有办法表示。 BigInteger用来表示不可变的任意精度的整数。BigDecimal用来表示不可变的、任意精度的有符号十进制数。 ...
分类:
其他好文 时间:
2021-02-09 12:02:58
阅读次数:
0
什么是方法引入: 方法引入:需要结合lambda表达式能够让代码变得更加精简。 1.匿名内部类使用。 2.Lambda调用匿名内部类。 3.方法引入。 方法引入的几种: 1.静态方法引入: 类名::(静态)方法名称 2.对象方法引入: 类名:: 实例方法名称 3.实例方法引入: new 对象 对象实 ...
分类:
其他好文 时间:
2021-02-09 12:01:49
阅读次数:
0
A 一共n个人,去a餐厅的有a人,去b餐厅有b人,两个都去的有c人,求没有去的有多少,如果数据不合理或没去的人数少于1,输出-1 #include<bits/stdc++.h> using namespace std; #define ll long long int main() { int n, ...
分类:
其他好文 时间:
2021-02-09 11:44:03
阅读次数:
0
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double db; ll a, b, c, d; void solve1() { if (a > 0) { puts("(-inf,inf)"); ...
分类:
其他好文 时间:
2021-02-08 12:05:36
阅读次数:
0
class Solution { public: int f[1005][1005]; int longestCommonSubsequence(string text1, string text2) { memset(f,0,sizeof(f)); int n=text1.size(); int ...
分类:
其他好文 时间:
2021-02-08 11:51:48
阅读次数:
0