Skip to content

Commit d2cfa5f

Browse files
committed
changed in ranking.js
1 parent 6c0a5df commit d2cfa5f

15 files changed

Lines changed: 1046 additions & 70 deletions

File tree

codecamp-front/package-lock.json

Lines changed: 906 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1-
<p>
2-
about works!
3-
</p>
1+
2+
<div class="jumbotron">
3+
<h1 class="display-4">Code Camp</h1>
4+
<p class="lead">
5+
Eat, Code, Sleep and Repeat
6+
</p>
7+
<hr>
8+
<p>
9+
CodeCamp is an open-source educational initiative of the students of Techno India Salt Lake. It is a platform dedicated to cometitive coding made by students for students. It supports the 4 most used programming languages i.e, C, C++, JAVA and Python.It is a budding community of programmers. CodeCamp helps students improve their coding skills.Its objective is to provide a platform for practice, competition and improvement for students. Apart from this, it aims to reach out to high school students while they are young and inculcate a culture of programming in India.
10+
</p>
11+
</div>

codecamp-front/src/app/services/auth.service.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'rxjs/add/operator/toPromise';
1111
export class AuthService {
1212
public authToken: any;
1313
public user: any;
14-
public domain = 'http://localhost:3000/';
14+
//public domain = 'http://localhost:3000/';
1515
public options;
1616

1717
constructor(
@@ -33,12 +33,12 @@ export class AuthService {
3333
this.authToken = localStorage.getItem('token'); // Get tokens and asssign to variable to be used elsewhere
3434
}
3535
public registerUser(user) {
36-
return this.http.post(this.domain + 'users/signup', user)
36+
return this.http.post('users/signup', user)
3737
.map(res => res.json());
3838
}
3939

4040
public loginUser(user) {
41-
return this.http.post(this.domain + 'users/signin', user)
41+
return this.http.post('users/signin', user)
4242
.map(res => res.json());
4343
}
4444

@@ -62,7 +62,7 @@ export class AuthService {
6262
}
6363

6464
public getUsername() {
65-
let user = JSON.parse(localStorage.getItem('user'));
65+
const user = JSON.parse(localStorage.getItem('user'));
6666
return user;
6767
}
6868

@@ -77,6 +77,6 @@ export class AuthService {
7777
}
7878
getProfile() {
7979
this.createAuthenticationHeaders();
80-
return this.http.get(this.domain + 'users/profile', this.options).map(res => res.json());
80+
return this.http.get('users/profile', this.options).map(res => res.json());
8181
}
8282
}

codecamp-front/src/app/services/contest.service.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class ContestService {
1515
public authToken: any;
1616
public user: any;
1717
public contest: any;
18-
public domain = 'http://localhost:3000/';
18+
//public domain = 'http://localhost:3000/';
1919
public options;
2020
public sol;
2121
public toggler: boolean;
@@ -51,51 +51,51 @@ export class ContestService {
5151

5252
public addContest(contest) {
5353
return this.http
54-
.post( this.domain + 'contest', contest)
54+
.post('contest', contest)
5555
.map(res => res.json());
5656
}
5757

5858
public getContest(): Observable<any> {
59-
return this.http.get( this.domain + 'contest')
59+
return this.http.get('contest')
6060
.map(res => res.json());
6161
}
6262

6363
public addProblem(problem, contest): Observable<any> {
64-
return this.http.post(this.domain + 'contest/' + contest, problem)
64+
return this.http.post('contest/' + contest, problem)
6565
.map(res => res.json());
6666
}
6767

6868
public getProblems(contest): Observable<any> {
69-
return this.http.get( this.domain + 'contest/' + contest)
69+
return this.http.get( 'contest/' + contest)
7070
.map(res => res.json());
7171
}
7272

7373
public getProblem(code, contest): Observable<any> {
74-
return this.http.get(this.domain + 'contest/' + contest + '/problems/' + code)
75-
.map(res =>res.json());
74+
return this.http.get('contest/' + contest + '/problems/' + code)
75+
.map(res => res.json());
7676
}
7777

7878
public addSolution(solution): Observable<any> {
79-
return this.http.post(this.domain + 'solution', solution)
79+
return this.http.post('solution', solution)
8080
.map(res => res.json());
8181
}
8282
public deleteContest(contest) {
83-
return this.http.delete(this.domain + 'contest/' + contest)
83+
return this.http.delete('contest/' + contest)
8484
.map(res => res.json());
8585
}
86-
public setSolution(sol){
86+
public setSolution(sol) {
8787
this.sol = sol;
8888
}
8989
public getSolution() {
9090
return this.sol;
9191
}
9292

9393
changeContest(contest: string) {
94-
this.contestSource.next(contest)
94+
this.contestSource.next(contest);
9595
}
9696

9797
getRankings(contest) {
98-
return this.http.get(this.domain + 'rankings/' + contest)
98+
return this.http.get('rankings/' + contest)
9999
.map(res => res.json());
100100
}
101101
ontoggle(value: boolean){

contest/models/problem/problem.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ const ProblemSchema = new mongoose.Schema({
5757
type:mongoose.Schema.Types.String,
5858
refs:'User'
5959
}],
60+
image:{
61+
type:String
62+
},
6063
author:{
6164
type:String
6265
},

judge/result/binary/Solution.class

8 Bytes
Binary file not shown.

judge/result/binary/Solution.out

0 Bytes
Binary file not shown.

judge/result/source/Solution.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#include<stdio.h>
2-
int main()
3-
{
4-
int n;
5-
scanf("%d",&n);
6-
while(n--)
7-
printf("Hello World\n");
8-
}
9-
2+
//#include<bits/stdc++.h>
3+
//using namespace std;
4+
int main()
5+
{
6+
printf("Welcome To CodeCamp");
7+
return 404;
8+
}

judge/result/source/Solution.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
print("Welcome To CodeCamp")
1+
#include<bits/stdc++.h>
2+
using namespace std;
3+
int main()
4+
{
5+
6+
int t;
7+
cin>>t;
8+
while(t--)
9+
cout<<"Hello World"<<endl;
10+
return 0;
11+
}

judge/result/source/Solution.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
#include<stdio.h>
2-
int main()
3-
{
4-
printf("Welcome To CodeCamp");
1+
import java.util.*;
2+
public class Solution {
3+
public static void main(String[] args) {
4+
System.out.print("Hello World");
55
}
6-
6+
}
7+

0 commit comments

Comments
 (0)