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
public class Data { | |
private String packet; | |
// True: receiver waits | |
// False: sender waits | |
private boolean transfer = true; | |
public synchronized String receive() { | |
while (transfer) { | |
try { |
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
import java.io.BufferedReader | |
import java.io.InputStreamReader | |
import java.net.HttpURLConnection | |
import java.net.URI | |
import java.net.URL | |
fun main() { | |
val apiUrl = "https://catfact.ninja/fact" //API endpoint | |
try { |
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
import com.google.gson.Gson; | |
public class Main { | |
public static void main(String[] args) { | |
String json = """ | |
{'name': 'Dani', | |
'age': 45, | |
'phone': 222333, | |
'city':'NewYork'} |
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
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
@SpringBootApplication | |
public class SpringApiApplication { | |
public static void main(String[] args) { | |
SpringApplication.run(SpringApiApplication.class, args); | |
} |
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
import javafx.application.Application; | |
import javafx.fxml.FXMLLoader; | |
import javafx.scene.Scene; | |
import javafx.stage.Stage; | |
import java.io.IOException; | |
public class LineApplication extends Application { | |
@Override | |
public void start(Stage stage) throws IOException { |
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
import javafx.animation.FillTransition; | |
import javafx.fxml.FXML; | |
import javafx.fxml.FXMLLoader; | |
import javafx.scene.layout.VBox; | |
import javafx.scene.paint.Color; | |
import javafx.scene.shape.Rectangle; | |
import javafx.util.Duration; | |
import java.io.IOException; |
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
# NOTE name need to be Dockerfile | |
FROM mysql:latest | |
COPY ./databse_students.sql /docker-entrypoint-initdb.d/ |
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
import javafx.event.ActionEvent; | |
import javafx.fxml.FXML; | |
import javafx.scene.control.TextArea; | |
import javafx.scene.input.KeyEvent; | |
public class Controller { | |
@FXML | |
private TextArea textInput; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<?import javafx.geometry.Insets?> | |
<?import javafx.scene.control.Button?> | |
<?import javafx.scene.layout.AnchorPane?> | |
<?import javafx.scene.layout.FlowPane?> | |
<?import javafx.scene.layout.HBox?> | |
<?import javafx.scene.text.Font?> | |
<?import javafx.scene.text.Text?> |
NewerOlder