martes, 29 de octubre de 2019

Sustituir contrabarras (backslashes) en string de php

<?php
$string = "W:\Ampps\www\FG_WEBS\iha\app\imagenes";

$filtered = preg_replace('/[^A-Za-z0-9_: \/]+/', '/', $string);

echo $filtered;
?>

Podes probarlo en http://phptester.net/

domingo, 27 de octubre de 2019

Cómo añadir dos o varias barras de tareas en Windows 10

En algunos casos puntuales, puede suceder que ingresemos tantos accesos en la barra de tareas que nos quedamos sin espacio o en otros casos, deseamos ordenar los accesos de forma diferente, para ambos casos, contamos con la opción de añadir otra barra de tarea en Windows 10 y así contar con dos barras de tareas para simplificar las tareas de acceso y orden.

Solvetic te enseñará cómo hacerlo de forma fácil.

Qué es Linkbar
Para este proceso, haremos uso de una herramienta de código abierto llamada Linkbar la cual podemos descargar en el siguiente enlace:

Características de Linkbar
Dentro de sus características tenemos:
  • Opción de arrastrar y soltar
  • Menús contextuales del explorador de archivos
  • Listas de saltos
  • Soporta AeroGlass para Windows 8 u 8.1
  • Soporte para múltiples paneles
  • Posición de subtítulos
  • Temas del sistema operativo
  • Aero Glass
  • Tamaño del icono hasta 256 px
  • DPI-Aware
  • Compatible con arquitecturas de 64 bits
  • Sistema de localización simple
  • Disponible en inglés, chino simplificado, francés, alemán, griego, japonés, coreano, polaco, ruso


1. Crear barra de tareas usando Linkbar en Windows 10


Paso 1

Una vez la descarguemos, extraemos su contenido y ejecutamos el .exe y será desplegada la siguiente ventana. Allí podemos definir si la barra será aplicada a todos los usuarios del sistema o solo para el usuario actual.

Paso 2

Luego, en el campo “Choose a folder”, debemos seleccionar alguna carpeta local la cual estará vinculada a la barra de herramientas y la carpeta que seleccionemos estará como la carpeta principal para los accesos directos que ubiquemos en dicha barra. La carpeta principal no será accesible a través de esta barra de tareas por seguridad.

Paso 3

Pulsamos en el botón “Create” para continuar con el proceso. Esto creará una barra de tareas en limpio la cual será ubicada en la parte superior del escritorio de Windows 10:

A partir de este punto podremos usar esta barra de tareas.



2. Agregar accesos directos a la barra de tareas con Linkbar en Windows 10


Paso 1

Este proceso es imple, basta con dar clic derecho sobre la barra de tareas y seleccionar la opción “New shortcut”:

Paso 2

Se desplegará la siguiente ventana donde asignaremos la ruta del elemento a agregar:

Paso 3

Pulsamos en Siguiente y asignaremos un nombre y concluimos pulsando en Finalizar.

Paso 4

Veremos el acceso directo creado:


De este modo podremos agregar todos los accesos deseados.


3. Agregar múltiples barras de tareas con Linkbar en Windows 10


Paso 1

Como hemos mencionado, esta herramienta nos permite añadir más barra de tareas, en este caso tenemos la barra de tareas por defecto de Windows 10 más una barra adicional, ahora, si deseamos añadir una barra am daremos clic derecho sobre la barra superior y seleccionamos la opción “Create linkbar”:


Paso 2

Esto desplegará la ventana inicial donde definimos para que usuarios será desplegada esta barra y en qué carpeta se guardará la configuración:

Paso 3

Una vez la creemos podremos verla en el costado de Windows 10 y realizar el proceso de adición de accesos directos:



4. Borrar una barra de tareas con Linkbar en Windows 10


Paso 1

El proceso es simple, basta con dar clic derecho sobre la barra a eliminar y allí seleccionar la opción “Delete the linkbar”:

Paso 2

Sera desplegado el siguiente mensaje que debemos confirmar para remover dicha barra:



5. Configurar barra de tareas con Linkbar en Windows 10


Paso 1

Para acceder a las opciones de configuración de la barra de tareas, daremos clic derecho sobre ella y seleccionamos la opción “Settings”:

Paso 2

Será desplegada la siguiente ventana:

Paso 3

Allí podremos definir parámetros como:
  • Definir la posición de la barra de tareas en 4 puntos disponibles: Superior, Derecha, Izquierda o Inferior.
  • Establecer el tamaño del icono de acceso directo. El tamaño máximo del icono se puede establecer en 256 pixeles.
  • Cambiar el color de fondo de la barra de tareas.
  • Establecer el margen de la barra de tareas.
  • Establecer el orden de los accesos directos por alfabeto.
  • Mostrar u ocultar el texto del nombre del acceso directo.
  • Cambiar el color del texto.
  • Añadir brillo a la barra de tareas.
  • Ocultar automáticamente la barra de tareas y establecer propiedades de ocultación automática.




Con esta útil herramienta podremos establecer una o mas barras de tareas en Windows 10 con el objetivo de un mejor orden de los accesos a usar ya que así simplificaremos muchas acciones sin confundirnos y todo en un ambiente simple.

viernes, 18 de octubre de 2019

AMPPS MySQL not working, Solution!

  1. Open Ampps Application -> MySQL Tab -> Configuration.
  2. In [mysqld] section, add the following line: innodb_force_recovery = 1
  3. Save the file and try starting MySQL
  4. Remove that line which you just added and Save.


     
If that not works try:

open the following folder
Ampps/mysql/data/
delete all files like ib_logfile** and mysql-bin.index,mysql-bin.****,
then start or restart MySQL via the AMPPS pannel

jueves, 10 de octubre de 2019

Mostrar y ocultar el contenido de un div con un checkbox

Siempre que tengamos contenido no muy importante o que no queramos resaltar en nuestra página Web o especialmente en los formularios, cuando nos referimos a campos no obligatorios, podriamos ocultarlos y mostrarlos al antojo del usuario medante un checkbox que muestre o no muestre el contenido según esté chekeado o no.
Para implementar esto necesitarmos crear una función javascript dentro de la etiqueta <head> de la siguiente forma:

<script type="text/javascript">
    function showContent() {
        element = document.getElementById("content");
        check = document.getElementById("check");
        if (check.checked) {
            element.style.display='block';
        }
        else {
            element.style.display='none';
        }
    }
</script>
 
Con esta función lo que conseguimos es obtener el elemnto con id=»content», que se trata del contenido escondido y seguidamente comprobar si el input checkbox con id=»check» está chekeado o no para mostrar o no el div con id=»content».

<b>Mostrar contenido?</b>
<input type="checkbox" name="check" id="check" value="1" onchange="javascript:showContent()" />

El código anterior estaría dentro del formulario y se trata del checkbox que mostrará o no según esté chekeado o no el div escondido.
Y finalmente, tendremos a continuación el div escondido que será mostrado al checkear el checkbox.

<div id="content" style="display: none;">
   contenido del div escondido<br/>
   contenido del div escondido<br/>
   contenido del div escondido<br/>
 </div>

miércoles, 9 de octubre de 2019

Eliminar virus de accesos directos en pendrives

Lo unico que tienes que hacer es conectar el pendrive y ver que unidad le asignó (e:\ por ejemplo)
Luego abrir el cmd (win+r) y escribir cmd y enter
Ejecutar el comando attrib e:*.* /d /s -r -h -s (remplazo e por la unidad)
Esperar a que termine y listo

viernes, 4 de octubre de 2019

Cómo hacer que un programa se inicie automáticamente al arrancar Windows 10

Hacer que un programa se inicie automáticamente en Windows 10 es muy fácil:
  • Pulsa las teclas Windows + R
  • Seguidamente tienes que escribir shell:startup
  • A continuación verás una ventana, en ella simplemente tienes que arrastrar los accesos directos de aquellos programas que deseas que se inicien automáticamente al arrancar Windows 10
  • Reinicia el equipo
Si quieres hacer todo lo contrario, o sea, que una aplicación no se inicie automáticamente, el proceso es prácticamente idéntico. Solo tienes que eliminar el acceso directo de la carpeta que se abre al ejecutar el comando shell:startup.

sábado, 26 de enero de 2019

Enabling File Sharing Applications like BitTorrent and Emule


This page explains how to configure Comodo Firewall for file sharing applications like Shareaza/Emule and BitTorrent/UTorrent. To allow these file sharing applications, you must:
To Disable 'Do Protocol analysis'
  1. Open 'Tasks' interface by clicking the green curved arrow at top right of the 'Home' screen
  2. Open 'Firewall Tasks' by clicking 'Firewall Tasks' from the Tasks interface and click 'Open Advanced Settings'.


  1. Ensure that 'Do Protocol Analysis' checkbox is not selected.
To Create a 'Predefined Firewall Ruleset' for Shareaza/Emule
  1. Click 'Rulesets' under 'Firewall' from the LHS navigation pane of 'Advanced Settings' interface to open 'Rulesets' panel
  2. Click the handle from the bottom of the panel and choose 'Add'



The 'Firewall Ruleset' interface will open for creating a new set of rules.
  1. Click the handle from the bottom and choose 'Add'
  2. Enter a descriptive name for the new ruleset to be created in the 'Description' text box (for example: For allowing Shareaza/Emule).
  3. Now you need to create six rules for the newly created ruleset. To do so, click 'Add'. The 'Firewall Rule' interface will appear. For creating each rule, select the check box and choose the drop-down options under each tab as given below. After creating each rule, click 'OK' for the rule to be added. Click handle in the 'Firewall Ruleset' interface and choose 'Add' to create the next rule.


Rule 1
  • Action : Allow
  • Protocol : TCP
  • Direction : In
  • Description : Rule for incoming TCP connections
  • Source Address : Any Address
  • Destination Address : Any Address
  • Source port : A Port Range : (Start Port = 1025 / End Port = 65535)
  • Destination port : A Single Port : (Port : Your TCP port of Shareaza/Emule)
Rule 2
  • Action : Allow
  • Protocol : UDP
  • Direction : In
  • Description : Rule for incoming UDP connections
  • Source Address : Any Address
  • Destination Address : Any Address
  • Source port : A Port Range : (Start Port = 1025 / End Port = 65535)
  • Destination port : A Single Port : (Port : Your UDP port of Shareaza/Emule)
Rule 3
  • Action : Allow
  • Protocol : TCP or UDP
  • Direction : Out
  • Description : Rule for outgoing TCP and UDP connections
  • Source Address : Any Address
  • Destination Address : Any Address
  • Source port : A port range : (start port = 1025 / end port = 65535)
  • Destination port : A port range : (start port = 1025 / end port = 65535)
Rule 4
  • Action : Allow
  • Protocol : ICMP
  • Direction : Out
  • Description : Ping the server (edk network)
  • Source Address : Any Address
  • Destination Address : Any Address
  • ICMP Details : Message : ICMP Echo Request
Rule 5
  • Action : Ask (Also select the check box 'Log as a firewall event if this rule is fired')
  • Protocol : TCP
  • Direction : Out
  • Description : Rule for HTTP requests
  • Source Address : Any Address
  • Destination Address : Any Address
  • Source port : A port range : (start port = 1025 / end port = 65535)
  • Destination port : Type : Single Port; (Port : 80)
Rule 6
  • Action : Block (Also select the check box 'Log as a firewall event if this rule is fired')
  • Protocol : IP
  • Direction : In/Out
  • Description : Block and Log All Unmatching Requests
  • Source Address : Any Address
  • Destination Address : Any Address
  • IP Details : IP Protocol : Any
  1. Click 'OK' in the 'Firewall Ruleset' interface.
The new ruleset will be created and added as a Predefined ruleset. Start Shareaza or Emule. When Comodo raises a pop-up alert, choose 'Treat this application as', select the descriptive name you gave for this rule (e.g. For allowing Shareaza/Emule) from the options and select 'Remember my answer'.

To create a 'Predefined Firewall Ruleset' for BitTorrent/Utorrent'
  1. Click 'Rulesets' under 'Firewall' from the LHS navigation pane of 'Advanced Settings' interface to open 'Rulesets' panel
  2. Click the handle from the bottom of the panel and choose 'Add'
The 'Firewall Ruleset' interface will open for creating a new set of rules.
  1. Click the handle from the bottom and choose 'Add'
  2. Enter a descriptive name for the new ruleset to be created in the 'Description' text box (for example: For allowing BitTorrent/Utorrent).
  3. Now you need to create six rules for the newly created ruleset. To do so, click 'Add'. The 'Firewall Rule' interface will appear. For creating each rule, select the check box and choose the drop-down options under each tab as given below. After creating each rule, click 'OK' for the rule to be added. Click handle in the 'Firewall Ruleset' interface and choose 'Add' to create the next rule.
Rule 1
  • Action : Allow
  • Protocol : TCP or UDP
  • Direction : In
  • Description : Rule for incoming TCP and UDP connections
  • Source Address : Any Address
  • Destination Address : Any Address
  • Source port : A Port Range : (Start port = 1025 / End port = 65535)
  • Destination port : A Single Port (Port: The port of BitTorrent/Utorrent)
Rule 2
  • Action : Allow
  • Protocol : TCP
  • Direction : Out
  • Description : Rule for outgoing TCP connections
  • Source Address : Any Address
  • Destination Address : Any Address
  • Source port : A Port Range : (Start port = 1025 / End port = 65535)
  • Destination port : A Port Range : (Start port = 1025 / End port = 65535)
Rule 3
  • Action : Allow
  • Protocol : UDP
  • Direction : Out
  • Description : Rule for outgoing UDP connections
  • Source Address : Any Address
  • Destination Address : Any Address
  • Source port : A Single Port: Port: the port of utorrent
  • Destination port : A Port Range : (Start port = 1025 / End port = 65535)
Rule 4
  • Action : Ask (Also select the check box 'Log as a firewall event if this rule is fired')
  • Protocol : TCP
  • Direction : Out
  • Description : Rule for HTTP requests
  • Source Address : Any Address
  • Destination Address : Any Address
  • Source port : A Port Range : (Start port = 1025 / End port = 65535)
  • Destination port ; A Single Port (Port = 80)
Rule 5
  • Action : Block (Also select the check box 'Log as a firewall event if this rule is fired')
  • Protocol : IP
  • Direction : In/Out
  • Description : Block and Log All Unmatching Requests
  • Source Address : Any Address
  • Destination Address : Any Address
  • IP Details : IP Protocol : Any
  1. Click 'OK' in the 'Firewall Ruleset' interface.
The new ruleset will be created and added as a Predefined Firewall ruleset. Start BitTorrent or Utorrent. When Comodo raises a pop-up alert, choose 'Treat this application as', select the descriptive name you gave for this rule (e.g. For allowing BitTorrent/Utorrent) from the options and select 'Remember my answer'.

Cambiar tamaño de fuente al reducir la ventana (HTML / CSS)

Cambiar el tamaño del texto a medida que se reduce el tamaño de la ventana (HTML5 / CSS3)   . container { border : solid 1px blue ; ...