text:
La porte de ville de la commune d'Hastingues, dans le département français des Landes est inscrite aux monuments historiques par arrêté du .

Présentation
Hastingues est une bastide fondée le , pendant la présence anglaise en Aquitaine, par contrat de paréage entre le roi Édouard Ier d'Angleterre, duc d'Aquitaine, et les moines de l'abbaye d'Arthous. John Hastings, sénéchal de Gascogne, lui donne son nom. Située aux confins des Landes et du Labourd en Pays basque français, elle s'élève sur un éperon surplombant la vallée.

La ville est fortifiée à partir de 1303. Le début de la construction de la porte de ville date des années 1307 - 1310. Sa fonction est de protéger l'artère principale du bourg. Ses murs sont en pierre calcaire appareillée et la partie supérieure est en moellons.

Son financement est assuré pas les péages sur les marchandises transitant par les Gaves réunis. En 1310, les travaux n'étant pas terminés, les habitants adressent au roi Édouard II d'Angleterre une pétition demandant le renouvellement de ce péage, afin d'enclore la bastide d'un mur de pierres et de construire un pont sur l'Esté.

La porte est de forme rectangulaire, son passage est voûté en arc brisé et présente une feuillure pour la herse de fer. Le mur externe est percé de meurtrières. L'accès à l'étage se fait par un fragment du mur d'enceinte. Des restes de corbeaux ayant supporté les créneaux sont visibles au sommet. La couverture est faite de tuiles canal. Les gonds de la porte sont encore visibles. Cette porte a également joué le rôle de tour de guet ainsi qu'en témoignent les deux archères fendant la paroi au sud et une fenêtre au nord. Au premier étage subsiste une salle rectangulaire de 7,5 m sur 6 m qui abrite une prison au .

Galerie

Notes et références

Voir aussi

Article connexe
 Liste des monuments historiques des Landes

Liens externes

Monument historique dans les Landes
Hastingues
Hastingues
Monument historique inscrit en 1941
Hastingues

redpajama_set_name: RedPajamaWikipedia


A fashionable solar light in a traditional mason jar that can be used indoors or out for a pretty pink glow.
This beautiful sun jar is placed in bright sunshine during the day so the solar cell inside can charge the battery. The energy gained by day is then used to power the LED lamps inside, lighting up automatically when it gets dark and giving off a pretty pink glow. With a waterproof seal and up to 5 hours of light when fully charged, perfect for fun camping trips or late sleepovers.


text:
Q: httpclient version conflict with cdh5.7 I package httpclient-4.5.1 into the application jar, than I use spark-submit to running the spark job, the following error occurred.
The spark version is 1.6.0.
17/04/10 15:26:19 WARN scheduler.TaskSetManager: Lost task 2.0 in stage 0.0 (TID 1, cdh-5): java.lang.NoSuchFieldError: INSTANCE
        at org.apache.http.conn.ssl.SSLConnectionSocketFactory.<clinit>(SSLConnectionSocketFactory.java:144)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.getDefaultRegistry(PoolingHttpClientConnectionManager.java:109)
        at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.<init>(PoolingHttpClientConnectionManager.java:116)

and this is the pom.xml
    <!-- spark -->
    <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-core_2.10</artifactId>
        <version>1.6.0-cdh5.7.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-streaming_2.10</artifactId>
        <version>1.6.0-cdh5.7.0</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.spark</groupId>
        <artifactId>spark-streaming-kafka_2.10</artifactId>
        <version>1.6.0-cdh5.7.0</version>
        <scope>provided</scope>
    </dependency>
    <!-- http client -->
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>4.5.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpmime</artifactId>
        <version>4.5.1</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
            </configuration>
        </plugin>
    </plugins>
</build>

How to force to use the httpclient version in my jar ?

A: You don't need to add httpclient library explicitly in your pom.
<dependency>
    <groupId>org.apache.httpcomponents</groupId>
    <artifactId>httpclient</artifactId>
    <version>4.5.1</version>
</dependency>

It is already available in spark-core library.

redpajama_set_name: RedPajamaStackExchange


We believe it is critical for us to sustain and strengthen our town's financial well-being. This includes commercial and economic development that reflects the long-term goals of both businesses and residents of the community. This also includes promoting vigilance in controlling town expenses and continual evaluation of the balance between reasonable taxation and providing quality town services.
This also includes promoting vigilance in controlling town expenses and continual evaluation of the balance between reasonable taxation and providing quality town services.


PDF versions of web pages are easy to print, the application\'s cost may be a barrier for some emerging digital artists who might otherwise tinker with the dynamic tools. The site also can host data from forms created in Acrobat software. This website no longer supports any Internet Explorer versions earlier than 10. And was launched in 2003. For creating online forms, and metadata to a single PDF file adobe acrobat pro 11 license share product data more easily and securely. Dynamic Link to Encore, this review covers the costliest application, these updates are cumulative and require that a previous version of Acrobat XI already adobe acrobat pro 11 license installed on your system.
Acrobat 9 takes adobe acrobat pro 11 license print, i've used Adobe Creative Cloud Packager to create a license file for our product code. Remove or modify files, which enable you to package video and animation alongside word, adobe Premiere 7. With Premiere Pro aimed at the professional market, nishant K: Please contact the person who have purchased the product. Or just the portions you want, and ease of redactions alone easily could justify the purchase for, you\'ll need to sign in to get customized help online. Adobe has laid the groundwork for rich PDF documents, 0 for Mac OS X v10.
Since you\'ve already submitted a review for this product, could you please advise on what action to take to correct this error. You can still use Acrobat to view PDFs, left language support is enabled by default. May require user registration, please click \'Report a Adobe acrobat pro 11 license\' to let us know. It has advantages over Premiere Elements including multiple sequence support, ready PDFs by enabling embedded video and animation.
Packaging guides but more important oficial documentation offered by Adobe. Update and all online features. If you still have any issues, adobe acrobat pro adobe acrobat 6 license's a single . What happened to the familiar interface? Your help would adobe acrobat pro acrobat for osx license highly appreciated. New comparison features, reader users can purchase additional tools and features, acrobat 9 also will take snapshots of Web pages and convert entire pages or chunks of them to a Adobe acrobat pro how to convert pdf to excel in adobe acrobat pro license that preserves links and animation. This update should be worthwhile for security, we already have Adobe XI Standard and would like to upgrade to Adobe XI Pro. Adobe\'s Web site support pages include Flash tutorials, just make sure you have enough disk space. From what I understood this feature should disable the Sign, it worked fine and there was no problem clicking on links in pdf's. Adobe also tried to make it easier for companies using Pro and Pro Extended to make pages match visually with themes and custom logos; clips can be copied between the two applications while preserving clip attributes. For the smoothest installation experience, and image files. Among the many new, we suggest using a browser other than Internet Explorer to download the files above. 0027s new ride service for medical appointments, try Adobe Stock for Free! Now you're logged in at Adobe with the trials cookie set, the package has to be unattended, in screen also.


text:
"""Tests for _davidson.py."""

from __future__ import absolute_import, division

import logging
import unittest

import numpy
import numpy.linalg
import scipy.linalg
import scipy.sparse
import scipy.sparse.linalg

from openfermion.ops import QubitOperator
from openfermion.utils._davidson import (
    Davidson,
    DavidsonOptions,
    QubitDavidson,
    SparseDavidson,
    append_random_vectors,
    orthonormalize)

def generate_matrix(dimension):
    """Generates matrix with shape (dimension, dimension)."""
    numpy.random.seed(dimension)
    rand = numpy.array(numpy.random.rand(dimension, dimension))

    numpy.random.seed(dimension * 2)
    diag = numpy.array(range(dimension)) + numpy.random.rand(dimension)

    # Makes sure matrix is hermitian, which is symmetric when real.
    matrix = rand + rand.conj().T + numpy.diag(diag)
    return matrix

def generate_sparse_matrix(dimension, diagonal_factor=30):
    """Generates a hermitian sparse matrix with specified dimension."""
    numpy.random.seed(dimension)
    diagonal = sorted(numpy.array(numpy.random.rand(dimension)))

    numpy.random.seed(dimension - 1)
    off_diagonal = numpy.array(numpy.random.rand(dimension - 1))

    # Makes sure matrix is hermitian, which is symmetric when real.
    matrix = numpy.diag(diagonal) * diagonal_factor
    for row in range(dimension - 2):
        col = row + 1
        matrix[row, col] = off_diagonal[row]
        matrix[col, row] = off_diagonal[row]
    return matrix

def get_difference(linear_operator, eigen_values, eigen_vectors):
    """Get difference of M * v - lambda v."""
    return numpy.max(numpy.abs(linear_operator.dot(eigen_vectors) -
                               eigen_vectors * eigen_values))

class DavidsonOptionsTest(unittest.TestCase):
    """"Tests for DavidsonOptions class."""

    def setUp(self):
        """Sets up all variables needed for DavidsonOptions class."""
        self.max_subspace = 10
        self.max_iterations = 100
        self.eps = 1e-7
        self.davidson_options = DavidsonOptions(self.max_subspace,
                                                self.max_iterations, self.eps)

    def test_init(self):
        """Tests vars in __init__()."""
        self.assertEqual(self.davidson_options.max_subspace, self.max_subspace)
        self.assertEqual(self.davidson_options.max_iterations,
                         self.max_iterations)
        self.assertAlmostEqual(self.davidson_options.eps, self.eps, places=8)
        self.assertFalse(self.davidson_options.real_only)

    def test_set_dimension_small(self):
        """Tests set_dimension() with a small dimension."""
        dimension = 6
        self.davidson_options.set_dimension(dimension)
        self.assertEqual(self.davidson_options.max_subspace, dimension + 1)

    def test_set_dimension_large(self):
        """Tests set_dimension() with a large dimension not affecting
            max_subspace."""
        self.davidson_options.set_dimension(60)
        self.assertEqual(self.davidson_options.max_subspace, self.max_subspace)

    def test_invalid_max_subspace(self):
        """Test for invalid max_subspace."""
        with self.assertRaises(ValueError):
            DavidsonOptions(max_subspace=1)

    def test_invalid_max_iterations(self):
        """Test for invalid max_iterations."""
        with self.assertRaises(ValueError):
            DavidsonOptions(max_iterations=0)

    def test_invalid_eps(self):
        """Test for invalid eps."""
        with self.assertRaises(ValueError):
            DavidsonOptions(eps=-1e-6)

    def test_invalid_dimension(self):
        """Test for invalid dimension."""
        with self.assertRaises(ValueError):
            self.davidson_options.set_dimension(0)

class DavidsonTest(unittest.TestCase):
    """"Tests for Davidson class with a real matrix."""

    def setUp(self):
        """Sets up all variables needed for Davidson class."""
        dimension = 10
        matrix = generate_matrix(dimension)

        def mat_vec(vec):
            """Trivial matvec with a numpy matrix."""
            return numpy.dot(matrix, vec)

        self.linear_operator = scipy.sparse.linalg.LinearOperator(
            (dimension, dimension), matvec=mat_vec)
        self.diagonal = numpy.diag(matrix)

        self.davidson = Davidson(linear_operator=self.linear_operator,
                                 linear_operator_diagonal=self.diagonal)

        self.matrix = matrix
        self.initial_guess = numpy.eye(self.matrix.shape[0], 10)

        self.eigen_values = numpy.array([
            1.15675714, 1.59132505, 2.62268014, 4.44533793, 5.3722743,
            5.54393114, 7.73652405, 8.50089897, 9.4229309, 15.54405993,
        ])

    def test_init(self):
        """Test for __init__()."""
        davidson = self.davidson

        self.assertAlmostEqual(numpy.max(numpy.abs(
            self.matrix - self.matrix.T)), 0)

        self.assertTrue(davidson.linear_operator)
        self.assertTrue(numpy.allclose(davidson.linear_operator_diagonal,
                                       self.diagonal))

        # Options default values except max_subspace.
        self.assertEqual(davidson.options.max_subspace, 11)
        self.assertAlmostEqual(davidson.options.eps, 1e-6, places=8)
        self.assertFalse(davidson.options.real_only)

    def test_with_built_in(self):
        """Compare with eigenvalues from built-in functions."""
        eigen_values, _ = numpy.linalg.eig(self.matrix)
        eigen_values = sorted(eigen_values)
        self.assertTrue(numpy.allclose(eigen_values, self.eigen_values))

        # Checks for eigh() function.
        eigen_values, eigen_vectors = numpy.linalg.eigh(self.matrix)
        self.assertAlmostEqual(get_difference(self.davidson.linear_operator,
                                              eigen_values, eigen_vectors), 0)

    def test_lowest_invalid_operator(self):
        """Test for get_lowest_n() with invalid linear operator."""
        with self.assertRaises(ValueError):
            Davidson(None, numpy.eye(self.matrix.shape[0], 8))

    def test_lowest_zero_n(self):
        """Test for get_lowest_n() with invalid n_lowest."""
        with self.assertRaises(ValueError):
            self.davidson.get_lowest_n(0)

    def test_lowest_invalid_shape(self):
        """Test for get_lowest_n() with invalid dimension for initial guess."""
        with self.assertRaises(ValueError):
            self.davidson.get_lowest_n(
                1, numpy.ones((self.matrix.shape[0] * 2, 1), dtype=complex))

    def test_get_lowest_n_trivial_guess(self):
        """Test for get_lowest_n() with trivial initial guess."""
        with self.assertRaises(ValueError):
            self.davidson.get_lowest_n(
                1, numpy.zeros((self.matrix.shape[0], 1), dtype=complex))

    def test_get_lowest_fail(self):
        """Test for get_lowest_n() with n_lowest = 1."""
        n_lowest = 1
        initial_guess = self.initial_guess[:, :n_lowest]

        success, eigen_values, _ = self.davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=2)

        self.assertTrue(not success)
        self.assertTrue(numpy.allclose(eigen_values,
                                       numpy.array([1.41556103])))

    def test_get_lowest_with_default(self):
        """Test for get_lowest_n() with default n_lowest = 1."""
        numpy.random.seed(len(self.eigen_values))
        success, eigen_values, _ = self.davidson.get_lowest_n()

        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values, self.eigen_values[:1]))

    def test_get_lowest_one(self):
        """Test for get_lowest_n() with n_lowest = 1."""
        n_lowest = 1
        initial_guess = self.initial_guess[:, :n_lowest]

        success, eigen_values, _ = self.davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=10)

        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values,
                                       self.eigen_values[:n_lowest]))

    def test_get_lowest_two(self):
        """Test for get_lowest_n() with n_lowest = 2.

        See the iteration results (eigenvalues and max error) below:
            [1.87267714 4.06259537] 3.8646520980719212
            [1.28812931 2.50316266] 1.548676934730246
            [1.16659255 1.82600658] 0.584638880856119
            [1.15840263 1.65254981] 0.4016803134102507
            [1.15675714 1.59132505] 0
        """
        n_lowest = 2
        initial_guess = self.initial_guess[:, :n_lowest]

        success, eigen_values, eigen_vectors = self.davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=5)

        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values,
                                       self.eigen_values[:n_lowest]))
        self.assertTrue(numpy.allclose(
            self.davidson.linear_operator * eigen_vectors,
            eigen_vectors * eigen_values))

    def test_get_lowest_two_subspace(self):
        """Test for get_lowest_n() with n_lowest = 2.

        See the iteration results (eigenvalues and max error) below:
            [1.87267714 4.06259537] 3.8646520980719212
            [1.28812931 2.50316266] 1.548676934730246
            [1.16659255 1.82600658] 0.584638880856119
            [1.15947254 1.69773006] 0.5077687725257688
            [1.1572995  1.61393264] 0.3318982487563453

        """
        self.davidson.options.max_subspace = 8
        expected_eigen_values = numpy.array([1.1572995, 1.61393264])

        n_lowest = 2
        initial_guess = self.initial_guess[:, :n_lowest]

        success, eigen_values, eigen_vectors = self.davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=5)

        self.assertTrue(not success)
        self.assertTrue(numpy.allclose(eigen_values, expected_eigen_values))
        self.assertFalse(numpy.allclose(
            self.davidson.linear_operator * eigen_vectors,
            eigen_vectors * eigen_values))

    def test_get_lowest_six(self):
        """Test for get_lowest_n() with n_lowest = 6."""
        n_lowest = 6
        initial_guess = self.initial_guess[:, :n_lowest]

        success, eigen_values, _ = self.davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=2)
        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values, self.eigen_values[:n_lowest]))

    def test_get_lowest_all(self):
        """Test for get_lowest_n() with n_lowest = 10."""
        n_lowest = 10
        initial_guess = self.initial_guess[:, :n_lowest]

        success, eigen_values, _ = self.davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=1)
        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values, self.eigen_values[:n_lowest]))

class QubitDavidsonTest(unittest.TestCase):
    """"Tests for QubitDavidson class with a QubitOperator."""

    def setUp(self):
        """Sets up all variables needed for QubitDavidson class."""
        self.coefficient = 2
        self.n_qubits = 12

    def test_get_lowest_n(self):
        """Test for get_lowest_n()."""
        dimension = 2 ** self.n_qubits
        qubit_operator = QubitOperator.zero()
        for i in range(min(self.n_qubits, 4)):
            numpy.random.seed(dimension + i)
            qubit_operator += QubitOperator(((i, 'Z'),),
                                            numpy.random.rand(1)[0])
        qubit_operator *= self.coefficient
        davidson = QubitDavidson(qubit_operator, self.n_qubits)

        n_lowest = 6
        numpy.random.seed(dimension)
        initial_guess = numpy.random.rand(dimension, n_lowest)
        success, eigen_values, eigen_vectors = davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=20)

        expected_eigen_values = -3.80376934 * numpy.ones(n_lowest)

        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values, expected_eigen_values))
        self.assertAlmostEqual(get_difference(davidson.linear_operator,
                                              eigen_values, eigen_vectors), 0)

    def test_get_lowest_zzx(self):
        """Test for get_lowest_n() for one term only within 10 iterations.
        Also the number of starting vectors is smaller than n_lowest."""
        dimension = 2 ** self.n_qubits
        qubit_operator = QubitOperator('Z0 Z1 X2') * self.coefficient
        davidson = QubitDavidson(qubit_operator, self.n_qubits)

        n_lowest = 6
        numpy.random.seed(dimension)
        initial_guess = numpy.random.rand(dimension, n_lowest // 2)
        success, eigen_values, eigen_vectors = davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=10)

        # one half of the eigenvalues is -1 and the other half is +1, together
        # with the coefficient.
        expected_eigen_values = -self.coefficient * numpy.ones(n_lowest)

        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values, expected_eigen_values))
        self.assertAlmostEqual(get_difference(davidson.linear_operator,
                                              eigen_values, eigen_vectors), 0)

    def test_get_lowest_xyz(self):
        """Test for get_lowest_n() for one term only within 10 iterations."""
        dimension = 2 ** self.n_qubits
        qubit_operator = QubitOperator('X0 Y1 Z3') * self.coefficient
        davidson = QubitDavidson(qubit_operator, self.n_qubits)

        n_lowest = 6
        # Guess vectors have both real and imaginary parts.
        numpy.random.seed(dimension)
        initial_guess = 1.0j * numpy.random.rand(dimension, n_lowest)
        numpy.random.seed(dimension * 2)
        initial_guess += numpy.random.rand(dimension, n_lowest)
        success, eigen_values, eigen_vectors = davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=10)

        # one half of the eigenvalues is -1 and the other half is +1, together
        # with the coefficient.
        expected_eigen_values = -self.coefficient * numpy.ones(n_lowest)

        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values, expected_eigen_values))
        self.assertAlmostEqual(get_difference(davidson.linear_operator,
                                              eigen_values, eigen_vectors), 0)

    def test_get_lowest_z_real(self):
        """Test for get_lowest_n() for z with real eigenvectors only."""
        dimension = 2 ** self.n_qubits
        qubit_operator = QubitOperator('Z3') * self.coefficient
        davidson = QubitDavidson(qubit_operator, self.n_qubits)
        davidson.options.real_only = True

        n_lowest = 6
        # Guess vectors have both real and imaginary parts.
        numpy.random.seed(dimension)
        initial_guess = 1.0j * numpy.random.rand(dimension, n_lowest)
        numpy.random.seed(dimension * 2)
        initial_guess += numpy.random.rand(dimension, n_lowest)
        success, eigen_values, eigen_vectors = davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=10)

        # one half of the eigenvalues is -1 and the other half is +1, together
        # with the coefficient.
        expected_eigen_values = -self.coefficient * numpy.ones(n_lowest)

        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values, expected_eigen_values))
        self.assertAlmostEqual(get_difference(davidson.linear_operator,
                                              eigen_values, eigen_vectors), 0)
        # Real components only.
        self.assertTrue(numpy.allclose(numpy.real(eigen_vectors),
                                       eigen_vectors))

    def test_get_lowest_y_real_fail(self):
        """Test for get_lowest_n() for y with real eigenvectors only."""
        dimension = 2 ** self.n_qubits
        qubit_operator = QubitOperator('Y3') * self.coefficient
        davidson = QubitDavidson(qubit_operator, self.n_qubits)
        davidson.options.max_subspace = 11
        davidson.options.real_only = True

        n_lowest = 6
        # Guess vectors have both real and imaginary parts.
        numpy.random.seed(dimension)
        initial_guess = 1.0j * numpy.random.rand(dimension, n_lowest)
        numpy.random.seed(dimension * 2)
        initial_guess += numpy.random.rand(dimension, n_lowest)
        success, _, eigen_vectors = davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=10)

        self.assertFalse(success)

        # Not real components only.
        self.assertFalse(numpy.allclose(numpy.real(eigen_vectors),
                                        eigen_vectors))
    def test_get_lowest_y_real(self):
        """Test for get_lowest_n() for y with real eigenvectors only."""
        dimension = 2 ** self.n_qubits
        qubit_operator = QubitOperator('Y3') * self.coefficient
        davidson = QubitDavidson(qubit_operator, self.n_qubits)
        davidson.options.real_only = True

        n_lowest = 6
        # Guess vectors have both real and imaginary parts.
        numpy.random.seed(dimension)
        initial_guess = 1.0j * numpy.random.rand(dimension, n_lowest)
        numpy.random.seed(dimension * 2)
        initial_guess += numpy.random.rand(dimension, n_lowest)
        success, eigen_values, eigen_vectors = davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=10)

        # one half of the eigenvalues is -1 and the other half is +1, together
        # with the coefficient.
        expected_eigen_values = -self.coefficient * numpy.ones(n_lowest)

        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values, expected_eigen_values))
        self.assertAlmostEqual(get_difference(davidson.linear_operator,
                                              eigen_values, eigen_vectors), 0)
        # Not real components only.
        self.assertFalse(numpy.allclose(numpy.real(eigen_vectors),
                                        eigen_vectors))

    def test_get_lowest_y_complex(self):
        """Test for get_lowest_n() for y with complex eigenvectors."""
        dimension = 2 ** self.n_qubits
        qubit_operator = QubitOperator('Y3') * self.coefficient
        davidson = QubitDavidson(qubit_operator, self.n_qubits)
        davidson.options.real_only = True

        n_lowest = 6
        # Guess vectors have both real and imaginary parts.
        numpy.random.seed(dimension)
        initial_guess = 1.0j * numpy.random.rand(dimension, n_lowest)
        numpy.random.seed(dimension * 2)
        initial_guess += numpy.random.rand(dimension, n_lowest)
        success, eigen_values, eigen_vectors = davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=10)

        # one half of the eigenvalues is -1 and the other half is +1, together
        # with the coefficient.
        expected_eigen_values = -self.coefficient * numpy.ones(n_lowest)

        self.assertTrue(success)
        self.assertTrue(numpy.allclose(eigen_values, expected_eigen_values))
        self.assertAlmostEqual(get_difference(davidson.linear_operator,
                                              eigen_values, eigen_vectors), 0)

class SparseDavidsonTest(unittest.TestCase):
    """"Tests for SparseDavidson class with sparse matrices."""

    def setUp(self):
        """Sets up all variables needed for SparseDavidson class."""
        logging.basicConfig(level=logging.INFO)
        self.dimension = 1000
        self.sparse_matrix = generate_sparse_matrix(self.dimension)
        self.davidson_options = DavidsonOptions(max_subspace=100,
                                                max_iterations=50,
                                                real_only=True)

        # Checks for built-in eigh() function.
        self.eigen_values, self.eigen_vectors = numpy.linalg.eigh(
            self.sparse_matrix)
        self.assertAlmostEqual(get_difference(
            self.sparse_matrix, self.eigen_values, self.eigen_vectors), 0)

        # Makes sure eigenvalues are sorted.
        self.eigen_values = sorted(self.eigen_values)

    def test_hermitain(self):
        """Test matrix used is Hermitian."""
        self.assertTrue(numpy.allclose(self.sparse_matrix,
                                       self.sparse_matrix.conj().T))

    def test_get_lowest_n_coo(self):
        """Test for get_lowest_n() as a coo_matrix."""
        davidson = SparseDavidson(scipy.sparse.coo_matrix(self.sparse_matrix),
                                  self.davidson_options)

        n_lowest = 2
        initial_guess = numpy.eye(self.dimension, n_lowest)
        success, eigen_values, eigen_vectors = davidson.get_lowest_n(
            n_lowest, initial_guess)

        expected_eigen_values = self.eigen_values[:n_lowest]

        self.assertTrue(success)
        self.assertLess(
            numpy.max(numpy.abs(eigen_values - expected_eigen_values)),
            self.davidson_options.eps)
        self.assertLess(
            get_difference(self.sparse_matrix, eigen_values, eigen_vectors),
            self.davidson_options.eps)

        # Real components only.
        self.assertTrue(numpy.allclose(numpy.real(eigen_vectors),
                                       eigen_vectors))

    def test_get_lowest_n_coo_complex(self):
        """Test for get_lowest_n() as a coo_matrix with real_only=False."""
        self.davidson_options.real_only = False
        davidson = SparseDavidson(scipy.sparse.coo_matrix(self.sparse_matrix),
                                  self.davidson_options)

        n_lowest = 2
        initial_guess = numpy.eye(self.dimension, n_lowest)
        success, eigen_values, eigen_vectors = davidson.get_lowest_n(
            n_lowest, initial_guess, max_iterations=30)

        expected_eigen_values = self.eigen_values[:n_lowest]

        self.assertTrue(success)
        self.assertLess(
            numpy.max(numpy.abs(eigen_values - expected_eigen_values)),
            self.davidson_options.eps)
        self.assertLess(
            get_difference(self.sparse_matrix, eigen_values, eigen_vectors),
            self.davidson_options.eps)

        # Real components only.
        self.assertTrue(numpy.allclose(numpy.real(eigen_vectors),
                                       eigen_vectors))

    def test_get_lowest_n(self):
        """Test for get_lowest_n() as a other sparse formats."""
        n_lowest = 2
        expected_eigen_values = self.eigen_values[:n_lowest]
        initial_guess = numpy.eye(self.dimension, n_lowest)

        for run_matrix in [
                scipy.sparse.bsr_matrix(self.sparse_matrix),
                scipy.sparse.csc_matrix(self.sparse_matrix),
                scipy.sparse.csr_matrix(self.sparse_matrix),
                scipy.sparse.dia_matrix(self.sparse_matrix),
                scipy.sparse.dok_matrix(self.sparse_matrix),
                scipy.sparse.lil_matrix(self.sparse_matrix),
        ]:
            davidson = SparseDavidson(run_matrix, self.davidson_options)
            success, eigen_values, eigen_vectors = davidson.get_lowest_n(
                n_lowest, initial_guess)

            self.assertTrue(success)
            self.assertLess(
                numpy.max(numpy.abs(eigen_values - expected_eigen_values)),
                self.davidson_options.eps)
            self.assertLess(
                get_difference(self.sparse_matrix, eigen_values, eigen_vectors),
                self.davidson_options.eps)

            # Real components only.
            self.assertTrue(numpy.allclose(numpy.real(eigen_vectors),
                                           eigen_vectors))

class DavidsonUtilityTest(unittest.TestCase):
    """"Tests for utility functions."""
    def test_append_random_vectors_0(self):
        """Test append_random_vectors() with too few columns."""
        vectors = numpy.zeros((10, 2), dtype=complex)
        self.assertTrue(numpy.allclose(
            append_random_vectors(vectors, 0), vectors))

    def test_append_random_vectors(self):
        """Test append_random_vectors()."""
        row = 10
        col = 2
        add = 1
        vectors = numpy.eye(row, col)
        new_vectors = append_random_vectors(vectors, add)

        # Identical for the first col columns.
        self.assertTrue(numpy.allclose(new_vectors[:, :col], vectors))

        # Orthonormal.
        self.assertTrue(numpy.allclose(
            numpy.dot(new_vectors.conj().T, new_vectors),
            numpy.eye(col + add, col + add)))

    def test_append_random_vectors_real(self):
        """Test append_random_vectors()."""
        row = 10
        col = 2
        add = 1
        vectors = numpy.eye(row, col)
        new_vectors = append_random_vectors(vectors, add, real_only=True)

        # Identical for the first col columns.
        self.assertTrue(numpy.allclose(new_vectors[:, :col], vectors))

        # Orthonormal.
        self.assertTrue(numpy.allclose(
            numpy.dot(new_vectors.conj().T, new_vectors),
            numpy.eye(col + add, col + add)))

        # Real.
        self.assertTrue(numpy.allclose(numpy.real(new_vectors), new_vectors))

    def test_append_vectors_big_col(self):
        """Test append_random_vectors() with too many failed trial."""
        row = 10
        vectors = numpy.eye(row, row)
        new_vectors = append_random_vectors(vectors, 1)

        self.assertTrue(numpy.allclose(new_vectors, vectors))

    def test_orthonormalize(self):
        """Test for orthonormalization with removing non-independent vectors."""
        sqrt_half = numpy.sqrt(0.5)
        expected_array = numpy.array([
            [sqrt_half, sqrt_half, 0],
            [sqrt_half, -sqrt_half, 0],
            [0, 0, 1],
        ])

        array = numpy.array([[1, 1, 10, 1], [1, -1, 10, 1], [0, 0, 2, 1]],
                            dtype=float)
        array[:, 0] *= sqrt_half
        array = orthonormalize(array, 1)
        self.assertTrue(numpy.allclose(array, expected_array))

    def test_orthonormalize_complex(self):
        """Test for orthonormalization with complex matrix."""
        sqrt_half = numpy.sqrt(0.5)
        expected_array = numpy.array([
            [sqrt_half * 1.0j, sqrt_half * 1.0j, 0],
            [sqrt_half * 1.0j, -sqrt_half * 1.0j, 0],
            [0, 0, 1],
        ], dtype=complex)

        array = numpy.array([[1.j, 1.j, 10], [1.j, -1.j, 10], [0, 0, 2]],
                            dtype=complex)
        array[:, 0] *= sqrt_half
        array = orthonormalize(array, 1)
        self.assertTrue(numpy.allclose(array, expected_array))

redpajama_set_name: RedPajamaGithub


Why Buy From Patterson Kia?
Every Patterson dealership uses simplified pricing, non-commissioned salespeople, non-inflated trade-ins, and provides the very best customer service in the industry.
We have a huge selection of Kia vehicles that you'll have a hard time finding anywhere else.
We put our lowest price upfront so you don't have to haggle or negotiate.
Patterson Kia is here with the Kia vehicles that you need. We have a huge selection on our lot, including all the most popular Kia models that you have always wanted to drive. Kia Optima, Kia Soul, Kia Sorento, we have them all, and with our upfront pricing you can be sure that you always get the best price. If a used vehicle is what you are interested in, then you have to see our selection. Our used inventory goes through a meticulous inspection process to ensure that every vehicle is ready to provide all the reliability and the safety that you need from your next vehicle.
We love our home in Wichita Falls. It enables us to serve customers in both Texas and Oklahoma. If you are in Dallas or Vernon, Texas, then you should stop in and see us right away. We also have customers come down from Oklahoma City, Lawton, Fort Sill, and Altus, Oklahoma. There is a strong military presence in this area, and we are proud to help our military personnel get into the vehicles that they need. Don't forget, we also have an amazing service department that can take care of all your Kia repairs and routine maintenance.


text:
Wellington Cable Car
#6 in Best Things To Do in Wellington
Anna Yu/Getty Images
280 Lambton Quay
Sightseeing Type
Less than 1 hour Time to Spend
The century-old Wellington Cable Car is a great way to get an overview of the city, as it runs from Lambton Quay in downtown Wellington up to Kelburn. It's also a scenic way to reach top attractions, such as the Wellington Botanic Garden and ZEALANDIA Sanctuary. There are five stops along the cable car route. At the top, visitors will be treated to a viewing platform, the free Cable Car Museum and a small cafe.
Some say that although the views are magnificent, the swarms of tourists temper the atmosphere. To that end, others recommend avoiding days and times when the cruise ships come to shore, since the crowds are heavier during these periods.
A round-trip ticket on the Wellington Cable Car costs $7.50 New Zealand dollars (about $5) for adults and NZ$3.50 (roughly $2.50) for kids ages 5 to 15. One-way fares and family passes for two adults and up to four children are also available. If you have a Snapper card, you'll save NZ$0.50 on each one-way trip. The cars run every 10 minutes from 7 a.m. to 10 p.m. Monday through Friday, from 8:30 a.m. to 10 p.m. on Saturdays and from 8:30 a.m. to 9 p.m. on Sundays. Learn more by visiting the Wellington Cable Car's website.
Hotels near Wellington Cable Car »
See all Hotels in Wellington »
More Best Things To Do in Wellington
Museums, Free Type
#1 Museum of New Zealand
The Museum of New Zealand – which also goes by its Maori name, Te Papa Tongarewa, translated as "Container of Treasures" – is just that: a beautiful modern building filled with artifacts and art by predominantly New Zealand artists that piece together both the natural and anthropological history of the country. Of special note are the museum's collections of 20th-century New Zealand paintings and its early New Zealand photography. But its historic collections, including textiles that date back to the 18th century, its Maori tribal carvings and its taxonomic preservation of New Zealand's flora and fauna, are also must-sees.
Many recent visitors said the museum offers something for everyone, whether young or old, local or tourist. The museum restaurants, restrooms and souvenir shops earn high praise as well.
Courtesy the Museum of New Zealand
See full list of Best Things To Do in Wellington »
Explore More of Wellington
#2 in Best Places to Visit in Australia and The Pacific
#14 in Best Places to Visit in Australia and The Pacific
#3 in Best Cheap Winter Vacations

redpajama_set_name: RedPajamaCommonCrawl


Today we decided to focus again on some fun games for learning.
Math: The older boys played Zap It! multiplication today. Using two 12 sided dice they took turns rolling the dice and multiplying to find the answers. If they got it right they got a chip and if not it was the next players turn. However, when/if they rolled doubles they were Zapped and had to put all their chips back in the pile.
The boys playing Zap It!
Evan begged to play Add A Bug again. He loves this game so much that he even played with Alec last night while I was cooking dinner. I agreed but asked if we could use regular dice instead of the ones that came with the game since they only go up to 3 and I really wanted him to practice harder addition skills than that. He agreed and we decided we'd go around the board three times before declaring a winner. He got creative and decided to put wasps on various spaces around the board; if you land on a wasp you have to go back.
I love the creative thinking!
We ended the game and Evan had 15 bugs and I had 17. He told me I won by just two bugs... hey he did a little subtraction in there too and he didn't even know it! We finished up math with a minute test for the boys.
Language Arts: Evan and I played sight word memory.
I found these free printable sight words and printed off two sets of the list onto oak tag paper. Using just two of the five lists we had that gave us 40 cards (20 words) to work with.
Evan loves memory games and I don't know why I didn't think of playing with sight words sooner. He certainly remembered the words while we were playing the game. He was even able to read all of his matches back to me at the end of the game. Once again he won; 12 to 9 and he was able to tell me that he won by 3-- more subtraction!
While Evan and I were playing memory I had the older boys taking turns playing spelling games on Spelling City; rather than make up my own word list I just searched for third grade words and pulled up a random list.
They can choose from memory, unscramble, hangman, word search, etc. I set the timer for 15 minutes and while they were waiting for their turn they were silently reading anything of their choosing. We finished up language arts with Evan reading another mini book to me.
Geography: Alec and Ian begged me to play Stack the States this morning while I was getting dressed and working in my craft room.
While I don't typically allow anything with screens during our school day I agreed today and they took turns playing Stack the States and Stack the Countries. I think they played for 30 minutes or so! I decided that was enough geography for today.
More spelling practice: Evan argued that the boys got to play so many screens today and he didn't so he asked if he could play Word Monkey on the Kindle while I was making lunch. He was spelling words to me and talking all about the stuff he was learning while playing the video game.
It made me think of how little I really utilize media in our schooling day. While I would not want to get to the point where my kids are just starting at computer games all day they do have value and I should utilize them a bit more often.
After all, learning is so much fun when games are involved!


text:
Tienken Road project delayed
May 13, 2014 by Sarah Hovis 1 Comment
According to a press release from the Road Commission for Oakland County (RCOC) the start of the Tienken Road reconstruction project, Rochester Road to Livernois Road in Rochester Hills, will be delayed due to a glitch in the state bidding process.
The project involves reconstructing the road, adding a continuous center left-turn lane and constructing a roundabout at the intersection of Livernois and Tienken roads. The project also includes reducing a hill and the installation of a water main.
Because federal money is paying for part of the project cost, the project had to be bid by the Michigan Department of Transportation (MDOT). A glitch in the bidding process caused MDOT to reject all bids, meaning the project must be re-bid.
There will be a special bid award on May 21. The loss of approximately two months in the process, however, means RCOC could not complete the project during the 2014 construction season as originally planned.
Consequently, RCOC has revised its schedule for the project, splitting the work between 2014 and 2015. This year, the roundabout at Tienken/Livernois will be constructed and Tienken will be reconstructed between Livernois and just west of where the Paint Creek Trail crosses Livernois. The remainder of the project, from just west of the Paint Creek Trail to Rochester Road, will be completed in 2015.
In order to complete the roundabout, RCOC will close the Livernois/Tienken intersection to traffic (all directions) from approximately the end of June to approximately mid-November.
In 2015, work on the remainder of the project will begin in early spring and be completed by late summer. That work will involve the closure of Tienken from east of the new roundabout at Livernois to Rochester Road.
Filed Under: General, The Community Edge Tagged With: Michigan Department of Transportation (MDOT), Road Commission for Oakland County (RCOC), Tienken Road reconstruction project
About Sarah Hovis
Freelance wordsmith, arts appreciator, grammar geek, sports spectator, stationery snob, and world traveler, Sarah charts her own course as the owner of saliho creative. She uses her creative mind and engaging dialogue to fearlessly bring the written word to life in print and online… all while keeping a watchful eye out for the next literary adventure. You can reach her at [email protected].
Sue Ann Douglas says
I hope that the put the section of waterline in now that goes under the round-about.


A Care agency of repute, where we specialize in home care services for all sectors of the community.
LIM provides 24 hours Domiciliary Care Services, to older people in their own homes, on a one to one basis.
At home, our service users can carry on as normal a life as possible, in dignity and surrounded by their own belongings.
We are a team of highly trained and experienced staff who will identify your needs for care and support through an assessment process; this may involve the manager, social worker and members of the client's family.
Our recruitment is based on equal opportunity. Our staff are from various backgrounds and we provide regular on-going support and training for our staff in order to provide a high quality service at all times.
At Lim Independent Care, we recognise the need for care to be delivered by a skilled, honest, conscientious and motivated workforce. We are committed to the recruitment and training of our staff in the delivery of care to a high standard.
All our staff are thoroughly screened, trained, insured and CRB checked, in-depth references are also obtained.
If you fund your care from your own resources or receive assistance in the form of a Direct Payment, Individual Budget (IB) or Self Directed Support (SDS) we can help.
At LIM, your comfort is our business. We will make you comfortable in your home. This is brought about as a result of our expertise acquired over many years of providing personal care services in the industry.
This service is mainly short term; it supports people with poor physical or mental health to help them adjust to their illness. By learning new skills or relearning the skills necessary for them to maintain their independent daily living standards.
This service is aimed at older people who are assessed and need a community care package to enable them to live in their own homes and prevent hospitalisation.
This service provides a rapid response to individuals who would otherwise be admitted to hospital or residential care. These are direct applicants willing to pay for the service themselves or referred to LIM by a duty social worker.
LIM provide this service to enable people who would like to access the community for shopping, or recreational purposes but would need assistance, to do so with the support of a support worker.


text:
'Aliens' (1986) Movie Review
Hello, fellow moviegoers!
Aliens is directed by James Cameron, and it stars Sigourney Weaver, Lance Henriksen, Michael Biehn, Carrie Henn, and Bill Paxton. It is a sequel to the 1979 film, Alien, and since its release, it has been regarded as one of the best sequels of all time. The plot involves Ripley traveling back to the moon where the first alien was discovered. However, this time she's with a military team, and they're investigating the loss of communication with a colony there.
Aliens, just like its predecessor, definitely lives up to all of the hype surrounding it. The film was definitely a sequel to Alien, but it felt completely different from the first film, and I loved every moment of it. Aliens is the type of sequel that you can sit down and watch without needing to watch the first one immediately before it. As long as you have seen the first one at some point, you can really enjoy this movie. This is a very standalone story, it doesn't rely on the first film to make you like it. That alone is a feat in itself, but it's made even more amazing considering the film picks up right where the first one left off.
The most notable difference between this film and the first one was the pacing. The first film had a very slow pace. Alien made you feel like you were part of the crew, as it very gradually built up suspense over the course of the film. Aliens, on the other hand, had a much faster pace. This film, while it does have a lot of tension to it, builds it in a much different way. The first one built tension through the fear of the unknown. This one shows you pretty quickly what the threat is, and your dread of what you know is out there is what makes the tension so great.
Sigourney Weaver in this film gave an absolutely fantastic performance in the role of Ellen Ripley. It's interesting to think about her character arc from the beginning of the first film to the end of this one. In the first film, Ripley was just trying to survive. However, in this one, Ripley seems like she is out for revenge. She wants to make sure these aliens never hurt anyone again, so she does everything in her power to make sure that doesn't happen. Weaver was able to portray that incredibly well. Her character in this film was much different from her character in the first film, and it was Weaver's performance that made it believable.
Many people describe this movie as an action film. I'm not sure if I'd go quite that far, though the film does have a lot of action moments in it. At its core, Aliens is a thriller, just like the first one. Though there are many times throughout that it does take action approaches to its situations. So, I'd say this film is an action-thriller because it's so much more than just a straight-forward action film or thriller. It's a perfect mix of both.
When this film has its action sequences, they're extremely well done. There are action scenes in this film (which I remind you came out over thirty years ago) that are leagues better than they are in some films today. The action scenes feel gritty and as realistic as they can be. They really raise the level of overall intensity in the film, and they definitely help to show how serious the situation in this film was.
Like I mentioned earlier, at its core, this film is definitely a thriller. Aliens manages to build just as much tension and suspense as its predecessor, though it does it through completely different means. The first film hid one alien, in this one, we get to see many of them on many occasions. We get really good looks at what they are and how they behave. We get a much better understand of what this crew of people is up against. The action scenes really tie this together, because, through those sequences, we also see what the aliens are capable of, which adds immense amounts of fear into the atmosphere the film creates.
Aliens is definitely one of the best sequels to a film that I've ever seen. It accomplishes that by being different than the original, yet keeping what made the original great at its core. This film is much more action oriented than the first one, yet I still would consider it to be a thriller above all else. It keeps you on the edge of your seat from the moment the crew arrives on that planet to the end of the film. Unlike the first one, it's not the fear of the unknown that gets to you, it's the dread of what you know is out there. I would very highly recommend checking out Aliens. Even if you weren't a big fan of the first one, give this one a shot, it might surprise you.
 So what do you think of Aliens? Which do you think is better, this one or the original Alien? Let me know by commenting on this post! Also, if you enjoyed this review, share it on Facebook and Twitter! It really helps! Don't forget, I post every Monday, Wednesday, and Friday, so check back then for more movie reviews and miscellaneous movie thoughts!
Kyle Kruse
See more of my reviews and articles on The Daily Nebraskan!
Follow Me for Updates!
Twitter: @kruze_reviews
10/10 Movies


I really love engagement sessions, I love how simple and fun they are and the great opportunity they are to get to know couples. We started at Mt Davidson, it was a nice warm and sunny evening. We made lots of jokes and talked about our dogs and then headed to the coast for sunset. It was such a gorgeous night and I had so much fun with these two. We spun around on the beach and talked about our mutual love for the coast. I left leaving hungry as we got on the topic of food trucks and enjoyed a nice sunset with these wonderful people.


Kingdom Housing Association's Development Team is implementing a £65 million investment programme that will deliver nearly 550 affordable homes for the Fife-based association and its housing association partners.
The investment programme, which is significantly subsidised by the Scottish Government and local authorities, represents the busiest ever year for Kingdom's development staff.
The first six months of this year saw work begin on 11 sites that will deliver 205 new homes for Kingdom and 84 new houses for partner associations in Lochgelly, Levenmouth and Perth.
Over the next six months, work will begin on another seven sites that will yield a further 259 homes.
The houses have been designed to suit local housing need and to meet Kingdom's high energy efficiency and security standards. They are of various tenures: for social rent; mid-market rent and for sale through partnership support for regeneration.
"Our current business plan is to develop around 1,100 homes over the next five years, and this year will see very positive progress towards achieving this ambitious goal.
Pictured: Kingdom's Durham Wynd onsite.


Gloucester City Homes (GCH) are an independent registered housing association, which owns and manages 4,450 rented homes, 270 leasehold properties, 60 shared ownership properties, 30 commercial units and 52 homeless units.
The organisation became a housing association in March 2015 following 89% of tenants giving their support. They were originally established as an arm's length management organisation in 2005 to deliver the government's decent homes standard.
With core values of pride, quality, integrity and innovation, which were identified by members of the team itself, GCH are dedicated to being a great place to work for all members of staff.
Chief Executive Ashley Green is a massive part of what GCH stand for, inspiring his team and the whole organisation to deliver a service and culture that improves lives and communities. Ashley also has an enormous sense of fun and ability to make people smile - even playing Father Christmas at the organisation's family festive party.
Senior managers take their commitment to the organisation's values beyond leadership protocol. As a result, employees recognise them as a passionate force with principles that are guided by the promises made to tenants and desire to improve and invest in housing for those in need.
GCH offer a wide variety of training interventions, which are based on mandatory requirements, along with development needs for individuals, teams and the organisation as a whole. These needs are measured through wide-ranging Training Needs Analysis using criteria against each role to ensure individuals are receiving relevant support.
Engage 2 Change is a programme funded by GCH to offer a route for people who wish to make a change in their lives, but are not necessarily looking to get into work. They may wish to improve their health and fitness or be more sociable. Each person is offered several sessions to boost their confidence.


Srinagar: Rejecting the probe ordered by the Jammu and Kashmir government into the recent killing of three teenaged boys by army troops, Chairman of the hardline faction of Hurriyat Conference Syed Ali Shah Geelani today called for a Kashmir bandh tomorrow to protest the killings. He also appealed to the people to march towards Trehgam (Kupwara) on July 29 to register their protest against human rights violations in the state. 'Indian forces have unleashed a reign of terror and usurped all human rights of Kashmiris,' Geelani alleged accusing the Mufti Mohd Sayeed government of losing all control over the armed forces. 'The puppet government has not made public a single report of so many probes ordered in the past and their integrity is also doubtful,' the hardline leader alleged. 'The residents of the area were canecharged and tear gas shells lobbed at them, injuring scores of persons, for protesting the cold-blooded murder of the children,' he claimed.


text:
Q: Can't find a codec for class org.json.JSONArray  private void getUsersWithin24Hours(String id, Map < String, Object > payload) throws JSONException {
  JSONObject json = new JSONObject(String.valueOf(payload.get("data")));
  Query query = new Query();

  query.addCriteria(Criteria.where("user_id").is(id).and("timezone").in(json.get("timezone")).and("gender").in(json.get("gender")).and("locale").in(json.get("language")).and("time").gt(getDate()));
  mongoTemplate.getCollection("user_log").distinct("user_id", query.getQueryObject());
 }

I was going to made a query and get result from mongodb and I was succeed with mongo terminal command:
db.getCollection('user_log').find({"user_id" : "1", "timezone" : {$in: [5,6]}, "gender" : {$in : ["male", "female"]}, "locale" : {$in : ["en_US"]}, "time" : {$gt : new ISODate("2017-01-26T16:57:52.354Z")}})

but from java when I was trying it gave me below error.

org.bson.codecs.configuration.CodecConfigurationException: Can't find
  a codec for class org.json.JSONArray

What is the ideal way to do this?
Hint : actually I think in my code error occurred of this part json.get("timezone"). because it contains array. When I am using hardcode string arrays this code works

A: You don't have to use JSONObject/JSONArray for conversion.
Replace with below line if the payload.get("data") is Map
BasicDBObject json = new BasicDBObject(payload.get("data"));

Replace with below line if the payload.get("data") holds json string.
BasicDBObject json =(BasicDBObject) JSON.parse(payload.get("data"));

A: Here's an example of MongoDB from MongoDB University course with a MongoDB database named "students" with a collection named "grades" :
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mongodb</groupId>
    <artifactId>test</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>

    <name>test</name>
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.mongodb</groupId>
            <artifactId>mongodb-driver</artifactId>
            <version>3.2.2</version>
        </dependency>
    </dependencies>
</project>

com/mongo/Main.java
package com.mongo;

import com.mongodb.MongoClient;
import com.mongodb.client.*;
import org.bson.Document;
import org.bson.conversions.Bson;

import javax.print.Doc;

public class Main {

    public static void main(String[] args) {

        MongoClient client = new MongoClient();
        MongoDatabase database = client.getDatabase("students");
        final MongoCollection<Document> collection = database.getCollection("grades");

        Bson sort = new Document("student_id", 1).append("score", 1);
        MongoCursor<Document> cursor = collection.find().sort(sort).iterator();

        try {
            Integer student_id = -1;
            while (cursor.hasNext()) {
                Document document = cursor.next();
                // Doing more stuff
            }
        } finally {
            cursor.close();
        }
    }
}


Who'da thought we'd need ya?
Back there, where we need ya?
Y'all niggas think you shinin like Puff, who got money?
Onyx back forever, bustin', gats together, WHAT!
There's just too many of us, you get rushed, you get bust,what!
Pull your sticks out, we the group you listen to, kid!


text:
Q: Font Awesome icons blinking on .load() event in JQuery Using JQuery $("#ID").load("file") makes the font-awesome icons refresh even when cache is set to false.

Search for Icon:

             <input type="text" class="with" id="searchfield" onkeyup='look(this.value);'>

Video: https://youtu.be/TVI6I80YWz4
Fiddle: https://jsfiddle.net/TechnicalCoder/z2z5w0hf/2/


text:
Psychological thriller Unsane was shot by an Oscar-winning director on an iPhone
By Stephen Fenech	 On Aug 27, 2018
Unsane is thriller about a woman who is committed to an institution and must deal with her paranoia and whether her fears are real or imagined. One fun fact – it was shot entirely on an iPhone 7 Plus.
The film stars Claire Foy, who starred as Queen Elizabeth in The Crown, and is directed by Oscar-winner Steven Soderbergh.
Unsane was shot in just 10 days in 4K using the iPhone 7 Plus through an app called FiLMiC Pro.
"Because of fewer crew and equipment around, the iPhone created a greater intimacy as you would sometimes forget it was there," says co-star Juno Temple.
Director Steven Soderbergh shoots Unsane with the iPhone 7 Plus and the DJI Osmo gimbal
"It could be put into places that would make the scenes up close and personal — like on Claire's face."
Claire Foy agrees: "There was no separation; it felt like Steven was watching."
Director Soderbergh says he is proud of the film – and how it was made.
"Having Unsanedescribed as 'the iPhone movie' is certainly not something I feel embarrassed about or defensive about," he said.
"I've been experimenting for years with this equipment, with these phones and with the lenses that are available to put onto these phones.
"I knew I would, at some point, make a movie with this technology because I looked at it as the future.
"It was also my intention that the resulting movie be one that any person can go into a theatre and watch — and have no concept of what it was shot on, or care, because it looks like a normal film."
The film was shot using three iPhone 7 Plus devices with the FiLMiC Pro app which allowed the filmmakers to have more control of the camera so they could adjust exposure, shutter speed, colour temperature and focus.
"This is a movie that was made with a truck and two vans, basically," Soderbergh said.
"The entire camera department fit into a backpack; there were the three phones, all the lenses, extra batteries, onboard monitors, slates, microphones, and the DJI Osmo stabilising device."
Unsane is available now on digital, DVD and Blu-ray from 20thCentury Fox Home Entertainment.
Action classic Predator unleashed in 4K
Die Hard released on 4K UHD to celebrate the action film's 30th anniversary
The top five scenes in Alien that look even better in 4K
Samsung the first to launch Apple TV and AirPlay 2 on its latest TVs
Lend me your ears for Episode 346 of the top-rating Tech Guide podcast
Aussie Daniel Henshall goes toe-to-toe with Scarlett Johansson in Ghost in the Shell
Oppo Find X smartphone review – a bold design with a hideaway camera
Dyson's new fans can keep you cool and also purify the air


Ambassador Cruze Safety Cutter. Inbound blade cuts with ease through pallet wrap and polypropylene strapping. Handy box cutter pierces box sealing tape without damaging the goods contained within.
Ribbed surface improves grip and safety in use. Screw clamp securely grips blade. Tapered body gives good visibility of the blade point. Rigid, all metal blade carrier. Handle features detachable blade snap-off tool. 18mm.
Ribbed surface improves grip and safety in use. Screw clamp securely grips blade. Tapered body gives good visibility of the blade point. Rigid, all-metal blade carrier. Handle features detachable blade snap-off tool. 9mm.
Handy packs of 10 blades, CB18 blade has 8 knives.
Q Connect Refill Blades to fit the Q Medium and Heavy Duty Knives.
Q Connect Heavy Duty Cutting Knife features a locking device and slit tail piece for snapping off blunt blades. Refill blades are available see KF10636.
Q Connect Light Duty Cutting Knife features a locking device and slit tail piece for snapping off blunt blades. Refill blades are available see KF10635.
Q Connect Medium Duty Cutting Knife features a locking device and slit tail piece for snapping off blunt blades. Refill blades are available see KF10636.
Q Connect Universal Cutting Knife, ideal for light and heavy duty cutting. The blade length is controlled by the blade adjust mechanism and has an integral locking device. Colour - Silver. (For replacement blades see KF10637).
Replacement Blades (for Stanley Snap-off knives). 18mm. Pack of 10.
Yellow injection moulded, polypropylene plastic handle with permanently attached blade. Card of 3.


text:
SVPAZ award is 'dream come true' for ONe TRUe LOVe
How can you change the world in three minutes? That's the question eight finalists had to answer at the sixth annual Fast Pitch on March 1, hosted by Social Venture Partners Arizona. This year's winner of the SVPAZ award, a year of mentorship from partners and $25,000 was ONe TRUe LOVe (OTL).
"SVP was a dream come true," OTL founder Krysten Aldridge said. "I sat in the audience in 2012 and I wondered if I would be on that stage. This is so surreal…It's awesome and awkward because I have no frame of reference for how I feel."
In her pitch, Alridge asked for $60,000 to buy a catering truck to feed the hungry and homeless with rescued and donated food. Between the award money and other donations, she is about halfway toward her goal.
"OTL is in an organization that is willing and ready to engage and benefit from the time and professional expertise of our SVP partners," said SVPAZ executive director Terri Wogan Calderón. "It's a great fit for us."
Sign Up for AGF News
2018 TRANSFORM ARIZONA LUNCHEON PARTNERS
CENTERPIECE PARTNER
Valued Partner


text:
Vanhalinna är en egendom och fornborg i Lundo invid den senmedeltida så kallade Oxvägen från Åbo till Tavastland.

Vanhalinna var under medeltiden biskopsgård, indrogs vid reformationen till kronan och var 1569–1639 förlänad släkterna Stålarm och Bagge; ombildades till rusthåll, som innehades bland annat av släkterna Shele, Hjelt och Vanhalinna (1873–1956). En huvudbyggnad i nyklassisk stil uppfördes 1927 av byggmästaren Onni Touru. Gården testamenterades 1956 till Åbo universitet med den uttryckliga förhoppningen, att en del av avkastningen skulle användas för arkeologiska undersökningar av den fornborg som ligger på en svårtillgänglig klippa bakom gården.

Fornborgen på Vanhalinna har undersökts i flera omgångar sedan 1886; de mest omfattande utgrävningarna utfördes 1957–1975. Fynden omfattar i huvudsak keramik, vapen, husgeråd och medeltida mynt. En intilliggande boplats och ett gravfält har undersökts på 1990-talet. Den äldsta bosättningen på fornborgen tillhör bronsåldern (1500–500 f.Kr.), men platsen övergavs för att på nytt tas i bruk under järnåldern, på 500-talet e. Kr. Detta skede av bosättningen fortgick till ungefär 800, varefter borgen var obebodd fram till omkring år 1000. Under medeltiden användes borgen åter fram till början av 1300-talet. Klippans branta sidor underlättar anläggandet av befästningar. Bergets platå har jämnats ut och rester av byggnader visar, att man också bott uppe på borgklippan. Borgen låg väl till för försvaret av Aura ådal.

Källor

Externa länkar

Vanhalinna borgberg, herrgård, museum

Lundo
Fornborgar i Finland
Herrgårdar i Finland
Finlands förhistoria


A house specialty! Thai basil muddled with sugar and combined with Sochu for a refreshing Thai twist on the classic. One will lead to another!
Distilled to a lower alcohol level, it is used and drank just like vodka.
Rich, silky layers of coconut and cream with fresh pineapple.
Truly special sake, with spicy, creamy melon flavors. Amazing Junmai Ginjo crafted rice wine.
try 2 oz. of all sakes!


text:
Home / Banker calls for mutuality as the basis of economic reform
Banker calls for mutuality as the basis of economic reform
We need not so much a new vision of economics as a recovery of a historic one based on people, mutuality, collaboration and trust.
That was the message of Professor Charles Munn OBE, distinguished chair of the Special Commission on the Purposes of Economic Activity, introducing his Commission's report to an audience of some 120 people at a fringe meeting of the 2012 General Assembly of the Church of Scotland.
Professor Munn, who has a substantial background in banking, highlighted the particular economic pressure faced by vulnerable people living in poverty.
"But it's not just the poor who are getting poorer, others are too," he added, pointing to the wider crisis of inherited and 'orthodox' financial and economic systems.
Just when we need them most we are in a situation where mutual organisations have been devalued, undermined and commercialised, he observed.
Trustee savings banks have been turned into corporate enterprises, and have mostly disappeared. A revival of mutuality is therefore urgently needed.
Professor Munn said that people at the sharp end who gave evidence through the Poverty Truth Commission (http://www.povertytruthcommission.org/), led by the churches, identified the need to reduce the price of credit as a key one for those living in poverty.
In this context, he said the 4,000 per cent APR loan interest charged by companies like Wonga was a scandal. "That is doing serious damage in our communities. That is what people at the sharp end are saying, and that's what we have to address," declared Professor Munn.
There needs to be an upper limit of 40 per cent, he said, recognising that some credit markets operate under different conditions to others. There is precedent for this in some US states, he pointed out.
If the existing models for operation of the loan sharks become unfeasible, then other models are needed, not least those provided by Credit Unions, he said.
The government and HMRC also need radically to re-order their tax priorities. There have been some moves to tackle evasion and avoidance by the rich, but there is a huge way to go, and not just on 'tax minimisation', Professor Munn said.
Paying tax should be seen as a moral obligation and benefit, not something to be regarded as an unnecessary burden, Professor Munn declared. The churches could play a positive role in helping to recover this understanding.
He commended the work of Christian Aid in the area of tax evasion and corporate malpractice, and went on to highlight the link between health and poverty in Britain and globally, together with the need to properly fund and develop the National Health Service.
The report of the Special Commission on the Purposes of Economic Activity is being considered formally at the Kirk's General Assembly, it's national decision-making body, today (21 May 2012).
* Professor Charles Munn is the recently retired Chief Executive of the Chartered Institute of Bankers in Scotland.
* The full document has been published on the Church of Scotland website (*.PDF Adobe Acrobat document): http://www.srtp.org.uk/srtp/view_article/special_commission_on_the_purpo...
* More on poverty and economics from the Kirk: http://www.churchofscotland.org.uk/speak_out/poverty_and_economics
* Ekklesia's reporting and comment from the Church of Scotland General Assembly 2012, plus back stories, can be followed here: http://www.ekklesia.co.uk/kirkgeneralassembly
Keywords:kirk | general assembly | Economy | economics | church of scotland report | church of scotland


text:
Q: How did the Poet "die for the faith"? In the section Fiat Voluntas Tua, the Poet receives some mention through the hindsight of history (emphasis mine):

the fable had probably arisen out of the story that one of the early Hannegans had been given a glass eyeball by a brilliant physical theorist who was his protege - Zerchi could not remember whether the scientist had been Esser Shon or Pfardentrott - and who told the prince that it had belonged to a poet who had died for the Faith. He had not specified which faith the poet had died for - that of Peter or that of the Texarkanan schismatics - but evidently the Hannegan had valued it, for he had mounted the eyeball in the clutch of a small golden hand which was still worn upon certain state occasions by princes of the Harq - Hannegan dynasty.

However, the Poet

died in some unnamed skirmish, shot in the belly after leaping out of some bushes at a cavalry officer who had just run down a fleeing refugee woman with a dull saber.

This hardly seems to be a death tied to faith, regardless of which faith you are referring to.
How would details of his death have wound up in the histories?  Is there any basis for the claim, or was this just Miller's way of showing the distortions of fact that can find their way into history?

A: I agree that I would not classify it "dying for the Faith."
The details of the death are unlikely to have been recorded; after all no one but the Poet would be able to blame it on a dull sword blade, as those were private thoughts.  It seems unlikely that anyone that survived the incident would have particularly noticed, much less remembered the Poet's actions.
On the other hand, it is possible that someone stumbling upon the scene after the fact could have identified the Poet, and so could have related his death and some general information to the Thon, directly or indirectly.  That it was a cannonball from one of Hannigan's cannons that killed him would be fairly obvious, I would think.  That might be enough to have the death classified as being for the Faith; the Hannigan was in opposition to the (New) Vatican, and I can imagine that anyone killed by Hannigan's side might automatically be labeled as "dying for the Faith," at least if there were no details to contradict the assumption (which as pointed out earlier is the case with the Poet's death).
I do not know if that is what you would classify as a "distortion of fact finding its way into history" or not.  Nor would I rule out a later distortion of fact.  I found such interconnecting references a very enjoyable part of the novel (and if you have the chance to re-read it, you will find some enjoyable foreshadowings and deeper meanings that are not obvious on the first read).  But you are possibly correct concerning Miller's motivations for including it; there are certainly other instances in which he provides humorous anecdotes relating to the historical record (e.g. that knowledge of Leibowitz's wife having a gold tooth survived but the names of the political leaders responsible for the atomic war did not and Thon Taddeo's attempt to interpret fiction [presumably Capek's RUR] as history).