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
@implementation UINavigationBar(Rotation) | |
-(BOOL)shouldAutorotate{ | |
return [[self.viewControllers lastObject] shouldAutorotate]; | |
} | |
-(NSUInteger)supportedInterfaceOrientations{ | |
return [[self.viewControllers lastObject] supportedInterfaceOrientations]; | |
} |
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
/* | |
* Copyright (c) 1999-2007 Apple Inc. All Rights Reserved. | |
* | |
* @APPLE_LICENSE_HEADER_START@ | |
* | |
* This file contains Original Code and/or Modifications of Original Code | |
* as defined in and that are subject to the Apple Public Source License | |
* Version 2.0 (the 'License'). You may not use this file except in | |
* compliance with the License. Please obtain a copy of the License at | |
* http://www.opensource.apple.com/apsl/ and read it before using this |
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
/* | |
* Copyright (c) 2010-2012 Apple Inc. All rights reserved. | |
* | |
* @APPLE_LICENSE_HEADER_START@ | |
* | |
* This file contains Original Code and/or Modifications of Original Code | |
* as defined in and that are subject to the Apple Public Source License | |
* Version 2.0 (the 'License'). You may not use this file except in | |
* compliance with the License. Please obtain a copy of the License at | |
* http://www.opensource.apple.com/apsl/ and read it before using this |
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
class S{ | |
public: | |
static int i; | |
S(){++i;} | |
S(const S& ob){++i;} | |
}; | |
int S::i = 0; | |
int main(int argc, char* argv[]){ |
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
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'twitter' | |
require File.join(File.dirname(__FILE__), 'apn.rb') | |
Twitter.configure do |config| |
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
- (id)retain | |
__attribute__((aligned(16))) | |
{ | |
if (OBJC_IS_TAGGED_PTR(self)) return self; | |
SideTable *table = SideTable::tableForPointer(self); | |
if (OSSpinLockTry(&table->slock)) { | |
table->refcnts[DISGUISE(self)] += 2; | |
OSSpinLockUnlock(&table->slock); |
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
#include <iostream> | |
using namespace std; | |
class A{ | |
protected: | |
int i; | |
public: |
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
#import <iostream> | |
using namespace std; | |
class S{ | |
public: | |
static int i; | |
S(){++i;} | |
S(const S& ob){++i;} | |
}; | |
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
// Source: https://devforums.apple.com/message/866487#866487 | |
typedef int (*PYStdWriter)(void *, const char *, int); | |
static PYStdWriter _oldStdWrite; | |
int __pyStderrWrite(void *inFD, const char *buffer, int size) | |
{ | |
if ( strncmp(buffer, "AssertMacros: queueEntry", 24) == 0 ) { | |
return 0; |
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
cd $SRCROOT | |
bN=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "$INFOPLIST_FILE") | |
bN=$((0x$bN)) | |
bN=$(($bN + 1)) | |
bN=$(printf "%X" $bN) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $bN" "$INFOPLIST_FILE" |
OlderNewer