384 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
61
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,...
0
votes
1
answer
463
views
Make Unity Shadergraph output match converted C# output
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 ...
0
votes
1
answer
291
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 ...
0
votes
1
answer
439
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 ...
1
vote
1
answer
373
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
...
3
votes
1
answer
127
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/...
0
votes
2
answers
456
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
user18780639
0
votes
1
answer
747
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 ...
0
votes
0
answers
118
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 ...
-2
votes
1
answer
7k
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 ...
-2
votes
1
answer
690
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, ...
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 ...
1
vote
1
answer
151
views
Count runs lazily in Python translate from Haskell
I'm trying to write a generator function (or achieve the equivalent) which takes an iterable xs in Python and counts the "runs". (This is a problem in Thinking Functionally with Haskell by ...
1
vote
0
answers
140
views
Do-expression expansion in Haskell [duplicate]
I have a fragment of code from the Get Programming with Haskell book which looks as follows:
listToSTUArray :: [Int] -> ST s (STUArray s Int Int)
listToSTUArray vals = do
let end = length vals ...
2
votes
1
answer
840
views
How can I use data.table in a package without importing all functions?
I'm building an R package in which I would like to use dtplyr to perform various bits of data manipulation. My issue is that dtplyr seems to only work if I import the whole of data.table (i.e. using ...