Questions tagged [canonical-form]
31 questions
8
votes
2 answers
XML Canonicalization algorithm gives two difference results when called directly than when called as part of an xml digital signature?
I'm getting two different hashes of the same xml document when I directly canonicalize some xml than when I perform a digital signature on it which also performs the same canonicalization algoririth on the xml before hashing it? I worked out that…

Jon
- 4,295
- 6
- 47
- 56
7
votes
1 answer
Canonical form of field
I'm studying Effective Java, Item 8 (Obey the general contract when overriding equals). It has been explained quite clearly by the author, but still some parts are not that much elaborated.
For this example, he considers a class…

gaurav jain
- 3,119
- 3
- 31
- 48
7
votes
1 answer
How does c++11 implements "... = default;" for the rule of three methods
When I learned C++ people told me to always implement at least rule of three methods.
Now I'm seeing the new "... = default;" from c++0x on stack overflow, and my question is:
Is there a c++11 standard implementation defined for those methods or is…
user1585121
5
votes
2 answers
Should I delete the record of my site with WWW in it?
I currently have both urls of my site listed in google and yahoo siteexplorer etc, there is some difference in the pages that are indexed.
Do I need both, or can I delete the one with the www at the start and then let it find all pages using the new…

slugmandrew
- 1,776
- 2
- 25
- 45
4
votes
3 answers
Canonical form of += operator for classes
I know that it's a good idea to make as much of the interface of a class non-member non-friend as possible, and I've just realised that for my 3D vector class, 'Vector3', I can move the +=, -= and so on operators out of the class, leaving just…

Ben Hymers
- 25,586
- 16
- 59
- 84
4
votes
3 answers
Canonicalize NFL team names
This is actually a machine learning classification problem but I imagine there's a perfectly good quick-and-dirty way to do it. I want to map a string describing an NFL team, like "San Francisco" or "49ers" or "San Francisco 49ers" or "SF…

dreeves
- 26,430
- 45
- 154
- 229
3
votes
1 answer
Compute canonical cover using armstrong's axioms
question:Determine the canonical cover using Armstrong’s Axioms. Give the axioms that you use to arrive at each step.
R = (A, B, C, D, E, F)
Fdependencies = {A -> B, A -> C, CD -> E, CD -> F, B -> E}
I know armstrong's axioms:union,…

pete
- 31
- 1
- 2
3
votes
4 answers
What is canonical cover, closure and extraneous attribute?
I'm studying database concepts and there are 3 concepts that I don't understand: canonical cover, extraneous attribute and closure. I read the definition about canonical cover but I don't get the picture of how it relates to 3NF and BCNF. The…

Niklas Rosencrantz
- 25,640
- 75
- 229
- 424
2
votes
7 answers
Are there canonical-forms for database queries?
Say I want to make an "Optimized query generator". Basically a SQL query optimizer that is a lot better than what can be put in an SQL server based on time/space limitations. It would take a query and DB stats as input and generate an SQL query…

BCS
- 75,627
- 68
- 187
- 294
2
votes
1 answer
Given a main function and a cleanup function, how (canonically) do I return an exit status in Bash/Linux?
Context:
I have a bash script (a wrapper for other scripts, really), that does the following pseudocode:
do a main function
if the main function returns:
$returncode = $? #most recent return code
if the main function runs longer than a timeout:
…

Zac B
- 3,796
- 3
- 35
- 52
1
vote
1 answer
Can I disable/turn off general protection exception when an address is not in canonical form?
I found the quote below online. Is it possible to disable a general protection exception when a pointer isn't in canonical address form? I was thinking for my app it would be so nice if I can use the high 4bits of a pointer to hold extra data (for…

Eric Stotch
- 141
- 4
- 19
1
vote
1 answer
IF-THEN in canonical form?
defining IF like this :
dynamic(if/1).
op(200, fx, if).
op(150, xfx, then).
op(100, xfy, and).
op(100, xfy, or).
generates the following canonical form :
?- write_canonical(if x then y).
if(then(x,y))
?- write_canonical(if x and z then…

sten
- 7,028
- 9
- 41
- 63
1
vote
1 answer
What is the correct approach when decomposing dependencies
I am struggling with Carnonical Cover, Dependency Preservation and Lossless Decomposition.
Are the approach and thoughts here correct?
R(ABCDEFG)
Provided is the following set of dependencies after a canonical cover has been made. I did not do the…

Paludan
- 622
- 1
- 5
- 21
1
vote
1 answer
Normalize in canonical form two XML files in Python
I have two XML files and I need to check that they contains the same exact information.
Regardless of tag or attribute order.
For instance this two XML files should be equals:
test1.xml

Natim
- 17,274
- 23
- 92
- 150
1
vote
2 answers
Which is the proper XML exclusive canonicalization?
I'm using xmlseclibs to try and sign a SOAP document, but it does not seem to canonicalize things in the same way depending on whether I'm signing or validating.
I'll give you an example. This is the XML I am trying to sign:

soapergem
- 9,263
- 18
- 96
- 152