- user_id -
user/:uid
- feed_id -
feed/:feed_uri
- category_id -
:user_id/category/:category
(special category:global.all
,global.uncategorized
) - tag_id -
:user_id/tag/:tag
(special tag:global.saved
)
http://cloud.feedly.com/:version/:api
import sys | |
class MyStream(object): | |
S = property(lambda self: self._S) | |
def __init__(self): | |
self._S = "" | |
def write(self, s): | |
self._S += s |
# complexity: logarihmic! :D | |
def log2(n): | |
result=0 | |
while n > 1: | |
n//=2 | |
result +=1 | |
return result | |
import unittest | |
import math |
package com.example.toniotest.utils; | |
import android.os.AsyncTask; | |
/** | |
* Created by gnuton on 5/22/13. | |
*/ | |
public class BoilerPipeTask extends AsyncTask<String, Void, String> { | |
private static final String TAG = "BOILER PIPE TASK"; |
t = 'R\\u00f3is\\u00edn' | |
print(t.decode('unicode_escape')) | |
output => Róisín |
private TextView htmlTextView; | |
private SpannableStringBuilder htmlSpannable; | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
// ... | |
// first parse the html | |
// replace getHtmlCode() with whatever generates/fetches your html |
if ( BuildConfig.DEBUG ) { | |
Log.d(TAG, "getBitmap " + key); | |
} |
/** | |
* | |
* Created by gnuton on 6/18/13. | |
*/ | |
public class ImageAdapter extends PagerAdapter { | |
Context mContext; | |
public List<Drawable> mImages = new ArrayList<Drawable>(); | |
private List<ImageView> mImageViews = new ArrayList<ImageView>(); |
/*Display display = ((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay(); | |
int rotation = display.getRotation(); | |
Log.d(TAG, "Orientation " + rotation); | |
If in portrait mode | |
if (rotation == Surface.ROTATION_180 || rotation == Surface.ROTATION_0 )*/ |
public class FragmentUtils { | |
private static Map mMap = new HashMap<String, Fragment>(); | |
public static Fragment getFragment(FragmentManager fm, String className, String tag){ | |
if (tag == null) | |
tag = className; | |
Fragment f = (Fragment) mMap.get(tag); | |
if (f != null) | |
return f; |