Hi guys , i have following xml file as input ....
<?xml version="1.0" encoding="ISO-8859-1"?>
<T0020
xsi:schemaLocation="http://www.safersys.org/namespaces/T0020V1 T0020V1.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.safersys.org/namespaces/T0020V1">
<INTERFACE>
<NAME>SAFER</NAME>
...
I have a class called "DataModel" or something, which is basically a unit of data which can be either a string or a number or a date or a boolean with various (identical) attributes.
What is the best way to write this model?
Have the value be of type Object
interface DataModel {
Object getValue(); // cast to whatever is needed
...
im trying to create a restaurant system that will create food items and such from a menu.
ill be learning jdbc soon and im sure that would help but for now i think the simplest way is too create my menu in notepad.
whats the best way to line up and read from a notepad file like a menu.
please try speak clearly, im not exactly sure of ...
What are good resource to read up on for implementing numerical algorithms in pure java?
I know nothing about the interactions of the JVM & GC, and would love to learn more.
...
I am often asked to perform sizing and capacity planning for our clients. When our clients buy our products (basically J2EE web applications), they often ask what hardware they will need to run those products. Our recommendations often result in high-cost hardware acquisitions.
So far, the best heuristics I developed is to compare the u...
Here's the target I'm using to run my tests:
<target name="run-tests" description="run the tests" depends="compilation">
<junit>
<sysproperty key="tests.basedir" value="${SPECIAL_PATH}/unit_tests"/>
<classpath>
<pathelement location="${COMPILED_CLASSES}"/>
<pathelement loca...
Hello all,
I have a java application which uses JNI in some parts to do some work. It follows the usual loading of DLL and then calling native methods of DLL. Is there any way we can restrict what native methods can do from the java application? For example, can we restrict DLLs not to open any files or not to open any sockets even if i...
Hi,
I have a c++ client which needs to send a file to a c++ server. I'm splitting the file to chunks of PACKET_SIZE (=1024) bytes and send them over a TCP socket. At the server side I read at most PACKET_SIZE bytes to a buffer. When the client sends files which are less than PACKET_SIZE, the server receives more bytes than sent. Even wh...
When obfuscating your source code, are there any differences between Java and .NET web applications?
or is the resulting obfuscated .dlls/.jars pretty much the same?
Can you apply better obfuscating techniques in java versus .net, or again its the same pretty much?
(not looking to debate how obfuscation won't hide intellectual propert...
I have a simple JAXWS webservice deployed in JBoss. It runs fine with a java client but I'm trying to connect using a Silverlight 3.0 application. I've changed the webservice to use Soap 1.1:
@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http")
public class UserSessionBean implements UserSessionRemote {
...
}
I'm using...
Can someone please tell me a reliable way to get the last modification time of a Java resource? The resource can be a file or an entry in a JAR.
...
Hello,
I have made a music quiz similar to the one in the iPod, everything runs perfect until my program calls a class MP3 ( http://pastebin.com/d52fe24ce ) to stop with the function close(). The problem in my case is that the MP3 is not "instantiated" when it is called. I am not sure but I think this is because the player I created is ...
Hello,
I am tring to convert a set of strings to a byte[] array. At first, I do something like this to convert a byte array to a string:
public String convertByte(byte[] msg) {
String str = "";
for(int i = 0; i < msg.length; i++) {
str += (msg[i] + " * ");
}
return str;
}
When I try to convert b...
Just trying to understand how Java annotations work under the covers.
Seeing as spring relies on annotations and scanning the object graph for DI and AOP (reflection), curious how things actually work.
With spring, are all lookup mappings etc. done at startup, so at runtime spring looks at its own inner mappings for DI/AOP/etc. instead...
I'm wanted to use a panelGroup to group my inputs and their labels
e.g
<h:panelGroup styleClass="#{jsfServicesError.errorClass}" binding="#{jsfServicesError.myComponent}">
<h:outputLabel for="company" id="companyLabel" value="#{bundle.IDENTITY_COMPANY} * :"/>
<h:inputText id="company" label="#{bundle.IDENTITY_COMPANY}" value="#{manager...
Hm, trying to find the spring framework's source code download, but can't!
Can someone help me out?
BTW, what exactly are the benefits of going with more commercial version of spring?
...
My Application periodicly shows information on the screen. But if the screenshot is active, the application should wait until the user returns.
Is there any way to determine if the screensaver is running?
I don't need a clean solution, u just needs to work on windows xp.
Similar question, but other technology:
http://stackoverflow....
Suppose I have the following objects (one table per object) with this relations:
A -> B -> C -> D
If I findById an instance of A, all B, C and D are returned which is not I want. Is this possible to force Hibernate only to return A (or only it's primitive properties)?
I know that I can write "SELECT a.x, a.y, a.z, ... FROM A" and then ...
I have an AWT canvas (3rd party library) that displays some information. I need to display a scroll pane over top of it. Since the canvas is AWT, I need to use a ScrollPane instead of a JScrollPane. I'd like to give the scrollpane a rounded border - is that at all possible in AWT? Or is there any way I can use a JScrollPane on top of the...
I want to use the youtube api on my website. It will be possible to a user to upload a video from our website to his youtube account.(Via youtube api)
Is there anybody know if it's possible to delete the video from the youtube user's account from our application if the user is not currently using our website ? Like a year after he uplo...