-
Что такое
полиморфизм? -
Что такое *инкапсуляция? Что такое *нарушение инкапсуляции? -
Чем
абстрактныйкласс отличается отинтерфейса? -
Расскажите о
паттерне MVC. Чем отличаетсяпассивнаямодель отактивной?
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 { Canvas, Circle, Group, Rect, Shader, Skia, useClock, RuntimeShader, SkRuntimeEffect, RoundedRect } from "@shopify/react-native-skia"; | |
| import { SafeAreaView, StyleSheet } from "react-native"; | |
| import { useDerivedValue, useSharedValue } from "react-native-reanimated"; | |
| import { Gesture, GestureDetector, GestureHandlerRootView } from 'react-native-gesture-handler'; | |
| const styles = StyleSheet.create({ | |
| centered: { | |
| flex: 1, | |
| alignItems: 'center', | |
| justifyContent: 'center', |
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
| async function getPoolInfo(connection: Connection, poolId: PublicKey): Promise<ApiPoolInfoV4> { | |
| const info = await connection.getAccountInfo(poolId); | |
| if (!info) { | |
| throw error('No Pool Info') | |
| } | |
| let amAccountData = { id: poolId, programId: info.owner, ...LIQUIDITY_STATE_LAYOUT_V4.decode(info.data) } | |
| const marketProgramId = amAccountData.marketProgramId | |
| const allMarketInfo = await connection.getAccountInfo(marketProgramId) | |
| if (!allMarketInfo) { |
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 SwiftUI | |
| // 1. Use looped H/VStacks to create a grid | |
| // 2. Conditionally increase spacing to grow/shrink the grid | |
| // 3. Calculate the distance of each dot to the center and use the value to stagger the animation | |
| //4. Add random delay on top of the staggered delay value | |
| struct ContentView: View { | |
| // const & state |
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
| // | |
| // CDView.swift | |
| // CD | |
| // | |
| // Created by Daniel Kuntz on 7/3/23. | |
| // | |
| import SwiftUI | |
| struct ShapeWithHole: Shape { |
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
| public extension UIImage { | |
| /// Creates a dynamic image that supports displaying a different image asset when dark mode is active. | |
| static func dynamic( | |
| light makeLight: @autoclosure () -> UIImage, | |
| dark makeDark: @autoclosure () -> UIImage | |
| ) -> UIImage { | |
| if #available(iOS 13, *) { | |
| return UIDynamicProviderImage(light: makeLight(), dark: makeDark()) | |
| } else { |
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 CoreData | |
| import Playgrounds | |
| import RxSwift | |
| import RxCocoa | |
| @objc(ProductEntity) | |
| final class ProductEntity: NSManagedObject { | |
| @NSManaged public var uuid: String? | |
| @NSManaged public var title: String? |