guava - Multisets.copyHighestCountFirst method suddenly not working - guava

I'm using guava Multiset library using their maven dependency version 18.0.
I had a following code that used to work fine until a few weeks ago:
ImmutableMultiset<String> entryList = Multisets.copyHighestCountFirst(weightedDocs);
which returns a sorted list of a given multiset.
But suddenly my IDE shows that the method doesn't exist, and woudln't compile. I checked their code in github, but the static method seems to be still alive... what would be a problem??

The method Multisets.copyHighestCountFirst(Multiset<E>) appeared in Guava 11.0. I'm quite sure that you have somewhere an older version of Guava (maybe even Google Collections that is used instead of the version 18.0 that you want to use.
So double-check your dependencies and their dependencies. An older version of Guava is present somewhere and is interfering with yours.

Related

What is the equivalent updated name for 'TestButton' in the newest version of HoloToolKit? 2017.4.3.0

I'm currently working on a new project using HoloToolKit 2017.4.3.0, and I'm trying to re-use some code that was written between May-August 2017, the version used was likely v1.5.7.0, HoloToolkit-Unity for Unity 5.6.1f1+
In the MixedRealityToolkit-Unity for Unity 2017.1.2f1 update, the Test and Example folders were merged, and in my old code I now have a deprecated object called TestButton.
Can someone direct me on what happened to TestButton and what I need to do to get my old code working in the newer version of the toolkit that I'm using?
private TestButton button = null;
I get a compilation error telling me "The type or namespace name 'TestButton' could not be found (are you missing a using directive or an assembly reference?)"
I'm looking for the equivalent object type for 'TestButton' in 2017.4.3.0 but there's very poor documentation for the changes made. I posted this to the GitHub repository for the Mixed Reality Toolkit and no one responded. Just wondering if anyone here has any personal experience with updating old HoloToolKit apps from before they merged the Example and Test folders into newer versions. If anyone could just even point me to some documentation that lists and describes all the types in the SDK version I'm using that would be great.
If you mean that you were using TestButton defined in TestButton.cs, you can try use the button_test_pfb.prefab prefab provided in the version 2017.4.3.0.

Build error after updating framework xcode8

I've just converted my app to Swift 3, and as part of this I have updated the well known "Charts" framework. All of my converted code is fine and building/testing well, so I have no concerns about that.
I have embedded the binary to use the framework after unlinking the old one, cleaned the project, built the project before trying to use any framework code, and cleared derived data.
However I still get a "ChartViewDelegate" is not available, cannot
find swift declaration for this protocol.
This is odd to me, as the Charts module imports fine, and autocomplete recognised all member classes of the framework. Also, it doesn't seem to be an issue with the framework, as when implementing the framework on a "fresh" project, it works perfectly as expected.
I'm at a loss of what to try next, apart from rewriting an entire app into a fresh project where I know the framework works. The framework is an integral part of the app. Thanks!
EDIT: I have already tried cleaning/clearing derived data.
I've been having this problem recently with any frameworks I added to my project manually. I fixed this by totally removing the offending frameworks and then installing via cocoa pods.

Groovy Deprecated Methods and Eclipse - sort

I've got the following code which I wrote in groovy 1.8
someListOfLists.flatten().sort().unique()
I've moved over to groovy 2.3.x, and eclipse (using e4.4 GroovyEclipse plugin for Juno from snapshot release) is showing me the sort() method is now deprecated for sort(Collection<T> self), to which the advice is to use the sort(Iterable<T> self).
How do I now chain methods like this together to avoid the deprecation warnings?
My thinking was that as flatten() is returning an ArrayList (which is an Iterable) it should be fine. Also, I see doing
((Iterable) someListOfLists.flatten()).sort().unique()
removes the warning, but looks ugly.
So is this just eclipse not seeing that the correct sort will actually be used, or is there some other way to express my chain of methods?
The deprecation warnings are due to the fact that Eclipse is mapping Groovy methods to the mostly deprecated DefaultGroovyMethods class, which was just replaced by many separate other classes such as StringGroovyMethods, ResourceGroovyMethods etc.
It seems that in version 2.7.1 of the Groovy plugin, this was fixed... check your version of the plugin, maybe you just need to upgrade.
If that does not solve the problem, unfortunately, unless you can make the Groovy plugin change the methods mapping, you won't be able to get rid of the warnings, as far as I know. In IntelliJ I have the same problem.

About facebook unity plugin 4.3.3, how to add it in current project?

I upgrade facebook unity plugin from version 4.2.4 to 4.3.3 yesterday.
For the old version, I just add the jar file in project/plugin/Android and add some specific code to use it.
As for the new version, it just give me a whole facebook android project, what am I supposed to do with it?
Compile it to an jar and use it like before?
Export my project and also with FB project then package it in Eclipse?(which is super waste of time everytime)
In fact I tried both:
1 . this is not works anymore, result in some resource id errors.
2 . I did make out a package, but it can not login like it works before in 4.2.4.
Does anyone meet same problem like I did?
I really think A sdk should not give whole prject out, because as a running project, there is too much sdk to add in, we dont have to much time to deal with each plugin everytime. A big company like facebook should make things easier.
BTW: the instructions on Facebook page is old, I could not get useful information from them.
You should be able to just "Build and Run" with the new 4.3.3 version (if you imported the package and left the structure as is. Be sure to clear out the old Facebook SDK before you import this one.) Unity would automatically compile it in with your project.
To answer your questions on why we did this:
The reason why it got switch away from a jar is that in the older version when it was compiled to the jar, it meant the R class had hard-coded resource ids at compile time (of the jar). Unfortunately, when other plugins were introduced into a project, it reorders the resource ids but doesn't adjust the R class within the jar. This would break integration and make integrating Facebook with the other android plugins useless.
The source of the android files were packaged along with it because several developers requested more ways to edit the code to their needs. There's several android plugins for Unity out there and while we do our best to make sure our Unity SDK plays nice with them, there can be cases were a developer would like extra control on how they merge together.
With that said, since you upgraded your project from 4.2.4 to 4.3.3, did you follow the changelog here: https://developers.facebook.com/unity/change-log-4.x/#131013?
Basically what happened was that since importing a package doesn't let us delete old files, there was no way to clean up projects that used the jar method. Keeping them both in the project breaks the android build. This is only a one time migration that should happen again.

Groovy eclipse plugin, strikethroughs everywhere

I just tried the Groovy-Eclipse plugin , and everything is working fine, except the syntax highlighting is behaving really strange.
Basically, it sees to think pretty much everything is deprecated. I get strike-troughs everywhere.
For example, toURL is striked through when using
"http://stackoverflow.com".toURL()
I see this with loads of methods, including eachLine , getText and many many more. These methods aren't deprecated, what is going on?
I'm running Eclipse 4.2, 2.7.0.xx-20120703-1400-e42-RELEASE and Groovy 2.0
These methods are deprecated because they moved to other classes and your plugin is not aware of that. There're many methods deprecated:
You can look up the deprecated API's for the new main version of Groovy here.
You can read about the similar question here:
An answer from the STS/Groovy-Eclipse side of things.
This is fixed in the latest 2.7.1 snapshot.
Earlier versions of Groovy-Eclipse were not aware of StringGroovyMethod,
but this has been fixed.