unity – Instantiate from two values, each in separate array

I have a problem with Instantiating GameObjects from floats in arrays, which I have to merge into one Vector2(or Vector3), I have only two values on arrays:

GameObject = somePrefab
float() = value1
float() = value2

First I have to combine it to Vector then Instantiate as many prefabs as the combined Vector number is…

Can anybody help me with how to merge these floats into Vector and instantiate?

replication – Store Elasticsearch shards in separate permissions on data node

I have an Elasticsearch cluster configured with one head node and three data nodes with the number of replicas set to 2. The data nodes are each split into three partitions called /data1 /data2 and /data3; the disk on each data node is partitioned. Elasticsearch is storing all the shards in the /data1 partition on each data node. The system has been working fine but now I want to add a new index and the /data1 partitions do not have space to store the new shards.

How can I instruct the cluster to store the new shards on different disk partition?

I looked at /etc/elasticsearch/elasticsearch.yml on the head node and path.data is set to /var/lib/elasticsearch. How do I modify path.data to use a different partition on the data nodes?

FFMPEG how to split iamge to separate parts?

FFMPEG how to split iamge to separate parts? – Super User

java – Separate sentences in paragraph that doesn’t have punctuation

How can I separate sentences in paragraph that doesn’t have punctuation?

For example, I have this paragraph:

The red glint of paint sparkled under the sun he had dreamed of
owning this car since he was ten and that dream had become a reality
less than a year ago it was his baby and he spent hours caring for
it pampering it and fondling over it she knew this all too well
and that’s exactly why she had taken a sludge hammer to it

I need the output to be something like this:

The red glint of paint sparkled under the sun. He had dreamed of
owning this car since he was ten and that dream had become a reality
less than a year ago. It was his baby and he spent hours caring for
it pampering it and fondling over it. She knew this all too well
and that’s exactly why she had taken a sludge hammer to it.

I just need to add punctuations to separate the sentences int the paragraph, I don’t need to add commas.

Is there any ideas or keywords that would help me with this problem?

plugins – Hide all Admin Notices and move on a separate page

I want to hide all ‘admin_notices’ from dashboard means everywhere.
I’ve a separate Menu name “Admin Notice”. I want to move all notices there so I can manage them separately by user roles.
There will be 2 columns-

  1. Display the full Notice
  2. User roles dropdown

I’m struggling to find out with Codex Documentation. If Someone can help me I will be greatful.

networking – Separate connections over 1 network cable

Consider the following network setup

                         ┌───────────────┐                                
┌────────────┐           │               │               ┌───────────────┐
│            │           │  2 Port RJ45  │               │               │
│ ISP / DHCP │──────────▶│  Socket Roof  │──────────────▶│ Unifi AP Roof │
│            │           │               │        B      │               │
└────────────┘     A     └───────────────┘               └───────────────┘
                                │  ▲                                      
                                │  │ B                                    
                                │  │                                      
                                │  │                                      
                             CAT6 Split                                   
                                into                                      
                              2x100MBit                                   
                                │  │                                      
                                │  │                                      
                              A │  │                                      
                                │  │                                      
                                ▼  │                                      
                         ┌───────────────┐                                
                         │  2 Port RJ45  │                                
                         │ Socket Ground │     B                          
                      ┌──│     Floor     │◀───────────────────────┐       
                      │  │               │                        │       
                      │  └───────────────┘                        │       
                      │                                           │       
                      │                                           │       
                   A  │                                           │       
                      │                                           │       
                      │      ┌────────┐               ┌────────┐  │       
                      │      │ Unifi  │        B      │ Unifi  │  │       
                      └─────▶│  USG   │──────────────▶│  PoE   │──┘       
                       WAN/1 │        │ LAN/1         │ Switch │          
                             └────────┘               └────────┘                  

Now the issue is there is only one cable run from the roof to the network rack on the ground floor. To get 2 connections out of this I have split the CAT6 cable up into 2×100 MBit using 4 wires each.

So the network is as follows:

  • The ISP comes in on the roof via a standard RJ45 (radio relay)
  • The cable is then connected to a 2 port socket (port A) I wired up to split the cable into
    2x100MBit
  • On the ground floor the cable from A is connected to the USGs WAN/1 port.
  • From the USG LAN/1 port it goes to a PoE switch that connects the rest of the local lan
  • One PoE port from that switch goes back to the 2 Port socket on port B
  • Port B of the socket on the roof is then connected to the AP

Now I can’t say I really like this setup very much. The reasons this is set up this way is

  1. I am a network noob and probably don’t know better
  2. I wanted to power the roof AP via POE without an additional injector (not that important)
  3. I wanted to isolate the ISPs DHCP by splitting it into 2 physical connections and using the USGs DHCP instead (important)

So the question is:

Can I achieve those goals without splitting the cable up into 2x100MBit, e.g. using a USW Flex Mini switch?

8 – Custom views filter to filter nodes by field in a separate table

The module I’m trying to build is a very simplified replacement for the Flag module because it is still in beta. The only functionality I need is the ability to favourite some content, which I have already replicated. I have a table that stores the nid of the content being favourited under a column called entity_id and uid of the user doing the favouriting.

I’m trying to have a views filter available when creating views of node content that will filter the view by if a node has been favourited or not. So I need to filter the nodes by if their nid appears in my custom favourites table. I have the filter defined so it is available to views of node content. I can’t seem to figure out the correct way to configure the handler class to have the filter actually work though.

I know I’m doing something wrong here, I don’t fully understand how to build the query I want in this use case. I have the filter added to a view of node content and the table favourites has a single row that connects the user with uid 1 to a node.

favourites.module

function favourites_views_data_alter(array &$data) {
  $data("node")("favourites_relationship") = (
    "title" => t("Favourited Node"),
    "help" => t("Limit results to only those entity favourited."),
    "relationship" => (
      "group" => t("Favourites"),
      "label" => t("Favourites"),
      "base" => "favourites",
      "base field" => "entity_id",
      "relationship table" => "node_field_data",
      "relationship field" => "nid",
      "id" => "standard",
    ),
  );

  $data("node_field_data")("is_favourited") = (
    "title" => t("Is Favourited"),
    "help" => t("If the content has been favourited."),
    "filter" => (
      "label" => t("Is Favourited"),
      "field" => "nid",
      "id" => "favourites_is_favourited_filter",
    ),
  );

}

FavouritesViewRelationship.php

namespace DrupalfavouritesPluginviewsrelationship;

use DrupalCoreFormFormStateInterface;
use DrupalCorePageCacheResponsePolicyKillSwitch;
use DrupalCoreSessionAccountProxyInterface;
use DrupalviewsPluginviewsrelationshipRelationshipPluginBase;
use SymfonyComponentDependencyInjectionContainerInterface;
use DrupalfavouritesFavouritesServiceInterface;

/**
 * Provides a views relationship to select favourited content by a favourite.
 *
 * @ViewsRelationship("favourites_relationship")
 */
class FavouritesViewRelationship extends RelationshipPluginBase {
  /**
   * {@inheritdoc}
   */
  public function defineOptions() {
    $options = parent::defineOptions();
    $options('favourite') = ('default' => NULL);
    $options('required') = ('default' => TRUE);
    $options('user_scope') = ('default' => 'current');

    return $options;
  }

  /**
   * {@inheritdoc}
   */
  public function query() {
    if (!($favourite = $this->getFavourite())) {
      return;
    }

    $this->definition('extra')() = (
      'field' => 'favourite_id',
      'value' => $favourite->id(),
      'numeric' => TRUE,
    );

    parent::query();
  }

  /**
   * Get the favourite of the relationship.
   *
   * @return DrupalfavouritesFavouritesServiceInterface|null
   *   The favourite being selected by in the view.
   */
  public function getFavourite() {
    $favourite = $this->favouritesService->getFavouriteById($this->options('favourite'));
    return $favourite;
  }
}

I’m not sure how much of the FavouritesViewRelationship class is really needed, I pulled it from the Flag module and tried to adapt it to my module while trying to get the filter working.

IsFavouritedFilter.php

namespace DrupalfavouritesPluginviewsfilter;

use DrupalviewsPluginviewsfilterFilterPluginBase;
use DrupalCoreFormFormStateInterface;
use DrupalviewsPluginviewsdisplayDisplayPluginBase;
use DrupalviewsViewExecutable;
use DrupalviewsViews;

/**
 * Filters by given list of node by whether it has been favourited.
 *
 * @ingroup views_filter_handlers
 *
 * @ViewsFilter("favourites_is_favourited_filter")
 */
class IsFavouritedFilter extends FilterPluginBase {

  /**
   * {@inheritdoc}
   */
  public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {
    parent::init($view, $display, $options);
    $this->valueTitle = $this->t("Is Favourited Filter");
  }

  /**
   * {@inheritdoc}
   */
  public function defineOptions() {
    $options = parent::defineOptions();
    $options("value") = ("default" => 1);
    $options("relationship") = ("default" => "favourites_relationship");

    return $options;
  }

  /**
   * {@inheritdoc}
   */
  public function buildOptionsForm(&$form, FormStateInterface $form_state) {
    parent::buildOptionsForm($form, $form_state);

    $form("value")("#type") = "radios";
    $form("value")("#title") = $this->t("Status");
    $form("value")("#options") = (
      "All" => $this->t("All"),
      1 => $this->t("Favourited"),
      0 => $this->t("Not favourited"),
    );
    $form("value")("#default_value") = isset($this->options("value")) ? $this->options("value") : 0;

    // Workaround for bug in Views: $no_operator class property has no effect.
    unset($form("operator"));
    unset($form("expose")("use_operator"));
  }

  /**
   * {@inheritdoc}
   */
  public function query() {
    $this->ensureMyTable();
    $config = (
      "table" => "favourites",
      "field" => "entity_id",
      "left_table" => "node_field_data",
      "left_field" => "nid",
      "operator" => "=",
    );
    $join = Views::pluginManager("join")->createInstance("standard", $config);

    $this->query->addRelationship("favs", $join, "node_field_data");
    $this->query->addWhere(0, $this->tableAlias . ".nid", "favs.entity_id", "=");
  }

}

tagging – ExifTool command (Windows 10) to move files to a separate directory if the modified-date is later than the date-taken

I’m very new to this, please be gentle. My aim is to identify, and separate, original (unamended) photos, from several thousands of amended photos. Often with the same name but different directory.

Thought I should try to identify the amended files – presumably where these two dates differed ? – and label them or move them away to another directory.

I’ve tried to formulate a command by copying bits of various advice on this site
exiftool -if “/^$datetimeoriginal/ !~ $filemodifydate -r.”
is as far as I got but I do not understand why datetimeoriginal had different symbols surrounding it compared to filemodifydate, and I don’t know if I should use NOT instead of !~

Please can you help formulate a command line for me (Windows 10), which identifies the amended image files and also tags, moves or renames them. Thanks guys.

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123