No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
As part of a class in Java, the constuctor is supposed to throw a java.lang.IllegalArgumentException exception when an integer that is a field in the class, let's call it int N, is set to a negative vale. How do I set this up? |
|
I have a class cyclotomic{public: int p; int *cyclonumber; ??? createZetas(void} Obviously there is more to the class. For intance when a class is constructed, the cyclonumber pointer is newed into an array of size p-1. Everything is public. The function createZetas is supposed to create and return a newed … |
|
How do I define a typedef struct in function f1() and pass a pointer to function f2() without a global definition of the struct. For instance: Also I would like this to be in C but not in C++. I have no toolbar, so I cannot put the code I … |
|
Suppose I need to have a regex expression (using Perl regex) that, say, matches a*b\q as simple text and does not interpret a* as any number of a's. I know it is simple here, but I need it to work for ANY string of characters. |
|
Using a C but not a C++ compiler. We have code like this: Suppose we have code like this: [CODE]main() { int *funcko(); int *george = funcko(); printf("%d", goerge[3]); } int *funcko() { int cat[12]; return cat; }[/CODE] What happens when you try this according to the actual rules of … |
|
I am trying to extract the important text, and only the important text from an RSS feed. I have determimed that all of the items in the feed have the important text underneath a tag that starts <div id="important text"> ... In some of the files the important text is … |
|
Suppose you have an xml file that has a portion that looks like: <div id="California">The cat is in the house <p>The horse is also in the house</p> <div><a href="wwww.whatever.com" /><p>Another pigeon?</p></div> </div> Since the top div here is buried somewhere within the file, I am trying to isolate it with … |
|
I have an xhtml document that contains many lines that look like: <div style="position:absolute;top:224;left:108">The line was longer than we expected</div> For my first trick I need to be able to match or select this node and others like it, where like it means that it is a div tag with … |
|
This one ought to be extremely easy for experienced xslt-ers. I have an html file, and in it are things like <div class="ghoul"></div> <div class="vampire></div> and so on. In my stylesheet, I have different things to do with the div's depending on the class. So I have <xsl:template match="div"> <xsl:choose> … |
|
Another total Nuby collection. I have an xml file from which I wish to eliminate all elements that have any attributes at all. All I really need to do is eliminate the contents of the attribute. How do I do this? My plan is to start with <xsl:template match="Contains an … |
|
Have I got a problem. I am quite new to xslt, and I have the following situation. I am presented with an xml file. I only want to extract the text in four of the tags present in the document. My first approach was to create a template for each … |