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
fun <T> Modifier.swipeable( | |
state: SwipeableState<T>, | |
anchors: Map<Float, T>, | |
... | |
) |
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.example.myapplication | |
import androidx.compose.animation.AnimatedVisibility | |
import androidx.compose.animation.ExperimentalAnimationApi | |
import androidx.compose.foundation.Box | |
import androidx.compose.foundation.clickable | |
import androidx.compose.foundation.layout.Arrangement | |
import androidx.compose.foundation.layout.Column | |
import androidx.compose.foundation.layout.Row | |
import androidx.compose.foundation.layout.Spacer |
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.antonshilov.rxextensions | |
import io.reactivex.Single | |
fun <T, R> Single<T>.doOnErrorAndRetry(action: Single<R>): Single<T> = | |
onErrorResumeNext { | |
it.printStackTrace() | |
action.flatMap { this } | |
} |
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
/** | |
* Kotlin extension function for nullable types to cast them to non-null or get a default value | |
*/ | |
public inline fun <T> T?.or(default: T): T = this ?: default |
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
FROM python:3.6.5-stretch | |
RUN apt-get update && \ | |
apt-get -y install swig3.0 | |
RUN pip3 install jamspell |
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 <time.h> | |
#include <windows.h> | |
#include <iostream> | |
#include <string> | |
using std::cout; | |
using std::cin; | |
using std::endl; | |
using std::string; | |
using std::to_string; |
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 <time.h> | |
#include <windows.h> | |
#include <iostream> | |
#include <string> | |
using std::cout; | |
using std::cin; | |
using std::endl; | |
using std::string; | |
using std::to_string; |
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
print "Hello! Input format HH:MM" | |
time = str(raw_input("Time - ")) | |
splittedTime = time.split(":") | |
try: | |
splittedTime = [int(i) for i in splittedTime] | |
except ValueError: | |
print "Invalid input" | |
exit() | |
splittedTime = [int(i) for i in splittedTime] | |
if splittedTime[0] > 23 or splittedTime[1] > 59: |
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 "gun.h" | |
class gun { | |
public: | |
gun() { | |
mutex = PTHREAD_MUTEX_INITIALIZER; | |
setisloaded(true); | |
} |