This file contains hidden or 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
#=============================================================================# | |
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown # | |
#=============================================================================# | |
rng_name | filename |rands/second| | |
file_input| dieharder.txt| 4.11e+06 | | |
#=============================================================================# | |
test_name |ntup| tsamples |psamples| p-value |Assessment | |
#=============================================================================# | |
diehard_birthdays| 0| 100| 100|0.37793720| PASSED | |
diehard_operm5| 0| 1000000| 100|0.25454738| PASSED |
This file contains hidden or 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
#=============================================================================# | |
# dieharder version 3.31.1 Copyright 2003 Robert G. Brown # | |
#=============================================================================# | |
rng_name | filename |rands/second| | |
file_input| dieharder.txt| 4.17e+06 | | |
#=============================================================================# | |
test_name |ntup| tsamples |psamples| p-value |Assessment | |
#=============================================================================# | |
diehard_birthdays| 0| 100| 100|0.80634484| PASSED | |
diehard_operm5| 0| 1000000| 100|0.02613178| PASSED |
This file contains hidden or 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
/* | |
The MIT License (MIT) | |
Copyright (c) 2010 Blixt | |
Permission is hereby granted, free of charge, to any person obtaining a copy of | |
this software and associated documentation files (the "Software"), to deal in | |
the Software without restriction, including without limitation the rights to | |
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of | |
the Software, and to permit persons to whom the Software is furnished to do so, |
This file contains hidden or 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
// Playground: http://play.golang.org/p/G9-_EtwPRg | |
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
type WorkerId int |
This file contains hidden or 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
- (BOOL)gestureRecognizerShouldBegin:(UIPanGestureRecognizer *)recognizer { | |
if (recognizer != self.panGestureRecognizer) { | |
if ([super respondsToSelector:@selector(gestureRecognizerShouldBegin:)]) { | |
return [super gestureRecognizerShouldBegin:recognizer]; | |
} else { | |
return YES; | |
} | |
} | |
CGPoint translation = [recognizer translationInView:self]; |
This file contains hidden or 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
// Observed bug(?): When adding a button after creating UIAlertView, the firstOtherButtonIndex value | |
// is stuck as -1 instead of the correct value, 1, even though the documentation states that the two | |
// invocations below should be equivalent. | |
NSString *closeText = @"Cancel"; | |
NSString *actionText = @"OK"; | |
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:title | |
message:message | |
delegate:self |
This file contains hidden or 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
- (void)alertWithTitle:(NSString *)title | |
message:(NSString *)message | |
close:(NSString *)closeText | |
action:(NSString *)actionText | |
then:(void (^)(void))block | |
{ | |
if ([UIAlertController class]) { | |
UIAlertController *alert = [UIAlertController alertControllerWithTitle:title | |
message:message | |
preferredStyle:UIAlertControllerStyleAlert]; |
This file contains hidden or 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
@interface AlertViewCallback : NSObject <UIAlertViewDelegate> | |
@property (copy, nonatomic) void (^callback)(void); | |
@end | |
@implementation AlertViewCallback | |
+ (instancetype)callback:(void (^)(void))callback { | |
return [[self alloc] initWithCallback:callback]; | |
} |
This file contains hidden or 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
- (void)scrollViewDidScroll:(UIScrollView *)scrollView { | |
if (scrollView.contentOffset.x > 0) { | |
scrollView.contentOffset = CGPointZero; | |
} | |
self.buttonsView.frame = CGRectMake(scrollView.contentOffset.x, 0, 160, self.buttonsView.frame.size.height); | |
} |
This file contains hidden or 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
- (void)scrollViewDidScroll:(UIScrollView *)scrollView { | |
if (scrollView.contentOffset.x > 0) { | |
scrollView.contentOffset = CGPointZero; | |
} | |
} |