summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks')
-rw-r--r--kpov_judge/tasks/custom_rdate/howtos/en/index.html105
-rw-r--r--kpov_judge/tasks/custom_rdate/howtos/si/index.html106
2 files changed, 115 insertions, 96 deletions
diff --git a/kpov_judge/tasks/custom_rdate/howtos/en/index.html b/kpov_judge/tasks/custom_rdate/howtos/en/index.html
index 0ba231a..18ebfc1 100644
--- a/kpov_judge/tasks/custom_rdate/howtos/en/index.html
+++ b/kpov_judge/tasks/custom_rdate/howtos/en/index.html
@@ -1,56 +1,65 @@
+<!doctype html>
<html>
-
<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1250">
+ <meta charset="utf-8">
+ <style>
+ img{
+ margin:10px 0px 10px 0px;
+ }
+ </style>
</head>
-<body><font face="Georgia, Times New Roman, Times, serif">
-<strong><h1>XX. predvaja:</h1></strong><br>
-<p><strong><h2>Brief preview:</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>tester</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>
+<body>
+ <h1>Custom rdate</h1>
+ <h2>Short preview:</h2>
+ Set time on server using rdate. Write a program that converts 32-bit numbers into a readable time format.</p>
+ <h2>Instructions:</h2>
+ 1. Downlaod Student.vdi (client) and SimpleArbiter.vdi (server) from the virtual machine images folder<br>
+ 2. Use VirtualBox (or similar) to create two virtual machines, select the virtual disk images from the previous step as hard drives<br>
+ 3. Run both virtual machines.<br>
+ 4. Login on client user:<strong> root</strong> pass:<strong> kaboom </strong> and server user:<strong> tester</strong> pass:<strong> tester</strong></p>
+ <img src="../images/bu15.png">
+ <img src="../images/bu1.png">
+ <h3>First part: update time using rdate.</h3>
+ <p>
+ 1. Find and remember your server IP address. (ifconfig)<br><img src="../images/bu2.png"><br><img src="../images/bu3.png"><br>
+ 2. Install rdate with <strong>sudo apt-get install</strong> rdate<br>
+ 3. On Student client use rdate to update the machine time <strong>rdate SERVER_IP</strong><br><img src="../images/bu4.png"><br>
+ Note: It's NOT an error if the updated time does not 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 language or Pythonu. You can use text editor of your choice.</p>
-<p><br>
- JAVA------<br>
- 1. Command nano guliver.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 guliver</strong>. Now we input some 32bit numbers in hexadecimal format <br><img src="slike/bu9.png"><br></p>
-<p>PYTHON------<br>
- 1. Command nano guliver.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 guliver.py</strong><br><img src="slike/bu8.png"><br></p><br><br>
-
-
+ <h3>Second part: write a program that converts 32bit numbers into a readable time format.</h3>
+ <p>
+ You can write a program in Java or Python using your favourite text editor.
+ </p>
+ <h4>Java</h4>
<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>
+ 1. We use <strong>nano guliver.java</strong> to create a new blank file<br>
+ 2. Write a program that converts 32bit numbers into a readable time format.<br>
+ <img src="../images/bu6.png"><br><img src="../images/bu7.png"><br>
+ 3. Press Ctrl+X, then Y and Enter to save the program<br>
+ 4. In case you don't have java installed use <strong>sudo apt-get install openjdk-6-jdk</strong><br>
+ <img src="../images/predvaja_clip_image003.gif"><br>
+ 5. To compile use <strong>javac bintodec3.java</strong><br>
+ 6. Run the created program with <strong>java guliver</strong> and input the server IP or name...<br>
+ <img src="../images/bu9.png"><br>
+ </p>
+ <h4>Python</h4>
+ 1. Use nano guliver.py to create a new empty python file.<br>
+ 2. Write a program that converts 32bit numbers into a readable time format.<br>
+ <img src="../images/bu5.png"><br>
+ 3. Press Ctrl+X, then Y and Enter to save our program<br>
+ 4. Run the created program with <strong>python guliver.py</strong><br><img src="../images/bu8.png"><br>
+ </p>
+ <h3>Testing</h3>
+ <p>
+ 1. Use command ./run_test.py to run the tester<br>
+ <img src="../images/s1.png"><br>
+ 2. Your username and password are the same as on ucilnica (npr.: "pz1234@student.uni-lj.si" in "geslo123").<br>
+ <img src="../images/s2.png"> <img src="../images/s3.png"> <br>
+ 3. Name of the task should look like 09.predvaja.<br>
+ 4. When prompted for file path insert your program path (example: if bintodec3.py is in the same folder as program run_test.py run with ./bintodec3.py).<br>
+ 5. Then input your server IP address (SimpleArbiterRDate).<br>
+ 6. If all goes well the program should give you an OK that means you've completed your task successfully.
+ </p>
</body>
-
</html>
diff --git a/kpov_judge/tasks/custom_rdate/howtos/si/index.html b/kpov_judge/tasks/custom_rdate/howtos/si/index.html
index fe985cc..e68221c 100644
--- a/kpov_judge/tasks/custom_rdate/howtos/si/index.html
+++ b/kpov_judge/tasks/custom_rdate/howtos/si/index.html
@@ -1,57 +1,67 @@
+<!doctype html>
<html>
-
<head>
-<meta http-equiv=Content-Type content="text/html; charset=windows-1250">
+ <meta charset="utf-8">
+ <style>
+ img{
+ margin:10px 0px 10px 0px;
+ }
+ </style>
</head>
-<body><font face="Georgia, Times New Roman, Times, serif">
-<strong><h1>09.predvaja:</h1></strong><br>
-<p><strong><h2>Naloga na hitro:</h2></strong><br>
- Nastavi uro na strežniku s pomočjo rdate. Napiši program, ki pretvori 32-bitna števila v čas.</p>
-<p><strong><h2>Navodila:</h2></strong><br>
- 1. Z imenika s slikami virtualnih računalnikov povlecite sliki Student.vdi(klient) in SimpleArbiterRDate.vdi(strežnik).<br>
- 2. Z VirtualBoxom (ali ostalim programom za virtualne računalnike) ustvarite dva virtualna računalnika in jim kot disk za shranjevanje podajte Student.vdi ter SimpleArbiterRDate.vdi.<br>
- 3. Zaženite oba navidezna računalnika.<br>
- 4. Na Student se prijavite z uporabnikom <strong>root</strong> in geslom <strong>kaboom</strong>
-na SimpleArbiterRDate pa z uporabnikom <strong>tester</strong> in geslom <strong>tester</strong>.</p>
-<img src="../images/bu15.png"> <img src="../images/bu1.png">
-
-<p><h3><u><strong><em>Prvi del naloge: posodobi uro računalnika s pomočjo rdate.</em></strong></u></h3><br>
- 1. Preverite in si zapišite IP naslov na SimpleArbiterRDate. (ifconfig)<br><img src="../images/bu2.png"><br><img src="../images/bu3.png"><br>
- 2. Z ukazom <strong>sudo apt-get install</strong> rdate namestimo program rdate.<br>
- 3. Na Student z pomočjo rdate posodobi uro računalnika. <strong>rdate IP_SIMPLE_ARBITER</strong><br><img src="../images/bu4.png"><br>
- Opozorilo: NI napaka, če se posodobljen čas ne ujema s pravilnim časom. <br>
+<body>
+ <h1>Custom rdate</h1>
+ <h2>Naloga na hitro:</h2>
+ <p>
+ Nastavi uro na strežniku s pomočjo rdate. Napiši program, ki pretvori 32-bitna števila v čas.
</p>
-<p><br>
- <u><strong><em><h3>Drugi del naloge: napiši program, ki pretvori binarni zapis 32-bitnega števila v ÄŤas.</h3></em></strong></u><br>
- Nalogo lahko rešite v Javi ali v Pythonu. Prav tako pa lahko kodo pišete v poljubnem tekstovnem urejevalniku.</p>
-<p><br>
- JAVA------<br>
- 1. Z ukazom nano guliver.java ustvarimo in odpremo prazen program s tekstovnim urejevalnikom nano<br>
- 2. Napišemo program za pretvarjanje 32-bitnega števila v ÄŤas<br>
- 3. Pritisnemo Ctrl+X, nato Y in Enter, da program zapremo in shranimo.<br>
- 4. Če je še nimamo, naložimo Javo <strong>sudo apt-get install openjdk-6-jdk</strong><br><im src="../images/predvaja_clip_image003.gif"><br>
- 5. Prevedemo program <strong>javac bintodec3.java</strong><br>
- 6. Lahko ga še zaženemo ter preizkusimo <strong>java guliver</strong>. Na standardni vhod vnasemo IP naslov ali ime streĹľnika NTP strežnikom, ki nam pošlje 32 bitno število in pretvori v čas<br><br></p>
-<p>PYTHON------<br>
- 1. Z ukazom nano guliver.py ustvarimo in odpremo prazen program s tekstovnim urejevalnikom nano<br>
- 2. Napišemo program za pretvarjanje 32-bitnega števila v čas<br>
- 3. Pritisnemo Ctrl+X, nato Y in Enter, da program zapremo in shranimo.<br>
- 4. Program zaženemo z ukazom <strong>python guliver.py</strong><br><img src="../images/bu8.png"><br></p><br><br>
-
-
+ <h2>Navodila:</h2>
<p>
- <h3> Testiranje </h3>
- 1. Lahko poženemo tester; z ukazom ./run_test.py<br>
- <img src="../images/s1.png"><br>
- 2. Kot "Upor. Ime" in "Geslo" napišite vaše podatke učilnice. (npr.: "pz1234@student.uni-lj.si" in "geslo123")<br>
- <img src="../images/s2.png"> <img src="../images/s3.png"> <br>
- 3. Kot ime naloge vpišite 09.predvaja.<br>
- 4. Ko vas program vpraša po poti programa vnesite vašo pot do programa za pretvarjanje. (npr.: če imate program bintodec3.py v isti mapi kot program run_test.py, vnesete: ./bintodec3.py)<br>
- 5. Povpraša tudi po IP naslovu SimpleArbiterjaRDate, vnesite.<br>
- 6. Če je šlo vse po sreči, program vrne OK vi pa ste opravili nalogo.</p>
+ 1. Z imenika s slikami virtualnih računalnikov povlecite sliki Student.vdi(klient) in SimpleArbiterRDate.vdi(strežnik).<br>
+ 2. Z VirtualBoxom (ali podobnim) ustvarite dva virtualna računalnika in jim kot disk za shranjevanje podajte Student.vdi ter SimpleArbiterRDate.vdi.<br>
+ 3. Zaženite oba navidezna računalnika.<br>
+ 4. Na Student se prijavite z uporabnikom <strong>root</strong> in geslom <strong>kaboom</strong>
+ na SimpleArbiterRDate pa z uporabnikom <strong>tester</strong> in geslom <strong>tester</strong>.
+ </p>
+ <img src="../images/bu15.png"> <img src="../images/bu1.png">
+ <h3>Prvi del naloge: posodobi uro računalnika s pomočjo rdate.</h3>
+ <p>
+ 1. Preverite in si zapišite IP naslov na SimpleArbiterRDate. (ifconfig)<br><img src="../images/bu2.png"><br><img src="../images/bu3.png"><br>
+ 2. Z ukazom <strong>sudo apt-get install</strong> rdate namestimo program rdate.<br>
+ 3. Na Student z pomočjo rdate posodobi uro računalnika. <strong>rdate IP_SIMPLE_ARBITER</strong><br><img src="../images/bu4.png"><br>
+ Opozorilo: NI napaka, če se posodobljen čas ne ujema s pravilnim časom. <br>
+ </p>
+ <h3>Drugi del naloge: napiši program, ki pretvori binarni zapis 32-bitnega števila v časovni format.</h3>
+ <p>
+ Nalogo lahko rešite v Javi ali v Pythonu. Prav tako pa lahko kodo pišete v poljubnem tekstovnem urejevalniku.</p>
+ <p>
+ <h4>Java</h4>
+ <p>
+ 1. Z ukazom nano guliver.java ustvarimo in odpremo prazen program s tekstovnim urejevalnikom nano<br>
+ 2. Napišemo program za pretvarjanje 32-bitnega števila v čas<br>
+ 3. Pritisnemo Ctrl+X, nato Y in Enter, da program zapremo in shranimo.<br>
+ 4. Če je še nimamo, naložimo Javo <strong>sudo apt-get install openjdk-6-jdk</strong><br><im src="../images/predvaja_clip_image003.gif"><br>
+ 5. Prevedemo program <strong>javac bintodec3.java</strong><br>
+ 6. Lahko ga še zaženemo ter preizkusimo <strong>java guliver</strong>.Na standardni vhod vnasemo IP naslov ali ime strežnika NTP strežnikom, ki nam pošlje 32 bitno število in pretvori v čas<br><br>
+ </p>
+ <h4>Python</h4>
+ <p>
+ 1. Z ukazom nano guliver.py ustvarimo in odpremo prazen program s tekstovnim urejevalnikom nano<br>
+ 2. Napišemo program za pretvarjanje 32-bitnega števila v čas<br>
+ 3. Pritisnemo Ctrl+X, nato Y in Enter, da program zapremo in shranimo.<br>
+ 4. Program zaženemo z ukazom <strong>python guliver.py</strong><br><img src="../images/bu8.png"><br>
+ </p>
- </font>
+ <h3>Testiranje</h3>
+ <p>
+ 1. Lahko poženemo tester; z ukazom ./run_test.py<br>
+ <img src="../images/s1.png"><br>
+ 2. Kot "Upor. Ime" in "Geslo" napišite vaše podatke učilnice. (npr.: "pz1234@student.uni-lj.si" in "geslo123")<br>
+ <img src="../images/s2.png"> <img src="../images/s3.png"> <br>
+ 3. Kot ime naloge vpišite 09.predvaja.<br>
+ 4. Ko vas program vpraša po poti programa vnesite vašo pot do programa za pretvarjanje. (npr.: če imate program bintodec3.py v isti mapi kot program run_test.py, vnesete: ./bintodec3.py)<br>
+ 5. Povpraša tudi po IP naslovu SimpleArbiterjaRDate, vnesite.<br>
+ 6. Če je šlo vse po sreči, program vrne OK vi pa ste opravili nalogo.
+ </p>
</body>
-
</html>