当类实现接口时,该接口作为一种类型(type),可以用来引用类的实例。因此,一个类实现了一个接口,因此表明客户端可以如何处理类的实例。为其他目的定义接口是不合适的。 一种失败的接口就是所谓的常量接口(constant interface)。 这样的接口不包含任何方法; 它只包含静态 final 属性 ...
分类:
其他好文 时间:
2020-04-15 09:15:31
阅读次数:
75
1、redis info详解 127.0.0.1:6379> info all# Server(服务器信息)redis_version:3.0.0 #redis服务器版本redis_git_sha1:00000000 #Git SHA1redis_git_dirty:0 #Git dirty fla ...
分类:
其他好文 时间:
2020-04-15 01:08:39
阅读次数:
83
Look-and-say sequence is a sequence of integers as the following: D, D1, D111, D113, D11231, D112213111, ... where D is in [0, 9] except 1. The (n+1)s ...
分类:
其他好文 时间:
2020-04-15 00:24:16
阅读次数:
63
#!/bin/bash #保存备份个数 number=3 #备份保存路径 backup_dir=/root/mysqlbackup #日期 dd=`date +%Y%m%d` #备份工具 tool=mysqldump #用户名 username=mracale #密码 password=456852 ...
分类:
数据库 时间:
2020-04-14 22:55:13
阅读次数:
85
using System;using System.Collections;using System.Collections.Generic;using System.IO;using System.Net;using System.Net.Http;using System.Net.Securit ...
分类:
Web程序 时间:
2020-04-14 22:49:52
阅读次数:
92
Given a non-empty 2D array grid of 0's and 1's, an island is a group of 1's (representing land) connected 4-directionally (horizontal or vertical.) Yo ...
分类:
其他好文 时间:
2020-04-14 22:48:18
阅读次数:
67
本题要求编写程序,根据输入的三角形的三条边a、b、c,计算并输出面积和周长。注意:在一个三角形中, 任意两边之和大于第三边。三角形面积计算公式:area=√ ?s(s?a)(s?b)(s?c) ? ?? ,其中s=(a+b+c)/2。 输入格式: 输入为3个正整数,分别代表三角形的3条边a、b、c。 ...
分类:
其他好文 时间:
2020-04-14 22:40:19
阅读次数:
142
String[] str = {"aa","kser","bdf","ope","aa"}; String[] str2 = str.Distinct().ToArray(); ...
分类:
编程语言 时间:
2020-04-14 22:35:46
阅读次数:
50
2.5 工作目录切换命令 1. pwd命令 pwd命令以绝对路径的方式显示用户当前工作目录。 选项 --help:显示帮助信息; --version:显示版本信息。 实例 [root@localhost ~]# pwd /root 1. cd命令 cd命令用来切换工作目录至dirname。 选项 - ...
分类:
系统相关 时间:
2020-04-14 22:28:34
阅读次数:
109
两数相加 难度:中等 类型: 链表 给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。 如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。 您可以假设除了数字 0 之外,这两个数都不会以 0 开头。 ...
分类:
编程语言 时间:
2020-04-14 20:38:50
阅读次数:
65