Quick'n'dirty Jekyll plugin for sorted cycle.
Copy sorted_for.rb to _plugins/ directory of your Jekyll site.
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <!-- google's material design colours from | |
| http://www.google.com/design/spec/style/color.html#color-ui-color-palette --> | |
| <!--reds--> | |
| <color name="md_red_50">#FFEBEE</color> | |
| <color name="md_red_100">#FFCDD2</color> | |
| <color name="md_red_200">#EF9A9A</color> |
| import java.util.Set; | |
| import java.util.concurrent.ConcurrentHashMap; | |
| public class HelloCovariance { | |
| public static void main(String[] args) { | |
| ConcurrentHashMap<String, String> properties = new ConcurrentHashMap<>(); | |
| Set<String> keySet = properties.keySet(); | |
| } | |
| } |
| 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; |
| /** | |
| * 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)); | |
| } | |
| /** |
| 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 |
| /* | |
| * 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 |
| /* | |
| * 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 | |
| * |
| 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); | |