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.swift | |
// Temper | |
// | |
// Created by Said Rehouni on 24/07/2017. | |
// Copyright © 2017 Temper B.V. All rights reserved. | |
// | |
import CoreLocation | |
import ObjectMapper |
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
open class GetJobService<T: Mappable>: BaseService<T, ErrorMappable> { | |
open var hashId: String | |
public init (hashId: String) { | |
self.hashId = hashId | |
} | |
open override var endpoint: String { | |
return "api/v1/contractor/jobs/" + hashId + "?include=open_shifts.contractor_match.contractor,open_shifts.contractor_match.shift,open_shifts.contractor_match.contractor_has_worked_before,open_shifts.contractor_match.tariff_incl_costs,open_shifts.contractor_match.actions,open_shifts.contractor_match.contractor_status,open_shifts.contractor_match.substituted_by,open_shifts.contractor_match.substituting_for,open_shifts.contractor_match.can_claim_cancellation_fee,work_shifts.contractor_match.contractor,work_shifts.contractor_match.shift,work_shifts.contractor_match.contractor_has_worked_before,work_shifts.contractor_match.tariff_incl_costs,work_shifts.contractor_match.actions,work_shifts.contractor_match.contractor_status,work_shifts.contractor_match.substituted_by,work_shifts.contractor_match.su |
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
self.form +++ Section("Filters") | |
<<< SwitchRow("sort_by_distance_tag"){ | |
$0.value = User.sharedInstance.filters?.sortByDistance ?? false | |
$0.title = "Sorteer op afstand" | |
}.onChange({ row in | |
UserManager() | |
.updateFilters(cities: nil, sort_by_distance: row.value, distance: nil, completion: nil) | |
}) | |
<<< StepperRow() { | |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
- (BOOL) saveShow:(Show *)show { | |
if (! [self exists:show]) { | |
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Show" inManagedObjectContext:self.managedObjectContext]; | |
NSManagedObject *newShow = [[NSManagedObject alloc] initWithEntity:entity insertIntoManagedObjectContext:self.managedObjectContext]; | |
NSError *error; | |
[newShow setValue:show.title forKey:@"title"]; | |
[newShow setValue:[NSNumber numberWithLong:show.identifier] forKey:@"id"]; |
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
#import "UIAlertController+DKExtensions.h" | |
@implementation UIAlertController (DKExtensions) | |
#define IPAD UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad | |
+ (UIAlertController *)alertWithTitle:(NSString *)title message:(NSString *)message | |
cancelButtonTitle:(NSString *)cancelButtonTitle cancelBlock:(void (^)())cancelBlock; { | |
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; | |
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:cancelButtonTitle style:UIAlertActionStyleCancel handler:cancelBlock]; |
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
/** | |
* Function to add Dijkstra edges to MediaCollege Amsterdam map | |
* This is the way we calculate which sector to reach from which sector | |
*/ | |
function runTest() { | |
require("includes/config.inc.php"); | |
require("includes/database.inc.php"); | |
$g = new Graph(); |
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
/** | |
* Class for creating an Application | |
*/ | |
<?php | |
require_once 'includes/config.inc.php'; | |
require_once 'database.class.php'; | |
class Application | |
{ | |
private $APPLICATION_NAME; | |
private $APPLICATION_PUBLISH_DATE; |
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
/** | |
* Advanced GrowneController that uses SessionManager instances for managing a custom generated Session that is passed with an async call. | |
*/ | |
<?php | |
use Growne\Handlers\GrowneHandler; | |
use Growne\Models\User; | |
use Growne\Models\Task; | |
use Growne\Models\Like; | |
use Growne\Models\Dislike; |
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
/** | |
* Responder Facade for returning a Facade accesor that can be used in the iOC container | |
*/ | |
<?php namespace Simplos\Facades; | |
use Illuminate\Support\Facades\Facade; | |
class Responder extends Facade { | |
/** |
NewerOlder