(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.
(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.
| public Bitmap blurBitmap(Bitmap bitmap){ | |
| //Let's create an empty bitmap with the same size of the bitmap we want to blur | |
| Bitmap outBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Config.ARGB_8888); | |
| //Instantiate a new Renderscript | |
| RenderScript rs = RenderScript.create(getApplicationContext()); | |
| //Create an Intrinsic Blur Script using the Renderscript | |
| ScriptIntrinsicBlur blurScript = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)); |
| package com.nexus5.dos; | |
| import android.content.Intent; | |
| import android.support.v7.app.ActionBarActivity; | |
| import android.os.Bundle; | |
| import android.view.Menu; | |
| import android.view.MenuItem; | |
| import android.view.View; | |
| import android.widget.Button; | |
| public class MainActivity extends ActionBarActivity { |
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.novoda.espresso"> | |
| <!-- For espresso testing purposes, this is removed in live builds, but not in dev builds --> | |
| <uses-permission android:name="android.permission.SET_ANIMATION_SCALE" /> | |
| <!-- ... --> | |
| /* | |
| * Copyright 2014 Chris Banes | |
| * | |
| * 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 |
| replaceInManifest = {variant, fromString, toString -> | |
| def flavor = variant.productFlavors.get(0) | |
| def buildtype = variant.buildType | |
| def manifestFile = "$buildDir/manifests/${flavor.name}/${buildtype.name}/AndroidManifest.xml" | |
| def updatedContent = new File(manifestFile).getText('UTF-8').replaceAll(fromString, toString) | |
| new File(manifestFile).write(updatedContent, 'UTF-8') | |
| } |
| # coding: utf-8 | |
| from flask import request, g | |
| from functools import wraps | |
| from flask import abort, session, redirect, url_for, flash | |
| from .models import Topic, Attachment | |
| from . import roles | |
| def require_visitor(func): | |
| """仅允许非登陆用户访问,如signin页面""" |
| // Change font (ctrl a) | |
| var doc = context.document, | |
| selection = context.selection, | |
| font_name = [doc askForUserInput:"Font name:" initialValue:"Arial"]; | |
| function check_layer(layer){ | |
| log(layer) | |
| var className = layer.className() | |
| log("Checking layer " + layer + " of klass: " + className) | |
| if (className == "MSTextLayer") { |
| import os | |
| import uuid | |
| from PIL import Image | |
| from flask.ext.uploads import extension | |
| def random_filename(): | |
| """生成伪随机uuid字符串,用做文件名""" | |
| return str(uuid.uuid4()) |
This currently does not work the way I want, but I want to document it for personal reference.
Scenario:
I have an app that uses a library project being build in parallel. I want to have three different build types: debug, internal, release. I want each of those to have it's own package name, app name, version number, and version code. I want to be able to at least automate a build for internal on a nightly basis and upload to HockeyApp.
Problems: