Saltar al contenido
    LinkedCorp

    LinkedCorp

    Tecnología al alcance de tu mano

    JavaScript

    Listening for variable changes in JavaScript (Detectar cambios en variable)

    25 junio 202128 julio 2021 Milton Gonzalez H.

    You can define an object like this, in which aInternal represents the field a: x = { aInternal: 10, aListener: function(val) {}, set a(val) { this.aInternal = val;

    Leer más
    DataBase

    Reemplazar cadenas de caracteres en MySql

    25 junio 202128 julio 2021 Milton Gonzalez H.

    Para reemplazar una cadena de texto por otra, sin necesidad de estar tupla a tupla: UPDATE `tabla` SET campo = REPLACE(campo,‘texto a buscar’,‘nuevo texto’); Y

    Leer más
    Ajax JavaScript

    Ajax dentro de un ciclo FOR

    17 junio 202128 julio 2021 Milton Gonzalez H.

    Código Java Script       var ids = [1,2,3,4,5];       for(indice = 0; indice < ids.length; indice++){       // Es importante notar que estamos utilizando jQuery       $.ajax({           url: «test.php»,

    Leer más
    Php

    IF Shorthand (if corto, if acortado)

    11 junio 202128 julio 2021 Milton Gonzalez H.

    Basic True / False Declaration $is_admin = ($user[‘permissions’] == ‘admin’) ? true : false; Conditional Welcome Message echo ‘Welcome ‘.($user[‘is_logged_in’] ? $user[‘first_name’] : ‘Guest’).’!’; Conditional

    Leer más
    NethServer

    Configurar VPN RoadWarrior Client-Server

    9 junio 202128 julio 2021 Milton Gonzalez H.

    Installed OpenVPN from software center, goto Gateway → OpenVPN roadwarrior Checked → Enable roadwarrior server choosed Username, password and certificate Mode → Routed mode Entered

    Leer más
    JQuery

    Verificar si key existe en objeto JSON / Check if key exists in JSON object using jQuery

    4 marzo 202128 julio 2021 Milton Gonzalez H.

    if you have an array var subcategories=[{name:«test»,desc:«test»}]; function hasCategory(nameStr) { for(let i=0;i<subcategories.length;i++){ if(subcategories[i].name===nameStr){ return true; } } return false; } if you have an object

    Leer más
    HTML JavaScript JQuery

    Close a Modal using the ESC Key? / Cerrar Modal usando ESC

    25 febrero 202128 julio 2021 Milton Gonzalez H.

          $(document).ready(function(){ $(‘.modal’).modal({show: false, keyboard: false}); // disable keyboard because it conflicts below $(‘.modal’).on(‘show.bs.modal’, function (event) { //add modal id to array modals.push(event.target.id);

    Leer más
    HTML JavaScript JQuery

    Determine Click Position (Row and Column Number) on click of a table cell

    26 enero 202128 julio 2021 Milton Gonzalez H.

        Prepare a dummy HTML table for testing purpose. ‘result’ Div will show the corresponding row and column number when a particular cell of

    Leer más
    Ajax JavaScript

    Ajax function return value, retormnando valor usando Ajax

    18 enero 202128 julio 2021 Milton Gonzalez H.

    Ajax success value to parent function Just added  below lint and it worked. Is it good using the below line to fix the issue? any

    Leer más
    JavaScript

    Localstorage, json storage

    12 enero 202128 julio 2021 Milton Gonzalez H.

        localStorage only supports strings. Use JSON.stringify() and JSON.parse(). var names = []; names[0] = prompt(«New member name?»); localStorage.setItem(«names», JSON.stringify(names)); //… var storedNames = JSON.parse(localStorage.getItem(«names»));   Continua leyendo

    Leer más

    Navegación de entradas

    1 2 … 4 Siguientes

    Entradas recientes

    • Listening for variable changes in JavaScript (Detectar cambios en variable)
    • Reemplazar cadenas de caracteres en MySql
    • Ajax dentro de un ciclo FOR
    • IF Shorthand (if corto, if acortado)
    • Configurar VPN RoadWarrior Client-Server

    Comentarios recientes

      Categorías

      Todos los derechos reservados 2021.
      Funciona gracias a WordPress | Tema: Fairy por Candid Themes.