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
if (!atomic) { | |
oldValue = *slot; | |
*slot = newValue; | |
} else { | |
spin_lock_t *slotlock = &PropertyLocks[GOODHASH(slot)]; | |
_spin_lock(slotlock); | |
oldValue = *slot; | |
*slot = newValue; | |
_spin_unlock(slotlock); | |
} |
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 UIWindow (WLOAnalytics) | |
+(void)load{ | |
Class class = [UIWindow class]; | |
SEL swizzleIt = @selector(sendEvent:); | |
SEL swizzleTo = @selector(WLORuntime_sendEvent:); | |
Method methodIt = class_getClassMethod(class, swizzleIt); | |
Method methodTo = class_getClassMethod(class, swizzleTo); | |
method_exchangeImplementations(methodIt, methodTo); |
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
- (NSArray *)timelineRecordsFromEvents:(NSArray *)events { | |
WOTimelineRecord *lastRecord = [self.items lastObject]; | |
WOTimeLineSessionGroup *lastSessionGroup = (lastRecord.type == WOTimelineRecordTypeGroupedAuthEvents) ? lastRecord.item : nil; | |
NSMutableArray *newRecords = [NSMutableArray new]; | |
NSMutableArray *sessionEvents = [NSMutableArray new]; | |
for (int i = 0; i < [events count]; i++) { | |
WOTimeLineEvent *event = events[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
class Pod::Podfile | |
def self.MR_disable_logging(installer) | |
target = installer.project.targets.find{|t| t.to_s == "Pods-MagicalRecord"} | |
target.build_configurations.each do |config| | |
s = config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] | |
s = [ '$(inherited)' ] if s == nil; | |
s.push('MR_ENABLE_ACTIVE_RECORD_LOGGING=0') if config.to_s == "Debug"; | |
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = s | |
end | |
end |
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
GET /questionary/scripts/helper.php?callback=jQuery172032966944482177496_1385636607054&cmd=vote&scheduleId=121&questionId=14844&value=1&_=1385636609975 HTTP/1.1 | |
Host: www.tut.by | |
Accept: */* | |
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.57 Safari/537.36 | |
Referer: http://i.tut.by/missit2013.html | |
Accept-Encoding: gzip,deflate,sdch | |
Accept-Language: en-US,en;q=0.8,ru;q=0.6,pl;q=0.4 | |
Cookie: __utuid=d8scu643-48f9zlvp-5fqjukg-37idfwih-27a5x3jw; lvutm=0; muid=54149114075; __utma=108158727.1610473201.1385636607.1385636607.1385636607.1; __utmb=108158727.1.10.1385636607; __utmc=108158727; __utmz=108158727.1385636607.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); by4_tut_questionary=5ecacf00b380c48011d263736727eabb | |
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" |
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
#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
#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
- (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); |