Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block MaksTuev

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5a6ee84e51484cb28c557ee0a075053d
* Базвый нафигатор фрагметов
* @param <T>
abstract class BaseFragmentNavigator<T extends Provider<?>> implements Navigator {
protected final T provider;
BaseFragmentNavigator(T provider) {
this.provider = provider;
View AutoNotifyAdapter for RecyclerView
import java.util.ArrayList;
import java.util.List;
public abstract class AutoNotifyAdapter<VH extends RecyclerView.ViewHolder>
View hybrid query 2
* Базовый класс репозитория
public class BaseRepository {
private ConnectionQualityProvider connectionQualityProvider;
public BaseRepository(ConnectionQualityProvider connectionQualityProvider) {
View gist:364443dc6bf705b4063f770137a6e8e7
* Осуществляет гибридный запрос, в методе происходит объединение данных приходящих с сервера и из кеша
* @param cacheRequest запрос к кешу
* @param networkRequestCreator функция, которая должна вернуть запрос к серверу,
* Integer параметр этой функции определяет {@link QueryMode}
* @param <T> тип возвращаемого значения
protected <T> Observable<T> hybridQuery(Observable<T> cacheRequest,
Func1<Integer, Observable<T>> networkRequestCreator) {
View gist:ad87391221e1ecda666b1c6c87a03dfe
public class SomePresenter {
ActivityNavigator navigator;
void onLoad() {
filter-> {
//handle result
View Employees orders fail
parse error response Внутренняя ошибка сервера:
System.InvalidOperationException: Handler was not found for request of type Rbp.Notifications.Messages.Commands.SendSms.
Container or service locator not configured properly or handlers not registered with your container. ---> Autofac.Core.Registration.ComponentNotRegisteredException: The requested service 'MediatorDependent (MediatR.IAsyncRequestHandler`2[[Rbp.Notifications.Messages.Commands.SendSms, Rbp.Notifications.Messages, Version=, Culture=neutral, PublicKeyToken=null],[MediatR.Unit, MediatR, Version=, Culture=neutral, PublicKeyToken=null]])' has not been registered. To avoid this exception, either register a component to provide the service, check for service registration using IsRegistered(), or use the ResolveOptional() method to resolve an optional dependency.
View transaction api error
Внутренняя ошибка сервера:
System.InvalidOperationException: Sequence contains no elements
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at LinqToDB.Linq.Builder.FirstSingleBuilder.FirstSingleContext.<>c__DisplayClass12`1.<BuildQuery>b__c(QueryContext ctx, IDataContextInfo db, Expression expr, Object[] ps)
at LinqToDB.Linq.ExpressionQuery`1.System.Linq.IQueryProvider.Execute[TResult](Expression expression)
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
You can’t perform that action at this time.