Skip to content

Instantly share code, notes, and snippets.

@ficusk
ficusk / GsonRequest.java
Last active April 9, 2024 09:03
A Volley adapter for JSON requests that will be parsed into Java objects by Gson.
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.android.volley.AuthFailureError;
import com.android.volley.NetworkResponse;
import com.android.volley.ParseError;
import com.android.volley.Request;
import com.android.volley.Response;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
package com.mirth.stevek.rxtest;
import rx.Observable;
import rx.functions.Action1;
import rx.functions.Func1;
import rx.functions.Func3;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.*;
{" ": " \t \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u205f\u3000",
"A": "\u0391A\u00c0\u0410\u00c1\u1e00\u1f08\u1f09\u1f0a\u1f0b\u1f0c\u1fb8\u1fb9\u1fba\u1fbb\u1f0d\u1f0e\u1f0f\u1ea0\u1ea2\u1ea4\u1ea6\u1ea8\u1eaa\u1eac\u1eae\u1eb0\u1eb2\u1eb4\u1eb6\u00c2\u00c3\u00c4\u00c5\u0100\u0102\u0104\u01cd\u01de\u01e0\u01fa\u0202\u0226\u24b6\ud83c\udd50\uff21\ud835\udc00\ud835\udd6c\ud835\udc68\ud835\udcd0\ud835\udd38\ud835\ude70\ud835\udda0\ud835\uddd4\ud835\ude3c\ud835\ude08\ud83c\udd30\ud83c\udd70\u00c1\ud835\udd04\u00c4\u1d00\u023a\u2090\u1d2c",
"B": "B\u0392\u03b2\u00df\u1e02\u1e04\u1e06\u0412\u0181\u24b7\ud83c\udd51\uff22\ud835\udc01\ud835\udd6d\ud835\udc69\ud835\udcd1\ud835\udd39\ud835\ude71\ud835\udda1\ud835\uddd5\ud835\ude3d\ud835\ude09\ud83c\udd31\ud83c\udd71B\ud835\udd05\u1e04\u0299\u0243\u1d2e",
"C": "C\u0421\u216d\u2103\u00c7\u0106\u0108\u010a\u010c\u1e08\u0187\u24b8\ud83c\udd52\uff23\ud835\udc02\ud835\udd6e\ud835\udc6a\ud835\udcd2\u2102\ud835\ude72\ud835\udda2\ud835\uddd6\
@fbis251
fbis251 / MainActivity.java
Created September 21, 2015 15:28
Android Glide + okhttp progress example
package com.example.glidetest.app;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.ImageView;
import android.widget.ProgressBar;
import com.bumptech.glide.Glide;
import com.bumptech.glide.integration.okhttp.OkHttpUrlLoader;
@jgilfelt
jgilfelt / CurlLoggingInterceptor.java
Created January 9, 2016 15:34
An OkHttp interceptor that logs requests as curl shell commands
/*
* Copyright (C) 2016 Jeff Gilfelt.
*
* 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
@Liam0205
Liam0205 / demo.tex
Last active June 17, 2024 09:48
demo of moderncv
%!TEX program = xelatex
% Font Size:
% 10pt, 11pt, 12pt
% Paper Size:
% a4paper, letterpaper, a5paper, leagalpaper, executivepaper, landscape
% Font Family:
% roman, sans
\documentclass[12pt, a4paper, roman]{moderncv}
% Style:
import 'package:flutter/widgets.dart';
import 'package:flutter/material.dart';
import 'dart:convert';
/*
* TextView with HTML tags support By Kyle Katarn for Dart
*
* Original code by Erik Arvidsson, Mozilla Public License
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js
* and ported it on JavaScript by John Resig (ejohn.org)
@ilya-g
ilya-g / cancellationTest.kt
Last active December 21, 2018 06:42
Cancellation support interceptor
class JobCancellationInterceptor(val originalInterceptor: ContinuationInterceptor?) :
AbstractCoroutineContextElement(ContinuationInterceptor),
ContinuationInterceptor {
override fun <T> interceptContinuation(continuation: Continuation<T>): Continuation<T> =
CancellableCheckContinuation(continuation).let {
originalInterceptor?.interceptContinuation(it) ?: it
}
class CancellableCheckContinuation<T>(val continuation: Continuation<T>) : Continuation<T> {
/*
* Copyright 2017 Google Inc. All rights reserved.
*
* 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
@collinjackson
collinjackson / nested_scroll_view.dart
Last active September 25, 2022 05:29
nestedscrollview example
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:flutter/material.dart';
void main() {
runApp(new TestApp());
}