platform-independent Questions

3

How is it that an executable can work on both AMD and Intel systems? Aren't AMD's and Intel's instruction sets different? How does the executable work on both? How exactly do they compile the files...

8

Solved

I need to determin the byte size of a file. The coding language is C++ and the code should work with Linux, windows and any other operating system. This implies using standard C or C++ functions/...
Synopsis asked 11/3, 2010 at 10:26

6

Solved

Process.platform returns "win32" for Windows. On Windows a user's home directory might be C:\Users[USERNAME] or C:\Documents and Settings[USERNAME] depending on which version of Windows is being us...

9

How do I remove the file name from a URL or String? String os = System.getProperty("os.name").toLowerCase(); String nativeDir = Game.class.getProtectionDomain().getCodeSource().getLocation().getF...
Antilles asked 17/2, 2014 at 12:35

1

Solved

We all knows that .NET Core is platform independent and can run on any OS like Windows, Linux or Mac. I am just little more curious to understand, how the Cross platform is achieved in case of .NET...

15

Solved

.NET is a language independent platform. But is it platform independent as well ? How ? EDIT : I have heard, .NET 4.0 is developed considering plateform independency ! Well, hope it may take ove...
Ragen asked 7/9, 2010 at 7:48

3

Solved

I just started working on a big project which is supposed to be platform independent, but it actually uses types which are implementation defined such as char. This had already caused some problem...
Sock asked 25/8, 2017 at 16:25

3

Solved

I have tested a bit of assembler on Linux using the AT&T syntax. One thing that struck me was that the book I was reading was written from a 32-bit standpoint. Thus, all sizes would have to be ...
Unblock asked 15/6, 2011 at 14:26

9

Solved

I need to execute a program and retrieve its stdout output in c++. I'd like my code to be cross-platform too. Having recently discovered the wonderful world of the Boost c++ libraries for all your...
Demulcent asked 5/11, 2009 at 21:15

2

Solved

Python's os module contains a value for a platform specific line separating string, but the docs explicitly say not to use it when writing to a file: Do not use os.linesep as a line terminator w...
Afterword asked 28/6, 2016 at 11:20

10

Solved

I have a string with the following format: 2010-11-04T23:23:01Z The Z indicates that the time is UTC. I would rather store this as a epoch time to make comparison easy. What is the recomende...
Schulman asked 9/11, 2010 at 19:41

3

Solved

I want to print a double value to std::cout portably (GCC, clang, MSVC++) such that the output is the same on all platforms. I have a problem with the formatting of the exponent. The following pro...
Etiquette asked 10/2, 2012 at 10:37

3

Solved

I want to print out a variable of type size_t in C but it appears that size_t is aliased to different variable types on different architectures. For example, on one machine (64-bit) the following c...

3

Solved

Is there a simple way to convert from a java Map<String,Object> to android.content.ContentValues ? android.content.ContentValues is used in android database programming to keep the data of a...

3

Solved

Is there a way in MATLAB to get the user name of the user that started the session? I am interested in solutions for Windows, Linux and Mac OSX. I imagine that if the solutions are platform-specif...
Toddler asked 26/7, 2012 at 15:52

3

Solved

We are moving from MPC to CMake. We provide a lib with some samples. The samples are coming with makefiles. The problem is that the makefiles, generated by cmake contains absolute paths but not r...
Mindimindless asked 25/6, 2014 at 20:47

2

Solved

Is there some way to check if an arbitrary PID is running or alive on the system, using Node.js? Assume that the Node.js script has the appropriate permissions to read /proc or the Windows equivale...
Marler asked 18/1, 2013 at 1:4

10

Solved

What's the easiest way to play a sound file (.wav) in Python? By easiest I mean both most platform independent and requiring the least dependencies. pygame is certainly an option, but it seem...
Spithead asked 20/11, 2008 at 23:40

2

Solved

I have this piece of code that is challenging all my knowledge of C. Here I have : int main(void){ unsigned long long int massage ; scanf("%llX", &massage); //input: 0x1234567890abcdef pri...
Labarum asked 28/12, 2012 at 15:22

1

Solved

There are a few platform-specific libraries in Hackage that I'd like to use (e.g. inotify, kqueue). However, documentation on how to switch between platforms using conditional compilation seems a l...
Leverrier asked 10/12, 2012 at 10:35

1

Solved

If I compile following c lines on windows and linux(ubuntu) I get different results. I would like to avoid. How can I do it? double a = DBL_EPSILON; double b = sqrt(a); printf("eps = %.20e\tsqr...
Jacey asked 26/11, 2012 at 18:40

2

Solved

I work on windows and MacOS, I would like to get environment variables. How to get system environment variables using boost library? Are there equivalent to System.Environment.GetEnvironmentVariab...
Kelsey asked 13/1, 2012 at 11:35

5

Solved

Is for example size_t x = -1u; if (x == -1u) ... valid? If this is valid it would prevent a warning. of course on a 32 bit system x should be 0xffffffff and on a 64 bit system it should be 0x...
Guadalajara asked 5/12, 2011 at 20:54

2

Solved

I'm seeing differences across platforms about when Class.forName() throws ClassNotFoundException and when it throws NoClassDefFoundError. Is this behavior well-defined somewhere, or have I stumbled...
Kristofor asked 12/11, 2011 at 14:32

2

Solved

There seems to be three identical ways to get the platform-dependent "file separator" platform-independently: java.io.File.separator java.nio.file.FileSystems.getDefault().getSeparator(); System....
Chimerical asked 10/11, 2011 at 5:32

© 2022 - 2025 — McMap. All rights reserved.