本实验6第一题:菜单驱动程序. 随便进到某个目录,vim driver.sh 把代码写进去. #!/bin/bash function welcome() { echo -e "\n" echo "Use one of the following options:" echo "P: To display current derectory " echo "S: To display the name of running file&q…
课后作业之字串加密: 设计思想: 1.输入要加密的英文子串str 2.定义num=str的字符串长度 3.将字符串转化为单个字符 4.每个字符+3,向后移3个 5.定义str1,将新得到的每个字符加到str1后,得到加密后的英文子串str1 6.输出加密后的英文子串str1 源代码: import java.util.Scanner; public class Test { public static void main(String[] args) { // TODO 自动生成的方法存根 Sc…
参考:https://blog.csdn.net/u013733326/article/details/79847918 希望大家直接到上面的网址去查看代码,下面是本人的笔记 4.正则化 1)加载数据 仍是问题: 'c' argument has 1 elements, which is not acceptable for use with 'x' with s 解决——直接导入函数: import scipy.io as sio def load_2D_dataset(is_plot=Tru…
20162316 Bag课后作业 下面小标题都是码云链接 实现代码 import java.util.Arrays; public class Bag implements BagInterface { Object[] stuff = new Object[0]; @Override public int getCurrentSize() { int size = 0; for(int a = 0; a<stuff.length;a++){ if(stuff[a] != null) size+…
一.编写一个方法,使用以上算法生成指定数目(比如1000个)的随机整数. public class suiji { private static final int N = 200; private static final int LEFT = 40; private static final int RIGHT = 10000; private static long x0 = 1L; private long a = 1103515245L; private long c = 12345L…
Computer Networking : A Top-Down Approach 的课后作业. 要求: 基于UDP协议,实现一个Pinger工具. 服务端代码已经提供了,自己实现客户端的代码. 完整的题目链接: https://wenku.baidu.com/view/ed19e6cce2bd960591c677d2.html 服务端代码: # UDPPingerServer.py # We will need the following module to generate randomiz…