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 MainActivity : AppCompatActivity() { | |
| private val items = mutableListOf("Item1", "Item2", "Item3", "Item4", "Item5", "Item6") | |
| private val simpleAdapter = SimpleAdapter() | |
| private val itemTouchHelper = ItemTouchHelper(object : ItemTouchHelper.SimpleCallback(ItemTouchHelper.UP or ItemTouchHelper.DOWN, ItemTouchHelper.LEFT) { | |
| override fun onMove( | |
| recyclerView: RecyclerView, | |
| viewHolder: RecyclerView.ViewHolder, | |
| target: RecyclerView.ViewHolder | |
| ): Boolean { |
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
| apply plugin: 'com.jfrog.bintray' | |
| apply plugin: 'maven-publish' | |
| version = libraryVersion | |
| // Create the pom configuration: A POM object is required to publish to JCenter | |
| def pomConfig = { | |
| licenses { | |
| license { | |
| name licenseName |
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
| /** | |
| * create following variables in your project level build.gradle file's extended block | |
| * ext { | |
| * lib_repo_username = "repo user name" | |
| * lib_repo_password = "repo password" | |
| * lib_repo_url = "lib repo url" | |
| * lib_group_id = "group id" | |
| * lib_artifact_id = "artifact id" | |
| * lib_version_name = "version name" | |
| * } |
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
| // | |
| // CollectionDataSource.swift | |
| // VirtualTourist | |
| // | |
| // Created by Ramiz on 10/12/2019. | |
| // Copyright © 2019 RR Inc. All rights reserved. | |
| // | |
| import Foundation | |
| import CoreData |
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
| // | |
| // ListDataSource.swift | |
| // Mooskine | |
| // | |
| // Created by Ramiz on 07/12/2019. | |
| // | |
| import Foundation | |
| import CoreData | |
| import UIKit |
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
| # NestedLinkedList inherit LinkedList class, just for organization purposes | |
| # otherwise NestedLinkedList and LinkedList are both exactly thing same | |
| class NestedLinkedList(LinkedList): | |
| def flatten(self): | |
| """ | |
| Idea is that each time we take 2 nodes' values (each node value is a LinkedList) | |
| and merge them. The nodes' values will be: first the already merged list | |
| which at start would be None as we are just starting, second the | |
| current node value (a LinkedList as each value is a LinkedList()) | |
| """ |
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 Lane(): | |
| def __init__(self): | |
| #everything starting with `self` keyword will be consider property/data memeber/field of this class | |
| #here we declare all the fields/variables of this class that we need to keep track of data | |
| #flag to represent whether first polynomial fitting has been done | |
| #and now that data can be used for future | |
| self.is_ready = False | |
| #fitting done on current frame | |
| self.current_fit = None |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 <iostream> | |
| #include <thread> | |
| #include <list> | |
| #include <vector> | |
| #include <string> | |
| struct ImageProcessor { | |
| void process(std::string path) { | |
| std::cout << "image processed" << std::endl; | |
| } |
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 | |
| class AppClient { | |
| struct Auth { | |
| static var key = "YOUR_API_KEY" | |
| } | |
| enum Endpoint { | |
| static let baseUrl = "https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=\(Auth.key)" | |
| case base |
NewerOlder