An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
An introduction to curl
using GitHub's API.
Makes a basic GET request to the specifed URI
curl https://api.github.com/users/caspyin
The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.
Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:
githubUsers
.filter(user => user.followers > 1000)
package se.mobileapplab.datademo; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.database.Cursor; | |
import android.database.sqlite.SQLiteDatabase; | |
import android.database.sqlite.SQLiteOpenHelper; | |
/** | |
* Class that wraps the most common database operations. This example assumes you want a single table and data entity |
package com.edinstudio.app.samples.multiplerowradiobuttons; | |
import android.os.Bundle; | |
import android.support.v7.app.ActionBarActivity; | |
import android.view.View; | |
import android.widget.RadioGroup; | |
import android.widget.Toast; | |
public class MainActivity extends ActionBarActivity { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
public static class DatePickerFragment extends DialogFragment | |
implements DatePickerDialog.OnDateSetListener { | |
@Override | |
public Dialog onCreateDialog(Bundle savedInstanceState) { | |
// Use the current date as the default date in the picker | |
final Calendar c = Calendar.getInstance(); | |
final int year = c.get(Calendar.YEAR); | |
final int month = c.get(Calendar.MONTH); | |
final int day = c.get(Calendar.DAY_OF_MONTH); |
RecyclerView
does not have an OnItemClickListener like it's predecessor, ListView
. However, detecting item clicks is pretty simple.
Set an OnClickListener
in your ViewHolder
creation:
private class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> {
public static class ViewHolder extends RecyclerView.ViewHolder
You can use this class to realize a simple sectioned RecyclerView.Adapter
without changing your code.
The RecyclerView
should use a LinearLayoutManager
.
You can use this code also with the TwoWayView
with the ListLayoutManager
(https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter
provided by Google
Example:
public class CountingFileRequestBody extends RequestBody { | |
private static final int SEGMENT_SIZE = 2048; // okio.Segment.SIZE | |
private final File file; | |
private final ProgressListener listener; | |
private final String contentType; | |
public CountingFileRequestBody(File file, String contentType, ProgressListener listener) { | |
this.file = file; |