forked from MartinThoma/LaTeX-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
408551e
commit 0bae80d
Showing
9 changed files
with
61 additions
and
10 deletions.
There are no files selected for viewing
Binary file modified
BIN
+562 Bytes
(100%)
documents/Programmierparadigmen/Programmierparadigmen.pdf
Binary file not shown.
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
% Those are the books: | ||
book(a). | ||
book(b). | ||
book(c). | ||
book(d). | ||
book(e). | ||
book(f). | ||
|
||
% This is how 'touching' works: | ||
touching(X,Y):- touching(Y,X). % touching is symmetric | ||
touching(p1,p2). | ||
touching(p2,p3). | ||
touching(p3,p4). | ||
touching(p3,p5). | ||
touching(p3,p6). | ||
touching(p4,p5). | ||
touching(p5,p6). | ||
|
||
% List all possible positions: | ||
position(a):- p1,p2,p3,p4,p5,p6. | ||
position(b):- p1,p2,p3,p4,p5,p6. | ||
position(c):- p1,p2,p3,p4,p5,p6. | ||
position(d):- p1,p2,p3,p4,p5,p6. | ||
position(e):- p1,p2,p3,p4,p5,p6. | ||
position(f):- p1,p2,p3,p4,p5,p6. | ||
|
||
% Every position has one book | ||
getBook(p1) :- a,b,c,d,e,f. | ||
getBook(p2) :- a,b,c,d,e,f. | ||
getBook(p3) :- a,b,c,d,e,f. | ||
getBook(p4) :- a,b,c,d,e,f. | ||
getBook(p5) :- a,b,c,d,e,f. | ||
getBook(p6) :- a,b,c,d,e,f. | ||
|
||
% Add your facts: | ||
not(touching(position(a),position(d))). | ||
position(e):- p5,p2. | ||
% C touches exactly two books: eventually something like aggregate_all(count, touching(e,X), Count):-2. | ||
position(c):- p2, p4,p6. | ||
touching(position(a),position(f)). | ||
touching(position(e),position(f)). |
1 change: 1 addition & 0 deletions
1
documents/Programmierparadigmen/scripts/scala/method-syntax.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
def name(parameter: String): Unit = { code ... } |
6 changes: 6 additions & 0 deletions
6
documents/Programmierparadigmen/scripts/scala/simple-class-example.scala
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class Person ( | ||
val firstName: String, | ||
var lastName: String, | ||
age: Int) { | ||
println("This is the constructur.") | ||
} |
Empty file.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
val name: type = value |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
var name: type = value |