This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!

Marius Holm

Ranch Hand
+ Follow
since Sep 11, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Marius Holm

If you did not uninstall the 1.2.2 version, your PATH environment variable (if you're on a Windows system) still points to the old JDK.
You must set it to the new java.exe
18 years ago
What kind of scheduler?
18 years ago
In general no, you have to count them or keep a variable if the count is important to you.
18 years ago
I think you can read system time from the applet, if that helps.
18 years ago
Hi guys.
Excuse my lack of knowledge about presumably crucial terms related to professional programming, being a hobby programmer myself, but could anyone tell me what these are?
(I bet DRUP is Distributed RUP, and XP must be something extreme or experienced, but... )
Or, you aren't all excited about the last Office version from MS?
Regards,
Marius
Hi Gagan.
I believe that is what you have to do, since most browsers do not keep connections (even if your server supports it).
Marius
18 years ago
Tom,
I didn't quite get your point, you mean you want to sort the characters like 'under' the numbers, as if the numbers are your first sort criteria, then the caracters?
In that case you can do something like:
<PRE>
var numAr=new Array(6,2,7,9,1,2,4,4,3);
var charAr=new Array("c","f","x","d","g","h","w","t","a");
public void sortArrays(int[] numAr,char[] charAr){
System.out.println("numAr: "+numAr);
System.out.println("charAr: "+charAr);

int tmpi;
char tmpc;
for(int m=0;m<numAr.length-1;m++){<br /> System.out.println("for loop, m is now "+m+", numAr["+m+"]="+numAr[m]+", numAr["+(m+1)+"]="+numAr[m+1]);<br /> while(numAr[m]>numAr[m+1]){
tmpi=numAr[m];
numAr[m]=numAr[m+1];
numAr[m+1]=tmpi;
tmpc=charAr[m];
charAr[m]=charAr[m+1];
charAr[m+1]=tmpc;
if(i>0)m--;
System.out.println("Sorting, m is now "+m);
}
}
System.out.println("numAr: "+numAr);
System.out.println("charAr: "+charAr);
for(int m=0;m<numAr.length-1;m++){<br /> System.out.println("charAr["+m+"]="+charAr[m]+", charAr["+(m+1)+"]="+charAr[m+1]+" ?"+(charAr[m]>charAr[m+1]));
while((numAr[m]==numAr[m+1])&&(charAr[m]>charAr[m+1])){
System.out.println("charAr["+m+"]="+charAr[m]+", charAr["+(m+1)+"]="+charAr[m+1]);
tmpc=charAr[m];
charAr[m]=charAr[m+1];
charAr[m+1]=tmpc;
if(i>0)m--;
}
}
System.out.println("numAr: "+numAr);
System.out.println("charAr: "+charAr);
}
</PRE>
Andy,
For instance, like this:
<PRE>
/* Declare this class in your file (at the end)*/
class mySortObject{
int intVal;
char charVal;
public mySortObject(int i,char c){
intVal=i;
charVal=c;
}
}
/* to declare an array of those:*/
mySortObject[] mySortArray;
/* add objects to the Array:
if you know the length when initialising, declare the array like this:*/
mySortObject[] mySortArray=new mySortObject[30];
/*
if not, you must copy the array into a new array with more elements whenever you add, like this:*/
mySortObject[] tmpMSA=new mySortObject[mySortArray.length+1];
for(int m=0;m<mySortArray.length;m++)tmpMSA[m]=mySortArray[m];<br /> /*then add the new Object:*/
tmpMSA[mySortArray.length]=new mySortObject(9,'m');
// and copy to the original Array (if you must)
mySortArray=tmpMSA;
/*Sorting your Array then boils down to:*/
Arrays.sort(mySortArray);
</PRE>
Note: The sort() function sorts after what would be the 'natural ordering' of the elements, what that means in this case you will have to find out...
Regards,
Marius
PS. This UBB code makes it hard to type the program code, indexes for instance...hope I got it right now...
[This message has been edited by Marius Holm (edited March 21, 2001).]
18 years ago
Wow!
I won a book! That's so cool...
I mostly come here to look for answers to my problems, and exchange views with other developers, which is interesting enough in itself.
But winning books doesn't really hurt though...
Thanks guys!
Regards,
Marius
Brian!
You're right, it's something like that, but not exactly.
The right string is:
<?xsl:stylesheet type="text/xsl" href="match.xsl"?>
(A colon ':' instead of '-' in xsl:stylesheet)
This is a quick and handy way to view your transformation, but works only in MSIE 5
Regards,
Marius
Hi Shikhar.
If you can rely on your clients to use the same browser, and that browser is IE 5, you can invoke an MS XMLDOM object client-side, and the rest is easy.
If you use another platform... I don't know what to do..
Hi Sunilkumar.
How do you get hold of the onclick event? Through JavaScript?
Hi Asim!
To your unique problem, I propose the unique solution: Sure! Go ahead!
Well, er, I don't know how much help that really was but what I mean to say, is that I think you're on the right track, XSL is what you need.
And then, there's only one thing left: you have to learn to use XSL. But even if I had the time, I think you can learn XSL from better sources.
You can try a tutorial somewhere at www.w3.org, they are the body standardising everything regarding XML, and ALL THERE IS about XML is defined and then published there, at that website. It's a great source.
(What I know about XML/XSL is mostly from Microsoft documentation, the msdn library. If you have access to that, that is perhaps the best single source of documentation I know of, with good XSL tutorials as well)
Good luck with your project!
Marius
As Cindy says, all your decimal and hexadecimal data you supply with normal ASCII characters.
The exact way these values are handled, as ints, floats, strings or hexes depends on what way the fields are defined in the DTD.
And the world (or a few of us) still await further standarization when it comes to binary data, that can be a tricky one...
Regards,
Marius
XML
XML is only important if you are that much into standardisation and unifying technologies that you think that one platform-independent, universally accessible, programmable format for representation of structured data is of any use.
You don't need to know HTML before you learn XML, but it would have facilitated the learning process. From you asking that way, I assume you don't know any HTML. In that case you should start learning the other way round, XML first and then HTML. HTML is easier and quicker to learn if you don't need to learn XML, but if you will learn XML first, you should start there, and once you got a basic grasp on it...you already know HTML...well almost, you still got to learn the HTML tags, but you already know the syntax better than most web designers...
(Actually, if you can't do that already, it is more important to learn how to ride a motorbike than any of these...)
Regards,
Marius
[This message has been edited by Marius Holm (edited March 13, 2001).]
Hi there!
The point here is that the app in question either validates the XML according to the DTD or it does not. Or, put in another way, either it needs to, or it needs not.
As long as your app is not required to validate the doc, you don't need access to the DTD, the DOCTYPE tag is just ignored.
You should use DTD validation if you expect your app to receive input from external users, whose XML you will not be able to verify before input.
You can not turn off validation in an XML doc. I don't know what 'weblogic' is, but probably (considered today's connectivity conditions around) it will not go to the web to check the DTD for a configuration file (if that's what 'web.xml' is).
The point is that as long as you, as system administrator, are able to keep the config files proper, it would be a serious flaw in any system to let you have downtime because it cannot access a public DTD.
This may change in the future, when connectivity is more or less assured everywhere.
Good luck with your project!
Regards,
Marius