cross-platform

How to build a cross platform app

南楼画角 提交于 2019-12-13 05:07:28
问题 I want to build my very first app and "post" it on the apple/google App store... I want it to be for both iOS and Android. I do not mind learning a new programming language. Cross platform, to write one code for both platforms. Can't spend too much time learning multiple languages :p I already know JavaScript/jQuery, MySQL, PHP, HTML, CSS, etc. but that's for web, not for apps...right? Wrong? I need to get it done fast, hence cross platform. One code, two OS (Android & iOS). I'll invest the

Linux and Windows millisecond time

流过昼夜 提交于 2019-12-13 05:04:54
问题 I want to get the milliseconds time of a system (I don't care if it's the real time, I want it to be as accurate as possible). Is this a good method to do it? #ifdef WIN32 unsigned long long freq; unsigned long long get_ms_time() { LARGE_INTEGER t; QueryPerformanceCounter(&t); return t.QuadPart / freq; } #else unsigned long long get_ms_time() { struct timespec t; clock_gettime(CLOCK_MONOTONIC, &t); return t.tv_sec * 1000 + t.tv_nsec / 1000000; } #endif How can I wrap this value to a signed

Looking for a cross-platform (Linux, MacOS, Windows) tool for managing Python environments

早过忘川 提交于 2019-12-13 03:59:01
问题 I was investigating the use of Anaconda environments for CI/CD (since, to my knowledge, it is the only platform that supports Linux, MacOS, and Windows). I tried to use Miniconda which is supposed to only install the bare minimum. However, I realised that, by default, Miniconda is not "mini" after all. For example, if I attempt to create a new Python environment ( conda create -n py36 python=3.6 anaconda ), it will install a bunch of not needed stuff like JupyterLab and others. So, before

Installing python modules like “Web3” without pip/pip3?

笑着哭i 提交于 2019-12-13 03:33:01
问题 I have an armv7 embedded device. There is a yocto linux running on this device. There is no pip installed in it so i cannot install web3 using .. pip install web3 How can i install web3 or any python module without using pip? I have tried searching the recipe of web3.py but couldnt find any. Can i cross compile the web3 module? how to do that? how can build from source work for this module? what about the other dependencies required for it? I am not a full time linux or python deveopler so

What is an alternative to including sys/times.h on windows?

↘锁芯ラ 提交于 2019-12-13 02:35:35
问题 Background I am trying to compile some code on windows that has previously been compiled on QNX. According to this SO Question and this SO Question, I can resolve this issue by simply removing the include statements for sys/times.h. When I remove the includes, I get a bunch of errors saying that variables have not been defined within the scope. I assume this is because I have removed the include call. Question What is an alternative to using sys/times.h in the code so I can use it on windows?

Adobe Eve ASL: how to render eve file into gui window?

跟風遠走 提交于 2019-12-13 02:32:38
问题 So We have simple .eve and .adam files, compiled ASL, and all includes required for boost and adobe . We need a crossplatform function to make our layout rendered, and movable as real window on our platform (we need it for Mac OS X, Windows, Linux). How to do such thing? We have started trying to move in direction of simplifiing some tutorials we found in ASL folder ( begin ) and got some results you can see here. But our approach is not crossplatform or any way eazy to get=( So we ask for

Launching JRE in Linux from a FAT32 USB

时光怂恿深爱的人放手 提交于 2019-12-12 19:18:26
问题 I have a Java application installed on a USB which the user should be able to run from any OS. For this, I'm packaging a JRE instance on the USB along with my application. I'm having a FAT32 file-system on the USB. However, the problem is, FAT32 has no concept of execute ("+x") permissions. While I can launch a shell script, like so: $ sh /path/to/fat32-usb/helloWorld.sh , and while I can launch a simple ELF binary, like so: $ /lib64/ld-linux-x86-64.so.2 /path/to/fat32-usb/helloWorld , I can

Cross platform recursive file list using C++?

筅森魡賤 提交于 2019-12-12 18:16:58
问题 What is the most efficient way to recursively list files in a specific directory and its subdirectories? Should I use the standard library, or use some third party? I want this because I use v8 as a JavaScript engine, and I want to execute all scripts in some directory (and its subdirectories). If there's any built-in way to do that in v8, great :) It should support Windows, Linux and OS X. Thanks. 回答1: For a generic cross-platform C++ solution, check out boost::filesystem 来源: https:/

Portability between Unix shells - am I thinking about the issue correctly?

痴心易碎 提交于 2019-12-12 18:11:55
问题 Whenever I write shell scripts (mostly software development utilities or build tools) I've generally tried to avoid using bash in favor of using plain old sh for portability. However lately I've been running into more and more issues where useful features are not available, or behavior is actually less consistent across systems using sh then it is using bash, since sh is aliased to different shells... As I understand it, sh is the oldest Unix shell and carefully written sh scripts should in

Advice for supporting both Mac and Windows Desktops

浪子不回头ぞ 提交于 2019-12-12 15:32:07
问题 What are the best practices for building a GUI desktop app that will support both Windows and OS X? Let's say it's budgeting software, so there is a bit of math and some big data structures. User data is saved in XML files; there is no separate database or networking. At one extreme, you could just build the Windows version in C# and the Mac version in Objective C. Is there a better approach, so you can more easily keep the two versions in sync and write less duplicate code? Would you write