(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| !simple paged list for jetpack compose |
| package i_love_companion_objects | |
| suspend fun main() { | |
| // Discoverability is easy with the companion object | |
| // (although autocomplete could use some performance improvements...) | |
| doStuff(SomeInterface.createWithDefaults()) | |
| val someInstance: SomeInterface = SomeInterface.create( | |
| parameterOne = 0, | |
| parameterTwo = 1 | |
| ) |
| # Reference: https://www.exclamationlabs.com/blog/continuous-deployment-to-npm-using-gitlab-ci/ | |
| # GitLab uses docker in the background, so we need to specify the | |
| # image versions. This is useful because we're freely to use | |
| # multiple node versions to work with it. They come from the docker | |
| # repo. | |
| # Uses NodeJS V 9.4.0 | |
| image: node:9.4.0 | |
| # And to cache them as well. |
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- Add this as a debug manifest so the permissions won't be required by your production app --> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <uses-permission android:name="android.permission.WAKE_LOCK" /> | |
| <uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> | |
| </manifest> |
| <!-- You can change the parent around to whatever you normally use --> | |
| <style name="DebugColors" parent="Theme.AppCompat"> | |
| <!-- System colors --> | |
| <item name="android:windowBackground">@color/__debugWindowBackground</item> | |
| <item name="android:colorPressedHighlight">#FF4400</item> | |
| <item name="android:colorLongPressedHighlight">#FF0044</item> | |
| <item name="android:colorFocusedHighlight">#44FF00</item> | |
| <item name="android:colorActivatedHighlight">#00FF44</item> |
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <!-- google's material design colours from | |
| http://www.google.com/design/spec/style/color.html#color-ui-color-palette --> | |
| <!--reds--> | |
| <color name="md_red_50">#FFEBEE</color> | |
| <color name="md_red_100">#FFCDD2</color> | |
| <color name="md_red_200">#EF9A9A</color> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| // Copyright 2012 Square, Inc. | |
| package com.squareup.widgets; | |
| import android.content.Context; | |
| import android.content.res.TypedArray; | |
| import android.util.AttributeSet; | |
| import android.widget.ImageView; | |
| /** Maintains an aspect ratio based on either width or height. Disabled by default. */ | |
| public class AspectRatioImageView extends ImageView { |