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 com.example.<app-name>.model.<T> | |
/** | |
Adapter for [RecyclerView] in [Activity]. Displays [dataset] data objects. | |
*/ | |
class ItemAdapter( | |
private val context: Context, | |
private val dataset: List<T> | |
) : RecyclerView.Adapter<ItemAdapter.ItemViewHolder>() { | |
// Provide a reference to the views for each data item |
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 <bits/stdc++.h> | |
using namespace std; | |
#define MOD 1000000007 | |
#define ll long long int | |
#define ld long double | |
#define pb push_back | |
#define mkp make_pair | |
#define pii pair<int, int> |