I have 17 versions on a file uploaded into a document library. When I use SPFileversionCollection, I get 16 versions, while SPListitemVersionCollection shows 17 versions.
I think SPListItemVersionCollection contains draft version whereas the other one SPFileVersionCollection contains only published version.
But why there is a difference in number of returned versions?
The SPListItemVersionCollection object contains all the versions, including the current one.
The SPFileVersionCollection object does not include the current version.
Documents and versioning
Related
When using the Twitter API you get emojis as unicode characters. You can then easily parse out and display emojis as pictures. One example of such a parsing tool is Twemoji, which is the official emoji parsing tool from Twitter. In the twemoji.js file there is a long regular expression they use to parse out the emojis.
However, this file has not been updated in two years, and there are many emojis missing from Twemoji that are displayed just fine on twitter.com.
Does anybody know of any other well maintained list of current emojis supported by twitter.com? A bonus would be that they use/provide a regular expression I can import into my own code.
Twemoji has a somewhat weird structure on Github due to a CDN mirroring, which means that when Twemoji releases a new version, or updates the regular expression in newer versions, the original versions will still be there.
The twemoji.js file on the front page is indeed an old version. However, they have released newer versions, so on the root of the project there is currently a folder named 2. This file contains a twemoji.js that is much newer than the one at the root level. The regex in this file catches all emojis currently displayed on twitter.com.
So when getting a new regex for your app, remember to not check the root folder, but look for a numerical folder which contain newer versions.
Given a certain HDF5 file (HDF5 format), how can I know the version of the file format that has been used for its creation?
Context. It is said in the documentation that when you create/write a file the library the following applies for backward compatibility:
An HDF5 Library of any given release is designed to read all existing
HDF5 files from that or any prior release. Although major versions
sometimes contain features that require additions and/or changes to
the HDF5 file format, the library will by default write out files that
conform to a maximum compatibility principle. That is, files are
written with the earliest version of the file format that describes
the information, rather than always using the latest version possible.
This provides the best forward compatibility by allowing the maximum
number of older versions of the library to read new files.
I have tried tools like h5stat but it does not output the info that I want.
Thank you.
Here is an answer in the last question https://ftp.hdfgroup.org/hdf5-quest.html#h5dumpvers
Q: Can you add an option to h5dump or h5ls to print the version of a file ?
A: No, we do not plan on adding this option. Users should use attributes to specify the version of a file. There are many reasons why we shouldn't add this. For example, different objects in the file could be created or modified by different versions of the library.
We have a static library in Xcode which we need to assign a version number to, just like in an app.
This is useful for many reasons, but mainly because if we could assign a version number we could easily build the library to a specific output folder:
Library-1.0.0
Library-1.0.1
Library-1.0.2
Library-1.1.0
Library-2.0.0
If you see what I mean.
It might also be useful for our clients to manage dependencies and such in their apps.
Is there a way that we can add a version number to the build?
Thanks for your help.
This has everything you need to know: Framework Versioning
Essentially it boils down to a few settings within the framework's Build Settings. There are Major versions and Minor versions. Major version is found in the build setting "Framework Version". It starts off with a value of "A" by default. Minor versions are set with the setting "Current Library Version".
Major versions indicate incompatiblity with previous frameworks. Minor versions indicate compatible updates to the current version.
I'm having trouble understanding what my options are to merge 2 or more conflicted versions of a UIDocument stored in iCloud. After detecting the document conflict, I currently use removeOtherVersionsOfItemAtURL to simply keep the latest version of the document's data. However, I would like to support merging conflicted documents.
The only resources and tutorials I found referred to Core Data and persistent stores for merging, and the examples used things like SQLite, which I don't use. In my case, each document is a separate file.
Background: My app uses custom NSObject subclasses (with relevant of properties) to store data. They are encoded and decoded (using NSCoding + NSKeyedArchiver/NSKeyedUnarchiver) inside of a UIDocument. I have set up my app to fully work with iCloud. It can make files ubiquitous and vice-versa, edit and delete them.
Please help me to understand what I can do regarding merging conflicted UIDocument's!
You'll use NSFileVersion to get conflicting versions of the file. When you get into a conflict state, the +unresolvedConflictVersionsOfItemAtURL will give you NSFileVersion instances for any versions not considered "current". You can then use the URL property of NSFileVersion to get the contents of those conflicting versions.
Now you have more than one version of the document. How you resolve the conflict is up to you-- go through the conflicting versions and merge changes in whatever way makes sense for your document structure. If you can resolve it in code, you'll probably take some of the data from one of the conflict versions and copy it into the current version, until the current version contains the final merged version.
Once you've done that, save the document, remove the conflicting versions (removeOtherVersionsOfItemAtURL:error:), and mark the current file version as resolved. You might also want to use removeAndReturnError: to actually get rid of the older version(s).
Some more detail on this can be found in Apple's guide for resolving document version conflicts.
My released version appears to be using a old model version of Core Data, xxxDB 101j instead of xxxDB as defined in the VersionInfo.plist (package contents of xxx.xcarchive submitted to the app store). This has not been an issue on development devices or releases to TestFlight.
It is using the last listed version in VersionInfo.plist, not the version defined in the NSManagedObjectModel_CurrentVersionName property. Interestingly all the versions have a .mom file including xxxDB but xxxDB also has an .omo file as well.
Has anyone bumped into this issue and found a work around?
The workaround is to add a new version model, make that the current version, clean, archive and submit. At this point in time, the NSManagedObjectModel_CurrentVersionName property is not used when your app is submitted to the app store. It uses the last listed model in the VersionInfo.plist.
The behavior in the testing/adhoc environment is different to go live