Implement problem change on solver instance created from solverManager.solveAndListen() [Optaplanner version 8.14] - optaplanner

If I'm using the 8.14 version of Optaplanner, not considering the option to move to a later version. Is there a way for me to implement problem change(real-time planning) using the solver instance created from solverManager.solveAndlisten() not the solver.solve()?

No, in 8.14 it's not possible to do problem fact changes on the SolverManager.
Either upgrade to 8.17 or use the workaround suggested in this answer: How to implement a problemFactChange while using optaplanner-spring-boot-starter?.
The workaround injects SolverFactory, builds a Solver instance and uses solver.solve().

Related

How can I use BungeeCord Message Channel on Velocity?

I try to use the BungeeCord Message Channel on Velocity.
I know this work. Here is my code:
player.sendMessage("§aWait...");
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("Connect");
out.writeUTF("Lobby2");
player.sendPluginMessage(plugin, "BungeeCord", out.toByteArray());
This code works, if I use BungeeCord as my proxy. But not if I use Velocity.
Since more recent Minecraft versions, it is recommended to use the bungeecord:main channel (though Velocity should support both just fine).
Also, it is important to make sure that you use a Velocity version newer than v1.1.0 (as seen here).
Another thing, though it should not be necessary (and probably won't change anything for this issue), it's recommended to also enable velocity-support.
If you remain having this issue, it might be best to create an issue on the Velocity Github repository, so they may be able to help you further!

SonarQube: How to suppress a warning in Kotlin code

I'm using SQ 7.3-alpha1 with sonar-kotlin-plugin-1.0.1.965.jar. However, I cannot deactivate a special warning inside my Kotlin code for repositories in Spring Data where I need an "_" in a method name.
I tried both //NOSONAR and #Suppress("kotlin:S100") and #SuppressWarnings("kotlin:S100"). Any hint is appreciated.
You're not able to deactivate that issue because none of the mechanisms you're trying to use have been implemented for Kotlin.
Instead, you'll have to do this from the UI side.
Great news, https://jira.sonarsource.com/browse/SONARSLANG-373 is fixed in version 1.6 of Sonarslang. So an update to that version might improve the situation. I’ve not tested it yet, hence the cautious wording.

How can I support older xaml version and still use new controls from the newer version.

I got a warning while building my xaml project:
The type ‘SvgImageSource’ is not available in the target platform
minimum version (10.0.14393.0)
I understand that I'm getting this because 14393 does not have an SvgImageSource control.
I still want to use the control and I also want to support 14393. Is that possible? Is there a way for me to create an alternative control for the older version?
This will be possible starting from the Creator's Update (15063) with Conditional XAML.
Conditional XAML provides a way to use the ApiInformation.IsApiContractPresent method in XAML markup. This lets you set properties and instantiate objects in markup based on the presence of an API without needing to use code behind. It selectively parses elements or attributes to determine whether they will be available at runtime.
I suppose you're using the control for SVGs. If you really need to run on older Windows 10 versions, have a look at this post from Igor Ralic on the Mntone.SvgForXAML library. That will be a lot easier than trying to create the control yourself.
Extra note: if you're still working on the app and are not releasing in the next few weeks, then it might be an option to skip straight to the Creator's Update. Already over 65% of the devices are on 15063 or higher in August and it's raising every week.

How to use Distributed Entry Iterator feature with RemoteCache on Infinispan +7.1 version?

I use keySet() api in production. But I know it's not recommended.
So I'd like to change it to new api over version 7.x
It's introduced on official blog.
http://blog.infinispan.org/2014/05/iterate-all-entries-in-cache.html
But I can't figure it out how to use it in Hotrod RemoteCache.
Anyone already tried successfully?
Thanks a lot.
This was answered at https://developer.jboss.org/message/920029?et=watches.email.thread#920029
Radim Vansa said:
Regrettably, this feature is not available yet over Hot Rod. Remote clients have certain lag after embedded-mode features. Map/Reduce and DistributedExecutors over HR are quite close on the roadmap, distributed entry retrievers should follow.
William Burns said:
I also wanted to make sure you are aware that the keySet method is fine to use in the API as outlined [1]. The Cache Javadoc has some more specifics [2]. Basically the methods you should never use are the toArray methods on the collections returned from keySet, entrySet or values. The other methods are done lazily. Note this means the collection isn't a copy like before as well.
Also to note if you do end up using any of the iterators from these bulk methods, you need to make sure to close them properly.
However as Radim pointed out Hot Rod does not have this support yet (embedded only), but should be coming to a new version soon.
[1] http://blog.infinispan.org/2014/11/why-doesnt-mapsize-return-size-of.html
[2] https://docs.jboss.org/infinispan/7.1/apidocs/org/infinispan/Cache.html#entrySet%28%29

What is the difference between 2 versions of webdriverbackedselenium

This is version 1. It is a part of webdriver-selenium project.
http://grepcode.com/file/repo1.maven.org/maven2/org.seleniumhq.webdriver/webdriver-selenium/0.9.7376/org/openqa/selenium/WebDriverBackedSelenium.java#WebDriverBackedSelenium
This is version 2. It's a part of selenium-java.
http://grepcode.com/file/repo1.maven.org/maven2/org.seleniumhq.selenium/selenium-java/2.20.0/org/openqa/selenium/WebDriverBackedSelenium.java#WebDriverBackedSelenium
What is the difference between these 2 versions? I'm trying to port over some legacy tests and want to know if it makes a difference whether we use one or the other
i'd strongly suggest you pull the latest selenium from their site: http://code.google.com/p/selenium/downloads/list. Don't even attempt to use 0.9.7 as that is over a year old, hundreds of bugs have been fixed probably in the webdriverbackedselenium realm. I'd strongly also suggest putting a code freeze on using any selenium 1 features going forward and just use webdriverbackedselenium to get sel 1 tests running in sel 2. There are many benefits of doing so but this is not the thread for that.