Skip to main content

Questions tagged [code-translation]

For questions regarding the translation of code from one programming language to another. NOTE that asking to have your code translated is not suitable for Stack Overflow.

code-translation
0 votes
0 answers
33 views

How to translate MatExpr statements(comparing a Mat with int threshold) used in OpenCV in C++ to EmguCV in C#?

i'm translating my opencv c++ routines to emgucv c# platform.i've done all but one.here it is(c++ side): Mat equalizeHistogram(Mat img,int threshold){ Mat gray,equalized; cvtColor(img,gray,...
uygur's user avatar
  • 11
1 vote
0 answers
201 views

Can I Convert PHP Code to Perl in a Semi-Automated Way?

There are some newer web technologies that seem to lack Perl libraries (for example WebAuthn). However, most of these technologies do have PHP implementations, alongside other common languages like ...
Timothy R. Butler's user avatar
0 votes
1 answer
379 views

Problems and Inaccuracies Converting + Interpreting Unity Shadergraph to C#

Context I've been trying to create a buoyancy script that samples the position of a point, tests if it's under a certain level (the "water level"), and adds a force on that position based on ...
feenix's user avatar
  • 1
0 votes
1 answer
166 views

Is the Dafny to Python code certified? If so, why does not Python have native pre-post options? If not, why translate it?

I have recently started testing with the Dafny to Python compiler dafny build --target:py A.dfy offered in its latest version. I'm not sure if it "works well", because it doesn't generate ...
Theo Deep's user avatar
  • 726
0 votes
1 answer
276 views

Cannot translate from Dafny to Python using recommended "dafny build --target:py A.dfy"

I am trying to use the Dafny-to-Python compiler that is suggested in Dafny's reference (25.7.7): http://dafny.org/dafny/DafnyRef/DafnyRef.html#2577-python However, I cannot run the first step for it ...
Theo Deep's user avatar
  • 726
3 votes
3 answers
1k views

How to switch between 2 languages with a button and not a dropdown with WPML?

It's silly to have dropdown when you have only two languages. Makes sense if there are more. I want to have just a simple button that will switch to the other language and I can't find any guide on ...
Ivailo Ivanov's user avatar
1 vote
1 answer
347 views

Node.js: How to import/require a file, run its commands and access its updated variables like in Python?

In python you can just have file1.py with a class called "class1" like this: class class1: def __init_(self, var1, var2): self.var3 = var1 self.var4 = var2 ...
j. cole's user avatar
  • 39
3 votes
1 answer
110 views

Why does passing a large dictionary from python to julia flatten contained multidimensional lists?

Okay so...I'm in the process of creating a python client for a coding game I play. This game is originally created in javascript and employs a json object of game data found at https://adventure.land/...
StormSurge95's user avatar
0 votes
2 answers
310 views

trying to convert C to Lisp

I am trying to convert this code to lisp code. But don't know how to do it is it right? for (j=i-1; j>=0 && list[j]>key; j--) { list[j+1] = list[j]; } (loop (set j (- i 1)) (setq (...
user avatar
0 votes
1 answer
568 views

Java to Solidity translator: is there a possibility to write smart contracts in Java?

Is there a tool out there that can automatically convert Java to Solidity? And can we convert Java file to Solidity? I found that there exists Jthereum that is in its beta version now. Is there a ...
coding's user avatar
  • 647
0 votes
0 answers
113 views

Calculating euclidean distance in a matrix

I am trying to calculate the euclidean distance in a matrix in C, I saw a similar post and tried it on my own matrix but as it is different I do not know how to make it work. This is my code: #include ...
Ivan Bonilla's user avatar
0 votes
1 answer
619 views

Translate back to english before sending the search parameter using weglot

I am using Weglot in my single-page application (Angular). The following code adds a language switcher in my application on all pages. <script type="text/javascript" src="https://cdn....
Ankur Arora's user avatar
-3 votes
1 answer
6k views

is there any way to convert this python code into php [closed]

what i need to accomplish is to reach a way in which i can convert the basics on any python code into php functions and conditions and so on def BitmapHoles(strArr): bitmap = {} for i in ...
ibrahim khalaf's user avatar
-2 votes
1 answer
588 views

Converting Visual Basic 6 source code into Java [closed]

I have a task to do code-translation of some parts of the application that is written in VB6 into Java. Now, I have two problems, first is that I have never done such a thing, so I'm inexperienced, ...
JustQuest's user avatar
  • 299
1 vote
1 answer
1k views

Converting from PyTorch to Tensorflow for Self-Attention Pooling Layer

I have found an implementation of the said layer from this paper, "Self-Attention Encoding and Pooling for Speaker Recognition", available at here via Pytorch. However, due to CUDA ...
corcodile's user avatar

15 30 50 per page
1
2 3 4 5
26