first commit

This commit is contained in:
2025-11-26 13:56:55 +01:00
commit c5f25901e1
188 changed files with 52799 additions and 0 deletions

5
Ugesedler/Ugeseddel-1 03-09-2025/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Programmeringsopgaver 03-09-2025.iml" filepath="$PROJECT_DIR$/Programmeringsopgaver 03-09-2025.iml" />
</modules>
</component>
</project>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,180 @@
/*
Kursus 02100 — Ugeseddel-Uge-01-Formiddag
For nogle af jer vil det sikkert være ganske let at gennemføre denne første øvelsesgang, men for andre
kan det være noget mere vanskeligt. Men det er meningen at alle skal kunne være med uafhængigt
af den erfaring man m˚atte have i forvejen! Derfor kan det nu godt alligevel være s˚adan at nogle
har brug for mere hjælp end andre, især denne første øvelsesgang. Hvis du har problemer med at f˚a
tingene til at virke, s˚a sørg for at f˚a hjælp fra sidemanden eller hjælpelæreren. Det er ikke pinligt at
spørge, selv ikke om de mest trivielle ting. Og frem for alt: G˚a ikke i panik, selvom tingene kan virke
uoverskuelige i begyndelsen. Det skal nok komme efterh˚anden...
Opgave 1
Læs og udfør de ting som er beskrevet i dokumentet IDE.pdf under Vigtige filer p˚a DTU Learn.
Dette bringer dig igennem de introducerende ting hvor du f˚ar det integrerede udviklingsmiljø op at
køre og skriver dit første Java-program.
Opgave 2
Løs nedenst˚aende opgave.
Write a complete Java program that prints the following output:
//////////////////////
|| Victory is mine! ||
\\\\\\\\\\\\\\\\\\\\\\
Opgave 3
Løs nedenst˚aende opgave.
Write a complete Java program that prints the following output. Use at least one static method
besides main to help you.
1
//////////////////////
|| Victory is mine! ||
\\\\\\\\\\\\\\\\\\\\\\
|| Victory is mine! ||
\\\\\\\\\\\\\\\\\\\\\\
|| Victory is mine! ||
\\\\\\\\\\\\\\\\\\\\\\
|| Victory is mine! ||
\\\\\\\\\\\\\\\\\\\\\\
|| Victory is mine! ||
\\\\\\\\\\\\\\\\\\\\\\
Opgave 4
Løs nedenst˚aende opgave.
Write a Java program that generates the following output. Use static methods to show structure and
eliminate redundancy in your solution. Note that there are two rocket ships next to each other. What
redundancy can you eliminate using static methods? What redundancy cannot be eliminated?
/\ /\
/ \ / \
/ \ / \
+------+ +------+
| | | |
| | | |
+------+ +------+
|United| |United|
|States| |States|
+------+ +------+
| | | |
| | | |
+------+ +------+
/\ /\
/ \ / \
/ \ / \
Opgave 5
Løs nedenst˚aende opgave.
Sometimes we want to write similar letters to different people. For example, you might write to your
parents to tell them about your classes and your friends, and to ask for money; you might write to a
friend about your love life, your classes, and your hobbies; and you might write to your brother about
your hobbies and your friends and to ask for money. Write a program that prints similar letters such
as these to three people of your choice. Each letter should have at least one paragraph in common
2
with each of the other. Your main program should have three method calls: one for each of the people
to whom you are writing. Try to isolate repeated tasks into methods.
Opgave 6
Skriv et program, der udskriver følgende linje 50 gange:
DTU - Det blir til noget!
Prøv at gøre programmet s˚a simpelt som muligt, men du m˚a kun bruge de faciliteter i Java, som er
gennemg˚aet i bogens kapitel 1. Du kan m˚aske finde inspiration til en god procedural dekomposition
i bogens beskrivelse af binære tal (eng. binary numbers). Bed eventuelt hjælpelæreren om hjælp.
3
*/
public class Opgaver030925 {
public static void main(String[] args) {
System.out.println("\nOPGAVE 2:\n");
Opgave2.opgave2();
System.out.println("\nOPGAVE 3:\n");
Opgave3.opgave3();
System.out.println("\nOPGAVE 4:\n");
Opgave4.opgave4();
System.out.println("\nOPGAVE 5:\n");
Opgave5.opgave5();
System.out.println("\nOPGAVE 6:\n");
Opgave6.opgave6();
}
}
class Opgave2 {
public static void opgave2() {
System.out.println("//////////////////////");
System.out.println("|| Victory is mine! ||");
System.out.println("\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\");
}
}
class Opgave3 {
public static void opgave3() {
Opgave2.opgave2();
Opgave2.opgave2();
Opgave2.opgave2();
Opgave2.opgave2();
Opgave2.opgave2();
}
}
class Opgave4 {
public static void opgave4() {
trekant();
linjeTing();
vægTing();
vægTingUSA();
linjeTing();
vægTing();
linjeTing();
trekant();
}
public static void trekant() {
System.out.println(" /\\ /\\ ");
System.out.println(" / \\ / \\ ");
System.out.println(" / \\ / \\ ");
}
public static void linjeTing() {
System.out.println("+------+ +------+");
}
public static void vægTing() {
System.out.println("| | | |");
System.out.println("| | | |");
}
public static void vægTingUSA() {
System.out.println("|United| |United|");
System.out.println("|States| |States|");
}
}
class Opgave5 {
public static void opgave5() {
System.out.println("Kære mor,");
askMoney();
tellAboutClasses();
System.out.println("\nKære bror,");
tellAboutClasses();
tellAboutHobbies();
tellAboutFriends();
System.out.println("\nKære ven,");
tellAboutHobbies();
tellAboutFriends();
askMoney();
tellAboutClasses();
}
public static void askMoney() {
System.out.println("Jeg har meget få pengene lige nu faktisk, hvis du lige kunne sende mig 1 mil ville det være dejligt, tak <3.");
}
public static void tellAboutClasses() {
System.out.println("Jeg er started på uni, er chill nok indtil videre. Dog er vores programmeringslære meget kedeligt cause det er meget simple ting han fortæller om");
}
public static void tellAboutHobbies() {
System.out.println("Jeg kan godt lide at spille TerraFirmaGreg-modern med en af mine gym-venner. Vi har en server og spiller nogle gange sammen.");
}
public static void tellAboutFriends() {
System.out.println("Jeg har både gym-venner og uni venner. Nogle af mine gym venner går også på uni og er started samtidig med mig.");
}
}
class Opgave6 {
static int count = 0;
public static void opgave6() {
System.out.println("DTU - Det blir til noget!");
if (count < 50) {
count += 1;
opgave6();
}
else {
return;
}
}
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Programmeringsopgaver 03-09-2025.iml" filepath="$PROJECT_DIR$/Programmeringsopgaver 03-09-2025.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,30 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/
.kotlin
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

8
Ugesedler/Ugeseddel-11-19-11-2025/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KubernetesApiProvider"><![CDATA[{}]]></component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="zulu-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Ugeseddel-11-19-11-2025.iml" filepath="$PROJECT_DIR$/Ugeseddel-11-19-11-2025.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,36 @@
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class HelloWorld extends Application {
@Override
public void start(Stage primaryStage) {
Button btn = new Button();
btn.setText("Say 'Hello World'");
btn.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
System.out.println("Hello World!");
}
});
StackPane root = new StackPane();
root.getChildren().add(btn);
Scene scene = new Scene(root, 300, 250);
primaryStage.setTitle("Hello World!");
primaryStage.setScene(scene);
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}

View File

@@ -0,0 +1,86 @@
import javafx.application.Application;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class StackPaneDemo extends Application {
private StackPane stackPane;
@Override
public void start(Stage primaryStage) throws Exception {
VBox root = new VBox();
// StackPane
stackPane = new StackPane();
// add label to StackPane
Label label = new Label("I'm a Label");
label.setStyle("-fx-background-color:yellow");
label.setPadding(new Insets(5,5,5,5));
stackPane.getChildren().add(label);
// add Button to StackPane
Button button = new Button("I'm a Button");
button.setStyle("-fx-background-color: cyan");
button.setPadding(new Insets(5,5,5,5));
stackPane.getChildren().add(button);
// add CheckBox to StackPane
CheckBox checkBox = new CheckBox("I'm a CheckBox");
checkBox.setOpacity(1);
checkBox.setStyle("-fx-background-color:olive");
checkBox.setPadding(new Insets(5,5,5,5));
stackPane.getChildren().add(checkBox);
stackPane.setPrefSize(300, 150);
root.getChildren().add(stackPane);
Button controlButton = new Button("Change Top");
root.getChildren().add(controlButton);
root.setAlignment(Pos.CENTER);
VBox.setMargin(stackPane, new Insets(10, 10, 10, 10));
VBox.setMargin(controlButton, new Insets(10, 10, 10, 10));
Scene scene = new Scene(root, 550, 250);
primaryStage.setTitle("StackPane Layout Demo");
primaryStage.setScene(scene);
controlButton.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent event) {
changeTop();
}
});
primaryStage.show();
}
private void changeTop() {
ObservableList children = this.stackPane.getChildren();
if (children.size() > 1) {
//
Node topNode = (Node) (children.get(children.size()-1));
topNode.toBack();
}
}
public static void main(String[] args) {
launch(args);
}
}

View File

@@ -0,0 +1,47 @@
// author: Benjamin Bogø
import javafx.application.Application;
import javafx.event.*;
import javafx.scene.control.Button;
import javafx.scene.input.*;
import javafx.scene.layout.StackPane;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class TestJavaFX extends Application {
public static void main(String[] args) {
launch(args);
}
private int counter = 0;
private Button button = new Button();
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Hello World!");
this.button.setText("Im a counter! Click ME!!!");
this.button.setOnAction(this::handleClick);
StackPane root = new StackPane();
root.getChildren().add(this.button);
Scene scene = new Scene(root, 300, 250);
scene.addEventHandler(KeyEvent.KEY_PRESSED, this::handleKey);
primaryStage.setScene(scene);
primaryStage.show();
}
private void handleClick(ActionEvent event) {
this.counter++;
this.button.setText("" + this.counter);
}
private void handleKey(KeyEvent event) {
if (event.getCode() == KeyCode.UP) {
this.counter++;
} else if (event.getCode() == KeyCode.DOWN) {
this.counter--;
} else {
return;
}
this.button.setText("" + this.counter);
}
}

View File

@@ -0,0 +1,21 @@
import javafx.application.Application;
import javafx.event.*;
import javafx.scene.control.Button;
import javafx.scene.input.*;
import javafx.scene.layout.StackPane;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class UgeseddelFormiddag extends Application {
public static void main(String[] args) {launch(args);}
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("Hello");
StackPane root = new StackPane();
root.getChildren().add(new Button("Button 1"));
Scene scene = new Scene(root, 300, 250);
primaryStage.setScene(scene);
primaryStage.show();
}
}

View File

@@ -0,0 +1,30 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/
.kotlin
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

8
Ugesedler/Ugeseddel-12 26-11-2025/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KubernetesApiProvider"><![CDATA[{}]]></component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="zulu-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Ugeseddel-12 26-11-2025.iml" filepath="$PROJECT_DIR$/Ugeseddel-12 26-11-2025.iml" />
</modules>
</component>
</project>

Binary file not shown.

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,27 @@
\documentclass[12pt,a4paper]{article}
\usepackage[cm,empty]{fullpage}
\usepackage{parskip}
\usepackage{url}
\begin{document}
\emph{\LARGE Individuel aflevering - Opgave med JavaFX (uge 11)}
Skriv et JavaFX-program \verb+RandomWalk+, der indeholder et vindue med en knap midtpå og en label i bunden, der viser et heltal initialiseret med 0. På knappen skal der enten stå "Up" eller "Down" -- der startes med en tilfældig mulighed (50\,\% sandsynlighed hver), og hver gang der trykkes på knappen, skal der eksekveres en optælling ($+1$) eller nedtælling ($-1$) på labelen afhængig af knappens tekst. Efter klikket skal knappens tekst igen ændres tilfældigt. Du skal bruge \verb+BorderPane+ til layoutet og lambda-udtryk til at håndtere museklik på knappen.
Udover at aflevere en PDF-fil med JavaFX-programmet skal du lave en videooptagelse, der viser, hvordan du kompilerer og starter programmet fra kommandolinjen og hvordan labelen ændrer sig, mens du klikker mindst 10 gange på knappen. Videoen må maks.\ vare 30 sekunder og skal lægges op i \verb+.mp4+-format.
\emph{Hint:} Man kan bruge det indbyggede \emph{Snipping Tool} i Windows (Windows+Shift+R) eller \emph{Screen Recording Tool} på Mac (Shift+Command+5) til at lave videoen.
% INDSÆT KILDEKODEN AF DIT JAVA-PROGRAM HERUNDER MELLEM \begin{verbatim} og \end{verbatim}
% Slet den givne opgavetekst i dokumentet (altså alt bortset fra selve løsningen); LaTeX-præamblen og document-miljøet beholdes selvfølgelig.
% Der skal afleveres en PDF-fil genereret af LaTeX (benyt fx Overleaf) samt den ovennævnte videooptagelse
% LaTeX-filen skal ikke afleveres (men den bør dog gemmes)
\begin{verbatim}
\end{verbatim}
\end{document}

View File

@@ -0,0 +1,46 @@
import javafx.application.Application;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import java.util.Random;
public class RandomWalk extends Application {
private Button button = new Button();
private int counter = 0;
private Label label = new Label("" + this.counter);
private final Random random = new Random();
@Override
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle("Random Walk");
this.button.setText((random.nextBoolean() ? "Up" : "Down"));
BorderPane borderPane = new BorderPane();
borderPane.setPadding(new Insets(20, 20,20,20));
borderPane.setCenter(this.button);
BorderPane.setAlignment(this.button, Pos.CENTER);
borderPane.setBottom(label);
BorderPane.setAlignment(label, Pos.BOTTOM_CENTER);
Scene scene = new Scene(borderPane, 300, 250);
primaryStage.setScene(scene);
this.button.setOnAction(e -> {
counter += (button.getText().equals("Up") ? 1 : -1);
button.setText((random.nextBoolean() ? "Up" : "Down"));
label.setText("" + counter);
});
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}

View File

@@ -0,0 +1,24 @@
import javafx.application.Application;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.Label;
import javafx.scene.layout.BorderPane;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
import java.util.Random;
public class TicTacToe extends Application {
public void start(Stage primaryStage) throws Exception {
primaryStage.setTitle("Tic Tac Toe");
}
public static void main(String[] args) {launch(args);}
}

5
Ugesedler/Ugeseddel-2 10-09-2025/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Opgaver/Opgaver.iml" filepath="$PROJECT_DIR$/Opgaver/Opgaver.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/Programmeringsopgaver 10-09-2025.iml" filepath="$PROJECT_DIR$/.idea/Programmeringsopgaver 10-09-2025.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,126 @@
public class Opgaver {
public static void main(String[] args) {
System.out.println(Opgave1.opgave1(10.0,20.0,4.0,2.0));
/*Opgave2.opgave2();
Opgave3.opgave3a();
Opgave3.opgave3b();
Opgave3.opgave3c();
Opgave4.opgave4();
Opgave5.opgave5();*/
Opgave6.opgave6();
}
}
class Opgave1 {
public static double opgave1(double v0, double t, double a, double s0) {
System.out.println("\nOPGAVE 1:\n");
double s = s0 + v0*t+(0.5*a*(t*t));
return s;
}
}
class Opgave2 {
public static void opgave2() {
System.out.println("\nOPGAVE 2\n");
for (int i = 1; i <= 10; i++) {
System.out.print(" " + i*i);
}
System.out.println();
}
}
class Opgave3 {
public static void opgave3a() {
System.out.println("\nOPGAVE 3\n");
System.out.println("3a:");
for (int g = 1; g <= 3; g++) {
for (int i = 0; i < 10; i++) {
for (int j = 1; j <= 3; j++) {
System.out.print(i);
}
}
System.out.println();
}
}
public static void opgave3b() {
System.out.println("\n3b");
for (int g = 1; g <= 3; g++) {
for (int i = 9; i >= 0; i--) {
for (int j = 1; j <= 5; j++) {
System.out.print(i);
}
}
System.out.println();
}
}
public static void opgave3c() {
System.out.println("\n3c:");
for (int g = 1; g <= 3; g++) {
for (int i = 9; i >= 0; i--) {
for (int j = 1; j <= i; j++) {
System.out.print(i);
}
}
System.out.println();
}
}
}
class Opgave4 {
public static void opgave4() {
System.out.println("\nOPGAVE 4:\n");
int a = 1;
int b = 1;
System.out.print(a + ", " + b + ", ");
for (int i = 2; i<12; i++) {
int c = a + b;
System.out.print(c + ", ");
a = b;
b = c;
}
}
}
class Opgave5 {
public static void opgave5() {
int number = 1;
for (int i = 0; i <= 5; i++) {
printLines(6-number);
for (int j = 1; j <= number; j++) {
System.out.print(2*i-1);
}
printLines(6-number);
number++;
System.out.println();
}
}
public static void printLines(int amount) {
for (int j = amount; j >= 0; j--) {
System.out.print("-");
}
}
}
class Opgave6 {
public static void opgave6() {
System.out.println("\nOPGAVE 6\n");
printStairs(5);
}
public static void printStairs(int repeatAmount) {
for (int i = repeatAmount-1; i >= 0; i--) {
System.out.print("\n" + repeatString(i*5, " ") + " o ******" + repeatString((repeatAmount-i-1)*5, " ") + "*");
System.out.print("\n" + repeatString(i*5, " ") + " /|\\ *" + repeatString((repeatAmount-i)*5, " ") + "*");
System.out.print("\n" + repeatString(i*5, " ") + " / \\ *" + repeatString((repeatAmount-i)*5, " ") + "*");
}
System.out.println("\n" + repeatString((repeatAmount+1)*5+2, "*"));
}
public static String repeatString(int amount, String string) {
String returnString = "";
for (int i = 0; i < amount; i++) {
returnString = returnString + string;
}
return returnString;
}
}

View File

@@ -0,0 +1,29 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

5
Ugesedler/Ugeseddel-3 17-09-2025/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="zulu-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Programmeringsopgaver 17-09-2025.iml" filepath="$PROJECT_DIR$/Programmeringsopgaver 17-09-2025.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,96 @@
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
/*Opgave1.printNumbers(15);
Opgave2.processName();
Opgave3.repl("Hello", 3);
Opgave4.printPowersOf2(10);
Opgave4.printPowersOf2NoMath(10);
Opgave5.Opgave5();*/
Opgave6.quadratic(1,3,2);
}
}
class Opgave1 {
public static void printNumbers(int n) {
for (int i = 1; i <= n; i++) {
System.out.print("["+i+"] ");
}
System.out.println();
}
}
class Opgave2 {
public static void processName() {
Scanner scanner = new Scanner(System.in);
System.out.print("\n Skriv dit navn: ");
String name = scanner.nextLine();
String[] splitName = name.split(" ");
System.out.print("Dit navn i omvendt rækkefølge er: "+splitName[splitName.length-1]+", ");
for (int i = 0; i <= splitName.length-2; i++) {
System.out.print(splitName[i]+" ");
}
System.out.println();
}
}
class Opgave3 {
public static void repl(String input, int n) {
for (int i = 1; i <= n; i++) {
System.out.print(input);
}
System.out.println();
}
}
class Opgave4 {
public static void printPowersOf2(int n) {
for (int i = 0; i <= n; i++) {
System.out.print((long)Math.pow(2, i)+" ");
}
System.out.println();
}
public static void printPowersOf2NoMath(int n) {
for (int i = 0; i <= n; i++) {
System.out.print(calculatePowerOf2(2, i)+" ");
}
System.out.println();
}
public static int calculatePowerOf2(int n, int repeat) {
if (repeat == 0) {
return 1;
} else {
return calculatePowerOf2(n, repeat - 1) * n;
}
}
}
class Opgave5 {
public static void Opgave5() {
System.out.printf("%-5s %-15s %-15s %-10s %-10s%n", "Year", "Balance", "Interest", "Deposit", "New Balance");
double balance = 1000.0;
double interest = 0.065;
double deposit = 100;
for (int i = 1; i <= 25; i++) {
double oldBalance = balance;
balance += balance * interest;
double newBalance = balance + deposit;
System.out.printf("%-5d $%-14.2f $%-9.2f $%-9.2f $%-14.2f%n", i, oldBalance, oldBalance * interest, deposit, newBalance);
balance = newBalance;
}
}
}
class Opgave6 {
public static void quadratic(double a, double b, double c) {
double[] x = {0.0,0.0};
for (int i = -1; i <= 1; i += 2) {
x[(i <= 0 ? 0 : 1)] = (-b-(Math.sqrt(Math.pow(b,2)-(4*a*c))*i))/(2*a);
}
System.out.println(Arrays.toString(x));
}
}

View File

@@ -0,0 +1,144 @@
import java.util.Scanner;
public class Opgaver {
public static void main(String[] args) {
Opgave1.opgave1();
Scanner console = new Scanner(System.in);
Opgave2.opgave2(console);
Opgave3.printBogstaver("Julemanden var sej");
sOpgave4.printFaktorer(24);
Opgave5.quadratic(console);
}
}
class Opgave1 {
public static void opgave1() {
System.out.println("\n OPGAVE 1: \n");
for (int i = 0; i <= 13; i++) {
System.out.println("i = " + i);
omregnKarakter(i);
}
}
public static void omregnKarakter(int karakter) {
String nyeKarakter;
String gamleKarakter = Integer.toString(karakter);
if (karakter == 11 || karakter == 13) {
nyeKarakter = "12";
} else if (karakter == 10) {
nyeKarakter = "10";
} else if (karakter == 8 || karakter == 9) {
nyeKarakter = "7";
} else if (karakter == 7) {
nyeKarakter = "4";
} else if (karakter == 6) {
nyeKarakter = "02";
} else if (karakter == 5 || karakter == 03) {
nyeKarakter = "00";
gamleKarakter = "03";
} else if (karakter == 0) {
nyeKarakter = "-3";
gamleKarakter = "00";
} else {
System.out.println("Ugyldig karakter indtastet");
return;
}
System.out.println(
"Karakteren " +
gamleKarakter +
" i 13-skalaen svarer til " +
nyeKarakter +
" i 7-trinsskalaen"
);
}
}
class Opgave2 {
public static void opgave2(Scanner console) {
System.out.print("How many numbers do you want to enter? ");
int numbersCount = console.nextInt();
System.out.print("Number 1: ");
int smallestNumber = console.nextInt();
int largestNumber = smallestNumber;
for (int i = 2; i <= numbersCount; i++) {
System.out.print("Number " + i + ": ");
int nextNumber = console.nextInt();
largestNumber = (nextNumber > largestNumber)
? nextNumber
: largestNumber;
smallestNumber = (nextNumber < smallestNumber)
? nextNumber
: smallestNumber;
}
System.out.println(
"Smallest: " + smallestNumber + "\nLargest: " + largestNumber
);
}
}
class Opgave3 {
public static void printBogstaver(String inputStreng) {
if (inputStreng == "") {
throw new IllegalArgumentException("Fejl: Fået tomt input");
}
System.out.print(inputStreng.charAt(0));
for (int i = 1; i < inputStreng.length(); i++) {
System.out.print(" _ " + inputStreng.charAt(i));
}
System.out.println("");
}
}
class Opgave4 {
public static void printFaktorer(int n) {
if (n <= 0) {
throw new IllegalArgumentException(
"Fejl: n skal være et positivt heltal"
);
}
System.out.print(1);
for (int i = 2; i <= n; i++) {
if (n % i == 0) {
System.out.print(" _ " + i);
}
}
System.out.println("");
}
}
class Opgave5 {
public static void quadratic(Scanner console) {
System.out.print("Indtast værdien for a: ");
double a = console.nextDouble();
System.out.print("Indtast værdien for b: ");
double b = console.nextDouble();
System.out.print("Indtast værdien for c: ");
double c = console.nextDouble();
double determinant = (b * b) - (4 * a * c);
if (a == 0) {
if (b == 0) {
throw new IllegalArgumentException("Både a og b er nul");
}
System.out.println("Roden er: " + (-c / b));
return;
} else if (determinant < 0) {
throw new IllegalArgumentException(
"Determinanten kan ikke være negativ"
);
}
double rod1 = (-b - Math.sqrt(determinant)) / (2 * a);
double rod2 = (-b + Math.sqrt(determinant)) / (2 * a);
System.out.println(
(rod1 != rod2)
? "Første rod: " + rod1 + "\nAnden rod: " + rod2
: "Roden: " + rod1
);
}
}

View File

@@ -0,0 +1,65 @@
import random
def figure(n):
for i in range(1,n + 1):
print(" " * (n - i), end = "")
for j in range(1, i * 2):
print(j, end = "")
print()
def Opgave4():
figure(1)
figure(2)
figure(3)
figure(4)
figure(5)
print("Opgave 4:")
#Opgave4()
print("Opgave 5:")
def giveIntro():
print("Try to guess my two-digit")
print("number, and I'll tell you how")
print("many digits from your guess")
print("appear in my number.")
print()
def is_number(s):
try:
i = int(s)
return 0 <= i <= 99
except ValueError:
return False
def get_number(prompt):
s = input(prompt)
while not is_number(s):
s = input(prompt)
return int(s)
def matches(number, guess):
numMatches = 0
if guess // 10 == number // 10 or guess // 10 == number % 10:
numMatches += 1
if (guess // 10 != guess % 10) and (guess % 10 == number // 10 or guess % 10 == number % 10):
numMatches += 1
return numMatches
def Opgave5():
giveIntro()
number = random.randint(0,99) # Pick random number between 0 and 99
print(number)
guess = get_number("Your guess? ")
numGuesses = 1
while (guess != number):
numMatches = matches(number, guess)
print(f"Incorrect (hint: {numMatches} digits matches).")
guess = get_number("Your guess? ")
numGuesses += 1
print(f"You got it right in {numGuesses} tries")
Opgave5()

View File

@@ -0,0 +1,93 @@
import java.util.Scanner;
public class OpgaverEftermiddag {
public static void main(String[] args) {
Scanner console = new Scanner(System.in);
Opgave1.opgave1(console);
Opgave2.opgave2(console);
Opgave4.opgave4(console);
}
}
class Opgave1 {
public static void opgave1(Scanner console) {
int running = 1;
double sum = 0;
double amount = 0;
System.out.println(
"Indtast tal, der skal tages gennemsnit fra. Indtast \"-1\" for at stoppe."
);
while (running == 1) {
System.out.print("Indtast tal: ");
double input = console.nextInt();
if (input == -1) {
break;
}
sum += input;
amount++;
}
double average = sum / amount;
System.out.println("Gennemsnittet blev " + average);
}
}
class Opgave2 {
public static void opgave2(Scanner console) {
System.out.print("Indtast Brugernavn: ");
String brugernavn = console.nextLine();
if (brugernavn.equals("admin") && tjekAdgangskode(console)) {
System.out.println("Adgang givet");
} else {
System.out.println("Adgang nægtet");
}
}
public static boolean tjekAdgangskode(Scanner console) {
System.out.print("Indtast adgangskode: ");
String adgangskode = console.nextLine();
return adgangskode.equals("wKzsP9A\\JWY!");
}
}
class Opgave3 {
// Laves i Python, se Opgaver.py-filen
}
class Opgave4 {
public static void opgave4(Scanner console) {
System.out.println("Tell me about the person applying for a loan.");
int age = get_number(console, "What age is the person? ");
int money = get_number(
console,
"How many dollars does the person have? "
);
boolean working_age = (age >= 18 && age < 70);
boolean rich = (money >= 100000);
if (working_age && rich) {
System.out.println("Loan granted.");
} else {
System.out.println("Loan denied");
}
}
public static int get_number(Scanner console, String prompt) {
System.out.print(prompt);
while (!console.hasNextInt()) {
console.next();
System.out.println("Not an integer; try again.");
System.out.print(prompt);
}
return console.nextInt();
}
}
class Opgave5 {
// Laves i Python. Kig i Opgaver.py-filen
}

8
Ugesedler/Ugeseddel-5 01-10-2025/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="KubernetesApiProvider"><![CDATA[{}]]></component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Ugeseddel-5 01-10-2025.iml" filepath="$PROJECT_DIR$/Ugeseddel-5 01-10-2025.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,82 @@
import java.io.*;
import java.util.Scanner;
public class Opgaver {
public static void main(String[] args) throws FileNotFoundException {
Opgave1.opgave1();
//Opgave2.opgave2();
}
}
class Opgave1 {
public static void opgave1() throws FileNotFoundException {
Scanner file = new Scanner(new File("problem2.html"));
boolean inTag = false;
while (file.hasNextLine()) {
Scanner currentLine = new Scanner(file.nextLine());
String stringInTag = "";
String textOnLine = "";
inTag = false;
while (currentLine.hasNext()) {
String token = currentLine.next();
for (int i = 0; i < token.length(); i++) {
if (inTag == false && token.charAt(i) == '<') {
inTag = true;
} else if (inTag == true && token.charAt(i) == '>') {
inTag = false;
stringInTag = "";
continue;
}
if (inTag == false) {
textOnLine += token.charAt(i);
} else {
stringInTag += token.charAt(i);
}
}
textOnLine += (inTag ? "" : " ");
}
System.out.println(textOnLine + stringInTag);
}
}
public static String readEntireFile(Scanner input) {
String stringFile = "";
while (input.hasNextLine()) {
stringFile += input.nextLine() + "\n";
}
return stringFile;
}
}
class Opgave2 {
public static void opgave2() throws FileNotFoundException {
Scanner console = new Scanner(System.in);
System.out.print("Indtast filnavn/sti: ");
String fileName = console.next();
Scanner file = new Scanner(new File(fileName));
int sum = 0;
int amount = 0;
int max = 0;
int min = 0;
while (file.hasNext()) {
if (file.hasNextInt()) {
int token = file.nextInt();
amount++;
sum += token;
min = (amount == 1 ? token : min); // Min-værdien skal defineres som første tal.
min = (token < min ? token : min); // Min-værdien opdateres hvis token er større end den.
max = (amount == 1 ? token : max); // Samme som min.
max = (token > max ? token : max);
} else {
file.next();
}
}
System.out.println("Gennemsnittet er: " + (double) sum / amount);
System.out.println(
"Min.-værdien er : " + min + " og Maks-værdien er: " + max
);
}
}

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@@ -0,0 +1,13 @@
<html>
<head>
<title>My web page</title>
</head>
<body>
<p>There are many pictures of my cat here,
as well as my <b>very cool</b> blog page,
which contains <font color="red">awesome
stuff about my trip to Vegas.<p>
Here's my cat now:<img src="cat.jpg">
</body>
</html>

View File

@@ -0,0 +1,4 @@
4 -2 18
15 31
27

View File

@@ -0,0 +1,4 @@
4 billy bob -2 18 2.54
15 31 NotANumber
true 'c' 27

View File

@@ -0,0 +1,2 @@
no numbers here
BAD END

View File

@@ -0,0 +1,12 @@
<html>
<head>
<title>My web page</title>
</head>
<body>
<p>There are many pictures of my cat here,
as well as my <b>very cool</b> blog page,
which contains <font color="red">awesome
stuff about my trip to Vegas.<p>
Here's my cat now:<img src="cat.jpg"
MISSING END TAG IN LINE ABOVE

View File

@@ -0,0 +1,12 @@
<html>
<head>
<title>My web page</title>
</head>
<body>
<p>There are many pictures of my cat here,
as well as my <b>very cool</b> blog page,
which contains <font color="red">awesome
stuff about my trip to Vegas.<p>
Here's my cat now:img src="cat.jpg">
MISSING START TAG IN LINE ABOVE

View File

@@ -0,0 +1,29 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

5
Ugesedler/Ugeseddel-6 08-10-2025/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,5 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@@ -0,0 +1,310 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="LanguageInjectionConfiguration">
<injection language="http-header-reference" injector-id="java">
<display-name>Apache HttpClient 4 HTTP Header (org.apache.http)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("setHeader", "addHeader", "getFirstHeader", "getLastHeader", "removeHeaders").definedInClass("org.apache.http.HttpMessage"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("setHeader", "addHeader", "getFirstHeader", "getLastHeader", "removeHeaders").definedInClass("org.apache.http.message.AbstractHttpMessage"))]]></place>
</injection>
<injection language="http-header-reference" injector-id="java">
<display-name>Apache HttpClient 5 HTTP Header (org.apache.hc.core5)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("setHeader", "addHeader").definedInClass("org.apache.hc.core5.http.message.BasicHttpRequest"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("setHeader", "addHeader", "getFirstHeader", "getLastHeader", "removeHeaders").definedInClass("org.apache.hc.client5.http.async.methods.SimpleRequestBuilder"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("setHeader", "addHeader", "getFirstHeader", "getLastHeader", "removeHeaders").definedInClass("org.apache.hc.core5.http.io.support.ClassicRequestBuilder"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("setHeader", "addHeader", "getFirstHeader", "getLastHeader", "removeHeaders").definedInClass("org.apache.hc.core5.http.nio.support.AsyncRequestBuilder"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("setHeader", "addHeader", "getFirstHeader", "getLastHeader", "removeHeaders").definedInClass("org.apache.hc.core5.http.support.BasicRequestBuilder"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>AsyncQueryRunner (org.apache.commons.dbutils)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("batch").withParameterCount(2).definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("insertBatch").withParameterCount(3).definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "insert").withParameters("java.lang.String", "org.apache.commons.dbutils.ResultSetHandler").definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "insert").withParameters("java.lang.String", "org.apache.commons.dbutils.ResultSetHandler", "java.lang.Object...").definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("update").withParameters("java.lang.String").definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("update").withParameters("java.lang.String", "java.lang.Object").definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("update").withParameters("java.lang.String", "java.lang.Object...").definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("batch").withParameterCount(3).definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("insertBatch").withParameterCount(4).definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("query", "insert").withParameters("java.sql.Connection", "java.lang.String", "org.apache.commons.dbutils.ResultSetHandler").definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("query", "insert").withParameters("java.sql.Connection", "java.lang.String", "org.apache.commons.dbutils.ResultSetHandler", "java.lang.Object...").definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("update").withParameters("java.sql.Connection", "java.lang.String").definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("update").withParameters("java.sql.Connection", "java.lang.String", "java.lang.Object").definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("update").withParameters("java.sql.Connection", "java.lang.String", "java.lang.Object...").definedInClass("org.apache.commons.dbutils.AsyncQueryRunner"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Jodd (jodd.db)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query").withParameterCount(1).definedInClass("jodd.db.DbQuery"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("DbQuery").withParameterCount(2).definedInClass("jodd.db.DbQuery"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("query").withParameterCount(2).definedInClass("jodd.db.DbQuery"))]]></place>
<place><![CDATA[psiParameter().ofMethod(2, psiMethod().withName("DbQuery").withParameterCount(3).definedInClass("jodd.db.DbQuery"))]]></place>
</injection>
<injection language="http-header-reference" injector-id="java">
<display-name>MockServer Header (org.mockserver)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("header").definedInClass("org.mockserver.model.Header"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("withHeader").definedInClass("org.mockserver.model.HttpRequest"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("withHeader", "getHeader", "getFirstHeader", "containsHeader", "removeHeader").definedInClass("org.mockserver.model.HttpResponse"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>MyBatis @Select/@Delete/@Insert/@Update</display-name>
<single-file value="true" />
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.apache.ibatis.annotations.Delete")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.apache.ibatis.annotations.Insert")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.apache.ibatis.annotations.Select")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.apache.ibatis.annotations.Update")]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>QueryProducer (org.hibernate.query)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createNativeQuery").definedInClass("org.hibernate.query.QueryProducer"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createSQLQuery").definedInClass("org.hibernate.query.QueryProducer"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>QueryRunner (org.apache.commons.dbutils)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("batch").withParameterCount(2).definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("insertBatch").withParameterCount(3).definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "insert").withParameters("java.lang.String", "org.apache.commons.dbutils.ResultSetHandler").definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "insert", "execute").withParameters("java.lang.String", "org.apache.commons.dbutils.ResultSetHandler", "java.lang.Object...").definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("update").withParameters("java.lang.String").definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("update").withParameters("java.lang.String", "java.lang.Object").definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("update", "execute").withParameters("java.lang.String", "java.lang.Object...").definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("batch").withParameterCount(3).definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("insertBatch").withParameterCount(4).definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("query", "insert").withParameters("java.sql.Connection", "java.lang.String", "org.apache.commons.dbutils.ResultSetHandler", "java.lang.Object...").definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("query", "insert", "execute").withParameters("java.sql.Connection", "java.lang.String", "org.apache.commons.dbutils.ResultSetHandler").definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("update").withParameters("java.sql.Connection", "java.lang.String").definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("update").withParameters("java.sql.Connection", "java.lang.String", "java.lang.Object").definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
<place><![CDATA[psiParameter().ofMethod(1, psiMethod().withName("update", "execute").withParameters("java.sql.Connection", "java.lang.String", "java.lang.Object...").definedInClass("org.apache.commons.dbutils.QueryRunner"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>R2DBC (io.r2dbc)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("add").definedInClass("io.r2dbc.spi.Batch"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createStatement").definedInClass("io.r2dbc.spi.Connection"))]]></place>
</injection>
<injection language="PostgreSQL" injector-id="java">
<display-name>Reactiverse Postgres Client (io.reactiverse)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch").definedInClass("io.reactiverse.pgclient.PgConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch").definedInClass("io.reactiverse.pgclient.PgTransaction"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPrepare", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.reactiverse.reactivex.pgclient.PgClient"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPrepare", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.reactiverse.reactivex.pgclient.PgConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPrepare", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.reactiverse.reactivex.pgclient.PgPool"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPrepare", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.reactiverse.reactivex.pgclient.PgTransaction"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "preparedQuery", "preparedBatch").definedInClass("io.reactiverse.axle.pgclient.PgClient"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "preparedQuery", "preparedBatch").definedInClass("io.reactiverse.pgclient.PgClient"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "preparedQuery", "preparedBatch").definedInClass("io.reactiverse.pgclient.PgPool"))]]></place>
</injection>
<injection language="http-header-reference" injector-id="java">
<display-name>RestAssured HTTP Header (io.restassured)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("addHeader").definedInClass("io.restassured.builder.RequestSpecBuilder"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("header", "getHeader", "headers").definedInClass("io.restassured.response.ResponseOptions"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("header", "getHeader", "headers").definedInClass("io.restassured.response.ValidatableResponseOptions"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("header", "headers").definedInClass("io.restassured.specification.RequestSpecification"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Session.createNativeQuery (org.hibernate)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createNativeQuery").definedInClass("org.hibernate.reactive.mutiny.Mutiny.Session"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createNativeQuery").definedInClass("org.hibernate.reactive.mutiny.Mutiny.StatelessSession"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createNativeQuery").definedInClass("org.hibernate.reactive.stage.Stage.Session"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createNativeQuery").definedInClass("org.hibernate.reactive.stage.Stage.StatelessSession"))]]></place>
</injection>
<injection language="HQL" injector-id="java">
<display-name>Session.createQuery (org.hibernate)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createQuery").definedInClass("org.hibernate.Session"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createQuery").definedInClass("org.hibernate.reactive.mutiny.Mutiny.Session"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createQuery").definedInClass("org.hibernate.reactive.mutiny.Mutiny.StatelessSession"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createQuery").definedInClass("org.hibernate.reactive.stage.Stage.Session"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createQuery").definedInClass("org.hibernate.reactive.stage.Stage.StatelessSession"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createQuery", "createSelectionQuery", "createMutationQuery").definedInClass("org.hibernate.query.QueryProducer"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>SmallRye Axle SqlClient (io.vertx.axle.sqlclient)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "preparedQuery", "preparedBatch").definedInClass("io.vertx.axle.sqlclient.Pool"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "preparedQuery", "preparedBatch").definedInClass("io.vertx.axle.sqlclient.SqlClient"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>SmallRye Mutiny SqlClient (io.vertx.mutiny.sqlclient)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "preparedQuery", "preparedBatch").definedInClass("io.vertx.mutiny.sqlclient.Pool"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "preparedQuery", "preparedBatch").definedInClass("io.vertx.mutiny.sqlclient.SqlClient"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>SmallRye Mutiny SqlConnection (io.vertx.mutiny.sqlclient)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("prepare", "prepareAndAwait").definedInClass("io.vertx.mutiny.db2client.DB2Connection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("prepare", "prepareAndAwait").definedInClass("io.vertx.mutiny.mssqlclient.MSSQLConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("prepare", "prepareAndAwait").definedInClass("io.vertx.mutiny.mysqlclient.MySQLConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("prepare", "prepareAndAwait").definedInClass("io.vertx.mutiny.pgclient.PgConnection"))]]></place>
</injection>
<injection language="SpEL" injector-id="java">
<display-name>Spring @Cacheable and @CacheEvict</display-name>
<single-file value="true" />
<place><![CDATA[psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.CacheEvict")]]></place>
<place><![CDATA[psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")]]></place>
<place><![CDATA[psiMethod().withName("condition").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")]]></place>
<place><![CDATA[psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.CacheEvict")]]></place>
<place><![CDATA[psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")]]></place>
<place><![CDATA[psiMethod().withName("key").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")]]></place>
<place><![CDATA[psiMethod().withName("unless").withParameters().definedInClass("org.springframework.cache.annotation.CachePut")]]></place>
<place><![CDATA[psiMethod().withName("unless").withParameters().definedInClass("org.springframework.cache.annotation.Cacheable")]]></place>
</injection>
<injection language="http-header-reference" injector-id="java">
<display-name>Spring HttpHeaders (org.springframework.http)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("header").definedInClass("org.springframework.http.ResponseEntity.HeadersBuilder"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("header").definedInClass("org.springframework.web.servlet.function.ServerResponse.HeadersBuilder"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("set", "add", "addAll", "getFirst", "containsKey", "get", "put", "getFirstDate", "setDate", "setInstant", "setZonedDateTime").definedInClass("org.springframework.http.HttpHeaders"))]]></place>
</injection>
<injection language="SpEL" injector-id="java">
<display-name>Spring Integration/Messaging</display-name>
<single-file value="true" />
<place><![CDATA[psiMethod().withName("expression").withParameters().definedInClass("org.springframework.messaging.handler.annotation.Payload")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.integration.annotation.Payload")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.messaging.handler.annotation.Payload")]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Spring JDBC (org.springframework.jdbc.core.JdbcOperations)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("batchUpdate").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("execute").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("queryForInt").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("queryForList").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("queryForLong").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("queryForMap").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("queryForObject").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("queryForRowSet").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("queryForStream").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("sql").definedInClass("org.springframework.jdbc.core.simple.JdbcClient"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("update").definedInClass("org.springframework.jdbc.core.JdbcOperations"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Spring JDBC (org.springframework.jdbc.core.PreparedStatementCreatorFactory)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String", "int[]").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("PreparedStatementCreatorFactory").withParameters("java.lang.String", "java.util.List").definedInClass("org.springframework.jdbc.core.PreparedStatementCreatorFactory"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Spring JDBC (org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("createCustomException").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException", "java.lang.Class").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("customTranslate").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("doTranslate").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("logTranslation").withParameters("java.lang.String", "java.lang.String", "java.sql.SQLException", "boolean").definedInClass("org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator"))]]></place>
</injection>
<injection language="SpEL" injector-id="java">
<display-name>Spring Security @PostAuthorize/@PostFilter/@PreAuthorize/@PreFilter/@AuthenticationPrincipal</display-name>
<single-file value="true" />
<place><![CDATA[psiMethod().withName("expression").withParameters().definedInClass("org.springframework.security.core.annotation.AuthenticationPrincipal")]]></place>
<place><![CDATA[psiMethod().withName("expression").withParameters().definedInClass("org.springframework.security.core.annotation.CurrentSecurityContext")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PostAuthorize")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PostFilter")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PreAuthorize")]]></place>
<place><![CDATA[psiMethod().withName("value").withParameters().definedInClass("org.springframework.security.access.prepost.PreFilter")]]></place>
</injection>
<injection language="SpEL" injector-id="java">
<display-name>Spring State Machine</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("event").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.SecurityConfigurer"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("guardExpression").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.TransitionConfigurer"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("secured").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.TransitionConfigurer"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("transition").withParameters("java.lang.String").definedInClass("org.springframework.statemachine.config.configurers.SecurityConfigurer"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Vert.x SQL Extensions (io.vertx.ext.sql)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "queryWithParams", "queryStream", "queryStreamWithParams", "querySingle", "querySingleWithParams", "update", "updateWithParams", "call", "callWithParams").definedInClass("io.vertx.ext.sql.SQLClient"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "queryWithParams", "queryStream", "queryStreamWithParams", "querySingle", "querySingleWithParams", "update", "updateWithParams", "call", "callWithParams").definedInClass("io.vertx.ext.sql.SQLOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "queryWithParams", "queryStream", "queryStreamWithParams", "querySingle", "querySingleWithParams", "update", "updateWithParams", "call", "callWithParams", "execute", "batchWithParams", "batchCallableWithParams").definedInClass("io.vertx.ext.sql.SQLConnection"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Vert.x SQL Reactive Extensions (io.vertx.reactivex.ext.sql)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "queryWithParams", "queryStream", "queryStreamWithParams", "querySingle", "querySingleWithParams", "update", "updateWithParams", "call", "callWithParams").definedInClass("io.vertx.reactivex.ext.sql.SQLOperations"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "queryWithParams", "queryStream", "queryStreamWithParams", "querySingle", "querySingleWithParams", "update", "updateWithParams", "call", "callWithParams", "execute", "batchWithParams", "batchCallableWithParams", "rxQuerySingle", "rxQuerySingleWithParams", "rxQuery", "rxQueryWithParams", "rxQueryStream", "rxQueryStreamWithParams", "rxUpdate", "rxUpdateWithParams", "rxCall", "rxCallWithParams", "rxExecute", "rxBatchWithParams", "rxBatchCallableWithParams").definedInClass("io.vertx.reactivex.ext.sql.SQLClient"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "queryWithParams", "queryStream", "queryStreamWithParams", "querySingle", "querySingleWithParams", "update", "updateWithParams", "call", "callWithParams", "execute", "batchWithParams", "batchCallableWithParams", "rxQuerySingle", "rxQuerySingleWithParams", "rxQuery", "rxQueryWithParams", "rxQueryStream", "rxQueryStreamWithParams", "rxUpdate", "rxUpdateWithParams", "rxCall", "rxCallWithParams", "rxExecute", "rxBatchWithParams", "rxBatchCallableWithParams").definedInClass("io.vertx.reactivex.ext.sql.SQLConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("querySingle", "rxQuerySingle", "querySingleWithParams", "rxQuerySingleWithParams").definedInClass("io.vertx.reactivex.ext.asyncsql.AsyncSQLClient"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("querySingle", "rxQuerySingle", "querySingleWithParams", "rxQuerySingleWithParams").definedInClass("io.vertx.reactivex.ext.asyncsql.MySQLClient"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("querySingle", "rxQuerySingle", "querySingleWithParams", "rxQuerySingleWithParams").definedInClass("io.vertx.reactivex.ext.asyncsql.PostgreSQLClient"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Vert.x SqlClient (io.vertx.sqlclient)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch").definedInClass("io.vertx.mssqlclient.MSSQLConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch").definedInClass("io.vertx.mysqlclient.MySQLConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch").definedInClass("io.vertx.pgclient.PgConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch").definedInClass("io.vertx.sqlclient.Pool"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch").definedInClass("io.vertx.sqlclient.SqlClient"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch").definedInClass("io.vertx.sqlclient.SqlConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch").definedInClass("io.vertx.sqlclient.Transaction"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>Vert.x SqlClient RxJava2 (io.vertx.reactivex.sqlclient)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPrepare", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.vertx.reactivex.mysqlclient.MySQLConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPrepare", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.vertx.reactivex.pgclient.PgConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPrepare", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.vertx.reactivex.sqlclient.SqlConnection"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPrepare", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.vertx.reactivex.sqlclient.Transaction"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.vertx.reactivex.mysqlclient.MySQLPool"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.vertx.reactivex.pgclient.PgPool"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.vertx.reactivex.sqlclient.Pool"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "prepare", "preparedQuery", "preparedBatch", "rxQuery", "rxPreparedQuery", "rxPreparedBatch").definedInClass("io.vertx.reactivex.sqlclient.SqlClient"))]]></place>
</injection>
<injection language="JSON" injector-id="java">
<display-name>WireMock (com.github.tomakehurst.wiremock.client)</display-name>
<single-file value="false" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("equalToJson").withParameters("java.lang.String").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("equalToJson").withParameters("java.lang.String", "boolean", "boolean").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("jsonResponse").withParameters("java.lang.String", "int").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("okJson").withParameters("java.lang.String").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
</injection>
<injection language="XML" injector-id="java">
<display-name>WireMock (com.github.tomakehurst.wiremock.client)</display-name>
<single-file value="false" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("equalToXml").withParameters("java.lang.String").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("okTextXml").withParameters("java.lang.String").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("okXml").withParameters("java.lang.String").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
</injection>
<injection language="RegExp" injector-id="java">
<display-name>WireMock (com.github.tomakehurst.wiremock.client)</display-name>
<single-file value="false" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("matching").withParameters("java.lang.String").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("notMatching").withParameters("java.lang.String").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("urlMatching").withParameters("java.lang.String").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("urlPathMatching").withParameters("java.lang.String").definedInClass("com.github.tomakehurst.wiremock.client.WireMock"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>jOOQ (org.jooq.DSLContext)</display-name>
<single-file value="true" />
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("batch").withParameters("java.lang.String", "java.lang.Object[]...").definedInClass("org.jooq.DSLContext"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "fetch", "fetchLazy", "fetchAsync", "fetchStream", "fetchMany", "fetchOne", "fetchSingle", "fetchOptional", "fetchValue", "fetchOptionalValue", "fetchValues", "execute", "resultQuery").withParameters("java.lang.String", "java.lang.Object...").definedInClass("org.jooq.DSLContext"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("query", "fetch", "fetchLazy", "fetchAsync", "fetchStream", "fetchMany", "fetchOne", "fetchSingle", "fetchOptional", "fetchValue", "fetchOptionalValue", "fetchValues", "execute", "resultQuery", "batch").withParameters("java.lang.String").definedInClass("org.jooq.DSLContext"))]]></place>
<place><![CDATA[psiParameter().ofMethod(psiMethod().withName("batch").withParameters("java.lang.String...").definedInClass("org.jooq.DSLContext"))]]></place>
</injection>
<injection language="SQL" injector-id="java">
<display-name>rxjava2-jdbc (org.davidmoten.rx.jdbc)</display-name>
<single-file value="true" />
<place><![CDATA[psiMethod().withName("value").definedInClass("org.davidmoten.rx.jdbc.annotations.Query")]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("call", "select", "update").definedInClass("org.davidmoten.rx.jdbc.Database"))]]></place>
<place><![CDATA[psiParameter().ofMethod(0, psiMethod().withName("call", "select", "update").definedInClass("org.davidmoten.rx.jdbc.TransactedBuilder"))]]></place>
</injection>
<injection language="SpEL" injector-id="xml">
<display-name>SpEL for Spring Cache</display-name>
<single-file value="true" />
<place><![CDATA[xmlAttribute().withLocalName("condition").withParent(xmlTag().withNamespace(string().equalTo("http://www.springframework.org/schema/cache")))]]></place>
<place><![CDATA[xmlAttribute().withLocalName("key").withParent(xmlTag().withNamespace(string().equalTo("http://www.springframework.org/schema/cache")))]]></place>
<place><![CDATA[xmlAttribute().withLocalName("unless").withParent(xmlTag().withNamespace(string().equalTo("http://www.springframework.org/schema/cache")))]]></place>
</injection>
</component>
</project>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.13" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13" project-jdk-type="Python SDK" />
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Ugeseddel-6 08-10-2025.iml" filepath="$PROJECT_DIR$/Ugeseddel-6 08-10-2025.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,19 @@
import math
RADIUS = 3956.6
def distance(lat1, long1, lat2, long2):
lat1 = math.radians(lat1)
long1 = math.radians(long1)
lat2 = math.radians(lat2)
long2 = math.radians(long2)
the_cos = math.sin(lat1) * math.sin(lat2) + math.cos(lat1) * math.cos(lat2) * math.cos(long1 - long2)
arc_length = math.acos(the_cos)
return arc_length * RADIUS
def find(target, file):
def main():
zip = input("What Zip code are you interested in? ")
target = float(input("And what proximity (in miles)? "))
with open("zipcodes.txt") as file:

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Python" name="Python">
<configuration sdkName="Python 3.13" />
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="Python 3.13" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Python 3.13 interpreter library" level="application" />
</component>
</module>

View File

@@ -0,0 +1,15 @@
//TIP To <b>Run</b> code, press <shortcut actionId="Run"/> or
// click the <icon src="AllIcons.Actions.Execute"/> icon in the gutter.
public class Main {
public static void main(String[] args) {
//TIP Press <shortcut actionId="ShowIntentionActions"/> with your caret at the highlighted text
// to see how IntelliJ IDEA suggests fixing it.
System.out.printf("Hello and welcome!");
for (int i = 1; i <= 5; i++) {
//TIP Press <shortcut actionId="Debug"/> to start debugging your code. We have set one <icon src="AllIcons.Debugger.Db_set_breakpoint"/> breakpoint
// for you, but you can always add more by pressing <shortcut actionId="ToggleLineBreakpoint"/>.
System.out.println("i = " + i);
}
}
}

View File

@@ -0,0 +1,46 @@
class OpgaverEftermiddag {
public static void main(String args[]) {
Bil honda_95 = new Bil(1995, "Honda");
System.out.println(honda_95);
Bil bmw_19 = new Bil(1995, "BMW");
System.out.println(bmw_19.getAargang() + " " + bmw_19.getMaerke());
bmw_19.changeAargang(2024);
honda_95.changeMaerke("Mercedes");
Bil vw = new Bil("VW");
}
}
class Bil {
private int aargang;
private String maerke;
public Bil(int aargang, String maerke) {
this.aargang = Math.max(aargang, 1860);
this.maerke = maerke;
}
public Bil(String maerke) {
this(2025, maerke);
}
public void changeAargang(int aargang) {
this.aargang = Math.max(aargang, 1860);
}
public void changeMaerke(String maerke) {
this.maerke = maerke;
}
public int getAargang() {
return this.aargang;
}
public String getMaerke() {
return this.maerke;
}
public String toString() {
return this.maerke + " fra " + this.aargang;
}
}

View File

@@ -0,0 +1,121 @@
import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;
public class OpgaverFormiddag {
public static void main(String[] args) {
Random random = new Random();
int[] opgave1 = {47,89,85,28,95,47,98,89,38,38,48,28,49,5900,2,47,47,47,89,89,89,89,20,1,4,55,66,3,2,123,4214,12312,512,12,41,24,124,12,123,12,31,54,534,534,34,65,765,7,5,47,1202,4,5868,123123,41,43};
int indexValue = 47;
System.out.println("\nOPGAVE 1: \n"+Opgave1.lastIndexOf(opgave1,indexValue)+" " + opgave1[Opgave1.lastIndexOf(opgave1,indexValue)]);
System.out.println("\nOPGAVE 2: \n" + Opgave2.countInRange(opgave1,500,2000));
int opgave3ArrayLength = 500;
int[] opgave3Array = new int[opgave3ArrayLength];
for (int i = 0; i < opgave3ArrayLength; i++) {
opgave3Array[i] = random.nextInt(101);
}
System.out.println("\nOPGAVE 3A: \n" + Opgave3.mode(opgave3Array));
int opgave3BArrayLength = random.nextInt(1000);
int[] opgave3BArray = new int[opgave3BArrayLength];
for (int i = 0; i < opgave3BArrayLength; i++) {
opgave3BArray[i] = random.nextInt(opgave3BArrayLength);
}
System.out.println("\nOPGAVE 3B: \n" + Opgave3.modeHighValue(opgave3BArray));
System.out.println("\nOPGAVE 4: \n");
Opgave4.addLargeInteger();
}
}
class Opgave1 {
public static int lastIndexOf(int[] array, int value) {
int index = -1;
for (int i = 0; i < array.length; i++) {
if (array[i] == value) {
index = i;
}
}
return index;
}
}
class Opgave2 {
public static int countInRange(int[] array, int low, int high) {
int count = 0;
for (int i = 0; i < array.length; i++) {
if (array[i] >= low && array[i] <= high) {
count++;
}
}
return count;
}
}
class Opgave3 {
public static int mode(int[] array) {
int[] counts = new int[101];
for (int i = 0; i < array.length; i++) {
counts[array[i]]++;
}
int highestCount = 0;
for (int i = 0; i < counts.length; i++) {
if (counts[i] > highestCount) {
highestCount = counts[i];
}
}
return highestCount;
}
public static int modeHighValue(int[] array2) {
if (array2.length == 0) {
return 0;
}
Arrays.sort(array2);
int[] counts2 = new int[array2[array2.length-1]+1];
for (int i = 0; i < array2.length; i++) {
counts2[array2[i]]++;
}
int highestCount = 0;
for (int i = 0; i < counts2.length; i++) {
if (counts2[i] > highestCount) {
highestCount = counts2[i];
}
}
return highestCount;
}
}
class Opgave4 {
public static void addLargeInteger() {
final int DIGITS = 50;
int[] sum = new int[DIGITS];
Scanner input = new Scanner(System.in);
System.out.print("First non-negative integer: ");
String int1 = input.nextLine();
System.out.print("Second non-negative integer: ");
String int2 = input.nextLine();
boolean skipZero = false;
String sumString = "";
for (int i = 0; i < DIGITS; i++) {
int int1Value = (i < 50-int1.length() ? 0 : int1.charAt(int1.length()+i-50) - '0');
int int2Value = (i < 50-int2.length() ? 0 : int2.charAt(int2.length()+i-50) - '0');
int tempSum = int1Value + int2Value;
if (tempSum >= 10) {
if (i == 0) {
throw new RuntimeException("Sum bliver over 50 cifre");
}
sum[i-1]++;
tempSum -= 10;
}
sum[i] = tempSum;
}
for (int i = 0; i < sum.length; i++) {
if (skipZero || sum[i] != 0) {
sumString += sum[i];
skipZero = true;
}
}
System.out.println("Sum: " + sumString);
}
}

View File

@@ -0,0 +1,39 @@
import math
RADIUS = 3956.6
def give_intro():
pass
def find(file, target_zip):
for line in file:
zip, lat, lng, city = line.rstrip().split(" : ")
if zip == target_zip:
print(zip + ":", city)
return float(lat), float(lng)
return 0, 0
def show_matches(file, lat1, lng1, miles):
pass
def distance(lat1, lng1, lat2, lng2):
lat1 = math.radians(lat1)
lng1 = math.radians(lng1)
lat2 = math.radians(lat2)
lng2 = math.radians(lng2)
the_cos = math.sin(lat1) * math.sin(lat2) \
+ math.cos(lat1) * math.cos(lat2) * math.cos(lng1 - lng2)
arc_length = math.acos(the_cos)
return arc_length * RADIUS
def main():
give_intro()
zip = input("What zip code are you interested in? ")
miles = float(input("And what proximity (in miles)? "))
print()
with open("zipcode.txt") as file:
lat, lng = find(file, zip)
file.seek(0)
show_matches(file, lat, lng, miles)
main()

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,30 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/
.kotlin
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

8
Ugesedler/Ugeseddel-8 29-10-2025/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.13" />
</component>
<component name="KubernetesApiProvider"><![CDATA[{}]]></component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/Ugeseddel-8 29-10-2025.iml" filepath="$PROJECT_DIR$/Ugeseddel-8 29-10-2025.iml" />
</modules>
</component>
</project>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="Python" name="Python">
<configuration sdkName="Python 3.13" />
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Python 3.13 interpreter library" level="application" />
</component>
</module>

View File

@@ -0,0 +1,4 @@
public class Main {
public static void main(String[] args) {
}
}

View File

@@ -0,0 +1,41 @@
class Person:
def __init__(self, name, cpr_number): # konstruktør
self.__name = name
self.__cpr_number = cpr_number
def get_name(self):
return(self.__name)
def get_cpr_number(self):
return(self.__cpr_number)
def show(self):
print("Name:", self.get_name(), "\nCPR number:", self.get_cpr_number())
def set_name(self, name):
self.__name = name
class Teacher(Person):
no_instances = 0
def __init__(self, name, cpr_number, staff_id, list_of_courses):
super().__init__(name, cpr_number)
self.__staff_id = staff_id
self.__list_of_courses = list_of_courses
Teacher.no_instances += 1
def show(self):
super().show()
print("Teacher id: ", self.__staff_id)
print("Courses: ")
for i in self.__list_of_courses:
print(i)
def get_staff_id(self):
return(self.__staff_id)
def __str__(self):
return "Name: " + str(self.get_name()) + " Teacher id: " + str(self.get_staff_id()) + " Courses: " + str(self.__list_of_courses)
def __del__(self):
Teacher.no_instances -= 1
idk = Teacher("Din mor", 12345678, 1234, (1202, 5860, 2719, 8746))
print(idk)

View File

@@ -0,0 +1,30 @@
### IntelliJ IDEA ###
out/
!**/src/main/**/out/
!**/src/test/**/out/
.kotlin
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
bin/
!**/src/main/**/bin/
!**/src/test/**/bin/
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

8
Ugesedler/Ugeseddel-9-05-11-2025/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.13" />
</component>
<component name="KubernetesApiProvider"><![CDATA[{}]]></component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="zulu-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

Some files were not shown because too many files have changed in this diff Show More