How to generate an Eclipse formatter configuration from a checkstyle configuration?
I have a checkstyle configuration XML file and want to automatically generate an Eclipse formatter configuration from this. Is there any tool that can do this? ...
I have a checkstyle configuration XML file and want to automatically generate an Eclipse formatter configuration from this. Is there any tool that can do this? ...
what type could contain a number like 2023209999 in java? do you think that using a string type to represent a telephone number is a good idea? ...
I'm looking for Java solution but any general answer is also OK. Vector/ArrayList is O(1) for append and retrieve, but O(n) for prepend. LinkedList (in Java implemented as doubly-linked-list) is O(1) for append and prepend, but O(n) for retrieval. Deque (ArrayDeque) is O(1) for everything above but cannot retrieve element at arbitrary...
I'm familiar with the java.sql.DatabaseMetaData interface, but I find it quite clunky to use. For example, in order to find out the table names, you have to call getTables and loop through the returned ResultSet, using well-known literals as the column names. Is there an easier way to obtain database metadata? ...
This is a composed concurrent list multimap implementation. A lower-level implementation would be better, but more complex. Ignoring the O(n) removal in the sublist, is this the correct way to compose a ConcurrentMap and CopyOnWriteArrayList into a functional ConcurrentMultimap? Are there any unresolved data races? private final Concur...
I am trying to bytecode generate a method signature from a java.lang.reflect.Method. The signature(generic type) part of it is tricky as the reflection api to get the type information and transform it into what asm needs is NOT straightforward. Know of any code out there which does this already? ...
I've been looking online for the last day or so but haven't managed to see anything that clearly explains the spec. The application I'm trying to learn is based on BEA Weblogic Portal Server. I'm primarily looking for links but a good book would also be helpful. ...
Hi, My task is to open a large file in READ&WRITE mode and i need to search some portion of text in that file by searching starting and end point. Then i need to write that searched area of text to a new file and delete that portion from the original file. The above process i will do more times. So I thought that for these process, it ...
I am designing an entity class which has a field named "documentYear", which might have unsigned integer values such as 1999, 2006, etc. Meanwhile, this field might also be "unknown", that is, not sure which year the document is created. Therefore, a nullable int type as in C# will be well suited. However, Java does not have a nullable ...
I'm trying to figure out the best way to search a customer in an ArrayList by its Id number. The code below is not working; the compiler tells me that I am missing a return statement. Customer findCustomerByid(int id){ boolean exist=false; if(this.customers.isEmpty()) { return null; } for(int i=0;i<this.custome...
I want to split up my project in diffrent modules so i can just swap them out if needed. Atm i just Jboss Developer Studio. So i want my templates , login etc to be in 1 module/Application Then i want to be able to access thease annotations and beans in another application. Is this possible to do ? Or is this seperation of modules ...
Hi, Im implementing a project in java using webservices and I need to figure out if the service is running on a particular host:port. I can think of a couple of methods 1.Sockets 2.URLConnection class 3.Web service call with a 1 sec timeout Could you please quide me to the most efficient method. Thanks in advance. ...
Hi, I am using EMF through annotated Java code as following /** * Adds the given type to this filter. Has no effect if the given type * already belongs to this filter. * * @param type * the type to add * @model */ public void addEntityType(String type); /** * Returns the list of types belonging to this filter. ...
I'm trying to implement a database paging solution (forward only required) using a CachedRowSet to page an AS400JDBCResultSet containing the results of my query. I've tried using the CachedRowSet cachedRowSet = new CachedRowSetImpl(); cachedRowSet.setMaxRows(10); cachedRowSet.setPageSize(10); cachedRowSet.populate(resultSet); approac...
Is there a way to pass a DetachedCriteria object to a jax-ws service? (my problem is that DetachedCriteria does not have a no-arg constructor, which is required by jax-ws) ...
How do i deploy a java applet for modern browsers? I know there are somehow 3 possibilities but nobody tells me which one to prefer and how to use them. Does somebody have any resources on that? i cant find any :( ...
I have a very specific requirement that I can't find a charting library for. I need to show multiple stacked column or step-area charts on the same 3D axes to compare multiple periods of time to each other - for example, the y axis would show sales volume with regions stacked above each other, the x axis hours of the day and the z axis s...
How to determine a proper serial version ID? Should it be any big long value using some generators or any integer wld suffice ? ...
Any clue about a good library to programmatically produce a PDF in Java, using a PDF as a template? ...
Suppose given an array of size n, with sorted values. In iteration i, a new random-generated value is given, and inserted into the end of the array. The array is then resorted, and discard the least value item. After iteration n, the retained array will contain the largest value items. For example, in Java syntax, it will be somet...