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
2
votes
1 answer
How do I check two Typescript object arrays for equivalence when some objects have multiple equivalencies?
I am coding a cost function for a game. Players have a hand of n < 14 Resources of the following possible types:
Fire, Air, Water, Earth, Good, Evil, Law, Chaos, Void
These are subdivided into two Categories: Elements (Fire, Air, Water, Earth) and…

GreatDane
- 23
- 5
2
votes
1 answer
Python equivalent function of solve() in R
What equivalent function can I can in Python that is equivalent to solve() in R?
In R, if I call solve(a, b), it will return me the x as in a*x = b where a is my covariance matrix.

Jasper
- 53
- 2
2
votes
3 answers
What is C# Equivalent to C++ STL fill method
In C++, we can set a range of values of an array(and other similar containers) using fill.
For example,
fill(number, number+n,10);
The above code will set the first n values of the array number with the value 10.
What is the closest C# equivalent…

Shamim Hafiz - MSFT
- 21,454
- 43
- 116
- 176
2
votes
1 answer
AbstractPreferences equivalent in C#
Is there any class or analog for work with Base64 in c# like AbstractPreferences in java?

Sergey
- 11,548
- 24
- 76
- 113
2
votes
4 answers
Problem with equivalence of a few things while porting encryption code from java to c#
I am trying to port the below Java code to C#, but I am having some difficulty figuring out what would be the equivalent for:
SecretKey skey
SecretKeySpec skey_spec
IvParameterSpec iv_spec
KeyPair rsaKey
KeyGenerator kgen
Would appreciate if some…

Guapo
- 3,446
- 9
- 36
- 63
2
votes
3 answers
equivalent number of instruction
I've a question (just like me)...
but...if I've a choosen algorithm written in C or C++ or whatever code you want...fixed a compiler I can determine the number of instructions but these intructions are different each other: x ADD, y MUL, z MOV, f…

Marco Scappatura
- 85
- 6
2
votes
3 answers
Kotlin ternary operator
How can I convert the following code from Java to Kotlin?
Boolean mBoolean = false
view.setVisibility(mBoolean ? View.VISIBLE : View.GONE);

petrrr33
- 583
- 9
- 24
2
votes
1 answer
Equivalent option like openquery of SQL server in MySQL
Is there similar kind of option like "OpenQuery" used in SQL server in MySQL.
Actually I need to operate the database residing in another server using MYSQL Command.
If there is any option, please let me know.
Thanks in Advance

Phanindra
- 221
- 1
- 3
- 10
2
votes
3 answers
What is a equivalent of Delphi "shl" in C#?
I'm making an application in C#, based on Delphi (converting code), but I found a command that I do not recognize (shl), and i want to know if there is any equivalent to C#.
Thanks in advance.

Daas Cook
- 377
- 1
- 6
- 10
2
votes
3 answers
Javascript push_array and in_array
What is the equivalents of php functions push_array and in_array in javascript?
Arrays are simple (not multidimensional).
Haven't found something native.

James
- 42,081
- 53
- 136
- 161
2
votes
2 answers
Java equivalent of Python's "construct" library
Is there a Java equivalent of Python's "construct" library? I want to write "structs" like so:
message = Struct("message",
UBInt8("protocol"),
UBInt16("length"),
MetaField("data", lambda ctx: ctx["length"])
)
It doesn't have to…

someguy
- 7,144
- 12
- 43
- 57
2
votes
1 answer
Understanding Mathematica contour lines extraction
My Professor sent me a Mathematica Notebook, where he plots a 2d contour and then extracts the contour as lines (i.e. a list of lists of coordinate-tuples). The specific code segment looks like this:
xdiv = 0.05
zt = 1.
lis = Table[SomeFunction[x,…

Banana
- 1,149
- 7
- 24
2
votes
5 answers
Load field 1 and print at the END{} equivalent awk in Perl
I have the following AWK script that counts occurences of elements in field 1 and when finishes to read entire file, prints each element and the times of repetitions.
awk '{a[$1]++} END{ for(i in a){print i"-->"a[i]} }' file
I'm very new with perl…

Ger Cas
- 2,188
- 2
- 18
- 45
2
votes
4 answers
What's the equivalent for pred and succ in C#?
Pascal is my study language and I am curious whether C# also has the functions pred and succ.
This is what I have done in Pascal that I want to try in C#
// in Pascal:
pred(3) = 2
succ(False) = True
pred('b') = 'a'
type enum = (foo, bar,…

Marie Curie
- 125
- 1
- 2
- 8
2
votes
2 answers
What is the Delphi equivalent of C#'s PropertyGrid?
Is there a Delphi equivalent to C#'s PropertyGrid? I want to implement something similar to the Object Inspector in RAD Studio.

John Zane
- 878
- 1
- 9
- 22