package 第5章;
import java.util.*;
public class EnumTest {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
System.out.println("Enter a size: (SMALL,MEDIUM,LARGE,EXTRA_LARGE");
String input=in.next().toUpperCase();//把小写转化为大写的
...
import java.util.ArrayList;
public class ArrayList1 {
public static void main(String[] args) {
X a=new X(2);
/*
* <>括号里面表示类的类型而不能写基本数据类型 如int,double等等,如果要初始化int等基本数据类型,把int类型转化为interger类即可
* 如ArrayList<integer> List=new ArrayList<>(1000); ()里面表示初始化多...
UniversityofCanberra
Faculty
of Science and Technology
Web Design and Programming (7175 & 6691)
Assignment
2 Hint
Submission
date: 23:59 Sunday
01/11/2020 (Week 13)
Type: Individual
assignment
Total mark: 20
Minimum
mark to pas...
package String;
public class Test01 {
public static void main(String[] args) {
//String 是一个类,创建一个对象后,该对象会有变量方法等,
//不要把String当成一个普通变量来比较"=="这个符号
//String 对hashCode方法进行了重写;得到的是字符串的编码而和别的类要区别对待
{
String a="hello word";//由String 创建的a指向堆内存的空间
...
网上很多资料都是介绍桌面版的,对server版不管用,其实server版开放root登录要简单的多,只需要三步:
1、sudo passwd root 设置root密码
2、sudo vi /etc/ssh/sshd_config 修改
PermitRootLogin without-password
为
PermitRootLogin yes
3、sudo systemctl restart sshd 重启sshd服务
然后就可以使用root登录了
若依默认使用的是mybatis,改成mybatis-plus后一些配置也需要修改:
1、把application.yml中的mybatis:改成mybatis-plus:,删除下面的configLocation: classpath:mybatis/mybatis-config.xml,同时相关的配置文件ruoyi-admin/src/main/resources/mybatis/mybatis-config.xml也可以删除了
2、全局搜索SqlSessionFactory,删除ruoyi-framework/src/main/java/com/ruoyi...
C语言的文件作用域是作用于一个文件还是多个文件?
print("计算 100以内偶数的和的结果为:")
#保存累加结果的变量
result = 0
for i in range(1,10):
for n in range(1,i+1):
result = i * n
print("%s*%s=%s"%(n,i,result),end =" ")
print("")
private static List<String> getRetain(List<String> ... lists ){
if(lists == null){
return null;
}
ArrayList<List<String>> arrayList = new ArrayList<>(lists.length);
int index=0;
int flagSize=0;
int minIndex=0;
for(List<...
15.使用字符分类函数实现atoi()函数。 如果输入的字符串不是纯数字,该函数返回0。
#include<stdio.h>
int catoi(char*);
int main(void)
{
char ch[100];
int tot;
printf("please input:");
gets(ch);
tot=catoi(ch);
printf("the number:%d",tot);
return 0;
}
int catoi(char*s)
{
int i=0;
int sum=0;
...
13.编写一个程序, 反序显示命令行参数的单词。 例如, 命令行参数是see you later, 该程序应打印later you see
#include<stdio.h>
#include<string.h>
#include<ctype.h>
void st(char**,int);
int main(int argc,char *argv[])
{
//printf("%d\n",argc);
for(int i=1;i<argc;i++)
{
puts(argv[i]);
}
st(argv,argc);
ret...
cd /var/log
tail -f auth.log
新开一个终端尝试免密登陆,上面的命令输出最新日志:
ov 28 21:53:49 bccnsoft sshd[24812]: Authentication refused: bad ownership or modes for directory /root
Nov 28 21:53:49 bccnsoft sshd[24812]: userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth]
...
https://github.com/OpenDBDiff/OpenDBDiff
序号
类别
SQLServer
C Sharp
备注
1
整数
bit
...
先转载,后面再总结:https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-5.0
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int letter(char);
int main()
{
char ch;
int i;
while((ch=getchar())!=EOF)
{
if(i%10==0)printf("\n");
printf("%c=%d\t",ch,letter(ch));
i++;
}
return 0;
}
int letter(char ch)
{
int a;
a=isalpha(c...
#include <stdio.h>
#include <string.h>
void large(double*,double*,double*);
int main()
{
double first,second,third;
printf("input first:");
scanf("%lf",&first);
printf("input second:");
scanf("%lf",&second);
printf("input third:");
scanf("%lf",&third);...
编写程序,计算使用某快递公司运输货物的运费(用if语句)。
要求:
1)显示目的城市列表,通过输入需要选择城市。
2)输入货物重量
3)根据运费价格表来计算运费,其中首重费用为1kg以内的费用,超过1kg的部分每公斤使用续重费用计算。
4)1kg内的总运费=首重费用
大于1kg的总运费=首重费用+(重量-1)*续重
城市 费用
广东 首重8元,续重2元
上海 首重9元,续重7元
北京 首重12元,续重10元
东三省 首重15元,续重13元
#include <stdio.h>
#include <string.h>
...
#include <stdio.h>
void small(char,int,int);
int main(void)
{
int x,y;
char ch;
printf("zifu:");
ch=getchar();
printf("lie:");
scanf("%d",&y);
printf("lines:");
scanf("%d",&x);
small(ch,x,y);
return 0;
}
void small...
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(void)
{
int ch=0;
int up=0,a=0,b=0;
int count=0,let=0;
double pj;
while((ch=getchar())!=EOF)
{
a=isalpha(up);
if(a)a=1;
b=isalpha(ch);
if(b){b=1;let++;}
if(a==0&&b==1)count++;
up=ch;
}
...