(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.
| /** | |
| * ArcUtils.java | |
| * | |
| * Copyright (c) 2014 BioWink GmbH. | |
| * | |
| * 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 |
| public static Map<String, String> getHashMapResource(Context c, int hashMapResId) { | |
| Map<String, String> map = null; | |
| XmlResourceParser parser = c.getResources().getXml(hashMapResId); | |
| String key = null, value = null; | |
| try { | |
| int eventType = parser.getEventType(); | |
| while (eventType != XmlPullParser.END_DOCUMENT) { |
| /* | |
| * 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 |
| # this is an rsync-excludes format list of files to exclude. |
(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.
| import com.google.auto.value.AutoValue; | |
| import java.lang.annotation.Retention; | |
| import java.lang.annotation.Target; | |
| import static java.lang.annotation.ElementType.TYPE; | |
| import static java.lang.annotation.RetentionPolicy.RUNTIME; | |
| /** | |
| * Marks an {@link AutoValue @AutoValue}-annotated type for proper Gson serialization. | |
| * <p> |
| using UnityEngine; | |
| using UnityEngine.EventSystems; | |
| //by Ralph Barbagallo | |
| //www.flarb.com | |
| //www.ralphbarbagallo.com | |
| //@flarb | |
| public class VRInputModule : BaseInputModule { |
| /* | |
| * 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 |
| android { | |
| defaultConfig { | |
| ... | |
| // Fetch the version according to git latest tag and "how far are we from last tag" | |
| def longVersionName = "git -C ${rootDir} describe --tags --long".execute().text.trim() | |
| def (fullVersionTag, versionBuild, gitSha) = longVersionName.tokenize('-') | |
| def(versionMajor, versionMinor, versionPatch) = fullVersionTag.tokenize('.') | |
| // Set the version name | |
| versionName "$versionMajor.$versionMinor.$versionPatch($versionBuild)" |