<?php

/*
 * This file is part of the Symfony package.
 *
 * (c) Fabien Potencier <fabien@symfony.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace Symfony\Component\Security\Http\Tests\Authentication;

use PHPUnit\Framework\TestCase;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Exception\BadCredentialsException;
use Symfony\Component\Security\Core\User\User;
use Symfony\Component\Security\Http\Authentication\AuthenticatorManager;
use Symfony\Component\Security\Http\Authenticator\InteractiveAuthenticatorInterface;
use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
use Symfony\Component\Security\Http\Authenticator\Passport\Credentials\PasswordCredentials;
use Symfony\Component\Security\Http\Authenticator\Passport\Passport;
use Symfony\Component\Security\Http\Authenticator\Passport\SelfValidatingPassport;
use Symfony\Component\Security\Http\Event\AuthenticationTokenCreatedEvent;
use Symfony\Component\Security\Http\Event\CheckPassportEvent;

class AuthenticatorManagerTest extends TestCase
{
    private $tokenStorage;
    private $eventDispatcher;
    private $request;
    private $user;
    private $token;
    private $response;

    protected function setUp(): void
    {
        $this->tokenStorage = $this->createMock(TokenStorageInterface::class);
        $this->eventDispatcher = new EventDispatcher();
        $this->request = new Request();
        $this->user = new User('wouter', null);
        $this->token = $this->createMock(TokenInterface::class);
        $this->response = $this->createMock(Response::class);
    }

    /**
     * @dataProvider provideSupportsData
     */
    public function testSupports($authenticators, $result)
    {
        $manager = $this->createManager($authenticators);

        $this->assertEquals($result, $manager->supports($this->request));
    }

    public function provideSupportsData()
    {
        yield [[$this->createAuthenticator(null), $this->createAuthenticator(null)], null];
        yield [[$this->createAuthenticator(null), $this->createAuthenticator(false)], null];

        yield [[$this->createAuthenticator(null), $this->createAuthenticator(true)], true];
        yield [[$this->createAuthenticator(true), $this->createAuthenticator(false)], true];

        yield [[$this->createAuthenticator(false), $this->createAuthenticator(false)], false];
        yield [[], false];
    }

    public function testSupportCheckedUponRequestAuthentication()
    {
        // the attribute stores the supported authenticators, returning false now
        // means support changed between calling supports() and authenticateRequest()
        // (which is the case with lazy firewalls and e.g. the AnonymousAuthenticator)
        $authenticator = $this->createAuthenticator(false);
        $this->request->attributes->set('_security_authenticators', [$authenticator]);

        $authenticator->expects($this->never())->method('authenticate');

        $manager = $this->createManager([$authenticator]);
        $manager->authenticateRequest($this->request);
    }

    /**
     * @dataProvider provideMatchingAuthenticatorIndex
     */
    public function testAuthenticateRequest($matchingAuthenticatorIndex)
    {
        $authenticators = [$this->createAuthenticator(0 === $matchingAuthenticatorIndex), $this->createAuthenticator(1 === $matchingAuthenticatorIndex)];
        $this->request->attributes->set('_security_authenticators', $authenticators);
        $matchingAuthenticator = $authenticators[$matchingAuthenticatorIndex];

        $authenticators[($matchingAuthenticatorIndex + 1) % 2]->expects($this->never())->method('authenticate');

        $matchingAuthenticator->expects($this->any())->method('authenticate')->willReturn(new SelfValidatingPassport(new UserBadge('wouter', function () { return $this->user; })));

        $listenerCalled = false;
        $this->eventDispatcher->addListener(CheckPassportEvent::class, function (CheckPassportEvent $event) use (&$listenerCalled, $matchingAuthenticator) {
            if ($event->getAuthenticator() === $matchingAuthenticator && $event->getPassport()->getUser() === $this->user) {
                $listenerCalled = true;
            }
        });
        $matchingAuthenticator->expects($this->any())->method('createAuthenticatedToken')->willReturn($this->token);

        $this->tokenStorage->expects($this->once())->method('setToken')->with($this->token);

        $manager = $this->createManager($authenticators);
        $this->assertNull($manager->authenticateRequest($this->request));
        $this->assertTrue($listenerCalled, 'The CheckPassportEvent listener is not called');
    }

    public function provideMatchingAuthenticatorIndex()
    {
        yield [0];
        yield [1];
    }

    public function testNoCredentialsValidated()
    {
        $authenticator = $this->createAuthenticator();
        $this->request->attributes->set('_security_authenticators', [$authenticator]);

        $authenticator->expects($this->any())->method('authenticate')->willReturn(new Passport(new UserBadge('wouter', function () { return $this->user; }), new PasswordCredentials('pass')));

        $authenticator->expects($this->once())
            ->method('onAuthenticationFailure')
            ->with($this->request, $this->isInstanceOf(BadCredentialsException::class));

        $manager = $this->createManager([$authenticator]);
        $manager->authenticateRequest($this->request);
    }

    /**
     * @dataProvider provideEraseCredentialsData
     */
    public function testEraseCredentials($eraseCredentials)
    {
        $authenticator = $this->createAuthenticator();
        $this->request->attributes->set('_security_authenticators', [$authenticator]);

        $authenticator->expects($this->any())->method('authenticate')->willReturn(new SelfValidatingPassport(new UserBadge('wouter', function () { return $this->user; })));

        $authenticator->expects($this->any())->method('createAuthenticatedToken')->willReturn($this->token);

        $this->token->expects($eraseCredentials ? $this->once() : $this->never())->method('eraseCredentials');

        $manager = $this->createManager([$authenticator], 'main', $eraseCredentials);
        $manager->authenticateRequest($this->request);
    }

    public function provideEraseCredentialsData()
    {
        yield [true];
        yield [false];
    }

    public function testAuthenticateRequestCanModifyTokenFromEvent(): void
    {
        $authenticator = $this->createAuthenticator();
        $this->request->attributes->set('_security_authenticators', [$authenticator]);

        $authenticator->expects($this->any())->method('authenticate')->willReturn(new SelfValidatingPassport(new UserBadge('wouter', function () { return $this->user; })));

        $authenticator->expects($this->any())->method('createAuthenticatedToken')->willReturn($this->token);

        $modifiedToken = $this->createMock(TokenInterface::class);
        $listenerCalled = false;
        $this->eventDispatcher->addListener(AuthenticationTokenCreatedEvent::class, function (AuthenticationTokenCreatedEvent $event) use (&$listenerCalled, $modifiedToken) {
            $event->setAuthenticatedToken($modifiedToken);
            $listenerCalled = true;
        });

        $this->tokenStorage->expects($this->once())->method('setToken')->with($this->identicalTo($modifiedToken));

        $manager = $this->createManager([$authenticator]);
        $this->assertNull($manager->authenticateRequest($this->request));
        $this->assertTrue($listenerCalled, 'The AuthenticationTokenCreatedEvent listener is not called');
    }

    public function testAuthenticateUser()
    {
        $authenticator = $this->createAuthenticator();
        $authenticator->expects($this->any())->method('createAuthenticatedToken')->willReturn($this->token);
        $authenticator->expects($this->any())->method('onAuthenticationSuccess')->willReturn($this->response);

        $this->tokenStorage->expects($this->once())->method('setToken')->with($this->token);

        $manager = $this->createManager([$authenticator]);
        $manager->authenticateUser($this->user, $authenticator, $this->request);
    }

    public function testAuthenticateUserCanModifyTokenFromEvent(): void
    {
        $authenticator = $this->createAuthenticator();
        $authenticator->expects($this->any())->method('createAuthenticatedToken')->willReturn($this->token);
        $authenticator->expects($this->any())->method('onAuthenticationSuccess')->willReturn($this->response);

        $modifiedToken = $this->createMock(TokenInterface::class);
        $listenerCalled = false;
        $this->eventDispatcher->addListener(AuthenticationTokenCreatedEvent::class, function (AuthenticationTokenCreatedEvent $event) use (&$listenerCalled, $modifiedToken) {
            $event->setAuthenticatedToken($modifiedToken);
            $listenerCalled = true;
        });

        $this->tokenStorage->expects($this->once())->method('setToken')->with($this->identicalTo($modifiedToken));

        $manager = $this->createManager([$authenticator]);
        $manager->authenticateUser($this->user, $authenticator, $this->request);
        $this->assertTrue($listenerCalled, 'The AuthenticationTokenCreatedEvent listener is not called');
    }

    public function testInteractiveAuthenticator()
    {
        $authenticator = $this->createMock(InteractiveAuthenticatorInterface::class);
        $authenticator->expects($this->any())->method('isInteractive')->willReturn(true);
        $this->request->attributes->set('_security_authenticators', [$authenticator]);

        $authenticator->expects($this->any())->method('authenticate')->willReturn(new SelfValidatingPassport(new UserBadge('wouter', function () { return $this->user; })));
        $authenticator->expects($this->any())->method('createAuthenticatedToken')->willReturn($this->token);

        $this->tokenStorage->expects($this->once())->method('setToken')->with($this->token);

        $authenticator->expects($this->any())
            ->method('onAuthenticationSuccess')
            ->with($this->anything(), $this->token, 'main')
            ->willReturn($this->response);

        $manager = $this->createManager([$authenticator]);
        $response = $manager->authenticateRequest($this->request);
        $this->assertSame($this->response, $response);
    }

    private function createAuthenticator($supports = true)
    {
        $authenticator = $this->createMock(InteractiveAuthenticatorInterface::class);
        $authenticator->expects($this->any())->method('supports')->willReturn($supports);

        return $authenticator;
    }

    private function createManager($authenticators, $firewallName = 'main', $eraseCredentials = true)
    {
        return new AuthenticatorManager($authenticators, $this->tokenStorage, $this->eventDispatcher, $firewallName, null, $eraseCredentials);
    }
}


/*
 * Copyright 2015-present Open Networking Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.atomix.core.map;

import io.atomix.primitive.SyncPrimitive;

/**
 * Distributed version of com.google.common.util.concurrent.AtomicLongMap.
 */
public interface AtomicCounterMap<K> extends SyncPrimitive {

  /**
   * Increments by one the value currently associated with key, and returns the new value.
   *
   * @param key key with which the specified value is to be associated
   * @return incremented value
   */
  long incrementAndGet(K key);

  /**
   * Decrements by one the value currently associated with key, and returns the new value.
   *
   * @param key key with which the specified value is to be associated
   * @return updated value
   */
  long decrementAndGet(K key);

  /**
   * Increments by one the value currently associated with key, and returns the old value.
   *
   * @param key key with which the specified value is to be associated
   * @return previous value
   */
  long getAndIncrement(K key);

  /**
   * Decrements by one the value currently associated with key, and returns the old value.
   *
   * @param key key with which the specified value is to be associated
   * @return previous value
   */
  long getAndDecrement(K key);

  /**
   * Adds delta to the value currently associated with key, and returns the new value.
   *
   * @param key   key with which the specified value is to be associated
   * @param delta the value to add
   * @return updated value
   */
  long addAndGet(K key, long delta);

  /**
   * Adds delta to the value currently associated with key, and returns the old value.
   *
   * @param key   key with which the specified value is to be associated
   * @param delta the value to add
   * @return previous value
   */
  long getAndAdd(K key, long delta);

  /**
   * Returns the value associated with key, or zero if there is no value associated with key.
   *
   * @param key key with which the specified value is to be associated
   * @return current value
   */
  long get(K key);

  /**
   * Associates ewValue with key in this map, and returns the value previously
   * associated with key, or zero if there was no such value.
   *
   * @param key      key with which the specified value is to be associated
   * @param newValue the value to put
   * @return previous value or zero
   */
  long put(K key, long newValue);

  /**
   * If key is not already associated with a value or if key is associated with
   * zero, associate it with newValue. Returns the previous value associated with
   * key, or zero if there was no mapping for key.
   *
   * @param key      key with which the specified value is to be associated
   * @param newValue the value to put
   * @return previous value or zero
   */
  long putIfAbsent(K key, long newValue);

  /**
   * If (key, expectedOldValue) is currently in the map, this method replaces
   * expectedOldValue with newValue and returns true; otherwise, this method return false.
   * <p>
   * If expectedOldValue is zero, this method will succeed if (key, zero)
   * is currently in the map, or if key is not in the map at all.
   *
   * @param key              key with which the specified value is to be associated
   * @param expectedOldValue the expected value
   * @param newValue         the value to replace
   * @return true if the value was replaced, false otherwise
   */
  boolean replace(K key, long expectedOldValue, long newValue);

  /**
   * Removes and returns the value associated with key. If key is not
   * in the map, this method has no effect and returns zero.
   *
   * @param key key with which the specified value is to be associated
   * @return the previous value associated with the specified key or null
   */
  long remove(K key);

  /**
   * If (key, value) is currently in the map, this method removes it and returns
   * true; otherwise, this method returns false.
   *
   * @param key   key with which the specified value is to be associated
   * @param value the value to remove
   * @return true if the value was removed, false otherwise
   */
  boolean remove(K key, long value);

  /**
   * Returns the number of entries in the map.
   *
   * @return the number of entries in the map, including {@code 0} values
   */
  int size();

  /**
   * If the map is empty, returns true, otherwise false.
   *
   * @return true if the map is empty.
   */
  boolean isEmpty();

  /**
   * Clears all entries from the map.
   */
  void clear();

  @Override
  AsyncAtomicCounterMap<K> async();
}


RELATED ARTICLES

Share this article

Share

Only last week, a study claimed two cups of coffee a day could halve the risk of breast cancer returning by boosting the effect of the anti-tumour drug tamoxifen.

In the latest probe by experts at the Karolinska Institute in Stockholm, Sweden, nearly 45,000 men aged 45 to 79 were studied over a 12 year period to see how many developed localised, advanced or fatal prostate cancer.

Researchers collected details of dietary habits, including coffee consumption, and found that for men downing six cups or more a day, the chances of falling victim to localised prostate cancer dropped by 19 per cent.

Those on four to five cups a day saw their risk drop by about seven per cent but there was no benefit from anything less than four cups a day.

Scientists found it helped to ward off localised cancer - the slow-growing types that are mainly confined to the prostate - but had less effect on more aggressive forms of the disease

Researchers said men who were obese or overweight were most likely to ward off cancer.

The reasons are not clear but one theory is that coffee may boost the body's levels of a protein called adiponectin, which has been shown to have powerful anti-cancer properties that stop malignant cells from flourishing.

Obese people tend to have lower levels of adiponectin circulating in their bloodstream.

In a report on their findings the researchers said: 'Increased adiponectin levels due to coffee consumption may be more beneficial to overweight and obese men.

'Our results are potentially important from a public health point of view.

'But the evidence is still too limited to recommend men increase coffee consumption in order to lower their prostate cancer risk.'


JOWISSA’s Success at Baselworld 2014 Makes it CrystalClear Why the Brand has Become a Feminine Favorite

JOWISSA has been making fashionable, fabulously feminine timepieces since 1951. Fans of the brand often describe their JOWISSA watch as fine jewelry you can wear on your wrist and frequently acquire many different models. Recently a loyal customer visited JOWISSA’s Swiss headquarters to select her 37th JOWISSA watch.

With over 250 different models defined by nine exciting collections, owning several JOWISSA’s isn’t that hard to do. Even though JOWISSA makes timepieces for men, it is women who are the brand’s biggest fans. Fashion forward women around the world are learning that these surprisingly affordable, Swiss made watches are the perfect fashion accessories for almost any occasion.

On center stage at JOWISSA’s Baselworld booth were the popular Safira 99 and Facet Strass Collections, both featuring JOWISSA’s trademark faceted and curved sapphire crystals. A wide variety of stylish star, pyramid, circular and diamond cut styles, all paired with colorfully elegant dials made it crystal clear why this unique brand has become a feminine favorite.

New for 2014 was the imaginative women’s Magic Strass Collection, which featured a stylish low-profile design with a sapphire crystal on both the front and back of a floating suspended dial. Also featured at Baselworld 2014 was the minimalist Cara Collection with a two-hand configuration and twelve sparkling crystals as indices. The beautiful Luce Collection also made an appearance, adding JOWISSA’s characteristic sparkle with a lavish crystal studded bezel.

Visitors to JOWISSA’s Baselworld booth were in agreement that a woman can’t have too many shoes or JOWISSA timepieces. It doesn’t matter if you already have 37 JOWISSA watches, or if you’re discovering these feminine favorites for the first time, you’re going to want a JOWISSA on your wrist. To see what caused all the excitement at Baselworld, just contact an authorized JOWISSA watch dealer and ask to see the latest styles.


INTRODUCTION {#s1}
============

Endometrial cancer is the most common gynecological malignancy in the Western countries \[[@R1]\]. Little progress has been made in development of treatment options over the past decades. This, combined with a rising incidence, has resulted in an increased number of deaths caused by the disease \[[@R2]\]. Although patients with localized disease have a good prognosis, prognosis is poor for patients with recurrence or metastatic disease at diagnosis and treatment options are few \[[@R3]\]. To improve treatment of this patient group, both the identification of new treatment targets, and identification of potent biomarkers to aid patient stratification are vital.

Traditionally, endometrial cancers have been divided into two groups. Type I, accounting for approximately 80% of cases, is associated with endometrioid histology, low stage and grade, good prognosis and estrogen dependency \[[@R3], [@R4]\]. Type II tumors are associated with non-endometrioid histology, high stage and grade and poor prognosis \[[@R3]\]. The majority of endometrial cancers are hormone dependent, and hormonal dysregulation is linked to disease development and progression \[[@R5]\]. The role and expression of estrogen and progesterone receptors (ERα and PR) in endometrial cancer have been extensively studied \[[@R5]\]. ERα and/or PR positivity in primary tumors is associated with well-differentiated lesions and more favorable prognosis \[[@R6], [@R7]\]. Hormonal therapy targeting both PR and ERα is used in treatment of endometrial cancer. The response rate to such treatments is usually low \[[@R8]\], however, patients expressing hormone receptors have been shown to be more sensitive to hormonal therapy \[[@R2]\].

Androgen receptor (AR) is a hormone receptor less studied in endometrial cancer, although a target for treatment in other cancers \[[@R9], [@R10]\]. It is expressed in several tissues, including the uterus, where its role is largely unknown \[[@R10], [@R11]\]. In males, aberrant androgen signaling is central to initiation and progression of prostate cancer \[[@R12], [@R13]\]. Treatment targeting AR or androgen synthesis is therefore one of the main therapeutic elements in patients with hormone dependent prostate cancer \[[@R9]\]. Recently, also in breast cancer treatment, targeting AR has been suggested beneficiary for specific subgroups of patients \[[@R10]\].

Given the similarities of breast and endometrial cancers, exploring AR expression in endometrial cancer might reveal new therapeutic strategies. Additionally, AR status in malignant endometrial lesions may be related to clinical phenotype and could represent a novel biomarker for prognosis.

RESULTS {#s2}
=======

AR is expressed in the majority of hyperplasias and primary endometrial cancer lesions {#s2_1}
--------------------------------------------------------------------------------------

The expression pattern of AR was investigated in relation to aggressiveness of endometrial cancer. AR staining was predominantly nuclear, and only staining in glandular tissue was scored (Figure [1A](#F1){ref-type="fig"} and [1B](#F1){ref-type="fig"}). Precursor lesions were included to investigate if there was a change in expression from the pre-malignant to the malignant stage. Hyperplasias had the highest level of AR expression. Of the 69 hyperplasias evaluated, 93% (64 patients) expressed AR. In primary tumors the percentage of lesions with AR expression decreased significantly from 74% to 53% from endometrioid grade 1 to grade 3 tumors respectively and further to 41% in non-endometrioid tumors (Figure [1C](#F1){ref-type="fig"}). This pattern was reflected when assessing mRNA levels (Figure [1D](#F1){ref-type="fig"}), and there was significant overlap between AR expression evaluated by IHC and AR mRNA expression ([Supplementary Figure 1](#SD1){ref-type="supplementary-material"}).

![AR expression decreases with dedifferentiation\
AR expression in glandular cells was scored, with strong AR immunohistochemical staining shown in (**A**) and AR loss in (**B**). Both AR protein level (**C**) and mRNA (**D**) level decreased with dedifferentiation. Abbreviations: AR: androgen receptor, Gr: grade, NE: non-endometrioid, PT: primary tumor, Met: metastases, \*Information on grade missing for 10 patients included in the study (7 AR positive and 3 AR negative)](oncotarget-07-49289-g001){#F1}

AR is frequently expressed in metastatic lesions of endometrial cancer {#s2_2}
----------------------------------------------------------------------

As for most cancers, metastatic endometrial cancers have high mortality and few treatment options. Characterization of metastatic lesions is therefore highly important, especially considering molecular targets with existing therapeutics. Expression was investigated in 298 metastatic lesions from 142 patients ([Supplementary Table 1](#SD1){ref-type="supplementary-material"}). We observed that a high number of the metastatic lesions express AR. For patients with corresponding metastatic lesions AR, PR and ERα was expressed in 48%, 61% and 52 % of the primary tumors respectively (Figure [2A, 2D](#F2){ref-type="fig"} and [2G](#F2){ref-type="fig"}). In metastases from hormone receptor (AR, PR or ERα) positive primary tumors, expression was retained in at least one metastatic lesion in 71% of cases for AR, 58% for PR and 64% for ERα (Figure [2B, 2E](#F2){ref-type="fig"} and [2H](#F2){ref-type="fig"}). Also 44% of patients defined to have lost expression of AR in the primary tumor expressed AR in at least one metastatic lesion (Figure [2C](#F2){ref-type="fig"}). For ERα and PR this was only 20% (Figure [2F](#F2){ref-type="fig"} and [2I](#F2){ref-type="fig"}). AR, PR and ERα were investigated in individual metastases to compare expression patterns. A high degree of heterogeneity in hormone receptor expression was observed both in metastases from AR positive primary tumors (Figure [2J](#F2){ref-type="fig"}) and AR negative primary tumors (Figure [2K](#F2){ref-type="fig"}). 39% of the metastatic lesions expressing AR had low expression of ERα.

![Expression of the individual hormone receptors AR, PR and ERα in metastatic lesions based on its expression in primary tumor. 48% of the primary tumors with corresponding metastatic lesions were AR positive (IHC score 1--9) (**A**). Graphs show distribution of AR expression in the metastatic lesions from AR positive primary tumors (**B**) and AR negative primary tumors (**C**). 61% of the primary tumors with corresponding metastatic lesions were PR positive (IHC score 1--9) (**D**). Graphs show distribution of PR expression in the metastatic lesions from the PR positive primary tumors (**E**) and PR negative primary tumors (**F**). 52% of the primary tumors with corresponding metastatic lesions were ER positive (IHC score 4--9) (**G**). Graphs show distribution of ER expression in the ER positive primary tumors (**H**) and ER negative primary tumors (**I**). Expression patterns in individual metastases from AR positive patients (**J**) and AR negative patients (**K**) are shown as AR (purple), PR (green) and ERα (orange) in J and K. One line of circles represents one metastasis, and shows the difference in hormone receptor expression in that specific metastasis. Only patients with one or more AR positive metastases are shown. \*Only primary tumors with corresponding metastases included.](oncotarget-07-49289-g002){#F2}

Expression of AR is associated with good survival {#s2_3}
-------------------------------------------------

Loss of AR was significantly associated with established features of aggressive tumors, such as high FIGO stage (*P* \< 0.001), non-endometrioid histology (*P* \< 0.001) and high grade within the endometrioid subgroup (*P* = 0.001) (Table [1](#T1){ref-type="table"}). The relation between disease specific survival and AR expression was investigated using groups with high and low expression of AR as defined in the method section. AR loss associated with shorter disease specific survival both in the whole population (Figure [3A](#F3){ref-type="fig"}) and within the subgroup of patients with disease confined to the uterus, FIGO stages I/II (Figure [3B](#F3){ref-type="fig"}). In multivariate survival analyses AR did not demonstrate independent prognostic impact when adjusting for factors with known prognostic value (age, histologic type and grade) (*p* = 0.12, data not shown), indicating that loss of AR may not add additional information regarding survival when used in a clinical setting. Still, the high number of primary tumors and metastatic lesions with intact expression of AR could point to an unexploited potential for treatment targeting AR in endometrial cancer, and it might be of particular interest in specific subgroups as observed for other cancer types.

![AR status predicts prognosis in endometrial cancer\
Endometrial cancer patients with AR expression (scoring index 1--9) have a significantly better survival than patient with AR loss (scoring index 0) both in the whole population (**A**) and in the subgroup of patients with FIGO stage I and II (**B**).](oncotarget-07-49289-g003){#F3}

###### Clinico-pathological variables related to androgen receptor (AR) status in endometrial cancer patients

                                                        AR
  ----------------------------------------------------- ---------- ---------- ----------
  Age                                                                         0.7
   \< 66                                                229 (63)   135 (37)
   ≥ 66                                                 218 (62)   136 (38)
  FIGO-09 stage                                                               \< 0.001
   I--II                                                396 (66)   204 (34)
   III--IV                                              51 (43)    67 (57)
  Histologic type                                                             \< 0.001
   Endometrioid                                         386 (67)   188 (33)
   Adenosquamous                                        4 (67)     2 (33)
   Clear cell                                           7 (25)     21 (75)
   Serous papillary                                     36 (55)    29 (45)
   Carcinosarcoma                                       13 (41)    19 (59)
   Undifferentiated/other                               1 (7)      12 (92)
  Histologic grade[\*](#tfn_001){ref-type="table-fn"}                         0.001
   Grade 1/2                                            329 (70)   140 (30)
   Grade 3                                              50 (53)    45 (47)
  Metastatic nodes                                                            \< 0.001
   Negative                                             333 (65)   176 (35)
   Positive                                             28 (42)    39 (58)
  Ploidy                                                                      0.3
   Diploid                                              223 (64)   128 (36)
   Aneuploid                                            59 (58)    43 (42)
  PR                                                                          \< 0.001
   Positive                                             391 (74)   137 (26)
   Negative                                             40 (26)    115 (74)
  ERa                                                                         \< 0.001
   Positive                                             390 (78)   113 (22)
   Negative                                             42 (23)    140 (77)

only endometrioid, missing information on grade for ten cases.

High AR to ERα ratio identifies patients with particularly poor survival {#s2_4}
------------------------------------------------------------------------

Based on previous findings in breast cancer, we hypothesized that also for endometrial cancer, the effect of AR signaling may be influenced by the presence of ERα. Interestingly, the patients with the highest calculated AR to ERα ratio (based on RPPA data) had significantly worse survival, both in the whole population (Figure [4A](#F4){ref-type="fig"}) and in FIGO stages I/II ([Supplementary Figure 2A](#SD1){ref-type="supplementary-material"}). A high ratio was also significantly associated with established features of aggressive tumors ([Supplementary Table 2](#SD1){ref-type="supplementary-material"}). In a subpopulation with especially long follow up, a high AR to ERα ratio, calculated based on mRNA levels, also identified a patient group with significantly worse survival compared with patients with a low AR to ERα ratio, both in the whole population ([Supplementary Figure 2B](#SD1){ref-type="supplementary-material"}) and in FIGO stages I/II ([Supplementary Figure 2C](#SD1){ref-type="supplementary-material"}).

![High AR to ER ratio identifies a subgroup with particularly poor survival\
Patients with a high AR to ERα ratio assessed by Reverse Phase Protein Array demonstrate a particularly poor disease specific survival compared to patients with a low AR to ERα ratio (**A**). The group with high AR to ERα ratio had significantly higher CCP score (**B**) and PCNA expression (**C**) compared to the group with low AR to ERα ratio.](oncotarget-07-49289-g004){#F4}

The underlying mechanisms involved were explored by investigating transcriptional alterations related to the high AR to ERα ratio group. In GSEA analysis several of the top ranked GO gene sets enriched in the high AR to ERα ratio group were associated with cell cycle regulation ([Supplementary Table 3](#SD1){ref-type="supplementary-material"}). This finding was supported by the significantly higher proliferation identified in patients with high AR to ERα ratio, assessed both by high cell cycle progression (CCP) score and high proliferation cell nuclear antigen (PCNA) levels (measured by Reverse Phase Protein Array) (Figure [4B](#F4){ref-type="fig"} and [4C](#F4){ref-type="fig"}).

To explore if transcriptional alterations related to the high AR to ERα ratio could suggest new targets for treatment, Connectivity map was queried for drug signatures negatively correlated with the gene expression profile of tumors with a high AR to ERα ratio. Compounds targeting phosphoinositide 3-kinase (PI3K)/mammalian target of rapamycin (mTOR) pathway were among the top ranked, along with HSP90 inhibitors, known to disrupt hormone binding and hormone receptor stability \[[@R14]\], the AR inhibitor Resveratol \[[@R15], [@R16]\] and a CDK inhibitor \[[@R17]\] ([Supplementary Table 4](#SD1){ref-type="supplementary-material"}). These findings suggest that drugs targeting proliferation and anti-androgen treatment could be potential treatment options for the high AR to ERα ratio patient subgroup in particular. Supporting this, preliminary results in short-term cultures of AR positive (defined by IHC staining of patient biopsy) primary endometrial tumor cells, proliferation was significantly inhibited by the anti-androgen enzalutamide, and there was a tendency to increased proliferation after stimulation with the synthetic androgen R1881, although not statistically significant. No effect was seen in AR negative or focal positive cells (data not shown).

DISCUSSION {#s3}
==========

Several studies have demonstrated that ERα and PR status are important prognostic biomarkers, also predicting response to anti-hormonal therapy in endometrial cancer \[[@R6], [@R7]\]. For AR available data is more limited. It is still unsettled if AR could predict outcome and also, whether there is a role for androgen targeting drugs in endometrial cancer treatment. The published studies are few with low number of included patients, leaving inconclusive results \[[@R18]--[@R24]\]. In the present study, to date the largest and most comprehensive study with extensive clinical annotation and samples ranging from precursors through primary to metastatic endometrial carcinoma lesions, we find that precursor lesions and well-differentiated primary tumors have the highest level of AR, with a gradual decrease in AR level with dedifferentiation. This pattern is consistently found using different methods to assess AR levels. Our findings thus appear to be in line with previous smaller studies, reporting AR loss ranging from 11.4% in endometrioid primary tumors \[[@R25]\] to 79% in a study including primary tumors of different histological subtypes \[[@R26]\]. A significant association between dedifferentiation and AR loss has also been reported in a small study including 35 patients \[[@R27]\]. In this study we show that also AR is a prognostic marker in endometrial cancer as earlier well documented for ERα and PR \[[@R6], [@R28]--[@R30]\].

The extensive experience with anti-androgen treatment in prostate cancer makes it attractive for investigation also in other hormone dependent cancers. There are several available anti-androgen treatments with different mechanism of action. The anti-androgen bicalutamide inhibits binding of ligand to the androgen receptor, while enzalutamide, a second generation anti-androgen, inhibits several steps of AR activation. Inhibition of AR signaling can also be achieved through inhibition of ligand synthesis. Abiraterone inhibits the enzyme CYP17 which is necessary for androgen biosynthesis \[[@R31]\]. Although our findings show that AR expression is associated with low grade tumors, it may, analogous to ERα, still be a driver for tumor growth and therefore a potential therapeutic target. Our preliminary results indicate that enzalutamide may inhibit proliferation in AR positive primary endometrial cancer cells. This is an interesting observation that calls for follow-up functional studies. There are few studies investigating the effect of AR signaling on endometrial cells, and the results from these studies are contradictory. Different mechanisms have been suggested by which androgens may exert their effect on the endometrium. The proliferative effects of androgen have been linked to enhancement of EGF action \[[@R18]\], increased expression of genes involved in IGF-1 and Wnt signaling \[[@R19]\] or to endometrial cancer cell proliferation through activation of the oncogene c-myc \[[@R20]\]. These studies are however contradicted by the finding that androgens inhibit proliferation of endometrial cells *in vitro* \[[@R21], [@R22]\], and several studies on the weakly AR positive endometrial cancer cell line MFE-296 demonstrating growth inhibition by androgen stimulation \[[@R23], [@R24]\]. These conflicting results could imply different roles for AR at different stages of endometrial cancer and indicate that AR signaling is context-dependent. This is in line with our finding that a subgroup of patients with high AR to ERα ratio has particularly poor survival, indicating that ERα status may influence the effect of AR. Our findings are also in line with previous observations from breast cancer, where the prognosticvalue of AR is improved by combining AR and ERα status \[[@R32], [@R33]\]. Cochrane *et. al.* found that a high AR to ERα ratio was an independent predictor of disease-free and disease specific survival in breast cancer \[[@R34]\]. Studies are ongoing in breast cancer to investigate the effect of anti-androgen treatment in patients with AR positive tumors with loss of ERα and PR ([ClinicalTrials.gov](http://clinicaltrials.gov) Identifier NCT00468715, NCT01889238). Similar studies in endometrial cancer patients could reveal whether AR could be a potential target also in endometrial cancer patients with high AR to ERα ratio.

Hormonal treatment targeting ERα and PR is found to be most effective if the hormone receptor is expressed \[[@R2], [@R35]\]. Since the expression of these hormone receptors is discordant between primary and metastatic lesions \[[@R6], [@R36]\], investigating the expression status also in the metastatic setting is important. We find that AR is more often expressed in metastatic lesions compared to ER and PR, but also AR expression is discordant in primary and metastatic lesions in a large proportion of cases. Since a large proportion of metastatic endometrial cancers express AR, this may serve as a potential therapeutic target for this patient group, and particularly in the group with a high AR to ERα ratio. As there are several available treatments targeting AR, further studies should be conducted to investigate their potential in treatment of endometrial cancer. This study also underlines the need to examine metastatic expression of potential therapeutic targets, as multiple studies have also done concerning other biomarkers and targets \[[@R6], [@R36]--[@R38]\], and clearly demonstrates that the primary tumor is not representative for its metastatic lesions.

MATERIALS AND METHODS {#s4}
=====================

Patient series {#s4_1}
--------------

A population-based patient series was prospectively collected from 2001 to 2015 and included 718 primary tumors from patients diagnosed with endometrial cancer in Hordaland County (Norway). Clinical data were collected as previously described \[[@R39]\] and patients were surgically staged according to the International Federation of Gynecology and Obstetrics (FIGO) 2009 criteria. Samples from precursor lesions (complex atypical hyperplasia) were available from 69 patients and metastasis from 142 patients (in total 298 metastatic lesions). Fresh frozen tissue were investigated for gene expression for 223 patients of which 163 overlapped with formalin fixed paraffin embedded tissue (FFPE). In addition protein expression was investigated in 370 patients by reverse phase protein array (RPPA) where 306 overlapped with FFPE ([Supplementary Table 5](#SD1){ref-type="supplementary-material"}).

The study has been approved by Norwegian legislation, including the Norwegian Data Inspectorate, Norwegian Social Sciences Data Services and the Western Regional Committee for Medical and Health Research Ethics (REK 2009/2315). Patients gave written informed consent.

Immunohistochemical staining {#s4_2}
----------------------------

Tissue microarrays (TMA) were dewaxed in xylene and rehydrated in graded ethanol series before microwave boiling in target retrieval buffer (pH9) for 15 minutes. Staining for AR, ERα and PR expression was performed as previously described \[[@R6], [@R7], [@R40]\]. The staining was evaluated using a semi-quantitative system where both intensity and area of positive tumor cells is considered. Staining intensity was graded from 0 (no staining) to 3 (strong staining), and area from 0, 1 (\< 10%), 2 (10--50%) and 3 (\> 50%). A staining index was calculated as the product of staining intensity and area. For AR and PR, staining index 0 was considered negative, and index 1--9 positive. For ER index 0--3 was defined as low, and 4--9 as high. The method for producing tissue microarrays (TMA) has previously been described and validated \[[@R41], [@R42]\].

Gene expression analysis {#s4_3}
------------------------

RNA was extracted from fresh frozen tissue from 18 hyperplasias, 174 primary tumors and 42 metastases, and hybridized to Agilent Whole Human Genome Microarrays 44k (Cat. No. G4112F), according to the manufacturer\'s instruction. The arrays were scanned and normalized as previously described \[[@R36]\]. Gene Ontology (GO) gene sets enriched in different groups were investigated with Gene Set Enrichment Analysis (GSEA) using gene permutations and Significance Analysis of Microarray (SAM) as scoring method. The signature score for the cell cycle progression (CCP) signature published by Cuzik et al \[[@R43]\] was calculated as previously described \[[@R6]\]. Connectivity Map \[[@R44]\] was used to search for potential drugs based on differences in gene expression between the high AR to ERα ratio and the AR to ERα ratio group. 23 cases with high ratio (≥ 1.25), and the 41 cases with lowest ratio (≤ 0.95) were included in the analysis. The AR to ER ratio based on mRNA expression was calculated by dividing the AR value with ER value.

Reverse phase protein array {#s4_4}
---------------------------

Reverse Phase Protein Array (RPPA) was performed for 370 of the primary tumors as previously described \[[@R45], [@R46]\]. Slides were stained using antibodies as listed (<https://www.mdanderson.org/education-and-research/resources-for-professionals/scientific-resources/core-facilities-and-services/functional-proteomics-rppa-core/index.html>). Relative protein levels were determined by fitting each dilution curve with a logistic model ('Supercurve Fitting' <http://bioinformatics.mdanderson.org/OOMPA>) \[[@R47]\]. Expression levels of AR, ERα and proliferation cell nuclear antigen (PCNA) were extracted from the whole RPPA dataset. The AR to ERα ratio was calculated by dividing the AR value with ERα value.

Statistical analysis {#s4_5}
--------------------

Data were analyzed using SPSS version 22 (SPSS Inc, Chicago, IL). Probability \< 0.05 was considered statistical significant. Associations between groups were evaluated using the chi-square test for categorical variables and the Mann-Whitney U test for continuous variables. Univariate survival analysis was performed using the Kaplan Meier (product-limit) method. Date of primary surgery was entry date, and date of death due to endometrial carcinoma was defined as event for estimation of disease specific survival. Survival between groups was compared using the log-rank (Mantel-Cox) test. The Cox proportional hazard regression model was used to evaluate the prognostic impact of AR adjusted for other prognostic parameters. Included in the model was in addition to AR; age, histologic type and grade, all factors with known prognostic impact in endometrial cancer.

SUPPLEMENTARY MATERIALS FIGURES AND TABLES {#s5}
==========================================

We thank Ellen Valen, Britt Edvardsen, Kadri Madissoo and Bendik Nordanger for technical assistance.

We would like to dedicate this manuscript to Helga B. Salvesen who recently died unexpectedly. She was a dedicated physician and scientist, and a warm and caring person. We will all miss her.

**CONFLICTS OF INTEREST**

No potential conflicts of interest was disclosed.

**FINANCIAL SUPPORT**

This study was supported by Helse Vest, the University of Bergen, the Norwegian Cancer Society (Harald Andersen Legat), the Research Council of Norway and Bergen Research Foundation.


279 N.W.2d 647 (1979)
Jay HANSON, by his next friend, Sandra Hanson, and Sandra Hanson, Plaintiffs and Appellees,
v.
GARWOOD INDUSTRIES, Defendant, and
City of Jamestown, a Municipal Corporation, Defendant and Appellant.
Civ. No. 9601.
Supreme Court of North Dakota.
May 22, 1979.
Kenneth M. Moran, Jamestown, and Odell M. Astrup, Fargo, for plaintiffs and appellees; argued by Kenneth M. Moran, Jamestown.
Hjellum, Weiss, Nerison, Jukkala & Vinje, Jamestown, for defendant, Garwood Industries.
Vogel, Branter, Kelly, Knutson, Weir & Bye, Fargo, for defendant and appellant, City of Jamestown; argued by Carlton J. Hunke, Fargo.
*648 ERICKSTAD, Chief Justice.
The City of Jamestown appeals from a district court order granting the plaintiffs, Jay Hanson, through his mother, Sandra Hanson, and Sandra Hanson (hereinafter plaintiff), a change of venue from Stutsman to Burleigh County. The motion was granted pursuant to Section 28-04-07(2), N.D.C.C.,[1] on the grounds that an impartial trial could not be held in Stutsman County because the City of Jamestown was a defendant in the action. We reverse.
Plaintiff, Jay Hanson, six years old, was allegedly injured when he pulled himself up on a garbage dumpster owned by the City of Jamestown and manufactured by the defendant Garwood Industries, and the dumpster fell on him. By complaint dated October 10, 1978, plaintiff brought this action against Garwood Industries alleging negligence, breach of warranty, and strict liability in the manufacture and sale of the dumpster and against the City of Jamestown alleging negligence and strict liability in the maintenance of the dumpster.
The plaintiff subsequently moved to amend the complaint to assert punitive damages against the City of Jamestown and also moved to change venue from Stutsman to Burleigh County. The plaintiff's attorney filed the only affidavit in support of the motion for change of venue and it provided in relevant part:
"That he is the attorney for Plaintiffs in the above matter and makes this Affidavit on their behalf;
"That affiant believes the proper method of changing venue from a county in which, as here, one of the Defendants in the putative jury trial is the major city in that county, is to first bring the action in that otherwise proper county and then, as here, move to change venue-on the ground there is obvious reason to believe an impartial trial cannot be had in Stutsman County (Section 28-04-07(2)); clearly an impartial trial could not be conducted by jurors who are taxpayers of Defendant city which might well have to respond in money damages to Plaintiffs;"
The district court granted the plaintiff's motion for change of venue and the City of Jamestown appeals contending that the plaintiff made an insufficient showing that a fair and impartial trial could not be held in Stutsman County.
An order granting a change of venue is an appealable order. Robertson Lbr. Co. v. Jones, 13 N.D. 112, 99 N.W. 1082 (1904).
Where the proper county for trial is that of the defendant's residence, the defendant has a right to have the action tried in that county subject to the power of the court to change the place of trial as provided by statute. Section 28-04-05, N.D.C.C.; American State Bank of Dickinson v. Hoffelt, 246 N.W.2d 484, 487 (N.D. 1976); Bartholomay v. St. Thomas Lumber Company, 124 N.W.2d 481, 484 (N.D.1963). See also Section 28-04-03, N.D.C.C. Section 28-04-07(2), N.D.C.C., provides that the court may change venue "[w]hen there is reason to believe that an impartial trial cannot be had therein." In making this determination, the district court is accorded much discretion and "an order of the trial court on such motion, either granting or denying the same, will not be overruled or *649 disturbed on appeal in the absence of a manifest abuse of discretion." Knoepfle v. Suko, 114 N.W.2d 54, 55 (N.D.1962). The burden is on the moving party to show that a fair and impartial trial cannot be held in the county from which the transfer is sought. Knoepfle v. Suko, supra at 56.
The City of Jamestown argues that the plaintiff did not meet his burden of showing that an impartial trial cannot be held in Stutsman County; consequently, the district court abused its discretion in granting the motion for change of venue. The plaintiff responds that the court should take judicial notice of the population of the City of Jamestown in proportion to the population of Stutsman County. Because many of the prospective jurors are taxpayers and residents of Jamestown,[2] the plaintiff contends the prospective jurors would have a financial interest in the outcome of the case; therefore, venue was properly changed.
The narrow issue for our determination is whether or not the district court abused its discretion in granting a change of venue based upon a single affidavit stating that an impartial trial cannot be held in a county in which one of the defendants is a major city of that county.
In Maier v. City of Ketchikan, 403 P.2d 34 (Alaska 1965), overruled on other grounds, Johnson v. City of Fairbanks, 583 P.2d 181 (Alaska 1978), the Supreme Court of Alaska dealt with a similar question. In Maier, the plaintiff brought an action originally venued in Juneau against the City of Ketchikan for injuries sustained when a metal survey rod he was holding came into contact with an electrical power line owned by the city.
A lower court granted the city's motion for change of venue from Juneau to Ketchikan and following a denial of the plaintiff's motion to change venue back to where it was originally venued, the plaintiff appealed contending that an impartial trial could not be held in Ketchikan. The Alaska Supreme Court rejected the plaintiff's argument:
"[A]ppellant contends that an impartial trial cannot be had in Ketchikan. His reasons are that most of the prospective jurors are taxpayers and residents of Ketchikan and would have an interest of a financial nature in the outcome of the case, and that the jurors also are customers of the city-owned Ketchikan Public Utilities and it might appear to them that a large judgment for appellant would increase the electrical rates that they would be obliged to pay.
"We hold that the factors mentioned by appellant are not in themselves sufficient to show that an impartial trial cannot be had in Ketchikan, so that it would be held an abuse of the trial court's discretion to refuse to change the venue to the City of Juneau or some other place. If in order to require a court to change venue it was only necessary to show that an action was one against a municipality and that the prospective jurors were taxpayers or users of a municipal utility, it would mean that no action could be tried in the municipality involved over a plaintiff's objection, but would have to be sent elsewhere for trial. This would not be in the best public interest, because it would result in imposing the burden of jury duty upon the people of a community that has no relation to the litigation. As the United States Supreme Court has stated: [citing Gulf Oil Corp. v. Gilbert, 330 U.S. 501, 509, 67 S.Ct. 839, 91 L.Ed. 1055, 1062-63 (1947)]
`In cases which touch the affairs of many persons, there is reason for holding the trial in their view and reach rather than in remote parts of the country where they can learn of it by report only. There is a local interest in having localized controversies decided at home.'" 403 P.2d at 39-40.
See also School District No. 1 v. Globe and Republic Ins. Co., 142 Mont. 220, 383 P.2d 482 (1963); Section 28-14-06(5), N.D.C.C.; and Annot., 81 A.L.R.2d 708 (1962) and Later Case Service.
*650 We agree that an affidavit which merely asserts that an action is one against a municipality and that prospective jurors are taxpayers of that municipality is insufficient to effect a change of venue pursuant to Section 28-04-07(2), N.D.C.C. In Bartholomay v. St. Thomas Lumber Company, supra at 485, we stated that the "defendants have a statutory right to have . . [a] case against them tried in the county in which they live" and that "[t]his right should not be taken away except for good cause shown." Although we will not disturb the trial court's order for change of venue on appeal in the absence of manifest abuse, we will consider "whether a reasonable and intelligent basis for the decision rendered is shown in the affidavits." We do not believe that a sufficient showing was made in this case. For an example of the principle involved in a criminal case, see Olson v. North Dakota Dist. Court, 271 N.W.2d 574 (N.D.1978).
In American State Bank of Dickinson v. Hoffelt, supra, we affirmed the district court's denial of plaintiffs' motion for change of venue made on the grounds that the change would promote the convenience of witnesses and the ends of justice. Section 28-04-07(3), N.D.C.C. In so holding, we stated that "if the motion for change of venue would have been granted by the trial court, based solely on the affidavits presented by the . . . [plaintiffs], a strong argument could have been made that it constituted a clear abuse of discretion." We noted that the plaintiffs' affidavits did not set forth "with requisite specificity the names of those individuals expected to be called as witnesses, nor the substance of the testimony to be given by them, and whether that testimony is necessary and material." Thus, we have recently held that an affidavit in support of a motion for change of venue may not state only conclusions but "must state facts upon which the trial court can make its determination. It must also contain specifics, rather than mere generalities." American State Bank of Dickinson v. Hoffelt, 246 N.W.2d at 486-87. The affidavit in this case falls short of this requirement. See also Putnam Ranches v. O'Neill Production Credit, S.D., 271 N.W.2d 856 (1978).
To hold otherwise would acknowledge that a fair trial cannot be held in a county in which the county's major city is a defendant. In Falkenstein v. City of Bismarck, 268 N.W.2d 787 (N.D.1978), we affirmed a judgment of the Burleigh County District Court against the City of Bismarck. Although the question of venue was not raised in Falkenstein, the case does serve to rebut the contention that a fair trial cannot be held under these circumstances.
In so holding, we are mindful of our decision in Sheridan County v. Davis, 61 N.D. 744, 240 N.W. 867 (1932), but find that it is not controlling in this case. In Sheridan County, the county of Sheridan brought a condemnation action against the defendant seeking to condemn a parcel of land containing gravel that the county needed in the construction of highways. Following a judgment favorable to the county, the defendant appealed to this court. Although this court reversed the lower court's judgment and granted a new trial on other grounds, it also commented on defendant's contention that an impartial trial could not be held in Sheridan County because the entire jury would consist of taxpayers. The court stated that "it cannot be said as a general proposition that the interests of a juror as a taxpayer in the outcome of a suit against a public corporation disqualifies him from acting." This court, however, also stated that the lower court may not have wisely exercised its discretion in denying a change of venue in that case because the entire jury would consist of taxpayers. In the present case, the only ground asserted for change of venue, is that the defendant is a major city in the county and that some potential jurors are taxpayers of the city. Our holding in this case based on these facts is consistent with this court's statement in Sheridan County noted earlier.
We conclude that the trial court abused its discretion and accordingly reverse its order granting change of venue.
SAND, PAULSON, PEDERSON and VANDE WALLE, JJ., concur.
NOTES
[1]  "28-04-07. Court may change venueCases.The court may change the place of trial in the following cases:

1. When the county designated for that purpose in the complaint is not the proper county;
2. When there is reason to believe that an impartial trial cannot be had therein;
3. When the convenience of witnesses and the ends of justice would be promoted by the change;
4. When upon the call of the calendar at any regular or special term there appears to be an insufficient number of jury cases for trial to warrant the expense of a jury, the court, on application of any party to such an action, or on its own motion, taking into consideration the convenience of witnesses and the promotion of justice, may order the transfer of such jury cases as are on the calendar to any county within the judicial district where a jury session of court will be held in the immediate future, so that a prompt trial of such cases may be had."
[2]  Plaintiff submits that pursuant to the 1970 census, Stutsman County had a population of 23,550 and the City of Jamestown, 15,380 or 65% of the population of the county.


Q:

Link error- missing required architecture i386 in file-symbols not found

I am working on an app that uses a twitter API.
The app runs fine when it is hooked up to an IOS device, but when I change the architecture from armv6 to i386 to get it running on the simulator I get this error:
  ld: warning: ignoring file       /Users/username/Desktop/tweetsAloud/tweets2/tweetsAloud/Src/NeoSpeech/lib-i iphoneos/libvt_eng_julie.a, missing required architecture i386 in file
Undefined symbols for architecture i386:
  "_VT_LOADTTS_ENG", referenced from:
      -[TweetsViewController viewWillAppear:] in TweetsViewController.o
  "_VT_UNLOADTTS_ENG", referenced from:
      -[TweetsViewController viewWillDisappear:] in TweetsViewController.o
  "_VT_TextToFile_ENG", referenced from:
      -[TweetsViewController readyStringToPlay:] in TweetsViewController.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status

So I have read up a lot of suggestions already and tried most of them with little luck.
I first made sure I had all my frameworks, then I tried editing the project.pbxproj, still did not work.
I have tried cleaning and changing the build settings.
Anyone have any ideas why I get this error message?

A:

You are probably linking your i386 project against an arm build of library NeoSpeech/lib-i iphoneos/libvt_eng_julie.a. That is what the warning means.
If you have an i386 version if this lib, then change your linker settings to point to that version instead. If you don't have the i386 version of this lib, then you'll have to get it from the author, or compile it yourself if you have the source code.
Good luck.


/*******************************************************************************

  Intel 10 Gigabit PCI Express Linux driver
  Copyright(c) 1999 - 2010 Intel Corporation.

  This program is free software; you can redistribute it and/or modify it
  under the terms and conditions of the GNU General Public License,
  version 2, as published by the Free Software Foundation.

  This program is distributed in the hope it will be useful, but WITHOUT
  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
  more details.

  You should have received a copy of the GNU General Public License along with
  this program; if not, write to the Free Software Foundation, Inc.,
  51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.

  The full GNU General Public License is included in this distribution in
  the file called "COPYING".

  Contact Information:
  Linux NICS <linux.nics@intel.com>
  e1000-devel Mailing List <e1000-devel@lists.sourceforge.net>
  Intel Corporation, 5200 N.E. Elam Young Parkway, Hillsboro, OR 97124-6497

*******************************************************************************/

#include "ixgbe.h"
#include <linux/dcbnl.h>
#include "ixgbe_dcb_82598.h"
#include "ixgbe_dcb_82599.h"

/* Callbacks for DCB netlink in the kernel */
#define BIT_DCB_MODE	0x01
#define BIT_PFC		0x02
#define BIT_PG_RX	0x04
#define BIT_PG_TX	0x08
#define BIT_APP_UPCHG	0x10
#define BIT_RESETLINK   0x40
#define BIT_LINKSPEED   0x80

/* Responses for the DCB_C_SET_ALL command */
#define DCB_HW_CHG_RST  0  /* DCB configuration changed with reset */
#define DCB_NO_HW_CHG   1  /* DCB configuration did not change */
#define DCB_HW_CHG      2  /* DCB configuration changed, no reset */

int ixgbe_copy_dcb_cfg(struct ixgbe_dcb_config *src_dcb_cfg,
                       struct ixgbe_dcb_config *dst_dcb_cfg, int tc_max)
{
	struct tc_configuration *src_tc_cfg = NULL;
	struct tc_configuration *dst_tc_cfg = NULL;
	int i;

	if (!src_dcb_cfg || !dst_dcb_cfg)
		return -EINVAL;

	for (i = DCB_PG_ATTR_TC_0; i < tc_max + DCB_PG_ATTR_TC_0; i++) {
		src_tc_cfg = &src_dcb_cfg->tc_config[i - DCB_PG_ATTR_TC_0];
		dst_tc_cfg = &dst_dcb_cfg->tc_config[i - DCB_PG_ATTR_TC_0];

		dst_tc_cfg->path[DCB_TX_CONFIG].prio_type =
				src_tc_cfg->path[DCB_TX_CONFIG].prio_type;

		dst_tc_cfg->path[DCB_TX_CONFIG].bwg_id =
				src_tc_cfg->path[DCB_TX_CONFIG].bwg_id;

		dst_tc_cfg->path[DCB_TX_CONFIG].bwg_percent =
				src_tc_cfg->path[DCB_TX_CONFIG].bwg_percent;

		dst_tc_cfg->path[DCB_TX_CONFIG].up_to_tc_bitmap =
				src_tc_cfg->path[DCB_TX_CONFIG].up_to_tc_bitmap;

		dst_tc_cfg->path[DCB_RX_CONFIG].prio_type =
				src_tc_cfg->path[DCB_RX_CONFIG].prio_type;

		dst_tc_cfg->path[DCB_RX_CONFIG].bwg_id =
				src_tc_cfg->path[DCB_RX_CONFIG].bwg_id;

		dst_tc_cfg->path[DCB_RX_CONFIG].bwg_percent =
				src_tc_cfg->path[DCB_RX_CONFIG].bwg_percent;

		dst_tc_cfg->path[DCB_RX_CONFIG].up_to_tc_bitmap =
				src_tc_cfg->path[DCB_RX_CONFIG].up_to_tc_bitmap;
	}

	for (i = DCB_PG_ATTR_BW_ID_0; i < DCB_PG_ATTR_BW_ID_MAX; i++) {
		dst_dcb_cfg->bw_percentage[DCB_TX_CONFIG]
			[i-DCB_PG_ATTR_BW_ID_0] = src_dcb_cfg->bw_percentage
				[DCB_TX_CONFIG][i-DCB_PG_ATTR_BW_ID_0];
		dst_dcb_cfg->bw_percentage[DCB_RX_CONFIG]
			[i-DCB_PG_ATTR_BW_ID_0] = src_dcb_cfg->bw_percentage
				[DCB_RX_CONFIG][i-DCB_PG_ATTR_BW_ID_0];
	}

	for (i = DCB_PFC_UP_ATTR_0; i < DCB_PFC_UP_ATTR_MAX; i++) {
		dst_dcb_cfg->tc_config[i - DCB_PFC_UP_ATTR_0].dcb_pfc =
			src_dcb_cfg->tc_config[i - DCB_PFC_UP_ATTR_0].dcb_pfc;
	}

	dst_dcb_cfg->pfc_mode_enable = src_dcb_cfg->pfc_mode_enable;

	return 0;
}

static u8 ixgbe_dcbnl_get_state(struct net_device *netdev)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	return !!(adapter->flags & IXGBE_FLAG_DCB_ENABLED);
}

static u8 ixgbe_dcbnl_set_state(struct net_device *netdev, u8 state)
{
	u8 err = 0;
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	if (state > 0) {
		/* Turn on DCB */
		if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
			goto out;

		if (!(adapter->flags & IXGBE_FLAG_MSIX_ENABLED)) {
			DPRINTK(DRV, ERR, "Enable failed, needs MSI-X\n");
			err = 1;
			goto out;
		}

		if (netif_running(netdev))
			netdev->netdev_ops->ndo_stop(netdev);
		ixgbe_clear_interrupt_scheme(adapter);

		if (adapter->hw.mac.type == ixgbe_mac_82598EB) {
			adapter->last_lfc_mode = adapter->hw.fc.current_mode;
			adapter->hw.fc.requested_mode = ixgbe_fc_none;
		}
		adapter->flags &= ~IXGBE_FLAG_RSS_ENABLED;
		if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
			adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE;
			adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE;
		}
		adapter->flags |= IXGBE_FLAG_DCB_ENABLED;
		ixgbe_init_interrupt_scheme(adapter);
		if (netif_running(netdev))
			netdev->netdev_ops->ndo_open(netdev);
	} else {
		/* Turn off DCB */
		if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
			if (netif_running(netdev))
				netdev->netdev_ops->ndo_stop(netdev);
			ixgbe_clear_interrupt_scheme(adapter);

			adapter->hw.fc.requested_mode = adapter->last_lfc_mode;
			adapter->temp_dcb_cfg.pfc_mode_enable = false;
			adapter->dcb_cfg.pfc_mode_enable = false;
			adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED;
			adapter->flags |= IXGBE_FLAG_RSS_ENABLED;
			if (adapter->hw.mac.type == ixgbe_mac_82599EB)
				adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE;

			ixgbe_init_interrupt_scheme(adapter);
			if (netif_running(netdev))
				netdev->netdev_ops->ndo_open(netdev);
		}
	}
out:
	return err;
}

static void ixgbe_dcbnl_get_perm_hw_addr(struct net_device *netdev,
					 u8 *perm_addr)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);
	int i, j;

	memset(perm_addr, 0xff, MAX_ADDR_LEN);

	for (i = 0; i < netdev->addr_len; i++)
		perm_addr[i] = adapter->hw.mac.perm_addr[i];

	if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
		for (j = 0; j < netdev->addr_len; j++, i++)
			perm_addr[i] = adapter->hw.mac.san_addr[j];
	}
}

static void ixgbe_dcbnl_set_pg_tc_cfg_tx(struct net_device *netdev, int tc,
                                         u8 prio, u8 bwg_id, u8 bw_pct,
                                         u8 up_map)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	if (prio != DCB_ATTR_VALUE_UNDEFINED)
		adapter->temp_dcb_cfg.tc_config[tc].path[0].prio_type = prio;
	if (bwg_id != DCB_ATTR_VALUE_UNDEFINED)
		adapter->temp_dcb_cfg.tc_config[tc].path[0].bwg_id = bwg_id;
	if (bw_pct != DCB_ATTR_VALUE_UNDEFINED)
		adapter->temp_dcb_cfg.tc_config[tc].path[0].bwg_percent =
			bw_pct;
	if (up_map != DCB_ATTR_VALUE_UNDEFINED)
		adapter->temp_dcb_cfg.tc_config[tc].path[0].up_to_tc_bitmap =
			up_map;

	if ((adapter->temp_dcb_cfg.tc_config[tc].path[0].prio_type !=
	     adapter->dcb_cfg.tc_config[tc].path[0].prio_type) ||
	    (adapter->temp_dcb_cfg.tc_config[tc].path[0].bwg_id !=
	     adapter->dcb_cfg.tc_config[tc].path[0].bwg_id) ||
	    (adapter->temp_dcb_cfg.tc_config[tc].path[0].bwg_percent !=
	     adapter->dcb_cfg.tc_config[tc].path[0].bwg_percent) ||
	    (adapter->temp_dcb_cfg.tc_config[tc].path[0].up_to_tc_bitmap !=
	     adapter->dcb_cfg.tc_config[tc].path[0].up_to_tc_bitmap)) {
		adapter->dcb_set_bitmap |= BIT_PG_TX;
		adapter->dcb_set_bitmap |= BIT_RESETLINK;
	}
}

static void ixgbe_dcbnl_set_pg_bwg_cfg_tx(struct net_device *netdev, int bwg_id,
                                          u8 bw_pct)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	adapter->temp_dcb_cfg.bw_percentage[0][bwg_id] = bw_pct;

	if (adapter->temp_dcb_cfg.bw_percentage[0][bwg_id] !=
	    adapter->dcb_cfg.bw_percentage[0][bwg_id]) {
		adapter->dcb_set_bitmap |= BIT_PG_TX;
		adapter->dcb_set_bitmap |= BIT_RESETLINK;
	}
}

static void ixgbe_dcbnl_set_pg_tc_cfg_rx(struct net_device *netdev, int tc,
                                         u8 prio, u8 bwg_id, u8 bw_pct,
                                         u8 up_map)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	if (prio != DCB_ATTR_VALUE_UNDEFINED)
		adapter->temp_dcb_cfg.tc_config[tc].path[1].prio_type = prio;
	if (bwg_id != DCB_ATTR_VALUE_UNDEFINED)
		adapter->temp_dcb_cfg.tc_config[tc].path[1].bwg_id = bwg_id;
	if (bw_pct != DCB_ATTR_VALUE_UNDEFINED)
		adapter->temp_dcb_cfg.tc_config[tc].path[1].bwg_percent =
			bw_pct;
	if (up_map != DCB_ATTR_VALUE_UNDEFINED)
		adapter->temp_dcb_cfg.tc_config[tc].path[1].up_to_tc_bitmap =
			up_map;

	if ((adapter->temp_dcb_cfg.tc_config[tc].path[1].prio_type !=
	     adapter->dcb_cfg.tc_config[tc].path[1].prio_type) ||
	    (adapter->temp_dcb_cfg.tc_config[tc].path[1].bwg_id !=
	     adapter->dcb_cfg.tc_config[tc].path[1].bwg_id) ||
	    (adapter->temp_dcb_cfg.tc_config[tc].path[1].bwg_percent !=
	     adapter->dcb_cfg.tc_config[tc].path[1].bwg_percent) ||
	    (adapter->temp_dcb_cfg.tc_config[tc].path[1].up_to_tc_bitmap !=
	     adapter->dcb_cfg.tc_config[tc].path[1].up_to_tc_bitmap)) {
		adapter->dcb_set_bitmap |= BIT_PG_RX;
		adapter->dcb_set_bitmap |= BIT_RESETLINK;
	}
}

static void ixgbe_dcbnl_set_pg_bwg_cfg_rx(struct net_device *netdev, int bwg_id,
                                          u8 bw_pct)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	adapter->temp_dcb_cfg.bw_percentage[1][bwg_id] = bw_pct;

	if (adapter->temp_dcb_cfg.bw_percentage[1][bwg_id] !=
	    adapter->dcb_cfg.bw_percentage[1][bwg_id]) {
		adapter->dcb_set_bitmap |= BIT_PG_RX;
		adapter->dcb_set_bitmap |= BIT_RESETLINK;
	}
}

static void ixgbe_dcbnl_get_pg_tc_cfg_tx(struct net_device *netdev, int tc,
                                         u8 *prio, u8 *bwg_id, u8 *bw_pct,
                                         u8 *up_map)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	*prio = adapter->dcb_cfg.tc_config[tc].path[0].prio_type;
	*bwg_id = adapter->dcb_cfg.tc_config[tc].path[0].bwg_id;
	*bw_pct = adapter->dcb_cfg.tc_config[tc].path[0].bwg_percent;
	*up_map = adapter->dcb_cfg.tc_config[tc].path[0].up_to_tc_bitmap;
}

static void ixgbe_dcbnl_get_pg_bwg_cfg_tx(struct net_device *netdev, int bwg_id,
                                          u8 *bw_pct)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	*bw_pct = adapter->dcb_cfg.bw_percentage[0][bwg_id];
}

static void ixgbe_dcbnl_get_pg_tc_cfg_rx(struct net_device *netdev, int tc,
                                         u8 *prio, u8 *bwg_id, u8 *bw_pct,
                                         u8 *up_map)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	*prio = adapter->dcb_cfg.tc_config[tc].path[1].prio_type;
	*bwg_id = adapter->dcb_cfg.tc_config[tc].path[1].bwg_id;
	*bw_pct = adapter->dcb_cfg.tc_config[tc].path[1].bwg_percent;
	*up_map = adapter->dcb_cfg.tc_config[tc].path[1].up_to_tc_bitmap;
}

static void ixgbe_dcbnl_get_pg_bwg_cfg_rx(struct net_device *netdev, int bwg_id,
                                          u8 *bw_pct)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	*bw_pct = adapter->dcb_cfg.bw_percentage[1][bwg_id];
}

static void ixgbe_dcbnl_set_pfc_cfg(struct net_device *netdev, int priority,
                                    u8 setting)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	adapter->temp_dcb_cfg.tc_config[priority].dcb_pfc = setting;
	if (adapter->temp_dcb_cfg.tc_config[priority].dcb_pfc !=
	    adapter->dcb_cfg.tc_config[priority].dcb_pfc) {
		adapter->dcb_set_bitmap |= BIT_PFC;
		adapter->temp_dcb_cfg.pfc_mode_enable = true;
	}
}

static void ixgbe_dcbnl_get_pfc_cfg(struct net_device *netdev, int priority,
                                    u8 *setting)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	*setting = adapter->dcb_cfg.tc_config[priority].dcb_pfc;
}

static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);
	int ret;

	if (!adapter->dcb_set_bitmap)
		return DCB_NO_HW_CHG;

	ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg,
				 adapter->ring_feature[RING_F_DCB].indices);

	if (ret)
		return DCB_NO_HW_CHG;

	/*
	 * Only take down the adapter if the configuration change
	 * requires a reset.
	 */
	if (adapter->dcb_set_bitmap & BIT_RESETLINK) {
		while (test_and_set_bit(__IXGBE_RESETTING, &adapter->state))
			msleep(1);

		if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) {
			if (netif_running(netdev))
				netdev->netdev_ops->ndo_stop(netdev);
			ixgbe_clear_interrupt_scheme(adapter);
		} else {
			if (netif_running(netdev))
				ixgbe_down(adapter);
		}
	}

	if (adapter->dcb_cfg.pfc_mode_enable) {
		if ((adapter->hw.mac.type != ixgbe_mac_82598EB) &&
			(adapter->hw.fc.current_mode != ixgbe_fc_pfc))
			adapter->last_lfc_mode = adapter->hw.fc.current_mode;
		adapter->hw.fc.requested_mode = ixgbe_fc_pfc;
	} else {
		if (adapter->hw.mac.type != ixgbe_mac_82598EB)
			adapter->hw.fc.requested_mode = adapter->last_lfc_mode;
		else
			adapter->hw.fc.requested_mode = ixgbe_fc_none;
	}

	if (adapter->dcb_set_bitmap & BIT_RESETLINK) {
		if (adapter->dcb_set_bitmap & BIT_APP_UPCHG) {
			ixgbe_init_interrupt_scheme(adapter);
			if (netif_running(netdev))
				netdev->netdev_ops->ndo_open(netdev);
		} else {
			if (netif_running(netdev))
				ixgbe_up(adapter);
		}
		ret = DCB_HW_CHG_RST;
	} else if (adapter->dcb_set_bitmap & BIT_PFC) {
		if (adapter->hw.mac.type == ixgbe_mac_82598EB)
			ixgbe_dcb_config_pfc_82598(&adapter->hw,
			                           &adapter->dcb_cfg);
		else if (adapter->hw.mac.type == ixgbe_mac_82599EB)
			ixgbe_dcb_config_pfc_82599(&adapter->hw,
			                           &adapter->dcb_cfg);
		ret = DCB_HW_CHG;
	}
	if (adapter->dcb_cfg.pfc_mode_enable)
		adapter->hw.fc.current_mode = ixgbe_fc_pfc;

	if (adapter->dcb_set_bitmap & BIT_RESETLINK)
		clear_bit(__IXGBE_RESETTING, &adapter->state);
	adapter->dcb_set_bitmap = 0x00;
	return ret;
}

static u8 ixgbe_dcbnl_getcap(struct net_device *netdev, int capid, u8 *cap)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);
	u8 rval = 0;

	if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
		switch (capid) {
		case DCB_CAP_ATTR_PG:
			*cap = true;
			break;
		case DCB_CAP_ATTR_PFC:
			*cap = true;
			break;
		case DCB_CAP_ATTR_UP2TC:
			*cap = false;
			break;
		case DCB_CAP_ATTR_PG_TCS:
			*cap = 0x80;
			break;
		case DCB_CAP_ATTR_PFC_TCS:
			*cap = 0x80;
			break;
		case DCB_CAP_ATTR_GSP:
			*cap = true;
			break;
		case DCB_CAP_ATTR_BCN:
			*cap = false;
			break;
		default:
			rval = -EINVAL;
			break;
		}
	} else {
		rval = -EINVAL;
	}

	return rval;
}

static u8 ixgbe_dcbnl_getnumtcs(struct net_device *netdev, int tcid, u8 *num)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);
	u8 rval = 0;

	if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) {
		switch (tcid) {
		case DCB_NUMTCS_ATTR_PG:
			*num = MAX_TRAFFIC_CLASS;
			break;
		case DCB_NUMTCS_ATTR_PFC:
			*num = MAX_TRAFFIC_CLASS;
			break;
		default:
			rval = -EINVAL;
			break;
		}
	} else {
		rval = -EINVAL;
	}

	return rval;
}

static u8 ixgbe_dcbnl_setnumtcs(struct net_device *netdev, int tcid, u8 num)
{
	return -EINVAL;
}

static u8 ixgbe_dcbnl_getpfcstate(struct net_device *netdev)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	return adapter->dcb_cfg.pfc_mode_enable;
}

static void ixgbe_dcbnl_setpfcstate(struct net_device *netdev, u8 state)
{
	struct ixgbe_adapter *adapter = netdev_priv(netdev);

	adapter->temp_dcb_cfg.pfc_mode_enable = state;
	if (adapter->temp_dcb_cfg.pfc_mode_enable !=
		adapter->dcb_cfg.pfc_mode_enable)
		adapter->dcb_set_bitmap |= BIT_PFC;
	return;
}

/**
 * ixgbe_dcbnl_getapp - retrieve the DCBX application user priority
 * @netdev : the corresponding netdev
 * @idtype : identifies the id as ether type or TCP/UDP port number
 * @id: id is either ether type or TCP/UDP port number
 *
 * Returns : on success, returns a non-zero 802.1p user priority bitmap
 * otherwise returns 0 as the invalid user priority bitmap to indicate an
 * error.
 */
static u8 ixgbe_dcbnl_getapp(struct net_device *netdev, u8 idtype, u16 id)
{
	u8 rval = 0;

	switch (idtype) {
	case DCB_APP_IDTYPE_ETHTYPE:
#ifdef IXGBE_FCOE
		if (id == ETH_P_FCOE)
			rval = ixgbe_fcoe_getapp(netdev_priv(netdev));
#endif
		break;
	case DCB_APP_IDTYPE_PORTNUM:
		break;
	default:
		break;
	}
	return rval;
}

/**
 * ixgbe_dcbnl_setapp - set the DCBX application user priority
 * @netdev : the corresponding netdev
 * @idtype : identifies the id as ether type or TCP/UDP port number
 * @id: id is either ether type or TCP/UDP port number
 * @up: the 802.1p user priority bitmap
 *
 * Returns : 0 on success or 1 on error
 */
static u8 ixgbe_dcbnl_setapp(struct net_device *netdev,
                             u8 idtype, u16 id, u8 up)
{
	u8 rval = 1;

	switch (idtype) {
	case DCB_APP_IDTYPE_ETHTYPE:
#ifdef IXGBE_FCOE
		if (id == ETH_P_FCOE) {
			u8 tc;
			struct ixgbe_adapter *adapter;

			adapter = netdev_priv(netdev);
			tc = adapter->fcoe.tc;
			rval = ixgbe_fcoe_setapp(adapter, up);
			if ((!rval) && (tc != adapter->fcoe.tc) &&
			    (adapter->flags & IXGBE_FLAG_DCB_ENABLED) &&
			    (adapter->flags & IXGBE_FLAG_FCOE_ENABLED)) {
				adapter->dcb_set_bitmap |= BIT_APP_UPCHG;
				adapter->dcb_set_bitmap |= BIT_RESETLINK;
			}
		}
#endif
		break;
	case DCB_APP_IDTYPE_PORTNUM:
		break;
	default:
		break;
	}
	return rval;
}

const struct dcbnl_rtnl_ops dcbnl_ops = {
	.getstate	= ixgbe_dcbnl_get_state,
	.setstate	= ixgbe_dcbnl_set_state,
	.getpermhwaddr	= ixgbe_dcbnl_get_perm_hw_addr,
	.setpgtccfgtx	= ixgbe_dcbnl_set_pg_tc_cfg_tx,
	.setpgbwgcfgtx	= ixgbe_dcbnl_set_pg_bwg_cfg_tx,
	.setpgtccfgrx	= ixgbe_dcbnl_set_pg_tc_cfg_rx,
	.setpgbwgcfgrx	= ixgbe_dcbnl_set_pg_bwg_cfg_rx,
	.getpgtccfgtx	= ixgbe_dcbnl_get_pg_tc_cfg_tx,
	.getpgbwgcfgtx	= ixgbe_dcbnl_get_pg_bwg_cfg_tx,
	.getpgtccfgrx	= ixgbe_dcbnl_get_pg_tc_cfg_rx,
	.getpgbwgcfgrx	= ixgbe_dcbnl_get_pg_bwg_cfg_rx,
	.setpfccfg	= ixgbe_dcbnl_set_pfc_cfg,
	.getpfccfg	= ixgbe_dcbnl_get_pfc_cfg,
	.setall		= ixgbe_dcbnl_set_all,
	.getcap		= ixgbe_dcbnl_getcap,
	.getnumtcs	= ixgbe_dcbnl_getnumtcs,
	.setnumtcs	= ixgbe_dcbnl_setnumtcs,
	.getpfcstate	= ixgbe_dcbnl_getpfcstate,
	.setpfcstate	= ixgbe_dcbnl_setpfcstate,
	.getapp		= ixgbe_dcbnl_getapp,
	.setapp		= ixgbe_dcbnl_setapp,
};


---
abstract: |
    The popular method of Nosé and Hoover to create canonically distributed positions and momenta in classical molecular dynamics simulations is generalized to a genuine quantum system of infinite dimensionality. We show that for the quantum harmonic oscillator, the equations of motion in terms of coherent states can easily be modified in an analogous manner to mimic the coupling of the system to a thermal bath and create a quantum canonical ensemble. Possible applications to more complex systems, especially interacting Fermion systems, are proposed.

    [*PACS:*]{} 05.30.-d; 05.30.Ch; 02.70.Ns

    [*Keywords:*]{} Quantum statistics; Canonical ensemble; Ergodic behaviour; Thermostat; mixed quantum-classical system
address: |
    Universität Osnabrück, Fachbereich Physik\
    Barbarastr. 7, D-49069 Osnabrück
author:
- 'D. Mentrup'
- ', J. Schnack'
title: 'Nosé-Hoover dynamics for coherent states'
---

[**Acknowledgments**]{}\
The authors would like to thank the Deutsche Forschungsgemeinschaft (DFG) for financial support of the project “Isothermal dynamics of small quantum systems". We are thankful to K. Bärwinkel for carefully reading the manuscript.


Promo Code Microsoft

Filter by Time

Filter by Type

$300

$300 off Microsoft Store Promo Codes, Coupons & Deals ...

Save more at the Microsoft Store with a deal or promo code from Coupons.com. New Microsoft promo codes are available frequently and are refreshed often, so you'll have lots of opportunities to save time and money at the Microsoft Store. Microsoft Store Deals Add Up with Coupons.com You'll find many ways to save at the Microsoft Store.

20% Off Microsoft Office Promo Code - June 2020

Microsoft Office Promo Code website view. Microsoft Office offers great tools that will help you get your work done, whether you are at home or in a business setting. If you have questions about what products will work for you, then you can video chat with a store associate or start a text chat. Microsoft Office offers great programs.

Microsoft Promo Code 2020 | 50% Off Discount Microsoft ...

The Microsoft store promo code $10 off is the latest deal provided by the company. And from this deal, you can get up to a $10 discount on your purchase through the window store. Our team is specific and always seeking for the latest deals that are available on the web.

$300 off Microsoft Store Promo Codes, Coupons & Deals ...

Save more at the Microsoft Store with a deal or promo code from Coupons.com. New Microsoft promo codes are available frequently and are refreshed often, so you'll have lots of opportunities to save time and money at the Microsoft Store. Microsoft Store Deals Add Up with Coupons.com You'll find many ways to save at the Microsoft Store.

Microsoft.com Coupon Codes 2020 (50% discount) - June ...

93% Off Office 365 Promo Codes & Coupon Codes - Jun. 2020

Second, copy and paste Promo codes Office 365 before checkout. You'll be given a unique coupon code on the landing page. Third, double check your code, if the discount is success, you will see a deducted price on the final sum. Take advantage of Promo codes Office 365 for great savings on your purchase.

80% Off Microsoft Store Coupons, Promo Codes, & Deals ...

The Microsoft Store promo codes currently available end when Microsoft Store set the coupon expiration date. However, some Microsoft Store deals don't have a definite end date, so it's possible the promo code will be active until Microsoft Store runs out of inventory for the promotional item.

$200 OFF • Microsoft promo codes for June 2020 - WIRED

Microsoft store discount code - Microsoft Community

Microsoft store discount code Hello! Some days ago I found a discount website which gives many discount offers of Microsoft Store and I want to get 15% off software @ Microsoft Store with 4 years license to office 365 University using promo code but when I was going to avail this offer their promo code didn't work! anyone, please tell me from where I get verified promo code of Microsoft Store ?

Microsoft Vouchers & Discount Codes for Australia - June ...

Microsoft Vouchers. Deal. Make a Saving of Up to 75% on Xbox Games Specials at Microsoft. Get Deal. ... Popular Microsoft for Promo Codes June 2020. Title of Voucher Code Discount Type ... Arm yourself with a Microsoft discount code from us and get ready to enter the mighty world of Xbox.

10% OFF | Microsoft discount code √ June 2020

Microsoft Store Coupons: 30% off w/ Promo Code for June ...

Browse for Microsoft Store coupons valid through June below. Find the latest Microsoft Store coupon codes, online promotional codes, and the overall best coupons posted by our team of experts to save you 30% off at Microsoft Store. Our deal hunters continually update our pages with the most recent Microsoft Store promo codes & coupons for 2020, so check back often!

Microsoft Store promo codes & deals in 2020 | finder.com

Microsoft Store Coupon Code 2020, 65% Discount Code ...

Find the best of Microsoft Store Promo code, Special offer and discount from discountgg.com. Click to get the latest deals and coupons of microsoft.com, up to 65% Off when you order at checkout. Save your money and time.

Microsoft - Coupons and Promo Codes

Save up to $40 off Windows 7, 8 or 8.1. The best offers are from Amazon.com. Choose from Windows 8 and 8.1 and regular or Pro versions. If you already have a copy of Windows 7, XP or Vista then you should buy version 8 upgrade and you will receive a free upgrade to version 8.1 once you have installed it.

[60% OFF] w/ Microsoft Merchandise Promo Code June 2020 ...

Look for the box labeled "Enter promo code/gift voucher" or "Enter discount code/gift voucher" and Click ‘APPLY coupon’ to redeem your offer. HotDeals is one fo the bst place to get all the latest Promo Code, Coupons and offers of Microsoft Merchandise. These Coupons can then be checked and copied and used at microsoftmerchandise.com.

This $15 UGREEN USB-C Dongle Has Everything You Need

You will need to use the promo code UGREENSD410 at checkout to get this price though. This is what is known as a 6-in-1 USB-C dongle, with six different ports available for you to use. Including a 4K ...


Feasibility study of Nestorone-ethinylestradiol vaginal contraceptive ring for emergency contraception.
The Nestorone/ethinylestradiol (NES/EE) vaginal ring is being developed as a regular contraceptive method by the Population Council. This ring is designed to release NES 150 microg/day and EE 15 microg/day during 1 year. Here, we report a Phase I clinical trial to determine the usefulness of this ring for emergency contraception. To that end, we tested the ability of this ring to interfere with ovulation when it is inserted during the follicular phase. Forty-eight women protected from the risk of pregnancy by nonhormonal methods were divided into three groups, which differed by the size of the dominant follicle at the time of ring insertion: 12-14 mm (n = 16), 15-17 mm (n = 18) and >or=18 mm (n = 14) diameter. The NES/EE ring was left in the vagina for 7 consecutive days, after which it was removed. The growth of the leading follicle and plasma levels of estradiol, progesterone (P), luteinizing hormone (LH) and follicle stimulating hormone (FSH) in the ensuing 5 days after ring insertion were determined. Afterwards, steroid hormones were measured twice a week, until menses took place. All women had a control cycle before the ring cycle, and the range of maximum follicular diameter assigned to each volunteer was the same for the control and the ring cycle at the time when placebo was ingested or the ring inserted. During the 5-day period after ring insertion with follicles 12-17 mm, ovulation was absent in 25 of 34 cycles (p < .01 vs. control), and ovulatory dysfunction (absent, blunted or mistimed LH peak) occurred in 8 of the 9 remaining cycles (33/34 ovulatory processes altered; p < .005 vs. control). After ring insertion with follicles >or=18 mm in diameter, ovulation did not occur in 2 of 14 cycles or was dysfunctional in 7 of the 12 remaining cycles (9/14 ovulatory processes altered; p<.025 vs. control). Altogether, 87.5% of ring cycles (42/48) had either no ovulation or ovulatory dysfunction in the 5-day study period, in contrast to 39.6% (19/48 cycles) in control cycles (p < .001). Among follicles that failed to rupture within the 5-day study period, none ruptured later on in the ring-treated cycles, while 9 of 16 did so in control cycles. Sixty-two percent of ring-treated cycles were shorter than 24 days. Nausea, vaginal discharge and abdominal pain were the most frequently reported adverse events during ring use. Interference with 87.5% of ovulatory processes, without ovulation occurring later in the cycle and shortening of cycle length, suggests the NES/EE ring may be used as an emergency contraceptive method, with the potential advantage of providing continuing contraception after it has performed its emergency function.


Q:

Is the idea of a "honey hole" such as in gold mining, present in bitcoin mining?

I understand the output of the SHA-256 hashing function is a random number between 0 and 2^256. Does the randomness of this output imply that there cannot be a, so to say, honey hole in the hashing.
For instance this reddit post, http://www.reddit.com/r/BitcoinMining/comments/1rysqh/is_there_something_strange_about_block_272754_and/
They point out that someone relayed two blocks very close together, approximately 10s apart. Could they have found an occurrence where two block solving hashes sit close to each other?
I guess this kind of doesn't make sense though. Once a block is found, or a transaction is accepted, and even for each 3 seconds(timestamp) the block header is changed. So you would really could never find a block with the same hash just one number off (same block header, with two blocks one with nonce and the other nonce+1), because the first block will not be included in the second one, the second will become a dead fork in the blockchain?

A:

No, the SHA2 hashing function is not vulnerable to any known attack that significantly reduces the difficulty of finding a block, but it is a highly random process.
Randomness is funny sometimes. Statistically it it works out to be even over a longer time period or larger population, but if you focus in on a small set of samples sometimes you see a cluster or a gap. This is why the estimated hash rate of the network on blockchain.info is woefully inaccurate on anything less than a multi-day average, and bitcoin is based on a 2 week correction period instead of a smaller number.
(which is why the unlucky miner can't expect to find 2 blocks quickly "because" he had a drought, and you should not expect a gap to "make up for" earlier luck, it's the  population that matters.)


1. Field of the Invention
The present invention relates to an image reading apparatus, an image formation apparatus, an image processing system, a memory area sharing method for the image reading apparatus, and a memory area sharing method for the image processing system, and particularly to an image reading apparatus, an image formation apparatus, an image processing system, a memory area sharing method for the image reading apparatus, and a memory area sharing method for the image processing system that allow a P2P connecting scanner printer system to implement an enhanced function processing.
2. Description of the Related Art
In recent years, multifunction machines having various capabilities, such as those of a copying machine, a printer, a facsimile, and the like, have been put on the market. The multifunction machine prints an image on a printing paper when functioning as a copying machine or a printer, reads an original and generates an image when functioning as a scanner, and sends an image to or receives it from another piece of equipment through a telephone line when functioning as a facsimile.
With a multifunction machine, various types of information processing are executed with a variety of programs, such as an application, a platform, or the like. As the memory destination of a piece of information pertaining to this information processing, various types of memories, such as an HD (Hard Disk), a memory card, and the like, are available, and further, for example, an image formation apparatus, an information processing apparatus, an information processing program, and a memory medium that allow even an HD and a memory card loaded in a PC (Personal Computer) or a server PC to be utilized are available (for example, referring to Japanese Patent Application Laid-Open No. 2005-63422).
In addition, recently, scanners and printers as a single unit having an enhanced capabilities have appeared on the market, and for example, printers that, if additionally equipped with an HD as an option, is capable of covering the function of electronic sorting (a function that is used in printing plural copies for carrying out such an operation as storing the data for a first copy, and printing second and subsequent copies by reading out the stored data, or the like), or the like, have been put on the market.
However, for the user, it is troublesome to additionally install an HD as an option in the printer, and added expenses are required for the additional installation as an option.
Further, in recent years, a scanner printer system that connects the scanner and the printer with an interface that is loosely coupled for both software and hardware has been proposed, and assuming that, in order to realize a copy server in that scanner printer system, not only the scanner but also the printer is additionally provided with an HD, the scanner and the printer both would have an HD, which would be disadvantageous from the viewpoint of cost.


Representative image

CHANDIGARH: At a time when people across the country are contributing to help the needy in flood-hit Kerala, a special CBI judge in Panchkula has directed three accused in a corruption case to pay Rs 15,000 each to Kerala Chief Minister’s Distress Relief Fund.

Former superintendents Anil Kumar and Ajay Singh and former inspector Ravinder Dahiya of central excise and audit department were arrested from Murthal in Sonipat for allegedly accepting a bribe of Rs 3 lakh to minimise duty on a company under scrutiny in February 27.

Special CBI judge Jagdeep Singh ordered the three, who did not turn for the last hearing, to deposit the amount in the relief fund and a receipt of it be placed on record on or before the next date of hearing on October 1.

The accused and their counsels had failed to turn up post-lunch session on May 25 for the cross examination of two prosecution witnesses.

On Monday, the defence counsel had moved an application to recall these two prosecution witnesses for their cross-examination. Giving the reason for not turning up before the court, the counsel submitted that cross-examination was deferred for post-lunch session on account of a call of strike given by the District Bar Association, Panchkula, on that day. As accused and counsels could not enter the court building and left the court premises, both the prosecution witnesses were discharged. The counsel submitted that cross-examination of these two witnesses is very important for fair adjudication of the matter and sought an opportunity to conduct cross-examination of these two witnesses.

The judge allowed application for recalling of prosecution witnesses, but directed the three to pay the amount to the relief fund.

CBI counsel Jitender Kumar submitted that that in view of the facts mentioned in the application, he has no objection, but it be allowed subject to some costs.

Case history

The CBI had submitted that the accused officials during audit allegedly raised objections like double billing, evasion of excise duty and informed the complainant that a penalty of Rs 25-30 lakh would be imposed on his company. Later, they allegedly demanded Rs 10 lakh to lower the quantum of penalty, the CBI had submitted. The deal was struck at Rs 9 lakh and the complainant had agreed to pay Rs 3 lakh as first instalment. The agency on getting the information about the possible exchange of bribe money, had laid a trap and caught them while allegedly accepting a bribe of Rs 3 lakh in February 2017.

Read this story in Malayalam


I think that you would need to create this and support it or persuade others to take it on or at least help. Have a look at the community supported builds that you will see showing new builds when Hugo is updated to see how this works. This is a community effort, especially as many of us don’t develop our sites on Linux and don’t even know GoLang - all thanks to the tireless efforts of people - @bep of course, but also others - who make all of these builds possible.


/*
 * Copyright 2019 Lightbend Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package io.cloudstate.javasupport.eventsourced;

/**
 * Creation context for {@link EventSourcedEntity} annotated entities.
 *
 * <p>This may be accepted as an argument to the constructor of an event sourced entity.
 */
public interface EventSourcedEntityCreationContext extends EventSourcedContext {}