Skip to content

Instantly share code, notes, and snippets.

View douglastaquary's full-sized avatar

Douglas Taquary douglastaquary

View GitHub Profile
@douglastaquary
douglastaquary / diferença-de-angulos.m
Created August 9, 2016 00:50 — forked from ezefranca/diferença-de-angulos.mm
diferença de angulos objective-c
#define RADIANOS_PARA_GRAUS(radians) ((radians) * (180.0 / M_PI))
-(float)anguloEntreCoordenadas:(CLLocationCoordinate2D)primeiraCoordenada
toCoordinate:(CLLocationCoordinate2D)segundaCoordenada {
float deltaLongitude = segundaCoordenada.longitude - primeiraCoordenada.longitude;
float deltaLatitude = segundaCoordenada.latitude - primeiraCoordenada.latitude;
// lembrando que M_PI * .5f = pi / 2
float angulo = (M_PI * .5f) - atan(deltaLatitude / deltaLongitude);
@douglastaquary
douglastaquary / items.json
Last active January 19, 2017 04:34
Response JSON Appetit
{
"data": {
"foods": [
{
"id":1,
"name":"Beiju com Carne de Sol",
"price":"3,00",
"isAdd":"false",
"image": {
"path": "https://raw.githubusercontent.com/douglastaquary/appetit/master/Assets/beiju_carne_de_sol.jpg"
@douglastaquary
douglastaquary / HelperFunction.swift
Created January 19, 2017 00:15
Função para validar campo de email
func stringIsEmailAddress(_ text: String) -> Bool {
let emailRegex = "[A-Z0-9a-z._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}"
let testPredicate = NSPredicate(format:"SELF MATCHES %@", emailRegex)
return testPredicate.evaluate(with: text)
}
@douglastaquary
douglastaquary / movie.json
Last active February 11, 2017 17:46
Mock of movie
{
"Title":"300",
"Year":"2006",
"Rated":"R",
"Released":"09 Mar 2007",
"Runtime":"117 min",
"Genre":"Action, Fantasy",
"Director":"Zack Snyder",
"Writer":"Zack Snyder (screenplay), Kurt Johnstad (screenplay), Michael B. Gordon (screenplay), Frank Miller (graphic novel), Lynn Varley (graphic novel)",
"Actors":"Gerard Butler, Lena Headey, Dominic West, David Wenham",
final class DashboardCollectionDataSource: NSObject, DashboardCollectionViewDataSource {
var items: [Tray] = []
var hidden: [Bool] = []
var isSearchOn = false
var filteredTray: [Tray] = []
weak var collectionView: UICollectionView?
weak var delegate: UICollectionViewDelegate?
//
// DashboardSectionHeader.swift
// Sense
//
// Created by Sense Infoway on 29/09/16.
// Copyright © 2016 Infoway. All rights reserved.
//
import UIKit
import SnapKit
func scrollToSection(_ section: Int) {
let numbersOfBehaviors = items[section].behaviors?.count
if let cv = self.collectionView {
let indexPath = IndexPath.init(item: 1, section: section)
if let attributes = cv.layoutAttributesForSupplementaryElement(ofKind: UICollectionElementKindSectionHeader, at: indexPath) {
let topOfHeader = CGPoint(x: 0, y: attributes.frame.origin.y - cv.contentInset.top)
import UIKit
final class DashboardCollection: UICollectionView {
var didSelectIndicator: ((Behavior) -> Void)?
fileprivate var customDatasource: DashboardCollectionDataSource?
fileprivate var customDelegate: DashboardCollectionDelegate?

Boom de Prêmios! Política de Participação

try! Conference is dedicated to providing a harassment-free conference experience for everyone, regardless of gender, sexual orientation, disability, physical appearance, body size, race, or religion. We do not tolerate harassment of conference participants in any form. Sexual language and imagery is not appropriate for any conference venue, including talks, workshops, parties, Twitter and other online media. Conference participants violating these rules may be sanctioned or expelled from the conference without a refund at the discretion of the conference organizers.

We don’t want anyone to be excluded due to age, gender, sexual orientation, mental or physical impairments, appearance or skin colour, national or religious background. We hope to see the same attitude with our attendees, and look forward to experiencing a non-violent and peaceful event with you.

For Speakers

Sexual language and imagery is not appropriate during talks. Refrain from using these in

enum RequestResult<T> {
case successo(T)
case erro(Error)
}
enum Router {
case xAuth(params: [String: Any])
case dashboard(token: String)
case dimensions