porting

Porting Winsock to Linux Sockets

时光怂恿深爱的人放手 提交于 2019-12-04 01:07:27
问题 I have a program that does some networking using Winsock, and one of our requirements right now is to port over our program to Linux. The only thing stopping us from doing this is Winsock. My question is: How easy can I port this over to a Linux implementation? Are there any pitfalls I should be aware of, and if I simply include the appropriate header files, what sort of things will I have to be sure to handle? Thanks for any help! I'd post code but I can't unfortunately due to legal reasons.

Mac OS X as PhoneGap platform

风格不统一 提交于 2019-12-03 16:31:58
I have phonegap app and I wish to port it to Mac OS X Is there any similar to phonegap platform that make it possible to build native apps for Mac OS X from web apps. I also interested in Windows and Linux. I wish to be able to hide app in tray and create dialog windows. UPDATE I selected Cordova/PhoneGap that now support Mac OS X. When I asked question PhoneGap had no support on desktop but think change. I expermented with MacGap which was a port of Phonegap to OSX. https://github.com/maccman/macgap You are a little limited in features. For writing HTML/Javascript applications that run on OSX

Need to port MS Visual C++ to Linux G++

余生长醉 提交于 2019-12-03 16:28:29
I'd like to start by saying I am a computational biophysicist, not a software engineer, so my knowledge of programming is limited to scientific computation (I use C++, Matlab, and R). I was recently asked to port a huge package of code (~10,000 lines) to Linux from MS Visual C++, where I've been developing some code. They knew I was writing in Linux and didn't tell me until nearly a year later that they wanted it integrated with old code in Windows. To be honest, I have no idea where to start. I was able to put together a MakeFile and compile successfully, but I get a segmentation fault, which

How to find memory usage of my android application written C++ using NDK

99封情书 提交于 2019-12-03 15:10:21
I am porting a game written in C++ to Android using NDK. I need to know how much memory it consumes while running. I am looking for programmatically way to find the memory usage of Android application written in C++. In Java, you can check the native memory allocated/used with: Debug.getNativeHeapAllocatedSize() Debug.getNativeHeapSize() See: http://developer.android.com/reference/android/os/Debug.html#getNativeHeapAllocatedSize%28%29 http://developer.android.com/reference/android/os/Debug.html#getNativeHeapSize%28%29 The two functions based on JonnyBoy's answer. static long

What are the possible pitfalls in porting Psyco to 64-bit?

两盒软妹~` 提交于 2019-12-03 11:53:37
The Psyco docs say: Just for reference, Psyco does not work on any 64-bit systems at all. This fact is worth being noted again, now that the latest Mac OS/X 10.6 "Snow Leopart" comes with a default Python that is 64-bit on 64-bit machines. The only way to use Psyco on OS/X 10.6 is by recompiling a custom Python in 32-bit mode. In general, porting programs from 32 to 64 bits is only really an issue when the code assumes a certain size for a pointer type and other similarly small(ish) issues. Considering that Psyco isn't a whole lot of code (~32K lines of C + ~8K lines of Python), how hard could

iOS UI elements porting on Android

倖福魔咒の 提交于 2019-12-03 11:42:07
ladies and gentlemen! Very often on my job I meet the following requirement from the client, when developing android applications: "make it look like and iPhone app". Yes, I know, that the best way is to offer him canonical Android design with all these patterns like dashboard, using menu button etc... But sometimes this is not the case, as instead, I have to make it look and animate just the same. It's frustrating. Can you guys, please advice me an android library (if there is one) with iOS-like UI elements? Many thanks in advance, I'm looking forward to hearing from you! To expand on Martyn

How to have drag-and-drop and sorted GtkTreeView in GTK3?

柔情痞子 提交于 2019-12-03 10:55:32
I am porting liblarch , a library for handling directed acyclic graphs, from PyGTK (GTK2) to PyGObject introspection (GTK3). I ran into the problem with GtkTreeView. The app using liblarch needs to sort GtkTreeView by a column but in the same time, the user can drag-and-drop rows, move a row under another row. For that I had to manually process dnd_data_get() and dnd_data_receive() which is perfectly okay. There is the minimal setup for GtkTreeView which works under PyGTK. Rows are sorted and the user can move rows around. #!/usr/bin/python # -*- coding: utf-8 -*- import gtk window = gtk

Import Confluence xml dump into Mediawiki

。_饼干妹妹 提交于 2019-12-03 10:25:31
Is it possible to import a Confluence xml dump into Mediawiki? If so, any guidance will be appreciated. Thanks for you assistance! There is a converter from Confluence to Twiki: http://twiki.org/cgi-bin/view/Plugins/ConfluenceToTWikiAddOn and converters from Twiki to MediaWiki: https://www.mediawiki.org/wiki/Twiki Here are a few markup translation tools: Confluence to MediaWiki Converter Wikifier Doxia Mylyn Still working on if this is a solution or not, but.... from confluence export the space, as HTML then using https://github.com/svick/LINQ-to-Wiki spider from the created index.html page

When porting Java code to ObjC, how best to represent checked exceptions?

一曲冷凌霜 提交于 2019-12-03 06:45:21
I am working on porting a Java codebase to Cocoa/Objective-C for use on desktop Mac OS X. The Java code has lots and lots of methods with checked exceptions like: double asNumber() throws FooException { ... } What's the best way to represent these in Objective-C? Exceptions or error out-parameters? - (CGFloat)asNumber { ... // possibly [FooException raise:format:]; } or - (CGFloat)asNumberError:(NSError **)outError { ... } I have the sense that out-errors are generally the better solution for Objective-C, but as you can see... a lot of methods like the one above will be quite awkward-looking.

error C3861: 'strcasecmp': identifier not found in visual studio 2008?

安稳与你 提交于 2019-12-03 05:53:46
im trying to port application from cygwin to visual studio 2008 express but im getting this error : error C3861: 'strcasecmp': identifier not found in this type of code: if (!strcasecmp("A0", s)) .... what is the replacement in vs? i can't find any thing in the net add this to your precompiled header (or some other config.h) #ifdef _MSC_VER //not #if defined(_WIN32) || defined(_WIN64) because we have strncasecmp in mingw #define strncasecmp _strnicmp #define strcasecmp _stricmp #endif Look for int _stricmp( const char *string1, const char *string2 ); 来源: https://stackoverflow.com/questions