Questions tagged [equivalent]

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.

369 questions
7
votes
4 answers

Data structures equivalents of STL containers

I study data structures and I want to ask what are the equivalents of STL containers. for example vector = dynamic array queue = queue stack = stack priority_queue = heap list = linked list set = tree slist = single linked list bit_vector = vector…
demosthenes
  • 1,151
  • 1
  • 13
  • 17
6
votes
4 answers

String.Format (.NET) equivalent in Java?

The String.Format in .NET (maybe just VB.NET) convert {0}, {1}, ... into determined String, for example: Dim St As String = "Test: {0}, {1}" Console.WriteLine(String.Format(St, "Text1", "Text2")) I've tried to search in both Google and…
Luke Vo
  • 17,859
  • 21
  • 105
  • 181
6
votes
4 answers

What is the jQuery equivalent of the Prototype function .activate()

Prototype's activate function Gives focus to a form control and selects its contents if it is a text input according to the Prototype website. i.e. $('my_element_id').activate(); What is the equivalent function in jQuery?
Mike Webb
  • 8,855
  • 18
  • 78
  • 111
6
votes
2 answers

PHP developer looking for solutions equivalent to Java EE architecture

I am a PHP developer, I read about Java EE technologies and I want to implement such technologies( n-tier, EJB, JPA...) with PHP and all what coming with (MySQL, Apache...).
Amirouche Douda
  • 1,564
  • 1
  • 21
  • 30
6
votes
2 answers

C# Equivalent for VB 'module'

In Visual Basic, you can use a module as a place to store 'loose' code which can be methods and variables that are accessible from elsewhere in the application without having to first initialize something, and the variable states can be set or…
Kraang Prime
  • 9,981
  • 10
  • 58
  • 124
6
votes
3 answers

What is the equivalent of jQuery's .before() function in Javascript?

What is the equivalent of .before() in Javascript?
Akos
  • 1,997
  • 6
  • 27
  • 40
5
votes
1 answer

php sed like functionality

I am quite familiar with sed on bash shell, so I do cat $myfile | egrep $pattern | sed -e 's/$pattern/$replace/g' a lot. Quite a few times, I find that I need to do similar kind of "string parsing" inside PHP. So my question is simple, what is…
wadkar
  • 960
  • 2
  • 15
  • 29
5
votes
2 answers

Is there any #IF and #CONST .NET equivalent in Java/Android?

I have a project in which there are many codes only available in determined version, and when I fix a bug I have to fix them in all copies. It's very inconvenient. Is there any #IF and #CONST in Java, that if the #IF clause is false, the code won't…
AndBie
  • 95
  • 4
5
votes
2 answers

C# equivalent of Julia's map!() method

I'm trying to find C#'s equivalent of Julia's map!() method, which is of void return type and takes a function, a destination and a collection on which the function acts. The best thing that I could find is C#'s Enumerable.Select(), which takes the…
5
votes
4 answers

What is the kubectl equivalent commands to "minikube service "?

I have executed minikube service mynginx1 and the result is: |-----------|----------|-------------|-----------------------------| | NAMESPACE | NAME | TARGET PORT | URL | …
Godfrey Tan
  • 79
  • 1
  • 6
5
votes
1 answer

Windows batch equivalent of hexdump -ve '1/1 "%.2x"'

I need to get the hexa value of a file i have. On linux, this was Simply done with : hexdump -ve '1/1 "%.2x"' Filename However, on Windows, i couldn't found a good equivalent for hexdump. I'm using MinGW64, so basically i was looking for a…
Ablia
  • 191
  • 2
  • 10
5
votes
2 answers

What's the equivalent of AndAlso (&&) and OrElse (||) logical operators in Python?

In .NET VB and C#, we can use AndAlso (&&), OrElse (||) for logical operations How about in Python, what is the equivalent logical operators? are they only limited to 'and' and 'or'? Updated: Below is the difference between And/Or and…
Dennis
  • 3,528
  • 4
  • 28
  • 40
5
votes
4 answers

Is foldRight equivalent to foldLeft given a noncommutative associative operation?

In a online course it was stated that foldLeft and foldRight are equivalent for operators that are associative and commutative. One of the students is adamant that such operators only need to be associative. So this property should be true for…
Anthony Accioly
  • 21,918
  • 9
  • 70
  • 118
5
votes
2 answers

Swift equivalent of Ruby's "each_cons"

Ruby Ruby has each_cons that can be used like this class Pair def initialize(left, right) @left = left @right = right end end votes = ["a", "b", "c", "d"] pairs = votes.each_cons(2).map { |vote| Pair.new(*vote) } p pairs #…
neoneye
  • 50,398
  • 25
  • 166
  • 151
5
votes
3 answers

mysql FIND_IN_SET equivalent to postgresql

select * from folder f,uploads u where u.id=f.folderId and FIND_IN_SET('8', '15,9,13,27') Please tell to me equivalent to predefind or userdefined postgresql function
selva
  • 91
  • 1
  • 2
  • 7