From 5e8cfed6cd8e19806a44267393c93b0f6d461715 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Wed, 24 Jul 2019 13:20:00 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=93=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 0a19f1c08..4382dff94 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -209,10 +209,10 @@ class MyshixunsController < ApplicationController end uid_logger("training_task_status start#4**#{game_id}**** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}") sucess_status - rescue Exception => e - tip_exception(e.message) - uid_logger_error("training_task_status error: #{e}") - raise ActiveRecord::Rollback + # rescue Exception => e + # tip_exception(e.message) + # uid_logger_error("training_task_status error: #{e}") + # raise ActiveRecord::Rollback end end end From b9e88f1d1c1073a8c9f9fbf4bd2d5fd7f12a2c88 Mon Sep 17 00:00:00 2001 From: jingquan huang Date: Wed, 24 Jul 2019 13:27:11 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 4382dff94..41b02f8ab 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -93,6 +93,7 @@ class MyshixunsController < ApplicationController ActiveRecord::Base.transaction do begin t1 = Time.now + Rails.logger.info("@@@222222#{params[:jsonTestDetails]}") jsonTestDetails = JSON.parse(params[:jsonTestDetails]) timeCost = JSON.parse(params[:timeCost]) brige_end_time = Time.parse(timeCost['evaluateEnd']) if timeCost['evaluateEnd'].present? From 3ba0a4bc9523c210a97f18f9672de637c42f1bfc Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Jul 2019 13:42:55 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 0a19f1c08..237f4b350 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -93,7 +93,7 @@ class MyshixunsController < ApplicationController ActiveRecord::Base.transaction do begin t1 = Time.now - jsonTestDetails = JSON.parse(params[:jsonTestDetails]) + jsonTestDetails = JSON.parse(params[:jsonTestDetails].to_json) timeCost = JSON.parse(params[:timeCost]) brige_end_time = Time.parse(timeCost['evaluateEnd']) if timeCost['evaluateEnd'].present? return_back_time = format("%.3f", ( t1.to_f - brige_end_time.to_f)).to_f @@ -131,7 +131,10 @@ class MyshixunsController < ApplicationController logger.info "actual_output:################################################# #{actual_output}" ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).to_f ts_mem = format("%.2f", j_test_set['testSetMem'].to_f/1024/1024).to_f - + sql = Output.create!(:code => status, :game_id => game_id, :out_put => outPut, :test_set_position => j_test_set['caseId'], + :actual_output => actual_output, :result => j_test_set['passed'].to_i, :query_index => max_query_index, + :compile_success => compile_success.to_i, :sec_key => sec_key, :ts_time => ts_time, :ts_mem => ts_mem).to_sql + logger.info("outputs_sql: #{sql}") Output.create!(:code => status, :game_id => game_id, :out_put => outPut, :test_set_position => j_test_set['caseId'], :actual_output => actual_output, :result => j_test_set['passed'].to_i, :query_index => max_query_index, :compile_success => compile_success.to_i, :sec_key => sec_key, :ts_time => ts_time, :ts_mem => ts_mem) From a00edf38ec600c4cb2ecd576203d5784cef905e3 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Jul 2019 13:47:31 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E8=AF=84=E6=B5=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 262fbd50c..41b02f8ab 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -132,10 +132,7 @@ class MyshixunsController < ApplicationController logger.info "actual_output:################################################# #{actual_output}" ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).to_f ts_mem = format("%.2f", j_test_set['testSetMem'].to_f/1024/1024).to_f - sql = Output.create!(:code => status, :game_id => game_id, :out_put => outPut, :test_set_position => j_test_set['caseId'], - :actual_output => actual_output, :result => j_test_set['passed'].to_i, :query_index => max_query_index, - :compile_success => compile_success.to_i, :sec_key => sec_key, :ts_time => ts_time, :ts_mem => ts_mem).to_sql - logger.info("outputs_sql: #{sql}") + Output.create!(:code => status, :game_id => game_id, :out_put => outPut, :test_set_position => j_test_set['caseId'], :actual_output => actual_output, :result => j_test_set['passed'].to_i, :query_index => max_query_index, :compile_success => compile_success.to_i, :sec_key => sec_key, :ts_time => ts_time, :ts_mem => ts_mem) From 78a31d1b4b9bdeed1a3525bed88688c97cb858ed Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Jul 2019 13:52:46 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E8=AF=84=E6=B5=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 41b02f8ab..649516a03 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -130,8 +130,8 @@ class MyshixunsController < ApplicationController # is_public = test_sets.where(:position => j_test_set['caseId']).first.try(:is_public) logger.info "actual_output:################################################# #{actual_output}" - ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).to_f - ts_mem = format("%.2f", j_test_set['testSetMem'].to_f/1024/1024).to_f + ts_time = format("%.2f", j_test_set['testSetTime'].to_f/1000000000).to_f if j_test_set['testSetTime'] + ts_mem = format("%.2f", j_test_set['testSetMem'].to_f/1024/1024).to_f if j_test_set['testSetMem'] Output.create!(:code => status, :game_id => game_id, :out_put => outPut, :test_set_position => j_test_set['caseId'], :actual_output => actual_output, :result => j_test_set['passed'].to_i, :query_index => max_query_index, From baa38da183b485bcfbfe335af788aafd12b7dd02 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Jul 2019 13:57:39 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E6=B2=A1=E4=BB=A3=E7=A0=81=E7=9A=84?= =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E8=AF=84=E6=B5=8B=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index cf7ac6d2e..2ab0c6649 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -319,6 +319,7 @@ class ApplicationController < ActionController::Base # 通关后,把最后一次成功的代码存到数据库 # type 0 创始内容, 1 最新内容 def game_passed_code(path, myshixun, game_id) + return if path.blank? file_content = git_fle_content myshixun.repo_path, path unless file_content.present? raise("获取文件代码异常") From b0171aef5dba65d5319e2535af0897168a51899e Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Wed, 24 Jul 2019 14:01:28 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E9=9A=90=E8=97=8F=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E7=9A=84=E5=AE=9E=E8=AE=AD=E3=80=82=E8=AF=84?= =?UTF-8?q?=E6=B5=8B=E9=80=9A=E8=BF=87=E4=B8=8D=E4=BF=9D=E5=AD=98=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/application_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2ab0c6649..5eca6ccf9 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -319,7 +319,8 @@ class ApplicationController < ActionController::Base # 通关后,把最后一次成功的代码存到数据库 # type 0 创始内容, 1 最新内容 def game_passed_code(path, myshixun, game_id) - return if path.blank? + # 如果代码窗口是隐藏的,则不用保存代码 + return if myshixun.shixun.hide_code file_content = git_fle_content myshixun.repo_path, path unless file_content.present? raise("获取文件代码异常") From d3eee68c74f7fafe9bce2c033efefa0223a64772 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 24 Jul 2019 14:08:18 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/Interestpage.js | 6 +++--- public/react/src/modules/user/InterestpageMax.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/public/react/src/modules/user/Interestpage.js b/public/react/src/modules/user/Interestpage.js index 4c3c39406..b3abfe1a4 100644 --- a/public/react/src/modules/user/Interestpage.js +++ b/public/react/src/modules/user/Interestpage.js @@ -258,15 +258,15 @@ class InterestpageComponent extends Component {
this.Clickteacher("teacher")}>{gouxuans ==="teacher"? :}老师
-
+
this.Clickteacher("teacher")} src={skzbdx} className="ysldivhomedivimg"/>
this.Clickteacher("student")}>{gouxuans==="student"? :}学生
-
+
this.Clickteacher("student")} src={mytc} className="ysldivhomedivimg"/>
this.Clickteacher("professional")}>{gouxuans==="professional"?:}专业人士
-
+
this.Clickteacher("professional")} src={zyrs1} className="ysldivhomedivimg"/>

选择你可能感兴趣的内容

diff --git a/public/react/src/modules/user/InterestpageMax.js b/public/react/src/modules/user/InterestpageMax.js index 82b3e7e0f..a53c1bbe0 100644 --- a/public/react/src/modules/user/InterestpageMax.js +++ b/public/react/src/modules/user/InterestpageMax.js @@ -260,15 +260,15 @@ class InterestpageMax extends Component {
this.Clickteacher("teacher")}>{gouxuans ==="teacher"? :}老师
-
+
this.Clickteacher("teacher")} src={skzbdx} className="ysldivhomedivimg2"/>
this.Clickteacher("student")}>{gouxuans==="student"? :}学生
-
+
this.Clickteacher("student")} src={mytc} className="ysldivhomedivimg2"/>
this.Clickteacher("professional")}>{gouxuans==="professional"?:}专业人士
-
+
this.Clickteacher("professional")} src={zyrs1} className="ysldivhomedivimg2"/>
选择你可能感兴趣的内容