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.

112 questions
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
  • 679
  • 2
  • 12
  • 27
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
  • 289
  • 2
  • 5
  • 12
3
votes
1 answer

Generating a SHA256 hash in python and javascript leads to different results

I have a problem with encrypting plaintext. What i am doing in Python: def encrypt(plaintext): import hashlib, base64 hashed = hashlib.sha256(plaintext).digest() return base64.b64encode(hashed) def main(): input_value = "a" …
mr_5p4rk_
  • 31
  • 1
  • 6
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
  • 13,777
  • 9
  • 63
  • 94
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

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,402
  • 4
  • 26
  • 42
2
votes
1 answer

Lua 5.1 dll error: equals sign expected on line 1?

I have the following code: int luaopen_Library() { return 0; } Attempting to call require "Library" throws the following error: Library.dll:1: '=' expected How can I fix this? Please let me know if more information is needed; I am new to…
NetherGranite
  • 1,542
  • 9
  • 36
2
votes
1 answer

require()ing a dll within a subdirectory in Lua

Lua's require() function, if called on a .dll, will look for a function called luaopen_. What should I do if I want to say require("folder1.folder2.library")? It's not like I can name a function luaopen_folder1.folder2.library. I…
NetherGranite
  • 1,542
  • 9
  • 36
2
votes
0 answers

How does LuaJIT wrap C data types with the FFI?

Let's say that I have the following LuaJIT code: local ffi = require "ffi" ffi.cdef[[ typedef struct { int num; } container; ]] local a = ffi.new("container") a.num = 10 library.doSomethingTo(a) and let's say that library.doSomethingTo is…
NetherGranite
  • 1,542
  • 9
  • 36
2
votes
0 answers

Running Matlab script directly from Unity3d assets

I have been banging my head against the wall with this for days now, and just can't find a solution. I have a Matlab script that I want to run from a Unity3D project's assets, but I can't make it work properly. The script itself is just fine as it…
JTDotz
  • 53
  • 6
2
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
  • 139
  • 1
  • 12
2
votes
2 answers

How to pass a variable from php to a running perl script

I have a perl script that has an endless loop that reads an integer from the user and add it to the variable $b every time; $b = 0; while ( 1 == 1 ) { $a = ; $b = $b + $a; print $b + "\n"; } I have a php form that has an…
VFX
  • 456
  • 3
  • 10
2
votes
2 answers

instantiate python class into C# using the class name as string

This SO question provides code to create an instance of a python class in C#. The following code forces to know the python function name in advance. However I need to specify the class name and the function name to be executed by…
Santi Peñate-Vera
  • 1,553
  • 3
  • 27
  • 59
2
votes
0 answers

Usability for I/O and handling of large data sets

I am trying to figure out what to use for a project (fully free & open source) that will make certain legacy data more accessible to other programmers. I'll try to not go into details, but the data sets contain large amounts of floating-point (32…
Bert Bril
  • 351
  • 3
  • 12
2
votes
1 answer

Is there a way to deserialize raw byte[] back into thrift object without knowing its thrift type?

I'm running a project that requires inter-communication between different programming languages (mostly java, c++). could serialize/deserialize into both binary format and json format. IDL to generate class code for different languages Thrift…