text:
package org.apereo.cas.oidc.token;

import org.apereo.cas.authentication.AuthenticationHandler;
import org.apereo.cas.authentication.CoreAuthenticationTestUtils;
import org.apereo.cas.authentication.principal.WebApplicationServiceFactory;
import org.apereo.cas.oidc.AbstractOidcTests;
import org.apereo.cas.oidc.OidcConstants;
import org.apereo.cas.services.DefaultRegisteredServiceProperty;
import org.apereo.cas.services.OidcRegisteredService;
import org.apereo.cas.services.RegisteredServiceProperty;
import org.apereo.cas.services.RegisteredServiceTestUtils;
import org.apereo.cas.support.oauth.OAuth20Constants;
import org.apereo.cas.support.oauth.OAuth20GrantTypes;
import org.apereo.cas.support.oauth.OAuth20ResponseTypes;
import org.apereo.cas.support.oauth.services.OAuthRegisteredService;
import org.apereo.cas.support.oauth.util.OAuth20Utils;
import org.apereo.cas.support.oauth.web.response.accesstoken.OAuth20AccessTokenAtHashGenerator;
import org.apereo.cas.support.oauth.web.response.accesstoken.response.OAuth20JwtAccessTokenEncoder;
import org.apereo.cas.ticket.TicketGrantingTicket;
import org.apereo.cas.ticket.accesstoken.OAuth20AccessToken;
import org.apereo.cas.util.CollectionUtils;

import lombok.val;
import org.jose4j.jws.AlgorithmIdentifiers;
import org.junit.jupiter.api.Nested;
import org.junit.jupiter.api.RepeatedTest;
import org.junit.jupiter.api.RepetitionInfo;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.pac4j.core.profile.CommonProfile;
import org.pac4j.core.util.Pac4jConstants;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.context.TestPropertySource;

import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;

import static org.apereo.cas.oidc.OidcConstants.StandardScopes.*;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.Mockito.*;

/**
 * This is {@link OidcIdTokenGeneratorServiceTests}.
 *
 * @author Misagh Moayyed
 * @since 5.3.0
 */
@Tag("OIDC")
public class OidcIdTokenGeneratorServiceTests {

    private static final String OIDC_CLAIM_EMAIL = "email";

    private static final String OIDC_CLAIM_PHONE_NUMBER = "phone_number";

    private static final String OIDC_CLAIM_NAME = "name";

    private static class MockOAuthRegisteredService extends OAuthRegisteredService {
        private static final long serialVersionUID = 8152953800891665827L;
    }

    @Nested
    @SuppressWarnings("ClassCanBeStatic")
    @TestPropertySource(properties = {
        "cas.authn.oauth.access-token.crypto.encryption-enabled=false",
        "cas.authn.oidc.core.include-id-token-claims=true"
    })
    public class IgnoringResponseTypeTests extends AbstractOidcTests {
        @Test
        public void verifyTokenGenerationWithClaimsForCodeResponseType() {
            val request = new MockHttpServletRequest();
            val profile = new CommonProfile();
            profile.setClientName("OIDC");
            profile.setId("casuser");

            request.setAttribute(Pac4jConstants.USER_PROFILES,
                CollectionUtils.wrapLinkedHashMap(profile.getClientName(), profile));

            val response = new MockHttpServletResponse();

            val tgt = mock(TicketGrantingTicket.class);
            when(tgt.getId()).thenReturn(TGT_ID);
            val callback = casProperties.getServer().getPrefix()
                + OAuth20Constants.BASE_OAUTH20_URL + '/'
                + OAuth20Constants.CALLBACK_AUTHORIZE_URL_DEFINITION;

            val service = new WebApplicationServiceFactory().createService(callback);
            when(tgt.getServices()).thenReturn(CollectionUtils.wrap("service", service));

            val phoneValues = List.of("123456789", "4805553241");
            val principal = RegisteredServiceTestUtils.getPrincipal("casuser", CollectionUtils.wrap(
                OIDC_CLAIM_EMAIL, List.of("casuser@example.org"),
                "color", List.of("yellow"),
                OIDC_CLAIM_PHONE_NUMBER, phoneValues,
                OIDC_CLAIM_NAME, List.of("casuser")));

            var authentication = CoreAuthenticationTestUtils.getAuthentication(principal,
                CollectionUtils.wrap(OAuth20Constants.STATE, List.of("some-state"),
                    OAuth20Constants.NONCE, List.of("some-nonce")));
            when(tgt.getAuthentication()).thenReturn(authentication);

            val accessToken = mock(OAuth20AccessToken.class);
            when(accessToken.getAuthentication()).thenReturn(authentication);
            when(accessToken.getTicketGrantingTicket()).thenReturn(tgt);
            when(accessToken.getId()).thenReturn(getClass().getSimpleName());
            when(accessToken.getScopes()).thenReturn(Set.of(OPENID.getScope(), PROFILE.getScope(), EMAIL.getScope(), PHONE.getScope()));

            val registeredService = (OidcRegisteredService) OAuth20Utils.getRegisteredOAuthServiceByClientId(this.servicesManager, "clientid");
            registeredService.setScopes(CollectionUtils.wrapSet(EMAIL.getScope(), PROFILE.getScope(), PHONE.getScope()));
            val idToken = oidcIdTokenGenerator.generate(request, response, accessToken, 30,
                OAuth20ResponseTypes.CODE, OAuth20GrantTypes.NONE, registeredService);
            assertNotNull(idToken);

            val claims = oidcTokenSigningAndEncryptionService.decode(idToken, Optional.ofNullable(registeredService));
            assertNotNull(claims);
            assertTrue(claims.hasClaim(OIDC_CLAIM_EMAIL));
            assertTrue(claims.hasClaim(OIDC_CLAIM_NAME));
            assertTrue(claims.hasClaim(OIDC_CLAIM_PHONE_NUMBER));
        }
    }

    @Nested
    @SuppressWarnings("ClassCanBeStatic")
    @TestPropertySource(properties = {
        "cas.authn.oidc.core.include-id-token-claims=false",
        "cas.authn.oauth.access-token.crypto.encryption-enabled=false",
        "cas.authn.oidc.core.claims-map.preferred_username=custom-attribute"
    })
    public class DefaultTests extends AbstractOidcTests {
        @Test
        public void verifyTokenGeneration() throws Exception {
            val request = new MockHttpServletRequest();
            val profile = new CommonProfile();
            profile.setClientName("OIDC");
            profile.setId("casuser");

            request.setAttribute(Pac4jConstants.USER_PROFILES,
                CollectionUtils.wrapLinkedHashMap(profile.getClientName(), profile));

            val response = new MockHttpServletResponse();

            val tgt = mock(TicketGrantingTicket.class);
            when(tgt.getId()).thenReturn(TGT_ID);
            val callback = casProperties.getServer().getPrefix()
                + OAuth20Constants.BASE_OAUTH20_URL + '/'
                + OAuth20Constants.CALLBACK_AUTHORIZE_URL_DEFINITION;

            val service = new WebApplicationServiceFactory().createService(callback);
            when(tgt.getServices()).thenReturn(CollectionUtils.wrap("service", service));

            val phoneValues = List.of("123456789", "4805553241");
            val principal = RegisteredServiceTestUtils.getPrincipal("casuser", CollectionUtils.wrap(
                OIDC_CLAIM_EMAIL, List.of("casuser@example.org"),
                OIDC_CLAIM_PHONE_NUMBER, phoneValues,
                "color", List.of("yellow"),
                OIDC_CLAIM_NAME, List.of("casuser")));

            var authentication = CoreAuthenticationTestUtils.getAuthentication(principal,
                CollectionUtils.wrap(OAuth20Constants.STATE, List.of("some-state"),
                    OAuth20Constants.NONCE, List.of("some-nonce")));
            when(tgt.getAuthentication()).thenReturn(authentication);

            val accessToken = mock(OAuth20AccessToken.class);
            when(accessToken.getAuthentication()).thenReturn(authentication);
            when(accessToken.getTicketGrantingTicket()).thenReturn(tgt);
            when(accessToken.getId()).thenReturn(getClass().getSimpleName());
            when(accessToken.getScopes()).thenReturn(Set.of(OPENID.getScope(), PROFILE.getScope(), EMAIL.getScope(), PHONE.getScope()));

            val registeredService = (OidcRegisteredService) OAuth20Utils.getRegisteredOAuthServiceByClientId(this.servicesManager, "clientid");
            registeredService.setScopes(CollectionUtils.wrapSet(EMAIL.getScope(), PROFILE.getScope(), PHONE.getScope()));
            val idToken = oidcIdTokenGenerator.generate(request, response, accessToken, 30,
                OAuth20ResponseTypes.ID_TOKEN, OAuth20GrantTypes.NONE, registeredService);
            assertNotNull(idToken);

            val claims = oidcTokenSigningAndEncryptionService.decode(idToken, Optional.ofNullable(registeredService));
            assertNotNull(claims);
            assertTrue(claims.hasClaim(OIDC_CLAIM_EMAIL));
            assertEquals(authentication.getAuthenticationDate().toEpochSecond(), (long) claims.getClaimValue(OidcConstants.CLAIM_AUTH_TIME));
            assertTrue(claims.hasClaim(OIDC_CLAIM_NAME));
            assertTrue(claims.hasClaim(OIDC_CLAIM_PHONE_NUMBER));
            assertEquals("casuser@example.org", claims.getStringClaimValue(OIDC_CLAIM_EMAIL));
            assertEquals("casuser", claims.getStringClaimValue(OIDC_CLAIM_NAME));
            assertEquals(phoneValues, claims.getStringListClaimValue(OIDC_CLAIM_PHONE_NUMBER));
        }

        @Test
        public void verifyTokenGenerationWithoutClaimsForCodeResponseType() {
            val request = new MockHttpServletRequest();
            val profile = new CommonProfile();
            profile.setClientName("OIDC");
            profile.setId("casuser");

            request.setAttribute(Pac4jConstants.USER_PROFILES,
                CollectionUtils.wrapLinkedHashMap(profile.getClientName(), profile));

            val response = new MockHttpServletResponse();

            val tgt = mock(TicketGrantingTicket.class);
            when(tgt.getId()).thenReturn(TGT_ID);
            val callback = casProperties.getServer().getPrefix()
                + OAuth20Constants.BASE_OAUTH20_URL + '/'
                + OAuth20Constants.CALLBACK_AUTHORIZE_URL_DEFINITION;

            val service = new WebApplicationServiceFactory().createService(callback);
            when(tgt.getServices()).thenReturn(CollectionUtils.wrap("service", service));

            val phoneValues = List.of("123456789", "4805553241");
            val principal = RegisteredServiceTestUtils.getPrincipal("casuser", CollectionUtils.wrap(
                OIDC_CLAIM_EMAIL, List.of("casuser@example.org"),
                "color", List.of("yellow"),
                OIDC_CLAIM_PHONE_NUMBER, phoneValues,
                OIDC_CLAIM_NAME, List.of("casuser")));

            var authentication = CoreAuthenticationTestUtils.getAuthentication(principal,
                CollectionUtils.wrap(OAuth20Constants.STATE, List.of("some-state"),
                    OAuth20Constants.NONCE, List.of("some-nonce")));
            when(tgt.getAuthentication()).thenReturn(authentication);

            val accessToken = mock(OAuth20AccessToken.class);
            when(accessToken.getAuthentication()).thenReturn(authentication);
            when(accessToken.getTicketGrantingTicket()).thenReturn(tgt);
            when(accessToken.getId()).thenReturn(getClass().getSimpleName());
            when(accessToken.getScopes()).thenReturn(Set.of(OPENID.getScope(), PROFILE.getScope(), EMAIL.getScope(), PHONE.getScope()));

            val registeredService = (OidcRegisteredService) OAuth20Utils.getRegisteredOAuthServiceByClientId(this.servicesManager, "clientid");
            registeredService.setScopes(CollectionUtils.wrapSet(EMAIL.getScope(), PROFILE.getScope(), PHONE.getScope()));
            val idToken = oidcIdTokenGenerator.generate(request, response, accessToken, 30,
                OAuth20ResponseTypes.CODE, OAuth20GrantTypes.NONE, registeredService);
            assertNotNull(idToken);

            val claims = oidcTokenSigningAndEncryptionService.decode(idToken, Optional.ofNullable(registeredService));
            assertNotNull(claims);
            assertFalse(claims.hasClaim(OIDC_CLAIM_EMAIL));
            assertFalse(claims.hasClaim(OIDC_CLAIM_NAME));
            assertFalse(claims.hasClaim(OIDC_CLAIM_PHONE_NUMBER));
        }

        @Test
        public void verifyTokenGenerationWithOutClaimsForAuthzCodeGrantType() throws Exception {
            val request = new MockHttpServletRequest();
            val profile = new CommonProfile();
            profile.setClientName("OIDC");
            profile.setId("casuser");

            request.setAttribute(Pac4jConstants.USER_PROFILES,
                CollectionUtils.wrapLinkedHashMap(profile.getClientName(), profile));

            val response = new MockHttpServletResponse();

            val tgt = mock(TicketGrantingTicket.class);
            when(tgt.getId()).thenReturn(TGT_ID);
            val callback = casProperties.getServer().getPrefix()
                + OAuth20Constants.BASE_OAUTH20_URL + '/'
                + OAuth20Constants.CALLBACK_AUTHORIZE_URL_DEFINITION;

            val service = new WebApplicationServiceFactory().createService(callback);
            when(tgt.getServices()).thenReturn(CollectionUtils.wrap("service", service));

            val phoneValues = List.of("123456789", "4805553241");
            val principal = RegisteredServiceTestUtils.getPrincipal("casuser", CollectionUtils.wrap(
                OIDC_CLAIM_EMAIL, List.of("casuser@example.org"),
                "color", List.of("yellow"),
                OIDC_CLAIM_PHONE_NUMBER, phoneValues,
                OIDC_CLAIM_NAME, List.of("casuser")));

            var authentication = CoreAuthenticationTestUtils.getAuthentication(principal,
                CollectionUtils.wrap(OAuth20Constants.STATE, List.of("some-state"),
                    OAuth20Constants.NONCE, List.of("some-nonce")));
            when(tgt.getAuthentication()).thenReturn(authentication);

            val accessToken = mock(OAuth20AccessToken.class);
            when(accessToken.getAuthentication()).thenReturn(authentication);
            when(accessToken.getTicketGrantingTicket()).thenReturn(tgt);
            when(accessToken.getId()).thenReturn(getClass().getSimpleName());
            when(accessToken.getScopes()).thenReturn(Set.of(OPENID.getScope(), PROFILE.getScope(), EMAIL.getScope(), PHONE.getScope()));

            val registeredService = (OidcRegisteredService) OAuth20Utils.getRegisteredOAuthServiceByClientId(this.servicesManager, "clientid");
            registeredService.setScopes(CollectionUtils.wrapSet(EMAIL.getScope(), PROFILE.getScope(), PHONE.getScope()));
            val idToken = oidcIdTokenGenerator.generate(request, response, accessToken, 30,
                OAuth20ResponseTypes.ID_TOKEN, OAuth20GrantTypes.AUTHORIZATION_CODE, registeredService);
            assertNotNull(idToken);
            val claims = oidcTokenSigningAndEncryptionService.decode(idToken, Optional.ofNullable(registeredService));
            assertNotNull(claims);
            assertFalse(claims.hasClaim(OIDC_CLAIM_EMAIL));
            assertFalse(claims.hasClaim(OIDC_CLAIM_NAME));
            assertFalse(claims.hasClaim(OIDC_CLAIM_PHONE_NUMBER));
        }

        @Test
        public void verifyTokenGenerationWithoutCallbackService() {
            val request = new MockHttpServletRequest();
            val profile = new CommonProfile();
            profile.setClientName("OIDC");
            profile.setId("casuser");
            request.setAttribute(Pac4jConstants.USER_PROFILES,
                CollectionUtils.wrapLinkedHashMap(profile.getClientName(), profile));

            val response = new MockHttpServletResponse();

            val tgt = mock(TicketGrantingTicket.class);
            when(tgt.getId()).thenReturn(TGT_ID);

            val mfa = casProperties.getAuthn().getMfa();

            when(tgt.getServices()).thenReturn(new HashMap<>());
            val authentication = CoreAuthenticationTestUtils.getAuthentication("casuser",
                CollectionUtils.wrap(OAuth20Constants.STATE, List.of("some-state"),
                    OAuth20Constants.NONCE, List.of("some-nonce"),
                    mfa.getCore().getAuthenticationContextAttribute(), List.of("context-cass"),
                    AuthenticationHandler.SUCCESSFUL_AUTHENTICATION_HANDLERS, List.of("Handler1")));
            when(tgt.getAuthentication()).thenReturn(authentication);

            val accessToken = mock(OAuth20AccessToken.class);
            when(accessToken.getAuthentication()).thenReturn(authentication);
            when(accessToken.getTicketGrantingTicket()).thenReturn(tgt);
            when(accessToken.getId()).thenReturn(getClass().getSimpleName());

            val idToken = oidcIdTokenGenerator.generate(request, response, accessToken, 30,
                OAuth20ResponseTypes.CODE, OAuth20GrantTypes.NONE,
                OAuth20Utils.getRegisteredOAuthServiceByClientId(this.servicesManager, "clientid"));
            assertNotNull(idToken);
        }

        @Test
        public void verifyTokenGenerationFailsWithoutProfile() {
            assertThrows(IllegalArgumentException.class, () -> {
                val request = new MockHttpServletRequest();
                val response = new MockHttpServletResponse();
                val accessToken = mock(OAuth20AccessToken.class);
                oidcIdTokenGenerator.generate(request, response, accessToken, 30,
                    OAuth20ResponseTypes.CODE, OAuth20GrantTypes.NONE,
                    OAuth20Utils.getRegisteredOAuthServiceByClientId(this.servicesManager, "clientid"));
            });
        }

        @Test
        public void verifyUnknownServiceType() {
            assertThrows(IllegalArgumentException.class, () -> {
                val request = new MockHttpServletRequest();
                val response = new MockHttpServletResponse();
                val accessToken = mock(OAuth20AccessToken.class);
                oidcIdTokenGenerator.generate(request, response, accessToken, 30,
                    OAuth20ResponseTypes.CODE, OAuth20GrantTypes.NONE, new MockOAuthRegisteredService());
            });
        }

        @RepeatedTest(2)
        public void verifyAccessTokenAsJwt(final RepetitionInfo repetitionInfo) throws Exception {
            val request = new MockHttpServletRequest();
            val profile = new CommonProfile();
            profile.setClientName("OIDC");
            profile.setId("casuser");
            request.setAttribute(Pac4jConstants.USER_PROFILES,
                CollectionUtils.wrapLinkedHashMap(profile.getClientName(), profile));

            val response = new MockHttpServletResponse();

            val tgt = mock(TicketGrantingTicket.class);
            when(tgt.getServices()).thenReturn(new HashMap<>());
            val authentication = CoreAuthenticationTestUtils.getAuthentication("casuser",
                CollectionUtils.wrap(OAuth20Constants.STATE, List.of("some-state"),
                    OAuth20Constants.NONCE, List.of("some-nonce")));
            when(tgt.getAuthentication()).thenReturn(authentication);

            val accessToken = getAccessToken();
            val registeredService = getOidcRegisteredService(accessToken.getClientId());
            registeredService.setJwtAccessToken(true);
            registeredService.setIdTokenSigningAlg(AlgorithmIdentifiers.RSA_USING_SHA256);

            registeredService.setProperties(Map.of(
                RegisteredServiceProperty.RegisteredServiceProperties.ACCESS_TOKEN_AS_JWT_ENCRYPTION_ENABLED.getPropertyName(),
                new DefaultRegisteredServiceProperty("false"),
                RegisteredServiceProperty.RegisteredServiceProperties.ACCESS_TOKEN_AS_JWT_SIGNING_ENABLED.getPropertyName(),
                new DefaultRegisteredServiceProperty(repetitionInfo.getCurrentRepetition() % 2 == 0 ? "false" : "true")
            ));

            this.servicesManager.save(registeredService);
            val idToken = oidcIdTokenGenerator.generate(request, response,
                accessToken, 30, OAuth20ResponseTypes.CODE, OAuth20GrantTypes.NONE, registeredService);
            assertNotNull(idToken);
            val claims = oidcTokenSigningAndEncryptionService.decode(idToken, Optional.of(registeredService));
            assertNotNull(claims);
            assertTrue(claims.hasClaim(OidcConstants.CLAIM_AT_HASH));
            assertTrue(claims.hasClaim(OidcConstants.CLAIM_AUTH_TIME));
            val issuer = oidcIssuerService.determineIssuer(Optional.of(registeredService));
            assertEquals(issuer, claims.getIssuer());

            val hash = claims.getClaimValue(OidcConstants.CLAIM_AT_HASH, String.class);
            val encodedAccessToken = OAuth20JwtAccessTokenEncoder.builder()
                .accessToken(accessToken)
                .registeredService(registeredService)
                .service(accessToken.getService())
                .casProperties(casProperties)
                .accessTokenJwtBuilder(oidcAccessTokenJwtBuilder)
                .issuer(issuer)
                .build()
                .encode();
            val newHash = OAuth20AccessTokenAtHashGenerator.builder()
                .encodedAccessToken(encodedAccessToken)
                .registeredService(registeredService)
                .algorithm(registeredService.getIdTokenSigningAlg())
                .build()
                .generate();
            assertEquals(hash, newHash);
        }
    }
}


This is a navy tea dress with classic knee length, flared skirt with white piping to hem, fitted waist with contrasting whtie belt, fitted bodice, sweetheart neckline and halter ties. Oh, did we mention that the skirt has pockets?!


text:
The Daily -October 17th, 2017
Home » The Daily -October 17th, 2017
Canadian stocks were less than 150 points shy of their closing record as gains in oil and copper drove a gauge of commodities to its highest level in six months. The S&P/TSX Composite Index fell 4.5 points or less than 0.1 percent to 15,802.70 at the market close in Toronto. Information technology stocks were the biggest gainers, rising 0.6 percent.
Bombardier Inc. discussed a potential sale of a stake in its C Series program with Chinese firms before reaching a pact with European giant Airbus SE, according to people familiar with the talks. Airbus announced Monday it acquired a majority stake in the jet project for nothing, reshaping the airline sector amid a trade dispute with Chicago-based Boeing Co.
The U.S. wrapped up the fourth round of Nafta trade talks with a bombshell proposal to dismantle Canada's dairy sector, adding to a list of demands its trading partners say would be impossible to accept as negotiations grow more fraught. The proposal delivered Sunday would effectively kill Canada's so-called supply management system by fully eliminating tariffs on supply-managed products over 10 years.
Brookfield Asset Management Inc., Canada's biggest alternative-asset manager, bought a controlling stake in TerraForm Power Inc.from the bankrupt clean-energy giant SunEdison Inc. For every share, investors were offered $9.52 in cash or the option of keeping stock following the close of the merger, according to a statement issued Monday.
Canada's largest stock exchange may delist marijuana stocks that run afoul of U.S. federal law which considers the drug illegal. The Toronto Stock Exchange will contact all companies that cultivate, distribute or possess marijuana, or offer services related to the drug in any jurisdiction, by the end of the year. If they're found to be in violation of U.S. federal law, they could ultimately be delisted.
European stocks are little changed as investors assess earnings reports from companies including Pearson and Merlin Entertainments. The Stoxx Europe 600 Index adds less than 0.1%. Pearson jumps 7.8% after saying full-year operating profits would be in the upper half of its earlier forecast, while Merlin slumps 18% after projecting 2017 Ebitda below analysts' estimates.
Asia's regional stock benchmark was little changed, holding near its highest level in 10 years, while a gauge of mining stocks advanced after Rio Tinto Group signaled it's on track for record annual iron ore shipments.
Rising tensions in OPEC's second-biggest producer as Iraq's government violently clashes with the semi-autonomous Kurdish region are sustaining oil's gains, for now. Fighting in Kirkuk, home to Iraq's oldest-producing fields, has shut production from two deposits that pump a combined 275,000 barrels a day.
Gold slipped and palladium failed to hold gains above $1,000 after data signaled resilience of U.S. economy, supporting case for continued increase in interest rates.
Long copper, short iron may prove to be one the commodity trades of the year. While both are staples of the raw materials world for infrastructure and consumer products, they're taking very different paths in 2017 as the red metal surges and the material used in steel retreats. Three-month copper burst above $7,000 a metric ton on the London Metal Exchange this week to the highest since 2014.
U.S. inflation will accelerate in the year ahead, making bonds linked to consumer prices cheap relative to other debt, according to Pacific Investment Management Co. There are signs of wages picking up in different industries and regions in the U.S., though this hasn't yet spilled over to inflation, Scott Mather, Pimco's chief investment officer for core fixed-income strategies, said in Seoul, where he's attending a forum.
Morgan Stanley beat Wall Street expectations for third-quarter results Tuesday, reporting earnings of $0.93 per share. Morgan Stanley produced strong results despite the heavy, but not unexpected, hit to its trading business. While fixed income, currencies, and commodities (FICC) trading declined 20%, equities trading was relatively even compared to last year with revenues coming in at $1.9 billion.
While competitors race to catch up with Netflix Inc., the largest online TV service in the world is adhering to a simple strategy to maintain its lead: you have to spend money to make money. The streaming pioneer will deploy as much as $8 billion on programming next year, as much as a third more than in 2017. The increase alone is almost as much as HBO spends annually. Netflix, based in Los Gatos, California, will also pony up more than $1 billion for marketing.
Kobe Steel Ltd. said it will co-operate with the U.S. Department of Justice after the agency requested documents related to the fake data scandal that risks engulfing Japan's third-biggest steelmaker. Kobe has said some 500 companies worldwide are in a supply chain tainted by admissions that it falsified certifications on the strength and durability of metals going back to 2007, including automotive giants Ford Motor Co. and General Motors Co. and the U.S.'s biggest plane maker, Boeing Co.
Spain cut its economic forecast for 2018 as the costs of the Catalan crisis begin to mount. Output will grow by 2.3 percent next year instead of the 2.6 percent previously projected, the economy ministry said in an emailed statement just before midnight, citing the impact of the political standoff in Catalonia, which accounts for a fifth of Spain's gross domestic product, and the related struggle to approve a budget.
Credit Suisse Group AG's biggest shareholder on Tuesday dismissed a proposal by a small Swiss activist investor to break up the country's second-largest bank, saying the current strategy is beginning to pay off. Swiss hedge fund manager Rudolf Bohli, whose RBR Capital Advisors has taken a 0.2 percent stake in Credit Suisse, has "hardly any skin in the game," David Herro, who says his Harris Associates holds 9 percent of the Swiss bank.
Airbus SE's acquisition of a majority stake in Bombardier Inc.'s C Series plane threatens to leave Boeing Co. trailing in the race to develop a new generation of more advanced short-haul jets. At one level, the deal, announced overnight Monday, appears to be a neat way of providing Airbus with a smaller narrow-body aircraft fitting below its own A320-series models and competing with the smallest variants of Boeing's 737 workhorse.
HNA Group Co., the Chinese conglomerate engaged in businesses spanning aviation to hospitality, plans to spend 50 billion yuan ($7.6 billion) to build up an online travel service to eventually challenge Ctrip.com International Ltd. The Hainan-based company, which introduced a mobile travel app called HiApp on Tuesday in Beijing, plans to invest the money in startups and acquisitions related to travel, Tong Fu, a director on the board of HNA Group, said in an interview in Beijing.
Toys "R" Us Inc., the retailer that filed for bankruptcy in North America, has been exploring options for its growing Asian business including a potential initial public offering, people with knowledge of the matter said. The U.S. chain and its local joint venture partner, the billionaire Fung brothers, have been speaking with investment banks to study the feasibility of listing the Asian business on the Hong Kong bourse, according to the people. A deal could value the unit at as much as $2 billion, the people said, asking not to be identified because the information is private.
A key dynamic that's been holding down bond yields since the global financial crisis is poised to ease next year — presenting a test to riskier parts of the market, according to analysis by Oxford Economics. In the aftermath of the crisis, banks and shadow financial institutions in developed economies sharply cut back their issuance of bonds, to the tune of about $4 trillion, according to the research group's tally.
UnitedHealth Group Inc. said that medical spending by the health insurer's customers fell in the third quarter, a signal of potentially higher profits at other insurers who report in the coming weeks. The company is the U.S.'s biggest health insurer as well as the first to post third-quarter results. While the decline in medical costs is likely to be seen as good news among its rivals, it's also a warning for hospitals and other health-care providers for whom that signals lower volumes of business.
Dalian Wanda Group Co. plans to proceed with a $1.2 billion luxury condominium and hotel complex in Beverly Hills, California, after its development partner, Athens Group, said it exited the project early. Neither Wanda nor Athens would comment on the reasons for the separation, which happened earlier this year and leaves Wanda without a development partner just as condo sales are about to begin.
Sinclair Broadcast Group Inc. received bids for as many as 10 television stations that could fetch up to $1 billion as it takes steps to win approval of its proposed merger with Tribune Media Co., people familiar with the matter said. Preliminary bids for the stations were submitted last week, said one of the people, who asked not to be identified because the process wasn't public. Sinclair may sell some or all of the outlets, all in different markets, the people said.
Takeda Pharmaceutical Co. is considering a potential sale of some of its European pain drug assets, as the Japanese drugmaker seeks to trim its portfolio and raise cash to protect its credit ratings, according to people familiar with the matter.
*All sources from Bloomberg unless otherwise specified
By MAAM|2017-10-17T12:47:54+00:00October 17th, 2017|The Daily|

redpajama_set_name: RedPajamaCommonCrawl


This is a full platinum save-set for The Wardrobe on PS4. It is a point and click adventure in a similar vein to Grim Fandango, Monkey Island etc.
All saves are created right next to the trophy requirement. Most just need an item from your inventory dragged over to a specific item on the screen to pop the trophy.
Each save file has three slots, each of which pop a different trophy. They are all in order for a legit looking platinum and each file comes with detailed instructions on what to do.
Saves have been tested on a dummy account. Any issues let me know!


text:
Q: understanding "lifting" method in Hensel's lemma I am having trouble understanding how "lifting" works here.  They began by finding solutions $2$ and $3$ for $x^2\equiv 14 \text{ mod}(5)$ and then insert $(2+5t)$ into $x$ for the expression $x^2\equiv 14 \text{ mod}(25)$. Why does inserting $(2+5t)$ give solutions to $25$?
and the image is from the article on "brilliant" under "Hensel's lemma".
Thanks

A: The basic idea behind the Hensel Lemma is the following:
Lets say you want to solve
$$x^2\equiv 14 \text{ mod}(625)$$
Note that if $a \equiv b \pmod{n}$ and $d|n$ then $a \equiv b \pmod{d}$.
Therefore
$$x^2 \equiv 14 \pmod{625} \Rightarrow x^2 \equiv 14 \equiv 4 \pmod{5,25,125} (*) $$
Now, you go step by step modulo $5$, then $25$ then $125$.
$$x^2 \equiv 4 \pmod{5} \Rightarrow x \equiv \pm 2 \pmod{5}$$
Lets look at the first solution:
$$x \equiv 2 \pmod{5}$$
means $5|(x-2)$ and hence $x-2=5t$. Now, you go to the next step in (): you know by () that
$$x^2 \equiv 14 \pmod{25}$$ and you just deduced that
$$x=2+5t$$
Plugging this in here you get that $x \equiv \mbox{something} \pmod{25}$ and hence $x-\mbox{something}=25s$. You next use this relation in the next step in $(*)$, and repeat.

redpajama_set_name: RedPajamaStackExchange


Our WD82837 Mitsubishi TV lamp replacements have the original bulb inside guaranteed to perform the same as your original lamp. The brightness will be equal and lamp life will also be the same as the original Mitsubishi lamp. The WD82837 lamp comes with the genuine original Osram P-VIP 150-180W bulb inside rated at a 6000 hour lamp life. Beware of generic lamps being sold elsewhere that offer less light output and reduced lamp life. We have been selling replacement TV and projector lamps since 1997. Trust Pureland Supply with a 180 day warranty, 5-star Google Customer Reviews rating, and free ground shipping.
WD-82837 Mitsubishi DLP TV Lamp Replacement. TV Lamp with High Quality Genuine Original Osram P-VIP Bulb Inside.


Love. It's the feeling. I think all are felling a love. Someone is living with love. Love is gift of god. We can't love everyone. Do you understand now? Love is special feeling for special person.
Find the alternative for smoking with E Cigarette UK.
MashroomGrany, in your last line, are you suggesting that one must be special before he/she will receive love from you?
MashroomGrany, Yes, I agree love is a special feeling for special person.
Just that we have to be careful that isn't infatuation we mistake to be love. That is just my thought.
I know everyone has been infatuated one way or the other!!!
That is true Abitex, is just that some people suffer the consequences of Infatuation than the others, besides, who wants to be a victim of circumstances?
All ways Love. It is a great feeling between each other.
Actually it is 100% complex debating topic. But my personal opinion is Love. Because I vote love without any doubt.
ZeemaHill, I beg to differ, is not 100% complex as you indicated, if you use word 100% it means that there is likely to be no solution or different between Love or Infatuation. Which you know there is different, it just that the different exist in mature minds. Yes it takes maturity to differentiate between Love or Infatuation.
No debate, I vote love. Love makes happy.


When considering the Internet providers in Joliet Township, there are several of ways to determine the cheapest Internet bundle options. First, it is best to determine what bundle might be the most economical for you and your family. Next, it is important to decide upon your Internet speed and connection type. Then, you can also research bundling options in your area to maximize your savings.
Families in Joliet Township love to work hard and play hard at the same time. This means relaxation time is immensely important, so many Joliet Township residents enjoy playing online video games. However, you may notice that your gaming tends to slow or becoming grainy when one family member is gaming while another is streaming video at the same time. This could be typically because your Internet plan isn't providing you with enough download speed to sustain your Internet needs. For online gaming, Sony®, Nintendo™, and Playstation® recommend at least 3 Mbps download speed as a minimum, but that would be if you were solely running the video game system. When running games and other Internet services at the same time, consider a plan with more than 25 Mbps.
If you're finding yourself confused about all the differences between megabits per second and Megabytes per second, you are absolutely not alone. It is a very common misconception that Megabytes per second (MBps) is how Internet speed is measured. However, Megabytes per second actually refers to the size of a file while megabits per second (Mbps) is the speed at which your Internet uploads or downloads files. When considering changing Internet providers in Joliet Township, the important factor is megabits. The more videos your household will be streaming and games you'll be playing, the more megabits you want.
You may be wondering why your WiFi signal struggles sometimes and you may be interested to find that your Internet provider can be a major determinant in WiFi speed. Most Internet plans nowadays come with strong WiFi capabilities as that is an expected need for most Joliet Township families. Therefore, Internet plans with large amount of download and upload speeds will help improve your WiFi speeds. However, if your WiFi signal is wavering, you may want to examine your Internet plan and see if you actually need a better plan.
Get the top internet speeds, in Joliet Township, with the top Internet companies in the nation! Isn't it time you stopped buffering? With service from the top Internet service provider., you have enough speed to have all of your family all under one network!
A bundle will help you and your family to increase your savings and ensure that you're getting the service you truly need. Spectrum offers excellent bundles in Joliet Township so you can enjoy the cheapest services when you choose to combine Internet with television and/or phone. Find out why so many of the local Joliet Township residents in your area have made the switch to a Spectrum bundle.
If your current Internet service provider isn't furnishing you the service and functionality you need, it might be prudent to shift to a new provider. While speeds and capabilities may be the primary facets of your decision, it is important to consider the cost as well. In Joliet Township, many of the top Internet providers are offering gift cards and other incentives just for becoming a new customer. Find out more about Internet specials in the Joliet Township area today!


Located in one of San Jose's highly desirable family community of Chateau La Salle, this 3 bedroom, 3 bath home awaits. Less than 1 year old, the spacious floor plan features an optimal floor plan with both formal and informal living areas that create plenty of space for the whole family to enjoy. Thoughtful details like tray ceilings with crown molding, dual pane windows, cornice boxes, gas fireplace, and a neutral color scheme add charm and warmth to the home. Top-of-the-line stainless steel appliances, white quartz counters, high-end cabinetry, and a functional island create a chic chef's kitchen. Head down the hallway to the master bedroom featuring a private bathroom with a large walk-in closet, dual sinks, soaking tub, and a large shower. The second master bedroom offer an abundance of closet space and also features a private bathroom.
Chateau La Salle offers the tranquility found in a family friendly community, yet is less than a mile from The Plant Shopping Center, Target, Best Buy, restaurants, banks, and other services. Easy access to freeways 87/101, and just 20 minutes from the San Jose airport. This home will leave you yearning to make it your very own! Call (866) 494-8993 today for more information!
This is a manufactured home on leased land (not real estate); the land lease is $1,050 per month.


text:
Q: Using sudo to write files to user's home I originally login with $HOME as /home/oleg
I need to run a command with sudo - this happens to be an npm install command-
sudo npm install -g suman

however, the postinstall script for the suman module, as it's currently configured, writes to the original user's home directory /home/oleg/.suman....but because I run the above npm install command with sudo, I do not have access to /home/oleg/.suman.
Is there any hope to give the root user access to the /home/oleg/.suman directory?
Or should the postinstall script for suman simply install to the root user's home directory?
It looks like, since I wrote suman :), that I can write the contents of the .suman directory with 777 and given full access to the root user in this way. I guess what are the minimum file permissions to define for the .suman directory to give read/write/execute access to only the root user and the logged in user?

A: TL,DR: none of your suggestions are good. Instead, when running as root, store state files under /var (something like /var/lib/suman).
Root already has permission
Root has the permission to access all files in the system. So don't change the directory's permissions: it wouldn't make any difference to root, but it would allow everyone else to read and write in that directory. Despite popular belief, it's extremely rare for chmod 777 to do anything useful.
Root has the permission to access all files in the system, and normally that's enough. There are a few exceptions that have to do with certain filesystem types that handle users differently from "normal" filesystems. The two main cases are:

*

*NFS: root on a client is typically mapped to a different user on the server, usually nobody. This means that when root opens a file, it's done with the permissions of nobody.

*FUSE (which includes ecryptfs, which is commonly used to encrypt home directories): unless configured otherwise (with the option allow_other, which only root can use), FUSE filesystems are only available to the user who mounted them.

In those cases, there are files that root can't access directly despite having apparent permission. Root can still effectively access the files by switching to the account that owns the files — these are implementation limitations, not security restrictions — but it's a little inconvenient.
But root should use that permission carefully
If you have a program that's commonly invoked as root but with HOME set to another user's home directory, you should try to avoid creating files in a user's home directory that the user can't access.
If /home/oleg/.suman already exists and is owned by oleg, it doesn't matter if you write files there, because the owner of a directory can always erase files in that directory (what it takes is write permission, and the owner can always grant themselves permission). When oleg runs the same program, it'll replace the root-owned files if those files need to be overwritten. Don't create subdirectories, however: oleg would be unable to access them or remove them even if they're empty.
The problem is if you run the program for the first time as root and it creates /home/oleg/.suman. In a nutshell, don't do that — the question is how to avoid it.
The solutions
If you run sudo -H then the HOME environment variable is set to root's home directory and so the program won't be accessing /home/oleg.
But sometimes it makes sense to run a program as root (because it needs root permissions) but with the home directory set to your own (to read your configuration files). This of course only applies in cases where it's ok for a program running as root to read that configuration file — user interface customizations are fine, but the configuration file shouldn't contain things like executable code (e.g. no shell escapes through preprocessing). If that's the case, the program should read files from $HOME but not write.
If the program needs to store some state files, then when it's running as root, it should store them in a system directory (under /var), not in the user's home directory.

A: What you're looking for is is the -H, --set-home parameter to sudo.
From the sudo man page:

-H, --set-home
  Request that the security policy set the HOME environment variable to the home directory specified by the target user's password database entry.  Depending on the policy, this may be the default behavior.


Favourite memory: When the participants at the week long workshop that we arranged here in Sweden was exhausted after an intensive brainstorming session, and we decided to play catch out on the grass, just to get the energy up again. Serious adult magicians and you, a legend, all running around chasing each other, laughing like happy children. The sun was shining, a warm breeze moved the leaves and I remember thinking, "I will never forget this moment. This is what it's all about!"
Thank you for showing me that beauty could be expressed through magic, and thank you for being a friend.
1. a. One that arouses awe, astonishment, surprise, or admiration; a marvel.
b. The emotion aroused by something awe-inspiring, astounding, or marvelous: gazed with wonder at the northern lights.
2 An event inexplicable by the laws of nature; a miracle.
Tommy... all of the above!
The angel took Tommy under is wings, your magic will be for eternity safe by his work.
I had a chance to meet Tommy and to had a discussion with him. For always in my mind.
Tommy gave us a great lesson of this Art. His Art. For that I say MERCI.
I am so saddened and upset that the world has lost such a wonderful artiste and gentleman. But I have all the wonderful memories of the time we spend together after we first met at the British Ring Convention in Brighton in 1980.
You were manning Theo Timmerman's stand and doing magic back at the headquarter hotel, after seeing you I told Mike Gancia, who promptly put you on the International Close-up Show. I remember Janet (Clare) and I both assisting you, and both of us were bowled over by your charm, good-looks and brilliant magic especially the cup and ball routine using the tassel on your draw-string bag, as the ball. No matter how many times I saw it (over the years) I never caught you load the ball or saw the bag being loaded as your finale. You explained that you had studied misdirection over the years in order to perfect it... which you certainly did! You were one of the few masters of misdirection.
Later that year we met up when you lectured at the Birmingham Magical Society and then came down to Malvern, I remember it was misty and you were disappointed you could not see the hills!
Then the following year you came over for the Great Yarmouth Convention and later that year I went over to stay with you in Lisse. I remember your love of raw herring which you got from the herring stalls in Amsterdam, and when we went through the "red light district" your embarrassment when one of the girls called out "Hello Jos!" to you.
It was always a joy to see you at the various conventions where we would meet up, you were always so supportive with a lovely, gentle sense of humour.
You were one of the first to congratulate me, after I performed in the close-up competition at FISM in 1991 and, after I came 3rd, at Ron MacMillan's International Magic close-up competition in 1988.
You were so sweet to me and gave me such confidence and good advice on what tricks I should do that would suit my personality.
Jij was één van de eerste die als vriend en collega daar vaak te vinden was.
De 1 ste maandagen van de maand, maar daarnaast ook gewoon gezellig.
het Magic Art Center samen met mij weten met contacten met de hele wereld.
Wij hebben samen congressen bezocht en vaak in jury's gezetten...En nog nog veel meer!!!
Ik dank je heel hartelijk voor al jouw inzet en geloof in het Magic Art Center.
The world of magic has lost one of its true artists. Tommy Wonder painted his dreams in time and space how very fortunate we are to have witnessed his creative genius. May his spirit live on in the legacy of the work has left us.
I was really saddened by the loss to us all of Tommy Wonder. I met and spoke to him a few times when he came to England and his help and advice was always given with enthusiasm.
He will be sadley missed by many.


text:
Q: set new key for each dict in list, based on existing key say I have:
[ {a: 'a'}, {a: 'b'}]

and I want:
[ {a: 'a', b: 'ab'}, {a: 'b', b: 'bb'}]

how would I do this in Ansible? Was hoping it would be something like
- set_fact:
    result: "{{ input | map('combine', dict(b=item.a + 'b')) | list }}"

but I don't know how to access item in this case.

A: If a "one liner" in jinja doesn't work, or is so terse that no one else can read it, then it's likely not a good idea
- set_fact:
    # we are cloning the input dicts for mutation
    result: >-
      {%- set output = [] -%}
      {%- for d in input: -%}
      {%-   set d2 = dict(d) -%}
      {%-   set _ = d2.update({"b": d2["a"] + "b"}) -%}
      {%-   set _ = output.append(d2) -%}
      {%- endfor -%}
      {{- output -}}


text:
LBF trustees discuss 'free money' and other updates
By Jerry Love, LBF Communications
Louisiana Baptist Foundation Board of Trustees met for their second quarterly meeting of the year at the Louisiana Baptist Building, April 26, 2016, with the morning dedicated to meetings by the investment committee and operating committee and the afternoon spent in general session by the entire body to consider committee reports and other business.
Jim Prince, trustee from Lafayette, chaired the morning investment committee meeting, which included a report by Barbara Bell, certified public accountant and controller for the Foundation.
She reviewed the account holdings for the first quarter of the year, stating assets under management as of March 31, 2016, were $167,840,414.05, an increase of approximately $3.4 million since the end of 2015.
Bell explained the increase as a result of strong deposit activity.
Investment returns for the major components of the LBF portfolio were reviewed by Jim Prince, who gave the following information as the official data calculated for the end of the quarter March 31, 2016:
Short Term Fund: 0.55% Annualized Yield
Fixed Income Fund: 2.11% Total Return
Equity Fund: -0.51% Total Return
The Group Investment Fund which is comprised of various market sectors reflected a -0.05% total return year to date.
Lee Morris, an investment consultant from Graystone Consulting, also spoke, noting the "different world" which now defines investment opportunities.
Morris said the market assumptions of his firm's global investment committee expect that average growth over the next seven year period will be less than the historical average, and that Graystone will be looking for opportunities to enhance income from value oriented companies and other types of investments, such as preferred stock, to maintain healthy total returns for the Foundation.
The investment committee approved policies for the Convertible Securities Fund and the Managed Futures Fund. Both funds were added to diversify the overall portfolio of the LBF.
John Carroll of Columbia, Louisiana, chaired the operating committee, offering that a review of the operating budget reflected a reasonable surplus for the first quarter – revenue was ahead of expectations while expenses were lower than budgeted so far this year.
Jerry Love, planned giving director, reported on several new gifts received in the first quarter, including proceeds from two estates.
He said these gifts would benefit missions offerings and a local resort ministry in Louisiana.
Love also reported on the "Give a Gift" promotional strategy implemented in February.
The Foundation works with the Louisiana Baptist Message to promote a $1,000 giveaway each month in 2016.
The promotional allows an individual – selected at random from entries by Louisiana Baptists – to direct this money from the Foundation to a Louisiana Baptist ministry.
The first two recipients were reported to be FBC Mandeville and FBC Lake Providence.
The operating committee also heard from Executive Director Wayne Taylor regarding the development of a statement of faith and religious purpose.
Taylor committed to continue seeking legal counsel in forging this statement and its incorporation with existing policies of the Foundation.
Board President Julian Johnston, of Calhoun, gave overviews of the information presented in both committee meetings, and trustees approved a recommendation regarding investment policies for the two newly created funds.
In his executive director's report, Taylor gave an update on the proposed implementation of a new accounting system, Stellar iPhi, with trustees granting approval to move forward, pending a positive review of the contract by legal counsel.
The Louisiana Baptist Foundation was established in 1944 to encourage and assist individuals with gifts in support of Louisiana Baptist churches and ministries, as well as provide asset management for the churches and institutions affiliated with the LBC.
To learn more about the work and ministry of the Louisiana Baptist Foundation, to see a list of current Trustees, or to review investment returns for the LBF managed funds, go to www.LBFinfo.org.
The next meeting for the Louisiana Baptist Foundation Board of Trustees is scheduled for July 26.


text:
Dr. Richard Lennihan Was Pioneering Vascular Surgeon
Richard Lennihan, M.D., of Wilmington, Del., and Vineyard Haven, died peacefully at the age of 86 on June 12. Martha's Vineyard, where he spent...
Paul Lebowitz
Dr. Paul Lebowitz of Woodbridge, Conn., and Edgartown died on May 22 at The Seasons Hospice in Hamden, Conn. He was 75. Paul was the beloved husband...
Pulitzer Prize-Winning Journalist Anthony Lewis Was 85
Anthony Lewis, a Pulitzer Prize-winning legal journalist and longtime seasonal resident of West Tisbury, died March 25, 2013. He was 85. As a...
3:49 pm, March 25, 2013
Jeffrey Lunn Wrote Daily Thoughts to Ponder
Jeffrey Alan Lunn, of Falmouth and formerly of Oak Bluffs, died on Feb. 2, 2013 at Good Samaritan Medical Center in Brockton after a long illness. He...
1:00 pm, March 7, 2013
William Raymond Lewis, Builder, Fireman, Free Spirit
William Raymond Lewis died on Jan. 5 after a long battle with cancer. He was 64 years old.
Corrine LeBovit Was Known for Generous Spirit
Corinne LeBovit died peacefully at home. She lived in Aquinnah with her daughter Elise. She was born in 1917 and kept up with many changes throughout...
4:11 pm, November 8, 2012


text:
import { isElement } from '@mdui/shared/helpers.js';
import $ from '../../$.js';
import { unique } from '../../functions/unique.js';
import { JQ } from '../../shared/core.js';
import '../each.js';
import '../is.js';

export const dir = (
  $elements: JQ,
  nameIndex: number,
  node: 'parentNode' | 'nextElementSibling' | 'previousElementSibling',
  // eslint-disable-next-line
  selector?: any,
  filter?: string,
): JQ => {
  const ret: HTMLElement[] = [];
  let target: HTMLElement;

  $elements.each((_, element) => {
    target = element[node] as HTMLElement;

    // 不能包含最顶层的 document 元素
    while (target && isElement(target)) {
      // prevUntil, nextUntil, parentsUntil
      if (nameIndex === 2) {
        if (selector && $(target).is(selector)) {
          break;
        }

        if (!filter || $(target).is(filter)) {
          ret.push(target);
        }
      }

      // prev, next, parent
      else if (nameIndex === 0) {
        if (!selector || $(target).is(selector)) {
          ret.push(target);
        }

        break;
      }

      // prevAll, nextAll, parents
      else {
        if (!selector || $(target).is(selector)) {
          ret.push(target);
        }
      }

      target = target[node] as HTMLElement;
    }
  });

  return new JQ(unique(ret));
};

redpajama_set_name: RedPajamaGithub


I took 5 months off my project of photographing everything I ate (I know you missed me) - but I'm back, and since I'm doing the videos on a monthly basis and not a weekly one, the videos are going to have somewhat more interesting content.
I'm skipping the mundane - the bag of chips, the pint of Metamucil, the morning cup of coffee. I'm also having a little more fun with photography, trying different filters (I dumped the Blackberry and got an Android phone), and different angles.
You may notice duelling bottles of hot sauce, I'm working on an article called "Rooster Vs. Rooster," which pits the Thai-style Sriracha against a Louisiana hot sauce called Red Rooster. Stay tuned.
A Chelada is the name for the drink when you add lime and salt to a beer. Sometimes people add hot sauce, herbs and spices, sometimes tomato juice, sometimes even Clamato. They are also called Micheladas and what you may have gathered by now is that they're no real rules beyond salt and lime.
Well, ever since the weather started to warm up here in San Diego, we've been making more and more cheladas. So when Honeysuckle White approached us to come up with a grilled turkey recipe, Chelada Turkey Tacos came immediately to mind. They sent us the turkey and they even sent us a Flip HD camcorder to make videos. Boo-yah!
The Chelada Turkey Tacos encompass four recipes: the Chelada brine, a Roasted Corn Salsa, the Chipotle Sour Cream Sauce, and Alfredo's Tortillas. Make each separately and assemble them to order, grill-side, for some delicious summertime BBQ-ing.
Chelada Brine from Papawow on Vimeo.
Once the meat has spent 2-3 hours in the brine it is ready for the grill. Place the meat on a hot grill and cook, turning occasionally until the meat is done. This can be anywhere between 25-45 minutes depending on the thickness of the meat and the temperature of your grill. Turkey should be cooked to an internal temperature of 180 degrees F.
When the turkey goes on begin to roast your corn and red bell pepper for the Roasted Corn Salsa. Go ahead and shred some cabbage and prepare the Chipotle Sour Cream Sauce also. Make sure to keep the sour cream sauce in the fridge or cooler until it is ready to serve.
I'll be honest, the star of this recipe and the key to making them absolutely amazing is "Alfredo's" tortillas. Alfredo was a guy in Mexico who taught my friend's father the technique of dipping the tortillas into a dressing before you grill them. There is nothing quite like it.
We didn't make Alfredo's exact recipe, we modified it to pair more closely with the Chelada turkey but the technique remains. Below is our recipe and at the end of the post I will give the original Alfredo dip.
Simply dip the tortillas into Alfredo's for 2 seconds on each side before throwing them on the grill. Cook them, turning once, for about 60 seconds a side. Plate and fill with toppings for tacos or burritos.
Mix all of these together and set aside in a bowl. This is a wonderful universal salsa that goes great on almost everything.
Incorporate all of the ingredients and fill a squirt bottle with them. You may need a funnel to fill the bottle. Keep the sauce refrigerated or in the cooler until you are ready to eat.
How to assemble a Chelada Turkey Taco from Papawow on Vimeo.
Once the turkey is done, shred it into bite-sized pieces. Shred some cabbage. Dip a tortilla, grill for a minute or two, add some turkey, the cabbage, the Roasted Corn Salsa, and squirt some of the Chipotle Sour Cream Sauce on top and you have yourself a Chelada Turkey Taco!
We are moving from San Francisco and had to clean out the cupboard. What we aren't taking with us we are going to have to toss, donate, or give to friends.
We will donate the non-perishable, canned, sealed, jarred, etc. That which was un-donate-able (opened) but otherwise still quite delicious will be passed on to friends in the neighborhood. Here is a collection of what we will miss.
Oh, contrary to popular belief, chocolate does go bad. Especially white chocolate in this house.
We've all likely been there. At the BBQ, camping, or maybe on a boat. There sits the bottle of wine... and no one brought a corkscrew. The thoughts that go through people's heads. The tools they use. We humans are very creative creatures, especially when there is booze involved (think Legend of Zelda-themed party ice luge).
There's the Wikihow on how to open a wine bottle without a corkscrew. They illustrate a technique using a screw, a screwdriver, and a pair of pliers (pulling it out, caveman-style) or a hammer (using a first-class lever which is much more civilized).
Jon Stewart gives Condé Nast some advise. Combine all four magazines that they are cancelling: Elegant Bride, Modern Bride, Cookie (a parenting magazine) and Gourmet into into one super mag.
Western Spaghetti was voted by Time Magazine as the #2 Viral Film of the Year for 2008. The company who made it is called PES and they have done some some more well known commercials for products like Scrabble, Sprint, Coinstar, and Bacardi.
A Cure for America's Obesity Problem?
If you haven't heard if Improv Everywhere yet, this is a great example of what they do. They are self-described as, "[causing] scenes of chaos and joy in public places. Created in August of 2001 by Charlie Todd, Improv Everywhere has executed over 80 missions involving thousands of undercover agents."
Here is another [non food-related] example.
Buy their book, Causing a Scene: Extraordinary Pranks in Ordinary Places with Improv Everywhere for as little as $9.99 via Amazon.
Called a viral mini-epic short film about war, Food Fight is the work of Stefan Nadelman of Tourist Pictures. He has done many ads and short flicks, some of which can be watched on his website including spots he's done for, Saturday Night Live, Volkswagen, Maple Leaf Foods, and Mike & Ike candy.
Food Fight takes through some of the more infamous moments of WWII all the way up to the United States' current conflicts in the Middle East. Pretzels gun down matzo with their salt. Hamburgers destroy everything by shooting their pickles. Sushi rolls turn into kamikaze.
It'll make you laugh, it'll make you cry, but in the end Food Fight shows us how fear for food safety... well, fear for our food's safety. Stefan Nadelman is primarily in the field of motion graphics for film, music videos, and broadcast. Tourist Pictures is located in Portland, Oregon.
Pop up some popcorn and enjoy the show.
Snap, Crackle and Pop are all brothers and they are elves. They were adapted from Kellogg's radio ad and were first illustrated by Vernon Grant in 1933.
Snap is the oldest and is the problem solver, fixing what his two brothers create. Snap sports a chef's hat. Crackle is the fun-loving middle child. Crackle is also the leader of the group and the supposedly, smartest of the three. Crackle wears a red-and-white-striped hat. Pop is the jokester, youngest elf; Pop doesn't take anything seriously and he wears a band leader's hat.
According to Mental Floss Magazine (2008) "A Second Helping of Cereal Facts" there was a fourth brother, Pow. - "In the 1950s, [Pow] was supposed to represent Rice Krispies' explosive nutritional value. Sadly, four proved to be one cereal gnome too many, and Pow was given the pink slip."
Belgium - Pif! Paf! Pof!
Canadian French - Cric! Crac! Croc!
Denmark - Pif! Paf! Puf!
Finland - Poks! Riks! Raks!
Germany - Knisper! Knasper! Knusper!
Holland - Pif! Paf! Pof!
Italy - Pif! Paf! Pof!
Mexico - Pim! Pum! Pam!
Norway - Piff! Paff! Puff!
South Africa - Knap! Knaetter! Knak!
Sweden - Piff! Paff! Puff!
Switzerland - Piff! Paff! Poff!
United Kingdom - The mascots were portrayed, for a while, as cows instead of gnomes.
From the folks who brought us the Guacamole Song, Rhett and Link, comes the BBQ song. I wish I had enough talent to write funny jingles about food... oh, that would be the life. These two are quite talented and, I believe, are even sponsored by Alka Seltzer. Brilliant!
Best quote from the song?
their barbecue sauce is WHITE, made out of mayonnaise"
The Associated Press reports that Austria's health ministry found detectable traces of cocaine samples of Red Bull Cola energy drinks... keep in mind that this is Red Bull's Cola and not their ubiquitous Energy Drink. They use the Coca leaf as a flavoring but are supposed to remove any cocaine.
Before you go out and buy a case, Red Bull Spokeswoman says that any traces are very slight and do not pose a health risk; and the company maintains that its Cola is "harmless and marketable in both the U.S. and Europe."
So how much did they find? - 0.4 micrograms/liter.
To put things in perspective, the EPA allows a maximum threshold of arsenic in drinking water of 10 micrograms/liter. That's 25 times more than how much cocaine the Austrians found.
Author Michael Pollan goes on the Colbert Report to explain how the food-industrial complex is destroying what we eat by processing and synthesizing it. He opines on how reducing a complex food down to a single component is fundamentally detrimental to our health.
One of the tenets of his newest book, In Defense of Food: An Eater's Manifesto , is to only buy things with "5 ingredients or less." He is steadfast that this is the most simple method for reducing the amount of synthetic food in our diets.
Interestingly, I recently tried Häagen-Dazs' new ice cream that is actually called five. They boast that it only contains five ingredients: milk, cream, sugar, egg yolks... and then whatever flavor it is. They make it in make Mint, Coffee, Vanilla, Ginger, Passion Fruit, Brown Sugar, and Chocolate and it's good!
Some of the highlights of the Colbert clip include Michael admitting to eating Yodels; how he got "busted" at the supermarket buying Fruity Pebbles, and he blasts infant formula but his mom is in the audience - and she tells him that he wasn't breast fed. Zing!
Can You Tell Pâté from Dog Food?
"Considering the similarity of its ingredients, canned dog food could be a suitable and inexpensive substitute for pâté or processed blended meat products such as Spam or liverwurst. However, the social stigma associated with the human consumption of pet food makes an unbiased comparison challenging.


Imagine showing up for work in the morning, looking up on the roof, and seeing a dead deer.
I first saw this story in one of my Facebook groups. Stephen Wolota of Alleghany County, shared some photos of a dead deer on the roof of his work.
The photo first appears as though the craziest of things could have happened with the building so close to the road. Immediately, I began thinking that a fast-driving tractor trailer must have hit this deer. I mean, how else could it end up dead on the roof? You can see the building sits very close to the road, so it is possible. That wasn't the case, though.
I then thought, OK, this is one of those guys trying to get likes on his post. He or his buddies, dragged the deer to the roof and placed it there as a joke. Then maybe he took some photos in an attempt to grow a story that doesn't exist. That too, was not the case.
So when I was able to finally reach out to Wolota and ask him what happened, he surprised me.
He told me when he arrived at work, he saw this deer on the roof. He grabbed a ladder, climbed up and saw it had what appeared to be a hole in the deers body. He thought it was from a poorly placed broadhead.
At this point, I went back to thinking that someone planted this deer on the roof. This was until he showed me a picture of the roofline. Stephen told me that the backside of the building butted right up to the woodline. The forest floor is the same level as the roof, leading him to believe this deer was shot and ended up on the roof.
He joked with me and said, "It did land near the gutter, as we all know, wounded deer look to head towards water, maybe that is what she was doing."
Of course it's sad to see an animal shot and go unfound. When we lose a blood trail, we always hope the deer will survive. I guess this just goes to show that until you truly check absolutely everywhere, you never know where your wounded deer could end up.


The maximum speed of 90 km/h.
Two engine power of 125 hp and 135 hp.
Body volume of 10,000 liters.
Transport wheat, canola, barley, corn, sunflower, soy, seeds, fertilizers, chaff, silage, potatoes, sugar beets.
Can fill the seeder and fertilizer spreaders.
Animated dashboard and the driver.
Lighting equipment, dust, traces of the mirror.


text:
Braidotti, Rosi: Posthuman Feminism
In a context marked by the virulent return of patriarchal and white supremacist attitudes, a new generation of activists, from the Xenofeminists to Pussy Riot, are continuing the struggle, fighting alongside star feminists like Emma Watson and Scarlett Johansson: these are very feminist times. But how do these and other struggles relate to our contemporary posthuman condition? In this important new book, Rosi Braidotti examines the implications of the posthuman turn for feminist theory and practice. She defines the posthuman turn as a convergence between post-humanism on the one hand and post-anthropocentrism on the other, and she examines the double impact of these two lines of critical enquiry for contemporary feminist practice. In so doing she develops five theses: that contemporary feminism is neo-materialist and that feminism today is not a humanism; that Anthropos has been de-centered and that non-human life, Zoe, is now the ruling concept; and that, as a result of these shifts of perspective, today sexuality can be defined as a force beyond, beneath and after gender. The book ends with a plea for joyful political resistance, calling for embedded and embodied cartographies of the new power relations that are emerging from the current geo-political order. This bold new text by a leading feminist philosopher will be of great interest to students and scholars throughout the humanities and social sciences.
Noch nicht erschienen, März 2021
Verlag Wiley
Meldetext Noch nicht erschienen, März 2021
Coverlag Polity (Imprint/Brand)
Autor*in Braidotti, Rosi


So in general I propose to hide as much as we can and expose only crucial parts of the API.
For run-time projections use PIMPL idiom and wrap the pointer inside.
Require only to define CalculationType for projection and use double as default.
In transform strategy take projection as template parameter and use run-time projection as default.
This looks indeed simpler. And probably it is possible. This should be changed in the generation.
So robin (or robin_tag) would be a tag passed into projection<> as template parameter. For a default tag the projection would be runtime and for non-default tag the projection would be compile-time.
And then it would be possible to pass only tag to transform strategy, so no need to pass the whole projection type.
This could simplify the generic implementation. E.g. the constructors taking all of those possible input parameters directly in projection (mentioned below) could be implemented only once. Otherwise we'd be forced to implement all constructors in every static projection.
On the other hand it could be harder to understand when projection is dynamic and when static.
So the line is automatically projected, where, if necessary, extra points are added because straight lines will usually become curved and vv is also possible. Same for most other geometry types (multi_point excepted).
This does not need to be implemented in the first release, but we need to take this into account.
Wouldn't it be the transform() function's purpose?
Shouldn't projections (and transform strategies) only project between points?
This allows to logically separate the code nicely. Otherwise parts of projections code like projections::forward() would call transform() which would use Pt-Pt projection in a strategy, so call projections::forward().
I agree that the init function can be skipped. The current API is a bit close to the proj4 API , which also calls pj_init (or init_plus). But we can hide it indeed.
This would make the code more clear too, and semantically separate Boost.Geometry from the internal implementation being Proj4.
What do you think about getting rid of forward and inverse methods and instead figuring it out from the input types?
Yes, the transform function should do that indeed. I agree. And it is easy to implement.
The projection would always perform a forward projection if the cartesian geometry was the second parameter and inverse projection if it was the first parameter. I'd be similar to boost::lexical_cast which gets the direction from template parameters. In such case the user would be forced to pass the correct point/geometries types so this is limiting.
This could be implemented only in the transform strategy (so the projections would still have forward() and inverse() functions), then project_inverse_transformer wouldn't be needed.
Maybe it is more convenient that the called method should figure it out. The transform strategy should be neutral to inverse/forward. But it can be implemented on different levels, we should carefully compare the options here.
There could be the third function (besides forward() and inverse()) picking projection's direction automatically.
And three corresponding strategies simply calling these three functions.
Another way could be project_transformer automatically figuring out the projection direction and explicit project_forward_transformer, project_inverse_transformer strategies.
I'm also confused about the names of projections. AFAIU the ones marked as xxx_ellipsoid map from ellipsoid of revolution or spheroid and the ones marked as xxx_spheroid map from a sphere. There is also e.g. cass_spheroid which AFAIU can work with ellipsoid of revolution. Are these simple inaccuracies or am I missing something?
It is by the generation. I have to look this up, but if the proj4 source supports an ellipsoid for it (even if it does not make sense), it is generated too. We can always adapt the generation.
Currently the names are directly derived from Proj4 parameter names but in WKT they're different (PROJECTION["Transverse_Mercator"]) so users which doesn't know Proj4 could be confused.
I kept all the proj4 names and I think that is more convenient than adding another translation table. For users, who usually know proj4 (it is quite well-known), it is also more convenient.
Having said that, I agree that cassini looks better than just cass, and if WKT has a complete map of all translations, we could consider that too.
And by "proj4 names" do you mean the names of functions used in the Proj4 sources?
Because the projection parameters has different names in Proj4 string format. I'd expect the users are more familiar with these names, not function names.
This would again be more clear and general. And wouldn't be confusing if we had tri-axial ellipsoid projections in the future.
I'd like to do the necessary work now if you're still ok with that.