diff options
Diffstat (limited to 'kpov_judge/tasks/custom_rdate/howtos')
-rw-r--r-- | kpov_judge/tasks/custom_rdate/howtos/en/index.html | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/kpov_judge/tasks/custom_rdate/howtos/en/index.html b/kpov_judge/tasks/custom_rdate/howtos/en/index.html new file mode 100644 index 0000000..08a9979 --- /dev/null +++ b/kpov_judge/tasks/custom_rdate/howtos/en/index.html @@ -0,0 +1,56 @@ +<html>
+
+<head>
+<meta http-equiv=Content-Type content="text/html; charset=windows-1250">
+</head>
+
+<body><font face="Georgia, Times New Roman, Times, serif">
+<strong><h1>XX. predvaja:</h1></strong><br>
+<p><strong><h2>Naloga na hitro:</h2></strong><br>
+ Set time on server with rdate. Write a program that converts 32bit numbers in two's complement to decimal.</p>
+<p><strong><h2>Instructions:</h2></strong><br>
+ 1. From directory with virtual machine images download Student.vdi (client) and SimpleArbiter.vdi(server) <br>
+ 2. Use VirtualBox (or another program that suits your preferences) create two virtual machines with virtual hard drive files from previous step.<br>
+ 3. Run both virtual machines. <br>
+ 4. Use username <strong>root</strong> and password <strong> kaboom </strong> to log into client. For loging into server use username <strong>tester</strong> and password <strong>SedemKrogovPekla</strong></p>
+<img src="slike/bu15.png"> <img src="slike/bu1.png">
+<p><h3><u><strong><em>First part: update time with help of rdate.</em></strong></u></h3><br>
+ 1. Lookup and write down IP address of server. (ifconfig)<br><img src="slike/bu2.png"><br><img src="slike/bu3.png"><br>
+ 2. Install rdate with <strong>sudo apt-get install</strong><br>
+ 3. Use rdate to update client machine time <strong>rdate SERVER_IP</strong><br><img src="slike/bu4.png"><br>
+ Note: New time doesn't necessarily match the correct time<br>
+ </p>
+<p><br>
+ <u><strong><em><h3>Second part: write a program that converts 32bit numbers in two's complement to decimal.</h3></em></strong></u><br>
+ Program can be written in Java or Pythonu. You can use text editor of your choice.</p>
+<p><br>
+ JAVA------<br>
+ 1. Command nano bintodec3.java creates and opens empty text editor.<br>
+ 2. Write a program that converts 32bit numbers in two's complement to decimal.<br>
+<img src="slike/bu6.png"><br><img src="slike/bu7.png"><br>
+ 3. Press Ctrl+X, then Y and Enter to save our program<br>
+ 4. In case you don't have java installed write <strong>sudo apt-get install openjdk-6-jdk</strong> to install it<br><img src="slike/predvaja_clip_image003.gif"><br>
+ 5. Compile program with command <strong>javac bintodec3.java</strong><br>
+ 6. We can test our new program with <strong>java bintodec3</strong>. Now we input some 32bit numbers in hexadecimal format <br><img src="slike/bu9.png"><br></p>
+<p>PYTHON------<br>
+ 1. Command nano bintodec3.py creates and opens empty text editor.<br>
+ 2. Write a program that converts 32bit numbers in two's complement to decimal.<br>
+<img src="slike/bu5.png"><br>
+ 3. Press Ctrl+X, then Y and Enter to save our program<br>
+ 4. We can test our new program with <strong>python bintodec3.py</strong><br><img src="slike/bu8.png"><br></p><br><br>
+
+
+ <p>
+ <h3> Testing </h3>
+ 1. We can run a tester with command ./run_test.py<br>
+ <img src="slike/s1.png"><br>
+ 2. Your username and password are the same as on moodle (npr.: "pz1234@student.uni-lj.si" in "geslo123")<br>
+ <img src="slike/s2.png"> <img src="slike/s3.png"> <br>
+ 3. Name of the task should look like XX.predvaja.<br>
+ 4. When program asks you for file path write your path to compiling program. (example: in case your program bintodec3.py is in the same folder as program run_test.py input ./bintodec3.py)<br>
+ 5. Next you have to input IP of your server (SimpleArbiter)<br>
+ 6. If all went well the program should give you an OK and you finished your job correctly</p>
+ </font>
+</body>
+
+</html>
|