Cross-platform timezone serialization - serialization

I need to save timezones - along with other data - to a file and read the file from multiple platforms (Linux, WinRT, Windows Phone 8, OS X, Android, iOS). Likely languages are C++, C#, Java, and Objective-C.
Saving the timezone offset as a double is insufficient for my needs, because this loses daylight savings information, which is important. Depending on the date and the timezone, 2 am + 2 hours could be 3 am, 4 am, or 5 am.
Is there a universally supported serializable timezone format?

It seems the best answer is to use IANA/Olson/TZDB time zones (which are supported on the Unix based systems), and convert them for the Windows-based platforms. 2-way conversion seems to be unreliable, so the most feasible option seems to be to replace the default datetime framework in .NET with NodaTime, as described in multiple related questions:
Time Zone Mapping from iPad (Objective C) to MVP Web API (C#)
How to translate between Windows and IANA time zones?
Converting Olson TZID to Windows Time Zone
How to convert a time zone information in C# to a time zone information in Java?

Related

When did Apple deprecate or stop publishing the APIs for using named forks, the forks other than the data and resource fork?

Back in the day, one of the Quirks of the Macintosh OS was that files had two "forks", a "resource fork" which held resources used by software through dedicated resource APIs, and a "data fork", which held the plain old data like on other systems, including binary code, text in plain text files, etc.
A little-known feature of HFS+, introduced with Mac OS 8.1 in 1998, is that you can have any number of named forks of any file. Similar to the also little-known feature of NTFS called "ADS" (Alternate Data Streams).
From Wikipedia:
HFS Plus permits filenames up to 255 characters in length, and
n-forked files similar to NTFS, though until 2005 almost no system
software took advantage of forks other than the data fork and resource
fork
Apple doesn't seem to document the APIs for making use of those extra forks any longer.
Do we know if and when Apple officially deprecated the feature? If not, do we know when the APIs vanished from the documentation.
Back in the day, one of the Quirks of the Macintosh OS was that files had two "forks",
Quirk? Rather a well known feature.
Similar to the also little-known feature of NTFS called "ADS" (Alternate Data Streams).
It was a great way to organize Data.
Apple doesn't seem to document the APIs for making use of those extra forks any longer.
They are well documented in according Manuals - even online like here. Ofc, there is no reason to go into them since they are deprecated since 10.9 (Mavericks)
Do we know if and when Apple officially deprecated the feature?
Yes, they did, and the moment in time was October 2013 when OSX 10.9 was released.
If not, do we know when the APIs vanished from the documentation.
Still there today ... at least when looking in the appropriate API documentation for any Mac OS between 1999 (MacOS 8) and 2013.
Always look at the API for the Version used. Actual OSX does no longer encurrage its use, so not to be found there.

Why SAP Business One SDK uses double for money?

I always read that I should use decimal or similar for money and financial calculations (example). However as much I can see, all of the Business One SDK uses doubles? Is this okay? Am I expected to convert the double values to decimals every time I am doing calculations, than back to double If I want to set it for an API object (what I do currently)?
Note: The SQL database uses numeric(19,6) for these values.
Despite what it might look like in Visual Studio, the SAP SDK isn't really a .Net-native library - it's a .Net wrapper over a C/C++ dll using COM Interop.
I don't think that decimal is a native type in C/C++, and it's certainly not a basic/intrinsic type in .Net (unlike e.g. string, int, double, etc) - it's also slower to use because there's no intrinsic CPU instructions for Decimal operations (unlike the basic types).
Because there's no equivalent in C/C++, it would have to be translated to a type that can be understood by the underlying library - and that type would likely be double anyway.

Definition of 'application environment' , 'Framework' , 'API'

Is it true :
Cocoa is an application environment that consist of several Frameworks
and each framework consist of several API
Application Environment -> Framework -> API
Is Carbon the other application environment in OSX?
All things that allow an application to talk to a computer are an "API." That's a very broad term. It may refer to something as small as malloc, or as large as Cocoa. All of these are "APIs" in the broadest sense of the term.
On Mac and iOS, "framework" can have a specific meaning, which is a dynamically loadable bundle in a specific format. It can also have a broad meaning of "a collection of libraries that work together." There is a Cocoa.framework, but there is also the broader architecture of "Cocoa" which is a way of attacking problems together with a set of tools for attacking problems in that way.
An "Application Environment" is any environment that applications can run in. So Mac OS X could be considered an App Environment, or you might consider Darwin to be an App Environment, or Cocoa, or Carbon. It depends on what you're comparing it to.
The point in all of this are that these are not industry-wide well-defined terms. They're used to mean a lot of overlapping things, and they are sometimes used slightly different ways even within the Apple docs.
If you're looking for a good reference on general terms and how Apple uses them, you want to read Cocoa Core Competencies.
What the wiki says :
Carbon is one of Apple Inc.'s procedural application programming
interfaces (APIs) for the Macintosh operating system. It provides C
programming language access to Macintosh system services. Carbon
provides a good degree of backward compatibility for programs to run
on the now-obsolete Mac OS 8 and 9, however these systems are no
longer actively supported since Apple released the final OS 9 update
in December 2001.
In a few words, BOTH Cocoa and Carbon are considered APIs.
Sidenote : Why do you care so much about terminology? I definitely wouldn't. IMHO, it's the inner logic and concepts that matter; and not, necessarily, how we call it. Just my 2 cents....

VT100 screen scraping interface for Smalltalk

Hello (also posted on the VWNC list),
We are looking at options for interfacing with a legacy Unix system. One option we'd like to explore would be to screen scrape a VT100 terminal session.
Is there anything out there for Smalltalk VT100 terminal session support, like VA's old EHLLAPI 3270 interface? (worked well for me in an Reuters FX / VA / AS400 system back in '95).
Not had much luck with searches, aside from some very old references to CTermConnection in VW 2.5 and Ian Piumarta's VT102Emulator for Squeak from 2002.
This is a stand alone Seaside app, so any Smalltalk dialect will do.
Thanks for any help,
Bob
Smallalk/X includes both VT52 and VT100 emulators. They are not perfect and do not emulate the whole set of escape sequences, but even if incomplete as-they-are, they may provide something to start with (and extract the stuff which handles the escape sequences).
ST/X can fileout in standard junk format (or fetch the class source from exept's cvs repository)
However, if you run in seaside, I guess you better look for a javascript vt100 emulator and write a seaside widget wrapper for that (which simply pipes through the key-events and incoming data). May be less work in the end, as I assume that JS-emulators are many around.

API to convert document of different formats to Pdf

I need a API to convert any type of document to Pdf (free or purchase). Kindly suggest me efficient API provided by any vendor.
Thanking You
You didn't specify what your platform is, so try this platform agnostic one I worked on. Examples: Java, C#, VB.net. The API is web services based and supports a large number of file formats with perfect fidelity.