From 129ed73b6d827465e1766a89e42bdcc454365afe Mon Sep 17 00:00:00 2001 From: Andrei Jiroh Halili Date: Mon, 1 Dec 2025 10:48:54 +0800 Subject: [PATCH] chore: merge uncommited changes from codespace (https://github.com/andreijirohdev-labs/studentops-codelab/pull/1) * Pending changes exported from your codespace * chore: enable SSH access to devcontainer * chore: refactor main method in finaPT class Gonna check for issues on a Remote Tunnel server later Signed-off-by: Andrei Jiroh Halili * chore: convert tabs to spaces in devcontainer.json Involves pulling GitHub Copilot Agent for this one, per https://github.com/andreijirohdev-labs/studentops-codelab/pull/1#discussion_r2572968007 Context: https://github.com/andreijirohdev-labs/studentops-codelab/pull/2 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> * chore: update deps in devenv.lock as usual Signed-off-by: Andrei Jiroh Halili * chore: more chaos in finalPT code Signed-off-by: Andrei Jiroh Halili --------- Signed-off-by: Andrei Jiroh Halili Signed-off-by: Andrei Jiroh Halili Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> --- .devcontainer/devcontainer.json | 159 +++++++++--------- devenv.lock | 20 +-- .../studentops/projects/finaPT.java | 32 ++++ 3 files changed, 123 insertions(+), 88 deletions(-) create mode 100644 java/src/dev/andreijiroh/studentops/projects/finaPT.java diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4a64d4a..1a2667e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,87 +1,90 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the // README at: https://github.com/devcontainers/templates/tree/main/src/docker-in-docker { - "name": "Docker in Docker setup for StudentOps", - // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "mcr.microsoft.com/devcontainers/base:bullseye", + "name": "Docker in Docker setup for StudentOps", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/devcontainers/base:bullseye", - "features": { - "ghcr.io/devcontainers/features/docker-in-docker:2": { - "moby": true, - "azureDnsAutoDetection": true, - "installDockerBuildx": true, - "installDockerComposeSwitch": true, - "version": "latest", - "dockerDashComposeVersion": "v2" - }, - "ghcr.io/devcontainers/features/java:1": { - "installGradle": true, - "installMaven": true, - "installAnt": true, - "installGroovy": true, - "version": "latest", - "jdkDistro": "open", - "gradleVersion": "latest", - "mavenVersion": "latest", - "antVersion": "latest", - "groovyVersion": "latest" - }, - "ghcr.io/devcontainers/features/nix:1": { - "multiUser": true, - "useAttributePath": true, - "version": "latest" - }, - "ghcr.io/devcontainers/features/node:1": { - "nodeGypDependencies": true, - "installYarnUsingApt": true, - "version": "lts", - "pnpmVersion": "latest", - "nvmVersion": "latest" - }, - "ghcr.io/devcontainers/features/python:1.8.0": { - "version": "3.13", - "installTools": true, - "installJupyterlab": true - }, - "ghcr.io/devcontainers/features/github-cli:1": { - "installDirectlyFromGitHubRelease": true, - "version": "latest" - }, - "ghcr.io/devcontainers/features/python:1": { - "installTools": true, - "installJupyterlab": true, - "version": "latest" - }, - "ghcr.io/skriptfabrik/devcontainer-features/gitlab-cli:1": { - "version": "latest" - }, - "ghcr.io/devcontainers-extra/features/deno:1": { - "version": "latest" - }, - "ghcr.io/devcontainers-extra/features/tailscale:1": {}, - "ghcr.io/joshuanianji/devcontainer-features/github-cli-persistence:1": {} - }, - "customizations": { - "vscode": { - "extensions": [ - "vscjava.vscode-java-pack", - "redhat.java", - "vscjava.vscode-gradle", - "vscjava.vscode-maven", - "denoland.vscode-deno" - ] - } - } + "features": { + "ghcr.io/devcontainers/features/docker-in-docker:2": { + "moby": true, + "azureDnsAutoDetection": true, + "installDockerBuildx": true, + "installDockerComposeSwitch": true, + "version": "latest", + "dockerDashComposeVersion": "v2" + }, + "ghcr.io/devcontainers/features/java:1": { + "installGradle": true, + "installMaven": true, + "installAnt": true, + "installGroovy": true, + "version": "latest", + "jdkDistro": "open", + "gradleVersion": "latest", + "mavenVersion": "latest", + "antVersion": "latest", + "groovyVersion": "latest" + }, + "ghcr.io/devcontainers/features/nix:1": { + "multiUser": true, + "useAttributePath": true, + "version": "latest" + }, + "ghcr.io/devcontainers/features/node:1": { + "nodeGypDependencies": true, + "installYarnUsingApt": true, + "version": "lts", + "pnpmVersion": "latest", + "nvmVersion": "latest" + }, + "ghcr.io/devcontainers/features/python:1.8.0": { + "version": "3.13", + "installTools": true, + "installJupyterlab": true + }, + "ghcr.io/devcontainers/features/github-cli:1": { + "installDirectlyFromGitHubRelease": true, + "version": "latest" + }, + "ghcr.io/devcontainers/features/python:1": { + "installTools": true, + "installJupyterlab": true, + "version": "latest" + }, + "ghcr.io/skriptfabrik/devcontainer-features/gitlab-cli:1": { + "version": "latest" + }, + "ghcr.io/devcontainers-extra/features/deno:1": { + "version": "latest" + }, + "ghcr.io/devcontainers-extra/features/tailscale:1": {}, + "ghcr.io/joshuanianji/devcontainer-features/github-cli-persistence:1": {}, + "ghcr.io/devcontainers/features/sshd:1": { + "version": "latest" + } + }, + "customizations": { + "vscode": { + "extensions": [ + "vscjava.vscode-java-pack", + "redhat.java", + "vscjava.vscode-gradle", + "vscjava.vscode-maven", + "denoland.vscode-deno" + ] + } + } - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - // "postCreateCommand": "docker --version", + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "docker --version", - // Configure tool-specific properties. - // "customizations": {}, + // Configure tool-specific properties. + // "customizations": {}, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - // "remoteUser": "root" + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" } diff --git a/devenv.lock b/devenv.lock index 621e4bf..e75de9e 100644 --- a/devenv.lock +++ b/devenv.lock @@ -3,10 +3,10 @@ "devenv": { "locked": { "dir": "src/modules", - "lastModified": 1759527603, + "lastModified": 1764449550, "owner": "cachix", "repo": "devenv", - "rev": "ce82fad570fd74ac5dfe3ce587ee8b37e918d71f", + "rev": "dfb58ac03bed07b93f629df55034bc50394d3971", "type": "github" }, "original": { @@ -19,10 +19,10 @@ "flake-compat": { "flake": false, "locked": { - "lastModified": 1747046372, + "lastModified": 1761588595, "owner": "edolstra", "repo": "flake-compat", - "rev": "9100a0f413b0c601e0533d1d94ffd501ce2e7885", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", "type": "github" }, "original": { @@ -40,10 +40,10 @@ ] }, "locked": { - "lastModified": 1759523803, + "lastModified": 1763988335, "owner": "cachix", "repo": "git-hooks.nix", - "rev": "cfc9f7bb163ad8542029d303e599c0f7eee09835", + "rev": "50b9238891e388c9fdc6a5c49e49c42533a1b5ce", "type": "github" }, "original": { @@ -60,10 +60,10 @@ ] }, "locked": { - "lastModified": 1709087332, + "lastModified": 1762808025, "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "rev": "cb5e3fdca1de58ccbc3ef53de65bd372b48f567c", "type": "github" }, "original": { @@ -74,10 +74,10 @@ }, "nixpkgs": { "locked": { - "lastModified": 1758532697, + "lastModified": 1761313199, "owner": "cachix", "repo": "devenv-nixpkgs", - "rev": "207a4cb0e1253c7658c6736becc6eb9cace1f25f", + "rev": "d1c30452ebecfc55185ae6d1c983c09da0c274ff", "type": "github" }, "original": { diff --git a/java/src/dev/andreijiroh/studentops/projects/finaPT.java b/java/src/dev/andreijiroh/studentops/projects/finaPT.java new file mode 100644 index 0000000..e99b675 --- /dev/null +++ b/java/src/dev/andreijiroh/studentops/projects/finaPT.java @@ -0,0 +1,32 @@ +package dev.andreijiroh.studentops.projects; +// import the entire base modules +import module java.base; + +/** + * Computer Programming 1 - 07 Performance Task 1 + * @author Andrei Jiroh Eugenio Halili (STI College Meycauayan) + */ +public class finaPT { + public static void main(String[] args) { + // Output + System.out.println("Well hello there!"); + + // Input + loops + while (true) { + System.out.print("What's cooking for today? "); + String dailyLog = scanner.nextLine().trim(); + Scanner scanner = new Scanner(System.in); + if (dailyLog.isEmpty()) { + System.out.println("You forgot to log something"); + } else { + break; + } + } + + // Array + conditionals (switches) + string[] categories = {"School", "Work", "Personal", "Others"}; + println("What category is this?") + + scanner.close(); + } +} -- 2.51.2