弟弟的问题,我的错

最近我弟弟为了女人和钱和我吵了一架,我真的很伤心。我流泪了,我的伤心,我的后悔,在这一时刻全部到来。

吵架真的影响到我们全家人的心情。我也是其中一个,我知道弟弟这样子错了。可是我也没有资格说他,因为这一错误,也包括了我的成分。我没有做好模样,我没有带好弟弟。虽然我没有和妈吵架过,可是在这孝道之上。我并没有很深入,只是做到了基本,对弟弟的影响不大。从来也没有好好和弟弟谈过这方面的事情。

我和弟弟性格很不同,所以我们的话题很少,但是我们都知道互相都很关心对方。但是,平时话却很少。每次电话,都是几句而已。这些都是我的问题,没有沟通,我们的话题总是不会增加。不过还好,因为我弟弟也是一个很老实的人。我一定以后多和我弟弟谈谈生活方面的各种事情,让他真正的长大,虽然我也并不算很大。只是让他能理解一个长辈对晚辈的关爱,让他感受到我们对他的关心,让他慢慢体会到,认识到。

前端页面代码示例(使用jQuery实现): HTML部分: ```html <!-- 题目显示区域 --> <div id="question"> <p id="timu"></p> <input type="text" id="answer" placeholder="请输入答案" /> <button id="submit">提交</button> </div> <!-- 正确/误提示区域 --> <div id="result"></div> <!-- 我的题集区域 --> <div id="error-questions"> <h3>我的题集</h3> <ul id="error-list"></ul> </div> ``` JavaScript部分: ```javascript $(function() { // 随机获取一道题目 $.ajax({ url: "/getQuestion", type: "get", dataType: "json", success: function(data) { $("#timu").text(data.timu); } }); // 提交答案 $("#submit").click(function() { var answer = $("#answer").val(); $.ajax({ url: "/checkAnswer", type: "post", dataType: "json", data: {answer: answer}, success: function(data) { if (data.result == "correct") { $("#result").text("正确"); } else { $("#result").text("误"); } // 更新我的题集 updateErrorQuestions(); } }); }); // 更新我的题集 function updateErrorQuestions() { $.ajax({ url: "/getErrorQuestions", type: "get", dataType: "json", success: function(data) { var errorList = $("#error-list"); errorList.empty(); for (var i = 0; i < data.length; i++) { errorList.append("<li>" + data[i].timu + ",答案:" + data[i].answer + "</li>"); } } }); } }); ``` 后端代码示例(使用Spring+MyBatis实现): Controller部分: ```java @Controller public class QuestionController { @Autowired private QuestionService questionService; // 获取一道随机题目 @RequestMapping("/getQuestion") @ResponseBody public Question getQuestion() { return questionService.getRandomQuestion(); } // 检查答案是否正确 @RequestMapping(value = "/checkAnswer", method = RequestMethod.POST) @ResponseBody public Map<String, String> checkAnswer(@RequestParam("answer") String answer) { Map<String, String> result = new HashMap<String, String>(); if (questionService.checkAnswer(answer)) { result.put("result", "correct"); } else { result.put("result", "wrong"); } return result; } // 获取题集 @RequestMapping("/getErrorQuestions") @ResponseBody public List<Question> getErrorQuestions() { return questionService.getErrorQuestions(); } } ``` Service部分: ```java @Service public class QuestionService { @Autowired private QuestionMapper questionMapper; // 获取一道随机题目 public Question getRandomQuestion() { int total = questionMapper.getTotalQuestions(); int randomIndex = (int) (Math.random() * total); return questionMapper.getQuestionByIndex(randomIndex); } // 检查答案是否正确 public boolean checkAnswer(String answer) { Question question = getRandomQuestion(); boolean result = question.getAnswer().equals(answer); if (result) { question.setMark(0); questionMapper.updateQuestionMark(question); } else { question.setMark(1); questionMapper.updateQuestionMark(question); } return result; } // 获取题集 public List<Question> getErrorQuestions() { return questionMapper.getErrorQuestions(); } } ``` Mapper部分: ```java public interface QuestionMapper { int getTotalQuestions(); Question getQuestionByIndex(int index); void updateQuestionMark(Question question); List<Question> getErrorQuestions(); } ``` 以上代码仅为示例,实际实现中需要根据具体需求进行修改和完善。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值