Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
# ~/.vim/filetype.vim | |
au BufNewFile,BufRead *.gradle setf groovy |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
.----------------. .----------------. .-----------------. .----------------. .----------------. .----------------. | |
| .--------------. || .--------------. || .--------------. || .--------------. || .--------------. || .--------------. | | |
| | ____ ____ | || | ____ | || | ____ _____ | || | ____ | || | ___ ____ | || | _____ _____ | | | |
| ||_ \ / _|| || | .' `. | || ||_ \|_ _| | || | .' `. | || | |_ ||_ _| | || ||_ _||_ _|| | | |
| | | \/ | | || | / .--. \ | || | | \ | | | || | / .--. \ | || | | |_/ / | || | | | | | | | | |
| | | |\ /| | | || | | | | | | || | | |\ \| | | || | | | | | | || | | __'. | || | | ' ' | | | | |
| | _| |_\/_| |_ | || | \ `--' / | || | _| |_\ |_ | || | \ `--' / | || | _| | \ \_ | || | \ `--' / | | | |
| ||_____||_____|| || | `.____.' | || ||_____|\____| | || | `.____.' | || | |____||____| | || | `.__.' | | | |
| | | || | | || | |
import android.content.Context; | |
import android.graphics.drawable.Drawable; | |
import android.os.Parcel; | |
import android.os.Parcelable; | |
import android.util.AttributeSet; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.Checkable; | |
import android.widget.LinearLayout; |
/** | |
* Copyright (c) 2013 Xcellent Creations, Inc. | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
<?xml version="1.0" encoding="utf-8"?> | |
<fragment xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/map" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
class="com.cyrilmottier.polaris2.maps.SupportMapFragment" /> | |
<!-- The usual fragment contains the map, i'm using polaris2, | |
Polaris is a framework enhancing the Google Maps Android API v2. It aims to | |
fix some of the most frustrating bugs of the original library and provide additional features. --> |
private static OkHttpClient getUnsafeOkHttpClient() { | |
try { | |
// Create a trust manager that does not validate certificate chains | |
final TrustManager[] trustAllCerts = new TrustManager[] { | |
new X509TrustManager() { | |
@Override | |
public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException { | |
} | |
@Override |
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: NSDictionary?) -> Bool { | |
// Override point for customization after application launch. | |
self.window = UIWindow(frame: UIScreen.mainScreen().bounds) | |
var nav1 = UINavigationController() | |
var first = FirstViewController(nibName: nil, bundle: nil) | |
nav1.viewControllers = [first] | |
var second = SecondViewController(nibName: nil, bundle: nil) | |
var nav2 = UINavigationController() |
The default behavior of Gradle to pick the newest version also applies if a lower version has been declared locally, but another dependency transitively pulls in a newer version. This is in contrast with Maven, where a locally declared version will always win.
For example, if your build.gradle
specifies the dependency org.springframework:spring-tx:3.2.3.RELEASE
, and another dependency declares 4.0.5.RELEASE
as a transitive dependency, then 4.0.5.RELEASE
will take precedence:
dependencies {
compile("org.springframework.data:spring-data-hadoop:2.0.0.RELEASE")
compile("org.springframework:spring-tx:3.2.3.RELEASE")
// will select org.springframework:spring-tx:4.0.5.RELEASE
/* | |
* Copyright (C) 2014 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |