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-02-27 23:53:09
|
Revision: 512 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=512&view=rev Author: brus07 Date: 2009-02-27 23:53:06 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Added errorProvaider to FormCobmoBox element. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-26 19:43:42 UTC (rev 511) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-27 23:53:06 UTC (rev 512) @@ -1,3 +1,4 @@ +using System.Windows.Forms; namespace AcmContester.Plugins.IoiPlugins.IoiSubmitGuiPlugin { partial class IoiSubmitGuiControl @@ -28,11 +29,13 @@ /// </summary> private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.label1 = new System.Windows.Forms.Label(); this.nameTextBox = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); this.formComboBox = new System.Windows.Forms.ComboBox(); this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.label3 = new System.Windows.Forms.Label(); this.problemTextBox = new System.Windows.Forms.TextBox(); @@ -41,13 +44,14 @@ this.submitButton = new System.Windows.Forms.Button(); this.sourceTextBox = new System.Windows.Forms.TextBox(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); this.schoolTextBox = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); + this.errorProvider1 = new System.Windows.Forms.ErrorProvider(this.components); this.groupBox1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).BeginInit(); this.SuspendLayout(); // // label1 @@ -80,6 +84,7 @@ // formComboBox // this.formComboBox.FormattingEnabled = true; + this.errorProvider1.SetIconPadding(this.formComboBox, 2); this.formComboBox.Items.AddRange(new object[] { "9", "10", @@ -89,6 +94,7 @@ this.formComboBox.Size = new System.Drawing.Size(121, 21); this.formComboBox.TabIndex = 4; this.formComboBox.Text = "9"; + this.formComboBox.Validated += new System.EventHandler(this.formComboBox_Validated); // // groupBox1 // @@ -108,23 +114,47 @@ this.groupBox1.TabStop = false; this.groupBox1.Text = "\xD4\xEE\xF0\xEC\xE0 \xE2\xB3\xEF\xF0\xE0\xE2\xEA\xE8 \xF0\xEE\xE7\xE2\'\xFF\xE7\xEA\xF3"; // + // numericUpDown1 + // + this.numericUpDown1.Location = new System.Drawing.Point(305, 13); + this.numericUpDown1.Maximum = new decimal(new int[] { + 4, + 0, + 0, + 0}); + this.numericUpDown1.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDown1.Name = "numericUpDown1"; + this.numericUpDown1.Size = new System.Drawing.Size(48, 20); + this.numericUpDown1.TabIndex = 15; + this.numericUpDown1.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged); + // // comboBox1 // this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox1.FormattingEnabled = true; this.comboBox1.Items.AddRange(new object[] { "1 (Pascal)", - "2 (C++)"}); + "2 (C++)", + "3 (TurboPascal test)"}); this.comboBox1.Location = new System.Drawing.Point(100, 13); this.comboBox1.Name = "comboBox1"; - this.comboBox1.Size = new System.Drawing.Size(67, 21); + this.comboBox1.Size = new System.Drawing.Size(129, 21); this.comboBox1.TabIndex = 14; this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); // // label3 // this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(173, 16); + this.label3.Location = new System.Drawing.Point(251, 16); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(48, 13); this.label3.TabIndex = 13; @@ -133,7 +163,7 @@ // problemTextBox // this.problemTextBox.Enabled = false; - this.problemTextBox.Location = new System.Drawing.Point(281, 13); + this.problemTextBox.Location = new System.Drawing.Point(359, 13); this.problemTextBox.Name = "problemTextBox"; this.problemTextBox.Size = new System.Drawing.Size(24, 20); this.problemTextBox.TabIndex = 12; @@ -197,29 +227,6 @@ this.splitContainer1.SplitterDistance = 163; this.splitContainer1.TabIndex = 6; // - // numericUpDown1 - // - this.numericUpDown1.Location = new System.Drawing.Point(227, 13); - this.numericUpDown1.Maximum = new decimal(new int[] { - 7, - 0, - 0, - 0}); - this.numericUpDown1.Minimum = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDown1.Name = "numericUpDown1"; - this.numericUpDown1.Size = new System.Drawing.Size(48, 20); - this.numericUpDown1.TabIndex = 15; - this.numericUpDown1.Value = new decimal(new int[] { - 1, - 0, - 0, - 0}); - this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged); - // // schoolTextBox // this.schoolTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -238,6 +245,12 @@ this.label5.TabIndex = 7; this.label5.Text = "School:"; // + // errorProvider1 + // + this.errorProvider1.BlinkRate = 1000; + this.errorProvider1.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.AlwaysBlink; + this.errorProvider1.ContainerControl = this; + // // IoiSubmitGuiControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -253,9 +266,10 @@ this.Size = new System.Drawing.Size(459, 402); this.groupBox1.ResumeLayout(false); this.groupBox1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.errorProvider1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -279,5 +293,6 @@ private System.Windows.Forms.NumericUpDown numericUpDown1; private System.Windows.Forms.TextBox schoolTextBox; private System.Windows.Forms.Label label5; + private System.Windows.Forms.ErrorProvider errorProvider1; } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-26 19:43:42 UTC (rev 511) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-27 23:53:06 UTC (rev 512) @@ -56,5 +56,15 @@ { problemTextBox.Text = numericUpDown1.Value.ToString(); } + + private void formComboBox_Validated(object sender, EventArgs e) + { + int a; + if (Int32.TryParse(this.formComboBox.Text, out a) == false) + errorProvider1.SetError(this.formComboBox, "\xC2\xE2\xE5\xE4\xB3\xF2\xFC \xF2\xB3\xEB\xFC\xEA\xE8 \xF7\xE8\xF1\xEB\xEE"); + else + errorProvider1.SetError(this.formComboBox, ""); + + } } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx 2009-02-26 19:43:42 UTC (rev 511) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.resx 2009-02-27 23:53:06 UTC (rev 512) @@ -117,4 +117,7 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <metadata name="errorProvider1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>17, 17</value> + </metadata> </root> \ 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-02-26 19:43:47
|
Revision: 511 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=511&view=rev Author: brus07 Date: 2009-02-26 19:43:42 +0000 (Thu, 26 Feb 2009) Log Message: ----------- Fixed bug: wrong output sourcecode in html format. Special chars ('<' and '>') not converted. Now is fixed. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-14 17:20:44 UTC (rev 510) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-26 19:43:42 UTC (rev 511) @@ -115,7 +115,9 @@ h.AddHorizLine(); h.AddHeader("\xC2\xE8\xF5\xB3\xE4\xED\xE8\xE9 \xEA\xEE\xE4", 4, "center"); - h.AddPre(result.Submit.submit.sourceCode); + string sourceCode = result.Submit.submit.sourceCode; + sourceCode = AddHTMLEnteties(sourceCode); + h.AddPre(sourceCode); h.AddHorizLine(); h.AddHeader("\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xE2\xE8\xEA\xEE\xED\xE0\xED\xED\xFF", 4, "center"); @@ -176,5 +178,12 @@ //((IoiInformerControl)base.Control).LoadURL(url); } } + + private string AddHTMLEnteties(string sourceCode) + { + sourceCode = sourceCode.Replace("<", "<"); + sourceCode = sourceCode.Replace(">", ">"); + return sourceCode; + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-02-14 17:20:54
|
Revision: 510 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=510&view=rev Author: panzaboi Date: 2009-02-14 17:20:44 +0000 (Sat, 14 Feb 2009) Log Message: ----------- Updates Modified Paths: -------------- website/config/config.ini website/library/Application.php Added Paths: ----------- website/application/models/ website/application/models/Form/ website/application/models/Form/SmallLogin.php Property changes on: website/application/models ___________________________________________________________________ Added: tsvn:logminsize + 5 Property changes on: website/application/models/Form ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: website/application/models/Form/SmallLogin.php =================================================================== --- website/application/models/Form/SmallLogin.php (rev 0) +++ website/application/models/Form/SmallLogin.php 2009-02-14 17:20:44 UTC (rev 510) @@ -0,0 +1,85 @@ +<?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/config/config.ini =================================================================== --- website/config/config.ini 2009-02-14 11:04:36 UTC (rev 509) +++ website/config/config.ini 2009-02-14 17:20:44 UTC (rev 510) @@ -70,6 +70,7 @@ general.titlesep = " - " general.extention = "html" general.roleid = "2" +general.defaultmodelspath = "/application/models/"; front.defaultmodule = "default" Modified: website/library/Application.php =================================================================== --- website/library/Application.php 2009-02-14 11:04:36 UTC (rev 509) +++ website/library/Application.php 2009-02-14 17:20:44 UTC (rev 510) @@ -61,13 +61,6 @@ protected function _initialize() { - // Set Include paths - set_include_path( - self::$_docroot . PATH_SEPARATOR - . self::$_docroot . '/application' . PATH_SEPARATOR - . get_include_path() - ); - // Auto-loader require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload(); @@ -78,6 +71,12 @@ // Setup Config $_config = $this->_setupConfig(); + // Set Include paths + set_include_path( + self::$_docroot . $_config->general->defaultmodelspath . PATH_SEPARATOR . + get_include_path() + ); + // Setup DB $this->_setupDB(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-02-14 11:04:38
|
Revision: 509 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=509&view=rev Author: panzaboi Date: 2009-02-14 11:04:36 +0000 (Sat, 14 Feb 2009) Log Message: ----------- Text Case Problem Modified Paths: -------------- website/library/Application.php website/library/Ostacium/View/Helper/ListTable.php Modified: website/library/Application.php =================================================================== --- website/library/Application.php 2009-02-14 10:59:50 UTC (rev 508) +++ website/library/Application.php 2009-02-14 11:04:36 UTC (rev 509) @@ -65,7 +65,6 @@ set_include_path( self::$_docroot . PATH_SEPARATOR . self::$_docroot . '/application' . PATH_SEPARATOR - . self::$_docroot . '/library' . PATH_SEPARATOR . get_include_path() ); @@ -91,7 +90,7 @@ // Setup Helpers Ostacium_View_Helper_Truncate::setDefault($_config->truncate->toArray()); - Ostacium_View_Helper_listTable::setDefaultAttribs($_config->listtable->toArray()); + Ostacium_View_Helper_ListTable::setDefaultAttribs($_config->listtable->toArray()); Zend_View_Helper_PaginationControl::setDefaultViewPartial($_config->paginator->file); // Paginator Modified: website/library/Ostacium/View/Helper/ListTable.php =================================================================== --- website/library/Ostacium/View/Helper/ListTable.php 2009-02-14 10:59:50 UTC (rev 508) +++ website/library/Ostacium/View/Helper/ListTable.php 2009-02-14 11:04:36 UTC (rev 509) @@ -13,7 +13,7 @@ $this->defaultURL = array_intersect_key($params, array('controller' => 1, 'module' => 1)); } - public function listTable($primarykey, $rows, $headers = null, $actions, $topactions = null, $sortedby = null, $attribs = null) + public function ListTable($primarykey, $rows, $headers = null, $actions, $topactions = null, $sortedby = null, $attribs = null) { if (!$attribs) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-02-14 10:59:54
|
Revision: 508 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=508&view=rev Author: panzaboi Date: 2009-02-14 10:59:50 +0000 (Sat, 14 Feb 2009) Log Message: ----------- config update: db Modified Paths: -------------- website/config/config.ini Modified: website/config/config.ini =================================================================== --- website/config/config.ini 2009-02-14 10:43:06 UTC (rev 507) +++ website/config/config.ini 2009-02-14 10:59:50 UTC (rev 508) @@ -79,15 +79,14 @@ crud.perpage = "25" acm.calc.penalty = "20" -acm, [development: general] db.adapter = "Mysqli" db.encoding = "UTF8" db.params.host = "localhost" -db.params.dbname = "acm" -db.params.username = "acm" +db.params.dbname = "acm_db" +db.params.username = "acm_db" db.params.password = "c0nt3st3r" db.params.profiler.label = Db Profiler db.params.profiler.enabled = true This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-02-14 10:43:12
|
Revision: 507 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=507&view=rev Author: panzaboi Date: 2009-02-14 10:43:06 +0000 (Sat, 14 Feb 2009) Log Message: ----------- MySQL Update Modified Paths: -------------- website/other/dq.sql Modified: website/other/dq.sql =================================================================== --- website/other/dq.sql 2009-02-14 10:38:19 UTC (rev 506) +++ website/other/dq.sql 2009-02-14 10:43:06 UTC (rev 507) @@ -3,35 +3,52 @@ -- http://www.phpmyadmin.net -- -- Host: localhost --- Generation Time: Dec 10, 2008 at 07:16 PM +-- Generation Time: Feb 14, 2009 at 12:42 PM -- Server version: 5.0.51 -- PHP Version: 5.2.6 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; +-- +-- Database: `acm` +-- -/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; -/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; -/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; -/*!40101 SET NAMES utf8 */; +-- -------------------------------------------------------- -- --- Database: `acm` +-- Table structure for table `archive_results` -- +DROP TABLE IF EXISTS `archive_results`; +CREATE TABLE IF NOT EXISTS `archive_results` ( + `username` varchar(50) NOT NULL, + `challengeid` int(11) NOT NULL, + `tries` int(11) NOT NULL, + `accepted` tinyint(1) NOT NULL, + PRIMARY KEY (`username`,`challengeid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +-- +-- Dumping data for table `archive_results` +-- + +INSERT INTO `archive_results` (`username`, `challengeid`, `tries`, `accepted`) VALUES +('admin', 1000, 1, 1); + -- -------------------------------------------------------- -- -- Table structure for table `challenges` -- +DROP TABLE IF EXISTS `challenges`; CREATE TABLE IF NOT EXISTS `challenges` ( `id` int(11) NOT NULL auto_increment, `timelimit` double NOT NULL default '0', `memorylimit` int(11) NOT NULL default '0', `outputlimit` int(11) NOT NULL default '0', `tries` int(11) NOT NULL default '0', - `accepted` int(11) NOT NULL default '0', + `accepts` int(11) NOT NULL default '0', `author` varchar(50) character set latin1 NOT NULL, `enabled` tinyint(1) NOT NULL default '1', PRIMARY KEY (`id`) @@ -41,202 +58,9 @@ -- Dumping data for table `challenges` -- -INSERT INTO `challenges` (`id`, `timelimit`, `memorylimit`, `outputlimit`, `tries`, `accepted`, `author`, `enabled`) VALUES +INSERT INTO `challenges` (`id`, `timelimit`, `memorylimit`, `outputlimit`, `tries`, `accepts`, `author`, `enabled`) VALUES (1000, 1000, 5120000, 204800, 0, 0, '', 1), -(1001, 1000, 5120000, 204800, 0, 0, '', 1), -(1002, 1000, 5120000, 204800, 0, 0, '', 1), -(1003, 1000, 5120000, 204800, 0, 0, '', 1), -(1004, 1000, 3072000, 204800, 0, 0, '', 1), -(1005, 1000, 3072000, 2048, 0, 0, '', 1), -(1006, 1000, 3072000, 2048, 0, 0, '', 1), -(1007, 1000, 3072000, 2048, 0, 0, '', 1), -(1008, 1000, 5120000, 2048, 0, 0, '', 1), -(1009, 1000, 3072000, 2048, 0, 0, '', 1), -(1010, 1000, 3072000, 2048, 0, 0, '', 1), -(1011, 1500, 3072000, 204800, 0, 0, '', 1), -(1012, 500, 3072000, 2048, 0, 0, '', 1), -(1013, 500, 3072000, 204800, 0, 0, '', 1), -(1014, 500, 3072000, 2048, 0, 0, '', 1), -(1015, 500, 3072000, 204800, 0, 0, '', 1), -(1016, 1000, 3072000, 204800, 0, 0, '', 1), -(1017, 500, 3072000, 204800, 0, 0, '', 1), -(1018, 20000, 3072000, 2048, 0, 0, '', 1), -(1019, 1000, 3072000, 2048, 0, 0, '', 1), -(1020, 500, 3072000, 2048, 0, 0, '', 1), -(1021, 500, 3072000, 2048, 0, 0, '', 1), -(1022, 1000, 5120000, 2048, 0, 0, '', 1), -(1023, 1000, 3072000, 2048, 0, 0, '', 1), -(1024, 1000, 3072000, 2048, 0, 0, '', 1), -(1025, 1000, 2048000, 2048, 0, 0, '', 1), -(1026, 1000, 3072000, 2048, 0, 0, '', 1), -(1027, 1000, 3072000, 2048, 0, 0, '', 1), -(1028, 500, 3072000, 2048, 0, 0, '', 1), -(1029, 1000, 3072000, 2048, 0, 0, '', 1), -(1030, 500, 5120000, 204800, 0, 0, '', 1), -(1031, 1000, 2048000, 2048, 0, 0, '', 0), -(1032, 1000, 10240000, 2048, 0, 0, '', 1), -(1033, 500, 2048000, 2048, 0, 0, '', 1), -(1034, 2000, 2048000, 2048, 0, 0, '', 1), -(1035, 500, 2048000, 2048, 0, 0, '', 1), -(1036, 500, 2048000, 204800, 0, 0, '', 1), -(1037, 500, 20480000, 2048, 0, 0, '', 1), -(1038, 500, 20480000, 2048, 0, 0, '', 1), -(1039, 500, 20480000, 2048, 0, 0, '', 1), -(1040, 1000, 20480000, 2048, 0, 0, '', 1), -(1041, 1000, 20480000, 2048, 0, 0, '', 1), -(1042, 500, 20480000, 2048, 0, 0, '', 1), -(1043, 500, 20480000, 2048, 0, 0, '', 1), -(1044, 1000, 20480000, 2048, 0, 0, '', 1), -(1045, 1000, 20480000, 204800, 0, 0, '', 1), -(1046, 1000, 20480000, 512000, 0, 0, '', 1), -(1047, 1000, 20480000, 2048, 0, 0, '', 1), -(1048, 1000, 20480000, 2048, 0, 0, '', 1), -(1049, 1000, 20480000, 2048, 0, 0, '', 1), -(1050, 1000, 20480000, 2048, 0, 0, '', 1), -(1051, 500, 20480000, 1024, 0, 0, '', 1), -(1052, 500, 20480000, 1024, 0, 0, '', 0), -(1053, 500, 20480000, 1024, 0, 0, '', 1), -(1054, 500, 20480000, 1024, 0, 0, '', 1), -(1055, 500, 20480000, 1024, 0, 0, '', 1), -(1056, 500, 20480000, 1024, 0, 0, '', 1), -(1057, 500, 20480000, 1024, 0, 0, '', 1), -(1058, 1000, 5120000, 204800, 0, 0, '', 1), -(1059, 1000, 5120000, 204800, 0, 0, '', 1), -(1060, 1000, 3072000, 5120, 0, 0, '', 1), -(1061, 2000, 2048000, 2048000, 0, 0, '', 1), -(1062, 1000, 10240000, 2048, 0, 0, '', 1), -(1063, 3000, 20480000, 2048, 0, 0, '', 1), -(1064, 500, 20480000, 20480, 0, 0, '', 1), -(1065, 500, 3072000, 20480000, 0, 0, '', 1), -(1066, 1000, 102400000, 2048, 0, 0, '', 1), -(1067, 500, 20480000, 20480000, 0, 0, '', 1), -(1068, 1000, 5120000, 2048, 0, 0, '', 1), -(1069, 500, 5120000, 2048, 0, 0, '', 1), -(1070, 2000, 5120000, 2048, 0, 0, '', 1), -(1071, 1000, 5120000, 2048, 0, 0, '', 1), -(1072, 2000, 20480000, 2048, 0, 0, '', 1), -(1073, 250, 5120000, 2048, 0, 0, '', 1), -(1074, 500, 5120000, 2048, 0, 0, '', 1), -(1075, 1000, 5120000, 2048, 0, 0, '', 1), -(1076, 2000, 20480000, 2048, 0, 0, '', 1), -(1077, 1000, 5120000, 2048, 0, 0, '', 1), -(1078, 1000, 5120000, 2048, 0, 0, '', 1), -(1079, 1000, 5120000, 2048, 0, 0, '', 1), -(1080, 1000, 5120000, 2048, 0, 0, '', 1), -(1081, 1000, 2097152, 2048, 0, 0, '', 1), -(1082, 1000, 5120000, 2048, 0, 0, '', 1), -(1083, 1000, 5120000, 2048, 0, 0, '', 1), -(1084, 1000, 5120000, 2048, 0, 0, '', 1), -(1085, 500, 5120000, 2048, 0, 0, '', 1), -(1086, 1000, 2097152, 2048, 0, 0, '', 1), -(1087, 1000, 65536000, 2048, 0, 0, '', 1), -(1088, 1000, 65536000, 2048, 0, 0, '', 1), -(1089, 1000, 65536000, 2048, 0, 0, '', 1), -(1090, 1000, 65536000, 2048, 0, 0, '', 1), -(1091, 5000, 65536000, 2048, 0, 0, '', 1), -(1092, 1000, 65536000, 2048, 0, 0, '', 1), -(1093, 1000, 65536000, 2048, 0, 0, '', 1), -(1094, 1000, 5120000, 2048, 0, 0, '', 1), -(1095, 1000, 5120000, 2048, 0, 0, '', 1), -(1096, 1000, 16384000, 2048, 0, 0, '', 1), -(1097, 1000, 5120000, 2048, 0, 0, '', 1), -(1098, 1000, 5120000, 2048, 0, 0, '', 1), -(1099, 500, 5120000, 2048, 0, 0, '', 1), -(1100, 1500, 65536000, 10240000, 0, 0, '', 1), -(1101, 45000, 5120000, 2048, 0, 0, '', 1), -(1102, 5000, 20480000, 512, 0, 0, '', 1), -(1103, 5000, 20480000, 2048, 0, 0, '', 1), -(1104, 5000, 20480000, 2048, 0, 0, '', 1), -(1105, 5000, 20480000, 2048, 0, 0, '', 1), -(1106, 5000, 20480000, 2048, 0, 0, '', 1), -(1107, 1000, 5120000, 2048, 0, 0, '', 1), -(1108, 5000, 5120000, 2048, 0, 0, '', 1), -(1109, 1000, 5120000, 2048, 0, 0, '', 1), -(1110, 1000, 5120000, 2048, 0, 0, '', 1), -(1111, 1000, 5120000, 2048, 0, 0, '', 1), -(1112, 1000, 5120000, 2048, 0, 0, '', 1), -(1113, 1000, 5120000, 2048, 0, 0, '', 1), -(1114, 1000, 5120000, 51200, 0, 0, '', 1), -(1115, 1000, 5120000, 2048, 0, 0, '', 1), -(1116, 1000, 5120000, 2048, 0, 0, '', 1), -(1117, 1000, 5120000, 2048, 0, 0, '', 1), -(1118, 1000, 5120000, 2048, 0, 0, '', 1), -(1119, 1000, 5120000, 2048, 0, 0, '', 1), -(1120, 1000, 5120000, 2048, 0, 0, '', 1), -(1121, 1000, 5120000, 2048, 0, 0, '', 1), -(1122, 1000, 5120000, 2048, 0, 0, '', 1), -(1123, 1000, 5120000, 2048, 0, 0, '', 1), -(1124, 1000, 5120000, 2048, 0, 0, '', 1), -(1125, 1000, 5120000, 2048, 0, 0, '', 1), -(1126, 1000, 5120000, 2048, 0, 0, '', 1), -(1127, 1000, 5120000, 2048, 0, 0, '', 1), -(1128, 1000, 5120000, 256000, 0, 0, '', 1), -(1129, 1000, 5120000, 2048, 0, 0, '', 1), -(1130, 1000, 5120000, 2048, 0, 0, '', 1), -(1131, 1000, 5120000, 2048, 0, 0, '', 1), -(1132, 1000, 5120000, 2048, 0, 0, '', 1), -(1133, 1000, 5120000, 2048, 0, 0, '', 1), -(1134, 500, 5120000, 102400, 0, 0, '', 1), -(1135, 1000, 5120000, 2048, 0, 0, '', 1), -(1136, 1000, 5120000, 2048, 0, 0, '', 1), -(1137, 1000, 51200000, 5120000, 0, 0, '', 1), -(1138, 2000, 5120000, 2048000, 0, 0, '', 1), -(1139, 1000, 10240000, 2048, 0, 0, '', 1), -(1140, 1000, 10240000, 2048, 0, 0, '', 1), -(1141, 5000, 131072000, 2048, 0, 0, '', 1), -(1142, 5000, 131072000, 2048, 0, 0, '', 1), -(1143, 5000, 131072000, 2048, 0, 0, '', 1), -(1144, 5000, 131072000, 2048, 0, 0, '', 1), -(1145, 5000, 131072000, 2048, 0, 0, '', 1), -(1146, 1000, 16384000, 2048, 0, 0, '', 1), -(1147, 5000, 131072000, 2048, 0, 0, '', 1), -(1148, 1000, 5120000, 2048, 0, 0, '', 1), -(1149, 1000, 5120000, 2048, 0, 0, '', 1), -(1150, 1000, 5120000, 2048, 0, 0, '', 1), -(1151, 1000, 5120000, 2048, 0, 0, '', 1), -(1152, 1000, 5120000, 2048, 0, 0, '', 1), -(1153, 3000, 65536000, 5120000, 0, 0, '', 1), -(1154, 1000, 5120000, 2048, 0, 0, '', 1), -(1155, 2000, 65536000, 2048, 0, 0, '', 1), -(1156, 1000, 5120000, 2048, 0, 0, '', 1), -(1157, 500, 5120000, 204800, 0, 0, '', 1), -(1158, 1000, 5120000, 2048, 0, 0, '', 1), -(1159, 1000, 5120000, 2048, 0, 0, '', 1), -(1160, 1000, 5120000, 2048, 0, 0, '', 1), -(1161, 1000, 5120000, 2048000, 0, 0, '', 1), -(1162, 1000, 5120000, 2048, 0, 0, '', 1), -(1163, 1000, 5120000, 2048, 0, 0, '', 1), -(1164, 1000, 5120000, 2048, 0, 0, '', 1), -(1165, 1000, 5120000, 2048, 0, 0, '', 1), -(1166, 1000, 5120000, 2048, 0, 0, '', 1), -(1167, 1000, 5120000, 2048, 0, 0, '', 1), -(1168, 5000, 5120000, 2048, 0, 0, '', 1), -(1169, 1000, 5120000, 2048, 0, 0, '', 1), -(1170, 1000, 5120000, 2048, 0, 0, '', 1), -(1171, 1000, 5120000, 2048, 0, 0, '', 1), -(1172, 1000, 5120000, 2048, 0, 0, '', 1), -(1173, 250, 16384000, 16384, 0, 0, '', 1), -(1174, 1000, 5120000, 2048, 0, 0, '', 1), -(1175, 2000, 51200000, 5120, 0, 0, '', 1), -(1176, 1000, 51200000, 2048, 0, 0, '', 1), -(1177, 1000, 51200000, 2048000, 0, 0, '', 1), -(1178, 1000, 5120000, 2048, 0, 0, '', 1), -(1179, 500, 51200000, 2048, 0, 0, '', 1), -(1180, 1000, 5120000, 2048, 0, 0, '', 1), -(1181, 4000, 16384000, 2048, 0, 0, '', 1), -(1182, 250, 5120000, 2048, 0, 0, '', 1), -(1183, 1000, 20480000, 2048000, 0, 0, '', 1), -(1184, 1000, 20480000, 2048000, 0, 0, '', 1), -(1185, 1000, 5120000, 2048, 0, 0, '', 1), -(1186, 3000, 5120000, 2048, 0, 0, '', 1), -(1187, 1000, 5120000, 2048000, 0, 0, '', 1), -(1188, 2000, 5120000, 2048000, 0, 0, '', 1), -(1189, 1000, 5120000, 2048, 0, 0, '', 1), -(1190, 500, 5120000, 2048000, 0, 0, '', 1), -(1191, 1000, 5120000, 2048, 0, 0, '', 1), -(1192, 1000, 5120000, 2048, 0, 0, '', 1), -(1193, 10000, 5120000, 2048, 0, 0, '', 1), -(1194, 1000, 5120000, 2048, 0, 0, '', 1); +(1001, 1000, 5120000, 204800, 0, 0, '', 1); -- -------------------------------------------------------- @@ -244,6 +68,7 @@ -- Table structure for table `challenges_lang` -- +DROP TABLE IF EXISTS `challenges_lang`; CREATE TABLE IF NOT EXISTS `challenges_lang` ( `id` int(11) NOT NULL, `langcode` varchar(2) NOT NULL, @@ -258,210 +83,7 @@ INSERT INTO `challenges_lang` (`id`, `langcode`, `name`, `description`) VALUES (1000, 'uk', 'Swap', '<P align=left><B>Завдання</B></P><P>Дано два цілих числа a та b. Написати програму, яка б міняла їхні значення місцями. Тобто після виконання програми замість а значення b, а замість b - а. <P><B>Вхідні дані</B></P><P>В єдиному рядку записано два числа - а та b. (-32000 < a, b < 32000). <P><B>Вихідні дані</B></P><P>Вивести в єдиний рядок через пропуск два числа: спочатку b, а потім a. <P><B>Приклад введення 1</B></P><P><PRE>1 2</PRE><P><B>Приклад виведення 1</B></P><P><PRE>2 1</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>2 3</PRE><P><B>Приклад виведення 2</B></P><P><PRE>3 2</PRE><BR>'), -(1001, 'uk', 'A in power k', '<P align=left><B>Завдання</B></P><P>Для заданого цілого а та натурального k обчислити a<SUP>k</SUP>.<P><B>Вхідні дані</B></P><P>В єдиному рядку записано два числа a та k (-32000 < a <= 32000, 0 < k < 32000).<P><B>Вихідні дані</B></P><P>Єдине число - відповідь. Гарантується, що відповідь не більша за 2*10<SUP>9</SUP>.<P><B>Приклад введення 1</B></P><P><PRE>1 1</PRE><P><B>Приклад виведення 1</B></P><P><PRE>1</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>2 3</PRE><P><B>Приклад виведення 2</B></P><P><PRE>8</PRE><BR>'), -(1002, 'uk', 'Послідовність Фібоначчі', '<P align=left><B>Завдання</B></P><P>Послідовність фібоначчі визначається наступним чином:<BR></P><UL><LI>a<SUB>0</SUB>=0;<LI>a<SUB>1</SUB>=1;<LI>a<SUB>k</SUB>=a<SUB>k-1</SUB> + a<SUB>k-2</SUB></LI></UL><BR><BR>Для заданого n знайти значення n-го елемента послідовності Фібоначчі (a<SUB>n</SUB>).<P><B>Вхідні дані</B></P><P>В єдиному рядку записане єдине число N (1 <= N <= 40).<P><B>Вихідні дані</B></P><P>Єдине число - відповідь.<P><B>Приклад введення 1</B></P><P><PRE>1</PRE><P><B>Приклад виведення 1</B></P><P><PRE>1</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>5</PRE><P><B>Приклад виведення 2</B></P><P><PRE>5</PRE><BR><P><B>Приклад введення 3</B></P><P><PRE>8</PRE><P><B>Приклад виведення 3</B></P><P><PRE>21</PRE><BR>'), -(1003, 'uk', 'Рукавички', '<P align=left><B>Завдання</B></P><P>Комірник видає по К рукавичок кожному робітнику. Тобто другий робітник отримає рукавички від (K+1)-шої до (2∙K)-ї включно, рукавички номер (2∙K+2) отримає третій робітник і для нього вони будуть другими.<P>Напишіть програму, яка за номером виданих рукавичок визначає номер робітника, якому їх видано та порядковий номер цих рукавичок в цього робітника<P><B>Вхідні дані</B></P><P>В єдиному рядку записано два числа - K та N. K - кількість рукавичок кожному робітнику, N - номер пари рукавичок (1 <= K <= 200, 1 <= N <= 20000) розділені пропуском.<P><B>Вихідні дані</B></P><P>Номер робітника та номер рукавичок в цього робітника, розділені пропуском.<P><B>Приклад введення 1</B></P><P><PRE>50 1</PRE><P><B>Приклад виведення 1</B></P><P><PRE>1 1</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>20 25</PRE><P><B>Приклад виведення 2</B></P><P><PRE>2 5</PRE><BR><P><B>Приклад введення 3</B></P><P><PRE>15 43</PRE><P><B>Приклад виведення 3</B></P><P><PRE>3 13</PRE><BR>'), -(1004, 'uk', 'Супер проста проблема', '<P align=left><B>Завдання</B></P><P>Знайти квадрат N-го простого числа.<P><B>Вхідні дані</B></P><P>В єдиному рядку записане єдине число N (1 <= N <= 100).<P><B>Вихідні дані</B></P><P>Єдине число - квадрат N-го простого числа<P><B>Приклад введення 1</B></P><P><PRE>1</PRE><P><B>Приклад виведення 1</B></P><P><PRE>4</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>2</PRE><P><B>Приклад виведення 2</B></P><P><PRE>9</PRE><BR><P><B>Приклад введення 3</B></P><P><PRE>5</PRE><P><B>Приклад виведення 3</B></P><P><PRE>121</PRE><BR>'), -(1005, 'uk', '0-1 проблема', '<P align=left><B>Завдання</B></P><P>Над рядочком 01 виконаємо наступні операції:<UL><LI>Скопіюємо в кінець рядочка самого себе (отримаємо 0101)<LI>В другій половині рядка всі 0 змінимо на 1, а всі 1 на 0 (отримаємо 0110)</LI></UL>Над рядочком 0110 виконаємо ті самі операції. Отримаємо 01101001. І т. д.Таким чином отримаємо нескінченний рядочок нулів та одиниць.Ваше завдання – знайти n-тий символ такого рядочка.<P><B>Вхідні дані</B></P><P>В єдиному рядку записане єдине число N (1 <= N <= 2000000000).<P><B>Вихідні дані</B></P><P>Єдиний символ, який буде на N-й позиції.<P><B>Приклад введення 1</B></P><P><PRE>1</PRE><P><B>Приклад виведення 1</B></P><P><PRE>0</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>2</PRE><P><B>Приклад виведення 2</B></P><P><PRE>1</PRE><BR><P><B>Приклад введення 3</B></P><P><PRE>5</PRE><P><B>Приклад виведення 3</B></P><P><PRE>1</PRE><BR>'), -(1006, 'uk', 'Одинадцять', '<P align=left><B>Завдання</B></P><P>Ваше завдання – визначити чи ділиться дане число на 11.<P><B>Вхідні дані</B></P><P>В єдиному рядку записане єдине число N (1 <= n). Число має не більше тисячі знаків.<P><B>Вихідні дані</B></P><P>Вам потрібно вивести “Yes” – якщо число ділиться на 11, і “No” – в протилежному випадку.<P><B>Приклад введення 1</B></P><P><PRE>323455693</PRE><P><B>Приклад виведення 1</B></P><P><PRE>Yes</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>5038297</PRE><P><B>Приклад виведення 2</B></P><P><PRE>Yes</PRE><BR><P><B>Приклад введення 3</B></P><P><PRE>112234</PRE><P><B>Приклад виведення 3</B></P><P><PRE>No</PRE><BR>'), -(1007, 'uk', 'Супер послідовність', '<P align=left><B>Завдання</B></P><P>Послідовність чисел a1, a2, … an називається супер послідовністю, якщо виконуються наступні умови:<UL><LI>0 < a1 < a2 < … < an<LI>жодне з чисел не є сумою двох або більше інших чисел</LI></UL><P><B>Вхідні дані</B></P><P>В єдиному рядку записане число N (1 <= n <= 50), далі задано N чисел, кожне з яких не менше 1 і не більше 1000.<P><B>Вихідні дані</B></P><P>Вам необхідно вивести “Yes” – якщо дано супер послідовність, “No” – в протилежному випадку.<P><B>Приклад введення 1</B></P><P><PRE>2 1 2</PRE><P><B>Приклад виведення 1</B></P><P><PRE>Yes</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>3 1 2 3</PRE><P><B>Приклад виведення 2</B></P><P><PRE>No</PRE><BR><P><B>Приклад введення 3</B></P><P><PRE>10 1 3 16 19 25 70 100 243 245 306</PRE><P><B>Приклад виведення 3</B></P><P><PRE>No</PRE><BR>'), -(1008, 'uk', 'Супер яйця', '<P align=left><B>Задання</B></P><P>Нехай у вас є n супер яєць і ви живете в k поверховому будинку. Вам необхідно визначити за найменшу кількість кидків найбільший номер поверху з якого кинуте вниз супер яйце не розбивається. Тобто, за яку найменшу кількість спроб можна визначити найвищий поверх, з якого супер яйце не розбивається. Зауважте, якщо в результаті деякої спроби яйце не розбилось, то воно може бути використане в наступних спробах.<P><B>Вхідні дані</B></P><P>В єдиному рядку записано 2 цілих числа N (N<=30)- кількість яєць та M (M<=2 000 000 000)- кількість поверхів.<P><B>Вихідні дані</B></P><P>У єдиному рядку треба вивести єдине число – мінімальна необхідна кількість спроб. Якщо необхідно більше 30 спроб виведіть -1.<P><B>Приклад введення 1</B></P><P><PRE>1 15</PRE><P><B>Приклад виведення 1</B></P><P><PRE>15</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>2 100</PRE><P><B>Приклад виведення 2</B></P><P><PRE>14</PRE><BR><P><B>Приклад введення 3</B></P><P><PRE>10 786599</PRE><P><B>Приклад виведення 3</B></P><P><PRE>21</PRE><BR><P><B>Приклад введення 4</B></P><P><PRE>4 786599</PRE><P><B>Приклад виведення 3</B></P><P><PRE>-1</PRE><BR>'), -(1009, 'uk', 'Супер карти', '<P align=left><B>Завдання</B></P><P>Дана колода впорядкованих супер карт від 1 до n. Верхня супер карта має номер 1, нижня – n. Поки в колоді є хоча б дві супер карти викидаємо верхню карту, а наступну ставимо вниз колоди.<P>Необхідно знайти номер супер карти, що залишиться.<P><B>Вхідні дані</B></P><P>В єдиному рядку записане єдине число N - число супер карт в колоді (1 <= n <= 1000000).<P><B>Вихідні дані</B></P><P>Єдине число - номер супер карти, що залишиться.<P><B>Приклад введення 1</B></P><P><PRE>7</PRE><P><B>Приклад виведення 1</B></P><P><PRE>6</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>19</PRE><P><B>Приклад виведення 2</B></P><P><PRE>6</PRE><BR><P><B>Приклад введення 3</B></P><P><PRE>10</PRE><P><B>Приклад виведення 3</B></P><P><PRE>4</PRE><BR><P><B>Приклад введення 4</B></P><P><PRE>6</PRE><P><B>Приклад виведення 4</B></P><P><PRE>4</PRE><BR>'), -(1010, 'uk', 'Остання проблема', '<P align=left><B>Завдання</B></P><P>Ваше завдання – визначити чи дане число N можна представити у вигляді суми двох простих чисел.<P><B>Вхідні дані</B></P><P>В єдиному рядку записане єдине число N (1 <= N <= 1000000).<P><B>Вихідні дані</B></P><P>Cума двох простих чисел, що рівна n, або -1, якщо такої не існує. В сумі перше число не більше другого і якщо існує декілька таких можливих сум – вивести ту, в якої перший доданок найменший.<P><B>Приклад введення 1</B></P><P><PRE>9</PRE><P><B>Приклад виведення 1</B></P><P><PRE>2+7</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>10</PRE><P><B>Приклад виведення 2</B></P><P><PRE>3+7</PRE><BR><P><B>Приклад введення 3</B></P><P><PRE>11</PRE><P><B>Приклад виведення 3</B></P><P><PRE>-1</PRE><BR>'), -(1011, 'uk', 'Медіанний фільтр', '<P align=left><B>Завдання</B></P><P>Медіаною у відсортованому по неспаданню масиву розмірності N називається елемент, який знаходиться у середній позиції масиву, тобто у позиції (N+1)/2 (цілочисельне ділення). <P>Медіанним фільтром для растрового зображення називається таке перетворення кожної точки, колір якої вибирається як медіана із множини точок з певного околу (радіусом R) цієї точки (квадратної області із центром у вибраній точці – розміри квадрата рівні [R+1+ R]×[ R+1+R]). Медіанний фільтр використовують для видалення дрібного шуму із зображення. На межі зображення точки, що виходять за межі, вважаються точками із кольором фону (абсолютне значення рівне нулю).<P>Для заданого малюнку прямокутної форми шириною W та висотою H знайдіть максимальне значення медіани для розміру околу R. Вважається, що малюнок монохромний із 256 градаціями одного кольору.<P><B>Вхідні дані</B></P><P>В першому рядку задані 3 числа: розмір околу R (1≤R≤20), H(1≤H≤400), W(1≤W≤250). В наступних H рядках знаходиться по W чисел розділених пропуском. Числа – це кольори відповідних точок.<P><B>Вихідні дані</B></P><P>Виведіть результат – максимальне значення медіани для заданого малюнку та радіусу.<P><B>Приклад введення</B></P><P><PRE>1 4 3</PRE><PRE>1 1 1</PRE><PRE>1 2 4</PRE><PRE>2 3 2</PRE><PRE>1 1 1</PRE><P><B>Приклад виведення</B></P><P><PRE>2</PRE>'), -(1012, 'uk', 'Дужки і Нобелівська премія', '<P align=left><B>Завдання</B></P><P>Директор однієї відомої програмістської фірми Білл (ви напевно його знаєте) захотів одержати Нобелівську премію. Для цього він запропонував додати в арифметичні вирази крім круглих дужок ще й квадратні, причому: спочатку виконуються обчислення в квадратних дужках, що стоять лівіше, потім в наступних квадратних і т.д.; в такому ж порядку виконуються обчислення в круглих дужках. Наприклад: у виразі порядок обчислення виразів в дужках такий: <CENTER><IMG src="/fusion/images/problems/1012/pic1.jpg"></CENTER><P>Працівники фірми встигнуть в запланований термін реалізувати тільки виконання всіх потрібних операцій в виразах без дужок. Тому пан Білл звернувся до нас за допомогою. Отже, ваше завдання таке: <BR>1) виведіть на екран "YES", якщо дужки у виразі розставлені правильно і "NO" в протилежному випадку;<BR>2) у випадку правильно розставлених дужок виведіть на екран через пропуск в окремому рядку для кожної пари дужок позиції їх розташування в заданому виразі, якщо він буде обчислюватися згідно описаних вище правил. <P><B>Вхідні дані</B></P><P>В першому рядку знаходиться вираз. Довжина рядка не перевищує 255 символів. <P><B>Вихідні дані</B></P><P>Результат виконання програми. <P><B>Приклад введення</B></P><P><PRE>а+(2-с)-[21-8*b+(-2)]+[3]</PRE><P><B>Приклад виведення</B></P><P><PRE>YES</PRE><PRE>17 20</PRE><PRE>9 21</PRE><PRE>23 25</PRE><PRE>3 7<BR></PRE>'), -(1013, 'uk', 'Електронний пристрій', '<P align=left><B>Завдання</B></P><P>Одному визначному вченому майже вдалося побудувати новий електронний пристрій визначення поведінки погоди. Йому потрібна програма, яка б дозволяла аналізувати вміст результатів дослідження. Ваше завдання – допомогти йому. <P>Результати – це послідовність чисел (нуль або один). Вам потрібно дати відповідь чи всі числа рівні між і-тим та j-тим елементами послідовності включно. <P><B>Вхідні дані</B></P><P>В першому рядку задано число N(0 < N ≤ 3*10<SUP>5</SUP>) – кількість елементів послідовності. В другому рядку розділені пропуском записані елементи послідовності. В третьому рядку записано число M(0 < M ≤ 5*10<SUP>4</SUP>) – кількість запитань. Далі в M рядках розділені пропуском записані позиції і та j. <P><B>Вихідні дані</B></P><P>Потрібно вивести M чисел по одному в рядку. 1 в разі ствердної відповіді на запитання і 0 в протилежному випадку. <P><B>Приклад введення</B></P><P><PRE>10</PRE><PRE>1 0 0 1 0 0 0 1 1 1</PRE><PRE>4</PRE><PRE>1 3</PRE><PRE>2 3</PRE><PRE>8 10</PRE><PRE>5 8</PRE><P><B>Приклад виведення</B></P><P><PRE>0</PRE><PRE>1</PRE><PRE>1</PRE><PRE>0</PRE><BR>'), -(1014, 'uk', 'Гра', '<P align=left><B>Завдання</B></P><P>Поле гри складається з N зрозміщених вряд одна за одною клітинок. На початку гри в першій і N-тій клітинці знаходяться дві фішки. Кожен з двох гравців може переміщувати свою фішку на не більше ніж K позицій вправо чи вліво. Забороняється залишатися на місці і перескакувати фішку суперника. Програє той, хто не може зробити хід. Напишіть програму, яка повідомить хто виграє, якщо кожен з гравців буде намагатись використовувати виграшну стратегію.<P><B>Вхідні дані</B></P><P>В єдиному рядку записано N(1 < N ≤ 500) та K(0 < K ≤ 50), які розділені пропуском.<P><B>Вихідні дані</B></P><P>Виведіть „1”, якщо переможе перший гравець та „2” в протилежному випадку.<P><B>Приклад введення</B></P><P><PRE>5 2</PRE><P><B>Приклад виведення</B></P><P><PRE>2</PRE><BR>'), -(1015, 'uk', 'Числа Фібоначчі', '<P align=left><B>Завдання</B></P><P>Числа Фібоначчі визначаються рекурентною формулою:<BR></P><CENTER>f<SUB>0</SUB> = 0; f<SUB>1</SUB> = 1; f<SUB>n</SUB> = f<SUB>n-1</SUB> + f<SUB>n-2</SUB>;</CENTER><BR><P>Початок послідовності має вигляд 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ... . <P><B>Вхідні дані</B></P><P>В єдиному рядку знаходиться число N (0 ≤ N ≤ 10000).<P><B>Вихідні дані</B></P><P>Виведіть N-те число Фібоначчі.<P><B>Приклад введення</B></P><P><PRE>7</PRE><P><B>Приклад виведення</B></P><P><PRE>13</PRE><BR>'), -(1016, 'uk', 'Скарб', '<P align=left><B>Завдання</B></P><P>Знайти закопаний піратами скарб дуже легко. Все що для цього необхідно - карта. Як відомо, пірати малюють карти від руки і описують алгоритм знаходження потрібного місця наступним чином: "Станьте біля одинокої пальми, пройдіть 30 кроків в сторону лісу, 15 в сторону озера, ..." <P>Вважається, що карта задана як послідовність переміщень по заданому напрямку (1 - північ, 2 - північний схід, 3 - схід, 4 - південний схід, 5 - південь, 6 - південний захід, 7 - захід, 8 - північний захід) в кроках (довжина кроку рівна 1) від початкової точки з координатами (0, 0).<P>Подорож по такому маршруту, зазвичай, є прекрасною можливістю оглянути місцевість, але в наш час ні в кого на це часу немає. Тому скарбошукачі попросили Вас написати програму, яка по заданій карті буде обчислювати місцезнаходження скарбу.<P><B>Вхідні дані</B></P><P>В першому рядку записане ціле число N - кількість переміщень (1 <= N <= 40). Наступні N рядків містять напрям (цифра від 1 до 8) та кількість кроків, які необхідно пройти у вказаному напрямку (ціле число від 1 до 1000). <P><B>Вихідні дані</B></P><P>В єдиному рядку записано два дійсні числа - координа X та Y місця, де закопаний скарб. Координати необхідно виводити через пропуск з 3-ма знаками після коми.<P><B>Приклад введення 1</B></P><P><PRE>6</PRE><PRE>1 3</PRE><PRE>3 1</PRE><PRE>1 1</PRE><PRE>3 3</PRE><PRE>5 2</PRE><PRE>7 1</PRE><P><B>Приклад виведення 1</B></P><P><PRE>3.000 2.000</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>1</PRE><PRE>8 10</PRE><P><B>Приклад виведення 2</B></P><P><PRE>-7.071 7.071</PRE><BR>'), -(1017, 'uk', 'Ланцюг', '<P align=left>Є N шматків ланцюга, кожен i-й з яких містить Li ланок. Можна розгинати довільні ланки та потім згинати їх знову, з’єднуючи окремі шматки.</P><P><B>Завдання</B></P><P>Напишіть програму, що за кількістю шматків ланцюга N та кількістю ланок у шматках Li визначає мінімальну кількість ланок, яку потрібно розігнути та зігнути знову, щоб з’єднати усі шматки в один ланцюг. Ланцюг не може мати розгалужень, тобто кожна його ланка повинна бути з’єднана з двома іншими ланками (крім двох ланок з країв ланцюга, що повинні бути з’єднані лише з однією ланкою).<P><B>Вхідні дані</B></P><P>В першому рядку знаходиться ціле число N (2 <= N <= 10 000). В другому рядку знаходяться N цілих чисел Li (1 <= Li <= 1 000 000 000), розділених пропуском. <P><B>Вихідні дані</B></P><P>В єдиному рядку повинно знаходитися ціле число — найменша кількість ланок, яку потрібно розігнути та зігнути знову, щоб отримати один ланцюг з усіх шматків.<P><B>Приклад введення</B></P><P><PRE>3</PRE><PRE>100 3 4</PRE><P><B>Приклад виведення</B></P><P><PRE>2</PRE><BR>'), -(1018, 'uk', 'Ксорленд', '<P align=left><B>Завдання</B></P><P>В Національному університеті Ксорленду, названого на честь великого ученого Ксора, розробили нову криптосистему, яка, на їхню думку, повинна забезпечити найнадійніший захист електронних документів. У системі, ключі передаються відкрито. Щоб ключ не потрапив до рук сторонніх людей, разом з ключем передавали дуже багато інших псевдоключів. Перехопивши повідомлення, сторонні не могли визначити дійсний ключ. Перебирати всі ключі також не можливо, оскільки їх дуже багато. Ключ, та псевдоключі, є цілими невідємними 32-бітними числами.<P>На офіційній презентації криптосистеми розказали про те, як при отриманні повідомлення знаходиться ключ: кількість псевдоключів - парна кількість, і кожному псевдоключеві відповідає ще один такий самий псевдоключ. Справжньому ключеві пари немає. Отже загальна кількість ключів, які передаються разом із повідомленням, непарна. <P>Учені стверджують, що відшукання ключа серед псевдоключів вимагає декілька років і тому система надійна. Залишилась єдина незрозуміла річ: яким чином отримувач повідомлення знаходить ключ. <P>Ваше завдання: напишіть програму яка зможе відшукати дійсний ключ серед великої кількості псевдоключів.<P><B>Вхідні дані</B></P><P>В першому рядку задано N - кількість чисел (2 <= N <=3*10<SUP>10</SUP>). В кожному з наступних n рядків записано по одному ключу.<P><B>Вихідні дані</B></P><P>В єдиному рядку записане єдине число - потрібний ключ.<P><B>Приклад введення 1</B></P><P><PRE>5</PRE><PRE>1</PRE><PRE>3</PRE><PRE>2</PRE><PRE>1</PRE><PRE>2</PRE><P><B>Приклад виведення 1</B></P><P><PRE>3</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>5</PRE><PRE>1</PRE><PRE>1</PRE><PRE>1</PRE><PRE>1</PRE><PRE>1</PRE><P><B>Приклад виведення 2</B></P><P><PRE>1</PRE>'), -(1019, 'uk', 'Поле чудес', '<P><B>Завдання</B></P><P>Для гри у поле чудес використовується поділений на сектори круглий барабан і стрілка. На кожному секторі написане якесь число. У різних секторах можуть бути записані однакові числа. <P>Одного разу ведучий вирішив змінити правила гри. Він сам обертав барабан і називав числа, які проходили під стрілкою. Гравець не бачив барабан. Вийшло так, що барабан зробив цілу кількість обертів, тобто стрілка вказувала на той самий сектор, що й до обертання. <P>Після цього ведучий поставив запитання: яка найменша кількість секторів може бути на барабані? <P>Ваше завдання: напишіть програму, яка буде відповідати на це запитання <P><B>Вхідні дані</B></P><P>В першому рядку задано N - кількість чисел (2 <= N <= 30000), продиктованих ведучим. В наступному рядку, через пропуск записано a1, ..., an - числа, записані у тому порядку, у якому диктував ведучий (0 <= ai <= 32000). <P><B>Вихідні дані</B></P><P>В єдиному рядку записане єдине число - відповідь. <P><B>Приклад введення 1</B></P><P><PRE>13<BR>5 3 1 3 5 2 5 3 1 3 5 2 5</PRE><P><B>Приклад виведення 1</B></P><P><PRE>6</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>4<BR>1 1 1 1</PRE><P><B>Приклад виведення 2</B></P><P><PRE>1</PRE><BR>'), -(1020, 'uk', 'Армія', '<P align=left><B>Завдання</B></P><P>Одного семестру деякі студенти не здали сесію. Деякі не змогли здати історію, деякі програмування, а хтось – фізику…<P>Лейтенант наказав всім призовникам стати в одну шеренгу, а потім вирішив посортувати їх за незданим предметом. Спочатку повинні були іти «історики»(1), потім «програмісти»(2), а далі «фізики»(3). Лейтенант, за один крок, може поміняти місцями довільних двох студентів.<P>Порахувати мінімальну кількість кроків необхідних для такого сортування.<P><B>Вхідні дані</B></P>Число призовників N (1<=N<=1000) та перераховані типи призовників в шерензі («історики» - 1, «програмісти» - 2, «фізики» - 3)<P><B>Вихідні дані</B></P>Мінімальна кількість кроків для такого сортування.<P><B>Приклад введення</B></P><P><PRE>9</PRE><PRE>2</PRE><PRE>2</PRE><PRE>1</PRE><PRE>3</PRE><PRE>3</PRE><PRE>3</PRE><PRE>2</PRE><PRE>3</PRE><PRE>1</PRE><P><B>Приклад виведення</B></P><P><PRE>4</PRE><BR>'), -(1021, 'uk', 'Книги', '<P align=left><B>Завдання</B></P><P>Книжки можна використовувати по різному. Можна, наприклад, поставивши їх на купу, зсунути одну відносно одної, поміряти наскільки далеко вони звисають за межею столу. Найвища книжка є першою, всі книжки однакові. <P>Першу книжку можна зсунути менше ніж на 0.5 її довжини, другу можна зсунути відносно столу або наступної книжки менше ніж на 1/3 її довжини. Сумарно вони будуть звисати над краєм столу менше ніж на 1/2 + 1/3. Третю книжку можна зсунути до 1/4, з номером n до 1/(n + 1).<P>За заданою схемою 5 книжок можна зсунути на віддаль до 1.45<P>Визначити мінімальну кількість книжок в купі за довжиною звисання.<P><B>Вхідні дані</B></P><P>Одне дійсне число від 0.01 до 5.20, точно 3 цифри.<P><B>Вихідні дані</B></P><P>Кількість книжок.<P><B>Приклад введення 1</B></P><P><PRE>1.00</PRE><P><B>Приклад виведення 1</B></P><P><PRE>3</PRE><BR><P><B>Приклад введення 2</B></P><P><PRE>1.45</PRE><P><B>Приклад виведення 2</B></P><P><PRE>6</PRE><BR>'), -(1022, 'uk', 'Космозаправки', '<P align=left><B>Завдання</B></P><P>Із далекої планети до ще дальшої летить зореліт. Йому потрібно зробити заправку спеціального палива, яке є лише на заправочних станціях з номерами від 0 до нескінченості включно. Всі заправки розташовані на прямій лінії послідовно, відстань між ними дорівнює одному світловому року.</P><P>Нажаль існують фальшиві заправки, що заливають бракований бензин і навіть погіршують його у заправках, що знаходяться на відстані до K світлових років включно (покищо вчені галактики не можуть пояснити це явище).</P><P>Попередники розказали пілотам вашого зорельоту одну цікаву особливість цих заправок: фальшиві заправки мають такі номери, що діляться лише на самого себе і на один (мають рівно 2 різних дільники!).</P><P>Ваш зореліт летить від заправки А до заправки В.</P><P>Потрібно сказати скільки є заправок між А та В включно, на яких можна заправитися якісним (НЕ бракованим) бензином.</P><P><B>Вхідні дані</B></P><P>Дано три числа A, B, K.</P><P>1<=A<=B<=1000000</P><P>0<=K<=1000000</P><P><B>Вихідні дані</B></P><P>Єдине число, кількість заправок на яких можна заправитися.</P><P><B>Приклад введення 1</B></P><PRE>10 21</PRE><PRE>1</PRE><P><B>Приклад виведення 1</B></P><P><PRE>2</PRE><BR><P><B>Приклад введення 2</B></P><PRE>13 19</PRE><PRE>0</PRE><P><B>Приклад виведення 1</B></P><P><PRE>4</PRE><P></P><P><B>Автори задачі:</B><I> Бабіля Руслан, Коркуна Остап</I></P>'), -(1023, 'uk', 'ГігаЛотерея', '<P align=left><B>Завдання</B></P><P>2077 рік. "Найспекотніша" планета Сонячної системи Меркурій стає центром казино та азартних ігор нашої та сусідніх галактик. Особливої популярністі в земної та інших рас набула гра під назвою ГігаЛотерея. Головним призом є 2 гігабайти віртуальних грошей.</P><P>Правила лотереї такі: кожен учасник отримує номер, що відповідає його порядковому номеру реєстрації. Наприклад якщо в ГігаЛотереї зареєструвалось 7 осіб, то їх номери 1, 2, 3, 4, 5, 6, 7. Далі Суперкомп''ютер ГігаЛотереї вибирає випадкове число М і як у лічилці починає викидати кожного М-того учасника, поки не залишиться один - переможець. Якщо М=3, то у нашому прикладі послідовність викинутих учасників буде така: 3, 6, 2, 7, 5, 1. Переможцем стане учасник з номером 4.</P><P>Відомого авантюриста Остапа Бендера-молодшого не оминула жага легкої наживи. Він зареєструвався на олімпіаді під номером К. Але після цього зрозумів, що для стовідсооткового виграшу цього недостатньо. Всі знають, що Остап Бендер-молодший є відомим хакером з поганою славою, це йому передалось від його далекого родича, Остапа Бендера, який жив на початку ХХ століття в Одесі і був першим в світі хакером; він був хакером ще тоді, коли не було комп''ютерів!!!</P><P>Остап Бендер-молодший "взламав" сервер ГігаЛотереї і взнав кількість зареєстрованих учасників - N. Тепер йому треба встановити число М так, щоб переможцем став саме він. Ваше завдання знайти таке М.</P><P><B>Вхідні дані</B></P><P>Два цілі числа N і К (1 <= K <= N <= 1000).</P><P><B>Вихідні дані</B></P><P>Єдине додатнє число М (M <= N). Якщо є кілька можливих відповідей, вивести найменшу з них. Якщо неможливо знайти таке М, виведіть "-1" (без лапок).</P><P><B>Приклад введення</B></P><P>7 4</P><P><B>Приклад виведення</B></P><P>3</P><P><B>Автори задачі:</B><I> Бабіля Руслан, Коркуна Остап</I></P>'), -(1024, 'uk', 'Марсостриб', '<P align=left><B>Завдання</B></P><P>2077 рік. Наука далеко пішла вперед в галузі дослідження космосу. Вже не стоїть завдання долетіти до певної планети, щоб дослідити її. Люди освоюють найближчі планети, зокрема Марс. Ексцентричні багатії наприклад придумали собі перегони по прямій на спеціальних пристроях. Пристрої ці ще недавно були лише на озброєнні спецслужб, а зараз їх може собі дозволити купити кожен пересічний мультимільярдер. Називаються вони Марсострибунами, а змагання Марсостриб.</P><P>Побудований марсострибун так, що може стрибнути за раз на одну з заданих відстаней, при чому стрибає марсострибун лише вперед.</P><P>Змагання відбуваються по прямій ділянці довжиною N, на якій можуть зустрічатися кратери (ями). Якщо гравець потрапляє в яму, він автоматично вибуває з гри. Виграє той, хто дістанеться в точку фінішу (конкретно в цю точку) за меншу кількість стрибків.</P><P><B>Вхідні дані</B></P><P>В першому рядку задано число N (1 <= N <= 100000) - довжина ділянки забігу (застрибу). Марсострибун стартує в точці з координатою 0 і щоб перемогти повинен потрапити в точку (N-1).</P><P>В наступному рядку знаходиться число К (1 <= K <= 100) - кількість можливих варіантів (довжин) стрибка, в наступних К рядках знаходяться ці можливі довжини. В наступному рядку знаходиться число М - кількість кратерів (ям). Далі в М рядках - координати кратерів (числа від 1 до N-1 включно).</P><P><B>Вихідні дані</B></P><P>Мінімальна кількість стрибків за яку марсострибун з точки 0 може попасти в точку (N-1). Якщо це неможливо вивести "-1" (без лапок).</P><P><B>Приклад введення</B></P><PRE>6</PRE><PRE>2</PRE><PRE>1</PRE><PRE>2</PRE><PRE>2</PRE><PRE>1</PRE><PRE>4</PRE><P><B>Приклад виведення</B></P><P><FONT size=2>3</FONT></P><P>Підказка: Спочатку марсострибун стрибає в точку 2, потім в точку 3, тоді в точку 5 - фініш і перемагає в Марсострибі.</P><P><B>Автори задачі:</B><I> Бабіля Руслан, Коркуна Остап</I></P>'), -(1025, 'uk', 'Міжпланетне повідомлення', '<P align=left><B>Завдання</B></P><P>Із планети Уран передається спеціальне повідомлення на планету Нептун. Повідомлення є дійсним числом start, яке передається на кінцеву планету через 4 інші планети в довільному порядку і з довільною кількістю повторів. На Юпітері (літера "u") число, яке прийшло на цю планету у повідомленні, множиться на 2, на Меркурії (m) - ділиться на 2, на Сатурні (s) - до повідомлення додається 9, на Плутоні (p) - віднімається 11.</P><P>Також зберігається разом із повідомленням шлях проходження цього повідомлення по планетах. Якщо повідомлення проходило через планети у такому порядку Юпітер, Меркурій, Сатурн, Плутон, Юпітер, а далі на Нептун, то шлях буде таким "umspu".</P><P>u - Юпітер</P><P>m - Меркурій</P><P>s - Сатурн</P><P>p - Плутон</P><P>Якщо відправлено повідомлення Y, то отримають повідомлення:</P><P>(Y*2/2+9-11)*2</P><P>Після чергового відправленого повідомлення виявляється, що у шляху повідомлення одна літера втрачена і замінилася на "х". Але жителям Нептуна обов''язково потрібно знати, яка ця планета, оскільки від цього залежить чи вони зможуть зіграти зіркобол із жителями Урану. Щоб знайти цю планету нептунці, знаючи число яке дійшло до них finish та шлях повідомлення (з одним втраченим символом), зв''язалися із уранцями і запитали у них, яке число відправляли вони - start.</P><P><STRONG>Примітка:</STRONG> При виконанні всіх арифметичних операцій жителі планет сонячної системи використовують стандартні типи даних з плаваючою крапкою (<STRONG>double</STRONG> в С++ чи <STRONG>real</STRONG> в Pascal)</P><P><B>Вхідні дані</B></P><P>У першому рядку два дійсних числа start, finish (-10^9 <= start, finish <= 10^9).</P><P>У наступному одне натуральне N - кількість планет у шляху повідомлення. (N <= 10000)</P><P>В останньому рядку сам шлях повідомлення, яке пошкодилося, заміною одного номера планети на "х".</P><P><B>Вихідні дані</B></P><P>Єдина літера, яка відповідає тій планеті, що повинна стояти на місці "х". Якщо знайти таке неможливо, то результат "-1" (без лапок).</P><P>Якщо можливі декілька варіантів відповіді, то вивести найперший з них (в порядку u, m, s, p).</P><P><B>Приклад введення 1</B></P><PRE>5 8</PRE><PRE>5</PRE><PRE>uxpmu</PRE><P><B>Приклад виведення 1</B></P><P><PRE>s</PRE><BR><P><B>Приклад введення 2</B></P><PRE>10 5</PRE><PRE>4</PRE><PRE>msxu</PRE><P><B>Приклад виведення 1</B></P><P><PRE>-1</PRE><P></P><P><B>Автори задачі:</B><I> Бабіля Руслан, Коркуна Остап</I></P>'); -INSERT INTO `challenges_lang` (`id`, `langcode`, `name`, `description`) VALUES -(1026, 'uk', 'Полювання', '<P><B>Завдання</B></P><P>2077 рік. Не тільки наука і техніка з шаленою швидкісю ідуть вперед, також розвивається сфера розваг. Поїздкою на Багами чи Мальдіви тепер нікого не здивуєш, але в моді і далі залишається сафарі. Оскільки Африка перетворилась на найпотужніший (після України) центр бізнесу та підприємництва, то крім як на гроші, там полювати немає на що. Тепер сафарі відбувається на планеті Зайцеоленіон. Очевидно, що на цій планеті крім невеликої популяції зайцеоленіонців проживають ще й звірі (яке ж сафарі без звірів?), а саме космозайці і космоолені.</P><P>Правила сафарі дуже прості. Мисливцю видають звичайну однозарядну гіпернаноплазморушницю, висаджують посеред поля і дозволяють зробити один постріл. Всі звірі, яких промінь з гіпернаноплазморушниці поранить, або хоча б торкнеться стають здобиччю мисливця.Донецький бізнесмен на ім''я Лунат Рахметов за порадою своїх африканських колег вирішив спробувати щастя в зайцеоленіонському сафарі, але йому потрібна ваша допомога, адже він хоче підстрелити якомога більше звірів за свій один постріл.</P><P>Поле для сафарі є квадратом розміру 20000 на 20000 клітинок. Мисливця висаджують в центрі цього квадрата - точці з координатами (0;0), відповідно вершини квадратного поля мають координати (10000;10000), (10000;-10000), (-10000;-10000), (-10000;10000). В межах цього поля знаходяться M космозайців та N космооленів (0 <= M,N <= 200). Як космозайці так і космоолені через малу кількість зелені на планеті не мають що їсти і є дуже худими, тому будемо вважати, що зайці - це точки, олені - відрізки на даному полі. Гіпернаноплазморушниця стріляє променем, який ми будемо вважати променем з початком в точці (0;0). Космозаєць вважається підстреленим, якщо промінь пройде через точку, в якій знаходиться космозаєць. Космоолень вважається підстреленим, якщо промінь перетне відрізок, що зображає оленя, чи пройде крізь один з його кінців.</P><P>Жоден космозаєць не може сидіти на голові в мисливця, тобто в точці (0;0) та жоден космоолень не може лежати під мисливцем, тобто перетинати точку (0;0). Але космоолені та космозайці можуть перетинатися, чи знаходитись в одній і тій самій точці, тобто попавши в точку на якій сидять два космозайці, чи перетинаються два космоолені, ви підстрелите обох. Розміри космооленів можуть бути довільні, починаючи від 0 включно, але кожен космоолень знаходиться усім тілом в полі.</P><P>Ваше завдання вивести число - максимальну кількість тварин, яких Лунат Рахметов може підстрелити за один постріл.</P><P><B>Вхідні дані</B></P><P>В першому рядку задано ціле число M - кількість космозайців (0 <= M <= 200). В наступних M рядках - по два числа - координати Х та Y відповідного космозайця. Після цього записане число N - кількість космооленів (0 <= N <= 200), за ним в N рядках по чотири числа: перші два - координати Х та Y початку відрізка (початку космооленя), наступні два - координати Х та Y кінця відрізка (кінця космооленя). Всі координати є ЦІЛИМИ числами в межах від -10000 до 10000 включно.</P><P><B>Вихідні дані</B></P><P>Єдине ціле число - максимальна кількість звірів, яких можна вбити одним пострілом.</P><P><B>Приклад введення</B></P><PRE>1</PRE><PRE>-1 -1</PRE><PRE>3</PRE><PRE>1 2 2 1</PRE><PRE>2 3 4 2</PRE><PRE>3 -3 4 -4</PRE><P><B>Приклад виведення</B></P><P>2</P><P>Підказка: Мисливець може вбити одним пострілом першого та другого космооленів.</P><P><B>Автори задачі:</B><I> Бабіля Руслан, Коркуна Остап</I></P>'), -(1027, 'uk', 'Шлюзи', '<P align=left><B>Завдання</B></P><P>2077 рік. Космічні подорожі ввійшли в повсякденне життя майже всіх людей, а для декого це стало навіть роботою. Зокрема для працівників галактичної посильної служби в Віконній Галактиці. Їх робота полягає в доставці посилок та бандеролей від однієї планети до іншої. Але на шляху посильних стоїть досить вагома перешкода - Космічний Брандмауер - система захисту Віконної Галактики. Космічний Брандмауер захіщає Віконну Галактику від контрабандистів та космічних піратів.</P><P>Побудований Космічний Брандмауер за таким принципом: кожна планета закрита одним шлюзом від відкритого космосу. Якщо шлюз замкнений, то неможливо ні попасти на планету, ні покинути її. З планети А в планету В можна потрапити лише коли на планеті А та на планеті В відкриті шлюзи. Відкривається та закривається шлюз дуже складним пристроєм, побудованим на кінетично-магнітному ефекті насиченої плазми, під назвою Рубильник. Для кожного шлюза існує один і лише один рубильник. Рубильник для певного шлюзу може знаходитись на будьякій планеті, навіть на тій, де знаходиться шлюз.</P><P>На початку подорожі посильний знаходиться на планеті з номером 0 і шлюз на цій планеті відкритий. Всього в галактиці є N (1 <= N <= 100) планет. На всіх них (крім 0-вої) шлюзи закриті. В кінці подорожі посильний повинен знаходитися на останній планеті (з номером N-1), при чому на ВСІХ ІНШИХ планетах шлюзи повинні бути ЗАКРИТІ. По дорозі посильний може довільну кількість разів потрапляти на довільні планети та довільну кількість разів відкривати/закривати шлюзи. Важливою є лише кількість виходів в відкритий космос (кожен переліт з планети на планету супроводжується одним виходом у відкритий космос). Потрібно знайти таку найменшу кількість виходів у відкритий космос, за які можна виконати поставлене завдання.</P><P><B>Вхідні дані</B></P><P>В першому рядку записане число N (1 <= N <= 100) - кількість планет у галактиці. В другому рядку через пробіл записані N чисел: перше - номер планети, на якій знаходиться рубильник від шлюза на 0-вій планеті, друге - від шлюза 1-шої планети, і т. д. N-не - номер планети, на якій знаходиться рубильник від шлюза на останній (N-1)-шій планеті.</P><P><B>Вихідні дані</B></P><P>Невід''ємне число - мінімальна кількість виходів у відкритий космос, за які можна виконати завдання посильного. Якщо виконати завдання неможливо, то вивести "-1" (без лапок).</P><P><B>Приклад введення</B></P><P><PRE>3</PRE><PRE>1 2 0</PRE><P></P><P><B>Приклад виведення</B></P><P><PRE>3</PRE><P></P><P>Підказка: Спочатку посильний відкриває шлюз на планеті 2, тоді перелітає з планети 0 на планету 2, відкриває шлюз на планеті 1, перелітає з планети 2 на планету 1, закриває шлюз на планеті 0, перелітає з планети 1 на планету 2, закриває шлюз на планеті 1. Всього 3 виходи у відкритий космос.</P><P><B>Автори задачі:</B><I> Бабіля Руслан, Коркуна Остап</I></P>'), -(1028, 'uk', 'Факторіал', '<P align=left><B>Завдання</B></P><P>Підрахуйте кількість нулів в кінці запису факторіалу числа N.<P><B>Вхiднi данi</B></P><P>Єдине число N (1 <= N <= 2000000000)<P><B>Вихiднi данi</B></P><P>Єдине число - кількість нулів в кінці числа.<P><B>Приклад введення</B></P><P><PRE>8</PRE><P><B>Приклад виведення</B></P><P><PRE>1</PRE><BR>'), -(1029, 'uk', 'Свічки', '<P align=left><B>Завдання</B></P><P>Миша св''яткує свій n-й день народження. Мами миші порізала св''ятковий торт на декілька частин зробивши рівно m розрізів по прямій лінії. Торт круглий з радіусом r і центром в точці (0; 0). За звичаєм, кількість свічок на торті така сама, скільки років виповнилось імениннику. Кожен гість вз''яв по одному шматкові торта. Миші цікаво, чи не попалось комусь із гостей більше одної свічки. <P><B>Вхідні дані</B></P><P>У першому рядку знаходяться цілі числа n, m і r (1 <= n <= 10000, 0 <= m <= 1000, 1 <= r <= 2000). <P>Наступні n рядків містять інформацію про координати x та y кожної свічки (цілі числа). Гарантується, що свічки знаходяться в середині круга і ніякі дві свічки не співпадають. Розмірами свічки можна знехтувати. <P>В останніх m рядках знаходиться трійки цілих чисел a, b, c - інформація про розрізи (-10000 <= a, b, c <= 10000). Це коефіціенти рівнянь прямих у вигляді ax+by+c=0. Ніякі два розрізи не співпадають, ніякий розріз не проходить через свічку. <P><B>Вихідні дані</B></P><P>Якщо кому-небуть з гостей попало більше одної свічки - вивести "YES", або "NO" в іншому випадку. <P><B>Приклад введення</B> <P><PRE>3 2 3</PRE><PRE>2 2</PRE><PRE>1 -1</PRE><PRE>-2 0</PRE><PRE>2 -1 0</PRE><PRE>0 1 -1</PRE><P><B>Приклад виведення</B> <P><PRE>NO</PRE><BR>'), -(1030, 'uk', 'Посладовність', '<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-ALIGN: center" align=center><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''"> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">Двоє вірних друзів Бен і Дон, з метою покращення своїх математичних навиків, вирішили якось побавитись в послідовність. Кожен з них по черзі обраховував наступний член послідовності за формулою:<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: center" align=center><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">X<SUB>N</SUB></SPAN></B><B style="mso-bidi-font-weight: normal"><SUB><SPAN style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: RU">+1</SPAN></SUB></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: RU"> = </SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">A</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: RU">*</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">X<SUB>N</SUB></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: RU"> + </SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">B</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: RU">*</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">X<SUB>N</SUB></SPAN></B><B style="mso-bidi-font-weight: normal"><SUB><SPAN style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: RU">-1</SPAN></SUB></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: RU"> + </SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">C</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''"><o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: center" align=center><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-SIZE: 14pt; FONT-FAMILY: ''Courier New''"> <o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">На початку гри два перші члени послідовності були задані. Бавились вони один з одним довго й нудно. Спочатку один, потім другий, потім знову перший ... Одним словом по черзі...<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">На наступний день вони хотіли продовжити свою захоплюючу забавку. Але змогли пригадати тільки перший та останній члени...<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">Допоможіть їм продовжити займатися улюбленою справою.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''"> <o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">Вхідні дані: </SPAN></B><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">В першому рядочку міститься три цілі числа </SPAN><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">A</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">, </SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">B</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">, </SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">C<o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">У наступному міститься число </SPAN><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">N</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''"> – </SPAN></B><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">кількість порахованих вчора елементів послідовності.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">У третьому містяться два цілі числа </SPAN><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">X</SPAN></B><B style="mso-bidi-font-weight: normal"><SUB><SPAN style="FONT-FAMILY: ''Courier New''; mso-ansi-language: RU">1</SPAN></SUB></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: ''Courier New''; mso-ansi-language: RU"> </SPAN></B><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">та </SPAN><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">X<SUB>N</SUB></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: ''Courier New''; mso-ansi-language: RU"><o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><B style="mso-bidi-font-weight: normal"><SPAN style="FONT-FAMILY: ''Courier New''; mso-ansi-language: RU"> <o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">Обмеження: 2</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-GB"> <= </SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">N</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-GB"> <= 100000,</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''"><o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">1</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-GB"> <= </SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">A, B</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-GB"> <= 1000,</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''"> -1000000000 </SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US"><= C <= 1000000</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">000</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">,<o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">-1000000</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-GB"> <= </SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">x<SUB>i</SUB></SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-GB"> <= 100</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">0000</SPAN></B><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-GB style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-GB">, </SPAN></B><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">тобто всі елементи вчорашньої послідовності задовольняють цій умові.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">Існування розв’язку гарантується.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''"> <o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">Вихідні дані: </SPAN></B><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">Ціле число – </SPAN><B style="mso-bidi-font-weight: normal"><SPAN lang=EN-US style="FONT-FAMILY: ''Courier New''; mso-ansi-language: EN-US">x</SPAN></B><B style="mso-bidi-font-weight: normal"><SUB><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">2</SPAN></SUB></B><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">.<o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''"> <o:p></o:p></SPAN></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><B style="mso-bidi-font-weight: normal"><SPAN lang=UK style="FONT-FAMILY: ''Courier New''">Приклад вводу:<o:p></o:p></SPAN></B></P><P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; TEXT-INDENT: 27pt; TEXT-ALIGN: justify"><SPAN lang=UK style="FO... [truncated message content] |
From: <pan...@us...> - 2009-02-14 10:38:24
|
Revision: 506 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=506&view=rev Author: panzaboi Date: 2009-02-14 10:38:19 +0000 (Sat, 14 Feb 2009) Log Message: ----------- 1) Added News 2) Moved Users out of ACM module to default 3) Changed contest to not include registration 4) Added Rank Table for contests 5) Added application/view path to include general views there. (Should consider the same for models) Modified Paths: -------------- website/application/layouts/layout.phtml website/application/modules/acm/controllers/ContestController.php website/application/modules/acm/models/Calc/ACM.php website/application/modules/acm/models/Contest.php website/application/modules/acm/models/Table/Contests.php website/application/modules/acm/models/Table/ContestsResults.php website/application/modules/acm/models/Table/Submits.php website/application/modules/acm/models/Table/UsersDetails.php website/application/modules/acm/models/Table/UsersStats.php website/application/modules/acm/views/scripts/archive/entry.phtml website/application/modules/acm/views/scripts/archive/index.phtml website/application/modules/acm/views/scripts/contest/contest.phtml website/application/modules/acm/views/scripts/contest/entry.phtml website/application/modules/acm/views/scripts/contest/index.phtml website/application/modules/acm/views/scripts/contest/problemset.phtml website/application/modules/acm/views/scripts/contest/result.phtml website/application/modules/acm/views/scripts/contest/results.phtml website/config/config.ini website/httpdocs/index.php website/lang/uk.csv website/library/Application.php website/library/Ostacium/Controller/Router/Route/Language.php Added Paths: ----------- website/application/modules/acm/views/scripts/contest/source.phtml website/application/modules/acm/views/scripts/contest/table.phtml website/application/modules/default/controllers/NewsController.php website/application/modules/default/controllers/UserController.php website/application/modules/default/models/ website/application/modules/default/models/Form/ website/application/modules/default/models/News.php website/application/modules/default/models/Table/ website/application/modules/default/models/Table/News.php website/application/modules/default/models/Table/Users.php website/application/modules/default/models/User.php website/application/modules/default/views/scripts/news/ website/application/modules/default/views/scripts/news/entry.phtml website/application/modules/default/views/scripts/news/index.phtml website/application/modules/default/views/scripts/news/view.phtml website/application/view/ website/application/view/helpers/ website/application/view/scripts/ website/application/view/scripts/logedin.phtml website/application/view/scripts/paginator.phtml Removed Paths: ------------- website/application/layouts/old_layout.phtml website/application/modules/acm/controllers/UserController.php website/application/modules/acm/models/Archieve.php website/application/modules/acm/models/Table/Users.php website/application/modules/acm/models/User.php website/application/modules/acm/views/scripts/contest/incontest.phtml website/application/modules/acm/views/scripts/contest/notincontest.phtml website/application/modules/acm/views/scripts/error/ website/application/modules/acm/views/scripts/logedin.phtml website/application/modules/acm/views/scripts/paginator.phtml website/application/modules/acm/views/scripts/user/ website/application/modules/default/views/scripts/error/ Modified: website/application/layouts/layout.phtml =================================================================== --- website/application/layouts/layout.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/layouts/layout.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -51,8 +51,8 @@ <div id="topmenu"> <ul> - <li><a href="#" class="current">home</a></li> - <li><a href="#">news</a></li> + <li><a href="<?= $this->url(array(), null, true) ?>" class="current">home</a></li> + <li><a href="<?= $this->url(array('module' => 'default', 'controller' => 'news'), null, true) ?>">news</a></li> <li><a href="#">forum</a></li> <li><a href="#">links</a></li> <li><a href="#">search</a></li> @@ -79,12 +79,7 @@ </ul> </li> <li> - <a href="#Archieve" onclick="return toggle('sub2');">Контести</a> - <ul id="sub2"> - <li><a href="<?= $this->url(array('module' => 'acm', 'controller' => 'contest', 'action' => 'index'), null, true) ?>">Зареєструватись</a></li> - <li><a href="#Problems">Набір Завдань</a></li> - <li><a href="#Results">Результати</a></li> - </ul> + <a href="<?= $this->url(array('module' => 'acm', 'controller' => 'contest', 'action' => 'index'), null, true) ?>">Контести</a> </li> <li> <a href="#Archieve" onclick="return toggle('sub3');">Віртуальні Контести</a> Deleted: website/application/layouts/old_layout.phtml =================================================================== --- website/application/layouts/old_layout.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/layouts/old_layout.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -1,87 +0,0 @@ -<?= $this->doctype() ?> -<? $this->dojo()->enable() - ->setDjConfigOption('parseOnLoad', true) - ->registerModulePath('custom', '../custom/') - ->requireModule('dijit.form.FilteringSelect') ?> -<html> - <head> - <base href="<?= 'http://' . $_SERVER["HTTP_HOST"] . $this->baseUrl() ?>/" /> - <?= $this->headTitle($this->placeholder('title')->toString()) ?> - <?= $this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=UTF-8') ?> - - <?= $this->headLink()->appendStylesheet('styles/style.css') ?> - <?= /*$this->headLink()->appendStylesheet('styles/ie6.css', 'screen', 'IE 6')*/'' ?> - <?= /*$this->headLink()->appendStylesheet('styles/ie7.css', 'screen', 'IE 7')*/'' ?> - <?= $this->headScript()->appendFile('/scripts/main.js') ?> - - <? if ($this->dojo()->isEnabled()): - $this->dojo()->setLocalPath('/scripts/dojo/dojo.js') - ->addStyleSheetModule('dijit.themes.tundra'); - - echo $this->dojo(); - endif; ?> - </head> - <body class="tundra"> - <table border="0" cellpadding="0" cellspacing="0" width="100%"> - <tr bgcolor="#122a5b"> - <td><img height="43" src="images/logo.gif" width="490"></td> - </tr> - <tr bgcolor="#e1e1e1"> - <td><img height=26 src="images/logod.gif" width="490"></td> - </tr> - <tr> - <td bgcolor=#122a5b colspan=2><img height=2 src="images/0.gif" width=1></td> - </tr> - </table> - <table border=0 cellpadding=0 cellspacing=0 width="100%" summary="" height="20%"> - <tr> - <td bgcolor=#e1e1e1 valign=top width="200"> - <table width="100%" border="0" cellpadding="0" cellspacing="5"> - <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="index/about">Що це за проект</a></td></tr> - <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="index/rule">Правила</a></td></tr> - <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archive/index">Набір завдань</a></td></tr> - <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archive/submit">Протестувати Розв'язок</a></td></tr> - <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archive/results">Результати Тестувань</a></td></tr> - <tr><td><img border="0" src="images/arrow.gif" width="8" height="8" hspace="5"><a href="/acm/archive/ranks">Рейтинг Учасників</a></td></tr> - <tr><td><hr></td></tr> - </table> - - <table border=0 cellpadding=4 cellspacing=0 width="100%" summary=""> - <tr><td align=middle bgcolor=#122a5b><font color=#d4d0e2><b><small>вхід</small></b></font></td></tr> - <tr><td> - <form onsubmit="return checkform(this);" method="post" action="login.php?rid=45fed5d9b297f" style="margin:0"> - <input type="hidden" name="path" value="/"> - <table border=0 cellPadding=1 cellSpacing=0 summary="" width=100%> - <tr> - <td class=name nowrap><small><font color=#122a5b> логін:</font></small></td> - <td><input name=lgn style="height: 18px; width: 100px"></td> - <td> </td> - </tr> - <tr> - <td class=name nowrap><small><font color=#122a5b> пароль:</font></small></td> - <td><input name=pswd type=password style="height: 18px; width: 100px"></td> - <td><input name="login" src="images/b_find.gif" type="image"> - </tr> - </table> - </form> - -<CENTER><A href="register.php">Зареєструватись</a><BR><a href=createteam.php>Створити команду</a></CENTER> -</TABLE><TABLE border=0 cellPadding=4 cellSpacing=0 width="100%"> -<TR><TD align=middle bgColor=#122a5b> -<FONT color=#d4d0e2><B><SMALL>F.A.Q.</SMALL></B></FONT> -<TR><TD><TABLE border=0 cellPadding=0 cellSpacing=2 width="100%"><TR><TD><P>Мені здається що програма написана правильно, але система видає "Помилка під час виконання"... -<P>Якщо Ви використовуєте С++, і описали функцію void main(){...} - навіть якщо програма видасть -правильний результат, то система видасть "помилка під час виконання". Це пов'язано з тим, що -в такому випадку код завершення програми непердбачуваний, і практично ніколи небуває нульовим. -<BR>Для того, щоб програму Вам зарахувало (якщо все правильно), необхідно описувати основну -функцію як int main(){...} і обов'язково завершувати програму через return 0. -<TR><TD align=right><P><SMALL><A href="allfaq.php">[ Всі питання ]</p></SMALL></TABLE><TR><TD align=middle bgColor=#122a5b> -<FONT color=#d4d0e2> </FONT> -<TR><TD><TABLE border=0 cellPadding=0 cellSpacing=2 width="100%"><TR><TD align=center> - -</TABLE></TABLE><TD bgColor=#f4f3f8 vAlign=top height=100%><?= $this->placeholder('message') ?><br /><?= $this->layout()->content ?></table></table> -<TABLE> -<TR vAlign=Bottom><TABLE border=0 cellPadding=0 cellSpacing=0 width="100%" summary=""><TR bgColor=#122a5b><TD colSpan=3><IMG alt="" height=5 src="images/pixel.gif" width=1><TR bgColor=#122a5b><TD class=copyright>© 2004-2005, <a class=copyrightlink href="mailto: ac...@ia..."><B><FONT COLOR="#d1d1d1">A-S</FONT>tudio</B></A><TD align=middle><TD align=right class=copyright><A class=copyrightlink href="http://www.acm.lviv.ua">ACM Контестер</A><TR bgColor=#122a5b><TD colSpan=3><IMG alt="" height=5 src="images/pixel.gif" width=1></TABLE> - <?= $this->debugInfo(true) ?> - </body> -</html> \ No newline at end of file Modified: website/application/modules/acm/controllers/ContestController.php =================================================================== --- website/application/modules/acm/controllers/ContestController.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/controllers/ContestController.php 2009-02-14 10:38:19 UTC (rev 506) @@ -21,7 +21,7 @@ { } - + /* public function registerAction() { $contestid = $this->_getParam('contestid'); @@ -40,7 +40,7 @@ return $this->render('registered'); } - + */ public function viewAction() { $id = $this->_getParam('id'); @@ -54,14 +54,27 @@ $this->view->assign($problem); } + public function sourceAction() + { + $id = $this->_getParam('id'); + $contestid = $this->_getParam('contestid'); + + $source = $this->_model->getSubmit($id, $contestid); + + if (!$source) + return $this->_forward('index', null, null, $this->_getAllParams() + array('message' => 'noProblem')); + + $this->view->assign($source); + } + public function problemsetAction() { $contestid = $this->_getParam('contestid'); - if (!$this->_model->isInContest($contestid)) + /*if (!$this->_model->isInContest($contestid)) { return $this->render('notincontest'); - } + }*/ $this->view->challenges = $this->_model->getChallenges($contestid); } @@ -149,4 +162,12 @@ $this->view->submits = $this->_model->getSubmits($contestid); } + + public function tableAction() + { + $contestid = $this->_getParam('contestid'); + + $this->view->challenges = $this->_model->getChallenges($contestid); + $this->view->table = $this->_model->getTable($contestid); + } } \ No newline at end of file Deleted: website/application/modules/acm/controllers/UserController.php =================================================================== --- website/application/modules/acm/controllers/UserController.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/controllers/UserController.php 2009-02-14 10:38:19 UTC (rev 506) @@ -1,80 +0,0 @@ -<?php - -class Acm_UserController extends Ostacium_Controller_Action -{ - public function registerAction() - { - $this->_helper->getHelper('viewRenderer')->setNoRender(true); - - $form = new Form_Register(); - - if (!$this->getRequest()->isPost()) - { - echo $form; - return; - } - - if (!$form->isValid($this->getRequest()->getPost())) - { - echo $form; - return; - } - - // check cpassword == password - - $values = $form->getValues(); - $values['ip'] = $this->getRequest()->getIp(); - $code = substr(md5(time()), mt_rand(0, 27), 5); - $result = $this->_model->registerUser($values, $code); - - if (!$result) - { - $form->setDescription($this->view->translate('wrongEmailPwd')); - - echo $form; - } - else - { - $arguments = array('code' => $code, 'fullname' => $values['name'].' '.$values['surname'], 'username' => $values['username']); - $mail = new Ostacium_Mail(); - $mail->setFrom($this->_config->email->from.'@'.$_SERVER["SERVER_NAME"], $this->_config->general->title.' Staff') - ->addTo($values['email'], $values['name'].' '.$values['surname']) - ->setSubject($this->_('registration_email')) - ->setBodyTemplate(array('template' => 'register.phtml', 'arguments' => $arguments)) - ->send(); - - return $this->_redirect($this->view->url(array('action' => 'registered'))); - } - } - - public function registeredAction() - { - - } - - public function activateAction() - { - $username = $this->_getParam('username'); - $code = $this->_getParam('code'); - - $result = $this->_model->activateUser($username, $code); - - if ($result) - { - return $this->render('activated'); - } - else - { - return $this->render('notactivated'); - } - } - - public function viewAction() - { - $username = $this->_getParam('username'); - $this->view->assign($this->_model->getUser($username)); - var_dump($this->_model->getUser($username)); - - //var_dump($this->view->user); - } -} \ No newline at end of file Deleted: website/application/modules/acm/models/Archieve.php =================================================================== --- website/application/modules/acm/models/Archieve.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/models/Archieve.php 2009-02-14 10:38:19 UTC (rev 506) @@ -1,68 +0,0 @@ -<?php - -class Archieve extends Ostacium_Model -{ - public function getChallenges() - { - $challenges = new Challenges(); - return $challenges->getAll(); - } - - public function getSubmits() - { - $submits = new Submits(); - return $submits->getAll(); - } - - public function getChallenge($id) - { - $challenges = new Challenges(); - return $challenges->get($id); - } - - public function addSubmit($values) - { - $data = array( - 'contestid' => 0, - 'username' => Zend_Auth::getInstance()->getStorage()->read()->username, - 'challengeid' => (int)$values['id'], - 'codelangid' => $values['languageid'], - 'firsttest' => $values['firsttest'], - 'when' => time() - ); - - //$challenges = new Challenges(); - //$challenges->update(array('tries' => 'tries + 1'), $this->_db->quoteInto('id = ?', $data['challengeid'])); - // move this to the page, where we recieve data from Tester, add tries and accepts there. - - $submits = new Submits(); - return $submits->insert($data); - } -} - -class Challenges extends Ostacium_Db_Table -{ - protected $_name = 'challenges'; - protected $_primary = 'id'; - - public function get($id) - { - return $this->selectLang(array('name', 'description'))->where('challenges.id = ? AND enabled = 1', $id)->query()->fetch(); - } - - public function getAll() - { - return $this->selectLang(array('name', 'description'))->where('challenges.enabled = 1')->query()->fetchAll(); - } -} - -class Submits extends Ostacium_Db_Table -{ - protected $_name = 'submits'; - protected $_primary = 'id'; - - public function getAll() - { - return $this->select()->from($this)->setIntegrityCheck(false)->joinLeft('code_languages', 'code_languages.id = submits.codelangid', array('codelang' => 'name'))->where('contestid = 0')->order('submits.id DESC')->query()->fetchAll(); - } -} \ No newline at end of file Modified: website/application/modules/acm/models/Calc/ACM.php =================================================================== --- website/application/modules/acm/models/Calc/ACM.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/models/Calc/ACM.php 2009-02-14 10:38:19 UTC (rev 506) @@ -31,7 +31,7 @@ } elseif ($submit['state'] > 1) { - $result['penalty'] += $_config->calc->acm->penalty; + $result['penalty'] += $_config->acm->calc->penalty; } return $result; Modified: website/application/modules/acm/models/Contest.php =================================================================== --- website/application/modules/acm/models/Contest.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/models/Contest.php 2009-02-14 10:38:19 UTC (rev 506) @@ -20,7 +20,7 @@ $contests = new Table_Contests(); return $contests->getAll(); } - + /* public function registerUser($id) { $username = Zend_Auth::getInstance()->getStorage()->read()->username; @@ -30,13 +30,13 @@ return true; } - + */ public function isContestRunning($contestid) { $contest = new Table_Contests(); return $contest->isRunning($contestid); } - + /* public function isInContest($contestid) { $username = Zend_Auth::getInstance()->getStorage()->read()->username; @@ -44,7 +44,7 @@ return $contest->isInContest($contestid, $username); } - + */ public function getChallenges($contestid) { $challenges = new Table_Challenges(); @@ -57,6 +57,12 @@ return $challenges->getFromContest($id, $contestid); } + public function getSubmit($id, $contestid) + { + $submits = new Table_Submits(); + return $submits->getFromContest($id, $contestid); + } + public function addSubmit($values) { $data = array( @@ -87,7 +93,7 @@ public function updateResults($submit) { - // LOG THIS/FAIL! + //TODO: LOG THIS/FAIL! if (!$this->calc) return false; $contests = new Table_Contests(); @@ -118,6 +124,17 @@ $results->update($newresult, $where); } } + + public function getTable($contestid) + { + $results = new Table_ContestsResults(); + return $results->getResults($contestid); + + /*if ($results) + return $results->toArray(); + else + return false;*/ + } } Modified: website/application/modules/acm/models/Table/Contests.php =================================================================== --- website/application/modules/acm/models/Table/Contests.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/models/Table/Contests.php 2009-02-14 10:38:19 UTC (rev 506) @@ -23,7 +23,7 @@ ->where('enabled = 1 AND start <= UNIX_TIMESTAMP() AND end > UNIX_TIMESTAMP()') ->query()->fetchAll(); } - +/* public function isInContest($contestid, $username) { $id = $this->select()->setIntegrityCheck(false) @@ -36,4 +36,5 @@ if ($id && $id == $contestid) return true; else return false; } +*/ } \ No newline at end of file Modified: website/application/modules/acm/models/Table/ContestsResults.php =================================================================== --- website/application/modules/acm/models/Table/ContestsResults.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/models/Table/ContestsResults.php 2009-02-14 10:38:19 UTC (rev 506) @@ -4,4 +4,17 @@ { protected $_name = 'contests_results'; protected $_primary = array('contestid', 'username', 'challengeid'); + + public function getResults($contestid) + { + return $this->select()->setIntegrityCheck(false) + ->from($this, array('*', 'SUM(penalty) as total_penalty', 'SUM(accepted) AS total_accepts', 'GROUP_CONCAT(challengeid) as challenges', 'GROUP_CONCAT(accepted) as accepts', 'GROUP_CONCAT(tries) as alltries', 'GROUP_CONCAT(created-contests.start) as allcreated')) + ->joinLeft('contests', 'contests.id=contests_results.contestid', array()) + ->order('total_accepts DESC') + ->order('total_penalty ASC') + ->order('accepted DESC') + ->where('contestid = ?', $contestid) + ->group('username') + ->query()->fetchAll(); + } } \ No newline at end of file Modified: website/application/modules/acm/models/Table/Submits.php =================================================================== --- website/application/modules/acm/models/Table/Submits.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/models/Table/Submits.php 2009-02-14 10:38:19 UTC (rev 506) @@ -16,6 +16,17 @@ ->query()->fetchAll(); } + public function getFromContest($id, $contestid) + { + return $this->select()->setIntegrityCheck(false) + ->from($this) + ->joinLeft('code_languages', 'code_languages.id = submits.codelangid', array('codelang' => 'name')) + ->joinLeft(array('c' => 'contests'), 'submits.contestid = c.id', array()) + ->where('submits.id = ?', $id) + ->where('submits.contestid = ?', $contestid) + ->query()->fetch(); + } + public function getAll() { return $this->select()->setIntegrityCheck(false) Deleted: website/application/modules/acm/models/Table/Users.php =================================================================== --- website/application/modules/acm/models/Table/Users.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/models/Table/Users.php 2009-02-14 10:38:19 UTC (rev 506) @@ -1,16 +0,0 @@ -<?php - -class Table_Users extends Ostacium_Db_Table -{ - protected $_name = 'users'; - protected $_primaty = 'username'; - - function getUser($username) - { - return $this->select()->setIntegrityCheck(false)->from($this) - ->joinLeft(array('r' => 'roles'), 'r.id=users.roleid', array('role' => 'name')) - ->joinLeft(array('d' => 'usersdetails'), 'd.username=users.username') - ->where('users.username = ?', $username) - ->query()->fetch(); - } -} \ No newline at end of file Modified: website/application/modules/acm/models/Table/UsersDetails.php =================================================================== --- website/application/modules/acm/models/Table/UsersDetails.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/models/Table/UsersDetails.php 2009-02-14 10:38:19 UTC (rev 506) @@ -3,5 +3,5 @@ class Table_UsersDetails extends Ostacium_Db_Table { protected $_name = 'usersdetails'; - protected $_primaty = 'username'; + protected $_primary = 'username'; } \ No newline at end of file Modified: website/application/modules/acm/models/Table/UsersStats.php =================================================================== --- website/application/modules/acm/models/Table/UsersStats.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/models/Table/UsersStats.php 2009-02-14 10:38:19 UTC (rev 506) @@ -3,5 +3,5 @@ class Table_UsersStats extends Ostacium_Db_Table { protected $_name = 'usersstats'; - protected $_primaty = 'username'; + protected $_primary = 'username'; } \ No newline at end of file Deleted: website/application/modules/acm/models/User.php =================================================================== --- website/application/modules/acm/models/User.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/models/User.php 2009-02-14 10:38:19 UTC (rev 506) @@ -1,39 +0,0 @@ -<?php - -class User extends Ostacium_Model -{ - public function registerUser($data, $code) - { - $data['registered'] = time(); - $data['online'] = $data['registered']; - $data['roleid'] = Zend_Registry::get('config')->general->roleid; - $data['activated'] = $code; - $data['password'] = md5($data['password']); - - $users = new Table_Users(); - $users->insert($data); - - $usersdetails = new Table_UsersDetails(); - $usersdetails->insert($data); - - $usersstats = new Table_UsersStats(); - $usersstats->insert($data); - - return true; - } - - public function activateUser($username, $code) - { - $where = $this->_db->quoteInto('username = ?', $username).' AND activated = ?'; - $where = $this->_db->quoteInto($where, $code); - - $users = new Table_Users(); - return $users->update(array('activated' => null), $where); - } - - public function getUser($username) - { - $users = new Table_Users(); - return $users->getUser($username); - } -} \ No newline at end of file Modified: website/application/modules/acm/views/scripts/archive/entry.phtml =================================================================== --- website/application/modules/acm/views/scripts/archive/entry.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/archive/entry.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -7,4 +7,4 @@ <a href="<?= $this->url( array('action' => 'submit', 'id' => $this->id), null) ?>"><img height="20" width="20" alt="<?= $this->translate('submit_solution') ?>" src="images/acm/submit.png"/></a> <a href="<?= $this->url( array('action' => 'status', 'id' => $this->id), null) ?>"><img height="20" width="20" alt="<?= $this->translate('solution_status') ?>" src="images/acm/status.png"/> </td> -</tr> +</tr> \ No newline at end of file Modified: website/application/modules/acm/views/scripts/archive/index.phtml =================================================================== --- website/application/modules/acm/views/scripts/archive/index.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/archive/index.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -18,4 +18,4 @@ <tr> <td colspan="5" class="footer tc"><?= $this->challenges ?></td> </tr> -</table> +</table> \ No newline at end of file Modified: website/application/modules/acm/views/scripts/contest/contest.phtml =================================================================== --- website/application/modules/acm/views/scripts/contest/contest.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/contest/contest.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -3,5 +3,9 @@ <td align="center"><?= $this->name ?></td> <td align="center"><?= $this->date($this->start, "d.m.Y H:i:s") ?></td> <td align="center"><?= $this->date($this->end, "d.m.Y H:i:s") ?></td> - <td align="center"><a href="<?= $this->url(array('action' => 'register', 'contestid' => $this->id), null) ?>"><?= $this->translate('register') ?></a></td> + <td align="center"> + <a href="<?= $this->url(array('action' => 'problemset', 'contestid' => $this->id), null) ?>"><?= $this->translate('problem_set') ?></a> + <a href="<?= $this->url(array('action' => 'results', 'contestid' => $this->id), null) ?>"><?= $this->translate('results') ?></a> + <a href="<?= $this->url(array('action' => 'table', 'contestid' => $this->id), null) ?>"><?= $this->translate('table') ?></a> + </td> </tr> \ No newline at end of file Modified: website/application/modules/acm/views/scripts/contest/entry.phtml =================================================================== --- website/application/modules/acm/views/scripts/contest/entry.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/contest/entry.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -1,14 +1,10 @@ -<tr bgcolor="#f4f3f8" align="middle"> - <td style="border-left: 0px none; border-right: 1px solid rgb(196, 196, 219);"> - <a href="<?= $this->url( array('action' => 'view', 'contest' => $this->contestid, 'id' => $this->id), null) ?>"><?= $this->id ?></a> +<tr class="tc"> + <td width="10%"><a href="<?= $this->url( array('action' => 'view', 'id' => $this->id), null) ?>"><?= $this->id ?></a></td> + <td width="60%" class="tl"><a href="<?= $this->url( array('action' => 'view', 'id' => $this->id), null) ?>"><?= $this->name ?></a></td> + <td width="10%"><?= $this->tries ?></td> + <td width="10%"><?= $this->accepts ?></td> + <td width="10%"> + <a href="<?= $this->url( array('action' => 'submit', 'id' => $this->id), null) ?>"><img height="20" width="20" alt="<?= $this->translate('submit_solution') ?>" src="images/acm/submit.png"/></a> + <a href="<?= $this->url( array('action' => 'status', 'id' => $this->id), null) ?>"><img height="20" width="20" alt="<?= $this->translate('solution_status') ?>" src="images/acm/status.png"/> </td> - - <td align="left" style="border-left: 0px none; border-right: 1px solid rgb(196, 196, 219);"> - <a href="<?= $this->url( array('action' => 'view', 'contest' => $this->contestid, 'id' => $this->id), null) ?>"><?= $this->name ?></a> - </td> - - <td style="border-left: 0px none; border-right: 0px solid rgb(196, 196, 219);"> - <a href="<?= $this->url( array('action' => 'submit', 'contest' => $this->contestid, 'id' => $this->id), null) ?>"><img height="17" width="22" alt="Здати" title="Здати" src="images/b_find.gif"/></a> - <a href="<?= $this->url( array('action' => 'status', 'contest' => $this->contestid, 'id' => $this->id), null) ?>"><img height="17" width="22" alt="Показати як здають" src="images/probstatus.png"/> - </td> </tr> \ No newline at end of file Deleted: website/application/modules/acm/views/scripts/contest/incontest.phtml =================================================================== --- website/application/modules/acm/views/scripts/contest/incontest.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/contest/incontest.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -1 +0,0 @@ -You are already in this contest \ No newline at end of file Modified: website/application/modules/acm/views/scripts/contest/index.phtml =================================================================== --- website/application/modules/acm/views/scripts/contest/index.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/contest/index.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -2,11 +2,11 @@ <br /> <table class="table"> <tr> - <th>Номер</th> - <th>Назва</th> - <th>Початок</th> - <th>Кінець</th> - <th>Зареєструватись</th> + <th><?= $this->translate('id') ?></th> + <th><?= $this->translate('name') ?></th> + <th><?= $this->translate('start') ?></th> + <th><?= $this->translate('end') ?></th> + <th><?= $this->translate('options') ?></th> </tr> <? if (count($this->contests)): ?> <?= $this->partialLoop('contest/contest.phtml', $this->contests) ?> Deleted: website/application/modules/acm/views/scripts/contest/notincontest.phtml =================================================================== --- website/application/modules/acm/views/scripts/contest/notincontest.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/contest/notincontest.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -1 +0,0 @@ -You are not taking part in this contest \ No newline at end of file Modified: website/application/modules/acm/views/scripts/contest/problemset.phtml =================================================================== --- website/application/modules/acm/views/scripts/contest/problemset.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/contest/problemset.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -1,10 +1,21 @@ -<table cellspacing="1" cellpadding="8" border="0" width="100%"><tbody><tr><td width="100%" valign="top" class="name"> - -<table cellspacing="0" cellpadding="0" border="0" width="100%"><tbody><tr><td bgcolor="#d0d4de" width="4" class="name"> - -<img height="18" width="4" src="http://web.archive.org/web/20070323032706/http://acm.lviv.ua/"/></td> - -<td nowrap="" bgcolor="#122a5b" width="*" class="name"> <font color="#d4d0e2"><b><small>Набiр задач</small></b><small/></font></td><td nowrap="" bgcolor="#122a5b" align="right" class="name"> <font color="#d4d0e2"><b><small> 05:26 23 березня 2007 року </small></b><small/></font></td></tr></tbody></table> <table cellspacing="0" cellpadding="0" border="0" summary="" align="center"><tbody><tr><td bgcolor="#f4f3f8" align="middle" colspan="14"><b>Архів задач</b></td></tr><tr><td bgcolor="#c4c4db" colspan="20"><img height="1" width="1" src="http://web.archive.org/web/20070323032706/http://acm.lviv.ua/" alt=""/></td></tr><tr bgcolor="#e1e1e1" align="middle"> -<th width="70">Задача</th><th align="left" width="270"> Назва</th><th align="middle" width="70">Дії</th></tr><tr><td height="1" bgcolor="#c4c4db" colspan="20"><img height="1" width="1" src="http://web.archive.org/web/20070323032706/http://acm.lviv.ua/" alt=""/></td></tr> -<?= $this->partialLoop('contest/entry.phtml', $this->challenges) ?> -</table><br/></td></tr></table> \ No newline at end of file +<h2><?= $this->translate('problem_set') ?></h2> +<br /> +<table class="table"> + <tr> + <th><?= $this->translate('problem') ?></th> + <th><?= $this->translate('name') ?></th> + <th><?= $this->translate('tries') ?></th> + <th><?= $this->translate('accepts') ?></th> + <th><?= $this->translate('actions') ?></th> + </tr> + <? if (count($this->challenges)): ?> + <?= $this->partialLoop('contest/entry.phtml', $this->challenges) ?> + <? else: ?> + <tr> + <td colspan="5" class="tc error"><?= $this->translate('no_problems') ?></td> + </tr> + <? endif; ?> + <tr> + <td colspan="5" class="footer tc"><?= $this->challenges ?></td> + </tr> +</table> \ No newline at end of file Modified: website/application/modules/acm/views/scripts/contest/result.phtml =================================================================== --- website/application/modules/acm/views/scripts/contest/result.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/contest/result.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -1,10 +1,10 @@ -<tr> - <td align="center"><?= $this->id ?></td> - <td align="center"><?= $this->date($this->when) ?></td> - <td align="center"><?= $this->username ?></td> - <td align="center"><a href="<?= $this->url( array('action' => 'view', 'id' => $this->challengeid), null) ?>"><?= $this->challengeid ?></a></td> - <td align="center"><?= $this->codelang ?></td> - <td align="center"><?= $this->state($this->state) ?></td> - <td align="center"><?= ($this->tests == 0 ? '-' : $this->tests) ?></td> - <td align="center"><?= ($this->runtime == 0 ? '-' : $this->runtime) ?>/<?= ($this->memory == 0 ? '-' : $this->memory) ?></td> +<tr class="tc"> + <td><a href="<?= $this->url( array('controller' => 'contest','action' => 'source', 'id' => $this->id), null) ?>"><?= $this->id ?></a></td> + <td><?= $this->date($this->when) ?></td> + <td><a href="<?= $this->url( array('module' => 'acm', 'controller' => 'user','action' => 'view', 'username' => $this->username), null, true) ?>"><?= $this->username ?></a></td> + <td><a href="<?= $this->url( array('action' => 'view', 'id' => $this->challengeid), null) ?>"><?= $this->challengeid ?></a></td> + <td><?= $this->codelang ?></td> + <td><?= $this->state($this->state) ?></td> + <td><?= ($this->tests == 0 ? '-' : $this->tests) ?></td> + <td><?= ($this->runtime == 0 ? '-' : $this->runtime) ?>/<?= ($this->memory == 0 ? '-' : $this->memory) ?></td> </tr> \ No newline at end of file Modified: website/application/modules/acm/views/scripts/contest/results.phtml =================================================================== --- website/application/modules/acm/views/scripts/contest/results.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/contest/results.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -1,33 +1,24 @@ -<table cellspacing="1" cellpadding="8" border="0" width="100%"><tbody><tr><td width="100%" valign="top" class="name"> - -<table cellspacing="0" cellpadding="0" border="0" width="100%"> -<tbody> -<tr> -<td nowrap="" bgcolor="#122a5b" width="*" class="name"> -<font color="#d4d0e2"><b><small>Набiр задач</small></b><small/></font> -</td> -<td nowrap="" bgcolor="#122a5b" align="right" class="name"> -<font color="#d4d0e2"><b><small> 05:26 23 березня 2007 року </small></b><small/></font> -</td> -</tr> -</tbody> -</table> - -<table cellspacing="0" cellpadding="0" border="0" summary="" align="center" width="80%"> -<tbody> -<tr><td bgcolor="#f4f3f8" align="middle" colspan="14"><b>Архів задач</b></td></tr> -<tr bgcolor="#e1e1e1" align="middle"> -<th>ID</th> -<th>Дата</th> -<th>Логін</th> -<th>Задача</th> -<th>Мова</th> -<th>Стан</th> -<th>Тест</th> -<th>Час/Пам'ять</th> -</tr> - -<?= $this->partialLoop('ontest/result.phtml', $this->submits) ?> -</table> - -</td></tr></table> \ No newline at end of file +<h2><?= $this->translate('results') ?></h2> +<br /> +<table class="table"> + <tr> + <th>ID</th> + <th><?= $this->translate('date') ?></th> + <th><?= $this->translate('username') ?></th> + <th><?= $this->translate('problem') ?></th> + <th><?= $this->translate('language') ?></th> + <th><?= $this->translate('state') ?></th> + <th><?= $this->translate('tests') ?></th> + <th><?= $this->translate('runtime') ?></th> + </tr> + <? if (count($this->submits)): ?> + <?= $this->partialLoop('contest/result.phtml', $this->submits) ?> + <? else: ?> + <tr> + <td colspan="8" class="tc error"><?= $this->translate('no_results') ?></td> + </tr> + <? endif; ?> + <tr> + <td colspan="8" class="footer tc"><?= $this->submits ?></td> + </tr> +</table> \ No newline at end of file Added: website/application/modules/acm/views/scripts/contest/source.phtml =================================================================== --- website/application/modules/acm/views/scripts/contest/source.phtml (rev 0) +++ website/application/modules/acm/views/scripts/contest/source.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,2 @@ +<a href="<?= $this->url( array('controller' => 'contest', 'action' => 'results', 'id' => null), null) ?>">Назад</a><br /><br /> +<code class="prettyprint"><?= htmlspecialchars(file_get_contents(Application::getDocRoot().'/other/submits/'.$this->id)) ?></code> \ No newline at end of file Added: website/application/modules/acm/views/scripts/contest/table.phtml =================================================================== --- website/application/modules/acm/views/scripts/contest/table.phtml (rev 0) +++ website/application/modules/acm/views/scripts/contest/table.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,49 @@ +<h2><?= $this->translate('contests_list') ?></h2> +<br /> +<table class="table"> + <tr> + <th><?= $this->translate('rank') ?></th> + <th><?= $this->translate('name') ?></th> + <? foreach ($this->challenges as $challenge): ?> + <th><?= $challenge['id'] ?></th> + <? endforeach; ?> + <th><?= $this->translate('AC') ?></th> + <th><?= $this->translate('penalty') ?></th> + </tr> + <? $i = 1; ?> + <? if (count($this->table)): ?> + <? foreach ($this->table as $item):?> + <? + $ch = explode(',', $item['challenges']); + $ac = explode(',', $item['accepts']); + $tr = explode(',', $item['alltries']); + $tm = explode(',', $item['allcreated']); + ?> + <tr> + <td class="tc"><?= ($i++) ?></th> + <td class="tc"><?= $item['username'] ?></th> + <? foreach ($this->challenges as $challenge): ?> + <td class="tc"> + <? + if (($key = array_search($challenge['id'], $ch)) !== false): + if ($ac[$key] == 1): + echo "+" . ($tr[$key] > 1 ? ($tr[$key]-1) : '') . '<br />' . $this->date($tm[$key], "H:i"); + else: + echo "-" . $tr[$key]; + endif; + else: + echo "-"; + endif; + ?> + </td> + <? endforeach; ?> + <td class="tc"><?= $item['total_accepts'] ?></td> + <td class="tc"><?= $item['total_penalty'] ?></td> + </tr> + <? endforeach; ?> + <? else: ?> + <tr> + <td colspan="5" class="tc error"><?= $this->translate('no_results') ?></td> + </tr> + <? endif; ?> +</table> Deleted: website/application/modules/acm/views/scripts/logedin.phtml =================================================================== --- website/application/modules/acm/views/scripts/logedin.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/logedin.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -1,4 +0,0 @@ -<div class="box2 c"> - <h2><?= $this->translate('user_menu') ?></h2> - <a href="<?= $this->url(array('module' => 'acm', 'controller' => 'index', 'action' => 'logout'), null, true) ?>"><?= $this->translate('log_out') ?></a> -</div> \ No newline at end of file Deleted: website/application/modules/acm/views/scripts/paginator.phtml =================================================================== --- website/application/modules/acm/views/scripts/paginator.phtml 2009-02-14 01:29:23 UTC (rev 505) +++ website/application/modules/acm/views/scripts/paginator.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -1,30 +0,0 @@ -<?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 Added: website/application/modules/default/controllers/NewsController.php =================================================================== --- website/application/modules/default/controllers/NewsController.php (rev 0) +++ website/application/modules/default/controllers/NewsController.php 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,25 @@ +<?php + +class NewsController extends Ostacium_Controller_Action +{ + public function indexAction() + { + $news = $this->_model->getNews(); + $paginator = Zend_Paginator::factory($news); + $paginator->setItemCountPerPage($this->_config->table->perpage); + $paginator->setCurrentPageNumber($this->_getParam('page')); + + $this->view->news = $paginator; + } + + public function viewAction() + { + $id = $this->_getParam('id'); + $entry = $this->_model->getNewsItem($id); + + if ($entry) + $this->view->assign($entry); + else + return $this->_redirect($this->view->url(array(), null, true)); + } +} \ No newline at end of file Added: website/application/modules/default/controllers/UserController.php =================================================================== --- website/application/modules/default/controllers/UserController.php (rev 0) +++ website/application/modules/default/controllers/UserController.php 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,81 @@ +<?php + +class UserController extends Ostacium_Controller_Action +{ + public function registerAction() + { + $this->_helper->getHelper('viewRenderer')->setNoRender(true); + + $form = new Form_Register(); + + if (!$this->getRequest()->isPost()) + { + echo $form; + return; + } + + if (!$form->isValid($this->getRequest()->getPost())) + { + echo $form; + return; + } + + // check cpassword == password + + $values = $form->getValues(); + $values['ip'] = $this->getRequest()->getIp(); + $code = substr(md5(time()), mt_rand(0, 27), 5); + $result = $this->_model->registerUser($values, $code); + + if (!$result) + { + $form->setDescription($this->view->translate('wrongEmailPwd')); + + echo $form; + } + else + { + $arguments = array('code' => $code, 'fullname' => $values['name'].' '.$values['surname'], 'username' => $values['username']); + $mail = new Ostacium_Mail(); + $mail->setFrom($this->_config->email->from.'@'.$_SERVER["SERVER_NAME"], $this->_config->general->title.' Staff') + ->addTo($values['email'], $values['name'].' '.$values['surname']) + ->setSubject($this->_('registration_email')) + ->setBodyTemplate(array('template' => 'register.phtml', 'arguments' => $arguments)) + ->send(); + + return $this->_redirect($this->view->url(array('action' => 'registered'))); + } + } + + public function registeredAction() + { + + } + + public function activateAction() + { + $username = $this->_getParam('username'); + $code = $this->_getParam('code'); + + $result = $this->_model->activateUser($username, $code); + + if ($result) + { + return $this->render('activated'); + } + else + { + return $this->render('notactivated'); + } + } + + public function viewAction() + { + $username = $this->_getParam('username'); + + if ($username) + $this->view->assign($this->_model->getUser($username)); + else + return $this->_redirect($this->view->url(array(), null, true)); + } +} \ No newline at end of file Property changes on: website/application/modules/default/models ___________________________________________________________________ Added: tsvn:logminsize + 5 Property changes on: website/application/modules/default/models/Form ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: website/application/modules/default/models/News.php =================================================================== --- website/application/modules/default/models/News.php (rev 0) +++ website/application/modules/default/models/News.php 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,15 @@ +<?php + +class News extends Ostacium_Model +{ + public function getNews() + { + $news = new Table_News(); + return $news->getAll(); + } + + public function getNewsItem($id) + { + + } +} \ No newline at end of file Property changes on: website/application/modules/default/models/Table ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: website/application/modules/default/models/Table/News.php =================================================================== --- website/application/modules/default/models/Table/News.php (rev 0) +++ website/application/modules/default/models/Table/News.php 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,16 @@ +<?php + +class Table_News extends Ostacium_Db_Table +{ + protected $_name = 'news'; + protected $_primary = 'id'; + + function getAll() + { + return $this->selectLang(array('title', 'teaser')) + ->where('enabled = 1') + ->order('created DESC') + ->query() + ->fetchAll(); + } +} \ No newline at end of file Added: website/application/modules/default/models/Table/Users.php =================================================================== --- website/application/modules/default/models/Table/Users.php (rev 0) +++ website/application/modules/default/models/Table/Users.php 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,16 @@ +<?php + +class Table_Users extends Ostacium_Db_Table +{ + protected $_name = 'users'; + protected $_primary = 'username'; + + function getUser($username) + { + return $this->select()->setIntegrityCheck(false)->from($this) + ->joinLeft(array('r' => 'roles'), 'r.id=users.roleid', array('role' => 'name')) + ->joinLeft(array('d' => 'usersdetails'), 'd.username=users.username') + ->where('users.username = ?', $username) + ->query()->fetch(); + } +} \ No newline at end of file Added: website/application/modules/default/models/User.php =================================================================== --- website/application/modules/default/models/User.php (rev 0) +++ website/application/modules/default/models/User.php 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,39 @@ +<?php + +class User extends Ostacium_Model +{ + public function registerUser($data, $code) + { + $data['registered'] = time(); + $data['online'] = $data['registered']; + $data['roleid'] = Zend_Registry::get('config')->general->roleid; + $data['activated'] = $code; + $data['password'] = md5($data['password']); + + $users = new Table_Users(); + $users->insert($data); + + $usersdetails = new Table_UsersDetails(); + $usersdetails->insert($data); + + $usersstats = new Table_UsersStats(); + $usersstats->insert($data); + + return true; + } + + public function activateUser($username, $code) + { + $where = $this->_db->quoteInto('username = ?', $username).' AND activated = ?'; + $where = $this->_db->quoteInto($where, $code); + + $users = new Table_Users(); + return $users->update(array('activated' => null), $where); + } + + public function getUser($username) + { + $users = new Table_Users(); + return $users->getUser($username); + } +} \ No newline at end of file Property changes on: website/application/modules/default/views/scripts/news ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: website/application/modules/default/views/scripts/news/entry.phtml =================================================================== --- website/application/modules/default/views/scripts/news/entry.phtml (rev 0) +++ website/application/modules/default/views/scripts/news/entry.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,5 @@ +<div class="news"> + <div class="title"><a href="<?= $this->url(array('action' => 'view', 'id' => $this->id), null) ?>"><?= $this->title ?></a></div> + <div class="image"><img src="" /></div> + <div class="entry"><?= $this->teaser ?></div> +</div> \ No newline at end of file Added: website/application/modules/default/views/scripts/news/index.phtml =================================================================== --- website/application/modules/default/views/scripts/news/index.phtml (rev 0) +++ website/application/modules/default/views/scripts/news/index.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,7 @@ +<h2><?= $this->translate('news') ?></h2> +<br /> +<? if (count($this->news)): ?> +<?= $this->partialLoop('news/entry.phtml', $this->news) ?> +<? else: ?> +<div class="error"><?= $this->translate('no_news') ?></div> +<? endif; ?> \ No newline at end of file Added: website/application/modules/default/views/scripts/news/view.phtml =================================================================== --- website/application/modules/default/views/scripts/news/view.phtml (rev 0) +++ website/application/modules/default/views/scripts/news/view.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,2 @@ +<div> +</div> \ No newline at end of file Property changes on: website/application/view ___________________________________________________________________ Added: tsvn:logminsize + 5 Property changes on: website/application/view/helpers ___________________________________________________________________ Added: tsvn:logminsize + 5 Property changes on: website/application/view/scripts ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: website/application/view/scripts/logedin.phtml =================================================================== --- website/application/view/scripts/logedin.phtml (rev 0) +++ website/application/view/scripts/logedin.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -0,0 +1,4 @@ +<div class="box2 c"> + <h2><?= $this->translate('user_menu') ?></h2> + <a href="<?= $this->url(array('module' => 'acm', 'controller' => 'index', 'action' => 'logout'), null, true) ?>"><?= $this->translate('log_out') ?></a> +</div> \ No newline at end of file Added: website/application/view/scripts/paginator.phtml =================================================================== --- website/application/view/scripts/paginator.phtml (rev 0) +++ website/application/view/scripts/paginator.phtml 2009-02-14 10:38:19 UTC (rev 506) @@ -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 Modified: website/config/config.ini =================================================================== --- website/config/config.ini 2009-02-14 01:29:23 UTC (rev 505) +++ website/config/config.ini 2009-02-14 10:38:19 UTC (rev 506) @@ -48,7 +48,8 @@ view.encoding = "UTF-8" view.helperPathPrefix = "Ostacium_View_Helper" -view.helperPath = "/library/Ostacium/View/Helper" +view.helperPath = "Ostacium/View/Helper" +view.scriptPath = "application/view/scripts/" log.table = "log" log.columnMap.type = "priorityName" @@ -77,7 +78,8 @@ crud.perpage = "25" -calc.acm.penalty = "20" +acm.calc.penalty = "20" +acm, [development: general] Modified: website/httpdocs/index.php =================================================================== --- website/httpdocs/index.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/httpdocs/index.php 2009-02-14 10:38:19 UTC (rev 506) @@ -3,10 +3,10 @@ error_reporting(E_ALL); ini_set('display_errors', 1); -$_docroot = dirname($_SERVER["DOCUMENT_ROOT"]); +//$_docroot = dirname($_SERVER["DOCUMENT_ROOT"]); $_approot = dirname(__FILE__); -require_once $_docroot . '/library/Application.php'; +require_once 'Application.php'; $app = new Application($_approot); $app->setEnvironment('development'); Modified: website/lang/uk.csv =================================================================== --- website/lang/uk.csv 2009-02-14 01:29:23 UTC (rev 505) +++ website/lang/uk.csv 2009-02-14 10:38:19 UTC (rev 506) @@ -58,6 +58,15 @@ timus_handle;Timus handle not_specified;Не вказано +id;ID +start;Початок +end;Кінець +options;Опції +rank;Ранк + +news;Новини +no_news;Немає Новин + # Errors error_other;There was unknow error, please contact administrator Modified: website/library/Application.php =================================================================== --- website/library/Application.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/library/Application.php 2009-02-14 10:38:19 UTC (rev 506) @@ -188,7 +188,8 @@ $_config = Zend_Registry::get('config'); $options = $_config->view->toArray(); - $options['helperPath'] = self::$_docroot . '/' . $options['helperPath']; + //$options['helperPath'] = self::$_docroot . '/' . $options['helperPath']; + $options['scriptPath'] = self::$_docroot . '/' . $options['scriptPath']; $view = new Zend_View($options); // Setup DocType Modified: website/library/Ostacium/Controller/Router/Route/Language.php =================================================================== --- website/library/Ostacium/Controller/Router/Route/Language.php 2009-02-14 01:29:23 UTC (rev 505) +++ website/library/Ostacium/Controller/Router/Route/Language.php 2009-02-14 10:38:19 UTC (rev 506) @@ -16,7 +16,7 @@ parent::__construct($defaults, $dispatcher, $request); $this->translate = Zend_Registry::get('Zend_Translate'); - $this->locale = Zend_Registry::get('Zend_Locale'); + $this->locale =& Zend_Registry::get('Zend_Locale'); $this->config = Zend_Registry::get('config'); $this->extention = $extention; } @@ -90,7 +90,7 @@ $this->_setRequestKeys(); } - $params = (!$reset) ? $this->_values : array(); + $params = (!$reset) ? $this->_values : array($this->_languageKey => $this->locale->toString()); foreach ($data as $key => $value) { if ($value !== null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-14 01:29:25
|
Revision: 505 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=505&view=rev Author: brus07 Date: 2009-02-14 01:29:23 +0000 (Sat, 14 Feb 2009) Log Message: ----------- Added new Plugin. This is plugin is for sample generate result of submit without Compiling and Testing. This need for easy testing Web connection. Modified Paths: -------------- ACMServer/trunk/ACMServer/ACMMediator.sln Added Paths: ----------- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties/ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties/AssemblyInfo.cs ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.cs ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.resx ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.cs ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.csproj Modified: ACMServer/trunk/ACMServer/ACMMediator.sln =================================================================== --- ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-14 01:24:48 UTC (rev 504) +++ ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-14 01:29:23 UTC (rev 505) @@ -47,6 +47,10 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedWebConnector", "Library\ConcreteConnector\ExtendedWebConnector\ExtendedWebConnector.csproj", "{28A3AAA0-0938-48CF-B66E-B056C0F865B9}" EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HelperPlugins", "HelperPlugins", "{A42A970E-FB5D-40F8-8F27-04434D792FCE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleGenerateResultPlugin", "Plugins\HelperPlugins\SampleGenerateResultPlugin\SampleGenerateResultPlugin.csproj", "{30873194-24C0-424F-A662-FD0A97223A56}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -121,6 +125,10 @@ {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Debug|Any CPU.Build.0 = Debug|Any CPU {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Release|Any CPU.ActiveCfg = Release|Any CPU {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Release|Any CPU.Build.0 = Release|Any CPU + {30873194-24C0-424F-A662-FD0A97223A56}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {30873194-24C0-424F-A662-FD0A97223A56}.Debug|Any CPU.Build.0 = Debug|Any CPU + {30873194-24C0-424F-A662-FD0A97223A56}.Release|Any CPU.ActiveCfg = Release|Any CPU + {30873194-24C0-424F-A662-FD0A97223A56}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -136,6 +144,7 @@ {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {74FB3B7A-5D91-46B3-9F15-F38136725AED} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} + {A42A970E-FB5D-40F8-8F27-04434D792FCE} = {D80861F5-3751-4D49-884B-1A10FE1BCB07} {20B192BC-FD4D-4ED5-90F5-B5994F995238} = {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} {9462E3BD-67AD-4887-BF4C-8B6A25048941} = {E4F4B91E-CC25-410B-B53A-E2507EFA4FCB} {8F305004-8FB7-4F85-8063-3A7041DB840F} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} @@ -145,5 +154,6 @@ {28A3AAA0-0938-48CF-B66E-B056C0F865B9} = {4E42F296-7321-4193-9E35-9B7202005229} {F36370C3-E1EB-47E8-AFAC-F4840953D60B} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} {96664041-18B2-42BD-941F-117B54E2AE64} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} + {30873194-24C0-424F-A662-FD0A97223A56} = {A42A970E-FB5D-40F8-8F27-04434D792FCE} EndGlobalSection EndGlobal Property changes on: ACMServer/trunk/ACMServer/Plugins/HelperPlugins ___________________________________________________________________ Added: tsvn:logminsize + 5 Property changes on: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin ___________________________________________________________________ Added: svn:ignore + bin obj Added: tsvn:logminsize + 5 Property changes on: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties/AssemblyInfo.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties/AssemblyInfo.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/Properties/AssemblyInfo.cs 2009-02-14 01:29:23 UTC (rev 505) @@ -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("SampleGenerateResultPlugin")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("AcmContester")] +[assembly: AssemblyProduct("SampleGenerateResultPlugin")] +[assembly: AssemblyCopyright("Copyright © Home 2009")] +[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("c9eeb202-e3f0-41b7-9dfc-716c914570f8")] + +// 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")] Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.Designer.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.Designer.cs 2009-02-14 01:29:23 UTC (rev 505) @@ -0,0 +1,84 @@ +namespace AcmContester.Plugins.HelperPlugins.SampleGenerateResultPlugin +{ + partial class SampleGenerateResultControl + { + /// <summary> + /// Required designer variable. + /// </summary> + private System.ComponentModel.IContainer components = null; + + /// <summary> + /// Clean up any resources being used. + /// </summary> + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// <summary> + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// </summary> + private void InitializeComponent() + { + this.resultButton = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.queueSizeLabel = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // resultButton + // + this.resultButton.Location = new System.Drawing.Point(3, 27); + this.resultButton.Name = "resultButton"; + this.resultButton.Size = new System.Drawing.Size(75, 23); + this.resultButton.TabIndex = 0; + this.resultButton.Text = "Result"; + this.resultButton.UseVisualStyleBackColor = true; + this.resultButton.Click += new System.EventHandler(this.resultButton_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 11); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(52, 13); + this.label1.TabIndex = 1; + this.label1.Text = "In queue:"; + // + // queueSizeLabel + // + this.queueSizeLabel.AutoSize = true; + this.queueSizeLabel.Location = new System.Drawing.Point(61, 11); + this.queueSizeLabel.Name = "queueSizeLabel"; + this.queueSizeLabel.Size = new System.Drawing.Size(13, 13); + this.queueSizeLabel.TabIndex = 2; + this.queueSizeLabel.Text = "0"; + // + // SampleGenerateResultControl + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.queueSizeLabel); + this.Controls.Add(this.label1); + this.Controls.Add(this.resultButton); + this.Name = "SampleGenerateResultControl"; + this.Size = new System.Drawing.Size(439, 362); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button resultButton; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label queueSizeLabel; + } +} Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.cs 2009-02-14 01:29:23 UTC (rev 505) @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using AcmContester.Library.LibraryExtention.Data; +using System.Collections; + +namespace AcmContester.Plugins.HelperPlugins.SampleGenerateResultPlugin +{ + public partial class SampleGenerateResultControl : UserControl + { + SampleGenerateResultPlugin plugin; + public SampleGenerateResultControl() + { + InitializeComponent(); + resultButton.Enabled = false; + } + ArrayList list = new ArrayList(); + + + delegate void AddSubmitCallback(Submit submit); + public void AddSubmit(Submit submit) + { + if (this.InvokeRequired) + { + AddSubmitCallback d = new AddSubmitCallback(AddSubmit); + this.Invoke(d, new object[] { submit }); + } + else + { + lock(list) + list.Add(submit); + UpdateQueueLabelStatus(); + resultButton.Enabled = true; + } + } + + internal void SetPlugin(SampleGenerateResultPlugin sampleGenerateResultPlugin) + { + plugin = sampleGenerateResultPlugin; + } + + private void resultButton_Click(object sender, EventArgs e) + { + if (list.Count > 0) + { + Submit submit; + lock (list) + { + submit = (Submit)list[0]; + list.RemoveAt(0); + } + Result result = new Result(submit); + result.res = "Accepted"; + result.result = 1; + result.usedMemory = 0; + result.usedTime = 0; + result.compOutput = ""; + plugin.SendResult(result); + } + if (list.Count == 0) + resultButton.Enabled = false; + UpdateQueueLabelStatus(); + } + + private void UpdateQueueLabelStatus() + { + queueSizeLabel.Text = list.Count.ToString(); + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.resx =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.resx (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultControl.resx 2009-02-14 01:29:23 UTC (rev 505) @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root> \ No newline at end of file Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.cs (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.cs 2009-02-14 01:29:23 UTC (rev 505) @@ -0,0 +1,31 @@ +using System; +using AcmContester.Plugins.PluginsFramework; +using AcmContester.Library.LibraryExtention; +using AcmContester.Library.LibraryExtention.Data; + +namespace AcmContester.Plugins.HelperPlugins.SampleGenerateResultPlugin +{ + public class SampleGenerateResultPlugin : BaseMediatorPlugin + { + public SampleGenerateResultPlugin() + { + base.Control = new SampleGenerateResultControl(); + ((SampleGenerateResultControl)base.Control).SetPlugin(this); + } + public override void Send(SystemMessage message) + { + if (message.IsType("TestingSubmitList") == true) + { + SubmitList submitList = SubmitList.CreateFromXml(message.Message); + for (int index = 0; index < submitList.SubmitItems.Length; index++) + ((SampleGenerateResultControl)base.Control).AddSubmit(submitList.SubmitItems[index]); + } + } + + internal void SendResult(Result result) + { + SystemMessage message = new SystemMessage(result.ToStringX(), "TestingResult"); + base.DataArrived(message); + } + } +} Added: ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.csproj =================================================================== --- ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.csproj (rev 0) +++ ACMServer/trunk/ACMServer/Plugins/HelperPlugins/SampleGenerateResultPlugin/SampleGenerateResultPlugin.csproj 2009-02-14 01:29:23 UTC (rev 505) @@ -0,0 +1,75 @@ +<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>{30873194-24C0-424F-A662-FD0A97223A56}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AcmContester.Plugins.HelperPlugins.SampleGenerateResultPlugin</RootNamespace> + <AssemblyName>SampleGenerateResultPlugin</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.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="SampleGenerateResultControl.cs"> + <SubType>UserControl</SubType> + </Compile> + <Compile Include="SampleGenerateResultControl.Designer.cs"> + <DependentUpon>SampleGenerateResultControl.cs</DependentUpon> + </Compile> + <Compile Include="SampleGenerateResultPlugin.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\..\Library\Data\Data.csproj"> + <Project>{30C0EFA3-36A8-4C6F-8FEC-28F771D4933F}</Project> + <Name>Data</Name> + </ProjectReference> + <ProjectReference Include="..\..\..\Library\LibraryExtention\LibraryExtention.csproj"> + <Project>{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}</Project> + <Name>LibraryExtention</Name> + </ProjectReference> + <ProjectReference Include="..\..\PluginsFramework\PluginsFramework.csproj"> + <Project>{69FB4176-F298-4AF7-B714-B6758AA9A58E}</Project> + <Name>PluginsFramework</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <EmbeddedResource Include="SampleGenerateResultControl.resx"> + <SubType>Designer</SubType> + <DependentUpon>SampleGenerateResultControl.cs</DependentUpon> + </EmbeddedResource> + </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 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-14 01:24:53
|
Revision: 504 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=504&view=rev Author: brus07 Date: 2009-02-14 01:24:48 +0000 (Sat, 14 Feb 2009) Log Message: ----------- Bug fixed Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs Modified: ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs 2009-02-13 23:14:18 UTC (rev 503) +++ ACMServer/trunk/ACMServer/Plugins/MediatorPlugins/WebGatePlugin/WebGetter.cs 2009-02-14 01:24:48 UTC (rev 504) @@ -61,7 +61,7 @@ { if (message.IsType("TestingResult") == true) { - Send(message); + getter.Send(message); Result result = Result.CreateFromXml(message.Message); container.Return(result); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-13 23:14:23
|
Revision: 503 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=503&view=rev Author: brus07 Date: 2009-02-13 23:14:18 +0000 (Fri, 13 Feb 2009) Log Message: ----------- Added mew concrete web connector. ExtendedWebConnector for connector to website with authorization. (now this is copy of SampleWebConnector) Modified Paths: -------------- ACMServer/trunk/ACMServer/ACMMediator.sln Added Paths: ----------- ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/ ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/ExtendedWebConnector.csproj ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties/ ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties/AssemblyInfo.cs ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/SampleWebConnector.cs Modified: ACMServer/trunk/ACMServer/ACMMediator.sln =================================================================== --- ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-12 16:55:36 UTC (rev 502) +++ ACMServer/trunk/ACMServer/ACMMediator.sln 2009-02-13 23:14:18 UTC (rev 503) @@ -45,6 +45,8 @@ EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IoiSubmitGuiPlugin", "Plugins\IoiPlugin\IoiSubmitGuiPlugin\IoiSubmitGuiPlugin.csproj", "{96664041-18B2-42BD-941F-117B54E2AE64}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExtendedWebConnector", "Library\ConcreteConnector\ExtendedWebConnector\ExtendedWebConnector.csproj", "{28A3AAA0-0938-48CF-B66E-B056C0F865B9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -115,6 +117,10 @@ {96664041-18B2-42BD-941F-117B54E2AE64}.Debug|Any CPU.Build.0 = Debug|Any CPU {96664041-18B2-42BD-941F-117B54E2AE64}.Release|Any CPU.ActiveCfg = Release|Any CPU {96664041-18B2-42BD-941F-117B54E2AE64}.Release|Any CPU.Build.0 = Release|Any CPU + {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Debug|Any CPU.Build.0 = Debug|Any CPU + {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Release|Any CPU.ActiveCfg = Release|Any CPU + {28A3AAA0-0938-48CF-B66E-B056C0F865B9}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -136,6 +142,7 @@ {79EB24DD-AF0D-40D0-974E-198F4D8C92BC} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {E255910C-499D-48E2-9846-7EB24DE32C4A} = {D67E1C70-DFE6-4C3E-BCA9-DD3DB9CB4B30} {45B4D72E-CD81-42A7-AD46-3471380A290F} = {4E42F296-7321-4193-9E35-9B7202005229} + {28A3AAA0-0938-48CF-B66E-B056C0F865B9} = {4E42F296-7321-4193-9E35-9B7202005229} {F36370C3-E1EB-47E8-AFAC-F4840953D60B} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} {96664041-18B2-42BD-941F-117B54E2AE64} = {4BEB97A7-7AAB-42A3-B30A-B6CCF75AAD64} EndGlobalSection Property changes on: ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector ___________________________________________________________________ Added: svn:ignore + bin obj ExtendedWebConnector.csproj.user Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/ExtendedWebConnector.csproj =================================================================== --- ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/ExtendedWebConnector.csproj (rev 0) +++ ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/ExtendedWebConnector.csproj 2009-02-13 23:14:18 UTC (rev 503) @@ -0,0 +1,61 @@ +<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>{28A3AAA0-0938-48CF-B66E-B056C0F865B9}</ProjectGuid> + <OutputType>Library</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>AcmContester.Library.ConcreateConnector.SampleWebConnector</RootNamespace> + <AssemblyName>SampleWebConnector</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="Properties\AssemblyInfo.cs" /> + <Compile Include="SampleWebConnector.cs" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\..\Connector\Connector.csproj"> + <Project>{211DD6A5-2D73-439E-8722-ED2C89ED1DDB}</Project> + <Name>Connector</Name> + </ProjectReference> + <ProjectReference Include="..\..\Data\Data.csproj"> + <Project>{30C0EFA3-36A8-4C6F-8FEC-28F771D4933F}</Project> + <Name>Data</Name> + </ProjectReference> + <ProjectReference Include="..\..\LibraryExtention\LibraryExtention.csproj"> + <Project>{A8135069-F8BA-4E5D-835F-3FF3F350AA5D}</Project> + <Name>LibraryExtention</Name> + </ProjectReference> + </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 Property changes on: ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties/AssemblyInfo.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties/AssemblyInfo.cs (rev 0) +++ ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/Properties/AssemblyInfo.cs 2009-02-13 23:14:18 UTC (rev 503) @@ -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("ExtendedWebConnector")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("AcmContester")] +[assembly: AssemblyProduct("ExtendedWebConnector")] +[assembly: AssemblyCopyright("Copyright © Home 2009")] +[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("1f472191-9057-4161-bcb1-d5c0000fc10d")] + +// 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")] Added: ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/SampleWebConnector.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/SampleWebConnector.cs (rev 0) +++ ACMServer/trunk/ACMServer/Library/ConcreteConnector/ExtendedWebConnector/SampleWebConnector.cs 2009-02-13 23:14:18 UTC (rev 503) @@ -0,0 +1,98 @@ +using System; +using AcmContester.Library.Connector.Getter; +using AcmContester.Library.LibraryExtention; +using AcmContester.Library.LibraryExtention.Data; +using System.Net; +using System.IO; + +namespace AcmContester.Library.ConcreateConnector.SampleWebConnector +{ + public class SampleWebConnector : IGetter + { + //"http://127.0.0.1/d"; + string fullPathToWebPages = ""; + + #region IGetter Members + + public string PathToSource + { + get + { + return fullPathToWebPages; + } + set + { + fullPathToWebPages = value; + } + } + + public SystemMessage GetData() + { + return new SystemMessage(GetFullInfoFromSite()); + } + + public void Send(SystemMessage message) + { + if (message.IsType("TestingResult") == true) + { + SendTestingResultToSite(message.Message); + } + } + + #endregion + + + void SendTestingResultToSite(string message) + { + string res = ""; + string id = ""; + string usedMemory = ""; + string usedTime = ""; + + //TODO: + Result result = Result.CreateFromXml(message); + res = result.res; + id = result.Submit.id.ToString(); + usedMemory = result.usedMemory.ToString(); + usedTime = result.usedTime.ToString(); + + string fullURL = fullPathToWebPages + "/set.php?"; + fullURL += "res=" + res; + fullURL += "&id=" + id; + fullURL += "&usedMemory=" + usedMemory; + fullURL += "&usedTime=" + usedTime; + HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(fullURL); + myRequest.Method = "GET"; + WebResponse myResponse = myRequest.GetResponse(); + myResponse.Close(); + } + + + + string GetFullInfoFromSite() + { + string result = null; + try + { + HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(fullPathToWebPages + "/get.php"); + myRequest.Method = "GET"; + //myRequest.Timeout = 100000; + WebResponse myResponse = myRequest.GetResponse(); + StreamReader sr = new StreamReader(myResponse.GetResponseStream(), System.Text.Encoding.UTF8); + result = sr.ReadToEnd(); + sr.Close(); + myResponse.Close(); + if (result.Length == 0) + return null; + } + catch (WebException wex) + { + if (wex.Status == WebExceptionStatus.Timeout) + { + return "SystemResult: Timeout"; + } + } + return result; + } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-02-12 16:55:39
|
Revision: 502 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=502&view=rev Author: panzaboi Date: 2009-02-12 16:55:36 +0000 (Thu, 12 Feb 2009) Log Message: ----------- Arhive View Added Paths: ----------- website/application/modules/acm/views/scripts/archive/ website/application/modules/acm/views/scripts/archive/entry.phtml website/application/modules/acm/views/scripts/archive/index.phtml website/application/modules/acm/views/scripts/archive/result.phtml website/application/modules/acm/views/scripts/archive/results.phtml website/application/modules/acm/views/scripts/archive/source.phtml website/application/modules/acm/views/scripts/archive/submit.phtml website/application/modules/acm/views/scripts/archive/view.phtml Property changes on: website/application/modules/acm/views/scripts/archive ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: website/application/modules/acm/views/scripts/archive/entry.phtml =================================================================== --- website/application/modules/acm/views/scripts/archive/entry.phtml (rev 0) +++ website/application/modules/acm/views/scripts/archive/entry.phtml 2009-02-12 16:55:36 UTC (rev 502) @@ -0,0 +1,10 @@ +<tr class="tc"> + <td width="10%"><a href="<?= $this->url( array('action' => 'view', 'id' => $this->id), null) ?>"><?= $this->id ?></a></td> + <td width="60%" class="tl"><a href="<?= $this->url( array('action' => 'view', 'id' => $this->id), null) ?>"><?= $this->name ?></a></td> + <td width="10%"><?= $this->tries ?></td> + <td width="10%"><?= $this->accepts ?></td> + <td width="10%"> + <a href="<?= $this->url( array('action' => 'submit', 'id' => $this->id), null) ?>"><img height="20" width="20" alt="<?= $this->translate('submit_solution') ?>" src="images/acm/submit.png"/></a> + <a href="<?= $this->url( array('action' => 'status', 'id' => $this->id), null) ?>"><img height="20" width="20" alt="<?= $this->translate('solution_status') ?>" src="images/acm/status.png"/> + </td> +</tr> Added: website/application/modules/acm/views/scripts/archive/index.phtml =================================================================== --- website/application/modules/acm/views/scripts/archive/index.phtml (rev 0) +++ website/application/modules/acm/views/scripts/archive/index.phtml 2009-02-12 16:55:36 UTC (rev 502) @@ -0,0 +1,21 @@ +<h2><?= $this->translate('problem_set') ?></h2> +<br /> +<table class="table"> + <tr> + <th><?= $this->translate('problem') ?></th> + <th><?= $this->translate('name') ?></th> + <th><?= $this->translate('tries') ?></th> + <th><?= $this->translate('accepts') ?></th> + <th><?= $this->translate('actions') ?></th> + </tr> + <? if (count($this->challenges)): ?> + <?= $this->partialLoop('archive/entry.phtml', $this->challenges) ?> + <? else: ?> + <tr> + <td colspan="5" class="tc error"><?= $this->translate('no_problems') ?></td> + </tr> + <? endif; ?> + <tr> + <td colspan="5" class="footer tc"><?= $this->challenges ?></td> + </tr> +</table> Added: website/application/modules/acm/views/scripts/archive/result.phtml =================================================================== --- website/application/modules/acm/views/scripts/archive/result.phtml (rev 0) +++ website/application/modules/acm/views/scripts/archive/result.phtml 2009-02-12 16:55:36 UTC (rev 502) @@ -0,0 +1,10 @@ +<tr class="tc"> + <td><a href="<?= $this->url( array('controller' => 'archive','action' => 'source', 'id' => $this->id), null) ?>"><?= $this->id ?></a></td> + <td><?= $this->date($this->when) ?></td> + <td><a href="<?= $this->url( array('controller' => 'user','action' => 'view', 'username' => $this->username), null) ?>"><?= $this->username ?></a></td> + <td><a href="<?= $this->url( array('action' => 'view', 'id' => $this->challengeid), null) ?>"><?= $this->challengeid ?></a></td> + <td><?= $this->codelang ?></td> + <td><?= $this->state($this->state) ?></td> + <td><?= ($this->tests == 0 ? '-' : $this->tests) ?></td> + <td><?= ($this->runtime == 0 ? '-' : $this->runtime) ?>/<?= ($this->memory == 0 ? '-' : $this->memory) ?></td> +</tr> \ No newline at end of file Added: website/application/modules/acm/views/scripts/archive/results.phtml =================================================================== --- website/application/modules/acm/views/scripts/archive/results.phtml (rev 0) +++ website/application/modules/acm/views/scripts/archive/results.phtml 2009-02-12 16:55:36 UTC (rev 502) @@ -0,0 +1,24 @@ +<h2><?= $this->translate('results') ?></h2> +<br /> +<table class="table"> + <tr> + <th>ID</th> + <th><?= $this->translate('date') ?></th> + <th><?= $this->translate('username') ?></th> + <th><?= $this->translate('problem') ?></th> + <th><?= $this->translate('language') ?></th> + <th><?= $this->translate('state') ?></th> + <th><?= $this->translate('tests') ?></th> + <th><?= $this->translate('runtime') ?></th> + </tr> + <? if (count($this->submits)): ?> + <?= $this->partialLoop('archive/result.phtml', $this->submits) ?> + <? else: ?> + <tr> + <td colspan="8" class="tc error"><?= $this->translate('no_results') ?></td> + </tr> + <? endif; ?> + <tr> + <td colspan="8" class="footer tc"><?= $this->submits ?></td> + </tr> +</table> \ No newline at end of file Added: website/application/modules/acm/views/scripts/archive/source.phtml =================================================================== --- website/application/modules/acm/views/scripts/archive/source.phtml (rev 0) +++ website/application/modules/acm/views/scripts/archive/source.phtml 2009-02-12 16:55:36 UTC (rev 502) @@ -0,0 +1,2 @@ +<a href="<?= $this->url( array('controller' => 'archive','action' => 'results'), null) ?>">Назад</a><br /><br /> +<code class="prettyprint"><?= htmlspecialchars(file_get_contents(Application::getDocRoot().'/other/submits/'.$this->id)) ?></code> \ No newline at end of file Added: website/application/modules/acm/views/scripts/archive/submit.phtml =================================================================== --- website/application/modules/acm/views/scripts/archive/submit.phtml (rev 0) +++ website/application/modules/acm/views/scripts/archive/submit.phtml 2009-02-12 16:55:36 UTC (rev 502) @@ -0,0 +1,2 @@ +<h2><?= $this->translate('submit_solution') ?></h2> +<?= $this->form ?> \ No newline at end of file Added: website/application/modules/acm/views/scripts/archive/view.phtml =================================================================== --- website/application/modules/acm/views/scripts/archive/view.phtml (rev 0) +++ website/application/modules/acm/views/scripts/archive/view.phtml 2009-02-12 16:55:36 UTC (rev 502) @@ -0,0 +1,13 @@ +<h2 align="center"><?= $this->id.' - '.$this->name ?></h2> +<br /> +<div class="tc"> + <?= $this->translate('timelimit') ?>: <?= $this->measure("Time", $this->timelimit, Zend_Measure_Time::MILLISECOND, Zend_Measure_Time::SECOND, 1, true ) ?> <?= $this->translate('seconds') ?><br /> + <?= $this->translate('memorylimit') ?>: <?= $this->measure("Binary", $this->memorylimit, Zend_Measure_Binary::BYTE, Zend_Measure_Binary::KILOBYTE ) ?><br /> + <?= $this->translate('outputlimit') ?>: <?= $this->measure("Binary", $this->outputlimit, Zend_Measure_Binary::BYTE, Zend_Measure_Binary::KILOBYTE ) ?><br /> +</div> +<br /> +<p><?= $this->description ?></p> + +<div> + <a href="<?= $this->url(array('action' => 'submit', 'id' => $this->id), null) ?>"><?= $this->translate('submit_solution') ?></a> +</div> \ 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-02-12 16:40:47
|
Revision: 501 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=501&view=rev Author: panzaboi Date: 2009-02-12 16:40:45 +0000 (Thu, 12 Feb 2009) Log Message: ----------- Deleted Submits Removed Paths: ------------- website/other/submits/3 website/other/submits/4 website/other/submits/5 website/other/submits/6 website/other/submits/7 website/other/submits/8 website/other/submits/9 Deleted: website/other/submits/3 =================================================================== --- website/other/submits/3 2009-02-12 16:39:50 UTC (rev 500) +++ website/other/submits/3 2009-02-12 16:40:45 UTC (rev 501) @@ -1,33 +0,0 @@ -#include "fuel.h" -#include <algorithm> - -void saveHighest(vector<Fuel>& v) -{ - Fuel::FUELTYPE current = Fuel::FUELTYPE::LOW; - fstream f("out.txt"); - - f << *(v.begin()) << endl; - - for (vector<Fuel>::iterator i = v.begin(); i != v.end(); i++) - { - if ((*i).getType() != current) - { - current = (*i).getType(); - f << (*i) << endl; - } - } -} - -int main() -{ - vector<Fuel> v; - fstream f("in.txt"); - - f >> v; - - sort(v.begin(), v.end()); - - saveHighest(v); - - return 0; -} \ No newline at end of file Deleted: website/other/submits/4 =================================================================== --- website/other/submits/4 2009-02-12 16:39:50 UTC (rev 500) +++ website/other/submits/4 2009-02-12 16:40:45 UTC (rev 501) @@ -1,99 +0,0 @@ -0 92 6.00 50 -0 95 6.30 60 -0 98 6.50 30 - -1 92 6.00 30 -1 95 6.30 20 -1 98 6.50 50 - -2 92 6.00 70 -2 95 6.30 80 -2 98 6.50 20 - -3 92 6.00 10 -3 95 6.30 90 -3 98 6.50 60 - -4 92 6.00 40 -4 95 6.30 10 -4 98 6.50 30 - -5 92 6.00 50 -5 95 6.30 90 -5 98 6.50 10 - -6 92 6.00 60 -6 95 6.30 10 -6 98 6.50 40 - -7 92 6.00 20 -7 95 6.30 30 -7 98 6.50 45 - -8 92 6.00 50 -8 95 6.30 60 -8 98 6.50 30 - -9 92 6.00 30 -9 95 6.30 20 -9 98 6.50 50 - -10 92 6.00 70 -10 95 6.30 80 -10 98 6.50 20 - -11 92 6.00 10 -11 95 6.30 90 -11 98 6.50 60 - -12 92 6.00 40 -12 95 6.30 10 -12 98 6.50 30 - -13 92 6.00 50 -13 95 6.30 90 -13 98 6.50 10 - -14 92 6.00 60 -14 95 6.30 10 -14 98 6.50 40 - -15 92 6.00 20 -15 95 6.30 30 -15 98 6.50 45 - -16 92 6.00 20 -16 95 6.30 30 -16 98 6.50 45 - -17 92 6.00 50 -17 95 6.30 60 -17 98 6.50 30 - -18 92 6.00 30 -18 95 6.30 20 -18 98 6.50 50 - -19 92 6.00 70 -19 95 6.30 80 -19 98 6.50 20 - -20 92 6.00 10 -20 95 6.30 90 -20 98 6.50 60 - -21 92 6.00 40 -21 95 6.30 10 -21 98 6.50 30 - -22 92 6.00 50 -22 95 6.30 90 -22 98 6.50 10 - -23 92 6.00 60 -23 95 6.30 10 -23 98 6.50 40 - -24 92 6.00 20 -24 95 6.30 30 -24 98 6.50 45 \ No newline at end of file Deleted: website/other/submits/5 =================================================================== --- website/other/submits/5 2009-02-12 16:39:50 UTC (rev 500) +++ website/other/submits/5 2009-02-12 16:40:45 UTC (rev 501) @@ -1,99 +0,0 @@ -0 92 6.00 50 -0 95 6.30 60 -0 98 6.50 30 - -1 92 6.00 30 -1 95 6.30 20 -1 98 6.50 50 - -2 92 6.00 70 -2 95 6.30 80 -2 98 6.50 20 - -3 92 6.00 10 -3 95 6.30 90 -3 98 6.50 60 - -4 92 6.00 40 -4 95 6.30 10 -4 98 6.50 30 - -5 92 6.00 50 -5 95 6.30 90 -5 98 6.50 10 - -6 92 6.00 60 -6 95 6.30 10 -6 98 6.50 40 - -7 92 6.00 20 -7 95 6.30 30 -7 98 6.50 45 - -8 92 6.00 50 -8 95 6.30 60 -8 98 6.50 30 - -9 92 6.00 30 -9 95 6.30 20 -9 98 6.50 50 - -10 92 6.00 70 -10 95 6.30 80 -10 98 6.50 20 - -11 92 6.00 10 -11 95 6.30 90 -11 98 6.50 60 - -12 92 6.00 40 -12 95 6.30 10 -12 98 6.50 30 - -13 92 6.00 50 -13 95 6.30 90 -13 98 6.50 10 - -14 92 6.00 60 -14 95 6.30 10 -14 98 6.50 40 - -15 92 6.00 20 -15 95 6.30 30 -15 98 6.50 45 - -16 92 6.00 20 -16 95 6.30 30 -16 98 6.50 45 - -17 92 6.00 50 -17 95 6.30 60 -17 98 6.50 30 - -18 92 6.00 30 -18 95 6.30 20 -18 98 6.50 50 - -19 92 6.00 70 -19 95 6.30 80 -19 98 6.50 20 - -20 92 6.00 10 -20 95 6.30 90 -20 98 6.50 60 - -21 92 6.00 40 -21 95 6.30 10 -21 98 6.50 30 - -22 92 6.00 50 -22 95 6.30 90 -22 98 6.50 10 - -23 92 6.00 60 -23 95 6.30 10 -23 98 6.50 40 - -24 92 6.00 20 -24 95 6.30 30 -24 98 6.50 45 \ No newline at end of file Deleted: website/other/submits/6 =================================================================== --- website/other/submits/6 2009-02-12 16:39:50 UTC (rev 500) +++ website/other/submits/6 2009-02-12 16:40:45 UTC (rev 501) @@ -1,33 +0,0 @@ -#include "fuel.h" -#include <algorithm> - -void saveHighest(vector<Fuel>& v) -{ - Fuel::FUELTYPE current = Fuel::FUELTYPE::LOW; - fstream f("out.txt"); - - f << *(v.begin()) << endl; - - for (vector<Fuel>::iterator i = v.begin(); i != v.end(); i++) - { - if ((*i).getType() != current) - { - current = (*i).getType(); - f << (*i) << endl; - } - } -} - -int main() -{ - vector<Fuel> v; - fstream f("in.txt"); - - f >> v; - - sort(v.begin(), v.end()); - - saveHighest(v); - - return 0; -} \ No newline at end of file Deleted: website/other/submits/7 =================================================================== --- website/other/submits/7 2009-02-12 16:39:50 UTC (rev 500) +++ website/other/submits/7 2009-02-12 16:40:45 UTC (rev 501) @@ -1,33 +0,0 @@ -#include "fuel.h" -#include <algorithm> - -void saveHighest(vector<Fuel>& v) -{ - Fuel::FUELTYPE current = Fuel::FUELTYPE::LOW; - fstream f("out.txt"); - - f << *(v.begin()) << endl; - - for (vector<Fuel>::iterator i = v.begin(); i != v.end(); i++) - { - if ((*i).getType() != current) - { - current = (*i).getType(); - f << (*i) << endl; - } - } -} - -int main() -{ - vector<Fuel> v; - fstream f("in.txt"); - - f >> v; - - sort(v.begin(), v.end()); - - saveHighest(v); - - return 0; -} \ No newline at end of file Deleted: website/other/submits/8 =================================================================== --- website/other/submits/8 2009-02-12 16:39:50 UTC (rev 500) +++ website/other/submits/8 2009-02-12 16:40:45 UTC (rev 501) @@ -1,33 +0,0 @@ -#include "fuel.h" -#include <algorithm> - -void saveHighest(vector<Fuel>& v) -{ - Fuel::FUELTYPE current = Fuel::FUELTYPE::LOW; - fstream f("out.txt"); - - f << *(v.begin()) << endl; - - for (vector<Fuel>::iterator i = v.begin(); i != v.end(); i++) - { - if ((*i).getType() != current) - { - current = (*i).getType(); - f << (*i) << endl; - } - } -} - -int main() -{ - vector<Fuel> v; - fstream f("in.txt"); - - f >> v; - - sort(v.begin(), v.end()); - - saveHighest(v); - - return 0; -} \ No newline at end of file Deleted: website/other/submits/9 =================================================================== --- website/other/submits/9 2009-02-12 16:39:50 UTC (rev 500) +++ website/other/submits/9 2009-02-12 16:40:45 UTC (rev 501) @@ -1,33 +0,0 @@ -#include "fuel.h" -#include <algorithm> - -void saveHighest(vector<Fuel>& v) -{ - Fuel::FUELTYPE current = Fuel::FUELTYPE::LOW; - fstream f("out.txt"); - - f << *(v.begin()) << endl; - - for (vector<Fuel>::iterator i = v.begin(); i != v.end(); i++) - { - if ((*i).getType() != current) - { - current = (*i).getType(); - f << (*i) << endl; - } - } -} - -int main() -{ - vector<Fuel> v; - fstream f("in.txt"); - - f >> v; - - sort(v.begin(), v.end()); - - saveHighest(v); - - return 0; -} \ 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-02-12 16:39:59
|
Revision: 500 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=500&view=rev Author: panzaboi Date: 2009-02-12 16:39:50 +0000 (Thu, 12 Feb 2009) Log Message: ----------- New Layout Added Paths: ----------- website/application/modules/admin/layouts/ website/application/modules/admin/layouts/layout.phtml Property changes on: website/application/modules/admin/layouts ___________________________________________________________________ Added: tsvn:logminsize + 5 Added: website/application/modules/admin/layouts/layout.phtml =================================================================== --- website/application/modules/admin/layouts/layout.phtml (rev 0) +++ website/application/modules/admin/layouts/layout.phtml 2009-02-12 16:39:50 UTC (rev 500) @@ -0,0 +1,135 @@ +<?php +$loggedin = Zend_Auth::getInstance()->getIdentity(); + +if ($loggedin) +{ + $form = $this->partial('logedin.phtml'); +} +elseif (!$this->dojo()->hasDijit('loginform')) +{ + //$form = (new Form_SmallLogin()); + //$form = $form->render(); +} +else $form = ''; +?> + +<?= $this->doctype() ?> +<? $this->dojo()->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"> + <head> + <meta name="description" content="Site description" /> + <meta name="keywords" content="key, words" /> + + <?= $this->headTitle($this->placeholder('title')->toString()) ?> + <?= $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/prettify.js') ?> + + <? + if ($this->dojo()->isEnabled()): + $this->dojo()->setLocalPath('/scripts/dojo/dojo.js') + ->addStyleSheetModule('dijit.themes.tundra'); + + echo $this->dojo(); + endif; + ?> + + <base href="<?= 'http://' . $_SERVER["HTTP_HOST"] . $this->baseUrl() ?>/" /> +</head> + +<body class="tundra"> + <div id="wrapper"> + <div id="header"> + <a href="<?= $this->url(array('module' => 'acm'), null, true) ?>"><img src="images/logo.png" id="logo" /></a> + + <div id="topmenu"> + <ul> + <li><a href="#" class="current">home</a></li> + <li><a href="#">news</a></li> + <li><a href="#">forum</a></li> + <li><a href="#">links</a></li> + <li><a href="#">search</a></li> + <li><a href="#">contacts</a></li> + </ul> + </div> + </div> + + <div id="container"> + <div id="right"> + <div id="content"> + <?= ($this->placeholder('message') ? $this->placeholder('message') : '') ?> + <?= $this->layout()->content ?> + </div> + </div> + + <div id="left"> + <ul id="nav"> + <li> + <a href="#" onclick="return toggle('sub1');">Архів</a> + <ul id="sub1"> + <li><a href="<?= $this->url(array('module' => 'acm', 'controller' => 'archive'), null, true) ?>">Набір Завдань</a></li> + <li><a href="<?= $this->url(array('module' => 'acm', 'controller' => 'archive', 'action' => 'results'), null, true) ?>">Результати</a></li> + </ul> + </li> + <li> + <a href="#Archieve" onclick="return toggle('sub2');">Контести</a> + <ul id="sub2"> + <li><a href="<?= $this->url(array('module' => 'acm', 'controller' => 'contest', 'action' => 'index'), null, true) ?>">Зареєструватись</a></li> + <li><a href="#Problems">Набір Завдань</a></li> + <li><a href="#Results">Результати</a></li> + </ul> + </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> + </ul> + + <!--<div class="box2 c"> + <form name="login" action="" method="post" class="form"> + <div class="line"> + <label for="username" class="label">Username:</label> + <input class="text" type="text" name="username" title="Username" value="" tabindex="1" /> + </div> + <div class="line"> + <label for="password" class="label">Password:</label> + <input class="text" type="password" name="password" title="Password" value="" tabindex="2" /> + + <input class="submit2" type="submit" name="submit" value=">" tabindex="3" /> + </div> + </form> + </div>--> + + <?= $form ?> + + <!--<div id="clear"></div>--> + </div> + </div> + + <div id="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> + <br /> + <!--<?= $this->debugInfo(true) ?>--> + </p> + </div> +</body> +</html> \ 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-02-12 16:36:58
|
Revision: 499 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=499&view=rev Author: panzaboi Date: 2009-02-12 16:36:55 +0000 (Thu, 12 Feb 2009) Log Message: ----------- New Configuration Modified Paths: -------------- website/config/config.ini website/library/Application.php Modified: website/config/config.ini =================================================================== --- website/config/config.ini 2009-02-12 16:27:14 UTC (rev 498) +++ website/config/config.ini 2009-02-12 16:36:55 UTC (rev 499) @@ -70,6 +70,8 @@ general.extention = "html" general.roleid = "2" +front.defaultmodule = "default" + paginator.file = "paginator.phtml" paginator.style = "Sliding" Modified: website/library/Application.php =================================================================== --- website/library/Application.php 2009-02-12 16:27:14 UTC (rev 498) +++ website/library/Application.php 2009-02-12 16:36:55 UTC (rev 499) @@ -171,6 +171,7 @@ $frontController->setModuleControllerDirectoryName('controllers'); $frontController->addModuleDirectory(self::$_docroot . '/application/modules/'); $frontController->setRequest('Ostacium_Controller_Request_Http'); + $frontController->setDefaultModule($_config->front->defaultmodule); // Setup Authorication $acl = $this->_setupAuth(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <pan...@us...> - 2009-02-12 16:27:18
|
Revision: 498 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=498&view=rev Author: panzaboi Date: 2009-02-12 16:27:14 +0000 (Thu, 12 Feb 2009) Log Message: ----------- Updated .htaccess Modified Paths: -------------- website/httpdocs/.htaccess Modified: website/httpdocs/.htaccess =================================================================== --- website/httpdocs/.htaccess 2009-02-07 06:48:33 UTC (rev 497) +++ website/httpdocs/.htaccess 2009-02-12 16:27:14 UTC (rev 498) @@ -1,7 +1,6 @@ -RewriteEngine on - -RewriteCond %{REQUEST_FILENAME} !-s -RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule .* index.php [L] - -DirectoryIndex index.php +RewriteEngine On +RewriteCond %{REQUEST_FILENAME} -s [OR] +RewriteCond %{REQUEST_FILENAME} -l [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^.*$ - [NC,L] +RewriteRule ^.*$ /index.php [NC,L] \ 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-02-07 06:48:37
|
Revision: 497 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=497&view=rev Author: brus07 Date: 2009-02-07 06:48:33 +0000 (Sat, 07 Feb 2009) Log Message: ----------- Added highlight to outputs in html results. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-06 21:50:04 UTC (rev 496) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-07 06:48:33 UTC (rev 497) @@ -26,6 +26,33 @@ return id.ToString(); } + private string[] HighlightDifference(string rightOutput, string wrongOutput) + { + const string leftTag = "<font color=\"#0000ff\"><b>"; + const string rightTag = "</b></font>"; + int i; + for (i = 0; i < rightOutput.Length && i < wrongOutput.Length; ++i) + { + if (rightOutput[i] != wrongOutput[i]) + { + break; + } + } + if (i < rightOutput.Length) + { + rightOutput = rightOutput.Insert(i, leftTag) + rightTag; + } + if (i < wrongOutput.Length) + { + wrongOutput = wrongOutput.Insert(i, leftTag) + rightTag; + } + return new string[] + { + rightOutput, + wrongOutput + }; + } + public override void Send(SystemMessage message) { if (message.IsType("TestingResultIoi") == true) @@ -107,10 +134,15 @@ int n = result.testResults.Length; for (int i = 0; i < n; i++) { + string outAuthor = result.testResults[i].output; + string contestantOutput = result.testResults[i].contestantOutput; + string[] outs = HighlightDifference(outAuthor, contestantOutput); + outAuthor = outs[0]; + contestantOutput = outs[1]; data[i, 0] = "<a href=\"#\" onclick=\"return flipBox('show" + i.ToString() + "')\">" + i.ToString() + "</a>"; data[i, 1] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_0\">\n<pre>" + result.testResults[i].input + "</pre></div>"; - data[i, 2] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_1\">\n<pre>" + result.testResults[i].output + "</pre></div>"; - data[i, 3] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_2\">\n<pre>" + result.testResults[i].contestantOutput + "</pre></div>"; + data[i, 2] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_1\">\n<pre>" + outAuthor + "</pre></div>"; + data[i, 3] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_2\">\n<pre>" + contestantOutput + "</pre></div>"; data[i, 4] = result.testResults[i].usedTime.ToString(); data[i, 5] = result.testResults[i].usedMemory.ToString(); data[i, 6] = result.testResults[i].res; @@ -137,7 +169,7 @@ w.Write(h.Result); w.Close(); StreamWriter dat = File.CreateText(dir + "\\data" + result.Submit.submit.pbolemID.ToString() + ".dat"); - dat.WriteLine(result.Submit.name + ";" + result.Submit.form + ";"+result.Submit.submit.pbolemID.ToString()+";" + ((result.testResults == null) ? "0;CE" : myPoints.ToString() + ";" + allPoints.ToString())); + dat.WriteLine(result.Submit.name + ";" + result.Submit.form + ";" + result.Submit.school + ";" + result.Submit.submit.pbolemID.ToString() + ";" + ((result.testResults == null) ? "0;CE" : myPoints.ToString() + ";" + allPoints.ToString())); dat.Close(); } //Uri url=new Uri(result.Submit.submit.id.ToString() + ".html"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-06 22:01:37
|
Revision: 496 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=496&view=rev Author: brus07 Date: 2009-02-06 21:50:04 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Bug fix: Added School to Submit information. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-06 21:05:57 UTC (rev 495) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-06 21:50:04 UTC (rev 496) @@ -43,7 +43,8 @@ int lang = Int32.Parse(languageTextBox.Text); int problem = Int32.Parse(problemTextBox.Text); string soucreCode = sourceTextBox.Text; - plugin.SendSubmit(contestantName, form, soucreCode, lang, problem); + string school = schoolTextBox.Text; + plugin.SendSubmit(contestantName, form, school, soucreCode, lang, problem); } public void AddText(string type, string text) Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs 2009-02-06 21:05:57 UTC (rev 495) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiPlugin.cs 2009-02-06 21:50:04 UTC (rev 496) @@ -25,11 +25,12 @@ } } - internal void SendSubmit(string contestantName, int form, string soucreCode, int lang, int problem) + internal void SendSubmit(string contestantName, int form, string school, string soucreCode, int lang, int problem) { SubmitIoi submit = new SubmitIoi(); submit.name = contestantName; submit.form = form; + submit.school = school; submit.submit = new Submit(); submit.submit.id = Guid.NewGuid().GetHashCode(); if (submit.submit.id < 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-06 21:06:04
|
Revision: 495 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=495&view=rev Author: brus07 Date: 2009-02-06 21:05:57 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Added "School" to SubmitIoi and to forms and to results. Change ProblemTextBox in SubmitIoiPlugins to numeric. (HardCode). Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs ACMServer/trunk/ACMServer/Library/testData/data.xsd ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs Modified: ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Library/Data/SubmitIoi.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -13,6 +13,8 @@ public string name; [XmlElement("form", typeof(int))] public int form; + [XmlElement("school", typeof(string))] + public string school; public SubmitIoi() { Modified: ACMServer/trunk/ACMServer/Library/testData/data.xsd =================================================================== --- ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-06 21:05:57 UTC (rev 495) @@ -21,6 +21,7 @@ <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"> Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -32,24 +32,29 @@ this.fileNeed = new System.Windows.Forms.CheckBox(); this.button1 = new System.Windows.Forms.Button(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); - this.resGrid = new System.Windows.Forms.DataGridView(); this.splitContainer2 = new System.Windows.Forms.SplitContainer(); this.submitGrid = new System.Windows.Forms.DataGridView(); this.source = new System.Windows.Forms.RichTextBox(); + this.resGrid = new System.Windows.Forms.DataGridView(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.resGrid)).BeginInit(); this.splitContainer2.Panel1.SuspendLayout(); this.splitContainer2.Panel2.SuspendLayout(); this.splitContainer2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.submitGrid)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.resGrid)).BeginInit(); this.SuspendLayout(); // // numericUpDown1 // this.numericUpDown1.Location = new System.Drawing.Point(3, 3); + this.numericUpDown1.Maximum = new decimal(new int[] { + 1000000, + 0, + 0, + 0}); this.numericUpDown1.Name = "numericUpDown1"; this.numericUpDown1.Size = new System.Drawing.Size(120, 20); this.numericUpDown1.TabIndex = 0; @@ -96,17 +101,6 @@ this.splitContainer1.SplitterDistance = 177; this.splitContainer1.TabIndex = 7; // - // resGrid - // - this.resGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; - this.resGrid.Dock = System.Windows.Forms.DockStyle.Fill; - this.resGrid.Location = new System.Drawing.Point(0, 0); - this.resGrid.Name = "resGrid"; - this.resGrid.RowHeadersVisible = false; - this.resGrid.Size = new System.Drawing.Size(396, 173); - this.resGrid.TabIndex = 5; - this.resGrid.SizeChanged += new System.EventHandler(this.resGrid_SizeChanged); - // // splitContainer2 // this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; @@ -146,6 +140,17 @@ this.source.TabIndex = 3; this.source.Text = ""; // + // resGrid + // + this.resGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.resGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.resGrid.Location = new System.Drawing.Point(0, 0); + this.resGrid.Name = "resGrid"; + this.resGrid.RowHeadersVisible = false; + this.resGrid.Size = new System.Drawing.Size(396, 173); + this.resGrid.TabIndex = 5; + this.resGrid.SizeChanged += new System.EventHandler(this.resGrid_SizeChanged); + // // IoiInformerControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -161,11 +166,11 @@ this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.Panel2.ResumeLayout(false); this.splitContainer1.ResumeLayout(false); - ((System.ComponentModel.ISupportInitialize)(this.resGrid)).EndInit(); this.splitContainer2.Panel1.ResumeLayout(false); this.splitContainer2.Panel2.ResumeLayout(false); this.splitContainer2.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.submitGrid)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.resGrid)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -73,19 +73,21 @@ FileName = "IoiResults\\" + message.Submit.form.ToString() + " form\\" + message.Submit.name + "\\" + message.Submit.submit.pbolemID.ToString() + ".html"; source.Text = message.Submit.submit.sourceCode; submitGrid.ColumnCount = 2; - submitGrid.RowCount = 6; + submitGrid.RowCount = 7; submitGrid[0, 0].Value = "\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; submitGrid[1, 0].Value = message.Submit.name; submitGrid[0, 1].Value = "\xCA\xEB\xE0\xF1:"; submitGrid[1, 1].Value = message.Submit.form.ToString(); - submitGrid[0, 2].Value = "\xC7\xE0\xE4\xE0\xF7\xE0:"; - submitGrid[1, 2].Value = message.Submit.submit.pbolemID.ToString(); - submitGrid[0, 3].Value = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; - submitGrid[1, 3].Value = GetLanguage(message.Submit.submit.language); - submitGrid[0, 4].Value = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; - submitGrid[1, 4].Value = message.Submit.submit.id.ToString(); - submitGrid[0, 5].Value = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; + submitGrid[0, 2].Value = "\xD8\xEA\xEE\xEB\xE0:"; + submitGrid[1, 2].Value = message.Submit.school; + submitGrid[0, 3].Value = "\xC7\xE0\xE4\xE0\xF7\xE0:"; + submitGrid[1, 3].Value = message.Submit.submit.pbolemID.ToString(); + submitGrid[0, 4].Value = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + submitGrid[1, 4].Value = GetLanguage(message.Submit.submit.language); + submitGrid[0, 5].Value = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + submitGrid[1, 5].Value = message.Submit.submit.id.ToString(); + submitGrid[0, 6].Value = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; int allPoints = 0, myPoints = 0; if (message.testResults != null) { @@ -94,7 +96,7 @@ allPoints += message.testResults[i].points; myPoints += (message.testResults[i].res == "Accepted") ? message.testResults[i].points : 0; } - submitGrid[1, 5].Value = myPoints.ToString() + "/" + allPoints.ToString(); + submitGrid[1, 6].Value = myPoints.ToString() + "/" + allPoints.ToString(); resGrid.ColumnCount = 8; resGrid.RowCount = message.testResults.Length + 2; Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -38,7 +38,7 @@ if (((IoiInformerControl)base.Control).NeedToFile()) { HtmlBuilder h = new HtmlBuilder(); - string[,] subdata = new string[6, 2]; + string[,] subdata = new string[7, 2]; h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF"; h.Head += "<meta HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"; @@ -62,13 +62,15 @@ subdata[0, 1] = result.Submit.name; subdata[1, 0] = "\xCA\xEB\xE0\xF1:"; subdata[1, 1] = result.Submit.form.ToString(); - subdata[2, 0] = "\xC7\xE0\xE4\xE0\xF7\xE0:"; - subdata[2, 1] = result.Submit.submit.pbolemID.ToString(); - subdata[3, 0] = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; - subdata[3, 1] = GetLanguage(result.Submit.submit.language); - subdata[4, 0] = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; - subdata[4, 1] = result.Submit.submit.id.ToString(); - subdata[5, 0] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; + subdata[2, 0] = "\xD8\xEA\xEE\xEB\xE0:"; + subdata[2, 1] = result.Submit.school; + subdata[3, 0] = "\xC7\xE0\xE4\xE0\xF7\xE0:"; + subdata[3, 1] = result.Submit.submit.pbolemID.ToString(); + subdata[4, 0] = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + subdata[4, 1] = GetLanguage(result.Submit.submit.language); + subdata[5, 0] = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + subdata[5, 1] = result.Submit.submit.id.ToString(); + subdata[6, 0] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; int allPoints = 0, myPoints = 0; if (result.testResults != null) { @@ -77,10 +79,10 @@ allPoints += result.testResults[i].points; myPoints += (result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0; } - subdata[5, 1] = myPoints.ToString() + "/" + allPoints.ToString(); + subdata[6, 1] = myPoints.ToString() + "/" + allPoints.ToString(); } else - subdata[5, 1] = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; + subdata[6, 1] = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; h.AddTable(subdata, new string[0], "", 2, 0, 5, "center"); Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.Designer.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -41,9 +41,13 @@ this.submitButton = new System.Windows.Forms.Button(); this.sourceTextBox = new System.Windows.Forms.TextBox(); this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + this.schoolTextBox = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); this.groupBox1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); this.SuspendLayout(); // // label1 @@ -88,6 +92,7 @@ // // groupBox1 // + this.groupBox1.Controls.Add(this.numericUpDown1); this.groupBox1.Controls.Add(this.comboBox1); this.groupBox1.Controls.Add(this.label3); this.groupBox1.Controls.Add(this.problemTextBox); @@ -98,7 +103,7 @@ this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(450, 177); + this.groupBox1.Size = new System.Drawing.Size(450, 163); this.groupBox1.TabIndex = 5; this.groupBox1.TabStop = false; this.groupBox1.Text = "\xD4\xEE\xF0\xEC\xE0 \xE2\xB3\xEF\xF0\xE0\xE2\xEA\xE8 \xF0\xEE\xE7\xE2\'\xFF\xE7\xEA\xF3"; @@ -121,15 +126,16 @@ this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(173, 16); this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(45, 13); + this.label3.Size = new System.Drawing.Size(48, 13); this.label3.TabIndex = 13; - this.label3.Text = "Problem"; + this.label3.Text = "Problem:"; // // problemTextBox // - this.problemTextBox.Location = new System.Drawing.Point(224, 13); + this.problemTextBox.Enabled = false; + this.problemTextBox.Location = new System.Drawing.Point(281, 13); this.problemTextBox.Name = "problemTextBox"; - this.problemTextBox.Size = new System.Drawing.Size(100, 20); + this.problemTextBox.Size = new System.Drawing.Size(24, 20); this.problemTextBox.TabIndex = 12; this.problemTextBox.Text = "1"; // @@ -138,9 +144,9 @@ this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(6, 16); this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(55, 13); + this.label4.Size = new System.Drawing.Size(58, 13); this.label4.TabIndex = 11; - this.label4.Text = "Language"; + this.label4.Text = "Language:"; // // languageTextBox // @@ -155,7 +161,7 @@ // this.submitButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.submitButton.Location = new System.Drawing.Point(6, 148); + this.submitButton.Location = new System.Drawing.Point(6, 134); this.submitButton.Name = "submitButton"; this.submitButton.Size = new System.Drawing.Size(438, 23); this.submitButton.TabIndex = 9; @@ -171,7 +177,7 @@ this.sourceTextBox.Location = new System.Drawing.Point(6, 39); this.sourceTextBox.Multiline = true; this.sourceTextBox.Name = "sourceTextBox"; - this.sourceTextBox.Size = new System.Drawing.Size(438, 103); + this.sourceTextBox.Size = new System.Drawing.Size(438, 89); this.sourceTextBox.TabIndex = 8; this.sourceTextBox.Text = "begin\r\nend."; // @@ -180,21 +186,64 @@ this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.splitContainer1.Location = new System.Drawing.Point(6, 56); + this.splitContainer1.Location = new System.Drawing.Point(6, 82); this.splitContainer1.Name = "splitContainer1"; this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; // // splitContainer1.Panel1 // this.splitContainer1.Panel1.Controls.Add(this.groupBox1); - this.splitContainer1.Size = new System.Drawing.Size(450, 343); - this.splitContainer1.SplitterDistance = 177; + this.splitContainer1.Size = new System.Drawing.Size(450, 317); + this.splitContainer1.SplitterDistance = 163; this.splitContainer1.TabIndex = 6; // + // numericUpDown1 + // + this.numericUpDown1.Location = new System.Drawing.Point(227, 13); + this.numericUpDown1.Maximum = new decimal(new int[] { + 7, + 0, + 0, + 0}); + this.numericUpDown1.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDown1.Name = "numericUpDown1"; + this.numericUpDown1.Size = new System.Drawing.Size(48, 20); + this.numericUpDown1.TabIndex = 15; + this.numericUpDown1.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numericUpDown1.ValueChanged += new System.EventHandler(this.numericUpDown1_ValueChanged); + // + // schoolTextBox + // + this.schoolTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.schoolTextBox.Location = new System.Drawing.Point(47, 56); + this.schoolTextBox.Name = "schoolTextBox"; + this.schoolTextBox.Size = new System.Drawing.Size(409, 20); + this.schoolTextBox.TabIndex = 8; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(3, 59); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(43, 13); + this.label5.TabIndex = 7; + this.label5.Text = "School:"; + // // IoiSubmitGuiControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.schoolTextBox); + this.Controls.Add(this.label5); this.Controls.Add(this.splitContainer1); this.Controls.Add(this.formComboBox); this.Controls.Add(this.label2); @@ -206,6 +255,7 @@ this.groupBox1.PerformLayout(); this.splitContainer1.Panel1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -226,5 +276,8 @@ private System.Windows.Forms.Button submitButton; private System.Windows.Forms.TextBox sourceTextBox; private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.NumericUpDown numericUpDown1; + private System.Windows.Forms.TextBox schoolTextBox; + private System.Windows.Forms.Label label5; } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-06 20:56:45 UTC (rev 494) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiSubmitGuiPlugin/IoiSubmitGuiControl.cs 2009-02-06 21:05:57 UTC (rev 495) @@ -50,5 +50,10 @@ { view.AddRow(new LogDataGridView.SystemMessage(text, type)); } + + private void numericUpDown1_ValueChanged(object sender, EventArgs e) + { + problemTextBox.Text = numericUpDown1.Value.ToString(); + } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-06 20:56:49
|
Revision: 494 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=494&view=rev Author: brus07 Date: 2009-02-06 20:56:45 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Bug fix with Connected status. When try to send to Server when not Connected, show MessageBox. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs 2009-02-06 19:41:24 UTC (rev 493) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGate.cs 2009-02-06 20:56:45 UTC (rev 494) @@ -111,7 +111,11 @@ if (client == null) return true; - + if (IsConnected() == false) + { + System.Windows.Forms.MessageBox.Show("Client is not Connected to Server", "Error", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error); + return false; + } return client.Send(message); } @@ -135,6 +139,17 @@ } public bool IsConnected() { + if (client.IsConnected() == true) + { + try + { + client.Send(new SystemMessage(".")); + } + catch (Exception) + { + return false; + } + } return client.IsConnected(); } } Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs 2009-02-06 19:41:24 UTC (rev 493) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs 2009-02-06 20:56:45 UTC (rev 494) @@ -23,6 +23,10 @@ SocketClientGate gate = SocketClientGate.GetInstance(); gate.onAddLogText += AddText; + gate.CreateClient(textBox2.Text, Int32.Parse(portTextBox.Text)); + + tim = new System.Threading.Timer(new TimerCallback(timer1_Tick)); + tim.Change(0, 1000); } LogDataGridView.LogDataGridView view = new LogDataGridView.LogDataGridView(); @@ -64,8 +68,7 @@ gate.CreateClient(textBox2.Text, Int32.Parse(portTextBox.Text)); gate.Connect(); - tim = new System.Threading.Timer(new TimerCallback(timer1_Tick)); - tim.Change(0, 100); + tim.Change(0, 1000); } private void button2_Click(object sender, EventArgs e) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Or...@us...> - 2009-02-06 19:41:28
|
Revision: 493 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=493&view=rev Author: Oracle_ Date: 2009-02-06 19:41:24 +0000 (Fri, 06 Feb 2009) Log Message: ----------- Fixed bug with javasctript in result html (jump to home in page). Data.dat rename to <id>.dat, where <id> is id of problem. Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-05 23:17:46 UTC (rev 492) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-06 19:41:24 UTC (rev 493) @@ -53,6 +53,7 @@ h.Head += "document.getElementById(who+'_1').style.display = 'block';\n"; h.Head += "document.getElementById(who+'_2').style.display = 'block';\n"; h.Head += "}\n"; + h.Head += "return false;\n"; h.Head += "}\n"; h.Head += "</script>\n"; @@ -104,7 +105,7 @@ int n = result.testResults.Length; for (int i = 0; i < n; i++) { - data[i, 0] = "<a href=\"#\" onclick=\"javascript:flipBox('show" + i.ToString() + "')\">" + i.ToString() + "</a>"; + data[i, 0] = "<a href=\"#\" onclick=\"return flipBox('show" + i.ToString() + "')\">" + i.ToString() + "</a>"; data[i, 1] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_0\">\n<pre>" + result.testResults[i].input + "</pre></div>"; data[i, 2] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_1\">\n<pre>" + result.testResults[i].output + "</pre></div>"; data[i, 3] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_2\">\n<pre>" + result.testResults[i].contestantOutput + "</pre></div>"; @@ -133,8 +134,8 @@ StreamWriter w = File.CreateText(dir + "\\" + result.Submit.submit.pbolemID.ToString() + ".html"); w.Write(h.Result); w.Close(); - StreamWriter dat = File.CreateText(dir+"\\data.dat"); - dat.WriteLine(result.Submit.name + ";" + result.Submit.form + ";"+result.Submit.submit.pbolemID.ToString()+";" + ((result.testResults == null) ? "CE" : myPoints.ToString() + "/" + allPoints.ToString())); + StreamWriter dat = File.CreateText(dir + "\\data" + result.Submit.submit.pbolemID.ToString() + ".dat"); + dat.WriteLine(result.Submit.name + ";" + result.Submit.form + ";"+result.Submit.submit.pbolemID.ToString()+";" + ((result.testResults == null) ? "0;CE" : myPoints.ToString() + ";" + allPoints.ToString())); dat.Close(); } //Uri url=new Uri(result.Submit.submit.id.ToString() + ".html"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Or...@us...> - 2009-02-05 23:17:51
|
Revision: 492 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=492&view=rev Author: Oracle_ Date: 2009-02-05 23:17:46 +0000 (Thu, 05 Feb 2009) Log Message: ----------- Added CompileLog to all result data. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/Data/Result.cs ACMServer/trunk/ACMServer/Library/Data/ResultIoi.cs ACMServer/trunk/ACMServer/Library/testData/data.xsd ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs ACMServer/trunk/ACMServer/Runner/Class1.cs Modified: ACMServer/trunk/ACMServer/Library/Data/Result.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/Result.cs 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Library/Data/Result.cs 2009-02-05 23:17:46 UTC (rev 492) @@ -27,6 +27,8 @@ public double usedTime; [XmlElement("usedMemory", typeof(int))] public int usedMemory; + [XmlElement("compOutput", typeof(string))] + public string compOutput; readonly string temp; Modified: ACMServer/trunk/ACMServer/Library/Data/ResultIoi.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/Data/ResultIoi.cs 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Library/Data/ResultIoi.cs 2009-02-05 23:17:46 UTC (rev 492) @@ -27,6 +27,8 @@ public double usedTime; [XmlElement("usedMemory", typeof(int))] public int usedMemory; + [XmlElement("compOutput",typeof(string))] + public string compOutput; [XmlElement("testResults", typeof(TestResIoi[]))] public TestResIoi[] testResults; @@ -70,6 +72,7 @@ result.result = this.result; result.usedMemory = usedMemory; result.usedTime = usedTime; + result.compOutput = compOutput; result.Submit = this.Submit.submit; return result; } Modified: ACMServer/trunk/ACMServer/Library/testData/data.xsd =================================================================== --- ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Library/testData/data.xsd 2009-02-05 23:17:46 UTC (rev 492) @@ -38,6 +38,7 @@ <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> @@ -47,6 +48,7 @@ <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> Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-05 23:17:46 UTC (rev 492) @@ -129,8 +129,9 @@ { submitGrid[1, 5].Value = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; resGrid.ColumnCount = 1; - resGrid.RowCount = 1; - resGrid[0, 0].Value = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; + resGrid.RowCount = 2; + resGrid[0, 0].Value = "\xC2\xE8\xE2\xB3\xE4 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF2\xEE\xF0\xE0:"; + resGrid[0, 1].Value = message.compOutput; } submitGrid_SizeChanged(null, new EventArgs()); resGrid_SizeChanged(null, new EventArgs()); @@ -142,7 +143,8 @@ if (File.Exists(FileName)) { ProcessStartInfo s=new ProcessStartInfo(); - s.FileName = Path.GetFullPath(FileName); + s.FileName="iexplore"; + s.Arguments = Path.GetFullPath(FileName); Process.Start(s); } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-05 23:17:46 UTC (rev 492) @@ -121,7 +121,10 @@ h.AddTable(data, header, "", 2, 0, 5, "top"); } else - h.AddParagraph("\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"); + { + h.AddHeader("\xC2\xE8\xE2\xB3\xE4 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF2\xEE\xF0\xE0:", 4, "center"); + h.AddParagraph(result.compOutput); + } h.AddHorizLine(); h.AddReference("http://acm.lviv.ua", "<small>\xC0\xD1\xCC \xCA\xEE\xED\xF2\xE5\xF1\xF2\xE5\xF0 - \xF0\xF3\xF5 \xE2\xEF\xE5\xF0\xE5\xE4</small>"); @@ -130,6 +133,9 @@ StreamWriter w = File.CreateText(dir + "\\" + result.Submit.submit.pbolemID.ToString() + ".html"); w.Write(h.Result); w.Close(); + StreamWriter dat = File.CreateText(dir+"\\data.dat"); + dat.WriteLine(result.Submit.name + ";" + result.Submit.form + ";"+result.Submit.submit.pbolemID.ToString()+";" + ((result.testResults == null) ? "CE" : myPoints.ToString() + "/" + allPoints.ToString())); + dat.Close(); } //Uri url=new Uri(result.Submit.submit.id.ToString() + ".html"); //((IoiInformerControl)base.Control).LoadURL(url); Modified: ACMServer/trunk/ACMServer/Runner/Class1.cs =================================================================== --- ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-05 20:20:58 UTC (rev 491) +++ ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-05 23:17:46 UTC (rev 492) @@ -89,6 +89,7 @@ //TODO: + result.compOutput = test.comp.CompilerOutput; result.res = test.comp.Result.ToString(); if (test.comp.Result == CompRes.OK) { @@ -205,6 +206,7 @@ //TODO: + result.compOutput = test.comp.CompilerOutput; result.res = test.comp.Result.ToString(); if (test.comp.Result == CompRes.OK) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Or...@us...> - 2009-02-05 20:21:04
|
Revision: 491 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=491&view=rev Author: Oracle_ Date: 2009-02-05 20:20:58 +0000 (Thu, 05 Feb 2009) Log Message: ----------- Change HTML result and update Informer show plugin. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs 2009-02-04 18:49:19 UTC (rev 490) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs 2009-02-05 20:20:58 UTC (rev 491) @@ -9,7 +9,7 @@ private string title; private string body; private string bgcolor="White"; - private string meta; + private string head; public string Title { @@ -23,15 +23,15 @@ } } - public string Meta + public string Head { get { - return meta; + return head; } set { - meta = value; + head = value; } } @@ -51,14 +51,15 @@ { get { - string res = "<html>\n<head>\n\t<meta " + meta + "/>\n\t"; - res+="<title>" + title + "</title>\n</head>"; - res = res + "<body bgcolor=\"" + bgcolor + "\">\n" + body + "</body>\n</html>"; + string res = "<html>\n<head>\n\t"; + res += "<title>" + title + "</title>\n"; + res += head + "</head>"; + res += "<body bgcolor=\"" + bgcolor + "\">\n" + body + "</body>\n</html>"; return res; } } - public void AddTable(string[,] data,string[] header,string caption,int borderwidth,int cellspacing,int cellpadding) + public void AddTable(string[,] data,string[] header,string caption,int borderwidth,int cellspacing,int cellpadding,string cellvalign) { body += "<table border=\""+borderwidth.ToString()+"\" cellspacing=\""+cellspacing.ToString()+"\" cellpadding=\""+cellpadding.ToString()+"\">\n"; if (caption!="") @@ -72,7 +73,7 @@ } for (int i=0;i<data.GetLength(0);i++) { - body += "<tr>"; + body += "<tr valign=\""+cellvalign+"\">"; for (int j = 0; j < data.GetLength(1); j++) body += "<td>" + data[i,j] + "</td>"; body += "</tr>\n"; Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-04 18:49:19 UTC (rev 490) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.Designer.cs 2009-02-05 20:20:58 UTC (rev 491) @@ -29,7 +29,22 @@ private void InitializeComponent() { this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + this.fileNeed = new System.Windows.Forms.CheckBox(); + this.button1 = new System.Windows.Forms.Button(); + this.splitContainer1 = new System.Windows.Forms.SplitContainer(); + this.resGrid = new System.Windows.Forms.DataGridView(); + this.splitContainer2 = new System.Windows.Forms.SplitContainer(); + this.submitGrid = new System.Windows.Forms.DataGridView(); + this.source = new System.Windows.Forms.RichTextBox(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); + this.splitContainer1.Panel1.SuspendLayout(); + this.splitContainer1.Panel2.SuspendLayout(); + this.splitContainer1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.resGrid)).BeginInit(); + this.splitContainer2.Panel1.SuspendLayout(); + this.splitContainer2.Panel2.SuspendLayout(); + this.splitContainer2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.submitGrid)).BeginInit(); this.SuspendLayout(); // // numericUpDown1 @@ -39,20 +54,132 @@ this.numericUpDown1.Size = new System.Drawing.Size(120, 20); this.numericUpDown1.TabIndex = 0; // + // fileNeed + // + this.fileNeed.AutoSize = true; + this.fileNeed.Checked = true; + this.fileNeed.CheckState = System.Windows.Forms.CheckState.Checked; + this.fileNeed.Location = new System.Drawing.Point(129, 6); + this.fileNeed.Name = "fileNeed"; + this.fileNeed.Size = new System.Drawing.Size(86, 17); + this.fileNeed.TabIndex = 5; + this.fileNeed.Text = "Save To File"; + this.fileNeed.UseVisualStyleBackColor = true; + // + // button1 + // + this.button1.Location = new System.Drawing.Point(221, 3); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(103, 20); + this.button1.TabIndex = 6; + this.button1.Text = "Show Html"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // splitContainer1 + // + this.splitContainer1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.splitContainer1.Location = new System.Drawing.Point(0, 29); + this.splitContainer1.Name = "splitContainer1"; + this.splitContainer1.Orientation = System.Windows.Forms.Orientation.Horizontal; + // + // splitContainer1.Panel1 + // + this.splitContainer1.Panel1.Controls.Add(this.splitContainer2); + this.splitContainer1.Panel1.RightToLeft = System.Windows.Forms.RightToLeft.No; + // + // splitContainer1.Panel2 + // + this.splitContainer1.Panel2.Controls.Add(this.resGrid); + this.splitContainer1.Panel2.RightToLeft = System.Windows.Forms.RightToLeft.No; + this.splitContainer1.Size = new System.Drawing.Size(396, 354); + this.splitContainer1.SplitterDistance = 177; + this.splitContainer1.TabIndex = 7; + // + // resGrid + // + this.resGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.resGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.resGrid.Location = new System.Drawing.Point(0, 0); + this.resGrid.Name = "resGrid"; + this.resGrid.RowHeadersVisible = false; + this.resGrid.Size = new System.Drawing.Size(396, 173); + this.resGrid.TabIndex = 5; + this.resGrid.SizeChanged += new System.EventHandler(this.resGrid_SizeChanged); + // + // splitContainer2 + // + this.splitContainer2.Dock = System.Windows.Forms.DockStyle.Fill; + this.splitContainer2.Location = new System.Drawing.Point(0, 0); + this.splitContainer2.Name = "splitContainer2"; + // + // splitContainer2.Panel1 + // + this.splitContainer2.Panel1.Controls.Add(this.submitGrid); + // + // splitContainer2.Panel2 + // + this.splitContainer2.Panel2.Controls.Add(this.source); + this.splitContainer2.Size = new System.Drawing.Size(396, 177); + this.splitContainer2.SplitterDistance = 132; + this.splitContainer2.TabIndex = 0; + // + // submitGrid + // + this.submitGrid.BackgroundColor = System.Drawing.SystemColors.Window; + this.submitGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.submitGrid.ColumnHeadersVisible = false; + this.submitGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.submitGrid.Location = new System.Drawing.Point(0, 0); + this.submitGrid.Name = "submitGrid"; + this.submitGrid.RowHeadersVisible = false; + this.submitGrid.Size = new System.Drawing.Size(132, 177); + this.submitGrid.TabIndex = 2; + this.submitGrid.SizeChanged += new System.EventHandler(this.submitGrid_SizeChanged); + // + // source + // + this.source.Dock = System.Windows.Forms.DockStyle.Fill; + this.source.Location = new System.Drawing.Point(0, 0); + this.source.Name = "source"; + this.source.Size = new System.Drawing.Size(260, 177); + this.source.TabIndex = 3; + this.source.Text = ""; + // // IoiInformerControl // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.splitContainer1); + this.Controls.Add(this.button1); + this.Controls.Add(this.fileNeed); this.Controls.Add(this.numericUpDown1); this.Name = "IoiInformerControl"; this.Size = new System.Drawing.Size(396, 383); + this.SizeChanged += new System.EventHandler(this.IoiInformerControl_SizeChanged); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); + this.splitContainer1.Panel1.ResumeLayout(false); + this.splitContainer1.Panel2.ResumeLayout(false); + this.splitContainer1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.resGrid)).EndInit(); + this.splitContainer2.Panel1.ResumeLayout(false); + this.splitContainer2.Panel2.ResumeLayout(false); + this.splitContainer2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.submitGrid)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } #endregion private System.Windows.Forms.NumericUpDown numericUpDown1; + private System.Windows.Forms.CheckBox fileNeed; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.SplitContainer splitContainer1; + private System.Windows.Forms.SplitContainer splitContainer2; + private System.Windows.Forms.DataGridView submitGrid; + private System.Windows.Forms.RichTextBox source; + private System.Windows.Forms.DataGridView resGrid; } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-04 18:49:19 UTC (rev 490) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerControl.cs 2009-02-05 20:20:58 UTC (rev 491) @@ -5,14 +5,33 @@ using System.Data; using System.Text; using System.Windows.Forms; +using System.IO; +using System.Diagnostics; +using AcmContester.Library.LibraryExtention.Data; namespace AcmContester.Plugins.IoiPlugins.IoiInformerPlugin { public partial class IoiInformerControl : UserControl { + private string FileName; + + private string GetLanguage(int id) + { + StreamReader r = File.OpenText("Comps.txt"); + while (!r.EndOfStream) + { + string[] s = r.ReadLine().Split(' '); + if (s[0] == id.ToString()) + return s[1]; + } + r.Close(); + return id.ToString(); + } + public IoiInformerControl() { InitializeComponent(); + IoiInformerControl_SizeChanged(null, new EventArgs()); } delegate void UpCountCallback(); @@ -29,9 +48,116 @@ } } - public void LoadURL(Uri URL) + private void IoiInformerControl_SizeChanged(object sender, EventArgs e) { - //browser.Url = URL; + splitContainer1.Height = ClientRectangle.Height - (numericUpDown1.Top + numericUpDown1.Height + 1); } + + public bool NeedToFile() + { + return fileNeed.Checked; + } + + delegate void LoadMessageCallback(ResultIoi message); + + public void LoadMessage(ResultIoi message) + { + if (this.InvokeRequired) + { + LoadMessageCallback d = new LoadMessageCallback(LoadMessage); + + this.Invoke(d, new object[] { message } ); + } + else + { + FileName = "IoiResults\\" + message.Submit.form.ToString() + " form\\" + message.Submit.name + "\\" + message.Submit.submit.pbolemID.ToString() + ".html"; + source.Text = message.Submit.submit.sourceCode; + submitGrid.ColumnCount = 2; + submitGrid.RowCount = 6; + + submitGrid[0, 0].Value = "\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; + submitGrid[1, 0].Value = message.Submit.name; + submitGrid[0, 1].Value = "\xCA\xEB\xE0\xF1:"; + submitGrid[1, 1].Value = message.Submit.form.ToString(); + submitGrid[0, 2].Value = "\xC7\xE0\xE4\xE0\xF7\xE0:"; + submitGrid[1, 2].Value = message.Submit.submit.pbolemID.ToString(); + submitGrid[0, 3].Value = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + submitGrid[1, 3].Value = GetLanguage(message.Submit.submit.language); + submitGrid[0, 4].Value = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + submitGrid[1, 4].Value = message.Submit.submit.id.ToString(); + submitGrid[0, 5].Value = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; + int allPoints = 0, myPoints = 0; + if (message.testResults != null) + { + for (int i = 0; i < message.testResults.Length; i++) + { + allPoints += message.testResults[i].points; + myPoints += (message.testResults[i].res == "Accepted") ? message.testResults[i].points : 0; + } + submitGrid[1, 5].Value = myPoints.ToString() + "/" + allPoints.ToString(); + + resGrid.ColumnCount = 8; + resGrid.RowCount = message.testResults.Length + 2; + resGrid[0, 0].Value = "\xB9"; + resGrid[1, 0].Value = "\xC2\xF5\xB3\xE4"; + resGrid[2, 0].Value = "\xCA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2"; + resGrid[3, 0].Value = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xD3\xF7\xE0\xF1\xED\xE8\xEA\xE0"; + resGrid[4, 0].Value = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE8\xE9 \xD7\xE0\xF1"; + resGrid[5, 0].Value = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE0 \xCF\xE0\xEC\'\xFF\xF2\xFC"; + resGrid[6, 0].Value = "\xC2\xE5\xF0\xE4\xE8\xEA\xF2 \xD1\xF3\xE4\xE4\xB3"; + resGrid[7, 0].Value = "\xCA-\xF1\xF2\xFC \xE1\xE0\xEB\xB3\xE2 \xE7\xE0 \xF2\xE5\xF1\xF2"; + + int n = message.testResults.Length; + for (int i = 0; i < n; i++) + { + resGrid[0, i+1].Value = i.ToString(); + resGrid[1, i+1].Value = message.testResults[i].input; + resGrid[2, i+1].Value = message.testResults[i].output; + resGrid[3, i+1].Value = message.testResults[i].contestantOutput; + resGrid[4, i+1].Value = message.testResults[i].usedTime.ToString(); + resGrid[5, i+1].Value = message.testResults[i].usedMemory.ToString(); + resGrid[6, i+1].Value = message.testResults[i].res; + resGrid[7, i+1].Value = ((message.testResults[i].res == "Accepted") ? message.testResults[i].points : 0).ToString() + "/" + message.testResults[i].points.ToString(); + } + resGrid[0, n+1].Value = "\xD1\xF3\xEC\xE0\xF0\xED\xB3"; + resGrid[4, n+1].Value = message.usedMemory.ToString(); + resGrid[5, n+1].Value = message.usedTime.ToString(); + resGrid[6, n+1].Value = message.res; + resGrid[7, n+1].Value = myPoints.ToString() + "/" + allPoints.ToString(); + } + else + { + submitGrid[1, 5].Value = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; + resGrid.ColumnCount = 1; + resGrid.RowCount = 1; + resGrid[0, 0].Value = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; + } + submitGrid_SizeChanged(null, new EventArgs()); + resGrid_SizeChanged(null, new EventArgs()); + } + } + + private void button1_Click(object sender, EventArgs e) + { + if (File.Exists(FileName)) + { + ProcessStartInfo s=new ProcessStartInfo(); + s.FileName = Path.GetFullPath(FileName); + Process.Start(s); + } + } + + private void submitGrid_SizeChanged(object sender, EventArgs e) + { + for (int i = 0; i < submitGrid.ColumnCount; i++) + submitGrid.Columns[i].Width = (submitGrid.Width - submitGrid.ColumnCount * 3) / submitGrid.ColumnCount; + } + + private void resGrid_SizeChanged(object sender, EventArgs e) + { + for (int i = 0; i < resGrid.ColumnCount; i++) + resGrid.Columns[i].Width = (resGrid.Width - resGrid.ColumnCount * 3) / resGrid.ColumnCount; + } + } } Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-04 18:49:19 UTC (rev 490) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-05 20:20:58 UTC (rev 491) @@ -13,7 +13,7 @@ base.Control = new IoiInformerControl(); } - public string GetLanguage(int id) + private string GetLanguage(int id) { StreamReader r = File.OpenText("Comps.txt"); while (!r.EndOfStream) @@ -33,80 +33,104 @@ ResultIoi result = ResultIoi.CreateFromXml(message.Message); ((IoiInformerControl)base.Control).UpCount(); - HtmlBuilder h=new HtmlBuilder(); - string[,] subdata=new string[5,2]; - - h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; - h.Meta="HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=utf-8\""; - h.AddHeader("\xC4\xE0\xED\xB3 \xEF\xF0\xEE \xF1\xE0\xE1\xEC\xB3\xF2:", 4, "left"); - subdata[0,0]="\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; - subdata[0,1]=result.Submit.name; - subdata[1,0]="\xCA\xEB\xE0\xF1:"; - subdata[1,1]=result.Submit.form.ToString(); - subdata[2,0]="\xC7\xE0\xE4\xE0\xF7\xE0:"; - subdata[2,1]=result.Submit.submit.pbolemID.ToString(); - subdata[3,0]="\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; - subdata[3,1]=GetLanguage(result.Submit.submit.language); - subdata[4,0]="\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; - subdata[4,1]=result.Submit.submit.id.ToString(); - h.AddTable(subdata, new string[0], "", 2, 0, 5); + ((IoiInformerControl)base.Control).LoadMessage(result); - h.AddHorizLine(); - h.AddHeader("\xC2\xE8\xF5\xB3\xE4\xED\xE8\xE9 \xEA\xEE\xE4",4,"center"); - h.AddPre(result.Submit.submit.sourceCode); - h.AddHorizLine(); - h.AddHeader("\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xE2\xE8\xEA\xEE\xED\xE0\xED\xED\xFF", 4, "center"); + if (((IoiInformerControl)base.Control).NeedToFile()) + { + HtmlBuilder h = new HtmlBuilder(); + string[,] subdata = new string[6, 2]; - if (result.testResults != null) - { - string[,] data = new string[result.testResults.Length + 1, 8]; - string[] header = new string[8]; - header[0] = "\xB9"; - header[1] = "\xC2\xF5\xB3\xE4"; - header[2] = "\xCA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2"; - header[3] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xD3\xF7\xE0\xF1\xED\xE8\xEA\xE0"; - header[4] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE8\xE9 \xD7\xE0\xF1"; - header[5] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE0 \xCF\xE0\xEC\'\xFF\xF2\xFC"; - header[6] = "\xC2\xE5\xF0\xE4\xE8\xEA\xF2 \xD1\xF3\xE4\xE4\xB3"; - header[7] = "\xCA-\xF1\xF2\xFC \xE1\xE0\xEB\xB3\xE2 \xE7\xE0 \xF2\xE5\xF1\xF2"; - int n = result.testResults.Length; + h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF"; + h.Head += "<meta HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n"; + h.Head += "<script type=\"text/javascript\">\n"; + h.Head += "function flipBox(who) {\n"; + h.Head += "if (document.getElementById(who+'_0').style.display == 'block') { \n"; + h.Head += "document.getElementById(who+'_0').style.display = 'none';\n"; + h.Head += "document.getElementById(who+'_1').style.display = 'none';\n"; + h.Head += "document.getElementById(who+'_2').style.display = 'none';\n"; + h.Head += "} else { \n"; + h.Head += "document.getElementById(who+'_0').style.display = 'block';\n"; + h.Head += "document.getElementById(who+'_1').style.display = 'block';\n"; + h.Head += "document.getElementById(who+'_2').style.display = 'block';\n"; + h.Head += "}\n"; + h.Head += "}\n"; + h.Head += "</script>\n"; + + h.AddHeader("\xC4\xE0\xED\xB3 \xEF\xF0\xEE \xF1\xE0\xE1\xEC\xB3\xF2:", 4, "left"); + subdata[0, 0] = "\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; + subdata[0, 1] = result.Submit.name; + subdata[1, 0] = "\xCA\xEB\xE0\xF1:"; + subdata[1, 1] = result.Submit.form.ToString(); + subdata[2, 0] = "\xC7\xE0\xE4\xE0\xF7\xE0:"; + subdata[2, 1] = result.Submit.submit.pbolemID.ToString(); + subdata[3, 0] = "\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + subdata[3, 1] = GetLanguage(result.Submit.submit.language); + subdata[4, 0] = "\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + subdata[4, 1] = result.Submit.submit.id.ToString(); + subdata[5, 0] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; int allPoints = 0, myPoints = 0; - for (int i = 0; i < n; i++) + if (result.testResults != null) { - data[i, 0] = result.testResults[i].id.ToString(); - data[i, 1] = "<pre>"+result.testResults[i].input+"</pre>"; - data[i, 2] = "<pre>"+result.testResults[i].output+"</pre>"; - data[i, 3] = "<pre>"+result.testResults[i].contestantOutput+"</pre>"; - data[i, 4] = result.testResults[i].usedTime.ToString(); - data[i, 5] = result.testResults[i].usedMemory.ToString(); - data[i, 6] = result.testResults[i].res; - int curpoints = (result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0; - data[i, 7] = curpoints.ToString() + "/" + result.testResults[i].points.ToString(); - myPoints += curpoints; - allPoints += result.testResults[i].points; + for (int i = 0; i < result.testResults.Length; i++) + { + allPoints += result.testResults[i].points; + myPoints += (result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0; + } + subdata[5, 1] = myPoints.ToString() + "/" + allPoints.ToString(); } - data[n, 0] = "<b>\xD1\xF3\xEC\xE0\xF0\xED\xB3</b>"; - data[n, 4] = "<b>" + result.usedMemory.ToString() + "</b>"; - data[n, 5] = "<b>" + result.usedTime.ToString() + "</b>"; - data[n, 6] = "<b>" + result.res + "</b>"; - data[n, 7] = "<b>" + myPoints.ToString() + "/" + allPoints.ToString() + "</b>"; - h.AddTable(data, header, "", 2, 0, 5); - h.Title += myPoints.ToString() + "/" + allPoints.ToString(); - } - else - { - h.Title += "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"; - h.AddParagraph("\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"); - } - h.AddHorizLine(); - h.AddReference("http://acm.lviv.ua","<small>\xC0\xD1\xCC \xCA\xEE\xED\xF2\xE5\xF1\xF2\xE5\xF0 - \xF0\xF3\xF5 \xE2\xEF\xE5\xF0\xE5\xE4</small>"); + else + subdata[5, 1] = "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF"; - string dir = "IoiResults\\" + result.Submit.form.ToString() + " form\\" + result.Submit.name; - Directory.CreateDirectory(dir); - StreamWriter w = File.CreateText(dir+"\\"+result.Submit.submit.pbolemID.ToString() + ".html"); - w.Write(h.Result); - w.Close(); + h.AddTable(subdata, new string[0], "", 2, 0, 5, "center"); + h.AddHorizLine(); + h.AddHeader("\xC2\xE8\xF5\xB3\xE4\xED\xE8\xE9 \xEA\xEE\xE4", 4, "center"); + h.AddPre(result.Submit.submit.sourceCode); + h.AddHorizLine(); + h.AddHeader("\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xE2\xE8\xEA\xEE\xED\xE0\xED\xED\xFF", 4, "center"); + + if (result.testResults != null) + { + string[,] data = new string[result.testResults.Length + 1, 8]; + string[] header = new string[8]; + header[0] = "\xB9"; + header[1] = "\xC2\xF5\xB3\xE4"; + header[2] = "\xCA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2"; + header[3] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xD3\xF7\xE0\xF1\xED\xE8\xEA\xE0"; + header[4] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE8\xE9 \xD7\xE0\xF1"; + header[5] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE0 \xCF\xE0\xEC\'\xFF\xF2\xFC"; + header[6] = "\xC2\xE5\xF0\xE4\xE8\xEA\xF2 \xD1\xF3\xE4\xE4\xB3"; + header[7] = "\xCA-\xF1\xF2\xFC \xE1\xE0\xEB\xB3\xE2 \xE7\xE0 \xF2\xE5\xF1\xF2"; + int n = result.testResults.Length; + for (int i = 0; i < n; i++) + { + data[i, 0] = "<a href=\"#\" onclick=\"javascript:flipBox('show" + i.ToString() + "')\">" + i.ToString() + "</a>"; + data[i, 1] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_0\">\n<pre>" + result.testResults[i].input + "</pre></div>"; + data[i, 2] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_1\">\n<pre>" + result.testResults[i].output + "</pre></div>"; + data[i, 3] = "<div style=\"display: none;\" id=\"show" + i.ToString() + "_2\">\n<pre>" + result.testResults[i].contestantOutput + "</pre></div>"; + data[i, 4] = result.testResults[i].usedTime.ToString(); + data[i, 5] = result.testResults[i].usedMemory.ToString(); + data[i, 6] = result.testResults[i].res; + data[i, 7] = ((result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0).ToString() + "/" + result.testResults[i].points.ToString(); + } + data[n, 0] = "<b>\xD1\xF3\xEC\xE0\xF0\xED\xB3</b>"; + data[n, 4] = "<b>" + result.usedMemory.ToString() + "</b>"; + data[n, 5] = "<b>" + result.usedTime.ToString() + "</b>"; + data[n, 6] = "<b>" + result.res + "</b>"; + data[n, 7] = "<b>" + myPoints.ToString() + "/" + allPoints.ToString() + "</b>"; + h.AddTable(data, header, "", 2, 0, 5, "top"); + } + else + h.AddParagraph("\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"); + h.AddHorizLine(); + h.AddReference("http://acm.lviv.ua", "<small>\xC0\xD1\xCC \xCA\xEE\xED\xF2\xE5\xF1\xF2\xE5\xF0 - \xF0\xF3\xF5 \xE2\xEF\xE5\xF0\xE5\xE4</small>"); + + string dir = "IoiResults\\" + result.Submit.form.ToString() + " form\\" + result.Submit.name; + Directory.CreateDirectory(dir); + StreamWriter w = File.CreateText(dir + "\\" + result.Submit.submit.pbolemID.ToString() + ".html"); + w.Write(h.Result); + w.Close(); + } //Uri url=new Uri(result.Submit.submit.id.ToString() + ".html"); //((IoiInformerControl)base.Control).LoadURL(url); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <Or...@us...> - 2009-02-04 18:49:23
|
Revision: 490 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=490&view=rev Author: Oracle_ Date: 2009-02-04 18:49:19 +0000 (Wed, 04 Feb 2009) Log Message: ----------- Fixed bug with HTML results. Fixed bug with ResultIoi. Fixed bug with CE result. Modified Paths: -------------- ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs ACMServer/trunk/ACMServer/Runner/Class1.cs Modified: ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs =================================================================== --- ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs 2009-02-04 17:28:44 UTC (rev 489) +++ ACMServer/trunk/ACMServer/Library/LibraryExtention/HtmlBuilder.cs 2009-02-04 18:49:19 UTC (rev 490) @@ -8,7 +8,8 @@ { private string title; private string body; - private string bgcolor; + private string bgcolor="White"; + private string meta; public string Title { @@ -22,6 +23,18 @@ } } + public string Meta + { + get + { + return meta; + } + set + { + meta = value; + } + } + public string BackgroundColor { get @@ -38,15 +51,16 @@ { get { - string res = "<html>\n<head>\n\t<title>" + title + "</title>\n</head>"; - res = res + "<body bgcolor=\"" + bgcolor + ">\n" + body + "</body>\n</html>"; + string res = "<html>\n<head>\n\t<meta " + meta + "/>\n\t"; + res+="<title>" + title + "</title>\n</head>"; + res = res + "<body bgcolor=\"" + bgcolor + "\">\n" + body + "</body>\n</html>"; return res; } } - public void AddTable(string[,] data,string[] header,string caption) + public void AddTable(string[,] data,string[] header,string caption,int borderwidth,int cellspacing,int cellpadding) { - body += "<table>\n"; + body += "<table border=\""+borderwidth.ToString()+"\" cellspacing=\""+cellspacing.ToString()+"\" cellpadding=\""+cellpadding.ToString()+"\">\n"; if (caption!="") body+="<caption>" + caption + "</caption>\n"; if (header.Length>0) @@ -71,9 +85,9 @@ body += "<a href=\"" + URL + "\">" + text + "</a> "; } - public void AddReference(string URL, string text, string align) + public void AddPre(string data) { - body += "<a align=\""+align+"\" href=\"" + URL + "\">" + text + "</a> "; + body += "<pre>" + data + "</pre>"; } public void AddParagraph(string data, string align, string color) Modified: ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-04 17:28:44 UTC (rev 489) +++ ACMServer/trunk/ACMServer/Plugins/IoiPlugin/IoiInformerPlugin/IoiInformerPlugin.cs 2009-02-04 18:49:19 UTC (rev 490) @@ -13,6 +13,19 @@ base.Control = new IoiInformerControl(); } + public string GetLanguage(int id) + { + StreamReader r = File.OpenText("Comps.txt"); + while (!r.EndOfStream) + { + string[] s = r.ReadLine().Split(' '); + if (s[0] == id.ToString()) + return s[1]; + } + r.Close(); + return id.ToString(); + } + public override void Send(SystemMessage message) { if (message.IsType("TestingResultIoi") == true) @@ -21,53 +34,76 @@ ((IoiInformerControl)base.Control).UpCount(); HtmlBuilder h=new HtmlBuilder(); - h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF"; + string[,] subdata=new string[5,2]; + + h.Title = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2\xE8 \xF2\xE5\xF1\xF2\xF3\xE2\xE0\xED\xED\xFF: "; + h.Meta="HTTP-EQUIV=\"Content-Type\" content=\"text/html; charset=utf-8\""; h.AddHeader("\xC4\xE0\xED\xB3 \xEF\xF0\xEE \xF1\xE0\xE1\xEC\xB3\xF2:", 4, "left"); - h.AddText("\xD3\xF7\xE0\xF1\xED\xE8\xEA: " + result.Submit.name + "<br>"); - h.AddText("\xCA\xEB\xE0\xF1: " + result.Submit.form + "<br>"); - h.AddText("\xC7\xE0\xE4\xE0\xF7\xE0: " + result.Submit.submit.pbolemID + "<br>"); - h.AddText("\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF: " + result.Submit.submit.language + "<br>"); - h.AddText("\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3: " + result.Submit.submit.id + "<br>"); + subdata[0,0]="\xD3\xF7\xE0\xF1\xED\xE8\xEA:"; + subdata[0,1]=result.Submit.name; + subdata[1,0]="\xCA\xEB\xE0\xF1:"; + subdata[1,1]=result.Submit.form.ToString(); + subdata[2,0]="\xC7\xE0\xE4\xE0\xF7\xE0:"; + subdata[2,1]=result.Submit.submit.pbolemID.ToString(); + subdata[3,0]="\xCC\xEE\xE2\xE0 \xEF\xF0\xEE\xE3\xF0\xE0\xEC\xF3\xE2\xE0\xED\xED\xFF:"; + subdata[3,1]=GetLanguage(result.Submit.submit.language); + subdata[4,0]="\xCD\xEE\xEC\xE5\xF0 \xF1\xE0\xE1\xEC\xB3\xF2\xF3:"; + subdata[4,1]=result.Submit.submit.id.ToString(); + h.AddTable(subdata, new string[0], "", 2, 0, 5); + h.AddHorizLine(); h.AddHeader("\xC2\xE8\xF5\xB3\xE4\xED\xE8\xE9 \xEA\xEE\xE4",4,"center"); - h.AddCode(result.Submit.submit.sourceCode); + h.AddPre(result.Submit.submit.sourceCode); h.AddHorizLine(); h.AddHeader("\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xE2\xE8\xEA\xEE\xED\xE0\xED\xED\xFF", 4, "center"); - string[,] data=new string[result.testResults.Length+1,8]; - string[] header = new string[8]; - header[0] = "\xB9"; - header[1] = "\xE2\xF5\xB3\xE4"; - header[2] = "\xEA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xF0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2"; - header[3] = "\xF0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xF3\xF7\xE0\xF1\xED\xE8\xEA\xE0"; - header[4] = "\xE2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE8\xE9 \xF7\xE0\xF1"; - header[5] = "\xE2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE0 \xEF\xE0\xEC\'\xFF\xF2\xFC"; - header[6] = "\xE2\xE5\xF0\xE4\xE8\xEA\xF2 \xF1\xF3\xE4\xE4\xB3"; - header[7] = "\xEA-\xF1\xF2\xFC \xE1\xE0\xEB\xB3\xE2 \xE7\xE0 \xF2\xE5\xF1\xF2"; - int n = result.testResults.Length; - int sumPoints = 0; - for (int i = 0; i < n; i++) + if (result.testResults != null) { - data[i,0] = result.testResults[i].id.ToString(); - data[i,1] = result.testResults[i].input; - data[i,2] = result.testResults[i].output; - data[i,3] = result.testResults[i].contestantOutput; - data[i,4] = result.testResults[i].usedTime.ToString(); - data[i,5] = result.testResults[i].usedMemory.ToString(); - data[i,6] = result.testResults[i].res; - data[i,7] = result.testResults[i].points.ToString(); - sumPoints += result.testResults[i].points; + string[,] data = new string[result.testResults.Length + 1, 8]; + string[] header = new string[8]; + header[0] = "\xB9"; + header[1] = "\xC2\xF5\xB3\xE4"; + header[2] = "\xCA\xEE\xF0\xE5\xEA\xF2\xED\xE8\xE9 \xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2"; + header[3] = "\xD0\xE5\xE7\xF3\xEB\xFC\xF2\xE0\xF2 \xD3\xF7\xE0\xF1\xED\xE8\xEA\xE0"; + header[4] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE8\xE9 \xD7\xE0\xF1"; + header[5] = "\xC2\xE8\xEA\xEE\xF0\xE8\xF1\xF2\xE0\xED\xE0 \xCF\xE0\xEC\'\xFF\xF2\xFC"; + header[6] = "\xC2\xE5\xF0\xE4\xE8\xEA\xF2 \xD1\xF3\xE4\xE4\xB3"; + header[7] = "\xCA-\xF1\xF2\xFC \xE1\xE0\xEB\xB3\xE2 \xE7\xE0 \xF2\xE5\xF1\xF2"; + int n = result.testResults.Length; + int allPoints = 0, myPoints = 0; + for (int i = 0; i < n; i++) + { + data[i, 0] = result.testResults[i].id.ToString(); + data[i, 1] = "<pre>"+result.testResults[i].input+"</pre>"; + data[i, 2] = "<pre>"+result.testResults[i].output+"</pre>"; + data[i, 3] = "<pre>"+result.testResults[i].contestantOutput+"</pre>"; + data[i, 4] = result.testResults[i].usedTime.ToString(); + data[i, 5] = result.testResults[i].usedMemory.ToString(); + data[i, 6] = result.testResults[i].res; + int curpoints = (result.testResults[i].res == "Accepted") ? result.testResults[i].points : 0; + data[i, 7] = curpoints.ToString() + "/" + result.testResults[i].points.ToString(); + myPoints += curpoints; + allPoints += result.testResults[i].points; + } + data[n, 0] = "<b>\xD1\xF3\xEC\xE0\xF0\xED\xB3</b>"; + data[n, 4] = "<b>" + result.usedMemory.ToString() + "</b>"; + data[n, 5] = "<b>" + result.usedTime.ToString() + "</b>"; + data[n, 6] = "<b>" + result.res + "</b>"; + data[n, 7] = "<b>" + myPoints.ToString() + "/" + allPoints.ToString() + "</b>"; + h.AddTable(data, header, "", 2, 0, 5); + h.Title += myPoints.ToString() + "/" + allPoints.ToString(); } - data[n,0] = "\xD1\xF3\xEC\xE0\xF0\xED\xB3"; - data[n,4] = result.usedTime.ToString(); - data[n,5] = result.usedMemory.ToString(); - data[n,6] = result.res; - data[n,7] = sumPoints.ToString(); - h.AddTable(data, header, ""); + else + { + h.Title += "\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"; + h.AddParagraph("\xCF\xEE\xEC\xE8\xEB\xEA\xE0 \xCA\xEE\xEC\xEF\xB3\xEB\xFF\xF6\xB3\xBF!"); + } + h.AddHorizLine(); + h.AddReference("http://acm.lviv.ua","<small>\xC0\xD1\xCC \xCA\xEE\xED\xF2\xE5\xF1\xF2\xE5\xF0 - \xF0\xF3\xF5 \xE2\xEF\xE5\xF0\xE5\xE4</small>"); - h.AddReference("http://acm.lviv.ua","<small><small>\xC0\xD1\xCC \xCA\xEE\xED\xF2\xE5\xF1\xF2\xE5\xF0 - \xF0\xF3\xF5 \xE2\xEF\xE5\xF0\xE5\xE4</small></small>","right"); - - StreamWriter w = File.CreateText(result.Submit.submit.id.ToString() + ".html"); + string dir = "IoiResults\\" + result.Submit.form.ToString() + " form\\" + result.Submit.name; + Directory.CreateDirectory(dir); + StreamWriter w = File.CreateText(dir+"\\"+result.Submit.submit.pbolemID.ToString() + ".html"); w.Write(h.Result); w.Close(); Modified: ACMServer/trunk/ACMServer/Runner/Class1.cs =================================================================== --- ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-04 17:28:44 UTC (rev 489) +++ ACMServer/trunk/ACMServer/Runner/Class1.cs 2009-02-04 18:49:19 UTC (rev 490) @@ -211,12 +211,14 @@ 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); + 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; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <br...@us...> - 2009-02-04 17:28:49
|
Revision: 489 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=489&view=rev Author: brus07 Date: 2009-02-04 17:28:44 +0000 (Wed, 04 Feb 2009) Log Message: ----------- Change timer because old timer not work. (timer for show connect status) Modified Paths: -------------- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.resx Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs 2009-02-04 16:57:31 UTC (rev 488) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.Designer.cs 2009-02-04 17:28:44 UTC (rev 489) @@ -28,7 +28,6 @@ /// </summary> private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage(); @@ -38,7 +37,6 @@ this.button2 = new System.Windows.Forms.Button(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); - this.timer1 = new System.Windows.Forms.Timer(this.components); this.label1 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.portTextBox = new System.Windows.Forms.TextBox(); @@ -133,11 +131,6 @@ this.toolStripStatusLabel1.Size = new System.Drawing.Size(37, 17); this.toolStripStatusLabel1.Text = "xx0xx"; // - // timer1 - // - this.timer1.Enabled = true; - this.timer1.Tick += new System.EventHandler(this.timer1_Tick); - // // label1 // this.label1.AutoSize = true; @@ -198,7 +191,6 @@ private System.Windows.Forms.Button button2; private System.Windows.Forms.StatusStrip statusStrip1; private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; - private System.Windows.Forms.Timer timer1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs 2009-02-04 16:57:31 UTC (rev 488) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.cs 2009-02-04 17:28:44 UTC (rev 489) @@ -5,11 +5,14 @@ using System.Data; using System.Text; using System.Windows.Forms; +using System.Threading; namespace AcmContester.Plugins.TesterPlugins.SocketClientGatePlugin { public partial class SocketClientGatePluginUserControl : UserControl { + System.Threading.Timer tim; + public SocketClientGatePluginUserControl() { InitializeComponent(); @@ -60,16 +63,19 @@ SocketClientGate gate = SocketClientGate.GetInstance(); gate.CreateClient(textBox2.Text, Int32.Parse(portTextBox.Text)); gate.Connect(); + + tim = new System.Threading.Timer(new TimerCallback(timer1_Tick)); + tim.Change(0, 100); } private void button2_Click(object sender, EventArgs e) { SocketClientGate.GetInstance().Disconnect(); + tim.Change(0, 0); } - private void timer1_Tick(object sender, EventArgs e) + private void timer1_Tick(object state) { - MessageBox.Show("!"); if (SocketClientGate.GetInstance().IsConnected() == true) toolStripStatusLabel1.Text = "CONNECTED"; else Modified: ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.resx =================================================================== --- ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.resx 2009-02-04 16:57:31 UTC (rev 488) +++ ACMServer/trunk/ACMServer/Plugins/TesterPlugins/SocketClientGatePlugin/SocketClientGatePluginUserControl.resx 2009-02-04 17:28:44 UTC (rev 489) @@ -120,7 +120,4 @@ <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> - <metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>127, 17</value> - </metadata> </root> \ 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-02-04 16:57:38
|
Revision: 488 http://acmcontester.svn.sourceforge.net/acmcontester/?rev=488&view=rev Author: brus07 Date: 2009-02-04 16:57:31 +0000 (Wed, 04 Feb 2009) Log Message: ----------- Clean Main form and added Logo to Main form. Modified Paths: -------------- ACMServer/trunk/ACMServer/Mediator/Form1.Designer.cs ACMServer/trunk/ACMServer/Mediator/Form1.resx ACMServer/trunk/ACMServer/Mediator/Mediator.csproj ACMServer/trunk/ACMServer/Mediator/Properties/Resources.Designer.cs ACMServer/trunk/ACMServer/Mediator/Properties/Resources.resx Added Paths: ----------- ACMServer/trunk/ACMServer/Resource/ACMLogo.gif Modified: ACMServer/trunk/ACMServer/Mediator/Form1.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Form1.Designer.cs 2009-02-04 13:56:55 UTC (rev 487) +++ ACMServer/trunk/ACMServer/Mediator/Form1.Designer.cs 2009-02-04 16:57:31 UTC (rev 488) @@ -28,86 +28,77 @@ /// </summary> private void InitializeComponent() { - this.button2 = new System.Windows.Forms.Button(); - this.label1 = new System.Windows.Forms.Label(); - this.button3 = new System.Windows.Forms.Button(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1)); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); - this.textBox2 = new System.Windows.Forms.TextBox(); this.panel1 = new System.Windows.Forms.Panel(); + this.label1 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // - // button2 + // statusStrip1 // - this.button2.Enabled = false; - this.button2.Location = new System.Drawing.Point(12, 12); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 2; - this.button2.Text = "Start"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); + this.statusStrip1.Location = new System.Drawing.Point(0, 432); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(525, 22); + this.statusStrip1.TabIndex = 9; + this.statusStrip1.Text = "statusStrip1"; // + // panel1 + // + this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.panel1.Location = new System.Drawing.Point(12, 109); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(513, 320); + this.panel1.TabIndex = 12; + // // label1 // + this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(122, 17); + this.label1.Location = new System.Drawing.Point(374, 15); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(23, 13); this.label1.TabIndex = 3; this.label1.Text = "IP: "; // - // button3 - // - this.button3.Enabled = false; - this.button3.Location = new System.Drawing.Point(12, 41); - this.button3.Name = "button3"; - this.button3.Size = new System.Drawing.Size(75, 23); - this.button3.TabIndex = 4; - this.button3.Text = "Stop"; - this.button3.UseVisualStyleBackColor = true; - this.button3.Click += new System.EventHandler(this.button3_Click); - // - // statusStrip1 - // - this.statusStrip1.Location = new System.Drawing.Point(0, 295); - this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(369, 22); - this.statusStrip1.TabIndex = 9; - this.statusStrip1.Text = "statusStrip1"; - // // textBox2 // - this.textBox2.Location = new System.Drawing.Point(151, 14); + this.textBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.textBox2.Location = new System.Drawing.Point(403, 12); this.textBox2.Name = "textBox2"; this.textBox2.ReadOnly = true; this.textBox2.Size = new System.Drawing.Size(110, 20); this.textBox2.TabIndex = 11; // - // panel1 + // pictureBox1 // - this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) - | System.Windows.Forms.AnchorStyles.Left) - | System.Windows.Forms.AnchorStyles.Right))); - this.panel1.Location = new System.Drawing.Point(12, 70); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(357, 222); - this.panel1.TabIndex = 12; + this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image"))); + this.pictureBox1.Location = new System.Drawing.Point(12, 12); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(330, 91); + this.pictureBox1.TabIndex = 13; + this.pictureBox1.TabStop = false; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(369, 317); + this.ClientSize = new System.Drawing.Size(525, 454); + this.Controls.Add(this.pictureBox1); this.Controls.Add(this.textBox2); this.Controls.Add(this.statusStrip1); - this.Controls.Add(this.button3); this.Controls.Add(this.label1); - this.Controls.Add(this.button2); this.Controls.Add(this.panel1); this.Name = "Form1"; this.Text = "Gate"; - this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); this.Load += new System.EventHandler(this.Form1_Load); + this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form1_FormClosing); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -115,12 +106,11 @@ #endregion - private System.Windows.Forms.Button button2; - private System.Windows.Forms.Label label1; - private System.Windows.Forms.Button button3; private System.Windows.Forms.StatusStrip statusStrip1; - private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.PictureBox pictureBox1; } } Modified: ACMServer/trunk/ACMServer/Mediator/Form1.resx =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Form1.resx 2009-02-04 13:56:55 UTC (rev 487) +++ ACMServer/trunk/ACMServer/Mediator/Form1.resx 2009-02-04 16:57:31 UTC (rev 488) @@ -120,4 +120,184 @@ <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + R0lGODlhRQFYAPcAAAQOtASCRLwCVISGZCxOdEyChJQ2LMQKDKTWLESiXDx6bEQC/MQqHNTSBCSOTGSi + fLw2HOQCBBwmtHROPIxWNKzaJHxmPGyGdEQi3GSybERinCyaVMTiHDwepBSOTIQCpEySVNTuFBwStIym + NLQ6JMQWFOQSDHS2bFSmZKy2DERGxMQORDxqfNweFLziHGx2REQ2zOzuBAQC5BSKTJwqJHQCvDSWVPQG + DIRmPHy+dLS6HAyKTFyKhJRGNNwCBCSWVDw+pLTaJDyaXEySdHy6bExStFxmrHR+bOz6BLQeHBwOtAyG + REyiXEQW7NQiFCQqtGxaRJxSNEQu1FRirMzqHByOTLQCbLRCXFyuZAwG1FyClJw6LMwKBMTGFOTmBCSS + TGSuZNw6ROwOBCQizJRWNHyaRGyybExerDSaVMTmHJwWbBQW/KxCJPwSFHS6bFyqZLyuFExGxOwyNHR+ + TEw+zPQKBLy+FLTaNEyabFRynPz+BKQqJEymXHxiPBySTAwOxASGRGRyhHQepFx6RGSWfIweVKSyJJwC + jNwaFExunESeXBQevNQKNOwiJEQO9LQmHDRSjMwmNOwGHLSyJIw+NHRiPMzODPQaHNzaBGR+RKy6NNwK + DEQe5AQC/Ewm5NzyDPwCBJxKPCQitLzeLPTyBIxiPPT+BFSCjEw21FSSfFRSvEwu3OQ6PKzaNCyWVHR+ + fFyOfMwODExipKxGLExKvFR2lFSqZLTeJDyeXNQmFJRaNGy2bMTiJHy6dAyGTCSSVGSubDSaXHS6dEym + ZBySVAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + ACwAAAAARQFYAAAI/wADBAA0UGBBgwQRGhSYsCDBhgwdHjz4MGLCihQVWlw4sSHEjhs5QvQYkaNIjSUl + jpx40qRCkiUxpsRIM+NFlyFrLrx5cydInzNtpjQpkyTMlTmFDn2J8+dQpD1ZSgwa0qnKpDGvwpz6sarW + jRWRWtWJkiXUq0CzblWKsmhZs2ClrpW6tOzHrnTRwrXbEuTdtn3FNn3bdC3elb5w4mVKdWhioDV5Dk66 + +KzPuZi9Krbq9zHDx54D+GqY2CNog6ddega0ujXC0K5RT/S8evZr2QlHP2a983Ru0bIFlv48sHZojLSF + K4eYnPjyiM2VB3c+PLR057Z77l5ofLru6cWfW/8HLpz39YeJR4sGxH69eODqRxMEPb+++/TzgfNWv0Q/ + fvjKxVeeff39J2B1B6lXkHr71YfeQO0dGJ6AASzBG4EA2hdfhAO6V+CCDuGn4X0kVphffib+B1996a23 + 3335baifezSOSCKKFqqooH3r5cgeIBay9p1urBUpX5Gs+UhkkuzJd+SSThrJXpCj+YgkkS4SCWWTUkq5 + xHdKAonklWFqeeGYUaZ5oZpVksmlmG2ymSOERFrJZpdfchmllVe+iaaUT75ZJ28+lulml3H2WKSSXzbq + y6N5OrpEo5H6ImmVlmJa6aWcZppjp0laKmmnk+omqqehTupoqJ626mimqbb/CqSrtM6aJ62Uwooqrrfm + ummtnq66aqaaakoqrrLCeqyvtBZrq7PMkiptqZfu8KW1y1qLbKPaSgtppt2Cey23loY7rqq+hFvuua5O + am6w1I5K7BI7BLstruG+K6+j75prLr3V+iowstbqe6+75AL8rcLY1uuuqNG2++2/Dov7aLdLzODwDNyO + qnGjHFsa8pcjf0yrtuLWGzLKIG/brbUjZ1wxyJxunPDLnmos8rozjwzzwjOITLMvHM9sbsk7Zyxp0JLC + 3DHTSS+dNNMyZyz0qU+TivS+Lovq8KQfM13yz0rXjLW6Vtdbb7qPBn0x24+2/TbbUKsdd9Buu0303nHf + /y033Cr7DbfedvcddOF5A/734HIXvrbehwvO9g56K7722ulCPvflcE/+Jd3lGh534fTuXbrnb2OOstqJ + p54456DjvXfgsjOe+ui4q5473Z8H3ja9OssuvNzCU0407XwPj7fKtD++9/LPR1+89NRrbL30yA+PffXR + J9+98twvX3vw4ZevvPPgp2/+9sZPr/7sxAeeffjtrw/+8+1Trr/1+/N/ffHWC+D+BjgDARqQgMfzHwEp + d0AFim+BDuwfASPovwYyEIIYNCAFEUjBBF6wgAXMIAQ96D8S9o+CD6wgAzW4wg9OsH4ONGEIVfg/ENrw + hjjMoQ53yMMe+vCHQAyiEP+HSMQiGvGISEziEFeoxCb20AM7hKITCwhFKebQilN0IhZvKMUtZlGIXvQi + FZMoRiOKsYpFLCMRq2BDNhbQjSCEIwiJ8UYeylGOO8TjHXMIRy/qsY1xBGQdBcnHG+JxkHacIyEF6cY9 + SvGQbDzkDNT4x0HS0YamyOQMJIlJTU4ykIgEIygtGcpBchKShtzkDOjYSFMiko0eaOUqVUnLWaoyknVs + ZStjmUtasrKXrbykLOGIS1zScpi3LOAvj+nKYtaylsR0JSMB6UZhjrEKHrAmFY0ZzWhCcZiZNIUuTemB + cH5zkrtMJjHGyc1B8lKOvGSmNKvZy0A20ortdGYk35n/TGbi8p381Kc/+2lMV/4yn8ncpz2BOVBnqvKX + 1kSoQPfJxoM+dJP8nCVFI0lMjlZBoR7lZSwnGstyZvKbJaXoGwN6z2JaEaDoxGgxP5rQmgrUoi7N6Ud3 + WgVWrvOnm8TmT3ca1Fiu86NGFSpPsYnUnio1m0o9KlNH2tSjWpWjRt3kVaHK1avScag9XaVT1ynWkSbV + qUHlaVfDutV1QpWpWAVrJH2q1p2GM5M7ZWUV7srTcO4Vr9j0a1PhKljB/lWch/2oYQUr1cTaFbCK5etZ + kepWsH41qlrNbF6XytnOOtWzoA2taEdL2tKa9rSoTa1qO3tXwx6Wr5FtrThb69nC/0LWtohdLGT7ulvd + 0na1om3sRx1wWuLy9KqobawDpKrcnS73s8b1LHGFWwXjRte6oI1uZ6Pb3M1KVbvV5Sx4w0vdzTqXs729 + LWD9SgzYuhey6yQubh+b2/Vm8qh+Ba9rbftZ1wp3vOcd7lLB61ViPNfAVfBDFX7xUQVbdbrVJcYXqnAA + LlBiwgtOcBUgIYNOdEICH2UwT43LYK8K+Kq/GKqI47vOEjf4s5bNcIZRrOKPtjjEn1WwiHHs1BV/1sU9 + tnGEZ2zj6R5YyCt+Ll8dwNi94hev6wzncpmM1x1HGa8ThvJflZxJEVf5ryamsji5bAq5vva5O/UxioVM + 47HieP/KCCbuL/wA5ykv2MB4zvBzoXADUPj5BgZIsAP8AAkPG3oROpawHwwRAz3ogRQjWC6DJ91TSotY + zj2FM3knbOkIT5nON0YwpcNbYk0bGc/PnfSNS51hShvY1abONKrj2+oZ21m2ZU4speXsVwaz97CzXm44 + 8exX9oo5w8XuchU4jexMprrXC8Z1q4nR6TqL2tO0Xi6zV71gP1C71qW+trUd8IUI+PncoNjCoBVg6Haz + gMEOcEAXHE3vGFR33HX2w5wZ/AVKf0HCr651sAdOblTrW9/L9jfAHdDpXcOb4Bn+N8L73Wp9G/jfn953 + rZn9i7t23NkfN8WnFx7OSUv5FyH/H7eUr2yKkJvc2QYO5xegHe5hM/ywGL9re5UNb1kPWuEZj/jCr93v + X/T76EZPetGXjnKkLz0J6EY3Db4AgHYbOgtf6LcX6M31ETi96Upv+tGX/nWmlx3sZ0972MOudrYn/e1m + dzvS1450hidd5kYv+cy7XPaT773lXxCz20t+d5HzPe+ZRHqXuyx3mWv75HoXvNvpDvdf2H3uWae82jP/ + dbZ/AepR/3MgrG5oGaB861yndwPATvm3o5z1Ra983M/u+rijvfWdz/3t1y733sd+7C5HOeEJL/zX693l + /cb764V/+JAnvvAth/7zY298xjM/+sRX/uYnn3ncL//74A+///hLEHo/16EDpDf0FwyReq57ofKs773s + We8K6otf96+3f/55v3/X894Vdhd/4nd/KOcKyzd82cd4CBh9wRd8C3iAHld9DOh8E7iA2PeAzrd8BjiA + 3/cFP7CBvxd/GziCv7CBBViCKJiCKLiBsVB+oHAJIpB+HvYKpNB+9GYJv/ADX+AKP5CCJkiCK3iCJbiD + b2eAJDiCPWiEJ3iES9iETceEBUiEJ9iDPiiEQFiFWBiEuNZyBohrGxhORkh4rvCAY5hJJAiGJ4iGBSiG + 1/eFW7iGuKaCVQiESqiBVuiEdRiEQciESugDLigHWSCDa2AHNkhvXQCFSpiIKviDdgiFe/8IdvXnhIu4 + gkSoiHdoiXnIh5Ooh3LYhQrIeJ4Iig2ohmiIgWHYZUrIhi6XiqhYgndVhqZggiUHi3jYiE2oiHVohB/o + CjzIi764i73Ii8AojMR4AOV3A2HQYelHCzVYiHowjCX4i9JIjL5YjdZIjcEojdF4jdPIjR+4jdUIjtiY + jeRojdE4jObIjdU4jOzoi+D4gehYjsAYj9QIjNsYj+3Ii+Joj92IjehIj/o4jbs4j+uojgZ5kL7YAy6Y + jDI4AM6oB5jAjRWQSXpgCnqAkL5Yka+Ikbz4CXelBy7Akb6IAJn0CQhJkhYZiyK5kizZki75kjAZkzIp + kjZgkDWJkTf/uZDKaHVrMAkPqQPVSAXhpJGthZAUmZKucJPXeJM1mZIaGZLXuAFL6QooaZJR6Qq3MJRm + mJQ4OZO+qJQcCZYtKZW8qJRi6ZVhaZNqWY1MeZA3SZa+KJVvGZdlKZUbUJN2yYvmFnoMSXpjgHqFyIto + EAQpWZgVeZgW6QJKSZZSWZglGZeLyYtk+ZGmEJJkaQNwSZe8WJV5qZRZSZQWmZmucJeSqZlcKZqkWZqj + +ZWqWZp4OZdcuZrBoJqYOZpziZdXSZtw+ZrVKJeriZvViAZ1aZutKZmRaZqruZpwiZqnyZqYaQOziZfC + WZPBUJO8+ZxlyYs0UH6ssJPtJgqNVoia/3CXHnmUWxhOVOAK05malBmL0Tma0UmaNiCUjqmYp2mdd+mb + wokAFfkJ1mmbd6mR/kmcz5ma8pma15mfpxmfbbkBDPqeqTmd9zmh10mgBKqg1MmV78mbrjCbEIqfXJmh + SembCYqd8Dmi2ImZDBqiBwqdFHqXwjmbcpmaHeqLwokGvKmgs4kG5XcJSpB+QOCMXqCeHkmUCHCXBWoD + RZpJt1CTMdqhjmmR6/mf+YmZ5lmRIfmkmHmjKNqhVZmkSbmk2OmhxFmdNfqkaBCfZ9qlTnqm71mjMwqm + O1qlUjmb6lmjtWmnMSqdeEqaT5qfDIqhpCmjeVqlarqjdyqcg0qlY//Koq/poGsql2S6AYpanTAaDDiK + qZiapmiQptBJqdDJqaGKo3sQem2AfqQnCs2YeqTQqVkZThxQnVuKo5mKBkfZqdXZqTbQnp/gqZ2Kqzag + qxT5CU/pq7panZsaqjbAmbS6qeFkrLQaqpZ6rMFqpsBaq9jqq9a6qbWaq8GqrLIarbmKqcHqqbnqqZSa + qeV6rpZarTZQruqarMnqq+9Kqx0qqriqrqJKqZoqrfC6qeQKnd+KrGmqntSqqb/KqQkLsAn7qwzLqcHA + BaF3Bd7pYU+QAu3nBb9amBWgsPkaDAgbTr36sYeJBEigkQ6br5waAuHkAhTpAhCrsAjLrRNpCv7/ibBo + 4LIVmbIPy60M+7AxC7IfK7NDO7Q9W7Qq67PKGrNMi7NEK7ROG7VIO7NDK7Aea7RJ67HcyrML26m4QLRC + wLBCwKlhm7Jju6m4sJfn1giB2G4yAAtoEJ6O1gWYKgRpAKu/+rVl27BosKRUe1coaQpUiwZjm6YUiQQu + UKwqS7QKy5+mgAQPq5EIMLiYiguburdb+7WVy7dM67WLq7kpC7GDS7g/26mFa7rcerpXiwZf27kJW7ap + O7qnC7Svm7pay7hFa7mk67G6Gwxny7oxO7agO7zB0LqcCrqbgG4+cAF/cHUEkKZzAAeWoANlULjBcKu+ + +7Gau722mkmEC7y4/3BXQpCSnzC8aVq4KekCLpuYwJumrfu+eVuV7RsMdyulwLu5xnu268uk2TuzZxu+ + 3vu9p/u1KUm2GnnA5nlXHdu/3+u4FZkG5+u+EVy85xsMS0oF/Qu6rYXAWqkHCFC4vSsEJHmYEJzBEWyr + FXm24xtOv8u6dYur8Pu1liu84Ou5NNy6wkvB8DsBj1ACPWACfSAEkAAAhXAEwssAleC53xtOaSDD2SvD + wDvA7au3wUCUwYAEBUzDNEyfpoALHJC+Y0vDUWy6wOu4nwDCKFyZYVzDqBu+iImYggvFUJzG8Pu9rMvC + wGuYV+qUpoAAY4wLWAyaFDnHhOy4HRzH3+vGev+sleHkx+0rBIG8wV08xaQbTsV7yGocw4+sxayrtzIs + BGGst6wLyqMMvkKAC8J7yqxrAhQAyhTAALjwtU4wCLE8yrhAmCksyqqcyoSLyqhMuLt8xxaJBCIcTr5c + wwCsB8S8vxwgw5/syaqMylXpy0JQnqZQw2F8yqd8t4J8lHpwC6HcyyvcxdF8yr+ckr88zpIsWxUgvKgM + mnCcSU1MytqMC/UbpcZcvGO7hXCske0MyqjsmIKsB/PszuNbkYosyWdMynqrzZ0cy7FszhA90RMt0RR9 + 0RQtBE5AArHcAhYQy2KA0SybSRgd0Rld0rFMlCmdSUhg0ib9lLigs5UJ0fX/XNJCUAH9CdFcjNIQ/aok + TdF3VdKHydPGbNM128VEXdQTPdLfjNHh1NITnZJQjdE3rdRCbdWxPNKmcAs0HcuMTNFLGgI8PdZkXdYX + zQCwjAshjQt1gNGRbNZjrQhBjQtLOtGKEMv0qQex/MWZ1MxwHbh8rNe4cNeD7dQ5jdHW7NQ/XdLojNIT + idAUTdiAnElUgNIaedHkq9hIXdKPvdlunUlizdiQHdUaOdUTvdNxHcsJEMuSLdmFjQurDdGE7dqyzdoQ + zQaIgAuzQAKKAAq2zdpPDdGxTdixrdpjXZiFfdmYXZFQnbiJ+dq0/dqD3dmgGd2/jQtaXdKrnZJpUNwr + /+3Zri3Xiw3bv33U0g3Uj0vRxZ0A9dvExa3Urk2fUD3bEG3e1g3Apk3ehN3e5O3V8E3RJ2sKoW3dw23c + /a3fv73aBf7aCp7gsE0GJjAIJmABa/3b5LvaxP3bdx3bGG7chD3XyYwEDQ7bsDrY+5sGGU7eI07YR53A + CHDXG97f2w3ZHQ7jsVyzgt3hFJni743QHc7gOE7fKo7FXRzjte3Vo60IRN7d/U3cxrzgqx3kDp4ARF7Y + 3t3fQ23c6cvgDG7MPC7jKt7kDT7mXN7gNk7mhW0BdUACdSAGZEACEAABZDDYwV3gHV7jYK7icq2RGE7k + Rc7aWo3hX4ylYY7nZl6zn/9w15+ZSRWQ5xgeTopA5mZ+2TGuCJRe2JUO6WCO4ThN0mae3BZp5gkQ6Rie + AJo+40id4Z8e44d+2auOC3yu36OeAKV+6iSeSZKu34dJ5jCuCL7+68D+64Md7L8+675u7MYO7MiuCC9w + bi2QCZGeC5Hu58G+7NYe6di+4XeF7aZekdyu5MOM7c5tCihO7N9+7Irw2J8w6pF+lOxO7N1uCu9u7qYe + 6tke77Se79yO7+eO7Tie7NzenoHNx8YO6d8+7wf/7Z2d7ehe70QZz3ws78KekuZe7I0M76Se7xq/8Rzf + 8bS+7xmv7x8/6k5QB6AQCbM+CxaQACxbkR7v8Qev8YX/Oev1/rg0n5IhMOv3zAEvH/KjjugaD9ge3+nr + /vK0Hk4VEPKUCc9D2fMLT/MyH8/dfFdRL+9GD/M/H05Qr/EPL8nwvPEUefVFWgEvzwQeb/YJgPZnf/Ua + r/a0rgERIAk3wAhOAAIJQAa6kPZan/ZsT+tu7/c1b/W07ud+zwt7T+uDbgo83/e0TvTDoPHlqQef8Pgb + D/RXf5hkz/X43M+4nu9/f9Qvz/R7PPNor/V/z/gJ0Nkvn8AcnMBtn5KA3/HlmflXT/mnb/uev/Fqj/a4 + r/E4EAoCIAAfYAWHEAoQEAVOgANH/8D53vt8nwCUnwAa6fak7/f+PPh7b/b3nAbO/8/7sQ/0Zo/2RJn7 + jW+RRf/83l/zFbD7sjX1nX/6TKD6aM/+mTT/uk/++Q77+G//6O/5hInrAMEkwUCBCYbpMWVqWIKCDAkO + dBgxQUJTDR8S/GRKTwWJBQV+dChw4cKCJEMaHMjH4ciHIg3O0iVowYIPahKUioIDJRKKLk+CFMiHpykk + KydSRLmQIhKBGk2FcJnGaZqBJl1eTVAB4SeIIJ0yRfmx58mWExEmHei0LMuEesIazYpQIcqTak+axLsS + KUiTCVRidVnBad6CbbvSdUnYrCmjQI8y5huRCUuVwwizxMxwJEnOfg0CVTGzxgqWIrUmDEGyMsrVTBDI + rVDaaf/FsBkRMjk9d6TUhByYTDaYGfgw3Ak/TR7OZKip2J8Nqm3NBzgTPnKvMqFIfORV65hJFk8YFrjK + nps1hyXslHrYysoTukjKOQhSy43LT+6smGT2j8LVt0dPOuSI+20Y6bT7bUDkFiyQQAUNHHCmmaxIsMDf + KNqowQERHAbDAwukSKEKO0yoguWoS1AqhNJAMUEHGRxmPj0++RBBp/RwUTqKENhwQD4E0+jDydQjTkAC + D9LIxRGZuEO9Amsc6pMXF9SOjyPdM4WKHrVzUsDJpGvFyS8X5GlGL8es0schEUIgzTQpqtFIK6380kA7 + 6bxzzjsts4zOOfHkI1AD+cBAQk7/+EBB0EB/lCtLy7Yc0qnYFO1QLj2tXIqiEBC1kzdTOOjzThT2FFSw + Ge2kzs4QNKV01SCLPNDKSp/qc044SRU0u0sHHQZIPXgFdD6NcOXVqUQNzA1W5KyUy8BRKRVWjz+BFVah + aZcl0RRBIyUq1QeHogLPOv88ltxAE51zVHTL/a0AXidD17JnLTvDUPzsPNY2ilwYRl15lzPlk2PLDdFZ + QVdFKGFS00g4DUp3RXTOJgMu12AkEeLzXKek5PPRYTJKaF07Fd712GbP1TPRaue1cl25fu24X8uipLSt + EEaNmaJwSVVZ13kJbrZjWVFAYqtBE70xNXwtQ1hbZ49O10Bb//iY+tlnbZE6akRtYUIFRxZQ4epAq140 + URQkXICTYaaO2ODlEg6xra8s5nQ2q6WOG4l+qUbU0zT2TnRqrNvmVEYp+WYZSKLMNtAFu2VGIUynXOC0 + bYqsJhyFtmSOeN7Tfu18bAMRwNAFf4ch3SmqDU59Rn9ReDnwzu38nHOxUWjdFNMhTz3kyrM17vXlBkeX + +L2xlnltyOW1zBackW8C7QUSQVR2s0OXQkINOMV61O4/bvTG2Yz73l9bCn7eMrn1SA3nUVU0JY3Xmfce + ciAFLh/y5dqU2RZP4cZQ/PiENQIOxn3KG1V2vlc+xSmvecwbxsTiBkCF9E9mVAgRBSuIM/8E9quB80te + teD2soQwr4AIaRoAEUKF5HWvcyhAgfNgKEPn2aKGM+zXDGEoha9JSApDqFoQYxjDfqGNEzLU4RCHKLe4 + OaUV/arhDTV3OSTC0FUJqaLz/EbEIdqwi0q8xVa4GMUhwi2JMAwfAJNYxbbE8IY3lAsMx+jGWxhLiUik + YQAb5TopKvE140sIEqRIwxnWESF3RGQMwxe3TwwShpfrHRMT+cYu2tCLg8RkFIdQAOktQIeUdB4dpGdJ + S1bSjTH8xAgRUEpMKtJYpKyhGVmJAgyu8JJ3BKWwGknJU4IsS25kJQb39cUoWpIiNKRkW0j5RRSs7I3L + vKEITTFDMiL/s4ap1MjNrPnMZl4OmMCkZBBGSE1wxtApXszNLstZTVi20522eMM7eyghFZyBlTZMRPak + V4R39tOf/wRoQAU6UIIW1KAHFWg84YlQhjJUocbEYkNtGM+HVtSSD50oRW0hi9CgzREooCgKYNBJCTVh + oRO9KDw1elKULtSiJ9WoRV+q0JimdKYoXalLUwpTneJ0pzTtaVCBqlOZ/tSnRW0pRlu6U6EyFalOZelN + l7pTpyj1qTcFqkaxYIutKrSr7sRDJ+HpNZKOcqU5TelXa6rTrS60rW09q1tR+lafsnWuNoQrT+OZV7r2 + VKt35Wpd/yrXwPqVsHvFq2ADC1S12jWu/39tLGIdq1e58vWoCz3mZLN62DdsFQt7pWhNP6vSN3S2tJ99 + wxBGKqF5dpIT+lwALbja1a6W9rSIDe1idTva0ea2s3IFLVdjStGvFje4vi2uW4+rUngmN7i9Ze5vcStc + 6iIXuNSFbmmbe13t8ja3tI0udn3L3e1Kl7neDS9uuwveN1SVvec9LnFJa1osfNa+na0vfU2r38/WoqNl + bQItUvEG2DrCtvfVL33va9/8Ivi2DVbwgm2rYP5CGLUPlnB9JXxg/FZ4wxj2cIJBvGALT5jBCUZwhimc + YRWzWMX83W+LO/zhBVOExCiecYw1nOITjxjCM46e9ByhglPsF22J0P9whPHL4w5jeMc6bnKEk4zaBl+Y + wU+mco+l/OMqc3jHXNbylad82jAvecwztnCXc5xjJqM5yic+c5XhXGYxxzhhYF4ylKf8ZT7XFxh9BnR9 + aSHkPq92AbIIdKD/vONFY6HRfH60ozUcaUZ/udGUnrSlMw3oSF9a0Zr286crHWpOg1rSXzZzqBUc6VQ/ + +s+L7jSfKwzrRGvYxpCu9alP/WcwYKHXi+61r4X96voG+9dYSEUqOlkASff6vwso9qmPDexoV5vUzZa2 + hoN9bV5n29q67ja1v+3pYwt73Jku97a3De5hW3vdnia2rt+NbnMbm97aLnavgy3uPnc71PqWdKz/hQ1w + gPvaxgVXN7bj7WheAzwDGn64w3cMBonbmw6Foue00UaLiA984hXHQscp7nGPd1zkBI92r00+cJSXXNgn + JznIYY7wl9dc3y2XOctjbvOQ6zzdPQfDU4gCjAqkQeWfaAUYkEBxMHyi53/Wmb7j9mtXjQILo/hERkIg + 7BAg5BZSz6a9Ve7xba+87NJueMhVznSmZ2DtbFd73Nnu9lrsExhuxwJsz0BxvLvd7SPv+835vnZft53w + cz+84eWueLwjfvGDfzwYAl94yDee8YKXfOIrj/nJO97ym6d85n2dAVOMAgxUoELQmW4KimM9AyEIwcgp + rgfJ6wEBFGc97t3+/4nUq54XSHD70pvee1O43fW3+MTfJ6/8zH8+80ynvNqbP32/U1/y1Wc+9iXfyTxk + vl4zcYT1/a598lNf++I3//TRj/3zl5/96nd/89u//uvDn/4ZOP/9yx90v7N+FFTIgE8IAb/LiN6rvhDJ + vOJzu9zTgyAIAeADg1EQPtQjvTt4QKa7hdTDuvWLvw4cPA90OzOwP78TwfI7hUHzobsDA7SRguebvxBE + vxL8QMmTQe2TQeqrwem7QezLwerbwebrwcz7QRKMQRcEwiLMPhpEwhnMADMgvQTEv+IrPr7jiVHAv+ZT + wBBIvicEAzNQwIBxQslDPvxDvaBbOvzDvxAIAv8zcD0dvD/x88Hrwz8nbMI5RMM7tMM6xEM6xMMM4AFU + kB63gy1VuEM6NMQ+5ENEzMNC7EM0PMQ9bMQ8TMRFVEQ9ZMRIfMRLbMRMdMRI1MNJtMRKBMUsBMAMGIUZ + QUMksEI96EQvTEPgIz00ZEXSK0UqGAUJxD9Y1INatEIFdIHkA0VQ7ERMFEVJrEMnREZjTMZlPMYM4AS0 + KQIzqLuZUIFktMRDZMZsVMZm1MZP5MZvfERt7EZsBMdm9EZxNEdyRMdwLEdmPMcm3JhjVEAzUMU61IND + pIhRQMbic0Lg68feMEWdocOh4AUvjBtesMN1bMdybEJkdMh2dMJd4MZ1nAL/tAkwtFlGh4zIiYTIDJDI + jOzIjzzGddxIkBTHkhzJkOTIk/TIlQRHlHxIlhTJfTSDZZTAXajJljTJl9TJlDQDx9lJJ+THJqSCNMhG + llRIiWxIM8BJnGTKp2zKmoRKqXzKqYzKmmxKQiirBYgDrJTKq/RKq6zKqfxKr4xKpyTLsDzLsQTLqlxL + tGxLp3zLskRLtxRLs6RKubzLtLTLtcTLsGRKU8BLJGgFwOzLtARLuHzKU8zLsTzMxHRMvYTMuuRLv8RL + v7TMu4wD2EIbT5DMu8zMufzMuhTNy2zMudxLsbzK0FRN06RL0KzM1kxN2YxKPaBM24TNtqRNsrwDJGjN + /9E8zdxkS7Vky10wzqZETuM8AeRkyqZczuZsTuVkTuU0A5I6TuOETuzchefUzuPkzun8zujczul0TvKU + zuwsT/Q8z+5kyvC8TvdMz+5cT/A0z/FEz/asT/jET/W0T/bsz+T8z+yEz/kU0Pwkz/3szuX0zuM0AwVd + zgddUAgdz/GUUAelUOm8UONsrZlQBQu9UA+FUBDNUAutUOks0Q/F0BBN0RE10QklURdtURE9URWF0Rll + URStURjF0ReVUR2lUR5dURsVUh+d0CBdUQpV0BFN0gpdUhd9US2oyJlYhTxg0ghVziZ1UCy9UivdTi3t + Ui49AS8NUzAV0zIl0zNt0f8vTdMxXVMzbVM0VVI4rdI3pdM4pVMVfVEnDdMHFYYxPYE+5dMxdYM93U5A + LVQ/7dNdGNQTeABPMIIHMNQ/RVRBJVRJDdRLVdRKjdRNpdRJxVRLzVRPPVRMXdRP5dTlLNVRVVVQTVVQ + dVVDbdVTVdVYFVVW1dRahdVbNdVO3VVSvdUuFYYuJdRSXVRABVRJPdZkDVNALdU+VdZlhdYTaFZLpVZj + DdNpfVZLZdY9dVZu9VZLxdZv1dZr9dZstVZpLVdxPddwjdZxRVdoNddoZddqldd0bdd1tVd6Bdd8fdZt + hVd1rdd//dZzldRFHdRjfdduLVaBJVdkTViGfdg+XVj/h93ThZXYaO3Wiv3Xic3YhlVYjKXWiH1YivXY + ggVZhLXYke1YkeXYkE3ZlkXZjT3ZPWXZmdVYh4VZmn1Zm0XXc71YN+gFaRUGInCDPu0FNwDaolXaEzha + pkXapT3aoVVaYRjUpj1apKVap5Vaqs1aq33ari1aouXaqiVbrCXbrYXask1btAVbpzVbrRXbtHXbtY3b + tr1aup1asp1bsGVbvb1bvq1bv/3asw1cp91bws1bw/1bxB1bxR1cuE1cr33bqI1bpP1TNyCCPyUCrt3c + sJXWzj3azc3coaXaozXdzy1dzB1azU3d01XdpBVd1k1a1wVd1R3d2qXd1I1d0p1d/6BFXdhdXd41Xd99 + 3dANXtwl3trdXeQN2uK1Xdkd3uZV3uNt3eTVXertXem93tutXu0FXu7N3t81XvCNXvF9XuGdXfM93drF + 3F4gAveF3xx43/mFXyKQ3/qt3/ul3/nVX/y13/3NXwDmXwF23/7dXwMOYP8tYAL+XwVuYAFG4AF24Ahe + 4AlmYAp+YP/F4A2+4A624A+GYA8OYRDWYCKg316oYBNGYQZOYBV24BJ23/d94QOeXxlmYQl24RtOYRue + 4R1e4R5+YB6+Yf0V4hkm4h8e4hpGYiNWYiD2YScO4iUW4SKeYikG4AW23xXOgV6Q3xzw4izuYi7O4gIW + Yy8O48wzHmMwtt8v3mI03mIy7mI2LuM5huM1dmM6VmMzzmM8bmM73uMwrmM97uNB1uIyluM7DuRD3uNE + vmNAzmNFJmRG/uM0HmRI5mNDbmRKxuRJfuMy/l8O7uJPzmAaDuVS7mBTDmULRuVRDuBVBmVRTuUQduVT + hmVWHuBZVuVafuVVzmVelmVdpmVfLmFcvmJgNuNjRmZk5uJkZmZlbuZn9uJlhmZmluZpdmZrTuZqxuZo + 3uZr7mZu/mZwDmdt3mZyxmZztmZ0nmZ1hmZ0DggAOw== +</value> + </data> </root> \ No newline at end of file Modified: ACMServer/trunk/ACMServer/Mediator/Mediator.csproj =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Mediator.csproj 2009-02-04 13:56:55 UTC (rev 487) +++ ACMServer/trunk/ACMServer/Mediator/Mediator.csproj 2009-02-04 16:57:31 UTC (rev 488) @@ -99,4 +99,4 @@ <Target Name="AfterBuild"> </Target> --> -</Project> +</Project> \ No newline at end of file Modified: ACMServer/trunk/ACMServer/Mediator/Properties/Resources.Designer.cs =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Properties/Resources.Designer.cs 2009-02-04 13:56:55 UTC (rev 487) +++ ACMServer/trunk/ACMServer/Mediator/Properties/Resources.Designer.cs 2009-02-04 16:57:31 UTC (rev 488) @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:2.0.50727.42 +// Runtime Version:2.0.50727.3053 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -59,5 +59,12 @@ resourceCulture = value; } } + + internal static System.Drawing.Bitmap ACMLogo { + get { + object obj = ResourceManager.GetObject("ACMLogo", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } } } Modified: ACMServer/trunk/ACMServer/Mediator/Properties/Resources.resx =================================================================== --- ACMServer/trunk/ACMServer/Mediator/Properties/Resources.resx 2009-02-04 13:56:55 UTC (rev 487) +++ ACMServer/trunk/ACMServer/Mediator/Properties/Resources.resx 2009-02-04 16:57:31 UTC (rev 488) @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> <xsd:choice maxOccurs="unbounded"> @@ -68,9 +69,10 @@ <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="name" use="required" type="xsd:string" /> <xsd:attribute name="type" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" /> + <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="assembly"> @@ -85,9 +87,10 @@ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + <xsd:attribute ref="xml:space" /> </xsd:complexType> </xsd:element> <xsd:element name="resheader"> @@ -114,4 +117,8 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="ACMLogo" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\..\Resource\ACMLogo.gif;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value> + </data> </root> \ No newline at end of file Added: ACMServer/trunk/ACMServer/Resource/ACMLogo.gif =================================================================== (Binary files differ) Property changes on: ACMServer/trunk/ACMServer/Resource/ACMLogo.gif ___________________________________________________________________ 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. |