cross-platform

How can I create a portable perl when I can't install modules on the target host?

陌路散爱 提交于 2019-12-29 04:19:48
问题 I need to run Perl applications I develop on cygwin Windows on HP unix / Solaris hosts. I am not a superuser on the unix machines and I can't touch the default Perl module location nor can I install modules to the default Perl module location. Also the unix installation lacks most basic modules and I can't change that. For example, I have a Perl application that needs Expect which has native C compiled parts to it. How would I roll out this application to unix with its required dependencies

Developing for iOS device in Windows environment with Flutter

╄→гoц情女王★ 提交于 2019-12-28 05:14:26
问题 I'm new to Flutter, was just wondering if it's possible. I've tried building the demo code using intellij with given instruction (https://flutter.io/setup/). It runs well on android device, but can't find the option to compile and run on my iOS device. 回答1: You can do your main development on Linux or Windows with Android Studio or Visual Studio Code. Then use git to move the code to macOS to test it with Xcode on an iOS simulator/device and deploy it to the App Store. You could do all

How can I call .NET code from Java?

只愿长相守 提交于 2019-12-28 01:02:40
问题 I'm not looking for the usual answer like Web-services. I'm looking for a light solution to be run in the same machine. Edit: I'm looking for way in Java to call .NET methods 回答1: I believe Java can talk to COM and .NET can expose COM interfaces. So that may be a very light weight solution that doesn't require any 3rd party. There is also the option of using sockets to communicate between the programs which wouldn't require a heavy instance of IIS to be installed on the machine. 回答2: I am

Windows: how to get a list of all visible windows?

匆匆过客 提交于 2019-12-27 17:01:12
问题 (by all mean do re-tag with the relevant technology: I don't know which ones they are :) I'll probably come later with more detailed questions, about specific details but for now I'm trying to grasp the "big picture": I'm looking for a way to enumerate "real visible windows" on Windows. By "real visible window" I mean just that: what a user would call a "window". I need a way to get a list of all these visible windows, in Z-order. Note that I do really need to do that. I've already done it on

Is there a Linux equivalent of Windows' “resource files”?

北城余情 提交于 2019-12-27 17:00:50
问题 I have a C library, which I build as a shared object for Linux and a DLL for Windows with MinGW32. The API depends on a couple of data files (statistical models) which I'd really like to roll in with the SO/DLL so that deployment is just one file. It looks like I can achieve this for Windows with a "resource file" compiled with windres , but then I've got to write a bunch of resource-handling code for Windows, and I'm still stuck with the files on Linux. Is there a way to achieve the same

Windows: how to get a list of all visible windows?

允我心安 提交于 2019-12-27 17:00:31
问题 (by all mean do re-tag with the relevant technology: I don't know which ones they are :) I'll probably come later with more detailed questions, about specific details but for now I'm trying to grasp the "big picture": I'm looking for a way to enumerate "real visible windows" on Windows. By "real visible window" I mean just that: what a user would call a "window". I need a way to get a list of all these visible windows, in Z-order. Note that I do really need to do that. I've already done it on

Python: Platform independent way to modify PATH environment variable

女生的网名这么多〃 提交于 2019-12-27 16:44:47
问题 Is there a way to modify the PATH environment variable in a platform independent way using python? Something similar to os.path.join() ? 回答1: You should be able to modify os.environ . Since os.pathsep is the character to separate different paths, you should use this to append each new path: os.environ["PATH"] += os.pathsep + path or, if there are several paths to add in a list: os.environ["PATH"] += os.pathsep + os.pathsep.join(pathlist) As you mentioned, os.path.join can also be used for

Shutting down a computer

元气小坏坏 提交于 2019-12-27 11:53:29
问题 Is there a way to shutdown a computer using a built-in Java method? 回答1: Create your own function to execute an OS command through the command line? For the sake of an example. But know where and why you'd want to use this as others note. public static void main(String arg[]) throws IOException{ Runtime runtime = Runtime.getRuntime(); Process proc = runtime.exec("shutdown -s -t 0"); System.exit(0); } 回答2: Here's another example that could work cross-platform: public static void shutdown()

C printf cross-platform format without warnings [duplicate]

半世苍凉 提交于 2019-12-26 07:18:09
问题 This question already has answers here : Platform independent size_t Format specifiers in c? (3 answers) Closed 2 years ago . How do you write code to compile cross-platform without warnings. For example, I don't get warnings on x64 platform, but I do on ARM (raspberry PI): warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘size_t {aka unsigned int} Needless to say I don't want to disable warnings. More examples and scenarios: warning: format ‘%lu’

Create a Static Library on Windows Which Is macOS and Linux Compatible

时光毁灭记忆、已成空白 提交于 2019-12-25 18:24:39
问题 I would like to generate a Static Library file in Windows using MSVC / IXX which is macOS and Linux compatible. I'm using C (Let's say C99 ) and the functions are really simple. For example: void AddArray(float* mA, float* mB, float* mC, int numElements){ int ii; for(ii = 0; ii < numElements; ii++){ mC[ii] = mA[ii] + mB[ii]; } } Is there a way to build the Library only once on Windows and use it everywhere? If not on windows, could it be done on Linux and work on Windows and macOS? The idea