This file contains hidden or 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
Char Unicode | |
------------------------------ | |
Ä, ä \u00c4, \u00e4 | |
Ö, ö \u00d6, \u00f6 | |
Ü, ü \u00dc, \u00fc | |
ß \u00df |
This file contains hidden or 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
git branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
This file contains hidden or 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 android.text.SpannableStringBuilder; | |
import java.util.ArrayDeque; | |
import java.util.Deque; | |
import static android.text.Spanned.SPAN_INCLUSIVE_EXCLUSIVE; | |
/** A {@link SpannableStringBuilder} wrapper whose API doesn't make me want to stab my eyes out. */ | |
public class Truss { | |
private final SpannableStringBuilder builder; | |
private final Deque<Span> stack; |
This file contains hidden or 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
// Copyright 2014 Robert Carr | |
// | |
// 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 | |
// distributed under the License is distributed on an "AS IS" BASIS, |
This file contains hidden or 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
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |
Centralize the support libraries dependencies in gradle
Working with multi-modules project, it is very useful to centralize the dependencies, especially the support libraries.
A very good way is to separate gradle build files, defining something like:
root
--gradleScript
----dependencies.gradle
This file contains hidden or 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
long date = 1407869895000L; // August 12, 2014, 8:58PM | |
// August 12, 2014 (default) | |
DateUtils.formatDateTime(this, date, 0); | |
// Aug 12, 2014 (default with abbreviated month) | |
DateUtils.formatDateTime(this, date, DateUtils.FORMAT_ABBREV_MONTH); | |
// August 12 (date without year) | |
DateUtils.formatDateTime(this, date, DateUtils.FORMAT_NO_YEAR); |
#####Logcat Colors for IntelliJ Darcula Theme (original post)
- Preferences -> Editor -> Android Logcat
- "Save As" scheme
- Uncheck "Use inherited attributes" option
- Edit foreground color with the following
Debug : #6897BB
Info : #6A8759
This file contains hidden or 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.ninetyseconds.auckland.core.databindings | |
import android.databinding.* | |
import android.databinding.Observable.OnPropertyChangedCallback | |
import android.os.Parcelable | |
import io.reactivex.Observable | |
import io.reactivex.Observable.create | |
import org.funktionale.option.toOption | |
import java.lang.Math.max | |
import java.lang.Math.min |
OlderNewer