cross-platform

Redirect debug output to null stream instead of std::cerr

北慕城南 提交于 2020-01-04 03:47:12
问题 A software library that I am working with writes a lot of debug output to std::cerr , but redirects that output to a null stream if I tell it to be quiet. This is a simplified main.cpp that shows how the code tries to achieve this: #include <iostream> #include <fstream> #include <cassert> // The stream that debug output is sent to. By default // this points to std::cerr. std::ostream* debugStream(&std::cerr); // Throughout the library's codebase this function is called // to get the stream

Using xamarin to retrieve JSON message from URl and show in table view

谁说胖子不能爱 提交于 2020-01-04 03:18:21
问题 I'm started developement in xamarin cross platform development in visual studio. I want to know, how to retrieve the JSON message from url to show the details in table view. Here i give a sample url, how to retrieve all the city name in the json data and show in table. Help me! url: http://api.wunderground.com/api/02e5dd8c34e3e657/geolookup/conditions/forecast/q/Dhaka,Bangladesh.json 回答1: As @Udi said, your question is too broad. But because of that, I'll give broad answers. First, use

Get all DVD drives in Java

馋奶兔 提交于 2020-01-03 16:22:58
问题 After getting a list of the drive roots, is there a cross-platform way in Java to check whether any of the drives is: A DVD drive ...that contains a disk? I want the user to be able to select a DVD for playing, and narrowing the options down to DVD drives rather than including other drives (such as pen drives, hard drives etc.) would be helpful in this case. If I can get a list of such drives, showing what ones contain disks would again be helpful (same reason.) After searching around though

Cross Platform Windows / OS X Development, with large existing code base

怎甘沉沦 提交于 2020-01-03 09:38:22
问题 There is a large existing code base for a complex app that is written in C++ using MFC and WinAPI which needs to be ported to Mac OS X. The ideal solution is to have as much code common between the different platforms, especially code such as business logic. The GUI might be different depending on how good tools are available for a cross platform GUI. There are some low level OS calls which will be different on different platforms. The major goal is not to end up with two separate versions of

git pull errors

萝らか妹 提交于 2020-01-02 18:45:12
问题 I'm trying to pull a commit made on a Linux machine into a Windows machine. I'm getting this error message: error: git checkout-index: unable to create file my/folder/name/: (Invalid argument) On the Linux machine there appeared to be 2 such 'name' folders called: 'name' and 'Name' . Even after uniting them under 'name' and re-committing, I still get the same error message. On Windows I have git version 1.7.3.1.msysgit.0 and on Linux I have git version 1.7.5.4. I did find a bunch of seemingly

How can I natively launch an external app from within Xamarin.Forms?

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-02 07:15:30
问题 As the question title suggests, I'm looking for a way to launch an external app from within a Xamarin.Forms app. For example, my app has a list of addresses, and when the user taps on one of them, the built-in map app for the current platform would open (Google Maps for Android, Apple Maps for iOS). In case it matters, I am only targeting Android and iOS. I could use a dependency service and write the app-launching code on a per-platform basis, of course, but I'd prefer if I only had to write

is GTK 3.x a real cross-platform solution?

青春壹個敷衍的年華 提交于 2020-01-02 06:50:46
问题 I have tasted both Qt 4.x/5.x and GTKmm 3.x and I really like GTKmm over Qt. Now I have just discovered that GTKmm 3.x doesn't offer a Windows porting, they also do not offer a Mac porting, basically I can't find nothing but libraries/sources/binaries for Linux. Apparently the Windows support ( I'm not sure about the situation for the Mac OS stuff ) was dropped in the 2.x era and it's still not-existing today. I have planned to use GTK 3.x for specific reasons, especially for some new

Cross-platform API for system information

北战南征 提交于 2020-01-02 05:41:17
问题 I'm looking for a library that will provide this type of information: RAM Swap space Number of CPUs speed (CPU MHz) Number of cores Chip type Ultimately I'll be calling into it from Java, but a C library would be fine, which I can wrap with JNI. Platforms of interest include, but not limited to, AIX, HP-UX, Solaris, Windows. Thanks! 回答1: Like you I was looking for a cross platform system info library and found this: http://code.google.com/p/geekinfo/ I didn't test it yet but it might suit

GWT : fileUpload.getFileName() & fakepath

拥有回忆 提交于 2020-01-02 05:13:12
问题 I am working on a GWT project (web application) : at some point, users can upload a file through the application via a FormPanel. As I need the filename, I thought I could use : FileUpload upload = new FileUpload(); // ... String name = upload.getFileName(); And name turns out to be something like this : C:\fakepath\whatever.txt . Is this cross-platform ? What happens on other OS (I am using Windows) ? 回答1: The name returned by a upload form is dependent on the browser's security settings. On

GWT : fileUpload.getFileName() & fakepath

六月ゝ 毕业季﹏ 提交于 2020-01-02 05:12:05
问题 I am working on a GWT project (web application) : at some point, users can upload a file through the application via a FormPanel. As I need the filename, I thought I could use : FileUpload upload = new FileUpload(); // ... String name = upload.getFileName(); And name turns out to be something like this : C:\fakepath\whatever.txt . Is this cross-platform ? What happens on other OS (I am using Windows) ? 回答1: The name returned by a upload form is dependent on the browser's security settings. On