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
2
votes
2 answers

SQL Server checking for non-equivalent column/rows with grouping

I would like to process some data in SQL SERVER, do a little QA and get the 'answer' at the same time. The table represents a test and if the test did not give a 100% match, it was run in duplicate. In this table the following codes are applicable…
user918967
  • 2,049
  • 4
  • 28
  • 43
2
votes
2 answers

What is the equivalent switch to /MT (VC++) for g++ in linux (CentOS)?

My users complain that they have to install the linux thread building blocks on machines they do not own, and many hosts don't want intel thread building blocks to be installed of my end users, so I want to create a static version of my dynamic…
Gizmo
  • 1,990
  • 1
  • 24
  • 50
2
votes
1 answer

__VA_ARGS__ runtime equivalent?

I'm trying to make a function similar to this: #define printf_copy(s, ...) printf(s, ##__VA_ARGS__) // acceptable! but that's a preprocessor, I need one for runtime, like this: + (NSString *)format:(NSString *)first, ... { return [NSString…
user1411443
2
votes
1 answer

Equivalent to Eclipse Classpath Container in Intellij IDEA

I've written an Eclipse plug-in that provides a classpath container (just for the sake of completeness - the CPC gets its knowledge from the local development server). Now I was asked to provide the same functionallity for IntelliJ IDEA. So does…
Udo
  • 2,300
  • 1
  • 23
  • 27
2
votes
1 answer

openssl equivalent for AES256EncryptWithKey method

How to get the same result as the following objective-c encrypting method with the command line openssl ? - (NSData *)AES256EncryptWithKey:(NSString *)key { NSData *returnData = nil; char keyPtr[kCCKeySizeAES256+1]; bzero(keyPtr,…
DevonDahon
  • 7,460
  • 6
  • 69
  • 114
2
votes
1 answer

Is there a ruby equivalent to Java's "next[type]" scanner? Specifically, one that stops looking after the first instance of that type?

I am trying to reprogram a Java program that I made into Ruby, to help me learn the language. However, I'm having a lot of trouble finding a way to code this particular section of Java code in Ruby: /* read the data from the input file and store the…
1
vote
1 answer

BufferedImage.getRGB C# Equivalent?

Hi I'm trying to convert an application in Java from C# and this is the only problem I am having .. : Sidenote: That Bitmap class is a class I have made. Java Code: for (int x = 0; x < xTiles; x++) { for (int y = 0; y < yTiles;…
1
vote
1 answer

java equivalent of .net FileStream

I have a small .Net library that I would like to port to java. Part of the requirement for this library is that it should serialize state into a file on disk and this file should remain "open" so other instances of the library cannot access this…
soren.enemaerke
  • 4,770
  • 5
  • 53
  • 80
1
vote
1 answer

What is the INKEY$ equivalent in C programming language

I am a beginner in C programming language but I have knowledge of programming in QBasic. I make lots of small programs in Qbasic to solve my basic tasks and I am recently rewriting those programs into C . While rewriting one of the programs I…
pranphy
  • 1,787
  • 4
  • 16
  • 22
1
vote
1 answer

C# equivalent of the C++ GDI code

Can somebody please help me to translate the following to the C# equivalent. mapPicture is a picture object in GDI code however it is a panel in C#. I have done the code as follows, Original MFC code, CDC *dc = mapPicture.GetDC(); CRect…
nixgadget
  • 6,983
  • 16
  • 70
  • 103
1
vote
0 answers

How to feed file data to an exe (executable) file in powershell

I had compiled a cpp (c++) file, which generated an executable (a.exe file) in Windows. In Linux, a.out file would be generated. I want to run the executable but I do not want to manually enter the inputs that the executable needs. Hence, I aim…
1
vote
1 answer

Python equivalent to R's layout() for arbitrary grids

What's Python's equivalent to R's layout() function which can create a plotting grid of any shape? Consider the following 3 figures made by layout(): set.seed(123) layout(t(matrix(c( 1, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6, 7 ), ncol = 2)), widths =…
user2961927
  • 1,290
  • 1
  • 14
  • 22
1
vote
1 answer

Equivalence between shift() function (Python) and lead() function (R)

General Question on understanding the SHIFT function in Python: I am starting with this sample dataset: start = structure(list(id = c(111L, 111L, 111L, 111L, 222L, 222L, 222L ), year = c(2010L, 2011L, 2012L, 2013L, 2018L, 2019L, 2020L), col2 =…
1
vote
2 answers

How to rewrite dropWhile in java 8?

As you know, dropWhile for streams was introduced in java 9. But if the target of the project is java 8, you can't use it. Example code: public static String getParameterValueOrDefault(String[] args, String paramName, String defaultVal) { return…
PatoOta
  • 11
  • 3
1
vote
3 answers

Python equivalent of lua bit32.bxor

I am trying to "convert" a lua script into a python script, but the lua script seems to have a library named bit32, and of which it uses the bxor function. Is there any python equivalent of the bit32.bxor function? I have searched multiple times on…
River
  • 47
  • 7