Simple Horizontal Divider Item Decoration for RecyclerView
mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
getApplicationContext()
));
NOTE: Add item decoration prior to setting the adapter
#Users
{
id: integer
username: string
email: string
created_at: datetime(iso 8601)
updated_at: datetime(iso 8601)
}
// Handle upload file | |
if ( ! function_exists( 'wp_handle_upload' ) ) { | |
require_once( ABSPATH . 'wp-admin/includes/file.php' ); | |
} | |
$uploadedfile = $_FILES['upload_file']; | |
$upload_overrides = array( 'test_form' => false ); | |
$movefile = wp_handle_upload( $uploadedfile, $upload_overrides ); |
// Version 4.0 | |
const pSBC=(p,c0,c1,l)=>{ | |
let r,g,b,P,f,t,h,i=parseInt,m=Math.round,a=typeof(c1)=="string"; | |
if(typeof(p)!="number"||p<-1||p>1||typeof(c0)!="string"||(c0[0]!='r'&&c0[0]!='#')||(c1&&!a))return null; | |
if(!this.pSBCr)this.pSBCr=(d)=>{ | |
let n=d.length,x={}; | |
if(n>9){ | |
[r,g,b,a]=d=d.split(","),n=d.length; | |
if(n<3||n>4)return null; | |
x.r=i(r[3]=="a"?r.slice(5):r.slice(4)),x.g=i(g),x.b=i(b),x.a=a?parseFloat(a):-1 |
<?php | |
// Restrict dashboard access to administrator only | |
add_action( 'admin_init', 'ru_restrict_admin', 1 ); | |
function ru_restrict_admin() | |
{ | |
if ( ! current_user_can( 'manage_options' ) && '/wp-admin/admin-ajax.php' != $_SERVER['PHP_SELF'] ) { | |
wp_redirect( site_url() ); | |
} | |
} |
<?xml version="1.0" encoding="utf-8"?> | |
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
<!-- Drop Shadow Stack --> | |
<item> | |
<shape> | |
<padding android:top="1dp" android:right="1dp" android:bottom="1dp" android:left="1dp" /> | |
<solid android:color="#00CCCCCC" /> | |
</shape> | |
</item> |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
import android.graphics.Bitmap; | |
import android.graphics.BitmapShader; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import com.squareup.picasso.Transformation; | |
public class CircleTransform implements Transformation { | |
private final int BORDER_COLOR = Color.WHITE; |
<style name="sectionHeader" parent="android:Widget.Holo.Light.TextView"> | |
<item name="android:drawableBottom">@drawable/text_section_header</item> | |
<item name="android:drawablePadding">4dp</item> | |
<item name="android:layout_marginTop">8dp</item> | |
<item name="android:paddingLeft">4dp</item> | |
<item name="android:textAllCaps">true</item> | |
<item name="android:textColor">@color/myPrimaryColor</item> | |
<item name="android:textSize">14sp</item> | |
<item name="android:textStyle">bold</item> | |
</style> |