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
-2
votes
1 answer
Not Able To use for-loop
** I want to use two for-loops instead of two while-loops **
i = 7
while i >= 1:
j = i
while j <= 7:
print(j, end =" ")
J += 1
i -= 1
print()

Aamir
- 2,380
- 3
- 24
- 54
-2
votes
1 answer
Rewrite GoTo Statements
I've been given the task of re-writing a program that uses goto statements for the sole purpose of demonstrating how frustrating they can be and I have learned that they are indeed very frustrating. After several hours of flipping through the…

shockemc
- 85
- 1
- 10
-2
votes
1 answer
Convert Excel Array to VBA
I'm trying to convert an excel array to VBA. Any help would be appreciated:
{=IFERROR((MATCH('Surgery'!D10&'Surgery'!D11,'NCCI'!A1:A263469&'NCCI'!B1:B263469,0)),"")}
The Surgery worksheet is where the user inputs a list of codes and the NCCI…

censley
- 1
-2
votes
1 answer
Convert PHP Code Block (fsockopen, fputs, feof, fgets) into C#
I need someone to convert this php code block into equivalent C#. We are working on MT4 to register user via asp.net web application. We have been given the php version of the site to post the user information. every things is setup accordingly.…

Khalil
- 119
- 1
- 14
-2
votes
1 answer
"subscripted value is neither array nor pointer nor vector" converting Python code to C
So I had to make a vending machine. I did it first in Python and it worked like I wanted (here's the code, sorry but somethings are in Portuguese):
def cadastro(matriz_cadastro):
quant = int(input("Quantidade do produto:"))
local =…

Emibama
- 1
-2
votes
1 answer
Translate Java code to C++
i have Java decision tree code to pass in C++.
I don't remember well the logical inside pointers when i try to build the tree.
Java code:
public class Node {
Node parent;
Node children[];
List instances;
....
};
Node(Node parent,…

giuseppe trubia
- 142
- 1
- 13
-2
votes
1 answer
XCode 7: errors in converting Swift code to Swift 2
I have imported some project done in Swift 1 in Xcode 7 and now I am getting the following errors:
Any idea on how I can solve them?

mm24
- 9,280
- 12
- 75
- 170
-3
votes
1 answer
wifi code by c++ convert to android
This is a part of c++ code to connect between client and server,
I need to an android code corresponds to c++ code?
/* Create a reliable, stream socket using TCP */
if ((sock = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0)
return ("Could not…

user875264
- 55
- 2
-3
votes
1 answer
I need someone to convert web.config to .htaccess
Hello can anyone convert web.config to .htaccess ? from the code bellow ? i need someone to do this.

IceDarkness
- 19
- 3
-3
votes
1 answer
Converting C# to VB with Telerik's online convertor
I have a whole pile of C# classes that I need to convert to VB but I don't understand what some of the C is about.
Here's a typical C# class-
using…

Malcom
- 61
- 1
- 9
-3
votes
3 answers
Why do I get this exception when clicking on a cell of a datagridview in winform in C#?
I have a code in vb.net which i want to use in C#. The code is:
Dim cell As DataGridViewImageCell = CType(tempGrid.Rows(e.RowIndex).Cells(e.ColumnIndex), DataGridViewImageCell)
I am trying to get corresponding C# code:
public void…

Drone
- 181
- 8
- 22
-4
votes
1 answer
Convert MATLAB code in Python
I have this code in MATLAB and I am trying to convert it in Python.
M=zeros(1,N);
i=1;
while i<=N
ind=mod(p*(i-1)+1,N);
if ind==0
ind=N;
end
while M(ind)~=0
…

Iulia_Vascan
- 87
- 3
- 10
-5
votes
1 answer
trouble understanding list.begin() | list.end() | list::iterator i
void Graph::max_path(){
for(int i=0; i ::iterator i;
for (int a = 0; a < N ; a++){
int v =…

BLNFR
- 1
- 1
-6
votes
4 answers
Convert this VB code to C#?
I was wondering if anyone would be able to help me convert the below code to c#? From what I have read it seems to be similar however I am not sure if my 'case' statements are still able to be used?
Public Class Form1
Dim dteStart As Date
…
-6
votes
2 answers
Convert this sql command to c# linq
I am trying to convert this tSql command to linq query.
I want to group this columns.
Can you help me?
select vUnit.FK_Unit_ID , Unit.unitNumber, unit.unitTitle , title.featureTitleName
from unit.UnitFeatureValue vUnit
inner join unit.Unit on…

user3425037
- 5
- 4