-
For the purposes of this article a Seam project named example will be used. This is only important in regards to remembering the default generated naming of the persistence unit and other configuration, ect… which will default to the project name, example.
-
I found the solution to my problem, I'll put the solution here if someone has the same problem.
I was defining byte array parameter as an object and when I was adding it to the page it was by default added as a String in text field. The byte array was image which I wanted to display on the report, so first I had to convert byte array to ByteArrayInputStream on the Java side, define parameter as type InputStream, and then display it within the image, also as InputStream type.
links for 2011-05-30
31 05 2011Comentarios : Deja un Comentario »
Categorías : delicious
links for 2011-05-27
28 05 2011-
public static String capitalize(String s) { if (s.length() == 0) return s; return s.substring(0, 1).toUpperCase() + s.substring(1).toLowerCase(); }
-
The Recommendations for Chart and Graphic comprise guidelines for the use of charts, graphics, images, colors and text.
-
NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
rangeAxis.setMaximumCategoryLabelLines(2); -
(BarRenderer(renderer)).setItemMargin(0.0);
-
CategoryPlot plot = (CategoryPlot)chart.getPlot(); CategoryAxis xAxis = (CategoryAxis)plot.getDomainAxis(); xAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);
Comentarios : Deja un Comentario »
Categorías : delicious
links for 2011-05-24
25 05 2011-
AutoMySQLBackup has all the features I needed: it can backup a single database, multiple databases, or all the databases on the server; each database is saved in a separate file that can be compressed (with gzip or bzip2); it will rotate the backups and not keep them filling your hard drive (as normal in the daily backup you will have only the last 7 days of backups, the weekly if enabled will have one for each week, etc.). It has also some other features (check the project homepage for full details), that I am not using myself (like email logs for example), but other peoples might find interesting.
-
MySQL is one of the most popular open source database management system for the development of interactive Websites.
If your site stores its sensitive data in a MySQL database, you will most definitely want to backup that information so that it can be restored in case of any disaster (we all have been there).
There are several ways to backup MySQL data. In this article we’ll look at how to backup your databases using different methods, we will also learn how to achieve an automatic backup solution to make the process easier. Starting with the mysqldump utility that comes with MySQL, we will review several examples using mysqldump, including the backup of your database to a file, another server, and even a compressed gzip file and send it to your email.
-
SSH is a must use tool for system administrators. However, residing access security on a human entered password is not very wise. Script kiddies may break into your system due to a lazy user with a weak password. And it is beyond the system administrator power to make users choose good passwords.
-
This short tutorial describes how to configure JBoss Application Server (Jboss GA 5.1.0) on a debian linux (Debian GNU/Linux 5.x “Lenny” ). Article starts with installation of java JDK and continues with JBoss installation and basic configuration according to standard file system hierarchy. Also init.d. scripts configuration is given here.
-
15 gotchas in seam
-
There seem to be a problem with IE8 and Seam applications. We are running Seam 2.1, JSF 1.2 and Facelets, and I cannot say for sure where the bug is. For all I know its a bug with IE8.
There seem to be problems when creating long-running conversations. In link using IE8 the cid doesnt appear. Somehow it is stripped or doesn't render correctly, and it causes some strange behaviour.
When trying to create a long running conversation by pushing an edit link for instance, we get a "Your session has timeout" exception.We fixed this IE8 problem by telling Internet Explorer to emulate IE7 in pages.xml
<page view-id="*">
<header name="X-UA-Compatible">IE=EmulateIE7</header>
</page>I suggest you do the same until the bug is identified and fixed.
Comentarios : Deja un Comentario »
Categorías : delicious
links for 2011-05-20
21 05 2011-
# import java.text.DateFormat;
# import java.text.SimpleDateFormat;
# import java.util.Calendar;
# import java.util.Date;
#
# // Java 1.4+ Compatible
# //
# // The following example code demonstrates how to get
# // a Date object representing the first day of the month
# // relative to a given Date object.
#
# public class GetFirstDayOfMonth {
#
# public static void main(String[] args) {
#
# Date today = new Date();
#
# Calendar calendar = Calendar.getInstance();
# calendar.setTime(today);
#
# calendar.set(Calendar.DAY_OF_MONTH, 1);
#
# Date firstDayOfMonth = calendar.getTime();
#
# DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
# System.out.println("Today : " + sdf.format(today));
# System.out.println("First Day of Month: " + sdf.format(firstDayOfMonth));
# }
# }
Comentarios : Deja un Comentario »
Categorías : delicious
links for 2011-05-13
14 05 2011-
Command line: For anonymous sites, the format is cd ftp://ftp.yoursite.com
To connect to a site with a password (non-anonymous),
cd ftp://username:password@ftp.yoursite.com
(This may return an error message if you did not specify a directory, but will connect you anyway.)
Or type in the full path: cd ftp://username:password@ftp.yoursite.com/public_htmlLeft / Right dropdown menu: will connect on that respective side. Arrow down to FTP link, or use hotkey P. A dialog box will request the FTP address in the same format:
Anonymous: ftp.yoursite.com
Non-anonymous: username:password@ftp.yoursite.com/public_html
Comentarios : Deja un Comentario »
Categorías : delicious
links for 2011-05-11
12 05 2011-
Uno de los problemas a los que se enfrenta un responsable de mantenimiento que quiere mejorar los resultados del departamento a su cargo es que debe MEDIR la evolución de los aspectos más importantes que definen o determinan la calidad de su trabajo. ¿pero cuales son esos indicadores? ¿Qué parámetros determinan que el trabajo de un departamento se está haciendo bien o mal?
-
The trick to this is that if you want to add a line break within a cell, press Alt + Enter, instead of just Enter.
-
Any application that does not always need administrator privileges should not run with them by default. However, when a user wants to perform a task that requires elevation, you need to show them that this is required by displaying the Vista shield icon. When this is clicked, your application will then need to restart with administrator privileges. Interested? Then read on…
Comentarios : Deja un Comentario »
Categorías : delicious
links for 2011-05-10
11 05 2011-
Q: I have a Windows 7 laptop that makes random noises. Any thoughts, or is the laptop possessed? – Beth
A: Much like with your car, when a computer starts to make random or weird noises, you should not ignore them.
Comentarios : Deja un Comentario »
Categorías : delicious
links for 2011-05-09
10 05 2011-
For any Seam-powered website, optimizing the communication between the webbrowser client and the server is crucial. Although some of these optimization strategies can be considered generic, and some are handled by Seam on the server-side automatically, many others depend on the content that is being served. In other words, Seam can only do so much automatically and you, as the developer of a website, will have to manually tune your system for optimal performance and scalability.
This document outlines some common strategies useful for Seam application developers.
Comentarios : Deja un Comentario »
Categorías : delicious
links for 2011-05-08
9 05 2011-
mysql> SET PASSWORD FOR 'usuario'@'host' = PASSWORD('contraseña');
-
Step 5: Create a start/stop/restart script for JBoss.
For our JBoss script we will simply copy the existing jboss_init_redhat.sh script located at at /usr/share/jboss-5.1.0.GA/bin, copy it to /etc/init.d and rename it to 'jboss':
-
1. Create a new file called java.sh
vim /etc/profile.d/java.sh
2. Within this file, initialize the necessary environment variables
export JRE_HOME=/usr/java/jdk1.5.0_12/jre
… more variablesNow when you restart your machine, the environment variables within java.sh will be automatically initialized (checkout /etc/profile if you are curious how the files in /etc/profile.d/ are loaded) .
-
zip -9 -r <zip file> <folder name>
To zip a single file:
zip -9 <zip file> <filename>
Use "-9" for best compression. The compressed file works fine with Windows XP compression tool.
Comentarios : Deja un Comentario »
Categorías : delicious
links for 2011-05-07
8 05 2011-
1) Login to mysql server, type the following command at shell prompt:
$ mysql -u root -p2) Use mysql database (type command at mysql> prompt):
mysql> use mysql;
3) Change password for user vivek, enter:
mysql> update user set password=PASSWORD("NEWPASSWORD") where User='vivek';
4) Finally, reload the privileges:
mysql> flush privileges;
mysql> quit
Comentarios : Deja un Comentario »
Categorías : delicious








Comentarios recientes