Skip to content

Instantly share code, notes, and snippets.

package com.demotxt.myapp.myapplication.adapters;
import android.content.Context;
import android.content.Intent;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/cardview_id"
android:clickable="true"
android:layout_width="120dp"
android:layout_height="190dp"
android:layout_margin="5dp"
>
<LinearLayout
package com.demotxt.myapp.myapplication.model;
/**
* Created by Aws on 22/02/2018.
*/
public class Anime {
private String name ;
private String description;
@jhoanborges
jhoanborges / Estados y Municipios
Created March 4, 2019 21:44 — forked from coffe67/Estados y Municipios
Estados y Municipios Mexico (SQL), La relación es un estado tiene n municipios.
-- Host: localhost:8889
-- Generation Time: Aug 29, 2014 at 05:26 PM
-- Server version: 5.5.34
-- PHP Version: 5.5.10
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
--
-- Database: `estados_municipios`
@jhoanborges
jhoanborges / honeypot-antispam.php
Created January 28, 2019 14:24 — forked from andrewlimaza/honeypot-example.php
Simple honeypot for an HTML form using PHP
<?php
//check if form was sent
if($_POST){
$to = '[email protected]';
$subject = 'Testing HoneyPot';
$header = "From: $name <$name>";
$name = $_POST['name'];
@jhoanborges
jhoanborges / alt-callback-pass.md
Created December 3, 2018 16:02
Alternative ways to pass a callback to a function in Javascript

#Alternative ways to pass a callback to a function in Javascript

Javascript is extremely flexible, encouraging us to find alternatives to almost any possible expression or statement. For example, passing a callback function to another function can be done in different ways.

Because a function is an object in Javascript, it can be passed to another function as an argument and executed later. Callbacks let us defer the code execution to the moment it's really needed.

function waitAndCall(func)
{
 setTimeout(func,parseInt(Math.random()*10000));