This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.andraskindler.playground.adapter; | |
| import android.view.LayoutInflater; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.widget.BaseAdapter; | |
| import android.widget.TextView; | |
| import com.andraskindler.playground.Item; | |
| import com.andraskindler.playground.R; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.andraskindler.sandbox.activity; | |
| import retrofit.RestAdapter; | |
| import retrofit.http.GET; | |
| import retrofit.http.Query; | |
| import rx.Observable; | |
| import rx.Subscriber; | |
| import rx.schedulers.Schedulers; | |
| public class ApiManager { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class SwipeRefreshLayoutToggleScrollListener extends RecyclerView.OnScrollListener { | |
| private List<RecyclerView.OnScrollListener> mScrollListeners = new ArrayList<RecyclerView.OnScrollListener>(); | |
| private int mExpectedVisiblePosition = 0; | |
| private SwipeRefreshLayout mSwipeLayout; | |
| public SwipeRefreshLayoutToggleScrollListener(SwipeRefreshLayout swipeLayout) { | |
| mSwipeLayout = swipeLayout; | |
| } | |
| public void addScrollListener(RecyclerView.OnScrollListener listener){ | |
| mScrollListeners.add(listener); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by nikola on 11/28/14. | |
| */ | |
| public class MentionTransformation implements TransformationMethod { | |
| private int mColor; | |
| private Pattern MENTIONS_PATTERN = Pattern.compile("\\B@[a-z0-9_-]+"); | |
| private MentionTransformation(int color) { | |
| mColor = color; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1、SwipeRefreshLayout下只能有一个具有scroll功能的子View(ScrollView、ListView、RecyclerView等),子View可以有多个子View | |
| 2、实现上拉加载更多,利用RecyclerView的LayoutManger实现 | |
| mRecyclerView.setOnScrollListener(new OnScrollListener() { | |
| @Override | |
| public void onScrolled(int dx, int dy) { | |
| if(mLayoutManager.findLastVisibleItemPosition() == dataset.length-1){ | |
| Log.d("onScrolled", "end"); | |
| dataset[dataset.length-1] = "正在加载..."; | |
| adapter.notifyItemChanged(dataset.length-1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env python | |
| import redis | |
| import random | |
| import pylibmc | |
| import sys | |
| r = redis.Redis(host = 'localhost', port = 6389) | |
| mc = pylibmc.Client(['localhost:11222']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ruleset a1000x9 { | |
| meta { | |
| name 'WP2Chatter' | |
| description << | |
| WP2Chatter | |
| >> | |
| author "soe soe" | |
| logging on | |
| key wp2chatter { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This module converts requested URLs to callback view functions. | |
| RegexURLResolver is the main class here. Its resolve() method takes a URL (as | |
| a string) and returns a tuple in this format: | |
| (view_function, function_args, function_kwargs) | |
| """ | |
| import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| This module converts requested URLs to callback view functions. | |
| RegexURLResolver is the main class here. Its resolve() method takes a URL (as | |
| a string) and returns a tuple in this format: | |
| (view_function, function_args, function_kwargs) | |
| """ | |
| from __future__ import unicode_literals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // $Id$ | |
| /** | |
| * @ingroup field_fieldable_type | |
| * @{ | |
| */ | |
| /** | |
| * Exposes "pseudo-field" components on fieldable entities. |
OlderNewer