Skip to content

Instantly share code, notes, and snippets.

public class Node<T> {
private T data;
private Node<T> next;
public Node(T data, Node<T> next) {
this.data = data;
this.next = next;
}
public T getData() { return data; }
@imjarp
imjarp / SecureDevice.kt
Created February 5, 2019 16:37
Example of Secure device
import android.annotation.SuppressLint
import android.content.Context
import android.os.Build
import android.provider.Settings
import android.telephony.TelephonyManager
class DeviceIdentifier(private val permisionManager: IPermissionAuthorizer,
private val telephonyManager: TelephonyManager,
private val secureAndroid: SecureAndroid,
Unless specified otherwise, all of the below tinting applies to both Lollipop and pre-Lollipop using AppCompat v21.
To use the support version of these attributes, remove the android namespace.
For instance, "android:colorControlNormal" becomes "colorControlNormal".
These attributes will be propagated to their corresponding attributes within the android namespace
for devices running Lollipop. Any exceptions to this will be noted by including the "android:" prefix.
All Clickable Views:
-----------
@imjarp
imjarp / 0_reuse_code.js
Created November 6, 2015 15:45
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@imjarp
imjarp / CinteretsListView
Created July 4, 2015 03:37
Little ListView
package mx.syca.stackoverflow;
import android.os.StrictMode;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.text.*;
import android.util.Log;
import android.view.*;
import android.widget.*;
import com.android.volley.DefaultRetryPolicy;
package mx.syca.stackoverflow;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.*;
import android.widget.*;
public class MainActivity extends ActionBarActivity {
const string HUELLA_REGISTRADA_EXITOSAMENTE = "HUELLA REGISTRADA EXITOSAMENTE";
//Errores visibles para el cualquier usuario
const string EMPLEADO_YA_TIENE_HUELLA = "EL EMPLEADO YA TIENE UNA HUELLA, NO PODRÁ REGISTRAR MÁS";
const string EL_PROMOTOR_YA_TIENE_HUELLA = "EL PROMOTOR YA TIENE UNA HUELLA, NO PODRÁ REGISTRAR MÁS";
const string EMPLEADO_NO_EXISTE = "EL EMPLEADO NO EXISTE FAVOR DE VERIFICAR EL NÚMERO DE EMPLEADO";
const string EL_PROMOTOR_NO_EXISTE = "EL PROMOTOR NO EXISTE FAVOR DE VERIFICAR EL NÚMERO DE PROMOTOR";
//Errores visibles solo para el adminsitrador