關於pta三次作業的總結

来源:https://www.cnblogs.com/hjjhjy/p/18147634
-Advertisement-
Play Games

oop三次pta總結 前言 在這學期的java課程學習當中,我已經體會到了java這門語言的重要性了,就從這三次pta題目的設計與思路來說吧(還真的有點小難),特別是每一期pta的最後一題...... 《答題判題程式》,這道題目依次迭代,難度依次上升(如果沒有設計好,基本是寄了),題目不多看幾遍細節 ...


oop三次pta總結

前言

在這學期的java課程學習當中,我已經體會到了java這門語言的重要性了,就從這三次pta題目的設計與思路來說吧(還真的有點小難),特別是每一期pta的最後一題......

答題判題程式》,這道題目依次迭代,難度依次上升(如果沒有設計好,基本是寄了),題目不多看幾遍細節是真的不能把握,如果細節忽略了,那就要付出幾倍的時間和

去修正了。(別問我怎麼知道的)

這道題目涵蓋正則表達式類的設計,等知識點。從複雜到更複雜,時間耗費的越來越多,(一個測試點一天)

接下來一題一題來分析看看吧,也總結一下自己的代碼設計錯誤

 

設計與分析

題目1:

設計實現答題程式,模擬一個小型的測試,要求輸入題目信息和答題信息,根據輸入題目信息中的標準答案判斷答題的結果。

輸入格式:

程式輸入信息分三部分:


1、題目數量

   格式:整數數值,若超過1位最高位不能為0,

   樣例:34

2、題目內容

   一行為一道題,可以輸入多行數據。

   格式:"#N:"+題號+" "+"#Q:"+題目內容+" "#A:"+標準答案

格式約束:題目的輸入順序與題號不相關,不一定按題號順序從小到大輸入。

   樣例:#N:1 #Q:1+1= #A:2

         #N:2 #Q:2+2= #A:4

3、答題信息

   答題信息按行輸入,每一行為一組答案,每組答案包含第2部分所有題目的解題答案,答案的順序號與題目題號相對應。

   格式:"#A:"+答案內容

   格式約束:答案數量與第2部分題目的數量相同,答案之間以英文空格分隔。

   樣例:#A:2 #A:78

      2是題號為1的題目的答案
      78是題號為2的題目的答案

   答題信息以一行"end"標記結束,"end"之後的信息忽略。

輸出格式:

1、題目數量

   格式:整數數值,若超過1位最高位不能為0,

   樣例:34

2、答題信息

   一行為一道題的答題信息,根據題目的數量輸出多行數據。

   格式:題目內容+" ~"+答案

   樣例:1+1=~2

          2+2= ~4

3、判題信息

   判題信息為一行數據,一條答題記錄每個答案的判斷結果,答案的先後順序與題目題號相對應。

   格式:判題結果+" "+判題結果

   格式約束:

     1、判題結果輸出只能是true或者false,
     2、判題信息的順序與輸入答題信息中的順序相同

   樣例:true false true

代碼:

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number;
        number = sc.nextInt();
        Answerpaper answerpaper[] = new Answerpaper[2 * number + 1];
        int[] num = new int[number + 1];
        String str;
        sc.nextLine();
        String[][] Str = new String[number + 2][];
        for (int i = 1; i <= number + 1; i++) {
            str = sc.nextLine();
            Str[i] = str.split(":");
            for (int j = 1; j < Str[i].length; j++) {
                while (Str[i][j].charAt(0) == ' ') {
                    Str[i][j] = Str[i][j].substring(1);
                }
                if (i == number + 1) {
                    while (Str[i][j].charAt(Str[i][j].length() - 1) == '#' ||
                            Str[i][j].charAt(Str[i][j].length() - 1) == 'A' ||
                            Str[i][j].charAt(Str[i][j].length() - 1) == ' ') {
                        Str[i][j] = Str[i][j].substring(0, Str[i][j].length() - 1);
                    }
                }
                if (j == 1 && i != number + 1) {
                    while (Str[i][j].charAt(Str[i][j].length() - 1) == '#' ||
                            Str[i][j].charAt(Str[i][j].length() - 1) == 'Q' ||
                            Str[i][j].charAt(Str[i][j].length() - 1) == ' ') {
                        Str[i][j] = Str[i][j].substring(0, Str[i][j].length() - 1);
                    }
                    num[i] = 0;
                    for (int k = 0; k < Str[i][j].length(); k++)
                        num[i] += ((int) Str[i][j].charAt(k) - 48) * Math.pow(10, Str[i][j].length() - k - 1);

                }
                if (j == 2 && i != number + 1) {
                    Str[i][j] = Str[i][j].substring(0, Str[i][j].length() - 1);
                    Str[i][j] = Str[i][j].substring(0, Str[i][j].length() - 1);
                    while (Str[i][j].charAt(Str[i][j].length() - 1) == ' ') {
                        Str[i][j] = Str[i][j].substring(0, Str[i][j].length() - 1);
                    }
                }
                if (j == 3) {
                    while (Str[i][j].charAt(Str[i][j].length() - 1) == ' ') {
                        Str[i][j] = Str[i][j].substring(0, Str[i][j].length() - 1);
                    }
                }
            }

        }

        for (int i = 1; i <= number; i++) {
            answerpaper[num[i]] = new Answerpaper(number, num[i], Str[1 + number][num[i]], Str[i][3], Str[i][2]);
        }
        for (int i = 1; i <= number; i++) {
            for (int j = 1; j <= number - 1; j++) {
                if (num[j] > num[j + 1]) {
                    int a = num[j + 1];
                    num[j + 1] = num[j];
                    num[j] = a;
                }
            }
        }
        for (int i = 1; i <= number; i++) {
            answerpaper[num[i]].printlnof();
            answerpaper[num[i]].printresult();
        }
        for (int i = 1; i <= number; i++) {
            if (answerpaper[num[i]].paper.problem.answerright(answerpaper[num[i]])) {
                if (i != number) {
                    System.out.printf("true ");
                } else {
                    System.out.printf("true");
                }

            } else {
                if (i != number)
                    System.out.printf("false ");
                else
                    System.out.printf("false");
            }
        }
    }
}

class Problem {
    int num;
    String content;
    String standardAnswer;

    public Problem(int num, String content, String standardAnswer) {
        this.num = num;
        this.content = content;
        this.standardAnswer = standardAnswer;
    }

    public boolean answerright(Answerpaper answerpaper) {
        if (answerpaper.answer.equals(standardAnswer))
            return true;
        return false;
    }
}

class Paper {
    Problem problem;
    int number;

    public Paper(int number, String standardAnswer, int num, String content) {
        problem = new Problem(num, content, standardAnswer);
        this.number = number;
    }

    public Problem getProblem() {
        return this.problem;
    }
}

class Answerpaper {
    Paper paper;
    static int num = 0;
    String answer;
    private boolean result;

    public Answerpaper(int number, int num, String standardAnswer, String answer, String content) {
        this.answer = answer;
        paper = new Paper(number, standardAnswer, num, content);
    }

    public boolean numjudgeAnswer(int num) {
        return true;
    }

    public void printlnof() {
        System.out.printf("%s", paper.getProblem().content);
    }

    public void printresult() {
        System.out.printf("~%s\n", paper.getProblem().standardAnswer);
    }
}
    

 

 我的基本思路是將輸入的問題,試卷,答卷分割成各個部分,並儲存進Answerpaper類。Answerpaper類中有paper類,paper類中有problem類儲存題目,這樣一來就可通過引用答卷類從而對答卷上的答題信息進行正誤的判斷,將三種信息很好的關聯了起來,我為了分割字元串還在"main"函數中定義了一個二維字元串數組。。。而我分割輸入就是通過"N","S","T"來判斷輸入是問題還是試卷還是答卷。再使用split()和substring函數從而做到將多餘的字元去掉從而得到需要的

看上去我對類的設計非常不錯,三個類分的很好,但是但是我類中的變數都不是private(私有的),從而很嚴重的破壞了類的封裝性。主要是當時也為了圖方便,想著直接引用就行了,還不用寫getter方法 ,但是卻忘了最重要的類的封裝性。

還有就是我在主方法裡面分割字元串(還分割的很複雜),主方法裡面就只能做兩件事就是輸入輸出,但是我卻在主方法裡面做了別的事,這是不可取得

然後就是我沒有用正則表達式(最簡便得方法),正則表達式我竟然學了沒用,本來這道題就是考察正則表達式的。嘆。。。(無力感)

 

 額,這裡Main函數是紅色,因為字元串的分割全在Main函數中,要加一個splitinput類去解決這個問題。

 

 啊,這個Main函數實在是太複雜了呀,二維的字元串數組真的是太複雜了,所以一定要有一個splitinput類去解決問題,而且要使用正則表達式啊,這真的是廢物代碼啊。連複雜度為6的代碼都有,真的需要去好好改進。所以第一次代碼簡直跟寫C語言一樣(沒有可讀性

 

題目2:

設計實現答題程式,模擬一個小型的測試,以下粗體字顯示的是在答題判題程式-1基礎上增補或者修改的內容。

要求輸入題目信息、試卷信息和答題信息,根據輸入題目信息中的標準答案判斷答題的結果。

輸入格式:

程式輸入信息分三種,三種信息可能會打亂順序混合輸入:

1、題目信息

   一行為一道題,可輸入多行數據(多道題)。

   格式:"#N:"+題目編號+" "+"#Q:"+題目內容+" "#A:"+標準答案

格式約束:

    1、題目的輸入順序與題號不相關,不一定按題號順序從小到大輸入。
    2、允許題目編號有缺失,例如:所有輸入的題號為1、2、5,缺少其中的3號題。此種情況視為正常。

   樣例:#N:1 #Q:1+1= #A:2

         #N:2 #Q:2+2= #A:4

2、試卷信息

一行為一張試卷,可輸入多行數據(多張捲)。

格式:"#T:"+試卷號+" "+題目編號+"-"+題目分值

     題目編號應與題目信息中的編號對應。

     一行信息中可有多項題目編號與分值。

樣例:#T:1 3-5 4-8 5-2

3、答卷信息

    答卷信息按行輸入,每一行為一張答卷的答案,每組答案包含某個試卷信息中的題目的解題答案,答案的順序與試卷信息中的題目順序相對應。

   格式:"#S:"+試卷號+" "+"#A:"+答案內容

   格式約束:答案數量可以不等於試卷信息中題目的數量,沒有答案的題目計0分,多餘的答案直接忽略,答案之間以英文空格分隔。

   樣例:#S:1 #A:5 #A:22

       1是試卷號 

       5是1號試卷的順序第1題的題目答案

       22是1號試卷的順序第2題的題目答案

   答題信息以一行"end"標記結束,"end"之後的信息忽略。

輸出格式:

1、試卷總分警示

該部分僅當一張試卷的總分分值不等於100分時作提示之用,試卷依然屬於正常試卷,可用於後面的答題。如果總分等於100分,該部分忽略,不輸出。

   格式:"alert: full score of test paper"+試卷號+" is not 100 points"

   樣例:alert: full score of test paper2 is not 100 points

2、答卷信息

   一行為一道題的答題信息,根據試卷的題目的數量輸出多行數據。

   格式:題目內容+"~"+答案++"~"+判題結果(true/false)

約束:如果輸入的答案信息少於試卷的題目數量,答案的題目要輸"answer is null"   

樣例:   3+2=~5~true

         4+6=~22~false.

      answer is null

3、判分信息

   判分信息為一行數據,是一條答題記錄所對應試卷的每道小題的計分以及總分,計分輸出的先後順序與題目題號相對應。

   格式:題目得分+" "+....+題目得分+"~"+總分

   格式約束:

 1、沒有輸入答案的題目計0分

 2、判題信息的順序與輸入答題信息中的順序相同
 

   樣例:5 8 0~13

根據輸入的答卷的數量以上2、3項答卷信息與判分信息將重覆輸出。

4、提示錯誤的試卷號

如果答案信息中試卷的編號找不到,則輸出”the test paper number does not exist”,參見樣例9。

 

設計建議:

參考答題判題程式-1,建議增加答題類,類的內容以及類之間的關聯自行設計。

代碼:

import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Question question = new Question();
        ScoreSumJudge scoresumjudge = new ScoreSumJudge();
        AnswerQuestion answerquestion = new AnswerQuestion();
        SplitInput splitinput = new SplitInput();
        int QuestionSum = 0, PaperSum = 0, AnswerSum = 0;
        String input[] = new String[100];
        for (int i = 1; i < i + 1; i++) {
            input[i] = sc.nextLine();
            if (input[i].equals("end"))
                break;
        }
        int i = 1;
        while (!(input[i].equals("end"))) {
            splitinput.setInput(input[i]);
            if (input[i].charAt(1) == 'N') {
                splitinput.splitQuestion();
                if (splitinput.getQuestionNum() > QuestionSum) {
                    QuestionSum = splitinput.getQuestionNum();
                }
                question.setQuestion(QuestionSum, splitinput.getQuestionNum(), splitinput.getQuestion(), splitinput.getStandardAnswer());

            }
            i++;
        }
        i = 1;
        while (!(input[i].equals("end"))) {
            splitinput.setInput(input[i]);
            if (input[i].charAt(1) == 'T') {
                splitinput.splitPaper();
                if (splitinput.getPaperNum() > PaperSum) {
                    PaperSum = splitinput.getPaperNum();
                }
                scoresumjudge.setScore(PaperSum, splitinput.getPaperNum(), splitinput.getPaperQuestionNum(), splitinput.getPaperQuestionMark());
                answerquestion.setPaper(PaperSum, splitinput.getPaperNum());
                answerquestion.getPaper()[splitinput.getPaperNum()].setPaper(splitinput.getPaperQuestionSum(), splitinput.getPaperQuestionNum(), splitinput.getPaperQuestionMark(), question);
            }
            i++;
        }
        scoresumjudge.printResult();
        i = 1;
        while (!(input[i].equals("end"))) {
            splitinput.setInput(input[i]);
            if (input[i].charAt(1) == 'S') {
                splitinput.splitAnswer();
                if (splitinput.getAnswerPaperNum() > AnswerSum) {
                    AnswerSum = splitinput.getAnswerPaperNum();
                }
                answerquestion.setAnswerPaper(AnswerSum, splitinput.getAnswerPaperNum());
                answerquestion.getAnswerPaper()[splitinput.getAnswerPaperNum()].setAnswerPaper(splitinput.getAnswer());
                for (int k = 1; k <= answerquestion.getPaperSum(); k++) {
                    if (k == splitinput.getAnswerPaperNum()) {
                        answerquestion.judge(splitinput.getAnswerPaperNum(), question);
                        break;
                    }
                    if (k == answerquestion.getPaperSum()) {
                        System.out.println("The test paper number does not exist");
                        break;
                    }
                }
            }
            i++;
        }
    }
}

class judge {
    AnswerQuestion answerQuestion = new AnswerQuestion();
    Question question = new Question();

    public judge() {

    }

    public judge(AnswerQuestion answerQuestion, Question question) {
        this.answerQuestion = answerQuestion;
        this.question = question;
    }

}

class SplitInput {
    private String Question;
    private String QuestionNum;
    private String StandardAnswer;
    private String Questionmark;
    private String input;
    private int PaperQuestionSum;
    private int AnswerPaperNum;
    private String[] Answer;
    private String PaperNum;
    private int[] PaperQuestionNum;
    private int[] PaperQuestionMark;

    public SplitInput() {

    }

    public SplitInput(String input) {
        this.input = input;
    }

    public void setInput(String input) {
        this.input = input;
    }

    public void splitQuestion() {
        input = input.replaceAll(" #A", "");
        String s[] = input.split(":");
        while (s[1].charAt(s[1].length() - 1) == ' ' || s[1].charAt(s[1].length() - 1) == '#' || s[1].charAt(s[1].length() - 1) == 'Q') {
            s[1] = s[1].substring(0, s[1].length() - 1);
        }
        while (s[2].charAt(s[2].length() - 1) == ' ' || s[2].charAt(s[2].length() - 1) == '#' || s[2].charAt(s[2].length() - 1) == 'A') {
            s[2] = s[2].substring(0, s[2].length() - 1);
        }
        this.QuestionNum = s[1];
        this.Question = s[2];
        this.StandardAnswer = s[3];
    }

    public void splitPaper() {
        input = input.replaceAll("#T:", "");
        input = input.replaceAll("#A:", "");
        input = input.replaceAll("#Q:", "");
        String[] s = input.split("\\s+");
        PaperQuestionNum = new int[s.length];
        PaperQuestionMark = new int[s.length];
        PaperNum = s[0];
        PaperQuestionSum = s.length - 1;
        for (int i = 1; i < s.length; i++) {
            String[] ss = s[i].split("-");
            PaperQuestionNum[i] = Integer.parseInt(ss[0]);
            PaperQuestionMark[i] = Integer.parseInt(ss[1]);
        }
    }

    public void splitAnswer() {
        input = input.replaceAll("#S:", "");
        input = input.replaceAll("#A:", "");
        String[] s = input.split("\\s+");
        this.AnswerPaperNum = Integer.parseInt(s[0]);
        this.Answer = new String[s.length];
        for (int i = 1; i < s.length; i++) {
            this.Answer[i] = s[i];
        }
    }

    public int getQuestionNum() {
        return Integer.parseInt(this.QuestionNum);
    }

    public String getQuestion() {
        return this.Question;
    }

    public String getStandardAnswer() {
        return this.StandardAnswer;
    }

    public int getPaperQuestionSum() {
        return PaperQuestionSum;
    }

    public int getPaperNum() {
        return Integer.parseInt(this.PaperNum);
    }

    public int[] getPaperQuestionNum() {
        return this.PaperQuestionNum;
    }

    public int[] getPaperQuestionMark() {
        return this.PaperQuestionMark;
    }

    public int getAnswerPaperNum() {
        return this.AnswerPaperNum;
    }

    public String[] getAnswer() {
        return this.Answer;
    }
}

class ScoreSumJudge {
    private int MarkSum;
    private int PaperSum = 0;
    private String result[] = new String[PaperSum + 1];
    private int PaperQuestionNum[] = new int[PaperSum + 1];
    private int score[] = new int[PaperSum + 1];

    public ScoreSumJudge() {

    }

    public void upDate() {
        String result2[] = new String[PaperSum + 1];
        for (int i = 1; i < this.result.length; i++) {
            result2[i] = result[i];
        }
        result = new String[PaperSum];
        result = result2;
    }

    public void setScore(int PaperSum, int PaperNum, int[] PaperQuestionNum, int[] PaperQuestionMark) {
        this.PaperSum = PaperSum;
        this.MarkSum = 0;
        this.upDate();
        for (int i = 1; i < PaperQuestionNum.length; i++) {
            MarkSum += PaperQuestionMark[i];
        }
        if (MarkSum != 100)
            result[PaperNum] = "alert: full score of test paper" + PaperNum + " is not 100 points";
        else
            result[PaperNum] = "";
    }

    public void printResult() {
        for (int i = 1; i < result.length; i++) {
            if (!(result[i].equals(""))) {
                System.out.println(result[i]);
            }
        }
    }
}

class AnswerQuestion {
    private int AnswerSum = 0;
    private int PaperSum = 0;
    AnswerPaper answerPaper[] = new AnswerPaper[AnswerSum + 1];
    Paper paper[] = new Paper[PaperSum + 1];

    public AnswerQuestion() {

    }

    public int getPaperSum() {
        return this.PaperSum;
    }

    public int getAnswerSum() {
        return this.PaperSum;
    }

    public void upDatePaper() {
        Paper paper2[] = new Paper[PaperSum + 1];
        for (int i = 1; i < paper.length; i++) {
            paper2[i] = paper[i];
        }
        this.paper = new Paper[PaperSum + 1];
        this.paper = paper2;
    }

    public void upDateAnswerPaper() {
        AnswerPaper answerPaper2[] = new AnswerPaper[AnswerSum + 1];
        for (int i = 1; i < answerPaper.length; i++) {
            answerPaper2[i] = answerPaper[i];
        }
        answerPaper = new AnswerPaper[AnswerSum + 1];
        answerPaper = answerPaper2;
    }

    public void setPaper(int PaperSum, int PaperNum) {
        this.PaperSum = PaperSum;
        this.upDatePaper();
        paper[PaperNum] = new Paper();
    }

    public void judge(int AnswerNum, Question question) {
        int mark = 0;
        if (this.getAnswerPaper()[AnswerNum].getAnswer().length - 1 == this.getPaper()[AnswerNum].getPaperSum()) {
            for (int i = 1; i <= this.getPaper()[AnswerNum].getPaperSum(); i++) {
                if (this.getAnswerPaper()[AnswerNum].getAnswer()[i].equals(question.getStandardAnswer()[this.getPaper()[AnswerNum].getPaperQuestionNum()[i]])) {
                    System.out.println(question.getQuestion()[this.getPaper()[AnswerNum].getPaperQuestionNum()[i]] + "~" + this.getAnswerPaper()[AnswerNum].getAnswer()[i] + "~" + "true");
                    mark += this.getPaper()[AnswerNum].getPaperQuestionMark()[i];
                } else {
                    System.out.println(question.getQuestion()[this.getPaper()[AnswerNum].getPaperQuestionNum()[i]] + "~" + this.getAnswerPaper()[AnswerNum].getAnswer()[i] + "~" + "false");

                }
            }
            for (int i = 1; i <= this.getPaper()[AnswerNum].getPaperSum(); i++) {
                if (this.getAnswerPaper()[AnswerNum].getAnswer()[i].equals(question.getStandardAnswer()[this.getPaper()[AnswerNum].getPaperQuestionNum()[i]])) {
                    if (i == this.getPaper()[AnswerNum].getPaperSum())
                        System.out.printf("%s~", this.getPaper()[AnswerNum].getPaperQuestionMark()[i]);
                    else
                        System.out.printf("%s ", this.getPaper()[AnswerNum].getPaperQuestionMark()[i]);
                } else	   

您的分享是我們最大的動力!

-Advertisement-
Play Games
更多相關文章
  • 本文介紹基於Python語言中ArcPy模塊,實現ArcMap自動批量出圖,並對地圖要素進行自定義批量設置的方法。 1 任務需求 首先,我們來明確一下本文所需實現的需求。 現有通過Python基於Excel數據加以反距離加權空間插值並掩膜圖層所繪製的北京市在2019年05月18日00時至23時(其中 ...
  • 1. OSI 7層模型 OSI的7層模型對於大家來說可能不太好理解,所以我們通過一個案例來講解: 假設,你在瀏覽器上輸入了一些關鍵字,內部通過DNS找到對應的IP後,再發送數據時內部會做如下的事: 應用層:規定數據的格式。 "GET /s?wd=你好 HTTP/1.1\r\nHost:www.bai ...
  • 前言 整理這個官方翻譯的系列,原因是網上大部分的 tomcat 版本比較舊,此版本為 v11 最新的版本。 開源項目 從零手寫實現 tomcat minicat 別稱【嗅虎】心有猛虎,輕嗅薔薇。 系列文章 web server apache tomcat11-01-官方文檔入門介紹 web serv ...
  • 目錄1. #include <stdio.h>2.int 整形數據類型3.main 函數4.printf 函數5.return 函數6.”{}”與“;” “Hellow world!"是初學者的第一份代碼,可以說所學萬物代碼之基礎。下麵看一下代碼是如何實現的: 代碼雖然簡潔,但是包含了許多C語言的知 ...
  • Python的下載安裝和環境搭建,以及python的IDE工具PyCharm搭建及常用配置教程,可以讓新人快速上手python的使用。 ...
  • 以下是個人總結的Java常用的十大開源工具類庫,根據具體需求和項目,可以選擇合適的工具類庫來提高開發效率。1. Apache Commons:Apache Commons是一個開源的工具類庫,提供了大量常用的工具類和組件,如StringUtils、IOUtils、CollectionUtils等。2 ...
  • 1.為什麼使用索引 索引是存儲引擎用於快速找到數據記錄的一種數據結構,就好比一本書的目錄部分,通過目錄中找到對應文章的頁碼,便可快速定位到需要的文章。MySQL中的索引也是一樣的道理,進行數據查找時,首先查看查詢條件是否命中某條索引,符合則通過索引查找相關數據,如果不符合則需要全表掃描,即需要一條條 ...
  • 1.前言: 第一次作業難度較大,從無到有的設計,涉及到的主要類有Paper,Question,AnswerPaper,Main,主要題目方向為字元串判斷與字元串處理(提取有效信息),判斷對錯算總分,配合一些Java自帶的數據結構如ArrayList即可快速解決問題,第一次作業是後面作業的基礎,需自行 ...
一周排行
    -Advertisement-
    Play Games
  • .Net8.0 Blazor Hybird 桌面端 (WPF/Winform) 實測可以完整運行在 win7sp1/win10/win11. 如果用其他工具打包,還可以運行在mac/linux下, 傳送門BlazorHybrid 發佈為無依賴包方式 安裝 WebView2Runtime 1.57 M ...
  • 目錄前言PostgreSql安裝測試額外Nuget安裝Person.cs模擬運行Navicate連postgresql解決方案Garnet為什麼要選擇Garnet而不是RedisRedis不再開源Windows版的Redis是由微軟維護的Windows Redis版本老舊,後續可能不再更新Garne ...
  • C#TMS系統代碼-聯表報表學習 領導被裁了之後很快就有人上任了,幾乎是無縫銜接,很難讓我不想到這早就決定好了。我的職責沒有任何變化。感受下來這個系統封裝程度很高,我只要會調用方法就行。這個系統交付之後不會有太多問題,更多應該是做小需求,有大的開發任務應該也是第二期的事,嗯?怎麼感覺我變成運維了?而 ...
  • 我在隨筆《EAV模型(實體-屬性-值)的設計和低代碼的處理方案(1)》中介紹了一些基本的EAV模型設計知識和基於Winform場景下低代碼(或者說無代碼)的一些實現思路,在本篇隨筆中,我們來分析一下這種針對通用業務,且只需定義就能構建業務模塊存儲和界面的解決方案,其中的數據查詢處理的操作。 ...
  • 對某個遠程伺服器啟用和設置NTP服務(Windows系統) 打開註冊表 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer 將 Enabled 的值設置為 1,這將啟用NTP伺服器功 ...
  • title: Django信號與擴展:深入理解與實踐 date: 2024/5/15 22:40:52 updated: 2024/5/15 22:40:52 categories: 後端開發 tags: Django 信號 松耦合 觀察者 擴展 安全 性能 第一部分:Django信號基礎 Djan ...
  • 使用xadmin2遇到的問題&解決 環境配置: 使用的模塊版本: 關聯的包 Django 3.2.15 mysqlclient 2.2.4 xadmin 2.0.1 django-crispy-forms >= 1.6.0 django-import-export >= 0.5.1 django-r ...
  • 今天我打算整點兒不一樣的內容,通過之前學習的TransformerMap和LazyMap鏈,想搞點不一樣的,所以我關註了另外一條鏈DefaultedMap鏈,主要調用鏈為: 調用鏈詳細描述: ObjectInputStream.readObject() DefaultedMap.readObject ...
  • 後端應用級開發者該如何擁抱 AI GC?就是在這樣的一個大的浪潮下,我們的傳統的應用級開發者。我們該如何選擇職業或者是如何去快速轉型,跟上這樣的一個行業的一個浪潮? 0 AI金字塔模型 越往上它的整個難度就是職業機會也好,或者說是整個的這個運作也好,它的難度會越大,然後越往下機會就會越多,所以這是一 ...
  • @Autowired是Spring框架提供的註解,@Resource是Java EE 5規範提供的註解。 @Autowired預設按照類型自動裝配,而@Resource預設按照名稱自動裝配。 @Autowired支持@Qualifier註解來指定裝配哪一個具有相同類型的bean,而@Resourc... ...