Herramientas Informaticas

Categoría: Sin categoría Página 15 de 51

Como bootear Windows 10 en una memoria USB

Windows ha sido hasta ahora unos de los sistemas operativos mas usados para el uso personal o en la oficina “Por lo menos en México”, aunque Linux le ha estado ganando terreno. La ultima versión de Windows  fue el Windows 10, se dice que se podrá instalar con una licencia gratuita aunque a la fecha yo lo dudo, sera gratuito entre comillas, solo si tienes activa una versión anterior del Windows 7  “Seven”en adelante.

Anteriormente ya vimos las mejoras que tiene, tiene escritorio múltiple, volvió el menú inicio, arranca mas rápido, así como sus inconvenientes de privacidad.

Bien sin tanto rollo les quiero mostrar a ustedes la mejor manera de crear una USB de arranque “BOOT USB” que les servirá para instalar este sistema operativo desde cero a travez de una memoria USB.

El programa se llama wintobootic y lo pueden descargar gratuitamente en la siguiente pagina http://www.wintobootic.com/

El procedimiento para bootear la memoria es muy fácil, solo tienes que elegir la ISO y la memoria USB

w2bv2_f4.png

Project Libre. Alternativa de código abierto a Microsoft Project (Windows, Linux Mac)

COMO LEER UNA TABLA Y PONER LOS DATOS EN UN JTABLE EN JAVA

Que tal camaradas en este post les dejare un ejemplo de como leer una tabla en MySQL a travez de un procedimiento almacenado y poner los datos en un JTable que es el equivalente al grid en las IDE de Microsoft o las mas parecida que encontre.

En primera necesitaremos del procedimiento almacenado el cual les dejo aquí mismo

[code language=”SQL”]

DROP PROCEDURE IF EXISTS `PA_LeeClientes`$$
CREATE PROCEDURE `PA_LeeClientes`(IN `desde` BIGINT, IN `cuantos` BIGINT, IN `Busqueda` VARCHAR(200))
BEGIN

SELECT right(`Clientes`.`idCliente`,5) as idCliente,
`Clientes`.`Nombres`,
`Clientes`.`Apellidos`,
`Clientes`.`Direccion`,
`Clientes`.`Ciudad`,
`Clientes`.`Telefono`,
`Clientes`.`RFC`,
`Clientes`.`FechaNacimiento`,
`Clientes`.`Estado`,
`Clientes`.`Municipio`,
`Clientes`.`CodigoPostal`
FROM `Clientes`
where Nombres LIKE CONCAT(‘%’,Busqueda,’%’)
or Nombres LIKE CONCAT(‘%’,Busqueda,’%’)
or Apellidos LIKE CONCAT(‘%’,Busqueda,’%’)
or Direccion LIKE CONCAT(‘%’,Busqueda,’%’)
or Ciudad LIKE CONCAT(‘%’,Busqueda,’%’)
or Telefono LIKE CONCAT(‘%’,Busqueda,’%’)
or RFC LIKE CONCAT(‘%’,Busqueda,’%’)
or Estado LIKE CONCAT(‘%’,Busqueda,’%’)
limit desde,cuantos;
[/code]

Ahora un método que necesitaremos es la que esta el la clase “Clientes”
[code language=”Java”]
public void leerClientes(long intDesde ,long intCuantos,DefaultTableModel tablaClientes,String strBusqueda ){
String strConsulta;
String datos[]=new String [4];

strConsulta="call PA_LeeClientes("+intDesde+","+intCuantos+",’"+strBusqueda+"’);";

try{

ps= con.conectado().prepareStatement(strConsulta);
res = ps.executeQuery();

while(res.next()){
//System.out.println(res.getString("Nombres"));
datos[0]=res.getString("IdCliente");
datos[1]=res.getString("Nombres");
datos[2]=res.getString("Apellidos");
datos[3]=res.getString("RFC");

tablaClientes.addRow(datos);
}
res.close();
}catch(SQLException e){
System.out.println(e);

}

}
[/code]

Y por si hiciera falta la clase de conexión a la base de datos MySQL
[code language=”Java”]

Ahora vemos el método que forma el JTable y le asigna los datos
[code language="Java"]
public void defineTablaClientes(String strBusqueda,long DesdeHoja){

long lngRegistros=1;
long lngDesdeRegistro;

//DEFINIMOS LA TABLA MODELO
DefaultTableModel tablaClientes = new DefaultTableModel();

//LE AGREGAMOS EL TITULO DE LAS COLUMNAS DE LA TABLA EN UN ARREGLO
String strTitulos[]={"ID CLIENTE","NOMBRE","APELLIDO","RFC"};

//LE ASIGNAMOS LAS COLUMNAS AL MODELO CON LA CADENA DE ARRIBA
tablaClientes.setColumnIdentifiers(strTitulos);

//LE ASIGNAMOS EL MODELO DE ARRIBA AL JTABLE
this.JTabClientes.setModel(tablaClientes);

//AHORA A LEER LOS DATOS

//ASIGNAMOS CUANTOS REGISTROS POR HOJA TRAEREMOS
lngRegistros=(Long.valueOf(this.txtNumReg.getText()));

//ASIGNAMOS DESDE QUE REGISTRO TRAERA LA CONSULTA SQL
lngDesdeRegistro=(DesdeHoja*lngRegistros)-lngRegistros;

//INSTANCEAMOS LA CLASE CLIENTE
control_cliente classCliente= new control_cliente();

//LEEMOS LA CLASE CLIENTE MANDANDOLE LOS PARAMETROS
classCliente.leerClientes(lngDesdeRegistro, (Long.valueOf(this.txtNumReg.getText())),tablaClientes,strBusqueda);

//LE PONEMOS EL RESULTADO DE LA CONSULA AL JTABLE
this.JTabClientes.setModel(tablaClientes);

//ASIGNAMOS LOS VALORES A LA PAGINACION
lngRegistros = classCliente.leerCuantos("");
lngNumPaginas= (lngRegistros/ (Long.valueOf( this.txtNumReg.getText())))+1;
this.jlblTotalPaginas.setText(" De " + ( lngNumPaginas));

}
[/code]

Y de esta manera sencilla se agregan los valores a la celda, es muy fácil verdad.

Bien camaradas espero que les sirva y saludos

COMO INSTALAR MINETEST 0.4.13 EN LINUX MINT 17.2 KDE

Como cualquier jugador sabra, Minetest es un la versión alternativa libre de Minecraft, un juego donde puedes construir, explorar y explotar tu mundo a tu antojo, como legos pero en la PC.

En Linux Mint 17.2 KDE el gestor de paquetes te instalara por defecto la versión 0.4.8, que no trae la ultima versión 0.4.13, la ultima versión tiene mejoras como por ejemplo un minimapa y la cinematic.
Para instalarlo solo tienen que ejecutar los siguientes comandos en la terminal

$ sudo add-apt-repository ppa:minetestdevs/stable
$ sudo apt-get update
$ sudo apt-get install minetest

Para desinstanlar, ejecute:

$ sudo apt-get remove minetest
Fuente:
http://www.matsuura.com.br/2015/08/como-instalar-o-minetest-0413.html

EJEMPLO DE UN PROCEDIMIENTO ALMACENADO EN MYSQL 5.X #5

Seguimos con el tutorial de programación en Java

En esta ocasión les dejare un ejemplo de como crear un procedimiento almacenado en MySQL en el cual recibe parametros y hace la consulta de acuerdo a los parametros recibidos, en este caso va a insertar datos en la tabla clientes

[code language=”SQL”]
— ——————————————————————————–
— Routine DDL
— Note: comments before and after the routine body will not be stored by the server
— ——————————————————————————–
DELIMITER $$

CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_InsertaCliente`(in Nombres VARCHAR(200)
, Apellidos VARCHAR(200),Direccion varchar(200),Ciudad varchar(200)
,Telefono varchar(200),RFC VARCHAR(10),FechaNacimiento VARCHAR(200),Estado VARCHAR(200)
,Municipio varchar(200),CodigoPostal VARCHAR(200))
BEGIN

INSERT INTO `Clientes`
(
`Nombres`,
`Apellidos`,
`Direccion`,
`Ciudad`,
`Telefono`,
`RFC`,
`FechaNacimiento`,
`Estado`,
`Municipio`,
`CodigoPostal`
)
VALUES
(
Nombres,
Apellidos,
Direccion,
ciudad,
Telefono,
RFC,
FechaNacimiento,
Estado,
Municipio,
CodigoPostal
);
END
[/code]

Saludos y con respecto al comentario de Jonh de pasar el proyecto, claro que lo hare, lo subire al gitHub como código libre, mantente atento, lo subire para que igual no se me pierda el proyecto como tantos otros que se me han perdido y otros le den continuidad.

Saludos y hasta la proxima

COMO CONECTAR JAVA CON MYSQL NETBEANS EJEMPLO #4

Bienvenidos sean otra vez a este post, lo que hoy se vendrá a explicar sera la manera de como conectar, enlazar, ligar un programa escrito en Java, lógicamente desde el código fuente, a una base de datos MySQL 5.6.X

La versión del MySQL es la versión que viene en la instalación de XAMPP 5.6.11.

Primeramente tendrán que instalar el MySQL, cualquiera de estos videomanuales te pueden servir, uno es para Linux Mint 17.2 Rafaela y otro es para la versión de Windows 10.

Instalación Windows 10

[youtube https://www.youtube.com/watch?v=7oFXfcPP9CE]

Instalación Linux Mint 17.2
[youtube https://www.youtube.com/watch?v=8yuUw0V7jz0]

Una vez instalado el servidor SQL procederemos a levantar la base de datos

[code languaje=”sql”]
— phpMyAdmin SQL Dump
— version 4.4.12
— http://www.phpmyadmin.net

— Servidor: localhost
— Tiempo de generación: 12-10-2015 a las 05:06:49
— Versión del servidor: 5.6.25
— Versión de PHP: 5.6.11

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;


— Base de datos: `INVEN`

CREATE DATABASE IF NOT EXISTS `INVEN` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
USE `INVEN`;

DELIMITER $$

— Procedimientos

DROP PROCEDURE IF EXISTS `sp_InsertaCliente`$$
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_InsertaCliente`(in Nombres VARCHAR(200)
, Apellidos VARCHAR(200),Direccion varchar(200),Ciudad varchar(200)
,Telefono varchar(200),RFC VARCHAR(10),FechaNacimiento VARCHAR(200),Estado VARCHAR(200)
,Municipio varchar(200),CodigoPostal VARCHAR(200))
BEGIN

INSERT INTO `Clientes`
(
`Nombres`,
`Apellidos`,
`Direccion`,
`Ciudad`,
`Telefono`,
`RFC`,
`FechaNacimiento`,
`Estado`,
`Municipio`,
`CodigoPostal`
)
VALUES
(
Nombres,
Apellidos,
Direccion,
ciudad,
Telefono,
RFC,
FechaNacimiento,
Estado,
Municipio,
CodigoPostal
);

END$$

DELIMITER ;

— ——————————————————–


— Estructura de tabla para la tabla `Clientes`

DROP TABLE IF EXISTS `Clientes`;
CREATE TABLE IF NOT EXISTS `Clientes` (
`idCliente` bigint(20) NOT NULL,
`Nombres` varchar(100) DEFAULT NULL,
`Apellidos` varchar(45) DEFAULT NULL,
`Direccion` varchar(45) DEFAULT NULL,
`Ciudad` varchar(45) DEFAULT NULL,
`Telefono` varchar(45) DEFAULT NULL,
`RFC` varchar(45) DEFAULT NULL,
`FechaNacimiento` datetime(6) DEFAULT NULL,
`Estado` varchar(45) DEFAULT NULL,
`Municipio` varchar(45) DEFAULT NULL,
`CodigoPostal` varchar(45) DEFAULT NULL
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=latin1;


— Volcado de datos para la tabla `Clientes`

[/code]

Ya levantada la base de datos tendremos que agregar la siguiente librería para conectar MySQL mysql-connector-java-5.1.6-bin.jar, la agregamos de igual modo que hemos estado agregando librerías en los post anteriores.

Bien ya agregada la librería creamos la siguiente clase

[code languaje=”Java”]
/*
Clase conexión, recibe la información de la conexión y se conecta
*/
package herramientas;
import java.sql.*;
import javax.swing.JOptionPane;

public class conexion {

public static String strServidor= new String();
public static String strBaseDeDatos=new String();
public static String strUsuarioSQL=new String();
public static String strPSWSQL=new String();
Connection conexion= null;

public Connection conectado(){
try{

Class.forName("com.mysql.jdbc.Driver");

conexion = DriverManager.getConnection("jdbc:mysql://"+ this.strServidor +"/" +this.strBaseDeDatos + "?user="+this.strUsuarioSQL + "&password="+ this.strPSWSQL);
Statement stm = conexion.createStatement();
}
catch(SQLException e)
{

JOptionPane.showMessageDialog(null, "ERROR DE CONEXIÓN"+e);

}
catch(ClassNotFoundException e)
{
JOptionPane.showMessageDialog(null, e);
}
return conexion;
}

public void desconectar(){
conexion = null;
System.out.println("conexion terminada");

}

}

[/code]

Luego al usar la clase conexión, lo haríamos de la siguiente forma

[code languaje=”Java”]
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package interfaces;

import clases.classUsuarios;

//AQUI ES DONDE TENEMOS LA CLASE CONEXION
import herramientas.conexion;

import java.awt.List;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URLDecoder;
import java.util.jar.Attributes;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import org.w3c.dom.*;
import javax.xml.parsers.*;
import javax.xml.transform.*;
import javax.xml.transform.dom.*;
import javax.xml.transform.stream.*;

import javax.xml.*;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

/**
*
* @author julio
*/
public class frmLogueo extends javax.swing.JFrame {

/**
* Creates new form frmLogueo
*/
public frmLogueo() {
initComponents();
leerConfiguracion();
}

/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {

jLabel2 = new javax.swing.JLabel();
lblServidor = new javax.swing.JLabel();
txtServer = new javax.swing.JTextField();
lblUsuario = new javax.swing.JLabel();
txtUsuario = new javax.swing.JTextField();
lblContraseña = new javax.swing.JLabel();
cmdAccesar = new javax.swing.JButton();
pswContraseña = new javax.swing.JPasswordField();
lblBase = new javax.swing.JLabel();
txtBase = new javax.swing.JTextField();

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setAlwaysOnTop(true);
setLocationByPlatform(true);
setResizable(false);

jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/padlock.jpg"))); // NOI18N

lblServidor.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
lblServidor.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
lblServidor.setText("SERVIDOR");
lblServidor.setToolTipText("");

lblUsuario.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
lblUsuario.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
lblUsuario.setText("USUARIO");

lblContraseña.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
lblContraseña.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
lblContraseña.setText("CONTRASEÑA");

cmdAccesar.setText("ACCESO");
cmdAccesar.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmdAccesarActionPerformed(evt);
}
});

lblBase.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N
lblBase.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
lblBase.setText("BASE DE DATOS");
lblBase.setToolTipText("");

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(129, 129, 129)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(lblServidor, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
.addComponent(txtUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
.addComponent(lblUsuario, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
.addComponent(pswContraseña)
.addComponent(txtServer, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
.addComponent(lblContraseña, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(lblBase, javax.swing.GroupLayout.DEFAULT_SIZE, 138, Short.MAX_VALUE)
.addComponent(txtBase)))
.addGroup(layout.createSequentialGroup()
.addGap(114, 114, 114)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 170, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(123, Short.MAX_VALUE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(140, 140, 140)
.addComponent(cmdAccesar, javax.swing.GroupLayout.PREFERRED_SIZE, 111, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(156, Short.MAX_VALUE)))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel2)
.addGap(30, 30, 30)
.addComponent(lblServidor)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtServer, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(lblBase)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(txtBase, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
.addComponent(lblUsuario)
.addGap(12, 12, 12)
.addComponent(txtUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(lblContraseña)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(pswContraseña, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(93, 93, 93))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap(459, Short.MAX_VALUE)
.addComponent(cmdAccesar, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap()))
);

pack();
setLocationRelativeTo(null);
}// </editor-fold>

private void cmdAccesarActionPerformed(java.awt.event.ActionEvent evt) {
try {
// TODO add your handling code here:

// File archivoConexion = new File("Conexion.xml");
//
// if (archivoConexion.exists())
// System.out.println("El fichero");
// else
crearXML2();

//AQUI CREAMOS LA INSTANCIA A LA CLASE
conexion con = new conexion();

//AQUI LLENAMOS CON LOS DATOS NECESARIOS DE CONEXIÓN
con.strServidor=this.txtServer.getText();
con.strPSWSQL="";
con.strUsuarioSQL="root";
con.strBaseDeDatos=this.txtBase.getText();

//AQUI REALIZAMOS LA CONEXIÓN
con.conectado();

leerConfiguracion();
frmPrincipal principal= new frmPrincipal();
classUsuarios usuarios = new classUsuarios();

//ESTO YA ES OTRA HISTORIA, AQUI VERIFICA SI EL USUARIO Y CONTRASEÑA COINCIDEN
if (usuarios.blnChecaUsuarioContra("SELECT * FROM Usuarios where Usuario=’"+this.txtUsuario.getText() +"’ and Contra=’"+this.pswContraseña.getText()+"’")==true){
this.setVisible(false);
principal.setVisible(true);
}
else
JOptionPane.showMessageDialog(null, "USUARIO O CONTRASEÑA INCORRECTO"+this.pswContraseña.getText());
System.out.println("SELECT * FROM Usuarios where Usuario=’"+this.txtUsuario.getText() +"’ and Contra=’"+this.pswContraseña.getText()+"’");
} catch (ParserConfigurationException ex) {
Logger.getLogger(frmLogueo.class.getName()).log(Level.SEVERE, null, ex);
} catch (TransformerException ex) {
Logger.getLogger(frmLogueo.class.getName()).log(Level.SEVERE, null, ex);
}

}

/**
* @param args the command line arguments
*/
// public static void main(String args[]) {
// /* Set the Nimbus look and feel */
// //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
// /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
// * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
// */
// try {
// for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
// if ("Nimbus".equals(info.getName())) {
// javax.swing.UIManager.setLookAndFeel(info.getClassName());
// break;
// }
// }
// } catch (ClassNotFoundException ex) {
// java.util.logging.Logger.getLogger(frmLogueo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// } catch (InstantiationException ex) {
// java.util.logging.Logger.getLogger(frmLogueo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// } catch (IllegalAccessException ex) {
// java.util.logging.Logger.getLogger(frmLogueo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// } catch (javax.swing.UnsupportedLookAndFeelException ex) {
// java.util.logging.Logger.getLogger(frmLogueo.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
// }
// //</editor-fold>
//
// /* Create and display the form */
// java.awt.EventQueue.invokeLater(new Runnable() {
// public void run() {
// new frmLogueo().setVisible(true);
// }
// });
// }

// Variables declaration – do not modify
private javax.swing.JButton cmdAccesar;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel lblBase;
private javax.swing.JLabel lblContraseña;
private javax.swing.JLabel lblServidor;
private javax.swing.JLabel lblUsuario;
private javax.swing.JPasswordField pswContraseña;
private javax.swing.JTextField txtBase;
private javax.swing.JTextField txtServer;
private javax.swing.JTextField txtUsuario;
// End of variables declaration

public void crearXML2() throws ParserConfigurationException, TransformerConfigurationException, TransformerException{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
DOMImplementation implementation = builder.getDOMImplementation();

Document document = implementation.createDocument(null, "Configuracion", null);
document.setXmlVersion("1.0");

Element raiz = document.getDocumentElement();

Element nodoServidor = document.createElement("Servidor"); //creamos un nuevo elemento
Text nodoValorServidor = document.createTextNode(this.txtServer.getText()); //Ingresamos la info
nodoServidor.appendChild(nodoValorServidor);
raiz.appendChild(nodoServidor); //pegamos el elemento a la raiz "Documento"

Element nododb = document.createElement("DB"); //creamos un nuevo elemento
Text nodoValorDB = document.createTextNode(this.txtBase.getText()); //Ingresamos la info
nododb.appendChild(nodoValorDB);
raiz.appendChild(nododb); //pegamos el elemento a la raiz "Documento"

Element nodoUsuario = document.createElement("Usuario"); //creamos un nuevo elemento
Text nodoValorUsuario = document.createTextNode(this.txtUsuario.getText()); //Ingresamos la info
nodoUsuario.appendChild(nodoValorUsuario);
raiz.appendChild(nodoUsuario); //pegamos el elemento a la raiz "Documento"

Source source = new DOMSource(document);
StreamResult result = new StreamResult(new java.io.File("Conexion.xml"));//nombre del archivo
Transformer transformer = TransformerFactory.newInstance().newTransformer();
transformer.transform(source, result);
}

public void leerConfiguracion(){
try{
File fXmlFile = new File("Conexion.xml");
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
Document doc = dBuilder.parse(fXmlFile);

//optional, but recommended
//read this – http://stackoverflow.com/questions/13786607/normalization-in-dom-parsing-with-java-how-does-it-work
doc.getDocumentElement().normalize();

System.out.println("Root element :" + doc.getDocumentElement().getNodeName());

NodeList nList = doc.getElementsByTagName("Configuracion");

System.out.println("—————————-");

for (int temp = 0; temp < nList.getLength(); temp++) {

Node nNode = nList.item(temp);

System.out.println("nCurrent Element :" + nNode.getNodeName());

if (nNode.getNodeType() == Node.ELEMENT_NODE) {

Element eElement = (Element) nNode;

this.txtServer.setText( eElement.getElementsByTagName("Servidor").item(0).getTextContent());
this.txtBase.setText(eElement.getElementsByTagName("DB").item(0).getTextContent());
this.txtUsuario.setText(eElement.getElementsByTagName("Usuario").item(0).getTextContent());
}
}
} catch (Exception e) {
e.printStackTrace();
}
}

}

[/code]

Por si llegaran a necesitar la clase usuarios
[code languaje=”Java”]
/*
CREADO POR JULIO
*/
package clases;

import java.sql.SQLException;
import herramientas.conexion.*;
import com.sun.crypto.provider.RSACipher;
import herramientas.conexion;
import java.awt.List;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
*
* @author julio
*/
public class classUsuarios {

private conexion con;
PreparedStatement ps;
ResultSet res;

public classUsuarios() {
con = new conexion();
}

public boolean blnChecaUsuarioContra( String sql){
boolean data =false;
String idUsuarios="IdUsuarios";

try{

ps= con.conectado().prepareStatement(sql);
res = ps.executeQuery();

while(res.next()){
//System.out.println(res.getNString(idUsuarios));
data=true;
System.out.println(res.getWarnings());
}
res.close();
}catch(SQLException e){
System.out.println(e);

}
return data;
}

}

[/code]

COMO DESCARGAR VIDEOS DEL YOUTUBE DESDE LINUX MINT 17.2

Algunas veces necesitamos descargar vídeos del Youtube para verlos después en un lugar donde no tengamos Internet, como fue en mi caso que necesitaba unos manuales, tutoriales y tenia limitada la red.

Es por eso que a veces se necesita descargar el contenido para ser visualizado fuera de linea, es decir, sin necesidad de tener Internet.

Existen muchas herramientas, mucho software para descargar los vídeos del Youtube, pero hasta ahora solo conocía software para el sistema operativo de Windows, por ejemplo, AtuberCatcher, SongR, entre otros.

Para el sistema operativo Linux Mint 17.2 existe una aplicación muy buena la cual a mi me ha dejado satisfecho, la herramienta se llama 4k Video Downloader, el cual pueden descargar de la pagina oficial https://www.4kdownload.com/es/products/product-videodownloader  o bien pueden descargarlo desde nuestra cuenta de Mediafire haciendo click aquí, esta es para la versión de 64 de Linux Mint 17.2

Selección_002

Es muy fácil de usar solo hay que copiar la URL y darle click al botón pegar y el vídeo comenzara a descargarse y a convertirse a un formato estándar para poder visualizarlo.

Y así de fácil es descargar vídeos en Linux, la otra alternativa seria bajar los vídeos utilizando paginas web como por ejemplo http://www.bajaryoutube.com/  , aunque la verdad aun no lo he probado de esa forma.

Bien espero que les sirva, no se olviden de comentar y puntuar la publicación.

Drivers GATEWAY ZX450 ALL IN ONE LINK

downloadHi boys, Welcome to my blog, in this post will see how download and install the drivers of the computer GATEWAY ZX850 version in spanish.

The pack “An Executable 80 MB” is available in 1 link.

In this pack is autoinstaller, the drivers are installed in automatic, the meanly content of the pack is the drivers of the sound, wireless, Webcam and the screen.

Captura

For download the pack of the drivers click HERE

Good luck friends

DRIVERS AUTOINSTALABLES GATEWAY ZX4850 PARA WINDOWS 7

downloadQue tal camaradas, bienvenidos sean a su blog, en esta entrada les voy dejar los controladores autointalables de la computadora GATEWAY ZX4850 , es un paquete de 86 MB que podran descargar en un solo enlace de Mediafire.

Al momento de descargar posiblemente si tienen antivirus les puede decir que tiene virus, a mi el avira me lo detecto, pero lo mas posible es que sea un falso positivo, ya que este paquete se hizo con el programa de driver genius 2014 programa que pueden descarga de la siguiente pagina Web http://drivergenius.es/

Al ejecutar el programa les va a salir una pantalla como se muestra en la siguiente imagen

Captura

En esta pantalla es en donde deberan que controladores desean instalar, lo que mas se recomienda es que instalen los controlares que conoscan, aunque en esta ocación solo puse los controladores que mas probablemente no se instalan con la instalacion de Windows.

Una vez que esten seguros de que controladores van a instalar y esten seleccionados entonces el siguiente paso sera darle click al boton Iniciar Restauración y empezaran a instalarse automaticamente los controladores.

Les dejo el enlace de la descarga

DESCARGAR

Saludos y espero que les sirva, cualquier comentario sera bien recibido.

A los politicos y grandes corporaciones, mi percepcion

Dirigida a los que tienen el poder actualmente en la tierra, a los que mi percepcion no son digno de tenerlo, a las grandes corporaciones, permitanos decirles, no nos subestimen, a las personas comunes no presindibles, uno solo puede hacer la diferencia.

La humanidad se cansara de ultimatums, la humildad no consiste en recibir sus gritos, somos una especie tan fuerte que no ocupara luchar para que ustedes caigan si no hacen lo que es correcto, con esto no se dice que todos no son dignos.
A los que estan en el poder si no pueden es valido adbicar y darle el puesto a quien si puede, con que ojos han de ver a sus hijos cobrando por algo que no estan haciendo bien.
Y en cuanto a las corporaciones que pretenden esclavisar no lo lograran, puesto que es preferible la muerte a enriquecerlos.
No solo es esclavitud moderna, si no el daño que le hacen a la tierra, prefieren ganancias a proteger la tierra.
La mision de la humidad aqui es proteger la tierra, y si la estan dañando les aseguro que seran arrancado de ella, trataran de escapar, pero no habra lugar ni en el suelo ni en el cielo para ustedes.
Gracias a la gente de buena voluntad que hace que este mundo sea mejor y no alla sucumbido aun, gracias a estas personas lideres el mundo tiene una mejor experanza, ya hay mas libertades que antes  no habian

(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “//connect.facebook.net/es_LA/sdk.js#xfbml=1&version=v2.0”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));

Página 15 de 51

Creado con WordPress & Tema de Anders Norén