Reset author name to chosen name

This commit is contained in:
2025-10-19 22:00:41 -05:00
parent 12cf757236
commit 168b35c94a
287 changed files with 0 additions and 17381 deletions

View File

@@ -1,86 +0,0 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package edu.slcc.asdv.chloe.multithreading_chloefontenot;
/**
*
* @author chloe
*/
import javafx.application.Application;
import javafx.application.Platform;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class FlashText extends Application
{
private String text = "";
@Override // Override the start method in the Application class
public void start(Stage primaryStage)
{
StackPane pane = new StackPane();
Label lblText = new Label("Programming is fun");
pane.getChildren().add(lblText);
Thread t1 = new Thread(
new Runnable()
{
public void run()
{
try
{
while (true)
{
if (lblText.getText().trim().length() == 0)
text = "Welcome";
else
text = "";
Platform.runLater(
new Runnable()
{
@Override
public void run()
{
lblText.setText(text);
}
});
/*
Thread t2 =new Thread( new Runnable() {
@Override
public void run()
{
lblText.setText(text);
}
});
*/
Thread.sleep(300);
}
}
catch (InterruptedException ex)
{
}
}
});
t1.start();
// Create a scene and place it in the stage
Scene scene = new Scene(pane, 200, 50);
primaryStage.setTitle("FlashText"); // Set the stage title
primaryStage.setScene(scene); // Place the scene in the stage
primaryStage.show(); // Display the stage
}
public static void main(String[] args)
{
launch(args);
}
}

View File

@@ -1,59 +0,0 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package edu.slcc.asdv.chloe.multithreading_chloefontenot;
/**
*
* @author chloe
*/
public class PrintChar implements Runnable{
private char charToPrint;
private int times;
public PrintChar(char charToPrint, int times)
{
this.charToPrint = charToPrint;
this.times = times;
}
@Override
public void run()
{
for (int i = 0; i < times; ++i) {
System.out.println(charToPrint);
}
}
public static void main(String[] args)
{
for (int i = 0; i < 1000; ++i) {
System.out.println("lmao");
}
}
}
class PrintNum implements Runnable {
private int lastNum;
public PrintNum(int lastNum)
{
this.lastNum = lastNum;
}
public void run()
{
for (int i = 1; i <= lastNum; ++i) {
System.out.print(" " + i);
Thread.yield();
if (i % 10 == 0) {
System.out.println();
}
}
}
}

View File

@@ -1,15 +0,0 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package edu.slcc.asdv.chloe.multithreading_chloefontenot;
/**
*
* @author chloe
*/
public class RunFlash {
public static void main(String[] args) {
FlashText.main(args);
}
}

View File

@@ -1,29 +0,0 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
*/
package edu.slcc.asdv.chloe.multithreading_chloefontenot;
/**
*
* @author chloe
*/
public class Threads {
public static void main(String[] args)
{
// Create tasks
Runnable printA = new PrintChar('a', 100);
Runnable printB = new PrintChar('b', 100);
Runnable print100 = new PrintNum(100);
// Create threads
Thread thread1 = new Thread(printA);
Thread thread2 = new Thread(printB);
Thread thread3 = new Thread(print100);
// Start threads
thread1.start();
thread2.start();
thread3.start();
}
}

View File

@@ -1,20 +0,0 @@
/*
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
*/
package edu.slcc.asdv.chloe.multithreading_chloefontenot;
import java.io.IOException;
/**
*
* @author chloe
*/
public class forkbomb
{
public static void main(String[] args) throws IOException
{
Runtime.getRuntime().exec(new String[]{"java", "-cp", System.getProperty("java.class.path"), "forkbomb"});
}
}