From d6ab09134372f36f7eed240e88bb881cb3953e0c Mon Sep 17 00:00:00 2001
From: fdzcxy212206316 <1409489435@qq.com>
Date: Thu, 10 Oct 2024 16:05:31 +0800
Subject: [PATCH 01/15] Initial commit
---
README.md | 2 ++
1 file changed, 2 insertions(+)
create mode 100644 README.md
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..f99659f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+# OneTest
+
--
2.34.1
From 6a654313cac129bd4796d26488aef4cc522ae19c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8F=B6=E9=94=8B?= <1409489435@qq.com>
Date: Thu, 10 Oct 2024 16:41:16 +0800
Subject: [PATCH 02/15] Hello WOrld!
---
.idea/.gitignore | 8 ++++++++
.idea/OneTest.iml | 9 +++++++++
.idea/misc.xml | 6 ++++++
.idea/modules.xml | 9 +++++++++
.idea/vcs.xml | 6 ++++++
one/one.iml | 11 +++++++++++
one/src/Main.java | 5 +++++
one/src/one.java | 7 +++++++
8 files changed, 61 insertions(+)
create mode 100644 .idea/.gitignore
create mode 100644 .idea/OneTest.iml
create mode 100644 .idea/misc.xml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
create mode 100644 one/one.iml
create mode 100644 one/src/Main.java
create mode 100644 one/src/one.java
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..35410ca
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/OneTest.iml b/.idea/OneTest.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/OneTest.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..639900d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..94dfcad
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/one/one.iml b/one/one.iml
new file mode 100644
index 0000000..37cc804
--- /dev/null
+++ b/one/one.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/one/src/Main.java b/one/src/Main.java
new file mode 100644
index 0000000..3e59c38
--- /dev/null
+++ b/one/src/Main.java
@@ -0,0 +1,5 @@
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file
diff --git a/one/src/one.java b/one/src/one.java
new file mode 100644
index 0000000..482e3eb
--- /dev/null
+++ b/one/src/one.java
@@ -0,0 +1,7 @@
+public class one
+{
+ public static void main(String[] args)
+ {
+ System.out.println("Hello World!");
+ }
+}
--
2.34.1
From 006f01368492df42b31ad8d8a000e2250de43e6c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E5=AE=87=E9=93=89?= <2430677357@qq.com>
Date: Thu, 10 Oct 2024 16:54:32 +0800
Subject: [PATCH 03/15] 1
---
.idea/.gitignore | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 .idea/.gitignore
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..35410ca
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
--
2.34.1
From 7e72280fb663107f8d487c103731bc4a21c9f34b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E5=AE=87=E9=93=89?= <2430677357@qq.com>
Date: Thu, 10 Oct 2024 16:55:20 +0800
Subject: [PATCH 04/15] 1
---
.idea/misc.xml | 6 ++++++
1 file changed, 6 insertions(+)
create mode 100644 .idea/misc.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..639900d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
--
2.34.1
From f0873de9e142e1f6c8a2bf5729a8230da4cc3fca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E5=AE=87=E9=93=89?= <2430677357@qq.com>
Date: Thu, 10 Oct 2024 16:57:09 +0800
Subject: [PATCH 05/15] 1
---
two/src/Main.java | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 two/src/Main.java
diff --git a/two/src/Main.java b/two/src/Main.java
new file mode 100644
index 0000000..3e59c38
--- /dev/null
+++ b/two/src/Main.java
@@ -0,0 +1,5 @@
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file
--
2.34.1
From fa40bbd990bab7460365fe49a2c35920d1179178 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E5=AE=87=E9=93=89?= <2430677357@qq.com>
Date: Thu, 10 Oct 2024 16:58:13 +0800
Subject: [PATCH 06/15] 1
---
.idea/OneTest.iml | 9 +++++++++
.idea/modules.xml | 9 +++++++++
.idea/vcs.xml | 6 ++++++
two/src/twotest.java | 7 +++++++
two/two.iml | 11 +++++++++++
5 files changed, 42 insertions(+)
create mode 100644 .idea/OneTest.iml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
create mode 100644 two/src/twotest.java
create mode 100644 two/two.iml
diff --git a/.idea/OneTest.iml b/.idea/OneTest.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/OneTest.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..087c77c
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..35eb1dd
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/two/src/twotest.java b/two/src/twotest.java
new file mode 100644
index 0000000..d9684a9
--- /dev/null
+++ b/two/src/twotest.java
@@ -0,0 +1,7 @@
+public class twotest
+{
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+}
diff --git a/two/two.iml b/two/two.iml
new file mode 100644
index 0000000..37cc804
--- /dev/null
+++ b/two/two.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
2.34.1
From ca1033fc543e8d9966dedff7673e9c1a94b90fe2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E5=AE=87=E9=93=89?= <2430677357@qq.com>
Date: Thu, 10 Oct 2024 17:05:38 +0800
Subject: [PATCH 07/15] =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=AC=A1=E6=8F=90?=
=?UTF-8?q?=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
two/src/twotest.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/two/src/twotest.java b/two/src/twotest.java
index d9684a9..eed0e17 100644
--- a/two/src/twotest.java
+++ b/two/src/twotest.java
@@ -1,7 +1,6 @@
public class twotest
{
- @Override
- public int hashCode() {
- return super.hashCode();
+ public static void main(String[] args) {
+ System.out.println("hfjdhfjdhjfh");
+ }
}
-}
--
2.34.1
From 9d42d6d3c3a0b2cc6e74144ac3da447a24ad5196 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E5=AE=87=E9=93=89?= <2430677357@qq.com>
Date: Thu, 10 Oct 2024 17:09:44 +0800
Subject: [PATCH 08/15] =?UTF-8?q?=E5=8D=81=E8=BF=9B=E5=88=B6=E8=BD=AC?=
=?UTF-8?q?=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
two/src/test.java | 86 ++++++++++++++++++++++++++++++++++++++++++++
two/src/twotest.java | 6 ----
2 files changed, 86 insertions(+), 6 deletions(-)
create mode 100644 two/src/test.java
delete mode 100644 two/src/twotest.java
diff --git a/two/src/test.java b/two/src/test.java
new file mode 100644
index 0000000..b0bd95a
--- /dev/null
+++ b/two/src/test.java
@@ -0,0 +1,86 @@
+import javafx.application.Application;
+import javafx.geometry.Insets;
+import javafx.scene.Scene;
+import javafx.scene.control.*;
+import javafx.scene.layout.GridPane;
+import javafx.stage.Stage;
+
+public class test extends Application {
+
+ @Override
+ public void start(Stage primaryStage) {
+ primaryStage.setTitle("进制转换器");
+
+ // 创建布局
+ GridPane grid = new GridPane();
+ grid.setPadding(new Insets(10));
+ grid.setVgap(8);
+ grid.setHgap(10);
+
+ // 输入框
+ Label inputLabel = new Label("输入数值:");
+ GridPane.setConstraints(inputLabel, 0, 0);
+ TextField inputField = new TextField();
+ GridPane.setConstraints(inputField, 1, 0);
+
+ // 源进制选择
+ Label fromBaseLabel = new Label("源进制:");
+ GridPane.setConstraints(fromBaseLabel, 0, 1);
+ ComboBox fromBaseCombo = new ComboBox<>();
+ fromBaseCombo.getItems().addAll(2, 10, 16);
+ fromBaseCombo.setValue(10); // 默认选择十进制
+ GridPane.setConstraints(fromBaseCombo, 1, 1);
+
+ // 目标进制选择
+ Label toBaseLabel = new Label("目标进制:");
+ GridPane.setConstraints(toBaseLabel, 0, 2);
+ ComboBox toBaseCombo = new ComboBox<>();
+ toBaseCombo.getItems().addAll(2, 10, 16);
+ toBaseCombo.setValue(10); // 默认选择十进制
+ GridPane.setConstraints(toBaseCombo, 1, 2);
+
+ // 转换按钮
+ Button convertButton = new Button("转换");
+ GridPane.setConstraints(convertButton, 1, 3);
+
+ // 输出框
+ Label resultLabel = new Label("结果:");
+ GridPane.setConstraints(resultLabel, 0, 4);
+ TextField resultField = new TextField();
+ resultField.setEditable(false);
+ GridPane.setConstraints(resultField, 1, 4);
+
+ // 处理转换逻辑
+ convertButton.setOnAction(e -> {
+ String input = inputField.getText();
+ int fromBase = fromBaseCombo.getValue();
+ int toBase = toBaseCombo.getValue();
+ String result = convertBase(input, fromBase, toBase);
+ resultField.setText(result);
+ });
+
+ // 添加所有控件到布局
+ grid.getChildren().addAll(inputLabel, inputField, fromBaseLabel, fromBaseCombo,
+ toBaseLabel, toBaseCombo, convertButton, resultLabel, resultField);
+
+ // 创建场景并显示
+ Scene scene = new Scene(grid, 400, 200);
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+
+ private String convertBase(String value, int fromBase, int toBase) {
+ try {
+ // 将输入值从源进制转换为十进制
+ int decimalValue = Integer.parseInt(value, fromBase);
+ // 将十进制转换为目标进制
+ return Integer.toString(decimalValue, toBase).toUpperCase();
+ } catch (NumberFormatException e) {
+ return "输入无效";
+ }
+ }
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+}
diff --git a/two/src/twotest.java b/two/src/twotest.java
deleted file mode 100644
index eed0e17..0000000
--- a/two/src/twotest.java
+++ /dev/null
@@ -1,6 +0,0 @@
-public class twotest
-{
- public static void main(String[] args) {
- System.out.println("hfjdhfjdhjfh");
- }
- }
--
2.34.1
From c5c88d04da520486a2031ae1e98b4accda18a061 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=90=B4=E5=AE=87=E9=93=89?= <2430677357@qq.com>
Date: Thu, 10 Oct 2024 17:16:00 +0800
Subject: [PATCH 09/15] =?UTF-8?q?=E8=BF=9B=E5=88=B6=E8=BD=AC=E6=8D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.gitignore | 29 ++++++++++++++++
.idea/.gitignore | 8 +++++
.idea/misc.xml | 6 ++++
.idea/modules.xml | 8 +++++
.idea/vcs.xml | 6 ++++
src/Main.java | 5 +++
src/shift6247.java | 86 ++++++++++++++++++++++++++++++++++++++++++++++
test shift.iml | 11 ++++++
8 files changed, 159 insertions(+)
create mode 100644 .gitignore
create mode 100644 .idea/.gitignore
create mode 100644 .idea/misc.xml
create mode 100644 .idea/modules.xml
create mode 100644 .idea/vcs.xml
create mode 100644 src/Main.java
create mode 100644 src/shift6247.java
create mode 100644 test shift.iml
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..f68d109
--- /dev/null
+++ b/.gitignore
@@ -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
\ No newline at end of file
diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..35410ca
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..0548357
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..8b10403
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Main.java b/src/Main.java
new file mode 100644
index 0000000..3e59c38
--- /dev/null
+++ b/src/Main.java
@@ -0,0 +1,5 @@
+public class Main {
+ public static void main(String[] args) {
+ System.out.println("Hello world!");
+ }
+}
\ No newline at end of file
diff --git a/src/shift6247.java b/src/shift6247.java
new file mode 100644
index 0000000..8d7ac17
--- /dev/null
+++ b/src/shift6247.java
@@ -0,0 +1,86 @@
+import javafx.application.Application;
+import javafx.geometry.Insets;
+import javafx.scene.Scene;
+import javafx.scene.control.*;
+import javafx.scene.layout.GridPane;
+import javafx.stage.Stage;
+
+public class shift6247 extends Application {
+
+ @Override
+ public void start(Stage primaryStage) {
+ primaryStage.setTitle("进制转换器");
+
+ // 创建布局
+ GridPane grid = new GridPane();
+ grid.setPadding(new Insets(10));
+ grid.setVgap(8);
+ grid.setHgap(10);
+
+ // 输入框
+ Label inputLabel = new Label("输入数值:");
+ GridPane.setConstraints(inputLabel, 0, 0);
+ TextField inputField = new TextField();
+ GridPane.setConstraints(inputField, 1, 0);
+
+ // 源进制选择
+ Label fromBaseLabel = new Label("源进制:");
+ GridPane.setConstraints(fromBaseLabel, 0, 1);
+ ComboBox fromBaseCombo = new ComboBox<>();
+ fromBaseCombo.getItems().addAll(2, 10, 16);
+ fromBaseCombo.setValue(10); // 默认选择十进制
+ GridPane.setConstraints(fromBaseCombo, 1, 1);
+
+ // 目标进制选择
+ Label toBaseLabel = new Label("目标进制:");
+ GridPane.setConstraints(toBaseLabel, 0, 2);
+ ComboBox toBaseCombo = new ComboBox<>();
+ toBaseCombo.getItems().addAll(2, 10, 16);
+ toBaseCombo.setValue(10); // 默认选择十进制
+ GridPane.setConstraints(toBaseCombo, 1, 2);
+
+ // 转换按钮
+ Button convertButton = new Button("转换");
+ GridPane.setConstraints(convertButton, 1, 3);
+
+ // 输出框
+ Label resultLabel = new Label("结果:");
+ GridPane.setConstraints(resultLabel, 0, 4);
+ TextField resultField = new TextField();
+ resultField.setEditable(false);
+ GridPane.setConstraints(resultField, 1, 4);
+
+ // 处理转换逻辑
+ convertButton.setOnAction(e -> {
+ String input = inputField.getText();
+ int fromBase = fromBaseCombo.getValue();
+ int toBase = toBaseCombo.getValue();
+ String result = convertBase(input, fromBase, toBase);
+ resultField.setText(result);
+ });
+
+ // 添加所有控件到布局
+ grid.getChildren().addAll(inputLabel, inputField, fromBaseLabel, fromBaseCombo,
+ toBaseLabel, toBaseCombo, convertButton, resultLabel, resultField);
+
+ // 创建场景并显示
+ Scene scene = new Scene(grid, 400, 200);
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+
+ private String convertBase(String value, int fromBase, int toBase) {
+ try {
+ // 将输入值从源进制转换为十进制
+ int decimalValue = Integer.parseInt(value, fromBase);
+ // 将十进制转换为目标进制
+ return Integer.toString(decimalValue, toBase).toUpperCase();
+ } catch (NumberFormatException e) {
+ return "输入无效";
+ }
+ }
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+}
diff --git a/test shift.iml b/test shift.iml
new file mode 100644
index 0000000..c90834f
--- /dev/null
+++ b/test shift.iml
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
--
2.34.1
From c4fa481144c9af3ba446f90468132bf444b2c493 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8F=B6=E9=94=8B?= <1409489435@qq.com>
Date: Thu, 10 Oct 2024 19:03:27 +0800
Subject: [PATCH 10/15] =?UTF-8?q?=E7=AC=AC=E4=B8=80=E6=AC=A1=E6=8F=90?=
=?UTF-8?q?=E4=BA=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
one/src/test1.java | 86 ++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)
create mode 100644 one/src/test1.java
diff --git a/one/src/test1.java b/one/src/test1.java
new file mode 100644
index 0000000..db08025
--- /dev/null
+++ b/one/src/test1.java
@@ -0,0 +1,86 @@
+import javafx.application.Application;
+import javafx.geometry.Insets;
+import javafx.scene.Scene;
+import javafx.scene.control.*;
+import javafx.scene.layout.GridPane;
+import javafx.stage.Stage;
+
+public class test1 extends Application {
+
+ @Override
+ public void start(Stage primaryStage) {
+ primaryStage.setTitle("进制转换器");
+
+ // 创建布局
+ GridPane grid = new GridPane();
+ grid.setPadding(new Insets(10));
+ grid.setVgap(8);
+ grid.setHgap(10);
+
+ // 输入框
+ Label inputLabel = new Label("输入数值:");
+ GridPane.setConstraints(inputLabel, 0, 0);
+ TextField inputField = new TextField();
+ GridPane.setConstraints(inputField, 1, 0);
+
+ // 源进制选择
+ Label fromBaseLabel = new Label("源进制:");
+ GridPane.setConstraints(fromBaseLabel, 0, 1);
+ ComboBox fromBaseCombo = new ComboBox<>();
+ fromBaseCombo.getItems().addAll(2, 10, 16);
+ fromBaseCombo.setValue(10); // 默认选择十进制
+ GridPane.setConstraints(fromBaseCombo, 1, 1);
+
+ // 目标进制选择
+ Label toBaseLabel = new Label("目标进制:");
+ GridPane.setConstraints(toBaseLabel, 0, 2);
+ ComboBox toBaseCombo = new ComboBox<>();
+ toBaseCombo.getItems().addAll(2, 10, 16);
+ toBaseCombo.setValue(10); // 默认选择十进制
+ GridPane.setConstraints(toBaseCombo, 1, 2);
+
+ // 转换按钮
+ Button convertButton = new Button("转换");
+ GridPane.setConstraints(convertButton, 1, 3);
+
+ // 输出框
+ Label resultLabel = new Label("结果:");
+ GridPane.setConstraints(resultLabel, 0, 4);
+ TextField resultField = new TextField();
+ resultField.setEditable(false);
+ GridPane.setConstraints(resultField, 1, 4);
+
+ // 处理转换逻辑
+ convertButton.setOnAction(e -> {
+ String input = inputField.getText();
+ int fromBase = fromBaseCombo.getValue();
+ int toBase = toBaseCombo.getValue();
+ String result = convertBase(input, fromBase, toBase);
+ resultField.setText(result);
+ });
+
+ // 添加所有控件到布局
+ grid.getChildren().addAll(inputLabel, inputField, fromBaseLabel, fromBaseCombo,
+ toBaseLabel, toBaseCombo, convertButton, resultLabel, resultField);
+
+ // 创建场景并显示
+ Scene scene = new Scene(grid, 400, 200);
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+
+ private String convertBase(String value, int fromBase, int toBase) {
+ try {
+ // 将输入值从源进制转换为十进制
+ int decimalValue = Integer.parseInt(value, fromBase);
+ // 将十进制转换为目标进制
+ return Integer.toString(decimalValue, toBase).toUpperCase();
+ } catch (NumberFormatException e) {
+ return "输入无效";
+ }
+ }
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+}
--
2.34.1
From b08045210f9f7787aa8fd10d6baed09c0b589c80 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8F=B6=E9=94=8B?= <1409489435@qq.com>
Date: Thu, 10 Oct 2024 19:06:27 +0800
Subject: [PATCH 11/15] =?UTF-8?q?=E8=BF=9B=E5=88=B6=E8=BD=AC=E6=8D=A2?=
=?UTF-8?q?=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
one/src/one.java | 7 -------
1 file changed, 7 deletions(-)
delete mode 100644 one/src/one.java
diff --git a/one/src/one.java b/one/src/one.java
deleted file mode 100644
index 482e3eb..0000000
--- a/one/src/one.java
+++ /dev/null
@@ -1,7 +0,0 @@
-public class one
-{
- public static void main(String[] args)
- {
- System.out.println("Hello World!");
- }
-}
--
2.34.1
From d046520ab96a5dfc43a007a66e7eb62fc9426826 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=8F=B6=E9=94=8B?= <1409489435@qq.com>
Date: Thu, 10 Oct 2024 19:18:55 +0800
Subject: [PATCH 12/15] =?UTF-8?q?=E8=BF=9B=E5=88=B6=E8=BD=AC=E6=8D=A2?=
=?UTF-8?q?=E5=99=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
one1/src/oneTest1.java | 86 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 86 insertions(+)
create mode 100644 one1/src/oneTest1.java
diff --git a/one1/src/oneTest1.java b/one1/src/oneTest1.java
new file mode 100644
index 0000000..8ce29db
--- /dev/null
+++ b/one1/src/oneTest1.java
@@ -0,0 +1,86 @@
+import javafx.application.Application;
+import javafx.geometry.Insets;
+import javafx.scene.Scene;
+import javafx.scene.control.*;
+import javafx.scene.layout.GridPane;
+import javafx.stage.Stage;
+
+public class oneTest1 extends Application {
+
+ @Override
+ public void start(Stage primaryStage) {
+ primaryStage.setTitle("进制转换器");
+
+ // 创建布局
+ GridPane grid = new GridPane();
+ grid.setPadding(new Insets(10));
+ grid.setVgap(8);
+ grid.setHgap(10);
+
+ // 输入框
+ Label inputLabel = new Label("输入数值:");
+ GridPane.setConstraints(inputLabel, 0, 0);
+ TextField inputField = new TextField();
+ GridPane.setConstraints(inputField, 1, 0);
+
+ // 源进制选择
+ Label fromBaseLabel = new Label("源进制:");
+ GridPane.setConstraints(fromBaseLabel, 0, 1);
+ ComboBox fromBaseCombo = new ComboBox<>();
+ fromBaseCombo.getItems().addAll(2, 10, 16);
+ fromBaseCombo.setValue(10); // 默认选择十进制
+ GridPane.setConstraints(fromBaseCombo, 1, 1);
+
+ // 目标进制选择
+ Label toBaseLabel = new Label("目标进制:");
+ GridPane.setConstraints(toBaseLabel, 0, 2);
+ ComboBox toBaseCombo = new ComboBox<>();
+ toBaseCombo.getItems().addAll(2, 10, 16);
+ toBaseCombo.setValue(10); // 默认选择十进制
+ GridPane.setConstraints(toBaseCombo, 1, 2);
+
+ // 转换按钮
+ Button convertButton = new Button("转换");
+ GridPane.setConstraints(convertButton, 1, 3);
+
+ // 输出框
+ Label resultLabel = new Label("结果:");
+ GridPane.setConstraints(resultLabel, 0, 4);
+ TextField resultField = new TextField();
+ resultField.setEditable(false);
+ GridPane.setConstraints(resultField, 1, 4);
+
+ // 处理转换逻辑
+ convertButton.setOnAction(e -> {
+ String input = inputField.getText();
+ int fromBase = fromBaseCombo.getValue();
+ int toBase = toBaseCombo.getValue();
+ String result = convertBase(input, fromBase, toBase);
+ resultField.setText(result);
+ });
+
+ // 添加所有控件到布局
+ grid.getChildren().addAll(inputLabel, inputField, fromBaseLabel, fromBaseCombo,
+ toBaseLabel, toBaseCombo, convertButton, resultLabel, resultField);
+
+ // 创建场景并显示
+ Scene scene = new Scene(grid, 400, 200);
+ primaryStage.setScene(scene);
+ primaryStage.show();
+ }
+
+ private String convertBase(String value, int fromBase, int toBase) {
+ try {
+ // 将输入值从源进制转换为十进制
+ int decimalValue = Integer.parseInt(value, fromBase);
+ // 将十进制转换为目标进制
+ return Integer.toString(decimalValue, toBase).toUpperCase();
+ } catch (NumberFormatException e) {
+ return "输入无效";
+ }
+ }
+
+ public static void main(String[] args) {
+ launch(args);
+ }
+}
--
2.34.1
From 15248821aaeff6c416306924e2d9dc8d87c3c7f6 Mon Sep 17 00:00:00 2001
From: fdzcxy212206316 <1409489435@qq.com>
Date: Thu, 10 Oct 2024 19:25:09 +0800
Subject: [PATCH 13/15] Delete 'one/one.iml'
---
one/one.iml | 11 -----------
1 file changed, 11 deletions(-)
delete mode 100644 one/one.iml
diff --git a/one/one.iml b/one/one.iml
deleted file mode 100644
index 37cc804..0000000
--- a/one/one.iml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
--
2.34.1
From 36e0d49c567b2ee4e576847153bc784b7af77849 Mon Sep 17 00:00:00 2001
From: fdzcxy212206316 <1409489435@qq.com>
Date: Thu, 10 Oct 2024 19:25:34 +0800
Subject: [PATCH 14/15] Delete 'one/src/Main.java'
---
one/src/Main.java | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 one/src/Main.java
diff --git a/one/src/Main.java b/one/src/Main.java
deleted file mode 100644
index 3e59c38..0000000
--- a/one/src/Main.java
+++ /dev/null
@@ -1,5 +0,0 @@
-public class Main {
- public static void main(String[] args) {
- System.out.println("Hello world!");
- }
-}
\ No newline at end of file
--
2.34.1
From eaf3ce89e4a193fdcd0dcdd080e6b8a926f1a878 Mon Sep 17 00:00:00 2001
From: fdzcxy212206316 <1409489435@qq.com>
Date: Thu, 10 Oct 2024 19:25:46 +0800
Subject: [PATCH 15/15] Delete 'one/src/test1.java'
---
one/src/test1.java | 86 ----------------------------------------------
1 file changed, 86 deletions(-)
delete mode 100644 one/src/test1.java
diff --git a/one/src/test1.java b/one/src/test1.java
deleted file mode 100644
index db08025..0000000
--- a/one/src/test1.java
+++ /dev/null
@@ -1,86 +0,0 @@
-import javafx.application.Application;
-import javafx.geometry.Insets;
-import javafx.scene.Scene;
-import javafx.scene.control.*;
-import javafx.scene.layout.GridPane;
-import javafx.stage.Stage;
-
-public class test1 extends Application {
-
- @Override
- public void start(Stage primaryStage) {
- primaryStage.setTitle("进制转换器");
-
- // 创建布局
- GridPane grid = new GridPane();
- grid.setPadding(new Insets(10));
- grid.setVgap(8);
- grid.setHgap(10);
-
- // 输入框
- Label inputLabel = new Label("输入数值:");
- GridPane.setConstraints(inputLabel, 0, 0);
- TextField inputField = new TextField();
- GridPane.setConstraints(inputField, 1, 0);
-
- // 源进制选择
- Label fromBaseLabel = new Label("源进制:");
- GridPane.setConstraints(fromBaseLabel, 0, 1);
- ComboBox fromBaseCombo = new ComboBox<>();
- fromBaseCombo.getItems().addAll(2, 10, 16);
- fromBaseCombo.setValue(10); // 默认选择十进制
- GridPane.setConstraints(fromBaseCombo, 1, 1);
-
- // 目标进制选择
- Label toBaseLabel = new Label("目标进制:");
- GridPane.setConstraints(toBaseLabel, 0, 2);
- ComboBox toBaseCombo = new ComboBox<>();
- toBaseCombo.getItems().addAll(2, 10, 16);
- toBaseCombo.setValue(10); // 默认选择十进制
- GridPane.setConstraints(toBaseCombo, 1, 2);
-
- // 转换按钮
- Button convertButton = new Button("转换");
- GridPane.setConstraints(convertButton, 1, 3);
-
- // 输出框
- Label resultLabel = new Label("结果:");
- GridPane.setConstraints(resultLabel, 0, 4);
- TextField resultField = new TextField();
- resultField.setEditable(false);
- GridPane.setConstraints(resultField, 1, 4);
-
- // 处理转换逻辑
- convertButton.setOnAction(e -> {
- String input = inputField.getText();
- int fromBase = fromBaseCombo.getValue();
- int toBase = toBaseCombo.getValue();
- String result = convertBase(input, fromBase, toBase);
- resultField.setText(result);
- });
-
- // 添加所有控件到布局
- grid.getChildren().addAll(inputLabel, inputField, fromBaseLabel, fromBaseCombo,
- toBaseLabel, toBaseCombo, convertButton, resultLabel, resultField);
-
- // 创建场景并显示
- Scene scene = new Scene(grid, 400, 200);
- primaryStage.setScene(scene);
- primaryStage.show();
- }
-
- private String convertBase(String value, int fromBase, int toBase) {
- try {
- // 将输入值从源进制转换为十进制
- int decimalValue = Integer.parseInt(value, fromBase);
- // 将十进制转换为目标进制
- return Integer.toString(decimalValue, toBase).toUpperCase();
- } catch (NumberFormatException e) {
- return "输入无效";
- }
- }
-
- public static void main(String[] args) {
- launch(args);
- }
-}
--
2.34.1