Questions tagged [cross-language]

In programming, "cross-language" or "multi-language" refers to features that operate across multiple programming languages.

In programming, "cross-language" or "multi-language" refers to features that operate across multiple programming languages.

Cross-language features include type systems, data formats, storage layouts, etc. which are common across multiple languages. They help applications or services written in different languages to inter-operate and exchange information.

132 questions
4
votes
1 answer

Integration of Java and Python 3.x Code in One Project

I am writing my project using python 3.x. I've come to a stage where I needed to write some code in Java.Is there anyway to integrate Python 3.x and Java? I am acknowledged about Jython.But it does not support Python 3.x as i know. Thanks in…
Mahir Mahbub
  • 126
  • 1
  • 11
4
votes
4 answers

Allowing a method to lock its parent Object in Java

Is there a way in Java to get a method to lock (mutex) the object which it is in? I know this sounds confusing but basically I wan't an equivelent to this snippet of C# but in Java. lock(this) { // Some code here... } I've been tasked with…
Omar Kooheji
  • 54,530
  • 68
  • 182
  • 238
4
votes
3 answers

Importing module from string in the Python C API

Importing Python modules from files is relatively easy with the Python C API with PyImport_Import() however I would need to use functions stored in strings. Is there a way to import python modules from strings (to clarify: there is no file; the code…
Hullu2000
  • 261
  • 4
  • 19
4
votes
1 answer

How to build a C dependency of go project in a subdirectory

I am writing a Go wrapper for a C library in Go. The problem is, that the C library is not available on many Linux distributions, so I want a solution where i "go get github.com/me/mylibrary" does not require anybody to have the library…
Arne
  • 7,921
  • 9
  • 48
  • 66
4
votes
4 answers

What is a Cobol 88-type equivalent in another languages?

I'm learning COBOL now and really liking the 88-type of variables, and I want to know if there are anything like them in another languages (most known languages also, such as C, Objective-C), even using a library. The only thing I can think being…
GBF_Gabriel
  • 2,636
  • 2
  • 17
  • 15
4
votes
3 answers

Keeping the same logic implemented in C# and JS in sync

There is a need to have a calculator for our invoices which will be used both in the web UI and in the back-end. This requires two implementations of the same logic in Javascript and C# and the real problem is to keep these two logics in sync when…
Mehrad Sadegh
  • 1,104
  • 10
  • 25
3
votes
2 answers

How to use internal c++ class types from C?

I have a C++ class MyClass that declare a public enum type MyEnum, and I want to use that enum in a C file. How can I do that ? I tried to declare my functions in a C++ file and then put everything as extern "C", but sadly I am using some functions…
4nti7rust
  • 116
  • 10
3
votes
1 answer

mmap a same file in both C and Python, will it really use the shared memory? will mmap work across different programming languages?

By doing the reading from C code and writing from python, I couldn't see in my C the changes that i am doing in python. Hence I would really like to know whether mmap work across language like C and Python or am I doing mistakes here, Please let me…
viki
  • 33
  • 1
  • 4
3
votes
1 answer

Array of handles is not allowed C++

I'm having a issue translating a array of String^ that I'm receiving from a C# application. Why can I not create an array of String^? I'm fairly new to C++ so any help is appreciated. public ref class Example { public: …
Moh
  • 149
  • 2
  • 12
3
votes
6 answers

installing fonts in client machine

I'm building a website(PHP) with chinese fonts. The problem is most browsers doesn't have chinese fonts installed by default. I want the client machine to have this font installed to view the webpage. How can I do this? Edit: I've partially solved…
jest
  • 699
  • 2
  • 12
  • 28
3
votes
2 answers

Importing Java class into a python project

I've been trying to find a method to importing Java-ml into my python project. I have the jar file in the same path as my project. I want to use it for kmeans clustering, since it allows me to change the distance metric. I am wondering though…
benj rei
  • 329
  • 2
  • 5
  • 12
3
votes
1 answer

Syntax for Calling a variable-length parameter Scala function from Java?

I have a Scala class whose constructor takes a variable-length parameter list. case class ItemChain(items: Item*) From Scala it can be called like so ItemChain(Item(), Item()) I can't figure out the syntax for calling it from Java. If I do…
W.P. McNeill
  • 16,336
  • 12
  • 75
  • 111
3
votes
4 answers

How to deal with forward declaration / #import in Cocoa Touch (Objective-C cross C++) correctly?

I am trying to write this header file: //@class AQPlayer; //#import "AQPlayer.h" @interface AQ_PWN_iPhoneViewController : UIViewController { AQPlayer* player; } @end AQPlayer is a .mm file written in C++. I tried to make a class forward…
unknownthreat
2
votes
1 answer

protobuf-net or protocol buffer services from c# to python and other lang

I have been looking at protobuf-net recently and protocol buffers and so far it seems quite impressive. What i am wondering about is the service side of things. If i have understood the google documentation right you can declare services in the…
2
votes
1 answer

How to convert unserialize php object in .NET C#

I recently got a project which require communication between php and .Net websites. The developer form php didnt provide much doc about their code, only a client site library and a small piece of sample code. // initialize the form parameters from…
D.J
  • 2,534
  • 4
  • 28
  • 43
1 2
3
8 9