Para cambiar el titulo del navegador que contenga alguna pelicula creada en Flex se puede usar el siguiente código:
bm = BrowserManager.getInstance();
bm.init("", "Titulo deseado");
Blog dedicados a trucos y buenas prácticas tanto de desarrollo de Sw como de papiroflexía.
lunes, abril 12, 2010
lunes, mayo 25, 2009
No quiero licencia
Serial number for Poseidon for UML Community Edition - 30-days free testing - Annual Subscription (1 License(s))
Wjmlmg8PFeVnXK0v9IOyq3avfPaUPDVwvbCBtw3PRCo/hGzbJFtprZpD94zi
giW6ovXQwJIgasaLXuB7lHc6DPpUA0ZaPkjuZXA8JgnEYvHaS9oJyrbvaYlp
Lzr9R9OajlmyxFv/HwUVqrhW0IFpRIb8+LVWNgqjRguCTRsovll7l8G+cw/+
uqn4s6Yz77WKTUwbNX3Ntz8UT2tHDLyXPWWtmsLpKXxuirIGNU2WzsfMFtnM
LdDMWjXDhRdDfQKhzCgNI0N3/1jrwATw7DeCbd3cGhIFfhjdpFlyJq2wa2Xb
BZrtrqqdqmWJrXDrokF//xy9+tm2sLj69Ql+6Sdwlw
*Single User Serial Number Installation* Here is a step by step procedure to install a Poseidon serial number:
1. Download the software from
<http://www.gentleware.com?redirect=download>
(Please use JDK/JRE Version 1.5, or use the installers that include a JRE) 2. Copy the key (above) to your clipboard 3. Start Poseidon for UML 4. If the License Manager dialog does not appear automatically,
please select "help" from the menu bar and choose "License Manager"
5. Click on "Paste from Clipboard" and your key will appear 6. Click the "Add" button to finish the process 7. You will have to register to get a final license key (you can register
even if your serial number has expired).
Click on the serial number in the table to select it, then click "Register"
and enter your User Information.
Click "Next" to finish your registration and get the final license
online or via our Website.
If you need support or have any questions concerning our products, please contact us at http://www.gentleware.com?redirect=contact
Wjmlmg8PFeVnXK0v9IOyq3avfPaUPDVwvbCBtw3PRCo/hGzbJFtprZpD94zi
giW6ovXQwJIgasaLXuB7lHc6DPpUA0ZaPkjuZXA8JgnEYvHaS9oJyrbvaYlp
Lzr9R9OajlmyxFv/HwUVqrhW0IFpRIb8+LVWNgqjRguCTRsovll7l8G+cw/+
uqn4s6Yz77WKTUwbNX3Ntz8UT2tHDLyXPWWtmsLpKXxuirIGNU2WzsfMFtnM
LdDMWjXDhRdDfQKhzCgNI0N3/1jrwATw7DeCbd3cGhIFfhjdpFlyJq2wa2Xb
BZrtrqqdqmWJrXDrokF//xy9+tm2sLj69Ql+6Sdwlw
*Single User Serial Number Installation* Here is a step by step procedure to install a Poseidon serial number:
1. Download the software from
<http://www.gentleware.com?redirect=download>
(Please use JDK/JRE Version 1.5, or use the installers that include a JRE) 2. Copy the key (above) to your clipboard 3. Start Poseidon for UML 4. If the License Manager dialog does not appear automatically,
please select "help" from the menu bar and choose "License Manager"
5. Click on "Paste from Clipboard" and your key will appear 6. Click the "Add" button to finish the process 7. You will have to register to get a final license key (you can register
even if your serial number has expired).
Click on the serial number in the table to select it, then click "Register"
and enter your User Information.
Click "Next" to finish your registration and get the final license
online or via our Website.
If you need support or have any questions concerning our products, please contact us at http://www.gentleware.com?redirect=contact
jueves, junio 05, 2008
JVM bind error
Al levantar JBoss me encontre con que no podía conectar el puerto 1099.
Encontre como cambiarlo:
Mover la configuración de los puertos en los siguientes archivos
and you will find entries in lines
{JBOSS_HOME}\server\default\conf\jboss-minimal.xml
and you will find entries in lines
{JBOSS_HOME}\server\default\conf\jboss-minimal.xml
{JBOSS_HOME}\server\default\conf\jboss-service.xml
{JBOSS_HOME}\server\default\deploy\cache-invalidation-service.xml
{JBOSS_HOME}\server\default\deploy\cache-invalidation-service.xml
martes, mayo 06, 2008
Read windows registry variable in Java
jueves, octubre 04, 2007
viernes, septiembre 28, 2007
Dates in HSQLDB
Encontre un link para el manejo de fechas en HSQL (y muestra el ejemplo con Oracle).
Para obtener
Se hace:
El post original está aquí.
Para obtener
2007-09-28
Se hace:
year(current_date) '-' month(current_date) '-'
(dayOfMonth(current_date)-60
El post original está aquí.
jueves, febrero 08, 2007
Flavors to Printer
DocFlavor[] flavors = impSelected.getSupportedDocFlavors();
for (int i = 0; i < flavors.length; i++ ) {
try {
System.out.println(BeanUtils.describe(flavors[1]).toString());
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
} // for
for (int i = 0; i < flavors.length; i++ ) {
try {
System.out.println(BeanUtils.describe(flavors[1]).toString());
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
} // for
martes, enero 02, 2007
LongRaw Datatype Oracle
String query = "SELECT name,airline_logo FROM " +
"otn_airline_longraw WHERE code=?";
// Create a PreparedStatement object for executing the query
PreparedStatement pst = connection.prepareStatement(query);
// bind the parameter with code value
pst.setString(1,lcode);
// Obtain the result-set for the selected airline record
ResultSet result = pst.executeQuery();
// get user home folder name
userHome = System.getProperty("user.home");
if( result.next() ) {
// Fetch column values
name = result.getString(1); // Obtain the airline code
// append the file name with user home directory, file separator and
// file extension GIF
fullName = userHome+File.separator+name+".gif";
// LONGRAW data can be accessed in two ways:
// 1) By retrieving all the data at once (using getBytes method)
// 2) By using streams. The LONGRAW data is made available to the program
// as a stream, and the data can be retrieved chunk by chunk, which is
// more eficient in terms of memory usage
// In this sample we illustrate retrieval using streams method.
gifdata = result.getBinaryStream(2);
// create new file
File gifFile = new File(fullName);
// Write the byte array into a local file
FileOutputStream file= new
FileOutputStream(gifFile);
int chunk=0;
// write to the local file until image (LONGRAW) data is found
while( (chunk = gifdata.read()) != -1) {
file.write(chunk);
}
El ejemplo competo está acá [Cátalogo de ejemplos].
Creo que tiene las mejores practicas las clases:
Hace falta un finally para cerrar recursos.
Declarar como final algunos objetos.
sábado, diciembre 16, 2006
Error creating bean with name 'xfire.typeMappingRegistry'
IBM WebSphere Application Server - ND, 6.0.0.1
Número de build: o0445.08
Fecha de build: 11/10/04
Frameworks: Spring & XFire.
Error:
;)org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xfire.typeMappingRegistry' defined in class path resource [org/codehaus/xfire/spring/xfire.xml]: Initialization of bean failed; nested exception is java.lang.VerifyError: (class: org/codehaus/xfire/aegis/type/basic/ObjectType, method: writeSchema signature: (Lorg/jdom/Element V) Incompatible argument to method
La solución es:
WAS tiene po defecto una libreria de JDOM versión 0.7, XFire usa la versión 1.0, al levantar la aplicación el contenedor utiliza las clases de 0.7 de JDOM dado que están en el classLoader del servidor sin importarle la del classLoader de la aplicación (WEB-INF\lib).
Hay que copiar dentro de las librerias del server (C:\Archivos de programa\IBM\WebSphere\AppServer1\lib) la versión 1.0 de JDOM.
Referencia:
Error creating bean with name 'xfire.typeMappingRegistry'
Número de build: o0445.08
Fecha de build: 11/10/04
Frameworks: Spring & XFire.
Error:
;)org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xfire.typeMappingRegistry' defined in class path resource [org/codehaus/xfire/spring/xfire.xml]: Initialization of bean failed; nested exception is java.lang.VerifyError: (class: org/codehaus/xfire/aegis/type/basic/ObjectType, method: writeSchema signature: (Lorg/jdom/Element V) Incompatible argument to method
La solución es:
WAS tiene po defecto una libreria de JDOM versión 0.7, XFire usa la versión 1.0, al levantar la aplicación el contenedor utiliza las clases de 0.7 de JDOM dado que están en el classLoader del servidor sin importarle la del classLoader de la aplicación (WEB-INF\lib).
Hay que copiar dentro de las librerias del server (C:\Archivos de programa\IBM\WebSphere\AppServer1\lib) la versión 1.0 de JDOM.
Referencia:
Error creating bean with name 'xfire.typeMappingRegistry'
miércoles, septiembre 13, 2006
jueves, junio 29, 2006
one-to-one with Hibernate
Cuando tiene una relación uno a uno en la BD, se supone que ambas tablas tiene la misma llave.
Cuando Hibernate hace el mapeo crea una relación one-to-one y como tienen la misma llave, ambas tablas deberian usar el mismo Objeto PK.
Tip: Solemos usar herramientas para generar los mapeos y las clases Java a partir de la BD que no saben identificar el escenario antes descrito (no conozco ningúna herramienta capaz), para no invertirle demasido tiempo a ésto basta con que en la clase hija (de la relación de BD) use la misma PK que la padre, y de la PK que se generó para la clase hija hacer que extienda de la clase PK del padre:
Ejemplo:
Padre en la BD:
Hija en la BD:
Si vemos tenemos la misma clase, en la hija la gerramienta me generó una llamada: 'CasaXFamPK' e identica a SubdelegacionPK
La cual modifique de la siguiente forma:
public class CasaXFamPK extends FamiliaPK {
La excepción provacada cuando caemos en el error de no usar la misma clase para relaciones one-to-one es: