Skip to content

Commit 0a91d73

Browse files
committed
Removed User Schema pre hook
1 parent f11db57 commit 0a91d73

33 files changed

Lines changed: 3014 additions & 91 deletions

codecamp-front/src/app/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import { NgProgressModule, NgProgressBrowserXhr } from 'ngx-progressbar';
4141
import { BrowserXhr } from '@angular/http';
4242
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
4343
import { FlashMessagesModule } from 'angular2-flash-messages';
44-
import { CountDown } from 'ng2-date-countdown';
44+
//import { CountDown } from 'ng2-date-countdown';
4545

4646
@NgModule({
4747
declarations: [
@@ -68,7 +68,7 @@ import { CountDown } from 'ng2-date-countdown';
6868
PreloaderComponent,
6969
SidebarComponent,
7070
EditProfileComponent,
71-
CountDown
71+
//CountDown
7272
],
7373
imports: [
7474
BrowserModule,

codecamp-front/src/app/components/problem/problem.component.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ <h6>Output</h6>
3131
</div>
3232
<div class="col-md-12">
3333
<h6>Constraints</h6>
34+
<p [innerText]="problem?.constraints"></p>
3435
</div>
3536
<div class="col-md-12">
3637
<h6>Input Testcase</h6>

codecamp-front/src/app/components/problem/problem.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export class ProblemComponent implements OnInit {
1515
code;
1616
contest;
1717
problem;
18-
private base64Image;
18+
public base64Image;
1919
constructor(
2020
private route: ActivatedRoute,
2121
private router: Router,

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,7 @@ import { Subject } from 'rxjs/Subject';
1212
export class AuthService {
1313
public authToken: any;
1414
public user: any;
15-
<<<<<<< HEAD
1615
//public domain = 'http://localhost:3000/';
17-
=======
18-
public domain = 'http://localhost:80/';
19-
>>>>>>> e7e94b10d07609752ce6af9b761eca210a8fedd0
2016
public options;
2117

2218
constructor(

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ 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:80/';
1919
public options;
2020
public sol;
2121
public toggler: boolean;
2222

2323

2424

25-
private contestSource = new BehaviorSubject<string>("default contest");
25+
private contestSource = new BehaviorSubject<string>('default contest');
2626
currentContest = this.contestSource.asObservable();
2727

2828
private Toggler = new BehaviorSubject<boolean>(true);
@@ -97,7 +97,7 @@ export class ContestService {
9797
return this.http.get('rankings/' + contest)
9898
.map(res => res.json());
9999
}
100-
ontoggle(value: boolean){
100+
ontoggle(value: boolean) {
101101
this.Toggler.next(value);
102102
}
103103

judge/compileProblem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const compileProblem= async (lang , filename)=>{
1212
switch(lang){
1313
case "c":
1414
file = path.basename(filename,'.c') +".out ";
15-
cmd="cd "+"\"" + path.join(__dirname,"result/source") +"\"" + " && gcc -o \"" +path.join(__dirname,"result/binary/") + "\""+file +" "+ filename;
15+
cmd="cd "+"\"" + path.join(__dirname,"result/source") +"\"" + " && gcc -o \"" +path.join(__dirname,"result/binary/") + "\""+file +" "+ filename+" -lm";
1616
break
1717
case "c++":
1818
case "cpp":
@@ -26,7 +26,7 @@ const compileProblem= async (lang , filename)=>{
2626
return new Promise((resolve,reject)=>{
2727
exec(cmd, (error, stdout, stderr) => {
2828
if (error) {
29-
//console.error(`${error}`);
29+
console.error(`${error}`);
3030
reject(error);
3131
}
3232
resolve(file)

judge/result/binary/Solution.class

824 Bytes
Binary file not shown.

judge/result/binary/Solution.out

168 Bytes
Binary file not shown.

judge/result/source/Solution.c

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
1-
#include<stdio.h>
2-
//#include<bits/stdc++.h>
3-
//using namespace std;
4-
int main()
5-
{
6-
<<<<<<< HEAD
7-
printf("Welcome To CodeCamp");
8-
return 404;
9-
=======
10-
int n;
11-
scanf("%d",&n);
12-
while(n--){
13-
printf("amar\n");
14-
}
15-
>>>>>>> e7e94b10d07609752ce6af9b761eca210a8fedd0
16-
}
1+
#include <stdio.h>
2+
#include <string.h>
3+
int main()
4+
{
5+
char S[100002];
6+
long int T;
7+
int i,t1,t2,l;
8+
scanf("%ld",&T);
9+
while(T)
10+
{
11+
T--;
12+
t1=t2=0;
13+
scanf("%s",S);
14+
l=strlen(S);
15+
for(i=0;i<l;i++){
16+
if(S[i]=='a'|| S[i]=='e'||S[i]=='i'||S[i]=='o'||S[i]=='u'||S[i]=='A'||S[i]=='E'||S[i]=='I'||S[i]=='O'||S[i]=='U')
17+
t1++;
18+
else t2++;
19+
}
20+
if(t1>=t2)
21+
printf("GOOD\n");
22+
else
23+
printf("BAD\n");
24+
}
25+
return 0;
26+
}

judge/result/source/Solution.cpp

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,52 @@
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-
}
1+
#include<bits/stdc++.h>
2+
#define pb push_back
3+
#define ll long long
4+
#define d double
5+
using namespace std;
6+
int main()
7+
{
8+
ll t,i,a;
9+
cin>>t;
10+
while(t--)
11+
{
12+
ll c=0,index=0;
13+
vector<ll>v;
14+
ll n;
15+
cin>>n;
16+
for(i=0;i<n;i++)
17+
{
18+
cin>>a;
19+
v.pb(a);
20+
}
21+
ll z=1;
22+
for(i=1;i<n;i++)
23+
{
24+
if(v[i]!=v[0])
25+
{
26+
index=i;
27+
break;
28+
}
29+
else
30+
{
31+
z++;
32+
}
33+
}
34+
for(i=index;i<n;i++)
35+
{
36+
if(v[i]!=v[0] || v[i]!=v[i-1])
37+
{
38+
c++;
39+
}
40+
}
41+
if(z==n)
42+
{
43+
c=0;
44+
cout<<c<<endl;
45+
}
46+
else
47+
{
48+
cout<<c<<endl;
49+
}
50+
}
51+
return 0;
52+
}

0 commit comments

Comments
 (0)