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 random | |
| import time | |
| import matplotlib.image as mpimg | |
| import matplotlib.pyplot as plt | |
| class Level: | |
| def start(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
| <?xml version="1.0" encoding="utf-8"?> | |
| <ripple xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:color="?attr/defaultRippleColor"> | |
| <item | |
| android:id="@android:id/mask" | |
| android:drawable="@android:color/white" /> | |
| </ripple> |
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
| <style name="Style.Button.TextButton" parent="Widget.AppCompat.Button.Borderless.Colored"> | |
| <item name="android:padding">16dp</item> | |
| <item name="android:theme">@style/ThemeOverlay.Button.TextButton</item> | |
| </style> | |
| <style name="ThemeOverlay.Button.TextButton" parent="ThemeOverlay.AppCompat"> | |
| <item name="colorControlHighlight">@color/rippleColor</item> | |
| </style> |
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
| package com | |
| import com.TimeSpanType.FURTHER_THAN_NEXT_DAY | |
| import com.TimeSpanType.NEXT_DAY | |
| import com.TimeSpanType.SAME_DAY | |
| import org.junit.Assert.assertFalse | |
| import org.junit.Assert.assertTrue | |
| import org.junit.Test | |
| import java.text.SimpleDateFormat | |
| import java.util.Locale |
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
| package com | |
| import com.TimeSpanType.FURTHER_THAN_NEXT_DAY | |
| import com.TimeSpanType.NEXT_DAY | |
| import com.TimeSpanType.SAME_DAY | |
| import org.junit.Assert.assertFalse | |
| import org.junit.Assert.assertTrue | |
| import org.junit.Test | |
| import java.text.SimpleDateFormat | |
| import java.util.Locale |
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
| typealias Frequency = Int | |
| // O(n^2) | |
| fun performTask(a: List<Int>, b: List<Int>, p: Int): List<Int> { | |
| if (isPrime(p)) { | |
| val frequencyMap: HashMap<Int, Frequency> = hashMapOf() | |
| for (currentElem in b) { | |
| if (frequencyMap[currentElem] == null) { | |
| var currentElemFrequency: Frequency = 0 | |
| for (elem in b) { |
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
| extension GamesCollectionViewController: UITableViewDataSource { | |
| func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
| return gamesList.count | |
| } | |
| func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { | |
| let collectionGameCell = tableView.dequeueReusableCell(withIdentifier: COLLECTION_GAME_CELL_ID, for: indexPath) as! CollectionGameCell | |
| let collectionGame = gamesList[indexPath.row] | |
| collectionGameCell.selectionStyle = UITableViewCell.SelectionStyle.none |
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 | |
| class CollectionGameCell: UITableViewCell { | |
| @IBOutlet weak var gameNameLabel: UILabel! | |
| @IBOutlet weak var yearPublishedLabel: UILabel! | |
| @IBOutlet weak var gameImageView: UIImageView! | |
| override func prepareForReuse() { | |
| super.prepareForReuse() |
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 | |
| import Kingfisher | |
| extension UIImageView { | |
| func downloaded(from url: URL, placeHolder: UIImage?) { | |
| self.kf.setImage(with: url, | |
| placeholder: placeHolder, | |
| options: [KingfisherOptionsInfoItem.cacheOriginalImage]) |
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
| override fun onStart() { | |
| super.onStart() | |
| buttonClickSubject = PublishSubject.create<Boolean>() | |
| mainViewModel.bind(this) | |
| } |
NewerOlder