π
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 AsyncDisplayKit | |
class GoogleRefreshNode: ASDisplayNode { | |
enum Position { | |
case close | |
case refresh | |
case back | |
} |
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
from flask import Blueprint, make_response, jsonify, request | |
from models.user import User | |
user_service = Blueprint("users", __name__, url_prefix="/users") | |
@user_service.route("/<int:id>", methods=["GET"]) | |
def get_user(id: int): | |
try: |
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
#include "lib/RxTest.h" | |
#include <iostream> | |
#include <string> | |
#include "Rx/v2/src/rxcpp/rx.hpp" | |
namespace rx = rxcpp; | |
using namespace std; | |
namespace rxtest { |
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
class DisplayNode: ASCellNode { | |
lazy var videoNode: ASVideoNode = { | |
let node = ASVideoNode() | |
node.backgroundColor = UIColor.gray | |
node.shouldAutoplay = true | |
node.shouldAutorepeat = true | |
node.muted = true | |
return videoNode | |
} |
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 UIKit | |
import AsyncDisplayKit | |
import RxSwift | |
import RxCocoa_Texture | |
extension Reactive where Base: TestNode { | |
var didTapPreviewImage: Observable<Void> { | |
return base.previewImageNode.rx.tap.asObservable() | |
} |
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
use_frameworks! | |
inhibit_all_warnings! | |
target 'TODO' do | |
pod 'Texture' | |
pod 'RxSwift' | |
pod 'RxCocoa' | |
pod 'RxCocoa-Texture' | |
pod 'RxOptional' | |
pod 'Codextended' |
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 RxAlamofire | |
import Codextended | |
struct Model: Codable { | |
var id: Int | |
init(from decoder: Decoder) throws { | |
self.id = try! decoder.decode("id") | |
} |
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
class DGSliderView: UISlider { | |
override func trackRect(forBounds bounds: CGRect) -> CGRect { | |
return CGRect.init(x: bounds.origin.x, y: bounds.origin.y, width: bounds.size.width, height: 10.0) | |
} | |
} | |
class SliderNode: ASDisplayNode { | |
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 AsyncDisplayKit | |
class TestController: ASViewController<ASDisplayNode>, ASPagerDelegate, ASPagerDataSource { | |
lazy var topNode: ASDisplayNode = { | |
let node = ASDisplayNode() | |
node.backgroundColor = .red | |
node.style.height = .init(unit: .points, value: 40.0) | |
return node |
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
// Interactor | |
import UIKit | |
import RxSwift | |
import RxCocoa | |
protocol UserInteractorInputLogic { | |
var input: PublishRelay<UserModels.Model.Request> { get } | |
} |