Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6fee621
Create DigitalClock.jsx
AFJGitHubDev24 May 21, 2025
0181186
Create App.jsx
AFJGitHubDev24 May 21, 2025
9291b4f
Create index.css
AFJGitHubDev24 May 21, 2025
c677d1b
Create main.jsx
AFJGitHubDev24 May 21, 2025
ce752ee
Create index.html
AFJGitHubDev24 May 21, 2025
5569b8f
Create txt
AFJGitHubDev24 May 21, 2025
3b43f45
Delete Now O'Clock/assets/txt
AFJGitHubDev24 May 21, 2025
369e9dd
Add files via upload
AFJGitHubDev24 May 21, 2025
20ecb8c
Add files via upload
AFJGitHubDev24 May 21, 2025
da9dda5
Add files via upload
AFJGitHubDev24 May 21, 2025
a19aa1f
Create Stopwatch.jsx
AFJGitHubDev24 May 21, 2025
572b1d5
Create index.css
AFJGitHubDev24 May 21, 2025
c1bb3ba
Create App.jsx
AFJGitHubDev24 May 21, 2025
2c0e22c
Create index.html
AFJGitHubDev24 May 21, 2025
96915f6
Create main.jsx
AFJGitHubDev24 May 21, 2025
614960d
Update Stopwatch.jsx
AFJGitHubDev24 May 21, 2025
8aaf5e8
Add files via upload
AFJGitHubDev24 May 21, 2025
47b83be
Create AudioPlayer.java
AFJGitHubDev24 May 31, 2025
f584e23
Add files via upload
AFJGitHubDev24 May 31, 2025
9585ccf
Update AudioPlayer.java
AFJGitHubDev24 May 31, 2025
3a6ba8a
Update AudioPlayer.java
AFJGitHubDev24 May 31, 2025
6dd42e8
Update AudioPlayer.java
AFJGitHubDev24 May 31, 2025
7fe3abd
Create digitalclock.js
AFJGitHubDev24 Jun 4, 2025
7494f92
Create index.html
AFJGitHubDev24 Jun 4, 2025
2b30f33
Create style.css
AFJGitHubDev24 Jun 4, 2025
6b1e85f
Create stopwatch.js
AFJGitHubDev24 Jun 7, 2025
8402990
Create index.html
AFJGitHubDev24 Jun 7, 2025
f229a17
Create style.css
AFJGitHubDev24 Jun 7, 2025
e10a347
Rename Stopwatches/Stopwatch.jsx to Stopwatches/stopwatchReact/Stopwa…
AFJGitHubDev24 Jun 7, 2025
084f158
Rename Stopwatches/Stopwatch.mp4 to Stopwatches/stopwatchReact/Stopwa…
AFJGitHubDev24 Jun 7, 2025
aecf72e
Rename Stopwatches/App.jsx to Stopwatches/stopwatchReact/App.jsx
AFJGitHubDev24 Jun 7, 2025
62d5ca1
Rename Stopwatches/index.css to Stopwatches/stopwatchReact/index.css
AFJGitHubDev24 Jun 7, 2025
bae27e7
Rename Stopwatches/index.html to Stopwatches/stopwatchReact/index.html
AFJGitHubDev24 Jun 7, 2025
2ed14f0
Rename Stopwatches/main.jsx to Stopwatches/stopwatchReact/main.jsx
AFJGitHubDev24 Jun 7, 2025
986f3b3
Update Stopwatch.py
AFJGitHubDev24 Jun 7, 2025
8817cfe
Delete timer/Stopwatch.py
AFJGitHubDev24 Jun 7, 2025
3b97c32
Create stopwatch.py
AFJGitHubDev24 Jun 7, 2025
d6bca5e
Create weatherapp.js
AFJGitHubDev24 Jun 10, 2025
a650e38
Create index.html
AFJGitHubDev24 Jun 10, 2025
55f0cf5
Create style.css
AFJGitHubDev24 Jun 10, 2025
3e91fc6
Add files via upload
AFJGitHubDev24 Jun 10, 2025
60f4ced
Add files via upload
AFJGitHubDev24 Jun 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions ClockJS/digitalclock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// DIGITAL CLOCK PROGRAM

function updateClock() {

const now = new Date();
let hours = now.getHours();
const meridiem = hours >= 12 ? "PM" : "AM";
hours = hours % 12 || 12;
hours = hours.toString().padStart(2, 0);
const minutes = now.getMinutes().toString().padStart(2, 0);
const seconds = now.getSeconds().toString().padStart(2, 0);
const timeString = `${hours}:${minutes}:${seconds} ${meridiem}`;
document.getElementById("clock").textContent = timeString;

}

updateClock();
setInterval(updateClock, 1000);
18 changes: 18 additions & 0 deletions ClockJS/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/images/code.png">
<title>AFJ Coder</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<div id="clock-container">
<div id="clock">00:00:00</div>
</div>

<script src="digitalclock.js"></script>
</body>
</html>
27 changes: 27 additions & 0 deletions ClockJS/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
body {
background-image: url(images/neon.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
margin: 0;
}

#clock-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

#clock {
font-family: monospace;
font-size: 6.5rem;
font-weight: bold;
text-align: center;
color: aliceblue;
backdrop-filter: blur(50px);
background-color: hsla(0, 0%, 50%, 0.1);
width: 100%;
text-shadow: 3px 3px 5px hsl(0, 0%, 0%);
}
13 changes: 13 additions & 0 deletions Now O'Clock/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import DigitalClock from "./DigitalClock";

function App() {

return (
<>
<DigitalClock />
</>
);

}

export default App
48 changes: 48 additions & 0 deletions Now O'Clock/DigitalClock.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import React, { useState, useEffect } from "react";

function DigitalClock() {

const [time, setTime] = useState(new Date());

useEffect(() => {
document.title = `🕒Now O'Clock`;
});


useEffect(() => {
const intervalId = setInterval(() => {
setTime(new Date());
}, 1000);

return () => {
clearInterval(intervalId);
}
}, []);

function formatTime() {
let hours = time.getHours();
const minutes = time.getMinutes();
const seconds = time.getSeconds();
const meridiem = hours >= 12 ? "PM" : "AM";

hours = hours % 12 || 12;

return `${padZero(hours)}:${padZero(minutes)}:${padZero(seconds)} ${meridiem}`
}

function padZero(number) {
return (number < 10 ? "0" : "") + number;
}

return (
<div className="clock-container">
<h1 className="title">🕒NOW O'CLOCK🕒</h1>
<div className="clock">
<span>{formatTime()}</span>
</div>
</div>
);

}

export default DigitalClock;
Binary file added Now O'Clock/NowO'Clock.mp4
Binary file not shown.
Binary file added Now O'Clock/NowO'Clock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions Now O'Clock/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
body {
background-image: url(assets/neonback.jpg);
background-position: center;
background-repeat: no-repeat;
background-size: cover;
background-attachment: fixed;
margin: 0;

/*OPTIONAL*/
display: flex;
justify-content: center;
min-height: 100vh;
align-items: center;
}

.title {
color: aquamarine;
text-align: center;
}

.clock-container {
backdrop-filter: blur(5px);
padding: 10px 0;
}

.clock {
color: silver;
font-size: 6rem;
font-weight: bold;
font-family: monospace;
text-align: center;
text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.75);
}
13 changes: 13 additions & 0 deletions Now O'Clock/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
10 changes: 10 additions & 0 deletions Now O'Clock/main.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.jsx'

createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</StrictMode>,
)
Binary file added Now O'Clock/neonback.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
14 changes: 14 additions & 0 deletions Stopwatches/stopwatchReact/App.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import StopWatch from "./StopWatch";

function App() {

return (
<>
<StopWatch />
<StopWatch />
</>
);

}

export default App
71 changes: 71 additions & 0 deletions Stopwatches/stopwatchReact/Stopwatch.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
import React, { useState, useEffect, useRef } from "react";

function StopWatch() {

const [isRunning, setIsRunning] = useState(false);
const [elapsedTime, setElapsedTime] = useState(0);
const intervalIdRef = useRef(null);
const startTimeRef = useRef(0);

useEffect(() => {
document.title = `⏱️Stopwatch Counter`;
});

useEffect(() => {

if (isRunning) {
intervalIdRef.current = setInterval(() => {
setElapsedTime(Date.now() - startTimeRef.current);
}, 10);
}

return () => {
clearInterval(intervalIdRef.current);
}

}, [isRunning]);

function start() {
setIsRunning(true);
startTimeRef.current = Date.now() - elapsedTime;
}

function stop() {
setIsRunning(false);
}

function reset() {
setElapsedTime(0);
setIsRunning(false);
}

function formatTime() {
let hours = Math.floor(elapsedTime / (1000 * 60 * 60));
let minutes = Math.floor(elapsedTime / (1000 * 60) % 60);
let seconds = Math.floor(elapsedTime / (1000) % 60);
let milliseconds = Math.floor((elapsedTime % 1000) / 10);

hours = String(hours).padStart(2, "0");
minutes = String(minutes).padStart(2, "0");
seconds = String(seconds).padStart(2, "0");
milliseconds = String(milliseconds).padStart(2, "0");


return `${hours}:${minutes}:${seconds}.${milliseconds}`;
}

return (
<div className="stopwatch">
<h2 className="title">⏱️STOPWATCH⏱️</h2>
<div className="display">{formatTime()}</div>
<div className="controls">
<button onClick={start} className="start-button">Start</button>
<button onClick={reset} className="reset-button">Reset</button>
<button onClick={stop} className="stop-button">Stop</button>
</div>
</div>
);

}

export default StopWatch;
1 change: 1 addition & 0 deletions Stopwatches/stopwatchReact/Stopwatch.mp4
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

68 changes: 68 additions & 0 deletions Stopwatches/stopwatchReact/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
body {
display: flex;
flex-direction: column;
align-items: center;
background-color: beige;
}

.title {
font-size: 2rem;
color: hsl(180, 72%, 33%);
font-weight: bold;
}

.stopwatch {
display: flex;
flex-direction: column;
align-items: center;
border: 5px solid;
border-radius: 50px;
background-color: floralwhite;
padding: 30px;
}

.display {
font-size: 5rem;
font-family: monospace;
font-weight: bold;
color: hsl(0, 0%, 30%);
text-shadow: 2px 2px 2px hsla(0, 0%, 0%, 0.75);
margin-bottom: 25px;
}

.controls button {
font-size: 1.5rem;
font-weight: bold;
padding: 10px 20px;
margin: 5px;
min-width: 125px;
border: none;
border-radius: 10px;
cursor: pointer;
color: white;
transition: background-color 0.5s ease;
}

.start-button {
background-color: hsl(120, 54%, 49%);
}

.start-button:hover {
background-color: hsl(120, 54%, 44%);
}

.stop-button {
background-color: hsl(0, 75%, 50%);
}

.stop-button:hover {
background-color: hsl(0, 75%, 45%);
}

.reset-button {
background-color: hsl(196, 86%, 53%);
}

.reset-button:hover {
background-color: hsl(196, 86%, 48%);
}
13 changes: 13 additions & 0 deletions Stopwatches/stopwatchReact/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
10 changes: 10 additions & 0 deletions Stopwatches/stopwatchReact/main.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.jsx'

createRoot(document.getElementById('root')).render(
<StrictMode>
<App />
</StrictMode>,
)
27 changes: 27 additions & 0 deletions Stopwatches/stopwatchjs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" type="image/png" href="/images/code.png">
<title>AFJ Coder</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1 id="myH1">⏱️Stopwatch⏱️</h1>

<div id="container">
<div id="display">
00:00:00:00
</div>

<div id="controls">
<button id="stopBtn" onclick="stop()">Stop</button>
<button id="resetBtn" onclick="reset()">Reset</button>
<button id="startBtn" onclick="start()">Start</button>
</div>
</div>

<script src="stopwatch.js"></script>
</body>
</html>
Loading