This tag is used for questions about similarities between any of various programming constructs. Comparisons include correspondences between API, functionality, syntax, features, methodologies and the like.
Questions tagged [equivalent]
369 questions
0
votes
1 answer
DustJS xpath next sibling axis equivalent
How do I use parameters in DustJS? I made a jsfiddle where I want to print key value pairs where the key = [parameter].
In the fiddle I just want to display Larry, Moe and Curly's weight (not their height).
In XSLT this is easy. Just use Xpath…

Tom McDonald
- 1,532
- 2
- 18
- 37
0
votes
4 answers
Is FROM x JOIN y ON x.a = y.b equivalent to FROM x,y WHERE x.a=y.b?
I noticed on some test data that queries of the form
SELECT *
FROM a
JOIN b ON a.x = b.y
WHERE [more conditions...];
were returning the same data as queries of the form
SELECT *
FROM a,b
WHERE a.x = b.y
AND [more conditions...];
Intuitively they…

vowel-house-might
- 1,686
- 14
- 18
0
votes
2 answers
How do I assert that two arbitrary type objects are equivalent, without requiring them to be equal?
To accomplish this (but failing to do so) I'm reflecting over properties of an expected and actual object and making sure their values are equal. This works as expected as long as their properties are single objects, i.e. not lists, arrays,…

Tomas Aschan
- 58,548
- 56
- 243
- 402
0
votes
1 answer
If Result of For Loop is Equivalent Python
I have a for loop which is pulling AWS snapshots, which then puts the snapshot in a dict.
for snapshot in current_snapshots:
dict1 = {snapshotYear:{snapshotMonth:{snapshotDay:[[snapshot]]}}}
print dict1
This correctly prints out
{"2014": {"7":…

user3822146
- 114
- 3
- 10
0
votes
1 answer
How do I compare two bit vectors for equivalence?
What's the most efficient way to compare two bit vectors? In Objective-C, I'm using CFBitVectors and simply comparing each bit in both:
for (CFIndex bitIndex = 0; bitIndex < numBits; bitIndex++) {
if (CFBitVectorGetBitAtIndex(thisVector,…

theory
- 9,178
- 10
- 59
- 129
0
votes
2 answers
Treat two variables equally in a switch statement
I have two variables and i want to run the through the same switch statement with the same results
var n1 = first_number;
var n2 = second_number;
switch(for n1 and n2 at the same time){
case "if n1 or n2 depending on which is being tested =…
user3460121
0
votes
1 answer
android equivalent of graphics
Im trying to convert a java program to an android program. So the question is: What is the equivalent of graphics type variable on android. For example "protected Graphics entryGraphics;"

DreiDreiDrei
- 41
- 8
0
votes
1 answer
Android equivalents to [event allTouches] and event.timestamp?
I was wondering, does anyone know what are the Android equivalents to [event allTouches] and event.timestamp found in iOS? I am working on a multi-touch gesture recognizer for Android, and would like to know what are Android's equivalents to those…

Pink Jazz
- 784
- 4
- 13
- 34
0
votes
1 answer
Androids' BaseAdapter equivalent in Windows Store apps
I have a large array of Integer items that I want to display in ListView with formatting. Normally on Android I would extend BaseAdapter (this is an example of dynamic View/Control creation):
public View getView(int position, View convertView,…

Chris Miemiec
- 755
- 1
- 9
- 19
0
votes
1 answer
What is the XAML equivalent for binding SelectedIndexProperty in .cs .net silverlight code?
I have been playing with bindings in silverlight, and have figured out how to bind in code, but would prefer to keep the binding in the XAML.
This is the code that works in my .cs file:
System.Windows.Data.Binding IDBinding = new…

Ray Delia
- 1
- 3
0
votes
1 answer
wpf #define equivalent to set a two different standard button widths ... application.resources?
How does one set a value (similar to #define) that sets two different standard button widths (MinWidth) ... perhaps using application.resources? Buttons later use one of the standards defines.

bhs67
- 29
- 4
0
votes
1 answer
How do i turn a list of numbers into its corresponding word
Let's say I had a list of numbers.
Code
25
37
46
28
37
28
(can't post pictures so imagine that in a table)
25 = Cow
37 = Sheep
46 = Pig
28 = Chicken
I need a code I can put in the box next to it and drag down so that the correct animal appears…

Nirty
- 3
- 1
0
votes
2 answers
How to convert C code to Java - Pointer equivalent in Java
I am converting some C code into Java which includes image processing. However, I am stuck in a situation where I have to convert some lines of codes which include pointer calculations:
for(i=xMin[k];i<=xMax[k];i++)
{
…

shashwat13
- 108
- 6
0
votes
1 answer
Symfony2 & Doctrine2 get one result even if more exist inDB
Is there any equivalent for the following SQL code in Doctrine2?
ORDER BY id DESC LIMIT 0,1

Gingi
- 145
- 8
0
votes
1 answer
Why are these statements equal? Stack methods in java
Why are the following statements equivalent? emptyRow and emptyCol are Integer stacks, and Grid is a two dimensional array of integers. There is no need for you to know what the program does, but in case you're wondering it's a sudoku puzzle solving…

Macalaca
- 125
- 2
- 8