text stringlengths 9 39.2M | dir stringlengths 26 295 | lang stringclasses 185
values | created_date timestamp[us] | updated_date timestamp[us] | repo_name stringlengths 1 97 | repo_full_name stringlengths 7 106 | star int64 1k 183k | len_tokens int64 1 13.8M |
|---|---|---|---|---|---|---|---|---|
```xml
/*
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated, or distributed except according to the terms contained in the
* LICENSE file.
*
* Removal or modification of this copyright notice is prohibited.
*/
import { Mutex } from '../../src/job_handlers/mutex';
describe('Mutex', () => {
let mutex: Mutex;
beforeEach(() => {
mutex = new Mutex();
});
describe('#acquire', () => {
it('should call function in order of acquired lock', async () => {
const firstFunc = jest.fn();
const secondFunc = jest.fn();
const release = await mutex.acquire();
await new Promise<void>(resolve => {
setTimeout(() => {
firstFunc();
resolve();
}, 1000);
});
release();
await mutex.acquire();
await new Promise<void>(resolve => {
setTimeout(() => {
secondFunc();
resolve();
}, 1);
});
release();
expect(firstFunc).toHaveBeenCalled();
expect(secondFunc).toHaveBeenCalled();
expect(firstFunc).toHaveBeenCalledBefore(secondFunc);
});
});
describe('#runExclusive', () => {
it('should resolve to the result of the first function', async () => {
const expectedResult = 'result';
const resultPromise = mutex.runExclusive(async () => {
return new Promise(resolve => {
setTimeout(() => {
return resolve(expectedResult);
}, 10);
});
});
const result = await resultPromise;
expect(result).toEqual(expectedResult);
});
it('should resolve to the result of in sequence', async () => {
const expectedResult1 = 'result1';
const expectedResult2 = 'result2';
const firstFn = jest.fn();
const secondFn = jest.fn();
const result1Promise = mutex.runExclusive(async () => {
return new Promise(resolve => {
setTimeout(() => {
firstFn();
return resolve(expectedResult1);
}, 10);
});
});
const result2Promise = mutex.runExclusive(async () => {
return new Promise(resolve => {
setTimeout(() => {
secondFn();
return resolve(expectedResult2);
}, 2);
});
});
const [result1, result2] = await Promise.all([result1Promise, result2Promise]);
expect(result1).toEqual(expectedResult1);
expect(result2).toEqual(expectedResult2);
expect(firstFn).toHaveBeenCalledBefore(secondFn);
});
});
});
``` | /content/code_sandbox/elements/lisk-utils/test/job_handlers/mutex.spec.ts | xml | 2016-02-01T21:45:35 | 2024-08-15T19:16:48 | lisk-sdk | LiskArchive/lisk-sdk | 2,721 | 573 |
```xml
// See LICENSE.txt for license information.
import Clipboard from '@react-native-clipboard/clipboard';
import React, {useCallback} from 'react';
import {useIntl} from 'react-intl';
import OptionItem from '@components/option_item';
import SlideUpPanelItem from '@components/slide_up_panel_item';
import {CHANNEL_INFO} from '@constants/screens';
import {SNACK_BAR_TYPE} from '@constants/snack_bar';
import {useServerUrl} from '@context/server';
import {dismissBottomSheet} from '@screens/navigation';
import {showSnackBar} from '@utils/snack_bar';
type Props = {
channelName?: string;
teamName?: string;
showAsLabel?: boolean;
testID?: string;
}
const CopyChannelLinkOption = ({channelName, teamName, showAsLabel, testID}: Props) => {
const intl = useIntl();
const serverUrl = useServerUrl();
const onCopyLink = useCallback(async () => {
Clipboard.setString(`${serverUrl}/${teamName}/channels/${channelName}`);
await dismissBottomSheet();
showSnackBar({barType: SNACK_BAR_TYPE.LINK_COPIED, sourceScreen: CHANNEL_INFO});
}, [channelName, teamName, serverUrl]);
if (showAsLabel) {
return (
<SlideUpPanelItem
onPress={onCopyLink}
text={intl.formatMessage({id: 'channel_info.copy_link', defaultMessage: 'Copy Link'})}
leftIcon='link-variant'
testID={testID}
/>
);
}
return (
<OptionItem
action={onCopyLink}
label={intl.formatMessage({id: 'channel_info.copy_link', defaultMessage: 'Copy Link'})}
icon='link-variant'
type='default'
testID={testID}
/>
);
};
export default CopyChannelLinkOption;
``` | /content/code_sandbox/app/components/channel_actions/copy_channel_link_option/copy_channel_link_option.tsx | xml | 2016-10-07T16:52:32 | 2024-08-16T12:08:38 | mattermost-mobile | mattermost/mattermost-mobile | 2,155 | 397 |
```xml
/*
* one or more contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright ownership.
*/
import {shallow} from 'enzyme';
import CopyModal from './CopyModal';
const props = {
entity: {name: 'Test Dashboard', entityType: 'dashboard', data: {subEntityCounts: {report: 2}}},
collection: 'aCollectionId',
onConfirm: jest.fn(),
onClose: jest.fn(),
};
it('should render properly', () => {
const node = shallow(<CopyModal {...props} />);
expect(node.find('TextInput').prop('labelText')).toBe('Name of copy');
expect(node.find('MoveCopy')).toExist();
});
it('should hide option to move the copy for collection entities', () => {
const node = shallow(
<CopyModal {...props} entity={{name: 'collection', entityType: 'collection'}} />
);
expect(node.find('MoveCopy')).not.toExist();
});
it('should call the onConfirm action', () => {
const node = shallow(
<CopyModal {...props} jumpToEntity entity={{name: 'collection', entityType: 'collection'}} />
);
node.find('.confirm').simulate('click');
expect(node.find('Checkbox')).toExist();
expect(props.onConfirm).toHaveBeenCalledWith('collection (copy)', true);
});
it('should hide the jump checkbox if jumpToEntity property is not added', () => {
const node = shallow(<CopyModal {...props} />);
expect(node.find('Checkbox')).not.toExist();
node.find('.confirm').simulate('click');
expect(props.onConfirm).toHaveBeenCalledWith('Test Dashboard (copy)', false, false);
});
it('should call the onConfirm with false redirect parameter if entity is not a collection', () => {
const node = shallow(<CopyModal {...props} jumpToEntity />);
node.find('.confirm').simulate('click');
expect(props.onConfirm).toHaveBeenCalledWith('Test Dashboard (copy)', false, false);
});
``` | /content/code_sandbox/optimize/client/src/components/Home/modals/CopyModal.test.tsx | xml | 2016-03-20T03:38:04 | 2024-08-16T19:59:58 | camunda | camunda/camunda | 3,172 | 422 |
```xml
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AutoScrollGuideComponent } from './auto-scroll-guide.component';
describe('AutoScrollGuideComponent', () => {
let component: AutoScrollGuideComponent;
let fixture: ComponentFixture<AutoScrollGuideComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ AutoScrollGuideComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(AutoScrollGuideComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
``` | /content/code_sandbox/projects/docs-app/src/app/guides/auto-scroll-guide/auto-scroll-guide.component.spec.ts | xml | 2016-03-10T21:29:15 | 2024-08-15T07:07:30 | angular-tree-component | CirclonGroup/angular-tree-component | 1,093 | 131 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns="path_to_url"
xmlns:flowable="path_to_url"
targetNamespace="Examples">
<process id="throwEscalationEvent">
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="taskBefore" />
<userTask id="taskBefore" />
<sequenceFlow id="flow2" sourceRef="taskBefore" targetRef="throwEvent" />
<intermediateThrowEvent id="throwEvent">
<escalationEventDefinition escalationRef="escalationTest" />
</intermediateThrowEvent>
<sequenceFlow id="flow3" sourceRef="throwEvent" targetRef="taskAfter" />
<userTask id="taskAfter" />
<sequenceFlow id="flow4" sourceRef="taskAfter" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
</definitions>
``` | /content/code_sandbox/modules/flowable-engine/src/test/resources/org/flowable/engine/test/bpmn/event/escalation/throwEscalationEventSubProcess.bpmn20.xml | xml | 2016-10-13T07:21:43 | 2024-08-16T15:23:14 | flowable-engine | flowable/flowable-engine | 7,715 | 230 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>InfoDialog</class>
<widget class="QDialog" name="InfoDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>402</width>
<height>564</height>
</rect>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="windowTitle">
<string/>
</property>
<property name="styleSheet">
<string notr="true">
#wInfoDialogIn
{
border-radius: 16px;
border: 1px solid rgb(100, 100, 100);
background-color: #F4F6F8;
}
#tTransfers, #tNotifications
{
font-family: "Lato";
font-size: 15px;
color: rgba(0, 0, 0, 40%);
padding: 0px 8px 0px 8px;
border: none;
}
#tNotifications
{
padding: 0px 4px 0px 16px;
}
#bAvatar, #bState, #bMEGAheader, #bClockDown, #bClockUp, #bOQIcon, #bBusinessQuota, #bBusinessStorage, #bSyncsDisabled, #bAddSync, #bAddBackup, #bSettings, #bUpload, #bBackupsDisabled, #bAllSyncsDisabled
{
border: none;
}
#wSeparator, #wSeparatorStats, #wSeparatorNotificationsOpts
{
background-color: rgb(231, 231, 231);
}
#lTotalUsedStorage, #lTotalUsedQuota
{
font-family: "Lato";
font-size: 13px;
font-weight: normal;
border: none;
color: #333333;
}
</string>
</property>
<property name="sizeGripEnabled">
<bool>false</bool>
</property>
<property name="modal">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="wInfoDialogIn" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>402</width>
<height>564</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>402</width>
<height>564</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_wInfoDialogIn">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>1</number>
</property>
<property name="topMargin">
<number>1</number>
</property>
<property name="rightMargin">
<number>1</number>
</property>
<property name="bottomMargin">
<number>1</number>
</property>
<item>
<widget class="QWidget" name="wContainerHeader" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="wHeaderframe">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">#wHeaderframe
{
border: none;
}</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="wHeader" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>60</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>60</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>16</number>
</property>
<property name="leftMargin">
<number>15</number>
</property>
<property name="rightMargin">
<number>13</number>
</property>
<item>
<widget class="AvatarWidget" name="bAvatar" native="true">
<property name="minimumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>28</width>
<height>28</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bUpgrade">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>30</height>
</size>
</property>
<property name="cursor">
<cursorShape>ArrowCursor</cursorShape>
</property>
<property name="mouseTracking">
<bool>false</bool>
</property>
<property name="styleSheet">
<string notr="true">#bUpgrade
{
font-family: Lato;
font-size: 14px;
border: 1px solid rgba(0, 0, 0, 5%);
border-radius: 3px;
color: #333333;
padding: 3px 12px 3px 12px;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #ffffff, stop: 1 #fafafa);
}
#bUpgrade::hover
{
border: 1px solid rgba(0, 0, 0, 10%);
}
#bUpgrade::pressed
{
font-family: Lato;
font-size: 14px;
border: 1px solid rgba(0, 0, 0, 5%);
border-radius: 3px;
color: #333333;
padding: 6px 12px 6px 12px;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #ffffff, stop: 1 #fafafa);
}</string>
</property>
<property name="text">
<string>Upgrade to PRO</string>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="bAddBackup">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="toolTip">
<string>Add Backup</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../Resources_linux.qrc">
<normaloff>:/images/icons/ico_backup.png</normaloff>:/images/icons/ico_backup.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bAddSync">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="toolTip">
<string>Add Sync</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../Resources_linux.qrc">
<normaloff>:/images/icons/ico_sync.png</normaloff>:/images/icons/ico_sync.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bUpload">
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="toolTip">
<string>Upload</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../Resources_linux.qrc">
<normaloff>:/images/ico_upload.png</normaloff>:/images/ico_upload.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bSettings">
<property name="sizePolicy">
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="toolTip">
<string>Show MEGAsync options</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../Resources_linux.qrc">
<normaloff>:/images/more_settings.png</normaloff>:/images/more_settings.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="PSAwidget" name="wPSA" native="true">
<property name="minimumSize">
<size>
<width>400</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>120</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="wActiveTransfersContainer" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_15">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="wTabOptions" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>36</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#wTabOptions
{
border-bottom: 1px solid rgb(231, 231, 231);
background-color: #F4F6F8;
}
QToolButton
{
border: none;
}
</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_18">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="wContainerTabOptions" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>36</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_13">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="wTransfers" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>36</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
<property name="spacing">
<number>5</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="tTransfers">
<property name="text">
<string>Transfers</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lTransfers">
<property name="minimumSize">
<size>
<width>0</width>
<height>2</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>2</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wRecents" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>36</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_17">
<property name="spacing">
<number>5</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QWidget" name="wNotificationsTab" native="true">
<property name="minimumSize">
<size>
<width>40</width>
<height>0</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_11">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QToolButton" name="tNotifications">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="text">
<string>Notifications</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bNumberUnseenNotifications">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>6</width>
<height>14</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>14</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#bNumberUnseenNotifications
{
background-color: #FF333A;
color: #FFFFFF;
font-weight: bold;
font-family: Lato;
font-size: 11px;
border-radius: 4px;
padding-left: 4px;
padding-right: 4px;
margin-right: 4px;
}</string>
</property>
<property name="text">
<string notr="true">0</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QLabel" name="lRecents">
<property name="minimumSize">
<size>
<width>0</width>
<height>2</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>2</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_12">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>2</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QStackedWidget" name="sTabs">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>50</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="pTransfersTab">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_10">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="wUsageContainer" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>69</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="wUsageStats" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>68</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>68</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: #FFFFFF;</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>7</number>
</property>
<property name="leftMargin">
<number>14</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>14</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="wStorageUsage" native="true">
<property name="maximumSize">
<size>
<width>199</width>
<height>16777215</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QStackedWidget" name="sStorage">
<property name="minimumSize">
<size>
<width>52</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>52</width>
<height>50</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="CircularUsageProgressBar" name="wCircularStorage">
<property name="minimumSize">
<size>
<width>52</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>52</width>
<height>50</height>
</size>
</property>
</widget>
<widget class="QWidget" name="wBusinessStorage">
<layout class="QHBoxLayout" name="horizontalLayout_10">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="bBusinessStorage">
<property name="minimumSize">
<size>
<width>44</width>
<height>44</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>44</width>
<height>44</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/images/storage_for_business.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>44</width>
<height>44</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QWidget" name="wStorageDetails" native="true">
<layout class="QVBoxLayout" name="verticalLayout_7">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>8</number>
</property>
<item>
<widget class="QLabel" name="lTotalUsedStorage">
<property name="styleSheet">
<string notr="true">#lTotalUsedStorage
{
font-family: "Lato";
font-weight: bold;
font-size: 13px;
}
</string>
</property>
<property name="text">
<string>Storage</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lUsedStorage">
<property name="minimumSize">
<size>
<width>0</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wVerticalSeparator" native="true">
<property name="minimumSize">
<size>
<width>2</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>2</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">background-color: rgba(0, 0, 0, 0.1);
margin-top: 12px;
margin-bottom: 12px;
</string>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="wQuotaUsage" native="true">
<property name="maximumSize">
<size>
<width>199</width>
<height>16777215</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_7">
<property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QStackedWidget" name="sQuota">
<property name="minimumSize">
<size>
<width>52</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>52</width>
<height>50</height>
</size>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="CircularUsageProgressBar" name="wCircularQuota">
<property name="minimumSize">
<size>
<width>52</width>
<height>50</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>52</width>
<height>50</height>
</size>
</property>
</widget>
<widget class="QWidget" name="wBusinessQuota">
<layout class="QHBoxLayout" name="horizontalLayout_8">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="bBusinessQuota">
<property name="minimumSize">
<size>
<width>44</width>
<height>44</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>44</width>
<height>44</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/images/transfer_for_business.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>44</width>
<height>44</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QWidget" name="wQuotaDetails" native="true">
<layout class="QVBoxLayout" name="verticalLayout_9">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>8</number>
</property>
<item>
<widget class="QLabel" name="lTotalUsedQuota">
<property name="styleSheet">
<string notr="true">#lTotalUsedQuota
{
font-family: "Lato";
font-weight: bold;
font-size: 13px;
}
</string>
</property>
<property name="text">
<string>Transfer</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lUsedQuota">
<property name="minimumSize">
<size>
<width>0</width>
<height>24</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>24</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wSeparatorStats" native="true">
<property name="minimumSize">
<size>
<width>400</width>
<height>1</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>1</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="wSomeIssuesOccurred" native="true">
<property name="styleSheet">
<string notr="true">background-color: rgb(255, 255, 255);</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_15">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>10</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<widget class="SomeIssuesOccurredMessage" name="issuesContainer" native="true"/>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QStackedWidget" name="sActiveTransfers">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#sActiveTransfers
{
background-color: transparent;
}</string>
</property>
<property name="currentIndex">
<number>4</number>
</property>
<widget class="QWidget" name="pUpdated">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">background-color: #FFFFFF;</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_8">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_9">
<property name="spacing">
<number>0</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<spacer name="horizontalSpacer_9">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="lUploadToMega">
<property name="minimumSize">
<size>
<width>352</width>
<height>234</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>352</width>
<height>234</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">border: none;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../Resources_linux.qrc">
<normaloff>:/images/upload_to_mega.png</normaloff>:/images/upload_to_mega.png</iconset>
</property>
<property name="iconSize">
<size>
<width>352</width>
<height>234</height>
</size>
</property>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_10">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="lUploadToMegaDesc">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>400</width>
<height>60</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>60</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#lUploadToMegaDesc
{
margin-top: 10px;
margin-left: 20px;
margin-right: 20px;
color: #666;
font-family: "Lato";
font-size: 16px;
}
</string>
</property>
<property name="text">
<string>Upload to MEGA now</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="pOverquota">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">background-color: #F4F6F8;</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>15</number>
</property>
<property name="leftMargin">
<number>20</number>
</property>
<property name="topMargin">
<number>28</number>
</property>
<property name="rightMargin">
<number>20</number>
</property>
<property name="bottomMargin">
<number>30</number>
</property>
<item>
<widget class="QWidget" name="wOQIcon" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>96</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>75</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<spacer name="horizontalSpacer_5">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>146</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="bOQIcon">
<property name="minimumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_6">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>145</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wOQlabels" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_13">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lOQTitle">
<property name="minimumSize">
<size>
<width>0</width>
<height>19</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#lOQTitle
{
color: #333333;
font-family: "Lato";
font-size: 16px;
}</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lOQDesc">
<property name="styleSheet">
<string notr="true">#lOQDesc
{
color: #666666;
font-family: "Lato";
font-size: 14px;
}
</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wQQButtons" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_6">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_7">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="bDiscard">
<property name="minimumSize">
<size>
<width>98</width>
<height>38</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>38</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#bDiscard
{
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #ffffff, stop: 1 #fafafa);
border-radius: 3px;
border: 1px solid rgba(0, 0, 0, 5%);
font-family: "Lato";
font-size: 14px;
color: #333333;
}
#bDiscard::hover
{
border: 1px solid rgba(0, 0, 0, 10%);
}
</string>
</property>
<property name="text">
<string>Dismiss</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bBuyQuota">
<property name="minimumSize">
<size>
<width>155</width>
<height>38</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>38</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#bBuyQuota
{
font-family: Lato;
font-size: 14px;
border: 1px solid rgba(0,191, 165, 30%);
border-radius: 3px;
color: #ffffff;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 rgba(0, 204, 176, 1), stop: 1 rgba(0, 172,149,1));
}
#bBuyQuota:hover
{
border: 1px solid rgba(0,191, 165, 80%);
}</string>
</property>
<property name="text">
<string>Buy more space</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_8">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pTransfers">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_12">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="InfoDialogTransfersWidget" name="wListTransfers" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pOverDiskQuotaPaywall">
<property name="styleSheet">
<string notr="true">background-color: #F4F6F8;</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_25">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>36</number>
</property>
<property name="topMargin">
<number>25</number>
</property>
<property name="rightMargin">
<number>36</number>
</property>
<property name="bottomMargin">
<number>16</number>
</property>
<item>
<widget class="QWidget" name="wOverDiskQuotaTitle" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_24">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lOverDiskQuotaTitle">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">#lOverDiskQuotaTitle
{
color: #333333;
font-family: Lato;
font-size: 16px;
line-height: 24px;
}</string>
</property>
<property name="text">
<string>Your data is at risk</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wOverDiskQuotaInfo" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_23">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="lOverDiskQuotaLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">#lOverDiskQuotaLabel
{
color: #666666;
font-family: Lato;
font-size: 13px;
}</string>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignHCenter|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wWarningOverDiskQuota" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_26">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item>
<widget class="QWidget" name="wUpperSeparator" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>1</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>1</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#wUpperSeparator
{
background-color: rgba(0,0,0,0.1);
}</string>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="wWarningMessage" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_20">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="lWarningOverDiskQuotaIcon">
<property name="minimumSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#lWarningOverDiskQuotaIcon
{
border: none;
}</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/images/icon_paywall_warning.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>36</width>
<height>36</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lWarningOverDiskQuota">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">#lWarningOverDiskQuota
{
color: #333333;
font-family: Lato;
font-size: 14px;
font-weight: bold;
line-height: 20px;
}</string>
</property>
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wBottomSeparator" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>1</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>1</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#wBottomSeparator
{
background-color: rgba(0,0,0,0.1);
}</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wUpgradeOverDiskQuota" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_18">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>12</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>77</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="bUpgradeOverDiskQuota">
<property name="minimumSize">
<size>
<width>0</width>
<height>36</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>36</height>
</size>
</property>
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="styleSheet">
<string notr="true">#bUpgradeOverDiskQuota
{
font-family: Lato;
font-size: 14px;
border: 1px solid rgba(0,191, 165, 30%);
border-radius: 3px;
color: #ffffff;
padding: 7px 12px 7px 12px;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 rgba(0, 204, 176, 1), stop: 1 rgba(0, 172,149,1));
}
#bUpgradeOverDiskQuota:hover
{
border: 1px solid rgba(0,191, 165, 80%);
}
</string>
</property>
<property name="text">
<string>Upgrade account</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_15">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>76</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<widget class="QWidget" name="pAllSyncsDisabled">
<property name="styleSheet">
<string notr="true">background-color: #F4F6F8;</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_29">
<property name="spacing">
<number>18</number>
</property>
<property name="leftMargin">
<number>20</number>
</property>
<property name="topMargin">
<number>32</number>
</property>
<property name="rightMargin">
<number>20</number>
</property>
<property name="bottomMargin">
<number>30</number>
</property>
<item>
<widget class="QWidget" name="wAllSyncsDisabledIcon" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>96</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>96</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_232">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="QPushButton" name="bAllSyncsDisabled">
<property name="minimumSize">
<size>
<width>128</width>
<height>96</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>128</width>
<height>96</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/images/icons/infodialog/warning-disabled-syncs-and-backups.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>128</width>
<height>96</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wAllSyncsDisabledLabels" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_282">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lAllSyncsDisabledTitle">
<property name="minimumSize">
<size>
<width>0</width>
<height>19</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#lAllSyncsDisabledTitle
{
color: #333333;
font-family: "Lato";
font-size: 16px;
}</string>
</property>
<property name="text">
<string>Some syncs and backups have been disabled</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lAllSyncsDisabledDesc">
<property name="styleSheet">
<string notr="true">#lAllSyncsDisabledDesc
{
color: #666666;
font-family: "Lato";
font-size: 14px;
}
</string>
</property>
<property name="text">
<string>Something went wrong while trying to backup and sync your folders.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wAllSyncsDisabledButtons" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_222">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_201">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="bDismissAllSyncsSettings">
<property name="minimumSize">
<size>
<width>98</width>
<height>38</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>38</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#bDismissAllSyncsSettings
{
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #ffffff, stop: 1 #fafafa);
border-radius: 3px;
border: 1px solid rgba(0, 0, 0, 5%);
font-family: "Lato";
font-size: 14px;
color: #333333;
}
#bDismissAllSyncsSettings::hover
{
border: 1px solid rgba(0, 0, 0, 10%);
}
</string>
</property>
<property name="text">
<string>Dismiss</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bOpenAllSyncsSettings">
<property name="minimumSize">
<size>
<width>155</width>
<height>38</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>38</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#bOpenAllSyncsSettings
{
font-family: Lato;
font-size: 14px;
border: 1px solid rgba(0,191, 165, 30%);
border-radius: 3px;
color: #ffffff;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 rgba(0, 204, 176, 1), stop: 1 rgba(0, 172,149,1));
}
#bOpenAllSyncsSettings:hover
{
border: 1px solid rgba(0,191, 165, 80%);
}</string>
</property>
<property name="text">
<string>Open Settings</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_212">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pBackupsDisabled">
<property name="styleSheet">
<string notr="true">background-color: #F4F6F8;</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_292">
<property name="spacing">
<number>18</number>
</property>
<property name="leftMargin">
<number>20</number>
</property>
<property name="topMargin">
<number>32</number>
</property>
<property name="rightMargin">
<number>20</number>
</property>
<property name="bottomMargin">
<number>30</number>
</property>
<item>
<widget class="QWidget" name="wBackupsDisabledIcon" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>96</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>96</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_23">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="QPushButton" name="bBackupsDisabled">
<property name="minimumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>:/images/icons/infodialog/warning-disabled-backups.png</normaloff>:/images/icons/infodialog/warning-disabled-backups.png</iconset>
</property>
<property name="iconSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wBackupsDisabledLabels" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_281">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lBackupsDisabledTitle">
<property name="minimumSize">
<size>
<width>0</width>
<height>19</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#lBackupsDisabledTitle
{
color: #333333;
font-family: "Lato";
font-size: 16px;
}</string>
</property>
<property name="text">
<string>One or more backups have been disabled</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lBackupsDisabledDesc">
<property name="styleSheet">
<string notr="true">#lBackupsDisabledDesc
{
color: #666666;
font-family: "Lato";
font-size: 14px;
}
</string>
</property>
<property name="text">
<string>Something went wrong while trying to backup your folders.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wBackupsDisabledButtons" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_22">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_20">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="bDismissBackupsSettings">
<property name="minimumSize">
<size>
<width>98</width>
<height>38</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>38</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#bDismissBackupsSettings
{
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #ffffff, stop: 1 #fafafa);
border-radius: 3px;
border: 1px solid rgba(0, 0, 0, 5%);
font-family: "Lato";
font-size: 14px;
color: #333333;
}
#bDismissSyncSettings::hover
{
border: 1px solid rgba(0, 0, 0, 10%);
}
</string>
</property>
<property name="text">
<string>Dismiss</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bOpenBackupsSettings">
<property name="minimumSize">
<size>
<width>155</width>
<height>38</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>38</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#bOpenBackupsSettings
{
font-family: Lato;
font-size: 14px;
border: 1px solid rgba(0,191, 165, 30%);
border-radius: 3px;
color: #ffffff;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 rgba(0, 204, 176, 1), stop: 1 rgba(0, 172,149,1));
}
#bOpenSyncSettings:hover
{
border: 1px solid rgba(0,191, 165, 80%);
}</string>
</property>
<property name="text">
<string>Open Settings</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_211">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pSyncsDisabled">
<property name="styleSheet">
<string notr="true">background-color: #F4F6F8;</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_291">
<property name="spacing">
<number>18</number>
</property>
<property name="leftMargin">
<number>20</number>
</property>
<property name="topMargin">
<number>32</number>
</property>
<property name="rightMargin">
<number>20</number>
</property>
<property name="bottomMargin">
<number>30</number>
</property>
<item>
<widget class="QWidget" name="wSyncsDisabledIcon" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>96</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>96</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_231">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>2</number>
</property>
<item>
<widget class="QPushButton" name="bSyncsDisabled">
<property name="minimumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normalon>:/images/icons/infodialog/warning-disabled-syncs.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>96</width>
<height>96</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wSyncsDisabledLabels" native="true">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<layout class="QVBoxLayout" name="verticalLayout_28">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>6</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>6</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="lSyncsDisabledTitle">
<property name="minimumSize">
<size>
<width>0</width>
<height>19</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#lSyncsDisabledTitle
{
color: #333333;
font-family: "Lato";
font-size: 16px;
}</string>
</property>
<property name="text">
<string>One or more syncs have been disabled</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lSyncsDisabledDesc">
<property name="styleSheet">
<string notr="true">#lSyncsDisabledDesc
{
color: #666666;
font-family: "Lato";
font-size: 14px;
}
</string>
</property>
<property name="text">
<string>Something went wrong while trying to sync your folders.</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wSyncsDisabledButtons" native="true">
<layout class="QHBoxLayout" name="horizontalLayout_221">
<property name="spacing">
<number>10</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_202">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="bDismissSyncSettings">
<property name="minimumSize">
<size>
<width>98</width>
<height>38</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>38</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#bDismissSyncSettings
{
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 #ffffff, stop: 1 #fafafa);
border-radius: 3px;
border: 1px solid rgba(0, 0, 0, 5%);
font-family: "Lato";
font-size: 14px;
color: #333333;
}
#bDismissSyncSettings::hover
{
border: 1px solid rgba(0, 0, 0, 10%);
}
</string>
</property>
<property name="text">
<string>Dismiss</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bOpenSyncSettings">
<property name="minimumSize">
<size>
<width>155</width>
<height>38</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>38</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#bOpenSyncSettings
{
font-family: Lato;
font-size: 14px;
border: 1px solid rgba(0,191, 165, 30%);
border-radius: 3px;
color: #ffffff;
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,
stop: 0 rgba(0, 204, 176, 1), stop: 1 rgba(0, 172,149,1));
}
#bOpenSyncSettings:hover
{
border: 1px solid rgba(0,191, 165, 80%);
}</string>
</property>
<property name="text">
<string>Open Settings</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_21">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>1</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pNotificationsTab">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="wFilterAndSettings" native="true">
<property name="minimumSize">
<size>
<width>400</width>
<height>33</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>33</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#wFilterAndSettings
{
background-color: #FFFFFF;
}</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_14">
<property name="leftMargin">
<number>16</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>16</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="AlertFilterType" name="wSortNotifications" native="true">
<property name="minimumSize">
<size>
<width>130</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>2</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="bNotificationsSettings">
<property name="cursor">
<cursorShape>PointingHandCursor</cursorShape>
</property>
<property name="toolTip">
<string>Open notification settings</string>
</property>
<property name="styleSheet">
<string notr="true">#bNotificationsSettings
{
color: #666666;
font-family: Lato;
font-size: 14px;
line-height: 22px;
text-align: center;
border: none;
}</string>
</property>
<property name="text">
<string>Settings</string>
</property>
<property name="icon">
<iconset>
<normalon>:/images/notification_color.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wSeparatorNotificationsOpts" native="true">
<property name="minimumSize">
<size>
<width>400</width>
<height>1</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>1</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QStackedWidget" name="sNotifications">
<property name="currentIndex">
<number>1</number>
</property>
<widget class="QWidget" name="pNotifications">
<layout class="QVBoxLayout" name="verticalLayout_19">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QTreeView" name="tvNotifications">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="showDropIndicator" stdset="0">
<bool>false</bool>
</property>
<property name="dragDropMode">
<enum>QAbstractItemView::InternalMove</enum>
</property>
<property name="selectionMode">
<enum>QAbstractItemView::NoSelection</enum>
</property>
<property name="rootIsDecorated">
<bool>false</bool>
</property>
<property name="sortingEnabled">
<bool>true</bool>
</property>
<property name="headerHidden">
<bool>true</bool>
</property>
<attribute name="headerVisible">
<bool>false</bool>
</attribute>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="pNoNotifications">
<property name="styleSheet">
<string notr="true">#pNoNotifications
{
background-color: #FAFAFA;
}</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_22">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_21">
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_17">
<item>
<spacer name="horizontalSpacer_11">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QWidget" name="widget" native="true">
<layout class="QVBoxLayout" name="verticalLayout_20">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_16">
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="bNoNotificationsIcon">
<property name="minimumSize">
<size>
<width>98</width>
<height>107</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>98</width>
<height>107</height>
</size>
</property>
<property name="styleSheet">
<string notr="true">#bNoNotificationsIcon
{
border: none;
}</string>
</property>
<property name="text">
<string notr="true"/>
</property>
<property name="icon">
<iconset>
<normalon>:/images/empty-notifications.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>98</width>
<height>107</height>
</size>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<widget class="QLabel" name="lNoNotifications">
<property name="styleSheet">
<string notr="true">#lNoNotifications
{
color: #999999;
font-family: Lato;
font-size: 14px;
}</string>
</property>
<property name="text">
<string>No notifications</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_13">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QWidget" name="wSeparator" native="true">
<property name="minimumSize">
<size>
<width>400</width>
<height>1</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>400</width>
<height>1</height>
</size>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
</widget>
</item>
<item>
<widget class="QWidget" name="wContainerBottom" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QFrame" name="wBottomFrame">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="styleSheet">
<string notr="true">#wBottomFrame
{
border: none;
}</string>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_14">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QWidget" name="wBottom" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>58</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>58</height>
</size>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>14</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>17</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="StatusInfo" name="wStatus" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>31</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>31</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="TransfersSummaryWidget" name="bTransferManager" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>182</width>
<height>28</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>182</width>
<height>28</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>AvatarWidget</class>
<extends>QWidget</extends>
<header>AvatarWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>InfoDialogTransfersWidget</class>
<extends>QWidget</extends>
<header location="global">InfoDialogTransfersWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>StatusInfo</class>
<extends>QWidget</extends>
<header location="global">StatusInfo.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>PSAwidget</class>
<extends>QWidget</extends>
<header location="global">PSAwidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>CircularUsageProgressBar</class>
<extends>QWidget</extends>
<header>CircularUsageProgressBar.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>TransfersSummaryWidget</class>
<extends>QWidget</extends>
<header location="global">TransfersSummaryWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>AlertFilterType</class>
<extends>QWidget</extends>
<header location="global">AlertFilterType.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>SomeIssuesOccurredMessage</class>
<extends>QWidget</extends>
<header>SomeIssuesOccurredMessage.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<tabstops>
<tabstop>bSettings</tabstop>
</tabstops>
<resources>
<include location="../Resources_linux.qrc"/>
</resources>
<connections/>
</ui>
``` | /content/code_sandbox/src/MEGASync/gui/linux/InfoDialog.ui | xml | 2016-02-10T18:28:05 | 2024-08-16T19:36:44 | MEGAsync | meganz/MEGAsync | 1,593 | 26,506 |
```xml
import path from 'path';
import { CallbackMethod, Context, DescribeBlock, Hook } from './context';
// @TODO: to be able to run multiple spec at the same time this variable must be move into another
// scope, so it won't be overwritten from other files.
let spec: Context;
/**
* Main method to start parsing and executing tests
*
* @param _spec Context
*/
export async function runSpec(_spec: Context) {
spec = _spec;
require(path.resolve(spec.filename));
await executeBlocks(spec.blocks);
}
/**
* Execute root DescribeBlock one by one and start searching for more tests
*
* @param blocks DescribeBlock[]
*/
async function executeBlocks(blocks: DescribeBlock[]) {
const blocksLength = blocks.length;
for (let blockIndex = 0; blockIndex < blocksLength; blockIndex++) {
const block = blocks[blockIndex];
spec.reporter.describe(block.name);
await executeBlock(block);
await runHooks('afterAll', block);
}
}
/**
* Execute Describe block
*
* @param block DescribeBlock
*/
async function executeBlock(block: DescribeBlock) {
await runHooks('beforeAll', block);
const testLength = block.tests.length;
for (let testIndex = 0; testIndex < testLength; testIndex++) {
const test = block.tests[testIndex];
let initialTime;
try {
await runHooks('beforeEach', block);
initialTime = new Date().getTime();
// @ts-ignore
await test.method.apply(this, [test]);
spec.reporter.success(test.name, { startTime: initialTime });
} catch (error) {
spec.reporter.fail(test, { error, startTime: initialTime });
}
await runHooks('afterEach', block);
}
}
/**
* Attach hook to block
*
* @param hookName Hook
* @param block DescribeBlock
*/
async function runHooks(hookName: Hook, block: DescribeBlock): Promise<any> {
const hooks = (block.hooks as any).filter((hook: any) => {
return hook.name === hookName;
});
const hooksLength = hooks.length;
for (let hookIndex = 0; hookIndex < hooksLength; hookIndex++) {
const hook = hooks[hookIndex];
// @ts-ignore
await hook.method.apply(this);
}
}
/** Global API Methods */
function describe(description: string, method: CallbackMethod) {
spec.addDescribe(description, method);
}
function fdescribe(description: string, method: CallbackMethod) {
spec.addDescribe(description, method, true);
}
function ignoreCode(_description: string, _method: CallbackMethod) {
// This code won't be evaluated at all.
}
function it(description: string, method: CallbackMethod) {
spec.addTest(description, method);
}
function fit(description: string, method: CallbackMethod) {
spec.addTest(description, method, true);
}
function beforeAll(method: CallbackMethod) {
spec.hooks('beforeAll', method);
}
function afterAll(method: CallbackMethod) {
spec.hooks('afterAll', method);
}
function beforeEach(method: CallbackMethod) {
spec.hooks('beforeEach', method);
}
function afterEach(method: CallbackMethod) {
spec.hooks('afterEach', method);
}
function expect(test: any) {
return {
toBe: (expectation: any) => {
if (test !== expectation) {
throw new Error(`${test} is not equal to ${expectation}`);
}
},
toBeArrayWithLength: (expectation: number) => {
if (test.length !== expectation) {
throw new Error(`Expected to get array with length of ${expectation} but got ${test.length}`);
}
},
};
}
global.describe = describe;
global.xdescribe = ignoreCode;
global.fdescribe = fdescribe;
global.it = it;
global.fit = fit;
global.xit = ignoreCode;
global.expect = expect;
global.beforeAll = beforeAll;
global.beforeEach = beforeEach;
global.afterAll = afterAll;
global.afterEach = afterEach;
``` | /content/code_sandbox/tools/visual-tester/src/runner/runner.ts | xml | 2016-09-29T17:24:17 | 2024-08-11T17:06:15 | clarity | vmware-archive/clarity | 6,431 | 873 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="path_to_url">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{43E12C6B-B2F5-2100-53B9-15C491405B2E}</ProjectGuid>
<OutputType>Library</OutputType>
<AssemblyName>Assembly-CSharp</AssemblyName>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TargetFrameworkIdentifier>.NETFramework</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<TargetFrameworkProfile>Unity Subset v3.5</TargetFrameworkProfile>
<CompilerResponseFile></CompilerResponseFile>
<UnityProjectType>Game:1</UnityProjectType>
<UnityBuildTarget>StandaloneWindows64:19</UnityBuildTarget>
<UnityVersion>2017.3.0f3</UnityVersion>
<RootNamespace></RootNamespace>
<LangVersion>4</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\UnityVS_bin\Debug\</OutputPath>
<IntermediateOutputPath>Temp\UnityVS_obj\Debug\</IntermediateOutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DefineConstants>DEBUG;TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_3_0;UNITY_2017_3;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>false</Optimize>
<OutputPath>Temp\UnityVS_bin\Release\</OutputPath>
<IntermediateOutputPath>Temp\UnityVS_obj\Release\</IntermediateOutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<DefineConstants>TRACE;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_3_0;UNITY_2017_3;UNITY_2017;PLATFORM_ARCH_64;UNITY_64;ENABLE_AUDIO;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_DUCK_TYPING;ENABLE_GENERICS;ENABLE_PVR_GI;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_SPRITERENDERER_FLIPPING;ENABLE_SPRITES;ENABLE_GRID;ENABLE_TILEMAP;ENABLE_TERRAIN;ENABLE_RAKNET;ENABLE_DIRECTOR;ENABLE_UNET;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_WEBCAM;ENABLE_WWW;ENABLE_CLOUD_SERVICES_COLLAB;ENABLE_CLOUD_SERVICES_COLLAB_SOFTLOCKS;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_HUB;ENABLE_CLOUD_PROJECT_ID;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_CLOUD_SERVICES_UNET;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_TIMELINE;ENABLE_EDITOR_METRICS;ENABLE_EDITOR_METRICS_CACHING;ENABLE_NATIVE_ARRAY;ENABLE_SPRITE_MASKING;INCLUDE_DYNAMIC_GI;INCLUDE_GI;ENABLE_MONO_BDWGC;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;INCLUDE_PUBNUB;ENABLE_PLAYMODE_TESTS_RUNNER;ENABLE_VIDEO;ENABLE_RMGUI;ENABLE_PACKMAN;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_STYLE_SHEETS;ENABLE_LOCALIZATION;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_SUBSTANCE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_UNITYWEBREQUEST;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_EVENT_QUEUE;ENABLE_CLUSTERINPUT;ENABLE_VR;ENABLE_AR;ENABLE_WEBSOCKET_HOST;ENABLE_MONO;NET_2_0_SUBSET;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_NATIVE_ARRAY_CHECKS;UNITY_TEAM_LICENSE;ENABLE_VSTU;UNITY_PRO_LICENSE</DefineConstants>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.XML" />
<Reference Include="System.Core" />
<Reference Include="Boo.Lang" />
<Reference Include="UnityScript.Lang" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Xml.Linq" />
<Reference Include="UnityEditor">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.dll</HintPath>
</Reference>
<Reference Include="UnityEngine">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CoreModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.CoreModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AccessibilityModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.AccessibilityModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ParticleSystemModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ParticleSystemModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PhysicsModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.PhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VehiclesModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.VehiclesModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClothModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ClothModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AIModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.AIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AnimationModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.AnimationModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TextRenderingModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.TextRenderingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TerrainPhysicsModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainPhysicsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.IMGUIModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.IMGUIModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClusterInputModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterInputModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ClusterRendererModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ClusterRendererModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UNETModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UNETModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.DirectorModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.DirectorModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityAnalyticsModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityAnalyticsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.PerformanceReportingModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.PerformanceReportingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityConnectModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityConnectModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.WebModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.WebModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ARModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ARModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VRModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.VRModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIElementsModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UIElementsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.StyleSheetsModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.StyleSheetsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AssetBundleModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.AssetBundleModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.AudioModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.AudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.CrashReportingModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.CrashReportingModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.GameCenterModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.GameCenterModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.GridModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.GridModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ImageConversionModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ImageConversionModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.InputModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.InputModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.JSONSerializeModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.JSONSerializeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ParticlesLegacyModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ParticlesLegacyModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Physics2DModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.Physics2DModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.ScreenCaptureModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.ScreenCaptureModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SharedInternalsModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.SharedInternalsModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpriteMaskModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteMaskModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpriteShapeModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.SpriteShapeModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TerrainModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.TerrainModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TilemapModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.TilemapModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestAudioModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestAudioModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestTextureModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestTextureModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UnityWebRequestWWWModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.UnityWebRequestWWWModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.VideoModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.VideoModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.WindModule">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEngine/UnityEngine.WindModule.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.UI">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/Editor/UnityEditor.UI.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Networking">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/UnityEngine.Networking.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Networking">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Networking/Editor/UnityEditor.Networking.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.TestRunner">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/Editor/UnityEditor.TestRunner.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.TestRunner">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/UnityEngine.TestRunner.dll</HintPath>
</Reference>
<Reference Include="nunit.framework">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TestRunner/net35/unity-custom/nunit.framework.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Timeline">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/RuntimeEditor/UnityEngine.Timeline.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Timeline">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Timeline/Editor/UnityEditor.Timeline.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.TreeEditor">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/TreeEditor/Editor/UnityEditor.TreeEditor.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.UIAutomation">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UIAutomation/UnityEngine.UIAutomation.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.UIAutomation">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UIAutomation/Editor/UnityEditor.UIAutomation.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.GoogleAudioSpatializer">
<HintPath>C:/Program Files/your_sha512_hash.GoogleAudioSpatializer.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.GoogleAudioSpatializer">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityGoogleAudioSpatializer/RuntimeEditor/UnityEngine.GoogleAudioSpatializer.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.HoloLens">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/Editor/UnityEditor.HoloLens.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.HoloLens">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityHoloLens/RuntimeEditor/UnityEngine.HoloLens.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.SpatialTracking">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnitySpatialTracking/Editor/UnityEditor.SpatialTracking.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.SpatialTracking">
<HintPath>C:/Program Files/your_sha512_hash.SpatialTracking.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.VR">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/UnityVR/Editor/UnityEditor.VR.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Graphs">
<HintPath>C:/Program Files/Unity/Editor/Data/Managed/UnityEditor.Graphs.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Android.Extensions">
<HintPath>C:/Program Files/Unity/Editor/Data/PlaybackEngines/AndroidPlayer/UnityEditor.Android.Extensions.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.WindowsStandalone.Extensions">
<HintPath>C:/Program Files/Unity/Editor/Data/PlaybackEngines/windowsstandalonesupport/UnityEditor.WindowsStandalone.Extensions.dll</HintPath>
</Reference>
<Reference Include="SyntaxTree.VisualStudio.Unity.Bridge">
<HintPath>C:/Program Files (x86)/Microsoft Visual Studio Tools for Unity/15.0/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Advertisements">
<HintPath>C:/Users/Administrator/AppData/LocalLow/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.3/UnityEngine.Advertisements.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Advertisements">
<HintPath>C:/Users/Administrator/AppData/LocalLow/Unity/cache/packages/packages.unity.com/com.unity.ads@2.0.3/Editor/UnityEditor.Advertisements.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Analytics">
<HintPath>C:/Users/Administrator/AppData/LocalLow/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.13/UnityEngine.Analytics.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Analytics">
<HintPath>C:/Users/Administrator/AppData/LocalLow/Unity/cache/packages/packages.unity.com/com.unity.analytics@2.0.13/Editor/UnityEditor.Analytics.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.Purchasing">
<HintPath>C:/Users/Administrator/AppData/LocalLow/Unity/cache/packages/packages.unity.com/com.unity.purchasing@0.0.19/UnityEngine.Purchasing.dll</HintPath>
</Reference>
<Reference Include="UnityEditor.Purchasing">
<HintPath>C:/Users/Administrator/AppData/LocalLow/Unity/cache/packages/packages.unity.com/com.unity.purchasing@0.0.19/Editor/UnityEditor.Purchasing.dll</HintPath>
</Reference>
<Reference Include="UnityEngine.StandardEvents">
<HintPath>C:/Users/Administrator/AppData/LocalLow/Unity/cache/packages/packages.unity.com/com.unity.standardevents@1.0.10/UnityEngine.StandardEvents.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\Scripts\DrawCircle.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="GenerateTargetFrameworkMonikerAttribute" />
</Project>
``` | /content/code_sandbox/SomeTest/GizmosDrawCircle/GizmosDrawCircle.csproj | xml | 2016-04-25T14:37:08 | 2024-08-16T09:19:37 | Unity3DTraining | XINCGer/Unity3DTraining | 7,368 | 5,256 |
```xml
/*
* one or more contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright ownership.
*/
import {Restricted} from '../index';
import {render, screen} from 'modules/testing-library';
import {authenticationStore} from 'modules/stores/authentication';
import {useEffect} from 'react';
import {MemoryRouter, Route, Routes} from 'react-router-dom';
import {mockFetchGroupedProcesses} from 'modules/mocks/api/processes/fetchGroupedProcesses';
import {groupedProcessesMock} from 'modules/testUtils';
import {processesStore} from 'modules/stores/processes/processes.list';
import {Paths} from 'modules/Routes';
const createWrapper = (initialPath: string = Paths.processes()) => {
const Wrapper: React.FC<{children?: React.ReactNode}> = ({children}) => {
useEffect(() => {
return () => {
authenticationStore.reset();
processesStore.reset();
};
}, []);
return (
<MemoryRouter initialEntries={[initialPath]}>
<Routes>
<Route path={Paths.processes()} element={children} />
</Routes>
</MemoryRouter>
);
};
return Wrapper;
};
describe('Restricted', () => {
beforeEach(() => {
window.clientConfig = {
resourcePermissionsEnabled: true,
};
});
afterEach(() => {
window.clientConfig = undefined;
});
it('should show restricted content if user has write permissions and no restricted resource based scopes defined', async () => {
authenticationStore.setUser({
displayName: 'demo',
permissions: ['write'],
canLogout: true,
userId: 'demo',
roles: null,
salesPlanType: null,
c8Links: {},
tenants: [],
});
mockFetchGroupedProcesses().withSuccess(groupedProcessesMock);
await processesStore.fetchProcesses();
const {rerender} = render(
<Restricted scopes={['write']}>
<div>test content</div>
</Restricted>,
{wrapper: createWrapper()},
);
expect(screen.getByText('test content')).toBeInTheDocument();
rerender(
<Restricted
scopes={['write']}
resourceBasedRestrictions={{
scopes: [],
permissions: processesStore.getPermissions('demoProcess'),
}}
>
<div>test content</div>
</Restricted>,
);
expect(screen.getByText('test content')).toBeInTheDocument();
});
it('should hide restricted content if user has resource based permissions but no write permission ', async () => {
authenticationStore.setUser({
displayName: 'demo',
permissions: ['read'],
canLogout: true,
userId: 'demo',
roles: null,
salesPlanType: null,
c8Links: {},
tenants: [],
});
mockFetchGroupedProcesses().withSuccess(groupedProcessesMock);
await processesStore.fetchProcesses();
render(
<Restricted
scopes={['write']}
resourceBasedRestrictions={{
scopes: ['UPDATE_PROCESS_INSTANCE'],
permissions: processesStore.getPermissions('demoProcess'),
}}
>
<div>test content</div>
</Restricted>,
{wrapper: createWrapper()},
);
expect(screen.queryByText('test content')).not.toBeInTheDocument();
});
it('should render restricted content for users with write permissions when resource based permissions are disabled', async () => {
window.clientConfig = {
resourcePermissionsEnabled: false,
};
authenticationStore.setUser({
displayName: 'demo',
permissions: ['read', 'write'],
canLogout: true,
userId: 'demo',
roles: null,
salesPlanType: null,
c8Links: {},
tenants: [],
});
render(
<Restricted
scopes={['write']}
resourceBasedRestrictions={{
scopes: ['DELETE'],
permissions: processesStore.getPermissions('demoProcess'),
}}
>
<div>test content</div>
</Restricted>,
{wrapper: createWrapper()},
);
expect(screen.getByText('test content')).toBeInTheDocument();
});
it('should render restricted content in processes page', async () => {
authenticationStore.setUser({
displayName: 'demo',
permissions: ['read', 'write'],
canLogout: true,
userId: 'demo',
roles: null,
salesPlanType: null,
c8Links: {},
tenants: [],
});
mockFetchGroupedProcesses().withSuccess(groupedProcessesMock);
await processesStore.fetchProcesses();
const {rerender} = render(
<Restricted
scopes={['write']}
resourceBasedRestrictions={{
scopes: ['UPDATE_PROCESS_INSTANCE'],
permissions: processesStore.getPermissions('demoProcess'),
}}
>
<div>test content</div>
</Restricted>,
{wrapper: createWrapper()},
);
expect(screen.getByText('test content')).toBeInTheDocument();
rerender(
<Restricted
scopes={['write']}
resourceBasedRestrictions={{
scopes: ['DELETE'],
permissions: processesStore.getPermissions('demoProcess'),
}}
>
<div>test content</div>
</Restricted>,
);
expect(screen.queryByText('test content')).not.toBeInTheDocument();
rerender(
<Restricted
scopes={['write']}
resourceBasedRestrictions={{
scopes: ['DELETE'],
permissions: processesStore.getPermissions(
'eventBasedGatewayProcess',
),
}}
>
<div>test content</div>
</Restricted>,
);
expect(screen.getByText('test content')).toBeInTheDocument();
rerender(
<Restricted
scopes={['write']}
resourceBasedRestrictions={{
scopes: ['DELETE_PROCESS_INSTANCE'],
permissions: processesStore.getPermissions('bigVarProcess'),
}}
>
<div>test content</div>
</Restricted>,
);
expect(screen.getByText('test content')).toBeInTheDocument();
rerender(
<Restricted
scopes={['write']}
resourceBasedRestrictions={{
scopes: ['DELETE_PROCESS_INSTANCE'],
permissions: processesStore.getPermissions('orderProcess'),
}}
>
<div>test content</div>
</Restricted>,
);
expect(screen.queryByText('test content')).not.toBeInTheDocument();
});
});
``` | /content/code_sandbox/operate/client/src/modules/components/Restricted/tests/resourceBasedPermissions.test.tsx | xml | 2016-03-20T03:38:04 | 2024-08-16T19:59:58 | camunda | camunda/camunda | 3,172 | 1,307 |
```xml
import { mock } from "jest-mock-extended";
import { LogService } from "../../platform/abstractions/log.service";
import { WebCryptoFunctionService } from "../../platform/services/web-crypto-function.service";
import { TotpService } from "./totp.service";
describe("TotpService", () => {
let totpService: TotpService;
const logService = mock<LogService>();
beforeEach(() => {
totpService = new TotpService(new WebCryptoFunctionService(global), logService);
// TOTP is time-based, so we need to mock the current time
jest.useFakeTimers({
now: new Date("2023-01-01T00:00:00.000Z"),
});
});
afterEach(() => {
jest.clearAllMocks();
jest.useRealTimers();
});
it("should return null if key is null", async () => {
const result = await totpService.getCode(null);
expect(result).toBeNull();
});
it("should return a code if key is not null", async () => {
const result = await totpService.getCode("WQIQ25BRKZYCJVYP");
expect(result).toBe("194506");
});
it("should handle otpauth keys", async () => {
const key = "otpauth://totp/test-account?secret=WQIQ25BRKZYCJVYP";
const result = await totpService.getCode(key);
expect(result).toBe("194506");
const period = totpService.getTimeInterval(key);
expect(period).toBe(30);
});
it("should handle otpauth different period", async () => {
const key = "otpauth://totp/test-account?secret=WQIQ25BRKZYCJVYP&period=60";
const result = await totpService.getCode(key);
expect(result).toBe("730364");
const period = totpService.getTimeInterval(key);
expect(period).toBe(60);
});
it("should handle steam keys", async () => {
const key = "steam://HXDMVJECJJWSRB3HWIZR4IFUGFTMXBOZ";
const result = await totpService.getCode(key);
expect(result).toBe("7W6CJ");
const period = totpService.getTimeInterval(key);
expect(period).toBe(30);
});
});
``` | /content/code_sandbox/libs/common/src/vault/services/totp.service.spec.ts | xml | 2016-03-09T23:14:01 | 2024-08-16T15:07:51 | clients | bitwarden/clients | 8,877 | 510 |
```xml
import { Dice4 } from 'lucide-react';
import { Datatable } from '@@/datatables';
import { createPersistedStore } from '@@/datatables/types';
import { useTableState } from '@@/datatables/useTableState';
import { useEnvironmentGroups } from '../../queries/useEnvironmentGroups';
import { columns } from './columns';
import { TableActions } from './TableActions';
const tableKey = 'environment-groups';
const store = createPersistedStore(tableKey);
export function EnvironmentGroupsDatatable() {
const query = useEnvironmentGroups();
const tableState = useTableState(store, tableKey);
return (
<Datatable
columns={columns}
isLoading={query.isLoading}
dataset={query.data || []}
settingsManager={tableState}
title="Environment Groups"
titleIcon={Dice4}
renderTableActions={(selectedItems) => (
<TableActions selectedItems={selectedItems} />
)}
data-cy="environment-groups-datatable"
/>
);
}
``` | /content/code_sandbox/app/react/portainer/environments/environment-groups/ListView/EnvironmentGroupsDatatable/EnvironmentGroupsDatatable.tsx | xml | 2016-05-19T20:15:28 | 2024-08-16T19:15:14 | portainer | portainer/portainer | 30,083 | 219 |
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
// TypeScript Version: 4.1
/// <reference types="@stdlib/types"/>
import { Collection, AccessorArrayLike } from '@stdlib/types/array';
/**
* Returns a boolean indicating which group an element in an array belongs to.
*
* @returns boolean indicating whether an element in an array should be placed in the first or second group
*/
type Nullary<U> = ( this: U ) => boolean;
/**
* Returns a boolean indicating which group an element in an array belongs to.
*
* @param value - current array element
* @returns boolean indicating whether an element in an array should be placed in the first or second group
*/
type Unary<T, U> = ( this: U, value: T ) => boolean;
/**
* Returns a boolean indicating which group an element in an array belongs to.
*
* @param value - current array element
* @param index - current array element index
* @returns boolean indicating whether an element in an array should be placed in the first or second group
*/
type Binary<T, U> = ( this: U, value: T, index: number ) => boolean;
/**
* Returns a boolean indicating which group an element in an array belongs to.
*
* @param value - current array element
* @param index - current array element index
* @param arr - input array
* @returns boolean indicating whether an element in an array should be placed in the first or second group
*/
type Ternary<T, U> = ( this: U, value: T, index: number, arr: Collection<T> ) => boolean;
/**
* Returns a boolean indicating which group an element in an array belongs to.
*
* @param value - current array element
* @param index - current array element index
* @param arr - input array
* @returns boolean indicating whether an element in an array should be placed in the first or second group
*/
type Predicate<T, U> = Nullary<U> | Unary<T, U> | Binary<T, U> | Ternary<T, U>;
/**
* Group results.
*/
type EntriesResults<T> = [ Array<[ number, T ]>, Array<[ number, T ]> ];
/**
* Splits element entries into two groups according to a predicate function.
*
* ## Notes
*
* - If a predicate function returns a truthy value, an array value is placed in the first group; otherwise, an array value is placed in the second group.
*
* @param x - input array
* @param predicate - predicate function specifying which group an element in the input array belongs to
* @param thisArg - predicate function execution context
* @returns group results
*
* @example
* function predicate( v ) {
* return v[ 0 ] === 'b';
* }
*
* var x = [ 'beep', 'boop', 'foo', 'bar' ];
*
* var out = bifurcateEntriesBy( x, predicate );
* // returns [ [ [ 0, 'beep' ], [ 1, 'boop' ], [ 3, 'bar' ] ], [ [ 2, 'foo' ] ] ]
*/
declare function bifurcateEntriesBy<T = unknown, U = unknown>( x: Collection<T> | AccessorArrayLike<T>, predicate: Predicate<T, U>, thisArg?: ThisParameterType<Predicate<T, U>> ): EntriesResults<T>;
// EXPORTS //
export = bifurcateEntriesBy;
``` | /content/code_sandbox/lib/node_modules/@stdlib/array/base/bifurcate-entries-by/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 776 |
```xml
import { useCallback } from 'react';
import { useScrollRelativeTranscript } from './transcriptScrollRelative';
export default function useScrollUp(): (options?: { displacement: number }) => void {
const scrollRelative = useScrollRelativeTranscript();
return useCallback(options => scrollRelative({ direction: 'up', ...options }), [scrollRelative]);
}
``` | /content/code_sandbox/packages/component/src/hooks/useScrollUp.ts | xml | 2016-07-07T23:16:57 | 2024-08-16T00:12:37 | BotFramework-WebChat | microsoft/BotFramework-WebChat | 1,567 | 74 |
```xml
import {useState, useEffect, useMemo} from 'react';
import {createContainer} from 'unstated-next';
import {debounce, DebouncedFunc} from 'lodash';
import VideoMetadataContainer from './video-metadata-container';
import VideoControlsContainer from './video-controls-container';
import useEditorOptions, {EditorOptionsState} from 'hooks/editor/use-editor-options';
import {Format, App} from 'common/types';
import useEditorWindowState from 'hooks/editor/use-editor-window-state';
type EditService = EditorOptionsState['editServices'][0];
type SharePlugin = {
pluginName: string;
serviceTitle: string;
app?: App;
};
const isFormatMuted = (format: Format) => ['gif', 'apng'].includes(format);
const useOptions = () => {
const {fps: originalFps} = useEditorWindowState();
const {
state: {
formats,
fpsHistory,
editServices
},
updateFpsUsage,
isLoading
} = useEditorOptions();
const metadata = VideoMetadataContainer.useContainer();
const {isMuted, mute, unmute} = VideoControlsContainer.useContainer();
const [format, setFormat] = useState<Format>();
const [fps, setFps] = useState<number>();
const [width, setWidth] = useState<number>();
const [height, setHeight] = useState<number>();
const [editPlugin, setEditPlugin] = useState<EditService>();
const [sharePlugin, setSharePlugin] = useState<SharePlugin>();
const [wasMuted, setWasMuted] = useState(false);
const debouncedUpdateFpsUsage = useMemo(() => {
if (!updateFpsUsage) {
return;
}
return debounce(updateFpsUsage, 1000);
}, [updateFpsUsage]);
const updateFps = (newFps: number, formatName = format) => {
setFps(newFps);
debouncedUpdateFpsUsage?.({format: formatName, fps: newFps});
};
const updateSharePlugin = (plugin: SharePlugin) => {
setSharePlugin(plugin);
};
const updateFormat = (formatName: Format) => {
debouncedUpdateFpsUsage.flush();
if (metadata.hasAudio) {
if (isFormatMuted(formatName) && !isFormatMuted(format)) {
setWasMuted(isMuted);
mute();
} else if (!isFormatMuted(formatName) && isFormatMuted(format) && !wasMuted) {
unmute();
}
}
const formatOption = formats.find(f => f.format === formatName);
const selectedSharePlugin = formatOption.plugins.find(plugin => {
return (
plugin.pluginName === sharePlugin.pluginName &&
plugin.title === sharePlugin.serviceTitle &&
(plugin.apps?.some(app => app.url === sharePlugin.app?.url) ?? true)
);
}) ?? formatOption.plugins.find(plugin => plugin.pluginName !== '_openWith');
setFormat(formatName);
setSharePlugin({
pluginName: selectedSharePlugin.pluginName,
serviceTitle: selectedSharePlugin.title,
app: selectedSharePlugin.apps ? sharePlugin.app : undefined
});
updateFps(Math.min(originalFps, fpsHistory[formatName]), formatName);
};
useEffect(() => {
if (isLoading) {
return;
}
const firstFormat = formats[0];
const formatName = firstFormat.format;
setFormat(formatName);
const firstPlugin = firstFormat.plugins.find(plugin => plugin.pluginName !== '_openWith');
setSharePlugin(firstPlugin && {
pluginName: firstPlugin.pluginName,
serviceTitle: firstPlugin.title
});
updateFps(Math.min(originalFps, fpsHistory[formatName]), formatName);
}, [isLoading]);
useEffect(() => {
setWidth(metadata.width);
setHeight(metadata.height);
}, [metadata]);
useEffect(() => {
if (!editPlugin) {
return;
}
const newPlugin = editServices.find(service => service.pluginName === editPlugin.pluginName && service.title === editPlugin.title);
setEditPlugin(newPlugin);
}, [editServices]);
const setDimensions = (dimensions: {width: number; height: number}) => {
setWidth(dimensions.width);
setHeight(dimensions.height);
};
return {
width,
height,
format,
fps,
originalFps,
editPlugin,
formats,
editServices,
sharePlugin,
updateSharePlugin,
updateFps,
updateFormat,
setEditPlugin,
setDimensions
};
};
const OptionsContainer = createContainer(useOptions);
export default OptionsContainer;
``` | /content/code_sandbox/renderer/components/editor/options-container.tsx | xml | 2016-08-10T19:37:08 | 2024-08-16T07:01:58 | Kap | wulkano/Kap | 17,864 | 1,010 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.compose.ui.platform.ComposeView android:id="@+id/compose_view"
xmlns:android="path_to_url"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
``` | /content/code_sandbox/epoxy-composesample/src/main/res/layout/activity_epoxy_interop.xml | xml | 2016-08-08T23:05:11 | 2024-08-16T16:11:07 | epoxy | airbnb/epoxy | 8,486 | 60 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="path_to_url">
<item
android:id="@+id/nav_fav_movie"
android:icon="@drawable/ic_general_movie"
android:title="" />
<item
android:id="@+id/nav_fav_actresses"
android:icon="@drawable/ic_menu_actresses"
android:title="" />
</menu>
``` | /content/code_sandbox/app/src/main/res/menu/nav_favourite.xml | xml | 2016-05-21T08:47:10 | 2024-08-14T04:13:43 | JAViewer | SplashCodes/JAViewer | 4,597 | 90 |
```xml
import * as React from 'react'
import { Tag } from 'element-react'
import { Tag as TagNext } from 'element-react/next'
class Component extends React.Component<{}, {}> {
onClose = () => { }
render() {
return (
<div>
<Tag className="className" style={{ width: 100 }}>tag</Tag>
<Tag type="primary">tag</Tag>
<Tag type="gray">tag</Tag>
<Tag type="success">tag</Tag>
<Tag type="warning">tag</Tag>
<Tag closable={true} type="danger" hit={true} closeTransition={true} onClose={this.onClose}>tag</Tag>
<TagNext className="className" style={{ width: 100 }}>TagNext</TagNext>
<TagNext type="primary">TagNext</TagNext>
<TagNext type="gray">TagNext</TagNext>
<TagNext type="success">TagNext</TagNext>
<TagNext type="warning">TagNext</TagNext>
<TagNext closable={true} type="danger" hit={true} closeTransition={true} onClose={this.onClose}>TagNext</TagNext>
</div>
)
}
}
``` | /content/code_sandbox/typings/typing-tests/Tag.tsx | xml | 2016-10-18T06:56:20 | 2024-08-13T18:56:20 | element-react | ElemeFE/element-react | 2,831 | 273 |
```xml
<dict>
<key>CommonPeripheralDSP</key>
<array>
<dict>
<key>DeviceID</key>
<integer>0</integer>
<key>DeviceType</key>
<string>Headphone</string>
</dict>
<dict>
<key>DeviceID</key>
<integer>0</integer>
<key>DeviceType</key>
<string>Microphone</string>
</dict>
</array>
<key>PathMaps</key>
<array>
<dict>
<key>PathMap</key>
<array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<true/>
</dict>
<key>NodeID</key>
<integer>9</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>34</integer>
</dict>
<dict>
<key>Boost</key>
<integer>1</integer>
<key>NodeID</key>
<integer>26</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>MuteInputAmp</key>
<false/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>20</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>2</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>MuteInputAmp</key>
<false/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>33</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>3</integer>
</dict>
</array>
</array>
</array>
</array>
<key>PathMapID</key>
<integer>1</integer>
</dict>
</array>
</dict>
``` | /content/code_sandbox/Resources/ALC256/Platforms28.xml | xml | 2016-03-07T20:45:58 | 2024-08-14T08:57:03 | AppleALC | acidanthera/AppleALC | 3,420 | 1,252 |
```xml
// See LICENSE in the project root for license information.
/**
* This library wraps terser in convenient handles for parallelization.
* It powers `@rushstack/webpack4-module-minifier-plugin` and `@rushstack/webpack5-module-minifier-plugin`
* but has no coupling with webpack.
*
* @packageDocumentation
*/
export type { MinifyOptions } from 'terser';
export type { ILocalMinifierOptions } from './LocalMinifier';
export { LocalMinifier } from './LocalMinifier';
export { MessagePortMinifier } from './MessagePortMinifier';
export { getIdentifier } from './MinifiedIdentifier';
export { minifySingleFileAsync as _minifySingleFileAsync } from './MinifySingleFile';
export { NoopMinifier } from './NoopMinifier';
export type {
IMinifierConnection,
IModuleMinificationCallback,
IModuleMinificationErrorResult,
IModuleMinificationRequest,
IModuleMinificationResult,
IModuleMinificationSuccessResult,
IModuleMinifier,
IModuleMinifierFunction
} from './types';
export type { IWorkerPoolMinifierOptions } from './WorkerPoolMinifier';
export { WorkerPoolMinifier } from './WorkerPoolMinifier';
``` | /content/code_sandbox/libraries/module-minifier/src/index.ts | xml | 2016-09-30T00:28:20 | 2024-08-16T18:54:35 | rushstack | microsoft/rushstack | 5,790 | 264 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="path_to_url">
<item android:drawable="@drawable/ic_web_white" />
</selector>
``` | /content/code_sandbox/app/src/main/res/drawable/selector_web.xml | xml | 2016-08-08T13:25:41 | 2024-08-15T07:21:04 | H-Viewer | PureDark/H-Viewer | 1,738 | 41 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:foreground="?android:attr/selectableItemBackground"
android:onClick="openRightPositionSample">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Right Position Sample"
android:textSize="20sp" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#eee" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:foreground="?android:attr/selectableItemBackground"
android:onClick="openLeftPositionSample">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Left Position Sample"
android:textSize="20sp"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#eee" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="64dp"
android:gravity="center_vertical"
android:paddingLeft="16dp"
android:foreground="?android:attr/selectableItemBackground"
android:onClick="openCustomIndexSample">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Custom Index Sample"
android:textSize="20sp"/>
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#eee" />
</LinearLayout>
``` | /content/code_sandbox/app/src/main/res/layout/activity_main.xml | xml | 2016-08-23T14:34:42 | 2024-08-06T08:22:20 | WaveSideBar | gjiazhe/WaveSideBar | 1,263 | 456 |
```xml
import type { Dependencies } from "@Core/Dependencies";
import type { DependencyRegistry } from "@Core/DependencyRegistry";
import type { Extension } from "@Core/Extension";
import type { ExtensionInfo } from "@common/Core";
import { ExtensionManager } from "./ExtensionManager";
import { ScanCounter } from "./ScanCounter";
const mapExtensionToInfo = (extension: Extension): ExtensionInfo => ({
id: extension.id,
name: extension.name,
nameTranslation: extension.nameTranslation,
image: extension.getImage(),
author: extension.author,
});
export class ExtensionManagerModule {
public static async bootstrap(dependencyRegistry: DependencyRegistry<Dependencies>) {
const ipcMain = dependencyRegistry.get("IpcMain");
const searchIndex = dependencyRegistry.get("SearchIndex");
const settingsManager = dependencyRegistry.get("SettingsManager");
const logger = dependencyRegistry.get("Logger");
const eventSubscriber = dependencyRegistry.get("EventSubscriber");
const extensionRegistry = dependencyRegistry.get("ExtensionRegistry");
const scanCounter = new ScanCounter();
const extensionManager = new ExtensionManager(
extensionRegistry,
searchIndex,
settingsManager,
logger,
scanCounter,
);
ipcMain.on("getScanCount", (event) => (event.returnValue = scanCounter.getScanCount()));
ipcMain.on("getExtensionResources", (event) => {
event.returnValue = extensionManager.getSupportedExtensions().map((extension) => ({
extensionId: extension.id,
resources: extension.getI18nResources(),
}));
});
ipcMain.on("getInstantSearchResultItems", (event, { searchTerm }: { searchTerm: string }) => {
event.returnValue = extensionManager.getInstantSearchResultItems(searchTerm);
});
ipcMain.on("extensionEnabled", (_, { extensionId }: { extensionId: string }) => {
extensionManager.populateSearchIndexByExtensionId(extensionId);
});
ipcMain.on("getAvailableExtensions", (event) => {
event.returnValue = extensionManager.getSupportedExtensions().map(mapExtensionToInfo);
});
ipcMain.on("getEnabledExtensions", (event) => {
event.returnValue = extensionManager.getEnabledExtensions().map(mapExtensionToInfo);
});
ipcMain.on("getExtensionAssetFilePath", (event, { extensionId, key }: { extensionId: string; key: string }) => {
const extension = extensionRegistry.getById(extensionId);
event.returnValue = extension.getAssetFilePath ? extension.getAssetFilePath(key) : undefined;
});
ipcMain.on("getExtension", (event, { extensionId }: { extensionId: string }) => {
event.returnValue = mapExtensionToInfo(extensionRegistry.getById(extensionId));
});
ipcMain.on(
"getExtensionSettingDefaultValue",
(event, { extensionId, settingKey }: { extensionId: string; settingKey: string }) => {
event.returnValue = extensionRegistry.getById(extensionId).getSettingDefaultValue(settingKey);
},
);
ipcMain.handle(
"invokeExtension",
(_, { extensionId, argument }: { extensionId: string; argument: unknown }) => {
const extension = extensionRegistry.getById(extensionId);
if (!extension.invoke) {
throw new Error(`Extension with id "${extension}" does not implement a "search" method`);
}
return extension.invoke(argument);
},
);
ipcMain.handle("triggerExtensionRescan", (_, { extensionId }: { extensionId: string }) =>
extensionManager.populateSearchIndexByExtensionId(extensionId),
);
eventSubscriber.subscribe(
"RescanOrchestrator:timeElapsed",
async () => await extensionManager.populateSearchIndex(),
);
eventSubscriber.subscribe("settingUpdated", async ({ key }: { key: string }) => {
const extensionNeedsRescan = (extension: Extension) =>
extension.getSettingKeysTriggeringRescan && extension.getSettingKeysTriggeringRescan().includes(key);
await Promise.allSettled(
extensionManager
.getSupportedExtensions()
.filter((extension) => extensionNeedsRescan(extension))
.map((extension) => extensionManager.populateSearchIndexByExtensionId(extension.id)),
);
});
}
}
``` | /content/code_sandbox/src/main/Core/ExtensionManager/ExtensionManagerModule.ts | xml | 2016-10-11T04:59:52 | 2024-08-16T11:53:31 | ueli | oliverschwendener/ueli | 3,543 | 866 |
```xml
import type { RequireSome } from '../interfaces';
import type { CalendarCreateOrUpdateEventBlobData, CalendarEvent } from '../interfaces/calendar';
export const getHasSharedEventContent = (
data: CalendarCreateOrUpdateEventBlobData
): data is RequireSome<CalendarCreateOrUpdateEventBlobData, 'SharedEventContent'> => !!data.SharedEventContent;
export const getHasSharedKeyPacket = (
data: CalendarCreateOrUpdateEventBlobData
): data is RequireSome<CalendarCreateOrUpdateEventBlobData, 'SharedKeyPacket'> => !!data.SharedKeyPacket;
export const getHasDefaultNotifications = ({ Notifications }: CalendarEvent) => {
return !Notifications;
};
export const getIsAutoAddedInvite = (
event: CalendarEvent
): event is CalendarEvent & { AddressKeyPacket: string; AddressID: string } =>
!!event.AddressKeyPacket && !!event.AddressID;
export const getIsPersonalSingleEdit = ({ IsPersonalSingleEdit }: CalendarEvent) => IsPersonalSingleEdit;
``` | /content/code_sandbox/packages/shared/lib/calendar/apiModels.ts | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 207 |
```xml
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { HttpModule } from '@angular/http';
import { HomeModule } from './home/';
import { AppComponent } from './app.component';
import { TodoStore } from './shared/services/todo.store';
/* Routing Module */
import { AppRoutingModule } from './app-routing.module';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { NoopInterceptor } from './shared/interceptors/noopinterceptor.interceptor';
/**
* The bootstrapper module
*/
@NgModule({
declarations: [AppComponent],
imports: [HomeModule, AppRoutingModule],
providers: [
TodoStore,
{
provide: HTTP_INTERCEPTORS,
useClass: NoopInterceptor,
multi: true
},
{
provide: HTTP_INTERCEPTORS,
useFactory: (languageService: GlobalLanguageService) =>
new HttpConfigurationInterceptor(languageService),
deps: [GlobalLanguageService]
}
],
bootstrap: [AppComponent]
})
export class AppModule {}
``` | /content/code_sandbox/test/fixtures/todomvc-ng2-duplicates/src/app/app.module.ts | xml | 2016-10-17T07:09:28 | 2024-08-14T16:30:10 | compodoc | compodoc/compodoc | 3,980 | 227 |
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
import scumaxabs = require( './index' );
// TESTS //
// The function returns a Float32Array...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs( x.length, x, 1, y, 1 ); // $ExpectType Float32Array
}
// The compiler throws an error if the function is provided a first argument which is not a number...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs( '10', x, 1, y, 1 ); // $ExpectError
scumaxabs( true, x, 1, y, 1 ); // $ExpectError
scumaxabs( false, x, 1, y, 1 ); // $ExpectError
scumaxabs( null, x, 1, y, 1 ); // $ExpectError
scumaxabs( undefined, x, 1, y, 1 ); // $ExpectError
scumaxabs( [], x, 1, y, 1 ); // $ExpectError
scumaxabs( {}, x, 1, y, 1 ); // $ExpectError
scumaxabs( ( x: number ): number => x, x, 1, y, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a second argument which is not a Float32Array...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs( x.length, 10, 1, y, 1 ); // $ExpectError
scumaxabs( x.length, '10', 1, y, 1 ); // $ExpectError
scumaxabs( x.length, true, 1, y, 1 ); // $ExpectError
scumaxabs( x.length, false, 1, y, 1 ); // $ExpectError
scumaxabs( x.length, null, 1, y, 1 ); // $ExpectError
scumaxabs( x.length, undefined, 1, y, 1 ); // $ExpectError
scumaxabs( x.length, [ '1' ], 1, y, 1 ); // $ExpectError
scumaxabs( x.length, {}, 1, y, 1 ); // $ExpectError
scumaxabs( x.length, ( x: number ): number => x, 1, y, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a third argument which is not a number...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs( x.length, x, '10', y, 1 ); // $ExpectError
scumaxabs( x.length, x, true, y, 1 ); // $ExpectError
scumaxabs( x.length, x, false, y, 1 ); // $ExpectError
scumaxabs( x.length, x, null, y, 1 ); // $ExpectError
scumaxabs( x.length, x, undefined, y, 1 ); // $ExpectError
scumaxabs( x.length, x, [], y, 1 ); // $ExpectError
scumaxabs( x.length, x, {}, y, 1 ); // $ExpectError
scumaxabs( x.length, x, ( x: number ): number => x, y, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a fourth argument which is not a Float32Array...
{
const x = new Float32Array( 10 );
scumaxabs( x.length, x, 1, 10, 1 ); // $ExpectError
scumaxabs( x.length, x, 1, '10', 1 ); // $ExpectError
scumaxabs( x.length, x, 1, true, 1 ); // $ExpectError
scumaxabs( x.length, x, 1, false, 1 ); // $ExpectError
scumaxabs( x.length, x, 1, null, 1 ); // $ExpectError
scumaxabs( x.length, x, 1, undefined, 1 ); // $ExpectError
scumaxabs( x.length, x, 1, [ '1' ], 1 ); // $ExpectError
scumaxabs( x.length, x, 1, {}, 1 ); // $ExpectError
scumaxabs( x.length, x, 1, ( x: number ): number => x, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a fifth argument which is not a number...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs( x.length, x, 1, y, '10' ); // $ExpectError
scumaxabs( x.length, x, 1, y, true ); // $ExpectError
scumaxabs( x.length, x, 1, y, false ); // $ExpectError
scumaxabs( x.length, x, 1, y, null ); // $ExpectError
scumaxabs( x.length, x, 1, y, undefined ); // $ExpectError
scumaxabs( x.length, x, 1, y, [] ); // $ExpectError
scumaxabs( x.length, x, 1, y, {} ); // $ExpectError
scumaxabs( x.length, x, 1, y, ( x: number ): number => x ); // $ExpectError
}
// The compiler throws an error if the function is provided an unsupported number of arguments...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs(); // $ExpectError
scumaxabs( x.length ); // $ExpectError
scumaxabs( x.length, x ); // $ExpectError
scumaxabs( x.length, x, 1 ); // $ExpectError
scumaxabs( x.length, x, 1, y ); // $ExpectError
scumaxabs( x.length, x, 1, y, 1, 10 ); // $ExpectError
}
// Attached to main export is an `ndarray` method which returns a Float32Array...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectType Float32Array
}
// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs.ndarray( '10', x, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( true, x, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( false, x, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( null, x, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( undefined, x, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( [], x, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( {}, x, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( ( x: number ): number => x, x, 1, 0, y, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a second argument which is not a Float32Array...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs.ndarray( x.length, 10, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, '10', 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, true, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, false, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, null, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, undefined, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, [ '1' ], 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, {}, 1, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, ( x: number ): number => x, 1, 0, y, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs.ndarray( x.length, x, '10', 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, true, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, false, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, null, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, undefined, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, [], 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, {}, 0, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, ( x: number ): number => x, 0, y, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs.ndarray( x.length, x, 1, '10', y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, true, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, false, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, null, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, undefined, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, [], y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, {}, y, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, ( x: number ): number => x, y, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a Float32Array...
{
const x = new Float32Array( 10 );
scumaxabs.ndarray( x.length, x, 1, 0, 10, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, '10', 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, true, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, false, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, null, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, undefined, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, [ '1' ], 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, {}, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs.ndarray( x.length, x, 1, 0, y, '10', 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, true, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, false, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, null, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, undefined, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, [], 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, {}, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, ( x: number ): number => x, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs.ndarray( x.length, x, 1, 0, y, 1, '10' ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, 1, true ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, 1, false ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, 1, null ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, 1, undefined ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, 1, [] ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, 1, {} ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, 1, ( x: number ): number => x ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
{
const x = new Float32Array( 10 );
const y = new Float32Array( 10 );
scumaxabs.ndarray(); // $ExpectError
scumaxabs.ndarray( x.length ); // $ExpectError
scumaxabs.ndarray( x.length, x ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, 1 ); // $ExpectError
scumaxabs.ndarray( x.length, x, 1, 0, y, 1, 0, 10 ); // $ExpectError
}
``` | /content/code_sandbox/lib/node_modules/@stdlib/stats/base/scumaxabs/docs/types/test.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 3,837 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<spirit:component xmlns:xilinx="path_to_url" xmlns:spirit="path_to_url" xmlns:xsi="path_to_url">
<spirit:vendor>xilinx.com</spirit:vendor>
<spirit:library>customized_ip</spirit:library>
<spirit:name>bd_a493_lut_buffer_0</spirit:name>
<spirit:version>1.0</spirit:version>
<spirit:busInterfaces>
<spirit:busInterface>
<spirit:name>s_bscan_vec</spirit:name>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bscan" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bscan_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BSCANID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>bscanid_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>CAPTURE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>capture_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>DRCK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>drck_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RESET</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>reset_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RUNTEST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>runtest_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>SEL</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>sel_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>SHIFT</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>shift_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TCK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tck_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TDI</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tdi_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TDO</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tdo_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TMS</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tms_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>UPDATE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>update_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:vendorExtensions>
<xilinx:busInterfaceInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="BUSIF_ENABLEMENT.s_bscan_vec" xilinx:dependency="spirit:decode(id('MODELPARAM_VALUE.C_EN_BSCANID_VEC')) == 1">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:busInterfaceInfo>
</spirit:vendorExtensions>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>m_bscan_vec</spirit:name>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bscan" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bscan_rtl" spirit:version="1.0"/>
<spirit:master/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BSCANID</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>bscanid_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>CAPTURE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>capture_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>DRCK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>drck_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RESET</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>reset_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RUNTEST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>runtest_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>SEL</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>sel_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>SHIFT</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>shift_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TCK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tck_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TDI</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tdi_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TDO</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tdo_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TMS</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tms_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>UPDATE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>update_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:vendorExtensions>
<xilinx:busInterfaceInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="BUSIF_ENABLEMENT.m_bscan_vec" xilinx:dependency="spirit:decode(id('MODELPARAM_VALUE.C_EN_BSCANID_VEC')) == 1">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:busInterfaceInfo>
</spirit:vendorExtensions>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>s_bscan</spirit:name>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bscan" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bscan_rtl" spirit:version="1.0"/>
<spirit:slave/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BSCANID_EN</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>bscanid_en_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>CAPTURE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>capture_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>DRCK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>drck_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RESET</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>reset_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RUNTEST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>runtest_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>SEL</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>sel_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>SHIFT</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>shift_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TCK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tck_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TDI</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tdi_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TDO</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tdo_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TMS</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tms_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>UPDATE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>update_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:vendorExtensions>
<xilinx:busInterfaceInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="BUSIF_ENABLEMENT.s_bscan" xilinx:dependency="spirit:decode(id('MODELPARAM_VALUE.C_EN_BSCANID_VEC')) == 0">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:busInterfaceInfo>
</spirit:vendorExtensions>
</spirit:busInterface>
<spirit:busInterface>
<spirit:name>m_bscan</spirit:name>
<spirit:busType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bscan" spirit:version="1.0"/>
<spirit:abstractionType spirit:vendor="xilinx.com" spirit:library="interface" spirit:name="bscan_rtl" spirit:version="1.0"/>
<spirit:master/>
<spirit:portMaps>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>BSCANID_EN</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>bscanid_en_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>CAPTURE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>capture_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>DRCK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>drck_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RESET</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>reset_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>RUNTEST</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>runtest_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>SEL</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>sel_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>SHIFT</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>shift_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TCK</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tck_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TDI</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tdi_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TDO</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tdo_i</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>TMS</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>tms_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
<spirit:portMap>
<spirit:logicalPort>
<spirit:name>UPDATE</spirit:name>
</spirit:logicalPort>
<spirit:physicalPort>
<spirit:name>update_o</spirit:name>
</spirit:physicalPort>
</spirit:portMap>
</spirit:portMaps>
<spirit:vendorExtensions>
<xilinx:busInterfaceInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="BUSIF_ENABLEMENT.m_bscan" xilinx:dependency="spirit:decode(id('MODELPARAM_VALUE.C_EN_BSCANID_VEC')) == 0">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:busInterfaceInfo>
</spirit:vendorExtensions>
</spirit:busInterface>
</spirit:busInterfaces>
<spirit:model>
<spirit:views>
<spirit:view>
<spirit:name>xilinx_verilogsynthesis</spirit:name>
<spirit:displayName>Verilog Synthesis</spirit:displayName>
<spirit:envIdentifier>verilogSource:vivado.xilinx.com:synthesis</spirit:envIdentifier>
<spirit:language>verilog</spirit:language>
<spirit:fileSetRef>
<spirit:localName>xilinx_verilogsynthesis_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>GENtimestamp</spirit:name>
<spirit:value>Wed Feb 21 19:24:34 UTC 2018</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>outputProductCRC</spirit:name>
<spirit:value>7:19921278</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
<spirit:view>
<spirit:name>xilinx_verilogsynthesiswrapper</spirit:name>
<spirit:displayName>Verilog Synthesis Wrapper</spirit:displayName>
<spirit:envIdentifier>verilogSource:vivado.xilinx.com:synthesis.wrapper</spirit:envIdentifier>
<spirit:language>verilog</spirit:language>
<spirit:fileSetRef>
<spirit:localName>xilinx_verilogsynthesiswrapper_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>GENtimestamp</spirit:name>
<spirit:value>Wed Feb 21 19:24:34 UTC 2018</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>outputProductCRC</spirit:name>
<spirit:value>7:19921278</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
<spirit:view>
<spirit:name>xilinx_verilogbehavioralsimulation</spirit:name>
<spirit:displayName>Verilog Simulation</spirit:displayName>
<spirit:envIdentifier>verilogSource:vivado.xilinx.com:simulation</spirit:envIdentifier>
<spirit:language>verilog</spirit:language>
<spirit:fileSetRef>
<spirit:localName>xilinx_verilogbehavioralsimulation_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>GENtimestamp</spirit:name>
<spirit:value>Wed Feb 21 19:24:34 UTC 2018</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>outputProductCRC</spirit:name>
<spirit:value>7:19748408</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
<spirit:view>
<spirit:name>xilinx_verilogsimulationwrapper</spirit:name>
<spirit:displayName>Verilog Simulation Wrapper</spirit:displayName>
<spirit:envIdentifier>verilogSource:vivado.xilinx.com:simulation.wrapper</spirit:envIdentifier>
<spirit:language>verilog</spirit:language>
<spirit:fileSetRef>
<spirit:localName>xilinx_verilogsimulationwrapper_view_fileset</spirit:localName>
</spirit:fileSetRef>
<spirit:parameters>
<spirit:parameter>
<spirit:name>GENtimestamp</spirit:name>
<spirit:value>Wed Feb 21 19:24:34 UTC 2018</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>outputProductCRC</spirit:name>
<spirit:value>7:19748408</spirit:value>
</spirit:parameter>
</spirit:parameters>
</spirit:view>
</spirit:views>
<spirit:ports>
<spirit:port>
<spirit:name>tdi_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>tms_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>tck_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>drck_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>sel_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>shift_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>update_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>capture_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>runtest_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>reset_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>bscanid_en_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.bscanid_en_i" xilinx:dependency="spirit:decode(id('PARAM_VALUE.C_EN_BSCANID_VEC')) == 0">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>tdo_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>wire</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>bscanid_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>wire</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.bscanid_o" xilinx:dependency="spirit:decode(id('PARAM_VALUE.C_EN_BSCANID_VEC')) == 1">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>tdi_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>tms_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>tck_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>drck_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>sel_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>shift_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>update_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>capture_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>runtest_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>reset_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>bscanid_en_o</spirit:name>
<spirit:wire>
<spirit:direction>out</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.bscanid_en_o" xilinx:dependency="spirit:decode(id('PARAM_VALUE.C_EN_BSCANID_VEC')) == 0">true</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
<spirit:port>
<spirit:name>tdo_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
</spirit:port>
<spirit:port>
<spirit:name>bscanid_i</spirit:name>
<spirit:wire>
<spirit:direction>in</spirit:direction>
<spirit:vector>
<spirit:left spirit:format="long">31</spirit:left>
<spirit:right spirit:format="long">0</spirit:right>
</spirit:vector>
<spirit:wireTypeDefs>
<spirit:wireTypeDef>
<spirit:typeName>std_logic_vector</spirit:typeName>
<spirit:viewNameRef>xilinx_verilogsynthesis</spirit:viewNameRef>
<spirit:viewNameRef>xilinx_verilogbehavioralsimulation</spirit:viewNameRef>
</spirit:wireTypeDef>
</spirit:wireTypeDefs>
<spirit:driver>
<spirit:defaultValue spirit:format="long">0</spirit:defaultValue>
</spirit:driver>
</spirit:wire>
<spirit:vendorExtensions>
<xilinx:portInfo>
<xilinx:enablement>
<xilinx:isEnabled xilinx:resolve="dependent" xilinx:id="PORT_ENABLEMENT.bscanid_i" xilinx:dependency="spirit:decode(id('PARAM_VALUE.C_EN_BSCANID_VEC')) == 1">false</xilinx:isEnabled>
</xilinx:enablement>
</xilinx:portInfo>
</spirit:vendorExtensions>
</spirit:port>
</spirit:ports>
<spirit:modelParameters>
<spirit:modelParameter xsi:type="spirit:nameValueTypeType" spirit:dataType="integer">
<spirit:name>C_EN_BSCANID_VEC</spirit:name>
<spirit:displayName>C En BSCANID VEC</spirit:displayName>
<spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.C_EN_BSCANID_VEC">0</spirit:value>
</spirit:modelParameter>
</spirit:modelParameters>
</spirit:model>
<spirit:fileSets>
<spirit:fileSet>
<spirit:name>xilinx_verilogsynthesis_view_fileset</spirit:name>
<spirit:file>
<spirit:name>hdl/lut_buffer_v2_0_vl_rfs.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
<spirit:logicalName>lut_buffer_v2_0_0</spirit:logicalName>
</spirit:file>
</spirit:fileSet>
<spirit:fileSet>
<spirit:name>xilinx_verilogsynthesiswrapper_view_fileset</spirit:name>
<spirit:file>
<spirit:name>synth/bd_a493_lut_buffer_0.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
<spirit:logicalName>xil_defaultlib</spirit:logicalName>
</spirit:file>
</spirit:fileSet>
<spirit:fileSet>
<spirit:name>xilinx_verilogbehavioralsimulation_view_fileset</spirit:name>
<spirit:file>
<spirit:name>hdl/lut_buffer_v2_0_vl_rfs.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
<spirit:userFileType>USED_IN_ipstatic</spirit:userFileType>
<spirit:logicalName>lut_buffer_v2_0_0</spirit:logicalName>
</spirit:file>
</spirit:fileSet>
<spirit:fileSet>
<spirit:name>xilinx_verilogsimulationwrapper_view_fileset</spirit:name>
<spirit:file>
<spirit:name>sim/bd_a493_lut_buffer_0.v</spirit:name>
<spirit:fileType>verilogSource</spirit:fileType>
<spirit:logicalName>xil_defaultlib</spirit:logicalName>
</spirit:file>
</spirit:fileSet>
</spirit:fileSets>
<spirit:description>Labtools XSDB Slave library containing slave interface along with XSDB register components</spirit:description>
<spirit:parameters>
<spirit:parameter>
<spirit:name>Component_Name</spirit:name>
<spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Component_Name" spirit:order="1">bd_a493_lut_buffer_0</spirit:value>
</spirit:parameter>
<spirit:parameter>
<spirit:name>C_EN_BSCANID_VEC</spirit:name>
<spirit:displayName>C En BSCANID VEC</spirit:displayName>
<spirit:value spirit:format="bool" spirit:resolve="user" spirit:id="PARAM_VALUE.C_EN_BSCANID_VEC" spirit:order="100">false</spirit:value>
</spirit:parameter>
</spirit:parameters>
<spirit:vendorExtensions>
<xilinx:coreExtensions>
<xilinx:displayName>Labtools lut buffer Library</xilinx:displayName>
<xilinx:coreRevision>0</xilinx:coreRevision>
<xilinx:configElementInfos>
<xilinx:configElementInfo xilinx:referenceId="PARAM_VALUE.C_EN_BSCANID_VEC" xilinx:valueSource="user"/>
</xilinx:configElementInfos>
</xilinx:coreExtensions>
<xilinx:packagingInfo>
<xilinx:xilinxVersion>2017.1</xilinx:xilinxVersion>
<xilinx:checksum xilinx:scope="busInterfaces" xilinx:value="8204c109"/>
<xilinx:checksum xilinx:scope="fileGroups" xilinx:value="59ac9724"/>
<xilinx:checksum xilinx:scope="ports" xilinx:value="c3640bd7"/>
<xilinx:checksum xilinx:scope="hdlParameters" xilinx:value="0ac2623d"/>
<xilinx:checksum xilinx:scope="parameters" xilinx:value="1c79aefb"/>
</xilinx:packagingInfo>
</spirit:vendorExtensions>
</spirit:component>
``` | /content/code_sandbox/hdk/common/shell_v04261818/design/ip/cl_debug_bridge/bd_0/ip/ip_1/bd_a493_lut_buffer_0.xml | xml | 2016-11-04T22:04:05 | 2024-08-13T03:36:47 | aws-fpga | aws/aws-fpga | 1,499 | 10,141 |
```xml
export { MenuList } from './menu-list.js';
export { template as MenuListTemplate } from './menu-list.template.js';
export { styles as MenuListStyles } from './menu-list.styles.js';
export { definition as MenuListDefinition } from './menu-list.definition.js';
``` | /content/code_sandbox/packages/web-components/src/menu-list/index.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 57 |
```xml
/**
* This file is part of OpenMediaVault.
*
* @license path_to_url GPL Version 3
* @author Volker Theile <volker.theile@openmediavault.org>
*
* OpenMediaVault is free software: you can redistribute it and/or modify
* any later version.
*
* OpenMediaVault 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
*/
import { Component, Inject } from '@angular/core';
import { Router } from '@angular/router';
import { marker as gettext } from '@ngneat/transloco-keys-manager/marker';
import * as _ from 'lodash';
import { FormSelectComponent } from '~/app/core/components/intuition/form/components/form-select/form-select.component';
import { DataStoreService } from '~/app/shared/services/data-store.service';
@Component({
selector: 'omv-form-sharedfolder-select',
templateUrl: './form-sharedfolder-select.component.html',
styleUrls: ['./form-sharedfolder-select.component.scss']
})
export class FormSharedfolderSelectComponent extends FormSelectComponent {
constructor(
@Inject(DataStoreService) dataStoreService: DataStoreService,
private router: Router
) {
super(dataStoreService);
}
public onCreate(): void {
this.router.navigate(['/storage/shared-folders/create'], {
queryParams: { returnUrl: this.router.url }
});
}
protected override sanitizeConfig(): void {
super.sanitizeConfig();
_.merge(this.config, {
valueField: 'uuid',
textField: 'description',
placeholder: gettext('Select a shared folder ...'),
store: {
proxy: {
service: 'ShareMgmt',
get: {
method: 'enumerateSharedFolders'
}
},
sorters: [
{
dir: 'asc',
prop: 'name'
}
]
}
});
}
}
``` | /content/code_sandbox/deb/openmediavault/workbench/src/app/core/components/intuition/form/components/form-sharedfolder-select/form-sharedfolder-select.component.ts | xml | 2016-05-03T10:35:34 | 2024-08-16T08:03:04 | openmediavault | openmediavault/openmediavault | 4,954 | 415 |
```xml
import { contentType } from 'mime-types';
import path from 'path';
export default function getMimeType(fileName: string) {
const extension = path.extname(fileName);
return contentType(extension) || 'application/octet-stream';
}
``` | /content/code_sandbox/packages/cli/src/util/dev/mime-type.ts | xml | 2016-09-09T01:12:08 | 2024-08-16T17:39:45 | vercel | vercel/vercel | 12,545 | 47 |
```xml
/*your_sha256_hash-----------------------------
*your_sha256_hash----------------------------*/
import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = {
comments: {
lineComment: '#'
},
brackets: [
['{', '}'],
['[', ']'],
['(', ')']
],
autoClosingPairs: [
{ open: '{', close: '}' },
{ open: '[', close: ']' },
{ open: '(', close: ')' },
{ open: '"', close: '"' },
{ open: "'", close: "'" },
{ open: '`', close: '`' }
],
surroundingPairs: [
{ open: '{', close: '}' },
{ open: '[', close: ']' },
{ open: '(', close: ')' },
{ open: '"', close: '"' },
{ open: "'", close: "'" },
{ open: '`', close: '`' }
]
};
export const language = <languages.IMonarchLanguage>{
defaultToken: '',
tokenPostfix: '.perl',
brackets: [
{ token: 'delimiter.bracket', open: '{', close: '}' },
{ token: 'delimiter.parenthesis', open: '(', close: ')' },
{ token: 'delimiter.square', open: '[', close: ']' }
],
// path_to_url
// Perl syntax
keywords: [
'__DATA__',
'else',
'lock',
'__END__',
'elsif',
'lt',
'__FILE__',
'eq',
'__LINE__',
'exp',
'ne',
'sub',
'__PACKAGE__',
'for',
'no',
'and',
'foreach',
'or',
'unless',
'cmp',
'ge',
'package',
'until',
'continue',
'gt',
'while',
'CORE',
'if',
'xor',
'do',
'le',
'__DIE__',
'__WARN__'
],
// Perl functions
builtinFunctions: [
'-A',
'END',
'length',
'setpgrp',
'-B',
'endgrent',
'link',
'setpriority',
'-b',
'endhostent',
'listen',
'setprotoent',
'-C',
'endnetent',
'local',
'setpwent',
'-c',
'endprotoent',
'localtime',
'setservent',
'-d',
'endpwent',
'log',
'setsockopt',
'-e',
'endservent',
'lstat',
'shift',
'-f',
'eof',
'map',
'shmctl',
'-g',
'eval',
'mkdir',
'shmget',
'-k',
'exec',
'msgctl',
'shmread',
'-l',
'exists',
'msgget',
'shmwrite',
'-M',
'exit',
'msgrcv',
'shutdown',
'-O',
'fcntl',
'msgsnd',
'sin',
'-o',
'fileno',
'my',
'sleep',
'-p',
'flock',
'next',
'socket',
'-r',
'fork',
'not',
'socketpair',
'-R',
'format',
'oct',
'sort',
'-S',
'formline',
'open',
'splice',
'-s',
'getc',
'opendir',
'split',
'-T',
'getgrent',
'ord',
'sprintf',
'-t',
'getgrgid',
'our',
'sqrt',
'-u',
'getgrnam',
'pack',
'srand',
'-w',
'gethostbyaddr',
'pipe',
'stat',
'-W',
'gethostbyname',
'pop',
'state',
'-X',
'gethostent',
'pos',
'study',
'-x',
'getlogin',
'print',
'substr',
'-z',
'getnetbyaddr',
'printf',
'symlink',
'abs',
'getnetbyname',
'prototype',
'syscall',
'accept',
'getnetent',
'push',
'sysopen',
'alarm',
'getpeername',
'quotemeta',
'sysread',
'atan2',
'getpgrp',
'rand',
'sysseek',
'AUTOLOAD',
'getppid',
'read',
'system',
'BEGIN',
'getpriority',
'readdir',
'syswrite',
'bind',
'getprotobyname',
'readline',
'tell',
'binmode',
'getprotobynumber',
'readlink',
'telldir',
'bless',
'getprotoent',
'readpipe',
'tie',
'break',
'getpwent',
'recv',
'tied',
'caller',
'getpwnam',
'redo',
'time',
'chdir',
'getpwuid',
'ref',
'times',
'CHECK',
'getservbyname',
'rename',
'truncate',
'chmod',
'getservbyport',
'require',
'uc',
'chomp',
'getservent',
'reset',
'ucfirst',
'chop',
'getsockname',
'return',
'umask',
'chown',
'getsockopt',
'reverse',
'undef',
'chr',
'glob',
'rewinddir',
'UNITCHECK',
'chroot',
'gmtime',
'rindex',
'unlink',
'close',
'goto',
'rmdir',
'unpack',
'closedir',
'grep',
'say',
'unshift',
'connect',
'hex',
'scalar',
'untie',
'cos',
'index',
'seek',
'use',
'crypt',
'INIT',
'seekdir',
'utime',
'dbmclose',
'int',
'select',
'values',
'dbmopen',
'ioctl',
'semctl',
'vec',
'defined',
'join',
'semget',
'wait',
'delete',
'keys',
'semop',
'waitpid',
'DESTROY',
'kill',
'send',
'wantarray',
'die',
'last',
'setgrent',
'warn',
'dump',
'lc',
'sethostent',
'write',
'each',
'lcfirst',
'setnetent'
],
// File handlers
builtinFileHandlers: ['ARGV', 'STDERR', 'STDOUT', 'ARGVOUT', 'STDIN', 'ENV'],
// Perl variables
builtinVariables: [
'$!',
'$^RE_TRIE_MAXBUF',
'$LAST_REGEXP_CODE_RESULT',
'$"',
'$^S',
'$LIST_SEPARATOR',
'$#',
'$^T',
'$MATCH',
'$$',
'$^TAINT',
'$MULTILINE_MATCHING',
'$%',
'$^UNICODE',
'$NR',
'$&',
'$^UTF8LOCALE',
'$OFMT',
"$'",
'$^V',
'$OFS',
'$(',
'$^W',
'$ORS',
'$)',
'$^WARNING_BITS',
'$OS_ERROR',
'$*',
'$^WIDE_SYSTEM_CALLS',
'$OSNAME',
'$+',
'$^X',
'$OUTPUT_AUTO_FLUSH',
'$,',
'$_',
'$OUTPUT_FIELD_SEPARATOR',
'$-',
'$`',
'$OUTPUT_RECORD_SEPARATOR',
'$.',
'$a',
'$PERL_VERSION',
'$/',
'$ACCUMULATOR',
'$PERLDB',
'$0',
'$ARG',
'$PID',
'$:',
'$ARGV',
'$POSTMATCH',
'$;',
'$b',
'$PREMATCH',
'$<',
'$BASETIME',
'$PROCESS_ID',
'$=',
'$CHILD_ERROR',
'$PROGRAM_NAME',
'$>',
'$COMPILING',
'$REAL_GROUP_ID',
'$?',
'$DEBUGGING',
'$REAL_USER_ID',
'$@',
'$EFFECTIVE_GROUP_ID',
'$RS',
'$[',
'$EFFECTIVE_USER_ID',
'$SUBSCRIPT_SEPARATOR',
'$\\',
'$EGID',
'$SUBSEP',
'$]',
'$ERRNO',
'$SYSTEM_FD_MAX',
'$^',
'$EUID',
'$UID',
'$^A',
'$EVAL_ERROR',
'$WARNING',
'$^C',
'$EXCEPTIONS_BEING_CAUGHT',
'$|',
'$^CHILD_ERROR_NATIVE',
'$EXECUTABLE_NAME',
'$~',
'$^D',
'$EXTENDED_OS_ERROR',
'%!',
'$^E',
'$FORMAT_FORMFEED',
'%^H',
'$^ENCODING',
'$FORMAT_LINE_BREAK_CHARACTERS',
'%ENV',
'$^F',
'$FORMAT_LINES_LEFT',
'%INC',
'$^H',
'$FORMAT_LINES_PER_PAGE',
'%OVERLOAD',
'$^I',
'$FORMAT_NAME',
'%SIG',
'$^L',
'$FORMAT_PAGE_NUMBER',
'@+',
'$^M',
'$FORMAT_TOP_NAME',
'@-',
'$^N',
'$GID',
'@_',
'$^O',
'$INPLACE_EDIT',
'@ARGV',
'$^OPEN',
'$INPUT_LINE_NUMBER',
'@INC',
'$^P',
'$INPUT_RECORD_SEPARATOR',
'@LAST_MATCH_START',
'$^R',
'$LAST_MATCH_END',
'$^RE_DEBUG_FLAGS',
'$LAST_PAREN_MATCH'
],
// operators
symbols: /[:+\-\^*$&%@=<>!?|\/~\.]/,
quoteLikeOps: ['qr', 'm', 's', 'q', 'qq', 'qx', 'qw', 'tr', 'y'],
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
// The main tokenizer for our languages
tokenizer: {
root: [
{ include: '@whitespace' },
[
/[a-zA-Z\-_][\w\-_]*/,
{
cases: {
'@keywords': 'keyword',
'@builtinFunctions': 'type.identifier',
'@builtinFileHandlers': 'variable.predefined',
'@quoteLikeOps': {
token: '@rematch',
next: 'quotedConstructs'
},
'@default': ''
}
}
],
// Perl variables
[
/[\$@%][*@#?\+\-\$!\w\\\^><~:;\.]+/,
{
cases: {
'@builtinVariables': 'variable.predefined',
'@default': 'variable'
}
}
],
{ include: '@strings' },
{ include: '@dblStrings' },
// Perl Doc
{ include: '@perldoc' },
// Here Doc
{ include: '@heredoc' },
[/[{}\[\]()]/, '@brackets'],
// RegExp
[/[\/](?:(?:\[(?:\\]|[^\]])+\])|(?:\\\/|[^\]\/]))*[\/]\w*\s*(?=[).,;]|$)/, 'regexp'],
[/@symbols/, 'operators'],
{ include: '@numbers' },
[/[,;]/, 'delimiter']
],
whitespace: [
[/\s+/, 'white'],
[/(^#!.*$)/, 'metatag'],
[/(^#.*$)/, 'comment']
],
numbers: [
[/\d*\.\d+([eE][\-+]?\d+)?/, 'number.float'],
[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/, 'number.hex'],
[/\d+/, 'number']
],
// Single quote string
strings: [[/'/, 'string', '@stringBody']],
stringBody: [
[/'/, 'string', '@popall'],
[/\\'/, 'string.escape'],
[/./, 'string']
],
// Double quote string
dblStrings: [[/"/, 'string', '@dblStringBody']],
dblStringBody: [
[/"/, 'string', '@popall'],
[/@escapes/, 'string.escape'],
[/\\./, 'string.escape.invalid'],
{ include: '@variables' },
[/./, 'string']
],
// Quoted constructs
// Percent strings in Ruby are similar to quote-like operators in Perl.
// This is adapted from pstrings in ../ruby/ruby.ts.
quotedConstructs: [
[/(q|qw|tr|y)\s*\(/, { token: 'string.delim', switchTo: '@qstring.(.)' }],
[/(q|qw|tr|y)\s*\[/, { token: 'string.delim', switchTo: '@qstring.[.]' }],
[/(q|qw|tr|y)\s*\{/, { token: 'string.delim', switchTo: '@qstring.{.}' }],
[/(q|qw|tr|y)\s*</, { token: 'string.delim', switchTo: '@qstring.<.>' }],
[/(q|qw|tr|y)#/, { token: 'string.delim', switchTo: '@qstring.#.#' }],
[/(q|qw|tr|y)\s*([^A-Za-z0-9#\s])/, { token: 'string.delim', switchTo: '@qstring.$2.$2' }],
[/(q|qw|tr|y)\s+(\w)/, { token: 'string.delim', switchTo: '@qstring.$2.$2' }],
[/(qr|m|s)\s*\(/, { token: 'regexp.delim', switchTo: '@qregexp.(.)' }],
[/(qr|m|s)\s*\[/, { token: 'regexp.delim', switchTo: '@qregexp.[.]' }],
[/(qr|m|s)\s*\{/, { token: 'regexp.delim', switchTo: '@qregexp.{.}' }],
[/(qr|m|s)\s*</, { token: 'regexp.delim', switchTo: '@qregexp.<.>' }],
[/(qr|m|s)#/, { token: 'regexp.delim', switchTo: '@qregexp.#.#' }],
[/(qr|m|s)\s*([^A-Za-z0-9_#\s])/, { token: 'regexp.delim', switchTo: '@qregexp.$2.$2' }],
[/(qr|m|s)\s+(\w)/, { token: 'regexp.delim', switchTo: '@qregexp.$2.$2' }],
[/(qq|qx)\s*\(/, { token: 'string.delim', switchTo: '@qqstring.(.)' }],
[/(qq|qx)\s*\[/, { token: 'string.delim', switchTo: '@qqstring.[.]' }],
[/(qq|qx)\s*\{/, { token: 'string.delim', switchTo: '@qqstring.{.}' }],
[/(qq|qx)\s*</, { token: 'string.delim', switchTo: '@qqstring.<.>' }],
[/(qq|qx)#/, { token: 'string.delim', switchTo: '@qqstring.#.#' }],
[/(qq|qx)\s*([^A-Za-z0-9#\s])/, { token: 'string.delim', switchTo: '@qqstring.$2.$2' }],
[/(qq|qx)\s+(\w)/, { token: 'string.delim', switchTo: '@qqstring.$2.$2' }]
],
// Non-expanded quoted string
// qstring<open>.<close>
// open = open delimiter
// close = close delimiter
qstring: [
[/\\./, 'string.escape'],
[
/./,
{
cases: {
'$#==$S3': { token: 'string.delim', next: '@pop' },
'$#==$S2': { token: 'string.delim', next: '@push' }, // nested delimiters
'@default': 'string'
}
}
]
],
// Quoted regexp
// qregexp.<open>.<close>
// open = open delimiter
// close = close delimiter
qregexp: [
{ include: '@variables' },
[/\\./, 'regexp.escape'],
[
/./,
{
cases: {
'$#==$S3': {
token: 'regexp.delim',
next: '@regexpModifiers'
},
'$#==$S2': { token: 'regexp.delim', next: '@push' }, // nested delimiters
'@default': 'regexp'
}
}
]
],
regexpModifiers: [[/[msixpodualngcer]+/, { token: 'regexp.modifier', next: '@popall' }]],
// Expanded quoted string
// qqstring.<open>.<close>
// open = open delimiter
// close = close delimiter
qqstring: [{ include: '@variables' }, { include: '@qstring' }],
heredoc: [
[/<<\s*['"`]?([\w\-]+)['"`]?/, { token: 'string.heredoc.delimiter', next: '@heredocBody.$1' }]
],
heredocBody: [
[
/^([\w\-]+)$/,
{
cases: {
'$1==$S2': [
{
token: 'string.heredoc.delimiter',
next: '@popall'
}
],
'@default': 'string.heredoc'
}
}
],
[/./, 'string.heredoc']
],
perldoc: [[/^=\w/, 'comment.doc', '@perldocBody']],
perldocBody: [
[/^=cut\b/, 'type.identifier', '@popall'],
[/./, 'comment.doc']
],
variables: [
[/\$\w+/, 'variable'], // scalar
[/@\w+/, 'variable'], // array
[/%\w+/, 'variable'] // key/value
]
}
};
``` | /content/code_sandbox/src/basic-languages/perl/perl.ts | xml | 2016-06-07T16:56:31 | 2024-08-16T17:17:05 | monaco-editor | microsoft/monaco-editor | 39,508 | 4,783 |
```xml
import * as React from 'react';
import createSvgIcon from '../utils/createSvgIcon';
const BidiLtrIcon = createSvgIcon({
svg: ({ classes }) => (
<svg xmlns="path_to_url" viewBox="0 0 2048 2048" className={classes.svg} focusable="false">
<path d="M128 486l666 666-666 666V486zm128 1024l358-358-358-358v716zM1792 256v1536h128v128h-640v-128h128v-768h-192q-93 0-174-35t-143-96-96-142-35-175q0-93 35-174t96-143 142-96 175-35h704v128h-128zm-384 640V256h-192q-66 0-124 25t-102 69-69 102-25 124q0 66 25 124t68 102 102 69 125 25h192zm256 896V256h-128v1536h128z" />
</svg>
),
displayName: 'BidiLtrIcon',
});
export default BidiLtrIcon;
``` | /content/code_sandbox/packages/react-icons-mdl2/src/components/BidiLtrIcon.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 275 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
path_to_url
Unless required by applicable law or agreed to in writing,
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
specific language governing permissions and limitations
-->
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="MAX_SPILLED_RESULT_SPOOLING_MEM" rev="2.10.0 IMPALA-3200">
<title>MAX_SPILLED_RESULT_SPOOLING_MEM Query Option</title>
<titlealts audience="PDF">
<navtitle>MAX SPILLED RESULT SPOOLING MEM</navtitle>
</titlealts>
<prolog>
<metadata>
<data name="Category" value="Impala"/>
<data name="Category" value="Impala Query Options"/>
<data name="Category" value="Querying"/>
<data name="Category" value="Developers"/>
<data name="Category" value="Data Analysts"/>
</metadata>
</prolog>
<conbody>
<p>Use the <codeph>MAX_SPILLED_RESULT_SPOOLING_MEM</codeph> query option to
set the maximum amount of memory that can be spilled when spooling query
results. </p>
<p>If the amount of memory exceeds this value when spooling query results,
the coordinator fragment will block until the client has consumed enough
rows to free up more memory.</p>
<p>The <codeph>MAX_SPILLED_RESULT_SPOOLING_MEM</codeph> query option is
applicable only when query result spooling is enabled with the
<codeph>SPOOL_QUERY_RESULTS</codeph> query option set to
<codeph>TRUE</codeph>. </p>
<p>The value must be greater than or equal to the value of
<codeph>MAX_RESULT_SPOOLING_MEM</codeph>.</p>
<p>Setting the option to <codeph>0</codeph> or <codeph>-1</codeph> means the
memory is unbounded. </p>
<p>Values below <codeph>-1</codeph> are not allowed for this query
option.</p>
<p><b>Type:</b>
<codeph>INT</codeph></p>
<p><b>Default:</b><codeph> 1024 * 1024 * 1024 (1 GB)</codeph></p>
<p><b>Added in:</b>
<keyword keyref="impala34"/></p>
<p><b>Related information:</b>
<xref href="impala_fetch_rows_timeout_ms.xml#FETCH_ROWS_TIMEOUT_MS"/>,
<xref
href="impala_max_spilled_result_spooling_mem.xml#MAX_SPILLED_RESULT_SPOOLING_MEM"
/>, <xref href="impala_spool_query_results.xml#SPOOL_QUERY_RESULTS"/></p>
</conbody>
</concept>
``` | /content/code_sandbox/docs/topics/impala_max_spilled_result_spooling_mem.xml | xml | 2016-04-13T07:00:08 | 2024-08-16T10:10:44 | impala | apache/impala | 1,115 | 690 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>Author</key>
<string>Vandroiy</string>
<key>CodecID</key>
<integer>20753</integer>
<key>CodecName</key>
<string>CX20753_4</string>
<key>Files</key>
<dict>
<key>Layouts</key>
<array>
<dict>
<key>Comment</key>
<string>Mirone - Conexant 20753_4</string>
<key>Id</key>
<integer>3</integer>
<key>Path</key>
<string>layout3.xml.zlib</string>
</dict>
</array>
<key>Platforms</key>
<array>
<dict>
<key>Comment</key>
<string>Mirone - Conexant 20753_4</string>
<key>Id</key>
<integer>3</integer>
<key>Path</key>
<string>PlatformsM.xml.zlib</string>
</dict>
</array>
</dict>
<key>Patches</key>
<array>
<dict>
<key>Count</key>
<integer>1</integer>
<key>Find</key>
<data>QcYGAEmLvCQ=</data>
<key>MaxKernel</key>
<integer>13</integer>
<key>MinKernel</key>
<integer>13</integer>
<key>Name</key>
<string>AppleHDA</string>
<key>Replace</key>
<data>QcYGAUmLvCQ=</data>
</dict>
<dict>
<key>Count</key>
<integer>1</integer>
<key>Find</key>
<data>QcYGAEiLu2g=</data>
<key>MinKernel</key>
<integer>14</integer>
<key>Name</key>
<string>AppleHDA</string>
<key>Replace</key>
<data>QcYGAUiLu2g=</data>
</dict>
<dict>
<key>Count</key>
<integer>1</integer>
<key>Find</key>
<data>QcaGQwEAAAA=</data>
<key>MinKernel</key>
<integer>13</integer>
<key>Name</key>
<string>AppleHDA</string>
<key>Replace</key>
<data>QcaGQwEAAAE=</data>
</dict>
<dict>
<key>Count</key>
<integer>2</integer>
<key>Find</key>
<data>ixnUEQ==</data>
<key>MinKernel</key>
<integer>16</integer>
<key>Name</key>
<string>AppleHDA</string>
<key>Replace</key>
<data>EVHxFA==</data>
</dict>
<dict>
<key>Count</key>
<integer>2</integer>
<key>Find</key>
<data>ihnUEQ==</data>
<key>MinKernel</key>
<integer>16</integer>
<key>Name</key>
<string>AppleHDA</string>
<key>Replace</key>
<data>AAAAAA==</data>
</dict>
</array>
<key>Vendor</key>
<string>Conexant</string>
</dict>
</plist>
``` | /content/code_sandbox/Clover-Configs/XiaoMi/13.3-without-fingerprint/CLOVER/kexts/Other/AppleALC.kext/Contents/Resources/CX20753_4/Info.plist | xml | 2016-11-05T04:22:54 | 2024-08-12T19:25:53 | Hackintosh-Installer-University | huangyz0918/Hackintosh-Installer-University | 3,937 | 921 |
```xml
<schemalist>
<schema id='org.gtk.test.schema'>
<key name='test' type='s'>
<range min='22' max='27'/>
</key>
</schema>
</schemalist>
``` | /content/code_sandbox/utilities/glib/gio/tests/schema-tests/range-badtype.gschema.xml | xml | 2016-10-27T09:31:28 | 2024-08-16T19:00:35 | nexmon | seemoo-lab/nexmon | 2,381 | 51 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<groupId>org.locationtech.jts</groupId>
<artifactId>jts</artifactId>
<version>1.20.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JTS Topology Suite</name>
<url>path_to_url
<description>The JTS Topology Suite is an API for 2D linear geometry predicates and functions.</description>
<!--
Build JTS Topology Suite and install in local repository:
mvn install
Build everything and skip tests:
mvn clean install -DskipTests
Setup for eclipse development:
mvn eclipse:eclipse
To build with jts-ora:
mvn install -Poracle
To build with jts-sde:
mvn install -Parcsde
To build the release (for Maven Central; committers only)
mvn install -Drelease
-->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<junit-version>4.13.1</junit-version>
<jdom-version>2.0.6</jdom-version>
<jump.version>1.2</jump.version>
<json-simple-version>1.1.1</json-simple-version>
<sde-version>9.1</sde-version>
<!-- build environment target versions -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<pmd.version>6.36.0</pmd.version>
<checkstyle.version>8.44</checkstyle.version>
<!--cast, deprecation, divzero, empty, fallthrough, finally, overrides, path, serial, and unchecked -->
<lint>unchecked</lint>
<!-- none, accessibility, html, missing, reference, syntax, all -->
<doclint>none</doclint>
</properties>
<!-- PROJECT INFORMATION -->
<licenses>
<license>
<url>path_to_url
</license>
<license>
<url>path_to_url
</license>
</licenses>
<developers>
<developer>
<name>Martin Davis</name>
<email>mbdavis@VividSolutions.com</email>
<organization>Vivid Solutions Inc.</organization>
<organizationUrl>path_to_url
</developer>
<developer>
<name>Martin Davis</name>
<email>mtnclimb@gmail.com</email>
<organization>Individual</organization>
<organizationUrl>path_to_url
</developer>
</developers>
<scm>
<connection>scm:git::git@github.com:locationtech/jts.git</connection>
<developerConnection>scm:git:git@github.com:locationtech/jts.git</developerConnection>
<url>path_to_url
<tag>HEAD</tag>
</scm>
<distributionManagement>
<snapshotRepository>
<id>repo.eclipse.org</id>
<name>JTS Repository - Snapshots</name>
<url>path_to_url
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>path_to_url
</repository>
<site>
<id>jts</id>
<url>path_to_url
</site>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>${jdom-version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>${json-simple-version}</version>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.7</version>
</dependency>
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.10.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.7</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<!-- Repositories for Dependencies -->
<repositories>
<repository>
<id>central.maven.org</id>
<name>Central Maven repository</name>
<url>path_to_url
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<profiles>
<profile>
<id>release</id>
<activation>
<property>
<name>release</name>
</property>
</activation>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>path_to_url
</snapshotRepository>
</distributionManagement>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>path_to_url
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<!-- =========================================================== -->
<!-- Build Configuration -->
<!-- =========================================================== -->
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version> <!-- 3.3.0 -->
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.0.0-M1</version>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.1.1</version>
</plugin>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.14.0</version>
</plugin>
<plugin>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.1.2</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version> <!-- 3.0.0-M4 -->
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version> <!-- 3.2.0 -->
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version> <!-- 3.0.0-M5 -->
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<showWarnings>true</showWarnings>
<compilerArgs>
<arg>-Xlint:${lint}</arg>
<!--arg>-Werror</arg-->
</compilerArgs>
</configuration>
</plugin>
<!-- test configuration -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<includes>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/*PerfTest.java</exclude>
<exclude>**/*StressTest.java</exclude>
<exclude>**/jts/perf/**/*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<quiet>true</quiet>
<show>public</show>
<header>${project.name} ${project.version}</header>
<footer>${project.name} ${project.version}</footer>
<overview>${basedir}/modules/core/src/main/javadoc/overview.html</overview>
<excludePackageNames>org.locationtech.jtsexample.*,org.locationtech.jtstest,org.locationtech.jtstest.*</excludePackageNames>
<groups>
<group>
<title>Core - Geometry</title>
<packages>org.locationtech.jts.geom:org.locationtech.jts.geom.*</packages>
</group>
<group>
<title>Core - I/O</title>
<packages>org.locationtech.jts.io</packages>
</group>
<group>
<title>Core - Algorithms</title>
<packages>org.locationtech.jts.algorithm:org.locationtech.jts.algorithm.*:org.locationtech.jts.densify:org.locationtech.jts.dissolve:org.locationtech.jts.linearref:org.locationtech.jts.operation.*:org.locationtech.jts.simplify:org.locationtech.jts.triangulate</packages>
</group>
<group>
<title>Core - Other</title>
<packages>org.locationtech.jts:org.locationtech.jts.*</packages>
</group>
<group>
<title>I/O - Common</title>
<packages>org.locationtech.jts.io.*</packages>
</group>
</groups>
<doclint>${doclint}</doclint>
<failOnError>false</failOnError>
<failOnWarnings>false</failOnWarnings>
</configuration>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<configuration>
<autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.1</version>
</plugin>
<plugin>
<artifactId>maven-pmd-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<dependencies>
<!-- shared pmd ruleset -->
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>build-tools</artifactId>
<version>${project.version}</version>
</dependency>
<!-- user newer version of pmd -->
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>${pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>${pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-javascript</artifactId>
<version>${pmd.version}</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-jsp</artifactId>
<version>${pmd.version}</version>
</dependency>
</dependencies>
<configuration>
<rulesets>
<ruleset>jts/pmd-ruleset.xml</ruleset>
</rulesets>
<failurePriority>2</failurePriority>
<verbose>false</verbose>
<printFailingErrors>true</printFailingErrors>
</configuration>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<dependencies>
<!-- shared checkstlye config -->
<dependency>
<groupId>org.locationtech.jts</groupId>
<artifactId>build-tools</artifactId>
<version>${project.version}</version>
</dependency>
<!-- user newer checkstyle -->
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>${checkstyle.version}</version>
</dependency>
</dependencies>
<configuration>
<logViolationsToConsole>true</logViolationsToConsole>
<configLocation>jts/checkstyle.xml</configLocation>
<headerLocation>jts/header.txt</headerLocation>
<suppressionsLocation>jts/suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
</configuration>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>index</report>
<report>licenses</report>
<report>dependency-info</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<configuration>
<configLocation>jts/checkstyle.xml</configLocation>
<headerLocation>jts/header.txt</headerLocation>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<reportSets>
<reportSet>
<reports>
<report>jxr</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<configuration>
<rulesets>
<ruleset>jts/pmd-ruleset.xml</ruleset>
</rulesets>
</configuration>
</plugin>
</plugins>
</reporting>
<!-- Modules to build in appropriate dependency order -->
<modules>
<module>build-tools</module>
<module>modules</module>
</modules>
</project>
``` | /content/code_sandbox/pom.xml | xml | 2016-01-25T18:08:41 | 2024-08-15T17:34:53 | jts | locationtech/jts | 1,923 | 3,800 |
```xml
export * from './slice';
export * from './listener';
export { default as restoreSecurityCheckupSession } from './restoreSecurityCheckupSession';
``` | /content/code_sandbox/packages/account/securityCheckup/index.ts | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 31 |
```xml
import { ProtonPassJsonFile } from "../../../src/importers/protonpass/types/protonpass-json-type";
export const testData: ProtonPassJsonFile = {
version: "1.21.2",
userId: "REDACTED_USER_ID",
encrypted: false,
vaults: {
REDACTED_VAULT_ID_A: {
name: "Personal",
description: "Personal vault",
display: {
color: 0,
icon: 0,
},
items: [
{
itemId:
your_sha256_hashHoMdOebTw5JkYPGgIL1mwQ==",
shareId:
your_sha256_hashju9ni42l08IKzwQG0B2ySg==",
data: {
metadata: {
name: "Test Login - Personal Vault",
note: "My login secure note.",
itemUuid: "e8ee1a0c",
},
extraFields: [
{
fieldName: "non-hidden field",
type: "text",
data: {
content: "non-hidden field content",
},
},
{
fieldName: "hidden field",
type: "hidden",
data: {
content: "hidden field content",
},
},
{
fieldName: "second 2fa secret",
type: "totp",
data: {
totpUri: "TOTPCODE",
},
},
],
type: "login",
content: {
itemEmail: "Email",
password: "Password",
urls: ["path_to_url", "path_to_url"],
totpUri:
"otpauth://totp/Test%20Login%20-%20Personal%20Vault:Username?issuer=Test%20Login%20-%20Personal%20Vault&secret=TOTPCODE&algorithm=SHA1&digits=6&period=30",
passkeys: [],
itemUsername: "Username",
},
},
state: 1,
aliasEmail: null,
contentFormatVersion: 1,
createTime: 1689182868,
modifyTime: 1689182868,
pinned: true,
},
{
itemId:
your_sha256_hash09gciDiPhXcCVWOyfJ66ZA==",
shareId:
your_sha256_hashju9ni42l08IKzwQG0B2ySg==",
data: {
metadata: {
name: "My Secure Note",
note: "Secure note contents.",
itemUuid: "ad618070",
},
extraFields: [],
type: "note",
content: {},
},
state: 1,
aliasEmail: null,
contentFormatVersion: 1,
createTime: 1689182908,
modifyTime: 1689182908,
pinned: false,
},
{
itemId:
your_sha256_hashXxLZ2EPjgD6Noc9a0U6AVQ==",
shareId:
your_sha256_hashju9ni42l08IKzwQG0B2ySg==",
data: {
metadata: {
name: "Test Card",
note: "Credit Card Note",
itemUuid: "d8f45370",
},
extraFields: [],
type: "creditCard",
content: {
cardholderName: "Test name",
cardType: 0,
number: "1234222233334444",
verificationNumber: "333",
expirationDate: "2025-01",
pin: "1234",
},
},
state: 1,
aliasEmail: null,
contentFormatVersion: 1,
createTime: 1691001643,
modifyTime: 1691001643,
pinned: true,
},
{
itemId:
your_sha256_hash09gciDiPhXcCVWOyfJ66ZA==",
shareId:
your_sha256_hashju9ni42l08IKzwQG0B2ySg==",
data: {
metadata: {
name: "My Deleted Note",
note: "Secure note contents.",
itemUuid: "ad618070",
},
extraFields: [],
type: "note",
content: {},
},
state: 2,
aliasEmail: null,
contentFormatVersion: 1,
createTime: 1689182908,
modifyTime: 1689182908,
pinned: false,
},
],
},
REDACTED_VAULT_ID_B: {
name: "Test",
description: "",
display: {
color: 4,
icon: 2,
},
items: [
{
itemId:
your_sha256_hashhiFX1_y4qZbUetl6jO3aJw==",
shareId:
your_sha256_hashVgTNHT5aPj62zcekNemfNw==",
data: {
metadata: {
name: "Other vault login",
note: "",
itemUuid: "f3429d44",
},
extraFields: [],
type: "login",
content: {
itemEmail: "other vault username",
password: "other vault password",
urls: [],
totpUri: "JBSWY3DPEHPK3PXP",
passkeys: [],
itemUsername: "",
},
},
state: 1,
aliasEmail: null,
contentFormatVersion: 1,
createTime: 1689182949,
modifyTime: 1689182949,
pinned: false,
},
],
},
},
};
``` | /content/code_sandbox/libs/importer/spec/test-data/protonpass-json/protonpass.json.ts | xml | 2016-03-09T23:14:01 | 2024-08-16T15:07:51 | clients | bitwarden/clients | 8,877 | 1,245 |
```xml
import {
Alert,
Box,
InputAdornment,
Pagination,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
TextField,
Typography,
} from "@mui/material";
import React, { ReactElement } from "react";
import { CollapsibleSection } from "../../common/CollapsibleSection";
import { sliceToPage } from "../../common/util";
import Loading from "../../components/Loading";
import { HelpInfo } from "../../components/Tooltip";
import { useServeDeployments } from "./hook/useServeApplications";
import { ServeApplicationRows } from "./ServeApplicationRow";
import { ServeEntityLogViewer } from "./ServeEntityLogViewer";
import {
APPS_METRICS_CONFIG,
ServeMetricsSection,
} from "./ServeMetricsSection";
import { ServeSystemPreview } from "./ServeSystemDetails";
const columns: { label: string; helpInfo?: ReactElement; width?: string }[] = [
{ label: "" }, // Empty space for expand button
{ label: "Name" },
{ label: "Status" },
{ label: "Status message", width: "30%" },
{ label: "Replicas" },
{ label: "Actions" },
{ label: "Route prefix" },
{ label: "Last deployed at" },
{ label: "Duration (since last deploy)" },
];
export const ServeDeploymentsListPage = () => {
const {
serveDetails,
error,
page,
setPage,
proxies,
serveApplications,
serveDeployments,
} = useServeDeployments();
if (error) {
return <Typography color="error">{error.toString()}</Typography>;
}
if (serveDetails === undefined) {
return <Loading loading={true} />;
}
const {
items: list,
constrainedPage,
maxPage,
} = sliceToPage(serveApplications, page.pageNo, page.pageSize);
return (
<Box sx={{ padding: 3 }}>
{serveDetails.http_options === undefined ? (
<Alert sx={{ marginBottom: 2 }} severity="warning">
Serve not started. Please deploy a serve application first.
</Alert>
) : (
<React.Fragment>
<ServeSystemPreview
allDeployments={serveDeployments}
allApplications={serveApplications}
proxies={proxies}
serveDetails={serveDetails}
/>
<CollapsibleSection
title="Applications / Deployments"
startExpanded
sx={{ marginTop: 4 }}
>
<TableContainer>
<TextField
style={{ margin: 8, width: 120 }}
label="Page Size"
size="small"
defaultValue={10}
InputProps={{
onChange: ({ target: { value } }) => {
setPage("pageSize", Math.min(Number(value), 500) || 10);
},
endAdornment: (
<InputAdornment position="end">Per Page</InputAdornment>
),
}}
/>
<Pagination
count={maxPage}
page={constrainedPage}
onChange={(e, pageNo) => setPage("pageNo", pageNo)}
/>
<Table>
<TableHead>
<TableRow>
{columns.map(({ label, helpInfo, width }) => (
<TableCell
align="center"
key={label}
style={width ? { width } : undefined}
>
<Box
display="flex"
justifyContent="center"
alignItems="center"
>
{label}
{helpInfo && (
<HelpInfo sx={{ marginLeft: 1 }}>
{helpInfo}
</HelpInfo>
)}
</Box>
</TableCell>
))}
</TableRow>
</TableHead>
<TableBody>
{list.map((application) => (
<ServeApplicationRows
key={`${application.name}`}
application={application}
startExpanded
/>
))}
</TableBody>
</Table>
</TableContainer>
</CollapsibleSection>
<CollapsibleSection title="Logs" startExpanded sx={{ marginTop: 4 }}>
<ServeEntityLogViewer
controller={serveDetails.controller_info}
proxies={proxies}
deployments={serveDeployments}
showDeploymentName
/>
</CollapsibleSection>
</React.Fragment>
)}
<ServeMetricsSection
sx={{ marginTop: 4 }}
metricsConfig={APPS_METRICS_CONFIG}
/>
</Box>
);
};
``` | /content/code_sandbox/python/ray/dashboard/client/src/pages/serve/ServeDeploymentsListPage.tsx | xml | 2016-10-25T19:38:30 | 2024-08-16T19:46:34 | ray | ray-project/ray | 32,670 | 959 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!--
~
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<resources>
<string name="character_counter_content_description">%1$d/%2$dmerkki kirjoitettu</string>
<string name="character_counter_overflowed_content_description">Merkkiraja ylitetty: %1$d/%2$d</string>
<string name="password_toggle_content_description">Nyt salasana</string>
<string name="clear_text_end_icon_content_description">Tyhjenn teksti</string>
<string name="exposed_dropdown_menu_content_description">Nyt avattava valikko</string>
<string name="error_icon_content_description">Virhe</string>
</resources>
``` | /content/code_sandbox/lib/java/com/google/android/material/textfield/res/values-fi/strings.xml | xml | 2016-12-05T16:11:29 | 2024-08-16T17:51:42 | material-components-android | material-components/material-components-android | 16,176 | 201 |
```xml
import { IDefaultExtension } from './defaultExtension';
export interface IExtension extends IDefaultExtension {
/**
* set of extensions associated to the icon.
*/
extensions?: string[];
/**
* set it to true if the extension support light icons.
*/
light?: boolean;
/**
* user customization: disables the specified extension.
*/
overrides?: string;
/**
* user customization: extends the specified extension.
*/
extends?: string;
}
``` | /content/code_sandbox/src/models/extensions/extension.ts | xml | 2016-05-30T23:24:37 | 2024-08-12T22:55:53 | vscode-icons | vscode-icons/vscode-icons | 4,391 | 101 |
```xml
import { IComment } from 'shared/models/Comment';
export const convertServerComment = <Comment extends IComment>(
serverComment: any
): Comment => {
return {
id: serverComment.id,
dateTime: new Date(Number(serverComment.date_time)),
message: serverComment.message,
} as Comment;
};
``` | /content/code_sandbox/webapp/client/src/services/serverModel/Comments/converters.ts | xml | 2016-10-19T01:07:26 | 2024-08-14T03:53:55 | modeldb | VertaAI/modeldb | 1,689 | 69 |
```xml
import { getDecorators, getDecoratorValues, getProduces, getSecurites } from './../utils/decoratorUtils';
import { GenerateMetadataError } from './exceptions';
import { MetadataGenerator } from './metadataGenerator';
import { MethodGenerator } from './methodGenerator';
import { TypeResolver } from './typeResolver';
import { Tsoa } from '@tsoa/runtime';
import { getHeaderType } from '../utils/headerTypeHelpers';
import { isMethodDeclaration, type ClassDeclaration, type CallExpression, type StringLiteral } from 'typescript';
export class ControllerGenerator {
private readonly path?: string;
private readonly tags?: string[];
private readonly security?: Tsoa.Security[];
private readonly isHidden?: boolean;
private readonly commonResponses: Tsoa.Response[];
private readonly produces?: string[];
constructor(private readonly node: ClassDeclaration, private readonly current: MetadataGenerator, private readonly parentSecurity: Tsoa.Security[] = []) {
this.path = this.getPath();
this.tags = this.getTags();
this.security = this.getSecurity();
this.isHidden = this.getIsHidden();
this.commonResponses = this.getCommonResponses();
this.produces = this.getProduces();
}
public IsValid() {
return !!this.path || this.path === '';
}
public Generate(): Tsoa.Controller {
if (!this.node.parent) {
throw new GenerateMetadataError("Controller node doesn't have a valid parent source file.");
}
if (!this.node.name) {
throw new GenerateMetadataError("Controller node doesn't have a valid name.");
}
const sourceFile = this.node.parent.getSourceFile();
return {
location: sourceFile.fileName,
methods: this.buildMethods(),
name: this.node.name.text,
path: this.path || '',
produces: this.produces,
};
}
private buildMethods() {
return this.node.members
.filter(isMethodDeclaration)
.map(m => new MethodGenerator(m, this.current, this.commonResponses, this.path, this.tags, this.security, this.isHidden))
.filter(generator => generator.IsValid())
.map(generator => generator.Generate());
}
private getPath() {
const decorators = getDecorators(this.node, identifier => identifier.text === 'Route');
if (!decorators || !decorators.length) {
return;
}
if (decorators.length > 1) {
throw new GenerateMetadataError(`Only one Route decorator allowed in '${this.node.name!.text}' class.`);
}
const decorator = decorators[0];
const expression = decorator.parent as CallExpression;
const decoratorArgument = expression.arguments[0] as StringLiteral;
return decoratorArgument ? `${decoratorArgument.text}` : '';
}
private getCommonResponses(): Tsoa.Response[] {
const decorators = getDecorators(this.node, identifier => identifier.text === 'Response');
if (!decorators || !decorators.length) {
return [];
}
return decorators.map(decorator => {
const expression = decorator.parent as CallExpression;
const [name, description, example] = getDecoratorValues(decorator, this.current.typeChecker);
if (!name) {
throw new GenerateMetadataError(`Controller's responses should have an explicit name.`);
}
return {
description: description || '',
examples: example === undefined ? undefined : [example],
name,
schema: expression.typeArguments && expression.typeArguments.length > 0 && !this.isHidden ? new TypeResolver(expression.typeArguments[0], this.current).resolve() : undefined,
headers: getHeaderType(expression.typeArguments, 1, this.current),
} as Tsoa.Response;
});
}
private getTags() {
const decorators = getDecorators(this.node, identifier => identifier.text === 'Tags');
if (!decorators || !decorators.length) {
return;
}
if (decorators.length > 1) {
throw new GenerateMetadataError(`Only one Tags decorator allowed in '${this.node.name!.text}' class.`);
}
const decorator = decorators[0];
const expression = decorator.parent as CallExpression;
return expression.arguments.map((a: any) => a.text as string);
}
private getSecurity(): Tsoa.Security[] {
const noSecurityDecorators = getDecorators(this.node, identifier => identifier.text === 'NoSecurity');
const securityDecorators = getDecorators(this.node, identifier => identifier.text === 'Security');
if (noSecurityDecorators?.length && securityDecorators?.length) {
throw new GenerateMetadataError(`NoSecurity decorator cannot be used in conjunction with Security decorator in '${this.node.name!.text}' class.`);
}
if (noSecurityDecorators?.length) {
return [];
}
if (!securityDecorators || !securityDecorators.length) {
return this.parentSecurity;
}
return securityDecorators.map(d => getSecurites(d, this.current.typeChecker));
}
private getIsHidden(): boolean {
const hiddenDecorators = getDecorators(this.node, identifier => identifier.text === 'Hidden');
if (!hiddenDecorators || !hiddenDecorators.length) {
return false;
}
if (hiddenDecorators.length > 1) {
throw new GenerateMetadataError(`Only one Hidden decorator allowed in '${this.node.name!.text}' class.`);
}
return true;
}
private getProduces(): string[] | undefined {
const produces = getProduces(this.node, this.current.typeChecker);
return produces.length ? produces : undefined;
}
}
``` | /content/code_sandbox/packages/cli/src/metadataGeneration/controllerGenerator.ts | xml | 2016-06-17T10:42:50 | 2024-08-16T05:57:17 | tsoa | lukeautry/tsoa | 3,408 | 1,165 |
```xml
import React, { FunctionComponent } from "react";
import { Typography } from "coral-ui/components/v2";
import styles from "./Title.css";
interface Props {
children?: React.ReactNode;
}
const Title: FunctionComponent<Props> = (props) => (
<Typography variant="heading2" align="center" className={styles.root}>
{props.children}
</Typography>
);
export default Title;
``` | /content/code_sandbox/client/src/core/client/auth/components/Header/Title.tsx | xml | 2016-10-31T16:14:05 | 2024-08-06T16:15:57 | talk | coralproject/talk | 1,881 | 86 |
```xml
import { Formik, Form, Field } from 'formik';
import { Upload } from 'lucide-react';
import clsx from 'clsx';
import {
isLimitedToBE,
isBE,
} from '@/react/portainer/feature-flags/feature-flags.service';
import { success as notifySuccess } from '@/portainer/services/notifications';
import { FeatureId } from '@/react/portainer/feature-flags/enums';
import { FormControl } from '@@/form-components/FormControl';
import { LoadingButton } from '@@/buttons/LoadingButton';
import { Input } from '@@/form-components/Input';
import { SwitchField } from '@@/form-components/SwitchField';
import { BEOverlay } from '@@/BEFeatureIndicator/BEOverlay';
import {
useBackupS3Settings,
useExportS3BackupMutation,
useUpdateBackupS3SettingsMutation,
} from './queries';
import { BackupS3Model, BackupS3Settings } from './types';
import { validationSchema } from './BackupS3Form.validation';
import { SecurityFieldset } from './SecurityFieldset';
export function BackupS3Form() {
const limitedToBE = isLimitedToBE(FeatureId.S3_BACKUP_SETTING);
const exportS3Mutate = useExportS3BackupMutation();
const updateS3Mutate = useUpdateBackupS3SettingsMutation();
const settingsQuery = useBackupS3Settings({ enabled: isBE });
if (settingsQuery.isInitialLoading) {
return null;
}
const settings = settingsQuery.data;
const backupS3Settings = {
password: settings?.password || '',
cronRule: settings?.cronRule || '',
accessKeyID: settings?.accessKeyID || '',
secretAccessKey: settings?.secretAccessKey || '',
region: settings?.region || '',
bucketName: settings?.bucketName || '',
s3CompatibleHost: settings?.s3CompatibleHost || '',
scheduleAutomaticBackup: !!settings?.cronRule,
passwordProtect: !!settings?.password,
};
return (
<Formik<BackupS3Settings>
initialValues={backupS3Settings}
validationSchema={validationSchema}
onSubmit={onSubmit}
validateOnMount
>
{({ values, errors, isSubmitting, setFieldValue, isValid }) => (
<BEOverlay
featureId={FeatureId.S3_BACKUP_SETTING}
variant="form-section"
>
<Form className="form-horizontal">
<div className="form-group">
<div className="col-sm-12">
<SwitchField
name="schedule-automatic-backup"
data-cy="settings-scheduleAutomaticBackupSwitch"
labelClass="col-sm-3 col-lg-2"
label="Schedule automatic backups"
checked={values.scheduleAutomaticBackup}
onChange={(e) => setFieldValue('scheduleAutomaticBackup', e)}
/>
</div>
</div>
{values.scheduleAutomaticBackup && (
<FormControl
inputId="cron_rule"
label="Cron rule"
size="small"
errors={errors.cronRule}
required
>
<Field
id="cron_rule"
name="cronRule"
type="text"
as={Input}
placeholder="0 2 * * *"
data-cy="settings-backupCronRuleInput"
className={clsx({ 'limited-be': limitedToBE })}
disabled={limitedToBE}
/>
</FormControl>
)}
<FormControl
label="Access key ID"
inputId="access_key_id"
errors={errors.accessKeyID}
>
<Field
id="access_key_id"
name="accessKeyID"
type="text"
as={Input}
data-cy="settings-accessKeyIdInput"
className={clsx({ 'limited-be': limitedToBE })}
disabled={limitedToBE}
/>
</FormControl>
<FormControl
label="Secret access key"
inputId="secret_access_key"
errors={errors.secretAccessKey}
>
<Field
id="secret_access_key"
name="secretAccessKey"
type="password"
as={Input}
data-cy="settings-secretAccessKeyInput"
className={clsx({ 'limited-be': limitedToBE })}
disabled={limitedToBE}
/>
</FormControl>
<FormControl label="Region" inputId="region" errors={errors.region}>
<Field
id="region"
name="region"
type="text"
as={Input}
placeholder="default region is us-east-1 if left empty"
data-cy="settings-backupRegionInput"
className={clsx({ 'limited-be': limitedToBE })}
disabled={limitedToBE}
/>
</FormControl>
<FormControl
label="Bucket name"
inputId="bucket_name"
errors={errors.bucketName}
>
<Field
id="bucket_name"
name="bucketName"
type="text"
as={Input}
data-cy="settings-backupBucketNameInput"
className={clsx({ 'limited-be': limitedToBE })}
disabled={limitedToBE}
/>
</FormControl>
<FormControl
label="S3 compatible host"
inputId="s3_compatible_host"
tooltip="Hostname of a S3 service"
errors={errors.s3CompatibleHost}
>
<Field
id="s3_compatible_host"
name="s3CompatibleHost"
type="text"
as={Input}
placeholder="leave empty for AWS S3"
data-cy="settings-backupS3CompatibleHostInput"
className={clsx({ 'limited-be': limitedToBE })}
disabled={limitedToBE}
/>
</FormControl>
<SecurityFieldset
switchDataCy="settings-passwordProtectToggleS3"
inputDataCy="settings-backups3pw"
disabled={limitedToBE}
/>
<div className="form-group">
<div className="col-sm-12">
<LoadingButton
type="button"
loadingText="Exporting..."
isLoading={isSubmitting}
className={clsx('!ml-0', { 'limited-be': limitedToBE })}
disabled={!isValid || limitedToBE}
data-cy="settings-exportBackupS3Button"
icon={Upload}
onClick={() => {
handleExport(values);
}}
>
Export backup
</LoadingButton>
</div>
</div>
<div className="form-group">
<div className="col-sm-12">
<LoadingButton
loadingText="Saving settings..."
isLoading={isSubmitting}
className={clsx('!ml-0', { 'limited-be': limitedToBE })}
disabled={!isValid || limitedToBE}
data-cy="settings-saveBackupSettingsButton"
>
Save backup settings
</LoadingButton>
</div>
</div>
</Form>
</BEOverlay>
)}
</Formik>
);
function handleExport(values: BackupS3Settings) {
const payload: BackupS3Model = {
password: values.passwordProtect ? values.password : '',
cronRule: values.scheduleAutomaticBackup ? values.cronRule : '',
accessKeyID: values.accessKeyID,
secretAccessKey: values.secretAccessKey,
region: values.region,
bucketName: values.bucketName,
s3CompatibleHost: values.s3CompatibleHost,
};
exportS3Mutate.mutate(payload, {
onSuccess() {
notifySuccess('Success', 'Exported backup to S3 successfully');
},
});
}
async function onSubmit(values: BackupS3Settings) {
const payload: BackupS3Model = {
password: values.passwordProtect ? values.password : '',
cronRule: values.scheduleAutomaticBackup ? values.cronRule : '',
accessKeyID: values.accessKeyID,
secretAccessKey: values.secretAccessKey,
region: values.region,
bucketName: values.bucketName,
s3CompatibleHost: values.s3CompatibleHost,
};
updateS3Mutate.mutate(payload, {
onSuccess() {
notifySuccess('Success', 'S3 backup settings saved successfully');
},
});
}
}
``` | /content/code_sandbox/app/react/portainer/settings/SettingsView/BackupSettingsView/BackupS3Form.tsx | xml | 2016-05-19T20:15:28 | 2024-08-16T19:15:14 | portainer | portainer/portainer | 30,083 | 1,779 |
```xml
import path from 'path'
import { createNext, FileRef } from 'e2e-utils'
import { renderViaHTTP } from 'next-test-utils'
import { NextInstance } from 'e2e-utils'
describe('TypeScript basic', () => {
let next: NextInstance
beforeAll(async () => {
next = await createNext({
files: new FileRef(path.join(__dirname, 'app')),
dependencies: {
'@next/bundle-analyzer': 'canary',
typescript: 'latest',
'@types/node': 'latest',
'@types/react': 'latest',
'@types/react-dom': 'latest',
},
})
})
afterAll(() => next.destroy())
it('should not have eslint setup started', async () => {
expect(next.cliOutput).not.toContain(
'How would you like to configure ESLint'
)
})
it('have built and started correctly', async () => {
const html = await renderViaHTTP(next.url, '/')
expect(html).toContain('hello world')
})
// Turbopack doesn't support Babel built-in.
;(process.env.TURBOPACK ? it.skip : it)(
'should work with babel',
async () => {
await next.stop()
await next.patchFile(
'.babelrc',
JSON.stringify({ presets: ['next/babel'] })
)
await next.start()
const html = await renderViaHTTP(next.url, '/')
// eslint-disable-next-line jest/no-standalone-expect
expect(html).toContain('hello world')
}
)
})
``` | /content/code_sandbox/test/production/typescript-basic/index.test.ts | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 344 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="path_to_url" xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<groupId>com.didispace</groupId>
<artifactId>alibaba-sentinel-annotation</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.5.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>Finchley.SR1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
<version>0.2.2.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
``` | /content/code_sandbox/4-Finchley/alibaba-sentinel-annotation/pom.xml | xml | 2016-08-21T03:39:52 | 2024-08-13T15:13:21 | SpringCloud-Learning | dyc87112/SpringCloud-Learning | 7,344 | 576 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="path_to_url"
android:color="@color/gray_dark">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/background_dialog_dark"/>
</shape>
</item>
</ripple>
``` | /content/code_sandbox/app/src/main/res/drawable/dialog_rect_ripple_dark.xml | xml | 2016-10-18T15:38:44 | 2024-08-16T19:19:31 | libretorrent | proninyaroslav/libretorrent | 1,973 | 71 |
```xml
///
///
///
/// path_to_url
///
/// Unless required by applicable law or agreed to in writing, software
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
///
import { Component, forwardRef, Input, OnInit } from '@angular/core';
import { ControlValueAccessor, UntypedFormBuilder, UntypedFormGroup, NG_VALUE_ACCESSOR, Validators } from '@angular/forms';
import {
DynamicValueSourceType,
dynamicValueSourceTypeTranslationMap,
FilterPredicateValue,
getDynamicSourcesForAllowUser,
inheritModeForDynamicValueSourceType
} from '@shared/models/query/query.models';
import { AlarmConditionType } from '@shared/models/device.models';
@Component({
selector: 'tb-alarm-duration-predicate-value',
templateUrl: './alarm-duration-predicate-value.component.html',
styleUrls: [],
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => AlarmDurationPredicateValueComponent),
multi: true
}
]
})
export class AlarmDurationPredicateValueComponent implements ControlValueAccessor, OnInit {
private readonly inheritModeForSources = inheritModeForDynamicValueSourceType;
@Input()
set alarmConditionType(alarmConditionType: AlarmConditionType) {
switch (alarmConditionType) {
case AlarmConditionType.REPEATING:
this.defaultValuePlaceholder = 'device-profile.condition-repeating-value-required';
this.defaultValueRequiredError = 'device-profile.condition-repeating-value-range';
this.defaultValueRangeError = 'device-profile.condition-repeating-value-range';
this.defaultValuePatternError = 'device-profile.condition-repeating-value-pattern';
break;
case AlarmConditionType.DURATION:
this.defaultValuePlaceholder = 'device-profile.condition-duration-value';
this.defaultValueRequiredError = 'device-profile.condition-duration-value-required';
this.defaultValueRangeError = 'device-profile.condition-duration-value-range';
this.defaultValuePatternError = 'device-profile.condition-duration-value-pattern';
break;
}
}
defaultValuePlaceholder = '';
defaultValueRequiredError = '';
defaultValueRangeError = '';
defaultValuePatternError = '';
dynamicValueSourceTypes: DynamicValueSourceType[] = getDynamicSourcesForAllowUser(false);
dynamicValueSourceTypeTranslations = dynamicValueSourceTypeTranslationMap;
alarmDurationPredicateValueFormGroup: UntypedFormGroup;
dynamicMode = false;
inheritMode = false;
private propagateChange = null;
constructor(private fb: UntypedFormBuilder) {
}
ngOnInit(): void {
this.alarmDurationPredicateValueFormGroup = this.fb.group({
defaultValue: [0, [Validators.required, Validators.min(1), Validators.max(2147483647), Validators.pattern('[0-9]*')]],
dynamicValue: this.fb.group(
{
sourceType: [null],
sourceAttribute: [null],
inherit: [false]
}
)
});
this.alarmDurationPredicateValueFormGroup.get('dynamicValue').get('sourceType').valueChanges.subscribe(
(sourceType) => {
if (!sourceType) {
this.alarmDurationPredicateValueFormGroup.get('dynamicValue').get('sourceAttribute').patchValue(null, {emitEvent: false});
}
this.updateShowInheritMode(sourceType);
}
);
this.alarmDurationPredicateValueFormGroup.valueChanges.subscribe(() => {
this.updateModel();
});
}
registerOnChange(fn: any): void {
this.propagateChange = fn;
}
registerOnTouched(fn: any): void {
}
setDisabledState(isDisabled: boolean): void {
if (isDisabled) {
this.alarmDurationPredicateValueFormGroup.disable({emitEvent: false});
} else {
this.alarmDurationPredicateValueFormGroup.enable({emitEvent: false});
}
}
writeValue(predicateValue: FilterPredicateValue<string | number | boolean>): void {
this.alarmDurationPredicateValueFormGroup.patchValue({
defaultValue: predicateValue ? predicateValue.defaultValue : null,
dynamicValue: {
sourceType: predicateValue?.dynamicValue ? predicateValue.dynamicValue.sourceType : null,
sourceAttribute: predicateValue?.dynamicValue ? predicateValue.dynamicValue.sourceAttribute : null,
inherit: predicateValue?.dynamicValue ? predicateValue.dynamicValue.inherit : null
}
}, {emitEvent: false});
this.updateShowInheritMode(this.alarmDurationPredicateValueFormGroup.get('dynamicValue').get('sourceType').value);
}
private updateModel() {
let predicateValue: FilterPredicateValue<string | number | boolean> = null;
if (this.alarmDurationPredicateValueFormGroup.valid) {
predicateValue = this.alarmDurationPredicateValueFormGroup.getRawValue();
if (predicateValue.dynamicValue) {
if (!predicateValue.dynamicValue.sourceType || !predicateValue.dynamicValue.sourceAttribute) {
predicateValue.dynamicValue = null;
}
}
}
this.propagateChange(predicateValue);
}
private updateShowInheritMode(sourceType: DynamicValueSourceType) {
if (this.inheritModeForSources.includes(sourceType)) {
this.inheritMode = true;
} else {
this.alarmDurationPredicateValueFormGroup.get('dynamicValue.inherit').patchValue(false, {emitEvent: false});
this.inheritMode = false;
}
}
}
``` | /content/code_sandbox/ui-ngx/src/app/modules/home/components/profile/alarm/alarm-duration-predicate-value.component.ts | xml | 2016-12-01T09:33:30 | 2024-08-16T19:58:25 | thingsboard | thingsboard/thingsboard | 16,820 | 1,098 |
```xml
<local:HostedPage x:Class="Telegram.Views.Settings.Privacy.SettingsPrivacyAllowCallsPage"
xmlns="path_to_url"
xmlns:d="path_to_url"
xmlns:x="path_to_url"
xmlns:mc="path_to_url"
xmlns:controls="using:Telegram.Controls"
xmlns:local="using:Telegram.Views"
mc:Ignorable="d">
<Page.Transitions>
<TransitionCollection>
<NavigationThemeTransition>
<SlideNavigationTransitionInfo Effect="FromRight" />
</NavigationThemeTransition>
</TransitionCollection>
</Page.Transitions>
<local:HostedPage.Action>
<Button Content="{CustomResource Save}"
Click="{x:Bind ViewModel.Save}"
Style="{StaticResource AccentButtonStyle}" />
</local:HostedPage.Action>
<Grid Background="{ThemeResource SettingsPageBackground}">
<ScrollViewer x:Name="ScrollingHost"
VerticalScrollBarVisibility="Auto"
VerticalScrollMode="Auto">
<controls:SettingsPanel>
<controls:HeaderedControl Header="{CustomResource WhoCanCallMe}"
Footer="{CustomResource WhoCanCallMeInfo}">
<controls:PrivacyRadioButton Content="{CustomResource LastSeenEverybody}"
Value="{x:Bind ViewModel.SelectedItem, Mode=TwoWay}"
Type="AllowAll"
Style="{StaticResource SettingsRadioButtonStyle}" />
<controls:PrivacyRadioButton Content="{CustomResource LastSeenContacts}"
Value="{x:Bind ViewModel.SelectedItem, Mode=TwoWay}"
Type="AllowContacts"
Style="{StaticResource SettingsRadioButtonStyle}" />
<controls:PrivacyRadioButton Content="{CustomResource LastSeenNobody}"
Value="{x:Bind ViewModel.SelectedItem, Mode=TwoWay}"
Type="DisallowAll"
Style="{StaticResource SettingsRadioButtonStyle}" />
</controls:HeaderedControl>
<controls:HeaderedControl Header="{CustomResource AddExceptions}"
Footer="{CustomResource CustomCallInfo}">
<controls:BadgeButton Content="{CustomResource AlwaysAllow}"
Click="{x:Bind ViewModel.Always}"
Visibility="{x:Bind ConvertAlways(ViewModel.SelectedItem), Mode=OneWay}"
Badge="{x:Bind ViewModel.AllowedBadge, Mode=OneWay}"
Style="{StaticResource GlyphBadgeButtonStyle}"
Glyph="" />
<controls:BadgeButton Content="{CustomResource NeverAllow}"
Click="{x:Bind ViewModel.Never}"
Visibility="{x:Bind ConvertNever(ViewModel.SelectedItem), Mode=OneWay}"
Badge="{x:Bind ViewModel.RestrictedBadge, Mode=OneWay}"
Style="{StaticResource GlyphBadgeButtonStyle}"
Glyph="" />
</controls:HeaderedControl>
<controls:HeaderedControl Header="{CustomResource PrivacyP2PHeader}">
<controls:BadgeButton Content="{CustomResource PrivacyP2P2}"
Badge="{x:Bind ViewModel.AllowP2PCallsRules.Badge, Mode=OneWay}"
Click="{x:Bind ViewModel.OpenP2PCall}"
Style="{StaticResource GlyphBadgeButtonStyle}"
Glyph="" />
</controls:HeaderedControl>
</controls:SettingsPanel>
</ScrollViewer>
</Grid>
</local:HostedPage>
``` | /content/code_sandbox/Telegram/Views/Settings/Privacy/SettingsPrivacyAllowCallsPage.xaml | xml | 2016-05-23T09:03:33 | 2024-08-16T16:17:48 | Unigram | UnigramDev/Unigram | 3,744 | 682 |
```xml
export interface IVSCodeWindow {
showInformationMessage(
message: string,
...items: string[]
): Thenable<string | undefined>;
showWarningMessage(
message: string,
...items: string[]
): Thenable<string | undefined>;
showErrorMessage(
message: string,
...items: string[]
): Thenable<string | undefined>;
}
``` | /content/code_sandbox/src/models/vscode/vscodeWindow.ts | xml | 2016-05-30T23:24:37 | 2024-08-12T22:55:53 | vscode-icons | vscode-icons/vscode-icons | 4,391 | 80 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug|Win32">
<Configuration>debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="checked|Win32">
<Configuration>checked</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="profile|Win32">
<Configuration>profile</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release|Win32">
<Configuration>release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C660CC7E-2A8A-7728-030C-8D96327CC646}</ProjectGuid>
<RootNamespace>SnippetStepper</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='checked|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='profile|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='checked|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='profile|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">
<OutDir>./../../../bin/vc15win32\</OutDir>
<IntDir>./Win32/SnippetStepper/debug\</IntDir>
<TargetExt>.exe</TargetExt>
<TargetName>$(ProjectName)DEBUG</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug|Win32'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<BasicRuntimeChecks>UninitializedLocalUsageCheck</BasicRuntimeChecks>
<AdditionalOptions>/GR- /GF /arch:SSE2 /MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /wd4577 /wd4464 /wd4623 /wd4626 /wd5027 /wd4987 /wd5038 /wd5045 /wd4548 /wd4350 /wd4668 /wd4365 /wd4548 /wd4625 /wd5026 /Zi /d2Zi+</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../../Include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../Graphics/include/win32/GL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_HAS_EXCEPTIONS=0;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PHYSX_PROFILE_SDK;RENDER_SNIPPET;_DEBUG;PX_DEBUG=1;PX_CHECKED=1;PX_NVTX=1;PX_SUPPORT_PVD=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalOptions>/LIBPATH:../../../Lib/vc15win32 PhysX3CommonDEBUG_x86.lib PhysX3DEBUG_x86.lib PhysX3CookingDEBUG_x86.lib PhysX3CharacterKinematicDEBUG_x86.lib PhysX3ExtensionsDEBUG.lib PhysX3VehicleDEBUG.lib PxPvdSDKDEBUG_x86.lib PxTaskDEBUG_x86.lib PxFoundationDEBUG_x86.lib PsFastXmlDEBUG_x86.lib /LIBPATH:../../lib/vc15win32 SnippetUtilsDEBUG.lib /DEBUG</AdditionalOptions>
<AdditionalDependencies>Winmm.lib;OpenGL32.lib;glut32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)DEBUG.exe</OutputFile>
<AdditionalLibraryDirectories>./../../../Common/lib/vc15win32;./../../lib/vc15win32;./../../../../PxShared/lib/vc15win32;./../../Graphics/lib/win32/glut;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
</ProjectReference>
<PostBuildEvent>
<Command>XCOPY "../../../../PxShared/bin\vc15win32\PxFoundationDEBUG_x86.dll" "$(OutDir)" /D /Y
 XCOPY "../../../../PxShared/bin\vc15win32\PxPvdSDKDEBUG_x86.dll" "$(OutDir)" /D /Y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='checked|Win32'">
<OutDir>./../../../bin/vc15win32\</OutDir>
<IntDir>./Win32/SnippetStepper/checked\</IntDir>
<TargetExt>.exe</TargetExt>
<TargetName>$(ProjectName)CHECKED</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='checked|Win32'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions>/GR- /GF /arch:SSE2 /MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /wd4577 /wd4464 /wd4623 /wd4626 /wd5027 /wd4987 /wd5038 /wd5045 /wd4548 /wd4350 /wd4668 /wd4365 /wd4548 /wd4625 /wd5026 /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>./../../../Include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../Graphics/include/win32/GL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_HAS_EXCEPTIONS=0;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PHYSX_PROFILE_SDK;RENDER_SNIPPET;NDEBUG;PX_CHECKED=1;PX_NVTX=1;PX_SUPPORT_PVD=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalOptions>/LIBPATH:../../../Lib/vc15win32 PhysX3CommonCHECKED_x86.lib PhysX3CHECKED_x86.lib PhysX3CookingCHECKED_x86.lib PhysX3CharacterKinematicCHECKED_x86.lib PhysX3ExtensionsCHECKED.lib PhysX3VehicleCHECKED.lib PxPvdSDKCHECKED_x86.lib PxTaskCHECKED_x86.lib PxFoundationCHECKED_x86.lib PsFastXmlCHECKED_x86.lib /LIBPATH:../../lib/vc15win32 SnippetUtilsCHECKED.lib</AdditionalOptions>
<AdditionalDependencies>Winmm.lib;OpenGL32.lib;glut32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)CHECKED.exe</OutputFile>
<AdditionalLibraryDirectories>./../../../Common/lib/vc15win32;./../../lib/vc15win32;./../../../../PxShared/lib/vc15win32;./../../Graphics/lib/win32/glut;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
</ProjectReference>
<PostBuildEvent>
<Command>XCOPY "../../../../PxShared/bin\vc15win32\PxFoundationCHECKED_x86.dll" "$(OutDir)" /D /Y
 XCOPY "../../../../PxShared/bin\vc15win32\PxPvdSDKCHECKED_x86.dll" "$(OutDir)" /D /Y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='profile|Win32'">
<OutDir>./../../../bin/vc15win32\</OutDir>
<IntDir>./Win32/SnippetStepper/profile\</IntDir>
<TargetExt>.exe</TargetExt>
<TargetName>$(ProjectName)PROFILE</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='profile|Win32'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions>/GR- /GF /arch:SSE2 /MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /wd4577 /wd4464 /wd4623 /wd4626 /wd5027 /wd4987 /wd5038 /wd5045 /wd4548 /wd4350 /wd4668 /wd4365 /wd4548 /wd4625 /wd5026 /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>./../../../Include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../Graphics/include/win32/GL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_HAS_EXCEPTIONS=0;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PHYSX_PROFILE_SDK;RENDER_SNIPPET;NDEBUG;PX_PROFILE=1;PX_NVTX=1;PX_SUPPORT_PVD=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalOptions>/INCREMENTAL:NO /LIBPATH:../../../Lib/vc15win32 PhysX3CommonPROFILE_x86.lib PhysX3PROFILE_x86.lib PhysX3CookingPROFILE_x86.lib PhysX3CharacterKinematicPROFILE_x86.lib PhysX3ExtensionsPROFILE.lib PhysX3VehiclePROFILE.lib PxPvdSDKPROFILE_x86.lib PxTaskPROFILE_x86.lib PxFoundationPROFILE_x86.lib PsFastXmlPROFILE_x86.lib /LIBPATH:../../lib/vc15win32 SnippetUtilsPROFILE.lib /DEBUG</AdditionalOptions>
<AdditionalDependencies>Winmm.lib;OpenGL32.lib;glut32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)PROFILE.exe</OutputFile>
<AdditionalLibraryDirectories>./../../../Common/lib/vc15win32;./../../lib/vc15win32;./../../../../PxShared/lib/vc15win32;./../../Graphics/lib/win32/glut;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
</ProjectReference>
<PostBuildEvent>
<Command>XCOPY "../../../../PxShared/bin\vc15win32\PxFoundationPROFILE_x86.dll" "$(OutDir)" /D /Y
 XCOPY "../../../../PxShared/bin\vc15win32\PxPvdSDKPROFILE_x86.dll" "$(OutDir)" /D /Y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|Win32'">
<OutDir>./../../../bin/vc15win32\</OutDir>
<IntDir>./Win32/SnippetStepper/release\</IntDir>
<TargetExt>.exe</TargetExt>
<TargetName>$(ProjectName)</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release|Win32'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions>/GR- /GF /arch:SSE2 /MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /wd4577 /wd4464 /wd4623 /wd4626 /wd5027 /wd4987 /wd5038 /wd5045 /wd4548 /wd4350 /wd4668 /wd4365 /wd4548 /wd4625 /wd5026 /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>./../../../Include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../Graphics/include/win32/GL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_HAS_EXCEPTIONS=0;WIN32;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PHYSX_PROFILE_SDK;RENDER_SNIPPET;NDEBUG;PX_SUPPORT_PVD=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalOptions>/INCREMENTAL:NO /LIBPATH:../../../Lib/vc15win32 PhysX3Common_x86.lib PhysX3_x86.lib PhysX3Cooking_x86.lib PhysX3CharacterKinematic_x86.lib PhysX3Extensions.lib PhysX3Vehicle.lib PxPvdSDK_x86.lib PxTask_x86.lib PxFoundation_x86.lib PsFastXml_x86.lib /LIBPATH:../../lib/vc15win32 SnippetUtils.lib</AdditionalOptions>
<AdditionalDependencies>Winmm.lib;OpenGL32.lib;glut32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>./../../../Common/lib/vc15win32;./../../lib/vc15win32;./../../../../PxShared/lib/vc15win32;./../../Graphics/lib/win32/glut;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary>
<GenerateDebugInformation>true</GenerateDebugInformation>
<TargetMachine>MachineX86</TargetMachine>
</Link>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
</ProjectReference>
<PostBuildEvent>
<Command>XCOPY "../../../../PxShared/bin\vc15win32\PxFoundation_x86.dll" "$(OutDir)" /D /Y
 XCOPY "../../../../PxShared/bin\vc15win32\PxPvdSDK_x86.dll" "$(OutDir)" /D /Y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\SnippetCommon\ClassicMain.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\SnippetStepper\SnippetStepper.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="./SnippetUtils.vcxproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="./SnippetRender.vcxproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"></ImportGroup>
</Project>
``` | /content/code_sandbox/PhysX_3.4/Snippets/compiler/vc15win32/SnippetStepper.vcxproj | xml | 2016-10-12T16:34:31 | 2024-08-16T09:40:38 | PhysX-3.4 | NVIDIAGameWorks/PhysX-3.4 | 2,343 | 4,849 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="path_to_url"
xmlns:app="path_to_url">
<item
android:id="@+id/action_about"
android:orderInCategory="999"
android:showAsAction="never"
android:title="@string/about"/>
<item
android:id="@+id/action_clear_cache"
android:orderInCategory="100"
android:showAsAction="never"
android:title="@string/clear_cache"/>
</menu>
``` | /content/code_sandbox/app/src/main/res/menu/menu_setion.xml | xml | 2016-05-19T10:12:08 | 2024-08-02T07:42:36 | LRecyclerView | jdsjlzx/LRecyclerView | 2,470 | 117 |
```xml
import { ViewProps } from 'react-native'
import { SafeAreaView } from '../../../libs/safe-area-view'
import { createSpringAnimatedComponent } from './helpers'
export type SpringAnimatedSafeAreaViewProps = ViewProps
export const SpringAnimatedSafeAreaView =
createSpringAnimatedComponent(SafeAreaView)
SpringAnimatedSafeAreaView.displayName = 'SpringAnimatedSafeAreaView'
export type SpringAnimatedSafeAreaView = SafeAreaView
``` | /content/code_sandbox/packages/components/src/components/animated/spring/SpringAnimatedSafeAreaView.tsx | xml | 2016-11-30T23:24:21 | 2024-08-16T00:24:59 | devhub | devhubapp/devhub | 9,652 | 84 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!--
Distributed under the Boost
file LICENSE_1_0.txt or copy at path_to_url
-->
<header name="boost/proto/functional/std/utility.hpp">
<para>Defines Proto callables <computeroutput><classname>boost::proto::functional::make_pair</classname></computeroutput>,
<computeroutput><classname>boost::proto::functional::first</classname></computeroutput> and
<computeroutput><classname>boost::proto::functional::second</classname></computeroutput>.</para>
<namespace name="boost">
<namespace name="proto">
<namespace name="functional">
<!-- proto::functional::make_pair -->
<struct name="make_pair">
<purpose>A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes
<computeroutput>std::make_pair()</computeroutput> on its arguments.</purpose>
<description>
<para>
A <conceptname>PolymorphicFunctionObject</conceptname> type that invokes
<computeroutput>std::make_pair()</computeroutput> on its arguments.</para>
</description>
<inherit>
<type><classname>proto::callable</classname></type>
</inherit>
<struct-specialization name="result">
<template>
<template-type-parameter name="This"/>
<template-type-parameter name="First"/>
<template-type-parameter name="Second"/>
</template>
<specialization>
<template-arg>This(First, Second)</template-arg>
</specialization>
<typedef name="type">
<type>std::pair<
typename boost::remove_const<typename boost::remove_reference<First>::type>::type
, typename boost::remove_const<typename boost::remove_reference<Second>::type>::type
></type>
</typedef>
</struct-specialization>
<method-group name="public member functions">
<method name="operator()" cv="const">
<type>typename std::pair< First, Second ></type>
<template>
<template-type-parameter name="First"/>
<template-type-parameter name="Second"/>
</template>
<parameter name="first">
<paramtype>First const &</paramtype>
</parameter>
<parameter name="second">
<paramtype>Second const &</paramtype>
</parameter>
<returns>
<para><computeroutput>std::make_pair(first, second)</computeroutput></para>
</returns>
</method>
</method-group>
</struct>
<!-- proto::functional::first -->
<struct name="first">
<purpose>
A <conceptname>PolymorphicFunctionObject</conceptname> type that returns
the first element of a <computeroutput>std::pair<></computeroutput>.
</purpose>
<description>
<para>
A <conceptname>PolymorphicFunctionObject</conceptname> type that returns
the first element of a <computeroutput>std::pair<></computeroutput>.</para>
</description>
<inherit><type><classname>proto::callable</classname></type>
</inherit>
<struct-specialization name="result">
<template>
<template-type-parameter name="This"/>
<template-type-parameter name="Pair"/>
</template>
<specialization>
<template-arg>This(Pair)</template-arg>
</specialization>
<typedef name="type">
<type>typename Pair::first_type</type>
</typedef>
</struct-specialization>
<struct-specialization name="result">
<template>
<template-type-parameter name="This"/>
<template-type-parameter name="Pair"/>
</template>
<specialization>
<template-arg>This(Pair &)</template-arg>
</specialization>
<typedef name="type">
<type>typename Pair::first_type &</type>
</typedef>
</struct-specialization>
<struct-specialization name="result">
<template>
<template-type-parameter name="This"/>
<template-type-parameter name="Pair"/>
</template>
<specialization>
<template-arg>This(Pair const &)</template-arg>
</specialization>
<typedef name="type">
<type>typename Pair::first_type const &</type>
</typedef>
</struct-specialization>
<method-group name="public member functions">
<method name="operator()" cv="const">
<type>typename Pair::first_type &</type>
<template>
<template-type-parameter name="Pair"/>
</template>
<parameter name="pair">
<paramtype>Pair &</paramtype>
</parameter>
<returns>
<para>
<computeroutput>pair.first</computeroutput>
</para>
</returns>
</method>
<method name="operator()" cv="const">
<type>typename Pair::first_type const &</type>
<template>
<template-type-parameter name="Pair"/>
</template>
<parameter name="pair">
<paramtype>Pair const &</paramtype>
</parameter>
<returns>
<para>
<computeroutput>pair.first</computeroutput>
</para>
</returns>
</method>
</method-group>
</struct>
<!-- proto::functional::second -->
<struct name="second">
<purpose>
A <conceptname>PolymorphicFunctionObject</conceptname> type that returns
the second element of a <computeroutput>std::pair<></computeroutput>.
</purpose>
<description>
<para>
A <conceptname>PolymorphicFunctionObject</conceptname> type that returns
the second element of a <computeroutput>std::pair<></computeroutput>.
</para>
</description>
<inherit><type><classname>proto::callable</classname></type></inherit>
<struct-specialization name="result">
<template>
<template-type-parameter name="This"/>
<template-type-parameter name="Pair"/>
</template>
<specialization>
<template-arg>This(Pair)</template-arg>
</specialization>
<typedef name="type">
<type>typename Pair::second_type</type>
</typedef>
</struct-specialization>
<struct-specialization name="result">
<template>
<template-type-parameter name="This"/>
<template-type-parameter name="Pair"/>
</template>
<specialization>
<template-arg>This(Pair &)</template-arg>
</specialization>
<typedef name="type">
<type>typename Pair::second_type &</type>
</typedef>
</struct-specialization>
<struct-specialization name="result">
<template>
<template-type-parameter name="This"/>
<template-type-parameter name="Pair"/>
</template>
<specialization>
<template-arg>This(Pair const &)</template-arg>
</specialization>
<typedef name="type">
<type>typename Pair::second_type const &</type>
</typedef>
</struct-specialization>
<method-group name="public member functions">
<method name="operator()" cv="const">
<type>typename Pair::second_type &</type>
<template>
<template-type-parameter name="Pair"/>
</template>
<parameter name="pair">
<paramtype>Pair &</paramtype>
</parameter>
<returns>
<para>
<computeroutput>pair.second</computeroutput>
</para>
</returns>
</method>
<method name="operator()" cv="const">
<type>typename Pair::second_type const &</type>
<template>
<template-type-parameter name="Pair"/>
</template>
<parameter name="pair">
<paramtype>Pair const &</paramtype>
</parameter>
<returns>
<para>
<computeroutput>pair.second</computeroutput>
</para>
</returns>
</method>
</method-group>
</struct>
</namespace>
</namespace>
</namespace>
</header>
``` | /content/code_sandbox/deps/boost_1_66_0/libs/proto/doc/reference/functional/std/utility.xml | xml | 2016-09-05T10:18:44 | 2024-08-11T13:21:40 | LiquidCore | LiquidPlayer/LiquidCore | 1,010 | 1,836 |
```xml
<run>
<precisionModel type="FLOATING"/>
<case>
<desc>LC - topographically equal with no boundary</desc>
<a>
LINESTRING(0 0, 0 50, 50 50, 50 0, 0 0)
</a>
<b>
MULTILINESTRING(
(0 0, 0 50),
(0 50, 50 50),
(50 50, 50 0),
(50 0, 0 0))
</b>
<test>
<op name="relate" arg1="A" arg2="B" arg3="1FFFFFFF2">true</op>
</test>
<test><op name="contains" arg1="A" arg2="B"> true </op></test>
<test><op name="coveredBy" arg1="A" arg2="B"> true </op></test>
<test><op name="covers" arg1="A" arg2="B"> true </op></test>
<test><op name="crosses" arg1="A" arg2="B"> false </op></test>
<test><op name="disjoint" arg1="A" arg2="B"> false </op></test>
<test><op name="equalsTopo" arg1="A" arg2="B"> true </op></test>
<test><op name="intersects" arg1="A" arg2="B"> true </op></test>
<test><op name="overlaps" arg1="A" arg2="B"> false </op></test>
<test><op name="touches" arg1="A" arg2="B"> false </op></test>
<test><op name="within" arg1="A" arg2="B"> true </op></test>
</case>
<case>
<desc>LC - equal with boundary intersection</desc>
<a>
LINESTRING(0 0, 60 0, 60 60, 60 0, 120 0)
</a>
<b>
MULTILINESTRING(
(0 0, 60 0),
(60 0, 120 0),
(60 0, 60 60))
</b>
<test>
<op name="relate" arg1="A" arg2="B" arg3="10FF0FFF2">true</op>
</test>
<test><op name="contains" arg1="A" arg2="B"> true </op></test>
<test><op name="coveredBy" arg1="A" arg2="B"> true </op></test>
<test><op name="covers" arg1="A" arg2="B"> true </op></test>
<test><op name="crosses" arg1="A" arg2="B"> false </op></test>
<test><op name="disjoint" arg1="A" arg2="B"> false </op></test>
<test><op name="equalsTopo" arg1="A" arg2="B"> true </op></test>
<test><op name="intersects" arg1="A" arg2="B"> true </op></test>
<test><op name="overlaps" arg1="A" arg2="B"> false </op></test>
<test><op name="touches" arg1="A" arg2="B"> false </op></test>
<test><op name="within" arg1="A" arg2="B"> true </op></test>
</case>
</run>
``` | /content/code_sandbox/modules/tests/src/test/resources/testxml/validate/TestRelateLC.xml | xml | 2016-01-25T18:08:41 | 2024-08-15T17:34:53 | jts | locationtech/jts | 1,923 | 852 |
```xml
/*
*/
import type { TSESLint } from "@typescript-eslint/utils";
import { createNoDeprecatedComponentsRule } from "./createNoDeprecatedComponentsRule";
export const datetimeComponentsMigrationMapping = {
DateInput: "DateInput3",
DatePicker: "DatePicker3",
DateRangeInput: "DateRangeInput3",
DateRangePicker: "DateRangePicker3",
};
/**
* This rule is similar to "@blueprintjs/no-deprecated-components", but it only checks for usage
* of deprecated components from @blueprintjs/datetime. This is useful for incremental migration to
* newer Blueprint APIs.
*/
export const noDeprecatedDatetimeComponentsRule: TSESLint.RuleModule<string, unknown[]> =
createNoDeprecatedComponentsRule(
"no-deprecated-datetime-components",
["@blueprintjs/datetime"],
datetimeComponentsMigrationMapping,
);
``` | /content/code_sandbox/packages/eslint-plugin/src/rules/no-deprecated-components/no-deprecated-datetime-components.ts | xml | 2016-10-25T21:17:50 | 2024-08-16T15:14:48 | blueprint | palantir/blueprint | 20,593 | 181 |
```xml
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>true</ImplicitUsings>
<AssemblyName>TagHelpers</AssemblyName>
</PropertyGroup>
</Project>
``` | /content/code_sandbox/projects/mvc/tag-helper/tag-helper-4/tag-helper-4.csproj | xml | 2016-07-27T08:23:40 | 2024-08-16T19:15:21 | practical-aspnetcore | dodyg/practical-aspnetcore | 9,106 | 58 |
```xml
/// <reference types="mocha"/>
/// <reference types="node"/>
import xs, {Producer, Listener, Stream} from '../src/index';
import fromDiagram from '../src/extra/fromDiagram';
import * as assert from 'assert';
describe('Stream', () => {
it('should have all the core static operators', () => {
assert.equal(typeof xs.create, 'function');
assert.equal(typeof xs.createWithMemory, 'function');
assert.equal(typeof xs.never, 'function');
assert.equal(typeof xs.empty, 'function');
assert.equal(typeof xs.throw, 'function');
assert.equal(typeof xs.of, 'function');
assert.equal(typeof xs.from, 'function');
assert.equal(typeof xs.fromArray, 'function');
assert.equal(typeof xs.fromPromise, 'function');
assert.equal(typeof xs.fromObservable, 'function');
assert.equal(typeof xs.periodic, 'function');
assert.equal(typeof xs.merge, 'function');
assert.equal(typeof xs.combine, 'function');
});
it('should have all the core operators as methods, plus addListener and removeListener', () => {
const stream = xs.create();
assert.equal(typeof stream.addListener, 'function');
assert.equal(typeof stream.removeListener, 'function');
assert.equal(typeof stream.subscribe, 'function');
assert.equal(typeof stream.map, 'function');
assert.equal(typeof stream.mapTo, 'function');
assert.equal(typeof stream.filter, 'function');
assert.equal(typeof stream.take, 'function');
assert.equal(typeof stream.drop, 'function');
assert.equal(typeof stream.last, 'function');
assert.equal(typeof stream.startWith, 'function');
assert.equal(typeof stream.endWhen, 'function');
assert.equal(typeof stream.fold, 'function');
assert.equal(typeof stream.flatten, 'function');
assert.equal(typeof stream.compose, 'function');
assert.equal(typeof stream.remember, 'function');
assert.equal(typeof stream.debug, 'function');
assert.equal(typeof stream.imitate, 'function');
});
it('should be createable giving a custom producer object', (done: any) => {
const expected = [10, 20, 30];
let producerStopped: boolean = false;
const producer: Producer<number> = {
start(listener: Listener<number>) {
listener.next(10);
listener.next(20);
listener.next(30);
listener.complete();
},
stop() {
done();
assert.equal(expected.length, 0);
assert.equal(producerStopped, false);
producerStopped = true;
},
};
const stream: Stream<number> = xs.create(producer);
stream.addListener({
next: (x: number) => {
assert.equal(x, expected.shift());
},
error: (err: any) => done(err),
complete: () => {
assert.equal(producerStopped, true);
},
});
});
it('should allow using shamefullySend* methods', (done: any) => {
const expected = [10, 20, 30];
let listenerGotEnd: boolean = false;
const stream = xs.create();
stream.addListener({
next: (x: number) => {
assert.equal(x, expected.shift());
},
error: (err: any) => done(err),
complete: () => {
listenerGotEnd = true;
},
});
stream.shamefullySendNext(10);
stream.shamefullySendNext(20);
stream.shamefullySendNext(30);
stream.shamefullySendComplete();
assert.equal(expected.length, 0);
assert.equal(listenerGotEnd, true);
done();
});
it('should be possible to addListener and removeListener with 1 listener', (done: any) => {
const stream = xs.periodic(100);
const expected = [0, 1, 2];
let listener = {
next: (x: number) => {
assert.equal(x, expected.shift());
if (expected.length === 0) {
stream.removeListener(listener);
done();
}
},
error: (err: any) => done(err),
complete: () => done('should not call complete'),
};
stream.addListener(listener);
});
it('should broadcast events to two listeners', (done: any) => {
const stream = xs.periodic(100);
const expected1 = [0, 1, 2];
const expected2 = [1, 2];
let listener1 = {
next: (x: number) => {
assert.equal(x, expected1.shift());
},
error: (err: any) => done(err),
complete: () => done('should not call complete'),
};
stream.addListener(listener1);
let listener2 = {
next: (x: number) => {
assert.equal(x, expected2.shift());
},
error: (err: any) => done(err),
complete: () => done('should not call complete'),
};
setTimeout(() => {
stream.addListener(listener2);
}, 150);
setTimeout(() => {
stream.removeListener(listener1);
stream.removeListener(listener2);
assert.equal(expected1.length, 0);
assert.equal(expected2.length, 0);
done();
}, 350);
});
it('should not stop if listener is synchronously removed and re-added', (done: any) => {
const stream = xs.periodic(100);
const expected = [0, 1, 2];
let listener = {
next: (x: number) => {
assert.equal(x, expected.shift());
if (expected.length === 0) {
stream.removeListener(listener);
done();
}
},
error: (err: any) => done(err),
complete: () => done('should not call complete'),
};
stream.addListener(listener);
setTimeout(() => {
stream.removeListener(listener);
stream.addListener(listener);
}, 150);
});
it('should restart if listener is asynchronously removed and re-added', (done: any) => {
const stream = xs.periodic(100);
let expected = [0, 1, 2];
let listener = {
next: (x: number) => {
assert.equal(x, expected.shift());
if (expected.length === 0) {
stream.removeListener(listener);
done();
}
},
error: (err: any) => done(err),
complete: () => done('should not call complete'),
};
stream.addListener(listener);
setTimeout(() => {
stream.removeListener(listener);
}, 130);
setTimeout(() => {
assert.equal(expected.length, 2);
expected = [0, 1, 2];
stream.addListener(listener);
}, 180);
});
it('should synchronously stop producer when completed', (done: any) => {
let on = false;
const stream = xs.create({
start: (listener) => {
on = true;
listener.next(10);
listener.next(20);
listener.next(30);
listener.complete();
},
stop: () => {
on = false;
},
});
const expected1 = [10, 20, 30];
const expected2 = [10, 20, 30];
stream.addListener({
next: (x: number) => {
assert.equal(on, true);
assert.equal(x, expected1.shift());
},
error: (err: any) => done(err),
complete: () => {
assert.equal(on, false);
assert.equal(expected1.length, 0);
},
});
assert.equal(on, false);
assert.equal(expected1.length, 0);
stream.addListener({
next: (x: number) => {
assert.equal(on, true);
assert.equal(x, expected2.shift());
},
error: (err: any) => done(err),
complete: () => {
assert.equal(on, false);
assert.equal(expected2.length, 0);
},
});
assert.equal(on, false);
assert.equal(expected2.length, 0);
done();
});
it('should synchronously stop producer when error thrown', (done: any) => {
let on = false;
const stream = xs.create({
start: (listener) => {
on = true;
listener.next(10);
listener.next(20);
listener.next(30);
listener.error('oops');
},
stop: () => {
on = false;
},
});
const expected1 = [10, 20, 30];
const expected2 = [10, 20, 30];
stream.addListener({
next: (x: number) => {
assert.equal(on, true);
assert.equal(x, expected1.shift());
},
error: (err: any) => {
assert.equal(err, 'oops');
assert.equal(on, false);
assert.equal(expected1.length, 0);
},
complete: () => {
done('complete should not be called');
},
});
assert.equal(on, false);
assert.equal(expected1.length, 0);
stream.addListener({
next: (x: number) => {
assert.equal(on, true);
assert.equal(x, expected2.shift());
},
error: (err: any) => {
assert.equal(err, 'oops');
assert.equal(on, false);
assert.equal(expected2.length, 0);
},
complete: () => {
done('complete should not be called');
},
});
assert.equal(on, false);
assert.equal(expected2.length, 0);
done();
});
describe('create', () => {
it('throws a helpful error if you pass an incomplete producer', (done: any) => {
try {
const incompleteProducer = <Producer<any>> <any> {
start: () => {},
stop: undefined
};
xs.create(incompleteProducer);
} catch (e) {
assert.equal(e.message, 'producer requires both start and stop functions');
done();
}
});
});
describe('setDebugListener', () => {
it('should not trigger a stream execution', (done: any) => {
const stream = xs.of(1, 2, 3);
const listener: Listener<number> = {
next: () => done('should not be called'),
error: () => done('should not be called'),
complete: () => done('should not be called'),
};
stream.setDebugListener(listener);
setTimeout(() => done(), 200);
});
it('should spy an existing stream execution', (done: any) => {
const stream = xs.periodic(200).take(8);
const listener = { next: () => { }, error: () => { }, complete: () => { } };
const expected = [0, 1, 2];
const debugListener: Listener<number> = {
next: (x: number) => {
assert.strictEqual(x, expected.shift());
},
error: () => done('should not be called'),
complete: () => done('should not be called')
};
stream.setDebugListener(debugListener);
stream.addListener(listener);
setTimeout(() => stream.removeListener(listener), 700);
setTimeout(() => {
assert.strictEqual(expected.length, 0);
done();
}, 1000);
});
});
describe('addListener', () => {
it('should accept a partial listener with just next', (done: any) => {
const stream = fromDiagram('--a--b----c----d---|');
const expected = ['a', 'b', 'c', 'd'];
let listener = {
next: (x: number) => {
assert.equal(x, expected.shift());
if (expected.length === 0) {
stream.removeListener(listener as any);
done();
}
},
};
stream.addListener(listener as any);
});
it('should accept a partial listener with just error', (done: any) => {
const stream = fromDiagram('--a--b----c----d---#', {errorValue: 'oops'});
let listener = {
error: (err: any) => {
assert.equal(err, 'oops');
done();
},
};
stream.addListener(listener as any);
});
it('should accept a partial listener with just complete', (done: any) => {
const stream = fromDiagram('--a--b----c----d---|');
let listener = {
complete: () => {
done();
},
};
stream.addListener(listener as any);
});
});
describe('subscribe', () => {
it('should return a subscription', (done: any) => {
const stream = xs.empty();
const noop = (): void => void 0;
const listener = {
next: noop,
error: noop,
complete: noop
};
const subscription = stream.subscribe(listener);
assert.equal(typeof subscription, 'object');
assert.equal(typeof subscription.unsubscribe, 'function');
done();
});
it('should accept a partial listener', (done: any) => {
const stream = xs.empty();
const noop = (): void => void 0;
const listener = {
next: noop,
};
const subscription = stream.subscribe(listener);
assert.equal(typeof subscription, 'object');
assert.equal(typeof subscription.unsubscribe, 'function');
done();
});
});
});
``` | /content/code_sandbox/tests/stream.ts | xml | 2016-04-22T19:25:41 | 2024-08-12T22:43:18 | xstream | staltz/xstream | 2,374 | 2,878 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!--
-->
<resources>
<color name="blue_grey_50">#ECEFF1</color>
<color name="blue_grey_100">#CFD8DC</color>
<color name="blue_grey_200">#B0BEC5</color>
<color name="blue_grey_300">#90A4AE</color>
<color name="blue_grey_400">#78909C</color>
<color name="blue_grey_500">#607D8B</color>
<color name="blue_grey_600">#546E7A</color>
<color name="blue_grey_700">#455A64</color>
<color name="blue_grey_800">#37474F</color>
<color name="blue_grey_900">#263238</color>
</resources>
``` | /content/code_sandbox/modules/material-colors/src/androidMain/res/values/blue_grey_swatch.xml | xml | 2016-08-12T14:22:12 | 2024-08-13T16:15:24 | Splitties | LouisCAD/Splitties | 2,498 | 200 |
```xml
import { SERVER_DIRECTORY } from '../../shared/lib/constants'
import type { AppPageRouteDefinition } from '../route-definitions/app-page-route-definition'
import { RouteKind } from '../route-kind'
import { AppPageRouteMatcherProvider } from './app-page-route-matcher-provider'
import type { ManifestLoader } from './helpers/manifest-loaders/manifest-loader'
describe('AppPageRouteMatcherProvider', () => {
it('returns no routes with an empty manifest', async () => {
const loader: ManifestLoader = { load: jest.fn(() => ({})) }
const matcher = new AppPageRouteMatcherProvider('<root>', loader)
await expect(matcher.matchers()).resolves.toEqual([])
})
describe('manifest matching', () => {
it.each<{
manifest: Record<string, string>
route: AppPageRouteDefinition
}>([
{
manifest: {
'/page': 'app/page.js',
},
route: {
kind: RouteKind.APP_PAGE,
pathname: '/',
filename: `<root>/${SERVER_DIRECTORY}/app/page.js`,
page: '/page',
bundlePath: 'app/page',
appPaths: ['/page'],
},
},
{
manifest: {
'/(marketing)/about/page': 'app/(marketing)/about/page.js',
},
route: {
kind: RouteKind.APP_PAGE,
pathname: '/about',
filename: `<root>/${SERVER_DIRECTORY}/app/(marketing)/about/page.js`,
page: '/(marketing)/about/page',
bundlePath: 'app/(marketing)/about/page',
appPaths: ['/(marketing)/about/page'],
},
},
{
manifest: {
'/dashboard/users/[id]/page': 'app/dashboard/users/[id]/page.js',
},
route: {
kind: RouteKind.APP_PAGE,
pathname: '/dashboard/users/[id]',
filename: `<root>/${SERVER_DIRECTORY}/app/dashboard/users/[id]/page.js`,
page: '/dashboard/users/[id]/page',
bundlePath: 'app/dashboard/users/[id]/page',
appPaths: ['/dashboard/users/[id]/page'],
},
},
{
manifest: { '/dashboard/users/page': 'app/dashboard/users/page.js' },
route: {
kind: RouteKind.APP_PAGE,
pathname: '/dashboard/users',
filename: `<root>/${SERVER_DIRECTORY}/app/dashboard/users/page.js`,
page: '/dashboard/users/page',
bundlePath: 'app/dashboard/users/page',
appPaths: ['/dashboard/users/page'],
},
},
{
manifest: {
'/dashboard/users/page': 'app/dashboard/users/page.js',
'/(marketing)/dashboard/users/page':
'app/(marketing)/dashboard/users/page.js',
},
route: {
kind: RouteKind.APP_PAGE,
pathname: '/dashboard/users',
filename: `<root>/${SERVER_DIRECTORY}/app/dashboard/users/page.js`,
page: '/dashboard/users/page',
bundlePath: 'app/dashboard/users/page',
appPaths: [
'/dashboard/users/page',
'/(marketing)/dashboard/users/page',
],
},
},
])(
'returns the correct routes for $route.pathname',
async ({ manifest, route }) => {
const loader: ManifestLoader = {
load: jest.fn(() => ({
'/users/[id]/route': 'app/users/[id]/route.js',
'/users/route': 'app/users/route.js',
...manifest,
})),
}
const matcher = new AppPageRouteMatcherProvider('<root>', loader)
const matchers = await matcher.matchers()
expect(loader.load).toHaveBeenCalled()
expect(matchers).toHaveLength(1)
expect(matchers[0].definition).toEqual(route)
}
)
})
})
``` | /content/code_sandbox/packages/next/src/server/route-matcher-providers/app-page-route-matcher-provider.test.ts | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 794 |
```xml
import styled from 'styled-components';
import {Text} from '../../Library/View/Text';
import {appTheme} from '../../Library/Style/appTheme';
import {font, fontWeight, space} from '../../Library/Style/layout';
export const SideSectionTitle = styled(Text)`
flex: 1;
font-weight: ${fontWeight.softBold};
color: ${() => appTheme().text.soft};
font-size: ${font.small}px;
padding: ${space.small2}px ${space.medium}px ${space.tiny}px;
`;
``` | /content/code_sandbox/src/Renderer/Fragment/Stream/SideSectionTitle.tsx | xml | 2016-05-10T12:55:31 | 2024-08-11T04:32:50 | jasper | jasperapp/jasper | 1,318 | 112 |
```xml
import { useState } from 'react';
import isEmpty from 'lodash/isEmpty';
import { STATIC_CONTACTS } from '@config';
import {
createContact as createAContact,
destroyContact,
selectContacts,
updateContact as updateAContact,
useDispatch,
useSelector
} from '@store';
import {
Contact,
ExtendedContact,
IAccount,
NetworkId,
StoreAccount,
TAddress,
TUuid
} from '@types';
import { generateDeterministicAddressUUID, isSameAddress } from '@utils';
import { useContracts } from '../Contract';
import {
getContactByAddressAndNetworkId as getContactByAddressAndNetworkIdFunc,
getContactFromContracts
} from './helpers';
export interface IAddressBookContext {
contacts: ExtendedContact[];
addressBookRestore: { [name: string]: ExtendedContact | undefined };
createContact(contact: Contact): void;
createContactWithID(uuid: TUuid, contact: Contact): void;
updateContact(contact: ExtendedContact): void;
deleteContact(uuid: TUuid): void;
getContactByAddress(address: string): ExtendedContact | undefined;
getContactByAddressAndNetworkId(
address: string,
networkId: NetworkId
): ExtendedContact | undefined;
getAccountLabel(account: StoreAccount | IAccount): string | undefined;
restoreDeletedContact(id: TUuid): void;
}
function useContacts() {
const contacts = useSelector(selectContacts);
const { contracts } = useContracts();
const dispatch = useDispatch();
const [contactRestore, setContactRestore] = useState<{
[name: string]: ExtendedContact | undefined;
}>({});
const createContact = (item: Contact) => {
const uuid = generateDeterministicAddressUUID(item.network, item.address);
dispatch(createAContact({ ...item, uuid }));
};
const updateContact = (item: ExtendedContact) => {
dispatch(updateAContact(item));
};
const deleteContact = (uuid: TUuid) => {
const contactToDelete = contacts.find((a) => a.uuid === uuid);
if (isEmpty(contactToDelete) || !contactToDelete) {
throw new Error('Unable to delete contact from address book! No account with id specified.');
}
setContactRestore((prevState) => ({ ...prevState, [uuid]: contactToDelete }));
dispatch(destroyContact(contactToDelete.uuid));
};
const getContactByAddress = (address: TAddress) => {
return (
[...contacts, ...STATIC_CONTACTS].find((contact: ExtendedContact) =>
isSameAddress(contact.address as TAddress, address)
) ?? getContactFromContracts(contracts)(address)
);
};
const getContactByAddressAndNetworkId = (address: TAddress, networkId: NetworkId) => {
return getContactByAddressAndNetworkIdFunc(contacts, contracts)(address, networkId);
};
const getAccountLabel = ({ address, networkId }: { address: TAddress; networkId: NetworkId }) => {
const addressContact = getContactByAddressAndNetworkId(address, networkId);
return addressContact ? addressContact.label : undefined;
};
const restoreDeletedContact = (id: TUuid) => {
const contactRecord = contactRestore[id];
if (isEmpty(contactRecord)) {
throw new Error(
'Unable to restore address book record! No address book record with id specified.'
);
}
const { uuid, ...rest } = contactRecord!;
createContact(rest);
setContactRestore((prevState) => ({ ...prevState, [uuid]: undefined }));
};
return {
contacts,
contactRestore,
createContact,
updateContact,
deleteContact,
getContactByAddress,
getContactByAddressAndNetworkId,
getAccountLabel,
restoreDeletedContact
};
}
export default useContacts;
``` | /content/code_sandbox/src/services/Store/Contact/useContacts.tsx | xml | 2016-12-04T01:35:27 | 2024-08-14T21:41:58 | MyCrypto | MyCryptoHQ/MyCrypto | 1,347 | 821 |
```xml
<clickhouse>
<proxy>
<https>
<resolver>
<endpoint>path_to_url
<proxy_scheme>https</proxy_scheme>
<proxy_port>443</proxy_port>
<proxy_cache_time>10</proxy_cache_time>
</resolver>
</https>
</proxy>
</clickhouse>
``` | /content/code_sandbox/tests/integration/test_s3_table_function_with_https_proxy/configs/config.d/proxy_remote.xml | xml | 2016-06-02T08:28:18 | 2024-08-16T18:39:33 | ClickHouse | ClickHouse/ClickHouse | 36,234 | 73 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="path_to_url"
android:shape="rectangle"
>
<size android:width="3px" android:height="3px" />
<solid android:color="#0F0" />
</shape>
``` | /content/code_sandbox/test/instr/testdata/optres/android_res/com/facebook/resourcetest/res/drawable-hdpi/d3.xml | xml | 2016-03-24T18:26:35 | 2024-08-16T16:00:20 | redex | facebook/redex | 6,016 | 69 |
```xml
import {
getNullableType,
GraphQLCompositeType,
GraphQLError,
GraphQLList,
GraphQLOutputType,
GraphQLResolveInfo,
GraphQLSchema,
isAbstractType,
isCompositeType,
isLeafType,
isListType,
locatedError,
} from 'graphql';
import { isPromise, Maybe } from '@graphql-tools/utils';
import { annotateExternalObject, isExternalObject, mergeFields } from './mergeFields.js';
import { Subschema } from './Subschema.js';
import { MergedTypeInfo, StitchingInfo, SubschemaConfig } from './types.js';
export function resolveExternalValue<TContext extends Record<string, any>>(
result: any,
unpathedErrors: Array<GraphQLError>,
subschema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>,
context?: Record<string, any>,
info?: GraphQLResolveInfo,
returnType = getReturnType(info),
skipTypeMerging?: boolean,
): any {
const type = getNullableType(returnType);
if (result instanceof Error) {
return result;
}
if (result == null) {
return reportUnpathedErrorsViaNull(unpathedErrors);
}
if (isLeafType(type)) {
// Gateway doesn't need to know about errors in leaf values
// If an enum value is invalid, it is an subschema error not a gateway error
try {
return type.parseValue(result);
} catch {
return null;
}
} else if (isCompositeType(type)) {
const result$ = resolveExternalObject(
type,
result,
unpathedErrors,
subschema,
context,
info,
skipTypeMerging,
);
if (info && isAbstractType(type)) {
function checkAbstractResolvedCorrectly(result: any) {
if (result.__typename != null) {
const resolvedType = info!.schema.getType(result.__typename);
if (!resolvedType) {
return null;
}
}
return result;
}
if (isPromise(result$)) {
return result$.then(checkAbstractResolvedCorrectly);
}
return checkAbstractResolvedCorrectly(result$);
}
return result$;
} else if (isListType(type)) {
if (Array.isArray(result)) {
return resolveExternalList(
type,
result,
unpathedErrors,
subschema,
context,
info,
skipTypeMerging,
);
}
return resolveExternalValue(
result,
unpathedErrors,
subschema,
context,
info,
type.ofType,
skipTypeMerging,
);
}
}
function resolveExternalObject<TContext extends Record<string, any>>(
type: GraphQLCompositeType,
object: any,
unpathedErrors: Array<GraphQLError>,
subschema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>,
context?: Record<string, any>,
info?: GraphQLResolveInfo,
skipTypeMerging?: boolean,
) {
// if we have already resolved this object, for example, when the identical object appears twice
// in a list, see path_to_url
if (!isExternalObject(object)) {
annotateExternalObject(object, unpathedErrors, subschema, Object.create(null));
}
if (skipTypeMerging || info == null) {
return object;
}
const stitchingInfo = info.schema.extensions?.['stitchingInfo'] as Maybe<StitchingInfo>;
if (stitchingInfo == null) {
return object;
}
// Within the stitching context, delegation to a stitched GraphQLSchema or SubschemaConfig
// will be redirected to the appropriate Subschema object, from which merge targets can be queried.
let mergedTypeInfo: MergedTypeInfo | undefined;
const possibleTypeNames = [object.__typename, type.name];
for (const possibleTypeName of possibleTypeNames) {
if (
possibleTypeName != null &&
stitchingInfo.mergedTypes[possibleTypeName]?.targetSubschemas?.get(subschema as Subschema)
?.length
) {
mergedTypeInfo = stitchingInfo.mergedTypes[possibleTypeName];
break;
}
}
// If there are no merge targets from the subschema, return.
if (!mergedTypeInfo) {
return object;
}
return mergeFields(mergedTypeInfo, object, subschema as Subschema, context, info);
}
function resolveExternalList<TContext extends Record<string, any>>(
type: GraphQLList<any>,
list: Array<any>,
unpathedErrors: Array<GraphQLError>,
subschema: GraphQLSchema | SubschemaConfig<any, any, any, TContext>,
context?: Record<string, any>,
info?: GraphQLResolveInfo,
skipTypeMerging?: boolean,
) {
return list.map(listMember =>
resolveExternalValue(
listMember,
unpathedErrors,
subschema,
context,
info,
type.ofType,
skipTypeMerging,
),
);
}
const reportedErrors = new WeakMap<GraphQLError, boolean>();
function reportUnpathedErrorsViaNull(unpathedErrors: Array<GraphQLError>) {
if (unpathedErrors.length) {
const unreportedErrors: Array<GraphQLError> = [];
for (const error of unpathedErrors) {
if (!reportedErrors.has(error)) {
unreportedErrors.push(error);
reportedErrors.set(error, true);
}
}
if (unreportedErrors.length) {
if (unreportedErrors.length === 1) {
return unreportedErrors[0];
}
return new AggregateError(
unreportedErrors.map(e =>
// We cast path as any for GraphQL.js 14 compat
// locatedError path argument must be defined, but it is just forwarded to a constructor that allows a undefined value
// path_to_url#L25
// path_to_url#L19
locatedError(e, undefined as any, unreportedErrors[0].path as any),
),
unreportedErrors.map(error => error.message).join(', \n'),
);
}
}
return null;
}
function getReturnType(info: GraphQLResolveInfo | undefined): GraphQLOutputType {
if (info == null) {
throw new Error(`Return type cannot be inferred without a source schema.`);
}
return info.returnType;
}
``` | /content/code_sandbox/packages/delegate/src/resolveExternalValue.ts | xml | 2016-03-22T00:14:38 | 2024-08-16T02:02:06 | graphql-tools | ardatan/graphql-tools | 5,331 | 1,381 |
```xml
export function HeadingLarge({ children }: { children: React.ReactNode }) {
return <h1>{children}</h1>;
}
``` | /content/code_sandbox/examples/modularize-imports/components/ui/heading-large.tsx | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 27 |
```xml
<?xml version="1.0"?>
<package xmlns="path_to_url">
<metadata>
<id>ILMerge</id>
<version>$version$</version>
<title>ILMerge</title>
<language>en-US</language>
<authors>mbarnett</authors>
<owners>mbarnett</owners>
<copyright>.NET Foundation</copyright>
<licenseUrl>path_to_url
<projectUrl>path_to_url
<summary>ILMerge is a static linker for .NET assemblies.</summary>
<description>ILMerge is a utility that can be used to merge multiple .NET assemblies into a single assembly. ILMerge takes a set of input assemblies and merges them into one target assembly. The first assembly in the list of input assemblies is the primary assembly. When the primary assembly is an executable, then the target assembly is created as an executable with the same entry point as the primary assembly. Also, if the primary assembly has a strong name, and a .snk file is provided, then the target assembly is re-signed with the specified key so that it also has a strong name.
ILMerge is packaged as a console application. But all of its functionality is also available programmatically.
There are several options that control the behavior of ILMerge. See the documentation that comes with the tool for details.</description>
<repository type="git" url="path_to_url" />
</metadata>
<files>
<file src="bin/Release/net452/ILMerge.exe" target="tools/net452/ILMerge.exe" />
<file src="bin/Release/net452/System.Compiler.dll" target="tools/net452/System.Compiler.dll" />
<file src="build/ILMerge.props" target="build/" />
<file src="../ilmerge-manual.md" target="docs/" />
</files>
</package>
``` | /content/code_sandbox/ILMerge/ILMerge.nuspec | xml | 2016-09-08T23:12:32 | 2024-08-16T08:39:08 | ILMerge | dotnet/ILMerge | 1,224 | 400 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Behavior Version="5" NoError="true">
<Node Class="Behaviac.Design.Nodes.Behavior" AgentType="AgentNodeTest" Domains="" Enable="true" HasOwnPrefabData="false" Id="-1" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
<Parameters>
<Parameter Name="_$local_task_param_$_0" Type="System.Int32" DefaultValue="0" DisplayName="param0" Desc="_$local_task_param_$_0" Display="false" />
</Parameters>
<DescriptorRefs value="0:" />
<Connector Identifier="GenericChildren">
<Node Class="PluginBehaviac.Nodes.Sequence" Enable="true" HasOwnPrefabData="false" Id="0" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
<Connector Identifier="GenericChildren">
<Node Class="PluginBehaviac.Nodes.Assignment" CastRight="false" Enable="true" HasOwnPrefabData="false" Id="4" Opl="int Self.AgentNodeTest::testVar_0" Opr="const int 1" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
</Node>
<Node Class="PluginBehaviac.Nodes.Condition" Enable="true" HasOwnPrefabData="false" Id="1" Operator="Equal" Opl="int Self.AgentNodeTest::testVar_0" Opr="const int 1" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
</Node>
<Node Class="PluginBehaviac.Nodes.End" Enable="true" EndOutside="false" EndStatus="const behaviac::EBTStatus BT_SUCCESS" HasOwnPrefabData="false" Id="3" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
</Node>
<Node Class="PluginBehaviac.Nodes.Action" Enable="true" HasOwnPrefabData="false" Id="2" Method="Self.AgentNodeTest::setTestVar_0(2)" PrefabName="" PrefabNodeId="-1" ResultFunctor="""" ResultOption="BT_SUCCESS">
<Comment Background="NoColor" Text="" />
</Node>
</Connector>
</Node>
</Connector>
</Node>
</Behavior>
``` | /content/code_sandbox/integration/unity/Assets/behaviac/workspace/behaviors/node_test/end_ut_0.xml | xml | 2016-11-21T05:08:08 | 2024-08-16T07:18:30 | behaviac | Tencent/behaviac | 2,831 | 536 |
```xml
type Operator = '+' | '-';
const operators = Object.freeze(new Set(['+', '-']));
const left = 'left';
const right = 'right';
const operator = 'operator';
const plus = '+';
const min = '-';
const defaultOperator = plus;
export class MathComponent extends HTMLElement {
#left = 0;
#right = 0;
#operator: Operator = defaultOperator;
static observedAttributes = [left, right];
connectedCallback() {
this.left = this.getAttribute(left) ?? 0;
this.right = this.getAttribute(right) ?? 0;
this.operator = this.getAttribute(operator) ?? defaultOperator;
this.render();
}
attributeChangedCallback(name: string, _: string, newValue: string) {
if (name === left) {
this.left = newValue;
}
if (name === right) {
this.right = newValue;
}
if (name === operator) {
this.operator = newValue;
}
}
public get left(): number {
return this.#left;
}
public set left(value: string | number) {
this.#left = +value;
}
public get right(): number {
return this.#right;
}
public set right(value: string | number) {
this.#right = +value;
this.render();
}
public get operator(): Operator {
return this.#operator;
}
public set operator(value: string) {
if (operators.has(value)) {
this.#operator = value as Operator;
} else {
throw new Error(`Value "${value}" is not a supported operator`);
}
this.render();
}
private get answer() {
switch (this.#operator) {
case plus:
return this.left + this.right;
case min:
return this.left - this.right;
}
}
public render() {
this.innerText = `${this.left} ${this.operator} ${this.right} = ${this.answer}`;
}
}
customElements.define('my-math', MathComponent);
declare global {
interface HTMLElementTagNameMap {
'my-math': MathComponent;
}
}
``` | /content/code_sandbox/packages/vitest-runner/testResources/browser-project/src/math.component.orig.ts | xml | 2016-02-12T13:14:28 | 2024-08-15T18:38:25 | stryker-js | stryker-mutator/stryker-js | 2,561 | 452 |
```xml
import startPlugin from '@erxes/api-utils/src/start-plugin/index';
import configs from './configs';
startPlugin(configs);
process.on('unhandledRejection', function(reason, p) {
console.log('Unhandled', reason, p); // log all your errors, "unsuppressing" them.
throw reason; // optional, in case you want to treat these as errors
});
``` | /content/code_sandbox/packages/plugin-imap-api/src/index.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 82 |
```xml
import { Injectable } from '@angular/core';
import { Nullable } from 'primeng/ts-helpers';
import { Subject } from 'rxjs';
@Injectable()
export class ContextMenuService {
private activeItemKeyChange = new Subject<string>();
activeItemKeyChange$ = this.activeItemKeyChange.asObservable();
activeItemKey: Nullable<string>;
changeKey(key: string) {
this.activeItemKey = key;
this.activeItemKeyChange.next(this.activeItemKey as string);
}
reset() {
this.activeItemKey = null;
this.activeItemKeyChange.next(this.activeItemKey as any);
}
}
``` | /content/code_sandbox/src/app/components/api/contextmenuservice.ts | xml | 2016-01-16T09:23:28 | 2024-08-16T19:58:20 | primeng | primefaces/primeng | 9,969 | 133 |
```xml
<Weavers xmlns:xsi="path_to_url" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<AutoProperties />
<Throttle />
</Weavers>
``` | /content/code_sandbox/src/ResXManager.VSIX.Compatibility.x86/FodyWeavers.xml | xml | 2016-06-03T12:04:15 | 2024-08-15T21:49:16 | ResXResourceManager | dotnet/ResXResourceManager | 1,299 | 39 |
```xml
import { AppProfile } from './app-profile';
describe('app-profile', () => {
it('builds', () => {
expect(new AppProfile()).toBeTruthy();
});
describe('normalization', () => {
it('returns a blank string if the name is undefined', () => {
const component = new AppProfile();
expect(component.normalize(undefined)).toEqual('');
});
it('returns a blank string if the name is null', () => {
const component = new AppProfile();
expect(component.normalize(null)).toEqual('');
});
it('capitalizes the first letter', () => {
const component = new AppProfile();
expect(component.normalize('quincy')).toEqual('Quincy');
});
it('lower-cases the following letters', () => {
const component = new AppProfile();
expect(component.normalize('JOSEPH')).toEqual('Joseph');
});
it('handles single letter names', () => {
const component = new AppProfile();
expect(component.normalize('q')).toEqual('Q');
});
});
});
``` | /content/code_sandbox/examples/stencil/src/components/app-profile/app-profile.spec.ts | xml | 2016-09-09T01:12:08 | 2024-08-16T17:39:45 | vercel | vercel/vercel | 12,545 | 221 |
```xml
import LRU from "@graphile/lru";
/**
* Returns a function that returns the (first, if multiple equal matches) type
* from mediaTypes that best matches the accept query specified by the given
* `acceptHeader`. If no Accept header is present then the first mediaType will
* be returned. If no match is possible, `null` will be returned.
*/
export function makeAcceptMatcher(mediaTypes: string[]) {
const typeDigests: TypeDigest[] = mediaTypes.map((t) => {
// NOTE: this parsing is super lazy and isn't 100% reliable; e.g. it could
// be broken by `foo/bar;baz="\\";frog"`. We're only handling values passed
// by our own code though, and we ain't passing this kind of nonsense.
const [spec, ...params] = t.split(";");
const parameters = Object.create(null);
for (const param of params) {
const [key, val] = param.split("=");
parameters[key] = val;
}
const [type, subtype] = spec.split("/");
return {
type,
subtype,
parameters,
q: 1,
originalType: t,
noParams: Object.keys(parameters).length === 0,
};
});
const lru = new LRU({ maxLength: 50 });
return function preferredAccept(
acceptHeader: string | undefined,
): string | null {
if (acceptHeader === undefined) {
return mediaTypes[0];
}
const existing = lru.get(acceptHeader);
if (existing !== undefined) {
return existing;
} else {
const specs = parseAccepts(acceptHeader);
// Find the first spec that matches each, then pick the one with the
// highest q.
let bestQ = 0;
let bestMediaType: string | null = null;
for (const digest of typeDigests) {
const highestPrecedenceSpecMatch = specs.find((spec) => {
return (
(spec.type === "*" ||
(spec.type === digest.type &&
(spec.subtype === "*" || spec.subtype === digest.subtype))) &&
(spec.noParams ||
(!digest.noParams &&
matchesParameters(spec.parameters, digest.parameters)))
);
});
if (highestPrecedenceSpecMatch) {
if (bestMediaType === null || highestPrecedenceSpecMatch.q > bestQ) {
bestQ = highestPrecedenceSpecMatch.q;
bestMediaType = digest.originalType;
}
}
}
lru.set(acceptHeader, bestMediaType);
return bestMediaType;
}
};
}
function matchesParameters(
required: Record<string, string>,
given: Record<string, string>,
) {
for (const key in required) {
if (given[key] !== required[key]) {
return false;
}
}
return true;
}
interface Accept {
type: string;
subtype: string;
parameters: Record<string, string>;
q: number;
/** Optimization: true if parameters has no keys */
noParams: boolean;
}
interface TypeDigest extends Accept {
originalType: string;
}
const SPACE = " ".charCodeAt(0);
const HORIZONTAL_TAB = "\t".charCodeAt(0);
const ASTERISK = "*".charCodeAt(0);
const SLASH = "/".charCodeAt(0);
const COMMA = ",".charCodeAt(0);
const SEMICOLON = ";".charCodeAt(0);
const EQUALS = "=".charCodeAt(0);
const DOUBLE_QUOTE = '"'.charCodeAt(0);
const BACKSLASH = "\\".charCodeAt(0);
const DEL = 0x7f;
/*
* Whitespace:
* 9 (tab)
* 10 (line feed)
* 11 (vertical tab)
* 12 (form feed)
* 13 (carriage return)
* 32 (space)
*/
const WHITESPACE_START = 9;
const WHITESPACE_END = 13;
/** We're more forgiving in whitespace in most cases */
function isWhitespace(charCode: number) {
return (
charCode === SPACE ||
(charCode >= WHITESPACE_START && charCode <= WHITESPACE_END)
);
}
/** is Optional White Space */
function isOWS(charCode: number) {
return charCode === SPACE || charCode === HORIZONTAL_TAB;
}
/*
"!" / "#" / "$" / "%" / "&" / "'" / "*"
/ "+" / "-" / "." / "^" / "_" / "`" / "|" / "~"
/ DIGIT / ALPHA
33|35-39|42|43|45-57|65-90|94-122|124|126
>=33 && <= 126 && !34|40|41|44|58-64|91-93|123|125
*/
// Matches ordered from most likely to least likely for content types.
function isToken(charCode: number) {
return (
// ^_`a-z
(charCode >= 94 && charCode <= 122) ||
// symbols and numbers
(charCode >= 35 &&
charCode <= 57 &&
charCode !== 40 &&
charCode !== 41 &&
charCode !== 44) ||
// A-Z
(charCode >= 65 && charCode <= 90) ||
// !
charCode === 33 ||
// |
charCode === 124 ||
// ~
charCode === 126
);
}
enum State {
EXPECT_TYPE = 0,
CONTINUE_TYPE = 1,
EXPECT_SUBTYPE = 2,
CONTINUE_SUBTYPE = 3,
EXPECT_COMMA_OR_SEMICOLON = 4,
EXPECT_PARAMETER_NAME = 5,
CONTINUE_PARAMETER_NAME = 6,
EXPECT_PARAMETER_VALUE = 7,
CONTINUE_PARAMETER_VALUE = 8,
CONTINUE_QUOTED_PARAMETER_VALUE = 9,
}
// PERF: we could increase the speed of this significantly by checking the
// type/subtype against the supported types/subtypes, and if a match is not
// found then skip `i` right up to the next `,` without adding the entry to
// `accepts`
/**
* Parser based on path_to_url#rfc.section.12.5.1
*
* @remarks
*
* Why must you always write your own parsers, Benjie?
*/
function parseAccepts(acceptHeader: string) {
const accepts: Accept[] = [];
let state = State.EXPECT_TYPE;
let currentAccept: Accept | null = null;
let currentParameterName = "";
let currentParameterValue = "";
function next() {
if (currentAccept!.parameters.q) {
const q = parseFloat(currentAccept!.parameters.q);
if (Number.isNaN(q) || q < 0 || q > 1) {
throw new Error("q out of range");
}
delete currentAccept!.parameters.q;
currentAccept!.q = q;
}
accepts.push(currentAccept!);
currentAccept = null;
state = State.EXPECT_TYPE;
}
for (let i = 0, l = acceptHeader.length; i < l; i++) {
const charCode = acceptHeader.charCodeAt(i);
switch (state) {
case State.EXPECT_TYPE: {
if (/*@__INLINE__*/ isWhitespace(charCode)) {
continue;
} else if (charCode === ASTERISK) {
// `*/*`
currentAccept = {
type: "*",
subtype: "*",
q: 1,
parameters: Object.create(null),
noParams: true,
};
const nextCharCode = acceptHeader.charCodeAt(++i);
if (nextCharCode !== SLASH) {
throw new Error("Expected '/' after '*'");
}
const nextNextCharCode = acceptHeader.charCodeAt(++i);
if (nextNextCharCode !== ASTERISK) {
throw new Error("Expected '*' after '*/'");
}
state = State.EXPECT_COMMA_OR_SEMICOLON;
} else if (/*@__INLINE__*/ isToken(charCode)) {
currentAccept = {
type: acceptHeader[i],
subtype: "",
q: 1,
parameters: Object.create(null),
noParams: true,
};
state = State.CONTINUE_TYPE;
} else {
throw new Error(`Unexpected character '${acceptHeader[i]}'`);
}
break;
}
case State.CONTINUE_TYPE: {
if (charCode === SLASH) {
state = State.EXPECT_SUBTYPE;
} else if (/*@__INLINE__*/ isToken(charCode)) {
currentAccept!.type += acceptHeader[i];
} else {
throw new Error(`Unexpected character '${acceptHeader[i]}'`);
}
break;
}
case State.EXPECT_SUBTYPE: {
if (charCode === ASTERISK) {
currentAccept!.subtype = "*";
state = State.EXPECT_COMMA_OR_SEMICOLON;
} else if (/*@__INLINE__*/ isToken(charCode)) {
currentAccept!.subtype = acceptHeader[i];
state = State.CONTINUE_SUBTYPE;
} else {
throw new Error(`Unexpected character '${acceptHeader[i]}'`);
}
break;
}
case State.CONTINUE_SUBTYPE: {
if (charCode === SEMICOLON) {
// Parameters
state = State.EXPECT_PARAMETER_NAME;
} else if (charCode === COMMA) {
/*@__INLINE__*/ next();
} else if (/*@__INLINE__*/ isToken(charCode)) {
currentAccept!.subtype += acceptHeader[i];
} else if (/*@__INLINE__*/ isWhitespace(charCode)) {
state = State.EXPECT_COMMA_OR_SEMICOLON;
} else {
throw new Error(`Unexpected character '${acceptHeader[i]}'`);
}
break;
}
case State.EXPECT_COMMA_OR_SEMICOLON: {
if (/*@__INLINE__*/ isWhitespace(charCode)) {
continue;
} else if (charCode === SEMICOLON) {
state = State.EXPECT_PARAMETER_NAME;
} else if (charCode === COMMA) {
/*@__INLINE__*/ next();
} else {
throw new Error(`Unexpected character '${acceptHeader[i]}'`);
}
break;
}
case State.EXPECT_PARAMETER_NAME: {
if (charCode === SEMICOLON) {
continue;
} else if (charCode === COMMA) {
/*@__INLINE__*/ next();
continue;
} else if (/*@__INLINE__*/ isOWS(charCode)) {
continue;
} else if (/*@__INLINE__*/ isToken(charCode)) {
currentParameterName = acceptHeader[i];
currentParameterValue = "";
state = State.CONTINUE_PARAMETER_NAME;
} else {
throw new Error(`Unexpected character '${acceptHeader[i]}'`);
}
break;
}
case State.CONTINUE_PARAMETER_NAME: {
if (charCode === EQUALS) {
state = State.EXPECT_PARAMETER_VALUE;
/*
if (currentAccept?.parameters[currentParameterName]) {
throw new Error("Overriding parameter!");
}
*/
// "q" is not a valid parameter name; it's just used for weighting.
if (currentParameterName !== "q") {
currentAccept!.noParams = false;
}
} else if (/*@__INLINE__*/ isToken(charCode)) {
currentParameterName += acceptHeader[i];
} else {
throw new Error(`Unexpected character '${acceptHeader[i]}'`);
}
break;
}
case State.EXPECT_PARAMETER_VALUE: {
if (charCode === DOUBLE_QUOTE) {
state = State.CONTINUE_QUOTED_PARAMETER_VALUE;
} else if (/*@__INLINE__*/ isToken(charCode)) {
state = State.CONTINUE_PARAMETER_VALUE;
currentParameterValue += acceptHeader[i];
} else {
throw new Error(`Unexpected character '${acceptHeader[i]}'`);
}
break;
}
case State.CONTINUE_QUOTED_PARAMETER_VALUE: {
if (charCode === DOUBLE_QUOTE) {
currentAccept!.parameters[currentParameterName] =
currentParameterValue;
state = State.EXPECT_COMMA_OR_SEMICOLON;
} else if (charCode === BACKSLASH) {
if (++i === l) {
throw new Error(`Unexpected terminating backslash`);
}
// From the spec:
//
// > A sender SHOULD NOT generate a quoted-pair in a quoted-string
// > except where necessary to quote DQUOTE and backslash octets
// > occurring within that string. A sender SHOULD NOT generate a
// > quoted-pair in a comment except where necessary to quote
// > parentheses ["(" and ")"] and backslash octets occurring within
// > that comment.
//
// i.e. this isn't for `\n` and `\t` and similar, those would just
// come out as "n" and "t" in the output. This is specifically for
// escaping quote marks, parenthesis, backslashes.
// Respect `quoted-pair = "\" ( HTAB / SP / VCHAR / obs-text )`
if (
charCode === HORIZONTAL_TAB ||
(charCode >= 0x20 && charCode <= 0xff && charCode !== DEL)
) {
currentParameterValue += acceptHeader[i];
} else {
throw new Error(
`Unexpected escaped character with code '${charCode}' at position ${i}`,
);
}
} else {
// Respect `qdtext = HTAB / SP / %x21 / %x23-5B / %x5D-7E / obs-text`
// 0x09 0x20-0xff !0x22=`"` !0x5c=`\` !0x7f=DEL
if (
charCode === HORIZONTAL_TAB ||
(charCode >= 0x20 &&
charCode <= 0xff &&
/* charCode !== DOUBLE_QUOTE && */
/* charCode !== BACKSLASH && */
charCode !== DEL)
) {
currentParameterValue += acceptHeader[i];
} else {
throw new Error(
`Unexpected character with code '${charCode}' at position ${i}.`,
);
}
}
break;
}
case State.CONTINUE_PARAMETER_VALUE: {
if (charCode === SEMICOLON) {
currentAccept!.parameters[currentParameterName] =
currentParameterValue;
// Parameters
state = State.EXPECT_PARAMETER_NAME;
} else if (charCode === COMMA) {
currentAccept!.parameters[currentParameterName] =
currentParameterValue;
/*@__INLINE__*/ next();
} else if (/*@__INLINE__*/ isToken(charCode)) {
currentParameterValue += acceptHeader[i];
} else {
throw new Error(`Unexpected character '${acceptHeader[i]}'`);
}
break;
}
default: {
const never: never = state;
throw new Error(`Unhandled state '${never}'`);
}
}
}
// Now finish parsing
switch (state) {
case State.EXPECT_TYPE:
case State.CONTINUE_SUBTYPE:
case State.EXPECT_COMMA_OR_SEMICOLON: {
/*@__INLINE__*/ next();
break;
}
case State.CONTINUE_PARAMETER_VALUE: {
currentAccept!.parameters[currentParameterName] = currentParameterValue;
/*@__INLINE__*/ next();
break;
}
case State.CONTINUE_TYPE: {
throw new Error("Invalid 'accept' header, expected slash");
}
case State.EXPECT_SUBTYPE: {
throw new Error("Invalid 'accept' header, expected subtype");
}
case State.EXPECT_PARAMETER_NAME: {
throw new Error("Invalid 'accept' header, expected parameter name");
}
case State.CONTINUE_PARAMETER_NAME: {
throw new Error("Invalid 'accept' header, expected parameter value");
}
case State.EXPECT_PARAMETER_VALUE: {
throw new Error("Invalid 'accept' header, expected parameter value");
}
case State.CONTINUE_QUOTED_PARAMETER_VALUE: {
throw new Error("Invalid 'accept' header, expected closing quote");
}
default: {
const never: never = state;
throw new Error(`Unhandled terminal state '${never}'`);
}
}
// Sort `accepts` by precedence. Precedence is how accurate the match is:
// a/b;c=d
// a/b
// a/*
// */*
const score = (accept: Accept) => {
let val = 0;
if (accept.type !== "*") {
val += 1_000;
}
if (accept.subtype !== "*") {
val += 1_000_000;
}
val += Object.keys(accept.parameters).length;
return val;
};
accepts.sort((a, z) => {
const scoreA = score(a);
const scoreZ = score(z);
return scoreZ - scoreA;
});
return accepts;
}
``` | /content/code_sandbox/grafast/grafserv/src/accept.ts | xml | 2016-04-14T21:29:19 | 2024-08-16T17:12:51 | crystal | graphile/crystal | 12,539 | 3,675 |
```xml
/*
* one or more contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright ownership.
*/
import {InlineLoadingStatus} from '@carbon/react';
import {t} from 'i18next';
function getCompletionButtonDescription(status: InlineLoadingStatus) {
if (status === 'active') {
return t('taskDetailsCompletingTaskMessage');
}
if (status === 'error') {
return t('taskDetailsCompletionFailedMessage');
}
if (status === 'finished') {
return t('taskDetailsCompletedTaskMessage');
}
return undefined;
}
export {getCompletionButtonDescription};
``` | /content/code_sandbox/tasklist/client/src/modules/utils/getCompletionButtonDescription.tsx | xml | 2016-03-20T03:38:04 | 2024-08-16T19:59:58 | camunda | camunda/camunda | 3,172 | 137 |
```xml
<dict>
<key>CommonPeripheralDSP</key>
<array>
<dict>
<key>DeviceID</key>
<integer>0</integer>
<key>DeviceType</key>
<string>Headphone</string>
</dict>
<dict>
<key>DeviceID</key>
<integer>0</integer>
<key>DeviceType</key>
<string>Microphone</string>
</dict>
</array>
<key>PathMaps</key>
<array>
<dict>
<key>PathMap</key>
<array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<true/>
</dict>
<key>NodeID</key>
<integer>9</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>34</integer>
</dict>
<dict>
<key>Boost</key>
<integer>1</integer>
<key>NodeID</key>
<integer>24</integer>
</dict>
</array>
</array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<true/>
</dict>
<key>NodeID</key>
<integer>9</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>34</integer>
</dict>
<dict>
<key>Boost</key>
<integer>1</integer>
<key>NodeID</key>
<integer>25</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>NodeID</key>
<integer>27</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<false/>
<key>PublishVolume</key>
<false/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>38</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<false/>
<key>PublishMute</key>
<false/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>37</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<true/>
</dict>
<key>NodeID</key>
<integer>8</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>35</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>26</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>NodeID</key>
<integer>20</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<false/>
<key>PublishVolume</key>
<false/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>12</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<false/>
<key>PublishMute</key>
<false/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>2</integer>
</dict>
</array>
</array>
</array>
</array>
<key>PathMapID</key>
<integer>40</integer>
</dict>
</array>
</dict>
``` | /content/code_sandbox/Resources/ALC887/Platforms40.xml | xml | 2016-03-07T20:45:58 | 2024-08-14T08:57:03 | AppleALC | acidanthera/AppleALC | 3,420 | 2,164 |
```xml
import { getUntilProperty, propertyToUTCDate } from '@proton/shared/lib/calendar/vcalConverter';
import { getPropertyTzid } from '@proton/shared/lib/calendar/vcalHelper';
import { getIsAllDay } from '@proton/shared/lib/calendar/veventHelper';
import { toUTCDate } from '@proton/shared/lib/date/timezone';
import type { VcalRruleProperty, VcalVeventComponent } from '@proton/shared/lib/interfaces/calendar/VcalModel';
export const getSafeRruleCount = (rrule: VcalRruleProperty, newCount: number) => {
if (newCount < 1) {
return;
}
return {
...rrule,
value: {
...rrule.value,
count: newCount,
},
};
};
export const getSafeRruleUntil = (rrule: VcalRruleProperty, component: VcalVeventComponent) => {
const { dtstart } = component;
if (!rrule.value.until) {
throw new Error('Until required');
}
const originalUntilDateTime = toUTCDate(rrule.value.until);
const newStartTime = propertyToUTCDate(dtstart);
// If the event was moved after the until date, fixup the until
if (newStartTime > originalUntilDateTime) {
const until = getUntilProperty(dtstart.value, getIsAllDay(component), getPropertyTzid(dtstart));
return {
...rrule,
value: {
...rrule.value,
until,
},
};
}
return rrule;
};
``` | /content/code_sandbox/applications/calendar/src/app/containers/calendar/recurrence/helper.ts | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 339 |
```xml
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { getUnixTime } from 'date-fns';
import { c } from 'ttag';
import { ButtonLike, Href } from '@proton/atoms';
import {
AppLink,
Banner,
CalendarEventDateHeader,
Icon,
IconRow,
useAddresses,
useApi,
useContactEmails,
useGetAddressKeys,
useGetAddresses,
useGetCalendarEventRaw,
useGetCalendars,
useNotifications,
} from '@proton/components';
import { BannerBackgroundColor } from '@proton/components/components/banner/Banner';
import { useLinkHandler } from '@proton/components/hooks/useLinkHandler';
import useIsMounted from '@proton/hooks/useIsMounted';
import { getEvent } from '@proton/shared/lib/api/calendars';
import { getPaginatedEventsByUID } from '@proton/shared/lib/calendar/api';
import {
getCalendarWithReactivatedKeys,
getDoesCalendarNeedUserAction,
getVisualCalendars,
} from '@proton/shared/lib/calendar/calendar';
import { getSelfAddressData } from '@proton/shared/lib/calendar/deserialize';
import { getDisplayTitle } from '@proton/shared/lib/calendar/helper';
import { getParticipant } from '@proton/shared/lib/calendar/mailIntegration/invite';
import { getOccurrencesBetween } from '@proton/shared/lib/calendar/recurrence/recurring';
import { restrictedCalendarSanitize } from '@proton/shared/lib/calendar/sanitize';
import urlify from '@proton/shared/lib/calendar/urlify';
import { getIsEventCancelled } from '@proton/shared/lib/calendar/veventHelper';
import { APPS, CALENDAR_APP_NAME, SECOND } from '@proton/shared/lib/constants';
import { toUTCDate } from '@proton/shared/lib/date/timezone';
import { getKnowledgeBaseUrl } from '@proton/shared/lib/helpers/url';
import type { CalendarEvent, VcalVeventComponent, VisualCalendar } from '@proton/shared/lib/interfaces/calendar';
import type { Message } from '@proton/shared/lib/interfaces/mail/Message';
import { getParsedHeadersFirstValue } from '@proton/shared/lib/mail/messages';
import { useContactsMap } from 'proton-mail/hooks/contact/useContacts';
import useMailModel from 'proton-mail/hooks/useMailModel';
import { getEventLocalStartEndDates } from '../../../../helpers/calendar/emailReminder';
import { getParticipantsList } from '../../../../helpers/calendar/invite';
import type { MessageErrors } from '../../../../store/messages/messagesTypes';
import EmailReminderWidgetSkeleton from './EmailReminderWidgetSkeleton';
import EventReminderBanner from './EventReminderBanner';
import ExtraEventParticipants from './ExtraEventParticipants';
import OpenInCalendarButton from './OpenInCalendarButton';
import useCalendarWidgetDrawerEvents from './useCalendarWidgetDrawerEvents';
import './CalendarWidget.scss';
const EVENT_NOT_FOUND_ERROR = 'EVENT_NOT_FOUND';
const DECRYPTION_ERROR = 'DECRYPTION_ERROR';
interface EmailReminderWidgetProps {
message: Pick<Message, 'ID' | 'ParsedHeaders'>;
errors?: MessageErrors;
}
const EmailReminderWidget = ({ message, errors }: EmailReminderWidgetProps) => {
const mailSettings = useMailModel('MailSettings');
const eventReminderRef = useRef<HTMLDivElement>(null);
const calendarIdHeader = getParsedHeadersFirstValue(message, 'X-Pm-Calendar-Calendarid');
const eventIdHeader = getParsedHeadersFirstValue(message, 'X-Pm-Calendar-Eventid');
const occurrenceHeader = getParsedHeadersFirstValue(message, 'X-Pm-Calendar-Occurrence');
const sequenceHeader = getParsedHeadersFirstValue(message, 'X-Pm-Calendar-Sequence');
const eventUIDHeader = getParsedHeadersFirstValue(message, 'X-Pm-Calendar-Eventuid');
const eventIsRecurringHeader = getParsedHeadersFirstValue(message, 'X-Pm-Calendar-Eventisrecurring');
const recurrenceIdHeader = getParsedHeadersFirstValue(message, 'X-Pm-Calendar-Recurrenceid');
const [vevent, setVevent] = useState<VcalVeventComponent>();
const [calendar, setCalendar] = useState<VisualCalendar>();
const [addresses] = useAddresses();
const getAddresses = useGetAddresses();
const [calendarEvent, setCalendarEvent] = useState<CalendarEvent>();
const [isLoading, setIsLoading] = useState(false);
const [error, setError] = useState<React.ReactNode>(null);
const [loadedWidget, setLoadedWidget] = useState<string>();
const [refreshCount, setRefreshCount] = useState<number>(0);
const { createNotification } = useNotifications();
const api = useApi();
const contactsMap = useContactsMap();
const getCalendarEventRaw = useGetCalendarEventRaw(contactsMap);
const contactEmails = useContactEmails()[0] || [];
const getCalendars = useGetCalendars();
const getAddressKeys = useGetAddressKeys();
const isMounted = useIsMounted();
// setters don't need to be listed as dependencies in a callback
const refresh = useCallback(() => {
if (isMounted()) {
setLoadedWidget('');
setRefreshCount((count) => count + 1);
}
}, []);
const messageHasDecryptionError = !!errors?.decryption?.length;
const { modal: linkModal } = useLinkHandler(eventReminderRef, mailSettings);
useCalendarWidgetDrawerEvents({
messageID: message.ID,
calendarEvent,
refresh,
});
useEffect(() => {
void (async () => {
if (
!calendarIdHeader ||
!eventIdHeader ||
!occurrenceHeader ||
!sequenceHeader ||
messageHasDecryptionError
) {
// widget should not be displayed under these circumstances
// clear up React states in case this component does not unmount when opening new emails
setError(null);
setLoadedWidget('');
return;
}
if (loadedWidget === message.ID) {
return;
}
let calendarData;
try {
setError(null);
setIsLoading(true);
const occurrence = parseInt(`${occurrenceHeader}`, 10);
const fetchEvent = async (
byUID = eventIsRecurringHeader === '1'
): Promise<{ Event: CalendarEvent }> => {
// We need to fall back to UID search for
// - recurring events, to detect deleted and modified occurrences
// - when the calendar is changed, since the other route relies on the calendar id
if (byUID) {
const allEventsByUID = await getPaginatedEventsByUID({
api,
uid: `${eventUIDHeader}`,
recurrenceID: recurrenceIdHeader ? parseInt(recurrenceIdHeader, 10) : undefined,
});
if (!allEventsByUID.length) {
throw new Error(EVENT_NOT_FOUND_ERROR);
}
const sameCalendarEvents = allEventsByUID.filter(
({ CalendarID }) => CalendarID === calendarIdHeader
);
const events = sameCalendarEvents.length ? sameCalendarEvents : allEventsByUID;
if (events.find(({ Exdates }) => Exdates.includes(occurrence))) {
throw new Error(EVENT_NOT_FOUND_ERROR);
}
const currentEvent = events.find(({ RecurrenceID }) => RecurrenceID === occurrence);
if (currentEvent) {
return { Event: currentEvent };
}
const baseEvent = events.filter(({ RecurrenceID }) => !RecurrenceID)[0];
if (baseEvent) {
return { Event: baseEvent };
}
return { Event: events[0] };
}
return api<{ Event: CalendarEvent }>({
...getEvent(calendarIdHeader, eventIdHeader),
silence: true,
}).catch(() => {
return fetchEvent(true);
});
};
const [{ Event }, calendarsWithMembers = []] = await Promise.all([fetchEvent(), getCalendars()]);
const calendars = getVisualCalendars(calendarsWithMembers);
const calendar = calendars.find(({ ID }) => ID === Event.CalendarID);
const addresses = await getAddresses();
// We cannot be sure that setCalendar has finished when reaching the catch
calendarData = calendar
? await getCalendarWithReactivatedKeys({ calendar, api, addresses, getAddressKeys })
: calendar;
if (!isMounted()) {
return;
}
setCalendar(calendarData);
const { veventComponent } = await getCalendarEventRaw(Event).catch(() => {
throw new Error(DECRYPTION_ERROR);
});
if (!isMounted()) {
return;
}
const { until, count } = veventComponent.rrule?.value || {};
const jsOccurrence = occurrence * SECOND;
const isUntilExpired = until ? occurrence > getUnixTime(toUTCDate(until)) : false;
const isCountExpired =
count !== undefined
? !getOccurrencesBetween(veventComponent, jsOccurrence, jsOccurrence).length
: false;
if (isUntilExpired || isCountExpired) {
throw new Error(EVENT_NOT_FOUND_ERROR);
}
setCalendarEvent(Event);
setVevent(veventComponent);
} catch (error: any) {
if (!(error instanceof Error)) {
createNotification({ type: 'error', text: 'Unknown error' });
}
if (!isMounted()) {
return;
}
if (calendarData && error.message === DECRYPTION_ERROR) {
const shouldShowAction = getDoesCalendarNeedUserAction(calendarData);
if (shouldShowAction) {
const learnMoreLink = (
<Href
href={getKnowledgeBaseUrl('/restoring-encrypted-calendar')}
className="link align-baseline"
key="learn-more"
>
{c('Action').t`Learn more`}
</Href>
);
setError(
<Banner
icon="key"
action={
<ButtonLike
as={AppLink}
toApp={APPS.PROTONCALENDAR}
to="/"
color="norm"
className="shrink-0"
>
<div className="flex items-center">
<span className="mr-3">{c('Action').t`Open ${CALENDAR_APP_NAME}`}</span>
<Icon name="arrow-out-square" />
</div>
</ButtonLike>
}
>
{c('Email reminder decryption error')
.jt`Event details are encrypted. Sign in again to restore Calendar and decrypt your data. ${learnMoreLink}`}
</Banner>
);
return;
}
const whyNotLink = (
<Href href={getKnowledgeBaseUrl('/restoring-encrypted-calendar')} key="learn-more">
{c('Action').t`Why not?`}
</Href>
);
setError(
<Banner icon="exclamation-circle" backgroundColor={BannerBackgroundColor.DANGER}>
{c('Email reminder decryption error').jt`Event details cannot be decrypted. ${whyNotLink}`}
</Banner>
);
return;
}
if (error.message === EVENT_NOT_FOUND_ERROR) {
setError(
<Banner icon="exclamation-circle" backgroundColor={BannerBackgroundColor.DANGER}>
{c('Email reminder error').t`Event is no longer in your calendar`}
</Banner>
);
return;
}
createNotification({ type: 'error', text: error.message });
} finally {
if (isMounted()) {
setIsLoading(false);
setLoadedWidget(message.ID);
}
}
})();
}, [calendarIdHeader, eventIdHeader, messageHasDecryptionError, message.ID, refreshCount]);
const sanitizedAndUrlifiedLocation = useMemo(() => {
const trimmedLocation = vevent?.location?.value?.trim();
if (!trimmedLocation) {
return null;
}
return restrictedCalendarSanitize(urlify(trimmedLocation));
}, [vevent]);
if (isLoading) {
return <EmailReminderWidgetSkeleton />;
}
if (error && !messageHasDecryptionError) {
return <>{error}</>;
}
if (
!calendarEvent ||
!vevent ||
!calendar ||
!calendarIdHeader ||
!eventIdHeader ||
!occurrenceHeader ||
!sequenceHeader ||
messageHasDecryptionError
) {
return null;
}
const { summary, organizer, attendee, sequence } = vevent;
const { FullDay } = calendarEvent;
const { Name } = calendar;
const selfAddressData = getSelfAddressData({
organizer,
attendees: attendee,
addresses,
});
const organizerParticipant = organizer
? getParticipant({ participant: organizer, contactEmails, ...selfAddressData })
: undefined;
const participants = attendee
? attendee.map((participant) => getParticipant({ participant, contactEmails, ...selfAddressData }))
: undefined;
const participantsList = getParticipantsList(participants, organizerParticipant);
const [startDate, endDate] = getEventLocalStartEndDates(calendarEvent, parseInt(occurrenceHeader, 10));
const isOutdated = (sequence?.value || 0) > parseInt(`${sequenceHeader}`, 10);
const labelClassName = 'inline-flex pt-0.5';
return (
<div className="calendar-widget mb-3" ref={eventReminderRef}>
<EventReminderBanner
startDate={startDate}
endDate={endDate}
isAllDay={!!FullDay}
isCanceled={getIsEventCancelled(calendarEvent)}
isOutdated={isOutdated}
/>
{!isOutdated && (
<div className="rounded border bg-norm overflow-auto">
<div className="p-5">
<h2 className="h3 mb-1 text-bold">{getDisplayTitle(summary?.value)}</h2>
<CalendarEventDateHeader
className="text-lg mt-0 mb-3"
startDate={startDate}
endDate={endDate}
isAllDay={!!FullDay}
/>
<OpenInCalendarButton
linkString={c('Link to calendar event').t`Open in ${CALENDAR_APP_NAME}`}
calendarID={calendarEvent?.CalendarID || calendarIdHeader}
eventID={calendarEvent?.ID || eventIdHeader}
recurrenceID={parseInt(occurrenceHeader, 10)}
/>
</div>
<hr className="m-0" />
<div className="p-5">
<IconRow title={c('Label').t`Calendar`} icon="calendar-grid" labelClassName={labelClassName}>
<span className="text-break">{Name}</span>
</IconRow>
{!!sanitizedAndUrlifiedLocation && (
<IconRow title={c('Label').t`Location`} icon="map-pin" labelClassName={labelClassName}>
<span dangerouslySetInnerHTML={{ __html: sanitizedAndUrlifiedLocation }} />
</IconRow>
)}
{!!participantsList.length && (
<IconRow title={c('Label').t`Participants`} icon="users" labelClassName={labelClassName}>
<ExtraEventParticipants list={participantsList} />
</IconRow>
)}
</div>
</div>
)}
{linkModal}
</div>
);
};
export default EmailReminderWidget;
``` | /content/code_sandbox/applications/mail/src/app/components/message/extras/calendar/EmailReminderWidget.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 3,245 |
```xml
import { CircularProgress } from "@mui/material";
import React from "react";
const Loading = ({ loading }: { loading: boolean }) =>
loading ? <CircularProgress color="primary" /> : null;
export default Loading;
``` | /content/code_sandbox/python/ray/dashboard/client/src/components/Loading.tsx | xml | 2016-10-25T19:38:30 | 2024-08-16T19:46:34 | ray | ray-project/ray | 32,670 | 46 |
```xml
import * as ext from '../impl/nurbs-ext';
import {distinctKnots} from '../impl/nurbs-ext';
import {ParametricCurve} from "./parametricCurve";
import {Matrix3x4Data} from "math/matrix";
import {Vec3} from "math/vec";
import {NurbsCurveData} from "geom/curves/nurbsCurveData";
import {CurveBSplineData} from "engine/data/curveData";
//in fact the sketcher format
export interface NurbsSerializaionFormat {
degree: number,
cp: Vec3[],
knots: number[],
weights: number[]
}
export default class NurbsCurve implements ParametricCurve {
verb: any;
data: NurbsCurveData;
static create(degree: number, knots: number[], cp: Vec3[], weights: number[]): NurbsCurve {
// @ts-ignore
return new NurbsCurve(verb.geom.NurbsCurve.byKnotsControlPointsWeights(degree, knots, cp, weights));
}
static deserialize({degree, knots, cp, weights}: NurbsSerializaionFormat): NurbsCurve {
return NurbsCurve.create(degree, knots, cp, weights);
}
constructor(verbCurve) {
this.verb = verbCurve;
this.data = verbCurve.asNurbs();
}
domain(): [number, number] {
return ext.curveDomain(this.data);
}
degree(): number {
return this.data.degree;
}
transform(tr: Matrix3x4Data): ParametricCurve {
const verbCurveTr = this.verb.transform(tr);
return new NurbsCurve(verbCurveTr);
}
point(u: number): Vec3 {
return this.verb.point(u);
}
param(point: Vec3): number {
return this.verb.closestParam(point);
}
eval(u: number, num: number): Vec3[] {
return verb.eval.Eval.rationalCurveDerivatives(this.data, u, num);
}
knots(): number[] {
return distinctKnots(this.data.knots);
}
invert(): ParametricCurve {
const inverted = ext.curveInvert(this.data);
ext.normalizeCurveParametrizationIfNeeded(inverted);
// let [min, max] = curveDomain(curve);
// for (let i = 0; i < reversed.knots.length; i++) {
// if (eqEps(reversed.knots[i], max)) {
// reversed.knots[i] = max;
// } else {
// break;
// }
// }
// for (let i = reversed.knots.length - 1; i >= 0 ; i--) {
// if (eqEps(reversed.knots[i], min)) {
// reversed.knots[i] = min;
// } else {
// break;
// }
// }
return new NurbsCurve(new verb.geom.NurbsCurve(inverted));
}
split(u: number): [ParametricCurve, ParametricCurve] {
const split = verb.eval.Divide.curveSplit(this.data, u);
split.forEach(n => ext.normalizeCurveParametrization(n));
return split.map(c => new NurbsCurve(new verb.geom.NurbsCurve(c)));
}
serialize(): NurbsSerializaionFormat {
return {
degree: this.verb.degree(),
knots: this.verb.knots(),
cp: this.verb.controlPoints(),
weights: this.verb.weights()
}
}
asCurveBSplineData(): CurveBSplineData {
return {
TYPE: "B-SPLINE",
degree: this.verb.degree(),
knots: this.verb.knots(),
cp: this.verb.controlPoints(),
weights: this.verb.weights()
}
}
}
``` | /content/code_sandbox/modules/geom/curves/nurbsCurve.ts | xml | 2016-08-26T21:55:19 | 2024-08-15T01:02:53 | jsketcher | xibyte/jsketcher | 1,461 | 841 |
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
// TypeScript Version: 4.1
/**
* Interface describing `smidrange`.
*/
interface Routine {
/**
* Computes the mid-range of a single-precision floating-point strided array.
*
* @param N - number of indexed elements
* @param x - input array
* @param stride - stride length
* @returns mid-range
*
* @example
* var Float32Array = require( '@stdlib/array/float32' );
*
* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = smidrange( x.length, x, 1 );
* // returns 0.0
*/
( N: number, x: Float32Array, stride: number ): number;
/**
* Computes the mid-range of a single-precision floating-point strided array using alternative indexing semantics.
*
* @param N - number of indexed elements
* @param x - input array
* @param stride - stride length
* @param offset - starting index
* @returns mid-range
*
* @example
* var Float32Array = require( '@stdlib/array/float32' );
*
* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = smidrange.ndarray( x.length, x, 1, 0 );
* // returns 0.0
*/
ndarray( N: number, x: Float32Array, stride: number, offset: number ): number;
}
/**
* Computes the mid-range of a single-precision floating-point strided array.
*
* @param N - number of indexed elements
* @param x - input array
* @param stride - stride length
* @returns mid-range
*
* @example
* var Float32Array = require( '@stdlib/array/float32' );
*
* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = smidrange( x.length, x, 1 );
* // returns 0.0
*
* @example
* var Float32Array = require( '@stdlib/array/float32' );
*
* var x = new Float32Array( [ 1.0, -2.0, 2.0 ] );
*
* var v = smidrange.ndarray( x.length, x, 1, 0 );
* // returns 0.0
*/
declare var smidrange: Routine;
// EXPORTS //
export = smidrange;
``` | /content/code_sandbox/lib/node_modules/@stdlib/stats/base/smidrange/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 631 |
```xml
/*
* one or more contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright ownership.
*/
import {useState} from 'react';
import styles from './styles.module.scss';
import sharedStyles from 'modules/styles/panelHeader.module.scss';
import {
Button,
ButtonSet,
Layer,
OverflowMenu,
OverflowMenuItem,
} from '@carbon/react';
import {SidePanelOpen, SidePanelClose, Filter} from '@carbon/react/icons';
import cn from 'classnames';
import {useNavigate, useSearchParams} from 'react-router-dom';
import {useTaskFilters, type TaskFilters} from 'modules/hooks/useTaskFilters';
import {ControlledNavLink} from './ControlledNavLink';
import {prepareCustomFiltersParams} from 'modules/custom-filters/prepareCustomFiltersParams';
import {getStateLocally} from 'modules/utils/localStorage';
import difference from 'lodash/difference';
import {useCurrentUser} from 'modules/queries/useCurrentUser';
import {usePrevious} from '@uidotdev/usehooks';
import {CustomFiltersModal} from './CustomFiltersModal';
import {DeleteFilterModal} from './CustomFiltersModal/DeleteFilterModal';
import {useTranslation} from 'react-i18next';
function getCustomFilterParams(options: {userId: string; filter: string}) {
const {userId, filter} = options;
const customFilters = getStateLocally('customFilters') ?? {};
const filters = customFilters[filter];
return filters === undefined
? {}
: prepareCustomFiltersParams(filters, userId);
}
function getNavLinkSearchParam(options: {
currentParams: URLSearchParams;
filter: TaskFilters['filter'];
userId: string;
}): string {
const CUSTOM_FILTERS_PARAMS = [
'state',
'followUpDateFrom',
'followUpDateTo',
'dueDateFrom',
'dueDateTo',
'assigned',
'assignee',
'taskDefinitionId',
'candidateGroup',
'candidateUser',
'processDefinitionKey',
'processInstanceKey',
'tenantIds',
'taskVariables',
] as const;
const {filter, userId, currentParams} = options;
const {sortBy, ...convertedParams} = Object.fromEntries(
currentParams.entries(),
);
const NON_CUSTOM_FILTERS = [
'all-open',
'unassigned',
'assigned-to-me',
'completed',
];
const customFilterParams = NON_CUSTOM_FILTERS.includes(filter)
? {}
: getCustomFilterParams({userId, filter});
const updatedParams = new URLSearchParams({
...convertedParams,
...customFilterParams,
filter,
});
if (sortBy !== undefined && sortBy !== 'completion') {
updatedParams.set('sortBy', sortBy);
}
if (filter === 'completed') {
updatedParams.set('sortBy', 'completion');
}
difference(CUSTOM_FILTERS_PARAMS, Object.keys(customFilterParams)).forEach(
(param) => {
updatedParams.delete(param);
},
);
return updatedParams.toString();
}
const CollapsiblePanel: React.FC = () => {
const [isCustomFiltersModalOpen, setIsCustomFiltersModalOpen] =
useState(false);
const navigate = useNavigate();
const {t} = useTranslation();
const [isCollapsed, setIsCollapsed] = useState(true);
const [customFilterToEdit, setCustomFilterToEdit] = useState<
string | undefined
>();
const [customFilterToDelete, setCustomFilterToDelete] = useState<
string | undefined
>();
const wasCollapsed = usePrevious(isCollapsed);
const {filter} = useTaskFilters();
const [searchParams] = useSearchParams();
const customFilters = Object.entries(getStateLocally('customFilters') ?? {});
const {data} = useCurrentUser();
const userId = data?.userId ?? '';
const filtersModal = (
<CustomFiltersModal
key="custom-filters-modal"
filterId={customFilterToEdit}
isOpen={isCustomFiltersModalOpen || customFilterToEdit !== undefined}
onClose={() => {
setIsCustomFiltersModalOpen(false);
setCustomFilterToEdit(undefined);
}}
onSuccess={(filter) => {
setIsCustomFiltersModalOpen(false);
setCustomFilterToEdit(undefined);
navigate({
search: getNavLinkSearchParam({
currentParams: searchParams,
filter,
userId,
}),
});
}}
onDelete={() => {
setIsCustomFiltersModalOpen(false);
setCustomFilterToEdit(undefined);
navigate({
search: getNavLinkSearchParam({
currentParams: searchParams,
filter: 'all-open',
userId,
}),
});
}}
/>
);
if (isCollapsed) {
return (
<Layer
as="nav"
id="task-nav-bar"
className={cn(styles.base, styles.collapsedContainer)}
aria-label={t('taskFilterPanelControlsAria')}
aria-owns="task-nav-bar-controls"
>
<ul id="task-nav-bar-controls" aria-labelledby="task-nav-bar">
<li>
<Button
hasIconOnly
iconDescription={t('taskFilterPanelExpandButton')}
tooltipPosition="right"
onClick={() => {
setIsCollapsed(false);
}}
renderIcon={SidePanelOpen}
size="md"
kind="ghost"
aria-controls="task-nav-bar"
aria-expanded="false"
autoFocus={wasCollapsed !== null && !wasCollapsed}
type="button"
/>
</li>
<li>
<Button
hasIconOnly
iconDescription={t('taskFilterPanelFilterButton')}
tooltipPosition="right"
onClick={() => {
setIsCustomFiltersModalOpen(true);
}}
renderIcon={Filter}
size="md"
kind="ghost"
type="button"
/>
</li>
</ul>
{filtersModal}
</Layer>
);
}
return (
<Layer className={styles.floatingContainer}>
<nav
aria-labelledby="filters-title"
className={cn(styles.base, styles.expandedContainer)}
id="task-nav-bar"
aria-owns="filters-menu"
>
<span className={sharedStyles.panelHeader}>
<h1 id="filters-title">{t('taskFilterPanelTitle')}</h1>
<Button
hasIconOnly
iconDescription={t('taskFilterPanelCollapse')}
tooltipPosition="right"
onClick={() => {
setIsCollapsed(true);
}}
renderIcon={SidePanelClose}
size="md"
kind="ghost"
aria-controls="task-nav-bar"
aria-expanded="true"
autoFocus
/>
</span>
<div className={styles.scrollContainer}>
<ul id="filters-menu" aria-labelledby="task-nav-bar">
<li>
<ControlledNavLink
to={{
search: getNavLinkSearchParam({
currentParams: searchParams,
filter: 'all-open',
userId,
}),
}}
isActive={filter === 'all-open'}
>
{t('taskFilterPanelAllOpenTasks')}
</ControlledNavLink>
</li>
<li>
<ControlledNavLink
to={{
search: getNavLinkSearchParam({
currentParams: searchParams,
filter: 'assigned-to-me',
userId,
}),
}}
isActive={filter === 'assigned-to-me'}
>
{t('assigneeTagAssignedToMe')}
</ControlledNavLink>
</li>
<li>
<ControlledNavLink
to={{
search: getNavLinkSearchParam({
currentParams: searchParams,
filter: 'unassigned',
userId,
}),
}}
isActive={filter === 'unassigned'}
>
{t('taskFilterPanelUnassigned')}
</ControlledNavLink>
</li>
<li>
<ControlledNavLink
to={{
search: getNavLinkSearchParam({
currentParams: searchParams,
filter: 'completed',
userId,
}),
}}
isActive={filter === 'completed'}
>
{t('taskFilterPanelCompleted')}
</ControlledNavLink>
</li>
{customFilters.map(([filterId, {name}]) => (
<li className={styles.customFilterContainer} key={filterId}>
<ControlledNavLink
to={{
search: getNavLinkSearchParam({
currentParams: searchParams,
filter: filterId,
userId,
}),
}}
isActive={filter === filterId}
className={styles.customFilterNav}
>
{filterId === 'custom' || name === undefined
? t('taskFilterPanelCustom')
: name}
</ControlledNavLink>
<OverflowMenu
iconDescription={t('taskFilterPanelCustomFilterActions')}
size="md"
className={cn(styles.overflowMenu, {
[styles.selected]: filter === filterId,
})}
direction="top"
flipped
align="top-right"
>
<OverflowMenuItem
itemText={t('taskFilterPanelEdit')}
onClick={() => {
setCustomFilterToEdit(filterId);
}}
/>
<OverflowMenuItem
hasDivider
isDelete
itemText={t('taskFilterPanelDelete')}
onClick={() => {
setCustomFilterToDelete(filterId);
}}
/>
</OverflowMenu>
</li>
))}
</ul>
<ButtonSet>
<Button
onClick={() => {
setIsCustomFiltersModalOpen(true);
}}
kind="ghost"
size="md"
>
{t('taskFilterPanelNewFilter')}
</Button>
</ButtonSet>
</div>
</nav>
{filtersModal}
<DeleteFilterModal
data-testid="direct-delete-filter-modal"
filterName={customFilterToDelete ?? ''}
isOpen={customFilterToDelete !== undefined}
onClose={() => {
setCustomFilterToDelete(undefined);
}}
onDelete={() => {
navigate({
search: getNavLinkSearchParam({
currentParams: searchParams,
filter: 'all-open',
userId,
}),
});
setCustomFilterToDelete(undefined);
}}
/>
</Layer>
);
};
export {CollapsiblePanel};
``` | /content/code_sandbox/tasklist/client/src/Tasks/CollapsiblePanel/index.tsx | xml | 2016-03-20T03:38:04 | 2024-08-16T19:59:58 | camunda | camunda/camunda | 3,172 | 2,189 |
```xml
/*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
import { type AfterViewInit, Directive, ElementRef, Input, type OnDestroy } from "@angular/core";
import { Chart } from "chart.js"; // TODO: use plotly instead for WebGL-capabale browsers?
import { from, type Observable, type Subscription } from "rxjs";
import type { DataSet } from "src/app/models/data";
import { LoggingService } from "../logging.service";
/**
* LinechartDirective decorates canvases by creating a rendering context for
* ChartJS charts.
*/
@Directive({
selector: "[linechart]",
})
export class LinechartDirective implements AfterViewInit, OnDestroy {
/** The chart context. */
private ctx: CanvasRenderingContext2D | null = null; // | WebGLRenderingContext;
/** The Chart.js API object. */
private chart: Chart | null = null;
/** The title of the chart. */
@Input() public chartTitle?: string;
/** Labels for the datasets. */
@Input() public chartLabels?: unknown[];
/** Data to be plotted by the chart. */
@Input() public chartDataSets: Observable<Array<DataSet | null> | null> = from([]);
/** The type of the chart. */
@Input() public chartType?: "category" | "linear" | "logarithmic" | "time";
/** A label for the X-axis of the chart. */
@Input() public chartXAxisLabel?: string;
/** A label for the Y-axis of the chart. */
@Input() public chartYAxisLabel?: string;
/** A callback for the label of each data point, to be optionally provided. */
@Input() public chartLabelCallback?: (v: unknown, i: number, va: unknown[]) => unknown;
/** Whether or not to display the chart's legend. */
@Input() public chartDisplayLegend?: boolean;
/** A subscription for the chartDataSets input. */
private subscription: Subscription | null = null;
/** Chart.js configuration options. */
private opts: Chart.ChartConfiguration = {};
constructor(private readonly element: ElementRef, private readonly log: LoggingService) { }
/**
* Initializes the chart using the input data.
*/
public ngAfterViewInit(): void {
if (!(this.element.nativeElement instanceof HTMLCanvasElement)) {
throw new Error("[linechart] Directive can only be used on a canvas in a context where DOM access is allowed");
}
const ctx = this.element.nativeElement.getContext("2d", {alpha: false});
if (!ctx) {
throw new Error("Failed to get 2D context for chart canvas");
}
this.ctx = ctx;
if (!this.chartType) {
this.chartType = "linear";
}
if (this.chartDisplayLegend === null || this.chartDisplayLegend === undefined) {
this.chartDisplayLegend = false;
}
this.opts = {
data: {
datasets: [],
},
options: {
legend: {
display: true
},
scales: {
xAxes: [{
display: true,
scaleLabel: {
display: this.chartXAxisLabel ? true : false,
labelString: this.chartXAxisLabel
},
type: this.chartType,
}],
yAxes: [{
display: true,
scaleLabel: {
display: this.chartYAxisLabel ? true : false,
labelString: this.chartYAxisLabel
},
ticks: {
suggestedMin: 0
}
}]
},
title: {
display: this.chartTitle ? true : false,
text: this.chartTitle
},
tooltips: {
intersect: false,
mode: "x"
}
},
type: "line"
};
this.subscription = this.chartDataSets.subscribe(
data => {
this.dataLoad(data);
},
(e: Error) => {
this.dataError(e);
}
);
}
/**
* Destroys the ChartJS instance and clears the underlying drawing context.
*/
private destroyChart(): void {
if (this.chart) {
this.chart.clear();
(this.chart.destroy as () => void)();
this.chart = null;
if (this.ctx) {
this.ctx.clearRect(0, 0, this.element.nativeElement.width, this.element.nativeElement.height);
}
this.opts.data = {datasets: [], labels: []};
}
}
/**
* Loads a new Chart.
*
* @param data The new data sets for the new chart.
*/
private dataLoad(data: Array<DataSet | null> | null): void {
this.destroyChart();
const hasNoNulls = (arr: Array<DataSet | null>): arr is Array<DataSet> => !arr.some(x=>x===null);
if (data === null || data === undefined || !hasNoNulls(data)) {
this.noData();
return;
}
if (this.opts.data) {
this.opts.data.datasets = data;
} else {
this.opts.data = {datasets: data};
}
if (!this.ctx) {
throw new Error("cannot load data with uninitialized context");
}
this.chart = new Chart(this.ctx, this.opts);
}
/**
* Handles an error when loading data.
*
* @param e The error that occurred.
*/
private dataError(e: Error): void {
this.log.error("data error occurred:", e);
this.destroyChart();
if (this.ctx) {
this.ctx.font = "30px serif";
this.ctx.fillStyle = "black";
this.ctx.textAlign = "center";
this.ctx.fillText("Error Fetching Data", this.element.nativeElement.width / 2, this.element.nativeElement.height / 2);
}
}
/**
* Handles when there is no data for the chart.
*/
private noData(): void {
this.destroyChart();
if (this.ctx) {
this.ctx.font = "30px serif";
this.ctx.fillStyle = "black";
this.ctx.textAlign = "center";
this.ctx.fillText("No Data", this.element.nativeElement.width / 2, this.element.nativeElement.height / 2);
}
}
/** Cleans up chart resources on element destruction. */
public ngOnDestroy(): void {
this.destroyChart();
if (this.subscription) {
this.subscription.unsubscribe();
}
}
}
``` | /content/code_sandbox/experimental/traffic-portal/src/app/shared/charts/linechart.directive.ts | xml | 2016-09-02T07:00:06 | 2024-08-16T03:50:21 | trafficcontrol | apache/trafficcontrol | 1,043 | 1,416 |
```xml
import type { Meta, StoryObj } from '@storybook/react';
import { fn } from '@storybook/test';
import { OptionsControl } from './Options';
const arrayOptions = ['Bat', 'Cat', 'Rat'];
const labels = {
Bat: 'Batwoman',
Cat: 'Catwoman',
Rat: 'Ratwoman',
};
const objectOptions = {
A: { id: 'Aardvark' },
B: { id: 'Bat' },
C: { id: 'Cat' },
};
const meta = {
title: 'Controls/Options/Radio',
component: OptionsControl,
tags: ['autodocs'],
parameters: {
withRawArg: 'value',
controls: { include: ['argType', 'type', 'value', 'labels'] },
},
args: {
name: 'radio',
type: 'radio',
argType: { options: arrayOptions },
onChange: fn(),
},
argTypes: {
value: {
control: { type: 'radio' },
options: arrayOptions,
},
},
} satisfies Meta<typeof OptionsControl>;
export default meta;
type Story = StoryObj<typeof meta>;
export const Array: Story = {
args: {
value: arrayOptions[0],
},
};
export const ArrayInline: Story = {
args: {
type: 'inline-radio',
value: arrayOptions[1],
},
};
export const ArrayLabels: Story = {
args: {
value: arrayOptions[0],
labels,
},
};
export const ArrayInlineLabels: Story = {
args: {
type: 'inline-radio',
value: arrayOptions[1],
labels,
},
};
export const ArrayUndefined: Story = {
args: {
value: undefined,
},
};
export const Object: Story = {
name: 'DEPRECATED: Object',
args: {
value: objectOptions.B,
argType: { options: objectOptions },
},
argTypes: { value: { control: { type: 'object' } } },
};
export const ObjectInline: Story = {
name: 'DEPRECATED: Object Inline',
args: {
type: 'inline-radio',
value: objectOptions.A,
argType: { options: objectOptions },
},
argTypes: { value: { control: { type: 'object' } } },
};
export const ObjectUndefined: Story = {
name: 'DEPRECATED: Object Undefined',
args: {
value: undefined,
argType: { options: objectOptions },
},
argTypes: { value: { control: { type: 'object' } } },
};
export const ArrayReadonly: Story = {
args: {
value: [arrayOptions[0]],
argType: {
options: arrayOptions,
table: {
readonly: true,
},
},
},
};
``` | /content/code_sandbox/code/lib/blocks/src/controls/options/RadioOptions.stories.tsx | xml | 2016-03-18T04:23:44 | 2024-08-16T19:22:08 | storybook | storybookjs/storybook | 83,755 | 622 |
```xml
<!--
~
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<android.support.design.widget.AppBarLayout
android:id="@+id/id_appbar"
xmlns:android="path_to_url"
xmlns:app="path_to_url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:elevation="3dp">
<android.support.v7.widget.Toolbar
android:id="@+id/id_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:layout_scrollFlags="scroll|enterAlways"
app:popupTheme="@style/AppTheme.PopupOverlay">
<TextSwitcher
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"/>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.AppBarLayout>
``` | /content/code_sandbox/app/src/main/res/layout/view_common_toolbar_with_title_view.xml | xml | 2016-06-30T10:37:13 | 2024-08-12T19:23:34 | MarkdownEditors | qinci/MarkdownEditors | 1,518 | 271 |
```xml
export { default } from "./PaginatedSelect";
``` | /content/code_sandbox/client/src/core/client/admin/components/PaginatedSelect/index.ts | xml | 2016-10-31T16:14:05 | 2024-08-06T16:15:57 | talk | coralproject/talk | 1,881 | 11 |
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
import nanmskrange = require( './index' );
// TESTS //
// The function returns a number...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange( x.length, x, 1, mask, 1 ); // $ExpectType number
}
// The compiler throws an error if the function is provided a first argument which is not a number...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange( '10', x, 1, mask, 1 ); // $ExpectError
nanmskrange( true, x, 1, mask, 1 ); // $ExpectError
nanmskrange( false, x, 1, mask, 1 ); // $ExpectError
nanmskrange( null, x, 1, mask, 1 ); // $ExpectError
nanmskrange( undefined, x, 1, mask, 1 ); // $ExpectError
nanmskrange( [], x, 1, mask, 1 ); // $ExpectError
nanmskrange( {}, x, 1, mask, 1 ); // $ExpectError
nanmskrange( ( x: number ): number => x, x, 1, mask, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a second argument which is not a numeric array...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange( x.length, 10, 1, mask, 1 ); // $ExpectError
nanmskrange( x.length, '10', 1, mask, 1 ); // $ExpectError
nanmskrange( x.length, true, 1, mask, 1 ); // $ExpectError
nanmskrange( x.length, false, 1, mask, 1 ); // $ExpectError
nanmskrange( x.length, null, 1, mask, 1 ); // $ExpectError
nanmskrange( x.length, undefined, 1, mask, 1 ); // $ExpectError
nanmskrange( x.length, [ '1' ], 1, mask, 1 ); // $ExpectError
nanmskrange( x.length, {}, 1, mask, 1 ); // $ExpectError
nanmskrange( x.length, ( x: number ): number => x, 1, mask, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a third argument which is not a number...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange( x.length, x, '10', mask, 1 ); // $ExpectError
nanmskrange( x.length, x, true, mask, 1 ); // $ExpectError
nanmskrange( x.length, x, false, mask, 1 ); // $ExpectError
nanmskrange( x.length, x, null, mask, 1 ); // $ExpectError
nanmskrange( x.length, x, undefined, mask, 1 ); // $ExpectError
nanmskrange( x.length, x, [], mask, 1 ); // $ExpectError
nanmskrange( x.length, x, {}, mask, 1 ); // $ExpectError
nanmskrange( x.length, x, ( x: number ): number => x, mask, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a fourth argument which is not a numeric array...
{
const x = new Float64Array( 10 );
nanmskrange( x.length, x, 1, 10, 1 ); // $ExpectError
nanmskrange( x.length, x, 1, '10', 1 ); // $ExpectError
nanmskrange( x.length, x, 1, true, 1 ); // $ExpectError
nanmskrange( x.length, x, 1, false, 1 ); // $ExpectError
nanmskrange( x.length, x, 1, null, 1 ); // $ExpectError
nanmskrange( x.length, x, 1, undefined, 1 ); // $ExpectError
nanmskrange( x.length, x, 1, [ '1' ], 1 ); // $ExpectError
nanmskrange( x.length, x, 1, {}, 1 ); // $ExpectError
nanmskrange( x.length, x, 1, ( x: number ): number => x, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a fifth argument which is not a number...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange( x.length, x, 1, mask, '10' ); // $ExpectError
nanmskrange( x.length, x, 1, mask, true ); // $ExpectError
nanmskrange( x.length, x, 1, mask, false ); // $ExpectError
nanmskrange( x.length, x, 1, mask, null ); // $ExpectError
nanmskrange( x.length, x, 1, mask, undefined ); // $ExpectError
nanmskrange( x.length, x, 1, mask, [] ); // $ExpectError
nanmskrange( x.length, x, 1, mask, {} ); // $ExpectError
nanmskrange( x.length, x, 1, mask, ( x: number ): number => x ); // $ExpectError
}
// The compiler throws an error if the function is provided an unsupported number of arguments...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange(); // $ExpectError
nanmskrange( x.length ); // $ExpectError
nanmskrange( x.length, x, 1 ); // $ExpectError
nanmskrange( x.length, x, 1, mask ); // $ExpectError
nanmskrange( x.length, x, 1, mask, 1, 10 ); // $ExpectError
}
// Attached to main export is an `ndarray` method which returns a number...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1, 0 ); // $ExpectType number
}
// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange.ndarray( '10', x, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( true, x, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( false, x, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( null, x, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( undefined, x, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( [], x, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( {}, x, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( ( x: number ): number => x, x, 1, 0, mask, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a second argument which is not a numeric array...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange.ndarray( x.length, 10, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, '10', 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, true, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, false, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, null, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, undefined, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, [ '1' ], 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, {}, 1, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, ( x: number ): number => x, 1, 0, mask, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a third argument which is not a number...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange.ndarray( x.length, x, '10', 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, true, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, false, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, null, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, undefined, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, [], 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, {}, 0, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, ( x: number ): number => x, 0, mask, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange.ndarray( x.length, x, 1, '10', mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, true, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, false, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, null, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, undefined, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, [], mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, {}, mask, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, ( x: number ): number => x, mask, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a numeric array...
{
const x = new Float64Array( 10 );
nanmskrange.ndarray( x.length, 1, 0, 10, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, 1, 0, '10', 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, 1, 0, true, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, 1, 0, false, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, 1, 0, null, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, 1, 0, undefined, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, 1, 0, [ '1' ], 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, 1, 0, {}, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, 1, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange.ndarray( x.length, x, 1, 0, mask, '10', 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, true, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, false, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, null, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, undefined, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, [], 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, {}, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, ( x: number ): number => x, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1, '10' ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1, true ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1, false ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1, null ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1, undefined ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1, [] ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1, {} ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1, ( x: number ): number => x ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
{
const x = new Float64Array( 10 );
const mask = new Uint8Array( 10 );
nanmskrange.ndarray(); // $ExpectError
nanmskrange.ndarray( x.length ); // $ExpectError
nanmskrange.ndarray( x.length, x ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1 ); // $ExpectError
nanmskrange.ndarray( x.length, x, 1, 0, mask, 1, 0, 10 ); // $ExpectError
}
``` | /content/code_sandbox/lib/node_modules/@stdlib/stats/base/nanmskrange/docs/types/test.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 3,907 |
```xml
import classnames from 'classnames';
import React, { ReactNode } from 'react';
import {
HTMLFieldProps,
connectField,
filterDOMProps,
joinName,
useField,
} from 'uniforms';
export type ListDelFieldProps = HTMLFieldProps<
unknown,
HTMLSpanElement,
{ removeIcon?: ReactNode }
>;
function ListDel({
className,
disabled,
name,
readOnly,
removeIcon,
...props
}: ListDelFieldProps) {
const nameParts = joinName(null, name);
const nameIndex = +nameParts[nameParts.length - 1];
const parentName = joinName(nameParts.slice(0, -1));
const parent = useField<{ minCount?: number }, unknown[]>(
parentName,
{},
{ absoluteName: true },
)[0];
disabled ||= readOnly || parent.minCount! >= parent.value!.length;
function onAction(
event:
| React.KeyboardEvent<HTMLSpanElement>
| React.MouseEvent<HTMLSpanElement, MouseEvent>,
) {
if (!disabled && (!('key' in event) || event.key === 'Enter')) {
const value = parent.value!.slice();
value.splice(nameIndex, 1);
parent.onChange(value);
}
}
return (
<span
{...filterDOMProps(props)}
className={classnames('badge badge-pill', className)}
onClick={onAction}
onKeyDown={onAction}
role="button"
tabIndex={0}
>
{removeIcon}
</span>
);
}
ListDel.defaultProps = {
removeIcon: <i className="octicon octicon-dash" />,
};
export default connectField<ListDelFieldProps>(ListDel, {
initialValue: false,
kind: 'leaf',
});
``` | /content/code_sandbox/packages/uniforms-bootstrap4/src/ListDelField.tsx | xml | 2016-05-10T13:08:50 | 2024-08-13T11:27:18 | uniforms | vazco/uniforms | 1,934 | 382 |
```xml
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react'
import { usePage } from '../../../lib/stores/pageStore'
import { createTeamInvite } from '../../../api/teams/invites'
import {
SerializedUserTeamPermissions,
TeamPermissionType,
} from '../../../interfaces/db/userTeamPermissions'
import { mdiHelpCircleOutline, mdiPlus } from '@mdi/js'
import Form from '../../../../design/components/molecules/Form'
import { SerializedSubscription } from '../../../interfaces/db/subscription'
import FormRow from '../../../../design/components/molecules/Form/templates/FormRow'
import FormRowItem from '../../../../design/components/molecules/Form/templates/FormRowItem'
import { useI18n } from '../../../lib/hooks/useI18n'
import { lngKeys } from '../../../lib/i18n/types'
import { FormSelectOption } from '../../../../design/components/molecules/Form/atoms/FormSelect'
import Flexbox from '../../../../design/components/atoms/Flexbox'
import Spinner from '../../../../design/components/atoms/Spinner'
import ErrorBlock from '../../ErrorBlock'
import styled from '../../../../design/lib/styled'
import HelpLink from '../../HelpLink'
interface TeamInvitesSectionProps {
userPermissions: SerializedUserTeamPermissions
subscription?: SerializedSubscription
}
interface EmailData {
email: string
role: TeamPermissionType
}
const InviteMemberModalSection = ({
userPermissions,
subscription,
}: TeamInvitesSectionProps) => {
const { team } = usePage()
const [sending, setSending] = useState<boolean>(false)
const [error, setError] = useState<unknown>()
const [role] = useState<TeamPermissionType>(
userPermissions.role === 'viewer'
? 'viewer'
: subscription != null
? 'member'
: 'viewer'
)
const [emailsToInvite, setEmailsToInvite] = useState<EmailData[]>([
{ email: '', role: role },
])
const mountedRef = useRef(false)
const { translate, getRoleLabel } = useI18n()
useEffect(() => {
mountedRef.current = true
return () => {
mountedRef.current = false
}
}, [])
const onChangeHandler = useCallback(
(event: React.ChangeEvent<HTMLInputElement>, emailIdx) => {
const newEmailList = emailsToInvite.map((item, idx) => {
if (idx === emailIdx) {
return {
...item,
email: event.target.value,
}
}
return item
})
setEmailsToInvite(newEmailList)
},
[emailsToInvite]
)
const isEmailDataCorrect = useCallback((emailData: EmailData) => {
return emailData.email != ''
}, [])
const submitInvites = useCallback(
async (event: React.FormEvent) => {
event.preventDefault()
if (team == null) {
return
}
setError(undefined)
setSending(true)
try {
let failedInvites = 0
for (const email of emailsToInvite) {
if (isEmailDataCorrect(email)) {
await createTeamInvite(team, email)
} else {
failedInvites += 1
}
}
if (failedInvites === emailsToInvite.length) {
setError(translate(lngKeys.InviteFailError))
} else {
setEmailsToInvite([{ email: '', role: role }])
}
} catch (error) {
console.warn(error)
setError(error)
}
setSending(false)
},
[team, emailsToInvite, role, isEmailDataCorrect, translate]
)
const selectRole = useCallback(
(option: FormSelectOption, emailIdx: number) => {
if (userPermissions.role !== 'admin') {
return
}
const newEmailList = emailsToInvite.map((item, idx) => {
if (idx === emailIdx) {
return {
...item,
role: option.value as TeamPermissionType,
}
}
return item
})
setEmailsToInvite(newEmailList)
},
[emailsToInvite, userPermissions.role]
)
const selectRoleOptions = useMemo(() => {
let roles: FormSelectOption[] = []
if (subscription == null) {
return [{ label: translate(lngKeys.GeneralViewer), value: 'viewer' }]
}
switch (userPermissions.role) {
case 'admin':
roles = [
{ label: translate(lngKeys.GeneralAdmin), value: 'admin' },
{ label: translate(lngKeys.GeneralMember), value: 'member' },
]
break
case 'member':
roles = [{ label: translate(lngKeys.GeneralMember), value: 'member' }]
break
case 'viewer':
default:
break
}
roles.push({ label: translate(lngKeys.GeneralViewer), value: 'viewer' })
return roles
}, [userPermissions.role, subscription, translate])
const addMemberForm = useCallback(() => {
setEmailsToInvite((prev) => {
return [...prev, { email: '', role: role }]
})
}, [role])
return (
<Container>
<Flexbox>
<h2>{translate(lngKeys.InviteEmail)}</h2>
<HelpLink
iconPath={mdiHelpCircleOutline}
tooltipText={translate(lngKeys.InviteRoleDetails)}
size={16}
linkHref={
'path_to_url
}
/>
{sending && <Spinner className='relative' style={{ top: 2 }} />}
</Flexbox>
<Form>
{emailsToInvite.map((email, emailIdx) => {
return (
<FormRow key={emailIdx} fullWidth={true}>
<FormRowItem
item={{
type: 'input',
props: {
value: email.email,
onChange: (event) => onChangeHandler(event, emailIdx),
placeholder: 'Email...',
},
}}
/>
<FormRowItem
flex='0 0 150px'
item={{
type: 'select',
props: {
value: {
label: getRoleLabel(email.role),
value: email.role,
},
onChange: (option) => selectRole(option, emailIdx),
options: selectRoleOptions,
},
}}
/>
</FormRow>
)
})}
<FormRow>
<FormRowItem
item={{
type: 'button',
props: {
variant: 'icon',
type: 'button',
iconPath: mdiPlus,
label: translate(lngKeys.InviteByEmailMore),
onClick: addMemberForm,
},
}}
/>
</FormRow>
<FormRow>
<FormRowItem
flex='0 0 150px'
item={{
type: 'button',
props: {
type: 'submit',
label: translate(lngKeys.GeneralInvite),
onClick: submitInvites,
disabled: sending,
},
}}
/>
</FormRow>
</Form>
{error != null && (
<ErrorContainer>
<ErrorBlock error={error} />
</ErrorContainer>
)}
</Container>
)
}
const ErrorContainer = styled.div`
margin-top: 1em;
`
const Container = styled.section`
small {
margin-top: ${({ theme }) => theme.sizes.spaces.sm}px;
display: block;
}
small a {
display: inline-flex;
white-space: nowrap;
&:hover {
svg {
text-decoration: underline;
}
}
}
`
export default InviteMemberModalSection
``` | /content/code_sandbox/src/cloud/components/Modal/InviteMembers/InviteMemberModalSection.tsx | xml | 2016-11-19T14:30:34 | 2024-08-16T03:13:45 | BoostNote-App | BoostIO/BoostNote-App | 3,745 | 1,640 |
```xml
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally Condition="'$(ManagePackageVersionsCentrally)' == ''">true</ManagePackageVersionsCentrally>
<CentralPackageTransitivePinningEnabled>true</CentralPackageTransitivePinningEnabled>
<!-- Using multiple feeds isn't supported by Maestro: path_to_url -->
<NoWarn>$(NoWarn);NU1507</NoWarn>
</PropertyGroup>
<ItemGroup>
<!-- Command-line-api dependencies -->
<PackageVersion Include="System.CommandLine" Version="$(SystemCommandLineVersion)" />
<!-- MSBuild dependencies -->
<PackageVersion Include="Microsoft.Build.Tasks.Core" Version="$(MicrosoftBuildVersion)" />
<PackageVersion Include="Microsoft.Build.Utilities.Core" Version="$(MicrosoftBuildVersion)" />
<!-- Runtime dependencies -->
<PackageVersion Include="Microsoft.Extensions.FileSystemGlobbing" Version="$(MicrosoftExtensionsFileSystemGlobbingVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="$(MicrosoftExtensionsLoggingConsoleVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(MicrosoftExtensionsLoggingVersion)" />
<!-- External dependencies -->
<PackageVersion Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
<PackageVersion Include="xunit.extensibility.core" Version="$(XUnitVersion)" />
<PackageVersion Include="xunit.extensibility.execution" Version="$(XUnitVersion)" />
<PackageVersion Include="NuGet.Protocol" Version="$(NuGetProtocolVersion)" />
<PackageVersion Include="Octokit" Version="$(OctokitVersion)" />
</ItemGroup>
</Project>
``` | /content/code_sandbox/src/SourceBuild/content/Directory.Packages.props | xml | 2016-07-22T21:26:02 | 2024-08-16T17:23:58 | sdk | dotnet/sdk | 2,627 | 337 |
```xml
<project xmlns="path_to_url" xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<groupId>ossfuzz</groupId>
<artifactId>jaxb-fuzzer</artifactId>
<version>${jaxbVersion}</version>
<packaging>jar</packaging>
<properties>
<maven.compiler.source>15</maven.compiler.source>
<maven.compiler.target>15</maven.compiler.target>
<exec.mainClass>ossfuzz.DataTypeConverterFuzzer</exec.mainClass>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!--
on the CI, install the jazzer file with
mvn install:install-file -Dfile=${JAZZER_API_PATH} \
-DgroupId="com.code-intelligence" \
-DartifactId="jazzer-api" \
-Dversion="0.12.0" \
-Dpackaging=jar
to avoid mismatching driver/api versions
-->
<dependency>
<groupId>com.code-intelligence</groupId>
<artifactId>jazzer-api</artifactId>
<version>0.12.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-ri</artifactId>
<version>${jaxbVersion}</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
``` | /content/code_sandbox/projects/jaxb/pom.xml | xml | 2016-07-20T19:39:50 | 2024-08-16T10:54:09 | oss-fuzz | google/oss-fuzz | 10,251 | 480 |
```xml
import { Component } from '@angular/core';
import { Code } from '@domain/code';
@Component({
selector: 'calendar-inline-demo',
template: `
<app-docsectiontext>
<p>Calendar is displayed as a popup by default, add <i>inline</i> property to customize this behavior.</p>
</app-docsectiontext>
<div class="card flex justify-content-center">
<p-calendar class="max-w-full" [(ngModel)]="date" [inline]="true" [showWeek]="true" />
</div>
<app-code [code]="code" selector="calendar-inline-demo"></app-code>
`
})
export class InlineDoc {
date: Date[] | undefined;
code: Code = {
basic: `<p-calendar
class="max-w-full"
[(ngModel)]="date"
[inline]="true"
[showWeek]="true" />`,
html: `<div class="card flex justify-content-center">
<p-calendar
class="max-w-full"
[(ngModel)]="date"
[inline]="true"
[showWeek]="true" />
</div>`,
typescript: `import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { CalendarModule } from 'primeng/calendar';
@Component({
selector: 'calendar-inline-demo',
templateUrl: './calendar-inline-demo.html',
standalone: true,
imports: [FormsModule, CalendarModule]
})
export class CalendarInlineDemo {
date: Date[] | undefined;
}`
};
}
``` | /content/code_sandbox/src/app/showcase/doc/calendar/inlinedoc.ts | xml | 2016-01-16T09:23:28 | 2024-08-16T19:58:20 | primeng | primefaces/primeng | 9,969 | 341 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="path_to_url">
<type>org.netbeans.modules.apisupport.project</type>
<configuration>
<data xmlns="path_to_url">
<code-name-base>org.graalvm.visualvm.modules.nashorn.jdk15</code-name-base>
<suite-component/>
<module-dependencies>
<dependency>
<code-name-base>org.netbeans.libs.asm</code-name-base>
<build-prerequisite/>
<compile-dependency/>
<run-dependency>
<specification-version>5.10</specification-version>
</run-dependency>
</dependency>
</module-dependencies>
<public-packages/>
<class-path-extension>
<runtime-relative-path>ext/nashorn-core-15.4.jar</runtime-relative-path>
<binary-origin>external/nashorn-core-15.4.jar</binary-origin>
</class-path-extension>
<class-path-extension>
<runtime-relative-path>ext/asm-util-9.5.jar</runtime-relative-path>
<binary-origin>external/asm-util-9.5.jar</binary-origin>
</class-path-extension>
</data>
</configuration>
</project>
``` | /content/code_sandbox/visualvm/nashorn.jdk15/nbproject/project.xml | xml | 2016-09-12T14:44:30 | 2024-08-16T14:41:50 | visualvm | oracle/visualvm | 2,821 | 270 |
```xml
<manifest xmlns:android="path_to_url"
package="com.daasuu.ei">
<application
android:allowBackup="true"
android:label="@string/app_name"
android:supportsRtl="true">
</application>
</manifest>
``` | /content/code_sandbox/ei/src/main/AndroidManifest.xml | xml | 2016-03-18T16:22:10 | 2024-08-02T07:40:17 | EasingInterpolator | MasayukiSuda/EasingInterpolator | 1,098 | 59 |
```xml
import Constants from 'expo-constants';
import * as Notifications from 'expo-notifications';
import { useState, useEffect } from 'react';
import { Platform, AppState } from 'react-native';
import { Actions } from 'react-native-router-flux';
import { setNotificationToken } from '../service';
import action from '../state/action';
import { State, User } from '../types/redux';
import { isiOS } from '../utils/platform';
import { useIsLogin, useStore } from '../hooks/useStore';
import store from '../state/store';
function enableNotification() {
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: true,
shouldPlaySound: true,
shouldSetBadge: false,
}),
});
}
function disableNotification() {
Notifications.setNotificationHandler({
handleNotification: async () => ({
shouldShowAlert: false,
shouldPlaySound: false,
shouldSetBadge: false,
}),
});
}
function Nofitication() {
const isLogin = useIsLogin();
const state = useStore();
const notificationTokens = (state.user as User)?.notificationTokens || [];
const { connect } = state;
const [notificationToken, updateNotificationToken] = useState('');
async function registerForPushNotificationsAsync() {
// Push notification to Android device need google service
// Not supported in China
if (Constants.isDevice && isiOS) {
const {
status: existingStatus,
} = await Notifications.getPermissionsAsync();
let finalStatus = existingStatus;
if (existingStatus !== 'granted') {
const {
status,
} = await Notifications.requestPermissionsAsync();
finalStatus = status;
}
if (finalStatus !== 'granted') {
return;
}
const token = (await Notifications.getExpoPushTokenAsync()).data;
updateNotificationToken(token);
if (Platform.OS === 'android') {
Notifications.setNotificationChannelAsync('default', {
name: 'default',
importance: Notifications.AndroidImportance.MAX,
vibrationPattern: [0, 250, 250, 250],
lightColor: '#FF231F7C',
});
}
}
}
function handleClickNotification(response: any) {
const { focus } = response.notification.request.content.data;
setTimeout(() => {
const currentState = store.getState() as State;
const linkmans = currentState.linkmans || [];
if (linkmans.find((linkman) => linkman._id === focus)) {
action.setFocus(focus);
if (Actions.currentScene !== 'chat') {
Actions.chat();
}
}
}, 1000);
}
useEffect(() => {
disableNotification();
registerForPushNotificationsAsync();
Notifications.addNotificationResponseReceivedListener(
handleClickNotification,
);
}, []);
useEffect(() => {
if (
connect &&
isLogin &&
notificationToken &&
!notificationTokens.includes(notificationToken)
) {
setNotificationToken(notificationToken);
}
}, [connect, isLogin, notificationToken]);
function handleAppStateChange(nextAppState: string) {
if (nextAppState === 'active') {
disableNotification();
} else if (nextAppState === 'background') {
enableNotification();
}
}
useEffect(() => {
AppState.addEventListener('change', handleAppStateChange);
return () => {
AppState.removeEventListener('change', handleAppStateChange);
};
}, []);
return null;
}
export default Nofitication;
``` | /content/code_sandbox/packages/app/src/components/Nofitication.tsx | xml | 2016-02-15T14:47:58 | 2024-08-14T13:07:55 | fiora | yinxin630/fiora | 6,485 | 742 |
```xml
export {};
//# sourceMappingURL=container.test.d.ts.map
``` | /content/code_sandbox/public/types/src/scripts/components/container.test.d.ts | xml | 2016-03-15T14:02:08 | 2024-08-15T07:08:50 | Choices | Choices-js/Choices | 6,092 | 11 |
```xml
import { Component } from '@angular/core';
import { Code } from '@domain/code';
@Component({
selector: 'editor-readonly-demo',
template: `
<app-docsectiontext>
<p>When <i>readonly</i> is present, the value cannot be edited.</p>
</app-docsectiontext>
<div class="card">
<p-editor [(ngModel)]="text" [readonly]="true" [style]="{ height: '320px' }" />
</div>
<app-code [code]="code" selector="editor-readonly-demo"></app-code>
`
})
export class ReadOnlyDoc {
text: string = 'Always bet on Prime!';
code: Code = {
basic: `<p-editor [(ngModel)]="text" [readonly]="true" [style]="{ height: '320px' }" />`,
html: `<div class="card">
<p-editor [(ngModel)]="text" [readonly]="true" [style]="{ height: '320px' }" />
</div>`,
typescript: `import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { EditorModule } from 'primeng/editor';
@Component({
selector: 'editor-readonly-demo',
templateUrl: './editor-readonly-demo.html',
standalone: true,
imports: [FormsModule, EditorModule]
})
export class EditorReadonlyDemo {
text: string = 'Always bet on Prime!';
}`
};
}
``` | /content/code_sandbox/src/app/showcase/doc/editor/readonlydoc.ts | xml | 2016-01-16T09:23:28 | 2024-08-16T19:58:20 | primeng | primefaces/primeng | 9,969 | 323 |
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
// TypeScript Version: 4.1
/**
* Converts a string to uppercase.
*
* @param str - string to convert
* @returns uppercase string
*
* @example
* var str = uppercase( 'bEEp' );
* // returns 'BEEP'
*/
declare function uppercase<S extends string>( str: S ): Uppercase<S>;
// EXPORTS //
export = uppercase;
``` | /content/code_sandbox/lib/node_modules/@stdlib/string/uppercase/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 134 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="path_to_url" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="pt-BR" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CommandDescription">
<source>Install or work with workloads that extend the .NET experience.</source>
<target state="translated">Instalar ou trabalhar com as cargas de trabalho que estendem a experincia do .NET.</target>
<note />
</trans-unit>
<trans-unit id="EmscriptenDescription">
<source>Emscripten SDK compiler tooling</source>
<target state="translated">Ferramentas do compilador Emscripten SDK</target>
<note />
</trans-unit>
<trans-unit id="InstallFullCommandNameLocalized">
<source>.NET Install Command</source>
<target state="translated">Comando de instalao do .NET</target>
<note />
</trans-unit>
<trans-unit id="NoWorkloadsInstalledInfoWarning">
<source>There are no installed workloads to display.</source>
<target state="translated">No h cargas de trabalho instaladas para exibir.</target>
<note />
</trans-unit>
<trans-unit id="SkipSignCheckInvalidOption">
<source>Unable to bypass signature verification. The specified option conflicts with a global policy.</source>
<target state="translated">No possvel ignorar a verificao de assinatura. A opo especificada est em conflito com uma poltica global.</target>
<note />
</trans-unit>
<trans-unit id="WasmToolsDescription">
<source>.NET WebAssembly build tools</source>
<target state="translated">Ferramentas de build do .NET WebAssembly</target>
<note />
</trans-unit>
<trans-unit id="WorkloadIdColumn">
<source>Installed Workload Id</source>
<target state="translated">ID da carga de trabalho instalada</target>
<note />
</trans-unit>
<trans-unit id="WorkloadInfoDescription">
<source>Display information about installed workloads.</source>
<target state="translated">Exiba informaes sobre cargas de trabalho instaladas.</target>
<note />
</trans-unit>
<trans-unit id="WorkloadInstallTypeColumn">
<source>Install Type</source>
<target state="translated">Tipo de Instalao</target>
<note />
</trans-unit>
<trans-unit id="WorkloadIntegrityCheck">
<source>Checking the state of installed workloads...</source>
<target state="translated">Verificando o estado das cargas de trabalho instaladas...</target>
<note />
</trans-unit>
<trans-unit id="WorkloadIntegrityCheckError">
<source>An issue was encountered verifying workloads. For more information, run "dotnet workload update".</source>
<target state="translated">Foi encontrado um problema ao verificar as cargas de trabalho. Para obter mais informaes, execute "dotnet workload update".</target>
<note>{Locked="dotnet workload update"}</note>
</trans-unit>
<trans-unit id="WorkloadManifestVersionColumn">
<source>Manifest Version</source>
<target state="translated">Verso do Manifesto</target>
<note />
</trans-unit>
<trans-unit id="WorkloadManifestPathColumn">
<source>Manifest Path</source>
<target state="translated">Caminho do Manifesto</target>
<note />
</trans-unit>
<trans-unit id="WorkloadSourceColumn">
<source>Installation Source</source>
<target state="translated">Origem da Instalao</target>
<note />
</trans-unit>
<trans-unit id="WorkloadVersionDescription">
<source>Display the currently installed workload version.</source>
<target state="translated">Exiba a verso da carga de trabalho atualmente instalada.</target>
<note />
</trans-unit>
<trans-unit id="WriteCLIRecordForVisualStudioWorkloadMessage">
<source>Writing install records for Visual Studio workloads: '{0}'</source>
<target state="translated">Gravando registros de instalao para cargas de trabalho do Visual Studio: "{0}"</target>
<note />
</trans-unit>
<trans-unit id="WorkloadManifestInstallationConfiguration">
<source>Configured to use {0} when installing new manifests.</source>
<target state="translated">Configurado para usar {0} aoinstalar novos manifestos.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
``` | /content/code_sandbox/src/Cli/dotnet/commands/dotnet-workload/xlf/LocalizableStrings.pt-BR.xlf | xml | 2016-07-22T21:26:02 | 2024-08-16T17:23:58 | sdk | dotnet/sdk | 2,627 | 1,120 |
```xml
<project xmlns:xsi="path_to_url"
xmlns="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<groupId>io.spring.sample</groupId>
<artifactId>function-sample-pof</artifactId>
<version>0.0.1-SNAPSHOT</version><!-- @releaser:version-check-off -->
<packaging>jar</packaging>
<name>function-sample-pof</name>
<description>Spring Cloud Function Web Support</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.4.0-M1</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<reactor.version>3.1.2.RELEASE</reactor.version>
<spring-cloud-function.version>4.2.0-SNAPSHOT</spring-cloud-function.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-function-web</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-dependencies</artifactId>
<version>${spring-cloud-function.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<classifier>exec</classifier>
</configuration>
<dependencies>
<dependency>
<groupId>org.springframework.boot.experimental</groupId>
<artifactId>spring-boot-thin-layout</artifactId>
<version>1.0.27.RELEASE</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>path_to_url
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>path_to_url
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>path_to_url
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>path_to_url
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>path_to_url
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>path_to_url
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
``` | /content/code_sandbox/spring-cloud-function-samples/function-sample-pof/pom.xml | xml | 2016-09-22T02:34:34 | 2024-08-16T08:19:07 | spring-cloud-function | spring-cloud/spring-cloud-function | 1,032 | 1,016 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.