content
stringlengths
10
4.9M
// Called every time the scheduler runs while the command is scheduled. @Override public void execute() { double currentConveyPos = MotorControl.getSparkEncoderPosition(storage.conveyorEncoder); double powerMod = RobotContainer.activeBallCount * .075; powerMod = RobotContainer.activeBallCount >= 4 ? powerMod : 0; double desiredPosition = -35; double conveyorPower = 0; boolean isButton7, isButton8; if (storage.isBallAtTripSwitch()) { MotorControl.resetSparkEncoder(storage.conveyorEncoder); conveyorPower = 1; } isButton7 = _joystick.getJoystickButtonValue(7); isButton8 = _joystick.getJoystickButtonValue(8); if (RobotContainer.turret.isReadyForBall) { conveyorPower = -1; } else if (currentConveyPos > desiredPosition && !isButton7 && !isButton8) { conveyorPower = -1; SmartDashboard.putString("Conveyor Override: ", "Sensor Control"); } else if (isButton7) { conveyorPower = 1; storage.conveyorEncoder.setPosition(-35); RobotContainer.turret.runIndexer(-.5); if (RobotContainer.intake.isRollerLowered()) { RobotContainer.intake.raiseLower(true); } SmartDashboard.putString("Conveyor Override: ", "Conveyor Going Up"); } else if (isButton8) { conveyorPower = -1; RobotContainer.intake.runRoller(.3); storage.conveyorEncoder.setPosition(-35); SmartDashboard.putString("Conveyor Override: ", "Conveyor Going Down"); } else { conveyorPower = 0; SmartDashboard.putString("Conveyor Override: ", "Sensor Control"); } SmartDashboard.putNumber("run storage conveyor power", conveyorPower); storage.runConveyor(conveyorPower); }
There will be some changes made: A survivor perspective on post-acquired brain injury residential transition Abstract Primary objective: Brain injury survivors experience many transitions post-injury and it is important that they experience these in the most supportive and integrative ways possible. This study provided a group of chronic brain injury survivors the opportunity to share their insights and experience of residential transition and to suggest strategies to help maximize the transition experience and outcomes. Research design: This study used a qualitative design that consisted of semi-structured interviews. Methods and procedures: Twenty-one adults with chronic acquired brain injury residing in community-based supported group houses answered a series of scripted questions. Interviews were recorded and participant statements were transcribed and coded according to prospectively developed transition themes. Main outcomes and results: Participants discussed positive and negative insights and experiences regarding residential transitions. Themes of balance between support and independence, life purpose and transition to more or less structure were frequently addressed. Participants suggested caregiver-targeted strategies to facilitate successful transitions before, during and after a move. Conclusions: The insights and suggestions shared by this group of chronic acquired brain injury survivors add to already existing knowledge of post-injury residential transitions and strategies professional caregivers may use to maximize the ease and success of the survivor's transitional experience.
<filename>osm_mon/collector/infra_collectors/vmware.py # -*- coding: utf-8 -*- ## # Copyright 2016-2019 VMware Inc. # This file is part of ETSI OSM # All Rights Reserved. # # 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. # # For those usages not covered by the Apache License, Version 2.0 please # contact: <EMAIL> ## import logging from typing import List from xml.etree import ElementTree as XmlElementTree import requests from pyvcloud.vcd.client import BasicLoginCredentials from pyvcloud.vcd.client import Client from osm_mon.collector.infra_collectors.base_vim import BaseVimInfraCollector from osm_mon.collector.metric import Metric from osm_mon.core.common_db import CommonDbClient from osm_mon.core.config import Config log = logging.getLogger(__name__) API_VERSION = '27.0' class VMwareInfraCollector(BaseVimInfraCollector): def __init__(self, config: Config, vim_account_id: str): super().__init__(config, vim_account_id) self.vim_account_id = vim_account_id self.common_db = CommonDbClient(config) vim_account = self.get_vim_account(vim_account_id) self.vcloud_site = vim_account['vim_url'] self.admin_username = vim_account['admin_username'] self.admin_password = <PASSWORD>_account['<PASSWORD>_password'] self.vim_uuid = vim_account['vim_uuid'] self.org_name = vim_account['orgname'] self.vim_project_id = vim_account['project_id'] def connect_vim_as_admin(self): """ Method connect as pvdc admin user to vCloud director. There are certain action that can be done only by provider vdc admin user. Organization creation / provider network creation etc. Returns: The return client object that letter can be used to connect to vcloud direct as admin for provider vdc """ log.info("Logging into vCD org as admin.") admin_user = None try: host = self.vcloud_site admin_user = self.admin_username admin_passwd = <PASSWORD> org = 'System' client = Client(host, verify_ssl_certs=False) client.set_highest_supported_version() client.set_credentials(BasicLoginCredentials(admin_user, org, admin_passwd)) return client except Exception as e: log.info("Can't connect to a vCloud director as: {} with exception {}".format(admin_user, e)) def get_vim_account(self, vim_account_id: str): """ Method to get VIM account details by its ID arg - VIM ID return - dict with vim account details """ vim_account = {} vim_account_info = self.common_db.get_vim_account(vim_account_id) vim_account['name'] = vim_account_info['name'] vim_account['vim_tenant_name'] = vim_account_info['vim_tenant_name'] vim_account['vim_type'] = vim_account_info['vim_type'] vim_account['vim_url'] = vim_account_info['vim_url'] vim_account['org_user'] = vim_account_info['vim_user'] vim_account['vim_uuid'] = vim_account_info['_id'] if vim_account_info['_admin']['projects_read']: vim_account['project_id'] = vim_account_info['_admin']['projects_read'][0] else: vim_account['project_id'] = '' vim_config = vim_account_info['config'] vim_account['admin_username'] = vim_config['admin_username'] vim_account['admin_password'] = vim_config['<PASSWORD>password'] if vim_config['orgname'] is not None: vim_account['orgname'] = vim_config['orgname'] return vim_account def check_vim_status(self): try: client = self.connect_vim_as_admin() if client._session: org_list = client.get_org_list() for org in org_list.Org: if org.get('name') == self.org_name: org_uuid = org.get('href').split('/')[-1] url = '{}/api/org/{}'.format(self.vcloud_site, org_uuid) headers = {'Accept': 'application/*+xml;version=' + API_VERSION, 'x-vcloud-authorization': client._session.headers['x-vcloud-authorization']} response = requests.get(url=url, headers=headers, verify=False) if response.status_code != requests.codes.ok: # pylint: disable=no-member log.info("check_vim_status(): failed to get org details") else: org_details = XmlElementTree.fromstring(response.content) vdc_list = {} for child in org_details: if 'type' in child.attrib: if child.attrib['type'] == 'application/vnd.vmware.vcloud.vdc+xml': vdc_list[child.attrib['href'].split("/")[-1:][0]] = child.attrib['name'] if vdc_list: return True else: return False except Exception as e: log.info("Exception occured while checking vim status {}".format(str(e))) def check_vm_status(self, vapp_id): try: client = self.connect_vim_as_admin() if client._session: url = '{}/api/vApp/vapp-{}'.format(self.vcloud_site, vapp_id) headers = {'Accept': 'application/*+xml;version=' + API_VERSION, 'x-vcloud-authorization': client._session.headers['x-vcloud-authorization']} response = requests.get(url=url, headers=headers, verify=False) if response.status_code != requests.codes.ok: # pylint: disable=no-member log.info("check_vm_status(): failed to get vApp details") else: vapp_details = XmlElementTree.fromstring(response.content) vm_list = [] for child in vapp_details: if child.tag.split("}")[1] == 'Children': for item in child.getchildren(): vm_list.append(item.attrib) return vm_list except Exception as e: log.info("Exception occured while checking vim status {}".format(str(e))) def collect(self) -> List[Metric]: metrics = [] vim_status = self.check_vim_status() vim_account_id = self.vim_account_id vim_project_id = self.vim_project_id vim_tags = { 'vim_account_id': vim_account_id, 'project_id': vim_project_id } vim_status_metric = Metric(vim_tags, 'vim_status', vim_status) metrics.append(vim_status_metric) vnfrs = self.common_db.get_vnfrs(vim_account_id=vim_account_id) for vnfr in vnfrs: nsr_id = vnfr['nsr-id-ref'] ns_name = self.common_db.get_nsr(nsr_id)['name'] vnf_member_index = vnfr['member-vnf-index-ref'] if vnfr['_admin']['projects_read']: vnfr_project_id = vnfr['_admin']['projects_read'][0] else: vnfr_project_id = '' for vdur in vnfr['vdur']: resource_uuid = vdur['vim-id'] tags = { 'vim_account_id': self.vim_account_id, 'resource_uuid': resource_uuid, 'nsr_id': nsr_id, 'ns_name': ns_name, 'vnf_member_index': vnf_member_index, 'vdur_name': vdur['name'], 'project_id': vnfr_project_id } try: vm_list = self.check_vm_status(resource_uuid) for vm in vm_list: if vm['status'] == '4' and vm['deployed'] == 'true': vm_status = 1 else: vm_status = 0 vm_status_metric = Metric(tags, 'vm_status', vm_status) except Exception: log.exception("VM status is not OK!") vm_status_metric = Metric(tags, 'vm_status', 0) metrics.append(vm_status_metric) return metrics
def _build_invoker_sess(self, runtime_name, memory, route): if self._invoker_sess is None or route != self._invoker_sess_route: logger.debug('Building invoker session') target = self._get_service_endpoint(runtime_name, memory) + route credentials = (service_account .IDTokenCredentials .from_service_account_file(self.credentials_path, target_audience=target)) self._invoker_sess = AuthorizedSession(credentials) self._invoker_sess_route = route return self._invoker_sess
import { JavaLog4JConfiguredPractice } from './JavaLog4JConfiguredPractice'; import { PracticeEvaluationResult, ProgrammingLanguage } from '../../model'; import { TestContainerContext, createTestContainer } from '../../inversify.config'; import { pomXMLContents } from '../../detectors/__MOCKS__/Java/pomXMLContents.mock'; import { log4jXMLContents } from '../../detectors/__MOCKS__/Java/log4jXMLContents.mock'; import { codeStyleXML } from '../../detectors/__MOCKS__/Java/styleXMLContents.mock'; describe('JavaLog4JConfiguredPractice', () => { let practice: JavaLog4JConfiguredPractice; let containerCtx: TestContainerContext; beforeAll(() => { containerCtx = createTestContainer(); containerCtx.container.bind('JavaLog4JConfiguredPractice').to(JavaLog4JConfiguredPractice); practice = containerCtx.container.get('JavaLog4JConfiguredPractice'); }); afterEach(async () => { containerCtx.virtualFileSystemService.clearFileSystem(); containerCtx.practiceContext.fileInspector!.purgeCache(); }); it('Returns practicing if there is a correct configuration log4j.xml file', async () => { containerCtx.virtualFileSystemService.setFileSystem({ 'log4j.xml': log4jXMLContents, 'pom.xml': pomXMLContents, }); const evaluated = await practice.evaluate(containerCtx.practiceContext); expect(evaluated).toEqual(PracticeEvaluationResult.practicing); }); it('Returns practicing if there is a correct configuration in version 1.x of log4j.xml file', async () => { const oldLog4jXMLContents = ` <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> <log4j:configuration debug="true" xmlns:log4j='http://jakarta.apache.org/log4j/'> <appender name="console" class="org.apache.log4j.ConsoleAppender"> <param name="Target" value="System.out"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n" /> </layout> </appender> <root> <priority value ="debug"></priority> <appender-ref ref="console"></appender-ref> </root> </log4j:configuration> `; containerCtx.virtualFileSystemService.setFileSystem({ 'log4j.xml': oldLog4jXMLContents, 'pom.xml': pomXMLContents, }); const evaluated = await practice.evaluate(containerCtx.practiceContext); expect(evaluated).toEqual(PracticeEvaluationResult.practicing); }); it('Returns practicing if there is a correct configuration log4j.json file', async () => { const log4jJSONContents = ` { "configuration": { "status": "error", "name": "RoutingTest", "packages": "org.apache.logging.log4j.test" } }`; containerCtx.virtualFileSystemService.setFileSystem({ 'log4j.json': log4jJSONContents, 'pom.xml': pomXMLContents, }); const evaluated = await practice.evaluate(containerCtx.practiceContext); expect(evaluated).toEqual(PracticeEvaluationResult.practicing); }); it('Returns practicing if there is a correct configuration log4j.yaml file', async () => { const log4jYAMLContents = ` Configuration: status: warn name: YAMLConfigTest properties: property: name: filename value: target/test-yaml.log thresholdFilter: level: debug appenders: Console: name: STDOUT PatternLayout: Pattern: "%m%n" `; containerCtx.virtualFileSystemService.setFileSystem({ 'log4j.yaml': log4jYAMLContents, 'pom.xml': pomXMLContents, }); const evaluated = await practice.evaluate(containerCtx.practiceContext); expect(evaluated).toEqual(PracticeEvaluationResult.practicing); }); it('Returns practicing if there is a correct configuration log4j.yml file', async () => { const log4jYAMLContents = ` Configuration: status: warn name: YAMLConfigTest properties: property: name: filename value: target/test-yaml.log thresholdFilter: level: debug appenders: Console: name: STDOUT PatternLayout: Pattern: "%m%n" `; containerCtx.virtualFileSystemService.setFileSystem({ 'log4j.yml': log4jYAMLContents, 'pom.xml': pomXMLContents, }); const evaluated = await practice.evaluate(containerCtx.practiceContext); expect(evaluated).toEqual(PracticeEvaluationResult.practicing); }); it('Returns practicing if there is a correct configuration log4j.properties file', async () => { const log4jPropertiesContents = ` status = error dest = err name = PropertiesConfig property.filename = target/rolling/rollingtest.log filter.threshold.type = ThresholdFilter filter.threshold.level = debug appender.console.type = Console appender.console.name = STDOUT appender.rolling.type = RollingFile appender.rolling.name = RollingFile logger.rolling.additivity = false logger.rolling.appenderRef.rolling.ref = RollingFile rootLogger.level = info rootLogger.appenderRef.stdout.ref = STDOUT `; containerCtx.virtualFileSystemService.setFileSystem({ 'log4j.properties': log4jPropertiesContents, 'pom.xml': pomXMLContents, }); const evaluated = await practice.evaluate(containerCtx.practiceContext); expect(evaluated).toEqual(PracticeEvaluationResult.practicing); }); it('Returns practicing if there is a correct configuration for log4j2 base name', async () => { containerCtx.virtualFileSystemService.setFileSystem({ 'log4j2.xml': log4jXMLContents, 'pom.xml': pomXMLContents, }); const evaluated = await practice.evaluate(containerCtx.practiceContext); expect(evaluated).toEqual(PracticeEvaluationResult.practicing); }); it('Returns notPracticing if there is no configuration file for log4j', async () => { containerCtx.virtualFileSystemService.setFileSystem({ 'code-styles.xml': codeStyleXML, 'pom.xml': pomXMLContents, }); const evaluated = await practice.evaluate(containerCtx.practiceContext); expect(evaluated).toEqual(PracticeEvaluationResult.notPracticing); }); it('Returns notPracticing if the configuration file base name is not named correctly', async () => { containerCtx.virtualFileSystemService.setFileSystem({ 'terrible-naming-convention.xml': log4jXMLContents, 'pom.xml': pomXMLContents, }); const evaluated = await practice.evaluate(containerCtx.practiceContext); expect(evaluated).toEqual(PracticeEvaluationResult.notPracticing); }); it('Returns notPracticing if the configuration file is using an unsupported extension', async () => { containerCtx.virtualFileSystemService.setFileSystem({ 'log4j.raml': log4jXMLContents, 'pom.xml': pomXMLContents, }); const evaluated = await practice.evaluate(containerCtx.practiceContext); expect(evaluated).toEqual(PracticeEvaluationResult.notPracticing); }); it('Returns unknown if there is no fileInspector', async () => { const evaluated = await practice.evaluate({ ...containerCtx.practiceContext, fileInspector: undefined }); expect(evaluated).toEqual(PracticeEvaluationResult.unknown); }); it('Is applicable to Java', async () => { containerCtx.practiceContext.projectComponent.language = ProgrammingLanguage.Java; const result = await practice.isApplicable(containerCtx.practiceContext); expect(result).toEqual(true); }); it('Is applicable to Kotlin', async () => { containerCtx.practiceContext.projectComponent.language = ProgrammingLanguage.Kotlin; const result = await practice.isApplicable(containerCtx.practiceContext); expect(result).toEqual(true); }); it('Is not applicable to other languages', async () => { containerCtx.practiceContext.projectComponent.language = ProgrammingLanguage.Swift; const result = await practice.isApplicable(containerCtx.practiceContext); expect(result).toEqual(false); }); });
<reponame>diminishedprime/weight-training import { Box, Button, TableCell, TableRow } from '@mui/material'; import * as React from 'react'; import { editExerciseUrlFor } from '@/components/pages/EditExercise'; import { DumbbellAPI } from '@/components/pages/Exercise/AddExercise/useDumbbellWeight'; import { PlatesAPI } from '@/components/pages/Exercise/usePlates'; import { ExerciseData, narrowBarExercise, narrowDumbbellExercise, WithID, } from '@/types'; import { fromDBExercise } from '@/util'; interface DetailRowProps { exercise: WithID<ExerciseData>; loadBar: PlatesAPI['loadToWeight']; loadWeight: DumbbellAPI['setWeight']; } const DetailRow: React.FC<DetailRowProps> = ({ exercise, loadBar, loadWeight, }) => { const isBarExercise = narrowBarExercise(fromDBExercise(exercise.type)); const isDumbbellExercise = narrowDumbbellExercise( fromDBExercise(exercise.type), ); console.log({ isDumbbellExercise, isBarExercise }); return ( <TableRow> <TableCell colSpan={4}> <Box sx={{ display: 'flex', justifyContent: 'space-between', }} > {isBarExercise && ( <Button variant="outlined" color="primary" size="small" onClick={() => loadBar(exercise.weight)} > Load Bar </Button> )} {isDumbbellExercise && ( <Button variant="outlined" color="primary" size="small" onClick={() => loadWeight(exercise.weight)} > Load Weight </Button> )} <Button variant="outlined" color="warning" size="small" href={editExerciseUrlFor(exercise)} > Edit </Button> </Box> </TableCell> </TableRow> ); }; export default DetailRow;
Plot Edit Cast Edit Production Edit Reception Edit Release Edit Home media Edit When the film was first screened for a preview audience, a producer demanded that director Landis cut 25 minutes from the film.[42] After trimming 15 minutes, it was released in theaters at 132 minutes. It was first released on VHS and Betamax from MCA Videocassette Inc. in 1983. A Laserdisc from MCA Videodisc was released the same year. It was re-released on VHS, Laserdisc, and Betamax in 1985 from MCA Home Video, and again in 1990 from MCA/Universal Home Video. It was also released in a 2-Pack VHS box set with Animal House. The film's original length was restored to 148 minutes for the "Collector's Edition" DVD and a Special Edition VHS and Laserdisc release in 1998. The DVD and Laserdisc versions included a 56-minute documentary called "The Stories Behind The Making Of The Blues Brothers". Produced and directed by JM Kenny (who also produced the Animal House Collector's Edition DVD the same year), it included interviews with Landis, Aykroyd, members of The Blues Brothers Band, producer Robert K. Weiss, editor George Folsey Jr., and others involved with the film. It also included production photographs, the theatrical trailer, production notes, and cast and filmmaker bios. The 25th-anniversary DVD release in 2005 included both the theatrical cut and the extended version. The film was released on Blu-ray on July 26, 2011, with the same basic contents as the 25th-anniversary DVD. In a March 2011 interview with Ain't it Cool News, Landis also mentioned he had approved the Blu-ray's remastered transfer. Soundtrack Edit Certifications Edit Sequel Edit See also Edit
Dynamic Forces in Educational Development: A long-run comparative view of France and Germany in the 19th and 20th centuries Since World War II, much of the economic growth literature has focused on the contribution of human capital to national development. Two assumptions have remained largely unexamined: (i) economic stability results from economic growth, and (ii) investments in human capital result in economic growth ( ceteris paribus ). This paper questions this education-stability link by examining longitudinal data from France and Germany across 170 years. Results indicate that human capital investment prior to 1945 was a response to economic growth. It is only since 1945 that human capital investments appear to drive economic growth. A shift since 1973 leads to doubts as to whether the post-war human capital-driven growth is being sustained. The results raise the question of whether human capital investment might not be as much a consequence as it is a cause of economic stability in the course of time.
NEW DELHI: With six defeats in as many games, nothing seems to be going right for the Delhi Daredevils this season, but they could have managed the biggest eye-grabbing move of this T20 league when they announced the inclusion of West Indian great Vivian Richards to their staff on Saturday.The original master blaster - for many Chris Gayle too would pale in comparison - Richards joins the beleaguered Daredevils in an ambassadorial and advisory role.The signing, perhaps the best-kept secret of the glitzy, high-profile cricketing circus, is the latest addition at DD, complementing the likes of spin bowling consultant Mushtaq Ahmed , High Performance manager Jeremy Snape and former Indian bowling coach Eric Simons."I am looking forward to working with the Daredevils this season. I know the team has plenty of players of proven quality and others who have immense talent and hunger to succeed at this level and higher. It will be a great experience for me to be their sounding board and inspire them to deliver quality performances," a Daredevils release quoted Richards as saying.Sources said that the former West Indian great arrived in the Capital on Friday night.Richards didn't waste any time in interacting with the team. "The morale of the team is not great at the moment so Richards had a pep talk with the team immediately after his arrival last night. There were a lot of eager ears," sources added.The 61-year-old is juggling multiple roles at the moment and he is also the ambassador-at-large of the Antigua and Barbuda islands. "There are a number of youngsters in the squad who can make the most of the opportunity to interact with Richards. He was one of the best batsmen to take the field and set amazing standards for himself with the bat and on the field in his playing days," Daredevils team mentor TA Sekar said."Of course, we would have liked to have him with the team from the beginning but he had some prior commitments," team owners GMR Sports told TOI.
/** * Processes this directive * @param assembler (sub)assembler context * @param textLine contains the basic parse into fields/subfields - we cannot drill down further, as various directives * make different usages of the fields - and $INFO even uses an extra field * @param labelFieldComponents LabelFieldComponents describing the label field on the line containing this directive */ public abstract void process( final Assembler assembler, final TextLine textLine, final LabelFieldComponents labelFieldComponents );
/** * A test for WSS-62: "the crypto file not being retrieved in the doReceiverAction * method for the Saml Signed Token" * * https://issues.apache.org/jira/browse/WSS-62 */ @Test public void testWSS62() throws Exception { SAML2CallbackHandler callbackHandler = new SAML2CallbackHandler(); callbackHandler.setStatement(SAML2CallbackHandler.Statement.ATTR); callbackHandler.setConfirmationMethod(SAML2Constants.CONF_SENDER_VOUCHES); callbackHandler.setIssuer("www.example.com"); SAMLCallback samlCallback = new SAMLCallback(); SAMLUtil.doSAMLCallback(callbackHandler, samlCallback); SamlAssertionWrapper samlAssertion = new SamlAssertionWrapper(samlCallback); Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG); WSSecHeader secHeader = new WSSecHeader(doc); secHeader.insertSecurityHeader(); WSSecSignatureSAML wsSign = new WSSecSignatureSAML(secHeader); wsSign.setKeyIdentifierType(WSConstants.BST_DIRECT_REFERENCE); Document signedDoc = wsSign.build( null, samlAssertion, crypto, "16c73ab6-b892-458f-abf5-2f875f74882e", "security" ); Now verify it but first call Handler#doReceiverAction final WSSConfig cfg = WSSConfig.getNewInstance(); final RequestData reqData = new RequestData(); reqData.setWssConfig(cfg); java.util.Map<String, Object> msgContext = new java.util.HashMap<>(); msgContext.put(WSHandlerConstants.SIG_VER_PROP_FILE, "crypto.properties"); reqData.setMsgContext(msgContext); CustomHandler handler = new CustomHandler(); handler.receive(Collections.singletonList(WSConstants.ST_SIGNED), reqData); secEngine.processSecurityHeader( signedDoc, null, callbackHandler, reqData.getSigVerCrypto(), reqData.getDecCrypto() ); }
<filename>kinova.py import os, inspect # currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) # parentdir = os.path.dirname(os.path.dirname(currentdir)) # os.sys.path.insert(0,parentdir) import pybullet as p import numpy as np import copy import math import pybullet_data class Kinova: def __init__(self, urdfRootPath=pybullet_data.getDataPath(), timeStep=0.01): self.urdfRootPath = urdfRootPath self.timeStep = timeStep self.maxVelocity = .35 self.maxForce = 2000. self.fingerAForce = 2 self.fingerBForce = 25 self.fingerTipForce = 20 self.useInverseKinematics = 1 self.useSimulation = 1 self.useNullSpace =21 self.useOrientation = 1 self.kinovaEndEffectorIndex = 9 self.kinovaGripperIndex = 7 # lower limits for null space self.ll=[-.967,-2 ,-2.96,0.19,-2.96,-2.09,-3.05] # upper limits for null space self.ul=[.967,2 ,2.96,2.29,2.96,2.09,3.05] #joint ranges for null space self.jr=[5.8,4,5.8,4,5.8,4,6,5.8,4,5.8] #restposes for null space self.rp=[0,0,0,0.5*math.pi,0,-math.pi*0.5*0.66,0,0,0,0] #joint damping coefficents # self.jd=[0.00001,0.00001,0.00001,0.00001,0.00001,0.00001,0.00001,0.00001,0.00001,0.00001,0.00001,0.00001,0.00001,0.00001] self.jd=[0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1] self._kinovaStartPos = [0,0,0] self.reset() def reset(self): kinova = p.loadURDF(os.path.join(self.urdfRootPath,"kinova_description2/urdf/j2n7s300_standalone.urdf"),self._kinovaStartPos,useFixedBase=1) #for i in range (p.getNumJoints(self.kinovaUid)): # print(p.getJointInfo(self.kinovaUid,i)) self.kinovaUid = kinova # p.resetBasePositionAndOrientation(self.kinovaUid,[-0.100000,0.000000,0.070000],[0.000000,0.000000,0.000000,1.000000]) # for i in range(self.kinovaEndEffectorIndex+1): # JointInfo = p.getJointInfo(self.kinovaUid,i) # # print(JointInfo) # #lower limits for null space # self.ll[i] = JointInfo[8] # #upper limits for null space # self.ul[i] = JointInfo[9] #joint damping coefficents # jd[i] = JointInfo[6] # print(jd) # self.jointPositions=[ 0.006418, 0.413184, -0.011401, -1.589317, 0.005379, 1.137684, -0.006539, 0.000048, -0.299912, 0.000000, -0.000043, 0.299960, 0.000000, -0.000200, -0.000200] # self.jointPositions=[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # self.jointPositions=[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] # self.jointPositions=[ 0, 0, -3.2, -1.0, 0.78, 3.31, 7.28, 2.2, 2.28, 0, -4.58, 0, 7.05, 0, -7.6, 0] # self.jointPositions=[0.0, 0.0, 1.691884506295414, 0.523596664758403, -3.3795658428691167, 0.7290620967898366, 1.6257430100542183, # -3.124612041350533, 0.0036354312522859397, 0.0, 1.7657059909627546e-05, 0.0, -6.28493691840157e-06, 0.0, -1.0767534552816044e-08, 0.0] self.numJoints = p.getNumJoints(self.kinovaUid) # for jointIndex in range (self.numJoints): # # # p.resetJointState(self.kinovaUid,jointIndex,self.jointPositions[jointIndex]) # p.setJointMotorControl2(self.kinovaUid,jointIndex,p.POSITION_CONTROL,targetPosition=self.jointPositions[jointIndex],force=self.maxForce) # print(p.getJointState(self.kinovaUid,jointIndex)) # print("======reset=========") # print(p.getLinkState(self.kinovaUid, self.kinovaEndEffectorIndex, computeForwardKinematics =1)) # self.trayUid = p.loadURDF(os.path.join(self.urdfRootPath,"tray/traybox.urdf"), 0.6600,0.000,-0.0000,0.000000,0.000000,1.000000,0.000000) #0.44 0.075 -0.19 user 20190327 self.endEffectorPos = [0.061,0.0,1.121] #0.537,0.0,0.5 # self.endEffectorPos = [0.0,0.0,0.0] #0.537,0.0,0.5 # (0.06106187295331401, -5.7852693706624846e-05, 1.121078907978537) self.endEffectorAngle = 0.0 self.motorNames = [] self.motorIndices = [] for i in range (self.numJoints): jointInfo = p.getJointInfo(self.kinovaUid,i) qIndex = jointInfo[3] if qIndex > -1: #print("motorname") #print(jointInfo[1]) self.motorNames.append(str(jointInfo[1])) self.motorIndices.append(i) def getActionDimension(self): if (self.useInverseKinematics): return len(self.motorIndices) return 6 #position x,y,z and roll/pitch/yaw euler angles of end effector def getObservationDimension(self): return len(self.getObservation()) def getObservation(self): observation = [] state = p.getLinkState(self.kinovaUid,self.kinovaGripperIndex) pos = state[0] orn = state[1] euler = p.getEulerFromQuaternion(orn) observation.extend(list(pos)) observation.extend(list(euler)) return observation def applyAction(self, motorCommands, mode): #print ("self.numJoints") #print (self.numJoints) # print("applyaction:") # print(motorCommands) if (self.useInverseKinematics): dx = motorCommands[0] dy = motorCommands[1] dz = motorCommands[2] da = motorCommands[3] fingerAngle = motorCommands[4] state = p.getLinkState(self.kinovaUid,self.kinovaEndEffectorIndex) # for joint in range(p.getNumJoints(self.kinovaUid)): # print("================") # print(p.getJointInfo(self.kinovaUid,joint)) actualEndEffectorPos = state[0] # print("pos[2] (getLinkState(kinovaEndEffectorIndex)") # print(actualEndEffectorPos) # exit() pos = [0, 0, 0] # self.endEffectorPos[0] = self.endEffectorPos[0]+dx # pos[0] = self.endEffectorPos[0]+dx pos[0] = dx # pos[0] = self.endEffectorPos[0]+dx - 0.061 # if (self.endEffectorPos[0]>0.65): # self.endEffectorPos[0]=0.65 # if (self.endEffectorPos[0]<0.50): # self.endEffectorPos[0]=0.50 # self.endEffectorPos[1] = self.endEffectorPos[1]+dy pos[1] = dy # 0.061, 0.0, 1.121 # pos[1] = self.endEffectorPos[1]+dy # if (self.endEffectorPos[1]<-0.17): # self.endEffectorPos[1]=-0.17 # if (self.endEffectorPos[1]>0.22): # self.endEffectorPos[1]=0.22 #print ("self.endEffectorPos[2]") #print (self.endEffectorPos[2]) #print("actualEndEffectorPos[2]") #print(actualEndEffectorPos[2]) #if (dz<0 or actualEndEffectorPos[2]<0.5): # self.endEffectorPos[2] = self.endEffectorPos[2]+dz pos[2] = dz # pos = motorCommands[:3] # pos[2] -= 0.05 # print(pos) # pos= [1.5,0,0.4] # self.endEffectorAngle = self.endEffectorAngle + da endEffectorAngle = da # print("endEffectorAngle") # print(endEffectorAngle) # pos = self.endEffectorPos # print('+++++++++abs pose:+++++++++') # print(pos) # print('+++++++++abs angles:+++++++++') # print(endEffectorAngle) # pos = [0.46,0,0.8] if mode==1: # print("moving") # orn = p.getQuaternionFromEuler([0,math.pi,0]) # -math.pi,yaw]) 0326 orn = p.getQuaternionFromEuler([0,math.pi,-endEffectorAngle]) # -math.pi,yaw]) -endEffectorAngle if (self.useNullSpace==1): if (self.useOrientation==1): jointPoses = p.calculateInverseKinematics(self.kinovaUid,self.kinovaEndEffectorIndex,pos,orn,self.ll,self.ul,self.jr,self.rp) else: jointPoses = p.calculateInverseKinematics(self.kinovaUid,self.kinovaEndEffectorIndex,pos,lowerLimits=self.ll, upperLimits=self.ul, jointRanges=self.jr, restPoses=self.rp) else: if (self.useOrientation==1): # jointPoses = p.calculateInverseKinematics(self.kinovaUid,self.kinovaEndEffectorIndex,pos,orn,jointDamping=self.jd) jointPoses = p.calculateInverseKinematics(self.kinovaUid,self.kinovaEndEffectorIndex,pos,orn,jointDamping=self.jd) # print("this method") else: jointPoses = p.calculateInverseKinematics(self.kinovaUid,self.kinovaEndEffectorIndex,pos) # print("jointPoses") # print(len(jointPoses)) # print("self.kinovaEndEffectorIndex") # print(self.kinovaEndEffectorIndex) # p.setJointMotorControl2(self.kinovaUid, 8, p.POSITION_CONTROL, targetPosition=endEffectorAngle,force=self.maxForce*0.5) if (self.useSimulation): # for i in range (self.kinovaEndEffectorIndex): for i in range (7): #print(i) p.setJointMotorControl2(bodyUniqueId=self.kinovaUid,jointIndex=i+2,controlMode=p.POSITION_CONTROL,targetPosition= jointPoses[i],targetVelocity=0,\ force=self.maxForce*1,maxVelocity=self.maxVelocity, positionGain=0.03,velocityGain=1) # p.setJointMotorControl2(self._kinova,jointIndex=joint,controlMode=POSITION_CONTROL, targetPosition=0, force=2000) # pass else: #reset the joint state (ignoring all dynamics, not recommended to use during simulation) for i in range (self.numJoints): p.resetJointState(self.kinovaUid,i,jointPoses[i]) # p.setJointMotorControl2(self.kinovaUid,jointIndex=8,controlMode=p.VELOCITY_CONTROL, targetVelocity=10, force=20) #fingers else: # print("finger!") p.setJointMotorControl2(self.kinovaUid,10,p.POSITION_CONTROL,targetPosition=fingerAngle*1,force=self.fingerBForce*15) p.setJointMotorControl2(self.kinovaUid,12,p.POSITION_CONTROL,targetPosition=fingerAngle*1,force=self.fingerBForce*10) p.setJointMotorControl2(self.kinovaUid,14,p.POSITION_CONTROL,targetPosition=fingerAngle*1,force=self.fingerBForce*10) p.setJointMotorControl2(self.kinovaUid,11,p.POSITION_CONTROL,targetPosition=0,force=self.fingerTipForce) p.setJointMotorControl2(self.kinovaUid,13,p.POSITION_CONTROL,targetPosition=0,force=self.fingerTipForce) p.setJointMotorControl2(self.kinovaUid,15,p.POSITION_CONTROL,targetPosition=0,force=self.fingerTipForce) # p.setJointMotorControl2(self.kinovaUid, 8, p.POSITION_CONTROL, targetPosition=endEffectorAngle,force=self.maxForce*0.5) # jointpos=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] # for i in range(p.getNumJoints(self.kinovaUid)): # jointpos[i] = p.getJointState(self.kinovaUid,i)[0] # # # print(p) # print(jointpos) else: for action in range (len(motorCommands)): motor = self.motorIndices[action] p.setJointMotorControl2(self.kinovaUid,motor,p.POSITION_CONTROL,targetPosition=motorCommands[action],force=self.maxForce)
<reponame>pombredanne/vulnerability-assessment-kb<filename>prospector/api/routers/nvd.py # This file is based on the rest-nvd module that is part of Eclipse Steady. import json import os from fastapi import APIRouter, HTTPException from fastapi.responses import JSONResponse import log.util _logger = log.util.init_local_logger() router = APIRouter( prefix="/nvd", tags=["nvd"], # dependencies=[Depends(oauth2_scheme)], responses={404: {"description": "Not found"}}, ) DATA_PATH = os.environ.get("CVE_DATA_PATH") or os.path.join( os.path.realpath(os.path.dirname(__file__)), "..", "data" ) @router.get("/vulnerabilities/{vuln_id}") async def get_vuln_data(vuln_id): _logger.debug("Requested data for vulnerability " + vuln_id) year = vuln_id.split("-")[1] json_file = os.path.join(DATA_PATH, year, vuln_id.upper() + ".json") if not os.path.isfile(json_file): _logger.info("No file found: " + json_file) raise HTTPException(status_code=404, detail="Vulnerability data not found") _logger.debug("Serving file: " + json_file) with open(json_file) as f: data = json.loads(f.read()) return data @router.get("/status") async def status(): _logger.debug("Serving status page") out = dict() metadata_file = os.path.join(DATA_PATH, "metadata.json") if os.path.isfile(metadata_file): with open(metadata_file) as f: metadata = json.loads(f.read()) out["metadata"] = metadata return JSONResponse(out) raise HTTPException(status_code=404, detail="Missing feed file")
<gh_stars>0 import { Component, OnInit, Input, Output, EventEmitter } from '@angular/core'; import { Observable, Subject } from 'rxjs'; import { DomSanitizer, SafeUrl } from "@angular/platform-browser"; import { Image } from './ngx-image-upload-base64.model'; @Component({ selector: 'ngx-image-upload-base64', templateUrl: './ngx-image-upload-base64.component.html', styleUrls: ['./ngx-image-upload-base64.component.css'], }) export class NgxImageUploadBase64Component implements OnInit { @Input() availableExtensions = "image/png|image/jpeg"; @Input() maxWidth = 400; @Input() maxHeight = 400; @Input() maxImagesToUpload = 10; @Input() loadImages: Image[]; @Output() onAddImage: EventEmitter<Image[]> = new EventEmitter<Image[]>(); @Output() onDeleteImage: EventEmitter<Image[]> = new EventEmitter<Image[]>(); imagesPreview: Image[] = []; private extensions: string[] = []; constructor(private domSatinizer: DomSanitizer) { } ngOnInit(): void { this.loadImagesFromInput(); this.getAvailableExtensions(); } loadImagesFromInput() { if (this.loadImages != undefined && this.loadImages.length > 0) { this.loadImages.forEach(img => { let im = new Image; im.src = img.base64; if (this.imagesPreview.length < this.maxImagesToUpload) { if (img.height == undefined || img.height == null) { img.height = im.height; } if (img.width == undefined || img.width == null) { img.width = im.width; } this.imagesPreview.push(img); } }); } } getAvailableExtensions() { this.extensions = this.availableExtensions.split("|"); } readFile(file: File): Observable<string> { const sub = new Subject<string>(); var reader = new FileReader(); reader.onload = () => { const content: string = reader.result as string; sub.next(content); sub.complete(); }; reader.readAsBinaryString(file); return sub.asObservable(); } onSelectFile(ev) { const file = ev.target.files[0]; if (this.extensions.includes(file.type) && this.imagesPreview.length < this.maxImagesToUpload) { this.readFile(file).subscribe((output) => { let image = btoa(output); this.resizeImage(file.type, image).subscribe(result => { this.pushImage(result); }); }) } } pushImage(image: Image) { this.imagesPreview.push(image); this.onAddImage.emit(this.imagesPreview); } getImgContent(image: Image): SafeUrl { return this.domSatinizer.bypassSecurityTrustStyle(`url(${image.base64})`); } deleteImg(image: Image): void { if (this.imagesPreview.includes(image)) { let index = this.imagesPreview.indexOf(image); this.imagesPreview.splice(index, 1); this.onDeleteImage.emit(this.imagesPreview); } } resizeImage(type: string, image: string): Observable<Image> { const subject = new Subject<Image>(); if (image) { var img = new Image(); img.src = `data:${type};base64,${image}`; img.onload = () => { var canvas = document.createElement("canvas"); var ctx = canvas.getContext("2d"); ctx.drawImage(img, 0, 0); var MAX_WIDTH = this.maxWidth; var MAX_HEIGHT = this.maxHeight; var width = img.width; var height = img.height; if (width > height) { if (width > MAX_WIDTH) { height *= MAX_WIDTH / width; width = MAX_WIDTH; } } else { if (height > MAX_HEIGHT) { width *= MAX_HEIGHT / height; height = MAX_HEIGHT; } } canvas.width = width; canvas.height = height; var ctx = canvas.getContext("2d"); ctx.drawImage(img, 0, 0, width, height); let dataurl = canvas.toDataURL(); let result: Image = { base64: dataurl, type: type, width: width, height: height } subject.next(result); subject.complete(); } return subject.asObservable(); } } }
/*! * Write an unsigned integer in a string with a defined number of digits. * * \warning This function does not allocate memory nor resize the destination string. * It is up to the user of the function to allocate memory in advance. * * \param dst The string where to write in * \param len The number of char to write * \param val The value to write * * \return Number of characters written */ unsigned int fiolSWriteFixedUInt(char* dst, unsigned int len, unsigned int val) { unsigned int i; if(dst) { for(i=0; i<len; i++) { dst[len-i-1] = '0'+val%10; val /= 10; } } return len; }
Jarvis: Moving Towards a Smarter Internet of Things The deployment of Internet of Things (IoT) combined with cyber-physical systems is resulting in complex environments comprising of various devices interacting with each other and with users through apps running on computing platforms like mobile phones, tablets, and desktops. In addition, the rapid advances in Artificial Intelligence are making those devices able to autonomously modify their behaviors through the use of techniques such as reinforcement learning (RL). It is clear however that ensuring safety and security in such environments is critical. In this paper, we introduce Jarvis, a constrained RL framework for IoT environments that determines optimal devices actions with respect to user-defined goals, such as energy optimization, while at the same time ensuring safety and security. Jarvis is scalable and context independent in that it is applicable to any IoT environment with minimum human effort. We instantiate Jarvis for a smart home environment and evaluate its performance using both simulated and real world data. In terms of safety and security, Jarvis is able to detect 100% of the 214 manually crafted security violations collected from prior work and is able to correctly filter 99.2% of the user-defined benign anomalies and malfunctions from safety violations. For measuring functionality benefits, Jarvis is evaluated using real world smart home datasets with respect to three user required functionalities: energy use minimization, energy cost minimization, and temperature optimization. Our analysis shows that Jarvis provides significant advantages over normal device behavior in terms of functionality and over general unconstrained RL frameworks in terms of safety and security.
/** * Removes all these objects in the following order: * <ol> * <li>Solution and all generated meshes; * <li>Plots, Monitors and Reports; * <li>Regions; * <li>Mesh Operations and Continuas; * <li>Parts and 3D-CAD models; * <li>Coordinate Systems; * <li>Update Events; * <li>User Field Functions; * <li>Global Parameters; * <li>Annotations. * </ol> */ public void all() { ContinuumManager cm = _sim.getContinuumManager(); MeshOperationManager mom = _sim.get(MeshOperationManager.class); if (!(cm.isEmpty() && mom.isEmpty())) { _clear.solution(); _clear.meshes(); } allScenes(); allPlots(); allMonitors(); allReports(); allRegions(); allMeshOperations(); allParts(); allSolidModelParts(); allContinuas(); allCoordinateSystems(); allUpdateEvents(); allUserFieldFunctions(); allGlobalParameters(); allAnnotations(); allTags(); }
/// quick test to determine if string is valid uuid // avoids dependency on regex lib pub(crate) fn is_uuid(s: &str) -> bool { if s.len() != 36 { return false; } for buf in s.split('-') { match buf.len() { 8 => { if u64::from_str_radix(&buf, 16).is_err() { return false; } } 4 => { if u32::from_str_radix(&buf, 16).is_err() { return false; } } 12 => { if u64::from_str_radix(&buf[..6], 16).is_err() || u64::from_str_radix(&buf[6..], 16).is_err() { return false; } } _ => return false, } } true }
/** * Create {@link MappingStats} from the given cluster state. */ public static MappingStats of(ClusterState state) { Map<String, IndexFeatureStats> fieldTypes = new HashMap<>(); for (IndexMetadata indexMetadata : state.metadata()) { Set<String> indexFieldTypes = new HashSet<>(); MappingMetadata mappingMetadata = indexMetadata.mapping(); if (mappingMetadata != null) { MappingVisitor.visitMapping(mappingMetadata.getSourceAsMap(), fieldMapping -> { String type = null; Object typeO = fieldMapping.get("type"); if (typeO != null) { type = typeO.toString(); } else if (fieldMapping.containsKey("properties")) { type = "object"; } if (type != null) { IndexFeatureStats stats = fieldTypes.computeIfAbsent(type, IndexFeatureStats::new); stats.count++; if (indexFieldTypes.add(type)) { stats.indexCount++; } } }); } } return new MappingStats(fieldTypes.values()); }
use hacspec_gimli::*; use hacspec_lib::prelude::*; /* - Non-KAT test cases in this file have been generated randomly - Python code to generate a random test case of `inlen` length: inlen = 16 # length of random input inp = array.create_random(inlen, uint8) print("Input Array:", inp) print("Hash:", gimli_hash(inp, inlen)) */ #[test] fn kat_gimli_hash() { let input = ByteSeq::from_public_slice(&[1, 2, 3, 4, 5, 6]); let expected = Digest::from_public_slice(&[ 0x4b, 0xb0, 0xf3, 0x12, 0x6a, 0x57, 0x10, 0x5, 0x6, 0x9c, 0x52, 0x9a, 0xfb, 0x86, 0x9f, 0x12, 0x5d, 0xae, 0x60, 0x65, 0x71, 0x6, 0xe1, 0x4d, 0x22, 0x27, 0xc9, 0xb3, 0xec, 0x78, 0x7b, 0xd3, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); let input = ByteSeq::from_public_slice(&[ 0x46, 0xad, 0xcf, 0xac, 0x5a, 0x4f, 0xc2, 0x52, 0xc1, 0x50, 0xf6, 0x9c, 0x7d, 0x5c, 0x19, 0x21, 0xba, 0xac, 0x32, 0x79, 0x2e, 0x90, 0xfe, 0x4e, 0x3b, 0x5b, 0x38, 0xec, 0xbd, 0x3d, 0x71, 0x75, 0x36, 0x19, 0x5, 0xe, 0x54, 0x94, 0xf4, 0xf5, 0x70, 0x9, 0x45, 0xa, 0x25, 0x3f, 0x2a, 0xe1, 0x70, 0x8, 0xd0, 0xb5, 0x17, 0xb2, 0x77, 0xba, 0x22, 0xb8, 0x83, 0x63, 0xdb, 0xee, 0xec, 0x47, 0x49, 0x9b, 0xba, 0x6b, 0x54, 0xf9, 0x24, 0xc5, 0xb1, 0xf3, 0xf2, 0xd2, 0x73, 0x96, 0x10, 0xf2, 0xd1, 0xa4, 0xf6, 0xef, 0x82, 0x9c, 0xbc, 0x3e, 0x8, 0xe5, 0x6, 0xf1, 0x4a, 0xaa, 0x60, 0xe5, 0x3e, 0x6a, 0x29, 0x90, ]); let expected = Digest::from_public_slice(&[ 0x66, 0xae, 0xd3, 0xd, 0x9c, 0xd0, 0x37, 0x67, 0x30, 0x89, 0x34, 0xe6, 0xb2, 0xb9, 0xb5, 0xb, 0xb, 0x7c, 0x64, 0x9, 0xca, 0x91, 0x76, 0xb3, 0x2d, 0xfb, 0xc3, 0x82, 0x8d, 0x17, 0xeb, 0x57, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash() { // Test 1 (16 length input) let input = ByteSeq::from_public_slice(&[ 0xb7, 0x63, 0x28, 0xae, 0x5b, 0x62, 0x91, 0xa6, 0x92, 0x17, 0x99, 0x1a, 0x61, 0xe9, 0x4e, 0x9c, ]); let expected = Digest::from_public_slice(&[ 0xb1, 0xef, 0xf6, 0xc4, 0x46, 0xcc, 0xba, 0x70, 0x65, 0xe0, 0xd1, 0x6a, 0xf6, 0x95, 0xf3, 0x70, 0x2b, 0x8f, 0x20, 0x4c, 0xf7, 0x53, 0x1c, 0x4c, 0xd, 0x30, 0x72, 0x4d, 0x1a, 0x8b, 0x53, 0x1f, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); // Test 2 (32 length input) let input = ByteSeq::from_public_slice(&[ 0xcb, 0xc8, 0x28, 0x60, 0x9f, 0xa5, 0x56, 0xdd, 0x6b, 0x97, 0x9d, 0xbc, 0x4e, 0xca, 0x5, 0x42, 0x2, 0xab, 0xdd, 0xad, 0xb9, 0xf4, 0x1d, 0x1f, 0xc3, 0xac, 0xc2, 0x35, 0xbb, 0x4a, 0x47, 0xb7, ]); let expected = Digest::from_public_slice(&[ 0xc8, 0x4a, 0xc4, 0x74, 0x1a, 0x26, 0x82, 0xa3, 0x47, 0xa6, 0x6e, 0x57, 0x20, 0xd1, 0x91, 0x61, 0x98, 0x51, 0x58, 0x5d, 0x81, 0x35, 0x2, 0xeb, 0x61, 0x37, 0xaf, 0xe5, 0x15, 0x2, 0x2e, 0xe8, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_1() { let input = ByteSeq::from_public_slice(&[0xe9]); let expected = Digest::from_public_slice(&[ 0x7a, 0xbb, 0x25, 0x8, 0x6c, 0xa9, 0x9f, 0x5d, 0xaf, 0x96, 0xca, 0x11, 0x81, 0xb1, 0x71, 0xa, 0x66, 0x52, 0x3b, 0x49, 0x69, 0x21, 0xae, 0x13, 0xda, 0x43, 0xad, 0xa, 0x27, 0x30, 0x9f, 0xd, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_2() { let input = ByteSeq::from_public_slice(&[0xbd, 0x3c]); let expected = Digest::from_public_slice(&[ 0x37, 0x73, 0x5c, 0x2e, 0x1c, 0x8b, 0x77, 0xf6, 0x8e, 0x10, 0xc8, 0x11, 0x8e, 0x78, 0x9f, 0xe7, 0xef, 0xfa, 0x73, 0x5a, 0xc5, 0x89, 0xd9, 0x63, 0x21, 0xad, 0xd3, 0x4, 0x48, 0xbd, 0xe1, 0x6, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_3() { let input = ByteSeq::from_public_slice(&[0xf7, 0xb, 0xca]); let expected = Digest::from_public_slice(&[ 0x55, 0x84, 0xd3, 0xc2, 0x1, 0x8b, 0x54, 0xda, 0xf7, 0xce, 0x5d, 0x51, 0xb5, 0x90, 0xe7, 0x99, 0x81, 0x67, 0xb0, 0x2a, 0x54, 0x81, 0x54, 0xce, 0x8a, 0x55, 0xba, 0x4b, 0x90, 0xac, 0xd2, 0xc7, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_4() { let input = ByteSeq::from_public_slice(&[0xa5, 0xd, 0xef, 0x75]); let expected = Digest::from_public_slice(&[ 0x62, 0x3f, 0xbf, 0x49, 0xe8, 0xd6, 0x10, 0xeb, 0x3a, 0xca, 0xbd, 0x43, 0x31, 0xc2, 0xf8, 0x2f, 0xd4, 0x36, 0x5d, 0x32, 0x60, 0x3b, 0x58, 0x4, 0x47, 0xcb, 0xcb, 0x59, 0x1c, 0xdd, 0x70, 0xa0, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_5() { let input = ByteSeq::from_public_slice(&[0x70, 0x36, 0x20, 0x72, 0x9f]); let expected = Digest::from_public_slice(&[ 0x9c, 0x14, 0x3b, 0x3e, 0xab, 0x4d, 0xb3, 0xf3, 0x76, 0x39, 0x6c, 0xcb, 0xc0, 0x43, 0x8c, 0x59, 0xaf, 0x4f, 0x6b, 0xea, 0xc4, 0x10, 0x87, 0x36, 0x1c, 0x3a, 0xde, 0x31, 0x93, 0x2, 0xb, 0xf9, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_6() { let input = ByteSeq::from_public_slice(&[0xbe, 0xef, 0xb9, 0x6d, 0x4, 0x49]); let expected = Digest::from_public_slice(&[ 0x75, 0xb8, 0xa7, 0xed, 0xc8, 0xff, 0x88, 0x42, 0x4f, 0x13, 0x2b, 0x15, 0xdb, 0x53, 0xc3, 0x56, 0x86, 0xbe, 0x2f, 0x2b, 0x52, 0x8d, 0x83, 0x94, 0xdf, 0x0, 0x3f, 0x22, 0xfb, 0xf0, 0x38, 0x35, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_7() { let input = ByteSeq::from_public_slice(&[0xc1, 0x1f, 0xd9, 0x8b, 0x19, 0x7a, 0xb2]); let expected = Digest::from_public_slice(&[ 0x6c, 0xa4, 0xc9, 0xcd, 0xd3, 0xa4, 0x23, 0x96, 0xc2, 0xa6, 0x25, 0x25, 0xb2, 0xe7, 0xb4, 0xe, 0x1c, 0xb, 0xfb, 0xa9, 0x84, 0x68, 0xae, 0x81, 0xa0, 0x2a, 0x7e, 0x4a, 0xfd, 0xe, 0x95, 0x5a, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_8() { let input = ByteSeq::from_public_slice(&[0x3f, 0x15, 0xf4, 0x2e, 0xaa, 0xc7, 0x61, 0x2d]); let expected = Digest::from_public_slice(&[ 0x5d, 0xd7, 0x3b, 0xa4, 0x2e, 0xa9, 0x38, 0x9d, 0xe5, 0x9c, 0xfd, 0x11, 0xdf, 0xd3, 0xf7, 0x58, 0x68, 0x78, 0xfa, 0x1e, 0x23, 0x52, 0xa3, 0xbc, 0xd4, 0xe4, 0xfa, 0x2a, 0x32, 0x80, 0x95, 0x2e, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_9() { let input = ByteSeq::from_public_slice(&[0xcf, 0xeb, 0x38, 0xf, 0x14, 0x99, 0x90, 0x8, 0x57]); let expected = Digest::from_public_slice(&[ 0x25, 0xe9, 0x67, 0x58, 0x8e, 0xdb, 0xae, 0x6a, 0x11, 0xd3, 0x10, 0x43, 0x9d, 0x4b, 0xa3, 0x9c, 0x75, 0x94, 0x63, 0x83, 0xdb, 0xb6, 0xbe, 0x51, 0xf5, 0x77, 0x1e, 0xff, 0xe5, 0x1e, 0x4c, 0xb9, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_10() { let input = ByteSeq::from_public_slice(&[0xac, 0xaf, 0x69, 0x0, 0xd2, 0xb6, 0x23, 0x51, 0x70, 0xe6]); let expected = Digest::from_public_slice(&[ 0x1a, 0x9f, 0x66, 0x6a, 0xa1, 0x28, 0x40, 0x86, 0xb1, 0x55, 0x2d, 0x3, 0x8b, 0xec, 0x3b, 0x5d, 0x81, 0x53, 0xe0, 0xed, 0x23, 0x60, 0x55, 0x8, 0x6, 0x24, 0x78, 0xb5, 0xb0, 0x97, 0xec, 0x88, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_11() { let input = ByteSeq::from_public_slice(&[ 0xd4, 0xab, 0xb0, 0xcf, 0x87, 0x95, 0x94, 0x8, 0x2b, 0x87, 0xb4, ]); let expected = Digest::from_public_slice(&[ 0x59, 0xb6, 0x8a, 0xfa, 0xab, 0x61, 0x7c, 0x29, 0x58, 0xa0, 0xd, 0x5f, 0x23, 0xed, 0x9b, 0x59, 0x7a, 0xe1, 0xdb, 0x86, 0xdf, 0xd3, 0x96, 0xeb, 0x26, 0xf1, 0xd9, 0x47, 0x49, 0xee, 0x75, 0xdf, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_12() { let input = ByteSeq::from_public_slice(&[ 0x40, 0x9a, 0xcb, 0x70, 0xfd, 0xf4, 0xf5, 0x6b, 0x71, 0x27, 0xc, 0x59, ]); let expected = Digest::from_public_slice(&[ 0x15, 0xf7, 0x6f, 0xce, 0x21, 0x9a, 0x28, 0x79, 0xb8, 0x8b, 0x31, 0x9, 0x94, 0xac, 0x69, 0xcb, 0x4f, 0xe6, 0x0, 0xcb, 0x27, 0x66, 0x9f, 0xb, 0xbb, 0xb1, 0x9d, 0xa4, 0x75, 0x35, 0xdc, 0xb9, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_13() { let input = ByteSeq::from_public_slice(&[ 0x31, 0x3, 0x24, 0xae, 0x27, 0xb5, 0x28, 0x65, 0x66, 0x57, 0x0, 0xe3, 0x53, ]); let expected = Digest::from_public_slice(&[ 0x2a, 0xad, 0xc9, 0xf9, 0x1c, 0x98, 0xd3, 0x45, 0x6c, 0x10, 0x47, 0x96, 0x6a, 0xac, 0x78, 0x91, 0x40, 0xe0, 0xd9, 0x73, 0x33, 0x88, 0x40, 0xa5, 0x7d, 0xe6, 0xcc, 0xee, 0x62, 0xec, 0x8a, 0x33, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_14() { let input = ByteSeq::from_public_slice(&[ 0x86, 0x96, 0xe, 0x47, 0x8a, 0x18, 0xa4, 0x10, 0xb5, 0xf8, 0x56, 0xe1, 0x40, 0x5d, ]); let expected = Digest::from_public_slice(&[ 0x1a, 0x70, 0x29, 0x8e, 0x76, 0xc0, 0xeb, 0x18, 0xf, 0xc3, 0x8d, 0x38, 0x19, 0x19, 0x68, 0x98, 0x47, 0xe1, 0x20, 0x96, 0x29, 0x36, 0x35, 0x50, 0xc3, 0x4e, 0xae, 0x91, 0xe0, 0x33, 0x41, 0x1d, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_15() { let input = ByteSeq::from_public_slice(&[ 0xf6, 0x38, 0x7e, 0x63, 0xfd, 0x59, 0xc3, 0x75, 0x2d, 0x1a, 0x8a, 0x77, 0xca, 0xb7, 0xc7, ]); let expected = Digest::from_public_slice(&[ 0xa9, 0xac, 0x6d, 0x63, 0x63, 0xf6, 0x9c, 0x8e, 0x7a, 0x36, 0xc7, 0x7c, 0x74, 0xc4, 0xf, 0x7, 0x89, 0x4a, 0xd8, 0xe3, 0x7b, 0x15, 0x61, 0x5b, 0x8a, 0xd, 0xdd, 0xf3, 0xf7, 0xac, 0xc8, 0x5a, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_16() { let input = ByteSeq::from_public_slice(&[ 0xa1, 0x0, 0x7d, 0xcb, 0x58, 0xbb, 0x9f, 0x92, 0xd5, 0x91, 0x30, 0x66, 0xba, 0xcd, 0x2d, 0x4a, ]); let expected = Digest::from_public_slice(&[ 0x19, 0x96, 0xd3, 0xb0, 0x79, 0xa2, 0xc5, 0xad, 0x3a, 0x2b, 0xab, 0x7b, 0xab, 0x4a, 0x3a, 0x23, 0x48, 0x14, 0xaf, 0xa6, 0xa2, 0x18, 0xe5, 0xe3, 0x15, 0xfb, 0x17, 0x66, 0x64, 0x46, 0xf4, 0xdc, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_17() { let input = ByteSeq::from_public_slice(&[ 0x96, 0x23, 0xb5, 0xe9, 0x12, 0x88, 0x89, 0x75, 0x47, 0xae, 0xe0, 0xe1, 0xda, 0x3a, 0xa1, 0xc5, 0x89, ]); let expected = Digest::from_public_slice(&[ 0x97, 0x22, 0x36, 0xc4, 0x80, 0x40, 0x2c, 0x54, 0xf4, 0x48, 0x9c, 0xe1, 0xd, 0xc1, 0x10, 0xe7, 0x78, 0x54, 0x61, 0x13, 0x36, 0x6b, 0x62, 0xf6, 0x8d, 0x26, 0xa3, 0x92, 0x42, 0x58, 0x94, 0xde, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_18() { let input = ByteSeq::from_public_slice(&[ 0xf3, 0xd2, 0xf8, 0x28, 0xff, 0xd4, 0x83, 0xec, 0xfa, 0x2, 0x48, 0xe2, 0x6a, 0x2d, 0x8f, 0xf8, 0xd7, 0x2a, ]); let expected = Digest::from_public_slice(&[ 0x75, 0x70, 0x58, 0x8f, 0x10, 0x68, 0x2c, 0xa5, 0x20, 0xc0, 0x82, 0xcd, 0xea, 0x45, 0xe7, 0x17, 0xd9, 0x45, 0xef, 0x4c, 0x2d, 0x4c, 0x39, 0xf2, 0x2, 0x8e, 0x11, 0xbe, 0x37, 0x3c, 0x28, 0xfd, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_19() { let input = ByteSeq::from_public_slice(&[ 0x30, 0xb3, 0x96, 0x99, 0x37, 0xbf, 0xf4, 0xd2, 0x52, 0x57, 0x71, 0xe7, 0x76, 0x72, 0xf7, 0x58, 0xb5, 0x58, 0x25, ]); let expected = Digest::from_public_slice(&[ 0x51, 0xfc, 0xcd, 0x6c, 0x47, 0x69, 0xde, 0xc5, 0x4, 0xea, 0x7b, 0x1b, 0xb, 0xb9, 0x47, 0x39, 0xd2, 0xc9, 0xef, 0xd9, 0x4c, 0x45, 0xd3, 0xba, 0x4a, 0xb4, 0x1b, 0x30, 0xd2, 0xbd, 0x4d, 0x8c, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_20() { let input = ByteSeq::from_public_slice(&[ 0x11, 0x14, 0x42, 0x1e, 0x74, 0x2a, 0xe9, 0x9d, 0x67, 0x4f, 0xbd, 0x75, 0x6f, 0x92, 0xdc, 0x25, 0x72, 0x65, 0x4a, 0x36, ]); let expected = Digest::from_public_slice(&[ 0xf0, 0xeb, 0x7a, 0xa8, 0x89, 0x78, 0x15, 0x25, 0x47, 0x76, 0x6f, 0xa4, 0x4f, 0x2a, 0x22, 0x94, 0x24, 0x64, 0xf7, 0x44, 0x83, 0x25, 0xbe, 0xb4, 0x9a, 0xa6, 0xb, 0x6d, 0x62, 0xb3, 0xc5, 0xca, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_21() { let input = ByteSeq::from_public_slice(&[ 0x14, 0x83, 0x2f, 0xf7, 0x18, 0x70, 0x94, 0xd4, 0xf9, 0xe5, 0x55, 0xa4, 0x37, 0x36, 0xd6, 0x43, 0xa, 0x33, 0xc, 0x35, 0x3b, ]); let expected = Digest::from_public_slice(&[ 0xdf, 0x41, 0xc8, 0x92, 0x27, 0xd5, 0x79, 0xd7, 0x0, 0x75, 0x55, 0x38, 0x16, 0xfe, 0xfd, 0x23, 0x50, 0xdb, 0x37, 0x1b, 0x4b, 0xc4, 0xce, 0x60, 0x26, 0xe6, 0x19, 0xd1, 0xb6, 0x73, 0xca, 0x43, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_22() { let input = ByteSeq::from_public_slice(&[ 0xeb, 0x52, 0x65, 0xf4, 0xce, 0xa8, 0xb9, 0x31, 0xe1, 0xc2, 0xcc, 0xbb, 0xbe, 0x9a, 0x3e, 0xf1, 0xa1, 0xe9, 0xda, 0x82, 0x19, 0x3a, ]); let expected = Digest::from_public_slice(&[ 0xd1, 0x79, 0x31, 0xf0, 0x20, 0xab, 0x2d, 0x6d, 0xca, 0x99, 0x95, 0x21, 0x98, 0xcf, 0x3b, 0xc9, 0x20, 0x99, 0x74, 0xc3, 0x66, 0x3, 0x52, 0xd9, 0x24, 0x24, 0x64, 0x57, 0xd6, 0x24, 0xe3, 0xae, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_23() { let input = ByteSeq::from_public_slice(&[ 0xc6, 0x78, 0x2c, 0xdb, 0xf3, 0x62, 0x96, 0x9e, 0x61, 0x4f, 0x8c, 0x81, 0x4b, 0x25, 0x95, 0x6a, 0x4, 0x12, 0xea, 0xc8, 0x1c, 0xca, 0x2d, ]); let expected = Digest::from_public_slice(&[ 0x68, 0xcf, 0x4e, 0x7f, 0x7, 0x4, 0x1f, 0xd4, 0xf4, 0x84, 0x25, 0x62, 0x84, 0x31, 0xce, 0x44, 0xa4, 0xd, 0xf6, 0x26, 0xe7, 0x2b, 0xd4, 0x33, 0x94, 0xed, 0xcf, 0x7, 0x88, 0xdd, 0xa2, 0x12, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_24() { let input = ByteSeq::from_public_slice(&[ 0x15, 0x98, 0x6d, 0xaa, 0xc0, 0xb1, 0x23, 0xa, 0x5f, 0x1b, 0x70, 0xdf, 0x10, 0x6a, 0x22, 0x6e, 0xc5, 0x9, 0xcf, 0xf, 0xd8, 0x19, 0x92, 0x59, ]); let expected = Digest::from_public_slice(&[ 0x12, 0xb6, 0x89, 0x75, 0xf8, 0x8a, 0xba, 0xb3, 0x25, 0xe, 0x27, 0xa7, 0x6e, 0x77, 0xa3, 0x5e, 0x88, 0x9b, 0xc1, 0x9e, 0xfe, 0x3, 0x5d, 0xd0, 0x1b, 0x10, 0xb7, 0xd0, 0x33, 0x32, 0x18, 0xe4, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_25() { let input = ByteSeq::from_public_slice(&[ 0x71, 0x57, 0x7f, 0xa6, 0x18, 0x14, 0xdf, 0xdc, 0x25, 0x9d, 0xb8, 0x69, 0xc8, 0xc, 0xba, 0x15, 0xbe, 0xd2, 0xfe, 0xbb, 0xdf, 0xf4, 0xb4, 0x42, 0x58, ]); let expected = Digest::from_public_slice(&[ 0xea, 0xf3, 0x7f, 0xb3, 0x3a, 0x69, 0x56, 0x75, 0x81, 0x14, 0x96, 0x29, 0xb3, 0x6, 0xe5, 0x2, 0xba, 0x43, 0xec, 0xa4, 0xb1, 0xd6, 0x8b, 0xf1, 0x6d, 0x78, 0x9, 0x25, 0x75, 0x4c, 0x4d, 0x59, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_26() { let input = ByteSeq::from_public_slice(&[ 0x52, 0xa1, 0x76, 0x73, 0x9d, 0x43, 0x3f, 0xb1, 0xcc, 0xea, 0xfe, 0x4f, 0xc7, 0x6c, 0x54, 0x75, 0xc9, 0x1c, 0x26, 0xb0, 0x3b, 0x96, 0xb5, 0x2a, 0x97, 0xc4, ]); let expected = Digest::from_public_slice(&[ 0xad, 0x7e, 0xf0, 0xcf, 0x7, 0x6c, 0x36, 0x93, 0x77, 0x2a, 0x1e, 0xe4, 0xa9, 0xfc, 0xed, 0xca, 0xca, 0x3a, 0xb6, 0x92, 0x1a, 0x75, 0x48, 0x7e, 0x4e, 0xb6, 0x18, 0xce, 0xaf, 0xd9, 0x15, 0xd7, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_27() { let input = ByteSeq::from_public_slice(&[ 0x3c, 0x6c, 0x5, 0x15, 0xd6, 0x3b, 0x38, 0x56, 0x60, 0x32, 0x41, 0x4b, 0x33, 0xd, 0x89, 0x4, 0x5f, 0x57, 0xaa, 0xb1, 0xd8, 0x6, 0xc8, 0xb5, 0x7f, 0xac, 0x97, ]); let expected = Digest::from_public_slice(&[ 0x2f, 0xc4, 0x52, 0x96, 0x61, 0xc9, 0x2, 0xf3, 0xc2, 0x26, 0xbc, 0x3f, 0x9b, 0xce, 0x25, 0xcd, 0x8b, 0x7c, 0xf9, 0x30, 0xe1, 0xcd, 0x57, 0x7c, 0xa0, 0x5f, 0x6, 0x3b, 0x14, 0x9d, 0xfd, 0x44, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_28() { let input = ByteSeq::from_public_slice(&[ 0xfc, 0xbb, 0xa0, 0xa4, 0x63, 0x36, 0xc5, 0xc, 0xe5, 0xf0, 0xb9, 0x35, 0x76, 0xdd, 0xed, 0x30, 0x60, 0xdb, 0x79, 0x84, 0x3d, 0x53, 0xd1, 0x7c, 0xe, 0x61, 0x5c, 0xab, ]); let expected = Digest::from_public_slice(&[ 0x93, 0x12, 0x8f, 0x94, 0x78, 0xec, 0xae, 0xd3, 0xa7, 0xbf, 0x53, 0x8a, 0x7d, 0x2a, 0x2b, 0xfc, 0xb3, 0x2f, 0xfc, 0x66, 0x1c, 0x6d, 0xcd, 0x95, 0xa6, 0xfe, 0x64, 0xb3, 0x3b, 0x53, 0x6e, 0xe2, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_29() { let input = ByteSeq::from_public_slice(&[ 0x25, 0x8c, 0xf8, 0x6f, 0x91, 0x99, 0x16, 0x9d, 0x51, 0xcd, 0x19, 0xe4, 0x2e, 0xe, 0x98, 0x51, 0x90, 0xc2, 0x15, 0x8c, 0xc1, 0x58, 0x31, 0x32, 0x22, 0xd6, 0x99, 0x4e, 0x40, ]); let expected = Digest::from_public_slice(&[ 0x7e, 0x2f, 0x93, 0x3e, 0xea, 0x97, 0xa, 0xc4, 0x89, 0x9b, 0x36, 0xc3, 0x8e, 0x7b, 0x3b, 0x53, 0xce, 0xd7, 0x87, 0x6c, 0x84, 0xa2, 0xeb, 0x25, 0xe6, 0x2, 0x2f, 0x4c, 0xf5, 0xbb, 0xde, 0x10, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_30() { let input = ByteSeq::from_public_slice(&[ 0x31, 0x0, 0x9d, 0x41, 0xaf, 0xda, 0xf5, 0xdc, 0xec, 0xd5, 0xf9, 0x73, 0x20, 0x32, 0xe, 0x97, 0xb2, 0xca, 0xf5, 0x60, 0x6e, 0xc8, 0x63, 0x3f, 0x4b, 0xa2, 0x47, 0x78, 0x3, 0x91, ]); let expected = Digest::from_public_slice(&[ 0x39, 0xa0, 0x1f, 0x5f, 0xec, 0x73, 0xce, 0xad, 0x7b, 0xc8, 0x4c, 0x5, 0xc3, 0x81, 0xdb, 0xf0, 0xdd, 0xac, 0xb, 0x8e, 0x3c, 0xc6, 0x31, 0xc6, 0xf7, 0x7a, 0x46, 0x79, 0xe7, 0x60, 0x15, 0x90, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_31() { let input = ByteSeq::from_public_slice(&[ 0x79, 0xe, 0xb7, 0x7e, 0x3e, 0xaa, 0x6f, 0x39, 0x68, 0x54, 0x2c, 0x56, 0xb7, 0xfd, 0xba, 0x9f, 0xba, 0xa9, 0xb9, 0xd7, 0x9, 0x1c, 0x84, 0x18, 0x62, 0xe5, 0xd5, 0x29, 0x80, 0xf4, 0xbc, ]); let expected = Digest::from_public_slice(&[ 0x5e, 0xf8, 0x2b, 0x37, 0x76, 0xd4, 0xe7, 0xae, 0x88, 0x60, 0x39, 0xba, 0x51, 0xfb, 0x1c, 0x77, 0x7, 0x4e, 0x11, 0x47, 0x73, 0x31, 0x0, 0xef, 0xda, 0x2f, 0x7b, 0x38, 0x4, 0x9, 0xda, 0xf8, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_32() { let input = ByteSeq::from_public_slice(&[ 0x26, 0x65, 0xb0, 0xca, 0x30, 0x3f, 0xf6, 0xc2, 0x88, 0xfe, 0x1d, 0xff, 0x3d, 0x40, 0x34, 0x41, 0x3d, 0x46, 0xd7, 0xf6, 0xf0, 0x46, 0x23, 0xde, 0x24, 0x70, 0x7d, 0xcb, 0xd7, 0x38, 0xe3, 0x48, ]); let expected = Digest::from_public_slice(&[ 0xb2, 0x46, 0x3c, 0x23, 0x7d, 0xd3, 0xcf, 0x4, 0x46, 0x56, 0xcf, 0xd3, 0x88, 0x54, 0xc0, 0x2a, 0x6d, 0xc9, 0xf9, 0x83, 0x50, 0xde, 0x44, 0xec, 0xdd, 0x0, 0x2b, 0xff, 0x70, 0xeb, 0x95, 0xe8, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_33() { let input = ByteSeq::from_public_slice(&[ 0x61, 0x98, 0xbb, 0x9e, 0xf5, 0xce, 0x86, 0x69, 0x3b, 0x74, 0xac, 0x55, 0xc1, 0x30, 0x21, 0xb9, 0x30, 0xa0, 0x55, 0x9b, 0x54, 0xff, 0xe5, 0xd2, 0x5e, 0xb5, 0x2b, 0x68, 0x9e, 0xf4, 0x4, 0x77, 0xcc, ]); let expected = Digest::from_public_slice(&[ 0x93, 0xd0, 0xc9, 0x18, 0xf8, 0xea, 0x66, 0x10, 0x7f, 0x55, 0x15, 0x7e, 0xb0, 0x24, 0x7c, 0x7e, 0x23, 0x6c, 0xcf, 0x1, 0xfe, 0xb5, 0x84, 0xa8, 0xd0, 0xa3, 0x2e, 0x57, 0xfb, 0x79, 0xea, 0x8f, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_34() { let input = ByteSeq::from_public_slice(&[ 0xf2, 0xef, 0x64, 0x6a, 0xc6, 0x7c, 0x7a, 0xa5, 0x68, 0x19, 0xc8, 0x0, 0xbd, 0xc5, 0x40, 0x60, 0x4f, 0x7c, 0xc5, 0x5c, 0x75, 0xcc, 0xc4, 0x2, 0xba, 0x9a, 0x67, 0x30, 0x4, 0x61, 0xd, 0xf4, 0x1e, 0x96, ]); let expected = Digest::from_public_slice(&[ 0xc1, 0x25, 0xc9, 0x26, 0x69, 0x9, 0xe2, 0xfe, 0x2d, 0xfb, 0xf6, 0x1c, 0xf5, 0xbf, 0x69, 0xb5, 0xa6, 0x58, 0x96, 0x1d, 0x3d, 0x79, 0x8, 0x48, 0x1d, 0x17, 0x6a, 0xb4, 0x41, 0xc6, 0x15, 0xc5, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_35() { let input = ByteSeq::from_public_slice(&[ 0x9a, 0xc, 0x61, 0x1d, 0xde, 0x55, 0x7f, 0xa, 0x12, 0x8f, 0x12, 0x4e, 0x36, 0x6c, 0xb3, 0xb7, 0x13, 0xd8, 0x85, 0x63, 0xe5, 0x98, 0xf1, 0xd2, 0xe9, 0xb2, 0xbc, 0xfe, 0x31, 0x9, 0x27, 0x24, 0x6c, 0xa, 0xbe, ]); let expected = Digest::from_public_slice(&[ 0xcc, 0xcd, 0xc9, 0x11, 0x76, 0xf7, 0xf3, 0x1c, 0x1d, 0xe6, 0xb0, 0x66, 0xb4, 0xff, 0x30, 0xe8, 0x3, 0xce, 0xfa, 0xca, 0x3c, 0x86, 0x70, 0x2c, 0x3d, 0xdd, 0xae, 0xd9, 0xff, 0x39, 0x75, 0xb7, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_36() { let input = ByteSeq::from_public_slice(&[ 0x3c, 0x58, 0x76, 0xa1, 0x68, 0xcd, 0xde, 0x81, 0x2f, 0x5f, 0x8c, 0x33, 0xdc, 0x36, 0x46, 0xd, 0xe1, 0x50, 0xa, 0xd3, 0x53, 0xba, 0xaa, 0x2f, 0x26, 0xcd, 0xc, 0x30, 0xd8, 0xdc, 0xd1, 0x75, 0xe, 0x8f, 0xf7, 0x9a, ]); let expected = Digest::from_public_slice(&[ 0x96, 0x6d, 0xe7, 0xba, 0x9d, 0x82, 0x7c, 0xdd, 0x36, 0xfe, 0x21, 0x91, 0x12, 0xb9, 0x68, 0x37, 0xbd, 0x6e, 0x15, 0x42, 0xf, 0x30, 0x1b, 0x90, 0xad, 0xde, 0xe6, 0x7d, 0x83, 0xe3, 0x6f, 0xf6, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_37() { let input = ByteSeq::from_public_slice(&[ 0xf7, 0x45, 0xad, 0xc5, 0x92, 0x5f, 0xd0, 0x85, 0xed, 0x4b, 0x35, 0x47, 0xea, 0x9f, 0xea, 0xbc, 0xb4, 0xa6, 0x1a, 0xb2, 0xc8, 0x3a, 0xf3, 0x56, 0xbe, 0x97, 0xfa, 0x2a, 0xb, 0x3a, 0xe5, 0xe0, 0xe4, 0x54, 0x36, 0x93, 0x1c, ]); let expected = Digest::from_public_slice(&[ 0x45, 0x20, 0xef, 0x62, 0xa5, 0x0, 0x3d, 0xfb, 0x81, 0x2d, 0xa7, 0xea, 0xaf, 0xd4, 0xa5, 0x3d, 0x43, 0x28, 0x9d, 0x43, 0x53, 0x1, 0xaa, 0x3c, 0x17, 0xa2, 0x71, 0x33, 0x22, 0xf1, 0x9b, 0xda, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_38() { let input = ByteSeq::from_public_slice(&[ 0x10, 0xcb, 0x48, 0x9a, 0xf5, 0x7a, 0xbd, 0x8a, 0x93, 0xae, 0xac, 0x87, 0xae, 0xab, 0x1b, 0xd3, 0x86, 0x52, 0xcf, 0x6e, 0x14, 0xdf, 0xe, 0x20, 0x80, 0x21, 0xa0, 0x9e, 0xab, 0x83, 0xdd, 0x1e, 0x4f, 0x6b, 0x1c, 0x51, 0x53, 0x67, ]); let expected = Digest::from_public_slice(&[ 0x49, 0x4a, 0x5, 0xf4, 0x18, 0xa, 0x4f, 0x4f, 0xec, 0x59, 0x76, 0xe6, 0x8d, 0xf6, 0x0, 0xb1, 0x90, 0xdf, 0x9a, 0x68, 0x44, 0x71, 0x2f, 0xc7, 0xea, 0x60, 0x7c, 0xd0, 0x1b, 0x71, 0x17, 0x7a, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_39() { let input = ByteSeq::from_public_slice(&[ 0x39, 0xeb, 0xf, 0x42, 0xe2, 0xd4, 0xd7, 0x21, 0xe4, 0xa9, 0x6e, 0xad, 0xde, 0xcc, 0x30, 0x46, 0xc2, 0x98, 0xd, 0xb5, 0x25, 0xf3, 0x25, 0xb2, 0xa8, 0x7e, 0xc, 0x0, 0xf9, 0x4c, 0x2d, 0x81, 0x25, 0x38, 0x2a, 0xe2, 0xc6, 0xd7, 0x4b, ]); let expected = Digest::from_public_slice(&[ 0x63, 0xc4, 0x37, 0xac, 0x6b, 0x3d, 0xe7, 0xbb, 0x89, 0x63, 0x5d, 0xa, 0x29, 0x41, 0xf2, 0x9a, 0xa3, 0x45, 0x88, 0x33, 0x28, 0xc3, 0x5a, 0x44, 0xaa, 0xf5, 0x2c, 0xa9, 0x35, 0x55, 0x46, 0x17, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_40() { let input = ByteSeq::from_public_slice(&[ 0xfd, 0x21, 0xfb, 0x54, 0xda, 0x60, 0xa9, 0x67, 0xd, 0xef, 0x6b, 0x8d, 0xce, 0x7a, 0x91, 0x83, 0x5c, 0xbc, 0x66, 0x80, 0x7, 0xa2, 0x5e, 0xdf, 0x74, 0xc0, 0xc1, 0x32, 0xfc, 0x38, 0x71, 0xb7, 0xe4, 0x62, 0xb1, 0x35, 0x3a, 0x78, 0xdd, 0xc8, ]); let expected = Digest::from_public_slice(&[ 0xc7, 0xcc, 0x10, 0x8b, 0xf9, 0x4f, 0xff, 0x87, 0x6, 0xc, 0x3, 0x4d, 0xaf, 0xe, 0x4d, 0xc2, 0xdd, 0x95, 0x6c, 0xc0, 0x8a, 0x49, 0xb9, 0x65, 0x4d, 0xc1, 0xb2, 0xbf, 0x29, 0x1, 0x82, 0x4b, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_41() { let input = ByteSeq::from_public_slice(&[ 0x38, 0x41, 0xc9, 0xb, 0x42, 0xfb, 0x1, 0xa7, 0x60, 0xbd, 0x6, 0xc7, 0xe1, 0xfb, 0x76, 0x42, 0x84, 0x21, 0x9c, 0xf2, 0xff, 0xba, 0x4d, 0x0, 0xc2, 0x55, 0xb0, 0x38, 0x66, 0xf7, 0x60, 0xc2, 0xdc, 0x7a, 0x49, 0x8f, 0xc0, 0xbc, 0x28, 0x24, 0x64, ]); let expected = Digest::from_public_slice(&[ 0xbf, 0x60, 0xec, 0x46, 0xe7, 0x2d, 0x7, 0x27, 0x6, 0xfd, 0xc6, 0x35, 0x52, 0x38, 0xf6, 0x86, 0x23, 0x82, 0x27, 0xff, 0x75, 0x5, 0x8b, 0xb5, 0x67, 0x3b, 0x81, 0x2a, 0xc, 0xf, 0x9e, 0x1, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_42() { let input = ByteSeq::from_public_slice(&[ 0x32, 0xea, 0xfa, 0x5d, 0x57, 0xfb, 0x1f, 0x86, 0xd, 0x66, 0x12, 0xe3, 0xaf, 0xe8, 0xc, 0x53, 0x6c, 0xa, 0xf0, 0x17, 0x53, 0x9f, 0x5, 0xd9, 0x8, 0xfb, 0x4f, 0x32, 0x5e, 0xa0, 0x27, 0xe8, 0xde, 0x67, 0x27, 0x2a, 0xc9, 0x47, 0xba, 0x58, 0x21, 0x52, ]); let expected = Digest::from_public_slice(&[ 0x32, 0xfc, 0xbd, 0x50, 0xeb, 0x93, 0x58, 0x65, 0x2e, 0xc3, 0x8d, 0xb4, 0xb0, 0x99, 0x55, 0x50, 0xe1, 0x46, 0xef, 0x16, 0xc7, 0x68, 0x61, 0x22, 0xb3, 0x56, 0xd2, 0xde, 0x7c, 0x6, 0xe9, 0x48, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_43() { let input = ByteSeq::from_public_slice(&[ 0x8, 0x5d, 0x50, 0x4b, 0x2c, 0x16, 0xa3, 0x33, 0xfe, 0x73, 0x77, 0xf7, 0x10, 0x50, 0xa1, 0x5e, 0x90, 0x0, 0x75, 0x56, 0x18, 0x8e, 0x6, 0xdf, 0xdd, 0xce, 0x9d, 0x12, 0xad, 0x51, 0x75, 0x72, 0xf6, 0x98, 0xd8, 0xd9, 0x87, 0xec, 0x73, 0x52, 0xcc, 0xe0, 0x42, ]); let expected = Digest::from_public_slice(&[ 0x95, 0xd5, 0x93, 0x37, 0x23, 0xa9, 0xf6, 0x81, 0x2b, 0x31, 0xee, 0xf, 0x8d, 0x97, 0x80, 0x8f, 0x4a, 0x54, 0x94, 0x2b, 0x33, 0x36, 0x60, 0xa2, 0xb1, 0x10, 0x94, 0x43, 0x15, 0xf7, 0x28, 0xcb, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_44() { let input = ByteSeq::from_public_slice(&[ 0xd9, 0x8e, 0xda, 0x1, 0xb8, 0xa3, 0x2d, 0xcb, 0x2b, 0xfb, 0xc9, 0xfd, 0x72, 0xbd, 0xf4, 0xe0, 0xee, 0x48, 0xaf, 0x62, 0xdd, 0x51, 0x59, 0x76, 0x12, 0xc, 0xe6, 0x84, 0x74, 0xa, 0x4f, 0x1a, 0xdd, 0x84, 0xf, 0xb5, 0xdc, 0x8c, 0x58, 0x51, 0x14, 0x48, 0xbd, 0xe0, ]); let expected = Digest::from_public_slice(&[ 0xc0, 0x6c, 0x10, 0x26, 0x21, 0x73, 0xcd, 0x63, 0x8, 0x88, 0xaf, 0x88, 0x5e, 0xd2, 0xae, 0x60, 0xb4, 0x59, 0x3e, 0x13, 0x49, 0xfa, 0x1a, 0x7c, 0x17, 0x6c, 0xaa, 0x22, 0x4b, 0xbc, 0xa5, 0xf2, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_45() { let input = ByteSeq::from_public_slice(&[ 0x25, 0xe, 0xe4, 0x97, 0x50, 0x9f, 0x69, 0x45, 0x29, 0xbd, 0x28, 0xa8, 0x39, 0xc2, 0x55, 0x8c, 0xde, 0x9f, 0xea, 0x8, 0x3f, 0x62, 0x29, 0x30, 0x3a, 0x43, 0xe9, 0x6d, 0x41, 0x42, 0x3f, 0xe2, 0x73, 0x23, 0xac, 0x2c, 0xfd, 0xae, 0x47, 0x2c, 0xae, 0x7a, 0xb1, 0xc3, 0xea, ]); let expected = Digest::from_public_slice(&[ 0xf3, 0xcf, 0x2b, 0x35, 0xb2, 0xe3, 0x96, 0x67, 0x70, 0xd9, 0x7a, 0xfb, 0xaf, 0xdf, 0xed, 0xaf, 0xa2, 0xc1, 0xf3, 0x2c, 0x8, 0xc5, 0xba, 0x64, 0x15, 0x1f, 0xbc, 0x9d, 0x64, 0xd8, 0xd4, 0xd9, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_46() { let input = ByteSeq::from_public_slice(&[ 0x20, 0x82, 0xdd, 0x8b, 0xae, 0x73, 0xa4, 0xd1, 0x17, 0xdc, 0xd4, 0x5a, 0xc5, 0x3e, 0x2, 0x35, 0x57, 0x3, 0x5e, 0x78, 0x20, 0xd4, 0x37, 0x3c, 0x0, 0xaa, 0x3b, 0xe2, 0xd2, 0xcd, 0xe0, 0x83, 0xf3, 0xf2, 0x2d, 0x69, 0xa5, 0x1f, 0xf2, 0xa3, 0x3e, 0x3d, 0xd1, 0xf8, 0xdd, 0xf8, ]); let expected = Digest::from_public_slice(&[ 0xcd, 0x82, 0x35, 0xbb, 0xe8, 0xda, 0xe4, 0x36, 0xbe, 0x2, 0x23, 0xa8, 0x3f, 0xf7, 0x44, 0x63, 0xb8, 0xd1, 0x3b, 0x5, 0x93, 0x56, 0x9a, 0x98, 0xeb, 0xea, 0xdb, 0x29, 0xa4, 0x6d, 0x3b, 0xd0, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_47() { let input = ByteSeq::from_public_slice(&[ 0xb, 0x58, 0x4c, 0x5c, 0x68, 0xd9, 0x14, 0x7, 0xa5, 0x14, 0x82, 0x54, 0x6b, 0x32, 0x9f, 0xe6, 0x17, 0xab, 0x83, 0x7c, 0xbf, 0x83, 0xd4, 0x9a, 0x80, 0x9e, 0xa5, 0x98, 0xfa, 0xc9, 0x42, 0x3c, 0x3a, 0x6c, 0xbd, 0x17, 0x8e, 0x79, 0xd0, 0x77, 0xac, 0xfd, 0xf9, 0x1c, 0x98, 0x69, 0x3d, ]); let expected = Digest::from_public_slice(&[ 0x33, 0xc7, 0x94, 0x58, 0x3e, 0xfb, 0xaa, 0x8e, 0xd3, 0x90, 0xbb, 0xe1, 0x3d, 0xd1, 0x7, 0xd7, 0x8, 0x1d, 0x8c, 0x50, 0x29, 0xc3, 0xc3, 0x73, 0xeb, 0xc6, 0xb2, 0xf3, 0xc, 0x57, 0x69, 0x88, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_48() { let input = ByteSeq::from_public_slice(&[ 0x4d, 0x9e, 0x58, 0x81, 0x2a, 0xcc, 0x5e, 0xe4, 0x85, 0x8c, 0x20, 0xcf, 0x90, 0x4e, 0x8e, 0xc1, 0xb5, 0x8, 0xbe, 0x4a, 0x7e, 0x8d, 0xff, 0x58, 0x35, 0x76, 0x87, 0x58, 0x34, 0x35, 0xcb, 0x78, 0xc, 0x55, 0x91, 0xae, 0xaf, 0xb6, 0x8e, 0xbe, 0x9b, 0xe4, 0x26, 0x6d, 0x18, 0xe1, 0xe4, 0x39, ]); let expected = Digest::from_public_slice(&[ 0xcb, 0x13, 0xb4, 0x92, 0x53, 0x7d, 0x13, 0xce, 0xdc, 0x38, 0x11, 0x90, 0xd5, 0x31, 0x3a, 0xcf, 0xce, 0x0, 0xd7, 0x59, 0x48, 0xc2, 0x80, 0x39, 0xb2, 0x9, 0xf0, 0x63, 0xd9, 0x2a, 0x79, 0x16, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_49() { let input = ByteSeq::from_public_slice(&[ 0xdf, 0x49, 0x94, 0xa2, 0xc4, 0xe2, 0x43, 0xf8, 0x93, 0x17, 0x9a, 0xe7, 0xd3, 0x49, 0x15, 0x86, 0x71, 0x45, 0x40, 0xd9, 0xed, 0xa1, 0x42, 0x4c, 0xb9, 0x1a, 0x57, 0x95, 0x3, 0xf2, 0xe5, 0xcf, 0xe2, 0xc8, 0x46, 0x4f, 0x68, 0x0, 0x4f, 0xb9, 0x6f, 0xfb, 0x76, 0xfc, 0x26, 0x45, 0x5f, 0x83, 0xb1, ]); let expected = Digest::from_public_slice(&[ 0xb6, 0x8e, 0xa7, 0xc8, 0x1d, 0xe8, 0x71, 0x91, 0xc9, 0x2c, 0xc4, 0xe8, 0x9c, 0xe6, 0x9f, 0xd0, 0x47, 0xb1, 0x31, 0x34, 0x2b, 0xe4, 0x25, 0x6a, 0x5d, 0x8c, 0xca, 0x22, 0xcf, 0x7b, 0xa1, 0xde, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_50() { let input = ByteSeq::from_public_slice(&[ 0x84, 0x33, 0xe3, 0xf4, 0x85, 0x3b, 0x85, 0xf7, 0x85, 0xa9, 0x4e, 0x7f, 0x40, 0x13, 0xe7, 0x4c, 0xde, 0xcd, 0xff, 0x74, 0xc2, 0xe2, 0x82, 0x1a, 0x76, 0x3c, 0x0, 0x87, 0x7c, 0xee, 0x44, 0xd1, 0x8f, 0x3e, 0xb4, 0xf, 0x3f, 0xad, 0xd, 0xc3, 0xf4, 0xe8, 0xb5, 0xdf, 0xc4, 0xc9, 0x29, 0xca, 0x92, 0x4b, ]); let expected = Digest::from_public_slice(&[ 0x87, 0xa3, 0x9a, 0xf, 0x28, 0xee, 0x20, 0xaa, 0x5d, 0x35, 0xc6, 0xf5, 0x60, 0x71, 0x83, 0x50, 0xbe, 0x24, 0xbf, 0x9d, 0xd6, 0xc7, 0x65, 0x70, 0xfa, 0xcc, 0x8, 0x5a, 0x42, 0xd2, 0xb2, 0x3c, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_51() { let input = ByteSeq::from_public_slice(&[ 0x7d, 0x5d, 0x42, 0x62, 0x68, 0x49, 0xc, 0x42, 0x85, 0x77, 0x5b, 0xaa, 0xd7, 0x2, 0xaa, 0x38, 0xc1, 0x4e, 0x40, 0x5e, 0x48, 0xe5, 0xd6, 0x30, 0x1b, 0xf9, 0xac, 0x2b, 0x2b, 0x4, 0x55, 0x5, 0x5, 0xd3, 0x95, 0x9d, 0xbc, 0x60, 0x42, 0xa5, 0xa4, 0xc9, 0x9a, 0xd0, 0xaf, 0xf4, 0x2, 0x48, 0x3f, 0x25, 0x2, ]); let expected = Digest::from_public_slice(&[ 0x80, 0x66, 0xb8, 0x3f, 0xa9, 0x45, 0x6d, 0x4b, 0xa1, 0x5a, 0xb1, 0x13, 0x9e, 0x19, 0x5a, 0xc4, 0x90, 0x8e, 0xaa, 0x43, 0x36, 0xec, 0xf8, 0x64, 0x89, 0xa, 0xf6, 0xd7, 0xd8, 0x71, 0x15, 0x31, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_52() { let input = ByteSeq::from_public_slice(&[ 0xe3, 0xc8, 0x31, 0x27, 0x9d, 0x1, 0xc0, 0xd5, 0xb2, 0xb5, 0xcc, 0xf9, 0xe9, 0x7c, 0x18, 0x76, 0x5, 0xe8, 0x92, 0xe4, 0x88, 0x7f, 0xf1, 0x79, 0x9b, 0xac, 0x12, 0x2b, 0x23, 0x96, 0x88, 0x2f, 0x8, 0xdd, 0xd8, 0xff, 0xf6, 0x5a, 0x0, 0x79, 0x2b, 0xf2, 0xba, 0x3f, 0x11, 0x8a, 0xd, 0x95, 0x69, 0x1b, 0x0, 0x27, ]); let expected = Digest::from_public_slice(&[ 0x96, 0x71, 0xe3, 0x62, 0x23, 0x40, 0xe8, 0x39, 0xf, 0x82, 0xef, 0x98, 0x6f, 0x8b, 0x50, 0x7d, 0x12, 0x4f, 0x55, 0x78, 0x34, 0xec, 0x3d, 0xbc, 0xee, 0x8c, 0xc8, 0xf9, 0x29, 0xca, 0x90, 0xc2, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_53() { let input = ByteSeq::from_public_slice(&[ 0xe3, 0x96, 0x4, 0x57, 0x1d, 0x68, 0xd4, 0xd8, 0x77, 0xb9, 0x5e, 0xac, 0x3, 0x28, 0xc4, 0x85, 0x34, 0xd4, 0x5, 0x89, 0x4a, 0x29, 0x86, 0x5a, 0x4b, 0x7f, 0xb3, 0xd9, 0xa4, 0xc2, 0x5b, 0xa6, 0x2, 0x95, 0x30, 0x82, 0x12, 0x23, 0x9c, 0x32, 0x5a, 0xbc, 0xf9, 0x73, 0xc2, 0x4, 0x84, 0x72, 0x8b, 0x7d, 0xdd, 0xfa, 0x31, ]); let expected = Digest::from_public_slice(&[ 0xc6, 0xb7, 0x6b, 0x1c, 0x1b, 0xea, 0xf4, 0x1d, 0x9d, 0x38, 0x25, 0x11, 0x20, 0x9a, 0x12, 0xa, 0xf2, 0xf2, 0xdd, 0x7d, 0x1, 0xc8, 0x9c, 0x91, 0xf3, 0xe8, 0xce, 0x76, 0x1e, 0xc3, 0xb, 0xd, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_54() { let input = ByteSeq::from_public_slice(&[ 0x6b, 0xff, 0x3e, 0x92, 0xfe, 0xf2, 0x9c, 0x70, 0xa, 0xd4, 0x96, 0x4c, 0x7a, 0x9b, 0x68, 0xb, 0x4f, 0x7e, 0xc5, 0xde, 0xff, 0xc2, 0x2e, 0x5, 0x59, 0x4c, 0x47, 0x8c, 0x2f, 0x22, 0x34, 0x17, 0xb, 0xb2, 0xb, 0x4, 0x23, 0x4e, 0x7, 0x1b, 0xb4, 0x25, 0x5c, 0x4, 0xc3, 0x8, 0x69, 0xfc, 0xcd, 0xb7, 0xdd, 0xd2, 0x91, 0x2a, ]); let expected = Digest::from_public_slice(&[ 0x80, 0xcb, 0xb6, 0xa, 0x7e, 0x53, 0x39, 0xcb, 0xc1, 0xfb, 0x93, 0x34, 0xc, 0x13, 0x84, 0xde, 0x22, 0xb0, 0xea, 0x8d, 0xf7, 0x50, 0x83, 0xd5, 0x80, 0x1b, 0xe, 0x95, 0xa7, 0x5c, 0xe1, 0x52, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_55() { let input = ByteSeq::from_public_slice(&[ 0x9, 0x60, 0x0, 0x4e, 0x3e, 0x83, 0x86, 0x49, 0xd6, 0x73, 0xe7, 0x62, 0xd4, 0xcb, 0x39, 0xba, 0xc, 0xba, 0xcb, 0x9b, 0x8, 0x94, 0x3d, 0x2d, 0xe9, 0x49, 0x94, 0x19, 0xc5, 0xf6, 0xfa, 0x1d, 0x85, 0xec, 0xa8, 0x25, 0xea, 0xf3, 0x77, 0x81, 0x7c, 0x3e, 0x24, 0x8c, 0xe2, 0x89, 0x25, 0xaa, 0x9, 0x8b, 0x75, 0xe1, 0x65, 0xe3, 0x43, ]); let expected = Digest::from_public_slice(&[ 0x57, 0x64, 0x33, 0x41, 0xcd, 0x42, 0x85, 0x12, 0x7f, 0x68, 0x9a, 0xb5, 0xdd, 0xe, 0xa6, 0xd0, 0x69, 0xa5, 0x6a, 0xd1, 0x93, 0xba, 0xf3, 0x3f, 0x50, 0x72, 0xe4, 0xa3, 0xc2, 0xe9, 0x8a, 0x91, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_56() { let input = ByteSeq::from_public_slice(&[ 0xc3, 0x40, 0xab, 0x12, 0x7a, 0x84, 0x30, 0xee, 0xbe, 0x33, 0x76, 0xa1, 0x13, 0xc3, 0x54, 0xf3, 0x92, 0xb6, 0x57, 0xc3, 0x49, 0x9, 0xef, 0x63, 0xae, 0x9e, 0x19, 0x79, 0x8b, 0xac, 0x1e, 0xf8, 0x18, 0xaa, 0xb2, 0x87, 0xde, 0x3d, 0x85, 0xea, 0x6c, 0x2c, 0x9f, 0x70, 0x40, 0x5d, 0xd5, 0x94, 0x85, 0xe9, 0x33, 0x9c, 0xe0, 0x8f, 0xc8, 0x79, ]); let expected = Digest::from_public_slice(&[ 0xb6, 0xd0, 0xce, 0x30, 0xe3, 0x3c, 0x8e, 0x5d, 0x7a, 0x67, 0x18, 0x19, 0x49, 0xf7, 0xc, 0x38, 0xec, 0xac, 0x82, 0x49, 0xa2, 0xe1, 0x7a, 0x35, 0x63, 0x14, 0xef, 0x54, 0x2c, 0xc6, 0xa6, 0xcd, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_57() { let input = ByteSeq::from_public_slice(&[ 0x2c, 0x20, 0x68, 0x16, 0xd1, 0xf7, 0xb3, 0x99, 0xa9, 0x73, 0x4d, 0x10, 0x5e, 0xb6, 0xcb, 0x32, 0xd9, 0xb5, 0x96, 0x3a, 0xda, 0x97, 0xc9, 0xfe, 0xcc, 0x33, 0x25, 0x8e, 0x65, 0xbd, 0x9f, 0x79, 0xb3, 0x1b, 0x99, 0xe0, 0x84, 0x42, 0xdf, 0x6a, 0xc, 0xdc, 0x54, 0xfc, 0xe2, 0x4a, 0x55, 0xd5, 0x10, 0x60, 0xd5, 0xba, 0xfa, 0x92, 0xeb, 0x7f, 0x57, ]); let expected = Digest::from_public_slice(&[ 0x3e, 0x2a, 0xf5, 0xc5, 0x58, 0xf6, 0x50, 0x63, 0xd6, 0xb, 0x81, 0xc4, 0x4d, 0x8f, 0xd2, 0xad, 0xc5, 0x5b, 0xd9, 0x43, 0x2c, 0xda, 0x1d, 0x82, 0xb9, 0xf7, 0x27, 0xa6, 0xe9, 0x68, 0x8d, 0xe8, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_58() { let input = ByteSeq::from_public_slice(&[ 0x38, 0xe4, 0xa8, 0x2, 0x76, 0x93, 0x33, 0x66, 0x3b, 0xbb, 0xba, 0x27, 0x9e, 0xd2, 0x56, 0x5, 0x2f, 0x4a, 0x89, 0xe6, 0x71, 0xbe, 0xdb, 0x31, 0xae, 0x4, 0xc, 0xf6, 0xf8, 0xfd, 0x7a, 0xa0, 0x5c, 0x59, 0x64, 0xa2, 0x98, 0x56, 0x62, 0x42, 0xda, 0x28, 0xe6, 0x3c, 0xa2, 0x66, 0x3a, 0x68, 0x75, 0xe1, 0x31, 0x22, 0x44, 0x70, 0x61, 0x27, 0x67, 0xf, ]); let expected = Digest::from_public_slice(&[ 0xe2, 0xec, 0x64, 0x86, 0xc4, 0xa0, 0x7b, 0x4b, 0x87, 0x6b, 0x65, 0xa6, 0x5c, 0xaa, 0x3e, 0x6e, 0xc9, 0x6f, 0x31, 0xfd, 0xe5, 0x5f, 0xe4, 0x69, 0xc7, 0x53, 0x60, 0x3a, 0x97, 0x2b, 0x7f, 0x10, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_59() { let input = ByteSeq::from_public_slice(&[ 0x4d, 0xba, 0x91, 0xff, 0xcb, 0x22, 0xa1, 0x77, 0xd9, 0xa9, 0x66, 0x61, 0x92, 0x91, 0xab, 0xb4, 0xe7, 0xe0, 0xe8, 0x51, 0xdf, 0x7a, 0xe4, 0xff, 0x2d, 0xd3, 0xa3, 0x12, 0x94, 0xa5, 0x1c, 0x31, 0x38, 0xdc, 0x56, 0xdc, 0x20, 0xd, 0x3a, 0x59, 0xce, 0xcd, 0x86, 0xf9, 0x8d, 0x9e, 0x80, 0x63, 0x8c, 0xb2, 0x58, 0xae, 0x2e, 0x7d, 0x39, 0xdd, 0x6f, 0xf0, 0x38, ]); let expected = Digest::from_public_slice(&[ 0xe7, 0xc4, 0xfc, 0x13, 0xa1, 0x2e, 0x58, 0x94, 0xf0, 0xf5, 0x17, 0x95, 0x89, 0x7e, 0xe6, 0x76, 0x7f, 0x21, 0xb2, 0x12, 0x9c, 0xe3, 0xd4, 0x75, 0x8a, 0x4c, 0x4b, 0x6e, 0xdb, 0xdc, 0x1f, 0xf4, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_60() { let input = ByteSeq::from_public_slice(&[ 0x7d, 0xf3, 0xd7, 0x7a, 0xe2, 0xea, 0x9b, 0x4e, 0x7c, 0x14, 0x63, 0x64, 0xa3, 0xdf, 0xdb, 0x3, 0x30, 0x77, 0x88, 0xf6, 0x38, 0xbb, 0x8, 0x17, 0xed, 0x8b, 0x9f, 0x1d, 0x2d, 0x7, 0x16, 0xbe, 0xad, 0xc3, 0x4b, 0x80, 0x8c, 0x8b, 0x63, 0xfe, 0xd3, 0xe6, 0xd5, 0x1d, 0x4, 0x8d, 0x4f, 0x47, 0x10, 0xcb, 0x7d, 0x47, 0xf2, 0x4e, 0xab, 0xfc, 0x25, 0xfa, 0x4, 0xf5, ]); let expected = Digest::from_public_slice(&[ 0x7, 0x2a, 0x53, 0x2f, 0xf8, 0xd7, 0x63, 0xf7, 0x25, 0x6d, 0xa2, 0x55, 0x54, 0x4b, 0x81, 0x6, 0xa4, 0x9e, 0xbb, 0x6, 0xdf, 0x5a, 0x85, 0xd1, 0xfe, 0xc6, 0x62, 0xa9, 0xd4, 0x81, 0x10, 0x5, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_61() { let input = ByteSeq::from_public_slice(&[ 0x2, 0x26, 0xbd, 0x5a, 0xcc, 0xc0, 0x66, 0xc6, 0xa0, 0x62, 0x7, 0xff, 0xfc, 0x8e, 0x41, 0x8a, 0x4, 0xb7, 0x1d, 0xed, 0x6e, 0x82, 0x10, 0xf8, 0xd6, 0x34, 0x3a, 0x99, 0x80, 0x7f, 0xc0, 0x2a, 0x11, 0x8a, 0x7b, 0x8d, 0x65, 0x10, 0xcb, 0x94, 0x68, 0xfb, 0x14, 0x5c, 0x0, 0xae, 0x4f, 0x68, 0x66, 0xc0, 0x9c, 0xf, 0x46, 0x77, 0xd6, 0x35, 0x45, 0x0, 0x52, 0x90, 0x64, ]); let expected = Digest::from_public_slice(&[ 0x3d, 0xdc, 0xe1, 0x21, 0xdd, 0x14, 0xfc, 0x95, 0x4d, 0x18, 0x5c, 0x4b, 0x1e, 0x4a, 0x29, 0x11, 0x5, 0xde, 0x6e, 0x9b, 0x9c, 0xfa, 0x43, 0x6a, 0xe4, 0x28, 0x9b, 0xd7, 0x95, 0x92, 0x42, 0x66, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_62() { let input = ByteSeq::from_public_slice(&[ 0xbd, 0x95, 0x89, 0xf4, 0x83, 0xed, 0xe6, 0x68, 0xe9, 0x6d, 0xb1, 0xfb, 0x95, 0x22, 0xf2, 0x4d, 0xf7, 0x91, 0x26, 0x2a, 0xa7, 0xc1, 0x2, 0xb2, 0x6a, 0xa6, 0x7f, 0x88, 0xcf, 0x15, 0x7a, 0x13, 0x9d, 0xe9, 0xcd, 0x5b, 0x3c, 0xcc, 0x8d, 0xec, 0x4d, 0x7c, 0xc3, 0xee, 0x68, 0x28, 0xd5, 0x90, 0xb1, 0xbe, 0xa, 0xe2, 0x9e, 0x15, 0x2d, 0x98, 0xe5, 0x44, 0xd, 0x34, 0x22, 0x59, ]); let expected = Digest::from_public_slice(&[ 0xae, 0x1b, 0x10, 0x7e, 0x46, 0x30, 0x1d, 0xe9, 0x1f, 0x3a, 0xa2, 0xf6, 0xd6, 0xaf, 0xcc, 0x82, 0x86, 0xef, 0xc7, 0xbd, 0x69, 0xc3, 0xed, 0xca, 0x40, 0xab, 0xe3, 0x7, 0x9e, 0x84, 0x0, 0xa8, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_63() { let input = ByteSeq::from_public_slice(&[ 0x1, 0x7b, 0x9d, 0x4c, 0xb4, 0x3e, 0x4, 0xa1, 0x1f, 0xaa, 0xc1, 0x5f, 0xf9, 0x3a, 0xff, 0xe0, 0x3e, 0x13, 0x2a, 0x7, 0x17, 0x1d, 0xcc, 0xb5, 0xd1, 0xf1, 0x6f, 0x27, 0xc1, 0x14, 0xb4, 0x57, 0x90, 0x78, 0xd0, 0x73, 0xc7, 0x82, 0xa6, 0xe7, 0xab, 0x56, 0x79, 0xaa, 0x2f, 0x55, 0x74, 0x3e, 0xb7, 0x60, 0x6f, 0x60, 0xe6, 0x22, 0xff, 0x48, 0x35, 0xb, 0xe7, 0x30, 0x8, 0x2e, 0xb1, ]); let expected = Digest::from_public_slice(&[ 0x91, 0xe, 0x3f, 0x8e, 0x15, 0xd2, 0x5e, 0x31, 0xaf, 0xed, 0x7f, 0x43, 0x76, 0xd8, 0xc9, 0xee, 0x53, 0xa0, 0xb8, 0xfd, 0xd6, 0x8a, 0x66, 0x36, 0x6b, 0xc6, 0xc6, 0xc9, 0xab, 0x97, 0x2, 0x26, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); } #[test] fn tg_gimli_hash_64() { let input = ByteSeq::from_public_slice(&[ 0x7d, 0x3c, 0x76, 0x7f, 0x41, 0x74, 0xd, 0x8f, 0x96, 0x39, 0x3, 0x8b, 0x89, 0x6f, 0xe0, 0xc4, 0x89, 0x7f, 0x88, 0x60, 0x8e, 0xa2, 0x26, 0x92, 0x5b, 0xc3, 0x9e, 0x48, 0x50, 0xb5, 0x18, 0x4f, 0x1c, 0x7c, 0xf1, 0x28, 0x5e, 0xbf, 0x45, 0x26, 0x21, 0xa1, 0x9a, 0x4c, 0x33, 0xe1, 0x45, 0x6b, 0x2a, 0xe8, 0x83, 0x39, 0x6d, 0xe, 0x1d, 0x6b, 0x76, 0xc5, 0xf0, 0xcb, 0xe4, 0xd7, 0x5b, 0xeb, ]); let expected = Digest::from_public_slice(&[ 0x60, 0xe3, 0x43, 0xfe, 0x19, 0x31, 0xf9, 0xec, 0x84, 0xd, 0xfb, 0x56, 0x4e, 0x6, 0x68, 0x54, 0xf3, 0x4b, 0x5a, 0x58, 0x2, 0x9a, 0x63, 0xd8, 0x67, 0xe7, 0xf8, 0xd2, 0x31, 0x81, 0x52, 0x9c, ]); let out = gimli_hash(&input); assert_secret_array_eq!(expected, out, U8); }
<gh_stars>0 https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/ class Solution { boolean canShip(int[] weights,int mid,int d){ int sum=0,dr=1; for(int i=0;i<weights.length;i++){ sum+=weights[i]; if(weights[i]>mid) return false; if(sum>mid){ dr++; sum=weights[i]; if(dr>d){ return false; } } } return true; } public int shipWithinDays(int[] weights, int days) { int min=Integer.MAX_VALUE,sum=0; for(int x:weights){ sum+=x; min=Math.min(min,x); } int l=min,r=sum,n=weights.length; while(l<=r){ int mid=l+(r-l)/2; if(canShip(weights,mid,days)==true){ r=mid-1; } else l=mid+1; } return l; } }
A new study released Monday challenges experts’ long-held notion that a majority of campus rapes are committed by serial predators. Yet the research shows more men in college have committed rape than previously believed ― and efforts to prevent sexual assault need to begin long before students arrive on campus. “We’re not saying there aren’t serial rapists, we know there are serial rapists, but serial rapists are not responsible for the [campus rape] problem ― it’s more complicated than that,” said lead researcher Kevin Swartout, a Georgia State University psychology professor. “It really is important to understand that men who commit campus rape are a heterogeneous group,” he added. “It’s not just one group of guy, not one type of guy perpetrating campus rape. So therefore, it means multiple strategies are going to be needed to produce the type of results we’re looking for.” Four out of five men who committed rape before graduating college were not repeat offenders, the researchers found. Those findings “do not support the campus serial rapist assumption ― most men who committed rape did not do so consistently across time,” the study concluded. However, the study also found more than one in 10 men on the campuses examined had raped someone ― twice as many as the number experts previously believed. The study, published online Monday in the Journal of the American Medical Association Pediatrics only looked at behavior that met the FBI’s definition of rape and did not include lesser forms of sexual assault. It drew on two longitudinal data sets collected over multiple years from two large, southeastern universities, which examined males from age 14 through college. “We have to avoid one-size-fits-all kinds of programs. We know some of these young men are likely to offend during adolescence, in high school and they stop when they get to college,” said Jacquelyn White, a psychology professor at the University of North Carolina at Greensboro and a co-author of the study. “We really need to understand what contributes to that cessation.” Sexual violence experts’ belief that a small number of men committed a majority of rape on campus was largely based on a 2002 study by David Lisak, then at the University of Massachusetts-Boston, which found that 6.4 percent of college men had committed rape or attempted rape and two in three committed repeat rapes. Monday’s study found 10.8 percent of men in both samples committed assaults that meet the FBI definition of rape either before or during college. Fifty-nine percent of the men who committed rape in high school did not do so in college, while 72 percent who raped in college did not do so before getting on campus. There is a growing debate about whether students found guilty of sexual assault by their college or university should have their offense marked on their transcript ― a majority of schools do not include any note. Two states, Virginia and New York, recently enacted mandates that colleges include transcription notices for guilty students, and Mary Koss, one of the researchers in Monday’s study, doesn’t necessarily think the new findings should halt those efforts. “Those who offend repeatedly or with escalated violence even in the first known incident should be excluded from campus,” Koss told The Huffington Post. “Institutions need a process that avoids blocking the responsible person’s ability to complete education elsewhere, yet still informs the receiving conduct administrators of a risk situation that merits monitoring.” However, the new study also bolsters moves to get more consent education at the K-12 level. Activists have begun calling for mandating affirmative consent in sex ed courses, and California is moving on legislation to do just that in high schools. Monday’s study on rapists follows research released in May finding that 28 percent of women surveyed at an upstate New York university had experienced either a rape or an attempted rape by the time they started college. Close to one-in-five were victims during their freshman year of college, with most being assaulted during their first three months on campus, a time often called the “Red Zone” for its statistically higher probability of sexual assault occurring in college. The new study did not look to see if men were more likely to assault during the “Red Zone,” though Swartout did notice there was a bump during the first half of their college career. “Because so many acts of rape occurred prior to entering college, it is clear that sexual health, healthy relationship education, and rape prevention must be in the middle and high school curriculum using methodologies with demonstrated effectiveness,” Koss said. The men studied had different trajectories on whether they became more or less likely to rape. Men who had committed rape before college were less likely to do so once on campus, while most of the men who committed these offenses at their university had not done so when in high school. The researchers suggest the likelihood of sexual assault could be heavily influenced by social learning or social control processes ― in other words, that something happens when young men switch from high school to college that changes their behavior. White sees a potential problem from their study results now that colleges have a “whack-a-mole” phenomenon with the men who do commit sexual assault on their campus, since they are more likely to not be a serial predator. “These are the young men who are going to offend during one time period ― maybe freshmen year, maybe sophomore year ― we don’t know when they are going to pop up and offend,” White explained. “We need a very comprehensive set of intervention strategies.” But American higher education, and society at large, could make progress if high school prevention efforts became a greater part of the picture. “If we did more prevention program during the early years, then you have an entire cadre of young men educated,” White said. They would be those bystanders, she elaborated, who could be more ready to intervene if they see their peers engage in sexual violence.
def remove_solution(self, old_solution: Solution): self.solutions.remove(old_solution)
import request from "supertest"; import type { Server } from "http"; import { createServer } from "test/factory/server"; import { ServerControl } from "services"; let server: Server; let control: ServerControl; beforeAll(async () => { control = await createServer(); server = control.server; }); afterAll(async () => { await control.stop(); }); describe("Cors", () => { const origins = { valid: [ "http://localhost:3000", "http://localhost:4000", "https://studio.apollographql.com", ], invalid: [ "http://localhost", "http://subdomain.localhost:3000", "http://somedomain.com", ], }; describe.each(origins.valid)("valid with %s", origin => { test("correctly sent cors headers", async () => { const res = await request(server).options("/").set("Origin", origin); expect(res.statusCode).toBe(204); expect(res.get("Access-Control-Allow-Origin")).toBe(origin); expect(res.get("Access-Control-Allow-Methods")).toBe("GET,POST"); expect(res.get("Access-Control-Max-Age")).toBe("600"); }); }); describe.each(origins.invalid)("invalid with %s", origin => { test("doens't allow origin", async () => { const res = await request(server).options("/").set("Origin", origin); expect(res.statusCode).toBe(204); expect(res.get("Access-Control-Allow-Origin")).toBeUndefined(); }); }); });
// toPrecision converts a number to a string, taking an argument specifying a // number of significant figures to round the significand to. For positive // exponent, all values that can be represented using a decimal fraction will // be, e.g. when rounding to 3 s.f. any value up to 999 will be formated as a // decimal, whilst 1000 is converted to the exponential representation 1.00e+3. // For negative exponents values >= 1e-6 are formated as decimal fractions, // with smaller values converted to exponential representation. EncodedJSValue JSC_HOST_CALL numberProtoFuncToPrecision(JSGlobalObject* globalObject, CallFrame* callFrame) { VM& vm = globalObject->vm(); auto scope = DECLARE_THROW_SCOPE(vm); double x; if (!toThisNumber(vm, callFrame->thisValue(), x)) return throwVMToThisNumberError(globalObject, scope, callFrame->thisValue()); JSValue arg = callFrame->argument(0); if (arg.isUndefined()) return JSValue::encode(jsString(vm, String::number(x))); int significantFigures = static_cast<int>(arg.toInteger(globalObject)); RETURN_IF_EXCEPTION(scope, { }); if (!std::isfinite(x)) return JSValue::encode(jsNontrivialString(vm, String::number(x))); if (significantFigures < 1 || significantFigures > 100) return throwVMRangeError(globalObject, scope, "toPrecision() argument must be between 1 and 100"_s); return JSValue::encode(jsString(vm, String::numberToStringFixedPrecision(x, significantFigures, KeepTrailingZeros))); }
// GetRepoHash return the hash of the branch for a given repository. func GetRepoHash(module ModuleConfig) string { cmd := exec.Command("git", "ls-remote", module.Url) output, err := cmd.CombinedOutput() if err != nil { return "" } lines := strings.Split(string(output), "\n") for _, line := range lines { re, _ := regexp.Compile("(\\w+)\\s+/?refs/heads/" + module.Branch) match := re.FindStringSubmatch(line) if len(match) > 0 { return match[1] } } return "" }
When Hillary Clinton conceded the presidential race to Donald Trump, her speech was dignified, but also tinged with a little sadness at the fact that the U.S. would have to keep waiting for its first female president. However, a group of young women in California seized upon her words of hope for women everywhere and adapted parts of her Clinton’s speech into a heart-rending anthem. “To All the Little Girls” was composed by 13-year-old Isolde Fair who, along with her all-girls music theory class at Sol La Music Academy in Santa Monica, performed the song and posted the performance on YouTube. “The message is that all girls (and women) should never doubt that they are valuable and powerful and can have their dreams come true,” Fair wrote in the description. The song samples the following passage from Clinton’s concession speech, along with some original lyrics by Fair: “And to all of the little girls who are watching this, never doubt that you are valuable and powerful and deserving of every chance and opportunity in the world to pursue and achieve your own dreams.” The dramatic yet stripped down performance is really incredible for someone so young, and Clinton herself congratulated the girls on the songs. Thanks to Isolde Fair & her classmates for this inspiring song. I'm with YOU. Watch: https://t.co/3Gt7IbcAMn — Hillary Clinton (@HillaryClinton) February 15, 2017 Watch the full performance below.
<reponame>etnetera/Email-Validator package cz.etn.emailvalidator; import javax.naming.Context; import javax.naming.NamingException; import javax.naming.directory.Attribute; import javax.naming.directory.Attributes; import javax.naming.directory.InitialDirContext; import java.util.ArrayList; import java.util.List; import java.util.Properties; //import org.apache.log4j.Logger; /** * http://docs.oracle.com/javase/1.5.0/docs/guide/jndi/jndi-dns.html * https://www.captechconsulting.com/blogs/accessing-the-dusty-corners-of-dns-with-java * https://cs.wikipedia.org/wiki/Domain_Name_System * https://en.wikipedia.org/wiki/List_of_DNS_record_types * * @author DDv */ public class DNSLookup { private static final String MX_ATTRIB = "MX"; private static final String ADDR_ATTRIB_IPV4 = "A"; private static final String ADDR_ATTRIB_IPV6 = "AAAA"; private static String[] MX_ATTRIBS = {MX_ATTRIB}; private static String[] ADDR_ATTRIBS = {ADDR_ATTRIB_IPV4, ADDR_ATTRIB_IPV6}; //private static final Logger LOG = Logger.getRootLogger(); private static final Properties env = new Properties(); static { env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.dns.DnsContextFactory"); } //============== VEREJNE METODY INSTANCE ==================================== /** * @return list of mx records for domain */ public static List<String> getMXServers(String domain) { List<String> servers = new ArrayList<>(); try { InitialDirContext idc = new InitialDirContext(env); Attributes attrs = idc.getAttributes(domain, MX_ATTRIBS); Attribute attr = attrs.get(MX_ATTRIB); if (attr != null) { for (int i = 0; i < attr.size(); i++) { String mxAttr = (String) attr.get(i); String[] parts = mxAttr.split(" "); // Split off the priority, and take the last field String part = parts[parts.length - 1]; part = part.replaceFirst("\\.$", ""); servers.add(part); } } } catch (NamingException e) { // LOG.warn("unable to get MX record for " + domain, e); } return servers; } /** * @return list of IP adresses for domain */ public static List<String> getIPAddresses(String hostname) { List<String> ipAddresses = new ArrayList<>(); try { InitialDirContext idc = new InitialDirContext(env); Attributes attrs = idc.getAttributes(hostname, ADDR_ATTRIBS); Attribute ipv4 = attrs.get(ADDR_ATTRIB_IPV4); Attribute ipv6 = attrs.get(ADDR_ATTRIB_IPV6); if (ipv4 != null) { for (int i = 0; i < ipv4.size(); i++) { ipAddresses.add((String) ipv4.get(i)); } } if (ipv6 != null) { for (int i = 0; i < ipv6.size(); i++) { ipAddresses.add((String) ipv6.get(i)); } } } catch (NamingException e) { // LOG.warn("unable to get IP for " + hostname, e); } return ipAddresses; } }
/** * Copyright 2015 MongoDB Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. * * As a special exception, the copyright holders give permission to link the * code of portions of this program with the OpenSSL library under certain * conditions as described in each individual source file and distribute * linked combinations including the program with the OpenSSL library. You * must comply with the GNU Affero General Public License in all respects for * all of the code used other than as permitted herein. If you modify file(s) * with this exception, you may extend this exception to your version of the * file(s), but you are not obligated to do so. If you do not wish to do so, * delete this exception statement from your version. If you delete this * exception statement from all source files in the program, then also delete * it in the license file. */ #include "mongo/platform/basic.h" #include <memory> #include "mongo/db/catalog/database.h" #include "mongo/db/catalog/database_holder.h" #include "mongo/db/catalog/document_validation.h" #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/concurrency/write_conflict_exception.h" #include "mongo/db/client.h" #include "mongo/db/curop.h" #include "mongo/db/jsobj.h" #include "mongo/db/repl/bgsync.h" #include "mongo/db/repl/operation_context_repl_mock.h" #include "mongo/db/repl/replication_coordinator_global.h" #include "mongo/db/repl/replication_coordinator_mock.h" #include "mongo/db/repl/sync_tail.h" #include "mongo/db/service_context.h" #include "mongo/db/storage/storage_options.h" #include "mongo/unittest/unittest.h" #include "mongo/unittest/temp_dir.h" namespace { using namespace mongo; using namespace mongo::repl; class BackgroundSyncMock : public BackgroundSyncInterface { public: bool peek(BSONObj* op) override; void consume() override; void waitForMore() override; }; bool BackgroundSyncMock::peek(BSONObj* op) { return false; } void BackgroundSyncMock::consume() {} void BackgroundSyncMock::waitForMore() {} class SyncTailTest : public unittest::Test { protected: void _testSyncApplyInsertDocument(LockMode expectedMode); std::unique_ptr<OperationContext> _txn; unsigned int _opsApplied; SyncTail::ApplyOperationInLockFn _applyOp; SyncTail::ApplyCommandInLockFn _applyCmd; SyncTail::IncrementOpsAppliedStatsFn _incOps; private: void setUp() override; void tearDown() override; }; void SyncTailTest::setUp() { ServiceContext* serviceContext = getGlobalServiceContext(); if (!serviceContext->getGlobalStorageEngine()) { // When using the 'devnull' storage engine, it is fine for the temporary directory to // go away after the global storage engine is initialized. unittest::TempDir tempDir("sync_tail_test"); mongo::storageGlobalParams.dbpath = tempDir.path(); mongo::storageGlobalParams.engine = "devnull"; mongo::storageGlobalParams.engineSetByUser = true; serviceContext->initializeGlobalStorageEngine(); } ReplSettings replSettings; replSettings.setOplogSizeBytes(5 * 1024 * 1024); setGlobalReplicationCoordinator(new ReplicationCoordinatorMock(replSettings)); Client::initThreadIfNotAlready(); _txn.reset(new OperationContextReplMock(&cc(), 0)); _opsApplied = 0; _applyOp = [](OperationContext* txn, Database* db, const BSONObj& op, bool convertUpdateToUpsert) { return Status::OK(); }; _applyCmd = [](OperationContext* txn, const BSONObj& op) { return Status::OK(); }; _incOps = [this]() { _opsApplied++; }; } void SyncTailTest::tearDown() { { Lock::GlobalWrite globalLock(_txn->lockState()); BSONObjBuilder unused; invariant(mongo::dbHolder().closeAll(_txn.get(), unused, false)); } _txn.reset(); setGlobalReplicationCoordinator(nullptr); } TEST_F(SyncTailTest, Peek) { BackgroundSyncMock bgsync; SyncTail syncTail(&bgsync, [](const std::vector<BSONObj>& ops, SyncTail* st) {}); BSONObj obj; ASSERT_FALSE(syncTail.peek(&obj)); } TEST_F(SyncTailTest, SyncApplyNoNamespaceBadOp) { const BSONObj op = BSON("op" << "x"); ASSERT_OK(SyncTail::syncApply(_txn.get(), op, false, _applyOp, _applyCmd, _incOps)); ASSERT_EQUALS(0U, _opsApplied); } TEST_F(SyncTailTest, SyncApplyNoNamespaceNoOp) { ASSERT_OK(SyncTail::syncApply(_txn.get(), BSON("op" << "n"), false)); ASSERT_EQUALS(0U, _opsApplied); } TEST_F(SyncTailTest, SyncApplyBadOp) { const BSONObj op = BSON("op" << "x" << "ns" << "test.t"); ASSERT_EQUALS(ErrorCodes::BadValue, SyncTail::syncApply(_txn.get(), op, false, _applyOp, _applyCmd, _incOps).code()); ASSERT_EQUALS(0U, _opsApplied); } TEST_F(SyncTailTest, SyncApplyNoOp) { const BSONObj op = BSON("op" << "n" << "ns" << "test.t"); bool applyOpCalled = false; SyncTail::ApplyOperationInLockFn applyOp = [&](OperationContext* txn, Database* db, const BSONObj& theOperation, bool convertUpdateToUpsert) { applyOpCalled = true; ASSERT_TRUE(txn); ASSERT_TRUE(txn->lockState()->isDbLockedForMode("test", MODE_X)); ASSERT_FALSE(txn->writesAreReplicated()); ASSERT_TRUE(documentValidationDisabled(txn)); ASSERT_TRUE(db); ASSERT_EQUALS(op, theOperation); ASSERT_FALSE(convertUpdateToUpsert); return Status::OK(); }; SyncTail::ApplyCommandInLockFn applyCmd = [&](OperationContext* txn, const BSONObj& theOperation) { FAIL("applyCommand unexpectedly invoked."); return Status::OK(); }; ASSERT_TRUE(_txn->writesAreReplicated()); ASSERT_FALSE(documentValidationDisabled(_txn.get())); ASSERT_OK(SyncTail::syncApply(_txn.get(), op, false, applyOp, applyCmd, _incOps)); ASSERT_TRUE(applyOpCalled); ASSERT_EQUALS(1U, _opsApplied); } TEST_F(SyncTailTest, SyncApplyNoOpApplyOpThrowsException) { const BSONObj op = BSON("op" << "n" << "ns" << "test.t"); int applyOpCalled = 0; SyncTail::ApplyOperationInLockFn applyOp = [&](OperationContext* txn, Database* db, const BSONObj& theOperation, bool convertUpdateToUpsert) { applyOpCalled++; if (applyOpCalled < 5) { throw WriteConflictException(); } return Status::OK(); }; SyncTail::ApplyCommandInLockFn applyCmd = [&](OperationContext* txn, const BSONObj& theOperation) { FAIL("applyCommand unexpectedly invoked."); return Status::OK(); }; ASSERT_OK(SyncTail::syncApply(_txn.get(), op, false, applyOp, applyCmd, _incOps)); ASSERT_EQUALS(5, applyOpCalled); ASSERT_EQUALS(1U, _opsApplied); } void SyncTailTest::_testSyncApplyInsertDocument(LockMode expectedMode) { const BSONObj op = BSON("op" << "i" << "ns" << "test.t"); bool applyOpCalled = false; SyncTail::ApplyOperationInLockFn applyOp = [&](OperationContext* txn, Database* db, const BSONObj& theOperation, bool convertUpdateToUpsert) { applyOpCalled = true; ASSERT_TRUE(txn); ASSERT_TRUE(txn->lockState()->isDbLockedForMode("test", expectedMode)); ASSERT_TRUE(txn->lockState()->isCollectionLockedForMode("test.t", expectedMode)); ASSERT_FALSE(txn->writesAreReplicated()); ASSERT_TRUE(documentValidationDisabled(txn)); ASSERT_TRUE(db); ASSERT_EQUALS(op, theOperation); ASSERT_TRUE(convertUpdateToUpsert); return Status::OK(); }; SyncTail::ApplyCommandInLockFn applyCmd = [&](OperationContext* txn, const BSONObj& theOperation) { FAIL("applyCommand unexpectedly invoked."); return Status::OK(); }; ASSERT_TRUE(_txn->writesAreReplicated()); ASSERT_FALSE(documentValidationDisabled(_txn.get())); ASSERT_OK(SyncTail::syncApply(_txn.get(), op, true, applyOp, applyCmd, _incOps)); ASSERT_TRUE(applyOpCalled); ASSERT_EQUALS(1U, _opsApplied); } TEST_F(SyncTailTest, SyncApplyInsertDocumentDatabaseMissing) { _testSyncApplyInsertDocument(MODE_X); } TEST_F(SyncTailTest, SyncApplyInsertDocumentCollectionMissing) { { Lock::GlobalWrite globalLock(_txn->lockState()); bool justCreated = false; Database* db = dbHolder().openDb(_txn.get(), "test", &justCreated); ASSERT_TRUE(db); ASSERT_TRUE(justCreated); } _testSyncApplyInsertDocument(MODE_X); } TEST_F(SyncTailTest, SyncApplyInsertDocumentCollectionExists) { { Lock::GlobalWrite globalLock(_txn->lockState()); bool justCreated = false; Database* db = dbHolder().openDb(_txn.get(), "test", &justCreated); ASSERT_TRUE(db); ASSERT_TRUE(justCreated); Collection* collection = db->createCollection(_txn.get(), "test.t"); ASSERT_TRUE(collection); } _testSyncApplyInsertDocument(MODE_IX); } TEST_F(SyncTailTest, SyncApplyIndexBuild) { const BSONObj op = BSON("op" << "i" << "ns" << "test.system.indexes"); bool applyOpCalled = false; SyncTail::ApplyOperationInLockFn applyOp = [&](OperationContext* txn, Database* db, const BSONObj& theOperation, bool convertUpdateToUpsert) { applyOpCalled = true; ASSERT_TRUE(txn); ASSERT_TRUE(txn->lockState()->isDbLockedForMode("test", MODE_X)); ASSERT_FALSE(txn->writesAreReplicated()); ASSERT_TRUE(documentValidationDisabled(txn)); ASSERT_TRUE(db); ASSERT_EQUALS(op, theOperation); ASSERT_FALSE(convertUpdateToUpsert); return Status::OK(); }; SyncTail::ApplyCommandInLockFn applyCmd = [&](OperationContext* txn, const BSONObj& theOperation) { FAIL("applyCommand unexpectedly invoked."); return Status::OK(); }; ASSERT_TRUE(_txn->writesAreReplicated()); ASSERT_FALSE(documentValidationDisabled(_txn.get())); ASSERT_OK(SyncTail::syncApply(_txn.get(), op, false, applyOp, applyCmd, _incOps)); ASSERT_TRUE(applyOpCalled); ASSERT_EQUALS(1U, _opsApplied); } TEST_F(SyncTailTest, SyncApplyCommand) { const BSONObj op = BSON("op" << "c" << "ns" << "test.t"); bool applyCmdCalled = false; SyncTail::ApplyOperationInLockFn applyOp = [&](OperationContext* txn, Database* db, const BSONObj& theOperation, bool convertUpdateToUpsert) { FAIL("applyOperation unexpectedly invoked."); return Status::OK(); }; SyncTail::ApplyCommandInLockFn applyCmd = [&](OperationContext* txn, const BSONObj& theOperation) { applyCmdCalled = true; ASSERT_TRUE(txn); ASSERT_TRUE(txn->lockState()->isW()); ASSERT_TRUE(txn->writesAreReplicated()); ASSERT_FALSE(documentValidationDisabled(txn)); ASSERT_EQUALS(op, theOperation); return Status::OK(); }; ASSERT_TRUE(_txn->writesAreReplicated()); ASSERT_FALSE(documentValidationDisabled(_txn.get())); ASSERT_OK(SyncTail::syncApply(_txn.get(), op, false, applyOp, applyCmd, _incOps)); ASSERT_TRUE(applyCmdCalled); ASSERT_EQUALS(1U, _opsApplied); } TEST_F(SyncTailTest, SyncApplyCommandThrowsException) { const BSONObj op = BSON("op" << "c" << "ns" << "test.t"); int applyCmdCalled = 0; SyncTail::ApplyOperationInLockFn applyOp = [&](OperationContext* txn, Database* db, const BSONObj& theOperation, bool convertUpdateToUpsert) { FAIL("applyOperation unexpectedly invoked."); return Status::OK(); }; SyncTail::ApplyCommandInLockFn applyCmd = [&](OperationContext* txn, const BSONObj& theOperation) { applyCmdCalled++; if (applyCmdCalled < 5) { throw WriteConflictException(); } return Status::OK(); }; ASSERT_OK(SyncTail::syncApply(_txn.get(), op, false, applyOp, applyCmd, _incOps)); ASSERT_EQUALS(5, applyCmdCalled); ASSERT_EQUALS(1U, _opsApplied); } } // namespace
The Daily 202: Kentucky governor, not sold on Trump, embraces his role as a Clinton foil From:[email protected] To: [email protected] Date: 2016-05-13 11:09 Subject: The Daily 202: Kentucky governor, not sold on Trump, embraces his role as a Clinton foil The Daily 202 from PowerPost Sponsored by Qualcomm | Why Republicans are unifying: They hate Hillary. If you're having trouble reading this, click here. <{{view_url}}> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG93ZXJwb3N0L3dwL2NhdGVnb3J5L3RoZS1kYWlseS0yMDIvP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1D08d3b013> Share on Twitter <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9pbnRlbnQvdHdlZXQ_dGV4dD1DaGVjayUyMG91dCUyMFRoZSUyMERhaWx5JTIwMjAyJTIwZnJvbSUyMCU0MFBvd2VyUG9zdCUyMGh0dHBzOi8vd3d3Lndhc2hpbmd0b25wb3N0LmNvbS9uZXdzL3Bvd2VycG9zdC9wYWxvbWEvZGFpbHktMjAyLzIwMTYvMDUvMTMvZGFpbHktMjAyLWtlbnR1Y2t5LWdvdmVybm9yLW5vdC1zb2xkLW9uLXRydW1wLWVtYnJhY2VzLWhpcy1yb2xlLWFzLWEtY2xpbnRvbi1mb2lsLzU3MzRjNWY1OTgxYjkyYTIyZDc2MmZlNC8mc291cmNlPXdlYmNsaWVudCZ3cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C39b5cde3> Share on Facebook <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cuZmFjZWJvb2suY29tL3NoYXJlci9zaGFyZXIucGhwP3U9aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG93ZXJwb3N0L3BhbG9tYS9kYWlseS0yMDIvMjAxNi8wNS8xMy9kYWlseS0yMDIta2VudHVja3ktZ292ZXJub3Itbm90LXNvbGQtb24tdHJ1bXAtZW1icmFjZXMtaGlzLXJvbGUtYXMtYS1jbGludG9uLWZvaWwvNTczNGM1ZjU5ODFiOTJhMjJkNzYyZmU0LyZ3cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Cc1ae1e84> <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2xpLndhc2hpbmd0b25wb3N0LmNvbS9jbGljaz9zPTEzNzM3MyZsYXlvdXQ9bWFycXVlZSZsaT0lN0IlN0JhZGhhc2glN0QlN0Qmd3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1B23cf7e6f> <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2xpLndhc2hpbmd0b25wb3N0LmNvbS9jbGljaz9zPTEzNzM3NiZzej0xMTZ4MTUmbGk9JTdCJTdCYWRoYXNoJTdEJTdEJndwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cff71f8b8> <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2xpLndhc2hpbmd0b25wb3N0LmNvbS9jbGljaz9zPTEzNzM3NyZzej02OXgxNSZsaT0lN0IlN0JhZGhhc2glN0QlN0Qmd3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Dcb0a7698> Kentucky governor, not sold on Trump, embraces his role as a Clinton foil <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG93ZXJwb3N0L3BhbG9tYS9kYWlseS0yMDIvMjAxNi8wNS8xMy9kYWlseS0yMDIta2VudHVja3ktZ292ZXJub3Itbm90LXNvbGQtb24tdHJ1bXAtZW1icmFjZXMtaGlzLXJvbGUtYXMtYS1jbGludG9uLWZvaWwvNTczNGM1ZjU5ODFiOTJhMjJkNzYyZmU0Lz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Ccc2e96ef> Kentucky Gov. Matt Bevin watching thoroughbreds train before daylight at Churchill Downs in Louisville last week. (AP Photo/Garry Jones) THE BIG IDEA: As she campaigns in Kentucky ahead of Tuesday’s primary, Hillary Clinton has repeatedly slammed Republican Gov. Matt Bevin on everything from health care to education. The businessman, elected unexpectedly last fall with promises to shake up Frankfort, has signaled that he wants to dismantle the state health exchange set up by his Democratic predecessor and move Kentuckians into the insurance market managed by the federal government. He’s in negotiations with the U.S. Department of Health and Human Services. When Clinton brings up Bevin at rallies, Democratic crowds boo. “I am saddened by what I hear may come out of the governor’s office here in Kentucky,” she said in Louisville this week. She even went to a family health center in Louisville to talk with doctors and draw attention to the issue. “I have to tell you, it just brought tears to my eyes,” she recalled to a crowd later in the day. “People who are getting health care for the first time in years … and it is so distressing to me when anybody in public life, who has all the health care he or she needs, wants to take it away from poor people, working poor people, small business people, and others who don’t have the health care they need.” Bill Clinton knocked Bevin yesterday during a three-city swing across the Bluegrass State, and his wife plans to do so again when she returns on Sunday and Monday. As she tries to finish off Bernie Sanders, this is a play to the base that dovetails nicely with Hillary’s broader strategy <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG93ZXJwb3N0L3BhbG9tYS9kYWlseS0yMDIvMjAxNi8wMy8wOC9kYWlseS0yMDItaGlsbGFyeS1jbGludG9uLWlzLXdpbm5pbmctd2l0aC1hLWh5cGVyLWxvY2FsLXN0cmF0ZWd5LzU2ZGUyMDQwOTgxYjkyYTIyZDc2MTJkNy8_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Ccf527713> to localize the presidential race as much as possible <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG93ZXJwb3N0L3BhbG9tYS9kYWlseS0yMDIvMjAxNi8wNC8xOC9kYWlseS0yMDItaGlsbGFyeS1jbGludG9uLXRhY2tsZXMtdGhlLW5ldy15b3JrLXByaW1hcnktbGlrZS1hLXNlbmF0ZS1jYW5kaWRhdGUvNTcxNDQwZDQ5ODFiOTJhMjJkMDNmM2UzLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Cc4a2e31f>. Her goal is to show progressives that she’s a fighter who is on their side and to demonstrate that she cares deeply about the issues that directly affect people’s lives. Hillary Clinton speaks with Bill Wagner, executive director of Family Health Centers, during a tour of his facility in Louisville on Tuesday. (AP Photo/Patrick Semansky) Bevin, in an interview with the 202, pushed back strongly against the Clintons. He argues that he’s not trying to take health coverage from anyone but working to make care more affordable and accessible. “An insurance card does not make you healthy,” he said. “You can crow about expanding this and that, but it doesn’t matter if you don’t improve outcomes. … And at the end of the day, it does have to be paid for. It’s not cheap.” “The Clintons have been surrounded by corruption their entire political lives,” the governor said. “I don’t use the term corruption lightly. … Go back to Arkansas and follow the trail. … Go back to Whitewater. Look at the foundations. Look at the pay to play.” Bevin is a self-made millionaire who owns several businesses. “People like them have become extremely wealthy by milking their connections,” he complained. He also said Clinton attacks him on health care so that the media does not cover her gaffe about putting lots of coal miners out of work. “She wants to destroy a key part of our state,” he said. “She wants to see coal wiped off the face of the Earth.” "Gov. Bevin can resort to personal attacks, but Hillary Clinton is going to remain focused on laying out how she'll fight for Kentucky families as president,” her spokesman Ian Sams responded. “Her commitment to tackling the challenges that young and working families face in accessing affordable health care and child care is quite a contrast with a Republican governor intent on taking away people's health insurance and cutting critical funding for higher education." Donald Trump arrives for his meeting with Paul Ryan yesterday. (Brendan Smialowski/AFP/Getty Images) -- Though few other elected officials still talk this way, Bevin maintains that no one has the Republican nomination definitely locked up until the convention in Cleveland, which he plans to attend. “Let me see who it will be,” he said, when asked whether he will support Donald Trump. “More than the party, I’m interested in people who are conservative. Sadly, the most conservative people are no longer in the race.” I asked Bevin if he considers Trump a conservative. “I’ll let people make their own determination on that,” he said. Then he referenced Matthew 7. “You can judge a tree by the fruit it bears,” he said. -- While Bevin may not be sold on Trump, his dripping disdain for both Clintons is genuine and deep. This, he made clear to me, will eventually get him off the sidelines. It may also be one of the reasons why so many elected Republicans ultimately unite behind The Donald. “I’ve been very, very, very clear from the beginning until now. In no way, shape or form do I want to see Hillary—or Bernie—get elected,” Bevin said. “The future of America is on trial. … We get the government we deserve.” Sheldon Adelson reads a deposition while testifying in a former employee's wrongful termination suit on April 28. (Jeff Scheid/Las Vegas Review-Journal via AP, Pool) -- Even Republican mega-donor Sheldon Adelson outlines his support for Trump with an an op-ed in today's Post: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL29waW5pb25zL3NoZWxkb24tYWRlbHNvbi1pLWVuZG9yc2UtZG9uYWxkLXRydW1wLWZvci1wcmVzaWRlbnQvMjAxNi8wNS8xMi9lYTg5ZDdmMC0xN2EwLTExZTYtYWE1NS02NzBjYWJlZjQ2ZTBfc3RvcnkuaHRtbD93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Cd51c6ba6> "I am endorsing Trump’s bid for president and strongly encourage my fellow Republicans — especially our Republican elected officials, party loyalists and operatives, and those who provide important financial backing — to do the same.” Welcome to the Daily 202, PowerPost's morning newsletter. With contributions from Breanne Deppisch (@breanne_dep <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9icmVhbm5lX2RlcD93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C7577cbff>) and Elise Viebeck (@eliseviebeck <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9lbGlzZXZpZWJlY2s_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C1609eef8>) Sign up to receive the newsletter. <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG93ZXJwb3N0L3dwL2NhdGVnb3J5L3RoZS1kYWlseS0yMDIvP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1E08d3b013> A gender neutral sign is posted outside a bathroom at Oval Park Grill in Durham, North Carolina. (Photo by Sara D. Davis/Getty Images) WHILE YOU WERE SLEEPING: -- The Obama administration is instructing schools across the nation to provide transgender access to facilities – including bathrooms and locker rooms – that match their chosen gender identity. From Juliet Eilperin <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3BvbGl0aWNzL29iYW1hLWFkbWluaXN0cmF0aW9uLXRvLWluc3RydWN0LXNjaG9vbHMtdG8tYWNjb21tb2RhdGUtdHJhbnNnZW5kZXItc3R1ZGVudHMvMjAxNi8wNS8xMi8wZWQxYzUwZS0xOGFiLTExZTYtYWE1NS02NzBjYWJlZjQ2ZTBfc3RvcnkuaHRtbD93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C6136315b>: “The letter from two top administration officials … effectively puts state and local officials on notice that they could lose federal aid if they confine students to areas or teams based on the gender that matches their birth certificate. Citing Title IX, which prohibits sex discrimination at schools that receive federal funding, the two officials warn the law imposes an ‘obligation’ on schools ‘to ensure nondiscrimination on the basis of sex requires schools to provide transgender students equal access to educational programs and activities even in circumstances in which other students, parents, or community members raise objections or concerns.’” Meanwhile, the White House says it will not decide whether to withhold federal funds from North Carolina until dueling lawsuits over its "bathroom bill” are resolved. The decision gives the Tar Heel State a temporary reprieve from the threat of losing billions of dollars in education funding. (Matt Zapotosky <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG9zdC1uYXRpb24vd3AvMjAxNi8wNS8xMi93aGl0ZS1ob3VzZS13b250LWtlZXAtZnVuZHMtZnJvbS1ub3J0aC1jYXJvbGluYS1iZWZvcmUtY291cnQtYmF0dGxlLW92ZXItdHJhbnNnZW5kZXItcmlnaHRzLWlzLXJlc29sdmVkLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C6b8044c5>) -- A federal appeals court granted an Alabama prisoner a stay of execution just hours before he was set to die by lethal injection. The inmate's attorneys argued he was not competent to be executed. Then, late last night, an evenly divided Supreme Court left the stay in place. It's another reminder of how high the stakes are in the fight over Merrick Garland. (Mark Berman <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG9zdC1uYXRpb24vd3AvMjAxNi8wNS8xMi9mZWRlcmFsLWFwcGVhbHMtY291cnQtZGVsYXlzLWFsYWJhbWEtaW5tYXRlcy1sZXRoYWwtaW5qZWN0aW9uLWhvdXJzLWJlZm9yZS1zY2hlZHVsZWQtZXhlY3V0aW9uLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Ca6e2410d>) -- 88,200 gallons of oil leaked from a Shell flow line into the Gulf of Mexico, about 90 miles off the coast of Louisiana. The U.S. Coast Guard says the leak has been secured and cleanup crews are on the way. There is a miles-long sheen on the water. (AP <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2JpZ3N0b3J5LmFwLm9yZy9hcnRpY2xlLzVlYzg0YmVhMjg5NzQzZGU5MWM2ODgwNDYwMDZhY2JkL2NvYXN0LWd1YXJkLXNoZWxsLWxpbmUtbGVha3MtODgyMDAtZ2FsbG9ucy1ndWxmP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C3fe69afc>) -- Lebanon’s Hezbollah militia just announced that its top military commander in the Syrian civil war died in a mysterious blast in Damascus, dealing a major blow to the powerful Iranian-backed group. "The killing of Mustafa Badreddine, 55, comes as Hezbollah struggles to balance combatting its traditional nemesis, Israel, with its costly intervention in the Syrian conflict to bolster President Bashar al-Assad’s forces against the rebellion," Hugh Naylor and Suzan Haidamous report <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3dvcmxkL2luLWJsb3ctdG8taGV6Ym9sbGFoLWEtc2VuaW9yLWNvbW1hbmRlci1pcy1raWxsZWQtaW4tc3lyaWEvMjAxNi8wNS8xMy81ZmMxOGY0OS05NWE0LTRiZDgtODllYy1hYmI2Y2M2NjUwYmRfc3RvcnkuaHRtbD93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Ca90e4ad0>. "He was linked to deadly attacks in 1983 on U.S. and French embassies in Kuwait, and was among four people indicted by a U.N. tribunal for involvement in the 2005 assassination of Lebanese Prime Minister Rafiq al-Hariri." GET SMART FAST:​​ Trump’s longtime former butler called for President Obama to be killed in a Facebook post, prompting a Secret Service investigation. The Trump campaign disavowed the statement. (Elahe Izadi <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG9zdC1wb2xpdGljcy93cC8yMDE2LzA1LzEyL3NlY3JldC1zZXJ2aWNlLXRvLWludmVzdGlnYXRlLWFmdGVyLXRydW1wcy1leC1idXRsZXItY2FsbHMtZm9yLW9iYW1hLXRvLWJlLWtpbGxlZC8_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C5eb8c6c3>) Former House Speaker Dennis Hastert will not appeal his 15-month prison sentence for violating banking reporting rules. (Matt Zapotosky <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG9zdC1uYXRpb24vd3AvMjAxNi8wNS8xMi9sYXd5ZXItZGVubmlzLWhhc3RlcnQtd29udC1hcHBlYWwtY29udmljdGlvbi1hbmQtc2VudGVuY2UvP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C986bc703>) Pope Francis told an international conference of nuns that he wants to create a commission to study the possibility of “reinstating” female deacons, potentially signaling a historic shift for the Roman Catholic Church. (Julie Zauzmer, Anthony Faiola and Michelle Boorstein <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvYWN0cy1vZi1mYWl0aC93cC8yMDE2LzA1LzEyL3BvcGUtZnJhbmNpcy13aWxsLXJlcG9ydGVkbHktc3R1ZHktdGhlLXBvc3NpYmlsaXR5LW9mLWZlbWFsZS1kZWFjb25zLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Cc2f780d7>) The EPA finalized the first federal regulations to govern emissions of methane from the oil and gas industry, the next step in Obama’s effort to combat climate change. (Chris Mooney and Brady Dennis <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvZW5lcmd5LWVudmlyb25tZW50L3dwLzIwMTYvMDUvMTIvb2JhbWEtYWRtaW5pc3RyYXRpb24tYW5ub3VuY2VzLWhpc3RvcmljLW5ldy1yZWd1bGF0aW9ucy1mb3ItbWV0aGFuZS1lbWlzc2lvbnMtZnJvbS1vaWwtYW5kLWdhcy8_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C123ebc2d>) Damage control: Facebook CEO Mark Zuckerberg wants to meet with influential conservatives to discuss allegations that the site prioritized left-leaning content in its “trending” section. “I want to have a direct conversation about what Facebook stands for and how we can be sure our platform stays as open as possible,” he said in a statement <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly9tLmZhY2Vib29rLmNvbS96dWNrL3Bvc3RzLzEwMTAyODMwMjU5MTg0NzAxP19yZHImd3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Cbbff5281>. The Senate struck a bipartisan deal over Zika funding, agreeing to provide $1.1 billion to battle the mosquito-borne virus. The compromise breaks a months-long standoff over how much spending is needed to address the growing public health threat. Now the House needs to act. (Kelsey Snell <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG93ZXJwb3N0L3dwLzIwMTYvMDUvMTIvc2VuYXRlLXJlYWNoZXMtZGVhbC1vbi16aWthLWZ1bmRpbmctd2lsbC12b3RlLXR1ZXNkYXkvP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C562a9c8e>) Someone on a list of Bridgegate “co-conspirators” is anonymously trying to get a judge to prevent the list from being released, arguing that its publication will “unfairly brand them a criminal.” (AP <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2t0YXIuY29tL3N0b3J5LzEwNzE5NTgvcGVyc29uLW9uLWJyaWRnZS1jb25zcGlyYWN5LWxpc3Qtd2FudHMtaXQta2VwdC1mcm9tLXB1YmxpYy8_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C905492bc>) Iran is suspending participation in the hajj pilgrimage as its relationship with Saudi Arabia chills. The two countries failed to agree on how pilgrims would receive visas. (Paul Schemm <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3dvcmxkL2lyYW4tc3VzcGVuZHMtcGFydGljaXBhdGlvbi1pbi1hbm51YWwtaGFqai1waWxncmltYWdlLWFzLXJlbGF0aW9ucy13aXRoLXNhdWRpLXBsdW1tZXQvMjAxNi8wNS8xMi9hMGUxYzk3MC0xODQ4LTExZTYtOTI0ZC04Mzg3NTMyOTVmOWFfc3RvcnkuaHRtbD93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C6ce42f9c>) U.S. troops have been stationed at two Libyan outposts since last year, tasked with lining up local partners in advance of a potential offensive against the Islamic State. (Missy Ryan <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3dvcmxkL25hdGlvbmFsLXNlY3VyaXR5L3VzLWVzdGFibGlzaGVzLWxpYnlhbi1vdXRwb3N0cy13aXRoLWV5ZS10b3dhcmQtb2ZmZW5zaXZlLWFnYWluc3QtaXNsYW1pYy1zdGF0ZS8yMDE2LzA1LzEyLzExMTk1ZDMyLTE4M2MtMTFlNi05ZTE2LTJlNWExMjNhYWM2Ml9zdG9yeS5odG1sP3RpZD1wbV93b3JsZF9wb3BfYiZ3cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Cc42e88d9>) A sailor has died in three out of the last four Navy SEAL training classes, raising questions over the safety and supervision of the grueling program. (Thomas Gibbons-Neff, Adam Goldman and Dan Lamothe <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvY2hlY2twb2ludC93cC8yMDE2LzA1LzEyL3RocmVlLWRlYXRocy1saW5rZWQtdG8tcmVjZW50LW5hdnktc2VhbC10cmFpbmluZy1jbGFzc2VzLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C371f0ef1>) Former New York Senate Majority leader Dean Skelos was sentenced to five years in federal prison after being convicted on corruption charges. It's another big win for U.S. Attorney Preet Bharara. (Matt Zapotosky <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG9zdC1uYXRpb24vd3AvMjAxNi8wNS8xMi9mb3JtZXItbmV3LXlvcmstc3RhdGUtc2VuYXRlLW1ham9yaXR5LWxlYWRlci1zZW50ZW5jZWQtdG8tZml2ZS15ZWFycy1pbi1mZWRlcmFsLXByaXNvbi8_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C1a3486f6>) No integrity: The former director of Russia's anti-doping laboratory said dozens of Putin's athletes at the 2014 Winter Olympics, including “at least 15 medal winners,” were part of a state-run doping initiative to ensure dominance in Sochi. “The director … said he developed a three-drug cocktail of banned substances that he mixed with liquor and provided to dozens of Russian athletes, helping to facilitate one of the most elaborate — and successful — doping ploys in sports history.” (New York Times <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy5ueXRpbWVzLmNvbS8yMDE2LzA1LzEzL3Nwb3J0cy9ydXNzaWEtZG9waW5nLXNvY2hpLW9seW1waWNzLTIwMTQuaHRtbD9fcj0wJndwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C5ead7fbe>) France’s Socialist government survived a no-confidence vote after it forced a controversial labor law through Parliament in a last-ditch attempt to curb unemployment before next year’s presidential election. (James McAuley <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3dvcmxkL2V1cm9wZS9mcmVuY2gtZ292ZXJubWVudC1zdXJ2aXZlcy1uby1jb25maWRlbmNlLXZvdGUtb3Zlci1yZWxheGluZy1vZi1sYWJvci1wcm90ZWN0aW9ucy8yMDE2LzA1LzEyLzg3YWM2ZjI4LTExNGEtMTFlNi1hOWI1LWJmNzAzYTVhNzE5MV9zdG9yeS5odG1sP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Ca58c0c88>) Apple said it has invested $1 billion in the Chinese ride-hailing service Didi Chuxing, an Uber competitor. It’s a rare investment aimed at reinvigorating slugging sales in the country. (Reuters <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy5yZXV0ZXJzLmNvbS9hcnRpY2xlL3VzLWFwcGxlLWNoaW5hLWlkVVNLQ04wWTQwNFc_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C4c2bf024>) -- Obamacare will be a major issue for a fourth election cycle in a row after Republicans won their most significant legal victory in years in the fight to eviscerate the law: A federal judge struck down a portion of the Affordable Care Act yesterday, ruling that Obama exceeded his authority in unilaterally funding a provision that sent billions of dollars in subsidies to health insurers. Spencer S. Hsu, Greg Jaffe and Lena H. Sun <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3BvbGl0aWNzL2p1ZGdlLXN0cmlrZXMtZG93bi1vYmFtYS1oZWFsdGgtbGF3LWluc3VyYW5jZS1zdWJzaWR5LWluLXZpY3RvcnktZm9yLWhvdXNlLWdvcC8yMDE2LzA1LzEyLzY3YThhZjc4LTE4NjMtMTFlNi05ZTE2LTJlNWExMjNhYWM2Ml9zdG9yeS5odG1sP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C5ff6ddc0>: "In a 38-page decision, U.S. District Judge Rosemary Collyer ... put her ruling on hold pending the administration’s certain appeal. ... The House GOP argued that the administration’s decision to subsidize deductibles, co-pays and other 'cost-sharing' measures was unconstitutional because Congress rejected an administration request for funding in 2014. Obama officials said they withdrew the request and spent the money, arguing that the subsidies were covered by an earlier, permanent appropriation." "The ruling, if upheld, could undermine the stability of the program because of the added financial burden it would place on insurers." "Under the ruling, in order for the subsidy payments to be constitutional, Congress would be required to pass annual appropriations to cover the subsidies’ cost." The Clinton-Bevin feud I mentioned up top also underscores the extent to which health care will again be a front-burner issue this year. Unaccompanied migrants in Texas (Rep. Henry Cuellar's Office/Handout via Reuters/2014 File Photo) -- Even if Trump was not the GOP nominee, immigration would still be a major issue too: “U.S. immigration officials are planning a month-long series of raids in May and June to deport hundreds of Central American mothers and children found to have entered the country illegally,” Reuters reports <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy5yZXV0ZXJzLmNvbS9hcnRpY2xlL3VzLXVzYS1pbW1pZ3JhdGlvbi1kZXBvcnRhdGlvbi1leGNsdXNpdmUtaWRVU0tDTjBZMzJKMT93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C1aeb3988>. “The operation would likely be the largest deportation sweep targeting immigrant families by the Obama administration this year after a similar drive over two days in January that focused on Georgia, Texas, and North Carolina. … Immigration and Customs Enforcement (ICE) has now told field offices nationwide to launch a 30-day ‘surge’ of arrests focused on mothers and children who have already been told to leave the United States … The operation would also cover minors who have entered the country without a guardian and since turned 18 years of age.” Both Hillary and Bernie strongly condemned this yesterday. <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy53YXNoaW5ndG9ucG9zdC5jb20vdmlkZW8vcG9saXRpY3MvaW4tMTk5MS1pbnRlcnZpZXctdHJ1bXAtc3Bva2VzbWFuLXNvdW5kcy1hLWxvdC1saWtlLXRydW1wLzIwMTYvMDUvMTIvOTY1YzgyZTItMTg4ZS0xMWU2LTk3MWEtZGFkZjlhYjE4ODY5X3ZpZGVvLmh0bWw_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Ce3cbb501> In 1991 interview, Trump spokesman sounds a lot like Trump <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2xpLndhc2hpbmd0b25wb3N0LmNvbS9jbGljaz9zPTE0Mjk1MSZsYXlvdXQ9bWFycXVlZSZsaT0lN0IlN0JhZGhhc2glN0QlN0Qmd3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Ef5172411> <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2xpLndhc2hpbmd0b25wb3N0LmNvbS9jbGljaz9zPTE0Mjk1NCZzej0xMTZ4MTUmbGk9JTdCJTdCYWRoYXNoJTdEJTdEJndwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Fb772ada2> <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2xpLndhc2hpbmd0b25wb3N0LmNvbS9jbGljaz9zPTE0Mjk1NSZzej02OXgxNSZsaT0lN0IlN0JhZGhhc2glN0QlN0Qmd3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1G8d155e34> The best story you will read today --> “The spokesman who knows Trump best: Himself <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3BvbGl0aWNzL2RvbmFsZC10cnVtcC1hbHRlci1lZ28tYmFycm9uLzIwMTYvMDUvMTIvMDJhYzk5ZWMtMTZmZS0xMWU2LWFhNTUtNjcwY2FiZWY0NmUwX3N0b3J5Lmh0bWw_YXNkZmsmd3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Ce3a1242a> ,” by Marc Fisher and Will Hobson: “The voice is instantly familiar; the tone, confident, even cocky; the cadence, distinctly Trumpian. The man on the phone vigorously defending Trump says he’s a media spokesman named John Miller, but then he says, ‘I’m sort of new here,’ and ‘I’m somebody that he knows and I think somebody that he trusts and likes.” … A recording obtained by The Post captures what New York reporters who covered Trump’s early career experienced in the 1970s, ’80s and ’90s: calls from Trump’s Manhattan office that resulted in conversations with ‘John Miller’ or ‘John Barron’ — public-relations men who sound precisely like Trump himself — who indeed are Trump, masquerading as an unusually helpful and boastful advocate for himself. In 1991, People’s Sue Carswell called Trump’s office seeking an interview. Within five minutes she got a return call from Miller, who immediately jumped into a “startlingly frank,” detailed explanation of why Trump dumped Marla Maples. “He really didn’t want to make a commitment,” Miller said. “He’s coming out of a marriage, and he’s starting to do tremendously well financially.” “Actresses,” Miller said in the call to Carswell, “just call to see if they can go out with him and things.’” Donald Trump's motorcade leaves the National Republican Senatorial Committee headquarters. (Photo by Drew Angerer/Getty Images) MR. TRUMP COMES TO WASHINGTON -- The roiling feud between Trump and Republican leaders reached a turning point with Thursday’s meetings, as the two sides declared their willingness to gloss over substantive policy differences and work together to defeat Clinton in November. But behind the public facade of harmony, House members and senators confronted Trump with concerns over specific policies or controversial statements that could hurt Republicans in the fall, including on foreign policy, immigration and paying down the national debt. In the Senate meeting, Trump listened as senators took turns raising issues of concern about his raucous campaign so far. Few would specify what details were discussed, preferring to emphasize that the gathering was cordial in tone. (Jose A. DelReal, Karoun Demirjian and Paul Kane <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3BvbGl0aWNzL3JlbHVjdGFudC1yZXB1YmxpY2FuLWxlYWRlcnMtdm93LXRvLXdvcmstd2l0aC10cnVtcC8yMDE2LzA1LzEyLzkzZGJhOTRjLTE4NGYtMTFlNi1hYTU1LTY3MGNhYmVmNDZlMF9zdG9yeS5odG1sP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Da54fe45e>) -- In other notable signs of unity: Jim Baker, the former Bush 41 Secretary of State and Reagan White House Chief of Staff, met with Trump at the offices of the Jones Day law firm. Lindsey Graham -- whose cell number Trump gave out during a rally last summer -- said he had a “cordial, pleasant phone conversation” with Trump, though he maintained he will not endorse him. “I gave him my assessment about where we stand in the fight against ISIL and the long-term danger posed by the Iranian nuclear deal. He asked good questions,” the South Carolina senator said in a press release. NRCC Chair Rep. Greg Walden backed Trump following the RNC meeting, saying he is “better than Clinton” for the country. Former Vice President Dan Quayle gave a full-throated endorsement <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3BvbGl0aWNzL3JlbHVjdGFudC1yZXB1YmxpY2FuLWxlYWRlcnMtdm93LXRvLXdvcmstd2l0aC10cnVtcC8yMDE2LzA1LzEyLzkzZGJhOTRjLTE4NGYtMTFlNi1hYTU1LTY3MGNhYmVmNDZlMF9zdG9yeS5odG1sP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Ea54fe45e> of Trump on the “Today Show,” calling him “more qualified” than Clinton. <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9tb3JuaW5nX2pvZS9zdGF0dXMvNzMxMDg5ODM3MzI3OTc0NDAwP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cf7959782> IN THE NAME OF UNITY, PAUL RYAN PICKS POLITICS OVER PRINCIPLE: -- Trump and Ryan struck a conciliatory tone: “While we were honest about our few differences, we recognize that there are also many important areas of common ground,” they said in a joint statement. “We will be having additional discussions, but remain confident there’s a great opportunity to unify our party and win this fall, and we are totally committed to working together to achieve that goal.” Ryan said he was “encouraged” but declined to officially "endorse" Trump at a press conference afterward: The Speaker called unifying the party a “process,” saying the efforts require more time and discussion. “Going forward, we’re going to go a little deeper in the policy weeds to make sure we have a better understanding of one another,” he said. -- This cop-out bypasses the deeper issue, Mike DeBonis explains <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG93ZXJwb3N0L3dwLzIwMTYvMDUvMTIvcGF1bC1yeWFucy1kaWxlbW1hLWxpZXMtaW4tZG9uYWxkLXRydW1wcy1oYW5kcy8_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Cb279d2f1>: “It has not been Trump’s adherence to gauzy principles that has been most troublesome for Ryan and the House Republicans who elected him speaker. Rather, it is the other aspects of his candidacy — the call for a ban on Muslim immigration, the kid-gloves treatment of white supremacists, the mocking of a disabled reporter, the refusal to denounce violence at his rallies — that have prompted Ryan and other party leaders to speak out.” For Ryan, the peril is clear: “Controversies of that magnitude are likely to persist and are certain to poison his ability to do what he sees as his life’s work: weaving small-government principles into the mainstream of American politics," Mike writes. "Associating himself with Trump’s controversial brand may not only have consequences for his House majority, but also dent his personal political ambitions. Now, after six-month stretch where Ryan has attempted to unite Republicans in pursuit of ideas, Trump is staking his claim as GOP leader with a campaign where ideas have largely been an afterthought." -- The upshot: Ryan will be asked to answer for every controversial thing Trump does and says between now and the election, which could be a miserable experience for him. -- Notably, the pressure Ryan faces to cave and fall in line is primarily from House colleagues and Reince Priebus, not the grassroots. A Remington poll <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cuZ29vZ2xlLmNvbS91cmw_c2E9dCZyY3Q9aiZxPSZlc3JjPXMmc291cmNlPXdlYiZjZD0yJmNhZD1yamEmdWFjdD04JnZlZD0wYWhVS0V3aWJ2ZURZLU5YTUFoWEZNU1lLSFYxb0JmTVFxUUlJSGpBQiZ1cmw9aHR0cDovL2VsZWN0aW9ucy53aXNwb2xpdGljcy5jb20vMjAxNi8wNS9yZW1pbmd0b24tcG9sbC1yeWFuLWxlYWRzLW5laGxlbi03OC0xNC5odG1sJnVzZz1BRlFqQ05FOXdLXzl0clZRVWI5RkIwdWF0UEFPOERkSExBJmJ2bT1idi4xMjIxMjk3NzQlMkNkLmVXRSZ3cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C4c373dca> shows the congressman leading GOP challenger Paul Nehlen 78 percent to 14 percent in his House district. -- Ryan's staff sought to downplay the import of his Trump detente: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9zcGVha2Vycnlhbi9zdGF0dXMvNzMwODAwOTM4NDY2ODU2OTYyP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Ce42d9c28> -- There was chaos outside the meetings. Jenna Johnson, Cristobal Vasquez and David A. Fahrenthold <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3BvbGl0aWNzL2EtZmFrZS10cnVtcC1hLWJhZ3BpcGVyLWFuZC1hLWd1eS13aXRoLWEtcmFtcy1ob3JuLW1lZXQtb24tdGhlLXNpZGV3YWxrLzIwMTYvMDUvMTIvZDFjYzExNzQtMTg0Zi0xMWU2LWFhNTUtNjcwY2FiZWY0NmUwX3N0b3J5Lmh0bWw_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C0fa34542>: The scene on the streets captured "an election where Americans became so divided, they even forgot how to disagree.” (Melina Mara/The Washington Post) -- California allies launched a new pro-Trump super PAC with a goal of raising $20 million by July. From Matea Gold <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG9zdC1wb2xpdGljcy93cC8yMDE2LzA1LzEyL2NhbGlmb3JuaWEtYWxsaWVzLXJvbGwtb3V0LW5ldy1wcm8tdHJ1bXAtc3VwZXItcGFjLXdpdGgtYWltLW9mLXJhaXNpbmctMjAtbWlsbGlvbi1ieS1qdWx5Lz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Cb4f099d5>: The new group, Committee for American Sovereignty, was started by a group of California-based Trump supporters. Former state senator Tony Strickland will chair the group, while GOP strategist Doug Watts, who most recently worked with Ben Carson's presidential bid, has signed on as national executive director. Already, the organization has attracted a list of major donors … “Perhaps most significant is the participation of Nicholas Ribis Sr., the former chairman of Trump Hotel, Casino and Resorts, which will likely be read as a sign that Trump's circle has blessed the undertaking.” The push comes in response to a massive ad campaign bankrolled by pro-Clinton super PAC Priorities USA, set to be launched in the coming weeks. -- Trump will NOT change his tax plan, spokeswoman Hope Hicks said yesterday, after days of confounding statements from the campaign and the candidate himself. They’re pushing back on the idea he’ll raise taxes on the wealthy. -- That stipulated, an independent analysis of Trump’s tariff proposal finds that it could cost the average U.S. household more than $6,000 per year, with much of the burden falling on households with the lowest incomes. “We find that a Trump tariff proposal against all countries would cost U.S. consumers $459 billion annually and $2.29 trillion over five years,” David Tuerck and Paul Bachman, a pair of economists at Suffolk University in Boston, write for the nonpartisan National Foundation for American Policy. -- They just don't get it: Eric Trump says Hispanic voters regularly tell him they "can’t wait” for his father to be president: “You know, I have more Hispanics come up to me telling me, ‘listen, I can’t wait for your father to be president. He’s gonna bring jobs back to the United States. He’s gonna end the nonsense,” Eric Trump said in a radio interview. “I see so little of the divisiveness, which is interesting. You watch it on TV, but you see so little of it out in the field.” (Buzzfeed <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cuYnV6emZlZWQuY29tL2FuZHJld2thY3p5bnNraS9lcmljLXRydW1wLWhpc3Bhbmljcy10ZWxsLW1lLXRoZXktY2FudC13YWl0LWZvci1teS1kYWQtdG8tYmU_dXRtX3Rlcm09LnF1eFBvbTFuWCZ3cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAyIy5hc0dOeG9lNXo/55c8886a6e4adc304b9cf8c1C199b66e7>) -- Shot: “No, Trump has not softened his stance on banning Muslims,” Jenna Johnson reports. <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3BvbGl0aWNzL25vLWRvbmFsZC10cnVtcC1oYXMtbm90LXNvZnRlbmVkLWhpcy1zdGFuY2Utb24tYmFubmluZy1tdXNsaW1zLzIwMTYvMDUvMTIvNmVjOGQ1MTQtMTg1Yy0xMWU2LWFhNTUtNjcwY2FiZWY0NmUwX3N0b3J5Lmh0bWw_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C9e3ccda9> -- Chaser: “Anti-Muslim bigotry aids Islamist terrorists,” David Petraeus writes in an op-ed for today's Post <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL29waW5pb25zL2RhdmlkLXBldHJhZXVzLWFudGktbXVzbGltLWJpZ290cnktYWlkcy1pc2xhbWlzdC10ZXJyb3Jpc3RzLzIwMTYvMDUvMTIvNWFiNTA3NDAtMTZhYS0xMWU2LTkyNGQtODM4NzUzMjk1ZjlhX3N0b3J5Lmh0bWw_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Caf0d9ed2>. <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9wL0JGVVoyRFdHaFI2Lz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C256f5231> -- In the context of his adamant refusal to allow a hearing or a vote on Merrick Garland, Democrats are having a field day with this Mitch McConnell quote from a floor speech yesterday: “We're going to give the Senate every opportunity to do the basic work of government this year. And some have said because it is an election year, you can't do much. I'd like to remind everyone, we've had a regularly scheduled election in this country every two years since 1788, right on time. I've heard people say, well, we can't do it because we have an election next year. And people have said, we can't do whatever it is because we have an election this year. It is not an excuse not to do our work!” -- The Kochs pick a side in the civil war, as their political network decides to spend against a GOP incumbent. Americans for Prosperity is planning a major expenditure to defeat Rep. Renee Ellmers (R-N.C.) in her June primary. This is the first time they’ve targeted a sitting Republican member of Congress. “AFP plans to target voters in Ellmers’ district with six-figures worth of advertising, including five to eight separate mailers, as well as digital ads on streaming platforms, like YouTube, Facebook and Hulu, in the four weeks leading up to the June 7 primary,” per Politico’s Elena Schneider <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy5wb2xpdGljby5jb20vc3RvcnkvMjAxNi8wNS9rb2NoLWdyb3VwLXRhcmdldHMtcmVuZWUtZWxsbWVycy0yMjMxMjQ_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Cfa2ed093>. MORE ON THE DEMOCRATIC RACE: Hillary Clinton meets with medical professionals in Camden, New Jersey on Wednesday. (Photo by Melina Mara/The Washington Post) -- “To fend off Trump, Clinton moves to defend Rust Belt blue states <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3BvbGl0aWNzL2FnYWluc3QtdHJ1bXAtY2xpbnRvbi1pcy1wcmVwYXJpbmctYW4tZXhwYW5kZWQtbGlzdC1vZi1iYXR0bGVncm91bmQtc3RhdGVzLzIwMTYvMDUvMTIvY2ZlOGUzYjQtMTdiNC0xMWU2LTkyNGQtODM4NzUzMjk1ZjlhX3N0b3J5Lmh0bWw_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Cd6260b3c> ,” by Abby Phillip: “Clinton is preparing to dispatch resources to vote-rich industrial states that have been safely Democratic for a generation. Clinton’s plans include an early, aggressive attempt to defend Pennsylvania, Wisconsin and Michigan — reflecting a growing recognition inside her campaign of the threat that Trump’s unconventional bid for president may pose in unexpected places, particularly in economically struggling states that have been hit hard by global free-trade agreements. Clinton performed poorly against Sanders in Democratic primaries in this part of the country … and [similar] factors could work against her with Trump, who has criticized her positions on trade and has also found deep appeal among the working class.” Clinton strategist Joel Benenson acknowledges Trump’s popularity among white, working-class voters, could make the country’s industrial midsection more competitive: “There is no state where they can put us on defense that we don’t already treat as a battleground. The key here is to really protect the territory we have to protect, then play offense.” -- The Clinton Global Initiative set up a $2 million financial commitment to benefit a private company partly-owned by friends of Bill, and the former president personally intervened to get a federal grant. From the Wall Street Journal's James Grimaldi <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy53c2ouY29tL2FydGljbGVzL2NsaW50b24tY2hhcml0eS1haWRlZC1jbGludG9uLWZyaWVuZHMtMTQ2MzA4NjM4Mz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Cd5bf1d98>: The company, Energy Pioneer Solutions Inc., was founded by Scott Kleeb, a Democrat who twice ran for Congress from Nebraska. A 2009 document showed it as owned 29 percent by Kleeb and 29 percent by Julie Tauber McMahon, a close friend of Bill, who also lives in Chappaqua … The $2 million commitment to the company was placed on the agenda for a 2010 conference of the Clinton Global Initiative at Bill Clinton’s urging. In another boost for the firm, he also personally endorsed the company to then-Energy Secretary Steven Chu for a federal grant that year. Under federal law, tax-exempt charitable organizations aren’t supposed to act in anyone’s private interest but instead in the public interest, on broad issues such as education or poverty." Here is how the story is getting picked up in the Big Apple: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9ueXBvc3Qvc3RhdHVzLzczMTA4MTI1Njg4OTM5NzI0OD93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Cd9b3ffe8> -- Last night, Hillary attended two high-dollar fundraisers in New York City. The first, from 6:15 p.m. to 7:45 p.m., was at the home of Maureen White and Steven Rattner. Approximately 15 attendees contributed $100,000+ to attend. Then, from 8:15 p.m. to 9:45 p.m., she went to the home of Lynn Forester de Rothschild. Another 15 people ponied up more than 100K to attend. -- In another nod to the Elizabeth Warren wing of the party, Clinton’s campaign announced that she supports REMOVING BANKERS from the Federal Reserve’s regional boards of directors. (Ylan Q. Mui) <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3Mvd29uay93cC8yMDE2LzA1LzEyL2hpbGxhcnktY2xpbnRvbi10by1zdXBwb3J0LWZlZGVyYWwtcmVzZXJ2ZS1jaGFuZ2Utc291Z2h0LWJ5LWxpYmVyYWxzLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Ca5947e59> -- Democrats are also struggling with intraparty unity: “Where bean-counters point out that Sanders’s Indiana and West Virginia wins did not get him the delegates he needed to catch Clinton,” David Weigel <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3BvbGl0aWNzL2FzLXNhbmRlcnNzLWNoYW5jZXMtdmFuaXNoLXRoZS1tb3ZlbWVudC1iZWhpbmQtaGltLWdyb3dzLzIwMTYvMDUvMTEvNDIzMThjOWMtMTc5MS0xMWU2LTllMTYtMmU1YTEyM2FhYzYyX3N0b3J5Lmh0bWw_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C75b12988> writes, “Bernie’s army sees momentum begetting more momentum.” A headache — and a paradox: "When they discuss the coming primaries in Oregon and in their own states, Democrats no longer conceal a desire to wrap this up. And yet, Clinton’s strategy of riding out the nomination fight — and turning her attention to the general election — may be hardening the beliefs of Sanders voters. She cannot take full advantage of the split in Trump’s GOP without a strong left flank accusing her of selling it out." Sanders supporters on the West Coast have almost overwhelmingly rejected the math, maintaining there is a path forward for the senator from Vermont. “He’s going to win the whole west coast,” said Angelique Orman, 44, relaxing on the lawn of a massive Sanders rally. “The conscience factor is working for him. Everyone I know there is voting for him.” Sanders greets supporters during a campaign rally in Salem, Ore. (AFP/Rob Kerr) ZIGNAL INSIGHT: Bernie buzz is fading online. Our analytics partners at Zignal Labs note that he's getting relatively fewer mentions on social media, and his share of voice is diminished. The trend line is bad for him over several months. This is how the conversation about the Democratic contest looked THIS WEEK: And here is how it looked LAST WEEK: -- But, but, but: This bodes quite well for Bernie's hopes in California: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9taWtlbWVtb2xpL3N0YXR1cy83MzA5MTI0OTY4OTExMzgwNDg_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Ce90f924d> -- The Clinton campaign sought to link Trump with George Zimmerman <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG9zdC1wb2xpdGljcy93cC8yMDE2LzA1LzEyL2dlb3JnZS16aW1tZXJtYW4taW5zZXJ0ZWQtaGltc2VsZi1pbnRvLTIwMTYtcG9saXRpY3Mtbm93LWEtY2xpbnRvbi1hbGx5LWlzLXR5aW5nLWhpbS10by10cnVtcC8_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Ce2513209>after the Floridian tried to auction the gun he used to kill Trayvon Martin. Trayvon's mother is an active Hillary surrogate: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9IaWxsYXJ5Q2xpbnRvbi9zdGF0dXMvNzMwODEwMTgwNDEwMTY3Mjk3P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Ca850beae> <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2xpLndhc2hpbmd0b25wb3N0LmNvbS9jbGljaz9zPTE0Mjk1NiZsYXlvdXQ9bWFycXVlZSZsaT0lN0IlN0JhZGhhc2glN0QlN0Qmd3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Hc718f6c4> <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2xpLndhc2hpbmd0b25wb3N0LmNvbS9jbGljaz9zPTE0Mjk1OSZzej0xMTZ4MTUmbGk9JTdCJTdCYWRoYXNoJTdEJTdEJndwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1I6ec4a9b2> <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2xpLndhc2hpbmd0b25wb3N0LmNvbS9jbGljaz9zPTE0Mjk2MCZzej02OXgxNSZsaT0lN0IlN0JhZGhhc2glN0QlN0Qmd3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Jb6a35d91> THE AIR WAR: The volume of campaign advertising in 2016 has risen by 122 percent compared to 2012, according to a study from the Wesleyan Media Project <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL21lZGlhcHJvamVjdC53ZXNsZXlhbi5lZHUvcmVsZWFzZXMvYWQtc3BlbmRpbmctb3Zlci00MDAtbWlsbGlvbi8_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C88deace4> . Television ads have more than doubled levels of the previous election, with campaigns and outside group spending $408 million to air 480,000 ads. (By comparison, fewer than 220,000 ads had aired by this point 2012 cycle, at an estimated cost of $120 million.) Sanders was featured in the highest number of ads overall, with nearly 125,000 aired since Jan. 2015. Trump, by contrast, was featured in just 33,000. Republicans have increased advertising volume by 80 percent since 2012, while Democrats are roughly on par with 2008 levels. And the sources of party ad spending are very different: “While over 98 percent of Democratic ad spending was done by the candidates’ campaigns themselves, only 24 percent of Republican ad spending was candidate-sponsored. The rest came from groups, many of them single-candidate super PACs.” -- Democrats hold a registration advantage over Republicans in four of seven battleground states likely to play a central role in this year’s presidential election -- even as Republicans and independents have made gains. From Bloomberg’ s John McCormick <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy5ibG9vbWJlcmcuY29tL3BvbGl0aWNzL2FydGljbGVzLzIwMTYtMDUtMTMvYmF0dGxlZ3JvdW5kLXN0YXRlLXJlZ2lzdHJhdGlvbi1naXZlcy1kZW1vY3JhdHMtZWFybHktZWRnZT93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C16edc33d>: “The party that now controls the White House is ahead in registered voters in Florida, Nevada, North Carolina and Pennsylvania, while Republicans hold the lead in Colorado, Iowa and New Hampshire … Three other likely battlegrounds -- Ohio, Virginia and Wisconsin -- don’t register voters by party. Obama won nine of those 10 states in 2012, with the exception being a roughly 2-percentage-point loss in North Carolina. As an expected general election contest between Trump and Clinton comes into focus, the states included in the analysis where Democrats hold a registration advantage have a combined 70 electoral votes, while the ones where Republicans have an edge account for 19.” The push to register new voters will accelerate throughout the summer and fall, with the parties, non-profit organizations, and the campaigns spending millions to try to gain the upper hand.” The push to register new voters will accelerate into the fall, with the parties, campaigns and non-profit organizations spending millions to try to gain the upper hand. Secret Service agents stand guard outside the NRSC while Mitch McConnell and his leadership team meet with Trump. (AFP/Getty Images) SOCIAL MEDIA SPEED READ: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9ta3JhanUvc3RhdHVzLzczMDgzMDIxNTIwMzcyNTMxNz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C36325284> Several marquee names spoke at a Las Vegas conference for guys who run hedge funds. Some highlights: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9QaGlsX01hdHRpbmdseS9zdGF0dXMvNzMwNzgzOTg4OTQ4ODQ4NjQxP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Ce8c48246> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9QaGlsX01hdHRpbmdseS9zdGF0dXMvNzMwNzg0NTM2NDgxNjYwOTI4P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C394cf629> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9QaGlsX01hdHRpbmdseS9zdGF0dXMvNzMwNzk2NTgwMzIwNzUxNjE3P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C408fdb79> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9QaGlsX01hdHRpbmdseS9zdGF0dXMvNzMwNzk4MTYxNjUzMDc1OTY4P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C6daff024> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9QaGlsX01hdHRpbmdseS9zdGF0dXMvNzMwNzk3MTg3Mzc0OTc3MDI0P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cf6d6c86f> Twitter users went all-in on jokes about Trump's butler: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9zYW1zdGVpbmhwL3N0YXR1cy83MzA4NzAxMTU2OTMxMzM4MjQ_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Ca8b883e2> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9vd2lsbGlzL3N0YXR1cy83MzA4NDc5Njk2NTQ3NTUzMjg_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C6b38c0aa> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9LYWdyb1gvc3RhdHVzLzczMDg4NDY0NDQzMDg4MDc2OT93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C7a9d9516> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9jaGFybGVzX2dhYmEvc3RhdHVzLzczMDg4MDQyOTgwNTM0MjcyMT93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C1b2d92ca> Check out scenes from outside the RNC as Trump met with Ryan: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9taWtlZGVib25pcy9zdGF0dXMvNzMwNzM4NTc5MDI3MTY5MjgwP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cfbcf37a2> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9XYVBvU2Vhbi9zdGF0dXMvNzMwNzQzMDg3NDg0Mzk1NTIwP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cb00015da> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS93cGplbm5hL3N0YXR1cy83MzA3NTIwMzY0MjYzOTk3NDY_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C5a2b00c6> Anti-Trump protesters delivered taco salads to Republican lawmakers: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9lZGF0cG9zdC9zdGF0dXMvNzMwODA0NTk1MjYyMzk0MzY4P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C24f94788> CNN's coverage of Trump's plane had journalists across the mainstream media up in arms: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9HbGVubktlc3NsZXJXUC9zdGF0dXMvNzMwODE3NzYyNDgyODUxODQwP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C54cee497> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9qb253YXJkMTEvc3RhdHVzLzczMDgyMDQ5OTQyMTQyOTc2MT93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C6de81d31> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9kYXZld2VpZ2VsL3N0YXR1cy83MzA4MjI3ODEzNzg2NTgzMDY_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C2142f229> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9zYW1zdGVpbmhwL3N0YXR1cy83MzA4MjQ4MTUyNzIxNjk0NzM_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C20ce4669> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9zYW1zdGVpbmhwL3N0YXR1cy83MzA4MjU4NjYzNjQ3NjgyNTY_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C688007f3> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9HbGVublRocnVzaC9zdGF0dXMvNzMwODI1NzQ5NzU0NzIwMjU3P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C395e7254> Here's an example of the one-on-one photo that every senator who met with Trump reportedly got: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9Kb2huQ29ybnluL3N0YXR1cy83MzA4MTEzMjE3OTc3MDk4MjQ_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C75a51335> Ryan got plenty of attention of his own following the Trump meeting: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9waGlsaXBydWNrZXIvc3RhdHVzLzczMDc4Mjg2NzQ1OTA4NDI4OT93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C81a2f0d0> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9rYXNpZS9zdGF0dXMvNzMwNzc2NzQwMzQwMTA5MzE0P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C73bc6923> Elizabeth Warren and Keith Ellison went on the attack: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9TZW5XYXJyZW4vc3RhdHVzLzczMDg0MDUyNjI5MTkxMDY1Nj93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C8f6dadb7> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9rZWl0aGVsbGlzb24vc3RhdHVzLzczMDc5ODg4ODQzMzY1OTkwNT93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Cb89f8b42> Bill Kristol continues trying to marshal The Republican Resistance: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9iaWxsa3Jpc3RvbC9zdGF0dXMvNzMwNzgyMDQ2MDQ2NTUyMDY1P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Caa6e90f7> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9iaWxsa3Jpc3RvbC9zdGF0dXMvNzMwNzc3NzQwNzU3MTE0ODgwP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C5acdd886> George W. Bush's deputy White House press secretary: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS90b255ZnJhdHRvL3N0YXR1cy83MzA3ODUwMjIxNjExMzM1Njg_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Cb9edc599> In that vein, a joke about the opioid bills on the House floor this week: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9tcmRhbnphay9zdGF0dXMvNzMwNzgzODY4NDI5NzMzODkzP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C322efe78> Breitbart reporter Charlie Spiering took away this conclusion from the White House briefing: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9jaGFybGllc3BpZXJpbmcvc3RhdHVzLzczMDgxMDQwMDMyMTU4OTI0OD93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C6f4513cc> The Arkansas senator replied this way: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9Ub21Db3R0b25BUi9zdGF0dXMvNzMwODQ4ODEzMzQ3NDM4NTkyP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Ce8926857> House Oversight Committee Chairman Jason Chaffetz said Cotton will testify if Ben Rhodes agrees to appear: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9qYXNvbmludGhlaG91c2Uvc3RhdHVzLzczMDg1MDQzNjA5ODQ5MDM3Mj93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C50e0e49b> The Senate Majority Whip uses bitmoji: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9Kb2huQ29ybnluL3N0YXR1cy83Mjk0MDg2NjM4ODMwMDU5NTI_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C6cbce73e> Rep. Tom Graves (R-Ga.) snapped a selfie with visiting students: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9wL0JGVVBON1pHNjBtLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C94c21e55> Sen. Pat Leahy (D-Vt.), an avid photographer, has been eagerly capturing D.C.'s foggy weather this week: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cuaW5zdGFncmFtLmNvbS9wL0JGVHk3Q0JPV0RfLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C56120838> <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9zYWhpbGthcHVyL3N0YXR1cy83MzA4MTc4Mjc5MjI0MTE1MjE_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Cce9393f1> The Fix's Chris Cillizza agrees with Stewart <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvdGhlLWZpeC93cC8yMDE2LzA1LzEyL2pvbi1zdGV3YXJ0LXBlcmZlY3RseS1kaWFnbm9zZWQtdGhlLXByb2JsZW0td2l0aC1oaWxsYXJ5LWNsaW50b25zLWNhbmRpZGFjeS8_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C2992d916>. GOOD READS FROM ELSEWHERE: -- Wall Street Journal op-ed by Michael Bloomberg and Charles Koch <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy53c2ouY29tL2FydGljbGVzL3doeS1mcmVlLXNwZWVjaC1tYXR0ZXJzLW9uLWNhbXB1cy0xNDYzMDkzMjgwP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cf5b4629b> : “Why Free Speech Matters on Campus.” During college commencement season, it is traditional for speakers to offer words of advice to the graduating class. But this year the two of us -- who don’t see eye to eye on every issue-- believe that the most urgent advice we can offer is actually to college presidents, boards, administrators and faculty. Our advice is this: Stop stifling free speech and coddling intolerance for controversial ideas, which are crucial to a college education—as well as to human happiness and progress. Across America, college campuses are increasingly sanctioning so-called ‘safe spaces’ … ‘microaggresions’ and the withdrawal of invitations to controversial speakers. We believe that this new dynamic, which is doing a terrible disservice to students, threatens not only the future of higher education, but also the very fabric of a free and democratic society. The purpose of a college education isn’t to reaffirm students’ beliefs, it is to challenge, expand and refine them—and to send students into the world with minds that are open and questioning, not closed and self-righteous." -- The Guardian, “Facebook news selection is in hands of editors not algorithms, documents show <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cudGhlZ3VhcmRpYW4uY29tL3RlY2hub2xvZ3kvMjAxNi9tYXkvMTIvZmFjZWJvb2stdHJlbmRpbmctbmV3cy1sZWFrZWQtZG9jdW1lbnRzLWVkaXRvci1ndWlkZWxpbmVzP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cad4c9ef2> ,” by Sam Thielman: “Leaked documents show how Facebook, now the biggest news distributor on the planet, relies on old-fashioned news values on top of its algorithms to determine what the hottest stories will be for the 1 billion people who visit the social network every day. The boilerplate about its news operations provided to customers by the company suggests that much of its news gathering is determined by machines: ‘The topics you see are based on a number of factors including engagement, timeliness, pages you’ve liked’ … But the documents show that the company relies heavily on the intervention of a small editorial team to determine what makes its ‘trending module’ headlines … The guidelines show human intervention – and therefore editorial decisions – at almost every stage of Facebook’s trending news operation, a team that at one time was as few as 12 people.” -- Politico, “Trump campaign eyes #NeverTrump blacklist <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy5wb2xpdGljby5jb20vc3RvcnkvMjAxNi8wNS90cnVtcC1jYW1wYWlnbi1leWVzLW5ldmVydHJ1bXAtYmxhY2tsaXN0LTIyMzE0Nz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Ce5f739d3> ,” by Kenneth P. Vogel and Ben Schreckinger: “As Trump moves to work in closer concert with the RNC apparatus, some campaign aides and allies are pushing him to block lucrative party contracts from consultants who worked to keep him from winning the nomination … The blacklist talk — which mostly targets operatives who worked for Never Trump groups, but also some who worked for Trump’s GOP presidential rivals or their supportive super PACs — strikes against a Republican consulting class that Trump has assailed as a pillar of a corrupt political establishment. If Trump’s team makes good on the blacklist, it could elevate a whole new crop of vendors, while penalizing establishment operatives who attacked him, often in deeply personal terms. But it also could put Trump’s campaign at a competitive disadvantage as it scrambles to quickly beef up capabilities in highly technical campaign tactics that it largely eschewed in the primary.” HOT ON THE LEFT “Baltimore Cop’s Defense: It Wasn’t Safe To Buckle Freddie Gray’s Seatbelt,” from HuffPost <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy5odWZmaW5ndG9ucG9zdC5jb20vZW50cnkvaXQtd2FzbnQtc2FmZS10by1idWNrbGUtZnJlZGRpZS1ncmF5cy1zZWF0YmVsdF91c181NzM1MTcyNGU0YjA3N2Q0ZDZmMmFjN2I_dXRtX2hwX3JlZj1wb2xpdGljcyZ3cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C9a02fded> : “Thursday was the first day of trial proceedings for Nero, the second of six officers indicted in [Freddie] Gray’s death — and it was dominated by discussion of whether Gray should have been buckled up, and what discretion officers have on following the department’s policy for buckling up suspects. It’s no question that not being secured into the police van caused Gray to sustain spinal cord injuries similar to those of high-speed crash victims. There is also no dispute that securing suspects was department protocol.” One city official identified the recently-announced seatbelt amendment a “best practice.” HOT ON THE RIGHT “Canadian Border Presents Its Own Security Concerns For United States,” from CBS New York <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL25ld3lvcmsuY2JzbG9jYWwuY29tLzIwMTYvMDUvMTEvY2FuYWRpYW4tYm9yZGVyLWNvbmNlcm5zLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C20ad6f0d> : “The U.S.-Mexico border has been a topic of much debate this election season. But should our national attention be more focused toward our neighbors to the north? The Canadian border … presents its own challenges ... All that separates the two countries for miles at a time is a split rail fence that you’d find in any ordinary backyard. ‘We see alien smuggling. We see narcotic smuggling. We see currency smuggling,’ Border Patrol Operations Officer Brad Brandt said. Agents said much of that activity is heading directly to New York City and our suburbs where the product is sold on our streets. ‘There is a significant amount of violence that is associated with these drugs,’” said a DEA agent. DAYBOOK: On the campaign trail: Here's the rundown: Bill Clinton: Paterson, Ewing Township, N.J. Sanders: Fargo, Bismarck, N.D. At the White House: President Obama hosts the President of Finland and the Prime Ministers of Norway, Sweden, Denmark and Iceland for meetings and a state dinner. Vice President Biden delivers the commencement address at Syracuse University Law School, then travels to D.C. for the state dinner. On Capitol Hill: The Senate is not in session. The House meets at 9 a.m. to vote on an amendment to an opioid bill. Final votes expected before 12:45 p.m. Two subcommittees of the House Oversight and Government Reform Committee will hold a hearing today on whether scrutinizing the social media accounts of federal workers should become a regular part of security investigations and if so, under what conditions. "The hearing comes as the Obama administration is preparing to announce a policy that officials have hinted <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cuZ292dGVjaHdvcmtzLmNvbS9pbnRlbC1jaGllZnMtZXllLXNvY2lhbC1tZWRpYS1mb3ItaW50ZXJuYWwtc2VjdXJpdHktcmlza3MvP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDIjZ3MuN1FDZHBTTQ/55c8886a6e4adc304b9cf8c1C847fcc45> will open the door to more searches of social media during those background checks," Eric Yoder reports <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvcG93ZXJwb3N0L3dwLzIwMTYvMDUvMTIvYmV3YXJlLXdoYXQteW91LXBvc3QtZmVkZXJhbC1lbXBsb3llZXMtbWF5LWZhY2UtZ292ZXJubWVudC1zbm9vcGluZy1vbi1zb2NpYWwtbWVkaWEvP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cd158aff2>. "The administration last month announced plans to test how the government could use such searches in those investigations, which determine eligibility to get–and keep–the security clearances that are required for many federal jobs. Congress meanwhile is considering a bill to require that type of scrutiny during background checks of intelligence agency employees." QUOTE OF THE DAY: “If I have my way, you’ll be living here,” Joe Biden told Elizabeth Warren when she visited the Naval Observatory last year. He was trying to convince her to be his VP. (Per the Boston Globe’s Annie Linskey <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy5ib3N0b25nbG9iZS5jb20vbmV3cy9uYXRpb24vMjAxNi8wNS8xMi9lbGl6YWJldGgtd2FycmVuLW9uY2UtcHJlc3NlZC12aWNlLXByZXNpZGVudC1lbWVyZ2luZy10b3AtZGVtb2NyYXRpYy1hdHRhY2stZG9nL3ZoVEdOVXMxck04dzJOSVZNNmFRYVAvc3RvcnkuaHRtbD93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C1ffd71d0> ) NEWS YOU CAN USE IF YOU LIVE IN D.C.: -- Still foggy, still gray, still meh (but TGIF!). The Capital Weather Gang <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvY2FwaXRhbC13ZWF0aGVyLWdhbmcvd3AvMjAxNi8wNS8xMy9kLWMtYXJlYS1mb3JlY2FzdC13YXJtZXItYW5kLW9jY2FzaW9uYWxseS1zdG9ybXktdGhyb3VnaC1zYXR1cmRheS10aGVuLWEtY29vbC1idXQtc2Vuc2F0aW9uYWxseS1zdW5ueS1zdW5kYXkvP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C40ca31f2> forecasts: “Morning patchy fog and showers are probable (80% chance) through midday. We can’t rule out a few (likely tame) thunderstorms too—especially into the early afternoon hours. From west to east we should ACTUALLY CLEAR and dry out as the cold front moves through during the afternoon. Afternoon high temperatures should still make it into the low-to-mid 70s, despite the cold front.” A profound (and accurate) observation: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9tY2tpbm5leWtlbHNleS9zdGF0dXMvNzMwNzI5Nzk2NjY2MzMxMTM4P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cb1e12c09> -- D.C. continues its WAR ON CARS: The municipal government is readying a new parking fee structure that sets hourly parking rates at $2.30 citywide, nearly doubling the cost of parking in non-commercial areas. Officials say the increase will generate up to $2 million in 2016, which they plan to spend on the Metro system. (Luz Lazo <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvZHItZ3JpZGxvY2svd3AvMjAxNi8wNS8xMi95b3VsbC1wYXktbW9yZS1hdC10aGUtbWV0ZXItYW5kLWQtYy13aWxsLW1ha2UtYW4tZXh0cmEtMi1taWxsaW9uLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C5583a444>) -- Maryland decertified the results of Baltimore’s primary election following widespread reports of fraud: Election officials said the number of ballots cast were “hundreds more” than the number of voters who checked in at polling places, and identified 80 provisional ballots that hadn’t been considered. While it does not appear likely the investigation will change results of Baltimore’s competitive mayoral primary, results in the U.S. Senate and presidential primary cannot be certified until the investigation is complete. (Fenit Nirappil <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL2xvY2FsL21kLXBvbGl0aWNzL21hcnlsYW5kLWRlY2VydGlmaWVzLWJhbHRpbW9yZS1lbGVjdGlvbi1yZXN1bHRzLWludmVzdGlnYXRlcy1pcnJlZ3VsYXJpdGllcy8yMDE2LzA1LzEyL2ZjYTZlMTI4LTE4NjEtMTFlNi05ZTE2LTJlNWExMjNhYWM2Ml9zdG9yeS5odG1sP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cbbc51f8b>) -- Virginia Gov. Terry McAuliffe (D) signed legislation to upend traditional high school requirements in the state, aiming to prioritize career preparation and technical opportunities alongside academic goals. (Moriah Balingit <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL2xvY2FsL2VkdWNhdGlvbi92YS1nb3Zlcm5vci1tb3Zlcy10by11cGVuZC10cmFkaXRpb25hbC1oaWdoLXNjaG9vbC8yMDE2LzA1LzEyLzI2ZTI5NGY4LTE4NWEtMTFlNi05MjRkLTgzODc1MzI5NWY5YV9zdG9yeS5odG1sP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C612cdb4c>) -- U.S. Rep. Mark Meadows (R-NC) warned that D.C. employees could face prosecution if the city council goes ahead with plans to spend local tax dollars without congressional approval, raising the stakes for the city’s renewed attempt to get statehood. (Aaron C. Davis <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL2xvY2FsL2RjLXBvbGl0aWNzL2hvdXNlLXJlcHVibGljYW5zLXdhcm4tZGMtbm90LXRvLWFzc2VydC1idWRnZXQtaW5kZXBlbmRlbmNlLzIwMTYvMDUvMTIvOWRlZGI3MjAtMTg0Yy0xMWU2LTkyNGQtODM4NzUzMjk1ZjlhX3N0b3J5Lmh0bWw_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C6a4e7fcf>) <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS9Sb25hbGRLbGFpbi9zdGF0dXMvNzMwODg3MDM2MzUwMTUyNzA0P3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1Cab0e8e5c> -- The faculty of George Mason law school passed a unanimous resolution <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvZ3JhZGUtcG9pbnQvd3AvMjAxNi8wNS8xMi9nZW9yZ2UtbWFzb24tbGF3LXNjaG9vbC1mYWN1bHR5LXN0cm9uZ2x5LWluLWZhdm9yLW9mLXRoZS1zY2FsaWEtbmFtZS8_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C3c3785ed>supporting the decision to rename the school after Antonin Scalia. VIDEOS OF THE DAY: Our colleague Dana Milbank promised to eat his column -- literally -- if Trump became the Republican nominee. In this video, he actually does that, in nine courses: <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy53YXNoaW5ndG9ucG9zdC5jb20vdmlkZW8vcG9saXRpY3Mvd2F0Y2gtZGFuYS1taWxiYW5rLWVhdHMtaGlzLXdvcmRzLWxpdGVyYWxseS8yMDE2LzA1LzEyLzg0YTk3ZTRjLTE4NWMtMTFlNi05NzFhLWRhZGY5YWIxODg2OV92aWRlby5odG1sP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C3b790bbb> Watch Dana Milbank eat his words, literally Stephen Colbert did a sketch on how Trump comes up with his nicknames: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g_dj1DcmE0N1Bkb2syZyZ3cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1F498cc551> Trump's Chief Nickname Strategist Makes Stephen Cry A Clinton surrogate got tongue-tied on stage: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly92aW5lLmNvL3YvaTI2aHRwVWlKdzc_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C55a453ba> The Pledge of Allegiance at a @HillaryClinton rally In another cringeworthy scene, Republican Senate candidate Jon Keyser of Colorado repeatedly delivers the same lines when pressed about forged signatures that allowed him to get on the primary ballot. A Fox anchor presses him four times to directly answer the question, and he just repeats the same talking points. Forever more, this sort of thing will be described as a Marco Rubio Moment <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL25ld3MvdGhlLWZpeC93cC8yMDE2LzA1LzEyL3RoZS1nb3BzLXRvcC1jb2xvcmFkby1zZW5hdGUtY2FuZGlkYXRlLWp1c3QtaGFkLWEtbWFyY28tcnViaW8tbW9tZW50Lz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C91f4e74d>: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g_dj03Z3I3VF93NlFjMCZ3cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Gff5ef490> Jon Keyser refuses to answer questions about fraudulent petition signatures Another reporter approached Keyser afterward to ask the same line of questions, and it is even worse. Watch here <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cuZmFjZWJvb2suY29tL3ZpZGVvLnBocD92PTEzMTM0MjY3NzUzMzc1ODkmd3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C89d9eea5>. (This does not bode well for GOP hopes of toppling Sen. Michael Bennet.) Speaking of Rubio, TMZ approached him on the street to ask how many hands he shook during the campaign. Clearly not enough, he responds gamely. <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g_dj0weTNoeFZYX2NMZyZ3cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1H975c6943> Marco Rubio -- So Here's Why I Lost The Rubio campaign later pushed back on a Talking Points Memo report <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3RhbGtpbmdwb2ludHNtZW1vLmNvbS9saXZld2lyZS9ydWJpby1rbm93cy1leGFjdGx5LXdoZW4tdGhlLWZpbGRpbmctZGVhZGxpbmUtaXMtdG8tcnVuLWZvci1mbG9yaWRhLXNlbmF0ZT93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C4051f214> that he might run for reelection to the Senate. "It was a joke," a spokesman said. California Rep. Darrell Issa, a Trump supporter, hopped a fence at RNC headquarters to get around protestors who were protesting Trump's plans to build a border fence: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly90d2l0dGVyLmNvbS92Z21hYy9zdGF0dXMvNzMwNzU5NzQxOTc1MjMyNTEyP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C12142bb5> Seth Meyers took a closer look at Trump and white nationalists: <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cueW91dHViZS5jb20vd2F0Y2g_dj1KY0Fac2hPX1hXUSZ3cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1Idf2a4e32> Trump and White Nationalists: A Closer Look Sanders toured Mt. Rushmore: <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy53YXNoaW5ndG9ucG9zdC5jb20vdmlkZW8vcG9saXRpY3Mvc2FuZGVycy10b3Vycy1tdC1ydXNobW9yZS8yMDE2LzA1LzEyLzI4Yzc0YzEyLTE4NjYtMTFlNi05NzFhLWRhZGY5YWIxODg2OV92aWRlby5odG1sP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C903dffeb> Sanders tours Mt. Rushmore Here's a lesson in how to predict (or not predict) elections, with an expert: <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy53YXNoaW5ndG9ucG9zdC5jb20vdmlkZW8vcG9saXRpY3MvaG93LXRvLXByZWRpY3QtdGhlLTIwMTYtZWxlY3Rpb24vMjAxNi8wNS8xMi8xNWVlYTZlMC0xODU2LTExZTYtOTcxYS1kYWRmOWFiMTg4NjlfdmlkZW8uaHRtbD93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C88b59cd9> How to predict the 2016 election Finally, watch random things take down drones: <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL3d3dy53YXNoaW5ndG9ucG9zdC5jb20vdmlkZW8vYnVzaW5lc3MvdGVjaG5vbG9neS90aGlzLWd1eS10b29rLWRvd24tYS1kcm9uZS13aXRoLWEtc3BlYXItc2VlLW90aGVyLXdlaXJkLXRoaW5ncy10YWtlLWRvd24tZHJvbmVzLzIwMTYvMDUvMTIvZWRjZWRhMGUtMTg1MC0xMWU2LTk3MWEtZGFkZjlhYjE4ODY5X3ZpZGVvLmh0bWw_d3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1C53ddcdaf> Watch a guy down a drone with a spear, and other strange drone takedowns You are receiving this email because you signed up for the The Daily 202 newsletter or were registered on washingtonpost.com <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3JlZ2lvbmFsLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C656e69c8>. For additional free newsletters or to manage your newsletters, click here <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly9zdWJzY3JpYmUud2FzaGluZ3RvbnBvc3QuY29tL25ld3NsZXR0ZXJzLz93cG1tPTEmd3Bpc3JjPW5sX2RhaWx5MjAy/55c8886a6e4adc304b9cf8c1C62678d20>. We respect your privacy <http://link.washingtonpost.com/click/6715877.463710/aHR0cHM6Ly93d3cud2FzaGluZ3RvbnBvc3QuY29tL3ByaXZhY3ktcG9saWN5LzIwMTEvMTEvMTgvZ0lRQVNJaWFpTl9zdG9yeS5odG1sP3dwbW09MSZ3cGlzcmM9bmxfZGFpbHkyMDI/55c8886a6e4adc304b9cf8c1C89d81521>. If you believe that this email has been sent to you in error, or you no longer wish to receive email from The Washington Post, click here <{{optout_confirm_url}}>. Contact us <http://link.washingtonpost.com/click/6715877.463710/aHR0cDovL2hlbHAud2FzaGluZ3RvbnBvc3QuY29tL2ljcy9zdXBwb3J0L0tCU3BsYXNoLmFzcD9kZXB0SUQ9MTUwODAmd3BtbT0xJndwaXNyYz1ubF9kYWlseTIwMg/55c8886a6e4adc304b9cf8c1Cb2c76b22> for help. ©2016 The Washington Post | 1301 K St NW, Washington DC 20071 If you believe this has been sent to you in error, please click <http://link.washingtonpost.com/oc/55c8886a6e4adc304b9cf8c13zy05.9xsu/39aa43d6> to safely unsubscribe.
def hvac_mode(self) -> str: mode = self._azc_zone.mode if self._azc_zone.is_on: if mode in ["air-cooling", "radiant-cooling", "combined-cooling"]: return HVAC_MODE_COOL if mode in ["air-heating", "radiant-heating", "combined-heating"]: return HVAC_MODE_HEAT if mode == "ventilation": return HVAC_MODE_FAN_ONLY if mode == "dehumidify": return HVAC_MODE_DRY return HVAC_MODE_OFF
/** * This is an enumerated class that defines legal values for * XML tags. * <p> * This file derived from a ccc/rmw version which was generated. * However, this one is NOT generated - this is the master. */ public class XMLPagesTag extends EnumBase { /** * Keep track of each final object created so that we * can convert a string name to the corresponding * XMLTag object. */ private static Hashtable nameTable = new Hashtable(); /** * If true, this tag represents an attribute * which can have only fixed values, which are themselves * XMLPagesTag objects. */ private boolean hasTagValue = false; /** * This constructor is private. Thus, no outside * class can create any instances of XMLPagesTag * other than those defined and assigned to constants, * below. */ private XMLPagesTag(String opName, boolean bTagValue) { super(opName); hasTagValue = bTagValue; nameTable.put(opName,this); } /** * return the data type associated with this name, or * null if there is no match with any defined datatype. */ public static XMLPagesTag lookUp(String tagName) { return (XMLPagesTag) (nameTable.get(tagName)); } public boolean hasTagValue() { return hasTagValue; } // Primary element types public static final XMLPagesTag VERSIONSELECTOR = new XMLPagesTag("versionSelector",false); public static final XMLPagesTag DEFAULTCATEGORY = new XMLPagesTag("defaultCategory",true); public static final XMLPagesTag STRING = new XMLPagesTag("string",false); public static final XMLPagesTag INDEX = new XMLPagesTag("index",false); public static final XMLPagesTag ATTRIBUTE = new XMLPagesTag("attribute",false); public static final XMLPagesTag HEADER = new XMLPagesTag("header",false); public static final XMLPagesTag DEFAULTSTR = new XMLPagesTag("defaultStr",false); public static final XMLPagesTag DEFAULTINDEX = new XMLPagesTag("defaultIndex",false); public static final XMLPagesTag PSPECSTR = new XMLPagesTag("pSpecStr",false); public static final XMLPagesTag VALIDATOR = new XMLPagesTag("validator",false); public static final XMLPagesTag DATAMAXCHARS = new XMLPagesTag("dataMaxChars",false); public static final XMLPagesTag DATATYPE = new XMLPagesTag("dataType",true); public static final XMLPagesTag FLAG = new XMLPagesTag("flag",false); public static final XMLPagesTag INTEGER = new XMLPagesTag("integer",false); public static final XMLPagesTag DOUBLE = new XMLPagesTag("double",false); public static final XMLPagesTag FLOAT = new XMLPagesTag("float",false); public static final XMLPagesTag READFILE = new XMLPagesTag("readFile",false); public static final XMLPagesTag WRITEFILE = new XMLPagesTag("writeFile",false); public static final XMLPagesTag FONT = new XMLPagesTag("font",false); public static final XMLPagesTag COLOR = new XMLPagesTag("color",false); public static final XMLPagesTag UTM = new XMLPagesTag("UTM",false); public static final XMLPagesTag POINT = new XMLPagesTag("point",false); public static final XMLPagesTag VECTOR = new XMLPagesTag("vector",false); public static final XMLPagesTag MATRIX = new XMLPagesTag("matrix",false); public static final XMLPagesTag DATARANGE = new XMLPagesTag("dataRange",false); public static final XMLPagesTag QUERY = new XMLPagesTag("query",false); public static final XMLPagesTag OVERWRITE = new XMLPagesTag("overwrite",false); public static final XMLPagesTag APPEND = new XMLPagesTag("append",false); public static final XMLPagesTag ERROR = new XMLPagesTag("error",false); public static final XMLPagesTag VIRTUALHEIGHT = new XMLPagesTag("virtualHeight",false); public static final XMLPagesTag VIRTUALWIDTH = new XMLPagesTag("virtualWidth",false); public static final XMLPagesTag DISPLAYOPTS = new XMLPagesTag("displayOpts",true); public static final XMLPagesTag HORIZONTAL = new XMLPagesTag("horizontal",false); public static final XMLPagesTag VERTICAL = new XMLPagesTag("vertical",false); public static final XMLPagesTag BORDER = new XMLPagesTag("border",false); public static final XMLPagesTag TTY = new XMLPagesTag("tty",false); // also, horizontal public static final XMLPagesTag COLUMNS = new XMLPagesTag("columns",false); public static final XMLPagesTag PLACEMENT = new XMLPagesTag("placement",false); /** Items for table description XML */ public static final XMLPagesTag CALCRESULT = new XMLPagesTag("calcResult",false); public static final XMLPagesTag CALCTYPE = new XMLPagesTag("calcType",true); public static final XMLPagesTag SIMPLETABLE = new XMLPagesTag("SimpleTable",false); public static final XMLPagesTag TEXTTABLE = new XMLPagesTag("TextTable",false); public static final XMLPagesTag WIDEMULTILINETABLE = new XMLPagesTag("WideMultiLineTable",false); public static final XMLPagesTag SIGNATURETABLE = new XMLPagesTag("SignatureTable",false); public static final XMLPagesTag HEADERTABLE = new XMLPagesTag("HeaderTable",false); public static final XMLPagesTag ROWCOUNT = new XMLPagesTag("rowCount",false); public static final XMLPagesTag ENCODING = new XMLPagesTag("encoding",false); public static final XMLPagesTag IDENTIFIER = new XMLPagesTag("identifier",false); public static final XMLPagesTag RESULTHEADER = new XMLPagesTag("resultHeader",false); public static final XMLPagesTag FIELDCOUNT = new XMLPagesTag("fieldCount",false); public static final XMLPagesTag DISPLAY = new XMLPagesTag("display",false); public static final XMLPagesTag FIELDID = new XMLPagesTag("fieldId",false); public static final XMLPagesTag DISPLAYKEY = new XMLPagesTag("displayKey",false); public static final XMLPagesTag ITEMCATEGORY = new XMLPagesTag("itemCategory",false); public static final XMLPagesTag ITEMINDEX = new XMLPagesTag("itemIndex",false); public static final XMLPagesTag DATE = new XMLPagesTag("date",false); public static final XMLPagesTag URL = new XMLPagesTag("url",false); public static final XMLPagesTag PREFIX = new XMLPagesTag("prefix",false); public static final XMLPagesTag TEXT = new XMLPagesTag("text",false); public static final XMLPagesTag DOCUMENT = new XMLPagesTag("document",false); public static final XMLPagesTag METASPEC = new XMLPagesTag("metaSpec",false); public static final XMLPagesTag ID = new XMLPagesTag("id",false); public static final XMLPagesTag NAME = new XMLPagesTag("name",false); public static final XMLPagesTag PAGESPEC = new XMLPagesTag("pageSpec",false); public static final XMLPagesTag TYPE = new XMLPagesTag("type",false); public static final XMLPagesTag LAYOUTSTYLE = new XMLPagesTag("layoutStyle",false); public static final XMLPagesTag PLACEMENTSPEC = new XMLPagesTag("placementSpec",false); public static final XMLPagesTag TOP = new XMLPagesTag("top ",false); public static final XMLPagesTag LEFT = new XMLPagesTag("left",false); public static final XMLPagesTag YCENTER = new XMLPagesTag("yCenter",false); public static final XMLPagesTag XCENTER = new XMLPagesTag("xCenter",false); public static final XMLPagesTag HEIGHT = new XMLPagesTag("height",false); public static final XMLPagesTag WIDTH = new XMLPagesTag("width",false); public static final XMLPagesTag TITLE = new XMLPagesTag("title",false); public static final XMLPagesTag HEADING = new XMLPagesTag("heading",false); public static final XMLPagesTag LEVEL = new XMLPagesTag("level",false); public static final XMLPagesTag PARAGRAPH = new XMLPagesTag("paragraph",false); public static final XMLPagesTag PREFORMATTEDTEXT = new XMLPagesTag("preformattedText",false); public static final XMLPagesTag FRAGMENT = new XMLPagesTag("fragment",false); public static final XMLPagesTag EQUATION = new XMLPagesTag("equation",false); public static final XMLPagesTag FORMAT = new XMLPagesTag("format",false); public static final XMLPagesTag LIST = new XMLPagesTag("list",false); public static final XMLPagesTag NUMBEREDLIST = new XMLPagesTag("numberedList",false); public static final XMLPagesTag STYLE = new XMLPagesTag("style",false); public static final XMLPagesTag UNNUMBEREDLIST = new XMLPagesTag("unnumberedList",false); public static final XMLPagesTag BULLET = new XMLPagesTag("bullet",false); public static final XMLPagesTag LISTTITLE = new XMLPagesTag("listTitle",false); public static final XMLPagesTag LISTITEM = new XMLPagesTag("listItem",false); public static final XMLPagesTag TABLE = new XMLPagesTag("table",false); public static final XMLPagesTag TABLETITLE = new XMLPagesTag("tableTitle",false); public static final XMLPagesTag TABLEHEADER = new XMLPagesTag("tableHeader",false); public static final XMLPagesTag COLUMNTITLE = new XMLPagesTag("columnTitle",false); public static final XMLPagesTag COLUMNNUMBER = new XMLPagesTag("columnNumber",false); public static final XMLPagesTag TABLEROW = new XMLPagesTag("tableRow",false); public static final XMLPagesTag COLUMNVALUE = new XMLPagesTag("columnValue",false); public static final XMLPagesTag TABLEFOOTER = new XMLPagesTag("tableFooter",false); public static final XMLPagesTag IMAGE = new XMLPagesTag("image",false); public static final XMLPagesTag PATH = new XMLPagesTag("path",false); public static final XMLPagesTag GRAPHIC = new XMLPagesTag("graphic",false); public static final XMLPagesTag LEGEND = new XMLPagesTag("legend",false); public static final XMLPagesTag VAR = new XMLPagesTag("var",false); public static final XMLPagesTag DEFAULT = new XMLPagesTag("default",false); }
package Assignment3; import java.util.ArrayList; import java.util.Collections; import java.util.Scanner; public class ZeckendorNumber { @SuppressWarnings({ "resource", "unchecked" }) public static void main(String[] args) { Scanner sc = new Scanner(System.in); int t = sc.nextInt(); ArrayList<Integer> ns = new ArrayList<Integer>(); if (t>=1&&t<=150) { for (int i = 0; i < t; i++) { int n = sc.nextInt(); ns.add(n); } for (int i = 0; i < t; i++) { Object[] cards = new Object[10]; for (int j = 0; j < cards.length; j++) { cards[j] = new ArrayList<Integer>(); } if (ns.get(i)>=1&&ns.get(i)<=100) { for (int j = 1; j <= ns.get(i); j++) { ArrayList<Integer> result = new ArrayList<Integer>(); fib(j, result); Collections.reverse(result); sortCards(j, result, cards); } for (int j = 1;j<=10; j++) { if (isNull((ArrayList<Integer>)cards[j-1])) { break; } System.out.println("Card #"+j+": "+ show((ArrayList<Integer>)cards[j-1])); } } else { System.out.println("Invalid Number"); } } } } private static boolean isNull(ArrayList<Integer> arrayList) { if (arrayList.isEmpty()) { return true; } return false; } @SuppressWarnings({ "unchecked"}) public static void sortCards(int j, ArrayList<Integer> result, Object[] cards) { for (int re : result) { switch (re) { case 1: ((ArrayList<Integer>) cards[0]).add(j); break; case 2: ((ArrayList<Integer>) cards[1]).add(j); break; case 3: ((ArrayList<Integer>) cards[2]).add(j); break; case 5: ((ArrayList<Integer>) cards[3]).add(j); break; case 8: ((ArrayList<Integer>) cards[4]).add(j); break; case 13: ((ArrayList<Integer>) cards[5]).add(j); break; case 21: ((ArrayList<Integer>) cards[6]).add(j); break; case 34: ((ArrayList<Integer>) cards[7]).add(j); break; case 55: ((ArrayList<Integer>) cards[8]).add(j); break; case 89: ((ArrayList<Integer>) cards[9]).add(j); break; } } } private static void fib(int n,ArrayList<Integer> result) { int lo = 0; int hi = 1; while (true) { hi = lo + hi; lo = hi - lo; if (hi>n) { result.add(lo); if (n-lo != 0) { fib(n-lo,result); } break; } } } public static String show(ArrayList<Integer> cards) { StringBuilder sbd = new StringBuilder(); for (int num : cards) { sbd.append(num+" "); } return sbd.toString(); } }
<gh_stars>0 import { ApiProperty } from "@nestjs/swagger"; export class CreateCategoryDto { @ApiProperty({example:'This is category name',description:'Product name'}) readonly name:string; @ApiProperty({example:'This is description',description:'Description product'}) readonly description:string; }
/** * Created by ergunerdogmus on 26.03.2017. */ public class CreateEventRepositoryTest { @Test public void getFieldsMapForEvent() throws Exception { Location location = new Location("deneme", 123, 123); String locationJson = new Gson().toJson(location); System.out.println(locationJson); } }
def read_runs(self, runs): perfs = {} confs = {} for run in runs: try: perfs[run] = pd.read_csv(os.path.join( run, 'performance.csv')).set_index('step') perfs[run]['type'] = perfs[run]['type'].str.strip() confs[run] = pd.read_csv(os.path.join( run, 'config.txt')).set_index('setting name') except Exception as e: print(e) print("Could not read run {}.".format(run)) print("Deleting from self.runs") self.runs = self.runs - {run} return perfs, confs
def render_image(plugin, **kwargs): return format_html('<img src="{}" alt="">', plugin.image.url)
/** Apply a transform to the instance. * <p>The instance must be a (D-1)-dimension sub-hyperplane with * respect to the transform <em>not</em> a (D-2)-dimension * sub-hyperplane the transform knows how to transform by * itself. The transform will consist in transforming first the * hyperplane and then the all region using the various methods * provided by the transform.</p> * @param transform D-dimension transform to apply * @return the transformed instance */ public AbstractSubHyperplane<S, T> applyTransform(final Transform<S, T> transform) { final Hyperplane<S> tHyperplane = transform.apply(hyperplane); final Map<BSPTree<T>, BSPTree<T>> map = new HashMap<>(); final BSPTree<T> tTree = recurseTransform(remainingRegion.getTree(false), tHyperplane, transform, map); for (final Map.Entry<BSPTree<T>, BSPTree<T>> entry : map.entrySet()) { if (entry.getKey().getCut() != null) { @SuppressWarnings("unchecked") BoundaryAttribute<T> original = (BoundaryAttribute<T>) entry.getKey().getAttribute(); if (original != null) { @SuppressWarnings("unchecked") BoundaryAttribute<T> transformed = (BoundaryAttribute<T>) entry.getValue().getAttribute(); for (final BSPTree<T> splitter : original.getSplitters()) { transformed.getSplitters().add(map.get(splitter)); } } } } return buildNew(tHyperplane, remainingRegion.buildNew(tTree)); }
/** * Creates a ResourceMap object based on a set of <tt>&lt;resource&gt;</tt> elements: * <pre> * &lt;resource location="..." key="..."/&gt;* * </pre> */ public class ResourceMapFactory { private static final Log log = LogFactory.getLog(ResourceMapFactory.class); public static ResourceMap createResourceMap(OMElement elem) { ResourceMap resourceMap = null; Iterator it = elem.getChildrenWithName( new QName(XMLConfigConstants.SYNAPSE_NAMESPACE, "resource")); while (it.hasNext()) { // Lazily create the ResourceMap, so that when no <resource> // elements are found, the method returns null. if (resourceMap == null) { resourceMap = new ResourceMap(); } OMElement resourceElem = (OMElement)it.next(); OMAttribute location = resourceElem.getAttribute (new QName(XMLConfigConstants.NULL_NAMESPACE, "location")); if (location == null) { handleException("The 'location' attribute is required for a resource definition"); } OMAttribute key = resourceElem.getAttribute( new QName(XMLConfigConstants.NULL_NAMESPACE, "key")); if (key == null) { handleException("The 'key' attribute is required for a resource definition"); } resourceMap.addResource(location.getAttributeValue(), key.getAttributeValue()); } return resourceMap; } private static void handleException(String msg) { log.error(msg); throw new SynapseException(msg); } }
<reponame>danhuyle508/data-structures-and-algorithms class Stack(): head = None def push(self, val): new_node = Node(val) new_node._next = self.head self.head = new_node def peek_stack(self): if self.head == None: return False else: return self.head.value def pop(self): temp = self.head self.head = self.head._next return self.head class Queue(): stack_1 = Stack() stack_2 = Stack() def enqueue(self, val): self.stack_1.push(val) def dequeue(self): if not self.stack_2.peek_stack(): while self.stack_1.peek_stack(): data = self.stack_1.head.value self.stack_1.pop() self.stack_2.push(data) self.stack_2.pop() return self.stack_2.head.value else: while self.stack_2.peek_stack(): data = self.stack_2.head.value self.stack_2.pop() self.stack_1.push(data) self.stack_1.pop() return self.stack_1.head.value def show(self): if self.stack_2.head == None: return self.stack_1.head.value if self.stack_1.head == None: return self.stack_2.head.value class Node(): def __init__(self, value): self.value = value self._next = None
Economic Development Policy in the Canton of Neuchatel After having experienced a period of steady economic and demographic growth in the 1960s, the Canton of Neuchatel was very severely hit by the crisis of 1975 and subsequently by that of 1982. Industrial activity suffered the consequences of these two successive recessions, in particular in horology. To fend off the crisis, the political authorities of the canton decided to pursue an active policy of business promotion. In parallel with these efforts, the territorial production system underwent considerable transformation. However, new forms of territorial development must now be considered in order to ensure that it can adapt to the continuous changes in the business environment. This paper is divided into four parts. First, it is important to set out the economic context in which the canton of Neuchatel has evolved in recent decades. Second, we have considered the various business promotion measures undertaken by the canton and the Confederation. This leads us to the third part, which describes the transformation of the territorial production system. As for the fourth and last part, it describes the new strategic directions that the canton of Neuchatel can pursue in the field of economic development.
import { DirTreeElement, DirTreeNode, DirTree } from './main-files'; import { MoveFolderEvent } from './src/app/move-folder/move-folder.component'; export function removeBySubpath(paths: DirTreeElement[], subPath: string, prefix = false): DirTreeElement[] { paths = paths.filter((element) => { if (prefix) { return !element.path.startsWith(subPath); } return element.path !== subPath; }); return paths; } export function deleteNodeAndPaths(root: DirTree, parentPath: string) { const dirs = parentPath.split('/'); let currentNode = root.tree[0]; if (dirs.length > 1) { for (let i = 0; i < dirs.length - 1; i++) { const dir = dirs[i]; for (let j = 0; j < currentNode.children.length; j++) { const child = currentNode.children[j]; if (child.name === dir) { currentNode = child; break; } } } } currentNode.children = currentNode.children.filter((child) => { return child.name !== dirs[dirs.length - 1] }); root.paths = removeBySubpath(root.paths, parentPath, true); } export function insertUpdatedNode(root: DirTree, parentPath: string, parentNode: DirTreeNode) { const dirs = parentPath.split('/'); let currentNode = root.tree[0]; if (dirs.length > 1) { for (let i = 0; i < dirs.length; i++) { const dir = dirs[i]; for (let j = 0; j < currentNode.children.length; j++) { const child = currentNode.children[j]; if (child.name === dir) { currentNode = child; break; } } } } if (!currentNode.children) { currentNode.children = []; } let exists = false; for (let i = 0; i < currentNode.children.length; i++) { const element = currentNode.children[i]; if (element.name === parentNode.name) { exists = true; if (element.children) { for (let j = 0; j < element.children.length; j++) { const child = element.children[j]; for (let k = 0; k < parentNode.children.length; k++) { const parentChild = parentNode.children[k]; if (child.name === parentChild.name) { parentNode.children[k] = child; console.log('found matching child %s', child.name); } } } } currentNode.children[i] = parentNode; break; } } if (!exists) { if (currentNode === root.tree[0]) { parentNode.name = 'root'; const element = root.tree[0]; if (element.children) { for (let j = 0; j < element.children.length; j++) { const child = element.children[j]; for (let k = 0; k < parentNode.children.length; k++) { const parentChild = parentNode.children[k]; if (child.name === parentChild.name) { parentNode.children[k] = child; console.log('found matching root child %s', child.name); } } } } root.tree[0] = parentNode; } else { currentNode.children.push(parentNode); } } } export function updateMoveFolderHistory(root: DirTree, event: MoveFolderEvent) { root.moveRootFolderHistory = root.moveRootFolderHistory.filter( (value) => {return value !== event.rootFolder}); root.moveRootFolderHistory.unshift(event.rootFolder); root.moveSubFolderHistory = root.moveSubFolderHistory.filter( (value) => {return value !== event.subFolder}); root.moveSubFolderHistory.unshift(event.subFolder); } export function clearSubHistory(root: DirTree) { root.moveSubFolderHistory = []; } export function addSubHistory(root: DirTree, newPath: string) { if (!root.moveSubFolderHistory.includes(newPath)) { root.moveSubFolderHistory.push(newPath); } }
/** * Get the devliery semantics type from {@link ConfigurationKeys#DELIVERY_SEMANTICS}. * The default value is {@link Type#AT_LEAST_ONCE}. */ public static DeliverySemantics parse(State state) { String value = state.getProp(ConfigurationKeys.GOBBLIN_RUNTIME_DELIVERY_SEMANTICS, AT_LEAST_ONCE.toString()).toUpperCase(); Optional<DeliverySemantics> semantics = Enums.getIfPresent(DeliverySemantics.class, value); Preconditions.checkState(semantics.isPresent(), value + " is not a valid delivery semantics"); return semantics.get(); }
/** * Determine whether the given user-name is unique in current database table. * @param username - user-name used to check unique user-name. * @param userId - check unique user-name excluded the user instance of the given userId. * @return if the user-name is unique (excluded the user instance of the given userId) return true, otherwise return false. */ @Override public boolean isUsernameUnique(String username, Long userId) { BooleanExpression predicate = QUser.user.username.eq(username); if (userId != null) { predicate = predicate.and(QUser.user.id.ne(userId)); } return userRepository.count(predicate) == 0; }
// NewWriter returns a new writer for the passed-in value, expecting a // struct pointer. It returns an error if the value is invalid or no // matching codec was found. func (s *Set) NewWriter(dst interface{}) (*Writer, error) { reader, err := s.NewReader(dst) if err != nil { return nil, err } return newWriter(dst, reader) }
// Register sets an update notifier. func (m *ExternalResourceMonitor) Register(ctx context.Context, notifier ResourceUpdateNotifier) { stream, err := m.ResourceReaderClient.Subscribe(ctx, &SubscribeRequest{}) if err != nil { klog.Errorf("grpc error while subscribing: %s", err) } go func() { for { _, err := stream.Recv() if errors.Is(err, io.EOF) { klog.V(4).Infof("The external monitor closed the Register() stream") break } if err != nil { klog.Errorf("grpc error while receiving notifications: %s", err) continue } notifier.NotifyChange() } }() }
/** * Secure the operational API endpoints behind a confidential client grant flow with Azure AD (AAD) */ @Order(1) @Configuration @Profile("default | dev") public static class AzureAdSecurityConfiguration extends AadResourceServerWebSecurityConfigurerAdapter { @Override protected void configure(HttpSecurity http) throws Exception { super.configure(http); http.cors().and().authorizeRequests().antMatchers("/**").authenticated(); } @Override public void configure(WebSecurity web) { web .ignoring() .antMatchers( "/spring-api/actuator/health", "/spring-api/actuator/info", "/swagger-ui.html", "/swagger-ui/**", "/v3/api-docs/**", /* * Permit global access to Backoffice SPA static assets because the user is required to sign in with Azure AD * prior to accessing protected data in any case. There is no security benefit from securing the application * itself. * * The path to the Backoffice SPA's static assets is configured in build.gradle. */ "/backoffice/**" ); } }
Interrelationships Between Professional Virtual Communities and Social Networks, and the Importance of Virtual Communities in Creating and Sharing Knowledge This chapter presents the interrelationships between professional virtual communities and social networks, and analyzes how, and in what ways, these communities play a crucial role in the creation and sharing of knowledge. The chapter begins by outlining how virtual communities are gaining importance in the new environment. It explains what we understand as a professional virtual community and its importance and also the relevance of social networks in today’s Knowledge Management age. The study then analyses how the development of social networks is crucial to the improvement of professional virtual communities, and also how virtual organizations can promote the improvement of social networks. Finally, the study examines how virtual communities are vital as mechanisms for creating and sharing knowledge.
package com.schlenz.blackjack; public interface Card { Suit getSuit(); Value getValue(); String getName(); }
/** * Paints this panel's children and then displays the initial message * (in the message area) if any. * This method is overridden so that this panel receives a notification * immediately after the children components are painted - it is necessary * for computation of space needed by the message area for displaying * the initial message. * <p> * The first time this method is called, method * {@link #paintedFirstTime is called immediately after * <code>super.paintChildren(..>)</code> finishes. * * @param g the <code>Graphics</code> context in which to paint */ protected void paintChildren(java.awt.Graphics g) { /* * This is a hack to make sure that window size adjustment * is not done sooner than the text area is painted. * * The reason is that the window size adjustment routine * needs the text area to compute height necessary for displaying * the given message. But the text area does not return correct * data (Dimension getPreferredSize()) until it is painted. */ super.paintChildren(g); if (!painted) { paintedFirstTime(g); painted = true; } }
/***************************************************************************** * * Exosite_GetCIK * * \param pointer to buffer to receive CIK or NULL * * \return 1 - CIK was valid, 0 - CIK was invalid. * * \brief Retrieves a CIK from flash / non volatile and verifies the CIK * format is valid * *****************************************************************************/ int Exosite_GetCIK(char * pCIK) { unsigned char i; char tempCIK[CIK_LENGTH + 1]; exosite_meta_read((unsigned char *)tempCIK, CIK_LENGTH, META_CIK); tempCIK[CIK_LENGTH] = 0; for (i = 0; i < CIK_LENGTH; i++) { if (!(tempCIK[i] >= 'a' && tempCIK[i] <= 'f' || tempCIK[i] >= '0' && tempCIK[i] <= '9')) { status_code = EXO_STATUS_BAD_CIK; return 0; } } if (NULL != pCIK) memcpy(pCIK ,tempCIK ,CIK_LENGTH + 1); return 1; }
package test // this package contains adoc file with various features that are verified to be supported by Libasciidoc // i.e., they should produce the same output as Asciidoctor
Cognitive models for panic disorder with agoraphobia: A study of disaggregated within-person effects. OBJECTIVE The purpose of this study was to test 2 cognitive models of panic disorder with agoraphobia (PDA)-a catastrophic cognitions model and a low self-efficacy model-by examining the within-person effects of model-derived cognitive variables on subsequent anxiety symptoms. METHOD Participants were 46 PDA patients with agoraphobic avoidance of moderate to severe degree who were randomly allocated to 6 weeks of either cognitive therapy, based on the catastrophic cognitions model of PDA, or guided mastery (guided exposure) therapy, based on the self-efficacy model of PDA. Cognitions and anxiety were measured weekly over the course of treatment. The data were analyzed with mixed models, using person-mean centering to disaggregate within- and between-person effects. RESULTS All of the studied variables changed in the expected way over the course of therapy. There was a within-person effect of physical fears, loss of control fears, social fears, and self-efficacy when alone on subsequent state anxiety. On the other hand, within-person changes in anxiety did not predict subsequent cognitions. Loss of control and social fears both predicted subsequent self-efficacy, whereas self-efficacy did not predict catastrophic cognitions. In a multipredictor analysis, within-person catastrophic cognitions still predicted subsequent anxiety, but self-efficacy when alone did not. CONCLUSIONS Overall, the findings indicate that anxiety in PDA, at least in severe and long-standing cases, is driven by catastrophic cognitions. Thus, these cognitions seem to be useful therapeutic targets. (PsycINFO Database Record
def summarize(posterior, digits=3, prob=0.9): mean = np.round(posterior.mean(), 3) ci = posterior.credible_interval(prob) print (mean, ci)
<filename>WebApps/Client Interface/OnTimeEvidence/src/main/java/com/web/cyneuro/user/users.java package com.web.cyneuro.user; import javax.persistence.Entity; import java.util.Date; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Column; import lombok.Data; @Entity(name = "users_profile") public class users { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String username; private String email; private String password; private String organization; private String title; private String description; private Date createtime; private Date updatetime; private char questionnaire; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getOrganization() { return organization; } public void setOrganization(String organization) { this.organization = organization; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public Date getCreatetime() { return createtime; } public void setCreatetime(Date createtime) { this.createtime = createtime; } public Date getupdatetime() { return updatetime; } public void setupdatetime(Date updatetime) { this.updatetime = updatetime; } public char getQuestionnaire() { return questionnaire; } public void setQuestionnaire(char questionnaire) { this.questionnaire = questionnaire; } }
// maasify turns a completely untyped json.Unmarshal result into a JSONObject // (with the appropriate implementation of course). This function is // recursive. Maps and arrays are deep-copied, with each individual value // being converted to a JSONObject type. func maasify(client Client, value interface{}) JSONObject { if value == nil { return JSONObject{isNull: true} } switch value.(type) { case string, float64, bool: return JSONObject{value: value} case map[string]interface{}: original := value.(map[string]interface{}) result := make(map[string]JSONObject, len(original)) for key, value := range original { result[key] = maasify(client, value) } return JSONObject{value: result, client: client} case []interface{}: original := value.([]interface{}) result := make([]JSONObject, len(original)) for index, value := range original { result[index] = maasify(client, value) } return JSONObject{value: result} } msg := fmt.Sprintf("Unknown JSON type, can't be converted to JSONObject: %v", value) panic(msg) }
/** * Used by the LCM C API to dispatch a Lua handler. This function invokes a * Lua handlers, which is stored in the subscribtion userdata, which was * created by the subscribe method. * * In order to do its work, this function need a pointer to the Lua stack * used by the handle function, a lcm_subscription_t pointer, and a Lua * handler function. * * The handle method prepares the Lua stack for the handlers. The userdata * supplied to this function is always the subscription userdata created during * subscribe. * * @pre The Lua arguments on the stack: * A LCM userdata. * * @post The Lua return values on the stack: * A LCM userdata. * * @post On exit, the Lua stack is the same as it was on entrance. * * @param recv_buf The receive buffer containing the message. * @param channel The channel of the message. * @param userdata The userdata given during the call to handle. For this * function the userdata is always the subscription userdata created * during the call to subscribe. * * @throws The handler function may propagate Lua errors. */ static void impl_lcm_c_handler(const lcm_recv_buf_t * recv_buf, const char * channel, void * userdata){ impl_sub_userdata_t * subu = (impl_sub_userdata_t *) userdata; lua_State * L = subu->owning_lcm_userdata->handler_lua_State; int ref_num = subu->ref_num; lcm_subscription_t * subscription; if(!impl_lcm_getfromsubscriptiontable(L, 1, ref_num, &subscription)){ lua_pushstring(L, "lcm handler cannot find lua handler"); lua_error(L); } lua_pushstring(L, channel); lua_pushlstring(L, (const char *) recv_buf->data, recv_buf->data_size); lua_call(L, 2, 0); }
#include <stdio.h> #include <math.h> #define S(num) ((num) * (num)) typedef struct { float vertical; float horizontal; float height; } DATA; int main(void) { DATA cheese; float min_line; float in_circle; int n; int i; while (1){ scanf("%f %f %f", &cheese.vertical, &cheese.horizontal, &cheese.height); if (cheese.vertical == 0){ break; } scanf("%d", &n); min_line = sqrt(S(cheese.vertical) + S(cheese.horizontal)); if (sqrt(S(cheese.vertical) + S(cheese.height)) < min_line){ min_line = sqrt(S(cheese.vertical) + S(cheese.height)); } if (sqrt(S(cheese.horizontal) + S(cheese.height)) < min_line){ min_line = sqrt(S(cheese.horizontal) + S(cheese.height)); } for (i = 0; i < n; i++){ scanf("%f", &in_circle); if (in_circle * 2 > min_line){ printf("OK\n"); } else { printf("NA\n"); } } } return (0); }
Training and Certifying Behavior Analysts Proper professional certification and training of behavior analysts who work with individuals with autism is critical in ensuring that those individuals receive the highest quality behavior analytic services. This article discusses the current issues surrounding certification of behavior analysts and describes the important features of the Behavior Analyst Certification Board and its credentials. The article also reviews approaches to the training of professional behavior analyst practitioners and discusses appropriate training content for behavior analysts who work with persons with autism. The interrelationship between training and certification is explored.
async def run_module(self, module: BaseModule): await self.start_module(module)
/* * Common routine for all rcm calls which require daemon processing */ static int rcm_common(int cmd, rcm_handle_t *hd, char **rsrcnames, uint_t flag, void *arg, rcm_info_t **infop) { int i; if (hd == NULL) { errno = EINVAL; return (RCM_FAILURE); } if (getuid() != 0) { errno = EPERM; return (RCM_FAILURE); } if ((flag & (RCM_DR_OPERATION | RCM_MOD_INFO)) == 0) { if ((rsrcnames == NULL) || (rsrcnames[0] == NULL)) { errno = EINVAL; return (RCM_FAILURE); } for (i = 0; rsrcnames[i] != NULL; i++) { if (*rsrcnames[i] == '\0') { errno = EINVAL; return (RCM_FAILURE); } } } if (hd->lrcm_ops != NULL) { return (rcm_direct_call(cmd, hd, rsrcnames, flag, arg, infop)); } if (infop) { *infop = NULL; } return (rcm_daemon_call(cmd, hd, rsrcnames, flag, arg, infop)); }
/** * Changes the reference to one of the commands, which is specified by {@code commandWord}. */ private void changeCommandDetails(String fullCommandWord) { assert CommandDictionary.hasFullCommandWord(fullCommandWord); CommandDetails oldDetails = commandDetails; commandDetails = CommandDictionary.getDetailsWithFullCommandWord(fullCommandWord); dictionary = commandDetails.getPrefixDictionary(); if (oldDetails == commandDetails) { logger.info(String.format("======== [ %s ]", commandDetails.getFullCommandWord())); } }
<reponame>dphAndroid/dph_kjj package kj.dph.com.util.logUtil; import android.util.Log; import kj.dph.com.common.Constants; /** * Created by zhangyong on 2015/7/5. */ public class LogUtil { /** Log等级:上打印Log, 上线后改为此级别 */ public static final int NONE = -1; public static final int VERBOSE = 0; public static final int DEBUG = 1; public static final int INFO = 2; public static final int WARN = 3; public static final int ERROR = 4; public static String FLAG= Constants.LOG_FLAG_DEFAULT; public static String FLAG_END=Constants.FLAG_END; public static void v(String tag, String content) { if (Constants.LOG_LEVEL >= VERBOSE) { Log.v(FLAG+tag+FLAG_END+"", content+""); } } public static void d(String tag, String content) { if (Constants.LOG_LEVEL >= DEBUG) { Log.d(FLAG+tag+FLAG_END+"", content+""); } } public static void i(String tag, String content) { if (Constants.LOG_LEVEL >= INFO) { Log.i(FLAG+tag+FLAG_END+"", content + ""); } } public static void i(String tag, Object obj) { if (Constants.LOG_LEVEL >= INFO) { Log.i(FLAG+tag+FLAG_END+"", obj + ""); } } public static void w(String tag, String content) { if (Constants.LOG_LEVEL >= WARN) { Log.w(FLAG+tag+FLAG_END+"", content+""); } } public static void e(String tag, String content) { if (Constants.LOG_LEVEL >= ERROR) { Log.e(FLAG+tag+FLAG_END+"", content+""); } } /** * 打印日志全部内容 * * 过于繁琐,咱不采用,特殊情况例外 * @param content */ public static void all(String tag,String content){ if (Constants.LOG_LEVEL >= ERROR) { // 我们采取分段打印日志的方法:当长度超过4000时,我们就来分段截取打印 //剩余的字符串长度如果大于4000 if (content.length() > 4000) { for (int i = 0; i < content.length(); i += 4000) { //当前截取的长度<总长度则继续截取最大的长度来打印 if (i + 4000 < content.length()) { Log.i(FLAG+tag+i+FLAG_END, content.substring(i, i + 4000)); } else { //当前截取的长度已经超过了总长度,则打印出剩下的全部信息 Log.i(FLAG+tag+i+FLAG_END, content.substring(i, content.length())); } } } else { //直接打印 Log.i("msg", content); } } } //***********************************以下方法适用于模糊打印,只输出详细信息,flag仅打印相关人员信息 public static void v(String content) { v("",content); } public static void d( String content) { d("",content); } public static void i(String content) { if (Constants.LOG_LEVEL >= INFO) { Log.i(FLAG+FLAG_END+"", content + ""); } } public static void i( Object obj) { i("",obj); } public static void w( String content) { w("",content); } public static void e(String content) { e("",content); } /** * 打印日志全部内容 * * 过于繁琐,咱不采用,特殊情况例外 * @param content */ public static void all(String content){ all("",content); } }
def _track_objects(self, contour_imgs): imm = self._track_material(contour_imgs[self.material_num_label]) imf = self._track_finger(contour_imgs[self.finger_num_label]) return imm, imf
Medical explanations of bewitchment, especially as exhibited during the Salem witch trials but in other witch-hunts as well, have emerged because it is not widely believed today that symptoms of those claiming affliction were actually caused by bewitchment. The reported symptoms have been explored by a variety of researchers for possible biological and psychological origins. Modern academic historians of witch-hunts generally consider medical explanations unsatisfactory[citation needed] in explaining the phenomenon and tend to believe the accusers in Salem were motivated by social factors – jealousy, spite, or a need for attention – and that the extreme behaviors exhibited were "counterfeit," as contemporary critics of the trials had suspected. Ergot poisoning [ edit ] Claviceps purpurea A widely known theory about the cause of the reported afflictions attributes the cause to the ingestion of bread that had been made from rye grain that had been infected by a fungus, Claviceps purpurea, commonly known as ergot. This fungus contains chemicals similar to those used in the synthetic psychedelic drug LSD. Convulsive ergotism causes a variety of symptoms, including nervous dysfunction.[1][2][3] The theory was first widely publicized in 1976, when graduate student Linnda R. Caporael published an article[4] in Science, making the claim that the hallucinations of the afflicted girls could possibly have been the result of ingesting rye bread that had been made with moldy grain. Ergot of Rye is a plant disease caused by the fungus Claviceps purpurea, which Caporael claims is consistent with many of the physical symptoms of those alleged to be afflicted by witchcraft. Within seven months, however, an article disagreeing with this theory was published in the same journal by Spanos and Gottlieb[5][6] They performed a wider assessment of the historical records, examining all the symptoms reported by those claiming affliction, among other things, that Ergot poisoning has additional symptoms that were not reported by those claiming affliction. If the poison was in the food supply, symptoms would have occurred on a house-by-house basis not in only certain individuals. Biological symptoms do not start and stop based on external cues, as described by witnesses, nor do biological symptoms start and stop simultaneously across a group of people, also as described by witnesses. In 1989, Mary Matossian reopened the issue, supporting Caporeal, including putting an image of ergot-infected rye on the cover of her book, Poisons of the Past. Matossian disagreed with Spanos and Gottlieb, based on evidence from Boyer and Nissenbaum in Salem Possessed that indicated a geographical constraint to the reports of affliction within Salem Village.[7] Encephalitis [ edit ] In 1999, Laurie Winn Carlson offered an alternative medical theory, that those afflicted in Salem who claimed to have been bewitched, suffered from encephalitis lethargica, a disease whose symptoms match some of what was reported in Salem and could have been spread by birds and other animals. [8] Lyme disease [ edit ] M. M. Drymon has proposed that Lyme disease was responsible for witches and witch affliction, finding that many of the afflicted in Salem and elsewhere lived in areas that were tick-risky, had a variety of red marks and rashes that looked like bite marks on their skin, and suffered from neurological and arthritic symptoms. [9] Some of the girls in the 2012 cluster outbreak of "Salem-like" symptoms in Le Roy, New York have tested positive for Lyme disease.[10] Post-Traumatic Stress Disorder (PTSD) [ edit ] It is possible that King Philip's War, concurrent with the Salem witch trials, induced PTSD in some of the "afflicted" accusers. Wabanaki allies of the French attacked British colonists in Maine, New Hampshire, and northern Massachusetts in a series of guerrilla skirmishes. Survivors blamed colonial leaders for the attacks' successes, accusing them of incompetence, cowardice, and corruption. A climate of fear and panic pervaded the northern coastline, causing a mass exodus to southern Massachusetts and beyond. Fleeing survivors from these attacks included some of the maidservant accusers in their childhood. Witnessing a violent attack is a trigger for hysteria and posttraumatic stress disorder. Not only might the violence of the border skirmishes to the north explain symptoms of PTSD in accusers who formerly lived among the slaughtered, but the widespread blame of elite incompetence for those attacks offers a compelling explanation for the unusual demographic among the accused. Within the historical phenomenon, witch trial 'defendants' were overwhelmingly female, and members of the lower classes. The Salem witch trial breaks from this pattern. In the Salem witch trials, elite men were accused of witchcraft, some of them the same leaders who failed to successfully protect besieged settlements to the north. This anomaly in the pattern of typical witch trials, combined with widespread blame for the northern attacks on colonial leadership, suggests the relevance of the northern guerrilla attacks to the accusers. Thus, Mary Beth Norton, whose work draws the parallel between the Salem witch trials and King Philip's War, argues implicitly that a combination of PTSD and a popular societal narrative of betrayal-from-within caused the unusual characteristics of this particular witch trial.[11] [12] [13] [14] Hysteria and psychosomatic disorders [ edit ] The symptoms displayed by the afflicted in Salem are similar to those seen in classic cases of hysteria, according to Marion Starkey and Chadwick Hansen. Physicians have replaced the vague diagnosis of hysteria with what is essentially its synonym, psychosomatic disorder.[15][16] Psychological processes known to influence physical health are now called "psychosomatic". They include: "several types of disease known as somatoform disorders, in which somatic symptoms appear either without any organic disorder or without organic damage that can account for the severity of the symptoms. ... A second type, conversion disorders, involves organically inexplicable malfunctions in motor and sensory systems. The third type, pain disorder, involves sensation either in the absence of an organic problem or in excess of actual physical damage."[17] Psychologists Nicholas P. Spanos and Jack Gottlieb explain that the afflicted were enacting the roles that maintained their definition of themselves as bewitched, and this in return lead to the conviction of many of the accused that the symptoms, such as bites, pinches and pricks, were produced by specters. These symptoms were typically apparent throughout the community and caused an internal disease process.[18] Starkey acknowledges that, while the afflicted girls were physically healthy before their fits began, they were not spiritually well because they were sickened from trying to cope with living in an adult world that did not cater to their needs as children. The basis for a Puritan society, which entails the possibility for sin, damnation, common internal quarrels, and the strict outlook on marriage, repressed the un-married teenagers who felt damnation was imminent. The young girls longed for freedom to move beyond their low status in society. The girls indulged in the forbidden conduct of fortune-telling with the Indian slave Tituba to discover who their future husbands were. They suffered from hysteria as they tried to cope with, "the consequences of a conflict between conscience (or at least fear of discovery) and the unhallowed craving."[16] Their symptoms of excessive weeping, silent states followed by violent screams, hiding under furniture, and hallucinations were a result of hysteria. Starkey conveys that after the crisis at Salem had calmed it was discovered that diagnosed insanity appeared in the Parris family. Ann Putnam Jr. had a history of family illness. Her mother experienced paranoid tendencies from previous tragedies in her life, and when Ann Jr. began to experience hysterical fits, her symptoms verged on psychotic. Starkey argues they suffered from hysteria and as they began to receive more attention, used it as a means to rebel against the restrictions of Puritanism. Hansen approaches the afflicted girls through a pathological lens arguing that the girls suffered from clinical hysteria because of the fear of witchcraft, not witchcraft itself. The girls feared bewitchment and experienced symptoms that were all in the girls' heads. Hansen contests that, “if you believe in witchcraft and you discover that someone has been melting your wax image over a slow fire ... the probability is that you will get extremely sick – your symptoms will be psychosomatic rather than organic.”[15] The girls suffered from what appeared to be bite marks and would often try to throw themselves into fires, classic symptoms of hysteria. Hansen explains that hysterics will often try to injure themselves, which never result in serious injuries because they wait until someone is present to stop them. He also concludes that skin lesions are the most common psychosomatic symptom among hysterics, which can resemble bite or pinch marks on the skin. Hansen believes the girls are not accountable for their actions because they were not consciously responsible in committing them.[15] Projection [ edit ] Historian John Demos in 1970[19] adopted a psycho-historical approach to confronting the unusual behavior suffered by the afflicted girls in Salem during 1692. Demos combined the disciplines of anthropology and psychology to propose that psychological projection could explain the violent fits the girls were experiencing during the crisis at Salem. Demos displays through charts that most of the accused were predominantly married or widowed women between the ages of forty-one and sixty, while the afflicted girls were primarily adolescent girls. The structure of the Puritan community created internal conflict among the young girls who felt controlled by the older women leading to internal feelings of resentment. Demos asserts that often neighborly relations within the Puritan community remained tense and most witchcraft episodes began after some sort of conflict or encounter between neighbors. The accusation of witchcraft was a scapegoat to display any suppressed anger and resentment felt. The violent fits and verbal attacks experienced at Salem were directly related to the process of projection, as Demos explains, The dynamic core of belief in witchcraft in early New England was the difficulty experienced by many individuals in finding ways to handle their own aggressive impulses in a Puritan culture. Aggression was thus denied in the self and attributed directly to others.[19] Demos asserts that the violent fits displayed, often aimed at figures of authority, were attributed to bewitchment because it allowed the afflicted youth to project their repressed aggression and not be directly held responsible for their behaviors because they were coerced by the Devil. Therefore, aggression experienced because of witchcraft became an outlet and the violent fits and the physical attacks endured, inside and outside the courtroom, were examples of how each girl was undergoing the psychological process of projection.[19] See also [ edit ]
/** * Runs the server * @param args ignored * @throws ServerInitializeException when the server initialization failed * @throws ServerExecutionException when the server execution failed */ public static void main(final String[] args) throws ServerInitializeException, ServerExecutionException { IServer server = new TestPostgresSearchServer(); server.initialize(); server.start(); }
<gh_stars>1-10 import constate from "constate"; import { useMemo } from "react"; import type { PagePair } from "../comparator"; import { useIsDiffPagesOnlyState } from "./is-diff-pages-only"; import { usePagePairs } from "./page-pairs"; function useFilteredPagePairsInner(): PagePair[] | undefined { const pagePairs = usePagePairs(); const [isDiffPagesOnly] = useIsDiffPagesOnlyState(); const filteredPagePairs = useMemo( () => isDiffPagesOnly ? pagePairs?.filter((pair) => !("score" in pair) || pair.score !== 1) : pagePairs, [pagePairs, isDiffPagesOnly] ); return filteredPagePairs; } export const [FilteredPagePairsProvider, useFilteredPagePairs] = constate( useFilteredPagePairsInner );
Computer systems design is based on many commonly-held beliefs and heuristics, many of which have never been challenged: Thousands of server farm “load balancing” policies do exactly that: they aim to balance the load among the servers. But is load balancing necessarily a good thing? Consider a choice between a single machine with speed s, and n identical machines with speed s/n. Which would you choose? Are you always right? Scheduling policies which favor “short” jobs, like Shortest-Remaining-Processing-Time-First (SRPT) are often avoided because it is feared that they starve the “long” jobs. But does favoring “short” jobs necessarily hurt “long” ones? Cycle stealing between a “donor” machine and a “beneficiary” machine is a central theme in distributed systems. The donor machine helps the beneficiary machine with jobs, whenever the load at the donor machine is below some threshold. But why are we giving the donor machine all the control? In this talk, we will consider these and other fundamental questions in system design and look at how new research in analytical performance modeling helps us overturn some age-old beliefs.
// Sets physics body shape transform based on radians parameter public void SetPhysicsBodyRotation(PhysicsBody body, float radians) { if (body != null) { body.orient = radians; if (body.shape.type == PHYSICS_POLYGON) { body.shape.transform = MathMatFromRadians(radians); } } }
Most of us are familiar with the pounding headaches, drowsiness, stomach-turning nausea and "did-I-get-run-over-by-a-bus" sensation that comes with that most dreaded of morning-after ailments: the hangover. To alleviate the suffering, chugging coffee, downing Advil or simply choosing to forego the wretched day altogether by returning to bed sometimes does the trick. But what if there were a miracle elixir that could chase that hangover cloud away -- and better still, what if that magic drink were something you could easily pick up at your local supermarket? A group of Chinese researchers say that they may have indeed found this perfect hangover cure -- and it goes by the name of "Sprite." After examining 57 beverages in a lab, researcher Hua-Bin Li and his colleagues at Sun Yat-Sen University in Guangzhou determined that Sprite was one of the drinks that best relieved hangover symptoms. The team of scientists had hypothesized that what you consume after drinking booze could alter the effect of alcohol on your body. Specifically, they theorized that certain drinks could impact the body's metabolism of alcohol in a way that would help alleviate hangover symptoms. Some of the adverse effects of alcohol are thought to be caused, not by the ethanol itself, but by ethanol’s first metabolite, acetaldehyde. Ethanol is metabolized into acetaldehyde by the enzyme alcohol dehydrogenase (ADH) and then into acetate by aldehyde dehydrogenase (ALDH). Unlike acetaldehyde, acetate is innocuous and may even be responsible for some of the positive health benefits of alcohol consumption. Therefore the key to reducing alcohol-related damage lies in minimizing the amount of time acetaldehyde is present in the body. The Chinese researchers, therefore, decided that they would look at how the different beverages impacted the activity of ADH and ALDH. Some beverages were found to be terrible for a hangover. An herbal infusion with hemp seeds, for example, was discovered to boost the activity of ADH while inhibiting ALDH, therefore slowing down the breakdown of acetaldehyde and dragging out the hangover effects. On the other hand, some drinks, including Sprite (known in China as Xue bi) and a type of soda water, were found to have the opposite effect: increasing the activity of ALDH and thus speeding up the breakdown of acetaldehyde. The researchers are reportedly planning to conduct the tests in living organisms, but the results have already generated a lot of buzz, as people around the world celebrate the possible death of the hangover. However, experts warn that we shouldn't quite raise the victory flag just yet. Edzard Ernst, a medicinal science expert from the University of Exeter, told Chemistry World that while he found the study interesting, more research is necessary before we wholeheartedly embrace the results.
// SHSymbolsLoaded // // Purpose: Checks to see if the symbols are loaded for an HEXE // // Input: HEXE for which to load symbols BOOL SHSymbolsLoaded( HEXE hexe, SHE * pshe ) { HEXG hexg; LPEXE lpexe; LPEXG lpexg; BOOL fRet = FALSE; if (pshe != NULL) { *pshe = sheNoSymbols; } if (hexe) { lpexe = (LPEXE)LLLock(hexe); hexg = lpexe->hexg; if (hexg) { lpexg = (LPEXG)LLLock (hexg); fRet = lpexg->fOmfLoaded; if (pshe != NULL) { *pshe = lpexg->sheLoadStatus; } LLUnlock (hexg); } LLUnlock (hexe); } return fRet; }
PR55α regulatory subunit of PP2A inhibits the MOB1/LATS cascade and activates YAP in pancreatic cancer cells PP2A holoenzyme complexes are responsible for the majority of Ser/Thr phosphatase activities in human cells. Each PP2A consists of a catalytic subunit (C), a scaffold subunit (A), and a regulatory subunit (B). While the A and C subunits each exists only in two highly conserved isoforms, a large number of B subunits share no homology, which determines PP2A substrate specificity and cellular localization. It is anticipated that different PP2A holoenzymes play distinct roles in cellular signaling networks, whereas PP2A has only generally been defined as a putative tumor suppressor, which is mostly based on the loss-of-function studies using pharmacological or biological inhibitors for the highly conserved A or C subunit of PP2A. Recent studies of specific pathways indicate that some PP2A complexes also possess tumor-promoting functions. We have previously reported an essential role of PR55α, a PP2A regulatory subunit, in the support of oncogenic phenotypes, including in vivo tumorigenicity/metastasis of pancreatic cancer cells. In this report, we have elucidated a novel role of PR55α-regulated PP2A in the activation of YAP oncoprotein, whose function is required for anchorage-independent growth during oncogenesis of solid tumors. Our data show two lines of YAP regulation by PR55α: (1) PR55α inhibits the MOB1-triggered autoactivation of LATS1/2 kinases, the core member of the Hippo pathway that inhibits YAP by inducing its proteasomal degradation and cytoplasmic retention and (2) PR55α directly interacts with and regulates YAP itself. Accordingly, PR55α is essential for YAP-promoted gene transcriptions, as well as for anchorage-independent growth, in which YAP plays a key role. In summary, current findings demonstrate a novel YAP activation mechanism based on the PR55α-regulated PP2A phosphatase. Introduction The PP2A (protein phosphatase 2A) family of heterotrimers accounts for the majority of serine/threonine phosphatase activities in human cells 1,2 . Each PP2A consists of one catalytic subunit (C), one scaffolding subunit (A), and one regulatory subunit (B) 1,2 (Fig. 1). While the A and C subunits each contain two highly conserved isoforms, a large number of the B subunits are classified into four distinct subfamilies (B, B′, B″, and B‴) and share no homology. It is the B subunit that determines the substrate specificities and cellular localizations of PP2A 1,3 . The kinase roles in the Hippo pathway and YAP activation have been clearly elucidated, whereas the essential input of phosphatases in this regulation remains poorly understood. Previous studies implicate PP2A in the regulation of the Hippo pathway: while proteomics/RNAi screening show that dSTRIPAK-associated PP2A suppresses the Hippo pathway in Drosophila, PP2A inhibition by okadaic acid induces MOB1-phosphorylation in yeast cells and MST1/2-phosphorylation in HeLa cervical cancer cells . The current study reveals a critical role of PR55α in the inhibition of the MOB1/LATS autoactivation loop and activation of YAP in pancreatic normal and cancer cells. PR55α supports the activation of YAP in pancreatic cancer cells We have shown that PR55α supports anchorageindependent growth and tumorigenicity of pancreatic cancer cells 20 , which is also the best-known function of YAP in cancer 21,24 . Immunoblotting detected a marked increase in YAP level in human pancreatic cancer cells relative to the HPNE human normal pancreatic cells immortalized with telomerase 35 (Fig. 2). In contrast, YAP-S127 phosphorylation, which induces YAP cytoplasmic retention by 14-3-3, is only moderately increased in pancreatic cancer cells compared with HPNE. YAP inhibition by the LATS1/2 kinases is primarily via two mechanisms: phosphorylation of YAP-S397 leading to proteasomal degradation by β-TrCP and phosphorylation of YAP-S127 resulting in 14-3-3 cytoplasmic retention 36 . Therefore, we examined the impact of PR55α on YAP activation in pancreatic cancer cells using a series of Doxycycline (Dox)-inducible PR55α-shRNAs. As shown in Fig. 3a, PR55α-knockdown by short-hairpin RNAs (shRNAs) markedly decreased PR55α level in pancreatic cancer cells (CD18/HPAF and AsPC-1) compared with parental and Control-shRNAtransduced cells. Consequently, YAP level was largely reduced following PR55α-knockdown with a concomitant increase in YAP-S127 phosphorylation in the cells. On the other hand, the steady-state level of YAP-S397 phosphorylation was not particularly increased following PR55α-knockdown. Since YAP-S397 phosphorylation is specifically linked to YAP proteasomal degradation and cannot accumulate in the cells 37 , this outcome was anticipated. Collectively, these results suggest a role of PR55α in the maintenance of YAP protein and dephosphorylation of YAP-S127 in pancreatic cancer cells. One scaffold (PR65 or A) subunit binds to one catalytic (C) subunit to form an A/C heterodimer, which can further complex with one of the regulatory (B) subunits. The A and C subunits each contain two highly conserved isoforms (97% similarity between Cα and Cβ and 87% similarity between Aα and Aβ). A large number of the B subunits are classified into four distinct subfamilies (B, B′, B″, and B‴), which share no homology The effects of PR55α on the Hippo tumor suppressor pathway in pancreatic cancer cells The Hippo pathway negatively regulates YAP level and activity. Therefore, we examined the effects of PR55α on the core members of this pathway (MST1/2, MOB1, and LATS1/2) in pancreatic cancer cells using Dox-inducible shRNAs. We validated the impact of PR55α on the MOB/LATS/ YAP cascade with a time-course study. Following PR55αknockdown by shRNA in CD18/HPAF cells, there was a time-dependent decrease in YAP level with a concurrent increase in YAP-S127 phosphorylation (Fig. 3b). Consistently, these changes in YAP were tightly associated with an increase in phosphorylation of both LATS1-S909/ LATS2-S872 and MOB1-T35, an increase of protein level of LATS2, and the diminution of LATS1-T1079/LATS2-T1041 phosphorylation (Fig. 3b). Since LATS2 was reported to be regulated by proteasomal degradation 40 , we evaluated the effect of PR55α on LATS2 protein stability using protein synthesis inhibitor cycloheximide (CHX), as described in our study 41 . The analysis indicated that LATS2 protein half-life is~3.2 h in CD18/HPAF cells, while it elongated to ∼6.7 h after the knockdown of PR55α (Fig. 3c). Collectively, these results suggest an essential role for PR55α in the inhibition of the MOB1/LATS cascade that directly prevents YAP activation. Ectopic PR55α expression induces YAP activation in normal human pancreatic ductal cells To define the role of PR55α in normal pancreatic cells, we constructed the pREV-TRE-PR55α retroviral vector expressing Dox-inducible PR55α, which was further stably introduced into HPNE normal pancreatic ductal cells (Fig. 4a). Following 48 h induction with increasing doses of Dox, a marked increase in PR55α protein was detected in the pREV-TRE-PR55α-transduced cells but not in the control-vector-transduced cells (Fig. 4b). Associated with the PR55α induction were a concomitant increase of YAP protein levels and a simultaneous diminution of YAP- Fig. 2 Analysis of YAP protein level and YAP-S127 phosphorylation in normal and malignant human pancreatic cells. YAP protein level is markedly increased in the human pancreatic cancer cells (AsPC-1, Capan-1, CD18/HPAF, and L3.6) compared with human pancreatic ductal cells (HPNE), as determined by immunoblotting. HeLa human cervical cancer cells and SH-SY5Y human neuroblastoma cells serve as a positive and negative control, respectively, for YAP protein expression. GAPDH in the lysates was measured as internal controls. The protein levels of YAP, pYAP-S127, and GAPDH were quantified using ImageJ software. Relative YAP and pYAP-S127 levels in the samples were normalized with GAPDH levels and the ratio of pYAP-S127/YAP determined S127/S397 phosphorylation (Fig. 4b). In contrast, controlvector-transduced cells receiving the same treatment showed little effect on either PR55α expression or on YAP protein level/phosphorylation. Effects of ectopic PR55α on MOB1/LATS cascade in normal pancreatic ductal cells We next examined the effect of PR55α on LATS1/2 phosphorylation and levels in HPNE cells. Ectopic PR55α expression in HPNE cells resulted in a marked decrease in LATS1-S909/LATS2-S872 phosphorylation along with a moderate increase in LATS1-T1079/LATS2-T1041 phosphorylation (Fig. 4b). Furthermore, LATS2 protein level was reduced in HPNE cells upon PR55α overexpression, while the effect is absent in the control cells (Fig. 4b). With a time-course study, we verified this effect of PR55α. Figure 4c shows that, following PR55α induction by Dox in HPNE cells, YAP protein level was increased, along with concomitant reductions in phosphorylation of YAP-S127, MOB1-T35, and LATS1-S909/ LATS2-S872, and a decrease in LATS2 protein level. Immunoblotting also detected an increase in MST1/2 phosphorylation and level and LATS1-T1079/LATS2-T1041 phosphorylation (MST1/2 substrates) in HPNE cells. Collectively, the results from both normal and malignant cells suggest a role of PR55α in YAP activation that involves the suppression of the MOB1/LATS autoactivation loop, leading to YAP phosphorylation/inhibition. Furthermore, this role of PR55α apparently does not require the MST/LATS cascade, since its activity increases in response to PR55α overexpression. This may implicate a feedback loop activation by PR55α. PR55α supports YAP protein stability One of the primary mechanisms by which the Hippo pathway inhibits YAP is to induce its proteasomal degradation 42 . We, therefore, assessed the effect of PR55α on YAP protein stability in both the cytoplasm and nuclei of CD18/HPAF cells using α-tubulin and Lamin A/C as Fig. 3 PR55α-knockdown by shRNA inhibits YAP and activates the MOB1-LATS1/2 cascade in pancreatic cancer cells. a CD18/HPAF and AsPC-1 cells were stably transduced with Dox-inducible shRNAs targeting various regions of PR55α or, as a control, with nontargeting shRNA. After incubation with Dox (2 µg/ml) for 3 days, the cell lysates (100 µg) were analyzed by immunoblotting for the indicated protein levels and/or phosphorylation. GAPDH served as an internal protein expression control. b Validation of the effects of PR55α on MOB1/LATS/YAP cascade in pancreatic cancer cells. shRNA-transduced CD18/HPAF cells were incubated with Dox (2 µg/ml) for the days indicated and analyzed for PR55α expression and the levels/phosphorylation of MOB1, LATS1/2, and YAP. GAPDH serves as an internal control. c To test the effect of PR55α on LATS2 protein stability, shRNA-transduced CD18/HPAF cells were incubated in medium containing cycloheximide (CHX, 15 μg/ml) to halt protein synthesis for the indicated hours. Whole-cell extracts were analyzed for LATS2 and GAPDH protein levels by immunoblotting. The protein levels of LATS2 and GAPDH were quantified using ImageJ software; relative LATS2 levels were normalized with GAPDH levels in the samples and protein half-life determined using SigmaPlot (version 11.2) analytical program cytoplasmic and nuclear markers, respectively 43 . Immunoblotting showed that PR55α is ubiquitously expressed in both cytoplasm and nuclei of the cells and its level increases following proteasomal inhibition by MG132 (Fig. 5a). To test whether the decrease of YAP in PR55αknockdown cells was due to proteasomal degradation, MG132 was used to block proteasome activity and assessed for its effect on YAP level. As shown in Fig. 5b, MG132 treatment of the PR55α-knockdown cells resulted in an induction of both cytoplasmic and nuclear YAP, while MG132 treatment of Control-shRNA knockdown cells caused a decrease in cytoplasmic YAP level and only a subtle increase in the nuclear YAP. This suggests that PR55α inhibits YAP proteasomal degradation in CD18/ HPAF cells. We tested the effect of PR55α on YAP protein half-life in the cytoplasm and nuclei of CD18/HPAF cells, which were treated with CHX to block protein synthesis, and analyzed for YAP protein decay over time by western blot. The results show that YAP protein half-life was~15.5 and 20.6 h in the cytoplasm and nuclei of the control cells, respectively, whereas it was only ∼8 and ∼8.7 h in the cytoplasm and nuclei of the PR55α-knockdown cells, respectively (Fig. 5c). These findings suggest that PR55α supports YAP protein stability via a mechanism that involves the inhibition of the proteasomal degradation of YAP. a Dox-inducible retroviral vector expressing PR55α (pRevTRE-PR55α) was constructed and retrovirus was produced as described in the "Materials and methods" section. Subsequently, HPNE cells were transduced with both pRevTet-On (Clontech) that expresses rtTA and pRevTRE-PR55α (or pRevTRE-Control) and selected for resistant cells to both G418 (400 µg/ml) and Hygromycin B (200 µg/ml). Diagram demonstrates the Tet-inducible retroviral vector (pRevTRE-PR55α) expressing PR55α. b The transduced cells were induced for ectopic PR55α expression by incubation with increasing doses of Dox (1 µg/ml) for 3 days and the effect of PR55α on the phosphorylation and level of YAP and LATS1/2 analyzed by immunoblotting. GAPDH served as an internal control. c Control-and PR55α-transduced HPNE cells were incubated with Dox (1 µg/ml) for the indicated days and analyzed for the effect of PR55α on YAP and the Hippo pathway (MST1/2, MOB1, and LATS1/2), by analyzing their phosphorylation and levels by immunoblotting. GAPDH served as an internal control Interaction of PR55α and YAP in pancreatic normal and cancer cells By reciprocal co-immunoprecipitation assay described previously 41 , we examined the interaction of PR55α and YAP in CD18/HPAF cells. As a control, immunoprecipitation with nonimmunized IgG was included in the study. Immunoblotting revealed the presence of both PR55α and YAP, along with PP2A-A and PP2A-C subunits in the immunoprecipitates obtained either with anti-PR55α or anti-YAP antibody (Fig. 6a). Furthermore, relative to control cells, PR55α-knockdown cells displayed a lesser amount of PR55α, PP2A-C, and PP2A-A subunits in the immunoprecipitates obtained with anti-PR55α or anti-YAP antibody (Fig. 6a). Unexpectedly, relative to control cells, a higher level of YAP was detected in the anti-PR55α immunoprecipitates obtained from PR55α-knockdown cells, which is inconsistent with a lesser amount of YAP revealed in the anti-YAP immunoprecipitates obtained from PR55α-knockdown cells relative to control cells (Fig. 6a). To determine whether the high YAP level present in the anti-PR55α immunoprecipitates from PR55α-knockdown cells could be attributed to YAP hyperphosphorylation, the anti-PR55α immunoprecipitates from control and PR55α-knockdown cells were treated with/without shrimp alkaline phosphatase (SAP) and analyzed for PR55α and p-YAP/YAP levels. As shown in Fig. 6b, the high YAP level in the anti-PR55α immunoprecipitates from PR55α-knockdown cells was markedly diminished after SAP treatment (YAP, lane 4 vs. 2). Immunoblotting of YAP-Ser127 phosphorylation confirmed the effectiveness of SAP in YAP dephosphorylation (YAP-S127, lane 4 vs. 2). We compared the interaction of PR55α with YAP versus YAP(5SA) (constitutive active mutant), in which the LATS phosphorylation sites (S61/S109/ S127/S164/S397) were mutated to alanine 38,42 . CD18/ HPAF cells were stably transduced with Flag-YAP(WT) or Flag-YAP(5SA) and immumonoprecitated with anti-PR55α antibody. As shown in Fig. 6c, anti-Flag antibody detected the presence of Flag-YAP and Flag-YAP(5SA) in the anti-PR55α immunoprecipitates obtained from their respective lysate, whereas the Flag-YAP(WT) level was 28-fold higher than Flag-YAP(5SA). This result implicates a direct interaction of PR55α and YAP and further supports that PR55α expresses a higher affinity toward phosphorylated YAP. Using immunofluorescence (IF) confocal microscopy, we analyzed the intracellular level, distribution, and colocalization of PR55α and YAP. The results show the detection of PR55α and YAP in both the cytoplasm and nucleus of CD18/HPAF cells, with PR55α slightly more concentrated in the cytoplasm and YAP slightly more in the nucleus (shControl, Fig. 6d and Supplementary Fig. S1a). In the PR55α-knockdown cells, both PR55α and YAP levels were markedly reduced and the residual YAP PR55α is essential for maintaining YAP stability. Cytoplasmic and nuclear extracts were isolated using the NE-PER™ Nuclear and Cytoplasmic Extraction Reagents (Fisher Scientific) and analyzed for YAP protein expression. a α-tubulin and Lamin A/C were used as the cytoplasmic and nuclear markers, respectively. PR55α in cytoplasm and nucleus was analyzed by Western blot analysis. b To inhibit cellular proteasome activity, CD18/HPAF cells transduced with Control-shRNA or PR55α-shRNA were treated with MG132 (25 μM) for the indicated hours. Cytoplasmic and nuclear extracts were isolated from the treated cells and analyzed for YAP expression by immunoblotting. α-tubulin and Lamin A/C served as the internal controls for cytoplasmic and nuclear extract, respectively. c To test the effect of PR55α on YAP protein stability, Control-/PR55α-shRNA-transduced CD18/HPAF cells were treated with CHX (15 μg/ml) to halt protein synthesis for the indicated hours, cytoplasmic and nuclear extracts were isolated from the treated cells, and YAP protein levels analyzed by immunoblotting. α-tubulin and Lamin A/C served as internal controls for cytoplasmic and nuclear extract, respectively was now mainly present in the nucleus (shPR55α, Fig. 6d, and Supplementary Fig. S1a). We next analyzed the intracellular distribution of PR55α and YAP in normal HPNE cells. Both PR55α and YAP were also detected in both the cytoplasm and nucleus of the cells (Fig. 6e and Supplementary Fig. S1b). Upon ectopic PR55α expression, YAP and PR55α protein levels were concurrently increased in the cells and the additional amounts of the proteins were predominantly detected in the nuclei. Collectively, these results suggest a physical interaction and functional relationship of PR55α and YAP in pancreatic cancer and normal cells. Effect of MOB1 on the PR55α-promoted YAP activation MOB1-triggered LATS1-S909/LATS2-S872 autophosphorylation is the key event resulting in YAP Fig. 6 Interaction of PR55α and YAP in pancreatic malignant and normal cells. a PR55α was immunoprecipitated from 1 mg protein lysates of CD18/HPAF cells expressing Control-shRNA or PR55α-shRNA with anti-PR55α (100C1) rabbit IgG and probed by immunoblotting for the presence of PR55α, PP2A-C, and PP2A-A subunits with anti-PR55α (2G9), anti-PP2A-C (ID6), and anti-PP2A-A (H300) antibody, respectively. YAP and GAPDH in the lysate were measured by immunoblotting for YAP protein loading control and internal control for protein quantification, respectively. b PR55α was immunoprecipitated from the indicated protein lysates (1 mg per sample) with anti-PR55 (100C1) antibody. The obtained immunoprecipitates were divided into two halves: one half remained untreated (−) and the other half was treated with Shrimp Alkaline Phosphatase (SAP) at 10 units/ml (+) at 37°C for 1 h. The resulting precipitates were rinsed once with cell lysis buffer and subjected to immunoblotting analysis for PR55α, YAP, and YAP-S127 with the antibody for PR55α (2G9), YAP (D24E4), and YAP-Ser127 phosphorylation (D9W2I), respectively. c PR55α were immunoprecipitated (IP) with anti-PR55α (2G9) antibody from CD18/HPAF cells stably transduced with empty vector, Flag-YAP, or Flag-YAP (5SA) mutant and immunoblotted (IB) using anti-PR55α (100C1) and anti-Flag (M2) antibodies. Lysates from the indicated cells were probed for Flag-YAP (input) and GAPDH (input) with specific antibodies by Western blotting. Intracellular distribution and co-localization of PR55α and YAP in pancreatic malignant and normal cells. The indicated cells were induced for the expression of PR55α-shRNA (CD18/HPAF) (d) or ectopic PR55α (HPNE) (e) by 2 µg/ml Dox for 3 days, and stained with anti-PR55α (100C1) and anti-YAP (1A12) antibodies, as described in the "Materials and methods" section. Images were analyzed for the cellular distribution of PR55α and YAP using a Zeiss-810 confocal laser-scanning microscope. Co-localization of PR55α and YAP in CD18/HPAF cells with/ without PR55α-knockdown and in HPNE cells with/without ectopic PR55α expression were examined and shown as merged images (PR55α/YAP and MERGE). Scale bars, 50 µm inhibition 38,44 . The results in Figs. 3-4 demonstrate that PR55α-promoted YAP activation in both malignant and normal cells is inversely associated with the activity of the MOB1/LATS axis. We, therefore, probed the role of MOB1 in YAP activation by PR55α using siRNA. MOB1 exists in two isoforms, MOB1A and MOB1B, which share 95% protein sequence identity and are functionally redundant 44 . Since there is no antibody available to distinguish MOB1A and MOB1B, we analyzed their expressions by RT-PCR in a panel of pancreatic normal and cancer cells, which showed that MOB1A mRNA level is 5-15 fold higher than MOB1B in these cells (Supple- mentary Fig 2a, b). This result was confirmed by siRNAknockdown studies, which showed that MOB1A-siRNA but not MOB1B-siRNA effectively reduced the total MOB1 protein level in the cells (Supplementary Fig 2c). With MOB1A-siRNA, we assessed the role of MOB1 in the regulation of LATS1/2 and YAP by PR55α. MOB1knockdown in HPNE-Control cells resulted in a decrease of LATS1-S909/LATS2-S872 phosphorylation and a concurrent increase in YAP protein level, as shown in Fig. 7a (lane 2 vs. 1, Bar graph). Similarly, MOB1knockdown in HPNE-PR55α cells caused a marginal decrease in the already low LATS1-S909/LAT2-S872 phosphorylation and increase of YAP level compared with the HPNE-PR55α cells with control-knockdown (Fig. 7a, lane 4 vs. 3, Bar graph). However, MOB1-knockdown in HPNE cells produced no effect on YAP-S127 phosphorylation or LATS2 protein levels, which are negatively affected only by PR55α level. We next evaluated the effect of MOB1 on the regulation of LATS and YAP by PR55α in malignant CD18/HPAF cells. While MOB1-knockdown by siRNA had very little effect on the low level of LATS1-S909/LATS2-S872 phosphorylation in CD18/HPAF cells, it markedly diminished the induction of LATS1-S909/LATS2-S872 phosphorylation caused by the PR55α-knockdown in CD18/HPAF cells (Fig. 7a, right panel, bar graph). In both control-and PR55α-shRNA-transduced CD18/HPAF cells, MOB1-knockdown by siRNA resulted in a subtle increase of YAP protein level but had little effect on YAP-S127 phosphorylation, or LATS2 protein level (Fig. 7a, lane 6 vs. 5 and lane 8 vs. 7), all of which were significantly affected by the level of PR55α, (Fig. 7a, right panel, lanes 7-8 vs. lanes 5-6). These results indicate that PR55α suppresses the activation of MOB1/LATS cascade, while MOB1-inhibition cannot fully compensate for the loss of PR55α to restore YAP activation, suggesting that PR55α holds a dominant control on the magnitude of YAP activation. Effect of LATS1/2 in the PR55α-promoted YAP activation We investigated the role of LATS1/2 in the activation of YAP by PR55α in CD18/HPAF and AsPC-1 pancreatic cancer cells. In control-shRNA-transduced cells, knockdown of LATS1 and/or LATS2 by siRNA had only subtle effects on YAP phosphorylation and level in the cells (Fig. 7b, Control-shRNA). In PR55α-shRNA-transduced cells, knockdown of LATS1 or LATS2 alone by siRNA resulted in 1.6-3 fold increases in YAP protein levels relative to control cells (Fig. 7b, YAP, lanes 6-7 vs. lane 5). However, inhibition of both LATS1 and LATS2 by siRNA in the PR55α-knockdown cells resulted in a subtle, if any, decrease in YAP level compared with control cells (Fig. 7b, YAP, lane 8 vs. 5). Thus, in the PR55α-high (Control-shRNA) cells, manipulation of LATS1/2 levels apparently produced little effect on YAP level, whereas knockdown of either LATS1 or LATS2 in the PR55α-low (PR55α-shRNA) cells resulted in increases in YAP levels (Fig. 7b). We also analyzed the effect of LATS1/2 on YAP-S127 phosphorylation in the presence/absence of PR55αknockdown in pancreatic cancer cells. As shown in Fig. 7b, knockdown of LATS1 and/or LATS2 by siRNA had little effect on YAP-S127 phosphorylation in Control-shRNA-transduced cells, while it resulted in decreases in YAP-S127 phosphorylation in PR55α-shRNA-transduced cells. Furthermore, while knockdown of both LATS1 and LATS2 displayed an additive effect on inhibition of YAP-S127 phosphorylation in CD18/HPAF cells, this effect was not observed in AsPC-1 cells. These results suggest that PR55α plays a domainant role in the negative regulation of YAP-S127 phosphorylation. PR55α enhances YAP-targeted gene transcriptions and anchorage-independent growth To evaluate the biological significance of PR55α in promoting YAP activation, we analyzed the effect of PR55α on YAP-targeted gene expressions in HPNE (normal) and CD18/HPAF (malignant) cells. Real-time (RT)-PCR analyses revealed that PR55α expression was positively associated with YAP-activated transcriptions of ANKRD1, CTGF, CYR61, and Survivin 37 in both HPNE and CD18/HPAF cells (Fig. 8a). Thus, ectopic PR55α expression in HPNE cells resulted in 8-10 fold increases in mRNA expressions of the YAP targets compared with control cells (red bars), while PR55α-knockdown by shRNA in CD18/HPAF cells caused a 4-6-fold reduction in mRNA levels of the YAP targets relative to the control-shRNA-transduced cells (black bars). These functional data confirm the role of PR55α in the promotion of YAP activation. Promoting anchorage independence is the predominant role of YAP in oncogenesis . YAP alone has been shown to induce anchorage-independent growth of HPNE normal cells by the soft-agar assay 22 . Therefore, we tested the effect of PR55α on anchorage-independent growth using the soft-agar assay 48 . The results in Fig. 8b show that, following Dox-induced ectopic PR55α expression, there was a significant induction of the proliferation of HPNE normal cells in soft-agar, indicative of anchorageindependent growth. Conversely, PR55α-knockdown by shRNA abrogated the clonogenicity of pancreatic cancer cells in soft-agar, indicative of loss of anchorage independence (Fig. 8c). These results support a critical role of PR55α in the positive regulation of YAP oncogenic function. In summary, the results of the current study (Figs. 2-8) reveal a novel mechanistic role of PR55α regulated PP2A in the activation of YAP oncoprotein. Figure 9 outlines the findings of this investigation, which indicates that PR55α specifically suppresses the MOB1-mediated LATS autophosphorylation/activation, which would otherwise promote YAP proteasomal degradation by β-TrCP and cytoplasmic retention by 14-3-3 37 . Furthermore, PR55α also exhibited a Hippo pathway-independent role in YAP activation, as siRNA-knockdown of either MOB1 or LATS1/2 did not compensate completely for the effect of PR55α-loss or PR55α-overexpression on YAP activation in both normal and malignant pancreatic cells (see Fig. 7), which suggests a regulation of YAP activation directly by PR55α or by another unknown mechanism regulated by PR55α. Discussion PP2A has been suggested in the regulation of the Hippo pathway and YAP activation , while the specific PP2A holoenzyme(s) involved were not identified. We recently identified the PR55α regulatory subunit of PP2A in the support of anchorage independence and tumorigenicity of pancreatic cancer cells, which coincidentally is the main Fig. 7 Effects of MOB1-and LATS1/2-knockdown by siRNA on the YAP activation promoted by PR55α. a MOB1 was knocked down by siRNAs in both HPNE and CD18/HPAF cells with/without the expression of ectopic PR55α and PR55α-shRNA, respectively. After 72 h siRNA-transfection, the cells were analyzed for the phosphorylation and/or level of MOB1, LATS1/2, and YAP by immunoblotting. GAPDH served as an internal control. The levels of YAP and GAPDH were quantified using ImageJ software. YAP protein levels were normalized by the corresponding GAPDH levels and relative YAP levels in the samples were analyzed by SigmaPlot software and presented as bar graphs. b LATS1 and/or LATS2 were knocked down by siRNAs in CD18/HPAF and AsPC-1 cells expressing Control-shRNA or PR55α-shRNA. After 72 h incubation in medium containing Dox (2 µg/ml) to maintain shRNA expression, the cells were analyzed for the phosphorylation and/or levels of PR55α, LATS1, LATS2, YAP, and GAPDH. The levels of YAP and GAPDH were quantified using ImageJ software and relative YAP protein levels versus GAPDH levels were indicated under the YAP blots function of YAP 20,49 . Thus, we investigated the role of PR55α in the regulation of the Hippo pathway and YAP activation in pancreatic cancer cells. The results in this report elucidate a novel YAP activation mechanism based on the PR55α-regulated PP2A (Fig. 9), which engages PR55α at three levels of regulation 1 : inhibition of MOB1-triggered LATS1/2 autoactivation loop (LATS1-S909/LATS2-S872) 2 , destabilizing LATS2 protein and 3 direct YAP activation (see Figs. 3-7). However, this PR55α-dependent mechanism of YAP activation apparently also activates MST1/2 (see Figs. , which may be through a feedback mechanism. Thus, the increase in MOB1-T35 phosphorylation in the PR55α-knockdown cells may attribute to the inhibition of the PR55α/PP2A phosphatase activity rather than the increase of MST1/2 kinase activity. Furthermore, MST1/2 level/activity is negatively associated with LATS2 protein stability in both HPNE normal and CD18/HPAF malignant cells in response to PR55α manipulation, implicating cross-talking or a feedback regulation mechanism among the Hippo pathway components. PR55α-knockdown results in an increase of LATS2 stability in CD18/HPAF but not in AsPC-1 pancreatic cancer cells (see Fig. 3). Although the exact mechanism causing this difference is unclear, it is likely to be cell-type specific, as the two pancreatic cancer cell lines were originated from different metastatic sites, CD18/ HPAF from the liver and AsPC-1 from ascites 39 . In order to metastasize and recolonize at distant organ sites, primary cancer cells need to adapt and survive a cascade of the environmental challenges by undergoing the processes of invasion→ intravasation→ systemic transport→ extravasation→ distant colonization 50 . Thus, pancreatic cancer cells metastasizing to the liver versus ascites would have gone through very different adaptive processes and LATS2 stability regulation could be one of those mechanisms needing to be altered to fit different processes. Future studies will be needed to elucidate the mechanism and biological significance of LATS2 regulation during metastasis. Although PR55α inhibits the MOB1-triggered LATS1/2 autoactivation that blocks YAP, knockdown of MOB1 in the PR55α-high cells (HPNE-PR55α or CD18/HPAF) had little effect on YAP level and phosphorylation (Fig. 7a, YAP and YAP-S127: lanes 3-4 and 5-6). In contrast, knockdown of MOB1 in the PR55α-low cells (HPNE- Fig. 8 Effects of PR55α on YAP-targeted gene expressions and anchorage-independent growth. a PR55α promotes gene expressions of YAP targets. Ectopic PR55α and PR55α-shRNA were induced by Dox in HPNE for 3 days and CD18/HPAF cells for 6 days, respectively. The resulting cells were harvested to extract total RNA samples to analyze the mRNA expression of YAP target genes (ANKD1, CTGF, CRY61, and Survivin) by qRT-PCR, as described in the "Materials and methods" section. The study was repeated two times with duplicate samples and the result expressed as mean ± s.d (n = 6), p = 0.02. Statistical analyses were performed using the Student's t-test. qRT-PCR, quantitative (q) Reverse Transcription (RT) PCR. b PR55α promotes anchorage-independent growth of HPNE cells. Upper panel: HPNE cells (5 × 10 4 ) with/without ectopic PR55α expression were incubated with 1 µg/ml Dox for 48 h, plated in soft-agar in six-well plates and incubated for 14 days. Left panels: representative images of the soft-agar assay photographed by phase-contrast optics. Box plot: colonies in soft-agar were counted by ImageJ software and shown as mean ± s.d. of 14 samples. Scale bar represents 100 μm. c PR55α-knockdown by shRNA inhibits anchorage-independent growth of pancreatic cancer cells. shRNA-transduced CD18/HPAF and AsPC-1 cells were incubated with 2 µg/ml Dox for 48 h, plated in soft-agar in six-well plates at 4 × 10 4 and incubated for 14 days. Left panels: representative images of soft-agar assay photographed by phase-contrast optics. Box plot: colonies in soft-agar were quantified by ImageJ software and shown as mean ± s.d. of two sets of experiments in triplicate samples. Scale bar represents 100 μm control or CD18/HPAF-PR55α-shRNA) resulted in moderate but noticeable increases in YAP levels (Fig. 7a, YAP: lanes 1-2 and 7-8). Furthermore, knockdown of either LATS1 or LATS2 by siRNA only partially compensated for the loss of PR55α, marginally restoring YAP protein level in the PR55α-knockdown cells (see Fig. 7b, YAP: lane 6-7 vs. 5). However, such effects are lost when both LATS1 and LATS2 are inhibited by siRNA (see Fig. 7b, YAP: lane 8 vs. lanes 5-7), which suggests there might be an alternative YAP inhibitory pathway whose function is activated by the loss of both LATS1/2 and PR55α in the cells. Furthermore, the results of Fig. 7 suggest that the role of PR55α in YAP activation involves both Hippo pathway-dependent and -independent mechanisms, the latter of which could be direct or indirect. PR55α directed PP2A activity has been shown to positively regulate several oncogenic pathways that play crucial roles in the oncogenesis of solid tumors, namely the Ras/Raf/MEK, Wnt/β-Catenin, and c-Myc signaling pathways 51,52 . While PR55α activates the Ras/Raf/ MEK cascade through dephosphorylating KSR-S392 and RaS259/S295 inhibitory sites that block the pathway, its activation of β-Catenin and c-Myc is via the direct dephosphorylation of β-catenin-T41/S37/S33 and c-Myc-T58, respectively, preventing their proteasomal degradation by β-TrCP. Furthermore, recent studies indicate that cross-talk exists among the PR55α-promoted oncogenic pathways, such as 1 the Ras/Raf/MEK/ERK signaling that promotes the activation of YAP and c-Myc by increasing their expression 2 , β-catenin that synergizes with YAP/ TAZ during cancer progression, and 3 YAP that is required for KRAS-driving pancreatic tumorigenesis and can compensate for the loss of oncogenic KRAS in the KRAS-addicted pancreatic cells to sustain the malignant phenotypes . These comprehensive data further highlight the significance of PR55α in tumor promotion and the potential of PR55α as a therapeutic target for cancer treatment. Cytoplasmic and nuclear extracts were isolated using NE-PER™ Nuclear and Cytoplasmic Extraction Reagents (Thermo Fisher Scientific). Lamin A/C and α-tubulin were used as loading controls for nuclear and cytoplasmic extract, respectively 59 . Additional details of cell culture/treatment are described in Supplementary Materials. Antibodies Antibodies are listed in Supplementary Materials. Immunoblotting and immunoprecipitation Immunoblotting and immunoprecipitation are described in Supplementary Materials 20,41,60 . Short interfering RNA (siRNA) transfection ON-TARGETplus SMARTpool of siRNA duplexes (Dharmacon) were used for silencing LATS1, LATS2, MOB1A, and MOB1B. Control siGENOME nontargeting siRNA (Dharmacon) was designed to target no known genes in human, mouse or rat. The siRNA sequences are described in Supplementary Materials. Cells were transfected with 100 nmol/L of siRNA by DharmaFECT-1 (Thermo Fisher Scientific) as instructed by the manufacturer. shRNA lentiviral vectors and viral infection Dox-inducible lentiviral vector (TRIPZ) expressing shRNAs (Dharmacon) were used. shRNA sequences, Fig. 9 A model for the regulation of the Hippo pathway and YAP by PR55α. Black lines indicate a current understanding of the Hippo signaling cascades that regulate YAP phosphorylation and stability, resulting in YAP cytoplasmic retention by 14-3-3 and proteasomal degradation by SCF(β-TrCP). Red lines indicate the novel findings presented in this report, showing that PR55α inhibits the MOB1activated LATS1-S909/LATS2-S872 autophosphorylation that prevents YAP activation, while PR55α concomitantly inhibits YAP phosphorylation, both of which lead to YAP activation. Blue dotted lines indicate that PR55α activates MST1/2 levels and phosphorylation through an unknown mechanism lentiviral production, and viral infection are described in Supplementary Materials. Retroviral vectors and viral infection pRevTet-On retroviral vector (Clontech) expresses the reverse tetracycline-controlled transactivator (rtTA) from the CMV promoter. pRevTRE retroviral vector (Clontech) expresses a gene of interest from the Tet-response element (TRE), which contains seven direct repeats of the tetO operator sequence upstream of a minimal CMV promoter that can be bound by the tTA or rtTA. The pRevTRE-PR55α retroviral vector contains the PR55α full-length cDNA sub-cloned from pBluescript-SK(-) vector by HindIII/ClaI digestion. Retrovirus production and infection are described in Supplementary Materials. Immunofluorescence and microscopy IF and microscopy were performed as described 41 with additional detail in Supplementary Materials. Images were taken using a Zeiss-810 confocal laserscanning microscope. Nuclear/cytoplasmic YAP and PR55α and their co-localization were analyzed by ImageJ . RT-PCR analysis Total RNA was isolated using the TRIzol RNA-Isolation Reagent (Invitrogen) and analyzed for human ANKRD1, CTGF, CYR61, GAPDH, MOB1A, MOB1B, and Survivin mRNA levels by RT-PCR using the iScript Advanced cDNA Synthesis Kit and SsoAdvanced Universal SYBR Green Supermix (Bio-Rad). The mRNA expressions were normalized with GAPDH-mRNA levels. PCR-primer sequences are listed in Supplementary Materials. Statistical analysis SigmaPlot was used for statistical analyses. Multiple t-tests were used for comparison of experimental groups. P values ≤ 0.05 were considered significant.
#include<cstdio> #include<cstring> #include<cstdlib> #include<cctype> #include<ctime> #include<cmath> #include<iostream> #include<fstream> #include<string> #include<vector> #include<queue> #include<map> #include<algorithm> #include<set> #include<sstream> #include<stack> #include<assert.h> using namespace std; set <int> s; int h[400010]; int l[100010]; int r[100010]; int height[400010*5]; int markt[400010]; map < int,int > mp; void update(int L,int R,int H,int id,int l,int r) { assert(id<(400010*5)); if(l>R || r<L ) return; if(l>=L && r<=R) { if(id==1) { printf(""); } height[id]=max(height[id],H); return; } int mid=(l+r)/2; update(L,R,H,id*2,l,mid); update(L,R,H,id*2+1,mid+1,r); } int get(int n,int id,int l,int r) { assert(id<(400010*5)); if(n>r || n<l || r<l) return 0; if(n==l && n==r) { return height[id]; } int mid=(l+r)/2; if( n<=mid ) return max( height[id],get(n,id*2,l,mid) ); else return max( height[id],get(n,id*2+1,mid+1,r) ); } int main() { // freopen("in.txt","r",stdin); //freopen("out.txt","w",stdout); freopen("input.txt","r",stdin); freopen("output.txt","w",stdout); int n,m,i,mark,L,R; int H; while(scanf("%d",&n)==1) { memset(height,0,sizeof(height)); s.clear(); set<int> tem; for(i=0;i<n;i++) { scanf("%d %d %d",&h[i],&l[i],&r[i]); if(l[i]>r[i]) swap(l[i],r[i]); s.insert(2*l[i]); s.insert(2*r[i]); assert( h[i]>0 ); } set<int>::iterator it,it1; //mp.clear(); mark=0; it=s.begin(); it++; vector<int> xxx; for(it1=s.begin();it!=s.end();it1++,it++) xxx.push_back( ( ((*it)/2) + ((*it1)/2) ) ); for(i=0;i<xxx.size();i++) s.insert( xxx[i] ); xxx.clear(); // printf("%d\n",s.size()); //while(1); mark=0; for(it=s.begin();it!=s.end();it++) { mp[(*it)]=mark; markt[mark]=(*it); // printf("%d %d\n",(*it)/2,mark); mark++; if(*it==98542915*2) { printf(""); } } // cout<<mark; // while(1); s.clear(); assert(mark<600010); for(i=0;i<n;i++) { L=mp[2*l[i]]; R=mp[2*r[i]]; H=h[i]; update(L,R,H,1,0,mark-1); if(height[1]!=0) { printf(""); } } mp.clear(); for(i=0;i<mark;i++) { if(i==300035) { printf(""); } h[i]=get(i,1,0,mark-1); if(height[1]!=0) { printf(""); } } vector< pair<int,int> >ans; pair<int,int> pr,pre; pr.first=markt[0]; pr.second=0; ans.push_back(pr); for(i=0;i<mark;i++) { pre=pr; pr.first=markt[i]; pr.second=h[i]; if(pr.second>pre.second ) ans.push_back(make_pair(pr.first,pre.second)); else if(pr.second<pre.second ) ans.push_back(make_pair(pre.first,pr.second)); ans.push_back(pr); } ans.push_back(make_pair(pr.first,0)); n=ans.size(); vector< pair<int,int> > vout; vout.push_back(ans[0]); for(i=1;i<n;i++) { // printf("%d %d\n",ans[i].fisrt,ans[i].second); if(ans[i].second==ans[i-1].second && ans[i].first==ans[i-1].first) continue; if(ans[i].second==ans[i-1].second) { if(i==(n-1)) continue; if( ans[i].second==ans[i+1].second ) continue; } vout.push_back(ans[i]); } printf("%d\n",vout.size()); for(i=0;i<vout.size();i++) { assert(vout[1].first%2!=1); printf("%d %d\n",vout[i].first/2,vout[i].second); } } return 0; }
<gh_stars>10-100 package br.com.correios.api.postagem.xml; import java.io.StringReader; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import com.google.common.base.Optional; import br.com.correios.api.postagem.exception.PlpException; public class XmlPlpParser { private final JAXBContext jaxbContext; public XmlPlpParser() { try { jaxbContext = JAXBContext.newInstance(Correioslog.class); } catch (JAXBException e) { throw new PlpException("Ocorreu um erro ao criar a instancia do JaxB Context com a classe Correioslog", e); } } public Optional<Correioslog> convert(String xmlPlp) { Correioslog correiosLog = parseFrom(xmlPlp); return Optional.fromNullable(correiosLog); } private Correioslog parseFrom(String xml) { try { Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); StringReader reader = new StringReader(xml); return (Correioslog) unmarshaller.unmarshal(reader); } catch (JAXBException e) { throw new PlpException("Ocorreu um erro ao tentar fazer o Unmarshal do XML da PLP: " + xml, e); } } }
THU0338 Googling Ankylosing Spondylitis: Internet Search Activity from French Population Background The aims of the study are first to evaluate the most sought keywords in Google related to ankylosing spondylitis in 2013 in France and to compare it with those of other rheumatic diseases and to examine the scope and nature of corresponding websites. Secondly, to assess the evolution of search from 2004 to 2014 looking at the impact of 2010 AS awareness campaign and the seasonality of searches. Methods Google AdWords Keywords is a free online program providing data related to search term. We entered 46 keywords related to AS and the program yielded a large set of related queries (n=573). Terms receiving at least 500 global monthly hits were retained (n=5). To compare volume of AS searches with other rheumatic diseases, we did the same as above with several rheumatic diseases. To AS, we analyzed content from all websites that appeared on the first page of search results for each keyword selected. In total, 50 websites were examined. Google Trends is a Web-based tool that analyzes all Google Web site searches. For a given search term, Google Trends computes how many searches have been done relative to the total number of searches done on Google. We examined search trends for the French terms of “ankylosing spondylitis” to assess the impact of the only French national AS awareness campaign. To investigate the seasonality of AS, we utilized monthly data between January 2004 and January 2014 of “ankylosing spondylitis” to reflect months of diagnosis and keywords related to “inflammatory back pain”, to capture more individuals with AS who may not have sought medical care or not have been given a diagnosis. Results In 2013, the five most popular AS related searching keywords were french words for: spondylarthritis (22200/month), ankylosing spondylitis (14800), HLA B27 (4400), spondylarthropathy (2400) and ankylosing spondylitis treatment (880). The visible websites from these searches were sites of information for general population, patients associations and academic/hospital centers. The most frequent searches about rheumatologic topics were relative to back pain (350790/month), osteoarthritis (107760) and fibromyalgia (71580). The pattern of Internet search volume for AS is stable from 2004 to 2014, but we observed a peak corresponding to the french AS awareness from 23 May to 27 June 2010. The volume of searches was 2,5 times more important as usual but only on the period of the campaign, without remnant effect. In ten years analysis, keyword “ankylosing spondylitis” is less used in summer months, and using keywords related to inflammatory back pain is more frequent in october, november and december, this may be a reflect of seasonality of AS symptoms. Conclusions Our study is the first to investigate Google using of rheumatic population. We showed which sites are proposed when using AS keywords related to better understand what our AS patients could read on internet. Google is a concrete tool to evaluate awareness campain in rheumatology. Disclosure of Interest None declared
<reponame>Alex-Hu2020/imx-optee-os- /* SPDX-License-Identifier: BSD-2-Clause */ /* * Copyright 2017-2018 NXP */ #ifndef __IMX7_DDRC_REGS__ #define __IMX7_DDRC_REGS__ #define IMX_DDR_TYPE_DDR3 BIT32(0) #define IMX_DDR_TYPE_LPDDR2 BIT32(2) #define IMX_DDR_TYPE_LPDDR3 BIT32(3) /* DDR Controller */ #define MX7_DDRC_MSTR 0x000 #define MX7_DDRC_STAT 0x004 #define MX7_DDRC_MRCTRL0 0x010 #define MX7_DDRC_MRCTRL1 0x014 #define MX7_DDRC_MRSTAT 0x018 #define MX7_DDRC_PWRCTL 0x030 #define MX7_DDRC_RFSHCTL3 0x060 #define MX7_DDRC_ZQCTL0 0x180 #define MX7_DDRC_DFIMISC 0x1B0 #define MX7_DDRC_DBG1 0x304 #define MX7_DDRC_DBGCAM 0x308 #define MX7_DDRC_SWCTL 0x320 #define MX7_DDRC_SWSTAT 0x324 /* DDR Multi Port Controller */ #define MX7_DDRC_MP_PSTAT 0x3FC #define MX7_DDRC_MP_PCTRL0 0x490 /* DDR PHY */ #define MX7_DDRPHY_PHY_CON1 0x04 #define MX7_DDRPHY_LP_CON0 0x18 #define MX7_DDRPHY_OFFSETD_CON0 0x50 #define MX7_DDRPHY_OFFSETR_CON0 0x20 #define MX7_DDRPHY_OFFSETR_CON1 0x24 #define MX7_DDRPHY_OFFSETR_CON2 0x28 #define MX7_DDRPHY_OFFSETW_CON0 0x30 #define MX7_DDRPHY_OFFSETW_CON1 0x34 #define MX7_DDRPHY_OFFSETW_CON2 0x38 #define MX7_DDRPHY_RFSHTMG 0x64 #define MX7_DDRPHY_CA_WLDSKEW_CON0 0x6C #define MX7_DDRPHY_CA_DSKEW_CON0 0x7C #define MX7_DDRPHY_CA_DSKEW_CON1 0x80 #define MX7_DDRPHY_CA_DSKEW_CON2 0x84 #define MX7_DDRPHY_MDLL_CON0 0xB0 #define MX7_DDRPHY_MDLL_CON1 0xB4 #endif /* __IMX7_DDRC_REGS__ */
// Package flags handles flag parsing package flags import ( "os" "strings" ) // Parse converts command line arguments into an interface. Argument // can have any number of leading dashes and be separated from their // value by an equal sign or white space. Equal signs must not be present // anywhere other than between the argument and its value. func Parse() map[string]interface{} { args := make(map[string]interface{}, 0) for i := 1; i < len(os.Args); i++ { arg := strings.Trim(os.Args[i], "-") var flag string var parameter string if strings.Contains(arg, "=") { splitArg := strings.Split(arg, "=") flag = splitArg[0] parameter = splitArg[1] } else { flag = arg parameter = os.Args[i+1] i++ } args[flag] = parameter } return args }
{-# LANGUAGE BangPatterns #-} {-| Macroscopic parameters calculation. We use regular spatial grid and time averaging for sampling. Sampling should start after particle system has reached steady state. Samples are then collected in each cell for a certain number of time steps. Sampling is performed in 'MacroSamplingMonad' to ensure consistency of averaging process. During sampling, basic parameters are calculated like number of molecules per cell or mean square of thermal velocity. After sampling these are used to derive final (intensive) parameters like number density or temperature. -} module DSMC.Macroscopic ( MacroSamples , MacroField , BasicMacroParameters , IntensiveMacroParameters -- * Macroscopic sampling monad , MacroSamplingMonad , SamplingState(..) , runMacroSampling , updateSamples , getField ) where import Control.Monad.Trans.Class (lift) import Control.Monad.Trans.Reader import Control.Monad.Trans.State.Strict import qualified Data.Strict.Maybe as S import qualified Data.Array.Repa as R import qualified Data.Vector.Unboxed as VU import Control.Parallel.Stochastic import DSMC.Cells import DSMC.Particles import DSMC.Traceables import DSMC.Util import DSMC.Util.Constants import DSMC.Util.Vector -- | Basic macroscopic parameters calculated in every cell: particle -- count, mean absolute velocity, mean square of thermal velocity. -- -- Particle count is non-integer because of averaging. -- -- These are then post-processed into number density, flow velocity, -- pressure and translational temperature. -- -- Note the lack of root on thermal velocity! type BasicMacroParameters = (Double, Vec3, Double) -- | Intensive macroscopic parameters available after averaging has -- completed. These are: number density, absolute velocity, pressure -- and translational temperature. type IntensiveMacroParameters = (Double, Vec3, Double, Double) -- | Vector which stores averaged macroscropic parameters in each -- cell. -- -- If samples are collected for M iterations, then this vector is -- built as a sum of vectors @V1, .. VM@, where @Vi@ is vector of -- parameters sampled on @i@-th time step divided by @M@. type MacroSamples = R.Array R.U R.DIM1 BasicMacroParameters -- | Array of central points of grid cells with averaged macroscopic -- parameters attached to every point. type MacroField = R.Array R.U R.DIM1 (Point, IntensiveMacroParameters) -- | Monad which keeps track of sampling process data and stores -- options of macroscopic sampling. -- -- GridMonad is used to ensure that only safe values for cell count -- and classifier are used in 'updateSamples' and 'averageSamples' -- (that may otherwise cause unbounded access errors). Note that -- steady condition is not handled by this monad (instead, caller code -- should decide when to start averaging). -- -- Inner Reader Monad stores averaging steps setting. type MacroSamplingMonad = StateT SamplingState (ReaderT Int GridMonad) -- | State of sampling process. data SamplingState = None -- ^ Sampling has not started yet. | Incomplete Int MacroSamples -- ^ Sampling is in progress, not enough samples -- yet. Integer field indicates how many steps are -- left. | Complete MacroSamples -- ^ Averaging is complete, use 'getField' to -- unload the samples. makeIntensive :: Double -- ^ Mass of molecule. -> Double -- ^ Statistical weight of a simulator particle. -> Double -- ^ Cell volume. -> BasicMacroParameters -> IntensiveMacroParameters makeIntensive !m !w !vol !(n, vel, c) = if n == 0 then (0, (0, 0, 0), 0, 0) else (numDens, vel, c * dens / 3, m * c / (3 * boltzmann)) where numDens = n / vol * w dens = numDens * m -- | Fetch macroscopic field of intensive parameters if averaging is -- complete. getField :: Double -- ^ Mass of molecule. -> Double -- ^ Statistical weight of single molecule. -> MacroSamplingMonad (Maybe MacroField) getField m w = do (cellCount, _) <- lift $ lift $ asks classifier ixer <- lift $ lift $ asks indexer vols <- lift $ lift $ asks volumes res <- get case res of Complete samples -> do let centralPoints = R.fromFunction (R.ix1 $ cellCount) (\(R.Z R.:. cellNumber) -> ixer cellNumber) realSamples = R.zipWith (makeIntensive m w) (fromUnboxed1 vols) samples f <- R.computeP $ R.zipWith (,) centralPoints realSamples return $ Just f _ -> return $ Nothing -- | Parameters in empty cell. emptySample :: BasicMacroParameters emptySample = (0, (0, 0, 0), 0) -- | Run 'MacroSamplingMonad' action with given sampling options and -- return final 'Complete' state with macroscopic samples. runMacroSampling :: MacroSamplingMonad r -> ParallelSeeds -> Grid -- ^ Grid used to sample macroscopic parameters. -> Body -> Int -- ^ Use that many points to approximate every cell volume. -> Int -- ^ Averaging steps count. -> DSMCRootMonad (r, SamplingState) runMacroSampling f seeds grid body testPoints ssteps = runGrid (runReaderT (runStateT f None) ssteps) seeds grid body testPoints -- | Create empty 'MacroSamples' array. initializeSamples :: Int -- ^ Cell count. -> MacroSamples initializeSamples cellCount = fromUnboxed1 $ VU.replicate cellCount emptySample -- | Gather samples from ensemble. Return True if sampling is -- finished, False otherwise. updateSamples :: Ensemble -> MacroSamplingMonad Bool updateSamples ens = let addCellParameters :: BasicMacroParameters -> BasicMacroParameters -> BasicMacroParameters addCellParameters !(n1, v1, c1) !(n2, v2, c2) = (n1 + n2, v1 <+> v2, c1 + c2) in do sorting@(cellCount, _) <- lift $ lift $ asks classifier maxSteps <- lift $ ask sampling <- get -- n is steps left for averaging let (n, oldSamples) = case sampling of None -> (maxSteps, initializeSamples cellCount) Incomplete s o -> (s, o) Complete _ -> error "updateSamples called, but pool's closed." weight = 1 / fromIntegral maxSteps -- Sort particles into macroscopic cells for sampling sorted = classifyParticles sorting ens -- Sampling results from current step stepSamples = cellMap (\_ c -> sampleMacroscopic c weight) sorted -- Add samples from current step to all sum of samples collected so -- far !newSamples <- R.computeP $ R.zipWith addCellParameters oldSamples stepSamples let fin = (n == 0) -- Update state of sampling process put $ case fin of True -> Complete newSamples False -> Incomplete (n - 1) newSamples return fin -- | Sample macroscopic values in a cell. sampleMacroscopic :: S.Maybe CellContents -> Double -- ^ Multiply all sampled parameters by this number, -- which is the statistical weight of one sample. -- Typically this is inverse to the amount of steps -- used for averaging. -> BasicMacroParameters sampleMacroscopic !c !weight = case c of S.Nothing -> emptySample S.Just ens -> let -- Particle count n = fromIntegral $ VU.length ens -- Particle averaging factor s = 1 / n -- Mean absolute velocity m1 = (VU.foldl' (\v0 (_, v) -> v0 <+> v) (0, 0, 0) ens) .^ s -- Mean square thermal velocity c2 = (VU.foldl' (+) 0 $ VU.map (\(_, v) -> let thrm = (v <-> m1) in (thrm .* thrm)) ens) * s in (n * weight, m1 .^ weight, c2 * weight)
def new_material(self): current_mat, _ = self.get_current_material() new_mat = current_mat.copy() new_mat.name = new_mat.name + "_copy" new_mat.path = new_mat.path[:-5] + "_copy.json" if self.current_dialog is not None: self.current_dialog.close() self.current_dialog = DMatSetup(new_mat, self.is_lib_mat, index=None) self.current_dialog.finished.connect(self.validate_setup) self.current_dialog.show()
DATE: Oct 18, 2014 | BY: Brent McKnight | Category: Sci-Fi It’s no secret that we hated the character Andrea on AMC’s The Walking Dead, which is too bad, because in the comics that serve as the source material, she’s consistently been one of the best characters for years. They fucked her up royally on the hit zombie drama, and many of us were glad when they killed her off at the end of season 3. Fortunately for the world, however, it appears actress Laurie Holden took the spirit of her character from the comics to heart (rather than her TV counterpart), and became a total badass. How badass you ask? She helped take down a Colombian child sex trafficking ring, and credits The Walking Dead with an assist. Apparently Columbia has a huge problem with children being sold into sex slavery, with child prostitutes as young as 11-years-old being bought and traded. One report says the South American nation “often seen by pedophiles as a vacation destination for underage sex.” That’s not a particularly good thing to be known for if you ask us. A group called Operation Underground Railroad runs stings to bring these disgusting scumbags to justice and shut down these rings, and when a sting went down recently in Cartagena, Holden took part. A group of volunteers—including Holden, a CrossFit instructor, and a Romney, among others—posing as tourists went around trying to hire underage girls for a fake bachelor party at a rented mansion, which they creepily decorated with balloons and banners like a teenager’s birthday party. They didn’t want a group of young girls arriving at the house to arouse suspicion, apparently. The space was also heavily decorated with cameras to catch everything on tape. Holden, wearing a disguise so as not to be recognized, was one of the people responsible for distracting the girls while the pimps were being caught doing their business on camera so they could be arrested by the authorities. She called it, “the biggest acting challenge in the history of all time.” You do have to imagine that it would be rather difficult to keep your cool in such a situation, but she also credits some of her work on The Walking Dead for helping out, saying, “I was trained by a Navy Seal when I did The Walking Dead so I feel kind of like I can protect myself.” Check out this video about the sting: More ABC news videos | ABC Health NewsAll in all, this mission resulted in the arrest of 12 piece of shit criminals and the rescue of 55 underage victims of sex trafficking. Regardless of what you think of Andrea onscreen fighting zombies, you have to admit that battling sex predators in real life is pretty badass and brave.
/** * A dedicated value class ensures safe sorting, as otherwise there's a risk that the inflight AtomicInteger * might change mid-sort, leading to undefined behaviour. */ static final class ScoreSnapshot { private final int score; private final int inflight; private final ChannelScoreInfo delegate; ScoreSnapshot(int score, int inflight, ChannelScoreInfo delegate) { this.score = score; this.inflight = inflight; this.delegate = delegate; } int getScore() { return score; } int getInflight() { return inflight; } ChannelScoreInfo getDelegate() { return delegate; } @Override public String toString() { return "ScoreSnapshot{score=" + score + ", delegate=" + delegate + '}'; } }
. Combined hepatocellular-cholangiocarcinoma is a rare form of primary liver cancer, featuring both hepatocellular and biliary epithelial differentiations. An intrahepatic tumor may be considered as a metastatic lesion. It has been suggested in the literature that the likelihood of metastasis in the cirrhotic liver is lower than that in the non-cirrhotic liver. A rare case of combined hepatocellular-cholangiocarcinoma and second primary colon adenocarcinoma in a 67-year-old male patient with liver cirrhosis is presented. Histologically, the intrahepatic mass was composed of a spindle cell sarcomatous component; a hepatocellular carcinoma component; and a cholangiocarcinoma component. There were focal transitional regions among the different components. Immunohistochemically, the cholangiocarcinoma component of the intrahepatic mass showed positive reactions for CK-7 but negative reactions for CK-20. The adenocarcinoma of the colon showed positive reactions for CK-20 but negative reactions for CK-7.
Mining Maximal Frequent Patterns in Molecular Data with Lookahead Pruning Mining maximal frequent patterns in large database is now a well attended problem in data mining field. In this paper we present an algorithm which mines maximal frequent substructures in a molecular data. The algorithm uses bottom-up depth first search approach to scan data and find maximal frequent substructures. Algorithm works on the concept of look-ahead pruning to restrict the candidate generation and unnecessary scans of database. This algorithm also uses the concepts of dynamic reordering of candidates and support lower bound to efficiently find even the long patterns in molecular data. Initial results on anti HIV-1 data show that this algorithm works better than the simple Apriori algorithm in finding long frequent patterns.
<reponame>madame-rachelle/Raze //------------------------------------------------------------------------- /* Copyright (C) 1996, 2003 - 3D Realms Entertainment Copyright (C) 2017-2019 Nuke.YKT This file is part of Duke Nukem 3D version 1.5 - Atomic Edition Duke Nukem 3D is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Original Source: 1996 - Todd Replogle Prepared for public release: 03/21/2003 - <NAME>, 3D Realms */ //------------------------------------------------------------------------- #pragma once BEGIN_DUKE_NS enum { RRTILE11 = 11, PLEASEWAIT = 12, //WEATHERWARN = 14, RPG2SPRITE = 14, DUKETAG = 15, SIGN1 = 16, SIGN2 = 17, RRTILE18 = 18, RRTILE19 = 19, ARROW = 20, FIRSTGUNSPRITE = 21, CHAINGUNSPRITE = 22, RPGSPRITE = 23, FREEZESPRITE = 24, SHRINKERSPRITE = 25, HEAVYHBOMB = 26, TRIPBOMBSPRITE = 27, SHOTGUNSPRITE = 28, DEVISTATORSPRITE = 29, HEALTHBOX = 30, AMMOBOX = 31, GROWSPRITEICON = 32, INVENTORYBOX = 33, RRTILE34 = 34, RRTILE35 = 35, DESTRUCTO = 36, FREEZEAMMO = 37, RRTILE38 = 38, AMMO = 40, BATTERYAMMO = 41, DEVISTATORAMMO = 42, RRTILE43 = 43, RPGAMMO = 44, GROWAMMO = 45, CRYSTALAMMO = 46, HBOMBAMMO = 47, AMMOLOTS = 48, SHOTGUNAMMO = 49, COLA = 51, SIXPAK = 52, FIRSTAID = 53, SHIELD = 54, STEROIDS = 55, AIRTANK = 56, JETPACK = 57, HEATSENSOR = 59, ACCESSCARD = 60, BOOTS = 61, GUTMETER = 62, RRTILE63 = 63, RRTILE64 = 64, RRTILE65 = 65, RRTILE66 = 66, RRTILE67 = 67, RRTILE68 = 68, MIRRORBROKE = 70, SOUNDFX = 71, TECHLIGHT2 = 72, TECHLIGHTBUST2 = 73, TECHLIGHT4 = 74, TECHLIGHTBUST4 = 75, WALLLIGHT4 = 76, WALLLIGHTBUST4 = 77, MOTOAMMO = 78, BUTTON1 = 80, ACCESSSWITCH = 82, SLOTDOOR = 84, LIGHTSWITCH = 86, SPACEDOORSWITCH = 88, SPACELIGHTSWITCH = 90, FRANKENSTINESWITCH = 92, NUKEBUTTON = 94, MULTISWITCH = 98, DOORTILE1 = 102, DOORTILE2 = 103, DOORTILE3 = 104, DOORTILE4 = 105, DOORTILE5 = 106, DOORTILE6 = 107, DOORTILE7 = 108, DOORTILE8 = 109, DOORTILE9 = 110, DOORTILE10 = 111, DOORTILE14 = 115, DOORTILE15 = 116, DOORTILE16 = 117, DOORTILE18 = 119, DOORSHOCK = 120, DIPSWITCH = 121, DIPSWITCH2 = 123, TECHSWITCH = 125, DIPSWITCH3 = 127, ACCESSSWITCH2 = 129, REFLECTWATERTILE = 131, FLOORSLIME = 132, BIGFORCE = 135, EPISODE = 137, MASKWALL1 = 138, MASKWALL2 = 140, MASKWALL3 = 141, MASKWALL4 = 142, MASKWALL5 = 143, MASKWALL6 = 144, MASKWALL8 = 146, MASKWALL9 = 147, MASKWALL10 = 148, MASKWALL11 = 149, MASKWALL12 = 150, MASKWALL13 = 151, MASKWALL14 = 152, MASKWALL15 = 153, FIREEXT = 155, W_LIGHT = 156, SCREENBREAK1 = 159, SCREENBREAK2 = 160, SCREENBREAK3 = 161, SCREENBREAK4 = 162, SCREENBREAK5 = 163, SCREENBREAK6 = 164, SCREENBREAK7 = 165, SCREENBREAK8 = 166, SCREENBREAK9 = 167, SCREENBREAK10 = 168, SCREENBREAK11 = 169, SCREENBREAK12 = 170, SCREENBREAK13 = 171, W_TECHWALL1 = 185, W_TECHWALL2 = 186, W_TECHWALL3 = 187, W_TECHWALL4 = 188, W_TECHWALL10 = 189, W_TECHWALL15 = 191, W_TECHWALL16 = 192, STATIC = 195, W_SCREENBREAK = 199, W_HITTECHWALL3 = 205, W_HITTECHWALL4 = 206, W_HITTECHWALL2 = 207, W_HITTECHWALL1 = 208, FANSPRITE = 210, FANSPRITEBROKE = 215, FANSHADOW = 216, FANSHADOWBROKE = 219, DOORTILE19 = 229, DOORTILE20 = 230, DOORTILE22 = 232, GRATE1 = 234, BGRATE1 = 235, SPLINTERWOOD = 237, WATERDRIP = 239, WATERBUBBLE = 240, WATERBUBBLEMAKER = 241, W_FORCEFIELD = 242, WALLLIGHT3 = 244, WALLLIGHTBUST3 = 245, WALLLIGHT1 = 246, WALLLIGHTBUST1 = 247, WALLLIGHT2 = 248, WALLLIGHTBUST2 = 249, LIGHTSWITCH2 = 250, UFOBEAM = 252, RRTILE280 = 280, RRTILE281 = 281, RRTILE282 = 282, RRTILE283 = 283, RRTILE285 = 285, RRTILE286 = 286, RRTILE287 = 287, RRTILE288 = 288, RRTILE289 = 289, RRTILE290 = 290, RRTILE291 = 291, RRTILE292 = 292, RRTILE293 = 293, RRTILE295 = 295, RRTILE296 = 296, RRTILE297 = 297, CDPLAYER = 370, RRTILE380 = 380, RRTILE403 = 403, RRTILE409 = 409, BIGFNTCURSOR = 512, SMALLFNTCURSOR = 513, STARTALPHANUM = 514, ENDALPHANUM = 607, BIGALPHANUM = 632, BIGPERIOD = 694, BIGCOMMA = 695, BIGX = 696, BIGQ = 697, BIGSEMI = 698, BIGCOLIN = 699, THREEBYFIVE = 702, BIGAPPOS = 714, MINIFONT = 718, W_NUMBERS = 810, BLANK = 820, RESPAWNMARKERRED = 866, RESPAWNMARKERYELLOW = 876, RESPAWNMARKERGREEN = 886, SPINNINGNUKEICON = 896, GUTMETER_LIGHT1 = 920, GUTMETER_LIGHT2 = 921, GUTMETER_LIGHT3 = 922, GUTMETER_LIGHT4 = 923, AMMO_ICON = 930, CLOUDYSKIES = 1021, MOONSKY1 = 1022, MOONSKY2 = 1023, MOONSKY3 = 1024, MOONSKY4 = 1025, BIGORBIT1 = 1026, BIGORBIT2 = 1027, BIGORBIT3 = 1028, BIGORBIT4 = 1029, BIGORBIT5 = 1030, LA = 1031, REDSKY1 = 1040, REDSKY2 = 1041, WATERTILE = 1044, WATERTILE2 = 1045, SATELLITE = 1049, VIEWSCREEN2 = 1052, VIEWSCREENBROKE = 1054, VIEWSCREEN = 1055, GLASS = 1056, GLASS2 = 1057, STAINGLASS1 = 1063, SATELITE = 1066, FUELPOD = 1067, SLIMEPIPE = 1070, CRACK1 = 1075, CRACK2 = 1076, CRACK3 = 1077, CRACK4 = 1078, FOOTPRINTS = 1079, DOMELITE = 1080, CAMERAPOLE = 1083, CHAIR1 = 1085, CHAIR2 = 1086, BROKENCHAIR = 1088, MIRROR = 1089, WATERFOUNTAIN = 1092, WATERFOUNTAINBROKE = 1096, FEMMAG1 = 1097, TOILET = 1098, STALL = 1100, STALLBROKE = 1102, FEMMAG2 = 1106, REACTOR2 = 1107, REACTOR2BURNT = 1108, REACTOR2SPARK = 1109, SOLARPANNEL = 1114, NAKED1 = 1115, ANTENNA = 1117, TOILETBROKE = 1120, PIPE2 = 1121, PIPE1B = 1122, PIPE3 = 1123, PIPE1 = 1124, PIPE2B = 1126, BOLT1 = 1127, PIPE3B = 1132, CAMERA1 = 1134, BRICK = 1139, VACUUM = 1141, JURYGUY = 1142, FOOTPRINTS2 = 1144, FOOTPRINTS3 = 1145, FOOTPRINTS4 = 1146, EGG = 1147, SCALE = 1150, CHAIR3 = 1152, CAMERALIGHT = 1157, MOVIECAMERA = 1158, FOOTPRINT = 1160, IVUNIT = 1163, POT1 = 1164, POT2 = 1165, POT3 = 1166, STATUE = 1168, MIKE = 1170, VASE = 1172, SUSHIPLATE1 = 1174, SUSHIPLATE2 = 1175, SUSHIPLATE3 = 1176, SUSHIPLATE4 = 1178, SUSHIPLATE5 = 1180, BIGHOLE2 = 1182, STRIPEBALL = 1184, QUEBALL = 1185, POCKET = 1186, WOODENHORSE = 1187, TREE1 = 1191, TREE2 = 1193, CACTUS = 1194, TOILETWATER = 1196, NEON1 = 1200, NEON2 = 1201, CACTUSBROKE = 1203, BOUNCEMINE = 1204, BROKEFIREHYDRENT = 1210, BOX = 1211, BULLETHOLE = 1212, BOTTLE1 = 1215, BOTTLE2 = 1216, BOTTLE3 = 1217, BOTTLE4 = 1218, BOTTLE5 = 1219, BOTTLE6 = 1220, BOTTLE7 = 1221, BOTTLE8 = 1222, SNAKEP = 1224, DOLPHIN1 = 1225, DOLPHIN2 = 1226, HYDRENT = 1228, TIRE = 1230, PIPE5 = 1232, PIPE6 = 1233, PIPE4 = 1234, PIPE4B = 1235, BROKEHYDROPLANT = 1237, PIPE5B = 1239, NEON3 = 1241, NEON4 = 1242, NEON5 = 1243, SPOTLITE = 1247, HANGOOZ = 1249, HORSEONSIDE = 1251, GLASSPIECES = 1256, HORSELITE = 1259, DONUTS = 1263, NEON6 = 1264, CLOCK = 1266, RUBBERCAN = 1268, BROKENCLOCK = 1270, PLUG = 1272, OOZFILTER = 1273, FLOORPLASMA = 1276, HANDPRINTSWITCH = 1278, BOTTLE10 = 1280, BOTTLE11 = 1281, BOTTLE12 = 1282, BOTTLE13 = 1283, BOTTLE14 = 1284, BOTTLE15 = 1285, BOTTLE16 = 1286, BOTTLE17 = 1287, BOTTLE18 = 1288, BOTTLE19 = 1289, VENDMACHINE = 1291, VENDMACHINEBROKE = 1293, COLAMACHINE = 1294, COLAMACHINEBROKE = 1296, CRANEPOLE = 1298, CRANE = 1299, BARBROKE = 1302, BLOODPOOL = 1303, NUKEBARREL = 1304, NUKEBARRELDENTED = 1305, NUKEBARRELLEAKED = 1306, CANWITHSOMETHING = 1309, MONEY = 1310, BANNER = 1313, EXPLODINGBARREL = 1315, EXPLODINGBARREL2 = 1316, FIREBARREL = 1317, SEENINE = 1324, SEENINEDEAD = 1325, STEAM = 1327, CEILINGSTEAM = 1332, PIPE6B = 1337, TRANSPORTERBEAM = 1338, RAT = 1344, TRASH = 1346, HELECOPT = 1348, FETUSJIB = 1349, HOLODUKE = 1350, MONK = 1354, SPACEMARINE = 1355, LUKE = 1356, INDY = 1357, FETUS = 1360, FETUSBROKE = 1361, WATERSPLASH2 = 1383, FIREVASE = 1388, SCRATCH = 1389, BLOOD = 1391, TRANSPORTERSTAR = 1398, LOOGIE = 1405, FIST = 1408, FREEZEBLAST = 1409, DEVISTATORBLAST = 1410, TONGUE = 1414, MORTER = 1416, MUD = 1420, SHRINKEREXPLOSION = 1421, RADIUSEXPLOSION = 1426, FORCERIPPLE = 1427, CANNONBALL = 1437, INNERJAW = 1439, EXPLOSION2 = 1441, EXPLOSION3 = 1442, JIBS1 = 1463, JIBS2 = 1468, JIBS3 = 1473, JIBS4 = 1478, JIBS5 = 1483, CRACKKNUCKLES = 1489, HEADERBAR = 1493, BURNING = 1494, FIRE = 1495, USERWEAPON = 1510, JIBS6 = 1515, BLOODSPLAT1 = 1525, BLOODSPLAT3 = 1526, BLOODSPLAT2 = 1527, BLOODSPLAT4 = 1528, OOZ = 1529, WALLBLOOD1 = 1530, WALLBLOOD2 = 1531, WALLBLOOD3 = 1532, WALLBLOOD4 = 1533, WALLBLOOD5 = 1534, WALLBLOOD6 = 1535, WALLBLOOD7 = 1536, WALLBLOOD8 = 1537, OOZ2 = 1538, BURNING2 = 1539, FIRE2 = 1540, SMALLSMOKE = 1554, SMALLSMOKEMAKER = 1555, FLOORFLAME = 1558, GREENSLIME = 1575, WATERDRIPSPLASH = 1585, SCRAP6 = 1595, SCRAP1 = 1605, SCRAP2 = 1609, SCRAP3 = 1613, SCRAP4 = 1617, SCRAP5 = 1621, ROTATEGUN = 1624, BETAVERSION = 1629, PLAYERISHERE = 1630, PLAYERWASHERE = 1631, SELECTDIR = 1632, F1HELP = 1633, NOTCHON = 1634, NOTCHOFF = 1635, RRTILE1636 = 1636, DUKEICON = 1637, BADGUYICON = 1638, FOODICON = 1639, GETICON = 1640, MENUSCREEN = 1641, MENUBAR = 1642, KILLSICON = 1643, FIRSTAID_ICON = 1645, HEAT_ICON = 1646, BOTTOMSTATUSBAR = 1647, BOOT_ICON = 1648, WEAPONBAR = 1649, FRAGBAR = 1650, JETPACK_ICON = 1652, AIRTANK_ICON = 1653, STEROIDS_ICON = 1654, HOLODUKE_ICON = 1655, ACCESS_ICON = 1656, DIGITALNUM = 1657, CAMCORNER = 1667, CAMLIGHT = 1669, LOGO = 1670, TITLE = 1671, NUKEWARNINGICON = 1672, MOUSECURSOR = 1673, SLIDEBAR = 1674, DUKECAR = 1676, DREALMS = 1677, BETASCREEN = 1678, WINDOWBORDER1 = 1679, TEXTBOX = 1680, WINDOWBORDER2 = 1681, DUKENUKEM = 1682, THREEDEE = 1683, INGAMEDUKETHREEDEE = 1684, TENSCREEN = 1685, PLUTOPAKSPRITE = 1686, CROSSHAIR = 1689, FALLINGCLIP = 1699, CLIPINHAND = 1700, HAND = 1701, SHELL = 1702, SHOTGUNSHELL = 1704, RPGMUZZLEFLASH = 1714, CATLITE = 1721, HANDHOLDINGLASER = 1732, TRIPBOMB = 1735, LASERLINE = 1736, HANDHOLDINGACCESS = 1737, HANDREMOTE = 1739, TIP = 1745, GLAIR = 1747, SPACEMASK = 1753, RRTILE1752 = 1752, FORCESPHERE = 1759, SHOTSPARK1 = 1764, RPG = 1774, RPG2 = 1781, // = LASERSITE = 1781, RRTILE1790 = 1790, RRTILE1792 = 1792, RRTILE1801 = 1801, RRTILE1805 = 1805, RRTILE1807 = 1807, RRTILE1808 = 1808, RRTILE1812 = 1812, RRTILE1814 = 1814, RRTILE1817 = 1817, RRTILE1821 = 1821, RRTILE1824 = 1824, RRTILE1826 = 1826, RRTILE1850 = 1850, RRTILE1851 = 1851, RRTILE1856 = 1856, RRTILE1877 = 1877, RRTILE1878 = 1878, RRTILE1938 = 1938, RRTILE1939 = 1939, RRTILE1942 = 1942, RRTILE1944 = 1944, RRTILE1945 = 1945, RRTILE1947 = 1947, RRTILE1951 = 1951, RRTILE1952 = 1952, RRTILE1953 = 1953, RRTILE1961 = 1961, RRTILE1964 = 1964, RRTILE1973 = 1973, RRTILE1985 = 1985, RRTILE1986 = 1986, RRTILE1987 = 1987, RRTILE1988 = 1988, RRTILE1990 = 1990, RRTILE1995 = 1995, RRTILE1996 = 1996, RRTILE2004 = 2004, RRTILE2005 = 2005, POPCORN = 2021, RRTILE2022 = 2022, LANEPICS = 2023, RRTILE2025 = 2025, RRTILE2026 = 2026, RRTILE2027 = 2027, RRTILE2028 = 2028, RRTILE2034 = 2034, RRTILE2050 = 2050, RRTILE2052 = 2052, RRTILE2053 = 2053, RRTILE2056 = 2056, RRTILE2060 = 2060, RRTILE2072 = 2072, RRTILE2074 = 2074, RRTILE2075 = 2075, RRTILE2083 = 2083, COOLEXPLOSION1 = 2095, RRTILE2097 = 2097, RRTILE2121 = 2121, RRTILE2122 = 2122, RRTILE2123 = 2123, RRTILE2124 = 2124, RRTILE2125 = 2125, RRTILE2126 = 2126, RRTILE2137 = 2137, RRTILE2132 = 2132, RRTILE2136 = 2136, RRTILE2139 = 2139, RRTILE2150 = 2150, RRTILE2151 = 2151, RRTILE2152 = 2152, RRTILE2156 = 2156, RRTILE2157 = 2157, RRTILE2158 = 2158, RRTILE2159 = 2159, RRTILE2160 = 2160, RRTILE2161 = 2161, RRTILE2175 = 2175, RRTILE2176 = 2176, RRTILE2178 = 2178, RRTILE2186 = 2186, RRTILE2214 = 2214, WAITTOBESEATED = 2215, OJ = 2217, HURTRAIL = 2221, POWERSWITCH1 = 2222, LOCKSWITCH1 = 2224, POWERSWITCH2 = 2226, ATM = 2229, STATUEFLASH = 2231, ATMBROKE = 2233, FEMPIC5 = 2235, FEMPIC6 = 2236, FEMPIC7 = 2237, REACTOR = 2239, REACTORSPARK = 2243, REACTORBURNT = 2247, HANDSWITCH = 2249, CIRCLEPANNEL = 2251, CIRCLEPANNELBROKE = 2252, PULLSWITCH = 2254, ALIENSWITCH = 2259, DOORTILE21 = 2261, DOORTILE17 = 2263, MASKWALL7 = 2264, JAILBARBREAK = 2265, DOORTILE11 = 2267, DOORTILE12 = 2268, EXPLOSION2BOT = 2272, RRTILE2319 = 2319, RRTILE2321 = 2321, RRTILE2326 = 2326, RRTILE2329 = 2329, RRTILE2357 = 2357, RRTILE2382 = 2382, RRTILE2430 = 2430, RRTILE2431 = 2431, RRTILE2432 = 2432, RRTILE2437 = 2437, RRTILE2443 = 2443, RRTILE2445 = 2445, RRTILE2446 = 2446, RRTILE2450 = 2450, RRTILE2451 = 2451, RRTILE2455 = 2455, RRTILE2460 = 2460, RRTILE2465 = 2465, BONUSSCREEN = 2510, VIEWBORDER = 2520, VICTORY1 = 2530, ORDERING = 2531, TEXTSTORY = 2541, LOADSCREEN = 2542, RRTILE2560 = 2560, RRTILE2562 = 2562, RRTILE2564 = 2564, RRTILE2573 = 2573, RRTILE2574 = 2574, RRTILE2577 = 2577, RRTILE2578 = 2578, RRTILE2581 = 2581, RRTILE2583 = 2583, RRTILE2604 = 2604, RRTILE2610 = 2610, RRTILE2613 = 2613, RRTILE2621 = 2621, RRTILE2622 = 2622, RRTILE2636 = 2636, RRTILE2637 = 2637, RRTILE2654 = 2654, RRTILE2656 = 2656, RRTILE2676 = 2676, RRTILE2689 = 2689, RRTILE2697 = 2697, RRTILE2702 = 2702, RRTILE2707 = 2707, RRTILE2732 = 2732, HATRACK = 2717, DESKLAMP = 2719, COFFEEMACHINE = 2721, CUPS = 2722, GAVALS = 2723, GAVALS2 = 2724, POLICELIGHTPOLE = 2726, FLOORBASKET = 2728, PUKE = 2729, DOORTILE23 = 2731, TOPSECRET = 2733, SPEAKER = 2734, TEDDYBEAR = 2735, ROBOTDOG = 2737, ROBOTPIRATE = 2739, ROBOTMOUSE = 2740, MAIL = 2741, MAILBAG = 2742, HOTMEAT = 2744, COFFEEMUG = 2745, DONUTS2 = 2746, TRIPODCAMERA = 2747, METER = 2748, DESKPHONE = 2749, GUMBALLMACHINE = 2750, GUMBALLMACHINEBROKE = 2751, PAPER = 2752, MACE = 2753, GENERICPOLE2 = 2754, XXXSTACY = 2755, WETFLOOR = 2756, BROOM = 2757, MOP = 2758, PIRATE1A = 2759, PIRATE4A = 2760, PIRATE2A = 2761, PIRATE5A = 2762, PIRATE3A = 2763, PIRATE6A = 2764, PIRATEHALF = 2765, CHESTOFGOLD = 2767, SIDEBOLT1 = 2768, FOODOBJECT1 = 2773, FOODOBJECT2 = 2774, FOODOBJECT3 = 2775, FOODOBJECT4 = 2776, FOODOBJECT5 = 2777, FOODOBJECT6 = 2778, FOODOBJECT7 = 2779, FOODOBJECT8 = 2780, FOODOBJECT9 = 2781, FOODOBJECT10 = 2782, FOODOBJECT11 = 2783, FOODOBJECT12 = 2784, FOODOBJECT13 = 2785, FOODOBJECT14 = 2786, FOODOBJECT15 = 2787, FOODOBJECT16 = 2788, FOODOBJECT17 = 2789, FOODOBJECT18 = 2790, FOODOBJECT19 = 2791, FOODOBJECT20 = 2792, HEADLAMP = 2793, SKINNEDCHICKEN = 2794, FEATHEREDCHICKEN = 2795, TAMPON = 2796, ROBOTDOG2 = 2797, JOLLYMEAL = 2800, DUKEBURGER = 2801, SHOPPINGCART = 2806, CANWITHSOMETHING2 = 2807, CANWITHSOMETHING3 = 2808, CANWITHSOMETHING4 = 2809, RRTILE2030 = 2030, RRTILE2831 = 2831, RRTILE2832 = 2832, RRTILE2842 = 2842, RRTILE2859 = 2859, RRTILE2876 = 2876, RRTILE2878 = 2878, RRTILE2879 = 2879, RRTILE2893 = 2893, RRTILE2894 = 2894, RRTILE2898 = 2898, RRTILE2899 = 2899, RRTILE2915 = 2915, RRTILE2940 = 2940, RRTILE2944 = 2944, RRTILE2945 = 2945, RRTILE2946 = 2946, RRTILE2947 = 2947, RRTILE2948 = 2948, RRTILE2949 = 2949, RRTILE2961 = 2961, RRTILE2970 = 2970, RRTILE2977 = 2977, RRTILE2978 = 2978, GLASS3 = 2983, BORNTOBEWILDSCREEN = 2985, BLIMP = 2989, RRTILE2990 = 2990, FEM9 = 2991, POOP = 2998, FRAMEEFFECT1 = 2999, PANNEL1 = 3003, PANNEL2 = 3004, PANNEL3 = 3005, BPANNEL1 = 3006, BPANNEL3 = 3007, SCREENBREAK14 = 3008, SCREENBREAK15 = 3009, SCREENBREAK19 = 3011, SCREENBREAK16 = 3013, SCREENBREAK17 = 3014, SCREENBREAK18 = 3015, W_TECHWALL11 = 3016, W_TECHWALL12 = 3017, W_TECHWALL13 = 3018, W_TECHWALL14 = 3019, W_TECHWALL5 = 3020, W_TECHWALL6 = 3022, W_TECHWALL7 = 3024, W_TECHWALL8 = 3026, W_TECHWALL9 = 3028, W_HITTECHWALL16 = 3030, W_HITTECHWALL10 = 3031, W_HITTECHWALL15 = 3033, W_MILKSHELF = 3035, W_MILKSHELFBROKE = 3036, PURPLELAVA = 3038, LAVABUBBLE = 3040, DUKECUTOUT = 3047, TARGET = 3049, GUNPOWDERBARREL = 3050, DUCK = 3051, HYDROPLANT = 3053, OCEANSPRITE1 = 3055, OCEANSPRITE2 = 3056, OCEANSPRITE3 = 3057, OCEANSPRITE4 = 3058, OCEANSPRITE5 = 3059, GENERICPOLE = 3061, CONE = 3062, HANGLIGHT = 3063, RRTILE3073 = 3073, RRTILE3083 = 3083, RRTILE3100 = 3100, RRTILE3114 = 3114, RRTILE3115 = 3115, RRTILE3116 = 3116, RRTILE3117 = 3117, RRTILE3120 = 3120, RRTILE3121 = 3121, RRTILE3122 = 3122, RRTILE3123 = 3123, RRTILE3124 = 3124, RRTILE3132 = 3132, RRTILE3139 = 3139, RRTILE3144 = 3144, RRTILE3152 = 3152, RRTILE3153 = 3153, RRTILE3155 = 3155, RRTILE3171 = 3171, RRTILE3172 = 3172, RRTILE3190 = 3190, RRTILE3191 = 3191, RRTILE3192 = 3192, RRTILE3195 = 3195, RRTILE3200 = 3200, RRTILE3201 = 3201, RRTILE3202 = 3202, RRTILE3203 = 3203, RRTILE3204 = 3204, RRTILE3205 = 3205, RRTILE3206 = 3206, RRTILE3207 = 3207, RRTILE3208 = 3208, RRTILE3209 = 3209, RRTILE3216 = 3216, RRTILE3218 = 3218, RRTILE3219 = 3219, RRTILE3232 = 3232, FEMPIC1 = 3239, FEMPIC2 = 3248, BLANKSCREEN = 3252, PODFEM1 = 3253, FEMPIC3 = 3257, FEMPIC4 = 3265, FEM1 = 3271, FEM2 = 3276, FEM3 = 3280, FEM5 = 3282, BLOODYPOLE = 3283, FEM4 = 3284, FEM6 = 3293, FEM6PAD = 3294, FEM8 = 3295, FEM7 = 3298, ORGANTIC = 3308, FIRSTGUN = 3328, FIRSTGUNRELOAD = 3336, KNEE = 3340, SHOTGUN = 3350, HANDTHROW = 3360, SHOTGUNSHELLS = 3372, SCUBAMASK = 3374, CHAINGUN = 3380, SHRINKER = 3384, CIRCLESTUCK = 3388, SPIT = 3390, GROWSPARK = 3395, SHRINKSPARK = 3400, RRTILE3410 = 3410, LUMBERBLADE = 3411, FREEZE = 3415, FIRELASER = 3420, BOWLINGBALLH = 3428, BOWLINGBALL = 3430, BOWLINGBALLSPRITE = 3437, POWDERH = 3438, RRTILE3440 = 3440, DEVISTATOR = 3445, RPGGUN = 3452, RRTILE3462 = 3462, OWHIP = 3471, UWHIP = 3475, RPGGUN2 = 3482, RRTILE3497 = 3497, RRTILE3498 = 3498, RRTILE3499 = 3499, RRTILE3500 = 3500, SLINGBLADE = 3510, RRTILE3584 = 3584, RRTILE3586 = 3586, RRTILE3587 = 3587, RRTILE3600 = 3600, RRTILE3631 = 3631, RRTILE3635 = 3635, RRTILE3637 = 3637, RRTILE3643 = 3643, RRTILE3647 = 3647, RRTILE3652 = 3652, RRTILE3653 = 3653, RRTILE3668 = 3668, RRTILE3671 = 3671, RRTILE3673 = 3673, RRTILE3684 = 3684, RRTILE3708 = 3708, RRTILE3714 = 3714, RRTILE3716 = 3716, RRTILE3720 = 3720, RRTILE3723 = 3723, RRTILE3725 = 3725, RRTILE3737 = 3737, RRTILE3754 = 3754, RRTILE3762 = 3762, RRTILE3763 = 3763, RRTILE3764 = 3764, RRTILE3765 = 3765, RRTILE3767 = 3767, RRTILE3773 = 3773, RRTILE3774 = 3774, RRTILE3793 = 3793, RRTILE3795 = 3795, RRTILE3804 = 3804, RRTILE3814 = 3814, RRTILE3815 = 3815, RRTILE3819 = 3819, BIGHOLE = 3822, RRTILE3827 = 3827, RRTILE3837 = 3837, APLAYERTOP = 3840, APLAYER = 3845, PLAYERONWATER = 3860, DUKELYINGDEAD = 3998, DUKEGUN = 4041, DUKETORSO = 4046, DUKELEG = 4055, FECES = 4802, DRONE = 4916, //RRTILE4956 = 4956, RECON = 4989, RRTILE5014 = 5014, RRTILE5016 = 5016, RRTILE5017 = 5017, RRTILE5018 = 5018, RRTILE5019 = 5019, RRTILE5020 = 5020, RRTILE5021 = 5021, RRTILE5022 = 5022, RRTILE5023 = 5023, RRTILE5024 = 5024, RRTILE5025 = 5025, RRTILE5026 = 5026, RRTILE5027 = 5027, RRTILE5029 = 5029, RRTILE5030 = 5030, RRTILE5031 = 5031, RRTILE5032 = 5032, RRTILE5033 = 5033, RRTILE5034 = 5034, RRTILE5035 = 5035, RRTILE5036 = 5036, RRTILE5037 = 5037, RRTILE5038 = 5038, RRTILE5039 = 5039, RRTILE5040 = 5040, RRTILE5041 = 5041, RRTILE5043 = 5043, RRTILE5044 = 5044, RRTILE5045 = 5045, RRTILE5046 = 5046, RRTILE5047 = 5047, RRTILE5048 = 5048, RRTILE5049 = 5049, RRTILE5050 = 5050, RRTILE5051 = 5051, RRTILE5052 = 5052, RRTILE5053 = 5053, RRTILE5054 = 5054, RRTILE5055 = 5055, RRTILE5056 = 5056, RRTILE5057 = 5057, RRTILE5058 = 5058, RRTILE5059 = 5059, RRTILE5061 = 5061, RRTILE5062 = 5062, RRTILE5063 = 5063, RRTILE5064 = 5064, RRTILE5065 = 5065, RRTILE5066 = 5066, RRTILE5067 = 5067, RRTILE5068 = 5068, RRTILE5069 = 5069, RRTILE5070 = 5070, RRTILE5071 = 5071, RRTILE5072 = 5072, RRTILE5073 = 5073, RRTILE5074 = 5074, RRTILE5075 = 5075, RRTILE5076 = 5076, RRTILE5077 = 5077, RRTILE5078 = 5078, RRTILE5079 = 5079, RRTILE5080 = 5080, RRTILE5081 = 5081, RRTILE5082 = 5082, RRTILE5083 = 5083, RRTILE5084 = 5084, RRTILE5085 = 5085, RRTILE5086 = 5086, RRTILE5087 = 5087, RRTILE5088 = 5088, RRTILE5090 = 5090, SHARK = 5501, FEM10 = 5581, TOUGHGAL = 5583, MAN = 5588, MAN2 = 5589, WOMAN = 5591, ATOMICHEALTH = 5595, RRTILE6144 = 6144, MOTOGUN = 7168, RRTILE7169 = 7169, MOTOHIT = 7170, BOATHIT = 7175, RRTILE7184 = 7184, RRTILE7190 = 7190, RRTILE7191 = 7191, RRTILE7213 = 7213, RRTILE7219 = 7219, EMPTYBIKE = 7220, EMPTYBOAT = 7233, RRTILE7424 = 7424, RRTILE7430 = 7430, RRTILE7433 = 7433, RRTILE7441 = 7441, RRTILE7547 = 7547, RRTILE7467 = 7467, RRTILE7469 = 7469, RRTILE7470 = 7470, RRTILE7475 = 7475, RRTILE7478 = 7478, RRTILE7505 = 7505, RRTILE7506 = 7506, RRTILE7534 = 7534, RRTILE7540 = 7540, RRTILE7533 = 7533, RRTILE7545 = 7545, RRTILE7552 = 7552, RRTILE7553 = 7553, RRTILE7554 = 7554, RRTILE7555 = 7555, RRTILE7557 = 7557, RRTILE7558 = 7558, RRTILE7559 = 7559, RRTILE7561 = 7561, RRTILE7566 = 7566, RRTILE7568 = 7568, RRTILE7574 = 7574, RRTILE7575 = 7575, RRTILE7576 = 7576, RRTILE7578 = 7578, RRTILE7579 = 7579, RRTILE7580 = 7580, RRTILE7595 = 7595, RRTILE7629 = 7629, RRTILE7636 = 7636, RRTILE7638 = 7638, RRTILE7640 = 7640, RRTILE7644 = 7644, RRTILE7646 = 7646, RRTILE7648 = 7648, RRTILE7650 = 7650, RRTILE7653 = 7653, RRTILE7655 = 7655, RRTILE7657 = 7657, RRTILE7659 = 7659, RRTILE7691 = 7691, RRTILE7694 = 7694, RRTILE7696 = 7696, RRTILE7697 = 7697, RRTILE7700 = 7700, RRTILE7702 = 7702, RRTILE7704 = 7704, RRTILE7705 = 7705, RRTILE7711 = 7711, RRTILE7716 = 7716, RRTILE7756 = 7756, RRTILE7768 = 7768, RRTILE7806 = 7806, RRTILE7820 = 7820, RRTILE7859 = 7859, RRTILE7870 = 7870, RRTILE7873 = 7873, RRTILE7875 = 7875, RRTILE7876 = 7876, RRTILE7879 = 7879, RRTILE7881 = 7881, RRTILE7883 = 7883, RRTILE7885 = 7885, RRTILE7886 = 7886, RRTILE7887 = 7887, RRTILE7888 = 7888, RRTILE7889 = 7889, RRTILE7890 = 7890, RRTILE7900 = 7900, RRTILE7901 = 7901, RRTILE7906 = 7906, RRTILE7912 = 7912, RRTILE7913 = 7913, RRTILE7936 = 7936, RRTILE8047 = 8047, MULTISWITCH2 = 8048, RRTILE8059 = 8059, RRTILE8060 = 8060, RRTILE8063 = 8063, RRTILE8067 = 8067, RRTILE8076 = 8076, RRTILE8094 = 8094, RRTILE8096 = 8096, RRTILE8099 = 8099, RRTILE8106 = 8106, RRTILE8162 = 8162, RRTILE8163 = 8163, RRTILE8164 = 8164, RRTILE8165 = 8165, RRTILE8166 = 8166, RRTILE8167 = 8167, RRTILE8168 = 8168, RRTILE8192 = 8192, RRTILE8193 = 8193, RRTILE8215 = 8215, RRTILE8216 = 8216, RRTILE8217 = 8217, RRTILE8218 = 8218, RRTILE8220 = 8220, RRTILE8221 = 8221, RRTILE8222 = 8222, RRTILE8223 = 8223, RRTILE8224 = 8224, RRTILE8227 = 8227, RRTILE8312 = 8312, RRTILE8370 = 8370, RRTILE8371 = 8371, RRTILE8372 = 8372, RRTILE8373 = 8373, RRTILE8379 = 8379, RRTILE8380 = 8380, RRTILE8385 = 8385, RRTILE8386 = 8386, RRTILE8387 = 8387, RRTILE8388 = 8388, RRTILE8389 = 8389, RRTILE8390 = 8390, RRTILE8391 = 8391, RRTILE8392 = 8392, RRTILE8394 = 8394, RRTILE8395 = 8395, RRTILE8396 = 8396, RRTILE8397 = 8397, RRTILE8398 = 8398, RRTILE8399 = 8399, RRTILE8423 = 8423, RRTILE8448 = 8448, RRTILE8450 = 8450, BOATAMMO = 8460, RRTILE8461 = 8461, RRTILE8462 = 8462, RRTILE8464 = 8464, RRTILE8475 = 8475, RRTILE8487 = 8487, RRTILE8488 = 8488, RRTILE8489 = 8489, RRTILE8490 = 8490, RRTILE8496 = 8496, RRTILE8497 = 8497, RRTILE8498 = 8498, RRTILE8499 = 8499, RRTILE8503 = 8503, RRTILE8525 = 8525, RRTILE8537 = 8537, RRTILE8565 = 8565, RRTILE8567 = 8567, RRTILE8568 = 8568, RRTILE8569 = 8569, RRTILE8570 = 8570, RRTILE8571 = 8571, RRTILE8579 = 8579, RRTILE8588 = 8588, RRTILE8589 = 8589, RRTILE8590 = 8590, RRTILE8591 = 8591, RRTILE8592 = 8592, RRTILE8593 = 8593, RRTILE8594 = 8594, RRTILE8595 = 8595, RRTILE8596 = 8596, RRTILE8598 = 8598, RRTILE8605 = 8605, RRTILE8608 = 8608, RRTILE8609 = 8609, RRTILE8611 = 8611, RRTILE8617 = 8617, RRTILE8618 = 8618, RRTILE8620 = 8620, RRTILE8621 = 8621, RRTILE8622 = 8622, RRTILE8623 = 8623, RRTILE8640 = 8640, RRTILE8651 = 8651, RRTILE8660 = 8660, RRTILE8677 = 8677, RRTILE8679 = 8679, RRTILE8680 = 8680, RRTILE8681 = 8681, RRTILE8682 = 8682, RRTILE8683 = 8683, RRTILE8704 = 8704, // = RR = bad = guys, BOSS1 = 4477, BOSS2 = 4557, BOSS3 = 4607, BOSS4 = 4221, BOULDER = 256, BOULDER1 = 264, TORNADO = 1930, CHEERBOMB = 3464, CHEERBLADE = 3460, DOGATTACK = 4060, BILLYWALK = 4096, BILLYDIE = 4137, BILLYCOCK = 4147, BILLYRAY = 4162, BILLYRAYSTAYPUT = 4163, BILLYBUT = 4188, BILLYSCRATCH = 4191, BILLYSNIFF = 4195, BILLYWOUND = 4202, BILLYGORE = 4228, BILLYJIBA = 4235, BILLYJIBB = 4244, BRAYSNIPER = 4249, DOGRUN = 4260, DOGDIE = 4295, DOGDEAD = 4303, DOGBARK = 4305, LTH = 4352, LTHSTRAFE = 4395, HULKHANG = 4409, HULKHANGDEAD = 4410, HULKJUMP = 4429, LTHLOAD = 4430, LTHDIE = 4456, BUBBASCRATCH = 4464, BUBBANOSE = 4476, BUBBAPISS = 4487, BUBBASTAND = 4504, BUBBAOUCH = 4506, BUBBADIE = 4513, BUBBADEAD = 4523, HULK = 4649, HULKSTAYPUT = 4650, HULKA = 4651, HULKB = 4652, HULKC = 4653, HULKJIBA = 4748, HULKJIBB = 4753, HULKJIBC = 4758, SBSWIPE = 4770, SBPAIN = 4810, SBDIE = 4820, HEN = 4861, HENSTAYPUT = 4862, HENSTAND = 4897, PIG = 4945, PIGSTAYPUT = 4946, PIGEAT = 4983, SBMOVE = 5015, SBSPIT = 5050, SBDIP = 5085, MINION = 5120, MINIONSTAYPUT = 5121, UFO1_RR = 5260, UFO1_RRRA = 5270, UFO2 = 5274, UFO3 = 5278, UFO4 = 5282, UFO5 = 5286, MINJIBA = 5290, MINJIBB = 5295, MINJIBC = 5300, COW = 5317, COOT = 5376, COOTSTAYPUT = 5377, COOTSHOOT = 5411, COOTDIE = 5437, COOTDUCK = 5481, COOTPAIN = 5548, COOTTRANS = 5568, COOTGETUP = 5579, COOTJIBA = 5602, COOTJIBB = 5607, COOTJIBC = 5616, VIXEN = 5635, VIXENPAIN = 5675, VIXENDIE = 5710, VIXENSHOOT = 5720, VIXENWDN = 5740, VIXENWUP = 5775, VIXENKICK = 5805, VIXENTELE = 5845, VIXENTEAT = 5851, BIKEJIBA = 5872, BIKEJIBB = 5877, BIKEJIBC = 5882, BIKERB = 5890, BIKERBV2 = 5891, BIKER = 5995, BIKERJIBA = 6112, BIKERJIBB = 6117, BIKERJIBC = 6121, BIKERJIBD = 6127, MAKEOUT = 6225, CHEERB = 6401, CHEER = 6658, CHEERSTAYPUT = 6659, CHEERJIBA = 7000, CHEERJIBB = 7005, CHEERJIBC = 7010, CHEERJIBD = 7015, FBOATJIBA = 7020, FBOATJIBB = 7025, COOTPLAY = 7030, BILLYPLAY = 7035, MINIONBOAT = 7192, HULKBOAT = 7199, CHEERBOAT = 7206, RRTILE7274 = 7274, RABBIT = 7280, RABBITJIBA = 7387, RABBITJIBB = 7392, RABBITJIBC = 7397, ROCK = 8035, ROCK2 = 8036, LEVELMAP = 8624, MAMACLOUD = 8663, MAMA = 8705, MAMAJIBA = 8890, MAMAJIBB = 8895, }; END_DUKE_NS
//! Represents a set of hyperparameters to optimize. use crate::model::google_cloud_ml_v1_parameter_spec::GoogleCloudMlV1__ParameterSpec; #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct GoogleCloudMlV1__HyperparameterSpec { /// Optional. The number of failed trials that need to be seen before failing the hyperparameter tuning job. You can specify this field to override the default failing criteria for AI Platform hyperparameter tuning jobs. Defaults to zero, which means the service decides when a hyperparameter job should fail. pub max_failed_trials: Option<i32>, /// Optional. The search algorithm specified for the hyperparameter tuning job. Uses the default AI Platform hyperparameter tuning algorithm if unspecified. pub algorithm: Option<Algorithm>, /// Optional. The TensorFlow summary tag name to use for optimizing trials. For current versions of TensorFlow, this tag name should exactly match what is shown in TensorBoard, including all scopes. For versions of TensorFlow prior to 0.12, this should be only the tag passed to tf.Summary. By default, "training/hptuning/metric" will be used. pub hyperparameter_metric_tag: Option<String>, /// Optional. The prior hyperparameter tuning job id that users hope to continue with. The job id will be used to find the corresponding vizier study guid and resume the study. pub resume_previous_job_id: Option<String>, /// Optional. Indicates if the hyperparameter tuning job enables auto trial early stopping. pub enable_trial_early_stopping: Option<bool>, /// Optional. How many training trials should be attempted to optimize the specified hyperparameters. Defaults to one. pub max_trials: Option<i32>, /// Required. The type of goal to use for tuning. Available types are `MAXIMIZE` and `MINIMIZE`. Defaults to `MAXIMIZE`. pub goal: Goal, /// Optional. The number of training trials to run concurrently. You can reduce the time it takes to perform hyperparameter tuning by adding trials in parallel. However, each trail only benefits from the information gained in completed trials. That means that a trial does not get access to the results of trials running at the same time, which could reduce the quality of the overall optimization. Each trial will use the same scale tier and machine types. Defaults to one. pub max_parallel_trials: Option<i32>, /// Required. The set of parameters to tune. pub params: Vec<GoogleCloudMlV1__ParameterSpec>, } /// Optional. The search algorithm specified for the hyperparameter tuning job. Uses the default AI Platform hyperparameter tuning algorithm if unspecified. #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] pub enum Algorithm { /// The default algorithm used by the hyperparameter tuning service. This is a Bayesian optimization algorithm. AlgorithmUnspecified, /// Simple grid search within the feasible space. To use grid search, all parameters must be `INTEGER`, `CATEGORICAL`, or `DISCRETE`. GridSearch, /// Simple random search within the feasible space. RandomSearch, } /// Required. The type of goal to use for tuning. Available types are `MAXIMIZE` and `MINIMIZE`. Defaults to `MAXIMIZE`. #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] pub enum Goal { /// Goal Type will default to maximize. GoalTypeUnspecified, /// Maximize the goal metric. Maximize, /// Minimize the goal metric. Minimize, }
/** * Where part of query. * * @author Stanislav Dvorscak * */ public class QueryWhere extends DefaultQueryNode implements QueryTerm { /** * @see #QueryWhere(QueryCriterion) */ private final QueryCriterion whereCriterion; /** * Constructor. * * @param where * criterion */ public QueryWhere(QueryCriterion where) { this.whereCriterion = where; } /** * {@inheritDoc} */ @Override public void buildWhere(QueryContext context, StringBuilder where) { super.buildWhere(context, where); whereCriterion.buildWhere(context, where); } }
/** * NET-VS: Settings screen */ @Override public boolean onSetting(GameEngine engine, int playerID) { if((netCurrentRoomInfo != null) && (playerID == 0) && (!netvsIsWatch())) { netvsPlayerExist[0] = true; engine.displaysize = 0; engine.enableSE = true; engine.isVisible = true; if((!netvsIsReadyChangePending) && (netvsNumPlayers >= 2) && (!netvsIsNewcomer) && (menuTime >= 5)) { if(engine.ctrl.isPush(Controller.BUTTON_A) && !netvsPlayerReady[0]) { engine.playSE("decide"); netvsIsReadyChangePending = true; netLobby.netPlayerClient.send("ready\ttrue\n"); } if(engine.ctrl.isPush(Controller.BUTTON_B) && netvsPlayerReady[0]) { engine.playSE("decide"); netvsIsReadyChangePending = true; netLobby.netPlayerClient.send("ready\tfalse\n"); } } if(engine.ctrl.isPush(Controller.BUTTON_F) && (menuTime >= 5)) { engine.playSE("decide"); netvsStartPractice(engine); return true; } } if((netCurrentRoomInfo != null) && netCurrentRoomInfo.useMap && !netLobby.mapList.isEmpty()) { if(netvsPlayerExist[playerID]) { if(menuTime % 30 == 0) { engine.statc[5]++; if(engine.statc[5] >= netLobby.mapList.size()) engine.statc[5] = 0; engine.createFieldIfNeeded(); engine.field.stringToField(netLobby.mapList.get(engine.statc[5])); engine.field.setAllSkin(engine.getSkin()); engine.field.setAllAttribute(Block.BLOCK_ATTRIBUTE_VISIBLE, true); engine.field.setAllAttribute(Block.BLOCK_ATTRIBUTE_OUTLINE, true); engine.field.setAllAttribute(Block.BLOCK_ATTRIBUTE_SELFPLACED, false); } } else if((engine.field != null) && !engine.field.isEmpty()) { engine.field.reset(); } } menuTime++; return true; }
package io.github.xiaolei.transaction.viewmodel; /** * Represents the transaction filter type. */ public enum TransactionFilterType { BY_DAY, BY_WEEK, BY_MONTH, BY_YEAR, UNKNOWN }
<reponame>Anorlondo448/copilot-cli // Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. // SPDX-License-Identifier: Apache-2.0 package cursor import ( "io" "strings" "testing" "github.com/AlecAivazis/survey/v2/terminal" "github.com/stretchr/testify/require" ) func TestEraseLine(t *testing.T) { testCases := map[string]struct { inWriter func(writer io.Writer) terminal.FileWriter shouldErase bool }{ "should erase a line if the writer is a file": { inWriter: func(writer io.Writer) terminal.FileWriter { return &fakeFileWriter{w: writer} }, shouldErase: true, }, } for name, tc := range testCases { t.Run(name, func(t *testing.T) { // GIVEN buf := new(strings.Builder) // WHEN EraseLine(tc.inWriter(buf)) // THEN isErased := buf.String() != "" require.Equal(t, tc.shouldErase, isErased) }) } }
/** * @author Anirudh Sharma */ public class BestTimeToBuyAndSellStockIV { public int maxProfit(int k, int[] prices) { // Special case if (prices == null || prices.length < 2 || k < 1) { return 0; } // Array for buying prices int[] buyingPrices = new int[k]; // Fill the buying prices Arrays.fill(buyingPrices, Integer.MIN_VALUE); // Array for selling prices int[] sellingPrices = new int[k]; // Calculate for every combination of stock prices for (int price : prices) { // Buy first stock buyingPrices[0] = Math.max(buyingPrices[0], -price); sellingPrices[0] = Math.max(sellingPrices[0], buyingPrices[0] + price); // Buy remaining k - 1 stocks for (int j = 1; j < k; j++) { buyingPrices[j] = Math.max(buyingPrices[j], sellingPrices[j - 1] - price); sellingPrices[j] = Math.max(sellingPrices[j], buyingPrices[j] + price); } } return sellingPrices[k - 1]; } }
<gh_stars>1-10 import React from 'react'; import { render, screen } from '@testing-library/react'; import { checkAccessibility, itSupportsFocusEvents, itSupportsSystemProps, itSupportsInputIcon, itConnectsLabelAndInput, itSupportsInputWrapperProps, } from '@mantine/tests'; import userEvent from '@testing-library/user-event'; import { PasswordInput, PasswordInputProps } from './PasswordInput'; const defaultProps: PasswordInputProps = {}; describe('@mantine/core/PasswordInput', () => { itSupportsFocusEvents(PasswordInput, defaultProps, 'input'); itSupportsInputWrapperProps(PasswordInput, defaultProps, 'PasswordInput'); itSupportsInputIcon(PasswordInput, defaultProps); itConnectsLabelAndInput(PasswordInput, defaultProps); checkAccessibility([<PasswordInput label="test" />, <PasswordInput aria-label="test" />]); itSupportsSystemProps({ component: PasswordInput, props: defaultProps, displayName: '@mantine/core/PasswordInput', excludeOthers: true, refType: HTMLInputElement, }); it('sets required on input', () => { const { container } = render(<PasswordInput required />); expect(container.querySelector('input')).toHaveAttribute('required'); }); it('sets input type based on password visibility state', () => { const { container } = render(<PasswordInput />); expect(container.querySelector('input')).toHaveAttribute('type', 'password'); userEvent.click(screen.getByRole('button', { hidden: true })); expect(container.querySelector('input')).toHaveAttribute('type', 'text'); }); it('sets toggle button tabIndex based on toggleTabIndex prop', () => { const { container: focusable } = render(<PasswordInput toggleTabIndex={0} />); const { container: notFocusable } = render(<PasswordInput toggleTabIndex={-1} />); expect(focusable.querySelector('button')).toHaveAttribute('tabindex', '0'); expect(notFocusable.querySelector('button')).toHaveAttribute('tabindex', '-1'); }); });
<reponame>Legyver/fenxlib<gh_stars>1-10 package com.legyver.fenxlib.core.impl.icons; import com.jfoenix.svg.SVGGlyphLoader; import com.legyver.core.exception.CoreException; import com.legyver.fenxlib.core.api.icons.GlyphAccessData; import com.legyver.fenxlib.core.api.icons.IconService; import com.legyver.utils.adaptex.ExceptionToCoreExceptionVoidActionDecorator; import java.util.Iterator; import java.util.List; import java.util.ServiceLoader; /** * Registry for Icon Services * This allows for any IconService in the classpath to be picked up (along with license information) */ public class IconServiceRegistry { private final ServiceLoader<IconService> iconServiceLoader; private static IconServiceRegistry instance; /** * Construct an registry for Icon Services */ public IconServiceRegistry() { this.iconServiceLoader = ServiceLoader.load(IconService.class); } /** * Get the singleton instance of the service registry for IconServices * @return the singleton instance */ public static IconServiceRegistry getInstance() { if (instance == null) { synchronized (IconServiceRegistry.class) { if (instance == null) { instance = new IconServiceRegistry(); } } } return instance; } /** * Load all icons from all IconServices that are on the classpath * @throws CoreException if there is an error loading any of the icons */ public void loadIcons() throws CoreException { for (Iterator<IconService> it = iconServiceLoader.iterator(); it.hasNext(); ) { IconService service = it.next(); List<GlyphAccessData> glyphAccessDataList = service.iconsToLoad(); for (GlyphAccessData glyphAccessData : glyphAccessDataList) { new ExceptionToCoreExceptionVoidActionDecorator(() -> { SVGGlyphLoader.loadGlyphsFont(glyphAccessData.getInputStream(), glyphAccessData.getPrefix()); }).execute(); } } } }
def prepareGraphRepresentation(self): print("---------------------") print("Preparing graph:") print("---------------------") print " - Expanding and decomposing hierarchy..." if isinstance(self.root, TaskGroup): self.root = self.root.expand(True) else: assert isinstance(self.root, Task) self.root = self.root.decompose() repr = self._toRepresentation() print " - Checking dependencies on taskgroups..." for i, node in enumerate(repr["tasks"]): if node["type"] == "TaskGroup" and len(node["dependencies"]) != 0: print " - Taskgroup %s has %d dependencies: %r" % ( node["name"], len(node["dependencies"]), node["dependencies"] ) for dep in node["dependencies"]: srcNodeId = dep[0] srcNode = repr["tasks"][dep[0]] statusList = dep[1] self._addDependencyToChildrenOf( srcNodeId, srcNode, statusList, node, repr) return repr
<reponame>sz-piotr/ethereum-test-provider import { expect } from 'chai' import { TestProvider } from '../src/TestProvider' import { utils } from 'ethers' describe('TestProvider.getWallets', () => { it('returns ten wallets', async () => { const provider = new TestProvider() const wallets = provider.getWallets() expect(wallets.length).to.equal(10) }) it('all wallets are connected to the provider', async () => { const provider = new TestProvider() const wallets = provider.getWallets() for (const wallet of wallets) { expect(wallet.provider).to.equal(provider) } }) it('every wallet has an initial balance of 100 ETH', async () => { const provider = new TestProvider() const wallets = provider.getWallets() for (const wallet of wallets) { const balance = await provider.getBalance(wallet.address) expect(balance.eq(utils.parseEther('100'))).to.equal(true) } }) it('the initial balance can be customized', async () => { const initialBalance = utils.parseEther('42.69') const provider = new TestProvider({ initialBalance }) const wallets = provider.getWallets() for (const wallet of wallets) { const balance = await provider.getBalance(wallet.address) expect(balance.eq(initialBalance)).to.equal(true) } }) it('every wallet has an initial transaction count of 0', async () => { const provider = new TestProvider() const wallets = provider.getWallets() for (const wallet of wallets) { const txCount = await provider.getTransactionCount(wallet.address) expect(txCount).to.equal(0) } }) })
#include <setjmp.h> #include <png.h> #include "gfx.h" #ifndef png_jmpbuf # define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf) #endif gfx_t *gfx_load_png(char *filename) { gfx_t *gfx = 0; int i, x, y; png_structp png_ptr = NULL; png_infop info_ptr = NULL; png_infop end_info = NULL; png_uint_32 width, height, rowbytes; int bit_depth, color_type; png_byte *image_data = 0; png_bytep *row_pointers = 0; uint8_t sig[8]; FILE *infile; infile = fopen(filename, "rb"); if (!infile) { fprintf(stderr, "cant open `%s`\n", filename); return 0; } if (0) { fail: if (gfx) free(gfx); if (image_data) free(image_data); if (row_pointers) free(row_pointers); fclose(infile); return 0; } fread(sig, 1, 8, infile); if (!png_check_sig(sig, 8)) { fprintf(stderr, "bad signature for `%s`\n", filename); return 0; } png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png_ptr) { fprintf(stderr, "png_create_info_struct: out of memory for `%s`\n", filename); goto fail; } info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { png_destroy_read_struct(&png_ptr, NULL, NULL); fprintf(stderr, "png_create_info_struct: out of memory for `%s`\n", filename); goto fail; } end_info = png_create_info_struct(png_ptr); if (!end_info) { fprintf(stderr, "error: png_create_info_struct returned 0.\n"); png_destroy_read_struct(&png_ptr, &info_ptr, (png_infopp) NULL); goto fail; } // setjmp() must be called in every function that calls a PNG-reading libpng function if (setjmp(png_jmpbuf(png_ptr))) { jmpbuf_fail: png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); goto fail; } png_init_io(png_ptr, infile); png_set_sig_bytes(png_ptr, 8); // tell libpng that we already read the 8 signature bytes png_read_info(png_ptr, info_ptr); // read all PNG info up to image data png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, NULL, NULL, NULL); png_read_update_info(png_ptr, info_ptr); rowbytes = png_get_rowbytes(png_ptr, info_ptr); image_data = malloc(rowbytes * height * sizeof(png_byte)+15); if (!image_data) { fprintf(stderr, "load_png: could not allocate memory for PNG image data\n"); png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); goto jmpbuf_fail; } row_pointers = malloc(height * sizeof(png_bytep)); if (!row_pointers) { fprintf(stderr, "load_png: could not allocate memory for PNG row pointers\n"); png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); goto jmpbuf_fail; } for (y = 0; y < height; y++) { row_pointers[height - 1 - y] = image_data + y * rowbytes; } png_read_image(png_ptr, row_pointers); if (bit_depth != 8 && bit_depth != 16 && color_type != PNG_COLOR_TYPE_PALETTE) { fprintf(stderr, "load_png: unsupported bit_depth=%d\n", bit_depth); goto fail; } if (color_type == PNG_COLOR_TYPE_RGB) { //RGB gfx = new_gfx(width, height); if (bit_depth == 8) { for (y = 0; y < height; y++) { png_byte *row = row_pointers[y]; for (x = 0; x < width; x++) { gfx_set(gfx, x, y, R8G8B8(row[0], row[1], row[2])); row += 3; } } } else { for (y = 0; y < height; y++) { png_byte *row = row_pointers[y]; for (x = 0; x < width; x++) { gfx_set(gfx, x, y, R8G8B8(row[1], row[3], row[5])); row += 6; } } } } else if (color_type == PNG_COLOR_TYPE_RGB_ALPHA) { gfx = new_gfx(width, height); if (bit_depth == 8) { for (y = 0; y < height; y++) { png_byte *row = row_pointers[y]; for (x = 0; x < width; x++) { gfx_set(gfx, x, y, R8G8B8A8(row[0], row[1], row[2], 0xFF-row[3])); row += 4; } } } else { for (y = 0; y < height; y++) { png_byte *row = row_pointers[y]; for (x = 0; x < width; x++) { gfx_set(gfx, x, y, R8G8B8A8(row[1], row[3], row[5], 0xFF-row[7])); row += 8; } } } } else if (color_type == PNG_COLOR_TYPE_PALETTE) { uint32_t cmap[GFX_CMAP_SIZE]; png_colorp palette; int num_palette; // palette size png_bytep trans; int num_trans; png_color_16p trans_values; gfx = new_gfx(width, height); if (png_get_PLTE(png_ptr, info_ptr, &palette, &num_palette) == 0) { fprintf(stderr, "load_png: couldn't retrieve palette\n"); png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); goto fail; } if (png_get_tRNS(png_ptr, info_ptr, &trans, &num_trans, &trans_values) == 0) { num_trans = 0; } for (i = 0; i < num_palette; i++) { int a = i < num_trans ? 0xFF - trans[i] : 0; cmap[i] = R8G8B8A8(palette[i].red, palette[i].green, palette[i].blue, a); } gfx_set_cmap(gfx, cmap); if (bit_depth == 8) { for (y = 0; y < height; y++) { png_byte *row = row_pointers[y]; for (x = 0; x < width; x++) { gfx_set(gfx, x, y, row[0]); row++; } } } else if (bit_depth == 4) { for (y = 0; y < height; y++) { png_byte *row = row_pointers[y]; for (x = 0; x < width; ) { png_byte c = row[0]; for (i = 4; i >=0 ; i-=4) { gfx_set(gfx, x, y, (c>>i)&0xF); if (++x == width) break; } row++; } } } else if (bit_depth == 2) { for (y = 0; y < height; y++) { png_byte *row = row_pointers[y]; for (x = 0; x < width; ) { png_byte c = row[0]; for (i = 6; i >=0 ; i-=2) { gfx_set(gfx, x, y, (c>>i)&0x3); if (++x == width) break; } row++; } } } else if (bit_depth == 1) { for (y = 0; y < height; y++) { png_byte *row = row_pointers[y]; for (x = 0; x < width; ) { png_byte c = row[0]; for (i = 7; i >=0 ; i-=1) { gfx_set(gfx, x, y, (c>>i)&0x1); if (++x == width) break; } row++; } } } else { fprintf(stderr, "load_png: implement indexed bit_depth=%d\n", bit_depth); abort(); } } else { fprintf(stderr, "load_png: unsupported color_type=%d\n", color_type); goto fail; } png_destroy_read_struct(&png_ptr, &info_ptr, &end_info); fclose(infile); free(image_data); free(row_pointers); return gfx; } void gfx_save_png(char *filename, gfx_t *gfx) { png_structp Png; png_infop Info; int I, X, Y, BPR; png_byte *Q, **Rows; FILE *F; png_color Pal[256]; png_color_16 CK; png_byte Alpha[256]; int Bits; if (gfx->cmap) { Bits = 8; } else { Bits = 24; times (Y, gfx->h) { times (X, gfx->w) { int r, g, b, a; fromR8G8B8A8(r,g,b,a, gfx_get(gfx,X,Y)); if (a) { Bits = 32; goto bits32; } } } bits32:; } F = fopen(filename, "wb"); if (!F) { printf("cant create %s\n", filename); abort(); } Png = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); Info = png_create_info_struct(Png); png_set_IHDR(Png, Info, gfx->w, gfx->h, 8, // depth of color channel Bits == 8 ? PNG_COLOR_TYPE_PALETTE : Bits == 32 ? PNG_COLOR_TYPE_RGB_ALPHA : PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); BPR = (gfx->w*Bits + 7)/8; Rows = png_malloc(Png, gfx->h * sizeof(png_byte *)); if (Bits == 8) { CK.index = 0; times (I, 256) { fromR8G8B8A8(Pal[I].red, Pal[I].green, Pal[I].blue, Alpha[I], gfx->cmap[I]); if (Alpha[I] == 0xFF && !CK.index) CK.index = I; Alpha[I] = 0xFF - Alpha[I]; } png_set_tRNS(Png, Info, Alpha, 256, &CK); png_set_PLTE(Png, Info, Pal, 256); times (Y, gfx->h) { Rows[Y] = Q = png_malloc(Png, BPR); times (X, gfx->w) *Q++ = (uint8_t)gfx_get(gfx,X,Y); } } else if (Bits == 24) { times (Y, gfx->h) { Rows[Y] = Q = png_malloc(Png, BPR); times (X, gfx->w) { fromR8G8B8(Q[0],Q[1],Q[2], gfx_get(gfx,X,Y)); Q += 3; } } } else if (Bits == 32) { times (Y, gfx->h) { Rows[Y] = Q = png_malloc(Png, BPR); times (X, gfx->w) { fromR8G8B8A8(Q[0],Q[1],Q[2],Q[3], gfx_get(gfx,X,Y)); Q[3] = 0xFF - Q[3]; Q += 4; } } } else { printf(" png_save: cant save %d-bits PNGs\n", Bits); abort(); } png_init_io(Png, F); png_set_rows(Png, Info, Rows); png_write_png(Png, Info, PNG_TRANSFORM_IDENTITY, NULL); times (Y, gfx->h) png_free(Png, Rows[Y]); png_free(Png, Rows); png_destroy_write_struct(&Png, &Info); fclose(F); }
# Map from listeners proto, with holes where filter config fragments should go, and # a list of filter config fragment protos, to a final listeners.pb with the # config fragments converted to the opaque Struct representation. import sys # Some evil hack to deal with the fact that Bazel puts both google/api and # google/protobuf roots in the sys.path, and Python gets confused, e.g. it # thinks that there is no api package if it encounters the google/protobuf root # in sys.path first. from pkgutil import extend_path import google google.__path__ = extend_path(google.__path__, google.__name__) from google.protobuf import json_format from google.protobuf import struct_pb2 from google.protobuf import text_format from envoy.api.v2 import lds_pb2 from envoy.config.filter.network.http_connection_manager.v2 import http_connection_manager_pb2 # Convert an arbitrary proto object to its Struct proto representation. def proto_to_struct(proto): json_rep = json_format.MessageToJson(proto) parsed_msg = struct_pb2.Struct() json_format.Parse(json_rep, parsed_msg) return parsed_msg # Parse a proto from the filesystem. def parse_proto(path, filter_name): # We only know about some filter config protos ahead of time. KNOWN_FILTERS = { 'http_connection_manager': lambda: http_connection_manager_pb2.HttpConnectionManager() } filter_config = KNOWN_FILTERS[filter_name]() with open(path, 'r') as f: text_format.Merge(f.read(), filter_config) return filter_config def generate_listeners(listeners_pb_path, output_pb_path, output_json_path, fragments): listener = lds_pb2.Listener() with open(listeners_pb_path, 'r') as f: text_format.Merge(f.read(), listener) for filter_chain in listener.filter_chains: for f in filter_chain.filters: f.config.CopyFrom(proto_to_struct(parse_proto(next(fragments), f.name))) with open(output_pb_path, 'w') as f: f.write(str(listener)) with open(output_json_path, 'w') as f: f.write(json_format.MessageToJson(listener)) if __name__ == '__main__': if len(sys.argv) < 4: print( 'Usage: %s <path to listeners.pb> <output listeners.pb> <output ' 'listeners.json> <filter config fragment paths>') % sys.argv[0] sys.exit(1) generate_listeners(sys.argv[1], sys.argv[2], sys.argv[3], iter(sys.argv[4:]))
The early reaction to the Nexus 6P from both critics and owners has been mostly positive, but a few new owners seem to be encountering serious problems. Specifically, the glass panel on the rear of the phone, which covers the camera, LED flash, and laser autofocus module, is reportedly cracking and breaking on its own. A user on the Android subreddit reported the rear panel cracking, and at least two others have corroborated with similar stories, with the panel splitting into multiple cracks with no particular rough handling or impact. image credit: top - Reddit user Backglasscrack123, left - jonny_rat, right - freshprinceofsf Note the lack of a distinct impact mark and relatively even cracks along the rear glass. In addition, an Android Police reader wrote in to say that his Nexus 6P's front glass panel cracked when he took an airline flight. He also told us that Google has referred him to Huawei to address the problem. This Twitter user is reporting a similar experience, though he doesn't include a photo. @GoogleUK Hi! Wanted to raise an issue: I've just had the back panel of a new Nexus 6P crack while it was sat (untouched!) on a table.. — egg of a black goat (@steamyhams) November 7, 2015 Of course without being present at the time of the damage we can't say definitively that all of these cracks are spontaneous, but multiple reports of similar behavior is distressing. As you might know, metal is much more prone to expand and contract along with changes in temperature, humidity, and air pressure than plastic. So it would make sense that the 6P with its all-metal body (a first for the Nexus line) would crack more than other phones. Creating a phone with a metal body requires tolerances to be built in at the engineering level - note that similar designs from HTC aren't known to be especially likely to crack without an impact. The good news is that any glass panels that crack as a result of a design flaw should be covered under the standard hardware warranty, and should be eligible for free repair or replacement, since all Nexus 6P phones currently in owners' hands are well within the warranty period. The bad news is that owners may have a hard time convincing Google Store or Huawei representatives that the cracked glass isn't the result of rough handling or impacts. If the front or rear glass on your Nexus 6P has cracked seemingly on its own, leave a comment on this story or the original Reddit post, then leave another one on the Google hardware forum. If this is indeed a widespread problem, the more people that make their displeasure publicly known, the morel likely owners are to get quick and easy warranty service.
#ifndef __PCAOPTIONS_HH__ #define __PCAOPTIONS_HH__ #include <cstdlib> #include <iostream> namespace hashpca { const char* help="Usage: pca [options] input [input2]\nAvailable options:\n\ -b <int> : size of feature hash (default: 65535)\n\ -k <int> : rank of approximation (default: 40)\n\ -m <name> : model file\n\ -t : projection mode\n\ -z : dont prefix projection with index\n\ -f : flush after each output line\n\ -e : evidence normalize\n\ -s : tanh(0.85)ify\n\ -c : center data\n\ -w : do not whiten projection\n\ -w0 : whiten only first component, scale others\n\ -a : hash all features (including integers)\n\ -q ab : pair features from a and b\n"; struct PcaOptions { typedef enum { ALL, NONE, FIRST } WhitenType; unsigned int hashsize; unsigned int rank; const char* model; bool project; bool withprefix; bool flush; bool normalize; bool tanhify; bool center; WhitenType whiten; bool hashall; const char* dashq; PcaOptions () : hashsize (65535), rank (40), model (0), project (false), withprefix (true), flush (false), normalize (false), tanhify (false), center (false), whiten (ALL), hashall (false), dashq (0) { } }; int parse_int (int argc, char* argv[]) { if (argc < 1) { std::cerr << "ERROR: missing expected integer argument" << std::endl; std::cerr << help << std::endl; exit (1); } char* endptr; int rv = ::strtol (argv[0], &endptr, 0); if (endptr == argv[0] || (*endptr != '\0' && ! ::isspace (*endptr))) { std::cerr << "ERROR: invalid integer argument '" << argv[0] << "'" << std::endl; std::cerr << help << std::endl; exit (1); } return rv; } char* parse_string (int argc, char* argv[]) { if (argc < 1) { std::cerr << "ERROR: missing expected string argument" << std::endl; std::cerr << help << std::endl; exit (1); } return argv[0]; } PcaOptions parse_pca_options (int& argc, char**& argv) { PcaOptions options; --argc; ++argv; while (argc > 0 && argv[0][0] == '-') { switch (argv[0][1]) { case '-': --argc; ++argv; return options; case 'b': --argc; ++argv; options.hashsize = parse_int (argc, argv); break; case 'k': --argc; ++argv; options.rank = parse_int (argc, argv); break; case 'e': options.normalize = true; break; case 's': options.tanhify = true; break; case 't': options.project = true; break; case 'z': options.withprefix = false; break; case 'f': options.flush = true; break; case 'c': options.center = true; break; case 'w': options.whiten = (argv[0][2] == '0') ? PcaOptions::FIRST : PcaOptions::NONE; break; case 'a': options.hashall = true; break; case 'm': --argc; ++argv; options.model = parse_string (argc, argv); break; case 'q': --argc; ++argv; options.dashq = parse_string (argc, argv); break; default: std::cerr << "ERROR: unrecognized switch " << argv[0] << std::endl; std::cerr << help << std::endl; exit (1); break; } --argc; ++argv; } return options; } } #endif // __PCAOPTIONS_HH__
/** * Checks recursively if some item will be rewritten. * * @param firstFile the file to be copied * @param secondDir the directory to which will be the file copied */ public static void checkRewrite(final File firstFile, final File secondDir) throws SomethingWrongException { for (File f1 : secondDir.listFiles()) { if (f1.getName().equals(firstFile.getName())) { if (firstFile.isFile()) { throw new SomethingWrongException("Some files will be rewritten."); } else { if (f1.isDirectory()) { for (File f2 : firstFile.listFiles()) { checkRewrite(f2, f1); } } else { throw new SomethingWrongException("Some files will be rewritten."); } } } } }
/** * A backpointer. * <p> * This is used to facilitate traceback after the Viterbi computation. * * @author Matthew Pocock */ public class BackPointer { /** * The state with which this backpointer is associated. */ public final State state; /** * The previous backpointer (towards origin of DP matrix) in traceback. */ public final BackPointer back; /** * The score of this element of the DP matrix. */ public final double score; public BackPointer(State state, BackPointer back, double score) { this.state = state; this.back = back; this.score = score; if(back == null) { throw new NullPointerException( "Can't construct backpointer for state " + state.getName() + " with a null source" ); } } public BackPointer(State s) { this.state = s; this.back = this; this.score = Double.NaN; } }