From e616ce82c5d8c3aebc97f66fddf1f1b5cf944a64 Mon Sep 17 00:00:00 2001 From: "af9282@student.uni-lj.si" Date: Sun, 30 Aug 2015 21:29:24 +0000 Subject: fixed some HTML syntax, style and russian-english translation errors git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@325 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/custom_rdate/howtos/en/index.html | 105 ++++++++++---------- kpov_judge/tasks/custom_rdate/howtos/si/index.html | 106 +++++++++++---------- 2 files changed, 115 insertions(+), 96 deletions(-) (limited to 'kpov_judge/tasks/custom_rdate/howtos') 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 @@ + - - + + - -

XX. predvaja:


-

Brief preview:


- Set time on server with rdate. Write a program that converts 32bit numbers in two's complement to decimal.

-

Instructions:


- 1. From directory with virtual machine images download Student.vdi (client) and SimpleArbiter.vdi(server)
- 2. Use VirtualBox (or another program that suits your preferences) create two virtual machines with virtual hard drive files from previous step.
- 3. Run both virtual machines.
- 4. Use username root and password kaboom to log into client. For loging into server use username tester and password tester

- -

First part: update time with help of rdate.


- 1. Lookup and write down IP address of server. (ifconfig)


- 2. Install rdate with sudo apt-get install
- 3. Use rdate to update client machine time rdate SERVER_IP

- Note: New time doesn't necessarily match the correct time
+ +

Custom rdate

+

Short preview:

+ Set time on server using rdate. Write a program that converts 32-bit numbers into a readable time format.

+

Instructions:

+ 1. Downlaod Student.vdi (client) and SimpleArbiter.vdi (server) from the virtual machine images folder
+ 2. Use VirtualBox (or similar) to create two virtual machines, select the virtual disk images from the previous step as hard drives
+ 3. Run both virtual machines.
+ 4. Login on client user: root pass: kaboom and server user: tester pass: tester

+ + +

First part: update time using rdate.

+

+ 1. Find and remember your server IP address. (ifconfig)


+ 2. Install rdate with sudo apt-get install rdate
+ 3. On Student client use rdate to update the machine time rdate SERVER_IP

+ Note: It's NOT an error if the updated time does not match the correct time.

-


-

Second part: write a program that converts 32bit numbers in two's complement to decimal.


- Program can be written in Java language or Pythonu. You can use text editor of your choice.

-


- JAVA------
- 1. Command nano guliver.java creates and opens empty text editor.
- 2. Write a program that converts 32bit numbers in two's complement to decimal.
-

- 3. Press Ctrl+X, then Y and Enter to save our program
- 4. In case you don't have java installed write sudo apt-get install openjdk-6-jdk to install it

- 5. Compile program with command javac bintodec3.java
- 6. We can test our new program with java guliver. Now we input some 32bit numbers in hexadecimal format

-

PYTHON------
- 1. Command nano guliver.py creates and opens empty text editor.
- 2. Write a program that converts 32bit numbers in two's complement to decimal.
-
- 3. Press Ctrl+X, then Y and Enter to save our program
- 4. We can test our new program with python guliver.py



- - +

Second part: write a program that converts 32bit numbers into a readable time format.

+

+ You can write a program in Java or Python using your favourite text editor. +

+

Java

-

Testing

- 1. We can run a tester with command ./run_test.py
-
- 2. Your username and password are the same as on moodle (npr.: "pz1234@student.uni-lj.si" in "geslo123")
-
- 3. Name of the task should look like XX.predvaja.
- 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)
- 5. Next you have to input IP of your server (SimpleArbiter)
- 6. If all went well the program should give you an OK and you finished your job correctly

-
+ 1. We use nano guliver.java to create a new blank file
+ 2. Write a program that converts 32bit numbers into a readable time format.
+

+ 3. Press Ctrl+X, then Y and Enter to save the program
+ 4. In case you don't have java installed use sudo apt-get install openjdk-6-jdk
+
+ 5. To compile use javac bintodec3.java
+ 6. Run the created program with java guliver and input the server IP or name...
+
+

+

Python

+ 1. Use nano guliver.py to create a new empty python file.
+ 2. Write a program that converts 32bit numbers into a readable time format.
+
+ 3. Press Ctrl+X, then Y and Enter to save our program
+ 4. Run the created program with python guliver.py

+

+

Testing

+

+ 1. Use command ./run_test.py to run the tester
+
+ 2. Your username and password are the same as on ucilnica (npr.: "pz1234@student.uni-lj.si" in "geslo123").
+
+ 3. Name of the task should look like 09.predvaja.
+ 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).
+ 5. Then input your server IP address (SimpleArbiterRDate).
+ 6. If all goes well the program should give you an OK that means you've completed your task successfully. +

- 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 @@ + - - + + - -

09.predvaja:


-

Naloga na hitro:


- Nastavi uro na strežniku s pomočjo rdate. Napiši program, ki pretvori 32-bitna števila v čas.

-

Navodila:


- 1. Z imenika s slikami virtualnih računalnikov povlecite sliki Student.vdi(klient) in SimpleArbiterRDate.vdi(strežnik).
- 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.
- 3. Zaženite oba navidezna računalnika.
- 4. Na Student se prijavite z uporabnikom root in geslom kaboom -na SimpleArbiterRDate pa z uporabnikom tester in geslom tester.

- - -

Prvi del naloge: posodobi uro računalnika s pomočjo rdate.


- 1. Preverite in si zapišite IP naslov na SimpleArbiterRDate. (ifconfig)


- 2. Z ukazom sudo apt-get install rdate namestimo program rdate.
- 3. Na Student z pomočjo rdate posodobi uro računalnika. rdate IP_SIMPLE_ARBITER

- Opozorilo: NI napaka, če se posodobljen čas ne ujema s pravilnim časom.
+ +

Custom rdate

+

Naloga na hitro:

+

+ Nastavi uro na strežniku s pomočjo rdate. Napiši program, ki pretvori 32-bitna števila v čas.

-


-

Drugi del naloge: napiši program, ki pretvori binarni zapis 32-bitnega števila v ÄŤas.


- Nalogo lahko rešite v Javi ali v Pythonu. Prav tako pa lahko kodo pišete v poljubnem tekstovnem urejevalniku.

-


- JAVA------
- 1. Z ukazom nano guliver.java ustvarimo in odpremo prazen program s tekstovnim urejevalnikom nano
- 2. Napišemo program za pretvarjanje 32-bitnega števila v ÄŤas
- 3. Pritisnemo Ctrl+X, nato Y in Enter, da program zapremo in shranimo.
- 4. Če je še nimamo, naložimo Javo sudo apt-get install openjdk-6-jdk

- 5. Prevedemo program javac bintodec3.java
- 6. Lahko ga še zaženemo ter preizkusimo java guliver. Na standardni vhod vnasemo IP naslov ali ime streĹľnika NTP strežnikom, ki nam pošlje 32 bitno število in pretvori v čas

-

PYTHON------
- 1. Z ukazom nano guliver.py ustvarimo in odpremo prazen program s tekstovnim urejevalnikom nano
- 2. Napišemo program za pretvarjanje 32-bitnega števila v čas
- 3. Pritisnemo Ctrl+X, nato Y in Enter, da program zapremo in shranimo.
- 4. Program zaženemo z ukazom python guliver.py



- - +

Navodila:

-

Testiranje

- 1. Lahko poženemo tester; z ukazom ./run_test.py
-
- 2. Kot "Upor. Ime" in "Geslo" napišite vaše podatke učilnice. (npr.: "pz1234@student.uni-lj.si" in "geslo123")
-
- 3. Kot ime naloge vpišite 09.predvaja.
- 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)
- 5. Povpraša tudi po IP naslovu SimpleArbiterjaRDate, vnesite.
- 6. Če je šlo vse po sreči, program vrne OK vi pa ste opravili nalogo.

+ 1. Z imenika s slikami virtualnih računalnikov povlecite sliki Student.vdi(klient) in SimpleArbiterRDate.vdi(strežnik).
+ 2. Z VirtualBoxom (ali podobnim) ustvarite dva virtualna računalnika in jim kot disk za shranjevanje podajte Student.vdi ter SimpleArbiterRDate.vdi.
+ 3. Zaženite oba navidezna računalnika.
+ 4. Na Student se prijavite z uporabnikom root in geslom kaboom + na SimpleArbiterRDate pa z uporabnikom tester in geslom tester. +

+ +

Prvi del naloge: posodobi uro računalnika s pomočjo rdate.

+

+ 1. Preverite in si zapišite IP naslov na SimpleArbiterRDate. (ifconfig)


+ 2. Z ukazom sudo apt-get install rdate namestimo program rdate.
+ 3. Na Student z pomočjo rdate posodobi uro računalnika. rdate IP_SIMPLE_ARBITER

+ Opozorilo: NI napaka, če se posodobljen čas ne ujema s pravilnim časom.
+

+

Drugi del naloge: napiši program, ki pretvori binarni zapis 32-bitnega števila v časovni format.

+

+ Nalogo lahko rešite v Javi ali v Pythonu. Prav tako pa lahko kodo pišete v poljubnem tekstovnem urejevalniku.

+

+

Java

+

+ 1. Z ukazom nano guliver.java ustvarimo in odpremo prazen program s tekstovnim urejevalnikom nano
+ 2. Napišemo program za pretvarjanje 32-bitnega števila v čas
+ 3. Pritisnemo Ctrl+X, nato Y in Enter, da program zapremo in shranimo.
+ 4. Če je še nimamo, naložimo Javo sudo apt-get install openjdk-6-jdk

+ 5. Prevedemo program javac bintodec3.java
+ 6. Lahko ga še zaženemo ter preizkusimo java guliver.Na standardni vhod vnasemo IP naslov ali ime strežnika NTP strežnikom, ki nam pošlje 32 bitno število in pretvori v čas

+

+

Python

+

+ 1. Z ukazom nano guliver.py ustvarimo in odpremo prazen program s tekstovnim urejevalnikom nano
+ 2. Napišemo program za pretvarjanje 32-bitnega števila v čas
+ 3. Pritisnemo Ctrl+X, nato Y in Enter, da program zapremo in shranimo.
+ 4. Program zaženemo z ukazom python guliver.py

+

-
+

Testiranje

+

+ 1. Lahko poženemo tester; z ukazom ./run_test.py
+
+ 2. Kot "Upor. Ime" in "Geslo" napišite vaše podatke učilnice. (npr.: "pz1234@student.uni-lj.si" in "geslo123")
+
+ 3. Kot ime naloge vpišite 09.predvaja.
+ 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)
+ 5. Povpraša tudi po IP naslovu SimpleArbiterjaRDate, vnesite.
+ 6. Če je šlo vse po sreči, program vrne OK vi pa ste opravili nalogo. +

- -- cgit v1.2.1