Questions tagged [code-conversion]

The process of converting the logic of some source code from its original language/framework to a different language/framework. Not to be confused with porting, which deals with architectures/platforms.

249 questions
457
votes
9 answers

How to convert a Kotlin source file to a Java source file

I have a Kotlin source file, but I want to translate it to Java. How can I convert Kotlin to Java source?
activedecay
  • 8,238
  • 3
  • 40
  • 54
149
votes
5 answers

Is there an easy way to convert jquery code to javascript?

Is there an easy way to convert jQuery code to regular javascript? I guess without having to access or understand the jQuery source code.
davidsleeps
  • 8,999
  • 11
  • 57
  • 73
44
votes
6 answers

Automated Java to Scala source code conversion?

(Yes I know I can call Java code from Scala; but that is pointless; I want to DELETE the Java code, not keep it around and have to look at it and maintain it forever!) Are there any utilities out there to convert Java source to Scala source? I…
Alex R
  • 10,320
  • 12
  • 76
  • 145
20
votes
2 answers

Looking for the Code Converter which converts C# to Java

Can anybody help me by suggesting the name of an converter which converts C# code to Java code. Actually, I have a tool which is written in C# code and I am trying to modify it. As I have no idea about C# and .NET framework, it seems difficult to me…
Arpssss
  • 3,630
  • 5
  • 33
  • 75
17
votes
4 answers

How do I convert legacy ASP applications to ASP.NET?

We have a large ASP (classic ASP) application and we would like to convert it to .NET in order to work on further releases. It makes no sense continuing to use ASP as it is obsolete, and we don't want to rewrite it from scratch (Joel Spolsky tells…
Sklivvz
  • 28,698
  • 24
  • 111
  • 164
13
votes
1 answer

Do the C# and Java specifications spell out the same behavior on signed integer overflow?

In C and C++, the behavior of signed integer overflow or underflow is undefined. In Java and C# (unchecked contexts), the behavior seems to be defined to an extent. From the Java specification, we have: The integer operators do not indicate…
10
votes
4 answers

C Bit fields in C#

I need to translate a C struct to C# which uses bit fields. typedef struct foo { unsigned int bar1 : 1; unsigned int bar2 : 2; unsigned int bar3 : 3; unsigned int bar4 : 4; unsigned int bar5 : 5; unsigned int bar6 : 6; …
David
  • 101
  • 1
  • 3
8
votes
3 answers

Objective C equivalent of MessageDigest in Java?

I'm taking a task converting Java code to Objective C. This is the code in Java that I have to convert: private String getHash(String input) { String ret = null; try { MessageDigest md = MessageDigest.getInstance("SHA-256"); …
Fogni
  • 239
  • 3
  • 6
7
votes
2 answers

How can I complete this Objective-C implementation of a cartesian product function?

As a follow up to my question here, I am trying to implement the following PHP function in Objective-C, which will generate a cartesian product: function array_cartesian_product($arrays) { $result = array(); $arrays = array_values($arrays); …
barfoon
  • 25,436
  • 24
  • 88
  • 136
7
votes
3 answers

How to create a va_list on GCC?

I'm trying to convert some code so that it compiles on gcc too (right now, it compiles only on MSVC). The code I'm stuck at is in a pseudo-formatting function that accepts as input a format string and zero or more arguments (const char *format,…
frm
  • 153
  • 1
  • 6
7
votes
5 answers

How to convert source code to a xml based representation of the ast?

i wanna get a xml representation of the ast of java and c code. 3 months ago, i asked this question yet but the solutions weren't comfortable for me srcml seems to be a good solution for this problem but it does not support line numbers and columns…
autobiographer
  • 945
  • 1
  • 9
  • 8
7
votes
0 answers

Using Delphi to creating Win7 Jump list

I'm trying to create Jump list on windows 7 for my application using Delphi. I found this c++ code, but I'm not sure how to translate it to Delphi, any help? void CreateJumpList() { ICustomDestinationList *pcdl; …
Mohammed Nasman
  • 10,782
  • 7
  • 41
  • 67
6
votes
2 answers

How do you port an open source project?

I am curious as to how people port open source projects such as Lucene and Hibernate from Java to .NET? Is it a simple matter of using the Java Language Conversion Assistant 2.0 released by Microsoft?
Kane
  • 15,657
  • 11
  • 56
  • 82
6
votes
2 answers

Are there any tools for converting Managed C++ to C++/CLI?

We have an old project written using Managed C++ syntax. I would like to propose to the team a reasonably pain-free (I don't mind some level of human interaction, I think I'm realistic in my expectations that we'll still have to do some work by…
Jeff Yates
  • 58,658
  • 18
  • 135
  • 183
6
votes
4 answers

Conversion of Delphi code to Java

Does a parser exist for Delphi which can be used to convert the Delphi code into Java code automatically?
None
1
2 3
16 17