Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
| import java.lang.ref.WeakReference; | |
| import android.graphics.Bitmap; | |
| import android.graphics.BitmapFactory; | |
| import android.graphics.Color; | |
| import android.graphics.drawable.ColorDrawable; | |
| import android.graphics.drawable.Drawable; | |
| import android.os.AsyncTask; | |
| import android.widget.ImageView; | |
| /* |
| import org.json.JSONObject; | |
| import android.content.Context; | |
| import com.android.volley.Request.Method; | |
| import com.android.volley.RequestQueue; | |
| import com.android.volley.Response.ErrorListener; | |
| import com.android.volley.Response.Listener; | |
| import com.android.volley.toolbox.ImageLoader; |
| import android.graphics.Bitmap; | |
| import android.support.v4.util.LruCache; | |
| import com.android.volley.toolbox.ImageLoader.ImageCache; | |
| public class BitmapLruCache extends LruCache<String, Bitmap> implements ImageCache { | |
| public static int getDefaultLruCacheSize() { | |
| final int maxMemory = (int) (Runtime.getRuntime().maxMemory() / 1024); | |
| final int cacheSize = maxMemory / 8; |
| /* | |
| * Copyright (C) 2013 Square, Inc. | |
| * | |
| * 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 |
| package jp.i_dig.community.util; | |
| 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; |
| /* | |
| * Copyright (c) 2013 Alex Curran | |
| * | |
| * 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 |
| /* | |
| * Copyright 2013 Evelio Tarazona Cáceres <evelio@evelio.info> | |
| * | |
| * 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 |
| How to generate UML in your Android project + eclipse with javadoc: | |
| First download apiviz from: https://code.google.com/p/apiviz/ | |
| 0. extract the zip, for example in y case I did: C:\Program Files\Java\apiviz-1.3.2.GA | |
| 1. Project -> Generate JavaDocRight-click on a Java project. | |
| 2. Choose the 'Use custom doclet' radio button. | |
| Enter 'org.jboss.apiviz.APIviz' in the 'Doclet name' field. | |
| In 'Doclet class path' field set the location of the jar. C:\Program Files\Java\apiviz-1.3.2.GA\jar\apiviz-1.3.2.GA.jar | |
| 3. Click the 'Next' button. (Do not click the 'Finish' button yet.) |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
| public class PaintView extends View { | |
| public static final int MAX_FINGERS = 5; | |
| private Path[] mFingerPaths = new Path[MAX_FINGERS]; | |
| private Paint mFingerPaint; | |
| private ArrayList<Path> mCompletedPaths; | |
| private RectF mPathBounds = new RectF(); | |
| public PaintView(Context context) { | |
| super(context); | |
| } |