Skip to content

Instantly share code, notes, and snippets.

View lokcito's full-sized avatar

ray lokcito

View GitHub Profile
@lokcito
lokcito / android-imageview-circular.xml
Last active December 10, 2019 16:02
Android ImageView Circular: Imágenes circulares
#Library Repository: https://github.com/hdodenhof/CircleImageView
#build.gradle (Module:App)
dependencies {
...
implementation 'de.hdodenhof:circleimageview:3.0.1'
...
}
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
@lokcito
lokcito / android-input-border.xml
Created December 7, 2019 14:21
Android Input Border: Añadiendo borders a EditText
#layout/activity_login.xml
<EditText
android:id="@+id/editText2"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@drawable/input_border_radius"
android:ems="10"
android:paddingLeft="20dp"
android:text="Name" />
@lokcito
lokcito / android-input-icon.xml
Created December 7, 2019 17:53
android-input-icon.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- res/drawable/input_border_radius.xml -->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#FFFFFF"/>
<stroke android:width="2dp" android:color="#FF0000" />
<corners
@lokcito
lokcito / listview-images.java
Last active December 19, 2019 02:17
ListView con imagenes
// Rutas:
// https://mymodernmet.com/wp/wp-content/uploads/2019/09/100k-ai-faces-3.jpg
// https://mymodernmet.com/wp/wp-content/uploads/2019/09/100k-ai-faces-8.jpg
// https://mymodernmet.com/wp/wp-content/uploads/2019/09/100k-ai-faces-7.jpg
// https://mymodernmet.com/wp/wp-content/uploads/2019/09/100k-ai-faces-4.jpg
// build.gradle (Module: App)
dependencies {
....
implementation 'com.android.volley:volley:1.1.1'
}
public static void sendRequestPOST(QueueUtils.QueueObject o, final MainActivity _interface) {
String url = "http://rrojasen.alwaysdata.net/purchaseorders.json";
url = "http://fipo.equisd.com/api/users/new.json";
url = "http://192.168.58.3:8056/api/users/new.json";
StringRequest stringRequest = new StringRequest(Request.Method.POST, url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
try {
//Do it with this it will work
@lokcito
lokcito / Channel.java
Last active January 16, 2020 01:00
Android Sqlite
package info.rayrojas.avispa.models;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.provider.BaseColumns;
import java.util.ArrayList;
@lokcito
lokcito / component.ts
Last active January 21, 2020 01:27
servicios angular
import { Component, OnInit } from '@angular/core';
import { ViewEncapsulation } from '@angular/core'
import { Router, ActivatedRoute } from '@angular/router';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { LoginService } from './login.service';
@Component({
selector: 'app-login',
public class DatabaseHelper extends SQLiteOpenHelper {
....
public static class Columns implements BaseColumns {
public static final String COLUMN_NAME_TOKEN = "token";
public static final String COLUMN_NAME_NAME = "name";
public static final String COLUMN_NAME_TITLE = "title";
public static final String COLUMN_NAME_MESSAGE = "message";
public static final String COLUMN_NAME_EXTRA = "extra";
public static final String COLUMN_NAME_ACTIVE = "is_active";
public static final String COLUMN_NAME_CHANNEL = "channel";
@lokcito
lokcito / PaymentController.php
Created July 29, 2020 04:56
Culqui Payment With Php Laravel 7 and Guzzle php version 6
<?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Http;
use GuzzleHttp\Client;
use Illuminate\Support\Facades\Log;
use GuzzleHttp\Exception\ClientException;
use GuzzleHttp\Exception\RequestException;
@lokcito
lokcito / README.md
Created August 6, 2020 18:33
C# Datagrid Command Line

#How to compile

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe -reference:Newtonsoft.Json.dll /target:winexe .\Table.cs

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe -r:Newtonsoft.Json.dll /target:winexe .\Table.cs