Skip to content

Commit

Permalink
modify frontend (analysis table format)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joe committed Jun 23, 2024
1 parent 92459fe commit 5f8ccf2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
5 changes: 1 addition & 4 deletions Code.java
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
import java.io.*; import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.Scanner; public class Code { public static void main(String[] args) {long startTime = System.currentTimeMillis(); BufferedReader scanner = new BufferedReader(new InputStreamReader(System.in)); for (int i = 0; i < 10; i++) { String input = scanner.readLine(); System.out.println(input); } scanner.close(); long endTime = System.currentTimeMillis(); Runtime.getRuntime().gc(); long usedMem = Runtime.getRuntime().totalMemory() - Runtime.getRuntime().freeMemory(); String form = String.format("/Runtime: %f/Used Memory: %d", (endTime - startTime) / 1000.0, usedMem); try (FileWriter writer = new FileWriter("output.txt")) { writer.write(form); } catch (IOException e) { e.printStackTrace(); }} }
null
5 changes: 2 additions & 3 deletions frontend/src/pages/MainBottomPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -484,18 +484,17 @@ public class SortAfter {
<ImageCell>
<img src="/analysis2.png" alt="차로 이동할 수 있는 거리" width="100" />
</ImageCell>
<h3>차로 이동할 수 있는 거리</h3>
<h3>감소된 탄소배출량으로<br/>이동할 수 있는 거리(차량)</h3>
</CenteredTableCell>
</TableRow>
<TableRow>
<CenteredTableCell>Before</CenteredTableCell>
<CenteredTableCell>{compareData?.inputCarbonEmissions}</CenteredTableCell>
<CenteredTableCell>{compareData?.carBefore + "km"}</CenteredTableCell>
<CenteredTableCell rowspan="2">{(((compareData?.carBefore-compareData?.carAfter)*1000).toFixed(2))>0 ? (((compareData?.carBefore-compareData?.carAfter)*1000).toFixed(2))+' m':0 +' m'}</CenteredTableCell>
</TableRow>
<TableRow>
<CenteredTableCell>After</CenteredTableCell>
<CenteredTableCell>{compareData?.outputCarbonEmissions}</CenteredTableCell>
<CenteredTableCell>{compareData?.carAfter + "km"}</CenteredTableCell>
</TableRow>
</TableBody>
</StyledTable>
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/pages/MyPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ const MyPage = () => {
}, [navigate, setRole]);

const updateRankImage = (totalBits) => { //소유중인 bit에 따라 나무 이미지 표시
if (totalBits >= 801) { //200 단위로 성장
if (totalBits >= 201) { //200 단위로 성장 -> 편의상 50 단위로 수정
setRankImagePath("/5.jpg");
} else if (totalBits >= 601) {
} else if (totalBits >= 151) {
setRankImagePath("/4.jpg");
} else if (totalBits >= 401) {
} else if (totalBits >= 101) {
setRankImagePath("/3.jpg");
} else if (totalBits >= 201) {
} else if (totalBits >= 51) {
setRankImagePath("/2.jpg");
} else {
setRankImagePath("/1.jpg");
Expand Down
2 changes: 1 addition & 1 deletion output.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
/Runtime: 0.000000/Used Memory: 691776
/Runtime: 0.005000/Used Memory: 763728

0 comments on commit 5f8ccf2

Please sign in to comment.