This file contains hidden or 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
| function binarySearch(arr, target) { | |
| let left = 0; | |
| let right = arr.length - 1; | |
| while (left <= right) { | |
| const mid = left + Math.floor((right - left) / 2); | |
| if (arr[mid] === target) { | |
| return mid; | |
| } | |
| if (arr[mid] < target) { | |
| left = mid + 1; |
This file contains hidden or 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
| class BinarySearchTree { | |
| constructor(){ | |
| this.root = null; | |
| } | |
| // add a node to the tree | |
| add(value){ | |
| let newNode = { value, left: null, right: null}; | |
This file contains hidden or 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
| // 1, 1, 2, 3, 5, 8 | |
| function fib(n){ | |
| if(n < 2) return n; | |
| return fib(n - 1) + fib(n - 2); | |
| } |
This file contains hidden or 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
| <?php | |
| namespace App\Http\Middleware; | |
| use Closure; | |
| class IsAdmin | |
| { | |
| /** | |
| * Handle an incoming request. | |
| * |
This file contains hidden or 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
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| class AdminController extends Controller | |
| { | |
| public function __construct() | |
| { | |
| $this->middleware('auth'); |
This file contains hidden or 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
| <?php | |
| namespace App\Console\Commands; | |
| use App\Company; | |
| use App\JobListing; | |
| use Illuminate\Console\Command; | |
| use Goutte\Client; | |
| class ScrapeGreenhouse extends Command |
This file contains hidden or 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
| <template> | |
| <section> | |
| <input type="text" class="form-control" placeholder="Search by job title" v-model="searchTerm"> | |
| <div class="list-group mt-2" :style="{ height: this.search_window_height + 'px' }"> | |
| <div class="list-group-item list-group-item-action flex-column align-items-start" v-for="jobListing in filteredJobListings"> | |
| <div class="d-flex w-100 justify-content-between"> | |
| <h5 class="mb-1"> | |
| {{ jobListing.title }} |
This file contains hidden or 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
| <template> | |
| <div id="companies-map-container"> | |
| <div id="companies-map" class="h-500"></div> | |
| </div> | |
| </template> | |
| <style scoped> | |
| #companies-map { | |
| margin: 0 auto; | |
| background: gray; |
This file contains hidden or 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
| <template> | |
| <div class="row"> | |
| <div class="col-7 offset-2"> | |
| <div class="row"> | |
| <div class="col-md-12 mb-3"> | |
| <label>Summary</label> | |
| <textarea class="form-control" v-model="candidateInfo.summary" | |
| placeholder="What do you like to do?"></textarea> | |
| <div v-if="errors && errors.summary" class="text-danger">{{ errors.summary[0] }}</div> | |
| </div> |
This file contains hidden or 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
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| use App\User; | |
| use Spatie\Tags\Tag; | |
| class CandidateController extends Controller | |
| { |