Drupal 8 Feeds Import Programatically – how do I get finished state?

I’m running an import using the code below, its working fine but I need to get the result of the nodes created/updated etc.

use Drupal\feeds\Entity\Feed;  $  feed = Feed::load($  this->_feed_id); if (!$  feed->isLocked()) {   $  feed->setSource($  this->_feed_source);   $  feed->import(); } 

There is a getState function that has the required information, but when the import if finished it seems to clear the state, so it always returns as shown below.

(  [progress] => 1  [pointer] =>   [total] => 0  [created] => 0  [updated] => 0  [deleted] => 0  [skipped] => 0  [failed] => 0 ) 

Does anyone know how to get the finished state after the import? Thanks

What are the current state of art approximation algorithm for NP-Hard problems?

I came cross some works try to use deep learning to approximate NP-Hard


Though the paper seems to have very good results but based on the citations. I’m quit doubt if it really the state of art approximation for NP-hard problem.

I’m wondering what are some state of art NP-Hard approximation algorithms for each problems ?

Multi Agent Sokoban Solvers state of the art

I am researching into coding a solver for a variant of the Sokoban game with multiple agents, restrictions (eg. colors of stones, goals) and relaxations (push AND pull possible etc.)

By researching online I have found classic papers in the field, like the Rolling Stone paper (by Andreas Junghanns and Jonathan Schaeffer) and Sokoban: Enhancing general single-agent search methods using domain knowledge from the same authors.

These solutions seem to be outdated and I am currently structuring my solver per the notes of the two most performant solvers: YASS and Sokolution.

From the research I’ve done these two seem to be my best bet.

It is apparent that they are not enough by themselves to solve a multi-agent environment. Those solvers are made for a single agent. So far, I have failed to find useful multi-agent proposals.

In this context, my question is: What can be considered state-of-the-art in order to (1) coordinate multiple agents with different goals and (2) plug a solver’s solution in and validate/edit it? What are some search terms I can use to research this further?

Thank you very much

Ubuntu Touch (UBports) and Android support for LXC/LXD containers: current state

I am trying to run a web-server on my Android device (several available models, ARM or x86 hardware) inside a container (lxc / lxd). Looking for the easiest and safest way to do it. I was thinking about installing ubuntu-server on a smartphone. The task has led me in the direction of unlocking the bootloader, replacing the recovery and flashing a custom ROM (which needs to be found / chosen / tested / trusted OR developed). Before diving into xda-developers forum and Android SDK docs I am trying to figure out whether it is possible to make lxc / lxd run directly on Android (which version).

The only (very old) post by Stéphane Graber on the subject – section “LXC on Android devices” – has left me rather pessimistic. According to him LXC support on Android devices hasn’t been a priority, although it was generally possible…

I’ve also came across mentioning of lxc-android-config tool: here and here. However it lacks documentation or any kind of user-oriented notes.

Related questions:

1)How to install ubuntu server for lxc on a smartphone (ARM or x86)?

2)How to use Android SDK and smartphone vendor tools to boot another kernel?

Where to store side effect state in an event sourcing system

I also had a look at How do I deal with side effects in Event Sourcing? but the solution wasn’t clear to me.

If I store “EmailSent” event in the event stream, I might issue the external request to send the email again, thinking the previous send timed out, moments before the confirmation of the first email being successfully sent arrives.

However, if I never store that, and instead have all sent email IDs persistently stored by the email service, I will never know to stop bothering the email service with my old requests to send a particular email, despite it answering “this email has been previously sent successfully” every time.

Should I do both? This way the system will stop bothering the email service a lot of the time, but when it accidentally bothers it multiple times, only one email will be sent. (Yes, the email service can never be transactional, and I still have to choose “at most once” or “at least once” but having its limited scope and data locality it can give practical results much closer to “once”.)

At which moment does the ‘Surprised’ state disappear?

I am trying to figure out if the surprised state ends on a creature after the first attack of a surprise round, or if the surprised state (which I would then see almost as an unofficial condition) ends only after the first round of combat.

In the second case, I would believe that a character (having the rogue’s Assassinate ability) attacking a surprised creature AND having multiple attacks would score a critical hit on all hits.

Example: Does a Monk 5/Rogue 3 surprising a creature get automatic critical hits on all hits if he does 2 attacks (with extra attack) and additional unarmed strike(s)?

Or does the critical hit only affect the first hit? However, that would surprise me as the rules mention any hit is a critical hit.

Flutter drawer and saving/restoring child widget state

I am new to Flutter and I have a question about an internal methods of saving and restoring widget’s state. I develop an app with complex endDrawer with article’s catalog tree (based on ExpansionTile widget). First question It is possible to prevent killing drawer’s child widget after closing and opening it? Second As you can see on video Flutter have an internal methods to save and restore widget state due to screen rotation (it saves for example expansion state and position). It is possible to reuse these methods in my app programatically?

Get state name in default language

I am new to this Magento community and stuck at a very basic thing. I am getting the region(state) name from a customer address with this code

$  billingAddress = Mage::getModel('customer/address')->load($  billingAddressId); $  RegionName = $  billingAddress->getRegion(); 

Now some regions are being returned in locale language. One example is РOber̦sterreich. I want this to be translated in default en_GB language.

I was facing a similar issue with country name as well, though figured out a solution for that as –

$  locale = new Zend_Locale('en_GB'); $  countries = $  locale->getTranslationList('Territory', $  locale->getLanguage(), 2); $  countryName = $  countries[$  billingAddress->getCountryId()]; 

This was converting the returned name from Deutschland to Germany

I am seeking the same solution for the region name as well. Any help would be appreciated.