From 41e0cf8950a2dfd7755213fd35c9a599c197415a Mon Sep 17 00:00:00 2001 From: huang Date: Tue, 7 May 2019 10:21:23 +0800 Subject: [PATCH] .. --- local_shixuns.sql | 92 ----------------------------------------------- localmysql.sh | 3 -- 2 files changed, 95 deletions(-) delete mode 100644 local_shixuns.sql delete mode 100644 localmysql.sh diff --git a/local_shixuns.sql b/local_shixuns.sql deleted file mode 100644 index be372e01..00000000 --- a/local_shixuns.sql +++ /dev/null @@ -1,92 +0,0 @@ --- MySQL dump 10.13 Distrib 5.5.42, for Win64 (x86) --- --- Host: localhost Database: 20180311 --- ------------------------------------------------------ --- Server version 5.5.42 - -/*!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 */; - --- --- Table structure for table `local_shixuns` --- - -DROP TABLE IF EXISTS `local_shixuns`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `local_shixuns` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `description` text COLLATE utf8_unicode_ci, - `user_id` int(11) DEFAULT NULL, - `gpid` int(11) DEFAULT NULL, - `visits` int(11) DEFAULT NULL, - `status` int(11) DEFAULT NULL, - `language` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `authentication` text COLLATE utf8_unicode_ci, - `identifier` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `propaedeutics` text COLLATE utf8_unicode_ci, - `trainee` int(11) DEFAULT NULL, - `major_id` int(11) DEFAULT NULL, - `webssh` int(11) DEFAULT NULL, - `homepage_show` tinyint(1) DEFAULT NULL, - `hidden` tinyint(1) DEFAULT NULL, - `fork_from` int(11) DEFAULT NULL, - `can_copy` tinyint(1) DEFAULT NULL, - `modifiy_tim` datetime DEFAULT NULL, - `reset_time` datetime DEFAULT NULL, - `closer_id` int(11) DEFAULT NULL, - `end_time` datetime DEFAULT NULL, - `git_url` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `vnc` tinyint(1) DEFAULT NULL, - `myshixuns_count` int(11) DEFAULT NULL, - `challenges_count` int(11) DEFAULT NULL, - `use_scope` int(11) DEFAULT NULL, - `evaluate_script` text COLLATE utf8_unicode_ci, - `mirror_script_id` int(11) DEFAULT NULL, - `image_text` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `code_hidden` tinyint(1) DEFAULT NULL, - `task_pass` tinyint(1) DEFAULT NULL, - `exec_time` int(11) DEFAULT NULL, - `test_set_permission` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, - `sigle_training` tinyint(1) DEFAULT NULL, - `hide_code` tinyint(1) DEFAULT NULL, - `multi_webssh` tinyint(1) DEFAULT NULL, - `excute_time` int(11) DEFAULT NULL, - `averge_star` int(11) DEFAULT NULL, - `forbid_copy` int(11) DEFAULT NULL, - `created_at` datetime NOT NULL, - `updated_at` datetime NOT NULL, - `shixun_id` int(11) DEFAULT NULL, - PRIMARY KEY (`id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `local_shixuns` --- - -LOCK TABLES `local_shixuns` WRITE; -/*!40000 ALTER TABLE `local_shixuns` DISABLE KEYS */; -INSERT INTO `local_shixuns` VALUES (1,'单链表的学习与应用(I)','链表(Linked List)是一种通用的数据结构,主要用于表示和管理数量不确定的数据。链表可有效解决数组(Array)在动态数据管理方面的不足。\r\n\r\n本实训项目的主要内容是基于Java语言开发一个具有基本功能的单链表,从六个方面介绍链表相关知识,并设置了六个关卡在线考察大家的链表编程能力。\r\n![](/attachments/download/169299)',2,NULL,1,0,NULL,NULL,'bifnvguo',NULL,1,NULL,0,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'#!/bin/bash\n#工作空间\ncd WORKSPACE\n#用户打开的文件名,之所以传过来这个,是因为可以从这个里面提取出来执行文件名\nchallengeProgramNames=(\"src/step1/ListNodeTest.java\" \"src/step2/ListNodeTest.java\" \"src/step3/LinkedListTest.java\" \"src/step4/LinkedListTest.java\" \"src/step5/LinkedListTest.java\" \"src/step6/LinkedListTest.java\")\n#执行文件名\nsourceClassNames=(\"step1.ListNodeTest\" \"step2.ListNodeTest\" \"step3.LinkedListTest\" \"step4.LinkedListTest\" \"step5.LinkedListTest\" \"step6.LinkedListTest\")\ninput=$2;OLD_IFS=\"$IFS\"; IFS=,; ins=($input);IFS=\"$OLD_IFS\"\n\n#限制每个shell连接所能写文件的最大容量,100M\necho \'ulimit -f 10000\' >>/root/.bashrc ; source /root/.bashrc\n\ncompile(){\n #编译命令,有的语言是没有编译过程,这个时候默认编译成功\n compileCommand=\"javac -encoding UTF-8 -Djava.ext.dirs=./lib/ -sourcepath src/ -d target/\"\n #取当前关卡的编译文件\n challengeProgramName=${challengeProgramNames[$1 - 1]}\n #当前关卡,作为参数传进来\n challengeStage=$1\n #删除上一次编译生成的文件,防止对本次编译造成影响\n rm -f ./target/step$challengeStage/*.class &> /dev/null\n \n # 获取编译结果(此处编译无输出则说明编译通过,否则输出编译错误信息,请按实训实际情况调整)\n compileResult=$($compileCommand $challengeProgramName 2>&1 | base64)\n if [ -z \"$compileResult\" ]; then\n compileResult=$(echo -n \"compile successfully\" | base64)\n fi\n\n}\ncompile $1\n\n\nexecute(){\n #执行命令\n executeCommand=\"java -Dfile.encoding=UTF-8 -Djava.ext.dirs=./lib/ -cp target/\"\n #执行文件名\n sourceClassName=${sourceClassNames[$1 - 1]}\n challengeStage=$1\n \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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'2019-05-07 08:40:18','2019-05-07 08:40:18',50),(2,'MySQL数据库编程开发实训(基础篇)','数据库(Database,DB)是一种建立在计算机存储设备上的,按照某种结构来组织、存储和管理数据的集合。数据库管理系统(Database Management System,DBMS)是对数据库进行访问,完成数据存储、检索、管理和处理的软件。\r\n\r\nMySQL是目前最流行的关系型DBMS,由瑞典MySQL AB 公司开发,目前属于 Oracle 旗下产品。MySQL具有性能高、成本低、可靠性好、开放源码等特点,广泛应用于网站开发和移动应用开发,在科学研究中的应用也极其广泛。\r\n\r\n本项目将从数据库连接,数据库实例与数据表的创建,数据记录的查询、插入、删除与更新、数据库应用等几个方面进行介绍,结合流行的JDBC技术,共设置了七个关卡在线考察大家的数据库访问编程能力。后续大家可以通过进阶学习来了解和掌握更高级更复杂的用法。\r\n\r\n![](/attachments/download/169466)',2,NULL,1,0,NULL,NULL,'els2pthi',NULL,1,NULL,1,NULL,NULL,NULL,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,'#!/bin/bash\ncd WORKSPACE\n\nchallengeProgramNames=(\"src/step1/MySQLWithJDBCTest.java\" \"src/step2/CreateTableTest.java\" \"src/step3/QueryRecordTest.java\" \"src/step4/InsertTableTest.java\" \"src/step5/DeleteRecordTest.java\" \"src/step6/UpdateRecordTest.java\" \"src/step7/TransferTableTest.java\")\nsourceClassNames=(\"step1.MySQLWithJDBCTest\" \"step2.CreateTableTest\" \"step3.QueryRecordTest\" \"step4.InsertTableTest\" \"step5.DeleteRecordTest\" \"step6.UpdateRecordTest\" \"step7.TransferTableTest\")\ninput=$2;OLD_IFS=\"$IFS\"; IFS=,; ins=($input);IFS=\"$OLD_IFS\"\n\necho \'ulimit -f 10000\' >>/root/.bashrc ; source /root/.bashrc\n\ncompile(){\n compileCommand=\"javac -encoding UTF-8 -Djava.ext.dirs=./lib/ -sourcepath src/ -d target/\"\n challengeProgramName=${challengeProgramNames[$1 - 1]}\n challengeStage=$1\n #remove the .class files that last time remains\n rm -f ./target/step$challengeStage/*.class &> /dev/null\n\n # 获取编译结果(此处编译无输出则说明编译通过,否则输出编译错误信息,请按实训实际情况调整)\n compileResult=$($compileCommand $challengeProgramName 2>&1 | base64)\n if [ -z \"$compileResult\" ]; then\n compileResult=$(echo -n \"compile successfully\" | base64)\n fi\n}\ncompile $1\n\n\nexecute(){\n executeCommand=\"java -Dfile.encoding=UTF-8 -Djava.ext.dirs=./lib/ -cp target/\"\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',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,'2019-05-07 08:40:18','2019-05-07 08:40:18',41); -/*!40000 ALTER TABLE `local_shixuns` ENABLE KEYS */; -UNLOCK TABLES; -/*!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-05-07 8:57:56 diff --git a/localmysql.sh b/localmysql.sh deleted file mode 100644 index 15c5577a..00000000 --- a/localmysql.sh +++ /dev/null @@ -1,3 +0,0 @@ -mysql -uroot -p1234; -use 20180311; -source local_shixuns.sql \ No newline at end of file