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
-1
votes
5 answers
Good Free Java XPath Evaluator source - JXPath perhaps?
Is there a good free XPath evaluator source code available?
We have a tree style data structure which is not too dissimilar to XML. However, it would be great to include something similar to an XPath evaluator (lightweight) to navigate through the…

Andez
- 5,588
- 20
- 75
- 116
-1
votes
1 answer
What is the c++ standard ( non-windows) equivalent of Fuction SetFilePointer()
I have a function using SetFilePointer()
HANDLE In;
SetFilePointer(In, 3, NULL, 0);
I want to adapt this function for non-windows platforms taking a Pointer to FILE (FILE*) as argument .
What function Set_File_Pointer_SomeHow() does the same as…

user3443063
- 1,455
- 4
- 23
- 37
-1
votes
1 answer
What is the code-behind equivalence of XAML ?
Can I add WPF items programmatically without any manual interference with XAML? Please give me a hand.

makelot
- 19
- 4
-1
votes
1 answer
unfamiliar Java syntax '(new MyClass.1())'
Some code I'm maintaining uses unfamiliar syntax. I haven't been able to find examples of this syntax in the Java docs.
public static void main(String[] args){
...
javax.swing.SwingUtilities.invokeLater(new MyClass.1());
…

KevinP
- 35
- 8
-1
votes
1 answer
Why compute the sign and multiply again by the absolute value?
While looking into some MATLAB code, I found this (simplified version)
is = 1.414 % just any floating point value
tol=1.e-4
s=sign(is); if(s==0), s=1; end;
is=s*abs(is)*tol/eps
But it doesn't make sense to me. What is the difference with the code…

Heungson
- 61
- 5
-1
votes
1 answer
-1
votes
1 answer
Any C++/C equivalent function with sparse in MATLAB
I tried to port m code to c or cpp.
In my code there is a line
A = sparse(I,J,IA,nR,nC);
which converts row index I, col index J, and data IA to sparse matrix A with size nR x nC.
Is there any equivalent code with C++ or C?
An naïve algorithm to…

Dohyun
- 642
- 4
- 15
-1
votes
1 answer
Why are these equivalent functions producing a different result?
This is the original method, my intent was to abstract away many of the specifics of the code, to improve readability, by placing the specifics in functions which performed the same action, but with a more readable name.
With this first method I…

kschmit90
- 378
- 2
- 3
- 13
-1
votes
2 answers
dustjs xpath parent equivalent
I'm trying to do something pretty simple: I'd like to show the NBA teams by conference, but that isn't the structure of the JSON.
I don't want to ask for a REST service structure change, i.e., make teams a child array of conference node.
This is…

Tom McDonald
- 1,532
- 2
- 18
- 37
-1
votes
1 answer
Google Script equivalent of Excel VBA Refedit
I'm trying to replicate some Excel VBA in Google Script. I want to prompt the user to input a range from a Google Spreadsheet. Is there a script equivalent to refedit? I need them to input three ranges so I can't just use the currently selected…
-1
votes
1 answer
bcdiv equivalent in javascript
Is there a "simple" js version of php's bcdiv? Because this isn't working as expected:
var x = 11,
y = Math.round(x / 7) + " + " + x % 7)
The expected result is 1 + 4, while the result i get is 2 + 4 (because 11 / 7 = 1,5 which becomes 2 after…
user2368182
-1
votes
1 answer
What's the ereg() equivalent
What's the PHP ereg() equivalent in Visual Basic .NET?
I'm trying to translate this tripcode encoder from PHP to VB.NET
function tripcode($name)
{
if(ereg("(#|!)(.*)", $name, $matches))
{
$cap = $matches[2];
$cap =…

Jeff Reed
- 231
- 1
- 6
- 23
-2
votes
2 answers
equivalent code of 'open with' in python script
import sys
sys. argv[1]
is the code equivalent of the above image. Please reply me

Sadek hossain nishat
- 51
- 1
- 6
-2
votes
1 answer
Equivalent of assigning char on c++ to c#
Does anyone know how to implement the following c++ code in c#
c++
char t = '\0';
t += (char)3;
the output of t would be equal to '\x3'
if I implement the same code in c#
char t = '\0';
t += (char)3;
the output would be different t = '\u0003'
How…

dfram
- 1
- 2
-2
votes
1 answer
While and for equivalent
please tell me if another way to show nonEquivalence of loops
for(int i = 0; i < 10; i++){
if (i % 2 == 0)
continue;
System.out.println(i);
}
//non equivalent statement. is there any like this(without…

M08ow
- 1
- 1
- 1