This file contains 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
/* | |
* Copyright 2020 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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 MyFragment { | |
val navToBookings: () -> Unit = { | |
findNavController().navigate(MyFragmentDirections.toBookings()) | |
} | |
fun eventHandler(event: TicketConfirmationEvents) { | |
when (event) { | |
is TicketConfirmationEvents.OnLookAtMyTicket -> { | |
viewModel.onLookAtMyTicket(navToBookings) |
This file contains 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 xml.etree.ElementTree as ET | |
from collections import Counter | |
import re | |
# Source: https://octodex.github.com/atom.xml | |
tree = ET.parse('atom.xml') | |
root = tree.getroot() | |
artists = re.findall(r' by ([\w\s,]+)\n', ET.tostring(root, encoding='unicode', method='text'), re.IGNORECASE) |
This file contains 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
... | |
<a class="post-link" href="{{ post.url | relative_url }}"> | |
{% include custom/webp.html path=post.image alt=post.title %} | |
</a> | |
... |
This file contains 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
// Adapted from https://developer.android.com/guide/playcore/in-app-updates/kotlin-java | |
class ForceUpdateHandler @Inject constructor( | |
private val abTestManager: ABTestManager // Optional | |
) { | |
fun forceUpdateIfNeeded(activity: ComponentActivity) { | |
// Optional, an optimisation / safety check | |
val minimumAllowedVersion = abTestManager.remoteConfigLong(FirebaseRemoteConfigKeys.minimum_version) | |
if (BuildConfig.VERSION_CODE >= minimumAllowedVersion) { | |
return |
This file contains 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 pandas as pd | |
import csv | |
df = pd.read_csv('data-parsed/parsed.csv') | |
df = df.drop_duplicates(subset='id', keep='last') | |
df.to_csv('data-parsed/parsed-cleaned.csv', index=False, quoting=csv.QUOTE_NONNUMERIC) |
This file contains 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
<div class="calendar-container"> | |
{% assign current_year = 'now' | date: '%Y' %} | |
{% for month in (1..12) %} | |
<!-- Month prep --> | |
{% assign month_str = month | prepend: '0' | slice: -2, 2 %} | |
{% assign month_start_date = current_year | append: '-' | append: month_str | append: '-01' %} | |
{% assign month_start_timestamp = month_start_date | date: "%s" %} | |
{% assign first_day_found = false %} | |
<div class="calendar-month"> |
This file contains 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
Red Page | |
Red Page (dirty) | |
Yellow Page | |
Yellow Page (dirty) | |
Green Page | |
Green Page (dirty) | |
Blue Page | |
Blue Page (dirty) | |
Pink Page | |
Pink Page (dirty) |
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 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 | |
{ | |
import com.google.ads.instream.api.AdErrorEvent; | |
import com.google.ads.instream.api.AdEvent; | |
import com.google.ads.instream.api.AdLoadedEvent; | |
import com.google.ads.instream.api.AdSizeChangedEvent; | |
import com.google.ads.instream.api.AdsLoadedEvent; | |
import com.google.ads.instream.api.AdsLoader; | |
import com.google.ads.instream.api.AdsManager; | |
import com.google.ads.instream.api.AdsManagerTypes; |
NewerOlder