$ rvm install ruby-2.0.0
...
| # 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL | |
| # 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew | |
| # https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers | |
| # 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it | |
| gem install bundler | |
| # 1. Get edge Rails source (master branch) | |
| git clone https://github.com/rails/rails.git |
| package com.arpit.animatortest; | |
| import android.animation.AnimatorSet; | |
| import android.animation.LayoutTransition; | |
| import android.animation.ObjectAnimator; | |
| import android.app.Activity; | |
| import android.graphics.Color; | |
| import android.os.Bundle; | |
| import android.view.Menu; | |
| import android.view.View; |
| // decode Y, U, and V values on the YUV 420 buffer described as YCbCr_422_SP by Android | |
| // David Manpearl 081201 | |
| public void decodeYUV(int[] out, byte[] fg, int width, int height) | |
| throws NullPointerException, IllegalArgumentException { | |
| int sz = width * height; | |
| if (out == null) | |
| throw new NullPointerException("buffer out is null"); | |
| if (out.length < sz) | |
| throw new IllegalArgumentException("buffer out size " + out.length | |
| + " < minimum " + sz); |
| // In ResourceLoader.java I added the following method: | |
| // | |
| public void loadLibraryProjectResources(File libraryProjectRoot) throws Exception { | |
| File systemResourceDir = getSystemResourceDir(getPathToAndroidResources()); | |
| File localValueResourceDir = getValueResourceDir(libraryProjectRoot); | |
| File systemValueResourceDir = getValueResourceDir(systemResourceDir); | |
| loadStringResources(localValueResourceDir, systemValueResourceDir); | |
| loadPluralsResources(localValueResourceDir, systemValueResourceDir); | |
| loadValueResources(localValueResourceDir, systemValueResourceDir); |
| /* | |
| * Copyright 2012 Google Inc. | |
| * | |
| * 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 |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <parent> | |
| <artifactId>myproject</artifactId> | |
| <groupId>com.example</groupId> | |
| <version>1.0.0-SNAPSHOT</version> | |
| </parent> | |
| <modelVersion>4.0.0</modelVersion> | |
| <artifactId>myapp</artifactId> |
| /*bin/mkdir /tmp/rip 2> /dev/null | |
| javac -d /tmp/rip $0 | |
| java -cp /tmp/rip Rip "$@" | |
| exit | |
| */ | |
| import java.io.BufferedReader; | |
| import java.io.IOException; | |
| import java.io.InputStreamReader; | |
| import java.util.*; | |
| import java.util.regex.Matcher; |
System directories
| Method | Result |
|---|---|
| Environment.getDataDirectory() | /data |
| Environment.getDownloadCacheDirectory() | /cache |
| Environment.getRootDirectory() | /system |
External storage directories
| /** | |
| * 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 |