Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Sunetra Saha

Ranch Hand
+ Follow
since Feb 25, 2001
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 Sunetra Saha

My company in Edinburgh is shutting down. I am planning to look for Employment in London. Simon, it would be really helpful if you can give us some pointers.
19 years ago
I have run into the same problem. Can anybody help?
19 years ago
Thing is, Angela - you generally post this riddle a bit earlier in the day. So the diehards were not around to answer you promptly. I stumbled on it by chance as my xslt transform was taking all the time in the world to finish.
20 years ago
Sorry, it should have been e n t for eight , nine & ten rspectively.
20 years ago
e for eight!!!
20 years ago
Tobacco, isnt it?
20 years ago
I think it will be 1 & 3. 2 is false as you can refer the member variables of the outer instance by just their names as long as the name does not conflict with any local variable name or member variable name of the inner class.
interrupted() checks the status of the thread to see whether it has been interrupted. If it has it retuns true. But before it returns, it sets the status of the thread to false.So any subsequent calls to interrupted()would return false. However if the thread had not been interrupted it just returns a false, without chnaging the status.
But isInterrupted() just returns the current status of the thread without tampering with the status under any condition.
Hi, can anybody tell me how to count the number of characters in an xslt variable? I need this so that I can truncate a string if its length exceeds a certain number.
This might work for you :
<xsl:template match=COMPANY[salesdept|ITdept]>
I will try to explain.
Take the entire mad list
{
{ { "a", "b" , "c"}, { "d", "e", null } },
{ {"x"}, null },
{{"y"}},
{ { "z","p"}, {} }
}
and try to imagine it to be an unidimensional array. For this we can break it up with commas. Thus we have an array of 4 elements. Now take the first element of the said array { { "a", "b" , "c"}, { "d", "e", null } } - which again looks like an array and can be broken up by commas. Thus we have a nested array of two elements inside the first element - i.e the elements a[0][0] and a[0][1]. Since we are only concerned with a[0][1] we take a closer look at it i.e { "d", "e", null } . This again is an array of three elements a[0][1][0](="d"), a[0][1][1](="e") and a[0][1][2](=null) - our required answer.
Hope I have been clear enough.
I go through javaranch daily while at work and seldom chanced in this forum. But one day I did - and I am hooked to it. Whenever there is a stupid problem at work, or I am bored, I find myself coming back to this forum - I am almost addicted to these hilarious posts now.
Perhaps the veterans here can give us a brief history of this forum - like whose brainchild it is etc.??
20 years ago
I have used something similar to you .
Try doing it like this
<a href ="{$HttpUrl}">
instead of
<a href="<xsl:value-of select="$HttpUrl" />
You have to have some guidelines as to the formatting. For example - you cannot allow the user to enter dates as
dd/mm/yy
mm/dd/yy
yy/mm/dd - all at the same time. No compiler can then possibly say what 01/02/03 means.
Once you decide what are the allowable formats e.g
dd/mm/yy
dd/mm/yyyy
dd/mon/yyyy
dd/month/yyyy
All the above with - & . seperator etc. etc.
Then you have to write a method that parses for all these cases. For example you have to check the seperator chars and tokenize the string into 3 fragments. Then check value of first fragment. If it is digit and within 31(max possible value of dd) etc.
Let us know how it goes.
20 years ago