text:
<?php
/**
 * @package WPSEO\Admin
 */

/**
 * This class handles the pointers used in the introduction tour.
 *
 * @todo Add an introductory pointer on the edit post page too.
 */
class WPSEO_Pointers {

	/**
	 * @var object Instance of this class
	 */
	public static $instance;

	/**
	 * @var array Holds the buttons to be put out
	 */
	private $button_array;

	/**
	 * @var array Holds the admin pages we have pointers for and the callback that generates the pointers content
	 */
	private $admin_pages = array(
		'dashboard' => 'dashboard_pointer',
		'titles'    => 'titles_pointer',
		'social'    => 'social_pointer',
		'xml'       => 'xml_sitemaps_pointer',
		'advanced'  => 'advanced_pointer',
		'licenses'  => 'licenses_pointer',
	);

	/**
	 * Class constructor.
	 */
	private function __construct() {
		if ( current_user_can( 'manage_options' ) ) {

			if ( ! get_user_meta( get_current_user_id(), 'wpseo_ignore_tour' ) ) {
				wp_enqueue_style( 'wp-pointer' );
				wp_enqueue_script( 'jquery-ui' );
				wp_enqueue_script( 'wp-pointer' );
				add_action( 'admin_print_footer_scripts', array( $this, 'intro_tour' ) );
			}
		}
	}

	/**
	 * Get the singleton instance of this class
	 *
	 * @return object
	 */
	public static function get_instance() {
		if ( ! ( self::$instance instanceof self ) ) {
			self::$instance = new self();
		}

		return self::$instance;
	}

	/**
	 * Load the introduction tour
	 */
	public function intro_tour() {
		global $pagenow;

		$page = preg_replace( '/^(wpseo_)/', '', filter_input( INPUT_GET, 'page' ) );

		if ( 'admin.php' === $pagenow && array_key_exists( $page, $this->admin_pages ) ) {
			$this->do_page_pointer( $page );
		}
		else {
			$this->start_tour_pointer();
		}
	}

	/**
	 * Prints the pointer script
	 *
	 * @param string $selector The CSS selector the pointer is attached to.
	 * @param array  $options  The options for the pointer.
	 */
	public function print_scripts( $selector, $options ) {
		// Button1 is the close button, which always exists.
		$button_array_defaults = array(
			'button2' => array(
				'text'     => false,
				'function' => '',
			),
			'button3' => array(
				'text'     => false,
				'function' => '',
			),
		);
		$this->button_array = wp_parse_args( $this->button_array, $button_array_defaults );
		?>

	<?php
	}

	/**
	 * Render button 2, if needed
	 */
	private function button2() {
		if ( $this->button_array['button2']['text'] ) {
			?>
			lastOpenedPointer.find( '#pointer-close' ).after('' +
				'<?php echo $this->button_array['button2']['text']; ?>' + '');
			lastOpenedPointer.find('#pointer-primary').click(function () {
			<?php echo $this->button_array['button2']['function']; ?>
			});
		<?php
		}
	}

	/**
	 * Render button 3, if needed. This is the previous button in most cases
	 */
	private function button3() {
		if ( $this->button_array['button3']['text'] ) {
			?>
			lastOpenedPointer.find('#pointer-primary').after('' +
				'<?php echo $this->button_array['button3']['text']; ?>' + '');
			lastOpenedPointer.find('#pointer-ternary').click(function () {
			<?php echo $this->button_array['button3']['function']; ?>
			});
		<?php }
	}

	/**
	 * Show a pointer that starts the tour for Yoast SEO
	 */
	private function start_tour_pointer() {
		$selector = 'li.toplevel_page_wpseo_alerts a[href="admin.php?page=' . WPSEO_Admin::PAGE_IDENTIFIER . '"]';
		$content  = '
' . __( 'Congratulations!', 'wordpress-seo' ) . '
'
					/* translators: %1$s expands to Yoast SEO */
		            . '
' . sprintf( __( 'You’ve just installed %1$s! Click “Start Tour” to view a quick introduction of this plugin’s core functionality.', 'wordpress-seo' ), 'Yoast SEO' ) . '
';
		$opt_arr  = array(
			'content'  => $content,
			'position' => array( 'edge' => 'bottom', 'align' => 'center' ),
		);

		$this->button_array['button2']['text']     = __( 'Start Tour', 'wordpress-seo' );
		$this->button_array['button2']['function'] = sprintf( 'document.location="%s";', admin_url( 'admin.php?page=' . WPSEO_Admin::PAGE_IDENTIFIER ) );

		$this->print_scripts( $selector, $opt_arr );
	}

	/**
	 * Shows a pointer on the proper pages
	 *
	 * @param string $page Admin page key.
	 */
	private function do_page_pointer( $page ) {
		$selector = '#wpseo-title';

		$pointer = call_user_func( array( $this, $this->admin_pages[ $page ] ) );

		$opt_arr = array(
			'content'      => $pointer['content'],
			'position'     => array(
				'edge'  => 'top',
				'align' => ( is_rtl() ) ? 'left' : 'right',
			),
			'pointerWidth' => 450,
		);
		if ( isset( $pointer['next_page'] ) ) {
			$this->button_array['button2'] = array(
				'text'     => __( 'Next', 'wordpress-seo' ),
				'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_' . $pointer['next_page'] ) . '";',
			);
		}
		if ( isset( $pointer['prev_page'] ) ) {
			$this->button_array['button3'] = array(
				'text'     => __( 'Previous', 'wordpress-seo' ),
				'function' => 'window.location="' . admin_url( 'admin.php?page=wpseo_' . $pointer['prev_page'] ) . '";',
			);
		}
		$this->print_scripts( $selector, $opt_arr );
	}

	/**
	 * Returns the content of the General Settings page pointer
	 *
	 * @return array
	 */
	private function dashboard_pointer() {
		global $current_user;

		return array(
			'content'   => '
' . __( 'General settings', 'wordpress-seo' ) . '
'
				/* translators: %1$s expands to Yoast SEO */
			               . '
' . sprintf( __( 'These are the General settings for %1$s, here you can restart this tour or revert the %1$s settings to default.', 'wordpress-seo' ), 'Yoast SEO' ) . '
'
			               . '
' . __( 'Tab: Your Info / Company Info', 'wordpress-seo' ) . '
' . __( 'Add some info here needed for Google\'s Knowledge Graph.', 'wordpress-seo' ) . '
'
			               . '
' . __( 'Tab: Webmaster Tools', 'wordpress-seo' ) . '
' . __( 'You can add the verification codes for the different Webmaster Tools programs here. We highly encourage you to check out both Google and Bing’s Webmaster Tools.', 'wordpress-seo' ) . '
'
			               . '
' . __( 'Tab: Security', 'wordpress-seo' ) . '
' . __( 'Determine who has access to the plugins advanced settings on the post edit screen.', 'wordpress-seo' ) . '
'

				/* translators: %1$s expands to Yoast SEO */
			               . '
' . sprintf( __( 'More %1$s', 'wordpress-seo' ), 'Yoast SEO' ) . '
'

				/* @todo What about this translation */
	   					   . sprintf( __( 'There’s more to learn about WordPress & SEO than just using this plugin. A great start is our article %1$sthe definitive guide to WordPress SEO%2$s.', 'wordpress-seo' ), '', '' )
						   . '
'
			               . '
' . __( 'Subscribe to our Newsletter', 'wordpress-seo' ) . '
'
				/* translators: %1$s expands to Yoast SEO */
			               . sprintf( __( 'If you would like us to keep you up-to-date regarding %1$s and other plugins by Yoast, subscribe to our newsletter:', 'wordpress-seo' ), 'Yoast SEO' ) . '
'
			               . '<form target="_blank" action="http://yoast.us1.list-manage1.com/subscribe/post?u=ffa93edfe21752c921f860358&id=972f1c9122" method="post" selector="newsletter-form" accept-charset="' . esc_attr( get_bloginfo( 'charset' ) ) . '">'
			               . '
'
			               . '<input style="margin: 5px; color:#666" name="EMAIL" value="' . esc_attr( $current_user->user_email ) . '" selector="newsletter-email" placeholder="' . __( 'Email', 'wordpress-seo' ) . '"/>'
			               . '<input type="hidden" name="group" value="2"/>'
			               . '<button type="submit" class="button button-primary">' . __( 'Subscribe', 'wordpress-seo' ) . '</button>'
			               . '
'
			               . '</form>',
			'next_page' => 'titles',
		);
	}

	/**
	 * Returns the content of the titles page pointer
	 *
	 * @return array
	 */
	private function titles_pointer() {
		return array(
			'content'   => '
' . __( 'Title & Metas settings', 'wordpress-seo' ) . '
'
			               . '
' . __( 'This is where you	set the titles and meta-information for all your post types, taxonomies, archives, special pages and for your homepage. The page is divided into different tabs. Make sure you check ’em all out!', 'wordpress-seo' ) . '
'
			               . '
' . __( 'Sitewide settings', 'wordpress-seo' ) . '
' . __( 'The first tab will show you site-wide settings for titles, normally you\'ll only need to change the Title Separator.', 'wordpress-seo' ) . '
'
			               . '
' . __( 'Templates and settings', 'wordpress-seo' ) . '
' . sprintf( __( 'Now click on the ‘%1$sPost Types%2$s’-tab, as this will be our example.', 'wordpress-seo' ), '', 				       '' ) . '
' . __( 'The templates are built using variables. You can find all these variables in the help tab (in the top-right corner of the page). The settings allow you to set specific behavior for the post types.', 'wordpress-seo' ) . '
'
			               . '
' . __( 'Archives', 'wordpress-seo' ) . '
' . __( 'On the archives tab you can set templates for specific pages like author archives, search results and more.', 'wordpress-seo' )
			               . '
' . __( 'Other', 'wordpress-seo' ) . '
' . __( 'On the Other tab you can change sitewide meta settings, like enable meta keywords.', 'wordpress-seo' ),
			'next_page' => 'social',
			'prev_page' => 'dashboard',
		);
	}

	/**
	 * Returns the content of the social page pointer
	 *
	 * @return array
	 */
	private function social_pointer() {
		return array(
			'content'   => '
' . __( 'Social settings', 'wordpress-seo' ) . '
'
			               . '
' . __( 'Facebook', 'wordpress-seo' ) . '
' . sprintf( __( 'On this tab you can enable the %1$sFacebook Open Graph%2$s functionality from this plugin, as well as assign a Facebook user or Application to be the admin of your site, so you can view the Facebook insights.', 'wordpress-seo' ), '', '' ) . '
'
			               . '
' . __( 'The frontpage settings allow you to set meta-data for your homepage, whereas the default settings allow you to set a fallback for all posts/pages without images. ', 'wordpress-seo' ) . '
'
			               . '
' . __( 'Twitter', 'wordpress-seo' ) . '
' . sprintf( __( 'With %1$sTwitter Cards%2$s, you can attach rich photos, videos and media experience to tweets that drive traffic to your website. Simply check the box, sign up for the service, and users who Tweet links to your content will have a “Card” added to the tweet that’s visible to all of their followers.', 'wordpress-seo' ), '', '' ) . '
'
			               . '
' . __( 'Pinterest', 'wordpress-seo' ) . '
' . __( 'On this tab you can verify your site with Pinterest and enter your Pinterest account.', 'wordpress-seo' ) . '
'
			               . '
' . __( 'Google+', 'wordpress-seo' ) . '
' . sprintf( __( 'If you have a Google+ page for your business, add that URL here and link it on your %1$sGoogle+%2$s page’s about page.', 'wordpress-seo' ), '', '' ) . '
',
			'next_page' => 'xml',
			'prev_page' => 'titles',
		);
	}

	/**
	 * Returns the content of the social page pointer
	 *
	 * @return array
	 */
	private function xml_sitemaps_pointer() {
		return array(
			'content'   => '
' . __( 'XML Sitemaps', 'wordpress-seo' ) . '
'
			               . '
' . __( 'What are XML sitemaps?', 'wordpress-seo' ) . '
' . __( 'A Sitemap is an XML file that lists the URLs for a site. It allows webmasters to include additional information about each URL: when it was last updated, how often it changes, and how important it is in relation to other URLs in the site. This allows search engines to crawl the site more intelligently.', 'wordpress-seo' ) . '
'
			               . '
' . __( 'What does the plugin do with XML Sitemaps?', 'wordpress-seo' ) . '
' . __( 'This plugin adds XML sitemaps to your site. The sitemaps are automatically updated when you publish a new post, page or custom post and Google and Bing will be automatically notified.', 'wordpress-seo' ) . '
'
			               . '
' . __( 'If you want to exclude certain post types and/or taxonomies, you can also set that on this page.', 'wordpress-seo' ) . '
'
			               . '
' . __( 'Is your webserver low on memory? Decrease the entries per sitemap (default: 1000) to reduce load.', 'wordpress-seo' ) . '
',
			'next_page' => 'advanced',
			'prev_page' => 'social',
		);
	}

	/**
	 * Returns the content of the advanced page pointer
	 *
	 * @return array
	 */
	private function advanced_pointer() {
		return array(
			'content'   => '
' . __( 'Advanced Settings', 'wordpress-seo' ) . '

' . __( 'All of the options on these tabs are for advanced users only, if you don’t know whether you should check any, don’t touch them.', 'wordpress-seo' ) . '
',
			'next_page' => 'licenses',
			'prev_page' => 'xml',
		);
	}

	/**
	 * Returns the content of the extensions and licenses page pointer
	 *
	 * @return array
	 */
	private function licenses_pointer() {
		return array(
			'content'   => '
' . __( 'Extensions and Licenses', 'wordpress-seo' ) . '
'
			               . '
' . __( 'Extensions', 'wordpress-seo' ) . '
'
				/* translators: %1$s expands to Yoast SEO, %2$s to Yoast SEO Premium, %3$s and %4$s to an anchor with link about our premium plugins */
						   . sprintf( __( 'The powerful functions of %1$s can be extended with %3$sYoast premium plugins%4$s. These premium plugins require the installation of %1$s or %2$s and add specific functionality. You can read all about the Yoast Premium Plugins %3$shere%4$s.', 'wordpress-seo' ), 'Yoast SEO', 'Yoast SEO Premium', '', '' )
						   . '
'
			               . '
' . __( 'Licenses', 'wordpress-seo' ) . '
'
				/* translators: %1$s expands to Yoast SEO Premium */
				           . sprintf( __( 'Once you’ve purchased %1$s or any other premium Yoast plugin, you’ll have to enter a license key. You can do so on the Licenses-tab. Once you’ve activated your premium plugin, you can use all its powerful features.', 'wordpress-seo' ), 'Yoast SEO Premium' )
				           . '
'
			               . '
' . __( 'Like this plugin?', 'wordpress-seo' ) . '
' . sprintf( __( 'So, we’ve come to the end of the tour. If you like the plugin, please %srate it 5 stars on WordPress.org%s!', 'wordpress-seo' ), '', '' ) . '
'
			               . '
' . sprintf( __( 'Thank you for using our plugin and good luck with your SEO!

Best,
Team Yoast - %1$sYoast.com%2$s', 'wordpress-seo' ), '', '' ) . '
',
			'prev_page' => 'advanced',
		);
	}

	/**
	 * Extending the current page URL with two params to be able to ignore the tour.
	 *
	 * @return mixed
	 */
	private function get_ignore_url() {
		$arr_params = array(
			'wpseo_restart_tour' => false,
			'wpseo_ignore_tour'  => '1',
			'nonce'              => wp_create_nonce( 'wpseo-ignore-tour' ),
		);

		return esc_url( add_query_arg( $arr_params ) );
	}
} /* End of class */


text:
package rzaharov.servlets.servlet;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.sql.*;
import java.util.ArrayList;
import java.util.List;

/**
 * Класс для соединения с бд.
 * @author Ryslan Zaharov (mailto:Ryslan8906137@yandex.ru).
 * @version 01.
 * @since 02.05.18.
 */

public class UserStore {

    private static final Logger log = LoggerFactory.getLogger(UserStore.class);

    public static Connection conn;

    private String URL = "jdbc:postgresql://localhost:5432/java_a_from_z";

    private static volatile UserStore instance;
    private static Object mutex = new Object();

    public static UserStore getInstance() {
        UserStore result = instance;
        if (instance == null) {
            synchronized (mutex) {
                result = instance;
                if (result == null)
                    instance = result = new UserStore();
            }
        }
        return result;
    }

    private UserStore() {
        try {
            Class.forName("org.postgresql.Driver");
            conn = DriverManager.getConnection(URL, "postgres", "");
            conn.prepareStatement(SqlQuery.CREATE_TABLE).executeUpdate();
        } catch (Exception e) {
            log.error(e.getMessage(), e);
        }
    }

    public boolean isCredentional(String email, String password) {
        boolean exists = false;
        if (!email.isEmpty() && !password.isEmpty()) {
            User user = select(email);
            if (user.getEmail() != null)
            if (user.getEmail().equals(email) && user.getPassword().equals(password)) {
                exists = true;
            }
        }
        return exists;
    }

    public int insert(User user) {
        int i = 0;
        try(PreparedStatement insert = conn.prepareStatement(SqlQuery.INSERT)) {
            insert.setString(1, user.getEmail());
            insert.setString(2, user.getName());
            insert.setString(3, user.getLogin());
            insert.setTimestamp(4, user.getCreateDate());
            insert.setString(5, user.getPassword());
            insert.setString(6, user.getRole());
            insert.setString(7, user.getCountry());
            insert.setString(8, user.getCity());
            i = insert.executeUpdate();
        } catch (SQLException e) {
            log.error(e.getMessage(), e);
        }
        return i;
    }

    public List<User> select() {
        List<User> usersList = new ArrayList<>();
        try {
            PreparedStatement select = conn.prepareStatement(SqlQuery.SELECT);
            ResultSet rs = select.executeQuery();
            while (rs.next()) {
                User user = new User();
                user.setEmail(rs.getString("email"));
                user.setName(rs.getString("name"));
                user.setLogin(rs.getString("login"));
                user.setCreateDate(rs.getTimestamp("date"));
                user.setPassword(rs.getString("password"));
                user.setRole(rs.getString("role"));
                user.setCountry(rs.getString("country"));
                user.setCity(rs.getString("city"));
                usersList.add(user);
            }
        } catch (SQLException e) {
            log.error(e.getMessage(), e);
        }
        return usersList;
    }

    public User select(String email) {
        User user = new User();
        try {
            PreparedStatement select = conn.prepareStatement(SqlQuery.SELECT_EMAIL);
            select.setString(1, email);
            ResultSet rs = select.executeQuery();
            if (rs.next()) {
                user.setEmail(rs.getString("email"));
                user.setName(rs.getString("name"));
                user.setLogin(rs.getString("login"));
                user.setCreateDate(rs.getTimestamp("date"));
                user.setPassword(rs.getString("password"));
                user.setRole(rs.getString("role"));
                user.setCountry(rs.getString("country"));
                user.setCity(rs.getString("city"));
            }
        } catch (SQLException e) {
            log.error(e.getMessage(), e);
        }
        return user;
    }

    public int update(String email, User user) {
        int i = 0;
        try(final PreparedStatement update = conn.prepareStatement(SqlQuery.UPDATE)) {
            update.setString(1, user.getEmail());
            update.setString(2, user.getName());
            update.setString(3, user.getLogin());
            update.setTimestamp(4, user.getCreateDate());
            update.setString(5, user.getPassword());
            update.setString(6, user.getRole());
            update.setString(7, user.getCountry());
            update.setString(8, user.getCity());
            update.setString(9, email);
            i = update.executeUpdate();
        } catch (SQLException e) {
            log.error(e.getMessage(), e);
        }
        return i;
    }

    public int delete(String email) {
        int i = 0;
        try(final PreparedStatement delete = conn.prepareStatement(SqlQuery.DELETE)) {
            delete.setString(1, email);
            i = delete.executeUpdate();
        } catch (SQLException e) {
            log.error(e.getMessage(), e);
        }
        return i;
    }

    public void close() {
        try {
            conn.close();
        } catch (SQLException e) {
            log.error(e.getMessage(), e);
        } finally {
            try {
                conn.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
    }

}

redpajama_set_name: RedPajamaGithub


text:
#define QUAD	1

#include <xlocale.h>

extern long long int ____strtoll_l_internal (const char *, char **, int, int,
					     __locale_t);

#include <strtol_l.c>


text: CookBook Java Program


text:
<?php

namespace Drupal\Tests\Component\Utility;

use Drupal\Component\Utility\NestedArray;
use PHPUnit\Framework\TestCase;

/**
 * @coversDefaultClass \Drupal\Component\Utility\NestedArray
 * @group Utility
 */
class NestedArrayTest extends TestCase {

  /**
   * Form array to check.
   *
   * @var array
   */
  protected $form;

  /**
   * Array of parents for the nested element.
   *
   * @var array
   */
  protected $parents;

  /**
   * {@inheritdoc}
   */
  protected function setUp(): void {
    parent::setUp();

    // Create a form structure with a nested element.
    $this->form['details']['element'] = [
     '#value' => 'Nested element',
    ];

    // Set up parent array.
    $this->parents = ['details', 'element'];
  }

  /**
   * Tests getting nested array values.
   *
   * @covers ::getValue
   */
  public function testGetValue() {
    // Verify getting a value of a nested element.
    $value = NestedArray::getValue($this->form, $this->parents);
    $this->assertSame('Nested element', $value['#value'], 'Nested element value found.');

    // Verify changing a value of a nested element by reference.
    $value = &NestedArray::getValue($this->form, $this->parents);
    $value['#value'] = 'New value';
    $value = NestedArray::getValue($this->form, $this->parents);
    $this->assertSame('New value', $value['#value'], 'Nested element value was changed by reference.');
    $this->assertSame('New value', $this->form['details']['element']['#value'], 'Nested element value was changed by reference.');

    // Verify that an existing key is reported back.
    $key_exists = NULL;
    NestedArray::getValue($this->form, $this->parents, $key_exists);
    $this->assertTrue($key_exists, 'Existing key found.');

    // Verify that a non-existing key is reported back and throws no errors.
    $key_exists = NULL;
    $parents = $this->parents;
    $parents[] = 'foo';
    NestedArray::getValue($this->form, $parents, $key_exists);
    $this->assertFalse($key_exists, 'Non-existing key not found.');
  }

  /**
   * Tests setting nested array values.
   *
   * @covers ::setValue
   */
  public function testSetValue() {
    $new_value = [
      '#value' => 'New value',
      '#required' => TRUE,
    ];

    // Verify setting the value of a nested element.
    NestedArray::setValue($this->form, $this->parents, $new_value);
    $this->assertSame('New value', $this->form['details']['element']['#value'], 'Changed nested element value found.');
    $this->assertTrue($this->form['details']['element']['#required'], 'New nested element value found.');
  }

  /**
   * Tests force-setting values.
   *
   * @covers ::setValue
   */
  public function testSetValueForce() {
    $new_value = [
      'one',
    ];
    $this->form['details']['non-array-parent'] = 'string';
    $parents = ['details', 'non-array-parent', 'child'];
    NestedArray::setValue($this->form, $parents, $new_value, TRUE);
    $this->assertSame($new_value, $this->form['details']['non-array-parent']['child'], 'The nested element was not forced to the new value.');
  }

  /**
   * Tests unsetting nested array values.
   *
   * @covers ::unsetValue
   */
  public function testUnsetValue() {
    // Verify unsetting a non-existing nested element throws no errors and the
    // non-existing key is properly reported.
    $key_existed = NULL;
    $parents = $this->parents;
    $parents[] = 'foo';
    NestedArray::unsetValue($this->form, $parents, $key_existed);
    $this->assertTrue(isset($this->form['details']['element']['#value']), 'Outermost nested element key still exists.');
    $this->assertFalse($key_existed, 'Non-existing key not found.');

    // Verify unsetting a nested element.
    $key_existed = NULL;
    NestedArray::unsetValue($this->form, $this->parents, $key_existed);
    $this->assertFalse(isset($this->form['details']['element']), 'Removed nested element not found.');
    $this->assertTrue($key_existed, 'Existing key was found.');
  }

  /**
   * Tests existence of array key.
   */
  public function testKeyExists() {
    // Verify that existing key is found.
    $this->assertTrue(NestedArray::keyExists($this->form, $this->parents), 'Nested key found.');

    // Verify that non-existing keys are not found.
    $parents = $this->parents;
    $parents[] = 'foo';
    $this->assertFalse(NestedArray::keyExists($this->form, $parents), 'Non-existing nested key not found.');
  }

  /**
   * Tests NestedArray::mergeDeepArray().
   *
   * @covers ::mergeDeep
   * @covers ::mergeDeepArray
   */
  public function testMergeDeepArray() {
    $link_options_1 = [
      'fragment' => 'x',
      'attributes' => ['title' => 'X', 'class' => ['a', 'b']],
      'language' => 'en',
    ];
    $link_options_2 = [
      'fragment' => 'y',
      'attributes' => ['title' => 'Y', 'class' => ['c', 'd']],
      'absolute' => TRUE,
    ];
    $expected = [
      'fragment' => 'y',
      'attributes' => ['title' => 'Y', 'class' => ['a', 'b', 'c', 'd']],
      'language' => 'en',
      'absolute' => TRUE,
    ];
    $this->assertSame($expected, NestedArray::mergeDeepArray([$link_options_1, $link_options_2]), 'NestedArray::mergeDeepArray() returned a properly merged array.');
    // Test wrapper function, NestedArray::mergeDeep().
    $this->assertSame($expected, NestedArray::mergeDeep($link_options_1, $link_options_2), 'NestedArray::mergeDeep() returned a properly merged array.');
  }

  /**
   * Tests that arrays with implicit keys are appended, not merged.
   *
   * @covers ::mergeDeepArray
   */
  public function testMergeImplicitKeys() {
    $a = [
      'subkey' => ['X', 'Y'],
    ];
    $b = [
      'subkey' => ['X'],
    ];

    // Drupal core behavior.
    $expected = [
      'subkey' => ['X', 'Y', 'X'],
    ];
    $actual = NestedArray::mergeDeepArray([$a, $b]);
    $this->assertSame($expected, $actual, 'drupal_array_merge_deep() creates new numeric keys in the implicit sequence.');
  }

  /**
   * Tests that even with explicit keys, values are appended, not merged.
   *
   * @covers ::mergeDeepArray
   */
  public function testMergeExplicitKeys() {
    $a = [
      'subkey' => [
        0 => 'A',
        1 => 'B',
      ],
    ];
    $b = [
      'subkey' => [
        0 => 'C',
        1 => 'D',
      ],
    ];

    // Drupal core behavior.
    $expected = [
      'subkey' => [
        0 => 'A',
        1 => 'B',
        2 => 'C',
        3 => 'D',
      ],
    ];
    $actual = NestedArray::mergeDeepArray([$a, $b]);
    $this->assertSame($expected, $actual, 'drupal_array_merge_deep() creates new numeric keys in the explicit sequence.');
  }

  /**
   * Tests that array keys values on the first array are ignored when merging.
   *
   * Even if the initial ordering would place the data from the second array
   * before those in the first one, they are still appended, and the keys on
   * the first array are deleted and regenerated.
   *
   * @covers ::mergeDeepArray
   */
  public function testMergeOutOfSequenceKeys() {
    $a = [
      'subkey' => [
        10 => 'A',
        30 => 'B',
      ],
    ];
    $b = [
      'subkey' => [
        20 => 'C',
        0 => 'D',
      ],
    ];

    // Drupal core behavior.
    $expected = [
      'subkey' => [
        0 => 'A',
        1 => 'B',
        2 => 'C',
        3 => 'D',
      ],
    ];
    $actual = NestedArray::mergeDeepArray([$a, $b]);
    $this->assertSame($expected, $actual, 'drupal_array_merge_deep() ignores numeric key order when merging.');
  }

  /**
   * @covers ::filter
   * @dataProvider providerTestFilter
   */
  public function testFilter($array, $callable, $expected) {
    $this->assertEquals($expected, NestedArray::filter($array, $callable));
  }

  public function providerTestFilter() {
    $data = [];
    $data['1d-array'] = [
      [0, 1, '', TRUE], NULL, [1 => 1, 3 => TRUE],
    ];
    $data['1d-array-callable'] = [
      [0, 1, '', TRUE],
      function ($element) {
        return $element === '';
      },
      [2 => ''],
    ];
    $data['2d-array'] = [
      [[0, 1, '', TRUE], [0, 1, 2, 3]], NULL, [0 => [1 => 1, 3 => TRUE], 1 => [1 => 1, 2 => 2, 3 => 3]],
    ];
    $data['2d-array-callable'] = [
      [[0, 1, '', TRUE], [0, 1, 2, 3]],
      function ($element) {
        return is_array($element) || $element === 3;
      },
      [0 => [], 1 => [3 => 3]],
    ];

    return $data;
  }

}


text:
<Configuration>
  <Message>
    <Interval>0</Interval>
    <CSV_Location>ud_register/csv/obj_get-new.csv</CSV_Location>
  </Message>
  <ZeroMQ>
    <Outbound_Connection>tcp://localhost:5555</Outbound_Connection>
    <Outbound_Connection_Type>REQ</Outbound_Connection_Type>
  </ZeroMQ>
  <Logging>
    <Log_File>obj_get.log</Log_File>
    <Log_Level>Debug</Log_Level>
  </Logging>
</Configuration>