portability

Does MS-SQL support in-memory tables?

邮差的信 提交于 2019-11-27 15:56:02
问题 Recently, I started changing some of our applications to support MS SQL Server as an alternative back end. One of the compatibility issues I ran into is the use of MySQL's CREATE TEMPORARY TABLE to create in-memory tables that hold data for very fast access during a session with no need for permanent storage. What is the equivalent in MS SQL? A requirement is that I need to be able to use the temporary table just like any other, especially JOIN it with the permanent ones. 回答1: @Keith This is

Portable C++ Stack Trace on Exception

不羁岁月 提交于 2019-11-27 15:02:44
问题 I am writing a library that I would like to be portable. Thus, it should not depend on glibc or Microsoft extensions or anything else that is not in the standard. I have a nice hierarchy of classes derived from std::exception that I use to handle errors in logic and input. Knowing that a particular type of exception was thrown at a particular file and line number is useful, but knowing how the execution got there would be potentially much more valuable, so I have been looking at ways of

Does TortoiseGit work with PortableGit-x.x.x.x-previewyyyyyy? What are compatible git versions for TortoiseGit?

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 14:51:04
Does Tortoisegit work with PortableGit-x.x.x.x-previewyyyyyy? If yes, how to arrange these? VonC Original answer (Nov. 2011) It depends on your Os (Win32 or 64), and on the combination of TortoiseGit and msysgit. The latest versions of both should usually work together, but you can see some bugs still pending: Issue 948 : TortoiseProc crashes when repo contains huge files Issue 875 : TGitCache crash Whenever you have a similar issue, report it on the bug list, and look for an intermediate build. The very latest ones, for instance, supposed to fix the current crashes, are: https://tortoisegit

How should I handle “cast from ‘void*’ to ‘int’ loses precision” when compiling 32-bit code on 64-bit machine?

浪尽此生 提交于 2019-11-27 14:23:40
问题 I have a package that compiles and works fine on a 32-bit machine. I am now trying to get it to compile on a 64-bit machine and find the following error- error: cast from ‘void*’ to ‘int’ loses precision Is there a compiler flag to suppress these errors? or do I have to manually edit these files to avoid these casts? 回答1: The issue is that, in 32bits, an int (which is a 32bit integer) will hold a pointer value. When you move to 64bit, you can no longer store a pointer in an int - it isn't

What is the difference between “architecture-neutral” and “portable”?

人盡茶涼 提交于 2019-11-27 13:32:07
问题 I'm reading Herbert Schildt's book "Java: The Complete Reference" and there he writes that Java is portable AND architecture-neutral. What is the difference between this two concepts? I couldn't understand it from the text. 回答1: Take a look at this white paper on Java. Basically they're saying that in addition to running on multiple environments (because of being interpreted within the JVM), it also runs the same regardless of environment. The former is what makes it portable, the latter is

Is there a portable equivalent to DebugBreak()/__debugbreak?

南笙酒味 提交于 2019-11-27 13:24:59
In MSVC, DebugBreak() or __debugbreak cause a debugger to break. On x86 it is equivalent to writing "_asm int 3", on x64 it is something different. When compiling with gcc (or any other standard compiler) I want to do a break into debugger, too. Is there a platform independent function or intrinsic? I saw the XCode question about that, but it doesn't seem portable enough. Sidenote: I mainly want to implement ASSERT with that, and I understand I can use assert() for that, but I also want to write DEBUG_BREAK or something into the code. What about defining a conditional macro based on #ifdef

MySql portable version

巧了我就是萌 提交于 2019-11-27 11:58:34
问题 anyone know a portable version of mysql? I know xampp but it comes with PHP and Apache together anyone know how to isolate the mysql? 回答1: You can download the MySQL Essentials version and make a few small changes to directories in the my.ini file to use relative paths instead of absolute paths. Then you can run the server directly without having to install or use a Windows service. Download a MySQL .zip file (instead of an .msi , though you could get the .msi and use 7Zip or Orca to extract

msys path conversion (or cygpath for msys?)

左心房为你撑大大i 提交于 2019-11-27 11:55:23
I need to pass /DEF:c:\filepath\myLib.def" command line option from a bash script to MS compiler/linker. The path is generated as part of build process by a bash script. Basically, the argument that my script passes is: -DEF:/c/filepath/myLib.def MSYS path conversion can't handle it properly because it doesn't understand /DEF: part. It works if I do -DEF=/c/filepath/myLib.def but then ms tools don't understand this parameter. In short, what's the proper way to write that parameter in MSYS bash so that it converts it to proper argument? On cygwin I could use cygpath, but there is no equivalent,

Portable way of setting std::thread priority in C++11

拈花ヽ惹草 提交于 2019-11-27 11:39:46
What is the correct way in the post C++11 world for setting the priority of an instance of std::thread Is there a portable way of doing this that works at least in Windows and POSIX (Linux) environments? Or is it a matter of getting a handle and using whatever native calls are available for the particular OS? Mike Seymour There's no way to set thread priorities via the C++11 library. I don't think this is going to change in C++14, and my crystal ball is too hazy to comment on versions after that. In POSIX, pthread_setschedparam(thread.native_handle(), policy, {priority}); I don't know the

Are the experimental features of modern C++ reliable for long-term projects?

坚强是说给别人听的谎言 提交于 2019-11-27 11:24:20
问题 I have a project that currently uses C++11/14, but it requires something like std::filesystem , which is only available in C++17, and hence I don't have a chance to currently use it. I see, however, that it's available in my current compiler as std::experimental::filesystem . Is it a good idea to use experimental features, assuming that I could in the future add something like: #ifdef CXX17 //if this is C++17 std::filesystem::something ...; #else std::experimental::filesystem::something ...;