摘要: public class getchar { public static void main(String[] args) throws java.io.IOException //必不可少 { int num = System.in.read(); //读进来的数,默认保存为整数,如果需要输出 刚 阅读全文
posted @ 2020-05-18 09:30 profesor 阅读(942) 评论(0) 推荐(0)
摘要: list comprehension: my_list = [num*num for num in range(1,11)] print(my_list) if使用 my_list = [num for num in range(1,11) if num > 5] print(my_list) if 阅读全文
posted @ 2020-05-16 23:38 profesor 阅读(195) 评论(0) 推荐(0)
摘要: VirtualBox: How to share folders from Windows to Ubuntu https://www.youtube.com/watch?v=NkGmp4ETjRs 阅读全文
posted @ 2020-05-12 21:48 profesor 阅读(118) 评论(0) 推荐(0)
摘要: terminal中输入 vim ~/.bashrc 添加如下内容 #newlyadded export PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin" 打开新的terminal,输入 ifconfig 成功 如果不行,试试安装net-tools sudo a 阅读全文
posted @ 2020-05-12 19:01 profesor 阅读(515) 评论(0) 推荐(0)
摘要: 来源:https://blog.csdn.net/p309654858/article/details/131778994 进入 /etc/apt/路径cd /etc/apt/将sources.list备份保存为sources.backup.list,以防止有需要的时候更换回来cp -a sourc 阅读全文
posted @ 2020-05-12 07:57 profesor 阅读(2568) 评论(0) 推荐(0)
摘要: 1.备份源文件 cp /etc/apt/sources.list /etc/apt/sources.list_bk 2.手动修改源文件 vim /etc/apt/sources.list 3.选择其中一个源 #中科大 deb http://mirrors.ustc.edu.cn/kali kali- 阅读全文
posted @ 2020-05-12 07:55 profesor 阅读(842) 评论(0) 推荐(0)
摘要: 创建hello.java文件, 输入: public class hello { public static void main(String[] args) { System.out.println("hello, world!"); } } 在hello.java所在的directory中, 打 阅读全文
posted @ 2020-05-09 22:37 profesor 阅读(2274) 评论(0) 推荐(0)
摘要: 输出如下图形: * * * * * * * * * * * * * * * * * * * * * C语言代码 //打印倒三角图案 #include <stdio.h> void reversed_triangle(int n); //函数声明 int main() { int n; puts("需 阅读全文
posted @ 2020-05-08 16:54 profesor 阅读(1884) 评论(0) 推荐(1)
摘要: 要求:输入一个正整数n, 再输入n个整数,将它们按从小到大的顺序输出 // 输入指定的整数,然后把整数按从小到大的顺序每5个一行输出 #include <stdio.h> void order(int *a, int len); //函数声明 int main() { int n; printf(" 阅读全文
posted @ 2020-05-07 23:19 profesor 阅读(442) 评论(0) 推荐(0)
摘要: int 变量的默认初始值为0 这可以写个小程序测试下: #include <stdio.h> int main() { int i; if (i == 0) { printf("Hola, mundo, i = %d\n", i); } return 0; } 运行结果为: Hola, mundo, 阅读全文
posted @ 2020-05-05 12:13 profesor 阅读(5882) 评论(0) 推荐(0)