Skip to content

Commit fae25d1

Browse files
authored
full project
1 parent 18b665d commit fae25d1

23 files changed

+3422
-182
lines changed

New Text Document.txt

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
2+
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
3+
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
4+
<!------ Include the above in your HEAD tag ---------->
5+
6+
<div class="container">
7+
<div class="row col-md-6 col-md-offset-2 custyle">
8+
<table class="table table-striped custab">
9+
<thead>
10+
<a href="#" class="btn btn-primary btn-xs pull-right"><b>+</b> Add new categories</a>
11+
<tr>
12+
<th>ID</th>
13+
<th>Title</th>
14+
<th>Parent ID</th>
15+
<th class="text-center">Action</th>
16+
</tr>
17+
</thead>
18+
<tr>
19+
<td>1</td>
20+
<td>News</td>
21+
<td>News Cate</td>
22+
<td class="text-center"><a class='btn btn-info btn-xs' href="#"><span class="glyphicon glyphicon-edit"></span> Edit</a> <a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove"></span> Del</a></td>
23+
</tr>
24+
<tr>
25+
<td>2</td>
26+
<td>Products</td>
27+
<td>Main Products</td>
28+
<td class="text-center"><a class='btn btn-info btn-xs' href="#"><span class="glyphicon glyphicon-edit"></span> Edit</a> <a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove"></span> Del</a></td>
29+
</tr>
30+
<tr>
31+
<td>3</td>
32+
<td>Blogs</td>
33+
<td>Parent Blogs</td>
34+
<td class="text-center"><a class='btn btn-info btn-xs' href="#"><span class="glyphicon glyphicon-edit"></span> Edit</a> <a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove"></span> Del</a></td>
35+
</tr>
36+
</table>
37+
</div>
38+
</div>

TestSnippets.txt

+134
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
C
2+
==
3+
4+
#include<stdio.h>
5+
int main()
6+
{
7+
printf("Hello World from C");
8+
return 0;
9+
}
10+
11+
#include<stdio.h>
12+
int main()
13+
{
14+
int a , b, c ;
15+
scanf("%d",&a);
16+
scanf("%d",&b);
17+
c = a + b ;
18+
printf("%d",c);
19+
return 0;
20+
}
21+
22+
@@@@@@@@@@@@@@@@@@@@@@@@
23+
24+
C++
25+
===
26+
#include<iostream>
27+
using namespace std;
28+
int main()
29+
{
30+
cout<<"Hello World from C++";
31+
return 0;
32+
}
33+
34+
#include<iostream>
35+
using namespace std;
36+
int main()
37+
{
38+
int a , b, c ;
39+
cin>>a;
40+
cin>>b;
41+
c = a + b ;
42+
cout<<c;
43+
return 0;
44+
}
45+
46+
@@@@@@@@@@@@@@@@@@@@@@@@
47+
48+
Java
49+
====
50+
class Main
51+
{
52+
public static void main(String[] args)
53+
{
54+
System.out.println("Hello World");
55+
}
56+
}
57+
58+
59+
import java.util.*;
60+
public class Main {
61+
62+
public static void main(String[] args) {
63+
String a = new String();
64+
Scanner x = new Scanner(System.in );
65+
a = x.next();
66+
System.out.println(a);
67+
68+
69+
}
70+
71+
}
72+
73+
@@@@@@@@@@@@@@@@@@@@@@@@
74+
75+
Python
76+
======
77+
print "hello world"
78+
79+
a=int(raw_input("Enter a value "))
80+
b=int(raw_input("Enter b value "))
81+
c=a+b
82+
print c
83+
84+
@@@@@@@@@@@@@@@@@@@@@@@@
85+
86+
C#
87+
==
88+
89+
using System;
90+
91+
namespace Main
92+
{
93+
class Program
94+
{
95+
static void Main(string[] args)
96+
{
97+
int a = Int16.Parse(Console.ReadLine());
98+
int b = Int16.Parse(Console.ReadLine());
99+
int c = a + b;
100+
Console.WriteLine("The answer is {0} " , c );
101+
}
102+
}
103+
}
104+
105+
106+
@@@@@@@@@@@@@@@@@@@@@@@@
107+
108+
VB
109+
==
110+
111+
Module Module1
112+
113+
Sub Main()
114+
Console.WriteLine("Hello World")
115+
End Sub
116+
117+
End Module
118+
119+
Module Module1
120+
121+
Sub Main()
122+
Dim a As Integer
123+
Dim b As Integer
124+
Dim c As Integer
125+
a = Console.ReadLine()
126+
b = Console.ReadLine()
127+
c = a + b
128+
Console.WriteLine("c value is " & c.ToString())
129+
130+
End Sub
131+
132+
End Module
133+
134+
@@@@@@@@@@@@@@@@@@@@@@@@

adminview.html

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
2+
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
3+
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
4+
<link rel="stylesheet" href="/admin_view_css">
5+
<!------ Include the above in your HEAD tag ---------->
6+
7+
<div class="container">
8+
<div class="row col-md-6 col-md-offset-2 custyle">
9+
<table class="table table-striped custab">
10+
<thead>
11+
<a href="#" class="btn btn-primary btn-xs pull-right"><b>+</b> Add new categories</a>
12+
<tr>
13+
<th>ID</th>
14+
<th>Title</th>
15+
<th>Parent ID</th>
16+
<th class="text-center">Action</th>
17+
</tr>
18+
</thead>
19+
<tr>
20+
<td>1</td>
21+
<td>News</td>
22+
<td>News Cate</td>
23+
<td class="text-center"><a class='btn btn-info btn-xs' href="#"><span class="glyphicon glyphicon-edit"></span> Edit</a> <a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove"></span> Del</a></td>
24+
</tr>
25+
<tr>
26+
<td>2</td>
27+
<td>Products</td>
28+
<td>Main Products</td>
29+
<td class="text-center"><a class='btn btn-info btn-xs' href="#"><span class="glyphicon glyphicon-edit"></span> Edit</a> <a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove"></span> Del</a></td>
30+
</tr>
31+
<tr>
32+
<td>3</td>
33+
<td>Blogs</td>
34+
<td>Parent Blogs</td>
35+
<td class="text-center"><a class='btn btn-info btn-xs' href="#"><span class="glyphicon glyphicon-edit"></span> Edit</a> <a href="#" class="btn btn-danger btn-xs"><span class="glyphicon glyphicon-remove"></span> Del</a></td>
36+
</tr>
37+
</table>
38+
</div>
39+
</div>

creating_challenge.html

+168
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
<style>
2+
body{
3+
margin: 0px;
4+
5+
}
6+
.menu{
7+
background : #000;
8+
color: #fff;
9+
padding: 10px;
10+
}
11+
.menu a{
12+
color: #fff;
13+
text-decoration: none;
14+
padding: 10px;
15+
}
16+
17+
.question_container{
18+
19+
padding: 10px;
20+
}
21+
.question_container input[type=text],textarea{
22+
border: 1px solid #000;
23+
width: 500px;
24+
font-size: 16px;
25+
padding: 6px;
26+
}
27+
28+
.question_container input[type=button]{
29+
display: block;
30+
padding: 10px;
31+
color: #fff;
32+
border: none;
33+
background : #888;
34+
}
35+
36+
#test_case{
37+
box-shadow: 0px 0px 2px rgba(0,0,0,.3);
38+
position: fixed;
39+
z-index: 99;
40+
display: none;
41+
vertical-align: center;
42+
left: 350px;
43+
width: 500px;
44+
background: #888888;
45+
}
46+
#test_case *{
47+
padding: 10px;
48+
}
49+
50+
#test_case div{
51+
52+
}
53+
#test_case input{
54+
max-width: 300px;
55+
border: 2px solid transparent;
56+
}
57+
#test_case input[type=button]{
58+
background: #333;
59+
display: inline;
60+
margin: 0px 6px;
61+
}
62+
#test_case h4{
63+
display: inline;
64+
}
65+
.question_container input:hover,textarea:hover{
66+
border: 1px solid skyblue;
67+
}
68+
#blur{
69+
background: rgba(0,0,0,.6);
70+
width: 100%;
71+
height: 100%;
72+
z-index : 90;
73+
display: none;
74+
position: fixed;
75+
top: 0px;
76+
left: 0px;
77+
}
78+
79+
80+
#testCaseContainer{
81+
background: #0f0f0f;
82+
padding: 0px;
83+
left: 600px;
84+
top: 140px;
85+
}
86+
.currentTestCase{
87+
margin: 20px;
88+
}
89+
</style>
90+
<div class="menu">
91+
<a href="/" style="font-size: 20px;color:coral;">PSG Code Zone</a>
92+
<a href="/ques_tab" style="font-size: 15px;color:darkturquoise;">Home</a>
93+
</div>
94+
<form method='post' action="/admin2">
95+
<div class="question_container">
96+
<div style="float:left;">
97+
<h4>Question Name</h4>
98+
<input type = "text" placeholder="Question Name" name='qname'>
99+
100+
<br>
101+
<h4>Description</h4><br>
102+
<textarea style="height: 300px;" name='qdesc'></textarea>
103+
104+
<h4>Constraints</h4><br>
105+
<textarea style="height: 150px;" name='qconst'></textarea>
106+
<h4>Sample Input</h4><br>
107+
<textarea style='height:60px;' name='qinp'></textarea>
108+
<h4>Sample Output</h4><br>
109+
<textarea style='height:60px;' name='qoup'></textarea>
110+
111+
</div>
112+
<div style="width: 50%;">
113+
114+
<input onclick="addTest()" type="button" value="Add Test" style="border: 2px dotted #000;float: right;padding: 10px;display: inline; margin: 10px;background: rgba(111,111,111,.6);padding: 10px 40px;" />
115+
116+
<div id="blur"></div>
117+
<div id="test_case">
118+
<div style="background: #2aabd2;width: 96%;color : #fff;padding: 10px;">Add test case</div>
119+
<div style="padding: 10px;">
120+
<table class="currentTestCase" name="tab_value">
121+
<tr>
122+
<th><h4>Input</h4></th>
123+
<th><input type = "text" placeholder="Input" name="inp" onfocus="clearContents(this);"/></th>
124+
<tr>
125+
<th><h4>Output</h4></th>
126+
<th><input type = "text" placeholder="Output" name="oup" onfocus="clearContents(this);"/></th>
127+
</tr>
128+
</table>
129+
<input style="margin-left: 30px;" onclick="createTestCase()" type="button" value="Submit"/>
130+
<input type="button" onclick="hideTestcase()" value="cancel"/>
131+
</div>
132+
</div>
133+
<div id="testCaseContainer" style="font-size: 17px;position: absolute;background: #ddd;">
134+
135+
</div>
136+
<br><br>
137+
138+
</div>
139+
<center><input type="submit" value='Add Question Database' style="background-color: darkcyan" ></center>
140+
</div>
141+
</form>
142+
<script>
143+
function addTest(){
144+
var testCase = document.getElementById("test_case");
145+
testCase.style.display = "block";
146+
var blur = document.getElementById("blur");
147+
blur.style.display = "block";
148+
}
149+
function createTestCase(){
150+
var testCaseContainer = document.getElementById("testCaseContainer");
151+
var currentTestCase = document.getElementsByClassName("currentTestCase")[0].cloneNode(true);
152+
testCaseContainer.appendChild(currentTestCase);
153+
hideTestcase();
154+
}
155+
function hideTestcase() {
156+
var tc = document.getElementById("test_case");
157+
var blur = document.getElementById("blur");
158+
hideElement(tc);
159+
hideElement(blur);
160+
}
161+
function hideElement(element){
162+
element.style.display = "none";
163+
}
164+
function clearContents(element) {
165+
element.value = '';
166+
}
167+
168+
</script>

0 commit comments

Comments
 (0)