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 org.robovm.apple.foundation.NSAutoreleasePool; | |
import org.robovm.apple.foundation.NSDictionary; | |
import org.robovm.apple.uikit.UIApplication; | |
import org.robovm.apple.uikit.UIApplicationDelegateAdapter; | |
import org.robovm.apple.uikit.UIBarButtonItem; | |
import org.robovm.apple.uikit.UIBarButtonSystemItem; | |
import org.robovm.apple.uikit.UIColor; | |
import org.robovm.apple.uikit.UINavigationController; | |
import org.robovm.apple.uikit.UIScreen; | |
import org.robovm.apple.uikit.UITableViewController; |
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
apply plugin: 'com.android.application' | |
android { | |
compileSdkVersion rootProject.ext.compileSdkVersion | |
buildToolsVersion rootProject.ext.buildToolsVersion | |
defaultConfig { | |
applicationId "com.example.yourapp" | |
minSdkVersion 16 | |
targetSdkVersion 23 |
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
let version : AnyObject! = NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleShortVersionString") | |
let build : AnyObject! = NSBundle.mainBundle().objectForInfoDictionaryKey("CFBundleVersion") | |
println("Version: \(version)") | |
println("Build: \(build)") |
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
// | |
// VideoMerge.swift | |
// David Alejandro | |
// | |
// Created by David Alejandro on 5/12/16. | |
// Copyright © 2016 David Alejandro. All rights reserved. | |
// | |
// inpired by https://github.com/jai/VideoMerge |
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 Foundation | |
protocol Completable { | |
func addCompletionOperation(on queue: OperationQueue, complete: @escaping (Self) -> Void) -> Operation | |
} | |
extension Completable where Self: Operation { | |
func addCompletionOperation(on queue: OperationQueue, complete: @escaping (Self) -> Void) -> Operation { | |
let completionOperation = BlockOperation { |
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
package com.example.name; | |
import android.content.Context; | |
import android.graphics.Rect; | |
import android.graphics.drawable.Drawable; | |
import android.net.Uri; | |
import android.text.Html; | |
import android.view.View; | |
import android.widget.TextView; |
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
extension String { | |
func isValidEmail() -> Bool { | |
guard !self.lowercaseString.hasPrefix("mailto:") else { return false } | |
guard let emailDetector = try? NSDataDetector(types: NSTextCheckingType.Link.rawValue) else { return false } | |
let matches = emailDetector.matchesInString(self, options: NSMatchingOptions.Anchored, range: NSRange(location: 0, length: self.characters.count)) | |
guard matches.count == 1 else { return false } | |
return matches[0].URL?.scheme == "mailto" | |
} | |
} |
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 UIKit | |
import RxSwift | |
import RxAlamofire | |
import ObjectMapper | |
class Post: Mappable { | |
var id: Int = 0 | |
var title: String = "" | |
required init?(_ map: Map) { |
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 'dart:async'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/scheduler.dart'; | |
import 'package:flutter_bloc/flutter_bloc.dart'; | |
import 'package:bloc/bloc.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { |
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 BackgroundTask { | |
private let application: UIApplication | |
private var identifier = UIBackgroundTaskInvalid | |
init(application: UIApplication) { | |
self.application = application | |
} | |
class func run(application: UIApplication, handler: (BackgroundTask) -> ()) { | |
// NOTE: The handler must call end() when it is done |
OlderNewer