This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<bits/stdc++.h> | |
using namespace std; | |
// please not at any time we will keep elements in the map called mp whose index lie between i to j. | |
// Initially both are 0 so only first element is added in the map | |
int solution(int a[], int n) | |
{ | |
set<int> st; // to store all the elements to find number of unique elements | |
for(int i = 0; i < n; i++){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#mapSection { | |
height: 100%; | |
position: absolute; | |
width: 100%; | |
} | |
.card{ | |
padding: 10px; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job: Job; | |
user_location: any; | |
error_message: string; | |
constructor(public jobget: JobSetGetService, public router: Router, public apiProvider: ApicallsService) { | |
} | |
// Initialize Components | |
ngOnInit() { | |
this.job = this.jobget.jobInfo; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form #jobSearchForm="ngForm" (ngSubmit)="formSubmit()"> | |
<div class="form-group"> | |
<label for="search">Job Title</label> | |
<input type="text" class="form-control" id="search" | |
[(ngModel)]="model.search" required name="search" | |
#name="ngModel"> | |
</div> | |
<div class="form-group"> | |
<label for="location">Location</label> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row"> | |
<div id="mapSection"> | |
</div> | |
<div class="card"> | |
<div class="card-block"> | |
<h4 class="card-title">{{job.title}}</h4> | |
<h6 class="card-subtitle mb-2 text-muted">{{job.company}} | {{job.date}} | <span class="money"><i | |
class="fa fa-money" aria-hidden="true" style="color: green;"></i>{{job.salary}}</span></h6> | |
<p class="card-text">{{job.description}}</p> | |
<div class="row bottom_info"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// go to map page | |
goToMap(job: Job) { | |
this.jobset.jobInfo = job; | |
this.router.navigate(['map']); | |
} | |
// On form submit | |
formSubmit() { | |
this.apiProvider.getCareerJetResults(this.model.search, this.model.location) | |
.subscribe((jobs) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="card" (click)="goToMap(job)"> | |
<div class="card-block"> | |
<h4 class="card-title">{{job.title}}</h4> | |
<h6 class="card-subtitle mb-2 text-muted">{{job.company}} | {{job.date}} | <span class="money"><i | |
class="fa fa-money" aria-hidden="true" style="color: green;"></i>{{job.salary}}</span></h6> | |
<p class="card-text">{{job.description}}</p> | |
<div class="row bottom_info"> | |
<span><i class="fa fa-map-marker" aria-hidden="true" style="color: red;"></i>{{job.locations}}</span> | |
<span class="url_link" style="right: 0"><a href="{{job.url}}" target="_blank" class="card-link"><i | |
class="fa fa-link" aria-hidden="true"></i></a></span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ngOnInit() { | |
if (this.jobset.jobs.length < 1) { | |
this.apiProvider.getCareerResults('', 'Halifax, NS') | |
.subscribe((jobs) => { | |
this.jobset.jobs = jobs; | |
this.jobs = this.jobset.jobs; | |
}, | |
(error) => { | |
this.error_message = <string>error; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
places_url = '/googleplaces'; | |
matrix_url = '/distancematrix'; | |
constructor(public http: Http) { | |
} | |
// make a http call to careerjet public API and return and return an observable | |
getCareerJetResults(search, location): Observable<Job[]> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mysql = require('mysql'); | |
var express = require('express'); | |
var app = express(); | |
var connection = mysql.createConnection({ | |
host : "localhost", | |
user : "username", | |
password: "yourpassword", | |
database: "Example" | |
}); |
NewerOlder