If the indexes in your table are broken, he is the script to fix them:
DBCC DBREINDEX (‘db_name.db_owner.table_name’)
GO
February 14, 2008
If the indexes in your table are broken, he is the script to fix them:
DBCC DBREINDEX (‘db_name.db_owner.table_name’)
GO
February 14, 2008
MS SQL Server 2000 does not allow columns with Default value constraints to
be altered or dropped. So, is there any way to alteror drop those columns?. The problem
occurs because the DEFAULT clause actually creates a constraint on the
table. This name of this constraint is chosen by SQL Server and will differ
from database to database. (more…)
February 14, 2008
This is the class that adds the autocomplete feature to a comboviewer
import java.util.Date;
import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
/**
* Adds the autocomplete feature to a comboviewer
*
* @author Felipe Lang
*
*/
public class AutoComplete { (more…)
February 14, 2008
It’s very simple:
import java.util.Date;
public class DateUtils {
private static final long MILISECONDS_PER_DAY = 24 * 60 * 60 * 1000;
public static int getDaysBetweenDates(Date startDate, Date endDate) {
long diff = endDate.getTime() – startDate.getTime();
int days = (int) Math.floor(diff / MILISECONDS_PER_DAY);
return Math.abs(days);
}
}
February 14, 2008
Here is the code to play wav files in java. It is pretty simple, so I do not think you will any problem.
public static void play(String soundFile) {
try {
InputStream stream = SoundPlayer.class.getResourceAsStream(soundFile);
if (stream == null)
return;
AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(stream);
Clip clip =
(Clip) AudioSystem.getLine(new DataLine.Info(Clip.class, audioInputStream.getFormat()));
clip.open(audioInputStream);
clip.start();
stream.close();
audioInputStream.close();
} catch (Exception e) {
e.printStackTrace();
}
}
February 14, 2008
Recently, at work, we deployed a software in many locations, and we do not wanted to allow people to install it in any computer they want. We must be sure that the software will only run in the PCs in which we installed it.
I found on the internet many applications that allows you to generate some kind of license to protect your software, but most of them where very expensive or difficult to apply.
So I decided to build my own license software, and I based it on the MAC address number because it is supposed that this number is unique. (more…)
February 14, 2008
Eclipse Platform



JDT – Java Development Tools

Java Compiler
February 14, 2008
The Eclipse Europa release available
![]() |
Eclipse IDE for Java Developers – Windows (78 MB) The essential tools for any Java developer, including a Java IDE, a CVS client, XML Editor and Mylyn. Find out more… |
Windows Linux MacOSX |
|
Eclipse IDE for Java EE Developers – Windows (123 MB) Tools for Java developers creating JEE and Web applications, including a Java IDE, tools for JEE and JSF, Mylyn and others. Find out more… |
Windows Linux MacOSX |
|
Eclipse IDE for C/C++ Developers – Windows (62 MB) An IDE for C/C++ developers. Find out more… |
Windows Linux MacOSX |
|
Eclipse for RCP/Plug-in Developers – Windows (152 MB) A complete set of tools for developers who want to create Eclipse plug-ins or Rich Client Applications. It includes a complete SDK, developer tools and source code. Find out more… |
Windows Linux MacOSX |
|
Eclipse Classic – Windows (140 MB) The classic Eclipse SDK: the Eclipse Platform, Java Development Tools, and Plug-in Development Environment, including source and both user and programmer documentation. Find out more… |
Windows Linux MacOSX |
February 14, 2008
Great site with thousands of interesting programming ebooks about Java, JSP, Servlets, JSF, AJAX, etc.
Link here