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
// | |
// APCustomBlurView.swift | |
// Created by Collin Hundley on 1/15/16. | |
// | |
import UIKit | |
public class APCustomBlurView: UIVisualEffectView { | |
private let blurEffect: UIBlurEffect |
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
// | |
// UISearchControllerWithIndicator.swift | |
// | |
// Created by Afshin Hoseini on 2/10/16. | |
// https://github.com/afshin-hoseini | |
// | |
import Foundation | |
import UIKit |
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
<?php | |
//______________________________________________ | |
function gitInit() { | |
$currentDir = getcwd(); |
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 ir.abrishamapp.abrishamandroidapp.Activities.OrdersLayer.DetailsViewer; | |
import android.content.Context; | |
import android.support.design.widget.AppBarLayout; | |
import android.support.design.widget.CoordinatorLayout; | |
import android.support.v7.widget.RecyclerView; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.View; |
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
//To list all methods in android application | |
public void listAllClasses() { | |
try { | |
DexFile df = new DexFile(getPackageCodePath()); | |
for (Enumeration<String> iter = df.entries(); iter.hasMoreElements();) { | |
String classPath = iter.nextElement(); | |
} | |
} catch (Exception e) { |
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
/* | |
* (C) 2004 - Geotechnical Software Services | |
* | |
* This code is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either | |
* version 2.1 of the License, or (at your option) any later version. | |
* | |
* This code is distributed in the hope that it will be useful, |
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
/** | |
*This method searchs for classes of type DatabaseManager and then checks if they have any public static method annotated | |
*with @createTables. If exists this will invoke them to make tables database. | |
*/ | |
protected boolean createTables(SQLiteDatabase db, DatabaseType databaseType) | |
{ | |
boolean success = true; | |
if(databaseType == DatabaseType.AppDb) { |
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
// Java8 not fully supported in library projects yet, https://code.google.com/p/android/issues/detail?id=211386 | |
// this is a temporary workaround to get at least lambdas compiling | |
gradle.projectsEvaluated { | |
tasks.withType(JavaCompile) { | |
options.compilerArgs << "-Xbootclasspath/a:" + System.properties.get("java.home") + "/lib/rt.jar" | |
} | |
} |
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
//Put this in android block | |
libraryVariants.all { variant -> | |
variant.outputs.each { output -> | |
println("---> Variant name: " + variant.getName()) | |
println("---> Variant base name: " + variant.getBaseName()) | |
println("---> Variant Assemble: " + variant.getAssemble()) |
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
///Polygon decoder | |
public func decodePoly(encoded: String) -> [Location]? { | |
var poly = [Location]() | |
var index = 0 | |
let len = encoded.length | |
var lat = 0.0, lng = 0.0 | |
var encodedData = encoded.unicodeScalars | |
OlderNewer