This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <sys/ipc.h> | |
| #include <sys/shm.h> | |
| #include <sys/types.h> | |
| #include <signal.h> | |
| #include <unistd.h> | |
| #include <sys/wait.h> | |
| #define MAX 64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <sys/ipc.h> | |
| #include <sys/shm.h> | |
| #include <sys/types.h> | |
| #include <unistd.h> | |
| #include <sys/wait.h> | |
| #define MAX 64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package sheet9; | |
| import java.util.ArrayList; | |
| import java.util.Collections; | |
| import java.util.List; | |
| import algorithms.library.DijkstraSP; | |
| import algorithms.library.DirectedEdge; | |
| import algorithms.library.EdgeWeightedDigraph; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let to_month = function | |
| | 0 -> "January" | |
| | 1 -> "February" | |
| | 2 -> "March" | |
| | 3 -> "April" | |
| | 4 -> "May" | |
| | 5 -> "June" | |
| | 6 -> "July" | |
| | 7 -> "August" | |
| | 8 -> "September" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let calendar_entries m y = | |
| let first_day = (Lst.nth (Calendar.first_days y) m) in | |
| let month_length = (Lst.nth (Calendar.month_lengths y) m) in | |
| let rec calendar_entries m y d = | |
| let current_day = (first_day + d - 1) mod 7 in | |
| if d = 1 then Picture.beside ((first_day * 3 + 1 + 2),1,[(Strng.blanks (first_day * 3))@(Strng.of_int 1)@(Strng.blanks 2)]) (calendar_entries m y (d+1)) | |
| else if d = month_length then ((2 + 20 - first_day * 3),1,[(Strng.of_int month_length)@(Strng.blanks (20 - (first_day * 3)))]) | |
| else if current_day = 6 then Picture.above (20,1,[(Strng.of_int d)]) (calendar_entries m y (d+1)) | |
| else Picture.beside (((Lst.length (Strng.of_int d))+3-(Lst.length (Strng.of_int d))),1,[(Strng.of_int d)@(Strng.blanks (3-(Lst.length (Strng.of_int d))))]) (calendar_entries m y (d+1)) | |
| in calendar_entries m y 1;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let calendar_entries m y = | |
| let first_day = (Lst.nth (Calendar.first_days y) m) in | |
| let month_length = (Lst.nth (Calendar.month_lengths y) m) in | |
| let rec calendar_entries m y d = | |
| let current_day = (first_day + d - 1) mod 7 in | |
| if d = 1 then | |
| if current_day = 6 then Picture.above (20,1,[(Strng.blanks (first_day * 3))@(Strng.of_int 1)]) (calendar_entries m y (d+1)) | |
| else (Strng.blanks (first_day * 3))@(Strng.of_int 1)@(Strng.blanks 2)@(calendar_entries m y (d+1)) | |
| else if d = month_length then ((Strng.of_int month_length)@(Strng.blanks (20 - (first_day * 3)))) | |
| else if current_day = 6 then Picture.above (20,1,[(Strng.of_int d)]) (calendar_entries m y (d+1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (*Exercise 3.1. Write the function width : Picture.t -> int as well as the | |
| function height : Picture.t -> int returning the width and height of a given | |
| picture, respectively.*) | |
| (*type t = (width * height * Strng.t list)*) | |
| let height (_,h,_) = h | |
| let width (w,_,_) = w | |
| (*Exercise 3.2. Write functions for Strng to align l-strings within a box of | |
| given width. Three functions are needed: | |
| left_justify : int -> t -> t |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package at.q_e.dos.evs; | |
| import javafx.application.Application; | |
| import javafx.fxml.FXMLLoader; | |
| import javafx.scene.Scene; | |
| import javafx.scene.layout.BorderPane; | |
| import javafx.stage.Stage; | |
| public class LearningPlatform extends Application{ | |
| @Override |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package at.q_e.dos.evs; | |
| import javafx.application.Application; | |
| import javafx.fxml.FXMLLoader; | |
| import javafx.scene.Parent; | |
| import javafx.scene.Scene; | |
| import javafx.stage.Stage; | |
| public class LecturerView extends Application{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package at.q_e.dos.evs; | |
| import javafx.application.Application; | |
| import javafx.fxml.FXMLLoader; | |
| import javafx.scene.Parent; | |
| import javafx.scene.Scene; | |
| import javafx.stage.Stage; | |
| public class LoginView extends Application{ | |
| @Override |
OlderNewer