Questions tagged [equivalence]

Equivalence is a relationship in which two or more identifiers are abstractions for the same data structure.

References

168 questions
0
votes
2 answers

Equivalence of Array types in Ada

While trying to make an ADA binding to a third party C/C++ library (SAPNWRFCSDK) I came to problems of type inference for array types: First problem: The Gnat-Binding-Generator from gcc (gcc -fdump-ada-spec) is generating lots of intermediate named…
Florian B.
  • 51
  • 6
0
votes
1 answer

Is it more proper to use the equivalent operator or the equals() method to compare the contents of Strings?

I'm reading about the notion of interned strings: String s1 = "Hi"; String s2 = "Hi"; String s3 = new String("Hi"); System.out.println(s1 == s2); // true System.out.println(s1 == s3); // false System.out.println(s1.equals(s3)); //true String is an…
Matthew Moisen
  • 16,701
  • 27
  • 128
  • 231
0
votes
2 answers

Vb.net equivalent of C#

What is the equivalent vb.net code of the corresponding MouseDown event shown below (C#)? How should I implement this event in vb.net? Thank you in advance, Goicox var model = new PlotModel("MouseDown HitTestResult", "Reports the index of the…
goicox
  • 31
  • 1
  • 9
0
votes
2 answers

Determining object equivalence for value types, reference types and ILists in .net

I have a class with a Property called 'Value' which is of type Object. Value can be of any type, a structure, a class, an array, IList etc. My problem is with the setter and determining whether the value has changed or not. This is simple enough for…
Jules
  • 4,319
  • 3
  • 44
  • 72
0
votes
2 answers

Unique hash with jQuery that can be reproduced in PHP

I am using a script in wich I need to create a unique Hash with jQuery that I would be able similar to the PHP function uniqid(). Any help ?
Art Planteur
  • 523
  • 2
  • 8
  • 18
0
votes
1 answer

How to combine two equivalence plots (lattice) in R?

I would like to add two equivalence plots together for the following lattice graphics. My usual trick for the plot() function par(mfcol=c(1,2)) does not work with these lattice-based graphs. I have looked at the related posts, although I cannot…
Borealis
  • 8,044
  • 17
  • 64
  • 112
-1
votes
1 answer

How to translate from EQUIVALENCE to index offset

I am trying to modernize a Fortran 77 codebase which makes heavy use of common blocks in include files. One of my goals is to translate the codebase so it uses modules instead of this common/include construction. However, the code also uses…
D. de Vries
  • 417
  • 3
  • 12
-1
votes
1 answer

Logical Equivalence: Show that R OR P implies R OR Q is equivalent to NOT R implies (P implies Q)?

I'm practicing logical equivalence and I've come across a question that I'm struggling to answer: Show that (R or P -> R or Q) is equivalent to (not R -> (P -> Q)). I've examined the truth tables of both implications but the question states that I…
-1
votes
1 answer

I get error when i try to $_GET for VALUES

this is the code ia m trying to make work but apparently this is not a viable lining of code: $sql = "INSERT INTO users (name, pass) VALUES ('$_GET['user'], '$_GET['pword']')"; error i get: errorError: INSERT INTO users (name, pass) VALUES ('test',…
-1
votes
2 answers

How does the Logical Equivalence Distributive Law make sense?

I understand that a truth table can prove the Distributive Law as a Logical Equivalence: p V (q ^ r) <=> (p V q) ^ (p V r) However, this makes no intuitive sense to me. Here is the contradiction I see: if p and q are both true, then wouldn't that…
Tyabetus
  • 1
  • 1
-1
votes
2 answers

Equivalence relational algebra and turing language

I'm starting a project where I want to try to recognize relational algebra's in java-like programming language. For example, given two relations: AmericanActor(Name) EuropianActor(Name) The following expression in RA: AmericanActor U…
KeyboardDrummer
  • 577
  • 5
  • 21
-1
votes
1 answer

Consistently multiply the answer with a given constant, check for equivalence, and create bar graph

I am pulling values from a text file that has two columns. The text file looks exactly as shown below, where the first number in every row is the "time" value, and the second number is just a "number" 0,311.235 1,0 2,5316.36 3,-4086.90 …
Master
  • 59
  • 1
  • 2
  • 10
-1
votes
1 answer

vectored input port driving output port of single bit net

Why are these two codes not equivalent? I am checking the logical equivalence between the two, they are failing, what could be the error? Will it take it as width mismatch, or net driven by multiple drivers? I am using cadence LEC for formal…
-1
votes
1 answer

C++'s equivalent of Matlab's randsample

Is there any cpp's equivalent of the randsample in Matlab. The function randsample in Matlab is as follows: y = randsample(n,k,true,w) which returns a weighted sample taken with replacement, using a vector of positive weights w, whose length is n.…
Kelvin Tan
  • 982
  • 1
  • 12
  • 33
-1
votes
2 answers

How to solve Logical Equivalence

okay I have an equivalence that I have to prove. these equivalences use biconditionals and boolean algebra. but I'm not sure which order I apply the laws of logical equivalence. EDIT: It is an assignment. I've been stuck on it for days getting…
andrew Patterson
  • 559
  • 2
  • 6
  • 19
1 2 3
11
12