jueves, 1 de diciembre de 2011

sábado, 26 de noviembre de 2011

viernes, 28 de octubre de 2011

Instalar Programas en Ubuntu

En Windows los programas que se ejecutan la mayoria son .exe, en Ubuntu la cosa cambia existen varias extensiones y ademas hay que dar algunos permisos. Aqui dejo una guía que explica como instalar programas en Ubuntu.

Configurar y Usar Escritorio Remoto en Ubuntu 10.04

Considere que este es el metodo rapido para configurar una red LAN Ubuntu 10.04 escritorio remoto entre dos equipos. Si no es importante la seguridad pero si te interezar avanzar en tu desarrollo reduciendo tareas y facilitar la habilitado ambientes de desarrollo para realizar pruebas, probablemente esta sea tu opción.

Desventajas:
-No es seguro ya que no se encripta el trafico
-No tiene un soporte robusto, ante caidas ó performanece
-La configuracion personalizada en cada pc abre accesos para ataques desde la misma red

Pasos:

1.- Seguir esta guia: Configurar y Usar Escritorio Remoto en Ubuntu

2.- Habilitar : Inicio de sesion automatico en Ubuntu 10.04

3.- Remover Pantalla que pide password al iniciar: Quitar el dialogo “Desbloquear el deposito de inicio”

domingo, 23 de octubre de 2011

Debug de cliente Web Service en Eclipse

Siga los siguientes Pasos:

1.- Crea un cliente java standalone
2.- agrega en Eclipse una nueva Run Configurations de Java Application y completa sus datos
3.- Aqui viene lo importante agregar en Java Application una variable para la JVM
Arguments -> VM Arguments
-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true
sin doble comillas

4.- Agregar las librerias activation.jar y webservices-rt.jar

5.- Ejecutar y Listo !!!

Si quieres mas información consulta estos link:
Dynamic tube-based message
logging


Monitoring SOAP Messages Made Easy With JAX-WS RI 2.0.1

martes, 4 de octubre de 2011

Monitorea TCP/IP desde Windows

TCP Monitor es un programa que permite observar y registrar el estado de una conexion a nuestro servidor.

Descarga

viernes, 5 de agosto de 2011

viernes, 22 de julio de 2011

Setting property 'source' to 'org.eclipse.jst.j2ee.server:XXX' did not find a matching property

Error:
[SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:demo' did not find a matching property

Solucion:
http://gyrbsdl.springnote.com/pages/5304425?print=1

Understanding Tomcat Context Containers

miércoles, 8 de junio de 2011

8 Junio día mundial de IPV6

Hoy celebramos el día mundial de IPV6 y casualmente nos hemos quedado sin Internet, un adelanto del CAMBIO, si quieres saber que routers son compratibles con IPV6 visita esta página:

http://www.dlink.com/ipv6

domingo, 15 de mayo de 2011

Instalación y Configuración Maven2

Servlet y Maven

How do I package a basic maven web application

I am trying to find the Oracle Ojdbc14.jar file in the maven repository

How to include library manually into maven local repository?
mvn install:install-file -Dfile=c:\kaptcha-2.3.jar -DgroupId=com.google.code
-DartifactId=kaptcha -Dversion=2.3 -Dpackaging=jar
-DgeneratePom=true

Sintaxis:
mvn install:install-file -Dfile=your-artifact-1.0.jar \
                         [-DpomFile=your-pom.xml] \
                         [-Dsources=src.jar] \
                         [-Djavadoc=apidocs.jar] \
                         [-DgroupId=org.some.group] \
                         [-DartifactId=your-artifact] \
                         [-Dversion=1.0] \
                         [-Dpackaging=jar] \
                         [-Dclassifier=sources] \
                         [-DgeneratePom=true] \
                         [-DcreateChecksum=true]

 

Eliminar Artefacto:
mvn dependency:purge-local-repository -DresolutionFuzziness -Dfile=commons-email-1.2.jar -DgroupId=org.apache.commons.mail -DartifactId=LocalEmail -Dversion=1.2

How to clean the maven repository when testing release candidates

An introduction to Maven 2

Instalación de Maven2


Maven Tutorial 08 - Eclipse Plugin for Maven and Maven Plugin for Eclipse

Maven Tutorial 09 - Creating a Maven Project in Eclipse

Tutoriales de Maven

Creación de un repositorio maven interno accesible por SSH.



Maven Assembly Plugin: empaquetando aplicaciones con Maven para la ejecución de procesos batch.

sábado, 7 de mayo de 2011

Convertir un Byte Array a InputStream

byte[] bytes = ... //get byte array from somewhere.

InputStream input = new ByteArrayInputStream(bytes);

int data = input.read();
while(data != -1) {
//do something with data

data = input.read();
}
input.close();


Note: The proper exception handling has been skipped here for the sake of clarity. To learn more about correct exception handling, go to Java IO Exception Handling.

Obtener más información del tema

Struts File Upload and Save

Subir archivos en nuestra web
Struts File Upload and Save

Cómo realizar copias de seguridad con rsync

Ver articulo Cómo realizar copias de seguridad con rsync

miércoles, 4 de mayo de 2011

miércoles, 27 de abril de 2011

Struts optionsCollection

Código fuente para implementar optionsCollection lo encontraras en este link

domingo, 17 de abril de 2011

lunes, 4 de abril de 2011

Documentación en Ingles

En la pagina www.docme.ru que esta en Ruso encontraran libros actuales TOP de la especialidad

Checking database parameters in Oracle

A very easy way to check parameter values for Oracle database is to issue following command from SQL*Plus prompt. It is followed by abbreviated output.

SQL>show parameter

NAME TYPE VALUE
————————— ———– ——————————
background_core_dump string partial
background_dump_dest string D:\ORACLE\PRODUCT\10.2.0\ADMIN
\ORCL\BDUMP
backup_tape_io_slaves boolean FALSE
bitmap_merge_area_size integer 1048576
blank_trimming boolean FALSE

To view specific values of parameters related to SGA command should be

SQL>show parameter area

NAME TYPE VALUE
————————— ———– ——————————
bitmap_merge_area_size integer 1048576
create_bitmap_area_size integer 8388608
hash_area_size integer 131072
sort_area_retained_size integer 0
sort_area_size integer 65536
workarea_size_policy string AUTO

Alternatively Oracle provides two dynamic performance views to look at all the parameter values specified for the database.

V$Parameter – provides information about all parameters. It also indicates whether parameters are modifiable at session level or system level. Following is the query to look for parameters related to SGA.

SQL> SELECT name,value,isses_modifiable,issys_modifiable
FROM v$parameter
WHERE name like ‘%sga%’;

NAME VALUE ISSES ISSYS_MOD
————— ————— —– ———
sga_max_size 612368384 FALSE FALSE
pre_page_sga FALSE FALSE FALSE
lock_sga FALSE FALSE FALSE
sga_target 612368384 FALSE IMMEDIATE

V$NLS_Parameters – provides information about all parameters related to NLS settings.

SQL> select * from v$nls_parameters;

PARAMETER VALUE
—————————— ——————————
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_CHARACTERSET WE8MSWIN1252
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM

Certain parameters can be changed dynamically using ALTER SYSTEM command. Other parameter values need to be changed in init.ora or spfile or both.

ver fuente

sábado, 2 de abril de 2011

Oracle LIKE clause searches with text indexes

One serious SQL performance problem occurs when you use the SQL “LIKE clause” operator to find a string within a large Oracle table column (e.g. VARCHAR(2000), CLOB, BLOB):

Select stuff from bigtab where text_column like ‘%ipod%’;
Select stuff from bigtab where full_name like ‘%JONES’;

Because standard Oracle cannot index into a large column, there “like” queries cause full-table scans, and Oracle must examine every row in the table, even when the result set is very small. These unnecessary full-table scans are a problem:

1. Large-table full-table scans increase the load on the disk I/O sub-system

2. Small table full table scans (in the data buffer) cause high consistent gets and drive-up CPU consumption


Ver Articulo completo

A CONTEXT Query Application

Oracle SQL "contains" clause tips

Filtrar por cadenas parecidas en una lista en oracle

Oracle case insensitive searches(Implementación)

Búsquedas fuzzy, índices context y gestión documental con Oracle 9i

martes, 29 de marzo de 2011

Detectar el tipo de una variable en Javascript

Código JavaScript:

var _getType = function( inp ) {
var type = typeof inp, match;
var key;
if (type == 'object' && !inp) {
return 'null';
}
if (type == "object") {
if (!inp.constructor) {
return 'object';
}
var cons = inp.constructor.toString();
if (match = cons.match(/(\w+)\(/)) {
cons = match[1].toLowerCase();
}
var types = ["boolean", "number", "string", "array"];
for (key in types) {
if (cons == types[key]) {
type = types[key];
break;
}
}
}
return type;
};

Ver Articulo completo

jueves, 24 de marzo de 2011

JQuery Bloquear pagina mientras se carga Load...

Usando BlockUI

The jQuery BlockUI Plugin lets you simulate synchronous behavior when using AJAX, without locking the browser[1]. When activated, it will prevent user activity with the page (or part of the page) until it is deactivated. BlockUI adds elements to the DOM to give it both the appearance and behavior of blocking user interaction.

Ver Pagina Oficial

Implementando nuestro propio Loading

lunes, 21 de marzo de 2011

Cliente para Protocolo WebDav

Codigo de ejemplo para utilizar WebDav
Ejemplo 1
Ejemplo 2
Tutotial de Apache Http Integrando WebDav Server

hosting a webdav folder using tomcat 6

import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.net.URL;
import org.apache.commons.httpclient.Credentials;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpException;
import org.apache.commons.httpclient.UsernamePasswordCredentials;
import org.apache.commons.httpclient.auth.AuthScope;
import org.apache.commons.httpclient.methods.InputStreamRequestEntity;
import org.apache.commons.httpclient.methods.RequestEntity;
import org.apache.jackrabbit.webdav.client.methods.PutMethod;

...

// WebDAV URL:
final String baseUrl = ...;
// Source file to upload:
File f = ...;
try{
HttpClient client = new HttpClient();
Credentials creds = new UsernamePasswordCredentials("username", "password");
client.getState().setCredentials(AuthScope.ANY, creds);

PutMethod method = new PutMethod(baseUrl + "/" + f.getName());
RequestEntity requestEntity = new InputStreamRequestEntity(
new FileInputStream(f));
method.setRequestEntity(requestEntity);
client.executeMethod(method);
System.out.println(method.getStatusCode() + " " + method.getStatusText());
}
catch(HttpException ex){
// Handle Exception
}
catch(IOException ex){
// Handle Exception

viernes, 18 de marzo de 2011

Paginacion con Hibernate

Codigo de ejemplo para implementar la paginación en Hibernate con Spring.
ver codigo

miércoles, 16 de marzo de 2011

Usar Filtros para Session en Hibernate con Tomcat

Este foro se explican las ventajas y desventajas de utilizar el Patron Open Session in View con Hibernate y Tomcat.
ver foro


Using Hibernate with Tomcat

domingo, 13 de marzo de 2011

JQuery con otras librerias(Prototype)

Este articulo muestra como podemos usar en combinacion JQuery y Prototype.

http://docs.jquery.com/Using_jQuery_with_Other_Libraries

jueves, 10 de marzo de 2011

Apache Jakarta Commons IO

En este tutorial vamos a hacer una presentación de la librería Jakarta Commons IO de Apache.
Leer link completo

miércoles, 9 de marzo de 2011

martes, 1 de marzo de 2011

Crear Servicios en Windows XP

Link Fuente

Ahora los pasos necesarios, para hacer que una aplicación, archivo ejecutable se ejecute al incio del ordenador de forma automática, como un servicio. Esto está testeado en windows XP home y XP Profesional.

PASOS A SEGUIR:
0- Copiar los archivos instsrv.exe y srvany.exe a la carpeta windows\system32

1-ejecutar en consola:
C:\Documents and Settings\Admin>c:\WINDOWS\system32\instsrv.exe NOMBRE_NUEVO_SERVICIO c:\WINDOWS\system32\srvany.exe

Respuesta consola:

” The service was successfuly added!

Make sure that you go into the Control Panel and use
the Services applet to change the Account Name and
Password that this newly installed service will use
for its Security Context. “

2 - ejecutar: regedit -> HKLM\system\CurrentControlSet\Services -> aparece el servicio creado

3 - crear carpeta llamada “Parameters” (boton derecho nueva clave)

4 - crear dentro de parameters nuevo “valor alfanumercio” llamado “Application”: con el valor : RUTA/nombre_del_ejecutable_del_servicio.exe

5 - [opcional] ir a administrar servicios para activar el servicio o reiniciar para que se encienda. Por defecto se crea el servicio con Encendido automatico.
Descargar archivos necesarios crear-servicio en windows


Ejemplo de usar el comando para convertir una ejecutable en servicio de windows:

C:\>instsrv.exe
Installs and removes system services from NT

INSTSRV ( | REMOVE)
[-a ] [-p ]

Install service example:

INSTSRV MyService C:\MyDir\DiskService.Exe
-OR-
INSTSRV MyService C:\mailsrv\mailsrv.exe -a MYDOMAIN\joebob -p foo

Remove service example:

INSTSRV MyService REMOVE

C:\>c:\WINDOWS\system32\instsrv.exe Servidor-EasyPHP c:\WINDOWS\system32\srvany.
exe

The service was successfuly added!

Make sure that you go into the Control Panel and use
the Services applet to change the Account Name and
Password that this newly installed service will use
for its Security Context.

C:\>

martes, 22 de febrero de 2011

sábado, 12 de febrero de 2011

D.O.S. Lista de Aplicaciones en Ejecución XP

Using WMIC, it is possible to list out all the running processes and their parameters.

This article applies to Windows XP Professional only. Windows XP Home Edition does not have the WMIC (WMI command-line tool). Alternately, you can use the excellent Process Explorer utility to view and manage Windows processes.

The following command-line outputs the list of running processes (with the complete command-line arguments used for each process) to a text file:

Click Start, Run and type CMD

Type the command given below exactly:

WMIC /OUTPUT:C:\ProcessList.txt PROCESS get Caption,Commandline,Processid

or

WMIC /OUTPUT:C:\ProcessList.txt path win32_process get Caption,Processid,Commandline

Now, open the file C:\ProcessList.txt. You can see the details of all the processes in that file.

miércoles, 26 de enero de 2011

viernes, 7 de enero de 2011

EJB 3.1 Global JNDI Access

Namespaces and Scopes
The EJB v. 3.1 Specification defines three distinct namespaces with its own scopes:

* Global.
* Application.
* Module.

Leer articulo completo aqui

Reference EJB3 Beans from EJB2 Beans

It is possible to reference an EJB3 bean from an EJB2 bean just like an EJB2 bean would reference any other EJB2 bean as long as the EJB3 bean is deployed with an EJB 2 client adaptor. Please note that EJB2 and EJB3 beans cannot reside on the same jar file and hence, the EJB2 beans must reside in a different jar to the EJB3 beans.
Leer articulo completo aqui

domingo, 2 de enero de 2011

Publicar WebService en Java sin Servidor Web

A partir del Java 6 es muy sencillo crear webservices utilizando anotaciones, a diferencia de las versiones anteriores donde era necesario utilizar librerias de terceros, servidores web, gran cantidad de codigo y archivos de configuracion.
leer articulo completo clic aqui