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
| import Foundation | |
| import UIKit | |
| class PassThroughView: UIView { | |
| override func pointInside(point: CGPoint, withEvent event: UIEvent?) -> Bool { | |
| for subview in subviews as [UIView] { | |
| if !subview.hidden && subview.alpha > 0 && subview.userInteractionEnabled && subview.pointInside(convertPoint(point, toView: subview), withEvent: event) { | |
| return true | |
| } | |
| } |
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
| /*----------------------------------------------------*/ | |
| #pragma mark - XCTAsserts | |
| /*----------------------------------------------------*/ | |
| XCTAssert(expression, format...); | |
| XCTAssertTrue(expression, format...); | |
| XCTAssertFalse(expression, format...); | |
| XCTAssertEqual(expression1, expression2, format...); | |
| XCTAssertNotEqual(expression1, expression2, format...); | |
| XCTAssertNil(expression, format...); |
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
| import pyes | |
| conn = pyes.es.ES("localhost:9200") | |
| all = conn.search(pyes.query.MatchAllQuery(), 'index', 'type', scan=True) | |
| for a in all: | |
| conn.index(a, 'index', 'type', a.get_id(), bulk=True) |
NewerOlder