|
|
|
|
-- MySQL dump 10.13 Distrib 5.6.16, for debian-linux-gnu (x86_64)
|
|
|
|
|
--
|
|
|
|
|
-- Host: rm-bp13v5020p7828r5r.mysql.rds.aliyuncs.com Database: educoderweb_test
|
|
|
|
|
-- ------------------------------------------------------
|
|
|
|
|
-- Server version 5.6.16-log
|
|
|
|
|
|
|
|
|
|
/*!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 */;
|
|
|
|
|
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
|
|
|
|
/*!40103 SET TIME_ZONE='+00:00' */;
|
|
|
|
|
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
|
|
|
|
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
|
|
|
|
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
|
|
|
|
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
|
|
|
|
SET @MYSQLDUMP_TEMP_LOG_BIN = @@SESSION.SQL_LOG_BIN;
|
|
|
|
|
SET @@SESSION.SQL_LOG_BIN= 0;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- GTID state at the beginning of the backup
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
SET @@GLOBAL.GTID_PURGED='4db4a28e-c3d6-11e9-9fe0-506b4bff4264:1-3881576';
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Table structure for table `repertoires`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `repertoires`;
|
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
|
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
|
|
|
CREATE TABLE `repertoires` (
|
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`name` varchar(255) DEFAULT NULL,
|
|
|
|
|
`created_at` datetime NOT NULL,
|
|
|
|
|
`updated_at` datetime NOT NULL,
|
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Dumping data for table `repertoires`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
LOCK TABLES `repertoires` WRITE;
|
|
|
|
|
/*!40000 ALTER TABLE `repertoires` DISABLE KEYS */;
|
|
|
|
|
INSERT INTO `repertoires` VALUES (1,'前端开发','2018-02-08 15:12:08','2019-09-02 15:24:19'),(2,'后端开发','2018-02-08 15:12:17','2018-05-11 17:14:04'),(3,'移动开发','2018-02-08 15:12:24','2018-05-11 17:14:03'),(4,'数据库','2018-02-08 15:12:28','2018-05-11 17:14:01'),(5,'云计算和大数据','2018-02-08 15:12:39','2018-05-11 17:13:59'),(6,'运维与测试','2018-02-08 15:12:46','2018-05-11 17:13:56'),(8,'其它','2018-02-08 15:13:03','2018-05-11 17:13:42'),(9,'人工智能','2018-04-13 17:36:23','2018-05-11 17:13:54');
|
|
|
|
|
/*!40000 ALTER TABLE `repertoires` ENABLE KEYS */;
|
|
|
|
|
UNLOCK TABLES;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Table structure for table `sub_repertoires`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `sub_repertoires`;
|
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
|
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
|
|
|
CREATE TABLE `sub_repertoires` (
|
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`name` varchar(255) DEFAULT NULL,
|
|
|
|
|
`repertoire_id` int(11) DEFAULT NULL,
|
|
|
|
|
`created_at` datetime NOT NULL,
|
|
|
|
|
`updated_at` datetime NOT NULL,
|
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
|
KEY `index_sub_repertoires_on_repertoire_id` (`repertoire_id`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Dumping data for table `sub_repertoires`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
LOCK TABLES `sub_repertoires` WRITE;
|
|
|
|
|
/*!40000 ALTER TABLE `sub_repertoires` DISABLE KEYS */;
|
|
|
|
|
INSERT INTO `sub_repertoires` VALUES (1,'前端基础',1,'2018-02-08 15:13:18','2018-05-11 17:14:34'),(3,'前端框架',1,'2018-02-08 15:13:29','2018-05-11 17:14:32'),(5,'应用开发',3,'2018-02-08 15:13:59','2018-02-08 15:13:59'),(9,'SQL',4,'2018-02-08 15:14:24','2018-02-08 15:14:24'),(13,'云计算',5,'2018-02-08 15:14:58','2018-05-11 17:14:40'),(14,'大数据',5,'2018-02-08 15:15:02','2018-05-11 17:14:42'),(16,'Linux运维',6,'2018-02-08 15:15:14','2018-05-11 17:14:44'),(17,'网络',6,'2018-02-08 15:15:26','2018-05-11 17:14:45'),(18,'测试工具',6,'2018-02-08 15:15:32','2018-05-11 17:14:47'),(19,'计算机课程',8,'2018-02-08 15:15:46','2018-02-08 15:15:46'),(20,'Python',2,'2018-04-08 10:55:28','2018-05-11 17:13:07'),(21,'PHP',2,'2018-04-08 10:56:13','2018-05-11 17:13:02'),(22,'Java',2,'2018-04-08 11:02:55','2018-05-11 17:13:09'),(23,'Ruby',2,'2018-04-08 11:03:52','2018-05-11 17:12:59'),(24,'ASP.NET',2,'2018-04-08 11:04:27','2018-05-11 17:12:30'),(25,'Go',2,'2018-04-08 11:05:11','2018-05-11 17:13:00'),(26,'更多',2,'2018-04-08 11:06:46','2018-05-11 17:12:27'),(27,'人工智能',9,'2018-04-13 17:36:23','2018-04-13 17:39:53'),(29,'C',2,'2018-05-11 09:23:14','2018-05-11 17:13:06'),(30,'C++',2,'2018-05-11 09:28:02','2018-05-11 17:13:04');
|
|
|
|
|
/*!40000 ALTER TABLE `sub_repertoires` ENABLE KEYS */;
|
|
|
|
|
UNLOCK TABLES;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Table structure for table `tag_repertoires`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `tag_repertoires`;
|
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
|
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
|
|
|
CREATE TABLE `tag_repertoires` (
|
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`name` varchar(255) DEFAULT NULL,
|
|
|
|
|
`sub_repertoire_id` int(11) DEFAULT NULL,
|
|
|
|
|
`created_at` datetime NOT NULL,
|
|
|
|
|
`updated_at` datetime NOT NULL,
|
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=169 DEFAULT CHARSET=utf8;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Dumping data for table `tag_repertoires`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
LOCK TABLES `tag_repertoires` WRITE;
|
|
|
|
|
/*!40000 ALTER TABLE `tag_repertoires` DISABLE KEYS */;
|
|
|
|
|
INSERT INTO `tag_repertoires` VALUES (1,'HTML',1,'2018-04-08 10:18:27','2018-05-11 17:15:11'),(2,'CSS',1,'2018-04-08 10:18:33','2018-05-11 17:15:09'),(3,'Html5',1,'2018-04-08 10:18:39','2018-05-11 17:15:08'),(4,'CSS3',1,'2018-04-08 10:18:45','2018-05-11 17:15:06'),(5,'JavaScript',1,'2018-04-08 10:18:50','2019-02-22 09:35:30'),(10,'Bootstrap',3,'2018-04-08 10:19:22','2018-04-08 10:19:22'),(13,'AngularJS',3,'2018-04-08 10:30:47','2018-04-08 10:30:47'),(14,'Aurelia',3,'2018-04-08 10:30:58','2018-04-08 10:30:58'),(15,'Backbone',3,'2018-04-08 10:31:10','2018-04-08 10:31:10'),(16,'d3.js',3,'2018-04-08 10:31:17','2018-04-08 10:31:17'),(18,'Dojo 2',3,'2018-04-08 10:31:58','2018-04-08 10:31:58'),(20,'Ember.js',3,'2018-04-08 10:40:36','2018-04-08 10:40:36'),(21,'Ext JS',3,'2018-04-08 10:40:43','2018-04-08 10:40:43'),(23,'Gulp',3,'2018-04-08 10:50:20','2018-04-08 10:50:20'),(24,'Ionic',3,'2018-04-08 10:50:25','2018-04-08 10:50:25'),(26,'Knockout',3,'2018-04-08 10:50:38','2018-04-08 10:50:38'),(27,'MDL(Material Design Lite)',3,'2018-04-08 10:50:54','2018-04-08 10:50:54'),(28,'MooTools',3,'2018-04-08 10:50:59','2018-04-08 10:50:59'),(30,'Rails',3,'2018-04-08 10:51:11','2018-04-08 10:51:11'),(31,'React.JS',3,'2018-04-08 10:51:18','2018-04-08 10:51:18'),(32,'ReactNative',3,'2018-04-08 10:51:26','2018-04-08 10:51:26'),(33,'redux',3,'2018-04-08 10:51:32','2018-04-08 10:51:32'),(34,'RxJS',3,'2018-04-08 10:51:36','2018-04-08 10:51:36'),(35,'Less',3,'2018-04-08 10:51:40','2018-04-08 10:51:40'),(36,'Sass',3,'2018-04-08 10:51:44','2018-04-08 10:51:44'),(37,'Underscore',3,'2018-04-08 10:51:50','2018-04-08 10:51:50'),(38,'Vue.js',3,'2018-04-08 10:51:54','2018-04-08 10:51:54'),(39,'Hogan.js',3,'2018-04-08 10:51:59','2018-04-08 10:51:59'),(40,'Zebra',3,'2018-04-08 10:52:06','2018-04-08 10:52:06'),(43,'Meteor',3,'2018-04-08 10:52:30','2018-04-08 10:52:30'),(46,'Python基础',20,'2018-04-08 10:55:46','2018-05-15 14:55:30'),(47,'web2py',20,'2018-04-08 10:55:50','2018-05-15 14:55:27'),(48,'Django',20,'2018-04-08 10:55:55','2018-05-15 14:55:26'),(49,'Flask',20,'2018-04-08 10:56:00','2018-05-15 14:55:25'),(50,'数据挖掘与分析',20,'2018-04-08 10:56:05','2018-05-15 14:55:24'),(51,'PHP基础',21,'2018-04-08 10:56:20','2018-05-11 17:19:00'),(52,'ThinkPHP',21,'2018-04-08 10:56:25','2018-05-11 17:18:59'),(53,'Laravel',21,'2018-04-08 10:56:29','2018-05-11 17:18:58'),(54,'WordPress',21,'2018-04-08 10:56:34','2018-05-11 17:18:57'),(56,'Java',22,'2018-04-08 11:03:09','2019-09-02 15:20:54'),(57,'JSP',22,'2018-04-08 11:03:14','2018-05-11 17:19:24'),(59,'Spring',22,'2018-04-08 11:03:23','2018-05-11 17:19:23'),(60,'Struts2',22,'2018-04-08 11:03:28','2018-05-11 17:19:22'),(61,'MyBatis',22,'2018-04-08 11:03:33','2018-05-11 17:19:21'),(62,'Hibernate',22,'2018-04-08 11:03:37','2018-05-11 17:19:20'),(63,'Lucene',22,'2018-04-08 11:03:42','2018-05-11 17:19:19'),(64,'Ruby基础',23,'2018-04-08 11:03:58','2018-05-11 17:19:07'),(65,'Ruby on Rails',23,'2018-04-08 11:04:04','2018-05-11 17:19:06'),(66,'Grape',23,'2018-04-08 11:04:09','2018-05-11 17:19:05'),(67,'Ruby进阶',23,'2018-04-08 11:04:13','2018-05-11 17:19:04'),(68,'RubyMine',23,'2018-04-08 11:04:18','2018-05-11 17:19:03'),(69,'C#',24,'2018-04-08 11:04:43','2018-04-08 11:04:43'),(70,'ASP.NET MVC',24,'2018-04-08 11:04:47','2018-04-08 11:04:47'),(71,'Entity Framework',24,'2018-04-08 11:04:55','2018-04-08 11:04:55'),(72,'WPF',24,'2018-04-08 11:05:00','2018-04-08 11:05:00'),(73,'Go基础',25,'2018-04-08 11:05:21','2019-09-02 15:20:36'),(78,'R',26,'2018-04-08 11:07:03','2018-04-08 11:07:03'),(79,'Perl',26,'2018-04-08 11:07:09','2018-04-08 11:07:09'),(80,'YAML',26,'2018-04-08 11:07:17','2018-04-08 11:07:17'),(82,'Kotlin',26,'2018-04-08 11:07:28','2018-04-08 11:07:28'),(86,'Android',5,'2018-04-08 11:07:57','2018-05-11 17:19:12'),(87,'IOS',5,'2018-04-08 11:08:03','2018-05-11 17:19:11'),(88,'MySQL',9,'2018-04-08 11:08:23','2018-05-21 09:16:30'),(89,'SQL Server',9,'2018-04-08 11:08:28','2019-08-28 16:58:13'),(90,'Oracle',9,'2018-04-08 11:08:32','2018-05-21 09:16:27'),(91,'SQLite',9,'2018-04-08 11:08:36','2018-05-21 09:
|
|
|
|
|
/*!40000 ALTER TABLE `tag_repertoires` ENABLE KEYS */;
|
|
|
|
|
UNLOCK TABLES;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Table structure for table `portal_images`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `portal_images`;
|
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
|
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
|
|
|
CREATE TABLE `portal_images` (
|
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`name` varchar(255) DEFAULT NULL,
|
|
|
|
|
`position` int(11) DEFAULT NULL,
|
|
|
|
|
`link` varchar(255) DEFAULT NULL,
|
|
|
|
|
`status` tinyint(1) DEFAULT '0',
|
|
|
|
|
`created_at` datetime NOT NULL,
|
|
|
|
|
`updated_at` datetime NOT NULL,
|
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Dumping data for table `portal_images`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
LOCK TABLES `portal_images` WRITE;
|
|
|
|
|
/*!40000 ALTER TABLE `portal_images` DISABLE KEYS */;
|
|
|
|
|
INSERT INTO `portal_images` VALUES (1,'云启校园计划',1,'https://ecloud.10086.cn/market/marketStu',0,'2018-08-24 14:21:53','2019-06-29 20:13:05'),(3,'CCF教学案例征集',3,'https://www.educoder.net/competitions/ccf-se-2018',0,'2018-08-24 14:23:04','2018-12-14 14:18:50'),(4,'Java路径',4,'https://www.educoder.net/paths/54',0,'2018-08-24 14:23:23','2019-02-03 19:44:42'),(5,'Python路径',5,'https://www.educoder.net/paths/11',1,'2018-08-24 14:23:39','2018-08-24 14:24:22'),(6,'云计算大数据',6,'https://www.educoder.net/paths/29',1,'2018-08-24 14:24:08','2018-08-24 14:24:39'),(7,'C语言精品课程',3,'https://www.educoder.net/paths/196 ',0,'2019-02-02 19:21:48','2019-06-29 20:14:03'),(8,'北京大学aixcoder',3,'http://www.aixcoder.com/help/educoder',1,'2019-04-30 14:50:06','2019-06-29 20:13:40'),(9,'2019绿盟杯竞赛',1,'https://forge.educoder.net/competitions',1,'2019-06-29 10:06:06','2019-07-22 15:02:20');
|
|
|
|
|
/*!40000 ALTER TABLE `portal_images` ENABLE KEYS */;
|
|
|
|
|
UNLOCK TABLES;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Table structure for table `mirror_repositories`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `mirror_repositories`;
|
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
|
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
|
|
|
CREATE TABLE `mirror_repositories` (
|
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`mirrorID` varchar(255) DEFAULT NULL,
|
|
|
|
|
`name` varchar(255) DEFAULT NULL,
|
|
|
|
|
`main_type` varchar(255) DEFAULT NULL,
|
|
|
|
|
`description` text,
|
|
|
|
|
`status` int(11) DEFAULT '0',
|
|
|
|
|
`created_at` datetime NOT NULL,
|
|
|
|
|
`updated_at` datetime NOT NULL,
|
|
|
|
|
`type_name` text,
|
|
|
|
|
`script_template` longtext,
|
|
|
|
|
`resource_limit` int(11) DEFAULT '10000',
|
|
|
|
|
`memory_limit` int(11) DEFAULT '1024',
|
|
|
|
|
`cpu_limit` tinyint(4) DEFAULT '1',
|
|
|
|
|
`time_limit` int(11) DEFAULT '120',
|
|
|
|
|
`should_compile` tinyint(1) DEFAULT NULL,
|
|
|
|
|
`repertoire_id` int(11) DEFAULT NULL,
|
|
|
|
|
`sub_repertoire_id` int(11) DEFAULT NULL,
|
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=131 DEFAULT CHARSET=utf8;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Dumping data for table `mirror_repositories`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
LOCK TABLES `mirror_repositories` WRITE;
|
|
|
|
|
/*!40000 ALTER TABLE `mirror_repositories` DISABLE KEYS */;
|
|
|
|
|
INSERT INTO `mirror_repositories` VALUES (2,'5d789e5d495f','python3-ssh:v1.0','1','python3.6.2,ssh;',1,'2018-01-29 11:31:25','2019-08-24 09:45:27','Python3.6','#!/bin/bash\ncd WORKSPACE\n\n#前台传来的可执行文件,即测试文件\nsourceClassNames=(SOURCECLASSNAMES)\ninput=$2;OLD_IFS=\"$IFS\"; IFS=,; ins=($input);IFS=\"$OLD_IFS\"\n\n#不需要编译,设定编译结果为成功编译\ncompileResult=$(echo -n \"compile successfully\" | base64)\necho \'ulimit -f 10000\' >>/root/.bashrc ; source /root/.bashrc\n\nexecute(){\n executeCommand=\"python3.6 \"\n sourceClassName=${sourceClassNames[$1 - 1]}\n challengeStage=$1\n \n #get the loop times(looptimes = the num of testdataset)\n output=\'\'\n i=0\n while [[ i -lt ${#ins[*]} ]]; do\n #执行,并拼接执行结果\n result=$(echo \"${ins[$i]}\" | base64 -d | $executeCommand $sourceClassName 2>&1 | base64)\n #拼接输出结果\n output=$output\\\"$result\\\",\n let i++\n done\n output=\"[${output%?}]\"\n}\n\nexecute $1\n\n#return result in json format\nreturnResult(){\n result=\"{\\\"compileResult\\\":\\\"$compileResult\\\",\\\"out\\\":$output}\"\n echo $result\n}\n#拼装成最终的json格式,echo输出得到最后结果\nreturnResult\n\n',100000,2048,2,85,0,2,4),(3,'42bd3e1427cc','cisco-ssh:v1.0','1','dynagen0.11.0,dynamips0.2.8,ssh;',1,'2018-01-29 11:31:25','2019-08-20 15:45:53','Dynamips','#!/bin/bash\ncd WORKSPACE\n\n#前台传来的可执行文件,即测试文件\nsourceClassNames=(SOURCECLASSNAMES)\ninput=$2;OLD_IFS=\"$IFS\"; IFS=,; ins=($input);IFS=\"$OLD_IFS\"\n\n#不需要编译,设定编译结果为成功编译\ncompileResult=$(echo -n \"compile successfully\" | base64)\n\n#echo \'ulimit -f 10000\' >>/root/.bashrc ; source /root/.bashrc\n\nexecute(){\n executeCommand=\"bash \"\n sourceClassName=${sourceClassNames[$1 - 1]}\n challengeStage=$1\n \n #get the loop times(looptimes = the num of testdataset)\n output=\'\'\n i=0\n while [[ i -lt ${#ins[*]} ]]; do\n #执行,并拼接执行结果\n result=$(echo \"${ins[$i]}\" | base64 -d | $executeCommand $sourceClassName 2>&1 | base64)\n #拼接输出结果\n output=$output\\\"$result\\\",\n let i++\n done\n output=\"[${output%?}]\"\n}\n\nexecute $1\n\n#return result in json format\nreturnResult(){\n result=\"{\\\"compileResult\\\":\\\"$compileResult\\\",\\\"out\\\":$output}\"\n echo $result\n}\n#拼装成最终的json格式,echo输出得到最后结果\nreturnResult\n\n',100000,1024,1,120,0,6,17),(4,'b21be9214e36','python2-ssh:v1.0','1','python2.7.9,ssh;',1,'2018-01-29 11:31:25','2019-08-20 15:47:45','Python2.7','#!/bin/bash\ncd WORKSPACE\n\n#前台传来的可执行文件,即测试文件\nsourceClassNames=(\"\" \"\" \"\")\ninput=$2;OLD_IFS=\"$IFS\"; IFS=,; ins=($input);IFS=\"$OLD_IFS\"\n\n#不需要编译,设定编译结果为成功编译\ncompileResult=$(echo -n \"compile successfully\" | base64)\necho \'ulimit -f 10000\' >>/root/.bashrc ; source /root/.bashrc\n\nexecute(){\n executeCommand=\"python2.7 \"\n sourceClassName=${sourceClassNames[$1 - 1]}\n challengeStage=$1\n \n #get the loop times(looptimes = the num of testdataset)\n output=\'\'\n i=0\n while [[ i -lt ${#ins[*]} ]]; do\n #执行,并拼接执行结果\n result=$(echo \"${ins[$i]}\" | base64 -d | $executeCommand $sourceClassName 2>&1 | base64)\n #拼接输出结果\n output=$output\\\"$result\\\",\n let i++\n done\n output=\"[${output%?}]\"\n}\n\nexecute $1\n\n#return result in json format\nreturnResult(){\n result=\"{\\\"compileResult\\\":\\\"$compileResult\\\",\\\"out\\\":$output}\"\n echo $result\n}\n#拼装成最终的json格式,echo输出得到最后结果\nreturnResult\n\n',100000,1024,1,120,0,2,4),(5,'eb55c2848120','openjdk-ssh:v1.0
|
|
|
|
|
/*!40000 ALTER TABLE `mirror_repositories` ENABLE KEYS */;
|
|
|
|
|
UNLOCK TABLES;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Table structure for table `mirror_scripts`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `mirror_scripts`;
|
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
|
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
|
|
|
CREATE TABLE `mirror_scripts` (
|
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`mirror_repository_id` int(11) DEFAULT NULL,
|
|
|
|
|
`script` longtext,
|
|
|
|
|
`script_type` varchar(255) DEFAULT NULL,
|
|
|
|
|
`description` text,
|
|
|
|
|
`created_at` datetime NOT NULL,
|
|
|
|
|
`updated_at` datetime NOT NULL,
|
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=91 DEFAULT CHARSET=utf8;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Dumping data for table `mirror_scripts`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
LOCK TABLES `mirror_scripts` WRITE;
|
|
|
|
|
/*!40000 ALTER TABLE `mirror_scripts` DISABLE KEYS */;
|
|
|
|
|
INSERT INTO `mirror_scripts` VALUES (1,13,'#!/bin/bash\r\ncd WORKSPACE\r\n\r\nchallengeProgramNames=(CHALLENGEPROGRAMNAMES)\r\ninput=$2;OLD_IFS=\"$IFS\"; IFS=,; ins=($input);IFS=\"$OLD_IFS\"\r\n\r\necho \'ulimit -f 1000000\' >>/root/.bashrc ; source /root/.bashrc\r\n\r\ncompile(){\r\n compileCommand=\"gcc -lm -lc -lz \"\r\n challengeProgramName=${challengeProgramNames[$1 - 1]}\r\n #remove the executeFile.out file that last time remains\r\n rm -f ./executeFile.out &> /dev/null\r\n\r\n #compile all .c file in the source folder: a/b/c.c --> a/b/*.c\r\n challengeProgramName=${challengeProgramName%/*.c}\"/*.c\"\r\n\r\n # 获取编译结果(此处编译无输出则说明编译通过,否则输出编译错误信息,请按实训实际情况调整)\r\n compileResult=$($compileCommand $challengeProgramName -o executeFile.out 2>&1 | base64)\r\n if [ -z \"$compileResult\" ]; then\r\n compileResult=$(echo -n \"compile successfully\" | base64)\r\n fi\r\n\r\n}\r\ncompile $1\r\n\r\n\r\nexecute(){\r\n executeCommand=\"./executeFile.out\"\r\n challengeStage=$1\r\n \r\n #get the loop times(looptimes = the num of testdataset)\r\n res_usage=\"{\\\"testSetUsages\\\":[\"\r\n output=\'\'\r\n i=0\r\n while [[ i -lt ${#ins[*]} ]]; do\r\n echo 0 > /sys/fs/cgroup/memory/memory.max_usage_in_bytes\r\n startCpuUsage=$(cat /sys/fs/cgroup/cpuacct/cpuacct.usage)\r\n #执行,并拼接执行结果\r\n result=$(echo \"${ins[$i]}\" | base64 -d | $executeCommand | base64)\r\n #拼接输出结果\r\n endCpuUsage=$(cat /sys/fs/cgroup/cpuacct/cpuacct.usage)\r\n let testSetCpuUsage=$endCpuUsage-$startCpuUsage\r\n maxMemUsage=$(cat /sys/fs/cgroup/memory/memory.max_usage_in_bytes)\r\n res_usage=\"$res_usage{\\\"testSetTime\\\":\\\"$testSetCpuUsage\\\",\\\"testSetMem\\\":\\\"$maxMemUsage\\\"},\"\r\n output=$output\\\"$result\\\",\r\n let i++\r\n done\r\n output=\"[${output%?}]\"\r\n}\r\n\r\nexecute $1\r\nres_usage=\"${res_usage::-1}\"\r\nres_usage=\"$res_usage]}\"\r\nres_usage=$(echo -ne \"$res_usage\"|base64)\r\n#return result in json format\r\nreturnResult(){\r\n result=\"{\\\"compileResult\\\":\\\"$compileResult\\\",\\\"out\\\":$output,\\\"resUsage\\\":\\\"$res_usage\\\"}\"\r\n echo $result\r\n}\r\n#拼装成最终的json格式,echo输出得到最后结果\r\nreturnResult\r\n\r\n','C','C标准脚本','2018-01-29 14:43:15','2019-07-19 13:53:37'),(2,13,'#!/bin/bash\r\ncd WORKSPACE\r\n\r\nchallengeProgramNames=(CHALLENGEPROGRAMNAMES)\r\ninput=$2;OLD_IFS=\"$IFS\"; IFS=,; ins=($input);IFS=\"$OLD_IFS\"\r\n\r\necho \'ulimit -f 1000000\' >>/root/.bashrc ; source /root/.bashrc\r\n\r\ncompile(){\r\n compileCommand=\"g++ \"\r\n challengeProgramName=${challengeProgramNames[$1 - 1]}\r\n #remove the executeFile.out file that last time remains\r\n rm -f ./executeFile.out &> /dev/null\r\n\r\n #compile all .c file in the source folder: a/b/c.cpp --> a/b/*.cpp\r\n challengeProgramName=${challengeProgramName%/*.cpp}\"/*.cpp\"\r\n\r\n # 获取编译结果(此处编译无输出则说明编译通过,否则输出编译错误信息,请按实训实际情况调整)\r\n compileResult=$($compileCommand $challengeProgramName -o executeFile.out 2>&1 | base64)\r\n if [ -z \"$compileResult\" ]; then\r\n compileResult=$(echo -n \"compile successfully\" | base64)\r\n fi\r\n\r\n}\r\ncompile $1\r\n\r\n\r\nexecute(){\r\n executeCommand=\"./executeFile.out\"\r\n challengeStage=$1\r\n \r\n #get the loop times(looptimes = the num of testdataset)\r\n output=\'\'\r\n i=0\r\n while [[ i -lt ${#ins[*]} ]]; do\r\n #执行,并拼接执行结果\r\n result=$(echo \"${ins[$i]}\" | base64 -d | $executeCommand | base64)\r\n #拼接输出结果\r\n output=$output\\\"$result\\\",\
|
|
|
|
|
/*!40000 ALTER TABLE `mirror_scripts` ENABLE KEYS */;
|
|
|
|
|
UNLOCK TABLES;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Table structure for table `platform_samples`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `platform_samples`;
|
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
|
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
|
|
|
CREATE TABLE `platform_samples` (
|
|
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`samples_type` varchar(255) DEFAULT NULL,
|
|
|
|
|
`contents` text,
|
|
|
|
|
`created_at` datetime NOT NULL,
|
|
|
|
|
`updated_at` datetime NOT NULL,
|
|
|
|
|
PRIMARY KEY (`id`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Dumping data for table `platform_samples`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
LOCK TABLES `platform_samples` WRITE;
|
|
|
|
|
/*!40000 ALTER TABLE `platform_samples` DISABLE KEYS */;
|
|
|
|
|
INSERT INTO `platform_samples` VALUES (1,'taskPass','[TOC]\r\n\r\n---\r\n\r\n####任务描述\r\n\r\n\r\n本关任务:编写一个能计算数组平均值和最大值的小程序。\r\n\r\n\r\n####相关知识\r\n\r\n\r\n为了完成本关任务,你需要掌握:1.如何获取数组的长度,2.如何遍历数组。\r\n\r\n#####获取数组的长度\r\n数组的`length`属性用于记录数组中有多少个元素或存储单元,即记录数组的长度是多少。\r\n```java\r\nint[] nums = new int[10];//声明一个int型数组并动态初始化其大小为10\r\n\r\nSystem.out.println(nums.length);//显示当前数组的大小\r\n```\r\n输出:`10`\r\n\r\n#####遍历数组\r\n通俗的理解,遍历数组就是:**把数组中的元素都看一遍**。\r\n\r\n示例如下:\r\n```java\r\nint[] arr = {1,3,5,7,9};\r\nfor(int i = 0 ; i<arr.length; i++){\r\n System.out.print(arr[i] + \",\");\r\n}\r\n```\r\n\r\n输出:`1,3,5,7,9`\r\n\r\n#####如何求出最大值\r\n求数组的最大值,是不是很像打擂台呢?\r\n\r\n\r\n\r\n对于一群人我们不知道谁最厉害,所以我们准备一个擂台,并挑选第一个人为擂主(max),擂台下的人不断的(循环)来挑战擂主,如果赢了那挑战者就是擂主,之前的擂主就下台了,直到没有挑战者了,那最后一个擂主就是最厉害的那个了。\r\n\r\n####编程要求\r\n\r\n根据提示,在右侧编辑器补充代码,计算并输出数组的平均值和最大值。\r\n\r\n####测试说明\r\n\r\n平台会对你编写的代码进行测试:\r\n\r\n测试输入:`4`,`91`,`51`,`2`,`32`;\r\n预期输出:\r\n`平均值:44.0`\r\n`最大值:91`\r\n\r\n测试输入:`5`,`1`,`151`,`12`,`22`,`100`;\r\n预期输出:\r\n`平均值:57.2`\r\n`最大值:151`\r\n\r\n提示:\r\n```java\r\n int a = 3;\r\n int b = 2;\r\n System.out.println(a/b);\r\n System.out.println((double)(a/b));\r\n```\r\n输出:\r\n`1`\r\n`1.5`\r\n\r\n\r\n---\r\n开始你的任务吧,祝你成功!\r\n\r\n\r\n','2018-01-05 21:10:42','2018-11-26 09:09:43'),(2,'script','#!/bin/bash\ncd WORKSPACE\n\n# 待编译的评测文件\nchallengeProgramNames=(CHALLENGEPROGRAMNAMES)\n# 待执行的评测文件(可能是编译所得的可执行文件,请按实际情况填写)\nsourceClassNames=(SOURCECLASSNAMES)\n\n# 获取测试用例的输入(请勿改动此行语句)\ninput=$2;OLD_IFS=\"$IFS\"; IFS=,; ins=($input);IFS=\"$OLD_IFS\"\n\nCOMPILEFUNCTION\n\nexecute(){\n # 执行命令\n executeCommand=\"EXECUTECOMMAND\"\n # 当前关卡的执行目标文件\n sourceClassName=${sourceClassNames[$1 - 1]}\n # 当前关卡号\n challengeStage=$1\n # 循环获取各测试用例下的实际输出\n output=\'\'\n i=0\n while [[ i -lt ${#ins[*]} ]]; do\n result=$(echo \"${ins[$i]}\" | base64 -d | $executeCommand $sourceClassName 2>&1 | base64)\n # 拼接输出结果\n output=$output\\\"$result\\\",\n let i++\n done\n output=\"[${output%?}]\"\n}\nexecute $1\n\n# 返回评测结果\nreturnResult(){\n result=\"{\\\"compileResult\\\":\\\"$compileResult\\\",\\\"out\\\":$output}\"\n echo $result\n}\nreturnResult','2018-01-29 16:21:11','2018-02-01 14:36:37'),(3,'introduction','[comment]: <> (请在此添加实训简介,简单介绍一下实训的内容.以下是“基于Java语言的链表编程实训(基础篇)”实训的示例文:)\r\n\r\n链表(Linked List)是一种通用的数据结构,主要用于表示和管理数量不确定的数据。链表可有效解决数组(Array)在动态数据管理方面的不足。\r\n\r\n本实训项目的主要内容是基于Java语言开发一个具有基本功能的单链表,从六个方面介绍链表相关知识,并设置了六个关卡在线考察大家的链表编程能力。\r\n\r\n![](/api/attachments/169735)','2018-02-07 17:02:53','2018-02-07 17:02:53'),(4,'knowledge','[comment]: <> (请在此添加实训历史背景、应用背景拓展学员视野.以下是“基于Java语言的链表编程
|
|
|
|
|
/*!40000 ALTER TABLE `platform_samples` ENABLE KEYS */;
|
|
|
|
|
UNLOCK TABLES;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Table structure for table `edu_settings`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `edu_settings`;
|
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
|
|
|
/*!40101 SET character_set_client = utf8 */;
|
|
|
|
|
CREATE TABLE `edu_settings` (
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`name` varchar(255) DEFAULT NULL,
|
|
|
|
|
`value` varchar(255) DEFAULT NULL,
|
|
|
|
|
`created_at` datetime NOT NULL,
|
|
|
|
|
`updated_at` datetime NOT NULL,
|
|
|
|
|
`description` varchar(255) DEFAULT NULL,
|
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
|
UNIQUE KEY `index_edu_settings_on_name` (`name`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Dumping data for table `edu_settings`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
LOCK TABLES `edu_settings` WRITE;
|
|
|
|
|
/*!40000 ALTER TABLE `edu_settings` DISABLE KEYS */;
|
|
|
|
|
INSERT INTO `edu_settings` VALUES (1,'tomcat_webssh','http://172.16.94.243:8890','2019-06-21 09:38:31','2019-08-23 23:48:47',NULL),(2,'webssh_username','root','2019-06-21 09:38:31','2019-08-23 22:26:14',NULL),(3,'webssh_password','123123','2019-06-21 09:38:31','2019-08-23 22:26:22',NULL),(4,'git_address_ip','http://172.16.94.154:9000','2019-06-21 09:38:31','2019-08-23 21:45:11',NULL),(5,'git_address_domain','https://git.educoder.net','2019-06-21 09:38:31','2019-08-23 22:18:10',NULL),(6,'git_username','edugit','2019-06-21 09:38:31','2019-06-21 10:28:17',NULL),(7,'git_password',' xinedugit#','2019-06-21 09:38:31','2019-06-21 10:28:26',NULL),(8,'public_key','z7AAP5vtgm8UsbLIfbHodzb+iqH2vPz0sqK+jS4Kx7Nt9D6SgpLkKA==','2019-06-21 09:38:31','2019-06-26 10:01:20',NULL),(9,'private_key','f3cb7907a54957953aebb32508b853934a9d3e91','2019-06-21 09:38:31','2019-06-26 10:01:34',NULL),(10,'public_bucket','educoder','2019-06-21 09:38:31','2019-06-21 10:32:22',NULL),(11,'public_bucket_host','http://www.educoder.net','2019-06-21 09:38:31','2019-07-20 22:36:27',NULL),(12,'public_cdn_host','http://cdn.educoder.net','2019-06-21 09:38:31','2019-08-23 22:43:02',NULL),(13,'cloud_bridge','http://172.16.94.243:8890','2019-06-21 09:38:31','2019-08-23 23:10:48',NULL),(14,'cloud_tomcat_php','http://47.96.157.89','2019-06-21 09:38:31','2019-08-23 21:45:40',NULL),(15,'host_name','https://www.educoder.net','2019-06-21 09:38:31','2019-07-20 22:36:37',NULL),(16,'old_edu_host','https://forge.educoder.net','2019-06-21 09:38:31','2019-07-20 12:56:15',NULL),(17,'bridge_secret_key','priEn3UwXfJs3PmyXnSG','2019-06-21 10:54:07','2019-06-21 10:54:07',NULL),(18,'attachment_folder','/home/pdl/educoderplus/files','2019-06-21 10:54:34','2019-06-21 10:54:34',NULL),(19,'cookie_domain','.educoder.net ','2019-06-21 10:54:50','2019-06-21 10:54:50',NULL),(20,'openi_domain','https://openi.org.cn ','2019-06-21 10:55:39','2019-06-21 10:55:39',NULL),(21,'sms_apikey','2affbf2ff83f9810512622ec83bccd4f','2019-06-21 10:56:22','2019-06-21 10:56:22',NULL),(22,'educoder_domain','https://www.educoder.net ','2019-06-21 10:57:28','2019-07-22 14:00:54',NULL),(23,'vnc_url','vnc.educoder.net','2019-06-22 17:53:54','2019-07-20 12:32:52',NULL),(26,'review_server_url','http://172.16.94.186:80','2019-06-27 13:53:05','2019-08-23 21:46:16',NULL),(27,'autologin_cookie_name','autologin_trustie','2019-07-22 10:16:27','2019-07-22 10:16:27',NULL),(29,'notify_admin_phone','18711085785','2019-08-01 13:52:27','2019-08-01 13:52:27',NULL),(30,'teacher_register_phone','17680641960','2019-08-01 16:16:17','2019-08-01 16:16:17',NULL),(31,'subject_shixun_notify_phone','18711011226','2019-08-01 16:16:57','2019-08-01 16:16:57',NULL),(32,'es_min_score','10','2019-08-02 08:51:17','2019-08-02 08:53:00',NULL),(33,'es_highlight_fragment_size','80','2019-08-14 17:02:22','2019-08-14 17:04:40',NULL);
|
|
|
|
|
/*!40000 ALTER TABLE `edu_settings` ENABLE KEYS */;
|
|
|
|
|
UNLOCK TABLES;
|
|
|
|
|
SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;
|
|
|
|
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
|
|
|
|
|
|
|
|
|
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
|
|
|
|
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
|
|
|
|
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
|
|
|
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
|
|
|
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
|
|
|
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
|
|
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
|
|
|
|
|
|
|
|
-- Dump completed on 2019-09-03 11:29:50
|