Thanks to http://blog.nikosd.com/2011/11/github-flavored-markdown-in-yard.html
# Gemfile
group :development do
gem 'yard'
gem 'redcarpet'| /* | |
| Source: http://www.littlerobots.nl/blog/Handle-Android-RecyclerView-Clicks/ | |
| USAGE: | |
| ItemClickSupport.addTo(mRecyclerView).setOnItemClickListener(new ItemClickSupport.OnItemClickListener() { | |
| @Override | |
| public void onItemClicked(RecyclerView recyclerView, int position, View v) { | |
| // do it | |
| } | |
| }); |
| // From: http://stackoverflow.com/a/37816976 | |
| public class SnappyRecyclerView extends RecyclerView { | |
| // Use it with a horizontal LinearLayoutManager | |
| // Based on http://stackoverflow.com/a/29171652/4034572 | |
| public SnappyRecyclerView(Context context) { | |
| super(context); | |
| } |
| /* How to calculate postgreSQL database size in disk ? */ | |
| SELECT pg_size_pretty(pg_database_size('thedbname')); | |
| /* Calculate size of a table including or excluding the index */ | |
| SELECT pg_size_pretty(pg_total_relation_size('big_table')); | |
| SELECT pg_size_pretty(pg_relation_size('big_table')); /* without index */ | |
| /* See indexes on a table with `\d tablename` */ |
| package codepath.com.recyclerviewfun; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class Contact { | |
| private String mName; | |
| private boolean mOnline; | |
| public Contact(String name, boolean online) { |
| import android.text.SpannableStringBuilder; | |
| import android.text.Spanned; | |
| import android.text.TextPaint; | |
| import android.text.method.LinkMovementMethod; | |
| import android.text.style.ClickableSpan; | |
| import android.view.View; | |
| import android.widget.TextView; | |
| import java.util.ArrayList; | |
| import java.util.regex.Matcher; |
Thanks to http://blog.nikosd.com/2011/11/github-flavored-markdown-in-yard.html
# Gemfile
group :development do
gem 'yard'
gem 'redcarpet'| /* | |
| * The MIT License (MIT) | |
| * | |
| * Copyright (c) 2015 ARNAUD FRUGIER | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is |
| # coding:utf-8 | |
| require 'rubygems' | |
| require 'rubygems/specification' | |
| require 'rake' | |
| def gemspec | |
| @gemspec ||= begin | |
| gem_name = File.basename(File.dirname(__FILE__)) | |
| file = File.expand_path("../#{gem_name}.gemspec", __FILE__) |
| include mime.types; | |
| default_type application/octet-stream; | |
| access_log logs/access.log; | |
| sendfile on; | |
| keepalive_timeout 65; | |
| tcp_nodelay on; | |
| tcp_nopush on; |
Enable universe repository:
# /etc/apt/sources.list
## main & restricted repositories
deb http://us.archive.ubuntu.com/ubuntu/ jaunty main restricted universe
deb-src http://us.archive.ubuntu.com/ubuntu/ jaunty main restricted universe
deb http://security.ubuntu.com/ubuntu jaunty-security main restricted universe
deb-src http://security.ubuntu.com/ubuntu jaunty-security main restricted universe