adb logcat '*:S' ReactNative:V ReactNativeJS:V
Debug → Open System Log... in the iOS Simulator
git filter-branch --env-filter ' | |
OLD_EMAIL="<old email>" | |
CORRECT_NAME="<correct name>" | |
CORRECT_EMAIL="<correct email>" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" | |
fi | |
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] |
return facebookService.validateFacebookUser(credentialsDto) | |
.map(this::findOrCreateChordUser) | |
.map(user -> jwtTokenService.generateToken(user)) | |
.map(TokenDto::new) | |
.map(ResponseEntity::ok) | |
.orElseThrow(() -> new AuthorizationServiceException("Can't authenticate")); |
variantFilter { variant -> | |
def names = variant.flavors*.name | |
if (names.contains("devBeta") && variant.buildType.name == "release") { | |
variant.ignore = true | |
} | |
} |
// Return the set of products that were ordered by every customer | |
fun Shop.getSetOfProductsOrderedByEveryCustomer(): Set<Product> { | |
val allProducts = customers.flatMap { it.orders.flatMap { it.products }}.toSet() | |
return customers.fold(allProducts, { | |
orderedByAll, customer -> | |
orderedByAll.intersect(customer.orders.flatMap { it.products }.toSet()) | |
}) | |
} |
adb logcat '*:S' ReactNative:V ReactNativeJS:V
Debug → Open System Log... in the iOS Simulator
https://facebook.github.io/react-native/ - React Native
https://facebook.github.io/react/ - React.js
https://github.com/facebookincubator/create-react-app - simplest React.js entry point
https://github.com/react-community/create-react-native-app - simplest React Native entry point
https://medium.com/the-react-native-log/organizing-a-react-native-project-9514dfadaa0 - how to organize code
https://medium.com/@jonlebensold/getting-started-with-react-native-redux-2b01408c0053 - React Native + Redux
https://www.youtube.com/watch?v=xsSnOQynTHs - intro to predictable state containers
nc -zv 10.1.133.41 50001 |
Wraps Android's `android.widget.NumberPicker`. | |
Supported 'Nothing' selection, which appears as first item in the NumberPicker. |
import androidx.lifecycle.LiveData | |
import androidx.lifecycle.MediatorLiveData | |
import androidx.lifecycle.Transformations | |
fun <T, R> LiveData<T>.map(mapFunction: (T) -> R): LiveData<R> = | |
Transformations.map(this) { mapFunction(it) } | |
fun <T> LiveData<T>.filter(predicate: (T) -> Boolean): LiveData<T> = | |
MediatorLiveData<T>().apply { | |
addSource(this@filter) { if (predicate(it)) value = it } |
/* | |
* Copyright (C) 2017 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 |