Get UTM Source and Campaign to Google Analytics

/* Place this on the Product's page*/
if ( window.location.pathname == '/' ){
    // Index (home) page
    document.cookie = "utm_source=" + getParameterByName('utm_source');
 document.cookie = "utm_source=" + getParameterByName('utm_campaign');
}
 
function getParameterByName(name, url = window.location.href) {
    name = name.replace(/[\[\]]/g, '\\$&');
    var regex = new RegExp('[?&]' + name + '(=([^&#]*)|&|#|$)'),
        results = regex.exec(url);
    if (!results) return null;
    if (!re

One Liners

// Get Value of a brower Cookie
const cookie = name => `; ${document.cookie}`.split(`; ${name}=`).pop().split(';').shift();
cookie('_ga'); // Result: "GA1.2.1929736587.1601974046"

// Clear All Cookies
const clearCookies = document.cookie.split(';').forEach(cookie => document.cookie = cookie.replace(/^ +/, '').replace(/=.*/, `=;expires=${new Date(0).toUTCString()};path=/`));

// Convert RGB to Hex
const rgbToHex = (r, g, b) =>
  "#" + ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);

3. JSX y Webpack

- Entender las aristas del sugar syntax como proceso evolutivo de los lenguajes.
- Expandir nuestra sintaxis avanzada de JavaScript.
- Conocer el rol de webpack y babel en el bundling/retrocompatibilidad.
- Desarrollar código en JSX

## Sugar Syntax

Sugar Syntax refiere a la sintaxis agregada a un lenguaje de programación con el objetivo de hacer más fácil y eficiente su utilización. Favorece su escritura, lectura y comprensión.

Asociado con la llegada de ECMA Scripts

# Polyfills y la retroco

ContactDBHelper.java

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class ContactDBHelper extends SQLiteOpenHelper {

    private static final String DATABASE_NAME = "mycontacts.db";
    private static final int DATABASE_VERSION = 1;

    // Database creation sql statement
    private static final String CREATE_TABLE_CONTACT =
         "create table contact (_id integer primary key autoincrem

Console Log

Saved from chrome-extension://aiiaandmkmekfhembfoghdnfiiiedhhk/#/tutorial
// In Javascript
console.log('Hello Cacher!');

H1 tag

<h1> I'm a H1 </H1>

SalesForce


En el proyecto Data Phoenix se decidio ocupar Data Fusion como herramienta de migracion de data,
en el desarrollo de esta tarea Data Fusion, era un buen candidato pues iba manejar la metadata en forma interna y conversion de tipos de datos, 
para practicamente solo ejecutar un proceso "migrar", lo que no resulto explicitamente asi de facil

En el desarrollo de los problemas, se construyo un generador de pipelines ( json input de data fusion ) 
para la migracion de datos, este json tiene definid

RegularUtils

https://gitee.com/zl_freedom/AndroidUtilCode/blob/master/utilcode/src/main/java/com/blankj/utilcode/utils/RegularUtils.java
package com.blankj.utilcode.utils;

import java.util.regex.Pattern;

import static com.blankj.utilcode.utils.ConstUtils.*;

/**
 * <pre>
 *     author: Blankj
 *     blog  : http://blankj.com
 *     time  : 2016/8/2
 *     desc  : 正则相关工具类
 * </pre>
 */
public class RegularUtils {

    private RegularUtils() {
        throw new UnsupportedOperationException("u can't fuck me...");
    }

    /**
     * If u want more please visit http://toutiao.com/i6231678548520731137/
     

ToastUtil

https://gitee.com/wonderful12/location-android/blob/master/app/src/main/java/com/example/myapplicationlocation/ToastUtil.java
/**
 * 
 */
package com.example.myapplicationlocation;

import android.content.Context;
import android.graphics.Color;
import android.os.Handler;
import android.util.Log;
import android.view.Gravity;
import android.widget.TextView;
import android.widget.Toast;

import com.amap.api.services.core.AMapException;

public class ToastUtil {
	
	private static Toast mToast;

	private static Handler mHandler = new Handler();
	private static Runnable r = new Runnable() {
		public void

A CRM with tinyDB

- pip install faker - pip install tinydb # key points: - User.DB.all() to get all entriers of the tinydb database
import re
from pathlib import Path
import string
import logging

from tinydb import TinyDB, Query, where
from faker import Faker
import tinydb


logging.basicConfig(
    filename="crm.log",
    filemode="a",
    format="%(asctime)s - %(levelname)s - %(message)s",
    level=logging.DEBUG,
)
logger = logging.getLogger()


class User:

    DB = TinyDB(Path(__file__).resolve().parent / "db.json", indent=4)

    def __init__(
        self, first_name: str, last_name: str, phon

initSaveButton

private void initSaveButton() {
        Button saveButton = findViewById(R.id.buttonSave);
        saveButton.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View view) {
                boolean wasSuccessful;
                hideKeyboard();
                ContactDataSource ds = new ContactDataSource(MainActivity.this);
                FileIO fileIO = new FileIO();
                try {
                    ds.open();

         

ContactDataSource.java

package edu.lakeland.mycontactlist;

import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;

import java.sql.SQLException;

public class ContactDataSource {
    private SQLiteDatabase database;
    private ContactDBHelper dbHelper;

    public ContactDataSource(Context context) {
        dbHelper = new ContactDBHelper(context);
    }

    public void open() throws SQLException {
      

contact-class

package edu.lakeland.mycontactlist;

import android.util.Log;

import java.util.Calendar;

public class Contact {

    public final String TAG = "Contacts";
    public final String DELIM = "|";

    private int contactID;
    private String contactName;
    private String streetAddress;
    private String city;
    private String state;
    private String zipCode;
    private String phoneNumber;
    private String cellNumber;
    private String eMail;
    private Calendar bir

FileIO.java

package edu.lakeland.mycontactlist;

import android.content.Context;
import android.util.Log;

import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.ArrayList;

public class FileIO {
    private static final String FILENAME = "data.txt";
    private static final String TAG = "Contacts";


    public void writeFile(MainActiv

ContactSettingsActivity-initSortOrderClick

  private void initSortOrderClick() {
        RadioGroup rgSortOrder = findViewById(R.id.radioGroupSortOrder);
        rgSortOrder.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {

            @Override
            public void onCheckedChanged(RadioGroup arg0, int arg1) {
                RadioButton rbAscending = findViewById(R.id.radioAscending);
                if (rbAscending.isChecked()) {
                    getSharedPreferences("MyContactListPreferences",
    

ContactSettingsActivity-initSortByClick

 private void initSortByClick() {
        RadioGroup rgSortBy = findViewById(R.id.radioGroupSortBy);
        rgSortBy.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {

            @Override
            public void onCheckedChanged(RadioGroup arg0, int arg1) {
                RadioButton rbName = findViewById(R.id.radioName);
                RadioButton rbCity = findViewById(R.id.radioCity);
                if (rbName.isChecked()) {
                    getSharedPrefe