When to use query parameters versus matrix parameters?

The differences between Matrix parameters and Query Parameters are much more than just convention. The main differences are: urls with query params won’t have their response cached by intermediaries/proxies (at present) matrix parameters may appear anywhere in path calculating the relative uri is different query params are generally abused to add new verbs instead of … Read more

Should I use Singular or Plural name convention for REST resources?

For me is better to have a schema that you can map directly to code (easy to automate), mainly because code is what is going to be at both ends. GET /orders <—> orders POST /orders <—> orders.push(data) GET /orders/1 <—> orders[1] PUT /orders/1 <—> orders[1] = data GET /orders/1/lines <—> orders[1].lines POST /orders/1/lines <—> … Read more

How to listen for a custom URI

To register a protocol in your android app, add an extra block to the AndroidManifest.xml. <manifest> <application> <activity> <intent-filter> <action android:name=”android.intent.action.VIEW” /> <category android:name=”android.intent.category.DEFAULT” /> <category android:name=”android.intent.category.BROWSABLE” /> <data android:scheme=”dchub”/> </intent-filter> </activity> </application> </manifest>

How to get Uri.EscapeDataString to comply with RFC 3986

Having not been able to get Uri.EscapeDataString to take on RFC 3986 behavior, I wrote my own RFC 3986 compliant escaping method. It leverages Uri.EscapeDataString, and then ‘upgrades’ the escaping to RFC 3986 compliance. /// <summary> /// The set of characters that are unreserved in RFC 2396 but are NOT unreserved in RFC 3986. /// … Read more

android camera : Failure delivering result ResultInfo{who=null, request=0, result=-1, data=null} to activity

Make sure you have both Camera Permission and READ/WRITE External Storage Permissions. Try this is working like charm with me private String selectedImagePath = “”; final private int PICK_IMAGE = 1; final private int CAPTURE_IMAGE = 2; public Uri setImageUri() { // Store image in dcim File file = new File(Environment.getExternalStorageDirectory() + “/DCIM/”, “image” + … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)