Version:
Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.1.0
Thread model: posix
This was made with commands:
return new Scanner(is).useDelimiter("\\A").next(); |
Add the script include-version-info.sh into a new run script build phase of your application target. The build phase | |
should be located after the build phase "Copy Bundle Resources". |
// adaptation of: http://android-developers.blogspot.com/2011/03/identifying-app-installations.html | |
// but using shared preferences instead of a file: http://developer.android.com/reference/android/content/SharedPreferences.html | |
// here's a better look at using shared preferences: http://developer.android.com/guide/topics/data/data-storage.html#pref | |
public class UniqueId { | |
private static String sID = null; | |
private static final String SHARED_PREF_KEY = "SKETCHABIT2"; | |
private static final String ID_KEY = "id"; |
package com.wta.videodemo; | |
/* | |
* Copyright (C) 2012 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 |
public class Dexter { | |
private static String optimizedDirectory = "optimized"; | |
private static String workDirectory = "working"; | |
public static void loadFromAssets(Context context, String fileName) throws Exception { | |
File optimized = new File(optimizedDirectory); | |
optimized = context.getDir(optimized.toString(), Context.MODE_PRIVATE); | |
optimized = new File(optimized, fileName); |
void setTcpKeepalive(SOCKET &sockfd) | |
{ | |
const uint32_t keepaliveIntervalSec = 10; | |
#ifdef _WIN32 | |
tcp_keepalive keepaliveParams; | |
DWORD ret = 0; | |
keepaliveParams.onoff = 1; | |
keepaliveParams.keepaliveinterval = keepaliveParams.keepalivetime = keepaliveIntervalSec * 1000; | |
WSAIoctl(sockfd, SIO_KEEPALIVE_VALS, &keepaliveParams, sizeof(keepaliveParams), NULL, 0, &ret, NULL, NULL); |
#traverse all the directory and subdirectory | |
define walk | |
$(wildcard $(1)) $(foreach e, $(wildcard $(1)/*), $(call walk, $(e))) | |
endef | |
#find all the file recursively under jni/ | |
ALLFILES = $(call walk, $(LOCAL_PATH)) | |
FILE_LIST := $(filter %.cpp, $(ALLFILES)) | |
LOCAL_SRC_FILES := $(FILE_LIST:$(LOCAL_PATH)/%=%) |
public class CroppingTool { | |
private static final String TAG = "CroppingTool"; | |
public static byte[] cropRect( | |
byte data[], | |
int previewTop, | |
int previewLeft, | |
int previewBottom, | |
int previewRight, | |
int gridRight, |
#!/usr/bin/env python | |
# BB-8 Python driver by Alistair Buxton <[email protected]> | |
from bluepy import btle | |
import time | |
class BB8(btle.DefaultDelegate): | |
def __init__(self, deviceAddress): |