Skip to content

Instantly share code, notes, and snippets.

Avatar

Csaba Kozák WonderCsabo

View GitHub Profile
View MyActivity.java
//
// DO NOT EDIT THIS FILE.
// Generated using AndroidAnnotations 4.0-SNAPSHOT.
//
// You can create a larger work that contains this file and distribute that work under terms of your choice.
//
package com.oliver.oliver;
View lol.cpp
assert( ( o-------------o
|L \
| L \
| L \
| o-------------o
| ! !
! ! !
o | !
L | !
L | !
View LoggingOkHttpClientHttpRequestFactory.java
public class LoggingOkHttpClientHttpRequestFactory extends OkHttpClientHttpRequestFactory {
public LoggingOkHttpClientHttpRequestFactory() {
this(new OkHttpClient());
}
public LoggingOkHttpClientHttpRequestFactory(OkHttpClient client) {
super(client);
if (BuildConfig.DEBUG) {
HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
View Multidex proguard warnings
:app:transformClassesWithMultidexlistForStagingDebug
ProGuard, version 5.2.1
Reading program jar [/[REMOVED]/app/build/intermediates/transforms/jarMerging/staging/debug/jars/1/1f/combined.jar]
Reading library jar [/[REMOVED]/Library/Android/sdk/build-tools/23.0.2/lib/shrinkedAndroid.jar]
Note: android.support.design.widget.CoordinatorLayout calls 'Class.getAnnotation'
Note: com.google.gson.FieldAttributes calls 'Field.getAnnotation'
Note: com.google.gson.FieldAttributes calls 'Field.getAnnotations'
Note: com.google.gson.internal.Excluder calls 'Field.getAnnotation'
Note: com.google.gson.internal.Excluder calls 'Class.getAnnotation'
Note: com.google.gson.internal.bind.JsonAdapterAnnotationTypeAdapterFactory calls 'Class.getAnnotation'
View childtoparentback.java
Observable.from(parents)
.flatMap(Observable::from)
.map(parent -> parent.children)
.flatMap(Observable::from)
.filter(c -> c.index % 2 == 0)
.groupBy(child -> child.parent)
.flatMap(Observable::toList)
.map(children -> {
Listing child = children.get(0); // i know there is at least one
child.parent.children = children;
View gist:d8b2ec65e820393e06cf
[INFO] Scanning for projects...
[WARNING] The following dependencies may conflict with the internal versions provided by the Android platform:
[org.khronos:opengl-api:jar:gl1.1-android-2.1_r1:provided, org.json:json:jar:20080701:provided, commons-logging:commons-logging:jar:1.1.1:provided, xerces:xmlParserAPIs:jar:2.6.2:provided, xpp3:xpp3:jar:1.1.4c:provided, org.apache.httpcomponents:httpclient:jar:4.0.1:provided]
It is recommended to shade these artifacts. You can read more about this here: http://simpligility.github.io/android-maven-plugin/shaded-commons-codec.html.
Alternatively, you can disable this warning with the'disableConflictingDependenciesWarning' parameter.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AndroidAnnotations functional test suite 4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
View gist:11fbbd836841fa1b3864
[INFO] Scanning for projects...
[WARNING] The following dependencies may conflict with the internal versions provided by the Android platform:
[org.khronos:opengl-api:jar:gl1.1-android-2.1_r1:provided, org.json:json:jar:20080701:provided, commons-logging:commons-logging:jar:1.1.1:provided, xerces:xmlParserAPIs:jar:2.6.2:provided, xpp3:xpp3:jar:1.1.4c:provided, org.apache.httpcomponents:httpclient:jar:4.0.1:provided]
It is recommended to shade these artifacts. You can read more about this here: http://simpligility.github.io/android-maven-plugin/shaded-commons-codec.html.
Alternatively, you can disable this warning with the'disableConflictingDependenciesWarning' parameter.
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building AndroidAnnotations functional test suite 4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
View gist:61cde4619d935bc5cbd4
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) {
List<Object> list = new ArrayList<>();
for (int i = 0; i < 100000000; ++i) {
list.add(null);
View gist:34c3eebe6b5c8afac857
!ENTRY org.eclipse.egit.ui 4 0 2015-04-24 16:26:40.943
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.egit.ui [505]
Bundle was not resolved because of a uses contraint violation.
org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.eclipse.egit.ui [osgi.identity; osgi.identity="org.eclipse.egit.ui"; type="osgi.bundle"; version:Version="3.4.2.201412180340-r"; singleton:="true"] because it is exposed to package 'com.jcraft.jsch' from resources com.jcraft.jsch [osgi.identity; osgi.identity="com.jcraft.jsch"; type="osgi.bundle"; version:Version="0.1.51.v201410302000"] and com.jcraft.jsch [osgi.identity; osgi.identity="com.jcraft.jsch"; type="osgi.bundle"; version:Version="0.1.50.v201403120620"] via two dependency chains.
Chain 1:
org.eclipse.egit.ui [osgi.identity; osgi.identity="org.eclipse.egit.ui"; type="osgi.bundle"; version:Version="3.4.2.201412180340-r"; singleton:="true"]
require
@WonderCsabo
WonderCsabo / gist:7c36e9c233083afd3ded
Created Mar 24, 2015
java.io.NotSerializableException example
View gist:7c36e9c233083afd3ded
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import java.io.Serializable;
class Fragment implements Serializable {
private String data;