It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I have to generate a series of random numbers using XQuery.I found a set of libraries but those are paid.If anyone can give me a direction it would be much appreciated(preferably code).
The standard XQuery languages provides no random function, but many implementations do. Some examples for open source implementations:
BaseX provides a Random Module
Zorba has a Random Module, too
eXist-db has some suitable functions in the Util Module
MarkLogic provides the xdmp:random() function
As an alternative, most Java implementations of XQuery (such as BaseX, Saxon or Qizx) provide so-called Java bindings in order to evaluate Java code:
declare namespace math = 'java:java.lang.Math';
math:random()
If the implementation support the latest XQuery 3.0 specification, this can also be written as a one-liner:
Q{java:java.lang.Math}random()
Related
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
I have two xmls, say Sample1.xml and Sample2.xml. Now I need to compare both the xml values (parent nodes, child nodes, attributes and its values) and return the differences between them in xquery. I knew I can use deep-equal function to say if the xmls are identical. But I do not know how to compare and return the xml difference.
Please help.
Thanks,
-N
Depending on the degree of generality we're talking about here, this is a non-trivial problem (PDF). If your question is, "how do I write this algorithm," then it's way too open-ended for StackOverflow (see the FAQ). If, on the other hand, you are asking, "Is there any XQuery library code out there that will do this," then it appears that simply Googling "XML difference XQuery" will lead you straight to the answer. Faster, even, then having someone else do the Googling for you on Stack Overflow.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
How to choose a language, a lambda term (λx.y)((λx.xxx)(λx.xxx)) actually calculated? In other words, need a language to the normal order reduction and the weak type system.
What have you search for and what have you found so far?
I'd say there is no standard language that meets this requirement, since in most languages you always have different types, not just untyped terms. You probably need a pure lambda calculus interpreter (implementing one is a good exercise).
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I've been asked to model my application. I'm not clear what this means, Perhaps something related to the architecture of my project?. Does it mean giving them a break-up of the classes? Or something like building a use-case or class diagram? Or perhaps something else?
EDIT: I cannot ask them!
I'd go with UML (Unified Modelling Language). It allows you to lay out classes, methods, inheritance, etc. in a graphical format.
A quick Google search gives this FOSS option:
Umbrello UML Modeller
EDIT: Just realized that's linux-only, so here's the Wikipedia page for a whole bunch of other options.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I would like to know what are the best practices for building Predictive Modeling solutions organically ?
Some of the questions I have are :-
If I have multiple R model files, what are efficient ways of storing them ?
Save as .Rdata files on file system
Serialize to a DB as binary objects
Since data is processed to create an interim model specific format, is it helpful to use such paradigms as PMML ?
Also, should one consider such practices as MVC (I'm not a trained software developer, so any insights into such development practices would be very helpful)
I apologize for the open-ended nature of this question. I wish to understand even simple things as recommended folder structure for data staging, model store, scripts collection and such other elements of a data mining solution.
I would be very grateful to members of the community for sharing their experiences and recommendations.
Thank you for your time.
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 12 years ago.
Difference between HashSet and TreeSet?
You should check the JavaDoc of both classes. They are different in various aspects.
As an example, ordering:
TreeSet:
A NavigableSet implementation based on a TreeMap. The elements are ordered using their natural ordering, or by a Comparator provided at set creation time, depending on which constructor is used.
HashSet:
This class implements the Set
interface, backed by a hash table
(actually a HashMap instance). It
makes no guarantees as to the
iteration order of the set; in
particular, it does not guarantee that
the order will remain constant over
time. This class permits the null
element.
Take a look at the Java Tutorials trail on Set Implementations, from which I quote:
HashSet is much faster than
TreeSet (constant-time versus
log-time for most operations) but
offers no ordering guarantees. If you
need to use the operations in the
SortedSet interface, or if
value-ordered iteration is required,
use TreeSet; otherwise, use
HashSet. It's a fair bet that you'll
end up using HashSet most of the
time.