You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(128) |
Jun
(97) |
Jul
(13) |
Aug
(40) |
Sep
(50) |
Oct
(27) |
Nov
(7) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(18) |
Feb
(47) |
Mar
(7) |
Apr
|
May
|
Jun
|
Jul
(32) |
Aug
|
Sep
(14) |
Oct
(22) |
Nov
|
Dec
|
From: <br...@us...> - 2009-07-23 12:14:59
|
Revision: 537 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=537&view=rev Author: brus07 Date: 2009-07-23 12:14:57 +0000 (Thu, 23 Jul 2009) Log Message: ----------- Moved one library from lib folder to test_files and change copy script. (this for test, in feature will move all need library to test_files). Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj Added Paths: ----------- nera/projects/nera.tester.runner/trunk/test_files/lib/ nera/projects/nera.tester.runner/trunk/test_files/lib/Plugin.dll Removed Paths: ------------- nera/projects/nera.tester.runner/trunk/lib/Plugin.dll Deleted: nera/projects/nera.tester.runner/trunk/lib/Plugin.dll =================================================================== (Binary files differ) Modified: nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj 2009-07-23 10:50:06 UTC (rev 536) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj 2009-07-23 12:14:57 UTC (rev 537) @@ -80,7 +80,7 @@ <Mas>C:\MyProject\Des</Mas> </PropertyGroup> <Target Name="AfterBuild"> - <Copy SourceFiles="lib/Plugin.dll" DestinationFolder="$(OutputPath)" /> + <Copy SourceFiles="test_files/lib/Plugin.dll" DestinationFolder="$(OutputPath)" /> </Target> <PropertyGroup> <PostBuildEvent> Modified: nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-23 10:50:06 UTC (rev 536) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-23 12:14:57 UTC (rev 537) @@ -62,7 +62,7 @@ <MySourceFiles Include="test_files\test1\**\*.*" Exclude="test_files\test1\**\.svn\**\*.*" /> </ItemGroup> <Target Name="AfterBuild"> - <Copy SourceFiles="lib/Plugin.dll" DestinationFolder="$(OutputPath)" /> + <Copy SourceFiles="test_files/lib/Plugin.dll" DestinationFolder="$(OutputPath)" /> <Copy SourceFiles="@(MySourceFiles)" DestinationFiles="@(MySourceFiles->'$(OutputPath)\%(RecursiveDir)%(Filename)%(Extension)')" /> </Target> </Project> \ No newline at end of file Copied: nera/projects/nera.tester.runner/trunk/test_files/lib/Plugin.dll (from rev 525, nera/projects/nera.tester.runner/trunk/lib/Plugin.dll) =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-23 10:50:19
|
Revision: 536 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=536&view=rev Author: brus07 Date: 2009-07-23 10:50:06 +0000 (Thu, 23 Jul 2009) Log Message: ----------- Remove unused using reference. Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/src/Class1.cs Modified: nera/projects/nera.tester.runner/trunk/src/Class1.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/src/Class1.cs 2009-07-20 13:56:50 UTC (rev 535) +++ nera/projects/nera.tester.runner/trunk/src/Class1.cs 2009-07-23 10:50:06 UTC (rev 536) @@ -5,7 +5,6 @@ using AcmContester.Library.LibraryExtention.Data; using Main; using Test; -using Load; namespace Nera.Tester.Runner { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-20 13:56:52
|
Revision: 535 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=535&view=rev Author: brus07 Date: 2009-07-20 13:56:50 +0000 (Mon, 20 Jul 2009) Log Message: ----------- Don't generate test result in xml file. Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/runTestHardCode.bat Modified: nera/projects/nera.tester.runner/trunk/runTestHardCode.bat =================================================================== --- nera/projects/nera.tester.runner/trunk/runTestHardCode.bat 2009-07-20 12:12:46 UTC (rev 534) +++ nera/projects/nera.tester.runner/trunk/runTestHardCode.bat 2009-07-20 13:56:50 UTC (rev 535) @@ -1,2 +1,2 @@ echo Running unit tests (nera.tester.runner.test) -..\..\..\Tools\nunit-v2.2.8\bin\nunit-console.exe /nologo /labels bin\Release\nera.tester.runner.test.dll \ No newline at end of file +..\..\..\Tools\nunit-v2.2.8\bin\nunit-console.exe /nologo /xml /labels bin\Release\nera.tester.runner.test.dll \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-20 13:12:59
|
Revision: 534 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=534&view=rev Author: brus07 Date: 2009-07-20 12:12:46 +0000 (Mon, 20 Jul 2009) Log Message: ----------- Added new submit test. Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/test/Class1.cs nera/projects/nera.tester.runner/trunk/test/TestsHelper.cs Added Paths: ----------- nera/projects/nera.tester.runner/trunk/test_files/result2.txt nera/projects/nera.tester.runner/trunk/test_files/test2.txt Modified: nera/projects/nera.tester.runner/trunk/test/Class1.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/test/Class1.cs 2009-07-20 12:02:08 UTC (rev 533) +++ nera/projects/nera.tester.runner/trunk/test/Class1.cs 2009-07-20 12:12:46 UTC (rev 534) @@ -18,5 +18,11 @@ SubmitTestingHelper.TestingCodeHelper(TestsHelper.SourceCode1, TestsHelper.Result1); } + [Test] + public void SubmitTest2() + { + SubmitTestingHelper.TestingCodeHelper(TestsHelper.SourceCode2, TestsHelper.Result2); + } + } } Modified: nera/projects/nera.tester.runner/trunk/test/TestsHelper.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/test/TestsHelper.cs 2009-07-20 12:02:08 UTC (rev 533) +++ nera/projects/nera.tester.runner/trunk/test/TestsHelper.cs 2009-07-20 12:12:46 UTC (rev 534) @@ -8,5 +8,8 @@ { internal const string SourceCode1 = "../../test_files/test1.txt"; internal const string Result1 = "../../test_files/result1.txt"; + + internal const string SourceCode2 = "../../test_files/test2.txt"; + internal const string Result2 = "../../test_files/result2.txt"; } } Added: nera/projects/nera.tester.runner/trunk/test_files/result2.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/result2.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/result2.txt 2009-07-20 12:12:46 UTC (rev 534) @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="utf-16"?> +<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <res>Accepted</res> + <result>0</result> + <usedTime>450560</usedTime> + <usedMemory>15</usedMemory> + <compOutput> +d:\Documents\Contester\System\svn\nera\projects\nera.tester.runner\trunk\bin\Release\Compiler\D7>echo off +Borland Delphi Version 15.0 +Copyright (c) 1983,2002 Borland Software Corporation + +d:\Documents\Contester\System\svn\nera\projects\nera.tester.runner\trunk\bin\Release\Temp\source.txt(1) +d:\Documents\Contester\System\svn\nera\projects\nera.tester.runner\trunk\bin\Release\Temp\source.txt(1) +d:\Documents\Contester\System\svn\nera\projects\nera.tester.runner\trunk\bin\Release\Temp\source.txt(1) +d:\Documents\Contester\System\svn\nera\projects\nera.tester.runner\trunk\bin\Release\Temp\source.txt(6) +7 lines, 0.14 seconds, 10864 bytes code, 1805 bytes data. +</compOutput> + <submit> + <id>123</id> + <problem>1</problem> + <sourceCode>var + i:integer; +begin +read(i); +write(i); +end.</sourceCode> + <language>1</language> + </submit> +</result> Added: nera/projects/nera.tester.runner/trunk/test_files/test2.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test2.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test2.txt 2009-07-20 12:12:46 UTC (rev 534) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-16"?> +<submit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <id>123</id> + <problem>1</problem> + <sourceCode>var + i:integer; +begin +read(i); +write(i); +end.</sourceCode> + <language>1</language> +</submit> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-20 12:02:11
|
Revision: 533 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=533&view=rev Author: brus07 Date: 2009-07-20 12:02:08 +0000 (Mon, 20 Jul 2009) Log Message: ----------- Style refactoring. Code refactoring (added new helper). Check only submit result (not whole XML result). Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj nera/projects/nera.tester.runner/trunk/test/Class1.cs Added Paths: ----------- nera/projects/nera.tester.runner/trunk/test/SubmitTestingHelper.cs Modified: nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-20 11:51:36 UTC (rev 532) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-20 12:02:08 UTC (rev 533) @@ -28,6 +28,10 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> + <Reference Include="Data, Version=1.0.3482.26403, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>lib\Data.dll</HintPath> + </Reference> <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\..\Tools\nunit-v2.2.8\nunit.framework.dll</HintPath> @@ -45,6 +49,7 @@ <ItemGroup> <Compile Include="test\Class1.cs" /> <Compile Include="test\Properties\AssemblyInfo.cs" /> + <Compile Include="test\SubmitTestingHelper.cs" /> <Compile Include="test\TestsHelper.cs" /> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> @@ -53,21 +58,11 @@ <Target Name="BeforeBuild"> </Target> --> - <ItemGroup> - <MySourceFiles - Include="test_files\test1\**\*.*" - Exclude="test_files\test1\**\.svn\**\*.*" /> + <MySourceFiles Include="test_files\test1\**\*.*" Exclude="test_files\test1\**\.svn\**\*.*" /> </ItemGroup> - <Target Name="AfterBuild"> - <Copy - SourceFiles="lib/Plugin.dll" - DestinationFolder="$(OutputPath)" - /> - <Copy - SourceFiles="@(MySourceFiles)" - DestinationFiles="@(MySourceFiles->'$(OutputPath)\%(RecursiveDir)%(Filename)%(Extension)')" - /> + <Copy SourceFiles="lib/Plugin.dll" DestinationFolder="$(OutputPath)" /> + <Copy SourceFiles="@(MySourceFiles)" DestinationFiles="@(MySourceFiles->'$(OutputPath)\%(RecursiveDir)%(Filename)%(Extension)')" /> </Target> </Project> \ No newline at end of file Modified: nera/projects/nera.tester.runner/trunk/test/Class1.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/test/Class1.cs 2009-07-20 11:51:36 UTC (rev 532) +++ nera/projects/nera.tester.runner/trunk/test/Class1.cs 2009-07-20 12:02:08 UTC (rev 533) @@ -1,5 +1,4 @@ using NUnit.Framework; -using System.IO; using System; namespace Nera.Tester.Runner.Test @@ -14,22 +13,9 @@ } [Test] - public void Test2() + public void SubmitTest1() { - String code = ""; - using (StreamReader sr = System.IO.File.OpenText(TestsHelper.SourceCode1)) - { - code = sr.ReadToEnd(); - } - string res = Nera.Tester.Runner.Checker.GetResult(code); - - String result = ""; - using (StreamReader sr = System.IO.File.OpenText(TestsHelper.Result1)) - { - result = sr.ReadToEnd(); - } - - Assert.AreEqual(res, result); + SubmitTestingHelper.TestingCodeHelper(TestsHelper.SourceCode1, TestsHelper.Result1); } } Added: nera/projects/nera.tester.runner/trunk/test/SubmitTestingHelper.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/test/SubmitTestingHelper.cs (rev 0) +++ nera/projects/nera.tester.runner/trunk/test/SubmitTestingHelper.cs 2009-07-20 12:02:08 UTC (rev 533) @@ -0,0 +1,37 @@ +using System; +using System.Collections.Generic; +using System.Text; +using NUnit.Framework; +using System.IO; +using AcmContester.Library.LibraryExtention.Data; + +namespace Nera.Tester.Runner.Test +{ + class SubmitTestingHelper + { + public static string ReadTextFromFile(string fileAddress) + { + string result = ""; + using (StreamReader sr = System.IO.File.OpenText(fileAddress)) + { + result = sr.ReadToEnd(); + } + return result; + } + public static void TestingCodeHelper(string file1, string file2) + { + String code = ReadTextFromFile(file1); + + string res = Nera.Tester.Runner.Checker.GetResult(code); + + Result generaterRes = Result.CreateFromXml(res); + + res = ReadTextFromFile(file2); + + Result backupRes = Result.CreateFromXml(res); + + Assert.AreEqual(generaterRes.res, backupRes.res, "Testing result was different"); + //Assert.AreEqual(generaterRes.Submit, backupRes.Submit, "Submit in testing result was different"); + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-20 11:51:39
|
Revision: 532 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=532&view=rev Author: brus07 Date: 2009-07-20 11:51:36 +0000 (Mon, 20 Jul 2009) Log Message: ----------- Style refactoring. Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj Modified: nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj 2009-07-20 11:11:18 UTC (rev 531) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj 2009-07-20 11:51:36 UTC (rev 532) @@ -80,10 +80,7 @@ <Mas>C:\MyProject\Des</Mas> </PropertyGroup> <Target Name="AfterBuild"> - <Copy - SourceFiles="lib/Plugin.dll" - DestinationFolder="$(OutputPath)" - /> + <Copy SourceFiles="lib/Plugin.dll" DestinationFolder="$(OutputPath)" /> </Target> <PropertyGroup> <PostBuildEvent> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-20 11:11:20
|
Revision: 531 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=531&view=rev Author: brus07 Date: 2009-07-20 11:11:18 +0000 (Mon, 20 Jul 2009) Log Message: ----------- Fixed reference in project file. Copy need file (Plugin.dll) to output directory. Copy need file to output directory for testing. Update output test file. Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj nera/projects/nera.tester.runner/trunk/test_files/result1.txt Modified: nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj 2009-07-19 19:50:46 UTC (rev 530) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj 2009-07-20 11:11:18 UTC (rev 531) @@ -28,74 +28,63 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> - <Reference Include="AcmLibraryExtention, Version=1.0.3482.26401, Culture=neutral, processorArchitecture=MSIL" /> - <Reference Include="Data, Version=1.0.3482.26403, Culture=neutral, processorArchitecture=MSIL" /> - <Reference Include="Load, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> - <Reference Include="Main, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="AcmLibraryExtention, Version=1.0.3482.26401, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>lib\AcmLibraryExtention.dll</HintPath> + </Reference> + <Reference Include="Data, Version=1.0.3482.26403, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>lib\Data.dll</HintPath> + </Reference> + <Reference Include="Load, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>lib\Load.dll</HintPath> + </Reference> + <Reference Include="Main, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>lib\Main.dll</HintPath> + </Reference> + <Reference Include="Test, Version=1.0.3320.28735, Culture=neutral, processorArchitecture=x86"> + <SpecificVersion>False</SpecificVersion> + <HintPath>lib\Test.dll</HintPath> + </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> - <Reference Include="Test, Version=1.0.3320.28735, Culture=neutral, processorArchitecture=x86" /> </ItemGroup> <ItemGroup> <Compile Include="src\Class1.cs" /> <Compile Include="src\Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> - <Content Include="lib\AcmLibraryExtention.dll" /> <Content Include="resources\AllowedFunc.txt"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="lib\Checker.dll"> + <Content Include="resources\TesterInData.txt"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="lib\Data.dll" /> - <Content Include="resources\InData.txt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\Load.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\Main.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\MutanticFramework.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\Plugin.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\ScriptDotNet.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> <Content Include="resources\scriptExample.txt"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="lib\Test.dll"> + <Content Include="resources\InData.txt"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </Content> - <Content Include="resources\TesterInData.txt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\VirtualPlugin.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> + --> + <PropertyGroup> + <Mas>C:\MyProject\Des</Mas> + </PropertyGroup> <Target Name="AfterBuild"> <Copy - SourceFiles="@(OutputPath)\resources\*" - DestinationFolder="@(OutputPath)"> - <Output - TaskParameter="CopiedFiles" - ItemName="SuccessfullyCopiedFiles"/> - </Copy> + SourceFiles="lib/Plugin.dll" + DestinationFolder="$(OutputPath)" + /> </Target> - --> <PropertyGroup> <PostBuildEvent> </PostBuildEvent> Modified: nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-19 19:50:46 UTC (rev 530) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-20 11:11:18 UTC (rev 531) @@ -37,22 +37,37 @@ <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> - <Compile Include="test\Class1.cs" /> - <Compile Include="test\Properties\AssemblyInfo.cs" /> - <Compile Include="test\TestsHelper.cs" /> - </ItemGroup> - <ItemGroup> <ProjectReference Include="nera.tester.runner.csproj"> <Project>{052D9F77-17AF-42F3-BFBF-975A19383496}</Project> <Name>nera.tester.runner</Name> </ProjectReference> </ItemGroup> + <ItemGroup> + <Compile Include="test\Class1.cs" /> + <Compile Include="test\Properties\AssemblyInfo.cs" /> + <Compile Include="test\TestsHelper.cs" /> + </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> + --> + + <ItemGroup> + <MySourceFiles + Include="test_files\test1\**\*.*" + Exclude="test_files\test1\**\.svn\**\*.*" /> + </ItemGroup> + <Target Name="AfterBuild"> + <Copy + SourceFiles="lib/Plugin.dll" + DestinationFolder="$(OutputPath)" + /> + <Copy + SourceFiles="@(MySourceFiles)" + DestinationFiles="@(MySourceFiles->'$(OutputPath)\%(RecursiveDir)%(Filename)%(Extension)')" + /> </Target> - --> </Project> \ No newline at end of file Modified: nera/projects/nera.tester.runner/trunk/test_files/result1.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/result1.txt 2009-07-19 19:50:46 UTC (rev 530) +++ nera/projects/nera.tester.runner/trunk/test_files/result1.txt 2009-07-20 11:11:18 UTC (rev 531) @@ -1,13 +1,24 @@ <?xml version="1.0" encoding="utf-16"?> <result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> - <res>Exception</res> + <res>WrongAnswer</res> <result>0</result> - <usedTime>0</usedTime> - <usedMemory>0</usedMemory> + <usedTime>450560</usedTime> + <usedMemory>15</usedMemory> + <compOutput> +d:\Documents\Contester\System\svn\nera\projects\nera.tester.runner\trunk\bin\Release\Compiler\D7>echo off +Borland Delphi Version 15.0 +Copyright (c) 1983,2002 Borland Software Corporation + +d:\Documents\Contester\System\svn\nera\projects\nera.tester.runner\trunk\bin\Release\Temp\source.txt(1) +d:\Documents\Contester\System\svn\nera\projects\nera.tester.runner\trunk\bin\Release\Temp\source.txt(1) +d:\Documents\Contester\System\svn\nera\projects\nera.tester.runner\trunk\bin\Release\Temp\source.txt(1) +d:\Documents\Contester\System\svn\nera\projects\nera.tester.runner\trunk\bin\Release\Temp\source.txt(1) +2 lines, 0.14 seconds, 9132 bytes code, 1793 bytes data. +</compOutput> <submit> <id>123</id> <problem>1</problem> <sourceCode>begin end.</sourceCode> <language>1</language> </submit> -</result> \ No newline at end of file +</result> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-19 19:50:54
|
Revision: 530 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=530&view=rev Author: brus07 Date: 2009-07-19 19:50:46 +0000 (Sun, 19 Jul 2009) Log Message: ----------- Create project folder for website. Added Paths: ----------- nera/projects/website/ nera/projects/website/trunk/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-16 22:03:00
|
Revision: 529 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=529&view=rev Author: brus07 Date: 2009-07-16 22:02:58 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Added TestsHelper file for easy configure address of test files. Added second unit test for testing compile work. Change test file for test1 and result file. Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj nera/projects/nera.tester.runner/trunk/test/Class1.cs nera/projects/nera.tester.runner/trunk/test_files/test1.txt Added Paths: ----------- nera/projects/nera.tester.runner/trunk/test/TestsHelper.cs nera/projects/nera.tester.runner/trunk/test_files/result1.txt Modified: nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-16 20:56:59 UTC (rev 528) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-16 22:02:58 UTC (rev 529) @@ -39,6 +39,7 @@ <ItemGroup> <Compile Include="test\Class1.cs" /> <Compile Include="test\Properties\AssemblyInfo.cs" /> + <Compile Include="test\TestsHelper.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="nera.tester.runner.csproj"> Modified: nera/projects/nera.tester.runner/trunk/test/Class1.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/test/Class1.cs 2009-07-16 20:56:59 UTC (rev 528) +++ nera/projects/nera.tester.runner/trunk/test/Class1.cs 2009-07-16 22:02:58 UTC (rev 529) @@ -1,4 +1,6 @@ using NUnit.Framework; +using System.IO; +using System; namespace Nera.Tester.Runner.Test { @@ -11,5 +13,24 @@ Assert.AreEqual(4, 4); } + [Test] + public void Test2() + { + String code = ""; + using (StreamReader sr = System.IO.File.OpenText(TestsHelper.SourceCode1)) + { + code = sr.ReadToEnd(); + } + string res = Nera.Tester.Runner.Checker.GetResult(code); + + String result = ""; + using (StreamReader sr = System.IO.File.OpenText(TestsHelper.Result1)) + { + result = sr.ReadToEnd(); + } + + Assert.AreEqual(res, result); + } + } } Added: nera/projects/nera.tester.runner/trunk/test/TestsHelper.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/test/TestsHelper.cs (rev 0) +++ nera/projects/nera.tester.runner/trunk/test/TestsHelper.cs 2009-07-16 22:02:58 UTC (rev 529) @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Nera.Tester.Runner.Test +{ + class TestsHelper + { + internal const string SourceCode1 = "../../test_files/test1.txt"; + internal const string Result1 = "../../test_files/result1.txt"; + } +} Added: nera/projects/nera.tester.runner/trunk/test_files/result1.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/result1.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/result1.txt 2009-07-16 22:02:58 UTC (rev 529) @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="utf-16"?> +<result xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <res>Exception</res> + <result>0</result> + <usedTime>0</usedTime> + <usedMemory>0</usedMemory> + <submit> + <id>123</id> + <problem>1</problem> + <sourceCode>begin end.</sourceCode> + <language>1</language> + </submit> +</result> \ No newline at end of file Modified: nera/projects/nera.tester.runner/trunk/test_files/test1.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1.txt 2009-07-16 20:56:59 UTC (rev 528) +++ nera/projects/nera.tester.runner/trunk/test_files/test1.txt 2009-07-16 22:02:58 UTC (rev 529) @@ -2,6 +2,6 @@ <submit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <id>123</id> <problem>1</problem> - <sourceCode>asd</sourceCode> + <sourceCode>begin end.</sourceCode> <language>1</language> </submit> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-16 20:57:04
|
Revision: 528 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=528&view=rev Author: brus07 Date: 2009-07-16 20:56:59 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Added Test target. Create sample test for checking of work. Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/go.bat nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj nera/projects/nera.tester.runner/trunk/test/Class1.cs nera/projects/nera.tester.runner/trunk/xunit.msbuild Added Paths: ----------- nera/projects/nera.tester.runner/trunk/runTestHardCode.bat nera/projects/nera.tester.runner/trunk/test/Properties/AssemblyInfo.cs nera/projects/nera.tester.runner/trunk/xunit.tests.msbuild Modified: nera/projects/nera.tester.runner/trunk/go.bat =================================================================== --- nera/projects/nera.tester.runner/trunk/go.bat 2009-07-16 20:50:46 UTC (rev 527) +++ nera/projects/nera.tester.runner/trunk/go.bat 2009-07-16 20:56:59 UTC (rev 528) @@ -4,7 +4,7 @@ :Usage echo usage: build [target] -echo where: target = one of "Clean", "Build" +echo where: target = one of "Clean", "Build", "Test" goto End :NoBuildResults Modified: nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-16 20:50:46 UTC (rev 527) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-16 20:56:59 UTC (rev 528) @@ -28,12 +28,17 @@ <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> + <Reference Include="nunit.framework, Version=2.2.8.0, Culture=neutral, PublicKeyToken=96d09a1eb7f44a77, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>..\..\..\Tools\nunit-v2.2.8\nunit.framework.dll</HintPath> + </Reference> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="test\Class1.cs" /> + <Compile Include="test\Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <ProjectReference Include="nera.tester.runner.csproj"> @@ -41,10 +46,6 @@ <Name>nera.tester.runner</Name> </ProjectReference> </ItemGroup> - <ItemGroup> - <Folder Include="Properties\" /> - <Folder Include="test\Properties\" /> - </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. Added: nera/projects/nera.tester.runner/trunk/runTestHardCode.bat =================================================================== --- nera/projects/nera.tester.runner/trunk/runTestHardCode.bat (rev 0) +++ nera/projects/nera.tester.runner/trunk/runTestHardCode.bat 2009-07-16 20:56:59 UTC (rev 528) @@ -0,0 +1,2 @@ +echo Running unit tests (nera.tester.runner.test) +..\..\..\Tools\nunit-v2.2.8\bin\nunit-console.exe /nologo /labels bin\Release\nera.tester.runner.test.dll \ No newline at end of file Modified: nera/projects/nera.tester.runner/trunk/test/Class1.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/test/Class1.cs 2009-07-16 20:50:46 UTC (rev 527) +++ nera/projects/nera.tester.runner/trunk/test/Class1.cs 2009-07-16 20:56:59 UTC (rev 528) @@ -1,8 +1,15 @@ -using System; +using NUnit.Framework; namespace Nera.Tester.Runner.Test { + [TestFixture] public class Class1 { + [Test] + public void Test1() + { + Assert.AreEqual(4, 4); + } + } } Added: nera/projects/nera.tester.runner/trunk/test/Properties/AssemblyInfo.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/test/Properties/AssemblyInfo.cs (rev 0) +++ nera/projects/nera.tester.runner/trunk/test/Properties/AssemblyInfo.cs 2009-07-16 20:56:59 UTC (rev 528) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("nera.tester.runner.test")] +[assembly: AssemblyDescription("http://acm.lviv.ua")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("nera.tester.runner.test")] +[assembly: AssemblyCopyright("Copyright © AcmContester 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("80d03fd6-3218-46cc-8dcc-1de5f7c7fbf5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] Modified: nera/projects/nera.tester.runner/trunk/xunit.msbuild =================================================================== --- nera/projects/nera.tester.runner/trunk/xunit.msbuild 2009-07-16 20:50:46 UTC (rev 527) +++ nera/projects/nera.tester.runner/trunk/xunit.msbuild 2009-07-16 20:56:59 UTC (rev 528) @@ -22,4 +22,10 @@ Properties="Configuration=$(BuildType)"/> </Target> + <Target Name="Test" DependsOnTargets="Build"> + <MSBuild + Projects="xunit.tests.msbuild" + Properties="BuildType=$(BuildType)" /> + </Target> + </Project> \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/xunit.tests.msbuild =================================================================== --- nera/projects/nera.tester.runner/trunk/xunit.tests.msbuild (rev 0) +++ nera/projects/nera.tester.runner/trunk/xunit.tests.msbuild 2009-07-16 20:56:59 UTC (rev 528) @@ -0,0 +1,8 @@ +<Project DefaultTargets="Test" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> + + + <Target Name="Test"> + <Exec Command="runTestHardCode.bat" /> + </Target> + +</Project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-16 20:50:50
|
Revision: 527 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=527&view=rev Author: brus07 Date: 2009-07-16 20:50:46 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Added test files for unit tests. Added Paths: ----------- nera/projects/nera.tester.runner/trunk/test_files/ nera/projects/nera.tester.runner/trunk/test_files/test1/ nera/projects/nera.tester.runner/trunk/test_files/test1/AllowedFunc.txt nera/projects/nera.tester.runner/trunk/test_files/test1/CompIDs.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/ nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/ nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/D7.bat nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/DCC32.exe here.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Dcc32.exe nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Dcc70.dll nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Delphi compiler here.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Math.dcu nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/SysConst.dcu nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/SysInit.dcu nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/SysUtils.dcu nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/System.dcu nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Types.dcu nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Variants.dcu nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Windows.dcu nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/dcc32.cfg nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/includeD7/ nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/includeD7/units for delphi here.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/rlink32.dll nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/rlink32.dll here.txt nera/projects/nera.tester.runner/trunk/test_files/test1/InData.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/ProblemData.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/solution.pas nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test1/ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test1/in.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test1/out.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test2/ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test2/in.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test2/out.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test3/ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test3/in.txt nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test3/out.txt nera/projects/nera.tester.runner/trunk/test_files/test1/RealTesterConfig.ini nera/projects/nera.tester.runner/trunk/test_files/test1/Temp/ nera/projects/nera.tester.runner/trunk/test_files/test1/TesterInData.txt nera/projects/nera.tester.runner/trunk/test_files/test1/data.xsd nera/projects/nera.tester.runner/trunk/test_files/test1/scriptExample.txt nera/projects/nera.tester.runner/trunk/test_files/test1.txt Added: nera/projects/nera.tester.runner/trunk/test_files/test1/AllowedFunc.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/AllowedFunc.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/AllowedFunc.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,57 @@ +kernel32.dll DeleteCriticalSection +kernel32.dll LeaveCriticalSection +kernel32.dll EnterCriticalSection +kernel32.dll InitializeCriticalSection +kernel32.dll VirtualFree +kernel32.dll VirtualAlloc +kernel32.dll LocalFree +kernel32.dll LocalAlloc +kernel32.dll GetVersion +kernel32.dll GetCurrentThreadId +kernel32.dll GetThreadLocale +kernel32.dll GetStartupInfoA +kernel32.dll GetLocaleInfoA +kernel32.dll GetCommandLineA +kernel32.dll FreeLibrary +kernel32.dll ExitProcess +kernel32.dll WriteFile +kernel32.dll UnhandledExceptionFilter +kernel32.dll RtlUnwind +kernel32.dll RaiseException +kernel32.dll GetStdHandle +user32.dll GetKeyboardType +user32.dll MessageBoxA +advapi32.dll RegQueryValueExA +advapi32.dll RegOpenKeyExA +advapi32.dll RegCloseKey +kernel32.dll TlsSetValue +kernel32.dll TlsGetValue +kernel32.dll GetModuleHandleA +kernel32.dll WideCharToMultiByte +kernel32.dll lstrlenA +kernel32.dll lstrcpynA +kernel32.dll LoadLibraryExA +kernel32.dll GetProcAddress +kernel32.dll GetModuleFileNameA +kernel32.dll FindFirstFileA +kernel32.dll FindClose +user32.dll LoadStringA +user32.dll CharNextA +oleaut32.dll SysFreeString +kernel32.dll VirtualQuery +kernel32.dll GetVersionExA +kernel32.dll GetStringTypeExA +kernel32.dll GetDiskFreeSpaceA +kernel32.dll GetCPInfo +kernel32.dll GetACP +kernel32.dll EnumCalendarInfoA +user32.dll GetSystemMetrics +user32.dll CharToOemA +kernel32.dll GetLastError +kernel32.dll SetFilePointer +kernel32.dll SetEndOfFile +kernel32.dll ReadFile +kernel32.dll GetFileSize +kernel32.dll GetFileType +kernel32.dll CreateFileA +kernel32.dll CloseHandle \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/CompIDs.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/CompIDs.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/CompIDs.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,2 @@ +1 Compiler\D7\D7.bat +2 Compiler\VC6\VS.bat Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/D7.bat =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/D7.bat (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/D7.bat 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,2 @@ +echo off +DCC32.EXE -CC %1 -E%2 \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Dcc32.exe =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Dcc32.exe ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Dcc70.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Dcc70.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Math.dcu =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Math.dcu ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/SysConst.dcu =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/SysConst.dcu ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/SysInit.dcu =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/SysInit.dcu ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/SysUtils.dcu =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/SysUtils.dcu ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/System.dcu =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/System.dcu ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Types.dcu =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Types.dcu ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Variants.dcu =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Variants.dcu ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Windows.dcu =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/Windows.dcu ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/dcc32.cfg =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/dcc32.cfg (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/dcc32.cfg 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1 @@ +-u"includeD7" Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/rlink32.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/test_files/test1/Compiler/D7/rlink32.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/test_files/test1/InData.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/InData.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/InData.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,3 @@ +Compiler\D7.bat +Temp\ +Problem\ \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/ProblemData.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/ProblemData.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/ProblemData.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,10 @@ +CodeLimit: 65536 +CompilationTimeLimit: 100000 +MemoryLimit: 67108864 +OutputLimit: 40960 +RealTimeLimit: 200000 +TimeLimit: 2000 +MaxThreads: 1 +Checker: scriptExample.txt +CheckPlugin: Plugin.dll +TestFolderName: tests/test* \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/solution.pas =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/solution.pas (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/solution.pas 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,7 @@ +var + i:integer; + +begin +read(i); +write(i); +end. \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test1/in.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test1/in.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test1/in.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1 @@ +1 Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test1/out.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test1/out.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test1/out.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1 @@ +1 \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test2/in.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test2/in.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test2/in.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1 @@ +2 Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test2/out.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test2/out.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test2/out.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1 @@ +2 \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test3/in.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test3/in.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test3/in.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1 @@ +3 Added: nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test3/out.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test3/out.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/Problem/1/tests/test3/out.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1 @@ +3 \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/RealTesterConfig.ini =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/RealTesterConfig.ini (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/RealTesterConfig.ini 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,2 @@ +[MainConfig] +SecureLevel=None \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/TesterInData.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/TesterInData.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/TesterInData.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,3 @@ +100 +TestingUser +USER12345 \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/data.xsd =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/data.xsd (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/data.xsd 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,85 @@ +<?xml version="1.0" encoding="utf-8"?> +<xs:schema id="XMLSchema1" elementFormDefault="qualified" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"> + <xs:complexType name="submitType"> + <xs:sequence maxOccurs="1"> + <!-- потрібно щоб ці записи могли слідувати у довільному порядку --> + <xs:element name="id" type="xs:positiveInteger" /> + <xs:element name="problem" type="xs:positiveInteger" /> + <xs:element name="sourceCode" type="xs:string" /> + <xs:element name="language"> + <!-- обмеження для ID мови програмування --> + <xs:simpleType> + <xs:restriction base="xs:int"> + <xs:maxInclusive value="100" /> + </xs:restriction> + </xs:simpleType> + </xs:element> + </xs:sequence> + </xs:complexType> + <xs:complexType name="submitIOIType"> + <xs:sequence> + <xs:element name="submit" type="submitType" /> + <xs:element name="name" type="xs:string" /> + <xs:element name="form" type="xs:positiveInteger" /> + <xs:element name="school" type="xs:string" minOccurs="0" /> + </xs:sequence> + </xs:complexType> + <xs:element name="submitList"> + <xs:complexType> + <xs:sequence> + <xs:sequence> + <xs:element name="submit" type="submitType" maxOccurs="unbounded" minOccurs="0" /> + </xs:sequence> + </xs:sequence> + </xs:complexType> + </xs:element> + <xs:complexType name="resultType"> + <xs:sequence> + <xs:element name="res" type="xs:string" /> + <xs:element name="result" type="xs:int" /> + <xs:element name="usedTime" type="xs:double" /> + <xs:element name="usedMemory" type="xs:double" /> + <xs:element name="compOutput" type="xs:string" /> + <xs:element name="submit" type="submitType" /> + </xs:sequence> + </xs:complexType> + <xs:complexType name="resultIOIType"> + <xs:sequence> + <xs:element name="res" type="xs:string" /> + <xs:element name="result" type="xs:int" /> + <xs:element name="usedTime" type="xs:double" /> + <xs:element name="usedMemory" type="xs:double" /> + <xs:element name="compOutput" type="xs:string" /> + <xs:element name="testResults" type="testResultList" minOccurs="0" /> + <xs:element name="submitioi" type="submitIOIType" /> + </xs:sequence> + </xs:complexType> + <xs:complexType name="testResultList"> + <xs:sequence> + <xs:sequence> + <xs:element name="TestResIoi" type="testResultIoiType" maxOccurs="unbounded" minOccurs="0" /> + </xs:sequence> + </xs:sequence> + </xs:complexType> + <xs:complexType name="testResultIoiType"> + <xs:sequence> + <!-- обмеження для ID: не має бути відємним --> + <xs:element name="id" type="xs:int" /> + <xs:element name="res" type="xs:string" /> + <xs:element name="usedTime" type="xs:double" /> + <xs:element name="usedMemory" type="xs:double" /> + <xs:element name="input" type="xs:string" /> + <xs:element name="output" type="xs:string" /> + <xs:element name="contestantOutput" type="xs:string" /> + <xs:element name="point" type="xs:int" /> + </xs:sequence> + </xs:complexType> + <xs:element name="result" type="resultType"> + </xs:element> + <xs:element name="submit" type="submitType"> + </xs:element> + <xs:element name="submitioi" type="submitIOIType"> + </xs:element> + <xs:element name="resultioi" type="resultIOIType"> + </xs:element> +</xs:schema> \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1/scriptExample.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1/scriptExample.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1/scriptExample.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,3 @@ +if (output==correctOutput) +result='AC'; +else result='WA'; \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/test_files/test1.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/test_files/test1.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/test_files/test1.txt 2009-07-16 20:50:46 UTC (rev 527) @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-16"?> +<submit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <id>123</id> + <problem>1</problem> + <sourceCode>asd</sourceCode> + <language>1</language> +</submit> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-16 10:25:59
|
Revision: 526 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=526&view=rev Author: brus07 Date: 2009-07-16 10:25:58 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Added *.suo and *.user files to ignore list recursively. Property Changed: ---------------- nera/ nera/Tools/ nera/Tools/nunit-v2.2.8/ nera/Tools/nunit-v2.2.8/bin/ nera/projects/ nera/projects/nera.tester.runner/ nera/projects/nera.tester.runner/branches/ nera/projects/nera.tester.runner/tags/ nera/projects/nera.tester.runner/trunk/ nera/projects/nera.tester.runner/trunk/lib/ nera/projects/nera.tester.runner/trunk/resources/ nera/projects/nera.tester.runner/trunk/src/ nera/projects/nera.tester.runner/trunk/src/Properties/ nera/projects/nera.tester.runner/trunk/test/ nera/projects/nera.tester.runner/trunk/test/Properties/ Property changes on: nera ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/Tools ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/Tools/nunit-v2.2.8 ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/Tools/nunit-v2.2.8/bin ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/projects ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/projects/nera.tester.runner ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/projects/nera.tester.runner/branches ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/projects/nera.tester.runner/tags ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/projects/nera.tester.runner/trunk ___________________________________________________________________ Modified: svn:ignore - bin build obj + *.suo *.user bin build obj Property changes on: nera/projects/nera.tester.runner/trunk/lib ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/projects/nera.tester.runner/trunk/resources ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/projects/nera.tester.runner/trunk/src ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/projects/nera.tester.runner/trunk/src/Properties ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/projects/nera.tester.runner/trunk/test ___________________________________________________________________ Added: svn:ignore + *.suo *.user Property changes on: nera/projects/nera.tester.runner/trunk/test/Properties ___________________________________________________________________ Added: svn:ignore + *.suo *.user This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-16 10:16:36
|
Revision: 525 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=525&view=rev Author: brus07 Date: 2009-07-16 10:16:32 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Added empty unit test project. Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/nera.tester.runner.sln nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs Added Paths: ----------- nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj nera/projects/nera.tester.runner/trunk/test/ nera/projects/nera.tester.runner/trunk/test/Class1.cs nera/projects/nera.tester.runner/trunk/test/Properties/ Property Changed: ---------------- nera/projects/nera.tester.runner/trunk/ Property changes on: nera/projects/nera.tester.runner/trunk ___________________________________________________________________ Modified: svn:ignore - build obj + bin build obj Modified: nera/projects/nera.tester.runner/trunk/nera.tester.runner.sln =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.sln 2009-07-16 09:59:32 UTC (rev 524) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.sln 2009-07-16 10:16:32 UTC (rev 525) @@ -3,6 +3,8 @@ # Visual Studio 2005 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nera.tester.runner", "nera.tester.runner.csproj", "{052D9F77-17AF-42F3-BFBF-975A19383496}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nera.tester.runner.test", "nera.tester.runner.test.csproj", "{51B5DCD7-8746-45DB-AB02-AACDE8C94F51}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -13,6 +15,10 @@ {052D9F77-17AF-42F3-BFBF-975A19383496}.Debug|Any CPU.Build.0 = Debug|Any CPU {052D9F77-17AF-42F3-BFBF-975A19383496}.Release|Any CPU.ActiveCfg = Release|Any CPU {052D9F77-17AF-42F3-BFBF-975A19383496}.Release|Any CPU.Build.0 = Release|Any CPU + {51B5DCD7-8746-45DB-AB02-AACDE8C94F51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {51B5DCD7-8746-45DB-AB02-AACDE8C94F51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {51B5DCD7-8746-45DB-AB02-AACDE8C94F51}.Release|Any CPU.ActiveCfg = Release|Any CPU + {51B5DCD7-8746-45DB-AB02-AACDE8C94F51}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE Added: nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj (rev 0) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.test.csproj 2009-07-16 10:16:32 UTC (rev 525) @@ -0,0 +1,56 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{51B5DCD7-8746-45DB-AB02-AACDE8C94F51}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Nera.Tester.Runner.Test</RootNamespace> + <AssemblyName>nera.tester.runner.test</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="test\Class1.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="nera.tester.runner.csproj"> + <Project>{052D9F77-17AF-42F3-BFBF-975A19383496}</Project> + <Name>nera.tester.runner</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Folder Include="Properties\" /> + <Folder Include="test\Properties\" /> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project> \ No newline at end of file Modified: nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs 2009-07-16 09:59:32 UTC (rev 524) +++ nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs 2009-07-16 10:16:32 UTC (rev 525) @@ -8,7 +8,7 @@ [assembly: AssemblyTitle("nera.tester.runner")] [assembly: AssemblyDescription("http://acm.lviv.ua")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("AcmContester")] +[assembly: AssemblyCompany("")] [assembly: AssemblyProduct("nera.tester.runner")] [assembly: AssemblyCopyright("Copyright © AcmContester 2008")] [assembly: AssemblyTrademark("")] Added: nera/projects/nera.tester.runner/trunk/test/Class1.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/test/Class1.cs (rev 0) +++ nera/projects/nera.tester.runner/trunk/test/Class1.cs 2009-07-16 10:16:32 UTC (rev 525) @@ -0,0 +1,8 @@ +using System; + +namespace Nera.Tester.Runner.Test +{ + public class Class1 + { + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-16 09:59:34
|
Revision: 524 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=524&view=rev Author: brus07 Date: 2009-07-16 09:59:32 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Added MsBuild file and bat (helper) file. Now available targets: Clean, Build. Added Paths: ----------- nera/projects/nera.tester.runner/trunk/go.bat nera/projects/nera.tester.runner/trunk/xunit.msbuild Property Changed: ---------------- nera/projects/nera.tester.runner/trunk/ Property changes on: nera/projects/nera.tester.runner/trunk ___________________________________________________________________ Modified: svn:ignore - build + build obj Added: nera/projects/nera.tester.runner/trunk/go.bat =================================================================== --- nera/projects/nera.tester.runner/trunk/go.bat (rev 0) +++ nera/projects/nera.tester.runner/trunk/go.bat 2009-07-16 09:59:32 UTC (rev 524) @@ -0,0 +1,14 @@ +@echo off +if "%1" == "" goto Usage +goto NoBuildResults + +:Usage +echo usage: build [target] +echo where: target = one of "Clean", "Build" +goto End + +:NoBuildResults +%windir%\Microsoft.NET\Framework\v2.0.50727\MSBuild.exe xunit.msbuild /p:Configuration=Debug /t:%* +goto End + +:End Added: nera/projects/nera.tester.runner/trunk/xunit.msbuild =================================================================== --- nera/projects/nera.tester.runner/trunk/xunit.msbuild (rev 0) +++ nera/projects/nera.tester.runner/trunk/xunit.msbuild 2009-07-16 09:59:32 UTC (rev 524) @@ -0,0 +1,25 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + + <!-- Settings --> + + <PropertyGroup Condition="'$(BuildType)' == ''"> + <BuildType>Release</BuildType> + </PropertyGroup> + + <!-- Individiual targets --> + + <Target Name="Clean"> + <MSBuild + Projects="nera.tester.runner.sln" + Targets="Clean" + Properties="Configuration=$(BuildType)"/> + </Target> + + <Target Name="Build"> + <MSBuild + Projects="nera.tester.runner.sln" + Targets="Build" + Properties="Configuration=$(BuildType)"/> + </Target> + +</Project> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-16 09:44:51
|
Revision: 523 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=523&view=rev Author: brus07 Date: 2009-07-16 09:44:43 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Added solution file. Rename project to nera.tester.runner. Change main namespace. Modified Paths: -------------- nera/projects/nera.tester.runner/trunk/src/Class1.cs nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs Added Paths: ----------- nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj nera/projects/nera.tester.runner/trunk/nera.tester.runner.sln Removed Paths: ------------- nera/projects/nera.tester.runner/trunk/Runner.csproj Deleted: nera/projects/nera.tester.runner/trunk/Runner.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/Runner.csproj 2009-07-16 09:26:21 UTC (rev 522) +++ nera/projects/nera.tester.runner/trunk/Runner.csproj 2009-07-16 09:44:43 UTC (rev 523) @@ -1,105 +0,0 @@ -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProductVersion>8.0.50727</ProductVersion> - <SchemaVersion>2.0</SchemaVersion> - <ProjectGuid>{052D9F77-17AF-42F3-BFBF-975A19383496}</ProjectGuid> - <OutputType>Library</OutputType> - <AppDesignerFolder>Properties</AppDesignerFolder> - <RootNamespace>Runner</RootNamespace> - <AssemblyName>Runner</AssemblyName> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <OutputPath>build\bin\Debug\</OutputPath> - <BaseIntermediateOutputPath>build\obj\</BaseIntermediateOutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>build\bin\Release\</OutputPath> - <BaseIntermediateOutputPath>build\obj\</BaseIntermediateOutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - </PropertyGroup> - <ItemGroup> - <Reference Include="AcmLibraryExtention, Version=1.0.3482.26401, Culture=neutral, processorArchitecture=MSIL" /> - <Reference Include="Data, Version=1.0.3482.26403, Culture=neutral, processorArchitecture=MSIL" /> - <Reference Include="Load, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> - <Reference Include="Main, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> - <Reference Include="System" /> - <Reference Include="System.Data" /> - <Reference Include="System.Xml" /> - <Reference Include="Test, Version=1.0.3320.28735, Culture=neutral, processorArchitecture=x86" /> - </ItemGroup> - <ItemGroup> - <Compile Include="src\Class1.cs" /> - <Compile Include="src\Properties\AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <Content Include="lib\AcmLibraryExtention.dll" /> - <Content Include="resources\AllowedFunc.txt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\Checker.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\Data.dll" /> - <Content Include="resources\InData.txt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\Load.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\Main.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\MutanticFramework.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\Plugin.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\ScriptDotNet.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="resources\scriptExample.txt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\Test.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="resources\TesterInData.txt"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - <Content Include="lib\VirtualPlugin.dll"> - <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> - </Content> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> - <!-- To modify your build process, add your task inside one of the targets below and uncomment it. - Other similar extension points exist, see Microsoft.Common.targets. - <Target Name="BeforeBuild"> - </Target> - <Target Name="AfterBuild"> - <Copy - SourceFiles="@(OutputPath)\resources\*" - DestinationFolder="@(OutputPath)"> - <Output - TaskParameter="CopiedFiles" - ItemName="SuccessfullyCopiedFiles"/> - </Copy> - </Target> - --> - <PropertyGroup> - <PostBuildEvent> - </PostBuildEvent> - </PropertyGroup> -</Project> \ No newline at end of file Copied: nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj (from rev 521, nera/projects/nera.tester.runner/trunk/Runner.csproj) =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj (rev 0) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.csproj 2009-07-16 09:44:43 UTC (rev 523) @@ -0,0 +1,103 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{052D9F77-17AF-42F3-BFBF-975A19383496}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Nera.Tester.Runner</RootNamespace> + <AssemblyName>nera.tester.runner</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>build\bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>build\bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="AcmLibraryExtention, Version=1.0.3482.26401, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="Data, Version=1.0.3482.26403, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="Load, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="Main, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + <Reference Include="Test, Version=1.0.3320.28735, Culture=neutral, processorArchitecture=x86" /> + </ItemGroup> + <ItemGroup> + <Compile Include="src\Class1.cs" /> + <Compile Include="src\Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <Content Include="lib\AcmLibraryExtention.dll" /> + <Content Include="resources\AllowedFunc.txt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Checker.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Data.dll" /> + <Content Include="resources\InData.txt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Load.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Main.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\MutanticFramework.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Plugin.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\ScriptDotNet.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="resources\scriptExample.txt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Test.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="resources\TesterInData.txt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\VirtualPlugin.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + <Copy + SourceFiles="@(OutputPath)\resources\*" + DestinationFolder="@(OutputPath)"> + <Output + TaskParameter="CopiedFiles" + ItemName="SuccessfullyCopiedFiles"/> + </Copy> + </Target> + --> + <PropertyGroup> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/nera.tester.runner.sln =================================================================== --- nera/projects/nera.tester.runner/trunk/nera.tester.runner.sln (rev 0) +++ nera/projects/nera.tester.runner/trunk/nera.tester.runner.sln 2009-07-16 09:44:43 UTC (rev 523) @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 9.00 +# Visual Studio 2005 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "nera.tester.runner", "nera.tester.runner.csproj", "{052D9F77-17AF-42F3-BFBF-975A19383496}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {052D9F77-17AF-42F3-BFBF-975A19383496}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {052D9F77-17AF-42F3-BFBF-975A19383496}.Debug|Any CPU.Build.0 = Debug|Any CPU + {052D9F77-17AF-42F3-BFBF-975A19383496}.Release|Any CPU.ActiveCfg = Release|Any CPU + {052D9F77-17AF-42F3-BFBF-975A19383496}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal Modified: nera/projects/nera.tester.runner/trunk/src/Class1.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/src/Class1.cs 2009-07-16 09:26:21 UTC (rev 522) +++ nera/projects/nera.tester.runner/trunk/src/Class1.cs 2009-07-16 09:44:43 UTC (rev 523) @@ -7,7 +7,7 @@ using Test; using Load; -namespace Checker +namespace Nera.Tester.Runner { public class Checker { Modified: nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs 2009-07-16 09:26:21 UTC (rev 522) +++ nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs 2009-07-16 09:44:43 UTC (rev 523) @@ -5,11 +5,11 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("Checker")] +[assembly: AssemblyTitle("nera.tester.runner")] [assembly: AssemblyDescription("http://acm.lviv.ua")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("AcmContester")] -[assembly: AssemblyProduct("Checker")] +[assembly: AssemblyProduct("nera.tester.runner")] [assembly: AssemblyCopyright("Copyright © AcmContester 2008")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-16 09:26:25
|
Revision: 522 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=522&view=rev Author: brus07 Date: 2009-07-16 09:26:21 +0000 (Thu, 16 Jul 2009) Log Message: ----------- Added NUnit tool. Added Paths: ----------- nera/Tools/ nera/Tools/nunit-v2.2.8/ nera/Tools/nunit-v2.2.8/bin/ nera/Tools/nunit-v2.2.8/bin/nunit-console-runner.dll nera/Tools/nunit-v2.2.8/bin/nunit-console.exe nera/Tools/nunit-v2.2.8/bin/nunit-console.exe.config nera/Tools/nunit-v2.2.8/bin/nunit.core.dll nera/Tools/nunit-v2.2.8/bin/nunit.util.dll nera/Tools/nunit-v2.2.8/nunit.framework.dll Added: nera/Tools/nunit-v2.2.8/bin/nunit-console-runner.dll =================================================================== (Binary files differ) Property changes on: nera/Tools/nunit-v2.2.8/bin/nunit-console-runner.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/Tools/nunit-v2.2.8/bin/nunit-console.exe =================================================================== (Binary files differ) Property changes on: nera/Tools/nunit-v2.2.8/bin/nunit-console.exe ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/Tools/nunit-v2.2.8/bin/nunit-console.exe.config =================================================================== --- nera/Tools/nunit-v2.2.8/bin/nunit-console.exe.config (rev 0) +++ nera/Tools/nunit-v2.2.8/bin/nunit-console.exe.config 2009-07-16 09:26:21 UTC (rev 522) @@ -0,0 +1,97 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<configuration> + <!-- + Application settings for NUnit-console.exe. Do NOT put settings + for use by your tests here. + --> + <appSettings> + + <!-- + Specify the location to be used by .NET for the cache + --> + <add key="shadowfiles.path" value="%temp%\nunit20\ShadowCopyCache" /> + + </appSettings> + + <!-- + The startup section may be used to specify the runtime versions + supported in the order that they will be used if more than one + is present. As supplied, this section is commented out, which + causes nunit-console to use the version of the framework with + which it was built. + + Since .NET 1.0 does not recognize the <supportedRuntime> elements, + a <requiredRuntime> element is used in case it is the only version + of the framework that is installed. + --> + <!-- + <startup> + <supportedRuntime version="v2.0.50727" /> + <supportedRuntime version="v2.0.50215" /> + <supportedRuntime version="v2.0.40607" /> + <supportedRuntime version="v1.1.4322" /> + <supportedRuntime version="v1.0.3705" /> + + <requiredRuntime version="v1.0.3705" /> + </startup> + --> + + <!-- + The following <runtime> section allows running nunit under + .NET 1.0 by redirecting assemblies. The appliesTo attribute + causes the section to be ignored except under .NET 1.0version 1 + on a machine with only the .NET version 1.0 runtime installed. + If application and its tests were built for .NET 1.1 you will + also need to redirect system assemblies in the test config file. + --> + + <runtime> + + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1" + appliesTo="v1.0.3705"> + + <dependentAssembly> + <assemblyIdentity name="System" + publicKeyToken="b77a5c561934e089" + culture="neutral"/> + <bindingRedirect oldVersion="1.0.5000.0" + newVersion="1.0.3300.0"/> + </dependentAssembly> + + <dependentAssembly> + <assemblyIdentity name="System.Data" + publicKeyToken="b77a5c561934e089" + culture="neutral"/> + <bindingRedirect oldVersion="1.0.5000.0" + newVersion="1.0.3300.0"/> + </dependentAssembly> + + <dependentAssembly> + <assemblyIdentity name="System.Drawing" + publicKeyToken="b03f5f7f11d50a3a" + culture="neutral"/> + <bindingRedirect oldVersion="1.0.5000.0" + newVersion="1.0.3300.0"/> + </dependentAssembly> + + <dependentAssembly> + <assemblyIdentity name="System.Windows.Forms" + publicKeyToken="b77a5c561934e089" + culture="neutral"/> + <bindingRedirect oldVersion="1.0.5000.0" + newVersion="1.0.3300.0"/> + </dependentAssembly> + + <dependentAssembly> + <assemblyIdentity name="System.Xml" + publicKeyToken="b77a5c561934e089" + culture="neutral"/> + <bindingRedirect oldVersion="1.0.5000.0" + newVersion="1.0.3300.0"/> + </dependentAssembly> + + </assemblyBinding> + + </runtime> + +</configuration> \ No newline at end of file Added: nera/Tools/nunit-v2.2.8/bin/nunit.core.dll =================================================================== (Binary files differ) Property changes on: nera/Tools/nunit-v2.2.8/bin/nunit.core.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/Tools/nunit-v2.2.8/bin/nunit.util.dll =================================================================== (Binary files differ) Property changes on: nera/Tools/nunit-v2.2.8/bin/nunit.util.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/Tools/nunit-v2.2.8/nunit.framework.dll =================================================================== (Binary files differ) Property changes on: nera/Tools/nunit-v2.2.8/nunit.framework.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-14 21:38:49
|
Revision: 521 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=521&view=rev Author: brus07 Date: 2009-07-14 21:38:46 +0000 (Tue, 14 Jul 2009) Log Message: ----------- Added (copied) Runner project to new project structure. Added Paths: ----------- nera/projects/ nera/projects/nera.tester.runner/ nera/projects/nera.tester.runner/branches/ nera/projects/nera.tester.runner/tags/ nera/projects/nera.tester.runner/trunk/ nera/projects/nera.tester.runner/trunk/Runner.csproj nera/projects/nera.tester.runner/trunk/lib/ nera/projects/nera.tester.runner/trunk/lib/AcmLibraryExtention.dll nera/projects/nera.tester.runner/trunk/lib/Checker.dll nera/projects/nera.tester.runner/trunk/lib/Data.dll nera/projects/nera.tester.runner/trunk/lib/Load.dll nera/projects/nera.tester.runner/trunk/lib/Main.dll nera/projects/nera.tester.runner/trunk/lib/MutanticFramework.dll nera/projects/nera.tester.runner/trunk/lib/Plugin.dll nera/projects/nera.tester.runner/trunk/lib/ScriptDotNet.dll nera/projects/nera.tester.runner/trunk/lib/Test.dll nera/projects/nera.tester.runner/trunk/lib/VirtualPlugin.dll nera/projects/nera.tester.runner/trunk/resources/ nera/projects/nera.tester.runner/trunk/resources/AllowedFunc.txt nera/projects/nera.tester.runner/trunk/resources/InData.txt nera/projects/nera.tester.runner/trunk/resources/TesterInData.txt nera/projects/nera.tester.runner/trunk/resources/scriptExample.txt nera/projects/nera.tester.runner/trunk/src/ nera/projects/nera.tester.runner/trunk/src/Class1.cs nera/projects/nera.tester.runner/trunk/src/Properties/ nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs Property changes on: nera/projects/nera.tester.runner/trunk ___________________________________________________________________ Added: svn:ignore + build Added: nera/projects/nera.tester.runner/trunk/Runner.csproj =================================================================== --- nera/projects/nera.tester.runner/trunk/Runner.csproj (rev 0) +++ nera/projects/nera.tester.runner/trunk/Runner.csproj 2009-07-14 21:38:46 UTC (rev 521) @@ -0,0 +1,105 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProductVersion>8.0.50727</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{052D9F77-17AF-42F3-BFBF-975A19383496}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Runner</RootNamespace> + <AssemblyName>Runner</AssemblyName> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>build\bin\Debug\</OutputPath> + <BaseIntermediateOutputPath>build\obj\</BaseIntermediateOutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>build\bin\Release\</OutputPath> + <BaseIntermediateOutputPath>build\obj\</BaseIntermediateOutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="AcmLibraryExtention, Version=1.0.3482.26401, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="Data, Version=1.0.3482.26403, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="Load, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="Main, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Xml" /> + <Reference Include="Test, Version=1.0.3320.28735, Culture=neutral, processorArchitecture=x86" /> + </ItemGroup> + <ItemGroup> + <Compile Include="src\Class1.cs" /> + <Compile Include="src\Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <Content Include="lib\AcmLibraryExtention.dll" /> + <Content Include="resources\AllowedFunc.txt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Checker.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Data.dll" /> + <Content Include="resources\InData.txt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Load.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Main.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\MutanticFramework.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Plugin.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\ScriptDotNet.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="resources\scriptExample.txt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\Test.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="resources\TesterInData.txt"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + <Content Include="lib\VirtualPlugin.dll"> + <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> + </Content> + </ItemGroup> + <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + <Copy + SourceFiles="@(OutputPath)\resources\*" + DestinationFolder="@(OutputPath)"> + <Output + TaskParameter="CopiedFiles" + ItemName="SuccessfullyCopiedFiles"/> + </Copy> + </Target> + --> + <PropertyGroup> + <PostBuildEvent> + </PostBuildEvent> + </PropertyGroup> +</Project> \ No newline at end of file Property changes on: nera/projects/nera.tester.runner/trunk/Runner.csproj ___________________________________________________________________ Added: svn:mergeinfo + Added: nera/projects/nera.tester.runner/trunk/lib/AcmLibraryExtention.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/lib/AcmLibraryExtention.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/lib/Checker.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/lib/Checker.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/lib/Data.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/lib/Data.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/lib/Load.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/lib/Load.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/lib/Main.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/lib/Main.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/lib/MutanticFramework.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/lib/MutanticFramework.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/lib/Plugin.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/lib/Plugin.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/lib/ScriptDotNet.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/lib/ScriptDotNet.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/lib/Test.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/lib/Test.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/lib/VirtualPlugin.dll =================================================================== (Binary files differ) Property changes on: nera/projects/nera.tester.runner/trunk/lib/VirtualPlugin.dll ___________________________________________________________________ Added: svn:mime-type + application/octet-stream Added: nera/projects/nera.tester.runner/trunk/resources/AllowedFunc.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/resources/AllowedFunc.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/resources/AllowedFunc.txt 2009-07-14 21:38:46 UTC (rev 521) @@ -0,0 +1,57 @@ +kernel32.dll DeleteCriticalSection +kernel32.dll LeaveCriticalSection +kernel32.dll EnterCriticalSection +kernel32.dll InitializeCriticalSection +kernel32.dll VirtualFree +kernel32.dll VirtualAlloc +kernel32.dll LocalFree +kernel32.dll LocalAlloc +kernel32.dll GetVersion +kernel32.dll GetCurrentThreadId +kernel32.dll GetThreadLocale +kernel32.dll GetStartupInfoA +kernel32.dll GetLocaleInfoA +kernel32.dll GetCommandLineA +kernel32.dll FreeLibrary +kernel32.dll ExitProcess +kernel32.dll WriteFile +kernel32.dll UnhandledExceptionFilter +kernel32.dll RtlUnwind +kernel32.dll RaiseException +kernel32.dll GetStdHandle +user32.dll GetKeyboardType +user32.dll MessageBoxA +advapi32.dll RegQueryValueExA +advapi32.dll RegOpenKeyExA +advapi32.dll RegCloseKey +kernel32.dll TlsSetValue +kernel32.dll TlsGetValue +kernel32.dll GetModuleHandleA +kernel32.dll WideCharToMultiByte +kernel32.dll lstrlenA +kernel32.dll lstrcpynA +kernel32.dll LoadLibraryExA +kernel32.dll GetProcAddress +kernel32.dll GetModuleFileNameA +kernel32.dll FindFirstFileA +kernel32.dll FindClose +user32.dll LoadStringA +user32.dll CharNextA +oleaut32.dll SysFreeString +kernel32.dll VirtualQuery +kernel32.dll GetVersionExA +kernel32.dll GetStringTypeExA +kernel32.dll GetDiskFreeSpaceA +kernel32.dll GetCPInfo +kernel32.dll GetACP +kernel32.dll EnumCalendarInfoA +user32.dll GetSystemMetrics +user32.dll CharToOemA +kernel32.dll GetLastError +kernel32.dll SetFilePointer +kernel32.dll SetEndOfFile +kernel32.dll ReadFile +kernel32.dll GetFileSize +kernel32.dll GetFileType +kernel32.dll CreateFileA +kernel32.dll CloseHandle \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/resources/InData.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/resources/InData.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/resources/InData.txt 2009-07-14 21:38:46 UTC (rev 521) @@ -0,0 +1,3 @@ +d:\Sample\Compiler\D7.bat +d:\Sample\Temp\ +d:\Sample\Problem\ \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/resources/TesterInData.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/resources/TesterInData.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/resources/TesterInData.txt 2009-07-14 21:38:46 UTC (rev 521) @@ -0,0 +1,3 @@ +100 +TestingUser +USER12345 \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/resources/scriptExample.txt =================================================================== --- nera/projects/nera.tester.runner/trunk/resources/scriptExample.txt (rev 0) +++ nera/projects/nera.tester.runner/trunk/resources/scriptExample.txt 2009-07-14 21:38:46 UTC (rev 521) @@ -0,0 +1,3 @@ +if (output==correctOutput) +result='AC'; +else result='WA'; \ No newline at end of file Added: nera/projects/nera.tester.runner/trunk/src/Class1.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/src/Class1.cs (rev 0) +++ nera/projects/nera.tester.runner/trunk/src/Class1.cs 2009-07-14 21:38:46 UTC (rev 521) @@ -0,0 +1,248 @@ +using System; +using System.Collections.Generic; +using System.IO; +using AcmContester.Library.LibraryExtention; +using AcmContester.Library.LibraryExtention.Data; +using Main; +using Test; +using Load; + +namespace Checker +{ + public class Checker + { + private static List<KeyValuePair<string, string>> htmlEntityList; + + private static string HtmlEntityDecode(string str) + { + InitHtmlEntityList(); + for (int i = 0; i < htmlEntityList.Count; i++) + { + str = str.Replace(htmlEntityList[i].Value, htmlEntityList[i].Key); + } + return str; + } + + public static string GetResult(string message) + { + Log log = Log.GetLog(); + log.Loging(DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString(), Log.Priority.INFO); + log.Loging(message, Log.Priority.INFO); + log.Loging("", Log.Priority.INFO); + + IniFile iniFile = new IniFile("RealTesterConfig.ini"); + string secureLever = iniFile.GetString("MainConfig", "SecureLevel", "Double"); + + //TODO: + Submit submit = Submit.CreateFromXml(message); + string code = submit.sourceCode; + code = HtmlEntityDecode(code); + int language = submit.language; + Result result = new Result(submit); + + try + { + //Console.SetOut(File.CreateText("logout.txt")); + string[] data = File.ReadAllLines("InData.txt"); + data[2] = data[2] + submit.pbolemID + "\\"; + string src = code; + TestEnv test = new TestEnv(src, language, data[1], data[2]); + test.Compile(); + + log.Loging("------------------BEGIN SOURCE--------------------------", Log.Priority.INFO); + Console.WriteLine("------------------BEGIN SOURCE--------------------------"); + + log.Loging(src, Log.Priority.INFO); + Console.WriteLine(src); + + log.Loging("-------------------END SOURCE---------------------------", Log.Priority.INFO); + Console.WriteLine("-------------------END SOURCE---------------------------"); + + log.Loging(String.Format("Compile result: {0}, details: {1}, usedtime:{2}", test.comp.Result, test.comp.Details, test.comp.UsedTime), Log.Priority.INFO); + Console.WriteLine("Compile result: {0}, details: {1}, usedtime:{2}", test.comp.Result, test.comp.Details, test.comp.UsedTime); + + log.Loging(String.Format("Comp Output: {0}", test.comp.CompilerOutput), Log.Priority.INFO); + Console.WriteLine("Comp Output: {0}", test.comp.CompilerOutput); + + if (test.comp.Result == CompRes.OK) + { + SecureType secureType = SecureType.Double; + try + { + secureType = (SecureType)Enum.Parse(typeof(SecureType), secureLever, true); + } + catch (ArgumentException) + { + } + if (secureLever == "None") + secureType = SecureType.None; + test.RunAllTests(secureType); + + for (int i = 0; i < test.run.results.Length; i++) + { + log.Loging(String.Format("Test #{0} result: {1}, details: {2}, usedtime:{3}, usedRealTime: {4}, usedmemory: {5}", i + 1, + test.run.results[i].res, test.run.results[i].Details, test.run.results[i].UsedTime, test.run.results[i].UsedRealTime, test.run.results[i].UsedMemory), Log.Priority.INFO); + Console.WriteLine("Test #{0} result: {1}, details: {2}, usedtime:{3}, usedRealTime: {4}, usedmemory: {5}", i + 1, + test.run.results[i].res, test.run.results[i].Details, test.run.results[i].UsedTime, test.run.results[i].UsedRealTime, test.run.results[i].UsedMemory); + } + } + + + //TODO: + result.compOutput = test.comp.CompilerOutput; + result.res = test.comp.Result.ToString(); + if (test.comp.Result == CompRes.OK) + { + int usedTime = -1; + int usedMemory = -1; + for (int i = 0; i < test.run.results.Length; i++) + { + if (test.run.results[i].res == TestResult.Accepted) + { + usedTime = Math.Max(usedTime, test.run.results[i].UsedTime); + usedMemory = Math.Max(usedMemory, test.run.results[i].UsedMemory); + result.res = test.run.results[i].res.ToString(); + } + else + { + result.res = test.run.results[i].res.ToString(); + usedTime = test.run.results[i].UsedTime; + usedMemory = test.run.results[i].UsedMemory; + break; + } + } + result.usedMemory = usedTime; + result.usedTime = usedMemory; + } + } + catch (Exception tex) + { + log.Loging("Runner:GetResult - Exception (" + tex + ": " + tex.Message, Log.Priority.INFO); + log.Loging(tex.StackTrace, Log.Priority.INFO); + result.res = "Exception"; + } + return result.ToStringX(); + } + + + private static void InitHtmlEntityList() + { + if (htmlEntityList != null) + return; + htmlEntityList = new List<KeyValuePair<string,string>>(); + AddElementToHtmlEntityList("\"", """); + AddElementToHtmlEntityList("<", "<"); + AddElementToHtmlEntityList("&", "&"); + } + + private static void AddElementToHtmlEntityList(string p, string p_2) + { + htmlEntityList.Add(new KeyValuePair<string, string>(p, p_2)); + } + + public static string GetResultIoi(string message) + { + Log log = Log.GetLog(); + log.Loging(DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToShortTimeString(), Log.Priority.INFO); + log.Loging(message, Log.Priority.INFO); + log.Loging("", Log.Priority.INFO); + + IniFile iniFile = new IniFile("RealTesterConfig.ini"); + string secureLever = iniFile.GetString("MainConfig", "SecureLevel", "Double"); + + SubmitIoi submit = SubmitIoi.CreateFromXml(message); + + //TODO: + string code = submit.submit.sourceCode; + code = HtmlEntityDecode(code); + int language = submit.submit.language; + ResultIoi result = new ResultIoi(submit); + try + { + //Console.SetOut(File.CreateText("logout.txt")); + string[] data = File.ReadAllLines("InData.txt"); + data[2] = data[2] + submit.submit.pbolemID + "\\"; + string src = code; + TestEnv test = new TestEnv(src, language, data[1], data[2]); + test.Compile(); + + log.Loging("------------------BEGIN SOURCE--------------------------", Log.Priority.INFO); + Console.WriteLine("------------------BEGIN SOURCE--------------------------"); + + log.Loging(src, Log.Priority.INFO); + Console.WriteLine(src); + + log.Loging("-------------------END SOURCE---------------------------", Log.Priority.INFO); + Console.WriteLine("-------------------END SOURCE---------------------------"); + + log.Loging(String.Format("Compile result: {0}, details: {1}, usedtime:{2}", test.comp.Result, test.comp.Details, test.comp.UsedTime), Log.Priority.INFO); + Console.WriteLine("Compile result: {0}, details: {1}, usedtime:{2}", test.comp.Result, test.comp.Details, test.comp.UsedTime); + + log.Loging(String.Format("Comp Output: {0}", test.comp.CompilerOutput), Log.Priority.INFO); + Console.WriteLine("Comp Output: {0}", test.comp.CompilerOutput); + + if (test.comp.Result == CompRes.OK) + { + SecureType secureType = SecureType.Double; + try + { + secureType = (SecureType)Enum.Parse(typeof(SecureType), secureLever, true); + } + catch (ArgumentException) + { + } + if (secureLever == "None") + secureType = SecureType.None; + test.RunAllTests(secureType); + + for (int i = 0; i < test.run.results.Length; i++) + { + log.Loging(String.Format("Test #{0} result: {1}, details: {2}, usedtime:{3}, usedRealTime: {4}, usedmemory: {5}", i + 1, + test.run.results[i].res, test.run.results[i].Details, test.run.results[i].UsedTime, test.run.results[i].UsedRealTime, test.run.results[i].UsedMemory), Log.Priority.INFO); + Console.WriteLine("Test #{0} result: {1}, details: {2}, usedtime:{3}, usedRealTime: {4}, usedmemory: {5}", i + 1, + test.run.results[i].res, test.run.results[i].Details, test.run.results[i].UsedTime, test.run.results[i].UsedRealTime, test.run.results[i].UsedMemory); + } + } + + + //TODO: + result.compOutput = test.comp.CompilerOutput; + result.res = test.comp.Result.ToString(); + if (test.comp.Result == CompRes.OK) + { + int usedTime = -1; + int usedMemory = -1; + result.testResults = new TestResIoi[test.run.results.Length]; + result.res = TestResult.Accepted.ToString(); + for (int i = 0; i < test.run.results.Length; i++) + { + result.testResults[i] = new TestResIoi(); + + usedTime = Math.Max(usedTime, test.run.results[i].UsedTime); + usedMemory = Math.Max(usedMemory, test.run.results[i].UsedMemory); + if (test.run.results[i].res != TestResult.Accepted) + result.res = test.run.results[i].res.ToString(); + + result.testResults[i].input = test.run.test.tests[i].input; + result.testResults[i].output = test.run.test.tests[i].output; + result.testResults[i].points = test.run.test.tests[i].points; + result.testResults[i].contestantOutput = test.run.results[i].UserOutput; + result.testResults[i].usedMemory = test.run.results[i].UsedMemory; + result.testResults[i].usedTime = test.run.results[i].UsedTime; + result.testResults[i].id = i; + result.testResults[i].res = test.run.results[i].res.ToString(); + } + result.usedMemory = usedTime; + result.usedTime = usedMemory; + } + } + catch (Exception tex) + { + log.Loging("Runner:GetResult - Exception (" + tex + ": " + tex.Message, Log.Priority.INFO); + log.Loging(tex.StackTrace, Log.Priority.INFO); + result.res = "Exception"; + } + return result.ToStringX(); + } + } +} Property changes on: nera/projects/nera.tester.runner/trunk/src/Properties ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs =================================================================== --- nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs (rev 0) +++ nera/projects/nera.tester.runner/trunk/src/Properties/AssemblyInfo.cs 2009-07-14 21:38:46 UTC (rev 521) @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Checker")] +[assembly: AssemblyDescription("http://acm.lviv.ua")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("AcmContester")] +[assembly: AssemblyProduct("Checker")] +[assembly: AssemblyCopyright("Copyright © AcmContester 2008")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("80d03fd6-3218-46cc-8dcc-1de5f7c7fbf5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyFileVersion("1.0.0.0")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-07-14 09:47:01
|
Revision: 520 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=520&view=rev Author: brus07 Date: 2009-07-14 09:46:59 +0000 (Tue, 14 Jul 2009) Log Message: ----------- Create new folder for new project structure for programming testing system. Added Paths: ----------- nera/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-03-02 19:21:09
|
Revision: 519 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=519&view=rev Author: panzaboi Date: 2009-03-02 19:21:05 +0000 (Mon, 02 Mar 2009) Log Message: ----------- speed increase Modified Paths: -------------- website/library/Application.php Modified: website/library/Application.php =================================================================== --- website/library/Application.php 2009-03-02 18:45:44 UTC (rev 518) +++ website/library/Application.php 2009-03-02 19:21:05 UTC (rev 519) @@ -72,6 +72,9 @@ //Zend_Loader::registerAutoload(); spl_autoload_register(array('Application', 'autoload')); + // Use Cache + $this->_usePageCache(); + // Setup Session Zend_Session::start(); @@ -292,6 +295,32 @@ Zend_Registry::set('Zend_Log', $log); } + + protected function _usePageCache() + { + $frontendOptions = array( + 'lifetime' => 3600, + 'default_options' => array( + // disable default caching for all requests + 'cache' => true + ), + + // cache routes to Index and News controllers + /*'regexps' => array( + '^/$' => array('cache' => true), + '^/news/' => array('cache' => true) + )*/ + ); + + $cache = Zend_Cache::factory( + 'Page', + 'Apc', + $frontendOptions + ); + + // serve cached page (if it exists) and exit + $cache->start(); + } }; /*function br2nl($text) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-03-02 18:45:49
|
Revision: 518 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=518&view=rev Author: panzaboi Date: 2009-03-02 18:45:44 +0000 (Mon, 02 Mar 2009) Log Message: ----------- speed increase Modified Paths: -------------- website/library/Application.php Modified: website/library/Application.php =================================================================== --- website/library/Application.php 2009-03-01 19:43:32 UTC (rev 517) +++ website/library/Application.php 2009-03-02 18:45:44 UTC (rev 518) @@ -28,6 +28,12 @@ { return (microtime(true) - self::$_start); } + + public static function autoload($path) + { + include str_replace('_','/',$path) . '.php'; + return $path; + } public function setEnvironment($environment) { @@ -62,8 +68,9 @@ protected function _initialize() { // Auto-loader - require_once 'Zend/Loader.php'; - Zend_Loader::registerAutoload(); + //require_once 'Zend/Loader.php'; + //Zend_Loader::registerAutoload(); + spl_autoload_register(array('Application', 'autoload')); // Setup Session Zend_Session::start(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-03-01 19:43:35
|
Revision: 517 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=517&view=rev Author: panzaboi Date: 2009-03-01 19:43:32 +0000 (Sun, 01 Mar 2009) Log Message: ----------- small fix Modified Paths: -------------- website/httpdocs/index.php Modified: website/httpdocs/index.php =================================================================== --- website/httpdocs/index.php 2009-03-01 19:14:16 UTC (rev 516) +++ website/httpdocs/index.php 2009-03-01 19:43:32 UTC (rev 517) @@ -6,9 +6,9 @@ //$_docroot = dirname($_SERVER["DOCUMENT_ROOT"]); $_approot = dirname(__FILE__); -set_include_path($_SERVER['LIBRARY_PATH'] . ':' . $_SERVER['APPLICATION_PATH'] . 'httpdocs/:' . $_SERVER['APPLICATION_PATH'] . 'config/:' . $_SERVER['APPLICATION_PATH'] . 'lang/:' . $_SERVER['APPLICATION_PATH'] . 'application/:' . get_include_path()): +set_include_path($_SERVER['LIBRARY_PATH'] . PATH_SEPARATOR . $_SERVER['APPLICATION_PATH'] . 'httpdocs/' . PATH_SEPARATOR . $_SERVER['APPLICATION_PATH'] . 'config/' . PATH_SEPARATOR . $_SERVER['APPLICATION_PATH'] . 'lang/' . PATH_SEPARATOR . $_SERVER['APPLICATION_PATH'] . 'application/' . PATH_SEPARATOR . get_include_path()); -require_once 'Application.php': +require_once 'Application.php'; $app = new Application($_approot); $app->setEnvironment('development'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-03-01 19:14:19
|
Revision: 516 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=516&view=rev Author: panzaboi Date: 2009-03-01 19:14:16 +0000 (Sun, 01 Mar 2009) Log Message: ----------- simple update Modified Paths: -------------- website/httpdocs/index.php Modified: website/httpdocs/index.php =================================================================== --- website/httpdocs/index.php 2009-03-01 18:22:55 UTC (rev 515) +++ website/httpdocs/index.php 2009-03-01 19:14:16 UTC (rev 516) @@ -6,9 +6,9 @@ //$_docroot = dirname($_SERVER["DOCUMENT_ROOT"]); $_approot = dirname(__FILE__); -set_include_path($_SERVER['LIBRARY_PATH'] . ';' . $_SERVER['APPLICATION_PATH'] . 'httpdocs/;' . $_SERVER['APPLICATION_PATH'] . 'config/;' . $_SERVER['APPLICATION_PATH'] . 'lang/;' . $_SERVER['APPLICATION_PATH'] . 'application/;' . get_include_path()); +set_include_path($_SERVER['LIBRARY_PATH'] . ':' . $_SERVER['APPLICATION_PATH'] . 'httpdocs/:' . $_SERVER['APPLICATION_PATH'] . 'config/:' . $_SERVER['APPLICATION_PATH'] . 'lang/:' . $_SERVER['APPLICATION_PATH'] . 'application/:' . get_include_path()): -require_once 'Application.php'; +require_once 'Application.php': $app = new Application($_approot); $app->setEnvironment('development'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-03-01 18:22:57
|
Revision: 515 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=515&view=rev Author: panzaboi Date: 2009-03-01 18:22:55 +0000 (Sun, 01 Mar 2009) Log Message: ----------- Set Enviroment path for library and application Modified Paths: -------------- website/httpdocs/.htaccess website/httpdocs/index.php website/library/Application.php Modified: website/httpdocs/.htaccess =================================================================== --- website/httpdocs/.htaccess 2009-03-01 16:23:15 UTC (rev 514) +++ website/httpdocs/.htaccess 2009-03-01 18:22:55 UTC (rev 515) @@ -3,4 +3,7 @@ RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] -RewriteRule ^.*$ /index.php [NC,L] \ No newline at end of file +RewriteRule ^.*$ /index.php [NC,L] + +SetEnv LIBRARY_PATH D:/server/library/ +SetEnv APPLICATION_PATH D:/server/ \ No newline at end of file Modified: website/httpdocs/index.php =================================================================== --- website/httpdocs/index.php 2009-03-01 16:23:15 UTC (rev 514) +++ website/httpdocs/index.php 2009-03-01 18:22:55 UTC (rev 515) @@ -6,7 +6,7 @@ //$_docroot = dirname($_SERVER["DOCUMENT_ROOT"]); $_approot = dirname(__FILE__); -set_include_path("D:/server/library/;D:/server/httpdocs/;D:/server/config/;D:/server/lang/;D:/server/application/" . get_include_path()); +set_include_path($_SERVER['LIBRARY_PATH'] . ';' . $_SERVER['APPLICATION_PATH'] . 'httpdocs/;' . $_SERVER['APPLICATION_PATH'] . 'config/;' . $_SERVER['APPLICATION_PATH'] . 'lang/;' . $_SERVER['APPLICATION_PATH'] . 'application/;' . get_include_path()); require_once 'Application.php'; Modified: website/library/Application.php =================================================================== --- website/library/Application.php 2009-03-01 16:23:15 UTC (rev 514) +++ website/library/Application.php 2009-03-01 18:22:55 UTC (rev 515) @@ -208,7 +208,7 @@ } // Setup Dojo - Zend_Dojo::enableView($view); + //Zend_Dojo::enableView($view); // Setup JQuery ZendX_JQuery::enableView($view); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-03-01 16:23:20
|
Revision: 514 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=514&view=rev Author: panzaboi Date: 2009-03-01 16:23:15 +0000 (Sun, 01 Mar 2009) Log Message: ----------- Added general view helper plugins Added Paths: ----------- website/application/views/ website/application/views/helpers/ website/application/views/helpers/IsLoggedIn.php website/application/views/helpers/getUser.php website/application/views/scripts/ website/application/views/scripts/error/ website/application/views/scripts/error/error.phtml website/application/views/scripts/logedin.phtml website/application/views/scripts/paginator.phtml Property changes on: website/application/views ___________________________________________________________________ Added: tsvn:logminsize + 5 Property changes on: website/application/views/helpers ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: website/application/views/helpers/IsLoggedIn.php =================================================================== --- website/application/views/helpers/IsLoggedIn.php (rev 0) +++ website/application/views/helpers/IsLoggedIn.php 2009-03-01 16:23:15 UTC (rev 514) @@ -0,0 +1,14 @@ +<?php + +class Acm_View_Helper_IsLoggedIn extends Zend_View_Helper_Abstract +{ + public function isLoggedIn() + { + $auth = Zend_Auth::getInstance(); + + if ($auth->hasIdentity()) + return true; + else + return false; + } +} \ No newline at end of file Added: website/application/views/helpers/getUser.php =================================================================== --- website/application/views/helpers/getUser.php (rev 0) +++ website/application/views/helpers/getUser.php 2009-03-01 16:23:15 UTC (rev 514) @@ -0,0 +1,14 @@ +<?php + +class Acm_View_Helper_getUser extends Zend_View_Helper_Abstract +{ + public function getUser() + { + $auth = Zend_Auth::getInstance(); + + if ($auth->hasIdentity()) + return $auth->getIdentity(); + else + return NULL; + } +} \ No newline at end of file Property changes on: website/application/views/scripts ___________________________________________________________________ Added: tsvn:logminsize + 5 Property changes on: website/application/views/scripts/error ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: website/application/views/scripts/error/error.phtml =================================================================== --- website/application/views/scripts/error/error.phtml (rev 0) +++ website/application/views/scripts/error/error.phtml 2009-03-01 16:23:15 UTC (rev 514) @@ -0,0 +1,14 @@ +<h1>An error occurred</h1> +<h2><?= $this->msg ?></h2> +<? if ('development' == $this->env): ?> +<h3>Exception information:</h3> + <p> + <b>Message:</b> <?= ($this->exception ? $this->exception->getMessage() : ($this->other_message ? $this->other_message : $this->translate("unknownError"))) ?> + </p> + + <h3>Stack trace:</h3> + <pre><?= ($this->exception ? $this->exception->getTraceAsString() : "") ?></pre> + + <h3>Request Parameters:</h3> + <pre><? var_dump($this->request->getParams()) ?></pre> +<? endif ?> Added: website/application/views/scripts/logedin.phtml =================================================================== --- website/application/views/scripts/logedin.phtml (rev 0) +++ website/application/views/scripts/logedin.phtml 2009-03-01 16:23:15 UTC (rev 514) @@ -0,0 +1,4 @@ +<div class="box2 c"> + <h2><?= $this->translate('user_menu') ?></h2> + <a href="<?= $this->url(array('module' => 'default', 'controller' => 'index', 'action' => 'logout'), null, true) ?>"><?= $this->translate('log_out') ?></a> +</div> \ No newline at end of file Added: website/application/views/scripts/paginator.phtml =================================================================== --- website/application/views/scripts/paginator.phtml (rev 0) +++ website/application/views/scripts/paginator.phtml 2009-03-01 16:23:15 UTC (rev 514) @@ -0,0 +1,30 @@ +<?php if ($this->pageCount): ?> +<div class="paginationControl"> +<!-- Previous page link --> +<?php if (isset($this->previous)): ?> + <a href="<?= $this->url(array('page' => $this->previous)); ?>"> + < Previous + </a> | +<?php else: ?> + <span class="disabled">< Previous</span> | +<?php endif; ?> + +<!-- Numbered page links --> +<?php foreach ($this->pagesInRange as $page): ?> + <?php if ($page != $this->current): ?> + <a href="<?= $this->url(array('page' => $page)); ?>"><?= $page; ?></a> | + <?php else: ?> + <?= $page; ?> | + <?php endif; ?> +<?php endforeach; ?> + +<!-- Next page link --> +<?php if (isset($this->next)): ?> + <a href="<?= $this->url(array('page' => $this->next)); ?>"> + Next > + </a> +<?php else: ?> + <span class="disabled">Next ></span> +<?php endif; ?> +</div> +<?php endif; ?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-03-01 10:02:35
|
Revision: 513 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=513&view=rev Author: panzaboi Date: 2009-03-01 10:02:26 +0000 (Sun, 01 Mar 2009) Log Message: ----------- 1) Move from Dojo to JQuery 2) Basic functionality of Contest 3) Moved authorication out of ACM module into Default 4) Added Virtual Contest basic functionality 5) Admin Structure (proposal) 6) Configuration possibility to add helper paths 7) Added View Helpers for Text and TextArea to support languages tab. Modified Paths: -------------- website/application/layouts/layout.phtml website/application/models/Form/SmallLogin.php website/application/modules/acm/controllers/ContestController.php website/application/modules/acm/controllers/IndexController.php website/application/modules/acm/models/Archive.php website/application/modules/acm/models/Contest.php website/application/modules/acm/models/Form/Submit.php website/application/modules/acm/models/Table/Challenges.php website/application/modules/acm/models/Table/Contests.php website/application/modules/acm/views/scripts/contest/contest.phtml website/application/modules/acm/views/scripts/contest/index.phtml website/application/modules/admin/layouts/layout.phtml website/application/modules/admin/models/Form/Settings.php website/application/modules/admin/views/scripts/crud/list.phtml website/application/modules/default/controllers/IndexController.php website/application/modules/default/controllers/NewsController.php website/config/config.ini website/httpdocs/index.php website/httpdocs/scripts/main.js website/httpdocs/styles/style.css website/lang/en.csv website/lang/uk.csv website/library/Application.php website/library/Ostacium/Controller/Action/Crud.php website/library/Ostacium/Controller/Action.php website/library/Ostacium/Controller/Plugin/ErrorHandler.php website/library/Ostacium/Db/Table/Crud.php website/library/Ostacium/Db/Table.php Added Paths: ----------- website/application/models/Form/Login.php website/application/modules/acm/models/Form/Contest.php website/application/modules/acm/models/Form/ContestProblems.php website/application/modules/acm/models/Table/ContestsChallenges.php website/application/modules/acm/models/Table/ContestsLang.php website/application/modules/acm/views/scripts/contest/add.phtml website/application/modules/acm/views/scripts/contest/addproblems.phtml website/application/modules/acm/views/scripts/contest/problementry.phtml website/application/modules/admin/controllers/ProblemsController.php website/application/modules/admin/models/Form/Problems.php website/application/modules/admin/models/Table/Problems.php website/application/modules/admin/views/scripts/crud/new.phtml website/application/modules/default/models/Form/Register.php website/application/modules/default/models/Index.php website/httpdocs/images/acm/calendar.png website/httpdocs/styles/theme/ website/httpdocs/styles/theme/images/ website/httpdocs/styles/theme/images/ui-bg_diagonals-small_0_aaaaaa_40x40.png website/httpdocs/styles/theme/images/ui-bg_diagonals-thick_15_444444_40x40.png website/httpdocs/styles/theme/images/ui-bg_glass_100_f0f0f0_1x400.png website/httpdocs/styles/theme/images/ui-bg_glass_50_99c2ff_1x400.png website/httpdocs/styles/theme/images/ui-bg_glass_55_fbf5d0_1x400.png website/httpdocs/styles/theme/images/ui-bg_glass_80_e6e6e6_1x400.png website/httpdocs/styles/theme/images/ui-bg_glass_95_fef1ec_1x400.png website/httpdocs/styles/theme/images/ui-bg_highlight-hard_100_f9f9f9_1x100.png website/httpdocs/styles/theme/images/ui-bg_highlight-soft_100_e7eef3_1x100.png website/httpdocs/styles/theme/images/ui-icons_222222_256x240.png website/httpdocs/styles/theme/images/ui-icons_2694e8_256x240.png website/httpdocs/styles/theme/images/ui-icons_2e83ff_256x240.png website/httpdocs/styles/theme/images/ui-icons_72a7cf_256x240.png website/httpdocs/styles/theme/images/ui-icons_888888_256x240.png website/httpdocs/styles/theme/images/ui-icons_cd0a0a_256x240.png website/httpdocs/styles/theme/images/ui-icons_ffffff_256x240.png website/httpdocs/styles/theme/ui.accordion.css website/httpdocs/styles/theme/ui.all.css website/httpdocs/styles/theme/ui.base.css website/httpdocs/styles/theme/ui.core.css website/httpdocs/styles/theme/ui.datepicker.css website/httpdocs/styles/theme/ui.dialog.css website/httpdocs/styles/theme/ui.progressbar.css website/httpdocs/styles/theme/ui.resizable.css website/httpdocs/styles/theme/ui.slider.css website/httpdocs/styles/theme/ui.tabs.css website/httpdocs/styles/theme/ui.theme.css website/library/Ostacium/Form/Crud.php website/library/Ostacium/Form/Element/ website/library/Ostacium/Form/Element/Text.php website/library/Ostacium/Form/Element/Textarea.php website/library/Ostacium/View/Helper/FormText.php website/library/Ostacium/View/Helper/FormTextarea.php Removed Paths: ------------- website/application/modules/acm/models/Form/Login.php website/application/modules/acm/models/Form/Register.php website/application/modules/acm/models/Form/SmallLogin.php website/application/modules/acm/models/Index.php website/application/view/ website/library/Ostacium/Dojo/ Property Changed: ---------------- website/httpdocs/scripts/ Modified: website/application/layouts/layout.phtml =================================================================== --- website/application/layouts/layout.phtml 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/layouts/layout.phtml 2009-03-01 10:02:26 UTC (rev 513) @@ -1,26 +1,22 @@ <?php -$loggedin = Zend_Auth::getInstance()->getIdentity(); - -if ($loggedin) +if ($this->isLoggedIn()) { $form = $this->partial('logedin.phtml'); } -elseif (!$this->dojo()->hasDijit('loginform')) +else { $form = (new Form_SmallLogin()); $form = $form->render(); } -else $form = ''; ?> - <?= $this->doctype() ?> -<? $this->dojo()->enable() - ->setDjConfigOption('parseOnLoad', true) - ->registerModulePath('custom', '../custom/') - ->requireModule('dijit.form.FilteringSelect') +<? $this->jquery()->enable() + //->setDjConfigOption('parseOnLoad', true) + //->registerModulePath('custom', '../custom/') + //->requireModule('dijit.form.FilteringSelect') ->addOnLoad('init'); ?> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> +<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="description" content="Site description" /> <meta name="keywords" content="key, words" /> @@ -29,22 +25,26 @@ <?= $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8') ?> <?= $this->headLink()->appendStylesheet('/styles/style.css') ?> <?= $this->headLink()->appendStylesheet('/styles/prettify.css') ?> - <?= $this->headScript()->appendFile('/scripts/main.js') ?> + <? $this->headScript()->appendFile('/scripts/main.js') ?> <?= $this->headScript()->appendFile('/scripts/prettify.js') ?> <? - if ($this->dojo()->isEnabled()): - $this->dojo()->setLocalPath('/scripts/dojo/dojo.js') - ->addStyleSheetModule('dijit.themes.tundra'); + if ($this->jquery()->isEnabled()): + $this->jquery()->setLocalPath('/scripts/jquery/jquery-1.3.2.min.js') + ->setUiLocalPath('/scripts/jquery/jquery-ui-1.6rc6.min.js') + ->addStylesheet('/styles/theme/ui.all.css'); + //$this->dojo()->setLocalPath('/scripts/dojo/dojo/dojo.js') + /*$this->dojo()->setCdnBase(Zend_Dojo::CDN_BASE_GOOGLE) + ->setCdnVersion("1.2")*/ + // ->addStyleSheetModule('dijit.themes.nihilo'); - echo $this->dojo(); + echo $this->jquery(); endif; ?> - <base href="<?= 'http://' . $_SERVER["HTTP_HOST"] . $this->baseUrl() ?>/" /> </head> -<body class="tundra"> +<body> <div id="wrapper"> <div id="header"> <a href="<?= $this->url(array('module' => 'acm'), null, true) ?>"><img src="images/logo.png" id="logo" /></a> @@ -78,19 +78,9 @@ <li><a href="<?= $this->url(array('module' => 'acm', 'controller' => 'archive', 'action' => 'results'), null, true) ?>">Результати</a></li> </ul> </li> - <li> - <a href="<?= $this->url(array('module' => 'acm', 'controller' => 'contest', 'action' => 'index'), null, true) ?>">Контести</a> - </li> - <li> - <a href="#Archieve" onclick="return toggle('sub3');">Віртуальні Контести</a> - <ul id="sub3"> - <li><a href="#Problems">Створити</a></li> - <li><a href="#Problems">Зареєструватись</a></li> - <li><a href="#Problems">Набір Завдань</a></li> - <li><a href="#Results">Результати</a></li> - </ul> - </li> - <li><a href="#contact">Contact</a></li> + <li><a href="<?= $this->url(array('module' => 'acm', 'controller' => 'contest', 'action' => 'index'), null, true) ?>">Контести</a></li> + <li><a href="<?= $this->url(array('module' => 'acm', 'controller' => 'contest', 'action' => 'index', 'virtual' => '1'), null, true) ?>">Віртуальні Контести</a></li> + <li><a href="#contact">Контакти</a></li> </ul> <!--<div class="box2 c"> @@ -114,14 +104,14 @@ </div> </div> - <div id="clear"></div> + <div class="clear"></div> </div> <div id="footer"> <p> - Copyright 2009 ACM. Designed by <a href="#" rel="external">panza</a>. Valid <a href="http://jigsaw.w3.org/css-validator/check/referer" rel="external">CSS</a> & <a href="http://validator.w3.org/check?uri=referer" rel="external">XHTML</a> + Copyright 2009 ACM. Developed by <a href="http://panzaboi.com/">panza</a>. Valid <a href="http://jigsaw.w3.org/css-validator/check/referer" rel="external">CSS</a> & <a href="http://validator.w3.org/check?uri=referer" rel="external">XHTML</a> <br /> <!--<?= $this->debugInfo(true) ?>--> </p> Added: website/application/models/Form/Login.php =================================================================== --- website/application/models/Form/Login.php (rev 0) +++ website/application/models/Form/Login.php 2009-03-01 10:02:26 UTC (rev 513) @@ -0,0 +1,75 @@ +<?php + +class Form_Login extends ZendX_JQuery_Form +{ + public $elementDecorators = array( + 'ViewHelper', + 'Errors', + array('Label', array('class' => 'label')), + array('HtmlTag', array('tag' => 'div', 'class' => 'line')) + ); + + public $buttonDecorators = array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'div', 'class' => 'line tr')) + ); + + public function init() + { + $translate = Zend_Registry::get('Zend_Translate'); + $router = Zend_Controller_Front::getInstance()->getRouter(); + + $this->setAction($router->assemble(array('module' => 'default', 'controller' => 'index', 'action' => 'login'), null, true)); + $this->setMethod('post'); + $this->setName('loginform'); + $this->setAttrib('class', 'form'); + + $this->addElement('text', 'username', array( + 'decorators' => $this->elementDecorators, + 'filters' => array('StringTrim', 'StringToLower'), + 'validators' => array( + 'Alnum', + array('StringLength', false, array(5, 50)), + ), + 'required' => true, + 'title' => $translate->_('username'), + 'label' => $translate->_('username').':', + 'class' => 'text', + )); + + $this->addElement('password', 'password', array( + 'decorators' => $this->elementDecorators, + 'filters' => array('StringTrim'), + 'validators' => array( + 'Alnum', + array('StringLength', false, array(5, 32)), + ), + 'required' => true, + 'title' => $translate->_('password'), + 'label' => $translate->_('password').':', + 'class' => 'text', + )); + + $this->addElement('submit', 'loginbutton', array( + 'decorators' => $this->buttonDecorators, + 'required' => false, + 'ignore' => true, + 'label' => $translate->_('login'), + 'class' => 'submit' + )); + } + + public function loadDefaultDecorators() + { + $this->addPrefixPath('Ostacium_Form_Decorator', 'Ostacium/Form/Decorator', 'Decorator'); + $translate = Zend_Registry::get('Zend_Translate'); + + $this->setDecorators(array( + 'FormElements', + 'Form', + array('Description', array('placement' => 'prepend', 'tag' => 'div', 'class' => 'error')), + array(array('h2' => 'HtmlTag'), array('tag' => 'h2', 'placement' => 'prepend', 'markup' => $translate->_('login'))), + array(array('div' => 'HtmlTag'), array('tag' => 'div', 'class' => 'box c')) + )); + } +} \ No newline at end of file Modified: website/application/models/Form/SmallLogin.php =================================================================== --- website/application/models/Form/SmallLogin.php 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/models/Form/SmallLogin.php 2009-03-01 10:02:26 UTC (rev 513) @@ -1,15 +1,15 @@ <?php -class Form_SmallLogin extends Zend_Dojo_Form +class Form_SmallLogin extends ZendX_JQuery_Form { public $elementDecorators = array( - 'DijitElement', + 'ViewHelper', array('Label', array('class' => 'label2')), array('HtmlTag', array('tag' => 'div', 'class' => 'line')) ); public $buttonDecorators = array( - 'DijitElement', + 'ViewHelper', array('HtmlTag', array('tag' => 'div', 'class' => 'line tr')) ); @@ -18,29 +18,25 @@ $translate = Zend_Registry::get('Zend_Translate'); $router = Zend_Controller_Front::getInstance()->getRouter(); - $this->setAction($router->assemble(array('action' => 'login', 'controller' => 'index'), null)); + $this->setAction($router->assemble(array('module' => 'default', 'controller' => 'index', 'action' => 'login'), null, true)); $this->setMethod('post'); $this->setName('loginform'); $this->setAttrib('class', 'form'); - $this->addElement('ValidationTextBox', 'username', array( + $this->addElement('text', 'username', array( 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim', 'StringToLower'), 'validators' => array( - array('StringLength', false, array(5, 50)), + 'Alnum', + array('StringLength', false, array(5, 50)) ), 'required' => true, - 'maxlength' => 50, - 'trim' => true, - 'lowercase' => true, - 'regExp' => '[\w]{5,50}', - 'invalidMessage' => sprintf($translate->_('enter_username_between'), 5, 50), 'title' => $translate->_('username'), 'label' => $translate->_('username').':', 'class' => 'text', )); - $this->addElement('PasswordTextBox', 'password', array( + $this->addElement('password', 'password', array( 'decorators' => $this->elementDecorators, 'filters' => array('StringTrim'), 'validators' => array( @@ -48,24 +44,21 @@ array('StringLength', false, array(5, 32)), ), 'required' => true, - 'trim' => true, - 'regExp' => '[\S]{5,32}', - 'invalidMessage' => sprintf($translate->_('enter_password_between'), 5, 32), 'title' => $translate->_('password'), 'label' => $translate->_('password').':', 'class' => 'text', )); - $this->addElement('Button', 'signupbutton', array( + $this->addElement('button', 'signupbutton', array( 'decorators' => $this->buttonDecorators, 'required' => false, 'ignore' => true, 'label' => $translate->_('signup'), 'class' => 'signup2', - 'onclick' => 'return goToUrl("'.$router->assemble(array('action' => 'register', 'controller' => 'user'), null).'")' + 'onclick' => 'return goToUrl("'.$router->assemble(array('module' => 'default', 'controller' => 'user', 'action' => 'register'), null, true).'")' )); - $this->addElement('SubmitButton', 'loginbutton', array( + $this->addElement('submit', 'loginbutton', array( 'decorators' => $this->buttonDecorators, 'required' => false, 'ignore' => true, @@ -78,7 +71,7 @@ { $this->setDecorators(array( 'FormElements', - 'DijitForm', + 'Form', array('HtmlTag', array('tag' => 'div', 'class' => 'box2 c')) )); } Modified: website/application/modules/acm/controllers/ContestController.php =================================================================== --- website/application/modules/acm/controllers/ContestController.php 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/modules/acm/controllers/ContestController.php 2009-03-01 10:02:26 UTC (rev 513) @@ -1,46 +1,123 @@ <?php class Acm_ContestController extends Ostacium_Controller_Action -{ +{ + public function init($loadModel = true) + { + parent::init($loadModel); + + $ajaxContext = $this->_helper->getHelper('AjaxContext'); + $ajaxContext->addActionContext('addproblemAction', 'html') + ->addActionContext('delproblemAction', 'html') + ->initContext(); + } + public function indexAction() { - $contests = $this->_model->getContests(); + $virtual = (bool)$this->_getParam('virtual', false); + + $contests = $this->_model->getContests($virtual); + $paginator = Zend_Paginator::factory($contests); $paginator->setItemCountPerPage($this->_config->table->perpage); $paginator->setCurrentPageNumber($this->_getParam('page')); $this->view->contests = $paginator; + $this->view->virtual = $virtual; } - public function newAction() - { + public function addAction() + { + if (!$this->isAdminOrVirtual()) + return $this->_redirect($this->view->url(array('action' => 'index'), null)); + $this->view->form = new Form_Contest(); + + if (!$this->getRequest()->isPost()) + { + return; + } + + if (!$this->view->form->isValid($this->getRequest()->getPost())) + { + return; + } + + $values = $this->view->form->getValues(); + $values['virtual'] = (bool)$this->_getParam('virtual', false); + + $id = $this->_model->addContest($values); + return $this->_redirect($this->view->url(array('action' => 'addproblems', 'contestid' => $id, 'message' => 'successfully_added'), null)); } - public function addAction() + public function addproblemsAction() + { + $virtual = (bool)$this->_getParam('virtual', false); + $contestid = $this->_getParam('contestid'); + + if (!$this->isAdminOrVirtual() || !$contestid || !$this->_model->existsContest($contestid, $virtual)) + return $this->_redirect($this->view->url(array('action' => 'index'), null)); + + $this->view->form = new Form_ContestProblems(); + $this->view->problems = $this->_model->getChallenges($contestid, $virtual); + $this->view->contestid = $contestid; + $this->view->virtual = $virtual; + + if (!$this->getRequest()->isPost()) + return; + + if (!$this->view->form->isValid($this->getRequest()->getPost())) + return; + + $values = $this->view->form->getValues(); + } + + public function addproblemAction() { + $this->_helper->getHelper('viewRenderer')->setNoRender(true); + $id = $this->_getParam('id'); + $contestid = $this->_getParam('contestid'); + $virtual = $this->_getParam('virtual'); + + if (!$this->isAdminOrVirtual() || !$contestid || !$this->_model->existsContest($contestid, $virtual)) + return $this->_redirect($this->view->url(array('action' => 'index'), null)); + + if ($this->getRequest()->isXmlHttpRequest() || 1) + { + $add = $this->_model->addProblemToContest($id, $contestid); + + echo (int)$add; + exit; + } + else + { + + } } - /* - public function registerAction() + + public function delproblemAction() { - $contestid = $this->_getParam('contestid'); - - if (!$this->_model->isContestRunning($contestid)) - { - return $this->render('notrun'); - } + $id = $this->_getParam('id'); + $contestid = $this->_getParam('contestid'); + $virtual = $this->_getParam('virtual'); + + if (!$this->isAdminOrVirtual() || !$contestid || !$this->_model->existsContest($contestid, $virtual)) + return $this->_redirect($this->view->url(array('action' => 'index'), null)); + + if ($this->getRequest()->isXmlHttpRequest()) + { + $remove = $this->_model->removeProblemFromContest($id, $contestid); + + echo (int)$remove; + exit; + } + else + { + + } + } - if ($this->_model->isInContest($contestid)) - { - return $this->render('incontest'); - } - - $this->_model->registerUser($contestid); - - return $this->render('registered'); - } - */ public function viewAction() { $id = $this->_getParam('id'); @@ -69,14 +146,20 @@ public function problemsetAction() { + $virtual = (bool)$this->_getParam('virtual', false); $contestid = $this->_getParam('contestid'); - /*if (!$this->_model->isInContest($contestid)) - { - return $this->render('notincontest'); - }*/ - - $this->view->challenges = $this->_model->getChallenges($contestid); + $challenges = $this->_model->getChallenges($contestid, $virtual); + + if (!$challenges) + return $this->_forward('index', null, null, $this->_getAllParams() + array('message' => 'noProblem')); + + $paginator = Zend_Paginator::factory($challenges); + $paginator->setItemCountPerPage($this->_config->table->perpage); + $paginator->setCurrentPageNumber($this->_getParam('page')); + + $this->view->challenges = $paginator; + $this->view->virtual = $virtual; } public function submitAction() @@ -170,4 +253,12 @@ $this->view->challenges = $this->_model->getChallenges($contestid); $this->view->table = $this->_model->getTable($contestid); } + + protected function isAdminOrVirtual() + { + $virtual = (bool)$this->_getParam('virtual', false); + $user = Zend_Auth::getInstance()->getIdentity(); + + return ($user->role == 'admin' || $virtual == true); + } } \ No newline at end of file Modified: website/application/modules/acm/controllers/IndexController.php =================================================================== --- website/application/modules/acm/controllers/IndexController.php 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/modules/acm/controllers/IndexController.php 2009-03-01 10:02:26 UTC (rev 513) @@ -6,60 +6,4 @@ { var_dump('sadfasdf'); } - - public function loginAction() - { - $this->_helper->getHelper('viewRenderer')->setNoRender(true); - - $form = new Form_Login(); - if ($this->_getParam('message')) - { - $form->setDescription($this->view->translate($this->_getParam('message'))); - $this->view->message = null; - } - - if (!$this->getRequest()->isPost()) - { - echo $form; - - return; - } - - if (!$form->isValid($this->getRequest()->getPost())) - { - echo $form; - - return; - } - - $values = $form->getValues(); - - $result = $this->_model->authoricate($values); - - if (!$result) - { - $form->setDescription($this->view->translate('error_bad_login')); - echo $form; - - return; - } - - $redirect = new Zend_Session_Namespace('Redirect'); - if ($redirect->to) - { - $this->getRequest()->setParam('redirect', $redirect->to); - $redirect->unsetAll(); - } - else - { - return $this->_redirect('/acm/index/index'); - } - } - - public function logoutAction() - { - Zend_Auth::getInstance()->clearIdentity(); - - $this->_redirect('/acm/index/index'); - } } \ No newline at end of file Modified: website/application/modules/acm/models/Archive.php =================================================================== --- website/application/modules/acm/models/Archive.php 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/modules/acm/models/Archive.php 2009-03-01 10:02:26 UTC (rev 513) @@ -28,7 +28,7 @@ public function getStatus($id) { - $username = Zend_Auth::getInstance()->getStorage()->read()->username; + $username = Zend_Auth::getInstance()->getIdentity()->username; $archresults = new Table_ArchiveResults(); return $archresults->get(array($username, $id)); @@ -38,7 +38,7 @@ { $data = array( 'contestid' => 0, - 'username' => Zend_Auth::getInstance()->getStorage()->read()->username, + 'username' => Zend_Auth::getInstance()->getIdentity()->username, 'challengeid' => (int)$values['id'], 'codelangid' => $values['languageid'], 'firsttest' => $values['firsttest'], Modified: website/application/modules/acm/models/Contest.php =================================================================== --- website/application/modules/acm/models/Contest.php 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/modules/acm/models/Contest.php 2009-03-01 10:02:26 UTC (rev 513) @@ -15,40 +15,28 @@ $this->calc = $calc; } - public function getContests() + public function getContests($virtual) { $contests = new Table_Contests(); - return $contests->getAll(); + return $contests->getAll($virtual); } - /* - public function registerUser($id) - { - $username = Zend_Auth::getInstance()->getStorage()->read()->username; - - $ca = new Table_ContestsApplicants(); - $ca->insert(array('username' => $username, 'contestid' => $id)); - - return true; - } - */ + public function isContestRunning($contestid) { $contest = new Table_Contests(); return $contest->isRunning($contestid); } - /* - public function isInContest($contestid) + + public function existsContest($contestid, $virtual) { - $username = Zend_Auth::getInstance()->getStorage()->read()->username; $contest = new Table_Contests(); - - return $contest->isInContest($contestid, $username); + return $contest->exists($contestid, $virtual); } - */ - public function getChallenges($contestid) + + public function getChallenges($contestid, $virtual) { $challenges = new Table_Challenges(); - return $challenges->getAllFromContest($contestid); + return $challenges->getAllFromContest($contestid, $virtual); } public function getChallenge($id, $contestid) @@ -63,11 +51,54 @@ return $submits->getFromContest($id, $contestid); } + public function addContest($values) + { + $data = array( + 'start' => strtotime($values['start_date'].$values['start_time'].(Zend_Auth::getInstance()->getIdentity()->timeoffset)), + 'end' => strtotime($values['end_date'].$values['end_time'].(Zend_Auth::getInstance()->getIdentity()->timeoffset)), + 'enabled' => (int)$values['enabled'], + 'virtual' => (int)$values['virtual'], + 'author' => Zend_Auth::getInstance()->getIdentity()->username + ); + + $contest = new Table_Contests(); + $contestlang = new Table_ContestsLang(); + + $id = $contest->insert($data); + $languages = Zend_Registry::get('Zend_Translate')->getList(); + + foreach ($languages as $lang) + { + $langdata = array( + 'id' => $id, + 'langcode' => $lang, + 'name' => $values['name'][$lang], + 'description' => $values['description'][$lang] + ); + + $contestlang->insert($langdata); + } + + return $id; + } + + public function addProblemToContest($id, $contestid) + { + $contestsch = new Table_ContestsChallenges(); + return $contestsch->insert(array('contestid' => $contestid, 'challengeid' => $id)); + } + + public function removeProblemFromContest($id, $contestid) + { + $contestsch = new Table_ContestsChallenges(); + return $contestsch->delete(array('contestid' => $contestid, 'challengeid' => $id)); + } + public function addSubmit($values) { $data = array( 'contestid' => $values['contestid'], - 'username' => Zend_Auth::getInstance()->getStorage()->read()->username, + 'username' => Zend_Auth::getInstance()->getIdentity()->username, 'challengeid' => (int)$values['id'], 'codelangid' => $values['languageid'], 'firsttest' => $values['firsttest'], Added: website/application/modules/acm/models/Form/Contest.php =================================================================== --- website/application/modules/acm/models/Form/Contest.php (rev 0) +++ website/application/modules/acm/models/Form/Contest.php 2009-03-01 10:02:26 UTC (rev 513) @@ -0,0 +1,133 @@ +<?php + +class Form_Contest extends ZendX_JQuery_Form +{ + public $elementDecorators = array( + 'ViewHelper', + 'Errors', + array('Label', array('class' => 'label')), + array('HtmlTag', array('tag' => 'div', 'class' => 'elcontainer')) + ); + + public $buttonDecorators = array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'div', 'class' => 'elcontainer tc')) + ); + + public function init() + { + $translate = Zend_Registry::get('Zend_Translate'); + $db = Zend_Registry::get('db'); + $router = Zend_Controller_Front::getInstance()->getRouter(); + + $this->setAction($router->assemble(array('action' => 'add'), null)); + $this->setMethod('post'); + $this->setName('registerform'); + $this->setAttrib('class', 'registerform c'); + + $this->addPrefixPath('Ostacium_Form_Element', 'Ostacium/Form/Element', Zend_Form::ELEMENT); + + $this->addElement('text', 'name', array( + 'decorators' => $this->elementDecorators, + 'filters' => array('StringTrim'), + 'validators' => array( + array('StringLength', false, array(5, 50)), + ), + 'required' => true, + //'invalidMessage' => sprintf($translate->_('enter_username_between'), 5, 50), + 'title' => $translate->_('username'), + 'label' => $translate->_('username').':', + 'class' => 'text', + 'useLanguages' => true, + )); + + $this->addElement('textarea', 'description', array( + 'decorators' => $this->elementDecorators, + 'filters' => array('StringTrim'), + 'required' => true, + 'title' => $translate->_('username'), + 'label' => $translate->_('username').':', + 'class' => 'text', + 'rows' => '10', + 'useLanguages' => true, + )); + + $this->addElement('DatePicker', 'start_date', array( + 'decorators' => $this->elementDecorators, + 'required' => true, + //'invalidMessage' => $translate->_('invalidDate'), + 'title' => $translate->_('start_date'), + 'label' => $translate->_('start_date').': ', + 'dateFormat' => 'dd.mm.yy', + 'jQueryParams' => array( + 'appendText' => '(dd.mm.yyyy)', + 'showAnim' => 'slideDown', + 'speed' => 'fast', + 'minDate' => 0, + 'beforeShow' => 'customRange' + ) + //'locale' => Zend_Registry::get('Zend_Locale'), + )); + + $this->addElement('text', 'start_time', array( + 'decorators' => $this->elementDecorators, + 'required' => true, + /*'invalidMessage' => $translate->_('invalidTime'), + 'visibleRange' => 'T10:00:00', + 'visibleIncrement' => 'T01:00:00', + 'clickableIncrement' => 'T01:00:00',*/ + 'title' => $translate->_('start_time'), + 'label' => $translate->_('start_time').': ', + )); + + $this->addElement('DatePicker', 'end_date', array( + 'decorators' => $this->elementDecorators, + 'required' => true, + //'invalidMessage' => $translate->_('invalidDate'), + 'title' => $translate->_('end_date'), + 'label' => $translate->_('end_date').': ', + 'dateFormat' => 'dd.mm.yy', + 'jQueryParams' => array( + 'appendText' => '(dd.mm.yyyy)', + 'showAnim' => 'slideDown', + 'speed' => 'fast', + 'minDate' => 0, + 'beforeShow' => 'customRange' + ) + )); + + $this->addElement('text', 'end_time', array( + 'decorators' => $this->elementDecorators, + 'required' => true, + /*'invalidMessage' => $translate->_('invalidTime'), + 'visibleRange' => 'T10:00:00', + 'visibleIncrement' => 'T01:00:00', + 'clickableIncrement' => 'T01:00:00',*/ + 'title' => $translate->_('end_time'), + 'label' => $translate->_('end_time').': ', + )); + + $this->addElement('checkbox', 'enabled', array( + 'decorators' => $this->elementDecorators, + 'title' => $translate->_('enabled'), + 'label' => $translate->_('enabled').': ', + 'multiOptions' => array($translate->_('no'), $translate->_('yes')), + )); + + $this->addElement('submit', 'createbutton', array( + 'decorators' => $this->buttonDecorators, + 'required' => false, + 'ignore' => true, + 'label' => $translate->_('add_contest'), + )); + } + + public function loadDefaultDecorators() + { + $this->setDecorators(array( + 'FormElements', + 'Form', + array('Description', array('placement' => 'prepend', 'tag' => 'div', 'class' => 'error')), + )); + } +} \ No newline at end of file Added: website/application/modules/acm/models/Form/ContestProblems.php =================================================================== --- website/application/modules/acm/models/Form/ContestProblems.php (rev 0) +++ website/application/modules/acm/models/Form/ContestProblems.php 2009-03-01 10:02:26 UTC (rev 513) @@ -0,0 +1,72 @@ +<?php + +class Form_ContestProblems extends ZendX_JQuery_Form +{ + public $elementDecorators = array( + 'ViewHelper', + 'Errors', + array('Label', array('class' => 'label')), + array('HtmlTag', array('tag' => 'div', 'class' => 'elcontainer')) + ); + + public $buttonDecorators = array( + 'ViewHelper', + array('HtmlTag', array('tag' => 'div', 'class' => 'elcontainer tc')) + ); + + public function init() + { + $translate = Zend_Registry::get('Zend_Translate'); + $db = Zend_Registry::get('db'); + $router = Zend_Controller_Front::getInstance()->getRouter(); + + $this->setAction($router->assemble(array('action' => 'index'), null)); + $this->setMethod('post'); + $this->setName('problemform'); + $this->setAttrib('class', 'problemform c'); + + $this->getView()->addHelperPath('Ostacium/Dojo/View/Helper', 'Ostacium_Dojo_View_Helper'); + $this->addPrefixPath('Ostacium_Dojo_Form_Element', 'Ostacium/Dojo/Form/Element', Zend_Form::ELEMENT); + + $table = new Table_Challenges(); + $virtual = (bool)$router->getParam('virtual'); + $challenges = $db->fetchPairs($table->getAllSelect($virtual)); + + $this->addElement('select', 'problem', array( + 'decorators' => $this->elementDecorators, + 'required' => true, + 'title' => $translate->_('problem'), + 'label' => $translate->_('problem').': ', + 'multiOptions' => $challenges, + )); + + $this->addElement('button', 'createbutton', array( + 'decorators' => $this->buttonDecorators, + 'required' => false, + 'ignore' => true, + 'label' => $translate->_('add_contest'), + 'onclick' => 'return addProblem();' + )); + + $this->addElement('submit', 'finishbutton', array( + 'decorators' => $this->buttonDecorators, + 'required' => false, + 'ignore' => true, + 'label' => $translate->_('finish_editing'), + )); + } + + public function loadDefaultDecorators() + { + $this->setDecorators(array( + 'FormElements', + 'Form', + array('Description', array('placement' => 'prepend', 'tag' => 'div', 'class' => 'error')), + )); + } + + /*protected function addIds(&$item, $key) + { + $item = $key . '. ' . $item; + }*/ +} \ No newline at end of file Deleted: website/application/modules/acm/models/Form/Login.php =================================================================== --- website/application/modules/acm/models/Form/Login.php 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/modules/acm/models/Form/Login.php 2009-03-01 10:02:26 UTC (rev 513) @@ -1,83 +0,0 @@ -<?php - -class Form_Login extends Zend_Dojo_Form -{ - public $elementDecorators = array( - 'DijitElement', - 'Errors', - array('Label', array('class' => 'label')), - array('HtmlTag', array('tag' => 'div', 'class' => 'line')) - ); - - public $buttonDecorators = array( - 'DijitElement', - array('HtmlTag', array('tag' => 'div', 'class' => 'line tr')) - ); - - public function init() - { - $translate = Zend_Registry::get('Zend_Translate'); - $router = Zend_Controller_Front::getInstance()->getRouter(); - - $this->setAction($router->assemble(array('action' => 'login', 'controller' => 'index'), null)); - $this->setMethod('post'); - $this->setName('loginform'); - $this->setAttrib('class', 'form'); - - $this->addElement('ValidationTextBox', 'username', array( - 'decorators' => $this->elementDecorators, - 'filters' => array('StringTrim', 'StringToLower'), - 'validators' => array( - array('StringLength', false, array(5, 50)), - ), - 'required' => true, - 'maxlength' => 50, - 'trim' => true, - 'lowercase' => true, - 'regExp' => '[\w]{5,50}', - 'invalidMessage' => sprintf($translate->_('wordErrorBetween'), 5, 50), - 'title' => $translate->_('username'), - 'label' => $translate->_('username').':', - 'class' => 'text', - )); - - $this->addElement('PasswordTextBox', 'password', array( - 'decorators' => $this->elementDecorators, - 'filters' => array('StringTrim'), - 'validators' => array( - 'Alnum', - array('StringLength', false, array(5, 32)), - ), - 'required' => true, - 'trim' => true, - 'regExp' => '[\S]{5,32}', - 'invalidMessage' => sprintf($translate->_('errorBetween'), 5, 32), - 'title' => $translate->_('password'), - 'label' => $translate->_('password').':', - 'class' => 'text', - )); - - $this->addElement('SubmitButton', 'loginbutton', array( - 'decorators' => $this->buttonDecorators, - 'required' => false, - 'ignore' => true, - 'label' => $translate->_('login'), - 'class' => 'submit' - )); - } - - public function loadDefaultDecorators() - { - //$this->addElementPrefixPath('Ostacium/Form/Decorator', 'Ostacium_Form_Decorator', 'Decorator'); - $this->addPrefixPath('Ostacium_Form_Decorator', 'Ostacium/Form/Decorator', 'Decorator'); - $translate = Zend_Registry::get('Zend_Translate'); - - $this->setDecorators(array( - 'FormElements', - 'DijitForm', - array('Description', array('placement' => 'prepend', 'tag' => 'div', 'class' => 'error')), - array(array('h2' => 'HtmlTag'), array('tag' => 'h2', 'placement' => 'prepend', 'markup' => $translate->_('login'))), - array(array('div' => 'HtmlTag'), array('tag' => 'div', 'class' => 'box c')) - )); - } -} \ No newline at end of file Deleted: website/application/modules/acm/models/Form/Register.php =================================================================== --- website/application/modules/acm/models/Form/Register.php 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/modules/acm/models/Form/Register.php 2009-03-01 10:02:26 UTC (rev 513) @@ -1,318 +0,0 @@ -<?php - -class Form_Register extends Zend_Dojo_Form -{ - public $elementDecorators = array( - 'DijitElement', - 'Errors', - array('Label', array('class' => 'label')), - array('HtmlTag', array('tag' => 'div', 'class' => 'elcontainer')) - ); - - public $simpleDecorators = array( - 'Errors', - array('Label', array('class' => 'label')), - array('HtmlTag', array('tag' => 'div', 'class' => 'elcontainer')) - ); - - public $buttonDecorators = array( - 'DijitElement', - array('HtmlTag', array('tag' => 'div', 'class' => 'elcontainer tc')) - ); - - public function init() - { - $translate = Zend_Registry::get('Zend_Translate'); - $db = Zend_Registry::get('db'); - $router = Zend_Controller_Front::getInstance()->getRouter(); - - $this->setAction($router->assemble(array('action' => 'register'), null)); - $this->setMethod('post'); - $this->setName('registerform'); - $this->setAttrib('class', 'registerform c'); - - $this->addElement('ValidationTextBox', 'username', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(5, 50)), - ), - 'maxlength' => 50, - 'trim' => true, - 'required' => true, - 'regExp' => '[\w]{5,50}', - 'invalidMessage' => sprintf($translate->_('errorBetween'), 5, 50), - 'title' => $translate->_('username'), - 'label' => $translate->_('username').': ', - 'id' => 'username_reg' - )); - - $this->addElement('PasswordTextBox', 'password', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(5, 32)), - ), - 'maxlength' => 32, - 'trim' => true, - 'required' => true, - 'regExp' => '[\S]{5,32}', - 'invalidMessage' => sprintf($translate->_('errorBetween'), 5, 32), - 'title' => $translate->_('password'), - 'label' => $translate->_('password').': ', - 'id' => 'password_reg' - )); - - $this->addElement('PasswordTextBox', 'cpassword', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(5, 32)), - ), - 'maxlength' => 32, - 'trim' => true, - 'propercase' => true, - 'required' => true, - 'regExp' => '[\S]{5,32}', - 'invalidMessage' => sprintf($translate->_('errorBetween'), 5, 32), - 'title' => $translate->_('confirm_password'), - 'label' => $translate->_('confirm_password').': ', - )); - - $this->addElement('ValidationTextBox', 'email', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - 'EmailAddress', - array('StringLength', false, 1) - ), - 'filters' => array('StringToLower'), - 'trim' => true, - 'lowercase' => true, - 'required' => true, - 'regExp' => '.{1,}', - 'invalidMessage' => $translate->_('errorEmpty'), - 'title' => $translate->_('email'), - 'label' => $translate->_('email').': ', - )); - - $this->addElement('Checkbox', 'hideemail', array( - 'decorators' => $this->elementDecorators, - 'required' => true, - 'title' => $translate->_('hide_email'), - 'label' => $translate->_('hide_email').': ', - 'multiOptions' => array($translate->_('no'), $translate->_('yes')), - )); - - $this->addElement('ValidationTextBox', 'name', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'maxlength' => 50, - 'trim' => true, - 'required' => false, - 'regExp' => '[\w ]{0,50}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 50), - 'title' => $translate->_('name'), - 'label' => $translate->_('name').': ', - )); - - $this->addElement('ValidationTextBox', 'surname', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'maxlength' => 50, - 'trim' => true, - 'required' => false, - 'regExp' => '[\w ]{0,50}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 50), - 'title' => $translate->_('surname'), - 'label' => $translate->_('surname').': ', - )); - - $this->addElement('ValidationTextBox', 'study', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'maxlength' => 50, - 'trim' => true, - 'required' => false, - 'regExp' => '[\w ]{0,50}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 50), - 'title' => $translate->_('edu_place'), - 'label' => $translate->_('edu_place').': ', - )); - - $this->addElement('DateTextBox', 'birthday', array( - 'decorators' => $this->elementDecorators, - 'required' => false, - 'invalidMessage' => $translate->_('invalidDate'), - 'title' => $translate->_('birthday'), - 'label' => $translate->_('birthday').': ', - 'formatLength' => 'short' - )); - - $this->addElement('ValidationTextBox', 'aim', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'maxlength' => 50, - 'trim' => true, - 'required' => false, - 'regExp' => '[\S]{0,50}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 50), - 'title' => $translate->_('aim'), - 'label' => $translate->_('aim').': ', - )); - - $this->addElement('ValidationTextBox', 'icq', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'maxlength' => 50, - 'trim' => true, - 'required' => false, - 'regExp' => '[\S]{0,50}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 50), - 'title' => $translate->_('icq_handle'), - 'label' => $translate->_('icq_handle').': ', - )); - - $this->addElement('ValidationTextBox', 'msn', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 100)), - ), - 'maxlength' => 100, - 'trim' => true, - 'required' => false, - 'regExp' => '[\S]{0,100}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 100), - 'title' => $translate->_('msn_handle'), - 'label' => $translate->_('msn_handle').': ', - )); - - $this->addElement('ValidationTextBox', 'skype', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'maxlength' => 50, - 'trim' => true, - 'required' => false, - 'regExp' => '[\S]{0,50}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 50), - 'title' => $translate->_('skype_handle'), - 'label' => $translate->_('skype_handle').': ', - )); - - $this->addElement('ValidationTextBox', 'yahoo', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'maxlength' => 50, - 'trim' => true, - 'required' => false, - 'regExp' => '[\S]{0,50}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 50), - 'title' => $translate->_('yahoo_handle'), - 'label' => $translate->_('yahoo_handle').': ', - )); - - $this->addElement('ValidationTextBox', 'web', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 100)), - ), - 'maxlength' => 200, - 'trim' => true, - 'required' => false, - 'regExp' => '[\S]{0,100}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 100), - 'title' => $translate->_('website'), - 'label' => $translate->_('website').': ', - )); - - $this->addElement('ValidationTextBox', 'topcoder', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'maxlength' => 50, - 'trim' => true, - 'required' => false, - 'regExp' => '[\S]{0,50}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 50), - 'title' => $translate->_('tc_handle'), - 'label' => $translate->_('tc_handle').': ', - )); - - $this->addElement('ValidationTextBox', 'timus', array( - 'decorators' => $this->elementDecorators, - 'validators' => array( - array('StringLength', false, array(0, 50)), - ), - 'maxlength' => 50, - 'trim' => true, - 'required' => false, - 'regExp' => '[\S]{0,50}', - 'invalidMessage' => sprintf($translate->_('errorMore'), 50), - 'title' => $translate->_('timus_handle'), - 'label' => $translate->_('timus_handle').': ', - )); - - $offset = array(-12 => -12, -11 => -11, -10 => -10, -9 => -9, -8 => -8, -7 => -7, -6 => -6, -5 => -5, -4 => -4, -3 => -3, -2 => -2, -1 => -1, 0 => 0, '+1' => '+1', '+2' => '+2', '+3' => '+3', '+4' => '+4', '+5' => '+5', '+6' => '+6', '+7' => '+7', '+8' => '+8', '+9' => '+9', '+10' => '+10', '+11' => '+11', '+12' => '+12', '+13' => '+13'); - - $this->addElement('FilteringSelect', 'timeoffset', array( - 'decorators' => $this->elementDecorators, - 'required' => true, - 'title' => $translate->_('timeoffset'), - 'label' => $translate->_('timeoffset').': ', - 'multiOptions' => $offset, - 'value' => 0 - )); - - $this->addElement('FilteringSelect', 'codelangid', array( - 'decorators' => $this->elementDecorators, - 'required' => true, - 'title' => $translate->_('code_language'), - 'label' => $translate->_('code_language').': ', - 'multiOptions' => $db->fetchPairs($db->select()->from('code_languages', array('id', 'name'))), - )); - - $this->addElement('FilteringSelect', 'language', array( - 'decorators' => $this->elementDecorators, - 'required' => true, - 'title' => $translate->_('language'), - 'label' => $translate->_('language').': ', - 'multiOptions' => $db->fetchPairs($db->select()->from('languages', array('code', 'name'))), - 'value' => Zend_Registry::get('config')->lang->default - )); - - $this->addElement('FilteringSelect', 'tshirtsize', array( - 'decorators' => $this->elementDecorators, - 'required' => true, - 'title' => $translate->_('tshirtsize'), - 'label' => $translate->_('tshirtsize').': ', - 'multiOptions' => array('S' => 'Small', 'M' => 'Medium', 'L' => 'Large'), - )); - - $this->addElement('SubmitButton', 'registerbutton', array( - 'decorators' => $this->buttonDecorators, - 'required' => false, - 'ignore' => true, - 'label' => $translate->_('register'), - )); - } - - public function loadDefaultDecorators() - { - $this->setDecorators(array( - 'FormElements', - 'DijitForm', - array('Description', array('placement' => 'prepend', 'tag' => 'div', 'class' => 'error')), - )); - } -} \ No newline at end of file Deleted: website/application/modules/acm/models/Form/SmallLogin.php =================================================================== --- website/application/modules/acm/models/Form/SmallLogin.php 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/modules/acm/models/Form/SmallLogin.php 2009-03-01 10:02:26 UTC (rev 513) @@ -1,85 +0,0 @@ -<?php - -class Form_SmallLogin extends Zend_Dojo_Form -{ - public $elementDecorators = array( - 'DijitElement', - array('Label', array('class' => 'label2')), - array('HtmlTag', array('tag' => 'div', 'class' => 'line')) - ); - - public $buttonDecorators = array( - 'DijitElement', - array('HtmlTag', array('tag' => 'div', 'class' => 'line tr')) - ); - - public function init() - { - $translate = Zend_Registry::get('Zend_Translate'); - $router = Zend_Controller_Front::getInstance()->getRouter(); - - $this->setAction($router->assemble(array('action' => 'login', 'controller' => 'index'), null)); - $this->setMethod('post'); - $this->setName('loginform'); - $this->setAttrib('class', 'form'); - - $this->addElement('ValidationTextBox', 'username', array( - 'decorators' => $this->elementDecorators, - 'filters' => array('StringTrim', 'StringToLower'), - 'validators' => array( - array('StringLength', false, array(5, 50)), - ), - 'required' => true, - 'maxlength' => 50, - 'trim' => true, - 'lowercase' => true, - 'regExp' => '[\w]{5,50}', - 'invalidMessage' => sprintf($translate->_('enter_username_between'), 5, 50), - 'title' => $translate->_('username'), - 'label' => $translate->_('username').':', - 'class' => 'text', - )); - - $this->addElement('PasswordTextBox', 'password', array( - 'decorators' => $this->elementDecorators, - 'filters' => array('StringTrim'), - 'validators' => array( - 'Alnum', - array('StringLength', false, array(5, 32)), - ), - 'required' => true, - 'trim' => true, - 'regExp' => '[\S]{5,32}', - 'invalidMessage' => sprintf($translate->_('enter_password_between'), 5, 32), - 'title' => $translate->_('password'), - 'label' => $translate->_('password').':', - 'class' => 'text', - )); - - $this->addElement('Button', 'signupbutton', array( - 'decorators' => $this->buttonDecorators, - 'required' => false, - 'ignore' => true, - 'label' => $translate->_('signup'), - 'class' => 'signup2', - 'onclick' => 'return goToUrl("'.$router->assemble(array('action' => 'register', 'controller' => 'user'), null).'")' - )); - - $this->addElement('SubmitButton', 'loginbutton', array( - 'decorators' => $this->buttonDecorators, - 'required' => false, - 'ignore' => true, - 'label' => $translate->_('login'), - 'class' => 'submit2' - )); - } - - public function loadDefaultDecorators() - { - $this->setDecorators(array( - 'FormElements', - 'DijitForm', - array('HtmlTag', array('tag' => 'div', 'class' => 'box2 c')) - )); - } -} \ No newline at end of file Modified: website/application/modules/acm/models/Form/Submit.php =================================================================== --- website/application/modules/acm/models/Form/Submit.php 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/modules/acm/models/Form/Submit.php 2009-03-01 10:02:26 UTC (rev 513) @@ -42,7 +42,7 @@ 'title' => $translate->_('language'), 'label' => $translate->_('language').': ', 'multiOptions' => $db->fetchPairs($db->select()->from('code_languages', array('id', 'name'))), - 'value' => (Zend_Auth::getInstance()->getStorage()->read()->codelangid) + 'value' => (Zend_Auth::getInstance()->getIdentity()->codelangid) )); $this->addElement('RadioButton', 'type', array( @@ -66,7 +66,7 @@ $this->addElement('File', 'codefile', array( 'decorators' => array_merge(array('File'), $this->simpleDecorators), 'validators' => array(array('Count', false, 1)), - 'destination' => Application::getDocRoot().'/other/uploads/', + 'destination' => Application::getDocRoot().'/other/uploads', 'label' => $translate->_('choose_file').': ', )); Deleted: website/application/modules/acm/models/Index.php =================================================================== --- website/application/modules/acm/models/Index.php 2009-02-27 23:53:06 UTC (rev 512) +++ website/application/modules/acm/models/Index.php 2009-03-01 10:02:26 UTC (rev 513) @@ -1,24 +0,0 @@ -<?php - -class Index extends Ostacium_Model -{ - public function authoricate($login) - { - $auth = Zend_Auth::getInstance(); - $adapter = Zend_Registry::get('auth'); - $acl = Zend_Registry::get('acl'); - - $adapter->setIdentity($login['username']) - ->setCredential($login['password']); - - $result = $adapter->authenticate(); - - if ($result->isValid()) { - $row = $adapter->getResultRowObject(); - - $auth->getStorage()->write($ro... [truncated message content] |