State as of 2017-07-31.
You can also check a guide to upgrade CUDA on a [PC with with GTX 980 Ti and Ubuntu 16.04](https://gist.github.com/bzamecnik/61b293a3891e166797491f38d579d060.
- NVIDIA driver 375.66
| #!/bin/bash -e | |
| # -------------------------------------------------------- | |
| # Generate app icons and xcassets file from a single image | |
| # Ben Clayton, Calvium Ltd. | |
| # https://gist.github.com/benvium/2be6d673aa9ac284bb8a | |
| # -------------------------------------------------------- | |
| # | |
| # Usage with an input of 1024x1024 PNG file | |
| # generateAppIcon.sh AppIcon.png |
State as of 2017-07-31.
You can also check a guide to upgrade CUDA on a [PC with with GTX 980 Ti and Ubuntu 16.04](https://gist.github.com/bzamecnik/61b293a3891e166797491f38d579d060.
| using UnityEngine; | |
| using System.Collections; | |
| using UnityEngine.Networking; | |
| public class JsonRestClient : MonoBehaviour { | |
| private T fromJSON<T>(string json){ | |
| return JsonUtility.FromJson<T> (json); | |
| } |
| /** | |
| * Custom Scroll listener for RecyclerView. | |
| * Based on implementation https://gist.github.com/ssinss/e06f12ef66c51252563e | |
| */ | |
| public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener { | |
| public static String TAG = "EndlessScrollListener"; | |
| private int previousTotal = 0; // The total number of items in the dataset after the last load | |
| private boolean loading = true; // True if we are still waiting for the last set of data to load. | |
| private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more. |
Requires OkHttp >= 2.1.0 if you need to work with multipart request bodies. Lower versions don’t report the content length for the body, but the sum of the sizes of the parts is a pretty good approximation.
// TODO: Build a request body
RequestBody body = null;| #!/bin/sh | |
| ./configure \ | |
| --prefix=$PREFIX \ | |
| --enable-cross-compile \ | |
| --arch=$ARCH \ | |
| --target-os=darwin \ | |
| --cc="/usr/bin/gcc-4.0" \ | |
| --extra-ldflags="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch $ARCH" \ | |
| --extra-cflags="-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4 -arch $ARCH" \ |
| #!/bin/sh | |
| #ID='A16FF353-8441-459E-A50C-B071F53F51B7' # Xcode 6.2 | |
| ID='992275C1-432A-4CF7-B659-D84ED6D42D3F' # Xcode 6.3 | |
| PLIST_BUDDY=/usr/libexec/PlistBuddy | |
| function add_compatibility() { | |
| "$PLIST_BUDDY" -c "Add DVTPlugInCompatibilityUUIDs:10 string $2" \ | |
| "$1/Contents/Info.plist" |
| 1. The texture target needs to be GLES20.GL_TEXTURE_EXTERNAL_OES instead of GL_TEXTURE_2D, e.g. in the glBindTexture calls and glTexParameteri calls. | |
| 2. In the fragment shader define a requirement to use the extension: | |
| #extension GL_OES_EGL_image_external : require | |
| 3. For the texture sampler used in the fragment shader, use samplerExternalOES instead of sampler2D. | |
| Everything below here is all in the C code, no more Java. | |
| 4. In the C code, use glEGLImageTargetTexture2DOES(GL_TEXTURE_EXTERNAL_OES, eglImage) to specify where the data is, instead of using glTexImage2D family of functions. |
| NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:@"REST URL PATH"]]; | |
| NSData *imageData = UIImageJPEGRepresentation(image, 1.0); | |
| [request setCachePolicy:NSURLRequestReloadIgnoringLocalCacheData]; | |
| [request setHTTPShouldHandleCookies:NO]; | |
| [request setTimeoutInterval:60]; | |
| [request setHTTPMethod:@"POST"]; | |
| NSString *boundary = @"unique-consistent-string"; |
| // | |
| // AMScanViewController.h | |
| // | |
| // | |
| // Created by Alexander Mack on 11.10.13. | |
| // Copyright (c) 2013 ama-dev.com. All rights reserved. | |
| // | |
| #import <UIKit/UIKit.h> | |
| #import <AVFoundation/AVFoundation.h> |