This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From https://stackoverflow.com/questions/6256748/check-if-my-app-has-a-new-version-on-appstore | |
-(BOOL) needsUpdate{ | |
NSDictionary* infoDictionary = [[NSBundle mainBundle] infoDictionary]; | |
NSString* appID = infoDictionary[@"CFBundleIdentifier"]; | |
NSURL* url = [NSURL URLWithString:[NSString stringWithFormat:@"http://itunes.apple.com/lookup?bundleId=%@", appID]]; | |
NSData* data = [NSData dataWithContentsOfURL:url]; | |
NSDictionary* lookup = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil]; | |
if ([lookup[@"resultCount"] integerValue] == 1){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Usage: | |
* ``` | |
* std::function<void(int32)> callback; // This should be stored as e.g. class member | |
* ... | |
* addInt32Callback (wrapCallable<int32>(callback), &callback); | |
* ``` | |
* @tparam T | |
* @tparam Callable | |
* @return function pointer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <JuceHeader.h> | |
#if JUCE_IOS | |
class NSURLUtils | |
{ | |
public: | |
static URL URLfromBookmark (void* bookmark); | |
static void* bookmarkFromURL (URL& url); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <JuceHeader.h> | |
#if JUCE_IOS | |
class NSDataUtils | |
{ | |
public: | |
static String toString(void* data); | |
static void* fromString(String dataAsString); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#ifdef __APPLE__ | |
struct OSXUIUtils | |
{ | |
static void setDarkTheme(void* view); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -g -X PUT http://username:[email protected]:5984/dbname/_design/validate_read_only -d \'{\"validate_doc_update\": \""$(tr -d '\n' < validate_doc_update.js | sed 's/"/\\"/g')"\"}\' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
============================================================================== | |
PaddleSetup.cpp | |
Created: 23 Sep 2017 9:15:20pm | |
Author: Adam Wilson | |
============================================================================== | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MTCEmitter.cpp | |
// XDAT | |
// | |
// Created by Arvid Rosén on 2012-02-09. | |
// Copyright (c) 2012 Arvid Rosén. All rights reserved. | |
// | |
#include <iostream> | |
#include "MTCEmitter.h" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
============================================================================== | |
CenteredEditableLabel.h | |
Created: 4 May 2017 10:37:43am | |
Author: Adam Wilson | |
============================================================================== | |
*/ |
NewerOlder