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.
Questions tagged [code-conversion]
272 questions
1
vote
1 answer
How to use .c file in Visual Basic project?
I need to convert C code to Visual Basic.
I have .c and .h files.
Are there some ways to use my .c file in Visual Basic Application? Application was created in Visual Basic 6.0.
Now I see only one way: convert the code manually. But it takes a lot…

Mikhail_Sam
- 10,602
- 11
- 66
- 102
1
vote
1 answer
Rewriting Ruby Class to PHP Class
I am trying to convert some classes from Ruby to PHP for a project I am working on. I think I almost have it, but I am unversed in Ruby so I am struggling with understanding some aspects and what the equivalencies would be in PHP.
So the Ruby class…

W3bGuy
- 735
- 7
- 20
1
vote
2 answers
Converting a Joomla module to view in existing component
We have a custom Joomla! component we developed to display various types of reports to our clients. In the Admin back-end, you would configure a service and a report within said Component. We then add a custom module tailored for each client which…

AmaliaKalio
- 66
- 7
1
vote
1 answer
translating code from Java to C#/ASP.NET
I want to test this code found here. It allows me to auto-load content from server as the user scrolls down the scroll down.
I am having difficulties trying to convert code to C#/ASP.NET. Primarily, I want this code to be translated to…

Eyad
- 13,440
- 6
- 26
- 43
1
vote
0 answers
Converting Ruby code to C++ not generating correct output
Since I have been searching for the best algo for maze generation in c++. I could found its implementation in Ruby from the link
Here is the code in Raw form
# --------------------------------------------------------------------
# An implementation…

CodeGenius
- 514
- 1
- 6
- 21
1
vote
0 answers
C# Regex error Quantifier {x,y} following nothing
I wrote a small program that converts English text into a Pig Latin in Visual Basic. I am currently converting it into C# language. And during the conversion process, I am stumbling upon a regex-related error.
The rules I am working with…

Vadzim Savenok
- 930
- 3
- 14
- 37
1
vote
1 answer
Convert Templates from Delphi 7 to Delphi 10 Seatle
My company migrated from Delphi 7 to Delphi XE3 last year, and finally to Delphi 10 Seattle this year, one of the changes that affected me the most was loosing my old code templates, is there a way to convert the old template system from Delphi 7 to…

Thiago Perotto Zocoli
- 99
- 1
- 5
1
vote
1 answer
Converting custom message authentication code from Java to JavaScript
This is the java code. I am trying to replicate the same functionality in javascript.
public String populateHMAC(String app_id, String mobile, String token,
String deviceId) {
String hmac = null;
try {
…

Swaminathan Iyer
- 13
- 2
1
vote
1 answer
Converting iterated calculation to iterator -- what's this called?
This must be a common code conversion, so I am surprised that I cannot easily find what it is called nor info on how best to do it.
Original code (pseudo):
sub generate_array {
for(i=0,n=0;i

Jeff Y
- 2,437
- 1
- 11
- 18
1
vote
1 answer
How to convert MQL4 code into C ++ / Delphi DLL (Forex Tester API)?
I need to create an automatic code converterfrom MQL4 API ( a C-like language )into Forex Tester API ( C++ / Delphi DLL ).
There are suggestions that it can be done with the help of ANTLR and MMVP. However, I do not know how it can be done with the…

Justinserg
- 21
- 1
- 7
1
vote
2 answers
Converting an ASP function to PHP
I'm in the process of moving a recording studio website from a windows based server to a linux one. It's all html and php except one page that uses an ASP function to update new releases.
I've been trying to convert it myself using "echo", but I…

brunogermain
- 51
- 1
- 6
1
vote
3 answers
How to convert PHP ternary expression to if-else?
I've following snippet of code that is written using conditional operator :
$iPage=($this->request()->get('search') ? $this->request()->getInt('req4') : ($this->request()->getInt('req3') ? $this->request()->getInt('req3') : 1 ));
I converted this…
user4661379
1
vote
1 answer
Logic Error while converting VB.Net Code to C#
I have this VB.Net Code:
Dim t as String = "111100111000011110111110010111101001100001100011101000001010011100110110100110100000101001110010011001101"
Dim i as Integer
If (t.Length Mod 8) <> 0 Then
For i = 1 To 8 - (t.Length Mod 8)
t =…

Alaa Masalmeh
- 57
- 1
- 9
1
vote
0 answers
Blackbaud Single Sign On PHP to ColdFusion Conversion - did I get it right?
I'm attempting to implement a Single Sign On (SSO) using the Blackbaud documentation they sent to me. My client is on ColdFusion but Blackbaud's examples are all in PHP or C+. PHP is more readable (by me) so I opted to convert this code:

HPWD
- 2,232
- 4
- 31
- 61
1
vote
1 answer
How to convert a vb.Net 4.0 project to C# 4.0 project?
I looked into:
http://www.developerfusion.com/tools/convert/vb-to-csharp/
as well as:
http://www.icsharpcode.net/opensource/sd/
but neither does exactly what I want.
EDIT:
The first link translates only the source code (.vb) and does a good job at…

Hamish Grubijan
- 10,562
- 23
- 99
- 147