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 { AfterViewInit, Component, ElementRef, OnInit, ViewChild, ViewContainerRef } from '@angular/core'; | |
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; | |
import { ActivatedRoute } from '@angular/router'; | |
import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; | |
import { filter, map, switchMap, tap } from 'rxjs/operators'; | |
import { LocationMap } from 'src/app/models/location-map.model'; | |
import { Rectangle } from 'src/app/models/rectangle.model'; | |
import { MapsService } from 'src/app/services/maps.service'; | |
import { DocumentPatch } from 'src/app/models/document-patch.model'; | |
import * as mapboxgl from 'mapbox-gl'; |
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
// | |
// LoginWithFacebook.m | |
// Fuelzee | |
// | |
// Created by Rodrigo Recio on 6/26/15. | |
// Copyright © 2015 Fuelzee. All rights reserved. | |
// | |
/* |
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
Mongoid::Errors::Validations: | |
Problem: | |
Validation of User failed. | |
Summary: | |
The following errors were found: Custom app not authorized | |
Resolution: | |
Try persisting the document with valid data or remove the validations. | |
# /Users/rodrigorecio/.rvm/gems/ruby-2.0.0-p598/gems/mongoid-3.1.6/lib/mongoid/persistence.rb:340:in `fail_validate!' | |
# /Users/rodrigorecio/.rvm/gems/ruby-2.0.0-p598/gems/mongoid-3.1.6/lib/mongoid/persistence.rb:102:in `save!' |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
import CoreLocation | |
let locationMgr = CLLocationManager() | |
class GeoCordDelegate: NSObject, CLLocationManagerDelegate { | |
func locationManager(manager: CLLocationManager, didUpdateToLocation newLocation: CLLocation, fromLocation oldLocation: CLLocation) { | |
print("Updated Location: " + newLocation.description) |
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
// 1. Code to test Service Class LoadRewardsNearby | |
- (void)testLoadRewardsNearby { | |
CLLocation *location = [[CLLocation alloc] initWithLatitude:28.538336 longitude:-81.379236]; | |
LoadRewardsNearby *rewardsNearby = [[LoadRewardsNearby alloc] initWithLocation:location]; | |
NSArray *loadedRewards = [rewardsNearby load]; | |
XCTAssertTrue(loadedRewards.count > 0, @"Rewards loading failed."); | |
} | |
// 2. Service Class LoadRewardsNearby |
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
Process: ioquake3.ub [14237] | |
Path: /Applications/ioquake3/ioquake3fe-1.36.app/Contents/MacOS/ioquake3.ub | |
Identifier: org.ioquake.ioquake3 | |
Version: 1.0 | |
Code Type: X86 (Native) | |
Parent Process: ioquake3fe [14232] | |
Responsible: ioquake3fe [14232] | |
User ID: 502 | |
Date/Time: 2014-09-06 11:56:22.185 -0300 |
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
- (void)identifyMixpanelUser:(User *)user | |
{ | |
Mixpanel *mixpanel = [Mixpanel sharedInstance]; | |
NSMutableDictionary *properties = [NSMutableDictionary new]; | |
if (user.email) { | |
[mixpanel identify:user.email]; | |
properties[@"E-mail"] = user.email; | |
} |
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
- (void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qualifiedName attributes:(NSDictionary *)attributeDict | |
{ | |
if ([elementName isEqual:@"Produto"]) { | |
produtoTemp = [[Produto alloc] init]; | |
} | |
} | |
- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string | |
{ | |
if (produtoTemp != nil) { |