Java语言程序设计与数据结构(基础篇)课后练习题 第六章(三)

2023-05-16

6.26

package demo;

import java.util.Scanner;

public class diliuzhang {
        int count=0;
        int base=0;
        int num = 2;
        while(count<100)
        {
            if(isPrime(num)&&isPalindrome(num))
            {
                System.out.print(num+" ");
                count++;
            }
            if(count%10==0&&count!=base) {
                System.out.print('\n');
                base+=10;
            }
            num++;
        }
    }
public static boolean isPrime(int n){
        for(int i=2;i<=n/2;i++){
            if(n%i==0)
                return false;
        }
        return true;
    }
public static boolean isPalindrome(int n){
    String ass = Integer.toString(n);
    for(int i=0;i<ass.length();i++)
    {
        if(ass.charAt(i)!=ass.charAt(ass.length()-1-i))
            return false;
    }
    return true;
}
    

}

6.27

package demo;

import java.util.Scanner;

public static void main(String[] args){
        int count=0;
        int base=0;
        int num = 2;
        while(count<100)
        {
            if(isPrime(num)&&!isPalindrome(num)&&isPrime(reverse(num)))
            {
                System.out.print(num+" ");
                count++;
            }
            if(count%10==0&&count!=base) {
                System.out.print('\n');
                base+=10;
            }
            num++;
        }
    }
public static boolean isPrime(int n){
        for(int i=2;i<=n/2;i++){
            if(n%i==0)
                return false;
        }
        return true;
    }
    public static boolean isPalindrome(int n){
    String ass = Integer.toString(n);
    for(int i=0;i<ass.length();i++)
    {
        if(ass.charAt(i)!=ass.charAt(ass.length()-1-i))
            return false;
    }
    return true;
}

public static int reverse(int n){
	String str = Integer.toString(n);
	String str2 = "";
	for(int i=str.length()-1;i>=0;i--)
		str2 += str.charAt(i);
	return Integer.parseInt(str2);
}

}

6.28

package demo;

import java.util.Scanner;

public class diliuzhang {
	System.out.print("p\t\t\t2^p-1\n");
	System.out.print("----------------------------\n");
	for(int i=2;i<=31;i++){
		int num = (int)Math.pow(2, i)-1;
		if(isPrime(num))
			System.out.printf("%d\t\t\t%-4d\n", i,num);
	}
    }
    public static boolean isPrime(int n){
        for(int i=2;i<=n/2;i++){
            if(n%i==0)
                return false;
        }
        return true;
    }

}

6.29

package demo;

import java.util.Scanner;

public class diliuzhang {
	for(int i=2;i<=997;i++){
	if(isPrime(i)&&isPrime(i+2))
		System.out.printf("( %d , %d )\n",i,i+2);
}
}
public static boolean isPrime(int n){
    for(int i=2;i<=n/2;i++){
        if(n%i==0)
            return false;
    }
    return true;
}

}

6.30

package demo;

import java.util.Scanner;

public class diliuzhang {
      throwDice();
    }
public static boolean throwDice()
{
    int num1 = (int)(Math.random()*6)+1;
    int num2 = (int)(Math.random()*6)+1;
    int sum = num1+num2;
    if(sum==2||sum==3||sum==12) {
        System.out.printf("You rolled %d+%d = %d\nYou lose\n",num1,num2,sum);
        return false;
    }
    else if(sum==7||sum==11) {
        System.out.printf("You rolled %d+%d = %d\nYou win\n",num1,num2,sum);
        return true;
    }
    else
    {
        System.out.printf("You rolled %d+%d = %d\n",num1,num2,sum);
        System.out.println("point is "+sum);
        int sum2 = sum;
        do{
            int num3 = (int)(Math.random()*6)+1;
            int num4 = (int)(Math.random()*6)+1;
            sum=num3+num4;
            System.out.printf("You rolled %d+%d = %d\n",num3,num4,sum);
            if(sum==7){
                System.out.println("You lose");
                return false;
            }
            else if(sum!=sum2)
                System.out.println("point is "+sum);
        }while(sum!=sum2); //这里使用do-while语句好处就是先执行一次,再判断。
        System.out.println("You win");
        return true;
    }
} 

}

6.31

package demo;

import java.util.Scanner;

public static void main(String[] args){
    Scanner input = new Scanner(System.in);
    System.out.print("Enter a credit card number: ");
    String num = input.next();
    if(isValid(num))
        System.out.println(num+" is valid");
    else
        System.out.println(num+" is invalid");
}
public static boolean isValid(String number){
    if(number.length()<13||number.length()>16)
        return false;
    else
    {
        return (sumOfDoubleEvenPlace(number)+sumOfOddPlace(number))%10==0;
    }
}

public static int sumOfDoubleEvenPlace(String number){
    int sum=0;
    for(int i=number.length()-2;i>=0;i-=2)
        sum+=getDigit(2*(number.charAt(i)-'0'));
    return sum;
}

public static int getDigit(int number){
    if(number<10)
        return number;
    else
        return number/10+number%10;
}

public static int sumOfOddPlace(String number){
    int sum=0;
    for(int i=number.length()-1;i>=0;i-=2)
        sum+=(int)(number.charAt(i)-'0');
    return sum;
}

public static boolean prefixMatched(String number){
    char c1=number.charAt(0);
    char c2=number.charAt(1);
    return c1 == '4' || c1 == '5' || c1 == '6' || (c1 == '3') && (c2 == 7);
}

}

没按照题目上的格式来,不过方法是对的。

6.32

package demo;

import java.util.Scanner;

public static void main(String[] args){
			int count = 0;
			for(int i=0;i<10000;i++){
				if(throwDice())
					count++;
			}
			System.out.println("you won "+count+" times.");
	    }

public static boolean throwDice()
	    {
	        int num1 = (int)(Math.random()*6)+1;
	        int num2 = (int)(Math.random()*6)+1;
	        int sum = num1+num2;
	        if(sum==2||sum==3||sum==12) {
	            System.out.printf("You rolled %d+%d = %d\nYou lose\n",num1,num2,sum);
	            return false;
	        }
	        else if(sum==7||sum==11) {
	            System.out.printf("You rolled %d+%d = %d\nYou win\n",num1,num2,sum);
	            return true;
	        }
	        else
	        {
	            System.out.printf("You rolled %d+%d = %d\n",num1,num2,sum);
	            System.out.println("point is "+sum);
	            int sum2 = sum;
	            do{
	                int num3 = (int)(Math.random()*6)+1;
	                int num4 = (int)(Math.random()*6)+1;
	                sum=num3+num4;
	                System.out.printf("You rolled %d+%d = %d\n",num3,num4,sum);
	                if(sum==7){
	                    System.out.println("You lose");
	                    return false;
	                }
	                else if(sum!=sum2)
	                    System.out.println("point is "+sum);
	            }while(sum!=sum2); //这里使用do-while语句好处就是先执行一次,再判断。
	            System.out.println("You win");
	            return true;
	        }
} 

}

6.33

咳,看6.25习题答案吧,稍微改改就行,实在不想做一遍了。。。。

6.34

package demo;

import java.util.Scanner;

public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("Enter full year (e.g., 2012): ");
        int year = input.nextInt();
        System.out.print("What day is January 1, "+year+" ? ");
        int week = input.nextInt();
        int month = 1, day = 0;
        String monthString = "";
        boolean leapYear;
        if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0 && year % 3200 != 0) || year % 172800 == 0)
            leapYear = true;
        else
            leapYear = false;
        for (; month <= 12; month++) {
            switch (month) {
                case 1:
                    monthString = "January";
                    break;
                case 2:
                    day += 31;
                    monthString = "February";
                    break;
                case 3:
                    monthString = "March";
                    if (leapYear)
                        day += 29;
                    else
                        day += 28;
                    break;
                case 4:
                    day += 31;
                    monthString = "April";
                    break;
                case 5:
                    day += 30;
                    monthString = "May";
                    break;
                case 6:
                    day += 31;
                    monthString = "June";
                    break;
                case 7:
                    day += 30;
                    monthString = "July";
                    break;
                case 8:
                    day += 31;
                    monthString = "August";
                    break;
                case 9:
                    day += 31;
                    monthString = "September";
                    break;
                case 10:
                    day += 30;
                    monthString = "October";
                    break;
                case 11:
                    day += 31;
                    monthString = "November";
                    break;
                case 12:
                    day += 30;
                    monthString = "December";
            }
            int days = (week + day) % 7;
            System.out.print("\n           " + monthString + " " + year + "\n---------------------------------");
            System.out.printf("\n%-5s%-5s%-5s%-5s%-5s%-5s%-5s\n", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat");
        for (int n =1;n<=days;n++) {
            System.out.printf("%-5s", "");
        }
           int j = 1;
    if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 ||
            month == 12) {
        for (; j <= 31; j++) {
            System.out.printf("%-5d", j);
            if ((days+j) % 7 == 0)
                System.out.println();
        }
    }
    else if (month == 2 && leapYear) {
        for (; j <= 29; j++) {
            System.out.printf("%-5d", j);
            if ((days+j) % 7 == 0)
                System.out.println();
        }
    }
    else if (month == 2) {
        for (; j <= 28; j++) {
            System.out.printf("%-5d", j);
            if ((days+j) % 7 == 0)
                System.out.println();
        }
    }
    else {
        for (; j <= 30; j++) {
            System.out.printf("%-5d", j);
            if ((days + j) % 7 == 0)
                System.out.println();
        }
    }
    System.out.print("\n");
    switch (days) {
        case 0:
            System.out.print("Sun");break;
        case 1:
            System.out.print("Mon");break;
        case 2:
            System.out.print("Tue");break;
        case 3:
            System.out.print("Wed");break;
        case 4:
            System.out.print("Thu");break;
        case 5:
            System.out.print("Fri");break;
        case 6:
            System.out.print("Sat");
    }
    System.out.println(" starts on the first day of "+monthString);
}

}

}

6.35

package demo;

import java.util.Scanner;

public static void main(String[] args){
		System.out.print("Enter the side: ");
		Scanner input = new Scanner(System.in);
		double s = input.nextDouble();
		System.out.println("The area of the pentagon is "+area(s));
	}
public static double area(double side){
		double area;
		area = (5*Math.pow(side, 2))/(4*Math.tan(Math.PI/5));
		return area;
	}

}

6.36

package demo;

import java.util.Scanner;

public static void main(String[] args){
		System.out.print("Enter the number of sides: ");
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		System.out.print("Enter the side: ");
		double s = input.nextDouble();
		System.out.println("The area of the pentagon is "+area(n,s));
	}
public static double area(int n,double side){
		double area;
		area = (n*Math.pow(side, 2))/(4*Math.tan(Math.PI/n));
		return area;
	}

}

6.37

package demo;

import java.util.Scanner;

public static void main(String[] args){
		System.out.print("Enter the number: ");
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		System.out.print("Enter the width: ");
		int w = input.nextInt();
		System.out.println("The format of the number is  "+format(n,w));
	}
public static String format(int number,int width){
		String str = Integer.toString(number);
		int len = str.length();
		if(len>=width)
			return str;
		else{
			String str2="";
			for(int i=1;i<=width-len;i++){
				str2+='0';
			}
			return str2+str;
		}	
}

}

6.38

package demo;

import java.util.Scanner;

public static void main(String[] args) {
        for(int i=1;i<=100;i++)
        {
            System.out.print(getRandomUpperCaseLetter()+" ");
            if(i%10==0)
                System.out.print('\n');
        }
        for(int i=1;i<=100;i++)
        {
            System.out.print(getRandomDigitCharacter()+" ");
            if(i%10==0)
                System.out.print('\n');
        }
    }
public static char getRandomCharacter(char ch1,char ch2)
    {
        return (char)(ch1+Math.random()*(ch2-ch1+1));
    }
public static char getRandomUpperCaseLetter()
    {
        return getRandomCharacter('A','Z');
    }
public static char getRandomDigitCharacter()
    {
        return getRandomCharacter('0','9');
    }

}

6.39

package demo;

import java.util.Scanner;

public static void main(String[] args){
	        Scanner input = new Scanner(System.in);
	        System.out.print("Enter three points for p0,p1,p2: ");
	        double x0 = input.nextDouble();
	        double y0 = input.nextDouble();
	        double x1 = input.nextDouble();
	        double y1 = input.nextDouble();
	        double x2 = input.nextDouble();
	        double y2 = input.nextDouble();
	        if(leftOfTheLine(x0,y0,x1,y1,x2,y2))
	            System.out.print("("+x2+","+y2+")"+" is on the left side of the line from "+"("+x0+","+y0+")"+" to "+"("+x1+","+y1+")");
	        else if(onTheLineSegment(x0,y0,x1,y1,x2,y2))
	            System.out.print("("+x2+","+y2+")"+" is on the line segment from "+"("+x0+","+y0+")"+" to "+"("+x1+","+y1+")");
	        else if(onTheSameLine(x0,y0,x1,y1,x2,y2))
	            System.out.print("("+x2+","+y2+")"+"is on the same line from "+"("+x0+","+y0+")"+" to "+"("+x1+","+y1+")");
	        else
	            System.out.print("("+x2+","+y2+")"+"is on the right side of the line "+"("+x0+","+y0+")"+" to "+"("+x1+","+y1+")");
	    }
public static boolean leftOfTheLine(double x0,double y0,double x1,double y1,double x2,double y2){
	        return (x1-x0)*(y2-y0)-(x2-x0)*(y1-y0)>0;
	    }
public static boolean onTheSameLine(double x0,double y0,double x1,double y1,double x2,double y2){
	        return (x1-x0)*(y2-y0)-(x2-x0)*(y1-y0)==0;
	    }
public static boolean onTheLineSegment(double x0,double y0,double x1,double y1,double x2,double y2){
	        return (x1-x0)*(y2-y0)-(x2-x0)*(y1-y0)==0&&x2>=x0&&x2<=x1;
	    }

}

第六章习题 完

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Java语言程序设计与数据结构(基础篇)课后练习题 第六章(三) 的相关文章

  • [XMPP]我是怎么通过直接操作数据来为Openfire注册新用户的

    众所周知 xff0c Openfire的注册方式一般有三种 1 带内注册 In Band Registration 即客户端通过匿名方式与Openfire 服务器端建立连接并验证 xff0c 然后发起注册节点XML流 xff0c 以XMPP
  • IdeaVim插件使用技巧

    在 url 61 http kidneyball iteye com blog 1814028 IDEA Intellij小技巧和插件 url 一文中简单介绍了一下IdeaVim插件 在这里详细总结一下这个插件在日常编程中的一些常用小技巧
  • 机器学习系列(3)_逻辑回归应用之Kaggle泰坦尼克之灾

    作者 xff1a 寒小阳 amp amp 龙心尘 时间 xff1a 2015年11月 出处 xff1a http blog csdn net han xiaoyang article details 49797143 声明 xff1a 版权
  • Android 获取系统设置参数。

    转载自 xff1a http blog 163 com fang wang2005 blog static 176928073201136105613638 如何获取Android系统设置参数 下面以获取时间格式为例 xff0c 来判断时间
  • linux下默认删除文件到回收站(bash实现)

    fedora下总是会把文件不小心删除了 xff0c 所以下面的脚本把实现 xff1a 文件删除默认移动到自己的回收站里面 功能 xff1a 脚本实现删除文件或者目录到 waste xff08 自己定义 xff09 脚本附带文件名或者目录名
  • android 开机启动程序

    做一个android开机就会自动启动的程序 xff0c 该程序只要启动一次 xff0c 以后开机就会自动启动 xff0c 直到删除该程序 android开机事件会发送一个叫做Android intent action BOOT COMPLE
  • 在 Linux 平台中调试 C/C++ 内存泄漏方法

    由于 C 和 C 43 43 程序中完全由程序员自主申请和释放内存 xff0c 稍不注意 xff0c 就会在系统中导入内存错误 同时 xff0c 内存错误往往非常严重 xff0c 一般会带来诸如系统崩溃 xff0c 内存耗尽这样严重的后果
  • Java 位运算

    Java 位运算 转 一 xff0c Java 位运算 1 表示方法 xff1a 在Java语言中 xff0c 二进制数使用补码表示 xff0c 最高位为符号位 xff0c 正数的符号位为0 xff0c 负数为1 补码的表示需要满足如下要求
  • iOS学习之UINavigationController详解与使用(一)添加UIBarButtonItem

    1 UINavigationController导航控制器如何使用 UINavigationController可以翻译为导航控制器 xff0c 在iOS里经常用到 我们看看它的如何使用 xff1a 下面的图显示了导航控制器的流程 最左侧是
  • OpenStack多节点部署(一)——服务器选型

    OpenStack多节点部署 xff08 一 xff09 服务器选型 OpenStack多节点部署 xff08 二 xff09 操作系统安装 OpenStack多节点部署 xff08 三 xff09 网络配置 OpenStack多节点部署
  • 【代码】使用C++实现改进的有效边表算法。

    算法的解释和一些细节晚一些再上传 xff0c 先直接上代码 xff1a 如果有错误可以在评论区指出 由于opengl使用实数的坐标 xff0c 所以 xff0c 本程序将使用画线代替画点 include lt GL glut h gt in
  • FireFox导入导出Cookies和收藏夹的方法

    FireFox是一个常用的浏览器 xff0c 扩展插件众多 xff0c 和IE相比有很多优点 xff0c 不过有些细小的地方似乎考虑的不太好 xff0c 比如用户经常会碰到系统重新安装等问题 xff0c 这就需要导入导出FireFox浏览器
  • linux交换分区回收

    author xff1a skate time xff1a 2012 04 11 交换分区回收 如果系统过多的使用交换分区 xff0c 那性能将会变慢 xff0c 所以要找到大量使用交换分区的原因 回收交换分区可以用如下 xff1a swa
  • Linux下查看文件和文件夹大小的df和du命令

    当磁盘大小超过标准时会有报警提示 xff0c 这时如果掌握df和du命令是非常明智的选择 df可以查看一级文件夹大小 使用比例 档案系统及其挂入点 xff0c 但对文件却无能为力 du可以查看文件及文件夹的大小 两者配合使用 xff0c 非
  • 算法系列之九:计算几何与图形学有关的几种常用算法(一)

    我的专业是计算机辅助设计 xff08 CAD xff09 xff0c 算是一半机械一半软件 xff0c 计算机图形学 是必修课 xff0c 也是我最喜欢的课程 热衷于用代码摆平一切的我几乎将这本教科书上的每种算法都实现了一遍 xff0c 这
  • uiviewController管理UITableView

    iOS开发 xff1a 如何作为子类来创建和管理UITableView 已有 184 次阅读 2011 10 24 21 38 标签 UIViewController UIView UITableView iOS 在iPhone应用开发中个
  • 【Iphone 游戏开发之一】创建视图并绘制简单图形

    Himi 原创 xff0c 转载请注明 xff01 原文地址 xff1a http blog csdn net xiaominghimi article details 6633172 这段时间N忙 xff0c 没办法 xff0c 创业公司
  • archlinux中virtualbox无法运行问题解决

    在archlinux中安装完成virtualbox后 xff0c 新建虚拟机无法启动 xff0c 而是出现下图的提示 xff1a 在fedora中直接用root权限运行 etc init d vboxdrv setup重新加载一下驱动就可以
  • 【Linux】Ubuntu 代理配置

    apt get 设置代理 proxy 方法 方法一 xff1a 这是一种临时的手段 xff0c 如果你仅仅是暂时需要通过http代理使用apt get xff0c 你可以使用这种方法 在使用 apt get 之前 xff0c 在终端中输入以
  • 百度之星之E:C++ 与Java

    E C 43 43 与Java 时间限制 2000ms 内存限制 65536kB 描述 在百度之星的贴吧里面 xff0c Java的爱好者和C 43 43 的爱好者总是能为这两种语言哪个更好争论上几个小时 Java的爱好者会说他们的程序更加

随机推荐

  • 并查集详解

    并查集是我暑假从高手那里学到的一招 xff0c 觉得真是太精妙的设计了 以前我无法解决的一类问题竟然可以用如此简单高效的方法搞定 不分享出来真是对不起party了 xff08 party xff1a 我靠 xff0c 关我嘛事啊 xff1f
  • ubuntu18.04 开启ssh远程服务

    1 查看ssh服务是否已经开启 说明 xff1a 1 ssh agent 指的是ubuntu的ssh服务的客户端 xff0c 用于该ubuntu远程连接其它Linux主机 如果没有ssh agent的话 xff0c 该ubuntu主机也无法
  • Python必备知识之“if __name__ == ‘__main__‘:”

    在学习Python的过程中经常会看到 if name 61 61 39 main 39 这行代码 xff0c 那么这行代码的作用究竟是什么呢 xff1f if name 61 61 39 main 39 这行代码的主要作用是调试某个模块的正
  • Windows Server 网络连接由公用网络改为专用网络

    主题 xff1a Windows Server 网络连接由公用网络改为专用网络 关键字 xff1a 问题描述 xff1a Windows Server 2012 r2 启动后网络连接被识别为公用网络 xff0c 导致远程桌面等服务无法使用
  • 关于书籍(WPF及其它)

    原文 xff1a On Books WPF and Otherwise 有人让我去看coding horror comparison xff0c 这篇文章来至于Charles Petzold和Adam Nathan的书籍 xff0c 是关于
  • pip,pip安装源

    介绍 Python在使用pip安装第三方包 第三方功能库的时候 xff0c pip3 pip install xxx走的是国外源 xff0c 有点慢 我们可以采用国内源加快下载的速度 常用pip源 xff1b 豆瓣 xff1a https
  • 安装Anaconda时安装路径错误,提示Directory" xxx is not empty ,please choose a different location."问题的解决方案

    错误如下图所示 重新选择路径 xff0c 选择平时安装的盘 xff0c 然后手动输入Anaconda xff0c 即可正常安装 xff08 在这一步之前一定要删除卸载 先前安装产生的文件夹 xff09 进QQ群 xff08 77980901
  • vue项目引入PWA(vue-cli4)

    1 概念 PWA 全称为 Progressive Web App xff0c 中文译为渐进式 Web APP 其目的是通过各种 Web 技术实现与原生 App 相近的用户体验 也就是说 xff0c 只要你使用浏览器 xff0c 就可以实现免
  • Linux远程管理协议(RFB、RDP、Telnet和SSH)

    提到远程管理 xff0c 通常指的是远程管理服务器 xff0c 而非个人计算机 个人计算机可以随时拿来用 xff0c 服务器通常放置在机房中 xff0c 用户无法直接接触到服务器硬件 xff0c 只能采用远程管理的方式 远程管理 xff0c
  • Python第三方库(模块)下载和安装(使用pip命令)

    Python第三方库是由社区开发者编写的代码包 xff0c 用于增强Python的功能和提供各种特定的功能 通常 xff0c 这些库被打包为模块 xff0c 可以通过使用Python包管理工具pip来下载和安装 以下是使用pip下载和安装P
  • 计蒜客T1098 大整数加法

    求两个不超过 200 位的非负整数的和 输入格式 有两行 xff0c 每行是一个不超过 200 位的非负整数 xff0c 可能有多余的前导 0 输出格式 一行 xff0c 即相加后的结果 结果里不能有多余的前导 0 xff0c 即如果结果是
  • Linux系统学习(三)Linux系统管理

    用户和组管理 1 配置文件 passwd文件 位置 xff1a etc passwd xff1b 对任何用户可读 作用 xff1a 用于保存各用户的账户信息 shadow文件 位置 xff1a etc shadow xff1b 只对root
  • HTTP Host 头攻击 -- 学习笔记

    目录 1 HTTP Host头攻击 2 HTTP Host头的作用 3 什么是HTTP Host头攻击 4 如何发掘HTTP Host头攻击 修改Host值 添加重复的Host头 使用绝对路径的URL 添加缩进或换行 注入覆盖Host头的字
  • Linux 网络流量监控工具

    Linux 网络流量监控 Linux 网络流量监控是捕获和分析企业的 Linux 网络流量的过程 为什么要监控 Linux 网络流量 深入了解网络流量对于测量和管理带宽使用情况非常重要 分析 Linux 网络流量有助于识别带宽瓶颈 最高用量
  • 【解决“Authentication is required to create a color profile/managed device“】

    解决Ubantu系统 34 Authentication is required to create a color profile managed device 34 问题 xff1a 在Windows下使用远程桌面连接到工作站的Uban
  • 漫谈微信开放平台一(小程序服务器url设置)

    点击查看文档 这里的是需要用开放平台设置特约商户的域名 两种域名 xff0c 1 服务器域名 2 业务域名 两种域名设置方案相似 xff0c 我以服务器域名设置为例 需要注意 xff1a 1设置的域名需要在开放平台进行设置 xff08 注意
  • linux / ubuntu / 添加和查看环境变量的方法

    一 添加 1 export 指令 export PATH 61 PATH home xiaoming Doc 将 home xiaoming Doc 放到了名为 PATH 的环境变量的后面 或者 export PATH 61 home xi
  • 504 Gateway Time-out原因及解决方法

    1 今天在webpack通过proxy开发的时候 xff0c 接口时正常的 xff0c 但是上到测试机 xff0c 通过nginx转发的时候 xff0c 就会出现504 Gatway time out 思路 1 xff0c 初步判断时ngi
  • 操作系统学习之系统调用

    目录 一 操作系统学习之系统调用 1 什么是系统调用 2 系统调用有什么用 3 为什么需要系统调用 4 系统调用的具体流程 1 xff09 执行过程 2 如何实现用户态与内态之间的切换 3 系统调用常见名词 4 系统调用如何返回 传递返回值
  • Java语言程序设计与数据结构(基础篇)课后练习题 第六章(三)

    6 26 package demo import java util Scanner public class diliuzhang int count 61 0 int base 61 0 int num 61 2 while count