Primeiro, adicione ao build.gradle de nível de projeto:
buildscript {
repositories {
//...
maven {
url "https://plugins.gradle.org/m2/"
}
#!/bin/bash | |
# | |
# PostgreSQL Backup Script Ver 1.0 | |
# http://autopgsqlbackup.frozenpc.net | |
# Copyright (c) 2005 Aaron Axelsen <axelseaa@amadmax.com> | |
# | |
# This script is based of the AutoMySQLBackup Script Ver 2.2 | |
# It can be found at http://sourceforge.net/projects/automysqlbackup/ | |
# | |
# The PostgreSQL changes are based on a patch agaisnt AutoMySQLBackup 1.9 |
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21. | |
To use the support version of these attributes, remove the android namespace. | |
For instance, "android:colorControlNormal" becomes "colorControlNormal". | |
These attributes will be propagated to their corresponding attributes within the android namespace | |
for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix. | |
All Clickable Views: | |
----------- |
git rm -r --cached node_modules | |
git commit -m 'Remove the now ignored directory node_modules' | |
git push origin master |
#!/bin/bash | |
# options: | |
# remove stopped containers and untagged images | |
# $ dkcleanup | |
# remove all stopped|running containers and untagged images | |
# $ dkcleanup --reset | |
# remove containers|images|tags matching {repository|image|repository\image|tag|image:tag} | |
# pattern and untagged images | |
# $ dkcleanup --purge {image} |
PackageManager pm = getPackageManager(); | |
Intent main = new Intent(Intent.ACTION_MAIN, null); | |
main.addCategory(Intent.CATEGORY_LAUNCHER); | |
List<ResolveInfo> packages = pm.queryIntentActivities(main, 0); | |
ArrayList<String> app_name_list = new ArrayList<String>(); | |
ArrayList<String> app_package_list = new ArrayList<String>(); | |
for(ResolveInfo resolve_info : packages) { | |
try { |
use the build in sizes like @dimen/text_size_body_2_material
or style/TextAppearance.Material.Headline
.
Simple helper file for standard text sizes in material design. The sizes are provided by the material design documentation https://www.google.com/design/spec/style/typography.html#typography-roboto
Method | Side effects1 | State updates2 | Example uses |
---|---|---|---|
Mounting | |||
componentWillMount |
✓ | Constructor equivalent for createClass |
|
render |
Create and return element(s) | ||
componentDidMount |
✓ | ✓ | DOM manipulations, network requests, etc. |
Updating | |||
componentWillReceiveProps |
✓ | Update state based on changed props |
/** | |
* Remove acentos de caracteres | |
* @param {String} stringComAcento [string que contem os acentos] | |
* @return {String} [string sem acentos] | |
*/ | |
function removerAcentos( newStringComAcento ) { | |
var string = newStringComAcento; | |
var mapaAcentosHex = { | |
a : /[\xE0-\xE6]/g, | |
e : /[\xE8-\xEB]/g, |
inline fun SharedPreferences.edit(changes: SharedPreferences.Editor.() -> SharedPreferences.Editor) { | |
edit().changes().apply() | |
} | |
fun ImageView.tintSrc(@ColorRes colorRes: Int) { | |
val drawable = DrawableCompat.wrap(drawable) | |
DrawableCompat.setTint(drawable, ContextCompat.getColor(context, colorRes)) | |
setImageDrawable(drawable) | |
if (drawable is TintAwareDrawable) invalidate() // Because in this case setImageDrawable will not call invalidate() | |
} |