Quick'n'dirty Jekyll plugin for sorted cycle.
Copy sorted_for.rb to _plugins/ directory of your Jekyll site.
| # Jekyll archive page generator with pagination. | |
| # | |
| # Based on the category generator from | |
| # http://recursive-design.com/projects/jekyll-plugins/, | |
| # which is copyright (c) 2010 Dave Perrett, | |
| # http://recursive-design.com/ and is licensed under the MIT | |
| # license (http://www.opensource.org/licenses/mit-license.php), and | |
| # on the pagination code from Jekyll itself. | |
| # | |
| # This code is copyright (c) 2011 Benjamin Curtis, and is licensed |
| #!/usr/bin/env ruby | |
| # | |
| # Convert blogger (blogspot) posts to jekyll posts | |
| # | |
| # Basic Usage | |
| # ----------- | |
| # | |
| # ./blogger_to_jekyll.rb feed_url | |
| # | |
| # where `feed_url` can have the following format: |
| package com.example; | |
| import android.content.Context; | |
| import android.database.Cursor; | |
| import android.support.v4.app.Fragment; | |
| import android.support.v4.app.FragmentManager; | |
| import android.support.v4.app.FragmentPagerAdapter; | |
| import android.util.SparseIntArray; | |
| import android.view.ViewGroup; |
| public class SomeFragment extends Fragment { | |
| MapView mapView; | |
| GoogleMap map; | |
| @Override | |
| public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
| View v = inflater.inflate(R.layout.some_layout, container, false); | |
| /* | |
| * Copyright 2012 Dandre Allison | |
| * 2012 Roman Nurik | |
| * | |
| * 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 | |
| * |
| /* | |
| * Copyright 2014 Julian Shen | |
| * | |
| * 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 |
| public class CustomMatchers { | |
| public static Matcher<View> withBackground(final int resourceId) { | |
| return new TypeSafeMatcher<View>() { | |
| @Override | |
| public boolean matchesSafely(View view) { | |
| return sameBitmap(view.getContext(), view.getBackground(), resourceId); | |
| } | |
| @Override |
| /** | |
| * Sugar for has(int, isAssignableFrom(Class)). | |
| * | |
| * Example: onView(rootView).check(has(3, EditText.class); | |
| */ | |
| public static ViewAssertion has(final int expectedCount, Class<? extends View> clazz) { | |
| return has(expectedCount, isAssignableFrom(clazz)); | |
| } | |
| /** |