• 沒有找到結果。

Problem 0. Briefly and clearly report what you have done for Homework Assignment #4.

N/A
N/A
Protected

Academic year: 2021

Share "Problem 0. Briefly and clearly report what you have done for Homework Assignment #4."

Copied!
7
0
0

加載中.... (立即查看全文)

全文

(1)

Problem 0. Briefly and clearly report what you have done for Homework Assignment

#4.

Problem1

Sudo fdisk –l >after.txt Sudo fdisk –l >before.txt Diff after.txt before.txt

We can find it mount on /dev/sdb1

Problem2

Hostname 查看主机名字 Hostnamectl 可用于查询和更改系统主机名和相关设置

sudo hostnamectl set-hostname linuxconfig

修改文件/etc/hosts, 这样重启也依旧是更改后的名字

(2)

Problem3

Ssh 连接服务器, 我把 demo_x.c 传输上去. 然后修改成雨伞或者其他图标,display 一下就 可以了.

scp -P 11189 -r demo_x.c root@117.93.33.92:/home/data

不用登录 ssh 也可以用 scp 把 demo_x.c 传输到 117.93.33.92 的/home/data/文件夹下,用户 名为 root

gcc -o main demo_x.c -lX11 编译 修改服务器和客户端的 ssh 配置文件

xhost + //允许服务器的的 x11 界面连接过来

ssh -P 11189 -X root@117.93.33.92 //-X 参数表示转发 X11 数据 然后就可以运行程序

xclock

修改代码如下,即可显示雨伞

(3)

Problem4

the purpose of the result program. : turn the input into hexadecimal number and count how many bits of this number is 1;

problem5

make and display

(4)

the reasons for compiling warnings 1. don’t have the header file

2. don’t have correct number of arguments

Problem 1. Build 'demo_fork.c' and run it, then try to change the red eyes to 'browse.tcl' and run it again.

通过 C 代码启动 tcl?

错误 1 Gcc demo_fork.c 不能执行 a.out

(5)

解决方法:

终端中打开,成功

成功把红眼睛改为 browse.tcl'

错误 2 : bash: ./browse.tcl:/usr/bin/wish:解释器错误: 没有那个文件或目录 解决方法: apt-get install -y wish ,就可以了.

Invoke more directory browsers from browse.tcl. Use 'pstree' to see the process hierarchy for all of them,

再点击一个目录就可以了 and show the hierarchy with a screenshot.如下图

(6)

Problem 2. Run Python scripts of demo_8queen.py and demo_showqueens.py, read the source code, comments and their outputs.

输出到 8queen.out 即可

(7)

Then (OPTIONALLY) write a Perl or Python script to analyze the solutions in 8queen.out, and show how many kinds of the solutions are unique.

(symmetrical solutions are not considered as unique, for example, one solution being mirrored or rotated should be eliminated from the unique list)

參考文獻

相關文件

Write the following problem on the board: “What is the area of the largest rectangle that can be inscribed in a circle of radius 4?” Have one half of the class try to solve this

Report to the class what you have found out about the causes of the social problem identified (i.e. what the causes are, and how details and examples are given to

 2D materials have potential for future electronics.  The real and unique benefits is the atomically

Taking second-order cone optimization and complementarity problems for example, there have proposed many ef- fective solution methods, including the interior point methods [1, 2, 3,

Moreover, for the merit functions induced by them for the second-order cone complementarity problem (SOCCP), we provide a condition for each stationary point being a solution of

✓ Express the solution of the original problem in terms of optimal solutions for subproblems. Construct an optimal solution from

✓ Express the solution of the original problem in terms of optimal solutions for subproblems.. Construct an optimal solution from

The above information is for discussion and reference only and should not be treated as investment