private void SetTestCaseResult(TblCompiledQuestionsData compiledData, TblCompiledAnswers compileAnswer) { var inputCell = new TableCell { Text = compiledData.Input }; var expectedOutputCell = new TableCell { Text = compiledData.Output }; var userOutputCell = new TableCell { Text = compileAnswer.Output }; var timeUsedCell = new TableCell { Text = compileAnswer.TimeUsed.ToString() }; var memoryUsedCell = new TableCell { Text = compileAnswer.MemoryUsed.ToString() }; var statusCell = new TableCell { Text = ((Status)compileAnswer.StatusRef).ToString() }; var tableRow = new TableRow(); tableRow.Cells.AddRange(new[] { inputCell, expectedOutputCell, userOutputCell, timeUsedCell, memoryUsedCell, statusCell }); _compiledAnswerTable.Rows.Add(tableRow); }
private static void StoreData(int compiledQuestionRef, string input, string ouput) { var cqd = new TblCompiledQuestionsData { CompiledQuestionRef = compiledQuestionRef, Input = input, Output = ouput }; ServerModel.DB.Insert(cqd); }
private static void StoreData(int compiledQuestionRef, string input, string ouput) { var cqd = new TblCompiledQuestionsData { CompiledQuestionRef = compiledQuestionRef, Input = input, Output = ouput }; ServerModel.DB.Insert(cqd); }
private static TblCompiledAnswers StorePreCompiledAnswer(TblUserAnswers ans, TblCompiledQuestionsData data) { var compiledAnswer = new TblCompiledAnswers { MemoryUsed = 0, TimeUsed = 0, StatusRef = (int)Status.Enqueued, Output = string.Empty, UserAnswerRef = ans.ID, CompiledQuestionsDataRef = data.ID }; ServerModel.DB.Insert(compiledAnswer); return(compiledAnswer); }
private void SetTestCaseResult(TblCompiledQuestionsData compiledData, TblCompiledAnswers compileAnswer) { var inputCell = new TableCell {Text = compiledData.Input}; var expectedOutputCell = new TableCell {Text = compiledData.Output}; var userOutputCell = new TableCell {Text = compileAnswer.Output}; var timeUsedCell = new TableCell {Text = compileAnswer.TimeUsed.ToString()}; var memoryUsedCell = new TableCell {Text = compileAnswer.MemoryUsed.ToString()}; var statusCell = new TableCell {Text = ((Status) compileAnswer.StatusRef).ToString()}; var tableRow = new TableRow(); tableRow.Cells.AddRange(new[]{inputCell, expectedOutputCell, userOutputCell, timeUsedCell, memoryUsedCell, statusCell}); _compiledAnswerTable.Rows.Add(tableRow); }
private void SetTestCaseResult(TblCompiledQuestionsData compiledData, TblCompiledAnswers compileAnswer) { var tableRow = new TableRow(); if (ServerModel.User.Current.Islector()) { var inputCell = new TableCell { Text = MakeSpaceAndEnterVisible(compiledData.Input) }; var expectedOutputCell = new TableCell { Text = MakeSpaceAndEnterVisible(compiledData.Output) }; tableRow.Cells.AddRange(new[] { inputCell, expectedOutputCell }); } var userOutputCell = new TableCell { Text = MakeSpaceAndEnterVisible(compileAnswer.Output) }; var timeUsedCell = new TableCell { Text = compileAnswer.TimeUsed.ToString() }; var memoryUsedCell = new TableCell { Text = compileAnswer.MemoryUsed.ToString() }; var statusCell = new TableCell { Text = ((Status)compileAnswer.StatusRef).ToString() }; tableRow.Cells.AddRange(new[] { userOutputCell, timeUsedCell, memoryUsedCell, statusCell }); _compiledAnswerTable.Rows.Add(tableRow); }
private void SetTestCaseResult(TblCompiledQuestionsData compiledData, TblCompiledAnswers compileAnswer) { var tableRow = new TableRow(); if (ServerModel.User.Current.Islector()) { var inputCell = new TableCell { Text = MakeSpaceAndEnterVisible(compiledData.Input) }; var expectedOutputCell = new TableCell { Text = MakeSpaceAndEnterVisible(compiledData.Output) }; tableRow.Cells.AddRange(new[] { inputCell, expectedOutputCell }); } var userOutputCell = new TableCell { Text = MakeSpaceAndEnterVisible(compileAnswer.Output) }; var timeUsedCell = new TableCell { Text = compileAnswer.TimeUsed.ToString() }; var memoryUsedCell = new TableCell { Text = compileAnswer.MemoryUsed.ToString() }; var statusCell = new TableCell { Text = ((Status)compileAnswer.StatusRef).ToString() }; tableRow.Cells.AddRange(new[] { userOutputCell, timeUsedCell, memoryUsedCell, statusCell }); _compiledAnswerTable.Rows.Add(tableRow); }
private void PrepateTestCaseForTesting(TblCompiledQuestionsData testCase) { _program.InputTest = testCase.Input; _program.OutputTest = testCase.Output.Replace("\r", string.Empty); }
private static TblCompiledAnswers StorePreCompiledAnswer(TblUserAnswers ans, TblCompiledQuestionsData data) { var compiledAnswer = new TblCompiledAnswers { MemoryUsed = 0, TimeUsed = 0, StatusRef = (int)Status.Enqueued, Output = string.Empty, UserAnswerRef = ans.ID, CompiledQuestionsDataRef = data.ID }; ServerModel.DB.Insert(compiledAnswer); return compiledAnswer; }
private void PrepateTestCaseForTesting(TblCompiledQuestionsData testCase) { _program.InputTest = testCase.Input; _program.OutputTest = testCase.Output.Replace("\r", string.Empty); }
private void PrepateTestCaseForTesting(TblCompiledQuestionsData testCase) { _program.InputTest = testCase.Input; _program.OutputTest = testCase.Output; }
private void PrepateTestCaseForTesting(TblCompiledQuestionsData testCase) { _program.InputTest = testCase.Input; _program.OutputTest = testCase.Output; }