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
import "reflect-metadata"
import { DataSource, DataSourceOptions } from "../../src/index"
import { Post } from "./entity/Post"
const options: DataSourceOptions = {
type: "mongodb",
host: "localhost",
database: "test",
logging: ["query", "error"],
// synchronize: true,
entities: [Post],
}
const dataSource = new DataSource(options)
dataSource.initialize().then(
async (dataSource) => {
const post = new Post()
post.text = "Hello how are you?"
post.title = "hello"
post.likesCount = 100
await dataSource.getRepository(Post).save(post)
console.log("Post has been saved: ", post)
const loadedPost = await dataSource.getRepository(Post).findOneBy({
text: "Hello how are you?",
})
console.log("Post has been loaded: ", loadedPost)
// take last 5 of saved posts
const allPosts = await dataSource.getRepository(Post).find({ take: 5 })
console.log("All posts: ", allPosts)
// perform mongodb-specific query using cursor which returns properly initialized entities
const cursor1 = dataSource
.getMongoRepository(Post)
.createEntityCursor({ title: "hello" })
console.log("Post retrieved via cursor #1: ", await cursor1.next())
console.log("Post retrieved via cursor #2: ", await cursor1.next())
// we can also perform mongodb-specific queries using mongodb-specific entity manager
const cursor2 = dataSource.mongoManager.createEntityCursor(Post, {
title: "hello",
})
console.log(
"Only two posts retrieved via cursor: ",
await cursor2.limit(2).toArray(),
)
},
(error) => console.log("Error: ", error),
)
``` | /content/code_sandbox/sample/sample34-mongodb/app.ts | xml | 2016-02-29T07:41:14 | 2024-08-16T18:28:52 | typeorm | typeorm/typeorm | 33,875 | 378 |
```xml
import { IListViewItems } from "./../UploadFromSharePoint/IListViewItems";
import { IColumn } from "office-ui-fabric-react";
export interface IUploadFromSharePointState {
selectItem: IListViewItems;
hasError: boolean;
messageError:string;
isloading: boolean;
hideDialog: boolean;
listViewItems: IListViewItems[];
hasMoreItems:boolean;
disableSaveButton:boolean;
columns: IColumn[];
messageInfo:string;
}
``` | /content/code_sandbox/samples/react-mytasks/src/Controls/UploadFromSharePoint/IUploadFromSharePointState.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 103 |
```xml
<resources>
<string name="app_name">Git Versioning</string>
</resources>
``` | /content/code_sandbox/GitVersioning/app/src/main/res/values/strings.xml | xml | 2016-02-25T11:06:48 | 2024-08-07T21:41:59 | android-examples | nisrulz/android-examples | 1,747 | 21 |
```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.
-->
<LinearLayout
xmlns:android="path_to_url"
xmlns:app="path_to_url"
android:layout_width="match_parent"
android:layout_height="600dp"
android:orientation="vertical">
<FrameLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/bottomsheet_state"
android:layout_width="match_parent"
android:layout_height="100dp"
android:textColor="?attr/colorOnSurface"
android:gravity="center"
android:textSize="20sp"
android:text="@string/cat_shape_theming_bottomsheet_title"/>
</FrameLayout>
</LinearLayout>
``` | /content/code_sandbox/catalog/java/io/material/catalog/shapetheming/res/layout/cat_shape_theming_bottomsheet_content.xml | xml | 2016-12-05T16:11:29 | 2024-08-16T17:51:42 | material-components-android | material-components/material-components-android | 16,176 | 207 |
```xml
// 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
import 'web-streams-polyfill';
import {
validateVector,
encodeAll, encodeEach, encodeEachDOM, encodeEachNode,
int64sNoNulls, int64sWithNulls, int64sWithMaxInts,
} from './utils.js';
import { Vector, DataType, Int64 } from 'apache-arrow';
const testDOMStreams = process.env.TEST_DOM_STREAMS === 'true';
const testNodeStreams = process.env.TEST_NODE_STREAMS === 'true';
const typeFactory = () => new Int64();
const valueName = `Int64`.toLowerCase();
const encode0 = encodeAll(typeFactory);
const encode1 = encodeEach(typeFactory);
const encode2 = encodeEach(typeFactory, 5);
const encode3 = encodeEach(typeFactory, 25);
const encode4 = encodeEachDOM(typeFactory, 25);
const encode5 = encodeEachNode(typeFactory, 25);
const MAX_INT64 = 9223372034707292159n;
type EncodeValues<T extends DataType> = (values: (T['TValue'] | null)[], nullVals?: any[]) => Promise<Vector<T>>;
function encodeAndValidate<T extends DataType>(encode: EncodeValues<T>, providedNulls: any[] = [], expectedNulls = providedNulls) {
return (values: any[]) => {
return async () => {
const vector = await encode(values, providedNulls);
return validateVector(values, vector, expectedNulls);
};
};
}
describe(`Int64Builder`, () => {
describe(`encode single chunk`, () => {
it(`encodes ${valueName} no nulls`, encodeAndValidate(encode0, [], [])(int64sNoNulls(20)));
it(`encodes ${valueName} with nulls`, encodeAndValidate(encode0, [null])(int64sWithNulls(20)));
it(`encodes ${valueName} with MAX_INT`, encodeAndValidate(encode0, [MAX_INT64])(int64sWithMaxInts(20)));
});
describe(`encode chunks length default`, () => {
it(`encodes ${valueName} no nulls`, encodeAndValidate(encode1, [], [])(int64sNoNulls(20)));
it(`encodes ${valueName} with nulls`, encodeAndValidate(encode1, [null])(int64sWithNulls(20)));
it(`encodes ${valueName} with MAX_INT`, encodeAndValidate(encode1, [MAX_INT64])(int64sWithMaxInts(20)));
});
describe(`encode chunks length 5`, () => {
it(`encodes ${valueName} no nulls`, encodeAndValidate(encode2, [], [])(int64sNoNulls(20)));
it(`encodes ${valueName} with nulls`, encodeAndValidate(encode2, [null])(int64sWithNulls(20)));
it(`encodes ${valueName} with MAX_INT`, encodeAndValidate(encode2, [MAX_INT64])(int64sWithMaxInts(20)));
});
describe(`encode chunks length 25`, () => {
it(`encodes ${valueName} no nulls`, encodeAndValidate(encode3, [], [])(int64sNoNulls(20)));
it(`encodes ${valueName} with nulls`, encodeAndValidate(encode3, [null])(int64sWithNulls(20)));
it(`encodes ${valueName} with MAX_INT`, encodeAndValidate(encode3, [MAX_INT64])(int64sWithMaxInts(20)));
});
testDOMStreams && describe(`encode chunks length 25, WhatWG stream`, () => {
it(`encodes ${valueName} no nulls`, encodeAndValidate(encode4, [], [])(int64sNoNulls(20)));
it(`encodes ${valueName} with nulls`, encodeAndValidate(encode4, [null])(int64sWithNulls(20)));
it(`encodes ${valueName} with MAX_INT`, encodeAndValidate(encode4, [MAX_INT64])(int64sWithMaxInts(20)));
});
testNodeStreams && describe(`encode chunks length 25, NodeJS stream`, () => {
it(`encodes ${valueName} no nulls`, encodeAndValidate(encode5, [], [])(int64sNoNulls(20)));
it(`encodes ${valueName} with nulls`, encodeAndValidate(encode5, [null])(int64sWithNulls(20)));
it(`encodes ${valueName} with MAX_INT`, encodeAndValidate(encode5, [MAX_INT64])(int64sWithMaxInts(20)));
});
});
``` | /content/code_sandbox/js/test/unit/builders/int64-tests.ts | xml | 2016-02-17T08:00:23 | 2024-08-16T19:00:48 | arrow | apache/arrow | 14,094 | 1,077 |
```xml
import * as React from 'react';
import { getIntrinsicElementProps, slot, useEventCallback } from '@fluentui/react-utilities';
import type { AccordionItemProps, AccordionItemState } from './AccordionItem.types';
import type { AccordionToggleEvent } from '../Accordion/Accordion.types';
import { useAccordionContext_unstable } from '../../contexts/accordion';
/**
* Returns the props and state required to render the component
* @param props - AccordionItem properties
* @param ref - reference to root HTMLElement of AccordionItem
*/
export const useAccordionItem_unstable = (
props: AccordionItemProps,
ref: React.Ref<HTMLElement>,
): AccordionItemState => {
const { value, disabled = false } = props;
const requestToggle = useAccordionContext_unstable(ctx => ctx.requestToggle);
const open = useAccordionContext_unstable(ctx => ctx.openItems.includes(value));
const onAccordionHeaderClick = useEventCallback((event: AccordionToggleEvent) => requestToggle({ event, value }));
return {
open,
value,
disabled,
onHeaderClick: onAccordionHeaderClick,
components: {
root: 'div',
},
root: slot.always(
getIntrinsicElementProps('div', {
// FIXME:
// `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`
// but since it would be a breaking change to fix it, we are casting ref to it's proper type
ref: ref as React.Ref<HTMLDivElement>,
...props,
}),
{ elementType: 'div' },
),
};
};
``` | /content/code_sandbox/packages/react-components/react-accordion/library/src/components/AccordionItem/useAccordionItem.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 349 |
```xml
import {
ItemRow as CommonItemRow,
ContentColumn,
ItemText
} from "@erxes/ui-sales/src/deals/styles";
import {
ContainerBox,
MovementItemConfigContainer,
MovementItemInfoContainer,
RemoveRow
} from "../../../style";
import { FormControl, Icon, TextInfo, __ } from "@erxes/ui/src";
import { Flex } from "@erxes/ui/src/styles/main";
import { IMovementItem } from "../../../common/types";
import { Link } from "react-router-dom";
import React from "react";
import { SelectWithAssets } from "../../../common/utils";
import client from "@erxes/ui/src/apolloClient";
import { gql } from "@apollo/client";
import { queries as itemQueries } from "../../assets/graphql";
import { renderFullName } from "@erxes/ui/src/utils/core";
type Props = {
item: IMovementItem;
children: React.ReactNode;
changeCurrent: (id: string) => void;
removeRow: (id: string) => void;
current: string;
selectedItems?: string[];
isChecked: boolean;
onChangeBulkItems: (id: string) => void;
handleChangeRowItem: (prevItemId, newItem) => void;
};
const MovementItem = (props: Props) => {
const {
item,
children,
current,
isChecked,
selectedItems,
removeRow,
changeCurrent,
onChangeBulkItems,
handleChangeRowItem
} = props;
const {
assetId,
assetDetail,
branch,
department,
customer,
company,
teamMember,
sourceLocations
} = item;
const onChange = e => {
onChangeBulkItems(item.assetId);
};
const onClick = e => {
e.stopPropagation();
};
const ItemRow = ({
label,
children
}: {
label: string;
children: React.ReactNode;
}) => {
return (
<CommonItemRow>
<ItemText>{__(label)}</ItemText>
<ContentColumn flex="3">{children}</ContentColumn>
</CommonItemRow>
);
};
const changeRowItem = assetId => {
client
.query({
query: gql(itemQueries.item),
fetchPolicy: "network-only",
variables: { assetId }
})
.then(res => {
let { assetMovementItem } = res.data;
handleChangeRowItem(item.assetId, assetMovementItem);
});
};
const generateInfoText = ({ type, prev, current }) => {
let prevText;
let currentText;
if (["branch", "department"].includes(type)) {
return (
<>
{prev && `${prev?.title} / `}
{current?.title}
</>
);
}
if (type === "team") {
prevText = prev?.details?.fullName;
currentText = current?.details?.fullName;
}
if (type === "companies") {
prevText = prev?.primaryName;
currentText = current?.primaryName;
}
if (type === "contacts") {
prevText = prev ? renderFullName(prev || "") : "";
currentText = current ? renderFullName(current || "") : "";
}
const generateLink = variable => {
if (type === "contacts") {
return `/${type}/details/${variable?._id}`;
}
return `/settings/${type}/details/${variable?._id}`;
};
return (
<>
{prev && (
<>
<Link to={generateLink(prev)}>{__(prevText)}</Link>
<TextInfo>/</TextInfo>
</>
)}
<Link to={generateLink(current)}>{__(currentText)}</Link>
</>
);
};
return (
<>
<tr
id={assetId}
className={current === assetId ? "active" : ""}
onClick={() => changeCurrent(assetId)}
>
<td onClick={onClick}>
<FormControl
checked={isChecked}
componentclass="checkbox"
onChange={onChange}
color="#3B85F4"
/>
</td>
<td>
<ContainerBox $row>{__(assetDetail?.name || "-")}</ContainerBox>
</td>
<td>{__(branch?.title || "-")}</td>
<td>{__(department?.title || "-")}</td>
<td>{__((customer && renderFullName(customer)) || "-")}</td>
<td>{__(company?.primaryName || "-")}</td>
<td>{__(teamMember?.details?.fullName || "-")}</td>
<td>
<RemoveRow>
<Icon onClick={() => removeRow(assetId)} icon="times-circle" />
</RemoveRow>
</td>
</tr>
{current === assetId && (
<tr>
<td style={{ width: 40 }} />
<td colSpan={7}>
<>
<Flex>
<MovementItemInfoContainer>
<ItemRow label="Choose Asset:">
<SelectWithAssets
label="Choose Asset"
name="assetId"
onSelect={changeRowItem}
initialValue={assetId}
skip={selectedItems?.filter(item => item !== assetId)}
customOption={{ value: "", label: "Choose Asset" }}
/>
</ItemRow>
<ItemRow label="Branch:">
{generateInfoText({
type: "branch",
prev: sourceLocations?.branch,
current: branch
})}
</ItemRow>
<ItemRow label="Department:">
{generateInfoText({
type: "department",
prev: sourceLocations?.department,
current: department
})}
</ItemRow>
<ItemRow label="Customer:">
{generateInfoText({
type: "contacts",
prev: sourceLocations?.customer,
current: customer
})}
</ItemRow>
<ItemRow label="Company:">
{generateInfoText({
type: "companies",
prev: sourceLocations?.company,
current: company
})}
</ItemRow>
<ItemRow label="Team Member:">
{generateInfoText({
type: "team",
prev: sourceLocations?.teamMember,
current: teamMember
})}
</ItemRow>
</MovementItemInfoContainer>
<MovementItemConfigContainer>
<ContainerBox $column>{children}</ContainerBox>
</MovementItemConfigContainer>
</Flex>
</>
</td>
</tr>
)}
</>
);
};
export default MovementItem;
``` | /content/code_sandbox/packages/plugin-assets-ui/src/movements/movements/components/MovementItem.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 1,411 |
```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
/**
* The mathematical constant ``.
*
* @example
* var val = PI;
* // returns 3.141592653589793
*/
declare const PI: number;
// EXPORTS //
export = PI;
``` | /content/code_sandbox/lib/node_modules/@stdlib/constants/float64/pi/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 104 |
```xml
import { css, html, LitElement } from 'lit';
import { customElement } from 'lit/decorators.js';
import { icons, svgBase } from './svg.css';
@customElement('gk-focus-svg')
export class BlameSvg extends LitElement {
static override styles = [
svgBase,
icons,
css`
text {
fill: var(--vscode-foreground);
font-size: 18px;
}
.heading {
font-weight: 600;
font-size: 20px;
}
.codicon {
font-family: codicon;
cursor: default;
user-select: none;
}
.glicon {
font-family: glicons;
cursor: default;
user-select: none;
}
.indicator-info {
fill: var(--vscode-problemsInfoIcon-foreground);
}
.indicator-warning {
fill: var(--vscode-problemsWarningIcon-foreground);
}
.indicator-error {
fill: var(--vscode-problemsErrorIcon-foreground);
}
.tabs {
}
.tab {
text-decoration: underline;
opacity: 0.8;
font-size: 16px;
cursor: pointer;
}
.row-box {
fill: var(--vscode-foreground);
opacity: 0;
}
.row:hover .row-box {
opacity: 0.06;
}
.link {
fill: var(--vscode-textLink-foreground);
cursor: pointer;
}
.link:hover {
text-decoration: underline;
}
.addition {
fill: var(--vscode-gitDecoration-addedResourceForeground);
}
.deletion {
fill: var(--vscode-gitDecoration-deletedResourceForeground);
}
`,
];
override render() {
return html`
<!-- Don't reformat or let prettier reformat the SVG otherwise whitespace will get added incorrect and screw up the positioning -->
<!-- a-prettier-ignore -->
<svg width="850" height="290" viewBox="0 0 850 290" fill="none" xmlns="path_to_url">
<g>
<text x="10" y="30" class="heading">
<tspan>My Pull Requests</tspan>
</text>
<text x="100%" y="30.5" class="tabs" text-anchor="end">
<tspan class="tab" dx="-10">All</tspan>
<tspan class="tab" dx="6">Opened by me</tspan>
<tspan class="tab" dx="6">Assigned to me</tspan>
<tspan class="tab" dx="6">Needs my review</tspan>
<tspan class="tab" dx="6">Mentions me</tspan>
</text>
</g>
<g class="row">
<rect x="0" y="52" width="100%" height="34" class="row-box" />
<text x="10" y="75">
<tspan dx="2" dy="2" class="codicon"></tspan>
<tspan dx="2" class="codicon indicator-error"></tspan>
<tspan dx="30" dy="-2">1wk</tspan>
<tspan dx="30">adds stylelint</tspan>
<tspan class="link">#2453</tspan>
</text>
<text x="100%" y="75" text-anchor="end">
<tspan dx="-10" dy="2" class="codicon"></tspan>
<tspan dx="40" dy="-2" class="addition">+1735</tspan>
<tspan dx="2" class="deletion">-748</tspan>
<tspan dx="40" dy="2" class="glicon"></tspan>
</text>
</g>
<g class="row">
<rect x="0" y="86" width="100%" height="34" class="row-box" />
<text x="10" y="109">
<tspan dx="2" dy="2" class="codicon"></tspan>
<tspan dx="2" class="codicon indicator-info"></tspan>
<tspan dx="30" dy="-2">1wk</tspan>
<tspan dx="30">Workspaces side bar view</tspan>
<tspan class="link">#2650</tspan>
</text>
<text x="100%" y="109" text-anchor="end">
<tspan dx="-10" dy="2" class="codicon"></tspan>
<tspan dx="40" dy="-2" class="addition">+3,556</tspan>
<tspan dx="2" class="deletion">-136</tspan>
<tspan dx="34" dy="2" class="glicon"></tspan>
</text>
</g>
<g class="row">
<rect x="0" y="120" width="100%" height="34" class="row-box" />
<text x="10" y="143">
<tspan dx="2" dy="2" class="codicon"></tspan>
<tspan dx="2" class="codicon indicator-error"></tspan>
<tspan dx="30" dy="-2" class="indicator-warning">3wk</tspan>
<tspan dx="29">Adds experimental.OpenAIModel</tspan>
<tspan class="link">#2637</tspan>
</text>
<text x="100%" y="143" text-anchor="end">
<tspan dx="-10" dy="2" class="codicon"></tspan>
<tspan dx="40" dy="-2" class="addition">+79</tspan>
<tspan dx="2" class="deletion">-12</tspan>
<tspan dx="72" dy="2" class="glicon"></tspan>
</text>
</g>
<g class="row">
<rect x="0" y="154" width="100%" height="34" class="row-box" />
<text x="10" y="177">
<tspan dx="2" dy="2" class="codicon"></tspan>
<tspan dx="54" dy="-2" class="indicator-error">2mo</tspan>
<tspan dx="29">adds focus view</tspan>
<tspan class="link">#2516</tspan>
</text>
<text x="100%" y="177" text-anchor="end">
<tspan dx="-10" dy="2" class="codicon"></tspan>
<tspan dx="39" dy="-2" class="addition">+3,327</tspan>
<tspan dx="2" class="deletion">-28</tspan>
<tspan dx="45" dy="2" class="glicon"></tspan>
</text>
</g>
<g>
<text x="10" y="232" class="heading">
<tspan>My Issues</tspan>
</text>
<text x="100%" y="232.5" class="tabs" text-anchor="end">
<tspan class="tab" dx="-10">All</tspan>
<tspan class="tab" dx="6">Opened by me</tspan>
<tspan class="tab" dx="6">Assigned to me</tspan>
<tspan class="tab" dx="6">Mentions me</tspan>
</text>
</g>
<g class="row">
<rect x="0" y="255" width="100%" height="30" class="row-box" />
<text x="10" y="278">
<tspan dx="2" dy="2" class="codicon"></tspan>
<tspan dx="54" dy="-2" class="indicator-error">2mo</tspan>
<tspan dx="30">Labs: add AI explain panel to Inspect</tspan>
<tspan class="link">#2628</tspan>
</text>
<text x="100%" y="278" text-anchor="end">
<tspan dx="-10" dy="2" class="codicon"></tspan>
<tspan dx="10" dy="0.5" class="codicon"></tspan>
</text>
</g>
</svg>
`;
}
}
``` | /content/code_sandbox/src/webviews/apps/welcome/components/svg-focus.ts | xml | 2016-08-08T14:50:30 | 2024-08-15T21:25:09 | vscode-gitlens | gitkraken/vscode-gitlens | 8,889 | 2,046 |
```xml
#!/usr/bin/env node
import * as fs from 'fs';
import * as path from 'path';
import * as yargs from 'yargs';
import * as guess from './';
import writeDefinitelyTypedPackage from './definitely-typed';
const templatesDirectory = path.join(__dirname, "..", "..", "templates");
interface Options {
module?: string;
expression?: string;
'expression-file': string;
identifier?: string;
template?: string;
name?: string;
file?: string | boolean;
dt?: string | boolean;
stdout?: boolean;
overwrite?: boolean;
version?: boolean;
}
const args = yargs
.alias('m', 'module')
.alias('i', 'identifier')
.alias('e', 'expression')
.alias('n', 'name')
.alias('f', 'file')
.alias('d', 'dt')
.alias('s', 'stdout')
.alias('o', 'overwrite')
.alias('t', 'template')
.alias('v', 'version')
.argv as any as Options;
class ArgsError extends Error {
constructor(public argsError: string) {
super();
this.name = 'ArgsError';
this.message = argsError;
Object.setPrototypeOf(this, ArgsError.prototype);
}
}
let result: string | undefined;
try {
if (args.version) {
console.log(require("../../package.json").version);
process.exit(0);
}
if (+!!args.dt + +!!args.file + +!!args.stdout > 1) {
throw new ArgsError('Cannot specify more than one output mode');
}
if (+!!args.identifier + +!!args.expression + +!!args.module + +!!args['expression-file'] + +!!args.template
!== 1) {
throw new ArgsError('Must specify exactly one input');
}
if (typeof args.name === 'boolean') throw new ArgsError('Must specify a value for "--name"');
if (typeof args.identifier === 'boolean') throw new ArgsError('Must specify a value for "--identifier"');
if (typeof args.module === 'boolean') throw new ArgsError('Must specify a value for "--module"');
if (args.overwrite !== undefined && args.overwrite !== true)
throw new ArgsError('--overwrite does not accept an argument');
let name: string;
if (args.module) {
if (args.name) throw new ArgsError('Cannot use --name with --module');
name = args.module;
(module as any).paths.unshift(process.cwd() + '/node_modules');
result = guess.generateModuleDeclarationFile(args.module, require(args.module));
} else if (args.expression) {
name = args.name || 'dts_gen_expr';
result = guess.generateIdentifierDeclarationFile(name, eval(args.expression));
} else if (args['expression-file']) {
if (args.name) throw new ArgsError('Cannot use --name with --expression-file');
const filename = args['expression-file'];
name = path.basename(filename, path.extname(filename)).replace(/[^A-Za-z0-9]/g, '_');
(module as any).paths.unshift(process.cwd() + '/node_modules');
const fileContent = fs.readFileSync(filename, "utf-8");
result = guess.generateIdentifierDeclarationFile(name, eval(fileContent));
} else if (args.identifier) {
if (args.name) throw new ArgsError('Cannot use --name with --identifier');
if (args.module || args.expression) throw new ArgsError('Cannot specify more than one input');
name = args.identifier;
result = guess.generateIdentifierDeclarationFile(args.identifier, eval(args.identifier));
} else if (args.template) {
if (!args.name) throw new ArgsError('Needs a name');
name = args.name;
if (args.module || args.expression) throw new ArgsError('Cannot mix --template with --module or --expression');
result = getTemplate(args.template);
} else {
throw new Error('Internal error, please log a bug with the commandline you specified');
}
if (args.dt) {
writeDefinitelyTypedPackage(result, name, !!args.overwrite);
} else if (args.stdout) {
console.log(result);
} else {
let filename =
typeof args.file === 'boolean' || args.file === undefined ? name + '.d.ts' : args.file;
if (!filename.endsWith('.d.ts')) {
filename = filename + '.d.ts';
}
if (!args.overwrite && fs.existsSync(filename)) {
console.error(`File ${filename} already exists and --overwrite was not specified; exiting.`);
process.exit(2);
}
fs.writeFileSync(filename, prependOurHeader(result), 'utf-8');
console.log(`Wrote ${result.split(/\r\n|\r|\n/).length} lines to ${filename}.`);
}
} catch (e) {
if (e instanceof ArgsError) {
console.error('Invalid arguments: ' + e.argsError);
console.log('');
printHelp();
process.exit(1);
} else if (e.code === 'MODULE_NOT_FOUND') {
console.error(`Error loading module "${args.module}".\n` +
getErrorMessageFirstLine(e).replace(/'/g, '"') + '.\n' +
`Please install missing module and try again.`);
process.exit(1);
} else {
console.log('Unexpected crash! Please log a bug with the commandline you specified.');
throw e;
}
}
function printHelp() {
console.log('Usage: dts-gen input [settings] [output]');
console.log('');
console.log('Input Options:');
console.log(' -m[odule] fs The "fs" node module (must be installed)');
console.log(' -i[dentifier] Math The global variable "Math"');
console.log(' -e[xpression] "new C()" The expression "new C()"');
console.log(' -t[emplate] module Name of a template. Templates are:');
console.log(` ${allTemplateNames()}`);
console.log('');
console.log('Settings:');
console.log(' -n[ame] n The name to emit when generating for an expression');
console.log('');
console.log('Output Options:');
console.log(' -f[ile] [filename.d.ts] Write to a file (default)');
console.log(' -d[t] [dirName] Create a folder suitable for DefinitelyTyped');
console.log(' -s[tdout] Write to stdout');
console.log(' -o[verwrite] Allow overwriting files');
console.log('');
console.log('Example: dts-gen -m fs --stdout');
}
function prependOurHeader(result: string) {
return `/** Declaration file generated by dts-gen */\r\n\r\n` + result;
}
function getTemplate(templateName: string): string {
try {
return fs.readFileSync(path.join(templatesDirectory, templateName + ".d.ts"), "utf-8");
} catch (e) {
throw new ArgsError(`Could not read template '${templateName}'. Expected one of:\n${allTemplateNames()}`);
}
}
function allTemplateNames(): string {
return fs.readdirSync(templatesDirectory).map(t => t.slice(0, t.length - ".d.ts".length)).join(", ");
}
function getErrorMessageFirstLine(error: Error): string {
return error.message.split('\n', 1)[0];
}
``` | /content/code_sandbox/lib/run.ts | xml | 2016-08-25T21:07:14 | 2024-07-29T17:30:13 | dts-gen | microsoft/dts-gen | 2,431 | 1,613 |
```xml
/*
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this project.
*/
import { renderIcon } from '../icon.renderer.js';
import { IconShapeTuple } from '../interfaces/icon.interfaces.js';
const icon = {
outline:
'<path d="M29.1,27.1C28,27,26.9,27.4,26,28.2c-1.1,1.1-2.9,1.1-4.1,0c-1-0.7-2.1-1.1-3.3-1.1c-1.2-0.1-2.4,0.3-3.3,1.1C14.7,28.7,14,29,13.2,29s-1.5-0.3-2.1-0.8c-1-0.8-2.2-1.2-3.4-1.2s-2.4,0.4-3.4,1.2C3.7,28.7,2.8,29,2,29v2c1.3,0.1,2.6-0.3,3.6-1.2C6.2,29.3,7.1,29,7.9,29c0.7,0,1.5,0.3,2.1,0.8c1.8,1.6,4.6,1.6,6.5,0c0.6-0.5,1.3-0.8,2.1-0.8c0.7,0,1.4,0.3,2,0.8c1.9,1.6,4.6,1.6,6.5,0c0.5-0.5,1.3-0.8,2-0.8c0.7,0,1.4,0.3,1.9,0.8c0.9,0.7,1.9,1.1,3,1.2v-2c-1,0-1.2-0.4-1.7-0.8C31.4,27.5,30.3,27.1,29.1,27.1z"/><path d="M6,23c0-0.6,0.5-1,1.1-1H32l-3.5,3.1h0.2c0.8,0,1.6,0.2,2.2,0.5l2.5-2.2l0.2-0.2c0.7-0.8,0.6-2.1-0.2-2.8C33,20.2,32.6,20,32.1,20h-25c-1.7,0-3,1.3-3,3v3.2c0.5-0.5,1.2-0.8,1.9-1.1V23z"/><path d="M8.9,19H15v-7.8c0-0.6-0.3-1.2-0.8-1.6C13.3,8.9,12,9.1,11.4,10l-4.1,5.9c-0.4,0.6-0.4,1.4-0.1,2.1C7.5,18.6,8.2,19,8.9,19z M13.1,11.2L13,17H8.9L13.1,11.2z"/><path d="M26,18c0.4-0.6,0.4-1.4,0-2L19.7,5.6c-0.4-0.6-1-1-1.7-1c-1.1,0-2,0.9-2,2V19h8.3C25,19,25.7,18.6,26,18z M17.9,6.6l6.4,10.5h-6.4V6.6z"/>',
solid:
'<path d="M34,31c-1.1-0.1-2.1-0.5-3-1.2c-0.5-0.5-1.2-0.8-2-0.8c-0.7,0-1.5,0.3-2,0.8c-0.9,0.8-2,1.1-3.1,1.1c-1.2,0-2.4-0.4-3.3-1.1c-1.2-1.1-3-1.1-4.1,0c-0.9,0.8-2.1,1.2-3.4,1.2c-1.2,0-2.3-0.4-3.2-1.2c-0.6-0.5-1.3-0.8-2-0.8c-0.8,0-1.7,0.3-2.3,0.8c-1,0.8-2.3,1.2-3.5,1.1V29c0.8,0,1.7-0.3,2.3-0.9c1-0.8,2.2-1.2,3.4-1.1c1.2,0,2.4,0.4,3.3,1.2c1.2,1.1,3,1.1,4.2,0c1.9-1.6,4.7-1.6,6.5,0c1.2,1.1,3,1.1,4.1,0c0.9-0.8,2.1-1.2,3.3-1.2c1.1,0,2.2,0.4,3,1.2C32.8,28.7,33,29,34,29L34,31z"/><path d="M4.1,26.2c0.6-0.5,1.2-0.8,1.9-1V23c0-0.6,0.4-1.1,1-1.1h25L28.4,25h0.2c0.8,0,1.6,0.2,2.2,0.5l2.5-2.2l0.2-0.2c0.7-0.9,0.5-2.1-0.4-2.8C32.9,20.1,32.4,20,32,20H7c-1.7,0-3,1.3-3,3L4.1,26.2L4.1,26.2z"/><path d="M14.9,18.9H8.9c-1.1,0-2-0.9-2-2c0-0.4,0.1-0.8,0.4-1.2l4.1-5.8c0.6-0.9,1.9-1.1,2.8-0.5c0.5,0.4,0.8,1,0.8,1.6V18.9z"/><path d="M24.3,18.9H16V6.4c0-1.1,0.9-2,2-2c0.7,0,1.3,0.4,1.7,1L26,15.8c0.6,1,0.2,2.2-0.7,2.7C25,18.7,24.6,18.8,24.3,18.9L24.3,18.9z"/>',
};
export const boatIconName = 'boat';
export const boatIcon: IconShapeTuple = [boatIconName, renderIcon(icon)];
``` | /content/code_sandbox/packages/core/src/icon/shapes/boat.ts | xml | 2016-09-29T17:24:17 | 2024-08-11T17:06:15 | clarity | vmware-archive/clarity | 6,431 | 1,860 |
```xml
import { Localized } from "@fluent/react/compat";
import React, { FunctionComponent, Suspense } from "react";
import { Field } from "react-final-form";
import { graphql } from "react-relay";
import { MarkdownEditor } from "coral-framework/components/loadables";
import {
formatEmpty,
parseEmptyAsNull,
parseWithDOMPurify,
} from "coral-framework/lib/form";
import CLASSES from "coral-stream/classes";
import FieldValidationMessage from "coral-stream/common/FieldValidationMessage";
import {
MessageBox,
MessageBoxContent,
MessageBoxIcon,
} from "coral-stream/common/MessageBox";
import {
AlertTriangleIcon,
CalendarInformationIcon,
ConversationChatTextIcon,
MessagesBubbleSquareIcon,
QuestionHelpMessageIcon,
SvgIcon,
} from "coral-ui/components/icons";
import {
AriaInfo,
HorizontalGutter,
Spinner,
TileOption,
TileSelector,
Typography,
} from "coral-ui/components/v2";
import styles from "./MessageBoxConfig.css";
export interface Props {
autoFocus?: boolean;
}
// eslint-disable-next-line no-unused-expressions
graphql`
fragment MessageBoxConfig_formValues on StorySettings {
messageBox {
enabled
content
icon
}
}
`;
const MessageBoxConfig: FunctionComponent<Props> = ({ autoFocus }) => {
return (
<HorizontalGutter size="oneAndAHalf">
<Field
name="messageBox.icon"
parse={parseEmptyAsNull}
format={formatEmpty}
>
{({ input: iconInput }) => (
<Field name="messageBox.content" parse={parseWithDOMPurify}>
{({ input: contentInput, meta }) => (
<>
<HorizontalGutter size="half" container="section">
<Localized id="configure-messageBox-preview">
<Typography
variant="bodyCopyBold"
container="h1"
className={styles.preview}
>
PREVIEW
</Typography>
</Localized>
<MessageBox
className={CLASSES.configureMessageBox.messageBox}
>
{iconInput.value && (
<MessageBoxIcon icon={iconInput.value} />
)}
{/* Using a zero width join character to ensure that the space is used */}
<MessageBoxContent
className={
iconInput.value ? styles.withIcon : styles.withoutIcon
}
>
{contentInput.value || " "}
</MessageBoxContent>
</MessageBox>
</HorizontalGutter>
<HorizontalGutter size="half" container="fieldset">
<Localized id="configure-messageBox-selectAnIcon">
<Typography variant="bodyCopyBold" container="legend">
Select an Icon
</Typography>
</Localized>
<TileSelector
id="configure-messageBox-icon"
name={iconInput.name}
onChange={iconInput.onChange}
value={iconInput.value}
>
<TileOption
className={CLASSES.configureMessageBox.option}
value="question_answer"
>
<SvgIcon size="md" Icon={ConversationChatTextIcon} />
<Localized id="configure-messageBox-iconConversation">
<AriaInfo>Conversation</AriaInfo>
</Localized>
</TileOption>
<TileOption
className={CLASSES.configureMessageBox.option}
value="today"
>
<SvgIcon size="md" Icon={CalendarInformationIcon} />
<Localized id="configure-messageBox-iconDate">
<AriaInfo>Date</AriaInfo>
</Localized>
</TileOption>
<TileOption
className={CLASSES.configureMessageBox.option}
value="help_outline"
>
<SvgIcon size="md" Icon={QuestionHelpMessageIcon} />
<Localized id="configure-messageBox-iconHelp">
<AriaInfo>Help</AriaInfo>
</Localized>
</TileOption>
<TileOption
className={CLASSES.configureMessageBox.option}
value="warning"
>
<SvgIcon size="md" Icon={AlertTriangleIcon} />
<Localized id="configure-messageBox-iconWarning">
<AriaInfo>Warning</AriaInfo>
</Localized>
</TileOption>
<TileOption
className={CLASSES.configureMessageBox.option}
value="chat_bubble_outline"
>
<SvgIcon size="md" Icon={MessagesBubbleSquareIcon} />
<Localized id="configure-messageBox-iconChatBubble">
<AriaInfo>Chat Bubble</AriaInfo>
</Localized>
</TileOption>
<TileOption
className={CLASSES.configureMessageBox.option}
value=""
>
<Localized id="configure-messageBox-noIcon">
<span>No Icon</span>
</Localized>
</TileOption>
</TileSelector>
</HorizontalGutter>
<HorizontalGutter size="half" container="section">
<div>
<Localized id="configure-messageBox-writeAMessage">
<Typography
variant="bodyCopyBold"
container={
<label htmlFor="configure-messageBox-content" />
}
>
Write a Message
</Typography>
</Localized>
</div>
<Suspense fallback={<Spinner />}>
<MarkdownEditor
id="configure-messageBox-content"
/* eslint-disable-next-line jsx-a11y/no-autofocus*/
autoFocus={autoFocus}
data-testid="configure-messageBox-content"
name={contentInput.name}
onChange={contentInput.onChange}
value={contentInput.value}
/>
</Suspense>
<FieldValidationMessage meta={meta} />
</HorizontalGutter>
</>
)}
</Field>
)}
</Field>
</HorizontalGutter>
);
};
export default MessageBoxConfig;
``` | /content/code_sandbox/client/src/core/client/stream/tabs/Configure/AddMessage/MessageBoxConfig.tsx | xml | 2016-10-31T16:14:05 | 2024-08-06T16:15:57 | talk | coralproject/talk | 1,881 | 1,229 |
```xml
import Reflux from 'reflux';
import { Listenable } from 'mailspring-store';
const ActionScopeWindow = 'window';
const ActionScopeGlobal = 'global';
const ActionScopeMainWindow = 'main';
/*
Public: In the Flux {Architecture.md}, almost every user action
is translated into an Action object and fired globally. Stores in the app observe
these actions and perform business logic. This loose coupling means that your
packages can observe actions and perform additional logic, or fire actions which
the rest of the app will handle.
In Reflux, each {Action} is an independent object that acts as an event emitter.
You can listen to an Action, or invoke it as a function to fire it.
## Action Scopes
Mailspring is a multi-window application. The `scope` of an Action dictates
how it propogates between windows.
- **Global**: These actions can be listened to from any window and fired from any
window. The action is sent from the originating window to all other windows via
IPC, so they should be used with care. Firing this action from anywhere will
cause all listeners in all windows to fire.
- **Main Window**: You can fire these actions in any window. They'll be sent
to the main window and triggered there.
- **Window**: These actions only trigger listeners in the window they're fired in.
## Firing Actions
```javascript
Actions.queueTask(new ChangeStarredTask(threads: [this._thread], starred: true))
```
## Listening for Actions
If you're using Reflux to create your own Store, you can use the `listenTo`
convenience method to listen for an Action. If you're creating your own class
that is not a Store, you can still use the `listen` method provided by Reflux:
```javascript
setup() {
this.unlisten = Actions.queueTask.listen(this.onTaskWasQueued, this)
}
onNewMailReceived = (data) => {
console.log("You've got mail!", data)
}
teardown() {
this.unlisten();
}
```
Section: General
*/
type ActionFn = (...args: any[]) => void;
interface Action extends ActionFn, Listenable {
actionName: string;
scope: 'window' | 'global' | 'main';
sync: boolean;
listen: (callback: (...args: any[]) => any, thisObj?: any) => () => void;
}
const scopes: {
window: Action[];
global: Action[];
main: Action[];
} = {
window: [],
global: [],
main: [],
};
const create = (name, scope: 'window' | 'global' | 'main') => {
const obj = Reflux.createAction(name) as Action;
obj.scope = scope;
obj.sync = true;
obj.actionName = name;
scopes[scope].push(obj);
return obj as Action;
};
export const windowActions = scopes.window;
export const mainWindowActions = scopes.main;
export const globalActions = scopes.global;
/*
Public: Fired when the Mailspring API Connector receives new data from the API.
*Scope: Global*
Receives an {Object} of {Array}s of {Model}s, for example:
```json
{
'thread': [<Thread>, <Thread>]
'contact': [<Contact>]
}
```
*/
export const downloadStateChanged = create('downloadStateChanged', ActionScopeGlobal);
/*
Public: Queue a {Task} object to the {TaskQueue}.
*Scope: Main Window*
*/
export const queueTask = create('queueTask', ActionScopeMainWindow);
/*
Public: Queue multiple {Task} objects to the {TaskQueue}, which should be
undone as a single user action.
*Scope: Main Window*
*/
export const queueTasks = create('queueTasks', ActionScopeMainWindow);
/*
Public: Cancel a specific {Task} in the {TaskQueue}.
*Scope: Main Window*
*/
export const cancelTask = create('cancelTask', ActionScopeMainWindow);
/*
Public: Queue a task that does not require processing, placing it on the undo stack only.
*Scope: Main Window*
*/
export const queueUndoOnlyTask = create('queueUndoOnlyTask', ActionScopeMainWindow);
/*
Public: Open the preferences view.
*Scope: Global*
*/
export const openPreferences = create('openPreferences', ActionScopeGlobal);
/*
Public: Switch to the preferences tab with the specific name
*Scope: Global*
*/
export const switchPreferencesTab = create('switchPreferencesTab', ActionScopeGlobal);
/*
Public: Manage the Mailspring identity
*/
export const logoutMailspringIdentity = create('logoutMailspringIdentity', ActionScopeWindow);
/*
Public: Remove the selected account
*Scope: Window*
*/
export const removeAccount = create('removeAccount', ActionScopeWindow);
/*
Public: Update the provided account
*Scope: Window*
```
Actions.updateAccount(account.id, {accountName: 'new'})
```
*/
export const updateAccount = create('updateAccount', ActionScopeWindow);
/*
Public: Re-order the provided account in the account list.
*Scope: Window*
```
Actions.reorderAccount(account.id, newIndex)
```
*/
export const reorderAccount = create('reorderAccount', ActionScopeWindow);
/*
Public: Update provided containerFolderDefault
*Scope: Window*
```
Actions.updateContainerFolderDefault(newContainerFolderDefault)
```
*/
export const updateContainerFolderDefault = create('updateContainerFolderDefault', ActionScopeWindow);
/*
Public: Select the provided sheet in the current window. This action changes
the top level sheet.
*Scope: Window*
```
Actions.selectRootSheet(WorkspaceStore.Sheet.Threads)
```
*/
export const selectRootSheet = create('selectRootSheet', ActionScopeWindow);
/*
Public: Toggle whether a particular column is visible. Call this action
with one of the Sheet location constants:
```
Actions.toggleWorkspaceLocationHidden(WorkspaceStore.Location.MessageListSidebar)
```
*/
export const toggleWorkspaceLocationHidden = create(
'toggleWorkspaceLocationHidden',
ActionScopeWindow
);
/*
Public: Focus the keyboard on an item in a collection. This action moves the
`keyboard focus` element in lists and other components, but does not change
the focused DOM element.
*Scope: Window*
```
Actions.setCursorPosition(collection: 'thread', item: <Thread>)
```
*/
export const setCursorPosition = create('setCursorPosition', ActionScopeWindow);
/*
Public: Focus on an item in a collection. This action changes the selection
in lists and other components, but does not change the focused DOM element.
*Scope: Window*
```
Actions.setFocus(collection: 'thread', item: <Thread>)
```
*/
export const setFocus = create('setFocus', ActionScopeWindow);
/*
Public: Focus the interface on a specific {MailboxPerspective}.
*Scope: Window*
```
Actions.focusMailboxPerspective(<Category>)
```
*/
export const focusMailboxPerspective = create('focusMailboxPerspective', ActionScopeWindow);
/*
Public: Focus the interface on the default mailbox perspective for the provided
account id.
*Scope: Window*
*/
export const focusDefaultMailboxPerspectiveForAccounts = create(
'focusDefaultMailboxPerspectiveForAccounts',
ActionScopeWindow
);
/*
Public: Focus the mailbox perspective for the given account id and category names
*Scope: Window*
```
Actions.ensureCategoryIsFocused(accountIds, categoryName)
```
*/
export const ensureCategoryIsFocused = create('ensureCategoryIsFocused', ActionScopeWindow);
/*
Public: If the message with the provided id is currently beign displayed in the
thread view, this action toggles whether it's full content or snippet is shown.
*Scope: Window*
```
message = <Message>
Actions.toggleMessageIdExpanded(message.id)
```
*/
export const toggleMessageIdExpanded = create('toggleMessageIdExpanded', ActionScopeWindow);
/*
Public: Toggle whether messages from trash and spam are shown in the current
message view.
*/
export const toggleHiddenMessages = create('toggleHiddenMessages', ActionScopeWindow);
/*
Public: This action toggles wether to collapse or expand all messages in a
thread depending on if there are currently collapsed messages.
*Scope: Window*
```
Actions.toggleAllMessagesExpanded()
```
*/
export const toggleAllMessagesExpanded = create('toggleAllMessagesExpanded', ActionScopeWindow);
/*
Public: Print the currently selected thread.
*Scope: Window*
```
thread = <Thread>
Actions.printThread(thread)
```
*/
export const printThread = create('printThread', ActionScopeWindow);
/*
Public: Display the thread in a new popout window
*Scope: Window*
```
thread = <Thread>
Actions.popoutThread(thread)
```
*/
export const popoutThread = create('popoutThread', ActionScopeWindow);
/*
Public: Display the thread in the main window
*Scope: Global*
```
thread = <Thread>
Actions.focusThreadMainWindow(thread)
```
*/
export const focusThreadMainWindow = create('focusThreadMainWindow', ActionScopeGlobal);
/*
Public: Create a new reply to the provided threadId and messageId and populate
it with the body provided.
*Scope: Window*
```
message = <Message>
Actions.sendQuickReply({threadId: '123', messageId: '234'}, "Thanks Ben!")
```
*/
export const sendQuickReply = create('sendQuickReply', ActionScopeWindow);
/*
Public: Create a new reply to the provided threadId and messageId. Note that
this action does not focus on the thread, so you may not be able to see the new draft
unless you also call {::setFocus}.
*Scope: Window*
```
* Compose a reply to the last message in the thread
Actions.composeReply({threadId: '123'})
* Compose a reply to a specific message in the thread
Actions.composeReply({threadId: '123', messageId: '123'})
```
*/
export const composeReply = create('composeReply', ActionScopeWindow);
/*
Public: Create a new draft for forwarding the provided threadId and messageId. See
{::composeReply} for parameters and behavior.
*Scope: Window*
*/
export const composeForward = create('composeForward', ActionScopeWindow);
/*
Public: Compose and send a new draft for forwarding the provided threadId and messageId. See
{::composeReply} for parameters and behavior.
*Scope: Window*
*/
export const composeAndSendForward = create('composeAndSendForward', ActionScopeWindow);
/*
Public: Pop out the draft with the provided ID so the user can edit it in another
window.
*Scope: Window*
```
messageId = '123'
Actions.composePopoutDraft(messageId)
```
*/
export const composePopoutDraft = create('composePopoutDraft', ActionScopeWindow);
/*
Public: Open a new composer window for creating a new draft from scratch.
*Scope: Window*
```
Actions.composeNewBlankDraft()
```
*/
export const composeNewBlankDraft = create('composeNewBlankDraft', ActionScopeWindow);
/*
Public: Open a new composer window for a new draft addressed to the given recipient
*Scope: Window*
```
Actions.composeNewDraftToRecipient(contact)
```
*/
export const composeNewDraftToRecipient = create('composeNewDraftToRecipient', ActionScopeWindow);
/*
Public: Send the draft with the given ID. This Action is handled by the {DraftStore},
which finalizes the {DraftChangeSet} and allows {ComposerExtension}s to display
warnings and do post-processing. To change send behavior, you should consider using
one of these objects rather than listening for the {sendDraft} action.
*Scope: Window*
```
Actions.sendDraft('123', {actionKey})
```
*/
export const sendDraft = create('sendDraft', ActionScopeWindow);
/*
Public: Fired when a draft is successfully sent
*Scope: Global*
Recieves the id of the message that was sent
*/
export const draftDeliverySucceeded = create('draftDeliverySucceeded', ActionScopeMainWindow);
export const draftDeliveryFailed = create('draftDeliveryFailed', ActionScopeMainWindow);
/*
Public: Destroys the draft with the given ID. This Action is handled by the {DraftStore},
and does not display any confirmation UI.
*Scope: Window*
*/
export const destroyDraft = create('destroyDraft', ActionScopeWindow);
/*
Public: Submits the user's response to an RSVP event.
*Scope: Window*
*/
export const RSVPEvent = create('RSVPEvent', ActionScopeWindow);
// FullContact Sidebar
export const getFullContactDetails = create('getFullContactDetails', ActionScopeWindow);
export const focusContact = create('focusContact', ActionScopeWindow);
// Account Sidebar
export const setCollapsedSidebarItem = create('setCollapsedSidebarItem', ActionScopeWindow);
// File Actions
// Some file actions only need to be processed in their current window
export const addAttachment = create('addAttachment', ActionScopeWindow);
export const selectAttachment = create('selectAttachment', ActionScopeWindow);
export const removeAttachment = create('removeAttachment', ActionScopeWindow);
export const fetchBodies = create('fetchBodies', ActionScopeMainWindow);
export const fetchAndOpenFile = create('fetchAndOpenFile', ActionScopeWindow);
export const fetchAndSaveFile = create('fetchAndSaveFile', ActionScopeWindow);
export const fetchAndSaveAllFiles = create('fetchAndSaveAllFiles', ActionScopeWindow);
export const fetchFile = create('fetchFile', ActionScopeWindow);
export const quickPreviewFile = create('quickPreviewFile', ActionScopeWindow);
/*
Public: Pop the current sheet off the Sheet stack maintained by the {WorkspaceStore}.
This action has no effect if the window is currently showing a root sheet.
*Scope: Window*
*/
export const popSheet = create('popSheet', ActionScopeWindow);
/*
Public: Pop the to the root sheet currently selected.
*Scope: Window*
*/
export const popToRootSheet = create('popToRootSheet', ActionScopeWindow);
/*
Public: Push a sheet of a specific type onto the Sheet stack maintained by the
{WorkspaceStore}. Note that sheets have no state. To show a *specific* thread,
you should push a Thread sheet and call `setFocus` to select the thread.
*Scope: Window*
```javascript
WorkspaceStore.defineSheet('Thread', {}, {
list: ['MessageList', 'MessageListSidebar'],
}));
...
this.pushSheet(WorkspaceStore.Sheet.Thread)
```
*/
export const pushSheet = create('pushSheet', ActionScopeWindow);
export const addMailRule = create('addMailRule', ActionScopeWindow);
export const reorderMailRule = create('reorderMailRule', ActionScopeWindow);
export const updateMailRule = create('updateMailRule', ActionScopeWindow);
export const deleteMailRule = create('deleteMailRule', ActionScopeWindow);
export const disableMailRule = create('disableMailRule', ActionScopeWindow);
export const startReprocessingMailRules = create('startReprocessingMailRules', ActionScopeWindow);
export const stopReprocessingMailRules = create('stopReprocessingMailRules', ActionScopeWindow);
export const openPopover = create('openPopover', ActionScopeWindow);
export const closePopover = create('closePopover', ActionScopeWindow);
export const openModal = create('openModal', ActionScopeWindow);
export const closeModal = create('closeModal', ActionScopeWindow);
export const draftParticipantsChanged = create('draftParticipantsChanged', ActionScopeWindow);
export const findInThread = create('findInThread', ActionScopeWindow);
export const nextSearchResult = create('nextSearchResult', ActionScopeWindow);
export const previousSearchResult = create('previousSearchResult', ActionScopeWindow);
// Actions for the signature preferences and shared with the composer
export const upsertSignature = create('upsertSignature', ActionScopeWindow);
export const removeSignature = create('removeSignature', ActionScopeWindow);
export const selectSignature = create('selectSignature', ActionScopeWindow);
export const toggleAccount = create('toggleAccount', ActionScopeWindow);
export const expandSyncState = create('expandSyncState', ActionScopeWindow);
export const searchQuerySubmitted = create('searchQuerySubmitted', ActionScopeWindow);
export const searchQueryChanged = create('searchQueryChanged', ActionScopeWindow);
export const searchCompleted = create('searchCompleted', ActionScopeWindow);
// Templates
export const insertTemplateId = create('insertTemplateId', ActionScopeWindow);
export const createTemplate = create('createTemplate', ActionScopeWindow);
export const showTemplates = create('showTemplates', ActionScopeWindow);
export const deleteTemplate = create('deleteTemplate', ActionScopeWindow);
export const renameTemplate = create('renameTemplate', ActionScopeWindow);
``` | /content/code_sandbox/app/src/flux/actions.ts | xml | 2016-10-13T06:45:50 | 2024-08-16T18:14:37 | Mailspring | Foundry376/Mailspring | 15,331 | 3,661 |
```xml
type Options = {
shuffleAll: boolean
}
export default function shuffle<T>(arr: T[], options?: Options): T[]
``` | /content/code_sandbox/packages/array-shuffle/index.d.ts | xml | 2016-06-26T02:04:54 | 2024-08-15T00:08:43 | just | angus-c/just | 5,974 | 28 |
```xml
export class EventData {
public currentNumber: number;
}
``` | /content/code_sandbox/samples/react-rxjs-event-emitter/src/libraries/rxJsEventEmitter/EventData.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 14 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="path_to_url">
<item>
<shape android:shape="rectangle">
<solid android:color="@color/colorAccent" />
</shape>
</item>
<item>
<bitmap
android:gravity="center"
android:src="@drawable/ic_logo" />
</item>
</layer-list>
``` | /content/code_sandbox/app/src/main/res/drawable/splash_bg.xml | xml | 2016-02-22T10:00:46 | 2024-08-16T15:37:50 | Images-to-PDF | Swati4star/Images-to-PDF | 1,174 | 92 |
```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.
-->
<!-- COMPLETED (4) Create a resources file called bools.xml within the res/values-port directory -->
<resources>
<!-- COMPLETED (5) Within bools.xml in the portrait specific directory, add a bool called use_today_layout and set it to false -->
<bool name="use_today_layout">true</bool>
</resources>
``` | /content/code_sandbox/S11.02-Solution-TodayListItem/app/src/main/res/values-port/bools.xml | xml | 2016-11-02T04:42:26 | 2024-08-12T19:38:06 | ud851-Sunshine | udacity/ud851-Sunshine | 1,999 | 121 |
```xml
const commonFields = `
number
type
currency
status
balance
name
holdBalance
availableBalance
openDate
`;
const listQuery = `
query KhanbankAccounts($configId: String!) {
khanbankAccounts(configId: $configId) {
${commonFields}
}
}
`;
const detailQuery = `
query KhanbankAccountDetail($accountNumber: String!, $configId: String!) {
khanbankAccountDetail(accountNumber: $accountNumber, configId: $configId) {
${commonFields}
homeBranch
homePhone
intFrom
intMethod
intRate
intTo
lastFinancialTranDate
holderInfo(accountNumber: $accountNumber, configId: $configId) {
custLastName
custFirstName
}
}
}
`;
export default {
listQuery,
detailQuery
};
``` | /content/code_sandbox/packages/plugin-khanbank-ui/src/modules/corporateGateway/accounts/graphql/queries.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 191 |
```xml
export const PAYMENTS = {
qpay: {
title: 'Qpay',
kind: 'qpay',
apiUrl: 'path_to_url
actions: {
getToken: 'auth/token',
invoice: 'invoice',
},
handlerMethod: 'GET',
},
qpayQuickqr: {
title: 'Qpay',
kind: 'qpayQuickqr',
apiUrl: 'path_to_url
actions: {
auth: 'auth/token',
refresh: 'auth/refresh',
createCompany: 'merchant/company',
createPerson: 'merchant/person',
getMerchant: 'merchant',
merchantList: 'merchant/list',
checkInvoice: 'payment/check',
invoice: 'invoice',
cities: 'aimaghot',
districts: 'sumduureg',
},
},
socialpay: {
title: 'Social Pay',
kind: 'socialpay',
apiUrl: 'path_to_url
actions: {
invoicePhone: 'pos/invoice/phone',
invoiceQr: 'pos/invoice/qr/deeplink',
invoiceCheck: 'pos/invoice/check',
invoiceCancel: 'pos/invoice/cancel',
},
handlerMethod: 'POST',
},
monpay: {
title: 'MonPay',
kind: 'monpay',
apiUrl: 'path_to_url
actions: {
invoiceQr: 'rest/branch/qrpurchase/generate',
invoiceCheck: 'rest/branch/qrpurchase/check',
couponScan: 'rest/branch/coupon/scan',
branchLogin: 'rest/branch/login',
},
handlerMethod: 'GET',
},
storepay: {
title: 'storepay',
kind: 'storepay',
apiUrl: 'path_to_url
actions: {
invoice: 'invoice',
},
handlerMethod: 'GET',
},
pocket: {
title: 'pocket',
kind: 'pocket',
apiUrl: 'path_to_url
actions: {
invoice: 'invoice',
checkInvoice: 'invoice/check',
webhook: 'pg/config',
cancel: 'payment-gateway/transaction/cancel',
},
handlerMethod: 'GET',
},
minupay: {
title: 'MinuPay',
kind: 'minupay',
apiUrl: 'path_to_url
actions: {
login: 'oncom/login',
invoice: 'oncom/invoice',
checkInvoice: 'oncom/checkTxn',
},
handlerMethod: 'POST',
},
wechatpay: {
title: 'WeChat Pay',
kind: 'wechatpay',
apiUrl: 'path_to_url
actions: {
getToken: 'auth/token',
invoice: 'invoice',
getPayment: 'payment',
},
handlerMethod: 'POST',
},
paypal: {
kind: 'paypal',
apiUrl: 'path_to_url
actions: {
getToken: 'v1/oauth2/token',
draftInvoice: 'v2/invoicing/invoices',
},
handlerMethod: 'POST',
},
golomt: {
title: 'Golomt E-Commerce',
kind: 'golomt',
apiUrl: 'path_to_url
actions: {
invoice: 'api/invoice',
invoiceCheck: 'api/inquiry',
},
handlerMethod: 'POST',
},
ALL: [
'qpay',
'socialpay',
'monpay',
'storepay',
'pocket',
'wechatpay',
'paypal',
'minupay',
'qpayQuickqr',
'golomt',
],
};
export const PAYMENT_STATUS = {
PAID: 'paid',
PENDING: 'pending',
REFUNDED: 'refunded',
FAILED: 'failed',
CANCELLED: 'cancelled',
REJECTED: 'rejected',
ALL: ['paid', 'pending', 'refunded', 'failed', 'cancelled', 'rejected'],
};
``` | /content/code_sandbox/packages/plugin-payment-api/src/api/constants.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 878 |
```xml
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<IsPackable>false</IsPackable>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<ItemGroup>
<None Remove="Dialogs\TestData\FlightFromCdgToJfk.json" />
<None Remove="Dialogs\TestData\FlightFromMadridToChicago.json" />
<None Remove="Dialogs\TestData\FlightFromParisToNewYork.json" />
<None Remove="Dialogs\TestData\FlightToMadrid.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Dialogs\TestData\FlightFromCdgToJfk.json" />
<EmbeddedResource Include="Dialogs\TestData\FlightFromMadridToChicago.json" />
<EmbeddedResource Include="Dialogs\TestData\FlightFromParisToNewYork.json" />
<EmbeddedResource Include="Dialogs\TestData\FlightToMadrid.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.7" />
<PackageReference Include="Microsoft.Bot.Builder.Testing" Version="4.22.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\13.core-bot\CoreBot.csproj" />
</ItemGroup>
</Project>
``` | /content/code_sandbox/samples/csharp_dotnetcore/13.core-bot.tests/CoreBot.Tests.csproj | xml | 2016-09-20T16:17:28 | 2024-08-16T02:44:00 | BotBuilder-Samples | microsoft/BotBuilder-Samples | 4,323 | 408 |
```xml
import { AppOptions } from "coral-server/app";
import { tenorSearchHandler } from "coral-server/app/handlers/api/tenor";
import { userLimiterMiddleware } from "coral-server/app/middleware";
import { createAPIRouter } from "./helpers";
export function createTenorRouter(app: AppOptions) {
const router = createAPIRouter({});
router.use(userLimiterMiddleware(app));
router.get("/search", tenorSearchHandler(app));
return router;
}
``` | /content/code_sandbox/server/src/core/server/app/router/api/tenor.ts | xml | 2016-10-31T16:14:05 | 2024-08-06T16:15:57 | talk | coralproject/talk | 1,881 | 107 |
```xml
/// <reference path="../logic/FlowManager.ts"/>
// namespace
namespace cf {
// interface
export const UserInputTypes = {
VOICE: "voice",
VR_GESTURE: "vr-gesture", // <-- future..
TEXT: "text" // <-- default
}
// interface that custom inputs will be checked against
export interface IUserInput{
/**
* awaitingCallback
* @type string
* able to set awaiting state, so user can call external apis keeping the flow in check
*/
awaitingCallback?:boolean;
// optional way of cancelling input
cancelInput?():void;
init?():void;
input?(resolve: any, reject: any, mediaStream: MediaStream):void;
}
}
``` | /content/code_sandbox/src/scripts/cf/interfaces/IUserInput.ts | xml | 2016-10-14T12:54:59 | 2024-08-16T12:03:40 | conversational-form | space10-community/conversational-form | 3,795 | 172 |
```xml
<!--
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
-->
<FindBugsFilter>
<!-- Ignore violations that were present when the rule was enabled -->
<Match>
<Class name="org.apache.pulsar.io.hdfs3.HdfsResources"/>
<Method name="getConfiguration"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
<Match>
<Class name="org.apache.pulsar.io.hdfs3.HdfsResources"/>
<Method name="getFileSystem"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
<Match>
<Class name="org.apache.pulsar.io.hdfs3.HdfsResources"/>
<Method name="getUserGroupInformation"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
<Match>
<Class name="org.apache.pulsar.io.hdfs3.HdfsResources"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.io.hdfs3.HdfsResources"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.io.hdfs3.HdfsResources"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.io.hdfs3.sink.HdfsSyncThread"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
</FindBugsFilter>
``` | /content/code_sandbox/pulsar-io/hdfs3/src/main/resources/findbugsExclude.xml | xml | 2016-06-28T07:00:03 | 2024-08-16T17:12:43 | pulsar | apache/pulsar | 14,047 | 441 |
```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="mtrl_picker_range_header_title"> </string>
<string name="mtrl_picker_date_header_title"> </string>
<string name="mtrl_picker_range_header_unselected"> - </string>
<string name="mtrl_picker_range_header_only_start_selected">%1$s </string>
<string name="mtrl_picker_range_header_only_end_selected"> %1$s</string>
<string name="mtrl_picker_range_header_selected">%1$s %2$s</string>
<string name="mtrl_picker_date_header_unselected"> </string>
<string name="mtrl_picker_date_header_selected">%1$s</string>
<string name="mtrl_picker_confirm"></string>
<string name="mtrl_picker_cancel"> </string>
<string name="mtrl_picker_text_input_date_hint"></string>
<string name="mtrl_picker_text_input_date_range_start_hint"> </string>
<string name="mtrl_picker_text_input_date_range_end_hint"> </string>
<string name="mtrl_picker_text_input_year_abbr"></string>
<string name="mtrl_picker_text_input_month_abbr"></string>
<string name="mtrl_picker_text_input_day_abbr"></string>
<string name="mtrl_picker_save"> </string>
<string name="mtrl_picker_invalid_range"> .</string>
<string name="mtrl_picker_out_of_range"> : %1$s</string>
<string name="mtrl_picker_invalid_format"> .</string>
<string name="mtrl_picker_invalid_format_use"> : %1$s</string>
<string name="mtrl_picker_invalid_format_example">: %1$s</string>
<string name="mtrl_picker_toggle_to_calendar_input_mode"> </string>
<string name="mtrl_picker_toggle_to_text_input_mode"> </string>
<string name="mtrl_picker_a11y_prev_month"> </string>
<string name="mtrl_picker_a11y_next_month"> </string>
<string name="mtrl_picker_toggle_to_year_selection"> </string>
<string name="mtrl_picker_toggle_to_day_selection"> </string>
<string name="mtrl_picker_day_of_week_column_header">%1$s</string>
<string name="mtrl_picker_announce_current_selection"> : %1$s</string>
<string name="mtrl_picker_announce_current_range_selection"> : %1$s : %2$s</string>
<string name="mtrl_picker_announce_current_selection_none"> </string>
<string name="mtrl_picker_navigate_to_year_description">%1$d </string>
<string name="mtrl_picker_navigate_to_current_year_description"> %1$d </string>
<string name="mtrl_picker_today_description"> %1$s</string>
<string name="mtrl_picker_start_date_description"> %1$s</string>
<string name="mtrl_picker_end_date_description"> %1$s</string>
</resources>
``` | /content/code_sandbox/lib/java/com/google/android/material/datepicker/res/values-te/strings.xml | xml | 2016-12-05T16:11:29 | 2024-08-16T17:51:42 | material-components-android | material-components/material-components-android | 16,176 | 725 |
```xml
/*
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
path_to_url
*/
import {WorkboxPlugin, WorkboxPluginCallbackParam} from 'workbox-core/types.js';
import {PrecacheController} from '../PrecacheController.js';
import '../_version.js';
/**
* A plugin, designed to be used with PrecacheController, to translate URLs into
* the corresponding cache key, based on the current revision info.
*
* @private
*/
class PrecacheCacheKeyPlugin implements WorkboxPlugin {
private readonly _precacheController: PrecacheController;
constructor({precacheController}: {precacheController: PrecacheController}) {
this._precacheController = precacheController;
}
cacheKeyWillBeUsed: WorkboxPlugin['cacheKeyWillBeUsed'] = async ({
request,
params,
}: WorkboxPluginCallbackParam['cacheKeyWillBeUsed']) => {
// Params is type any, can't change right now.
/* eslint-disable */
const cacheKey =
params?.cacheKey ||
this._precacheController.getCacheKeyForURL(request.url);
/* eslint-enable */
return cacheKey
? new Request(cacheKey, {headers: request.headers})
: request;
};
}
export {PrecacheCacheKeyPlugin};
``` | /content/code_sandbox/packages/workbox-precaching/src/utils/PrecacheCacheKeyPlugin.ts | xml | 2016-04-04T15:55:19 | 2024-08-16T08:33:26 | workbox | GoogleChrome/workbox | 12,245 | 287 |
```xml
import type { TerminalRegistry } from "@Core/Terminal";
import type { OpenTerminalActionArgs, WorkflowAction } from "@common/Extensions/Workflow";
import type { WorkflowActionHandler } from "./WorkflowActionHandler";
export class OpenTerminalWorkflowActionHandler implements WorkflowActionHandler {
public constructor(private readonly terminalRegistry: TerminalRegistry) {}
public async invokeWorkflowAction(workflowAction: WorkflowAction<OpenTerminalActionArgs>): Promise<void> {
await this.terminalRegistry
.getById(workflowAction.args.terminalId)
.launchWithCommand(workflowAction.args.command);
}
}
``` | /content/code_sandbox/src/main/Extensions/Workflow/WorkflowActionHandler/OpenTerminalWorkflowActionHandler.ts | xml | 2016-10-11T04:59:52 | 2024-08-16T11:53:31 | ueli | oliverschwendener/ueli | 3,543 | 125 |
```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 xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="material_timepicker_pm">PM</string>
<string name="material_timepicker_am">AM</string>
<string name="material_timepicker_select_time">Select time</string>
<string name="material_timepicker_minute">Minute</string>
<string name="material_timepicker_hour">Hour</string>
<string name="material_hour_suffix">%1$s o\'clock</string>
<string name="material_hour_24h_suffix">%1$s hours</string>
<string name="material_minute_suffix">%1$s minutes</string>
<string name="material_hour_selection">Select hour</string>
<string name="material_minute_selection"> </string>
<string name="material_clock_toggle_content_description">Select AM or PM</string>
<string name="mtrl_timepicker_confirm">OK</string>
<string name="mtrl_timepicker_cancel">Cancel</string>
<string name="material_timepicker_text_input_mode_description"> \' </string>
<string name="material_timepicker_clock_mode_description"> \' </string>
</resources>
``` | /content/code_sandbox/lib/java/com/google/android/material/timepicker/res/values-as/strings.xml | xml | 2016-12-05T16:11:29 | 2024-08-16T17:51:42 | material-components-android | material-components/material-components-android | 16,176 | 322 |
```xml
import { StyleAttribute } from './index';
type FractionalWidth = 'half' | 'oneThird' | 'twoThird';
type FractionalOffset = FractionalWidth;
export const container: StyleAttribute;
export const row: StyleAttribute;
export const columns: (columns: number | FractionalWidth, offset?: number | FractionalOffset) => StyleAttribute;
export const half: (offset?: number | FractionalOffset) => StyleAttribute;
export const oneThird: (offset?: number | FractionalOffset) => StyleAttribute;
export const twoThirds: (offset?: number | FractionalOffset) => StyleAttribute;
export const button: StyleAttribute;
export const primary: StyleAttribute;
export const labelBody: StyleAttribute;
export const base: StyleAttribute;
export const fullWidth: StyleAttribute;
export const maxFullWidth: StyleAttribute;
export const pullRight: StyleAttribute;
export const pullLeft: StyleAttribute;
export const clearfix: StyleAttribute;
``` | /content/code_sandbox/ous.d.ts | xml | 2016-07-18T11:25:39 | 2024-08-05T04:58:08 | glamor | threepointone/glamor | 3,661 | 198 |
```xml
import rule from './index';
import { getHtmlRuleTester, getInvalidTestFactory, getTsRuleTester } from '../../test-helper.spec';
const tsRuleTester = getTsRuleTester();
const htmlRuleTester = getHtmlRuleTester();
const getInvalidSelectTest = getInvalidTestFactory('clrSelectFailure');
htmlRuleTester.run('no-clr-select', rule, {
invalid: [
getInvalidSelectTest({
code: `<select clrSelect name="options" [(ngModel)]="options">
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>`,
locations: [{ line: 1, column: 1 }],
}),
getInvalidSelectTest({
code: `
<clr-select-container>
<label>Select options</label>
<select clrSelect name="options" [(ngModel)]="options">
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>
</clr-select-container>
`,
locations: [{ line: 2, column: 9 }],
}),
],
valid: [`<select>`, `<input clrSelect>`, `<select clrInput>`],
});
tsRuleTester.run('no-clr-select', rule, {
invalid: [
getInvalidSelectTest({
code: `
@Component({
template: \`
<select clrSelect name="options" [(ngModel)]="options">
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>
\`
})
export class CustomSelectComponent {}
`,
locations: [{ line: 4, column: 11 }],
}),
getInvalidSelectTest({
code: `
@Component({
template: \`
<clr-select-container>
<select clrSelect name="options" [(ngModel)]="options">
<option value="one">One</option>
<option value="two">Two</option>
<option value="three">Three</option>
</select>
</clr-select-container>
\`
})
export class CustomSelectComponent {}
`,
locations: [{ line: 4, column: 11 }],
}),
],
valid: [
`
@Component({
template: \`
<select>
\`
})
export class CustomSelectComponent {}
`,
`
@Component({
template: \`
<div clrSelect></div>
\`
})
export class CustomSelectComponent {}
`,
],
});
``` | /content/code_sandbox/packages/eslint-plugin-clarity-adoption/src/rules/no-clr-select/no-clr-select.spec.ts | xml | 2016-09-29T17:24:17 | 2024-08-11T17:06:15 | clarity | vmware-archive/clarity | 6,431 | 588 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectName>vorbisenc</ProjectName>
<ProjectGuid>{E48B6A8B-F7FE-4DA8-8248-E64DBAC4F56C}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
<Import Project="..\libogg.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
<Import Project="..\libogg.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
<Import Project="..\libogg.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC71.props" />
<Import Project="..\libogg.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\include;..\..\..\..\libogg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>
</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
<CallingConvention>Cdecl</CallingConvention>
</ClCompile>
<Link>
<AdditionalDependencies>libogg.lib;libvorbis.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)vorbisenc.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\..\..\libogg\win32\VS2010\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)vorbisenc.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\include;..\..\..\..\libogg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>
</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
<CallingConvention>Cdecl</CallingConvention>
</ClCompile>
<Link>
<AdditionalDependencies>libogg.lib;libvorbis.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)vorbisenc.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\..\..\libogg\win32\VS2010\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<ProgramDatabaseFile>$(OutDir)vorbisenc.pdb</ProgramDatabaseFile>
<SubSystem>Console</SubSystem>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\..\include;..\..\..\..\libogg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
<CallingConvention>Cdecl</CallingConvention>
</ClCompile>
<Link>
<AdditionalDependencies>libogg.lib;libvorbis.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)vorbisenc.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\..\..\libogg\win32\VS2010\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX86</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Full</Optimization>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<AdditionalIncludeDirectories>..\..\..\include;..\..\..\..\libogg\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level4</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<CompileAs>CompileAsC</CompileAs>
<CallingConvention>Cdecl</CallingConvention>
</ClCompile>
<Link>
<AdditionalDependencies>libogg.lib;libvorbis.lib;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)vorbisenc.exe</OutputFile>
<AdditionalLibraryDirectories>..\..\..\..\libogg\win32\VS2010\$(Platform)\$(Configuration);..\$(Platform)\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\examples\encoder_example.c" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\libvorbis\libvorbis_dynamic.vcxproj">
<Project>{3a214e06-b95e-4d61-a291-1f8df2ec10fd}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
``` | /content/code_sandbox/extensions/android/ringlibsdl/project/jni/libvorbis-1.3.3/win32/VS2010/vorbisenc/vorbisenc_dynamic.vcxproj | xml | 2016-03-24T10:29:27 | 2024-08-16T12:53:07 | ring | ring-lang/ring | 1,262 | 2,957 |
```xml
export const environment = {
production: true,
hmr: false,
};
``` | /content/code_sandbox/src/Ombi/ClientApp/src/environments/environment.prod.ts | xml | 2016-02-25T12:14:54 | 2024-08-14T22:56:44 | Ombi | Ombi-app/Ombi | 3,674 | 18 |
```xml
export interface AdditionalNode {
title: string;
file: string;
children: AdditionalNode[];
}
``` | /content/code_sandbox/src/app/interfaces/additional-node.interface.ts | xml | 2016-10-17T07:09:28 | 2024-08-14T16:30:10 | compodoc | compodoc/compodoc | 3,980 | 23 |
```xml
export { TableImproved } from './TableImproved';
export { Cell } from './Cell';
export { Row } from './Row';
export { Header } from './Header';
``` | /content/code_sandbox/packages/erxes-ui/src/components/richTextEditor/extensions/Table/index.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 35 |
```xml
class GetSet {
_x: number;
get x() {
glb1++
return this._x
}
set x(v: number) {
glb1 += 4
this._x = v
}
}
class GetSet2 {
_x: number;
set x(v: number) {
glb1 += 4
this._x = v
}
get x() {
glb1++
return this._x
}
}
interface GetSetIface {
x: number;
}
function testAccessors() {
msg("testAccessors")
let f = new GetSet()
glb1 = 0
f.x = 12
assert(glb1 == 4, "s")
assert(f.x == 12, "s12")
function getf() {
glb1 += 100
return f
}
getf().x++
assert(glb1 == 110, "s10")
assert(f.x == 13, "s13")
}
function testAccessors2() {
msg("testAccessors2")
let f = new GetSet2()
glb1 = 0
f.x = 12
assert(glb1 == 4, "s")
assert(f.x == 12, "s12")
function getf() {
glb1 += 100
return f
}
getf().x++
assert(glb1 == 110, "s10")
assert(f.x == 13, "s13")
}
function testAccessorsIface() {
msg("testAccessorsIface")
glb1 = 0
let f = new GetSet() as GetSetIface
f.x = 12
assert(glb1 == 4, "s")
assert(f.x == 12, "s12")
function getf() {
glb1 += 100
return f
}
getf().x++
assert(glb1 == 110, "s10")
assert(f.x == 13, "s13")
}
function testAccessorsAny() {
msg("testAccessorsAny")
glb1 = 0
let f = new GetSet() as any
f.x = 12
assert(glb1 == 4, "s")
assert(f.x == 12, "s12")
}
testAccessors()
testAccessors2()
testAccessorsIface()
testAccessorsAny()
namespace FieldRedef {
class A {
prop: boolean;
constructor() {
this.prop = true;
}
action() {
if (this.prop)
glb1 += 1
}
}
class B extends A {
get prop() {
return false;
}
set prop(v: boolean) {
glb1 += 10
}
}
function test() {
msg("FieldRedef.run")
clean()
const a = new A();
const b = new B();
assert(glb1 == 10)
a.action();
assert(glb1 == 11)
b.action();
assert(glb1 == 11)
}
test()
}
namespace NoArgs {
interface Foo {
xyz(): number;
abc: () => number;
}
function bar2(off: number, f: Foo) {
assert(f.abc() == off, "nab1")
assert(f.xyz() == off + 1, "nab2")
}
function bar(off: number, f: any) {
bar2(off, f)
assert(f.abc() == off, "nab1x")
assert(f.xyz() == off + 1, "nab2x")
}
class Bar implements Foo {
abc: () => number;
xyz: () => number;
constructor() {
this.abc = () => 20
this.xyz = () => 21
}
}
class Baz implements Foo {
abc() { return 30 }
xyz() { return 31 }
}
bar(10, { xyz: () => 11, abc: () => 10 })
bar(20, new Bar())
bar(30, new Baz())
msg("NoArgs OK")
}
namespace control {
//% shim=control::deviceDalVersion
export declare function deviceDalVersion(): string;
}
namespace WithArgs {
interface Foo {
xyz(x: number, y: number): number;
abc: (x: number, y: number) => number;
}
function bar2(off: number, f: Foo) {
assert(f.abc(2, 1) == off, "wa1")
assert(f.xyz(2, 1) == off + 1, "wa2")
}
function bar(off: number, f: any) {
bar2(off, f)
assert(f.abc(2, 1) == off, "wa1'")
assert(f.xyz(2, 1) == off + 1, "wa2'")
testBind(off, f)
}
class Bar implements Foo {
abc: (x: number, y: number) => number;
xyz: (x: number, y: number) => number;
constructor() {
this.abc = (x: number, y: number) => {
return 19 + x / y
}
this.xyz = (x: number, y: number) => 20 + x / y
}
}
class Baz implements Foo {
abc(x: number, y: number) { return 29 + x / y }
xyz(x: number, y: number) { return 30 + x / y }
}
class Qux implements Foo {
get abc() {
return (x: number, y: number) => {
return 59 + x / y
}
}
get xyz() {
return (x: number, y: number) => 60 + x / y
}
}
function qux(off: number) {
bar(off, {
xyz: (x: number, y: number) => off - 1 + x / y,
abc: (x: number, y: number) => {
return off - 2 + x / y
}
})
}
function testBind(off: number, f: Foo) {
const abc = f.abc
const abc2 = (f as any).abc
// const xyz = f.xyz // currently we error at compilation on this one; need to reconsider
const xyz2 = (f as any).xyz
assert(abc(2, 1) == off, "bn1")
assert(abc2(2, 1) == off, "bn2")
assert(xyz2(2, 1) == off + 1, "bn3")
}
bar(11, {
xyz: (x: number, y: number) => 10 + x / y,
abc: (x: number, y: number) => {
return 9 + x / y
}
})
bar(21, new Bar())
bar(31, new Baz())
qux(41)
qux(51)
// this currently fails on VM, but is somewhat esoteric (accessors returning lambdas to implement functions in interfaces)
// see path_to_url
if (control.deviceDalVersion() != "vm")
bar(61, new Qux())
msg("WithArgs OK")
}
namespace DontCall {
interface Foo {
num: any
getter: number
}
class Bar implements Foo {
num() {
assert(false, "num")
}
get getter() {
return 1
}
}
function test(x: any) {
assert(typeof x.num == "function", "late")
assert(typeof (x as Foo).num == "function", "late2")
assert(x.getter == 1, "late3")
assert((x as Foo).getter == 1, "late4")
}
test(new Bar())
msg("DontCall OK")
}
``` | /content/code_sandbox/tests/compile-test/lang-test0/27accessors.ts | xml | 2016-01-24T19:35:52 | 2024-08-16T16:39:39 | pxt | microsoft/pxt | 2,069 | 1,802 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Redist|ARM">
<Configuration>Redist</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Redist|ARM64">
<Configuration>Redist</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Redist|Win32">
<Configuration>Redist</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Redist|x64">
<Configuration>Redist</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_Spectre|ARM">
<Configuration>Static_Spectre</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_Spectre|ARM64">
<Configuration>Static_Spectre</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_WinXP_Spectre|ARM">
<Configuration>Static_WinXP_Spectre</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_WinXP_Spectre|ARM64">
<Configuration>Static_WinXP_Spectre</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_WinXP_Spectre|Win32">
<Configuration>Static_WinXP_Spectre</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_WinXP_Spectre|x64">
<Configuration>Static_WinXP_Spectre</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_WinXP|ARM">
<Configuration>Static_WinXP</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_WinXP|ARM64">
<Configuration>Static_WinXP</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_WinXP|Win32">
<Configuration>Static_WinXP</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_WinXP|x64">
<Configuration>Static_WinXP</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_Spectre|Win32">
<Configuration>Static_Spectre</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static_Spectre|x64">
<Configuration>Static_Spectre</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|ARM">
<Configuration>Static</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|ARM64">
<Configuration>Static</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|Win32">
<Configuration>Static</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Static|x64">
<Configuration>Static</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{304C12B5-83FB-4768-B5EC-8FF9842D5EF1}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>vcruntime</RootNamespace>
<WindowsTargetPlatformVersion>$([Microsoft.Build.Utilities.ToolLocationHelper]::GetLatestSDKTargetPlatformVersion('Windows', '10.0'))</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(MSBuildThisFileDirectory)..\Shared.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Redist|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Redist|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>Spectre</SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>Spectre</SpectreMitigation>
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SupportWinXP>true</SupportWinXP>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SupportWinXP>true</SupportWinXP>
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>Spectre</SpectreMitigation>
<SupportWinXP>true</SupportWinXP>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|ARM'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>Spectre</SpectreMitigation>
<SupportWinXP>true</SupportWinXP>
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|ARM64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Redist|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Redist|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>Spectre</SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|ARM64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>Spectre</SpectreMitigation>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SupportWinXP>true</SupportWinXP>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|ARM64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SupportWinXP>true</SupportWinXP>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>Spectre</SpectreMitigation>
<SupportWinXP>true</SupportWinXP>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|ARM64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>Spectre</SpectreMitigation>
<SupportWinXP>true</SupportWinXP>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.props" />
</ImportGroup>
<ImportGroup Label="Shared" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Redist|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Redist|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|ARM'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Redist|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Redist|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(SolutionDir)..\VC-LTL helper for Visual Studio.props" />
<Import Project="..\..\..\VC-LTL_Global.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(PlatformShortName)\Vista\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|ARM'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(PlatformShortName)\Vista\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Redist|Win32'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>vcruntime140_ltl</TargetName>
<OutDir>$(SolutionDir)..\Redist\$(VC-LTLUsedToolsVersion)\$(PlatformShortName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Redist|ARM'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>vcruntime140_ltl</TargetName>
<OutDir>$(SolutionDir)..\Redist\$(VC-LTLUsedToolsVersion)\$(PlatformShortName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|Win32'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(SpectreMitigation)\$(PlatformShortName)\Vista\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|ARM'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(SpectreMitigation)\$(PlatformShortName)\Vista\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|Win32'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(PlatformShortName)\WinXP\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|ARM'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|Win32'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(SpectreMitigation)\$(PlatformShortName)\WinXP\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|ARM'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(PlatformShortName)\Vista\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static|ARM64'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(PlatformShortName)\Vista\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Redist|x64'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>vcruntime140_ltl</TargetName>
<OutDir>$(SolutionDir)..\Redist\$(VC-LTLUsedToolsVersion)\$(PlatformShortName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Redist|ARM64'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>vcruntime140_ltl</TargetName>
<OutDir>$(SolutionDir)..\Redist\$(VC-LTLUsedToolsVersion)\$(PlatformShortName)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|x64'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(SpectreMitigation)\$(PlatformShortName)\Vista\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|ARM64'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(SpectreMitigation)\$(PlatformShortName)\Vista\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|x64'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(PlatformShortName)\WinXP\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|ARM64'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|x64'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
<OutDir>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(SpectreMitigation)\$(PlatformShortName)\WinXP\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|ARM64'">
<IncludePath>$(SolutionDir)$(VC-LTLUsedToolsVersion)\vcruntime;$(SolutionDir)ucrt\inc;$(SolutionDir)$(VC-LTLUsedToolsVersion);$(SolutionDir);$(IncludePath)</IncludePath>
<TargetName>libvcruntime</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_BEST_PRACTICES_USAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;WIN32;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
<UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
</MASM>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|ARM'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_BEST_PRACTICES_USAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;WIN32;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/d2FH4 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
<UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Redist|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_VCRT_BUILD;CRTDLL;_LTL_Using_Dynamic_Lib;_LTLIMP=__declspec(dllexport);_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;WIN32;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<IgnoreSpecificDefaultLibraries>vcruntime.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ImportLibrary>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(PlatformShortName)\Vista\vcruntime.lib</ImportLibrary>
<ModuleDefinitionFile>vcruntime.def</ModuleDefinitionFile>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
<UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
</MASM>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Redist|ARM'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_VCRT_BUILD;CRTDLL;_LTL_Using_Dynamic_Lib;_LTLIMP=__declspec(dllexport);_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;WIN32;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<AdditionalOptions>/d2FH4 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<IgnoreSpecificDefaultLibraries>vcruntime.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ImportLibrary>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(PlatformShortName)\Vista\vcruntime.lib</ImportLibrary>
<ModuleDefinitionFile>vcruntime.def</ModuleDefinitionFile>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
<UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
</MASM>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;WIN32;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
<UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
</MASM>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|ARM'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;WIN32;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/d2FH4 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
<UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;_ATL_XP_TARGETING;WIN32;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
<UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)i386\objs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|ARM'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;_ATL_XP_TARGETING;WIN32;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
<UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;_ATL_XP_TARGETING;WIN32;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
<UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)i386\objs.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|ARM'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;_ATL_XP_TARGETING;WIN32;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
<UseSafeExceptionHandlers>true</UseSafeExceptionHandlers>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_BEST_PRACTICES_USAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/d2FH4 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_BEST_PRACTICES_USAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/d2FH4 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Redist|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_VCRT_BUILD;CRTDLL;_LTL_Using_Dynamic_Lib;_LTLIMP=__declspec(dllexport);_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<AdditionalOptions>/d2FH4 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<IgnoreSpecificDefaultLibraries>vcruntime.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ImportLibrary>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(PlatformShortName)\Vista\vcruntime.lib</ImportLibrary>
<ModuleDefinitionFile>vcruntime.def</ModuleDefinitionFile>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalOptions>/EXPORT:__CxxFrameHandler4 %(AdditionalOptions)</AdditionalOptions>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
</MASM>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Redist|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MinSpace</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_VCRT_BUILD;CRTDLL;_LTL_Using_Dynamic_Lib;_LTLIMP=__declspec(dllexport);_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<AdditionalOptions>/d2FH4 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<IgnoreSpecificDefaultLibraries>vcruntime.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<ImportLibrary>$(SolutionDir)..\VC\$(VC-LTLUsedToolsVersion)\lib\$(PlatformShortName)\Vista\vcruntime.lib</ImportLibrary>
<ModuleDefinitionFile>vcruntime.def</ModuleDefinitionFile>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
</MASM>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/d2FH4 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_Spectre|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<AdditionalOptions>/d2FH4 %(AdditionalOptions)</AdditionalOptions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;_ATL_XP_TARGETING;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;_ATL_XP_TARGETING;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;_ATL_XP_TARGETING;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Static_WinXP_Spectre|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>_ALLOW_ITERATOR_DEBUG_LEVEL_MISMATCH;_DISABLE_DEPRECATE_LTL_MESSAGE;_CRT_SECURE_NO_WARNINGS;__Build_LTL;_CRTBLD;_MBCS;_CRT_DECLARE_GLOBAL_VARIABLES_DIRECTLY;_VCRT_ALLOW_INTERNALS;_NO__LTL_Initialization;_ATL_XP_TARGETING;NDEBUG;_LIB;_CORECRT_BUILD;_CTIME_;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WholeProgramOptimization>false</WholeProgramOptimization>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<LanguageStandard>stdcpp17</LanguageStandard>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<ForcedIncludeFiles>suppress.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<MASM>
<ObjectFileName>$(IntDir)%(FileName).asm.obj</ObjectFileName>
</MASM>
<Lib>
<AdditionalDependencies>$(SolutionDir)$(VC-LTLUsedToolsVersion)\lib\$(VCLibDirMod)$(PlatformShortName)\libvcruntime-ltl.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\amd64\chandler_noexcept.cpp">
<ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\chandler3_noexcept.cpp">
<ExcludedFromBuild Condition="'$(Platform)'!='Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\exsup4_downlevel.cpp">
<ExcludedFromBuild Condition="'$(Platform)'!='Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\frame_thunks.cpp" />
<ClCompile Include="..\..\..\ptd_downlevel.cpp">
<RemoveUnreferencedCodeData>false</RemoveUnreferencedCodeData>
<ExcludedFromBuild Condition="'$(SupportWinXP)'!='true'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\i386\trnsctrl.cpp">
<ExcludedFromBuild Condition="'$(Platform)'!='Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\vcruntime\ehhelpers.cpp" />
<ClCompile Include="..\..\vcruntime\ehstate.cpp">
<ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\vcruntime\frame.cpp" />
<ClCompile Include="..\..\vcruntime\jbcxrval.c" />
<ClCompile Include="..\..\vcruntime\mgdframe.cpp" />
<ClCompile Include="..\..\vcruntime\purevirt.cpp" />
<ClCompile Include="..\..\..\vc_msvcrt_IAT.cpp" />
<ClCompile Include="..\..\..\vc_msvcrt_winxp.cpp">
<ExcludedFromBuild Condition="'$(SupportWinXP)'!='true'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\vcruntime\risctrnsctrl.cpp">
<ExcludedFromBuild Condition="'$(Platform)'=='Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\vcruntime\std_type_info.cpp" />
<ClCompile Include="..\..\vcruntime\uncaught_exceptions.cpp" />
<ClCompile Include="..\..\vcruntime\unexpected.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="vcruntime.rc">
<ExcludedFromBuild Condition="'$(Configuration)'!='Redist'">true</ExcludedFromBuild>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="vcruntime.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="$(VCTargetsPath)\BuildCustomizations\masm.targets" />
</ImportGroup>
</Project>
``` | /content/code_sandbox/src/14.29.30037/Build/vcruntime/vcruntime.vcxproj | xml | 2016-06-14T03:01:16 | 2024-08-12T19:23:19 | VC-LTL | Chuyu-Team/VC-LTL | 1,052 | 17,512 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="definitions"
xmlns="path_to_url"
xmlns:activiti="path_to_url"
targetNamespace="org.activiti.engine.test.api.runtime">
<process id="nestedSubProcessQueryTest">
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="fork" />
<parallelGateway id="fork" />
<sequenceFlow sourceRef="fork" targetRef="callSubProcess1" />
<sequenceFlow sourceRef="fork" targetRef="callSubProcess2" />
<callActivity id="callSubProcess1" calledElement="nestedSimpleSubProcess" />
<callActivity id="callSubProcess2" calledElement="nestedSimpleSubProcess" />
<sequenceFlow sourceRef="callSubProcess1" targetRef="join" />
<sequenceFlow sourceRef="callSubProcess2" targetRef="join" />
<parallelGateway id="join" />
<sequenceFlow id="flow3" sourceRef="join" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
</definitions>
``` | /content/code_sandbox/modules/flowable5-test/src/test/resources/org/activiti/engine/test/api/runtime/superProcessWithMultipleNestedSubProcess.bpmn20.xml | xml | 2016-10-13T07:21:43 | 2024-08-16T15:23:14 | flowable-engine | flowable/flowable-engine | 7,715 | 272 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"../../../tools/boostbook/dtd/boostbook.dtd">
(See accompanying file LICENSE_1_0.txt or path_to_url
-->
<section id="date_time.tradeoffs">
<title>Tradeoffs: Stability, Predictability, and Approximations</title>
<bridgehead renderas="sect2">
Unavoidable Trade-offs
</bridgehead>
<para>
The library does its best to provide everything a user could want, but there are certain inherent constraints that limit what <emphasis>any</emphasis> temporal library can do. Specifically, a user must choose which two of the following three capabilities are desired in any particular application:
<itemizedlist mark="bullet">
<listitem>exact agreement with wall-clock time</listitem>
<listitem>accurate math, e.g. duration calculations</listitem>
<listitem>ability to handle timepoints in the future</listitem>
</itemizedlist>
Some libraries may implicitly promise to deliver all three, but if you actually put them to the test, only two can be true at once. This limitation is not a deficiency in the design or implementation of any particular library; rather it is a consequence of the way different time systems are defined by international standards. Let's look at each of the three cases:
</para>
<para>
If you want exact agreement with wall-clock time, you must use either UTC or local time. If you compute a duration by subtracting one UTC time from another and you want an answer accurate to the second, the two times must not be too far in the future because leap seconds affect the count but are only determined about 6 months in advance. With local times a future duration calculation could be off by an entire hour, since legislatures can and do change DST rules at will.
</para>
<para>
If you want to handle wall-clock times in the future, you won't be able (in the general case) to calculate exact durations, for the same reasons described above.
</para>
<para>
If you want accurate calculations with future times, you will have to use TAI or an equivalent, but the mapping from TAI to UTC or local time depends on leap seconds, so you will not have exact agreement with wall-clock time.
</para>
<bridgehead renderas="sect2">
Stability, Predictability, and Approximations
</bridgehead>
<para>
Here is some underlying theory that helps to explain what's going on. Remember that a temporal type, like any abstract data type (ADT), is a set of values together with operations on those values.
</para>
<bridgehead renderas="sect3">
Stability
</bridgehead>
<para>
The representation of a type is <emphasis>stable</emphasis> if the bit pattern associated with a given value does not change over time. A type with an unstable representation is unlikely to be of much use to anyone, so we will insist that any temporal library use only stable representations.
</para>
<para>
An operation on a type is stable if the result of applying the operation to a particular operand(s) does not change over time.
</para>
<bridgehead renderas="sect3">
Predictability
</bridgehead>
<para>
Sets are most often classified into two categories: well-defined and ill-defined. Since a type is a set, we can extend these definitions to cover types. For any type T, there must be a predicate <emphasis>is_member( x )</emphasis> which determines whether a value x is a member of type T. This predicate must return <emphasis>true, false,</emphasis> or <emphasis>dont_know</emphasis>.
</para>
<para>
If for all x, is_member( x ) returns either true or false, we say the set T is <emphasis>well-defined</emphasis>.
</para>
<para>
If for any x, is_member( x ) returns dont_know, we say the set T is <emphasis>ill-defined</emphasis>.
</para>
<para>
Those are the rules normally used in math. However, because of the special characteristics of temporal types, it is useful to refine this view and create a third category as follows:
</para>
<para>
For any temporal type T, there must be a predicate <emphasis>is_member( x, t )</emphasis> which determines whether a value x is a member of T. The parameter t represents the time when the predicate is evaluated. For each x<subscript>i</subscript>, there must be a time t<subscript>i</subscript> and a value v such that:
<itemizedlist mark="bullet">
<listitem>v = true or v = false, and</listitem>
<listitem>for all t < t<subscript>i</subscript>, is_member( x<subscript>i</subscript>, t ) returns dont_know, and</listitem>
<listitem>for all t >= t<subscript>i</subscript>, is_member( x<subscript>i</subscript>, t ) returns v.</listitem>
</itemizedlist>
t<subscript>i</subscript> is thus the time when we "find out" whether x<subscript>i</subscript> is a member of T. Now we can define three categories of temporal types:
</para>
<para>
If for all x<subscript>i</subscript>, t<subscript>i</subscript> = negative infinity, we say the type T is <emphasis>predictable</emphasis>.
</para>
<para>
If for some x<subscript>i</subscript>, t<subscript>i</subscript> = positive infinity, we say the type T is <emphasis>ill-formed</emphasis>.
</para>
<para>
Otherwise we say the type T is <emphasis>unpredictable</emphasis> (this implies that for some x<subscript>i</subscript>, t<subscript>i</subscript> is finite).
</para>
<para>
Ill-formed sets are not of much practical use, so we will not discuss them further. In plain english the above simply says that all the values of a predictable type are known ahead of time, but some values of an unpredictable type are not known until some particular time.
</para>
<bridgehead renderas="sect3">
Stability of Operations
</bridgehead>
<para>
Predictable types have a couple of important properties:
<itemizedlist mark="bullet">
<listitem>there is an order-preserving mapping from their elements onto a set of consecutive integers, and</listitem>
<listitem>duration operations on their values are stable</listitem>
</itemizedlist>
</para>
<para>
The practical effect of this is that duration calculations can be implemented with simple integer subtraction. Examples of predictable types are TAI timepoints and Gregorian dates.
</para>
<para>
Unpredictable types have exactly the opposite properties:
<itemizedlist mark="bullet">
<listitem>there is no order-preserving mapping from their elements onto a set of consecutive integers, and</listitem>
<listitem>duration operations on their values are not stable. </listitem>
</itemizedlist>
</para>
<para>
Examples of unpredictable types are UTC timepoints and Local Time timepoints.
</para>
<para>
We can refine this a little by saying that a range within an unpredicatable type can be predictable, and operations performed entirely on values within that range will be stable. For example, the range of UTC timepoints from 1970-01-01 through the present is predictable, so calculations of durations within that range will be stable.
</para>
<bridgehead renderas="sect3">
Approximations
</bridgehead>
<para>
These limitations are problematical, because important temporal types like UTC and Local Time are in fact unpredictable, and therefore operations on them are sometimes unstable. Yet as a practical matter we often want to perform this kind of operation, such as computing the duration between two timepoints in the future that are specified in Local Time.
</para>
<para>
The best the library can do is to provide an approximation, which is generally possible and for most purposes will be good enough. Of course the documentation must specify when an answer will be approximate (and thus unstable) and how big the error may be. In many respects calculating with unpredictable sets is analogous to the use of floating point numbers, for which results are expected to only be approximately correct. Calculating with predictable sets would then be analogous to the user of integers, where results are expected to be exact.
</para>
<para>
For situations where exact answers are required or instability cannot be tolerated, the user must be able to specify this, and then the library should throw an exception if the user requests a computation for which an exact, stable answer is not possible.
</para>
</section>
``` | /content/code_sandbox/deps/boost_1_66_0/libs/date_time/xmldoc/tradeoffs.xml | xml | 2016-09-05T10:18:44 | 2024-08-11T13:21:40 | LiquidCore | LiquidPlayer/LiquidCore | 1,010 | 2,015 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="path_to_url"
package="com.journaldev.googlemapsfeatures">
<!--
The ACCESS_COARSE/FINE_LOCATION permissions are not required to use
Google Maps Android API v2, but you must specify either coarse or fine
location permissions for the 'MyLocation' functionality.
-->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<!--
The API key for Google Maps-based APIs is defined as a string resource.
(See the file "res/values/google_maps_api.xml").
Note that the API key is linked to the encryption key used to sign the APK.
You need a different API key for each encryption key, including the release key that is used to
sign the APK for publishing.
You can define the keys for the debug and release targets in src/debug/ and src/release/.
-->
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<activity
android:name=".MapsActivity"
android:label="@string/title_activity_maps">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
``` | /content/code_sandbox/Android/GoogleMapsFeatures/app/src/main/AndroidManifest.xml | xml | 2016-05-02T05:43:21 | 2024-08-16T06:51:39 | journaldev | WebJournal/journaldev | 1,314 | 345 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="path_to_url"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:text="Button"
/>
</LinearLayout>
``` | /content/code_sandbox/chapter4/FragmentTest/app/src/main/res/layout/left_fragment.xml | xml | 2016-10-04T02:55:57 | 2024-08-16T11:00:26 | booksource | guolindev/booksource | 3,105 | 101 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>target/ironmq.log</file>
<append>false</append>
<encoder>
<pattern>%d{ISO8601} %-5level [%thread] [%logger{36}] %msg%n</pattern>
</encoder>
</appender>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{HH:mm:ss.SSS} %-5level [%-20.20thread] %-36.36logger{36} %msg%n%rEx</pattern>
</encoder>
</appender>
<appender name="CapturingAppender" class="akka.stream.alpakka.testkit.CapturingAppender"/>
<logger name="akka.stream.alpakka.testkit.CapturingAppenderDelegate">
<appender-ref ref="STDOUT"/>
</logger>
<logger name="akka" level="DEBUG"/>
<logger name="akka.http" level="info"/>
<root level="debug">
<appender-ref ref="CapturingAppender"/>
<appender-ref ref="FILE" />
</root>
</configuration>
``` | /content/code_sandbox/ironmq/src/test/resources/logback-test.xml | xml | 2016-10-13T13:08:14 | 2024-08-15T07:57:42 | alpakka | akka/alpakka | 1,265 | 292 |
```xml
import { c, msgid } from 'ttag';
import { InlineLinkButton } from '@proton/atoms/InlineLinkButton';
import { APPS } from '@proton/shared/lib/constants';
import { SettingsLink, useModalState } from '../../components';
import {
useConfig,
useIsSessionRecoveryInitiatedByCurrentSession,
useSessionRecoveryGracePeriodHoursRemaining,
useSessionRecoveryInsecureTimeRemaining,
useShouldNotifyPasswordResetAvailable,
useShouldNotifySessionRecoveryCancelled,
useShouldNotifySessionRecoveryInProgress,
useUser,
} from '../../hooks';
import { SessionRecoveryInProgressModal } from '../account';
import PasswordResetAvailableAccountModal from '../account/sessionRecovery/PasswordResetAvailableAccountModal';
import { useSessionRecoveryLocalStorage } from '../account/sessionRecovery/SessionRecoveryLocalStorageManager';
import TopBanner from './TopBanner';
const SessionRecoveryInProgressBanner = () => {
const hoursRemaining = useSessionRecoveryGracePeriodHoursRemaining();
const [user] = useUser();
const [
sessionRecoveryInProgressModal,
setSessionRecoveryInProgressModalOpen,
renderSessionRecoveryInProgressModal,
] = useModalState();
if (hoursRemaining === null) {
return null;
}
const readMore = (
<InlineLinkButton key="read-more" onClick={() => setSessionRecoveryInProgressModalOpen(true)}>
{c('session_recovery:in_progress:action').t`Learn more`}
</InlineLinkButton>
);
return (
<>
{renderSessionRecoveryInProgressModal && (
<SessionRecoveryInProgressModal {...sessionRecoveryInProgressModal} />
)}
<TopBanner className="bg-warning">
{
// translator: Full sentence "Password reset requested (user@email.com). You can change your password in 72 hours."
c('session_recovery:in_progress:info').ngettext(
msgid`Password reset requested (${user.Email}). You can change your password in ${hoursRemaining} hour.`,
`Password reset requested (${user.Email}). You can change your password in ${hoursRemaining} hours.`,
hoursRemaining
)
}{' '}
{readMore}
</TopBanner>
</>
);
};
const PasswordResetAvailableBanner = () => {
const timeRemaining = useSessionRecoveryInsecureTimeRemaining();
const isSessionRecoveryInitiatedByCurrentSession = useIsSessionRecoveryInitiatedByCurrentSession();
const [user] = useUser();
const { APP_NAME } = useConfig();
const [
passwordResetAvailableAccountModal,
setPasswordResetAvailableAccountModalOpen,
renderPasswordResetAvailableAccountModal,
] = useModalState();
if (timeRemaining === null) {
return null;
}
const cta =
APP_NAME === APPS.PROTONACCOUNT ? (
<InlineLinkButton key="reset-password" onClick={() => setPasswordResetAvailableAccountModalOpen(true)}>
{isSessionRecoveryInitiatedByCurrentSession
? c('session_recovery:available:action').t`Reset password`
: c('Action').t`See how`}
</InlineLinkButton>
) : (
<SettingsLink
key="reset-password"
path="/account-password?action=session-recovery-password-reset-available"
>
{c('session_recovery:available:link').t`See how`}
</SettingsLink>
);
// translator: Full sentence "Password reset request approved (user@email.com)."
const approved = c('session_recovery:available:info').jt`Password reset request approved (${user.Email}).`;
const message = (() => {
if (timeRemaining.inMinutes === 0) {
// translator: Full sentence "You have N seconds to reset your password."
return c('session_recovery:available:info').ngettext(
msgid`You have ${timeRemaining.inSeconds} second to reset your password.`,
` You have ${timeRemaining.inSeconds} seconds to reset your password.`,
timeRemaining.inSeconds
);
}
if (timeRemaining.inHours === 0) {
// translator: Full sentence "You have N minutes to reset your password."
return c('session_recovery:available:info').ngettext(
msgid`You have ${timeRemaining.inMinutes} minute to reset your password.`,
` You have ${timeRemaining.inMinutes} minutes to reset your password.`,
timeRemaining.inMinutes
);
}
if (timeRemaining.inDays === 0) {
// translator: Full sentence "You have N hours to reset your password."
return c('session_recovery:available:info').ngettext(
msgid`You have ${timeRemaining.inHours} hour to reset your password.`,
` You have ${timeRemaining.inHours} hours to reset your password.`,
timeRemaining.inHours
);
}
// translator: Full sentence "You have N days to reset your password."
return c('session_recovery:available:info').ngettext(
msgid`You have ${timeRemaining.inDays} day to reset your password.`,
`You have ${timeRemaining.inDays} days to reset your password.`,
timeRemaining.inDays
);
})();
return (
<>
{renderPasswordResetAvailableAccountModal && (
<PasswordResetAvailableAccountModal {...passwordResetAvailableAccountModal} />
)}
<TopBanner className="bg-success">
{approved} {message} {cta}
</TopBanner>
</>
);
};
const SessionRecoveryCancelledBanner = () => {
const [user] = useUser();
const { dismissSessionRecoveryCancelled } = useSessionRecoveryLocalStorage();
const changePasswordLink = (
<SettingsLink key="change-password-link" path="/account-password?action=change-password">
{
// translator: Full sentence "Password reset request cancelled (user@email.com). If you didnt make this request, change your password now."
c('session_recovery:cancelled:link').t`change your password now`
}
</SettingsLink>
);
return (
<>
<TopBanner
className="bg-danger"
onClose={() => {
dismissSessionRecoveryCancelled();
}}
>
{
// translator: Full sentence "Password reset request cancelled (user@email.com). If you didnt make this request, change your password now."
c('session_recovery:cancelled:info')
.jt`Password reset request canceled (${user.Email}). If you didnt make this request, ${changePasswordLink}.`
}
</TopBanner>
</>
);
};
const SessionRecoveryBanners = () => {
const shouldNotifyPasswordResetAvailable = useShouldNotifyPasswordResetAvailable();
const shouldNotifySessionRecoveryInProgress = useShouldNotifySessionRecoveryInProgress();
const shouldNotifySessionRecoveryCancelled = useShouldNotifySessionRecoveryCancelled();
return (
<>
{shouldNotifySessionRecoveryInProgress && <SessionRecoveryInProgressBanner />}
{shouldNotifyPasswordResetAvailable && <PasswordResetAvailableBanner />}
{shouldNotifySessionRecoveryCancelled && <SessionRecoveryCancelledBanner />}
</>
);
};
export default SessionRecoveryBanners;
``` | /content/code_sandbox/packages/components/containers/topBanners/SessionRecoveryBanners.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 1,508 |
```xml
/**
* Notifications.ts
*
* API interface and lifecycle manager for notifications UX
*/
import { Store } from "redux"
import { Overlay, OverlayManager } from "./../Overlay"
import { Notification } from "./Notification"
import { createStore, INotificationsState } from "./NotificationStore"
import { getView } from "./NotificationsView"
export class Notifications {
private _id: number = 0
private _overlay: Overlay
private _store: Store<INotificationsState>
constructor(private _overlayManager: OverlayManager) {
this._store = createStore()
this._overlay = this._overlayManager.createItem()
this._overlay.setContents(getView(this._store))
}
public enable(): void {
this._overlay.show()
}
public disable(): void {
this._overlay.hide()
}
public createItem(): Notification {
this._id++
return new Notification("notification" + this._id.toString(), this._store)
}
}
``` | /content/code_sandbox/browser/src/Services/Notifications/Notifications.ts | xml | 2016-11-16T14:42:55 | 2024-08-14T11:48:05 | oni | onivim/oni | 11,355 | 206 |
```xml
import * as ts from 'typescript';
import { ExtendedRoutesConfig } from '../cli';
import { MetadataGenerator } from '../metadataGeneration/metadataGenerator';
import { Tsoa } from '@tsoa/runtime';
import { DefaultRouteGenerator } from '../routeGeneration/defaultRouteGenerator';
import { fsMkDir } from '../utils/fs';
import path = require('path');
import { Config as BaseConfig } from "@tsoa/runtime";
export async function generateRoutes<Config extends ExtendedRoutesConfig>(
routesConfig: Config,
compilerOptions?: ts.CompilerOptions,
ignorePaths?: string[],
/**
* pass in cached metadata returned in a previous step to speed things up
*/
metadata?: Tsoa.Metadata,
defaultNumberType?: BaseConfig['defaultNumberType']
) {
if (!metadata) {
metadata = new MetadataGenerator(routesConfig.entryFile, compilerOptions, ignorePaths, routesConfig.controllerPathGlobs, routesConfig.rootSecurity, defaultNumberType).Generate();
}
const routeGenerator = await getRouteGenerator(metadata, routesConfig);
await fsMkDir(routesConfig.routesDir, { recursive: true });
await routeGenerator.GenerateCustomRoutes();
return metadata;
}
async function getRouteGenerator<Config extends ExtendedRoutesConfig>(metadata: Tsoa.Metadata, routesConfig: Config) {
// default route generator for express/koa/hapi
// custom route generator
const routeGenerator = routesConfig.routeGenerator;
if (routeGenerator !== undefined) {
if (typeof routeGenerator === 'string') {
try {
// try as a module import
const module = await import(routeGenerator);
return new module.default(metadata, routesConfig);
} catch (_err) {
// try to find a relative import path
const relativePath = path.relative(__dirname, routeGenerator);
const module = await import(relativePath);
return new module.default(metadata, routesConfig);
}
} else {
return new routeGenerator(metadata, routesConfig);
}
}
if (routesConfig.middleware !== undefined || routesConfig.middlewareTemplate !== undefined) {
return new DefaultRouteGenerator(metadata, routesConfig);
} else {
routesConfig.middleware = 'express';
return new DefaultRouteGenerator(metadata, routesConfig);
}
}
``` | /content/code_sandbox/packages/cli/src/module/generate-routes.ts | xml | 2016-06-17T10:42:50 | 2024-08-16T05:57:17 | tsoa | lukeautry/tsoa | 3,408 | 478 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
-->
<LWM2M xmlns:xsi="path_to_url" xsi:noNamespaceSchemaLocation="path_to_url">
<Object ObjectType="MODefinition">
<Name>Percentage</Name>
<Description1>This IPSO object should can be used to report measurements relative to a 0-100% scale. For example it could be used to measure the level of a liquid in a vessel or container in units of %.
</Description1>
<ObjectID>3320</ObjectID>
<ObjectURN>urn:oma:lwm2m:ext:3320:1.1</ObjectURN>
<LWM2MVersion>1.0</LWM2MVersion>
<ObjectVersion>1.1</ObjectVersion>
<MultipleInstances>Multiple</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Resources>
<Item ID="5700">
<Name>Sensor Value</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Mandatory</Mandatory>
<Type>Float</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description>Last or Current Measured Value from the Sensor.</Description>
</Item>
<Item ID="5701">
<Name>Sensor Units</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>String</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description>Measurement Units Definition.</Description>
</Item>
<Item ID="5601">
<Name>Min Measured Value</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>Float</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description>The minimum value measured by the sensor since power ON or reset.</Description>
</Item>
<Item ID="5602">
<Name>Max Measured Value</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>Float</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description>The maximum value measured by the sensor since power ON or reset.</Description>
</Item>
<Item ID="5603">
<Name>Min Range Value</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>Float</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description>The minimum value that can be measured by the sensor.</Description>
</Item>
<Item ID="5604">
<Name>Max Range Value</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>Float</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description>The maximum value that can be measured by the sensor.</Description>
</Item>
<Item ID="5605">
<Name>Reset Min and Max Measured Values</Name>
<Operations>E</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type></Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description>Reset the Min and Max Measured Values to Current Value.</Description>
</Item>
<Item ID="5821">
<Name>Current Calibration</Name>
<Operations>RW</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>Float</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description>Read or Write the current calibration coefficient.</Description>
</Item>
<Item ID="5750">
<Name>Application Type</Name>
<Operations>RW</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>String</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description>The application type of the sensor or actuator as a string depending on the use case.</Description>
</Item>
<Item ID="5518">
<Name>Timestamp</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>Time</Type>
<RangeEnumeration></RangeEnumeration>
<Units></Units>
<Description>The timestamp of when the measurement was performed.</Description>
</Item>
<Item ID="6050">
<Name>Fractional Timestamp</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>Float</Type>
<RangeEnumeration>0..1</RangeEnumeration>
<Units>s</Units>
<Description>Fractional part of the timestamp when sub-second precision is used (e.g., 0.23 for 230 ms).</Description>
</Item>
<Item ID="6042">
<Name>Measurement Quality Indicator</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>Integer</Type>
<RangeEnumeration>0..23</RangeEnumeration>
<Units></Units>
<Description>Measurement quality indicator reported by a smart sensor. 0: UNCHECKED No quality checks were done because they do not exist or can not be applied. 1: REJECTED WITH CERTAINTY The measured value is invalid. 2: REJECTED WITH PROBABILITY The measured value is likely invalid. 3: ACCEPTED BUT SUSPICIOUS The measured value is likely OK. 4: ACCEPTED The measured value is OK. 5-15: Reserved for future extensions. 16-23: Vendor specific measurement quality.</Description>
</Item>
<Item ID="6049">
<Name>Measurement Quality Level</Name>
<Operations>R</Operations>
<MultipleInstances>Single</MultipleInstances>
<Mandatory>Optional</Mandatory>
<Type>Integer</Type>
<RangeEnumeration>0..100</RangeEnumeration>
<Units></Units>
<Description>Measurement quality level reported by a smart sensor. Quality level 100 means that the measurement has fully passed quality check algorithms. Smaller quality levels mean that quality has decreased and the measurement has only partially passed quality check algorithms. The smaller the quality level, the more caution should be used by the application when using the measurement. When the quality level is 0 it means that the measurement should certainly be rejected.</Description>
</Item>
</Resources>
<Description2></Description2>
</Object>
</LWM2M>
``` | /content/code_sandbox/application/src/main/data/lwm2m-registry/3320.xml | xml | 2016-12-01T09:33:30 | 2024-08-16T19:58:25 | thingsboard | thingsboard/thingsboard | 16,820 | 1,862 |
```xml
export { definition as SliderDefinition } from './slider.definition.js';
export { Slider } from './slider.js';
export { SliderMode, SliderOrientation, SliderSize } from './slider.options.js';
export type { SliderConfiguration, SliderOptions } from './slider.options.js';
export { styles as SliderStyles } from './slider.styles.js';
export { template as SliderTemplate } from './slider.template.js';
``` | /content/code_sandbox/packages/web-components/src/slider/index.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 81 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="path_to_url" xmlns:xsi="path_to_url" xmlns:xsd="path_to_url" xmlns:activiti="path_to_url" xmlns:bpmndi="path_to_url" xmlns:omgdc="path_to_url" xmlns:omgdi="path_to_url" typeLanguage="path_to_url" expressionLanguage="path_to_url" targetNamespace="path_to_url">
<process id="multiInstanceSubProcessParallelTasks" name="Multi-Instance SubProcess with a parallel gateway" isExecutable="true">
<startEvent id="startevent1" name="Start"></startEvent>
<subProcess id="subprocess1" name="Sub Process">
<multiInstanceLoopCharacteristics isSequential="false">
<loopCardinality>2</loopCardinality>
</multiInstanceLoopCharacteristics>
<startEvent id="startevent2" name="Start"></startEvent>
<endEvent id="endevent2" name="End"></endEvent>
<userTask id="usertask2" name="User Task 2" ></userTask>
<userTask id="usertask3" name="User Task 3" ></userTask>
<userTask id="usertask1" name="User Task 1" ></userTask>
<sequenceFlow id="flow9" sourceRef="startevent2" targetRef="usertask1"></sequenceFlow>
<parallelGateway id="parallelgateway1" name="Parallel Gateway"></parallelGateway>
<sequenceFlow id="flow12" sourceRef="usertask1" targetRef="parallelgateway1"></sequenceFlow>
<sequenceFlow id="flow13" sourceRef="parallelgateway1" targetRef="usertask2"></sequenceFlow>
<sequenceFlow id="flow14" sourceRef="parallelgateway1" targetRef="usertask3"></sequenceFlow>
<parallelGateway id="parallelgateway2" name="Parallel Gateway"></parallelGateway>
<sequenceFlow id="flow15" sourceRef="usertask2" targetRef="parallelgateway2"></sequenceFlow>
<sequenceFlow id="flow16" sourceRef="usertask3" targetRef="parallelgateway2"></sequenceFlow>
<sequenceFlow id="flow17" sourceRef="parallelgateway2" targetRef="endevent2"></sequenceFlow>
</subProcess>
<endEvent id="endevent1" name="End"></endEvent>
<sequenceFlow id="flow1" sourceRef="startevent1" targetRef="subprocess1"></sequenceFlow>
<sequenceFlow id="flow2" sourceRef="subprocess1" targetRef="endevent1"></sequenceFlow>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_multiInstanceSubProcessParallelTasks">
<bpmndi:BPMNPlane bpmnElement="multiInstanceSubProcessParallelTasks" id="BPMNPlane_multiInstanceSubProcessParallelTasks">
<bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
<omgdc:Bounds height="35.0" width="35.0" x="50.0" y="350.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="subprocess1" id="BPMNShape_subprocess1">
<omgdc:Bounds height="296.0" width="531.0" x="130.0" y="220.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="startevent2" id="BPMNShape_startevent2">
<omgdc:Bounds height="35.0" width="35.0" x="150.0" y="353.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent2" id="BPMNShape_endevent2">
<omgdc:Bounds height="35.0" width="35.0" x="600.0" y="353.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask2" id="BPMNShape_usertask2">
<omgdc:Bounds height="55.0" width="105.0" x="400.0" y="270.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask3" id="BPMNShape_usertask3">
<omgdc:Bounds height="55.0" width="105.0" x="400.0" y="410.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
<omgdc:Bounds height="55.0" width="105.0" x="210.0" y="343.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="parallelgateway1" id="BPMNShape_parallelgateway1">
<omgdc:Bounds height="40.0" width="40.0" x="350.0" y="350.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="parallelgateway2" id="BPMNShape_parallelgateway2">
<omgdc:Bounds height="40.0" width="40.0" x="530.0" y="350.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
<omgdc:Bounds height="35.0" width="35.0" x="700.0" y="350.0"></omgdc:Bounds>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">
<omgdi:waypoint x="185.0" y="370.0"></omgdi:waypoint>
<omgdi:waypoint x="210.0" y="370.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">
<omgdi:waypoint x="315.0" y="370.0"></omgdi:waypoint>
<omgdi:waypoint x="350.0" y="370.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">
<omgdi:waypoint x="370.0" y="350.0"></omgdi:waypoint>
<omgdi:waypoint x="370.0" y="296.0"></omgdi:waypoint>
<omgdi:waypoint x="400.0" y="297.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">
<omgdi:waypoint x="370.0" y="390.0"></omgdi:waypoint>
<omgdi:waypoint x="369.0" y="436.0"></omgdi:waypoint>
<omgdi:waypoint x="400.0" y="437.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow15" id="BPMNEdge_flow15">
<omgdi:waypoint x="505.0" y="297.0"></omgdi:waypoint>
<omgdi:waypoint x="549.0" y="298.0"></omgdi:waypoint>
<omgdi:waypoint x="550.0" y="350.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16">
<omgdi:waypoint x="505.0" y="437.0"></omgdi:waypoint>
<omgdi:waypoint x="550.0" y="436.0"></omgdi:waypoint>
<omgdi:waypoint x="550.0" y="390.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">
<omgdi:waypoint x="570.0" y="370.0"></omgdi:waypoint>
<omgdi:waypoint x="600.0" y="370.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="85.0" y="367.0"></omgdi:waypoint>
<omgdi:waypoint x="130.0" y="368.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="661.0" y="368.0"></omgdi:waypoint>
<omgdi:waypoint x="700.0" y="367.0"></omgdi:waypoint>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
``` | /content/code_sandbox/modules/flowable5-test/src/test/resources/org/activiti/engine/test/bpmn/multiinstance/MultiInstanceTest.testEndTimeOnMiSubprocess.bpmn20.xml | xml | 2016-10-13T07:21:43 | 2024-08-16T15:23:14 | flowable-engine | flowable/flowable-engine | 7,715 | 2,372 |
```xml
<FrameLayout xmlns:android="path_to_url"
xmlns:app="path_to_url"
xmlns:tools="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="in.hbb20.countrycodepickerproject.CustomColorFragment">
<androidx.cardview.widget.CardView style="@style/parentCard">
<ScrollView style="@style/parentScrollView">
<LinearLayout style="@style/parentLinear">
<TextView
style="@style/fragmentTitle"
android:text="Custom Color" />
<TextView
style="@style/fragmentSubTitle"
android:text="Color of CCP content can be changed according to different background." />
<TextView
style="@style/sectionText"
android:text="How to set custom color?"/>
<TextView
style="@style/pointText"
android:text="\u2022 The custom content color can be set through xml layout and programmatically as well."/>
<TextView
style="@style/pointText"
android:text="1. Using xml "
android:textStyle="bold" />
<TextView
style="@style/pointText"
android:paddingLeft="32dp"
android:text='add app:ccp_contentColor=\"@color/customColor" to xml layout.'/>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginLeft="32dp"
android:layout_marginRight="16dp"
android:background="#250041"
android:padding="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Phone number"
android:textColor="@android:color/holo_orange_dark"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<com.hbb20.CountryCodePicker
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:ccp_contentColor="@android:color/holo_orange_dark"
app:ccp_defaultNameCode="jp"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@android:color/holo_orange_dark"
android:editable="false"
android:freezesText="true"
android:hint="phone"
android:inputType="phone"
android:singleLine="true"
android:text="8866667722"
android:textColor="@android:color/holo_orange_dark"
android:textColorHint="#caff8800" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<TextView
style="@style/pointText"
android:text="2. Programmatically "
android:textStyle="bold" />
<TextView
style="@style/pointText"
android:paddingLeft="32dp"
android:text="To set color programmatically, use setContentColor() method."/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="100dp"
android:layout_marginBottom="16dp"
android:orientation="horizontal"
android:paddingLeft="32dp"
android:weightSum="3">
<RelativeLayout
android:id="@+id/relative_color1"
style="@style/colorBlock"
android:background="@color/selectedTile">
<View
style="@style/colorInnerBlock"
android:background="@color/color1"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/relative_color2"
style="@style/colorBlock">
<View
style="@style/colorInnerBlock"
android:background="@color/color2"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/relative_color3"
style="@style/colorBlock">
<View
style="@style/colorInnerBlock"
android:background="@color/color3"/>
</RelativeLayout>
</LinearLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:layout_marginLeft="32dp"
android:layout_marginRight="16dp"
android:background="#222124"
android:padding="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/textView_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Phone number"
android:textColor="@android:color/white"
android:textSize="18sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<com.hbb20.CountryCodePicker
android:id="@+id/ccp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:ccp_countryPreference="pl"
app:ccp_defaultLanguage="BASQUE"
app:ccpDialog_background="@drawable/gradient"
app:ccpDialog_showFastScroller="false"
app:ccpDialog_searchEditTextTint="@android:color/white"
app:ccpDialog_showCloseIcon="true"
app:ccpDialog_textColor="@android:color/white"
app:ccp_contentColor="@android:color/white"/>
<EditText
android:id="@+id/editText_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:backgroundTint="@android:color/white"
android:enabled="false"
android:hint="phone"
android:inputType="phone"
android:singleLine="true"
android:text="8866667722"
android:textColor="@android:color/white"
android:textColorHint="#caffffff" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<TextView
style="@style/pointText"
android:layout_marginLeft="32dp"
android:text="* Click on any color to apply. "/>
<Button
android:id="@+id/button_next"
style="@style/Widget.AppCompat.Button.Colored"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Next feature >" />
</LinearLayout>
</ScrollView>
</androidx.cardview.widget.CardView>
</FrameLayout>
``` | /content/code_sandbox/app/src/main/res/layout/fragment_custom_color.xml | xml | 2016-01-20T10:28:34 | 2024-08-13T16:24:01 | CountryCodePickerProject | hbb20/CountryCodePickerProject | 1,506 | 1,473 |
```xml
/*
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this project.
*/
import { baseStyles, I18nService, event, EventEmitter, property } from '@cds/core/internal';
import { html, LitElement } from 'lit';
import styles from './test-dropdown.element.scss';
/**
* Dropdown, example test component. Do not use in production.
*
* ```typescript
* import '@cds/core/test-dropdown';
* ```
*
* ```html
* <cds-test-dropdown label="click me!">
* Hello World
* </cds-test-dropdown>
* ```
*
* @beta
* @slot - Content slot for dropdown content
* @event {boolean} openChange - notify open state change of dropdown
* @cssprop --border-color
* @cssprop --background-color
* @cssprop --text-color
*/
export class CdsTestDropdown extends LitElement {
@event() private openChange: EventEmitter<boolean>;
private _open = false;
get open() {
return this._open;
}
/** Set open to open or close the dropdown */
@property({ type: Boolean })
set open(value) {
if (value !== this._open) {
const old = this._open;
this._open = value;
this.requestUpdate('open', old);
this.openChange.emit(this.open);
}
}
/** Set the dropdown button text */
@property({ type: String })
label = 'dropdown';
static get styles() {
return [baseStyles, styles];
}
render() {
return html`
<div class="dropdown">
<button @click="${() => this.toggle()}" class="btn">${this.label}</button>
${this.open
? html` <div>
${I18nService.keys.dropdown.open}
<slot></slot>
</div>`
: ''}
</div>
`;
}
/** Toggle the current open state of the dropdown */
toggle() {
this.open = !this.open;
}
}
``` | /content/code_sandbox/packages/core/src/test-dropdown/test-dropdown.element.ts | xml | 2016-09-29T17:24:17 | 2024-08-11T17:06:15 | clarity | vmware-archive/clarity | 6,431 | 445 |
```xml
import {Component, OnDestroy, TemplateRef} from '@angular/core';
import {AutoCompleteService} from './autocomplete.service';
import {ActivatedRoute, Params, Router, RouterLink} from '@angular/router';
import {Subscription} from 'rxjs';
import {QueryParams} from '../../../../../common/QueryParams';
import {MetadataSearchQueryTypes, SearchQueryDTO, SearchQueryTypes, TextSearch,} from '../../../../../common/entities/SearchQueryDTO';
import {BsModalService} from 'ngx-bootstrap/modal';
import {BsModalRef} from 'ngx-bootstrap/modal/bs-modal-ref.service';
import {SearchQueryParserService} from './search-query-parser.service';
import {AlbumsService} from '../../albums/albums.service';
import {Config} from '../../../../../common/config/public/Config';
import {UserRoles} from '../../../../../common/entities/UserDTO';
import {AuthenticationService} from '../../../model/network/authentication.service';
import {Utils} from '../../../../../common/Utils';
@Component({
selector: 'app-gallery-search',
templateUrl: './search.gallery.component.html',
styleUrls: ['./search.gallery.component.css'],
providers: [AutoCompleteService, RouterLink],
})
export class GallerySearchComponent implements OnDestroy {
public searchQueryDTO: SearchQueryDTO = {
type: SearchQueryTypes.any_text,
text: '',
} as TextSearch;
public rawSearchText = '';
mouseOverAutoComplete = false;
readonly SearchQueryTypes: typeof SearchQueryTypes;
public readonly MetadataSearchQueryTypes: {
value: string;
key: SearchQueryTypes;
}[];
public saveSearchName = '';
private searchModalRef: BsModalRef;
private readonly subscription: Subscription = null;
private saveSearchModalRef: BsModalRef;
constructor(
private searchQueryParserService: SearchQueryParserService,
private albumService: AlbumsService,
private route: ActivatedRoute,
public router: Router,
private modalService: BsModalService,
public authenticationService: AuthenticationService
) {
this.SearchQueryTypes = SearchQueryTypes;
this.MetadataSearchQueryTypes = MetadataSearchQueryTypes.map((v) => ({
key: v,
value: SearchQueryTypes[v],
}));
this.subscription = this.route.params.subscribe((params: Params): void => {
if (!params[QueryParams.gallery.search.query]) {
return;
}
const searchQuery = JSON.parse(params[QueryParams.gallery.search.query]);
if (searchQuery) {
this.searchQueryDTO = searchQuery;
this.onQueryChange();
}
});
}
get CanCreateAlbum(): boolean {
return (
Config.Album.enabled &&
this.authenticationService.user.getValue().role >= UserRoles.Admin
);
}
get HTMLSearchQuery(): string {
return JSON.stringify(this.searchQueryDTO);
}
ngOnDestroy(): void {
if (this.subscription !== null) {
this.subscription.unsubscribe();
}
}
public async openSearchModal(template: TemplateRef<unknown>): Promise<void> {
this.searchModalRef = this.modalService.show(template, {
class: 'modal-lg',
});
document.body.style.paddingRight = '0px';
}
public hideSearchModal(): void {
this.searchModalRef.hide();
this.searchModalRef = null;
}
public async openSaveSearchModal(template: TemplateRef<unknown>): Promise<void> {
this.saveSearchModalRef = this.modalService.show(template, {
class: 'modal-lg',
});
document.body.style.paddingRight = '0px';
}
public hideSaveSearchModal(): void {
this.saveSearchModalRef.hide();
this.saveSearchModalRef = null;
}
public onQueryChange(): void {
if (Utils.equalsFilter(this.searchQueryParserService.parse(this.rawSearchText), this.searchQueryDTO)) {
return;
}
this.rawSearchText = this.searchQueryParserService.stringify(
this.searchQueryDTO
);
}
validateRawSearchText(): void {
try {
this.searchQueryDTO = this.searchQueryParserService.parse(
this.rawSearchText
);
} catch (e) {
console.error(e);
}
}
Search(): void {
this.router
.navigate(['/search', this.HTMLSearchQuery])
.catch(console.error);
}
async saveSearch(): Promise<void> {
await this.albumService.addSavedSearch(
this.saveSearchName,
this.searchQueryDTO
);
this.hideSaveSearchModal();
}
}
``` | /content/code_sandbox/src/frontend/app/ui/gallery/search/search.gallery.component.ts | xml | 2016-03-12T11:46:41 | 2024-08-16T19:56:44 | pigallery2 | bpatrik/pigallery2 | 1,727 | 941 |
```xml
// This is a generated file. Changes are likely to result in being overwritten
declare namespace CustomActivityEditorScssNamespace {
export interface ICustomActivityEditorScss {
'button-container': string;
buttonContainer: string;
container: string;
'monaco-container': string;
monacoContainer: string;
'send-button': string;
sendButton: string;
}
}
declare const CustomActivityEditorScssModule: CustomActivityEditorScssNamespace.ICustomActivityEditorScss & {
/** WARNING: Only available when `css-loader` is used without `style-loader` or `mini-css-extract-plugin` */
locals: CustomActivityEditorScssNamespace.ICustomActivityEditorScss;
};
export = CustomActivityEditorScssModule;
``` | /content/code_sandbox/packages/app/client/src/ui/dialogs/customActivityEditor/customActivityEditor.scss.d.ts | xml | 2016-11-11T23:15:09 | 2024-08-16T12:45:29 | BotFramework-Emulator | microsoft/BotFramework-Emulator | 1,803 | 161 |
```xml
<mxfile modified="2019-07-12T10:39:26.557Z" host="localhost" agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36" etag="jmRjqRrDTk7vXSQ8oMGr" version="@DRAWIO-VERSION@" type="device"><diagram id="WI9T0HZ2pTsCkuznbFz-" name="Page-1">7V1bd5re0/40vWwWR5VLo8aYVzCeYvSmC4EiCuIfUMRP/85sQEEwNU00ND/b1Sqw2Yd5Zp45cPAHW7O2TUdezURb1cwfDKVuf7D1HwzDsGUKPnBPEO6haYEJ9+iOoUb7Djv6xk6LdkYn6mtD1dxUQ8your_sha512_hash/cQutvGDrTm27YXfrG1NM1F6sVzC8x5OHN1PzNGW3jkn9NrzYO7+ci2m9fj7XuqMqtPZT5qK1rGRzXW05Gi6XhDLwLHXS1XDbqgf7L0/Mzytv5IVPOoD7LBv5lkmbNHw1ZSnmnkvKwudnFazTdsh3bC/yR9o8tswzeR+Hv/Cftdz7IUWH1naSw0b20sv0Tj8A/your_sha256_hashvf930AAL5EGLwHD5r97+LBM5UUHhyTxUOI7SuJB1e6GB4cmxG/pgJDRJuaObX9xmHHfRob2/your_sha512_hash/OxVxE+6gU1UVQO4/your_sha256_hashYnuAb6vg/gkKl8g7OjUZ9uAuRy8WIXK92JxF6H+RGcdIKs6jhwkmq2wgfuOcUqVdLxx1J479q7vbM+VU+3hSzjjg77tZfgRFeT/BYKh7iiqnGIYTrgqwzBnKv0+niwMxZT+BXzpDL48XSokvnEkURR8ObrI+H4AkXMjtgtY3F+5B5ZL03dZKF+BvmPF/e/your_sha256_hashyour_sha256_hash8+your_sha512_hash/gO+XQlkqWJRIFzqocEGeXhWvr8MBxZRd11Di3Q+GGXdwErc/w1G5CFln2ZiN87X4DgWKuUz9nKZLad6n49z9whVuociKpC3VWI2iC8ywJ9KgD+aH5XNJnCmY6XNXSRCLh1icqH8FYvk2W6a4OyHxJ31/Qql0xBThxDNM8XkxXLEvZvytYpxR5LxMjTuDt1BKX+your_sha256_hashtpP8NeRomOxylTb9+hQdN86a0TLqV03zOALY6+0cfXbi+lcBnWuo4C8cW+ifCCCnSlMJmvsHyour_sha512_hash+your_sha256_hash5G/3H3zw+wNUFgXpTrd/xhMaRv+BiKk88EcDnPKDBCXf8aRX/UHUmvuEsoTKd5c9nR7MMV3Oz+A9dEOwN+49jz1dKd2UuwUFfrglMRhMa25VD2ONYC3r22tMKrgXR5H+RuRZCBTjqSAWE0l18l/gfcGepy+your_sha256_hashSHgct9RqHIkNV4b0Iz6qrsyT/YarjJPCDczP0W1I+your_sha256_hash6FOctY3/eInUee08rlr+esk/LNtObt5kXdzKizemyt2vvGmuxXzFajzNv2uR3Hctcy6w0H7/em8/your_sha256_hashDAXpS1upODOeza/CdwWIj1lsbWIGnWD2r/SrxMLeZVqNhfeJhbktpM2ma/pTprZJzUxhhIb/ew7HFGr7DWiVzgvNjhuup9UK1qd6wVxN2eJ7ShLZ9ym9bPWpSa+lak3ZBdiWFnSwz610qu3CdlUCsV/02i9jsz3ljTS0f2m+wz4QcuGkT5JPCBUYJeFaMMBQHC77TF8J2MI5qvQQKY26mc8oQ+9wW+lpN6pSByour_sha512_hashloKLSWE39qCsvxa89UmQe+vYzWDuOLj/cczIV/7rd85VGHPiaryatam7I6jquLtSrX6XNMp1/dghzW4qCB41DaaIs6ZU6tB2PaHHpj62EuM2owZV/Wk/pqPXlV8Fy/Vdf59nzMt+oNX6xxW3HghjpQX+2U5sN8MgAZPD6ZCvMSqNbQeDbGc63ZKD+n1oLreFmolmmqwb0BuCwmr0your_sha512_hash+your_sha256_hashWT94oBgvwB5EhucEAyULdgQCxajyyPeURhppjSHpTELemS9rGG+7vjVNHH9J3XIkjjAlQb82M5gfHwMMQeZcaxUF3firnGkf/ezCfOyQYzk1x7RD9TZqeWBtB/8yWDlj0cq4DabTZoCC8eDo+MszHsxZRVPbr6sJsyMgjagQw32VLvp6IGTR/RKs14W2PZUO5UxF2oT9bPBi/NjuwEsQPfVgMa1e51aWn5w7hrn235dCC2D4o7GKE2Bi1Fm7Xlr2xmI8E+your_sha512_hash+PvkBOnMAf18Wk2XUou2vb/1YAHDC6Qar4nIl/MRRp0Yvd//Rb4pCdD4sYD9+n5sbdSm1sz6hk8UM+dDBoBMMuuNee7iGp70IDZhe1ii6wNDrNRLGDm+oISd10PrSuahQWW6WGfqPUKs52pzaEdzqTrQp8BSJVKzwZ6DWfQD/lQbZoU8AnqPiWRli/your_sha256_hashuKoHQ27MLcHZDZmZOXrvAz92dNPA3UYvkCmF+YEWUXIvmiN/rRN78kfaBFvHryUgCJml5aOmq9UCpr09mZH079dF0UfOAedxp3Z53B/f34rARdIDNse/BYMy15122jf2DZXcex55U46jxrgqWwHFin9rBOkE7lDV46XgftuXAu+your_sha512_hash+B36GbLh9wbMU+TUeXctNf2thOcY/your_sha256_hashzKAOYxhvkPQv4c5yCGI5rGW5o2wv7ANtA3biIFP5i0RufgsjBV/your_sha256_hashwhzLUN8JA4BOP5uSPRlBJDQnZ+your_sha256_hashVt+qXWbsh3571GB714E/peAOPUOAbkA/84WlyIAZHZvLGGubpizUcPA7Lz/XZdgWONHWCOGFIHfH3CtqhHqAOkP8Pnw33ERgO5rqB9suPdGHUN+your_sha256_hashai8C8NO/4MYUpNmbwH/5p4lj7ZueySAJ5dW6uOihBGadMCWEQPOl4IYWz3COuQJ8BZgg9Exgi/aRoPYmATHxIEEfNoAvHpnYoy22AU8xvBZZT+Ch078/tteqYGaEbQJu4whptb5I8/your_sha256_hashyour_sha256_hash94E6vE84rIHxKuBsjFchakYyour_sha512_hash/mdg4ryRp1DX4zFb0gDWVJ8wcI4P54BsOcDN52Gbliwyf9hHhZ+vYw59esJvjULft2De1t/nmrDc5zzp7zvVwpaXLQ2xwtGVxPhNU8m6EJetC13sTTHx/fWJqlDbllXYcy+b8lLRnEvWhR54/your_sha256_hash2HNtdp84NoQTbeCq9ZaDrWeQXLOh9ypvZQ2ECXPJ6MJzB+yF4s31ZrQeGl0k/your_sha256_hash3Mw7RrVZAdRMkDYDuIesE36Ym1lCCHnU+tBw89xLQpzCYPgjEebWdTSzIVg8dxYZ2YI9/your_sha256_hashs75B/79unc/zqGusJz/your_sha256_hashyour_sha256_hashGWWGsK64qpuiN422kt1P9JU4R/kod1DzhvMwTPPm1un8LRgM3nWxwlygwrOEpNmMOeVxjXeZ77m+SK2gxtguUswDJneCZo6S7SDvIdfBDEQwcf8dwEH//YAxRDiWGuB7lv8LprGYlc3JoMISd+lUDrHtZda0sf2r88jl9fdqBds+niyVVfW6iBO6yOQRyx6DVfQAMgBw21NWgZlYM/gtlGo8/3NYiE/a2S9al9rQ2iFxcyVsBIDOtwc6w1PaEUTMXaR5eoL5laG/RBQdTjRRmuJb92sQ4UTMC+2qOtOVl2c2t0imUu5cf8Y9CfH/W3hHagq4ILuktsg+your_sha256_hashuZzB5rrZClMmGVAbLz4Liuh/Lp7jAr7gy6tHTEF0oTdG+UlOVx3YvUoTAGxhoZHG+dqotB1BrLDuyX1Ldy24E8Z2BhZmky6kbY5bZjsdYpY010sAjEk/U2Pa/etqyour_sha512_hashyour_sha512_hash+AD2nPFaxuMKQG3xB19DWdvk9D9MxLAfB+your_sha512_hash5hLVhhqu7XgNUV+IT5j3WIwEHvo76aPvQF++your_sha256_hashpuOM692CJyUVyQ3VoyiGzBdysob2jXJfIV67pL+u5XvdT8Hm2jHddpg/iaRSbbQ+alpWNbf2+your_sha256_hashkc6dANogxDfqww0wN5IV6sZUM2Ib+your_sha256_hashgusAcc1yPrN+5d0BmsJhIdg3gKdQ8rkiypINZBFn1Yb+BDf2MK590ZLEiFUKy3sB+exEVNkeiOWCdVQwr02oPz/your_sha256_hashyour_sha256_hashul/waONiajjfd8nmWuoNwH0U0pFBXEk4EMMY0exC/your_sha256_hash9hsAKQpIioeVGN2EcrFWvEEkGKyi6xHX0SVkMpIAIsyfPD/cft6LCWTCJgkOzQDRlVTGxjbWpIh0iEfYZtuodjh/G96Dw9mfO/7TVg/your_sha512_hash+0n+VWFN4XjftVUJvwIReB8YdLFKeqZPyXArxZIg/WByL1xfAAhlS6w/ItQMKGEM+your_sha256_hashyour_sha256_hashXOm6FZVK9mElw/your_sha256_hashC6kA6UsrcmdX7your_sha512_hash/MesPuMGutBFSLlEOIH5ZN0kHOXGnepu9RitBOq0A+Wysyxl2iNmedWWyosH8DSso8w/3NaomtLzZHNOwW4x1iu7bX7SwkUM4cuynX8i2Rnkyf9GxsN32ty9g/qfYLulOnKkeZkn3yP38aU1Bz+YppTymhOVSFvlMgoTd1wwH3YTvZJ2GI5lnD+v/bTLcQzz2X6+H2klSxn5LmTyyGfDSGqu7WD3iN+WcaxBtQABcfGnvuasyGe5kgT8izrH2IUGQVwJ5Pl/1Ki1Wb0gqLKlXr5apwhcEwqoqgUTJHK2at7Gb1AAa3Ol8Xyour_sha512_hash/1LvTMiftPev4Nrv9v+VZfBrmRX+your_sha256_hashPCVC0kp/sGTf8dAikB854cIX0V8pTN+z/w0LrnB3vGPm18/k7S9mebc+cYSpu3mhX10pVI/TxkyOn1RLYjfq5R+jSuTfZUWk5Naxs0+your_sha256_hashZV64OycWjOd6lViwki01FtwmisB1/your_sha256_hashyour_sha256_hash8pVcFZsgz6iX/your_sha512_hashyour_sha512_hash+2pOzpZ+YmKhTj9kErL0R5QiA3++llwyVKYqlTeeLD3XFZSPaeBiSJ1Rfbnxyour_sha512_hash/SQ7xdTDk7WSinH4e6nIc4owB18xAnLeV8D8EcAfrlHuKMqtrNQ3zQQ5yvJic8BJ/mki/your_sha256_hashyour_sha256_hashFHvHVVuHmOBoAv9e3yY0gV0UB1wqFf9+your_sha256_hashyour_sha256_hashashWsmB54LkmVN02MgG+B7DNLyAIJG9GPWvw8ClC8eVnLKAkAMDczkYsjFsv9v+WTV9OXBhf2dJZoemcWwwoyjdCt8qhL8FgfNjqP3+74UdZM7pt9OUuOw7wOjydY0o511Q396IaPiTJjM662yubEXZBPk/iMPXsxmTzdzOuEL57XCgsoWR3ODrgkBk70UJncRPz/65dxcDZ+1e1CxM7bd3bTCYtJfIfc8bzV4XDSaDhpARO3RkrFzMUyour_sha512_hashbzFe+rfg5Lk1AZZ7/ev3P5uLZ91x/FwBK5aM8Qch5s8l1xXyour_sha512_hash+3IEsgky950ROLp54/Ces69DIJsUM98XAbbM5/zA9PUwqNQNrStabvDKOA3utzzdbvo/z3iLSvqa+R9AOJJ5o9qoNzAqTdwig0Ii28kfmiZ/PoJNzu1NGbhOY8OXj3+YZq+your_sha256_hashwE0MDy29uKhccuS9aWMo5jG/9byHXwb4nFtaVhkbGxihBsb2Clb4ej/Wxt4+WppgxqssZG21RzF8KLrxdTaNGVLseNxw8aGa8SzIcMZK3Ii/ieTZVuwCjsWAEzHw/your_sha256_hashBAhLKG/your_sha256_hashyour_sha256_hash7KXHjM0kc1V/7IEnLybjvuj9efx0Wcwwv7S4v5JsJyfG+Ly+ID+hJsdc+kg77U/Nzq40cGNDq5BB0yKDlg+W1Hn8n47aH8T1KfTQd4Dhjc6uNHBjQ6uTwdc/CTZn+mgfCE6yHvs9EYHNzq40cH16YCPr2r9kQ4+4/b5XDrIewPejQ5udHCjg+vXDspU9pHjE7WDT3jaPJcO8p6TvNHBjQ5udHB9OqgwOaXE/GThUqXEvDcQ3OjgRgc3Org+HQhs9q64E9HBpa4CZ+8HKvS90R+81itkrvWy17wXIv86fPZ2IOa/BAFbor4cguy9EIW+Iyour_sha512_hash/21sI3Ffbw63CfcthbznsV+your_sha256_hashmUs8XFQr/54tNJma5kL/dclZJzXslzo+QbJd8o+Suu9tAslffQ35VJOeflUMV+D8Jnly9olr7gBQfYdGzbSxxr4nugRVvVsMX/Aw==</diagram></mxfile>
``` | /content/code_sandbox/src/main/webapp/templates/cloud/azure/azure_4.xml | xml | 2016-09-06T12:59:15 | 2024-08-16T13:28:41 | drawio | jgraph/drawio | 40,265 | 4,350 |
```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.roncoo.education</groupId>
<artifactId>spring-boot-demo-24-1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>spring-boot-demo-24-1</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.0.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-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>2.1.4</version>
</dependency>
<!-- -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- mongodb -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
</dependency>
<!-- caching -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache</artifactId>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
</dependency>
<!-- mail -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
``` | /content/code_sandbox/spring-boot-demo-24-1/pom.xml | xml | 2016-08-22T02:54:02 | 2024-08-09T03:02:00 | spring-boot-demo | roncoo/spring-boot-demo | 1,718 | 845 |
```xml
/** @jsx jsx */
import { Editor } from 'slate'
import { jsx } from '../../../..'
export const input = (
<editor>
<block a>
<block a>one</block>
</block>
<block a>
<block a>two</block>
</block>
</editor>
)
export const test = editor => {
return Array.from(
Editor.nodes(editor, { at: [], match: n => n.a, mode: 'all' })
)
}
export const output = [
[
<block a>
<block a>one</block>
</block>,
[0],
],
[<block a>one</block>, [0, 0]],
[
<block a>
<block a>two</block>
</block>,
[1],
],
[<block a>two</block>, [1, 0]],
]
``` | /content/code_sandbox/packages/slate/test/interfaces/Editor/nodes/mode-all/block.tsx | xml | 2016-06-18T01:52:42 | 2024-08-16T18:43:42 | slate | ianstormtaylor/slate | 29,492 | 198 |
```xml
import { ContentTypesUsingRootKeyEncryption } from './ContentTypesUsingRootKeyEncryption'
export function ContentTypeUsesRootKeyEncryption(contentType: string): boolean {
return ContentTypesUsingRootKeyEncryption().includes(contentType)
}
``` | /content/code_sandbox/packages/models/src/Domain/Runtime/Encryption/ContentTypeUsesRootKeyEncryption.ts | xml | 2016-12-05T23:31:33 | 2024-08-16T06:51:19 | app | standardnotes/app | 5,180 | 47 |
```xml
import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';
import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
import { tokens } from '@fluentui/react-theme';
import { shorthands, mergeClasses, makeStyles } from '@griffel/react';
import { useButtonStyles_unstable } from '../Button/useButtonStyles.styles';
import type { SlotClassNames } from '@fluentui/react-utilities';
import type { ButtonSlots } from '../Button/Button.types';
import type { ToggleButtonState } from './ToggleButton.types';
export const toggleButtonClassNames: SlotClassNames<ButtonSlots> = {
root: 'fui-ToggleButton',
icon: 'fui-ToggleButton__icon',
};
const useRootCheckedStyles = makeStyles({
// Base styles
base: {
backgroundColor: tokens.colorNeutralBackground1Selected,
...shorthands.borderColor(tokens.colorNeutralStroke1),
color: tokens.colorNeutralForeground1Selected,
...shorthands.borderWidth(tokens.strokeWidthThin),
[`& .${iconFilledClassName}`]: {
display: 'inline',
},
[`& .${iconRegularClassName}`]: {
display: 'none',
},
':hover': {
backgroundColor: tokens.colorNeutralBackground1Hover,
...shorthands.borderColor(tokens.colorNeutralStroke1Hover),
color: tokens.colorNeutralForeground1Hover,
},
':hover:active': {
backgroundColor: tokens.colorNeutralBackground1Pressed,
...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),
color: tokens.colorNeutralForeground1Pressed,
},
},
// High contrast styles
highContrast: {
'@media (forced-colors: active)': {
backgroundColor: 'Highlight',
...shorthands.borderColor('Highlight'),
color: 'HighlightText',
forcedColorAdjust: 'none',
':hover': {
backgroundColor: 'HighlightText',
...shorthands.borderColor('Highlight'),
color: 'Highlight',
},
':hover:active': {
backgroundColor: 'HighlightText',
...shorthands.borderColor('Highlight'),
color: 'Highlight',
},
':focus': {
border: '1px solid HighlightText',
outlineColor: 'Highlight',
},
},
},
// Appearance variations
outline: {
backgroundColor: tokens.colorTransparentBackgroundSelected,
...shorthands.borderColor(tokens.colorNeutralStroke1),
...shorthands.borderWidth(tokens.strokeWidthThicker),
':hover': {
backgroundColor: tokens.colorTransparentBackgroundHover,
},
':hover:active': {
backgroundColor: tokens.colorTransparentBackgroundPressed,
},
...createCustomFocusIndicatorStyle({
...shorthands.borderColor(tokens.colorNeutralStroke1),
}),
},
primary: {
backgroundColor: tokens.colorBrandBackgroundSelected,
...shorthands.borderColor('transparent'),
color: tokens.colorNeutralForegroundOnBrand,
':hover': {
backgroundColor: tokens.colorBrandBackgroundHover,
...shorthands.borderColor('transparent'),
color: tokens.colorNeutralForegroundOnBrand,
},
':hover:active': {
backgroundColor: tokens.colorBrandBackgroundPressed,
...shorthands.borderColor('transparent'),
color: tokens.colorNeutralForegroundOnBrand,
},
},
secondary: {
/* The secondary styles are exactly the same as the base styles. */
},
subtle: {
backgroundColor: tokens.colorSubtleBackgroundSelected,
...shorthands.borderColor('transparent'),
color: tokens.colorNeutralForeground2Selected,
':hover': {
backgroundColor: tokens.colorSubtleBackgroundHover,
...shorthands.borderColor('transparent'),
color: tokens.colorNeutralForeground2Hover,
},
':hover:active': {
backgroundColor: tokens.colorSubtleBackgroundPressed,
...shorthands.borderColor('transparent'),
color: tokens.colorNeutralForeground2Pressed,
},
},
transparent: {
backgroundColor: tokens.colorTransparentBackgroundSelected,
...shorthands.borderColor('transparent'),
color: tokens.colorNeutralForeground2BrandSelected,
':hover': {
backgroundColor: tokens.colorTransparentBackgroundHover,
...shorthands.borderColor('transparent'),
color: tokens.colorNeutralForeground2BrandHover,
},
':hover:active': {
backgroundColor: tokens.colorTransparentBackgroundPressed,
...shorthands.borderColor('transparent'),
color: tokens.colorNeutralForeground2BrandPressed,
},
},
});
const useRootDisabledStyles = makeStyles({
// Base styles
base: {
backgroundColor: tokens.colorNeutralBackgroundDisabled,
...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),
color: tokens.colorNeutralForegroundDisabled,
':hover': {
backgroundColor: tokens.colorNeutralBackgroundDisabled,
...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),
color: tokens.colorNeutralForegroundDisabled,
},
':hover:active': {
backgroundColor: tokens.colorNeutralBackgroundDisabled,
...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),
color: tokens.colorNeutralForegroundDisabled,
},
},
// Appearance variations
outline: {
/* No styles */
},
primary: {
...shorthands.borderColor('transparent'),
':hover': {
...shorthands.borderColor('transparent'),
},
':hover:active': {
...shorthands.borderColor('transparent'),
},
},
secondary: {
/* The secondary styles are exactly the same as the base styles. */
},
subtle: {
backgroundColor: tokens.colorTransparentBackground,
...shorthands.borderColor('transparent'),
':hover': {
backgroundColor: tokens.colorTransparentBackgroundHover,
...shorthands.borderColor('transparent'),
},
':hover:active': {
backgroundColor: tokens.colorTransparentBackgroundPressed,
...shorthands.borderColor('transparent'),
},
},
transparent: {
backgroundColor: tokens.colorTransparentBackground,
...shorthands.borderColor('transparent'),
':hover': {
backgroundColor: tokens.colorTransparentBackgroundHover,
...shorthands.borderColor('transparent'),
},
':hover:active': {
backgroundColor: tokens.colorTransparentBackgroundPressed,
...shorthands.borderColor('transparent'),
},
},
});
const useIconCheckedStyles = makeStyles({
// Appearance variations
subtleOrTransparent: {
color: tokens.colorNeutralForeground2BrandSelected,
},
// High contrast styles
highContrast: {
'@media (forced-colors: active)': {
forcedColorAdjust: 'auto',
},
},
});
const usePrimaryHighContrastStyles = makeStyles({
// Do not use primary variant high contrast styles for toggle buttons
// otherwise there isn't enough difference between on/off states
base: {
'@media (forced-colors: active)': {
backgroundColor: 'ButtonFace',
...shorthands.borderColor('ButtonBorder'),
color: 'ButtonText',
forcedColorAdjust: 'auto',
},
},
disabled: {
'@media (forced-colors: active)': {
...shorthands.borderColor('GrayText'),
color: 'GrayText',
':focus': {
...shorthands.borderColor('GrayText'),
},
},
},
});
export const useToggleButtonStyles_unstable = (state: ToggleButtonState): ToggleButtonState => {
'use no memo';
const rootCheckedStyles = useRootCheckedStyles();
const rootDisabledStyles = useRootDisabledStyles();
const iconCheckedStyles = useIconCheckedStyles();
const primaryHighContrastStyles = usePrimaryHighContrastStyles();
const { appearance, checked, disabled, disabledFocusable } = state;
state.root.className = mergeClasses(
toggleButtonClassNames.root,
// Primary high contrast styles
appearance === 'primary' && primaryHighContrastStyles.base,
appearance === 'primary' && (disabled || disabledFocusable) && primaryHighContrastStyles.disabled,
// Checked styles
checked && rootCheckedStyles.base,
checked && rootCheckedStyles.highContrast,
appearance && checked && rootCheckedStyles[appearance],
// Disabled styles
(disabled || disabledFocusable) && rootDisabledStyles.base,
appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance],
// User provided class name
state.root.className,
);
if (state.icon) {
state.icon.className = mergeClasses(
toggleButtonClassNames.icon,
checked && (appearance === 'subtle' || appearance === 'transparent') && iconCheckedStyles.subtleOrTransparent,
iconCheckedStyles.highContrast,
state.icon.className,
);
}
useButtonStyles_unstable(state);
return state;
};
``` | /content/code_sandbox/packages/react-components/react-button/library/src/components/ToggleButton/useToggleButtonStyles.styles.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 1,809 |
```xml
/*
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
path_to_url
*/
// From path_to_url
export function escapeRegExp(str: string): string {
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
}
``` | /content/code_sandbox/packages/workbox-build/src/lib/escape-regexp.ts | xml | 2016-04-04T15:55:19 | 2024-08-16T08:33:26 | workbox | GoogleChrome/workbox | 12,245 | 73 |
```xml
import { assertions } from '@stryker-mutator/test-helpers';
import { expect } from 'chai';
import { disableTypeChecks, File } from '../../src/index.js';
describe(disableTypeChecks.name, () => {
describe('with TS or JS AST format', () => {
it('should prefix the file with `// @ts-nocheck`', async () => {
const inputFile = { name: 'foo.js', content: 'foo.bar();', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, { name: 'foo.js', content: '// @ts-nocheck\nfoo.bar();' });
});
describe('with shebang (`#!/usr/bin/env node`)', () => {
it('should insert `// @ts-nocheck` after the new line', async () => {
const inputFile = { name: 'foo.js', content: '#!/usr/bin/env node\nfoo.bar();', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, { name: 'foo.js', content: '#!/usr/bin/env node\n// @ts-nocheck\nfoo.bar();' });
});
it('should not insert if there is no code', async () => {
const inputFile = { name: 'foo.js', content: '#!/usr/bin/env node', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, { name: 'foo.js', content: '#!/usr/bin/env node' });
});
});
describe('with jest directive (`@jest-environment`)', () => {
it('should insert `// @ts-nocheck` after the jest directive', async () => {
const inputFile = { name: 'foo.js', content: '/**\n* @jest-environment jsdom\n*/\nfoo.bar();', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, {
name: 'foo.js',
content: '/**\n* @jest-environment jsdom\n*/\n// @ts-nocheck\n\nfoo.bar();',
});
});
it('should insert `// @ts-nocheck` after the jest directive also for the second file (#3583)', async () => {
const inputFile = { name: 'foo.js', content: '/**\n* @jest-environment jsdom\n*/\nfoo.bar();', mutate: true };
const inputFile2 = { name: 'foo.js', content: '/**\n* @jest-environment jsdom\n*/\nfoo.bar();', mutate: true };
await disableTypeChecks(inputFile, { plugins: null });
const actual = await disableTypeChecks(inputFile2, { plugins: null });
assertions.expectTextFileEqual(actual, {
name: 'foo.js',
content: '/**\n* @jest-environment jsdom\n*/\n// @ts-nocheck\n\nfoo.bar();',
});
});
});
it('should not even parse the file if "@ts-" can\'t be found anywhere in the file (performance optimization)', async () => {
const inputFile = { name: 'foo.js', content: 'some garbage that cannot be parsed', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, { name: 'foo.js', content: '// @ts-nocheck\nsome garbage that cannot be parsed' });
});
it('should remove @ts directives from a JS file', async () => {
const inputFile = { name: 'foo.js', content: '// @ts-check\nfoo.bar();', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, { name: 'foo.js', content: '// @ts-nocheck\n// \nfoo.bar();' });
});
it('should remove @ts directives from a TS file', async () => {
const inputFile = { name: 'foo.ts', content: '// @ts-check\nfoo.bar();', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, { name: 'foo.ts', content: '// @ts-nocheck\n// \nfoo.bar();' });
});
it('should remove @ts directive from single line', async () => {
await arrangeActAssert('baz();// @ts-check\nfoo.bar();', 'baz();// \nfoo.bar();');
});
it('should not remove @ts comments which occur later on the comment line (since then they are not considered a directive)', async () => {
await arrangeActAssert('// this should be ignored: @ts-expect-error\nfoo.bar();');
});
it('should remove @ts directive from multiline', async () => {
await arrangeActAssert('baz();/* @ts-expect-error */\nfoo.bar();', 'baz();/* */\nfoo.bar();');
});
describe('with string', () => {
it('should not remove @ts directive in double quoted string', async () => {
await arrangeActAssert('foo.bar("/* @ts-expect-error */")');
});
it('should not remove @ts directive in double quoted string after escaped double quote', async () => {
await arrangeActAssert('foo.bar("foo \\"/* @ts-expect-error */")');
});
it('should remove @ts directive after a string', async () => {
await arrangeActAssert('foo.bar("foo \\" bar "/* @ts-expect-error */,\nbaz.qux())', 'foo.bar("foo \\" bar "/* */,\nbaz.qux())');
});
it('should not remove @ts directive in single quoted string', async () => {
await arrangeActAssert("foo.bar('/* @ts-expect-error */')");
});
});
describe('with regex literals', () => {
it('should not remove @ts directive inside the regex', async () => {
await arrangeActAssert('const regex = / \\/*@ts-check */');
});
it('should remove @ts directives just after a regex', async () => {
await arrangeActAssert('const regex = / \\/*@ts-check */// @ts-expect-error\nfoo.bar()', 'const regex = / \\/*@ts-check */// \nfoo.bar()');
});
it('should allow escape sequence inside the regex', async () => {
await arrangeActAssert('const regex = / \\/ /; // @ts-expect-error', 'const regex = / \\/ /; // ');
});
it('should allow `/` inside a character class', async () => {
await arrangeActAssert('const regex = / [/] /; // @ts-check', 'const regex = / [/] /; // ');
});
});
describe('with template strings', () => {
it('should not remove @ts directive inside the literal', async () => {
await arrangeActAssert('const foo = `/*@ts-check */`');
});
});
async function arrangeActAssert(input: string, expectedOutput = input) {
const inputFile: File = { name: 'foo.tsx', content: input, mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, { name: 'foo.tsx', content: `// @ts-nocheck\n${expectedOutput}` });
}
});
describe('with HTML ast format', () => {
it('should prefix the script tags with `// @ts-nocheck`', async () => {
const inputFile = { name: 'foo.vue', content: '<template></template><script>foo.bar();</script>', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, {
name: 'foo.vue',
content: '<template></template><script>\n// @ts-nocheck\nfoo.bar();\n</script>',
});
});
it('should remove `// @ts` directives from script tags', async () => {
const inputFile = {
name: 'foo.html',
content: '<template></template><script>// @ts-expect-error\nconst foo = "bar"-"baz";</script>',
mutate: true,
};
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, {
name: 'foo.html',
content: '<template></template><script>\n// @ts-nocheck\n// \nconst foo = "bar"-"baz";\n</script>',
});
});
it('should not remove `// @ts` from the html itself', async () => {
const inputFile = { name: 'foo.vue', content: '<template>\n// @ts-expect-error\n</template>', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, { name: 'foo.vue', content: '<template>\n// @ts-expect-error\n</template>' });
});
});
describe('with Svelte ast format', () => {
it('should prefix the script tags with `// @ts-nocheck`', async () => {
const inputFile = { name: 'foo.svelte', content: '<script lang="ts">foo();</script><script context="module">bar();</script>', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, {
name: 'foo.svelte',
content: '<script lang="ts">\n// @ts-nocheck\nfoo();\n</script><script context="module">\n// @ts-nocheck\nbar();\n</script>',
});
});
it('should remove `// @ts` directives from script tags', async () => {
const inputFile = {
name: 'foo.svelte',
content: '<script>// @ts-expect-error\nconst foo = "bar"-"baz";</script>',
mutate: true,
};
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, {
name: 'foo.svelte',
content: '<script>\n// @ts-nocheck\n// \nconst foo = "bar"-"baz";\n</script>',
});
});
it('should not remove `// @ts` from the html itself', async () => {
const inputFile = { name: 'foo.svelte', content: '<template>\n// @ts-expect-error\n</template>', mutate: true };
const actual = await disableTypeChecks(inputFile, { plugins: null });
assertions.expectTextFileEqual(actual, { name: 'foo.svelte', content: '<template>\n// @ts-expect-error\n</template>' });
});
});
describe('with unsupported AST format', () => {
it('should silently ignore the file', async () => {
const expectedFile = { content: '# Readme', name: 'readme.md', mutate: true };
const actualFile = await disableTypeChecks(expectedFile, { plugins: null });
expect(actualFile).eq(expectedFile);
});
});
});
``` | /content/code_sandbox/packages/instrumenter/test/unit/disable-type-checks.spec.ts | xml | 2016-02-12T13:14:28 | 2024-08-15T18:38:25 | stryker-js | stryker-mutator/stryker-js | 2,561 | 2,470 |
```xml
<PreferenceScreen xmlns:android="path_to_url">
<PreferenceCategory android:title="Updates">
<CheckBoxPreference
android:defaultValue="false"
android:key="updateVersionPrompt"
android:summary="@string/CheckSoftwareUpdatesSummary"
android:title="@string/CheckSoftwareUpdates" />
</PreferenceCategory>
</PreferenceScreen>
``` | /content/code_sandbox/limbo-android-lib/src/main/res/xml/software_updates.xml | xml | 2016-02-13T09:05:37 | 2024-08-16T14:28:26 | limbo | limboemu/limbo | 2,563 | 73 |
```xml
import { ReactNode } from 'react';
export interface Props {
children: ReactNode;
open: boolean;
title: string;
onClose: () => void;
}
``` | /content/code_sandbox/packages/ui-components/src/components/RegistryInfoDialog/types.ts | xml | 2016-04-15T16:21:12 | 2024-08-16T09:38:01 | verdaccio | verdaccio/verdaccio | 16,189 | 38 |
```xml
import { css } from '@microsoft/fast-element';
import { display, forcedColorsStylesheetBehavior } from '../utils/index.js';
import {
colorBrandStroke1,
colorBrandStroke2,
colorNeutralStrokeOnBrand2,
curveEasyEase,
strokeWidthThick,
strokeWidthThicker,
strokeWidthThickest,
} from '../theme/design-tokens.js';
import {
extraLargeState,
extraSmallState,
hugeState,
invertedState,
largeState,
smallState,
tinyState,
} from '../styles/states/index.js';
export const styles = css`
${display('inline-flex')}
:host {
--duration: 1.5s;
--indicatorSize: ${strokeWidthThicker};
--size: 32px;
height: var(--size);
width: var(--size);
contain: strict;
content-visibility: auto;
}
:host(${tinyState}) {
--indicatorSize: ${strokeWidthThick};
--size: 20px;
}
:host(${extraSmallState}) {
--indicatorSize: ${strokeWidthThick};
--size: 24px;
}
:host(${smallState}) {
--indicatorSize: ${strokeWidthThick};
--size: 28px;
}
:host(${largeState}) {
--indicatorSize: ${strokeWidthThicker};
--size: 36px;
}
:host(${extraLargeState}) {
--indicatorSize: ${strokeWidthThicker};
--size: 40px;
}
:host(${hugeState}) {
--indicatorSize: ${strokeWidthThickest};
--size: 44px;
}
.progress,
.background,
.spinner,
.start,
.end,
.indicator {
position: absolute;
inset: 0;
}
.progress,
.spinner,
.indicator {
animation: none var(--duration) infinite ${curveEasyEase};
}
.progress {
animation-timing-function: linear;
animation-name: spin-linear;
}
.background {
border: var(--indicatorSize) solid ${colorBrandStroke2};
border-radius: 50%;
}
:host(${invertedState}) .background {
border-color: rgba(255, 255, 255, 0.2);
}
.spinner {
animation-name: spin-swing;
}
.start {
overflow: hidden;
inset-inline-end: 50%;
}
.end {
overflow: hidden;
inset-inline-start: 50%;
}
.indicator {
color: ${colorBrandStroke1};
box-sizing: border-box;
border-radius: 50%;
border: var(--indicatorSize) solid transparent;
border-block-start-color: currentcolor;
border-inline-end-color: currentcolor;
}
:host(${invertedState}) .indicator {
color: ${colorNeutralStrokeOnBrand2};
}
.start .indicator {
rotate: 135deg; /* Starts 9 o'clock */
inset: 0 -100% 0 0;
animation-name: spin-start;
}
.end .indicator {
rotate: 135deg; /* Ends at 3 o'clock */
inset: 0 0 0 -100%;
animation-name: spin-end;
}
@keyframes spin-linear {
100% {
transform: rotate(360deg);
}
}
@keyframes spin-swing {
0% {
transform: rotate(-135deg);
}
50% {
transform: rotate(0deg);
}
100% {
transform: rotate(225deg);
}
}
@keyframes spin-start {
0%,
100% {
transform: rotate(0deg);
}
50% {
transform: rotate(-80deg);
}
}
@keyframes spin-end {
0%,
100% {
transform: rotate(0deg);
}
50% {
transform: rotate(70deg);
}
}
`.withBehaviors(
forcedColorsStylesheetBehavior(css`
.background {
display: none;
}
.indicator {
border-color: Canvas;
border-block-start-color: Highlight;
border-inline-end-color: Highlight;
}
`),
);
``` | /content/code_sandbox/packages/web-components/src/spinner/spinner.styles.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 958 |
```xml
import Store from 'electron-store';
import { detectSystemLocale } from './detectSystemLocale';
const store = new Store();
export const getLocale = (network: string) => {
const systemLocale = detectSystemLocale();
try {
const locale = store.get(`${network}-USER-LOCALE`);
if (locale) {
return locale;
}
return systemLocale;
} catch (error) {
return systemLocale;
}
};
``` | /content/code_sandbox/source/main/utils/getLocale.ts | xml | 2016-10-05T13:48:54 | 2024-08-13T22:03:19 | daedalus | input-output-hk/daedalus | 1,230 | 96 |
```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.clickhouse</groupId>
<artifactId>clickhouse-r2dbc-samples</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>clickhouse-r2dbc-spring-webflux-sample</module>
</modules>
</project>
``` | /content/code_sandbox/examples/r2dbc/pom.xml | xml | 2016-07-15T12:48:27 | 2024-08-16T15:57:09 | clickhouse-java | ClickHouse/clickhouse-java | 1,413 | 138 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="path_to_url" xmlns:util="path_to_url">
<?include version.wxi ?>
<!-- Variables -->
<?define ProductName="Aspia Router"?>
<?define InstallLocation="Aspia Router"?>
<?define ServiceName="aspia-router"?>
<?define ServiceDisplayName="Aspia Router Service"?>
<?define ServiceDescription="Assigns identifiers to peers and routes traffic to bypass NAT."?>
<!-- Product description -->
<Product Id="*" Name="!(loc.ProductName)" Language="1033" Version="$(var.Version)" Manufacturer="$(var.Manufacturer)" UpgradeCode="{45182562-182B-44E9-ACFD-698062C06E54}">
<Package Id="*" InstallerVersion="405" Compressed="yes" Manufacturer="$(var.Manufacturer)" InstallPrivileges="elevated" InstallScope="perMachine" />
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" Schedule="afterInstallInitialize" AllowDowngrades="no" AllowSameVersionUpgrades="no" Disallow="no" />
<!-- Windows version checking -->
<Condition Message="This application is only supported on Windows 7, Windows Server 2008 R2, or higher.">
<![CDATA[Installed OR (VersionNT >= 601)]]>
</Condition>
<Icon Id="aspia.ico" SourceFile="resources/aspia.ico" />
<Property Id="ARPPRODUCTICON" Value="aspia.ico" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.Program_Files)">
<Directory Id="VendorProgramFilesFolder" Name="Aspia">
<Directory Id="INSTALLLOCATION" Name="Router" />
</Directory>
</Directory>
</Directory>
<!-- Router service -->
<DirectoryRef Id="INSTALLLOCATION" FileSource="$(var.SourceFiles)">
<Component Id ="Applications" DiskId="1" Guid="{A0E3C629-4A61-4ED0-BD9D-FE12C71D7E36}">
<File Id="aspia_router.exe" Name="aspia_router.exe" KeyPath="yes" />
<ServiceInstall Id="ServiceInstaller" Type="ownProcess" Vital="yes" Name="$(var.ServiceName)" DisplayName="$(var.ServiceDisplayName)" Description="$(var.ServiceDescription)" Start="auto" Account="LocalSystem" ErrorControl="ignore" Interactive="no">
<ServiceDependency Id="RpcSs"/>
<ServiceDependency Id="Tcpip"/>
<ServiceDependency Id="NDIS"/>
<ServiceDependency Id="AFD"/>
<util:ServiceConfig FirstFailureActionType="restart" SecondFailureActionType="restart" ThirdFailureActionType="restart" RestartServiceDelayInSeconds="60"/>
</ServiceInstall>
<ServiceControl Id="StartService" Stop="both" Remove="uninstall" Name="$(var.ServiceName)" Wait="yes" />
</Component>
</DirectoryRef>
<!-- Product features -->
<Feature Id="FeatureProduct" Title="$(var.ProductName)" InstallDefault="local" ConfigurableDirectory="INSTALLLOCATION" Level="1">
<ComponentRef Id="Applications" />
</Feature>
<Property Id="INSTALLLEVEL" Value="1" />
<!-- Resource customization -->
<WixVariable Id="WixUIBannerBmp" Value="resources/banner.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="resources/dialog.bmp" />
<WixVariable Id="WixUIExclamationIco" Value="resources/exclamation.ico" />
<WixVariable Id="WixUIInfoIco" Value="resources/info.ico" />
<WixVariable Id="WixUINewIco" Value="resources/new.ico" />
<WixVariable Id="WixUIUpIco" Value="resources/up.ico" />
<!-- UI description -->
<UI Id="InstallerUI">
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLLOCATION" />
<UIRef Id="WixUI_InstallDir" />
<UIRef Id="WixUI_ErrorProgressText" />
</UI>
</Product>
</Wix>
``` | /content/code_sandbox/installer/router.wxs | xml | 2016-10-26T16:17:31 | 2024-08-16T13:37:42 | aspia | dchapyshev/aspia | 1,579 | 921 |
```xml
import { ButtonProps, Icon } from '@chakra-ui/react';
import { FC } from 'react';
import { HiOutlineTrash } from 'react-icons/hi';
import { RippleButton } from './ripple-button';
export const DeleteIconButton: FC<ButtonProps> = (properties) => (
<RippleButton
size="sm"
{...properties}
bgColor={{ step1: 'red.400', step2: 'red.600', step3: 'red.800' }}
p={2}
>
<Icon as={HiOutlineTrash} boxSize={4} />
</RippleButton>
);
``` | /content/code_sandbox/packages/buttons/src/delete-icon-button.tsx | xml | 2016-05-14T02:18:49 | 2024-08-16T02:46:28 | ElectroCRUD | garrylachman/ElectroCRUD | 1,538 | 133 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="path_to_url"
android:fillBefore="true"
android:fillAfter="true">
<alpha
android:duration="100"
android:fromAlpha="1"
android:toAlpha="0"/>
</set>
``` | /content/code_sandbox/demo/src/main/res/anim/fade_out.xml | xml | 2016-03-17T12:17:56 | 2024-08-16T05:12:20 | ahbottomnavigation | aurelhubert/ahbottomnavigation | 3,836 | 71 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="primary">#4141ba</color>
<color name="primary_variant">#3939a3</color>
<color name="accent">#D14000</color>
<color name="accent_variant">#F44336</color>
<color name="on_primary">#fff</color>
<color name="on_secondary">#fff</color>
<color name="text">#000</color>
<color name="text_based_on_main_colors">@color/primary</color>
<color name="monochrome_icon">#333</color>
<color name="inverted_background">#666</color>
<color name="selection">#66ff6600</color>
<color name="selection_frame">#bbff6600</color>
<color name="location_dot">#536dfe</color>
<color name="quest_selection_frame">#bbFF5722</color>
<color name="background">#fff</color>
<color name="background_transparent">#0fff</color>
<color name="hint_text">#666</color>
<color name="label_text_below_image">#000</color>
<color name="title_text_next_to_image">#000</color>
<color name="description_text_next_to_image">#000</color>
<color name="disabled_text">#6666</color>
<color name="matched_search_text">#6000</color>
<color name="button_white">#fff</color>
<color name="background_disabled">#33999999</color>
<color name="dialog_shadow">#99000000</color>
<color name="divider">#66999999</color>
<color name="traffic_red">#C1121C</color>
<color name="traffic_blue">#2255BB</color>
<color name="traffic_green">#008351</color>
<color name="traffic_yellow">#ffd520</color>
<color name="traffic_brown">#73411f</color>
<color name="traffic_white">#fff</color>
<color name="traffic_black">#000</color>
<color name="traffic_gray_a">#8e9291</color>
<color name="traffic_gray_b">#4f5250</color>
<color name="smoothness_vehicle_tyre">#292f33</color>
<color name="pressed">#ddd</color>
<color name="attribution_text">#444</color>
<color name="team_0">#f44336</color>
<color name="team_1">#529add</color>
<color name="team_2">#ffdd55</color>
<color name="team_3">#ca72e2</color>
<color name="team_4">#9bbe55</color>
<color name="team_5">#f4900c</color>
<color name="team_6">#9aa0ad</color>
<color name="team_7">#6390a0</color>
<color name="team_8">#a07a43</color>
<color name="team_9">#494EAD</color>
<color name="team_10">#AA335D</color>
<color name="team_11">#655555</color>
<!-- for fading out images -->
<color name="fade_out">#fff</color>
<color name="fade_out_transparent">#00FFFFFF</color>
</resources>
``` | /content/code_sandbox/app/src/main/res/values/colors.xml | xml | 2016-07-02T10:44:04 | 2024-08-16T18:55:54 | StreetComplete | streetcomplete/StreetComplete | 3,781 | 758 |
```xml
<!-- drawable/format_font.xml -->
<vector xmlns:android="path_to_url"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#000"
android:pathData="M17,8H20V20H21V21H17V20H18V17H14L12.5,20H14V21H10V20H11L17,8M18,9L14.5,16H18V9M5,3H10C11.11,3 12,3.89 12,5V16H9V11H6V16H3V5C3,3.89 3.89,3 5,3M6,5V9H9V5H6Z" />
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable/ic_font_family_24dp.xml | xml | 2016-02-22T10:00:46 | 2024-08-16T15:37:50 | Images-to-PDF | Swati4star/Images-to-PDF | 1,174 | 191 |
```xml
import * as React from 'react';
import createSvgIcon from '../utils/createSvgIcon';
const PlayerSettingsIcon = createSvgIcon({
svg: ({ classes }) => (
<svg xmlns="path_to_url" viewBox="0 0 2048 2048" className={classes.svg} focusable="false">
<path d="M768 1024q-88 0-170 23t-153 64-129 100-100 130-65 153-23 170H0q0-117 35-229t101-207 157-169 203-113q-56-36-100-83t-76-103-47-118-17-130q0-106 40-199t109-163T568 40 768 0q106 0 199 40t163 109 110 163 40 200q0 67-16 129t-48 119-75 103-101 83q69 26 132 64t117 89l-87 95q-89-82-201-126t-233-44zM384 512q0 80 30 149t82 122 122 83 150 30q79 0 149-30t122-82 83-122 30-150q0-79-30-149t-82-122-123-83-149-30q-80 0-149 30t-122 82-83 123-30 149zm1530 1027q6 30 6 61t-6 61l124 51-49 119-124-52q-35 51-86 86l52 124-119 49-51-124q-30 6-61 6t-61-6l-51 124-119-49 52-124q-51-35-86-86l-124 52-49-119 124-51q-6-30-6-61t6-61l-124-51 49-119 124 52q35-51 86-86l-52-124 119-49 51 124q30-6 61-6t61 6l51-124 119 49-52 124q51 35 86 86l124-52 49 119-124 51zm-314 253q40 0 75-15t61-41 41-61 15-75q0-40-15-75t-41-61-61-41-75-15q-40 0-75 15t-61 41-41 61-15 75q0 40 15 75t41 61 61 41 75 15z" />
</svg>
),
displayName: 'PlayerSettingsIcon',
});
export default PlayerSettingsIcon;
``` | /content/code_sandbox/packages/react-icons-mdl2/src/components/PlayerSettingsIcon.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 635 |
```xml
/** @jsxRuntime automatic */
/** @jsxImportSource @fluentui/react-jsx-runtime */
import { assertSlots } from '@fluentui/react-utilities';
import type { TagPickerOptionState, TagPickerOptionSlots } from './TagPickerOption.types';
/**
* Render the final JSX of TagPickerOption
*/
export const renderTagPickerOption_unstable = (state: TagPickerOptionState) => {
assertSlots<TagPickerOptionSlots>(state);
return (
<state.root>
{state.media && <state.media />}
{state.root.children}
{state.secondaryContent && <state.secondaryContent />}
</state.root>
);
};
``` | /content/code_sandbox/packages/react-components/react-tag-picker/library/src/components/TagPickerOption/renderTagPickerOption.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 138 |
```xml
import { fetchServerResponse } from '../fetch-server-response'
import { createHrefFromUrl } from '../create-href-from-url'
import { applyRouterStatePatchToTree } from '../apply-router-state-patch-to-tree'
import { isNavigatingToNewRootLayout } from '../is-navigating-to-new-root-layout'
import type {
ReadonlyReducerState,
ReducerState,
HmrRefreshAction,
Mutable,
} from '../router-reducer-types'
import { handleExternalUrl } from './navigate-reducer'
import { handleMutable } from '../handle-mutable'
import { applyFlightData } from '../apply-flight-data'
import type { CacheNode } from '../../../../shared/lib/app-router-context.shared-runtime'
import { createEmptyCacheNode } from '../../app-router'
import { handleSegmentMismatch } from '../handle-segment-mismatch'
import { hasInterceptionRouteInCurrentTree } from './has-interception-route-in-current-tree'
// A version of refresh reducer that keeps the cache around instead of wiping all of it.
function hmrRefreshReducerImpl(
state: ReadonlyReducerState,
action: HmrRefreshAction
): ReducerState {
const { origin } = action
const mutable: Mutable = {}
const href = state.canonicalUrl
mutable.preserveCustomHistoryState = false
const cache: CacheNode = createEmptyCacheNode()
// If the current tree was intercepted, the nextUrl should be included in the request.
// This is to ensure that the refresh request doesn't get intercepted, accidentally triggering the interception route.
const includeNextUrl = hasInterceptionRouteInCurrentTree(state.tree)
// TODO-APP: verify that `href` is not an external url.
// Fetch data from the root of the tree.
cache.lazyData = fetchServerResponse(new URL(href, origin), {
flightRouterState: [state.tree[0], state.tree[1], state.tree[2], 'refetch'],
nextUrl: includeNextUrl ? state.nextUrl : null,
buildId: state.buildId,
isHmrRefresh: true,
})
return cache.lazyData.then(
({ flightData, canonicalUrl: canonicalUrlOverride }) => {
// Handle case when navigating to page in `pages` from `app`
if (typeof flightData === 'string') {
return handleExternalUrl(
state,
mutable,
flightData,
state.pushRef.pendingPush
)
}
// Remove cache.lazyData as it has been resolved at this point.
cache.lazyData = null
let currentTree = state.tree
let currentCache = state.cache
for (const flightDataPath of flightData) {
// FlightDataPath with more than two items means unexpected Flight data was returned
if (flightDataPath.length !== 3) {
// TODO-APP: handle this case better
console.log('REFRESH FAILED')
return state
}
// Given the path can only have two items the items are only the router state and rsc for the root.
const [treePatch] = flightDataPath
const newTree = applyRouterStatePatchToTree(
// TODO-APP: remove ''
[''],
currentTree,
treePatch,
state.canonicalUrl
)
if (newTree === null) {
return handleSegmentMismatch(state, action, treePatch)
}
if (isNavigatingToNewRootLayout(currentTree, newTree)) {
return handleExternalUrl(
state,
mutable,
href,
state.pushRef.pendingPush
)
}
const canonicalUrlOverrideHref = canonicalUrlOverride
? createHrefFromUrl(canonicalUrlOverride)
: undefined
if (canonicalUrlOverride) {
mutable.canonicalUrl = canonicalUrlOverrideHref
}
const applied = applyFlightData(currentCache, cache, flightDataPath)
if (applied) {
mutable.cache = cache
currentCache = cache
}
mutable.patchedTree = newTree
mutable.canonicalUrl = href
currentTree = newTree
}
return handleMutable(state, mutable)
},
() => state
)
}
function hmrRefreshReducerNoop(
state: ReadonlyReducerState,
_action: HmrRefreshAction
): ReducerState {
return state
}
export const hmrRefreshReducer =
process.env.NODE_ENV === 'production'
? hmrRefreshReducerNoop
: hmrRefreshReducerImpl
``` | /content/code_sandbox/packages/next/src/client/components/router-reducer/reducers/hmr-refresh-reducer.ts | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 956 |
```xml
import { PressableProps, GestureResponderEvent } from 'react-native';
export interface InlinePressableProps {
/**
* Called when a single tap gesture is detected.
* @type GestureResponderEventHandler
*/
onPress?: (event: GestureResponderEvent) => void;
/**
* Called when a touch is engaged before `onPress`.
* @type GestureResponderEventHandler
*/
onPressIn?: (event: GestureResponderEvent) => void;
/**
* Called when a touch is released before `onPress`.
* @type GestureResponderEventHandler
*/
onPressOut?: (event: GestureResponderEvent) => void;
/**
* Called when a long-tap gesture is detected.
* @type GestureResponderEventHandler
*/
onLongPress?: (event: GestureResponderEvent) => void;
/**
* @default None
* @type PressableProps except click handlers
*/
pressableProps?: Omit<
PressableProps,
'onPress' | 'onLongPress' | 'onPressIn' | 'onPressOut'
>;
}
``` | /content/code_sandbox/packages/base/src/helpers/InlinePressableProps.tsx | xml | 2016-09-08T14:21:41 | 2024-08-16T10:11:29 | react-native-elements | react-native-elements/react-native-elements | 24,875 | 237 |
```xml
module.exports = require('../../module.compiled').vendored[
'contexts'
].HtmlContext
``` | /content/code_sandbox/packages/next/src/server/route-modules/pages/vendored/contexts/html-context.ts | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 22 |
```xml
import { Vector3 } from '../../../types';
import vtkSpline1D, {
ISpline1DInitialValues,
BoundaryCondition,
} from '../Spline1D';
export interface ICardinalSpline1DInitialValues
extends ISpline1DInitialValues {}
export interface vtkCardinalSpline1D extends vtkSpline1D {
/**
*
* @param {Number} size
* @param {Float32Array} work
* @param {Vector3} x
* @param {Vector3} y
*/
computeCloseCoefficients(
size: number,
work: Float32Array,
x: Vector3,
y: Vector3
): void;
/**
*
* @param {Number} size
* @param {Float32Array} work
* @param {Vector3} x
* @param {Vector3} y
* @param {Object} options
* @param {BoundaryCondition} options.leftConstraint
* @param {Number} options.leftValue
* @param {BoundaryCondition} options.rightConstraint
* @param {Number} options.rightValue
*/
computeOpenCoefficients(
size: number,
work: Float32Array,
x: Vector3,
y: Vector3,
options: {
leftConstraint: BoundaryCondition;
leftValue: number;
rightConstraint: BoundaryCondition;
rightValue: Number;
}
): void;
/**
*
* @param {Number} intervalIndex
* @param {Number} t
*/
getValue(intervalIndex: number, t: number): number;
}
/**
* Method used to decorate a given object (publicAPI+model) with vtkCardinalSpline1D characteristics.
*
* @param publicAPI object on which methods will be bounds (public)
* @param model object on which data structure will be bounds (protected)
* @param {ICardinalSpline1DInitialValues} [initialValues] (default: {})
*/
export function extend(
publicAPI: object,
model: object,
initialValues?: ICardinalSpline1DInitialValues
): void;
/**
* Method used to create a new instance of vtkCardinalSpline1D.
* @param {ICardinalSpline1DInitialValues} [initialValues] for pre-setting some of its content
*/
export function newInstance(
initialValues?: ICardinalSpline1DInitialValues
): vtkCardinalSpline1D;
/**
* vtkCardinalSpline1D provides methods for creating a 1D cubic spline object
* from given parameters, and allows for the calculation of the spline value and
* derivative at any given point inside the spline intervals.
*/
export declare const vtkCardinalSpline1D: {
newInstance: typeof newInstance;
extend: typeof extend;
};
export default vtkCardinalSpline1D;
``` | /content/code_sandbox/Sources/Common/DataModel/CardinalSpline1D/index.d.ts | xml | 2016-05-02T15:44:11 | 2024-08-15T19:53:44 | vtk-js | Kitware/vtk-js | 1,200 | 626 |
```xml
/** @jsx jsx */
import { Transforms } from 'slate'
import { jsx } from '../../..'
export const run = editor => {
Transforms.unwrapNodes(editor, { match: n => n.a, mode: 'all' })
}
export const input = (
<editor>
<block a>
<block>
<anchor />
one
</block>
</block>
<block a>
<block>
two
<focus />
</block>
</block>
<block a>
<block>three</block>
</block>
</editor>
)
export const output = (
<editor>
<block>
<anchor />
one
</block>
<block>
two
<focus />
</block>
<block a>
<block>three</block>
</block>
</editor>
)
``` | /content/code_sandbox/packages/slate/test/transforms/unwrapNodes/mode-all/match-some-siblings.tsx | xml | 2016-06-18T01:52:42 | 2024-08-16T18:43:42 | slate | ianstormtaylor/slate | 29,492 | 193 |
```xml
import React, { useContext, forwardRef } from 'react';
import { createBEM } from '@zarm-design/bem';
import { ConfigContext } from '../config-provider';
const Week = forwardRef<any, any>((_props, ref) => {
const { prefixCls, locale: globalLocal } = useContext(ConfigContext);
const weeks = globalLocal?.Calendar?.weeks;
const bem = createBEM('calendar', { prefixCls });
const content = weeks?.map((week) => <li key={week}>{week}</li>);
return (
<ul className={bem('week')} ref={ref}>
{content}
</ul>
);
});
export default React.memo(Week);
``` | /content/code_sandbox/packages/zarm/src/calendar/Week.tsx | xml | 2016-07-13T11:45:37 | 2024-08-12T19:23:48 | zarm | ZhongAnTech/zarm | 1,707 | 151 |
```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>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
``` | /content/code_sandbox/Example/GrowingTextView/Info.plist | xml | 2016-02-17T03:17:55 | 2024-07-31T06:23:03 | GrowingTextView | KennethTsang/GrowingTextView | 1,073 | 365 |
```xml
<mujoco model="box">
<compiler inertiafromgeom="true" angle="degree" coordinate="local"/>
<worldbody>
<body name="ball" pos="0 0 0">
<joint name='ballx' type='slide' axis='1 0 0' pos='0 0 0' limited='false' damping='0.1' armature='0' stiffness='0'/>
<joint name='bally' type='slide' axis='0 1 0' pos='0 0 0' limited='false' damping='0.1' armature='0' stiffness='0'/>
<geom type="sphere" size="0.5" pos="0 0 0.5" rgba="1 0 0 1" />
</body>
</worldbody>
</mujoco>
``` | /content/code_sandbox/vendor/mujoco_models/red_ball.xml | xml | 2016-04-21T17:21:22 | 2024-08-16T12:58:29 | rllab | rll/rllab | 2,890 | 187 |
```xml
declare interface IM365ServicesHealthWebPartStrings {
PropertyPaneDescription: string;
BasicGroupName: string;
TitleFieldLabel: string;
AppLocalEnvironmentSharePoint: string;
AppLocalEnvironmentTeams: string;
AppLocalEnvironmentOffice: string;
AppLocalEnvironmentOutlook: string;
AppSharePointEnvironment: string;
AppTeamsTabEnvironment: string;
AppOfficeEnvironment: string;
AppOutlookEnvironment: string;
}
declare module "M365ServicesHealthWebPartStrings" {
const strings: IM365ServicesHealthWebPartStrings;
export = strings;
}
``` | /content/code_sandbox/samples/react-m365-services-health/SPFx-WebPart/src/webparts/m365ServicesHealth/loc/mystrings.d.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 116 |
```xml
import React from 'react';
import { Panel, Row, Col, Stack, IconButton } from 'rsuite';
import Page from '@/components/Page';
import { useApp } from '@/components/AppContext';
import GitHubIcon from '@rsuite/icons/legacy/Github';
interface CardProps {
name: string;
description?: React.ReactNode;
imgUrl: string;
sourceUrl: string;
href: string;
children?: React.ReactNode;
}
const Card = (props: CardProps) => {
const { name, description, children, imgUrl, href, sourceUrl } = props;
return (
<Panel bordered bodyFill style={{ display: 'block', height: 286, marginBottom: 10 }}>
<div style={{ textAlign: 'center' }}>
<a href={href} target="_blank" rel="noreferrer">
<img src={imgUrl} height={150} style={{ objectFit: 'cover' }} />
</a>
</div>
<Panel bodyFill>
<div style={{ padding: 10 }}>
<a href={sourceUrl} target="_blank" rel="noreferrer">
{name}
</a>
<div style={{ height: 70 }}>
<small>
{children}
{description}
</small>
</div>
<Stack justifyContent="space-between">
<a href={`path_to_url{name}`} target="_blank" rel="noreferrer">
<img src={`path_to_url{encodeURIComponent(name)}.svg`} />
</a>
<IconButton icon={<GitHubIcon />} size="xs" href={sourceUrl} target="_blank" />
</Stack>
</div>
</Panel>
</Panel>
);
};
export default () => {
const { locales } = useApp();
const resources = [
{
name: '@rsuite/charts',
sourceUrl: 'path_to_url
imgUrl: '/images/extensions/rsuite-charts.png',
href: 'path_to_url
},
{
name: '@rsuite/schema-form',
sourceUrl: 'path_to_url
imgUrl: '/images/extensions/schema-form.png',
href: 'path_to_url
},
{
name: '@rsuite/responsive-nav',
sourceUrl: 'path_to_url
imgUrl: '/images/extensions/responsive-nav.png',
href: 'path_to_url
},
{
name: '@rsuite/react-frame',
sourceUrl: 'path_to_url
imgUrl: '/images/extensions/rsuite-frame.png',
href: 'path_to_url
},
{
name: '@rsuite/multi-date-picker',
sourceUrl: 'path_to_url
imgUrl: '/images/extensions/multi-date-picker.png',
href: 'path_to_url
},
{
name: '@rsuite/document-nav',
sourceUrl: 'path_to_url
imgUrl: '/images/extensions/document-nav.png',
href: 'path_to_url
},
{
name: '@rsuite/timezone-picker',
sourceUrl: 'path_to_url
imgUrl: '/images/extensions/timezone-picker.png',
href: 'path_to_url
},
{
name: 'rsuite-color-picker',
description: (
<a href="path_to_url" target="_blank" rel="noreferrer">
@cXiaof
</a>
),
sourceUrl: 'path_to_url
imgUrl: '/images/extensions/rsuite-color-picker.png',
href: 'path_to_url
},
{
name: '@rsuite/formik',
sourceUrl: 'path_to_url
imgUrl: '/images/extensions/rsuite-formik.png',
href: 'path_to_url#rsuiteformik'
}
];
return (
<Page hidePageNav>
<Row gutter={20}>
{resources.map((item, index) => {
return (
<Col md={6} sm={12} xs={24} key={index}>
<Card {...item}>{locales.extensions[item.name]}</Card>
</Col>
);
})}
</Row>
</Page>
);
};
``` | /content/code_sandbox/docs/pages/resources/extensions/index.tsx | xml | 2016-06-06T02:27:46 | 2024-08-16T16:41:54 | rsuite | rsuite/rsuite | 8,263 | 881 |
```xml
import { ColumnValue, NormalizedEncodeSpec } from './encode';
import { G2Context, G2Mark } from './options';
export type TransformOptions = Record<string, any>;
export type TransformProps = Record<string, never>;
export type TransformComponent<O extends TransformOptions = TransformOptions> =
{
(options: O): Transform;
props?: TransformProps;
};
export type Transform = (
I: number[],
mark: G2Mark,
context: G2Context,
) => [number[], G2Mark] | Promise<[number[], G2Mark]>;
export type TransformSpec = {
type?: string | TransformComponent;
[key: string]: any;
};
export type ColumnOf = (data: any, encode: NormalizedEncodeSpec) => ColumnValue;
``` | /content/code_sandbox/src/runtime/types/transform.ts | xml | 2016-05-26T09:21:04 | 2024-08-15T16:11:17 | G2 | antvis/G2 | 12,060 | 167 |
```xml
//
//
// Microsoft Bot Framework: path_to_url
//
// Bot Framework Emulator Github:
// path_to_url
//
// All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
import './fetchProxy';
let mockFetchArgs: { input: RequestInfo; init?: any };
jest.mock('node-fetch', () => {
return async (input, init) => {
mockFetchArgs = { input, init };
return {
ok: true,
json: async () => ({}),
text: async () => '{}',
};
};
});
describe('fetch proxy support', () => {
it('should add the https-proxy-agent when the HTTPS_PROXY env var exists', async () => {
process.env.HTTPS_PROXY = 'path_to_url
await fetch('path_to_url
expect(mockFetchArgs.init.agent).not.toBeNull();
});
it.each([
['path_to_url true],
['path_to_url false],
['path_to_url false],
['path_to_url true],
['path_to_url false],
['path_to_url true],
['path_to_url false],
])(
'should not add the https-proxy-agent when the HTTPS_PROXY env var exists but the NO_PROXY omits the url (%#)',
(url: string, direct: boolean) => {
process.env.HTTPS_PROXY = 'path_to_url
process.env.NO_PROXY = 'host1,.domain1,*.domain2';
fetch(url).catch();
if (direct) {
expect(mockFetchArgs.init).toBeUndefined();
} else {
expect(mockFetchArgs.init).not.toBeUndefined();
}
}
);
it('should not add the http-proxy-agent when the HTTPS_PROXY is omitted', () => {
delete process.env.HTTPS_PROXY;
delete process.env.NO_PROXY;
fetch('path_to_url
expect(mockFetchArgs.init).toBeUndefined();
});
it('should add the https-agent to localhost requests', async () => {
process.env.HTTPS_PROXY = 'path_to_url
await fetch('path_to_url
expect(mockFetchArgs.init.agent).not.toBeUndefined();
});
it('should not add https-agent to the https requests', async () => {
delete process.env.HTTPS_PROXY;
await fetch('path_to_url
expect(mockFetchArgs.init).toBeUndefined();
});
});
``` | /content/code_sandbox/packages/app/main/src/fetchProxy.spec.ts | xml | 2016-11-11T23:15:09 | 2024-08-16T12:45:29 | BotFramework-Emulator | microsoft/BotFramework-Emulator | 1,803 | 714 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="path_to_url" xmlns:xsi="path_to_url"
xmlns:flowable="path_to_url"
xmlns:bpmndi="path_to_url" xmlns:omgdc="path_to_url"
xmlns:omgdi="path_to_url" typeLanguage="path_to_url"
expressionLanguage="path_to_url" targetNamespace="path_to_url">
<process id="userTaskIdVariableName">
<documentation>This is a process for testing purposes</documentation>
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="parallelGateway1" />
<parallelGateway id="parallelGateway1" />
<sequenceFlow id="flow2" sourceRef="parallelGateway1" targetRef="task1" />
<sequenceFlow id="flow3" sourceRef="parallelGateway1" targetRef="task2" />
<userTask id="task1" name="Task" flowable:taskIdVariableName="myTaskId" />
<userTask id="task2" name="Task" flowable:taskIdVariableName="${'myExpressionTaskId'}" />
<sequenceFlow id="flow4" sourceRef="task1" targetRef="parallelGateway2" />
<sequenceFlow id="flow5" sourceRef="task2" targetRef="parallelGateway2" />
<parallelGateway id="parallelGateway2" />
<sequenceFlow id="flow6" sourceRef="parallelGateway2" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
</definitions>
``` | /content/code_sandbox/modules/flowable-engine/src/test/resources/org/flowable/engine/test/bpmn/usertask/UserTaskTest.userTaskIdVariableName.bpmn20.xml | xml | 2016-10-13T07:21:43 | 2024-08-16T15:23:14 | flowable-engine | flowable/flowable-engine | 7,715 | 372 |
```xml
import { TypescriptGenerator } from '../../typescript-client'
import { test } from 'ava'
test('typescript env interpolation - plain', t => {
const result = TypescriptGenerator.replaceEnv(
`path_to_url`,
)
t.snapshot(result)
})
test('typescript env interpolation - environment one', t => {
const result = TypescriptGenerator.replaceEnv('${env:PRISMA_ENDPOINT}')
t.snapshot(result)
})
test('typescript env interpolation - environment multiple', t => {
const result = TypescriptGenerator.replaceEnv(
'path_to_url{env:PRISMA_SERVICE}/${env:PRISMA_STAGE}',
)
t.snapshot(result)
})
``` | /content/code_sandbox/cli/packages/prisma-client-lib/src/codegen/generators/__tests__/env-interpolation/typescript-env.test.ts | xml | 2016-09-25T12:54:40 | 2024-08-16T11:41:23 | prisma1 | prisma/prisma1 | 16,549 | 140 |
```xml
import { PushTokenManagerModule } from './PushTokenManager.types';
declare const _default: PushTokenManagerModule;
export default _default;
//# sourceMappingURL=PushTokenManager.d.ts.map
``` | /content/code_sandbox/packages/expo-notifications/build/PushTokenManager.d.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 39 |
```xml
import { RetinaImg } from 'mailspring-component-kit';
import React from 'react';
import fs from 'fs';
import {
Rx,
Actions,
AttachmentStore,
File,
localized,
DateUtils,
CalendarUtils,
ICSParticipantStatus,
Message,
Event,
EventRSVPTask,
DatabaseStore,
} from 'mailspring-exports';
import ICAL from 'ical.js';
import { findOneIana } from "windows-iana";
const moment = require('moment-timezone');
interface EventHeaderProps {
message: Message;
file: File;
}
interface EventHeaderState {
icsOriginalData?: string;
icsMethod?: 'reply' | 'request';
icsEvent?: ICAL.Event;
inflight?: ICSParticipantStatus;
}
/*
The EventHeader allows you to RSVP to a calendar invite embedded in an email. It also
looks to see if a matching event is present on your calendar. In most cases the event
will also be on your calendar, and that version is synced while the email attachment
version gets stale.
We try to show the RSVP status of the event on your calendar if it's present. If not,
we fall back to storing the RSVP status in message metadata (so the "Accept" button is
"sticky", even though we just fire off a RSVP message via email and never hear back.)
*/
export class EventHeader extends React.Component<EventHeaderProps, EventHeaderState> {
static displayName = 'EventHeader';
state = {
icsEvent: undefined,
icsMethod: undefined,
icsOriginalData: undefined,
inflight: undefined,
};
_mounted = false;
_subscription: Rx.IDisposable;
componentWillUnmount() {
this._mounted = false;
if (this._subscription) {
this._subscription.dispose();
}
}
componentDidMount() {
const { file, message } = this.props;
this._mounted = true;
fs.readFile(AttachmentStore.pathForFile(file), async (err, data) => {
if (err || !this._mounted) return;
const { event, root } = CalendarUtils.parseICSString(data.toString());
this.setState({
icsEvent: event,
icsMethod: (root.getFirstPropertyValue('method') || 'request').toLowerCase(),
icsOriginalData: data.toString(),
});
this._subscription = Rx.Observable.fromQuery(
DatabaseStore.findBy<Event>(Event, {
icsuid: event.uid,
accountId: message.accountId,
})
).subscribe(calEvent => {
if (!this._mounted || !calEvent) return;
this.setState({
icsEvent: CalendarUtils.parseICSString(calEvent.ics).event,
});
});
});
}
componentDidUpdate(prevProps, prevState) {
if (prevState.inflight) {
this.setState({ inflight: undefined });
}
}
render() {
const { icsEvent, icsMethod } = this.state;
if (!icsEvent || !icsEvent.startDate) {
return null;
}
// Workaround to convert calendar invites sent out from Microsoft calendars to IANA timezones
// that can be handled by moments-timezone.
let startTimezone = findOneIana(icsEvent.startDate.timezone) || icsEvent.startDate.timezone;
let endTimezone = findOneIana(icsEvent.endDate.timezone) || icsEvent.endDate.timezone;
// Workaround to convert calendar invites sent out from Google calendar with "Z" timezone
// to IANA timezone that can be handled by moments-timezone.
if (startTimezone === "Z") {
startTimezone = "UTC";
}
if (endTimezone === "Z") {
endTimezone = "UTC";
}
const startMoment = moment.tz(icsEvent.startDate.toString(), startTimezone).tz(DateUtils.timeZone);
const endMoment = moment.tz(icsEvent.endDate.toString(), endTimezone).tz(DateUtils.timeZone);
const daySeconds = 24 * 60 * 60 * 1000;
let day = '';
let time = '';
if (endMoment.diff(startMoment) < daySeconds) {
day = startMoment.format('dddd, MMMM Do');
time = `${startMoment.format(
DateUtils.getTimeFormat({ timeZone: false })
)} - ${endMoment.format(DateUtils.getTimeFormat({ timeZone: true }))}`;
} else {
day = `${startMoment.format('dddd, MMMM Do')} - ${endMoment.format('MMMM Do')}`;
if (endMoment.diff(startMoment) % daySeconds === 0) {
time = localized('All Day');
} else {
time = startMoment.format(DateUtils.getTimeFormat({ timeZone: true }));
}
}
return (
<div className="event-wrapper">
<div className="event-header">
<div className="event-download" onClick={() => Actions.fetchAndOpenFile(this.props.file)}>
<RetinaImg name="icon-attachment-download.png" mode={RetinaImg.Mode.ContentIsMask} />
</div>
<RetinaImg name="icon-RSVP-calendar-mini@2x.png" mode={RetinaImg.Mode.ContentPreserve} />
<span className="event-title-text">{localized('Event')}: </span>
<span className="event-title">{icsEvent.summary}</span>
</div>
<div className="event-body">
<div className="event-date">
<div className="event-day">{day}</div>
<div>
<div className="event-time">{time}</div>
</div>
<div className="event-location">{icsEvent.location}</div>
{icsMethod === 'request' ? this._renderRSVP() : this._renderSenderResponse()}
</div>
</div>
</div>
);
}
_renderSenderResponse() {
const { icsEvent } = this.state;
const from = this.props.message.from[0];
if (!from) return false;
const sender = CalendarUtils.cleanParticipants(icsEvent).find(p => p.email === from.email);
if (!sender) return false;
const verb: { [key: string]: string } = {
DECLINED: localized('declined'),
ACCEPTED: localized('accepted'),
TENTATIVE: localized('tentatively accepted'),
DELEGATED: localized('delegated'),
COMPLETED: localized('completed'),
}[sender.status];
return (
<div className="event-actions">{localized(`%1$@ has %2$@ this event`, from.email, verb)}</div>
);
}
_renderRSVP() {
const { icsEvent, inflight } = this.state;
const me = CalendarUtils.selfParticipant(icsEvent, this.props.message.accountId);
if (!me) return false;
let status = me.status;
const icsTimeProperty = icsEvent.component.getFirstPropertyValue('dtstamp');
const icsTime = icsTimeProperty ? icsTimeProperty.toJSDate() : new Date(0);
const metadata = this.props.message.metadataForPluginId('event-rsvp');
if (metadata && new Date(metadata.time) > icsTime) {
status = metadata.status;
}
const actions: [ICSParticipantStatus, string][] = [
['ACCEPTED', localized('Accept')],
['TENTATIVE', localized('Maybe')],
['DECLINED', localized('Decline')],
];
return (
<div className="event-actions">
{actions.map(([actionStatus, actionLabel]) => (
<div
key={actionStatus}
className={`btn btn-large btn-rsvp ${status === actionStatus ? actionStatus : ''}`}
onClick={() => this._onRSVP(actionStatus)}
>
{actionStatus === status || actionStatus !== inflight ? (
actionLabel
) : (
<RetinaImg
width={18}
name="sending-spinner.gif"
mode={RetinaImg.Mode.ContentPreserve}
/>
)}
</div>
))}
</div>
);
}
_onRSVP = (status: ICSParticipantStatus) => {
const { icsEvent, icsOriginalData, inflight } = this.state;
if (inflight) return; // prevent double clicks
const organizerEmail = CalendarUtils.emailFromParticipantURI(icsEvent.organizer);
if (!organizerEmail) {
AppEnv.showErrorDialog(
localized(
"Sorry, this event does not have an organizer or the organizer's address is not a valid email address: {}",
icsEvent.organizer
)
);
}
this.setState({ inflight: status });
Actions.queueTask(
EventRSVPTask.forReplying({
accountId: this.props.message.accountId,
messageId: this.props.message.id,
icsOriginalData,
icsRSVPStatus: status,
to: organizerEmail,
})
);
};
}
export default EventHeader;
``` | /content/code_sandbox/app/internal_packages/events/lib/event-header.tsx | xml | 2016-10-13T06:45:50 | 2024-08-16T18:14:37 | Mailspring | Foundry376/Mailspring | 15,331 | 1,927 |
```xml
import type { Introspection, PgEntity, PgRoles } from "./introspection.js";
/**
* A fake 'pg_roles' record representing the 'public' meta-role.
*/
export const PUBLIC_ROLE: PgRoles = Object.freeze({
rolname: "public",
rolsuper: false,
rolinherit: false,
rolcreaterole: false,
rolcreatedb: false,
rolcanlogin: false,
rolreplication: false,
rolconnlimit: null,
rolpassword: null,
rolbypassrls: false,
rolconfig: null,
rolvaliduntil: null,
_id: "0",
});
/**
* Gets a role given an OID; throws an error if the role is not found.
*/
function getRole(introspection: Introspection, oid: string): PgRoles {
if (oid === "0") {
return PUBLIC_ROLE;
}
const role = introspection.roles.find((r) => r._id === oid);
if (!role) {
throw new Error(`Could not find role with identifier '${oid}'`);
}
return role;
}
/**
* Gets a role given its name; throws an error if the role is not found.
*/
function getRoleByName(introspection: Introspection, name: string): PgRoles {
if (name === "public") {
return PUBLIC_ROLE;
}
const role = introspection.roles.find((r) => r.rolname === name);
if (!role) {
throw new Error(`Could not find role with name '${name}'`);
}
return role;
}
/**
* Represents a single ACL entry in an ACL string, such as
* `foo=arwdDxt/bar`
*/
export interface AclObject {
/** Who are these permissions granted to? */
role: string;
/** Who granted these permissions? */
granter: string;
/** r */
select?: boolean;
/** r* */
selectGrant?: boolean;
/** w */
update?: boolean;
/** w* */
updateGrant?: boolean;
/** a */
insert?: boolean;
/** a* */
insertGrant?: boolean;
/** d */
delete?: boolean;
/** d* */
deleteGrant?: boolean;
/** D */
truncate?: boolean;
/** D* */
truncateGrant?: boolean;
/** x */
references?: boolean;
/** x* */
referencesGrant?: boolean;
/** t */
trigger?: boolean;
/** t* */
triggerGrant?: boolean;
/** X */
execute?: boolean;
/** X* */
executeGrant?: boolean;
/** U */
usage?: boolean;
/** U* */
usageGrant?: boolean;
/** C */
create?: boolean;
/** C* */
createGrant?: boolean;
/** c */
connect?: boolean;
/** c* */
connectGrant?: boolean;
/** T */
temporary?: boolean;
/** T* */
temporaryGrant?: boolean;
}
export type ResolvedPermissions = Omit<AclObject, "role" | "granter">;
/**
* Parses a role identifier from an ACL string.
*
* 'foo' becomes 'foo'
* '"foo""mcbrew"' becomes 'foo"mcbrew'
*/
const parseIdentifier = (str: string): string =>
str.startsWith('"') ? str.replace(/"("?)/g, "$1") : str;
/**
* Accepts an ACL string such as `foo=arwdDxt/bar` and converts it into
* a parsed AclObject.
*/
export function parseAcl(aclString: string): AclObject {
// path_to_url#PRIVILEGE-ABBREVS-TABLE
const matches = aclString.match(/^([^=]*)=([rwadDxtXUCcT*]*)\/([^=]+)$/);
if (!matches) {
throw new Error(`Could not parse ACL string '${aclString}'`);
}
const [, rawRole, permissions, rawGranter] = matches;
const role = parseIdentifier(rawRole);
const granter = parseIdentifier(rawGranter);
const select = permissions.includes("r");
const selectGrant = permissions.includes("r*");
const update = permissions.includes("w");
const updateGrant = permissions.includes("w*");
const insert = permissions.includes("a");
const insertGrant = permissions.includes("a*");
const del = permissions.includes("d");
const deleteGrant = permissions.includes("d*");
const truncate = permissions.includes("D");
const truncateGrant = permissions.includes("D*");
const references = permissions.includes("x");
const referencesGrant = permissions.includes("x*");
const trigger = permissions.includes("t");
const triggerGrant = permissions.includes("t*");
const execute = permissions.includes("X");
const executeGrant = permissions.includes("X*");
const usage = permissions.includes("U");
const usageGrant = permissions.includes("U*");
const create = permissions.includes("C");
const createGrant = permissions.includes("C*");
const connect = permissions.includes("c");
const connectGrant = permissions.includes("c*");
const temporary = permissions.includes("T");
const temporaryGrant = permissions.includes("T*");
const acl = {
role: role || "public",
granter,
select,
selectGrant,
update,
updateGrant,
insert,
insertGrant,
delete: del,
deleteGrant,
truncate,
truncateGrant,
references,
referencesGrant,
trigger,
triggerGrant,
execute,
executeGrant,
usage,
usageGrant,
create,
createGrant,
connect,
connectGrant,
temporary,
temporaryGrant,
};
return acl;
}
/**
* Takes an `AclObject` and converts it back into a Postgres ACL string such as
* `foo=arwdDxt/bar`
*/
export function serializeAcl(acl: AclObject) {
let permissions = (acl.role === "public" ? "" : acl.role) + "=";
if (acl.selectGrant) permissions += "r*";
else if (acl.select) permissions += "r";
if (acl.updateGrant) permissions += "w*";
else if (acl.update) permissions += "w";
if (acl.insertGrant) permissions += "a*";
else if (acl.insert) permissions += "a";
if (acl.deleteGrant) permissions += "d*";
else if (acl.delete) permissions += "d";
if (acl.truncateGrant) permissions += "D*";
else if (acl.truncate) permissions += "D";
if (acl.referencesGrant) permissions += "x*";
else if (acl.references) permissions += "x";
if (acl.triggerGrant) permissions += "t*";
else if (acl.trigger) permissions += "t";
if (acl.executeGrant) permissions += "X*";
else if (acl.execute) permissions += "X";
if (acl.usageGrant) permissions += "U*";
else if (acl.usage) permissions += "U";
if (acl.createGrant) permissions += "C*";
else if (acl.create) permissions += "C";
if (acl.connectGrant) permissions += "c*";
else if (acl.connect) permissions += "c";
if (acl.temporaryGrant) permissions += "T*";
else if (acl.temporary) permissions += "T";
permissions += `/${acl.granter}`;
return permissions;
}
export const emptyAclObject = parseAcl("=/postgres");
export const OBJECT_COLUMN = "OBJECT_COLUMN";
export const OBJECT_TABLE = "OBJECT_TABLE";
export const OBJECT_SEQUENCE = "OBJECT_SEQUENCE";
export const OBJECT_DATABASE = "OBJECT_DATABASE";
export const OBJECT_FUNCTION = "OBJECT_FUNCTION";
export const OBJECT_LANGUAGE = "OBJECT_LANGUAGE";
export const OBJECT_LARGEOBJECT = "OBJECT_LARGEOBJECT";
export const OBJECT_SCHEMA = "OBJECT_SCHEMA";
export const OBJECT_TABLESPACE = "OBJECT_TABLESPACE";
export const OBJECT_FDW = "OBJECT_FDW";
export const OBJECT_FOREIGN_SERVER = "OBJECT_FOREIGN_SERVER";
export const OBJECT_DOMAIN = "OBJECT_DOMAIN";
export const OBJECT_TYPE = "OBJECT_TYPE";
// path_to_url#L2094-L2148
export type AclDefaultObjectType =
| typeof OBJECT_COLUMN
| typeof OBJECT_TABLE
| typeof OBJECT_SEQUENCE
| typeof OBJECT_DATABASE
| typeof OBJECT_FUNCTION
| typeof OBJECT_LANGUAGE
| typeof OBJECT_LARGEOBJECT
| typeof OBJECT_SCHEMA
| typeof OBJECT_TABLESPACE
| typeof OBJECT_FDW
| typeof OBJECT_FOREIGN_SERVER
| typeof OBJECT_DOMAIN
| typeof OBJECT_TYPE;
// path_to_url#L76-L89
// path_to_url#PRIVILEGE-ABBREVS-TABLE
const ACL_SELECT = "r";
const ACL_INSERT = "a";
const ACL_UPDATE = "w";
const ACL_DELETE = "d";
const ACL_TRUNCATE = "D";
const ACL_REFERENCES = "x";
const ACL_TRIGGER = "t";
const ACL_CREATE = "C";
const ACL_CONNECT = "c";
const ACL_CREATE_TEMP = "T";
const ACL_EXECUTE = "X";
const ACL_USAGE = "U";
// const ACL_SET = "s";
// const ACL_ALTER_SYSTEM = "A";
/** @see {@link path_to_url#L91} */
const ACL_NO_RIGHTS = "";
/** @see {@link path_to_url#L159} */
const ACL_ALL_RIGHTS_RELATION =
ACL_INSERT +
ACL_SELECT +
ACL_UPDATE +
ACL_DELETE +
ACL_TRUNCATE +
ACL_REFERENCES +
ACL_TRIGGER;
const ACL_ALL_RIGHTS_SEQUENCE = ACL_USAGE + ACL_SELECT + ACL_UPDATE;
const ACL_ALL_RIGHTS_DATABASE = ACL_CREATE + ACL_CREATE_TEMP + ACL_CONNECT;
const ACL_ALL_RIGHTS_FDW = ACL_USAGE;
const ACL_ALL_RIGHTS_FOREIGN_SERVER = ACL_USAGE;
const ACL_ALL_RIGHTS_FUNCTION = ACL_EXECUTE;
const ACL_ALL_RIGHTS_LANGUAGE = ACL_USAGE;
const ACL_ALL_RIGHTS_LARGEOBJECT = ACL_SELECT + ACL_UPDATE;
const ACL_ALL_RIGHTS_SCHEMA = ACL_USAGE + ACL_CREATE;
const ACL_ALL_RIGHTS_TABLESPACE = ACL_CREATE;
const ACL_ALL_RIGHTS_TYPE = ACL_USAGE;
/**
* Returns a list of AclObject by parsing the given input ACL strings. If no
* ACL strings are present then it will return the default (implied) ACL for
* the given `type` of entity owned by `ownerId`.
*
* See:
*
* path_to_url#L748-L854
*
* and:
*
* path_to_url#L153-L167
*/
export function parseAcls(
introspection: Introspection,
inAcls: readonly string[] | null,
ownerId: string,
objtype: AclDefaultObjectType,
): AclObject[] {
const aclStrings: readonly string[] =
inAcls ||
(() => {
const owner = getRole(introspection, ownerId);
let worldDefault: string;
let ownerDefault: string;
switch (objtype) {
case OBJECT_COLUMN:
worldDefault = ACL_NO_RIGHTS;
ownerDefault = ACL_NO_RIGHTS;
break;
case OBJECT_TABLE:
worldDefault = ACL_NO_RIGHTS;
ownerDefault = ACL_ALL_RIGHTS_RELATION;
break;
case OBJECT_SEQUENCE:
worldDefault = ACL_NO_RIGHTS;
ownerDefault = ACL_ALL_RIGHTS_SEQUENCE;
break;
case OBJECT_DATABASE:
worldDefault = ACL_CREATE_TEMP + ACL_CONNECT;
ownerDefault = ACL_ALL_RIGHTS_DATABASE;
break;
case OBJECT_FUNCTION:
worldDefault = ACL_EXECUTE;
ownerDefault = ACL_ALL_RIGHTS_FUNCTION;
break;
case OBJECT_LANGUAGE:
worldDefault = ACL_USAGE;
ownerDefault = ACL_ALL_RIGHTS_LANGUAGE;
break;
case OBJECT_LARGEOBJECT:
worldDefault = ACL_NO_RIGHTS;
ownerDefault = ACL_ALL_RIGHTS_LARGEOBJECT;
break;
case OBJECT_SCHEMA:
worldDefault = ACL_NO_RIGHTS;
ownerDefault = ACL_ALL_RIGHTS_SCHEMA;
break;
case OBJECT_TABLESPACE:
worldDefault = ACL_NO_RIGHTS;
ownerDefault = ACL_ALL_RIGHTS_TABLESPACE;
break;
case OBJECT_FDW:
worldDefault = ACL_NO_RIGHTS;
ownerDefault = ACL_ALL_RIGHTS_FDW;
break;
case OBJECT_FOREIGN_SERVER:
worldDefault = ACL_NO_RIGHTS;
ownerDefault = ACL_ALL_RIGHTS_FOREIGN_SERVER;
break;
case OBJECT_DOMAIN:
case OBJECT_TYPE:
worldDefault = ACL_USAGE;
ownerDefault = ACL_ALL_RIGHTS_TYPE;
break;
default:
worldDefault = ACL_NO_RIGHTS;
ownerDefault = ACL_NO_RIGHTS;
break;
}
const acl: string[] = [];
if (worldDefault !== ACL_NO_RIGHTS) {
acl.push(`=${worldDefault}/${owner.rolname}`);
}
if (ownerDefault !== ACL_NO_RIGHTS) {
acl.push(`${owner.rolname}=${ownerDefault}/${owner.rolname}`);
}
return acl;
})();
const acls = aclStrings.map((aclString) => parseAcl(aclString));
return acls;
}
// Forewarning: I hate TypeScript enums. Your PR to convert this to a
// TypeScript enum will be rejected.
export const Permission = {
select: "select",
selectGrant: "selectGrant",
update: "update",
updateGrant: "updateGrant",
insert: "insert",
insertGrant: "insertGrant",
delete: "delete",
deleteGrant: "deleteGrant",
truncate: "truncate",
truncateGrant: "truncateGrant",
references: "references",
referencesGrant: "referencesGrant",
trigger: "trigger",
triggerGrant: "triggerGrant",
execute: "execute",
executeGrant: "executeGrant",
usage: "usage",
usageGrant: "usageGrant",
create: "create",
createGrant: "createGrant",
connect: "connect",
connectGrant: "connectGrant",
temporary: "temporary",
temporaryGrant: "temporaryGrant",
} as const;
/**
* Returns all the roles role has been granted (including PUBLIC),
* respecting `NOINHERIT`
*/
export function expandRoles(
introspection: Introspection,
roles: PgRoles[],
includeNoInherit = false,
): PgRoles[] {
const allRoles = [PUBLIC_ROLE];
const addRole = (member: PgRoles) => {
if (!allRoles.includes(member)) {
allRoles.push(member);
if (includeNoInherit || member.rolinherit !== false) {
introspection.auth_members.forEach((am) => {
// auth_members - role `am.member` gains the privileges of
// `am.roleid`
if (am.member === member._id) {
const rol = getRole(introspection, am.roleid);
addRole(rol);
}
});
}
}
};
roles.forEach(addRole);
return allRoles;
}
/**
* Returns true if ACL was applied to this role, or a role that this role
* inherits from (including public).
*
* i.e. does this ACL grant privileges to this role (directly or indirectly)?
*
* In Venn diagram terms, it asks if the 'role' is contained within (or equal to)
* the acl.role.
*/
export function aclContainsRole(
introspection: Introspection,
acl: AclObject,
role: PgRoles,
includeNoInherit = false,
): boolean {
const aclRole = getRoleByName(introspection, acl.role);
const expandedRoles = expandRoles(introspection, [role], includeNoInherit);
return expandedRoles.includes(aclRole);
}
/**
* Filters the ACL objects to only those that apply to `role`, then calculates
* the `OR` of all the permissions to see what permissions the role has.
*/
export function resolvePermissions(
introspection: Introspection,
acls: AclObject[],
role: PgRoles,
includeNoInherit = false,
isOwnerAndHasNoExplicitACLs = false,
): ResolvedPermissions {
const expandedRoles = expandRoles(introspection, [role], includeNoInherit);
const isSuperuser = expandedRoles.some((role) => role.rolsuper);
// Superusers have all permissions. An owner of an object has all permissions
// _unless_ there's a specific ACL for that owner. In all other cases, just as
// in life, you start with nothing...
const grantAll = isSuperuser || isOwnerAndHasNoExplicitACLs;
const permissions: ResolvedPermissions = {
select: grantAll,
selectGrant: grantAll,
update: grantAll,
updateGrant: grantAll,
insert: grantAll,
insertGrant: grantAll,
delete: grantAll,
deleteGrant: grantAll,
truncate: grantAll,
truncateGrant: grantAll,
references: grantAll,
referencesGrant: grantAll,
trigger: grantAll,
triggerGrant: grantAll,
execute: grantAll,
executeGrant: grantAll,
usage: grantAll,
usageGrant: grantAll,
create: grantAll,
createGrant: grantAll,
connect: grantAll,
connectGrant: grantAll,
temporary: grantAll,
temporaryGrant: grantAll,
};
if (grantAll) {
return permissions;
}
for (const acl of acls) {
const appliesToRole = aclContainsRole(
introspection,
acl,
role,
includeNoInherit,
);
if (appliesToRole) {
permissions.select = permissions.select || acl.select;
permissions.selectGrant = permissions.selectGrant || acl.selectGrant;
permissions.update = permissions.update || acl.update;
permissions.updateGrant = permissions.updateGrant || acl.updateGrant;
permissions.insert = permissions.insert || acl.insert;
permissions.insertGrant = permissions.insertGrant || acl.insertGrant;
permissions.delete = permissions.delete || acl.delete;
permissions.deleteGrant = permissions.deleteGrant || acl.deleteGrant;
permissions.truncate = permissions.truncate || acl.truncate;
permissions.truncateGrant =
permissions.truncateGrant || acl.truncateGrant;
permissions.references = permissions.references || acl.references;
permissions.referencesGrant =
permissions.referencesGrant || acl.referencesGrant;
permissions.trigger = permissions.trigger || acl.trigger;
permissions.triggerGrant = permissions.triggerGrant || acl.triggerGrant;
permissions.execute = permissions.execute || acl.execute;
permissions.executeGrant = permissions.executeGrant || acl.executeGrant;
permissions.usage = permissions.usage || acl.usage;
permissions.usageGrant = permissions.usageGrant || acl.usageGrant;
permissions.create = permissions.create || acl.create;
permissions.createGrant = permissions.createGrant || acl.createGrant;
permissions.connect = permissions.connect || acl.connect;
permissions.connectGrant = permissions.connectGrant || acl.connectGrant;
permissions.temporary = permissions.temporary || acl.temporary;
permissions.temporaryGrant =
permissions.temporaryGrant || acl.temporaryGrant;
}
}
return permissions;
}
export function entityPermissions(
introspection: Introspection,
entity: Extract<PgEntity, { getACL(): readonly AclObject[] }>,
role: PgRoles,
includeNoInherit = false,
) {
const acls = entity.getACL();
const owner =
entity._type === "PgAttribute"
? entity.getClass()?.getOwner()
: entity.getOwner();
// If the role is the owner, and no explicit ACLs have been granted to this role, then the owner has all privileges.
const isOwnerAndHasNoExplicitACLs =
owner &&
owner === role &&
!acls.some((acl) => acl.role === owner.rolname) &&
(entity._type !== "PgAttribute" ||
!entity
.getClass()
?.getACL()
.some((acl) => acl.role === owner.rolname));
return resolvePermissions(
introspection,
acls,
role,
includeNoInherit,
isOwnerAndHasNoExplicitACLs,
);
}
``` | /content/code_sandbox/utils/pg-introspection/src/acl.ts | xml | 2016-04-14T21:29:19 | 2024-08-16T17:12:51 | crystal | graphile/crystal | 12,539 | 4,333 |
```xml
import * as HttpsProxyAgent from 'https-proxy-agent'
import * as HttpProxyAgent from 'http-proxy-agent'
import * as Url from 'url'
import { Agent as HttpsAgent } from 'https'
import { Agent as HttpAgent } from 'http'
'use strict'
// code from path_to_url
function formatHostname(hostname) {
// canonicalize the hostname, so that 'oogle.com' won't match 'google.com'
return hostname.replace(/^\.*/, '.').toLowerCase()
}
function parseNoProxyZone(zone) {
zone = zone.trim().toLowerCase()
var zoneParts = zone.split(':', 2)
var zoneHost = formatHostname(zoneParts[0])
var zonePort = zoneParts[1]
var hasPort = zone.indexOf(':') > -1
return { hostname: zoneHost, port: zonePort, hasPort: hasPort }
}
function uriInNoProxy(uri, noProxy) {
var port = uri.port || (uri.protocol === 'https:' ? '443' : '80')
var hostname = formatHostname(uri.hostname)
var noProxyList = noProxy.split(',')
// iterate through the noProxyList until it finds a match.
return noProxyList.map(parseNoProxyZone).some(function(noProxyZone) {
var isMatchedAt = hostname.indexOf(noProxyZone.hostname)
var hostnameMatched =
isMatchedAt > -1 &&
isMatchedAt === hostname.length - noProxyZone.hostname.length
if (noProxyZone.hasPort) {
return port === noProxyZone.port && hostnameMatched
}
return hostnameMatched
})
}
function getProxyFromURI(uri) {
// Decide the proper request proxy to use based on the request URI object and the
// environmental variables (NO_PROXY, HTTP_PROXY, etc.)
// respect NO_PROXY environment variables (see: path_to_url
var noProxy = process.env.NO_PROXY || process.env.no_proxy || ''
// if the noProxy is a wildcard then return null
if (noProxy === '*') {
return null
}
// if the noProxy is not empty and the uri is found return null
if (noProxy !== '' && uriInNoProxy(uri, noProxy)) {
return null
}
// Check for HTTP or HTTPS Proxy in environment Else default to null
if (uri.protocol === 'http:') {
return process.env.HTTP_PROXY || process.env.http_proxy || null
}
if (uri.protocol === 'https:') {
return (
process.env.HTTPS_PROXY ||
process.env.https_proxy ||
process.env.HTTP_PROXY ||
process.env.http_proxy ||
null
)
}
// if none of that works, return null
// (What uri protocol are you using then?)
return null
}
export function getProxyAgent(url: string): HttpAgent | HttpsAgent | undefined {
const uri = Url.parse(url)
const proxy = getProxyFromURI(uri)
if (!proxy) {
return undefined
}
const proxyUri = Url.parse(proxy)
if (proxyUri.protocol === 'http:') {
return new HttpProxyAgent(proxy) as HttpAgent
}
if (proxyUri.protocol === 'https:') {
return new HttpsProxyAgent(proxy) as HttpsAgent
}
return undefined
}
``` | /content/code_sandbox/cli/packages/prisma-yml/src/utils/getProxyAgent.ts | xml | 2016-09-25T12:54:40 | 2024-08-16T11:41:23 | prisma1 | prisma/prisma1 | 16,549 | 716 |
```xml
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { CalendarModule, DateAdapter } from 'angular-calendar';
import { adapterFactory } from 'angular-calendar/date-adapters/date-fns';
import { DemoComponent } from './component';
import { DemoUtilsModule } from '../demo-utils/module';
@NgModule({
imports: [
CommonModule,
CalendarModule.forRoot({
provide: DateAdapter,
useFactory: adapterFactory,
}),
DemoUtilsModule,
RouterModule.forChild([{ path: '', component: DemoComponent }]),
],
declarations: [DemoComponent],
exports: [DemoComponent],
})
export class DemoModule {}
``` | /content/code_sandbox/projects/demos/app/demo-modules/drag-to-create-events/module.ts | xml | 2016-04-26T15:19:33 | 2024-08-08T14:23:40 | angular-calendar | mattlewis92/angular-calendar | 2,717 | 147 |
```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>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>MinimumOSVersion</key>
<string>8.0</string>
<key>CFBundleDisplayName</key>
<string>MobileApp</string>
<key>CFBundleIdentifier</key>
<string>com.companyname.MobileApp</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>CFBundleName</key>
<string>MobileApp</string>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/AppIcon.appiconset</string>
</dict>
</plist>
``` | /content/code_sandbox/Samples/MobileApp/MobileApp.iOS/Info.plist | xml | 2016-06-22T14:26:52 | 2024-08-16T04:07:33 | X | NewLifeX/X | 1,746 | 361 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~
~ 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.
-->
<e2e-test-cases>
<test-case sql="GRANT select, update, insert, delete on t_order to default_user" db-types="Oracle,SQLServer" />
<test-case sql="GRANT select, update, insert, delete on t_order to default_user with GRANT option" db-types="Oracle,SQLServer" />
<test-case sql="GRANT role2 to role3" db-types="Oracle,PostgreSQL,SQLServer" />
<test-case sql="GRANT ADVISOR, ALTER DATABASE to user_dev with admin option" db-types="Oracle" />
<test-case sql="GRANT ALL ON sharding_db.* TO 'user_dev'@'localhost'" db-types="MySQL" />
<test-case sql="GRANT ALL ON t_order TO 'user_dev'@'localhost'" db-types="MySQL" />
<test-case sql="GRANT ALL ON sharding_db.t_order TO 'user_dev'@'localhost'" db-types="MySQL" />
<test-case sql="GRANT select, update ON t_order TO 'user_dev'@'localhost'" db-types="MySQL" />
</e2e-test-cases>
``` | /content/code_sandbox/test/e2e/sql/src/test/resources/cases/dcl/e2e-dcl-grant.xml | xml | 2016-01-18T12:49:26 | 2024-08-16T15:48:11 | shardingsphere | apache/shardingsphere | 19,707 | 336 |
```xml
export * as components from './components'
``` | /content/code_sandbox/packages/vuetify/src/labs/index.ts | xml | 2016-09-12T00:39:35 | 2024-08-16T20:06:39 | vuetify | vuetifyjs/vuetify | 39,539 | 9 |
```xml
/*
This file is free software: you can redistribute it and/or modify
(at your option) any later version.
This file 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
along with the this software. If not, see <path_to_url
*/
#import "cocoa_core.h"
#import "cocoa_input.h"
#import "cocoa_firmware.h"
#import "cocoa_GPU.h"
#import "cocoa_cheat.h"
#import "cocoa_globals.h"
#import "cocoa_output.h"
#import "cocoa_rom.h"
#import "cocoa_util.h"
#include "macOS_driver.h"
#include "ClientAVCaptureObject.h"
#include "ClientExecutionControl.h"
#include "ClientInputHandler.h"
#include "../../movie.h"
#include "../../NDSSystem.h"
#include "../../slot1.h"
#include "../../slot2.h"
#include "../../SPU.h"
#include "../../wifi.h"
#undef BOOL
//accessed from other files
volatile bool execute = true;
@implementation CocoaDSCore
@synthesize execControl;
@synthesize cdsFirmware;
@synthesize cdsController;
@synthesize cdsGPU;
@synthesize cdsCheatManager;
@synthesize cdsOutputList;
@dynamic masterExecute;
@dynamic isFrameSkipEnabled;
@dynamic framesToSkipSetting;
@dynamic coreState;
@dynamic emulationPaused;
@dynamic isSpeedLimitEnabled;
@dynamic isCheatingEnabled;
@dynamic speedScalar;
@dynamic frameJumpBehavior;
@dynamic frameJumpNumberFramesForward;
@dynamic frameJumpToFrameIndex;
@dynamic enableGdbStubARM9;
@dynamic enableGdbStubARM7;
@dynamic gdbStubPortARM9;
@dynamic gdbStubPortARM7;
@dynamic isGdbStubStarted;
@dynamic isInDebugTrap;
@dynamic emuFlagAdvancedBusLevelTiming;
@dynamic emuFlagRigorousTiming;
@dynamic emuFlagUseGameSpecificHacks;
@dynamic emuFlagUseExternalBios;
@dynamic emuFlagEmulateBiosInterrupts;
@dynamic emuFlagPatchDelayLoop;
@dynamic emuFlagUseExternalFirmware;
@dynamic emuFlagFirmwareBoot;
@dynamic emuFlagDebugConsole;
@dynamic emuFlagEmulateEnsata;
@dynamic cpuEmulationEngine;
@dynamic maxJITBlockSize;
@dynamic slot1DeviceType;
@synthesize slot1StatusText;
@synthesize frameStatus;
@synthesize executionSpeedStatus;
@synthesize errorStatus;
@synthesize extFirmwareMACAddressString;
@synthesize firmwareMACAddressSelectionString;
@synthesize currentSessionMACAddressString;
@dynamic arm9ImageURL;
@dynamic arm7ImageURL;
@dynamic firmwareImageURL;
@dynamic slot1R4URL;
@dynamic rwlockCoreExecute;
- (id)init
{
self = [super init];
if(self == nil)
{
return self;
}
int initResult = NDS_Init();
if (initResult == -1)
{
[self release];
self = nil;
return self;
}
execControl = new ClientExecutionControl;
_fpsTimer = nil;
_isTimerAtSecond = NO;
cdsFirmware = nil;
cdsController = [[CocoaDSController alloc] init];
cdsGPU = [[CocoaDSGPU alloc] init];
cdsCheatManager = [[CocoaDSCheatManager alloc] init];
cdsOutputList = [[NSMutableArray alloc] initWithCapacity:32];
ClientInputHandler *inputHandler = [cdsController inputHandler];
inputHandler->SetClientExecutionController(execControl);
execControl->SetClientInputHandler(inputHandler);
execControl->SetWifiEmulationMode(WifiEmulationLevel_Off);
_unfairlockMasterExecute = apple_unfairlock_create();
threadParam.cdsCore = self;
pthread_rwlock_init(&threadParam.rwlockOutputList, NULL);
pthread_mutex_init(&threadParam.mutexThreadExecute, NULL);
pthread_cond_init(&threadParam.condThreadExecute, NULL);
pthread_rwlock_init(&threadParam.rwlockCoreExecute, NULL);
// The core emulation thread needs max priority since it is the sole
// producer thread for all output threads. Note that this is not being
// done for performance -- this is being done for timing accuracy. The
// core emulation thread is responsible for determining the emulator's
// timing. If one output thread interferes with timing, then it ends up
// affecting the whole emulator.
//
// Though it may be tempting to make this a real-time thread, it's best
// to keep this a normal thread. The core emulation thread can use up a
// lot of CPU time under certain conditions, which may interfere with
// other threads. (Example: Video tearing on display windows, even with
// V-sync enabled.)
pthread_attr_t threadAttr;
pthread_attr_init(&threadAttr);
pthread_attr_setschedpolicy(&threadAttr, SCHED_RR);
struct sched_param sp;
memset(&sp, 0, sizeof(struct sched_param));
sp.sched_priority = 42;
pthread_attr_setschedparam(&threadAttr, &sp);
pthread_create(&coreThread, &threadAttr, &RunCoreThread, &threadParam);
pthread_attr_destroy(&threadAttr);
[cdsGPU setOutputList:cdsOutputList rwlock:&threadParam.rwlockOutputList];
[cdsCheatManager setRwlockCoreExecute:&threadParam.rwlockCoreExecute];
macOS_driver *newDriver = new macOS_driver;
newDriver->SetCoreThreadMutexLock(&threadParam.mutexThreadExecute);
newDriver->SetCoreExecuteRWLock(&threadParam.rwlockCoreExecute);
newDriver->SetExecutionControl(execControl);
driver = newDriver;
frameStatus = @"---";
executionSpeedStatus = @"1.00x";
errorStatus = @"";
slot1StatusText = NSSTRING_STATUS_EMULATION_NOT_RUNNING;
extFirmwareMACAddressString = @"Invalid MAC!";
firmwareMACAddressSelectionString = @"Firmware 00:09:BF:FF:FF:FF";
currentSessionMACAddressString = NSSTRING_STATUS_NO_ROM_LOADED;
return self;
}
- (void)dealloc
{
[self setCoreState:ExecutionBehavior_Pause];
[self removeAllOutputs];
((MacGPUFetchObjectAsync *)[cdsGPU fetchObject])->SemaphoreFramebufferDestroy();
[self setCdsFirmware:nil];
[cdsController release];
cdsController = nil;
[cdsGPU release];
cdsGPU = nil;
[cdsOutputList release];
cdsOutputList = nil;
[self setErrorStatus:nil];
[self setExtFirmwareMACAddressString:nil];
[self setFirmwareMACAddressSelectionString:nil];
[self setCurrentSessionMACAddressString:nil];
apple_unfairlock_destroy(_unfairlockMasterExecute);
pthread_cancel(coreThread);
pthread_join(coreThread, NULL);
coreThread = NULL;
pthread_mutex_destroy(&threadParam.mutexThreadExecute);
pthread_cond_destroy(&threadParam.condThreadExecute);
pthread_rwlock_destroy(&threadParam.rwlockOutputList);
pthread_rwlock_destroy(&threadParam.rwlockCoreExecute);
[self setIsGdbStubStarted:NO];
delete execControl;
NDS_DeInit();
[super dealloc];
}
- (void) setMasterExecute:(BOOL)theState
{
apple_unfairlock_lock(_unfairlockMasterExecute);
if (theState)
{
execute = true;
}
else
{
emu_halt(EMUHALT_REASON_UNKNOWN, NDSErrorTag_BothCPUs);
}
apple_unfairlock_unlock(_unfairlockMasterExecute);
}
- (BOOL) masterExecute
{
apple_unfairlock_lock(_unfairlockMasterExecute);
const BOOL theState = (execute) ? YES : NO;
apple_unfairlock_unlock(_unfairlockMasterExecute);
return theState;
}
- (void) setIsFrameSkipEnabled:(BOOL)enable
{
execControl->SetEnableFrameSkip((enable) ? true : false);
}
- (BOOL) isFrameSkipEnabled
{
const bool enable = execControl->GetEnableFrameSkip();
return (enable) ? YES : NO;
}
- (void) setFramesToSkipSetting:(NSInteger)framesToSkip
{
if (framesToSkip < 0)
{
framesToSkip = 0; // Actual frame skip values can't be negative.
}
else if (framesToSkip > MAX_FIXED_FRAMESKIP_VALUE)
{
framesToSkip = MAX_FIXED_FRAMESKIP_VALUE;
}
execControl->SetFramesToSkipSetting((uint8_t)framesToSkip);
}
- (NSInteger) framesToSkipSetting
{
return (NSInteger)execControl->GetFramesToSkipSetting();
}
- (void) setSpeedScalar:(CGFloat)scalar
{
execControl->SetExecutionSpeed((float)scalar);
[self updateExecutionSpeedStatus];
}
- (CGFloat) speedScalar
{
const CGFloat scalar = (CGFloat)execControl->GetExecutionSpeed();
return scalar;
}
- (void) setFrameJumpBehavior:(NSInteger)theBehavior
{
execControl->SetFrameJumpBehavior((FrameJumpBehavior)theBehavior);
}
- (NSInteger) frameJumpBehavior
{
const NSInteger theBehavior = (NSInteger)execControl->GetFrameJumpBehavior();
return theBehavior;
}
- (void) setFrameJumpNumberFramesForward:(NSUInteger)numberFrames
{
execControl->SetFrameJumpRelativeTarget((uint64_t)numberFrames);
[self setFrameJumpToFrameIndex:[self frameNumber] + numberFrames];
}
- (NSUInteger) frameJumpNumberFramesForward
{
const NSUInteger numberFrames = execControl->GetFrameJumpRelativeTarget();
return numberFrames;
}
- (void) setFrameJumpToFrameIndex:(NSUInteger)frameIndex
{
execControl->SetFrameJumpTarget((uint64_t)frameIndex);
}
- (NSUInteger) frameJumpToFrameIndex
{
const NSUInteger frameIndex = execControl->GetFrameJumpTarget();
return frameIndex;
}
- (void) setIsSpeedLimitEnabled:(BOOL)enable
{
execControl->SetEnableSpeedLimiter((enable) ? true : false);
[self updateExecutionSpeedStatus];
}
- (BOOL) isSpeedLimitEnabled
{
const bool enable = execControl->GetEnableSpeedLimiter();
return (enable) ? YES : NO;
}
- (void) setIsCheatingEnabled:(BOOL)enable
{
execControl->SetEnableCheats((enable) ? true : false);
}
- (BOOL) isCheatingEnabled
{
const bool enable = execControl->GetEnableCheats();
return (enable) ? YES : NO;
}
- (BOOL) enableGdbStubARM9
{
const bool enable = execControl->IsGDBStubARM9Enabled();
return (enable) ? YES : NO;
}
- (void) setEnableGdbStubARM9:(BOOL)enable
{
execControl->SetGDBStubARM9Enabled((enable) ? true : false);
}
- (BOOL) enableGdbStubARM7
{
const bool enable = execControl->IsGDBStubARM7Enabled();
return (enable) ? YES : NO;
}
- (void) setEnableGdbStubARM7:(BOOL)enable
{
execControl->SetGDBStubARM7Enabled((enable) ? true : false);
}
- (NSUInteger) gdbStubPortARM9
{
const uint16_t portNumber = execControl->GetGDBStubARM9Port();
return (NSUInteger)portNumber;
}
- (void) setGdbStubPortARM9:(NSUInteger)portNumber
{
execControl->SetGDBStubARM9Port((uint16_t)portNumber);
}
- (NSUInteger) gdbStubPortARM7
{
const uint16_t portNumber = execControl->GetGDBStubARM7Port();
return (NSUInteger)portNumber;
}
- (void) setGdbStubPortARM7:(NSUInteger)portNumber
{
execControl->SetGDBStubARM7Port((uint16_t)portNumber);
}
- (void) setIsGdbStubStarted:(BOOL)theState
{
execControl->SetIsGDBStubStarted((theState) ? true : false);
}
- (BOOL) isGdbStubStarted
{
const bool theState = execControl->IsGDBStubStarted();
return (theState) ? YES : NO;
}
- (BOOL) isInDebugTrap
{
const bool theState = execControl->IsInDebugTrap();
return (theState) ? YES : NO;
}
- (void) setEmuFlagAdvancedBusLevelTiming:(BOOL)enable
{
execControl->SetEnableAdvancedBusLevelTiming((enable) ? true : false);
}
- (BOOL) emuFlagAdvancedBusLevelTiming
{
const bool enable = execControl->GetEnableAdvancedBusLevelTiming();
return (enable) ? YES : NO;
}
- (void) setEmuFlagRigorousTiming:(BOOL)enable
{
execControl->SetEnableRigorous3DRenderingTiming((enable) ? true : false);
}
- (BOOL) emuFlagRigorousTiming
{
const bool enable = execControl->GetEnableRigorous3DRenderingTiming();
return (enable) ? YES : NO;
}
- (void) setEmuFlagUseGameSpecificHacks:(BOOL)enable
{
execControl->SetEnableGameSpecificHacks((enable) ? true : false);
}
- (BOOL) emuFlagUseGameSpecificHacks
{
const bool enable = execControl->GetEnableGameSpecificHacks();
return (enable) ? YES : NO;
}
- (void) setEmuFlagUseExternalBios:(BOOL)enable
{
execControl->SetEnableExternalBIOS((enable) ? true : false);
[self updateFirmwareMACAddressString];
}
- (BOOL) emuFlagUseExternalBios
{
const bool enable = execControl->GetEnableExternalBIOS();
return (enable) ? YES : NO;
}
- (void) setEmuFlagEmulateBiosInterrupts:(BOOL)enable
{
execControl->SetEnableBIOSInterrupts((enable) ? true : false);
}
- (BOOL) emuFlagEmulateBiosInterrupts
{
const bool enable = execControl->GetEnableBIOSInterrupts();
return (enable) ? YES : NO;
}
- (void) setEmuFlagPatchDelayLoop:(BOOL)enable
{
execControl->SetEnableBIOSPatchDelayLoop((enable) ? true : false);
}
- (BOOL) emuFlagPatchDelayLoop
{
const bool enable = execControl->GetEnableBIOSPatchDelayLoop();
return (enable) ? YES : NO;
}
- (void) setEmuFlagUseExternalFirmware:(BOOL)enable
{
execControl->SetEnableExternalFirmware((enable) ? true : false);
if (enable)
{
uint8_t MACAddr[6] = {0x00, 0x09, 0xBF, 0xFF, 0xFF, 0xFF};
const char *extFirmwareFileName = execControl->GetFirmwareImagePath();
bool isFirmwareFileRead = NDS_ReadFirmwareDataFromFile(extFirmwareFileName, NULL, NULL, NULL, MACAddr);
if (isFirmwareFileRead)
{
NSString *macAddressString = [NSString stringWithFormat:@"%02X:%02X:%02X:%02X:%02X:%02X", MACAddr[0], MACAddr[1], MACAddr[2], MACAddr[3], MACAddr[4], MACAddr[5]];
[self setExtFirmwareMACAddressString:macAddressString];
}
else
{
[self setExtFirmwareMACAddressString:@"Invalid MAC!"];
}
}
[self updateFirmwareMACAddressString];
}
- (BOOL) emuFlagUseExternalFirmware
{
const bool enable = execControl->GetEnableExternalFirmware();
return (enable) ? YES : NO;
}
- (void) setEmuFlagFirmwareBoot:(BOOL)enable
{
execControl->SetEnableFirmwareBoot((enable) ? true : false);
}
- (BOOL) emuFlagFirmwareBoot
{
const bool enable = execControl->GetEnableFirmwareBoot();
return (enable) ? YES : NO;
}
- (void) setEmuFlagDebugConsole:(BOOL)enable
{
execControl->SetEnableDebugConsole((enable) ? true : false);
}
- (BOOL) emuFlagDebugConsole
{
const bool enable = execControl->GetEnableDebugConsole();
return (enable) ? YES : NO;
}
- (void) setEmuFlagEmulateEnsata:(BOOL)enable
{
execControl->SetEnableEnsataEmulation((enable) ? true : false);
}
- (BOOL) emuFlagEmulateEnsata
{
const bool enable = execControl->GetEnableEnsataEmulation();
return (enable) ? YES : NO;
}
- (void) setCpuEmulationEngine:(NSInteger)engineID
{
execControl->SetCPUEmulationEngineByID((CPUEmulationEngineID)engineID);
}
- (NSInteger) cpuEmulationEngine
{
return (NSInteger)execControl->GetCPUEmulationEngineID();
}
- (void) setMaxJITBlockSize:(NSInteger)blockSize
{
execControl->SetJITMaxBlockSize((uint8_t)blockSize);
}
- (NSInteger) maxJITBlockSize
{
return (NSInteger)execControl->GetJITMaxBlockSize();
}
- (void) setSlot1DeviceType:(NSInteger)theType
{
execControl->SetSlot1DeviceByType((NDS_SLOT1_TYPE)theType);
}
- (NSInteger) slot1DeviceType
{
return (NSInteger)execControl->GetSlot1DeviceType();
}
- (void) setCoreState:(NSInteger)coreState
{
if (coreState == ExecutionBehavior_FrameJump)
{
uint64_t frameIndex = [self frameNumber];
switch ([self frameJumpBehavior])
{
case FrameJumpBehavior_Forward:
[self setFrameJumpToFrameIndex:[self frameJumpNumberFramesForward] + frameIndex];
break;
case FrameJumpBehavior_NextMarker:
// TODO: Support frame jumping to replay markers.
break;
case FrameJumpBehavior_ToFrame:
default:
break;
}
uint64_t jumpTarget = [self frameJumpToFrameIndex];
if (frameIndex >= jumpTarget)
{
return;
}
}
pthread_mutex_lock(&threadParam.mutexThreadExecute);
execControl->SetExecutionBehavior((ExecutionBehavior)coreState);
pthread_rwlock_rdlock(&threadParam.rwlockOutputList);
char frameStatusCStr[64] = {0};
switch ((ExecutionBehavior)coreState)
{
case ExecutionBehavior_Pause:
{
for (CocoaDSOutput *cdsOutput in cdsOutputList)
{
[cdsOutput setIdle:YES];
}
snprintf(frameStatusCStr, sizeof(frameStatusCStr), "%llu", (unsigned long long)[self frameNumber]);
[_fpsTimer invalidate];
_fpsTimer = nil;
break;
}
case ExecutionBehavior_FrameAdvance:
{
for (CocoaDSOutput *cdsOutput in cdsOutputList)
{
[cdsOutput setIdle:NO];
}
snprintf(frameStatusCStr, sizeof(frameStatusCStr), "%llu", (unsigned long long)[self frameNumber]);
[_fpsTimer invalidate];
_fpsTimer = nil;
break;
}
case ExecutionBehavior_Run:
{
for (CocoaDSOutput *cdsOutput in cdsOutputList)
{
[cdsOutput setIdle:NO];
}
snprintf(frameStatusCStr, sizeof(frameStatusCStr), "%s", "Executing...");
if (_fpsTimer == nil)
{
_isTimerAtSecond = NO;
_fpsTimer = [NSTimer timerWithTimeInterval:0.5
target:self
selector:@selector(getTimedEmulatorStatistics:)
userInfo:nil
repeats:YES];
[[NSRunLoop currentRunLoop] addTimer:_fpsTimer forMode:NSRunLoopCommonModes];
}
break;
}
case ExecutionBehavior_FrameJump:
{
for (CocoaDSOutput *cdsOutput in cdsOutputList)
{
if (![cdsOutput isKindOfClass:[CocoaDSDisplay class]])
{
[cdsOutput setIdle:YES];
}
}
snprintf(frameStatusCStr, sizeof(frameStatusCStr), "Jumping to frame %llu.", (unsigned long long)execControl->GetFrameJumpTarget());
[_fpsTimer invalidate];
_fpsTimer = nil;
break;
}
default:
break;
}
pthread_rwlock_unlock(&threadParam.rwlockOutputList);
pthread_cond_signal(&threadParam.condThreadExecute);
pthread_mutex_unlock(&threadParam.mutexThreadExecute);
[[self cdsController] setHardwareMicPause:(coreState != ExecutionBehavior_Run)];
// This method affects UI updates, but can also be called from a thread that is different from
// the main thread. When compiling against the macOS v10.13 SDK and earlier, UI updates were allowed
// when doing KVO changes on other threads. However, the macOS v10.14 SDK and later now require that
// any KVO changes that affect UI updates MUST be performed on the main thread. Therefore, we need
// to push the UI-related stuff to the main thread here.
NSAutoreleasePool *tempPool = [[NSAutoreleasePool alloc] init];
NSDictionary *userInfo = [[NSDictionary alloc] initWithObjectsAndKeys:
[NSNumber numberWithInteger:coreState], @"ExecutionState",
[NSString stringWithCString:frameStatusCStr encoding:NSUTF8StringEncoding], @"FrameStatusString",
nil];
[[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"org.desmume.DeSmuME.handleEmulatorExecutionState" object:self userInfo:userInfo];
[userInfo release];
[tempPool release];
}
- (NSInteger) coreState
{
const NSInteger behavior = (NSInteger)execControl->GetExecutionBehavior();
return behavior;
}
- (void) setEmulationPaused:(BOOL)theState
{
// Do nothing. This is for KVO-compliance only.
// This method (actually its corresponding getter method) is really intended for
// UI updates only. If you want to pause the emulator, call setCoreState: and pass
// to it a value of ExecutionBehavior_Pause.
}
- (BOOL) emulationPaused
{
return (execControl->GetExecutionBehavior() == ExecutionBehavior_Pause) ? YES : NO;
}
- (void) setArm9ImageURL:(NSURL *)fileURL
{
execControl->SetARM9ImagePath([CocoaDSUtil cPathFromFileURL:fileURL]);
}
- (NSURL *) arm9ImageURL
{
return [CocoaDSUtil fileURLFromCPath:execControl->GetARM9ImagePath()];
}
- (void) setArm7ImageURL:(NSURL *)fileURL
{
execControl->SetARM7ImagePath([CocoaDSUtil cPathFromFileURL:fileURL]);
}
- (NSURL *) arm7ImageURL
{
return [CocoaDSUtil fileURLFromCPath:execControl->GetARM7ImagePath()];
}
- (void) setFirmwareImageURL:(NSURL *)fileURL
{
execControl->SetFirmwareImagePath([CocoaDSUtil cPathFromFileURL:fileURL]);
}
- (NSURL *) firmwareImageURL
{
return [CocoaDSUtil fileURLFromCPath:execControl->GetFirmwareImagePath()];
}
- (void) setSlot1R4URL:(NSURL *)fileURL
{
execControl->SetSlot1R4Path([CocoaDSUtil cPathFromFileURL:fileURL]);
}
- (NSURL *) slot1R4URL
{
return [CocoaDSUtil fileURLFromCPath:execControl->GetSlot1R4Path()];
}
- (void) updateFirmwareMACAddressString
{
if ([self emuFlagUseExternalBios] && [self emuFlagUseExternalFirmware])
{
[self setFirmwareMACAddressSelectionString:[NSString stringWithFormat:@"Ext. Firmware %@", [self extFirmwareMACAddressString]]];
}
else
{
[self setFirmwareMACAddressSelectionString:[NSString stringWithFormat:@"Firmware %@", [[self cdsFirmware] firmwareMACAddressString]]];
}
}
- (void) updateCurrentSessionMACAddressString:(BOOL)isRomLoaded
{
if (isRomLoaded)
{
const uint8_t *MACAddress = execControl->GetCurrentSessionMACAddress();
NSString *MACAddressString = [NSString stringWithFormat:@"%02X:%02X:%02X:%02X:%02X:%02X",
MACAddress[0], MACAddress[1], MACAddress[2], MACAddress[3], MACAddress[4], MACAddress[5]];
[self setCurrentSessionMACAddressString:MACAddressString];
}
else
{
[self setCurrentSessionMACAddressString:NSSTRING_STATUS_NO_ROM_LOADED];
}
}
- (pthread_rwlock_t *) rwlockCoreExecute
{
return &threadParam.rwlockCoreExecute;
}
- (void) generateFirmwareMACAddress
{
[[self cdsFirmware] generateRandomFirmwareMACAddress];
[self updateFirmwareMACAddressString];
}
- (BOOL) isSlot1Ejected
{
const BOOL isEjected = (nds.cardEjected) ? YES : NO;
return isEjected;
}
- (void) slot1Eject
{
pthread_rwlock_wrlock(&threadParam.rwlockCoreExecute);
NDS_TriggerCardEjectIRQ();
pthread_rwlock_unlock(&threadParam.rwlockCoreExecute);
[self setSlot1StatusText:NSSTRING_STATUS_SLOT1_NO_DEVICE];
}
- (void) changeRomSaveType:(NSInteger)saveTypeID
{
pthread_rwlock_wrlock(&threadParam.rwlockCoreExecute);
[CocoaDSRom changeRomSaveType:saveTypeID];
pthread_rwlock_unlock(&threadParam.rwlockCoreExecute);
}
- (void) updateExecutionSpeedStatus
{
if ([self isSpeedLimitEnabled])
{
[self setExecutionSpeedStatus:[NSString stringWithFormat:@"%1.2fx", [self speedScalar]]];
}
else
{
[self setExecutionSpeedStatus:@"Unlimited"];
}
}
- (void) updateSlot1DeviceStatus
{
const NDS_SLOT1_TYPE deviceTypeID = execControl->GetSlot1DeviceType();
switch (deviceTypeID)
{
case NDS_SLOT1_NONE:
[self setSlot1StatusText:NSSTRING_STATUS_SLOT1_NO_DEVICE];
break;
case NDS_SLOT1_RETAIL_AUTO:
[self setSlot1StatusText:NSSTRING_STATUS_SLOT1_RETAIL_INSERTED];
break;
case NDS_SLOT1_RETAIL_NAND:
[self setSlot1StatusText:NSSTRING_STATUS_SLOT1_RETAIL_NAND_INSERTED];
break;
case NDS_SLOT1_R4:
[self setSlot1StatusText:NSSTRING_STATUS_SLOT1_R4_INSERTED];
break;
case NDS_SLOT1_RETAIL_MCROM:
[self setSlot1StatusText:NSSTRING_STATUS_SLOT1_STANDARD_INSERTED];
break;
default:
[self setSlot1StatusText:NSSTRING_STATUS_SLOT1_UNKNOWN_STATE];
break;
}
}
- (void) restoreCoreState
{
[self setCoreState:(NSInteger)execControl->GetPreviousExecutionBehavior()];
}
- (void) reset
{
[self setCoreState:ExecutionBehavior_Pause];
if (![self emuFlagUseExternalBios] || ![self emuFlagUseExternalFirmware])
{
[[self cdsFirmware] writeUserDefaultWFCUserID];
[[self cdsFirmware] updateFirmwareConfigSessionValues];
}
pthread_mutex_lock(&threadParam.mutexThreadExecute);
execControl->ApplySettingsOnReset();
NDS_Reset();
pthread_mutex_unlock(&threadParam.mutexThreadExecute);
[self updateSlot1DeviceStatus];
[self updateCurrentSessionMACAddressString:YES];
[self setMasterExecute:YES];
[self restoreCoreState];
[[self cdsController] reset];
}
- (void) getTimedEmulatorStatistics:(NSTimer *)timer
{
// The timer should fire every 0.5 seconds, so only take the frame
// count every other instance the timer fires.
_isTimerAtSecond = !_isTimerAtSecond;
pthread_rwlock_rdlock(&threadParam.rwlockOutputList);
for (CocoaDSOutput *cdsOutput in cdsOutputList)
{
if ([cdsOutput isKindOfClass:[CocoaDSDisplay class]])
{
if (_isTimerAtSecond)
{
[(CocoaDSDisplay *)cdsOutput takeFrameCount];
}
}
}
pthread_rwlock_unlock(&threadParam.rwlockOutputList);
}
- (NSUInteger) frameNumber
{
return (NSUInteger)execControl->GetFrameIndex();
}
- (void) addOutput:(CocoaDSOutput *)theOutput
{
pthread_rwlock_wrlock(&threadParam.rwlockOutputList);
if ([theOutput isKindOfClass:[CocoaDSDisplay class]])
{
[theOutput setRwlockProducer:NULL];
}
else
{
[theOutput setRwlockProducer:[self rwlockCoreExecute]];
}
[[self cdsOutputList] addObject:theOutput];
pthread_rwlock_unlock(&threadParam.rwlockOutputList);
}
- (void) removeOutput:(CocoaDSOutput *)theOutput
{
pthread_rwlock_wrlock(&threadParam.rwlockOutputList);
[[self cdsOutputList] removeObject:theOutput];
pthread_rwlock_unlock(&threadParam.rwlockOutputList);
}
- (void) removeAllOutputs
{
pthread_rwlock_wrlock(&threadParam.rwlockOutputList);
[[self cdsOutputList] removeAllObjects];
pthread_rwlock_unlock(&threadParam.rwlockOutputList);
}
- (NSString *) cpuEmulationEngineString
{
return [NSString stringWithCString:execControl->GetCPUEmulationEngineName() encoding:NSUTF8StringEncoding];
}
- (NSString *) slot1DeviceTypeString
{
return [NSString stringWithCString:execControl->GetSlot1DeviceName() encoding:NSUTF8StringEncoding];
}
- (NSString *) slot2DeviceTypeString
{
NSString *theString = @"Uninitialized";
pthread_mutex_lock(&threadParam.mutexThreadExecute);
if (slot2_device == NULL)
{
pthread_mutex_unlock(&threadParam.mutexThreadExecute);
return theString;
}
const Slot2Info *info = slot2_device->info();
theString = [NSString stringWithCString:info->name() encoding:NSUTF8StringEncoding];
pthread_mutex_unlock(&threadParam.mutexThreadExecute);
return theString;
}
- (BOOL) startReplayRecording:(NSURL *)fileURL sramURL:(NSURL *)sramURL
{
if (fileURL == nil)
{
return NO;
}
const char *cSramPath = [CocoaDSUtil cPathFromFileURL:sramURL];
std::string sramPath = (cSramPath != NULL) ? std::string(cSramPath) : "";
const char *fileName = [CocoaDSUtil cPathFromFileURL:fileURL];
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"Y M d H m s SSS"];
// Copy the current date into a formatted string.
NSString *dateString = [df stringFromDate:[NSDate date]];
[df release];
df = nil;
int dateYear = 2009;
int dateMonth = 1;
int dateDay = 1;
int dateHour = 0;
int dateMinute = 0;
int dateSecond = 0;
int dateMillisecond = 0;
sscanf([dateString cStringUsingEncoding:NSUTF8StringEncoding], "%i %i %i %i %i %i %i",
&dateYear, &dateMonth, &dateDay, &dateHour, &dateMinute, &dateSecond, &dateMillisecond);
DateTime rtcDate = DateTime(dateYear,
dateMonth,
dateDay,
dateHour,
dateMinute,
dateSecond,
dateMillisecond);
FCEUI_SaveMovie(fileName, L"Test Author", START_BLANK, sramPath, rtcDate);
return YES;
}
- (void) stopReplay
{
FCEUI_StopMovie();
}
- (void) postNDSError:(const NDSError &)ndsError
{
NSString *newErrorString = nil;
switch (ndsError.code)
{
case NDSError_NoError:
// Do nothing if there is no error.
return;
case NDSError_SystemPoweredOff:
newErrorString = @"The system powered off using the ARM7 SPI device.";
break;
case NDSError_JITUnmappedAddressException:
{
if (ndsError.tag == NDSErrorTag_ARM9)
{
newErrorString = [NSString stringWithFormat:
@"JIT UNMAPPED ADDRESS EXCEPTION - ARM9:\n\
\tARM9 Program Counter: 0x%08X\n\
\tARM9 Instruction: 0x%08X\n\
\tARM9 Instruction Address: 0x%08X",
ndsError.programCounterARM9, ndsError.instructionARM9, ndsError.instructionAddrARM9];
}
else if (ndsError.tag == NDSErrorTag_ARM7)
{
newErrorString = [NSString stringWithFormat:
@"JIT UNMAPPED ADDRESS EXCEPTION - ARM7:\n\
\tARM7 Program Counter: 0x%08X\n\
\tARM7 Instruction: 0x%08X\n\
\tARM7 Instruction Address: 0x%08X",
ndsError.programCounterARM7, ndsError.instructionARM7, ndsError.instructionAddrARM7];
}
else
{
newErrorString = [NSString stringWithFormat:
@"JIT UNMAPPED ADDRESS EXCEPTION - UNKNOWN CPU:\n\
\tARM9 Program Counter: 0x%08X\n\
\tARM9 Instruction: 0x%08X\n\
\tARM9 Instruction Address: 0x%08X\n\
\tARM7 Program Counter: 0x%08X\n\
\tARM7 Instruction: 0x%08X\n\
\tARM7 Instruction Address: 0x%08X",
ndsError.programCounterARM9, ndsError.instructionARM9, ndsError.instructionAddrARM9,
ndsError.programCounterARM7, ndsError.instructionARM7, ndsError.instructionAddrARM7];
}
break;
}
case NDSError_ARMUndefinedInstructionException:
{
if (ndsError.tag == NDSErrorTag_ARM9)
{
newErrorString = [NSString stringWithFormat:
@"ARM9 UNDEFINED INSTRUCTION EXCEPTION:\n\
\tARM9 Program Counter: 0x%08X\n\
\tARM9 Instruction: 0x%08X\n\
\tARM9 Instruction Address: 0x%08X",
ndsError.programCounterARM9, ndsError.instructionARM9, ndsError.instructionAddrARM9];
}
else if (ndsError.tag == NDSErrorTag_ARM7)
{
newErrorString = [NSString stringWithFormat:
@"ARM7 UNDEFINED INSTRUCTION EXCEPTION:\n\
\tARM7 Program Counter: 0x%08X\n\
\tARM7 Instruction: 0x%08X\n\
\tARM7 Instruction Address: 0x%08X",
ndsError.programCounterARM7, ndsError.instructionARM7, ndsError.instructionAddrARM7];
}
else
{
newErrorString = [NSString stringWithFormat:
@"UNKNOWN ARM CPU UNDEFINED INSTRUCTION EXCEPTION:\n\
\tARM9 Program Counter: 0x%08X\n\
\tARM9 Instruction: 0x%08X\n\
\tARM9 Instruction Address: 0x%08X\n\
\tARM7 Program Counter: 0x%08X\n\
\tARM7 Instruction: 0x%08X\n\
\tARM7 Instruction Address: 0x%08X",
ndsError.programCounterARM9, ndsError.instructionARM9, ndsError.instructionAddrARM9,
ndsError.programCounterARM7, ndsError.instructionARM7, ndsError.instructionAddrARM7];
}
break;
}
case NDSError_UnknownError:
default:
newErrorString = [NSString stringWithFormat:
@"UNKNOWN ERROR:\n\
\tARM9 Program Counter: 0x%08X\n\
\tARM9 Instruction: 0x%08X\n\
\tARM9 Instruction Address: 0x%08X\n\
\tARM7 Program Counter: 0x%08X\n\
\tARM7 Instruction: 0x%08X\n\
\tARM7 Instruction Address: 0x%08X",
ndsError.programCounterARM9, ndsError.instructionARM9, ndsError.instructionAddrARM9,
ndsError.programCounterARM7, ndsError.instructionARM7, ndsError.instructionAddrARM7];
break;
}
[self setErrorStatus:newErrorString];
[[NSNotificationCenter defaultCenter] postNotificationOnMainThreadName:@"org.desmume.DeSmuME.handleNDSError" object:self userInfo:nil];
}
@end
static void* RunCoreThread(void *arg)
{
#if defined(MAC_OS_X_VERSION_10_6) && (MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6)
if (kCFCoreFoundationVersionNumber >= kCFCoreFoundationVersionNumber10_6)
{
pthread_setname_np("Emulation Core");
}
#endif
CoreThreadParam *param = (CoreThreadParam *)arg;
CocoaDSCore *cdsCore = (CocoaDSCore *)param->cdsCore;
CocoaDSGPU *cdsGPU = [cdsCore cdsGPU];
ClientCheatManager *cheatManager = [[cdsCore cdsCheatManager] internalManager];
ClientExecutionControl *execControl = [cdsCore execControl];
ClientInputHandler *inputHandler = execControl->GetClientInputHandler();
NSMutableArray *cdsOutputList = [cdsCore cdsOutputList];
const NDSFrameInfo &ndsFrameInfo = execControl->GetNDSFrameInfo();
ClientAVCaptureObject *avCaptureObject = NULL;
double startTime = 0.0;
double frameTime = 0.0; // The amount of time that is expected for the frame to run.
const double standardNDSFrameTime = execControl->CalculateFrameAbsoluteTime(1.0);
double lastSelectedExecSpeedSelected = 1.0;
double executionSpeedAverage = 0.0;
double executionSpeedAverageFramesCollected = 0.0;
double executionWaitBias = 1.0;
double lastExecutionWaitBias = 1.0;
double lastExecutionSpeedDifference = 0.0;
bool needRestoreExecutionWaitBias = false;
bool lastExecutionSpeedLimitEnable = execControl->GetEnableSpeedLimiter();
ExecutionBehavior behavior = ExecutionBehavior_Pause;
ExecutionBehavior lastBehavior = ExecutionBehavior_Pause;
uint64_t frameJumpTarget = 0;
((MacGPUFetchObjectAsync *)[cdsGPU fetchObject])->SemaphoreFramebufferCreate();
do
{
startTime = execControl->GetCurrentAbsoluteTime();
pthread_mutex_lock(¶m->mutexThreadExecute);
execControl->ApplySettingsOnExecutionLoopStart();
behavior = execControl->GetExecutionBehaviorApplied();
[cdsGPU respondToPauseState:(behavior == ExecutionBehavior_Pause)];
while (!(behavior != ExecutionBehavior_Pause && execute))
{
pthread_cond_wait(¶m->condThreadExecute, ¶m->mutexThreadExecute);
startTime = execControl->GetCurrentAbsoluteTime();
execControl->ApplySettingsOnExecutionLoopStart();
behavior = execControl->GetExecutionBehaviorApplied();
}
[cdsGPU respondToPauseState:(behavior == ExecutionBehavior_Pause)];
if ( (lastBehavior == ExecutionBehavior_Run) && (behavior != ExecutionBehavior_Run) )
{
lastExecutionWaitBias = executionWaitBias;
needRestoreExecutionWaitBias = true;
}
if ( (behavior == ExecutionBehavior_Run) && lastExecutionSpeedLimitEnable && !execControl->GetEnableSpeedLimiter() )
{
lastExecutionWaitBias = executionWaitBias;
}
else if ( (behavior == ExecutionBehavior_Run) && !lastExecutionSpeedLimitEnable && execControl->GetEnableSpeedLimiter() )
{
needRestoreExecutionWaitBias = true;
}
frameTime = execControl->GetFrameTime();
frameJumpTarget = execControl->GetFrameJumpTargetApplied();
inputHandler->ProcessInputs();
inputHandler->ApplyInputs();
execControl->ApplySettingsOnNDSExec();
avCaptureObject = execControl->GetClientAVCaptureObjectApplied();
if ( (avCaptureObject != NULL) && (avCaptureObject->IsCapturingVideo() || avCaptureObject->IsCapturingAudio()) )
{
avCaptureObject->StartFrame();
}
else
{
avCaptureObject = NULL;
}
// Execute the frame and increment the frame counter.
pthread_rwlock_wrlock(¶m->rwlockCoreExecute);
cheatManager->ApplyToMaster();
cheatManager->ApplyPendingInternalCheatWrites();
NDS_exec<false>();
SPU_Emulate_user();
execControl->FetchOutputPostNDSExec();
pthread_rwlock_unlock(¶m->rwlockCoreExecute);
// Check if an internal execution error occurred that halted the emulation.
if (!execute)
{
NDSError ndsError = NDS_GetLastError();
pthread_mutex_unlock(¶m->mutexThreadExecute);
inputHandler->SetHardwareMicPause(true);
inputHandler->ClearAverageMicLevel();
NSAutoreleasePool *tempPool = [[NSAutoreleasePool alloc] init];
inputHandler->ReportAverageMicLevel();
[tempPool release];
[cdsCore postNDSError:ndsError];
continue;
}
if ( (avCaptureObject != NULL) && !avCaptureObject->IsCapturingVideo() )
{
avCaptureObject->StreamWriteStart();
}
// Make sure that the mic level is updated at least once every 4 frames, regardless
// of whether the NDS actually reads the mic or not.
if ((ndsFrameInfo.frameIndex & 0x03) == 0x03)
{
NSAutoreleasePool *tempPool = [[NSAutoreleasePool alloc] init];
inputHandler->ReportAverageMicLevel();
[tempPool release];
inputHandler->ClearAverageMicLevel();
}
const uint8_t framesToSkip = execControl->GetFramesToSkip();
if ( (behavior == ExecutionBehavior_Run) || (behavior == ExecutionBehavior_FrameJump) )
{
if ((ndsFrameInfo.frameIndex & 0x3F) == 0x3F)
{
if (executionSpeedAverageFramesCollected > 0.0001)
{
const double execSpeedSelected = execControl->GetExecutionSpeedApplied();
const double execSpeedCurrent = (executionSpeedAverage / executionSpeedAverageFramesCollected);
const double execSpeedDifference = execSpeedSelected - execSpeedCurrent;
execControl->SetFrameInfoExecutionSpeed(execSpeedCurrent * 100.0);
if ( (behavior == ExecutionBehavior_Run) && needRestoreExecutionWaitBias )
{
executionWaitBias = lastExecutionWaitBias;
needRestoreExecutionWaitBias = false;
}
else
{
if (lastSelectedExecSpeedSelected == execSpeedSelected)
{
executionWaitBias -= execSpeedDifference;
lastExecutionSpeedDifference = execSpeedDifference;
if (executionWaitBias < EXECUTION_WAIT_BIAS_MIN)
{
executionWaitBias = EXECUTION_WAIT_BIAS_MIN;
}
else if (executionWaitBias > EXECUTION_WAIT_BIAS_MAX)
{
executionWaitBias = EXECUTION_WAIT_BIAS_MAX;
}
}
else
{
executionWaitBias = 1.0;
lastSelectedExecSpeedSelected = execSpeedSelected;
}
}
}
executionSpeedAverage = 0.0;
executionSpeedAverageFramesCollected = 0.0;
}
}
else
{
execControl->SetFrameInfoExecutionSpeed(0.0);
executionSpeedAverage = 0.0;
executionSpeedAverageFramesCollected = 0.0;
}
pthread_rwlock_rdlock(¶m->rwlockOutputList);
switch (behavior)
{
case ExecutionBehavior_Run:
case ExecutionBehavior_FrameAdvance:
case ExecutionBehavior_FrameJump:
{
for (CocoaDSOutput *cdsOutput in cdsOutputList)
{
if ([cdsOutput isKindOfClass:[CocoaDSDisplay class]])
{
[(CocoaDSDisplay *)cdsOutput setNDSFrameInfo:ndsFrameInfo];
if (framesToSkip == 0)
{
[cdsOutput doCoreEmuFrame];
}
}
}
break;
}
default:
break;
}
pthread_rwlock_unlock(¶m->rwlockOutputList);
switch (behavior)
{
case ExecutionBehavior_Run:
{
if (execControl->GetEnableFrameSkipApplied() && !avCaptureObject)
{
if (framesToSkip > 0)
{
NDS_SkipNextFrame();
execControl->SetFramesToSkip(framesToSkip - 1);
}
else
{
const uint8_t framesToSkipSetting = execControl->GetFramesToSkipSettingApplied();
if (framesToSkipSetting == 0) // A value of 0 is interpreted as 'automatic'.
{
const double frameTimeBias = (lastExecutionSpeedDifference > 0.0) ? 1.0 - lastExecutionSpeedDifference : 1.0;
execControl->SetFramesToSkip( execControl->CalculateFrameSkip(startTime, frameTime * frameTimeBias) );
}
else
{
execControl->SetFramesToSkip(framesToSkipSetting);
}
}
}
break;
}
case ExecutionBehavior_FrameJump:
{
if (!avCaptureObject)
{
if (framesToSkip > 0)
{
NDS_SkipNextFrame();
execControl->SetFramesToSkip(framesToSkip - 1);
}
else
{
execControl->SetFramesToSkip( (uint8_t)((DS_FRAMES_PER_SECOND * 1.0) + 0.85) );
}
}
break;
}
default:
break;
}
pthread_mutex_unlock(¶m->mutexThreadExecute);
// If we're doing a frame advance, switch back to pause state immediately
// after we're done with the frame.
if (behavior == ExecutionBehavior_FrameAdvance)
{
[cdsCore setCoreState:ExecutionBehavior_Pause];
}
else if (behavior == ExecutionBehavior_FrameJump)
{
if (ndsFrameInfo.frameIndex == (frameJumpTarget - 1))
{
execControl->ResetFramesToSkip();
}
else if (ndsFrameInfo.frameIndex >= frameJumpTarget)
{
[cdsCore restoreCoreState];
}
}
else
{
// If there is any time left in the loop, go ahead and pad it.
const double biasedFrameTime = frameTime * executionWaitBias;
if (biasedFrameTime > 0.0)
{
if ( (execControl->GetCurrentAbsoluteTime() - startTime) < frameTime )
{
execControl->WaitUntilAbsoluteTime(startTime + biasedFrameTime);
}
}
}
const double endTime = execControl->GetCurrentAbsoluteTime();
const double currentExecutionSpeed = standardNDSFrameTime / (endTime - startTime);
executionSpeedAverage += currentExecutionSpeed;
executionSpeedAverageFramesCollected += 1.0;
lastBehavior = behavior;
lastExecutionSpeedLimitEnable = execControl->GetEnableSpeedLimiterApplied();
} while(true);
if (avCaptureObject != NULL)
{
avCaptureObject->StreamWriteFinish();
}
return NULL;
}
``` | /content/code_sandbox/desmume/src/frontend/cocoa/cocoa_core.mm | xml | 2016-11-24T02:20:36 | 2024-08-16T13:18:50 | desmume | TASEmulators/desmume | 2,879 | 10,548 |
```xml
<!--
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~
~ 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.
-->
<dataset>
<metadata>
<column name="space" />
<column name="name" />
<column name="flag" />
<column name="file_format" />
<column name="row_format" />
<column name="page_size" />
<column name="zip_page_size" />
<column name="space_type" />
<column name="fs_block_size" />
<column name="file_size" />
<column name="allocated_size" />
</metadata>
</dataset>
``` | /content/code_sandbox/test/e2e/sql/src/test/resources/cases/dql/dataset/empty_storage_units/mysql/select_mysql_information_schema_innodb_sys_tablespaces.xml | xml | 2016-01-18T12:49:26 | 2024-08-16T15:48:11 | shardingsphere | apache/shardingsphere | 19,707 | 184 |
```xml
import { errors } from '../src/errors';
describe('errors', () => {
it('should have named export errors', () => {
expect(errors).toMatchSnapshot();
});
});
``` | /content/code_sandbox/packages/two-factor/__tests__/errors.ts | xml | 2016-10-07T01:43:23 | 2024-07-14T11:57:08 | accounts | accounts-js/accounts | 1,492 | 38 |
```xml
/**
* @license
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
import 'jasmine';
import * as path from 'path';
import {expectStylesWithNoFeaturesToBeEmpty} from '../../../testing/featuretargeting';
describe('mdc-elevation.scss', () => {
expectStylesWithNoFeaturesToBeEmpty(
path.join(__dirname, 'feature-targeting-any.test.css'));
});
``` | /content/code_sandbox/packages/mdc-elevation/test/mdc-elevation.scss.test.ts | xml | 2016-12-05T16:04:09 | 2024-08-16T15:42:22 | material-components-web | material-components/material-components-web | 17,119 | 295 |
```xml
import { Combobox as C } from '@headlessui/react';
import { CheckIcon, ChevronUpDownIcon } from '@heroicons/react/24/outline';
import { useField } from 'formik';
import { useState } from 'react';
import { IFilterable } from '~/types/Selectable';
import { cls } from '~/utils/helpers';
type ComboboxProps<T extends IFilterable> = {
id: string;
name: string;
placeholder?: string;
values?: T[];
selected: T | null;
setSelected?: (v: T | null) => void;
disabled?: boolean;
className?: string;
inputClassName?: string;
};
export default function Combobox<T extends IFilterable>(
props: ComboboxProps<T>
) {
const {
id,
name,
className,
inputClassName,
values,
selected,
setSelected,
placeholder,
disabled
} = props;
const [query, setQuery] = useState('');
const [field] = useField(props);
const [openOptions, setOpenOptions] = useState(false);
const filteredValues = values?.filter((v) =>
v.filterValue.toLowerCase().includes(query.toLowerCase())
);
return (
<C
as="div"
className={className}
value={selected}
onChange={(v: T | null) => {
setSelected && setSelected(v);
field.onChange({ target: { value: v?.key, id } });
}}
disabled={disabled}
nullable
>
{({ open }) => (
<div
onFocus={() => setTimeout(() => setOpenOptions(true), 100)}
onBlur={() => setTimeout(() => setOpenOptions(false), 100)}
>
<div className="relative flex w-full flex-row">
<C.Input
//id={id}
className={cls(
'text-gray-900 bg-gray-50 border-gray-300 w-full rounded-md border py-2 pl-3 pr-10 shadow-sm focus:border-violet-500 focus:outline-none focus:ring-1 focus:ring-violet-500 sm:text-sm',
inputClassName
)}
onChange={(e: React.ChangeEvent<HTMLInputElement>) => {
setQuery(e.target.value);
}}
displayValue={(v: T) => v?.key}
placeholder={placeholder}
name={name}
id={`${id}-select-input`}
/>
<C.Button
className="absolute -inset-y-0 right-0 items-center rounded-r-md px-2 focus:outline-none"
id={`${id}-select-button`}
>
<ChevronUpDownIcon
className="text-gray-400 h-5 w-5"
aria-hidden="true"
/>
</C.Button>
</div>
{open && (
<C.Options
className="bg-white z-10 mt-1 flex max-h-60 w-full flex-col overflow-auto rounded-md py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm"
id={`${id}-select-options`}
static={openOptions}
>
{filteredValues &&
filteredValues.map((v) => (
<C.Option
key={v?.key}
value={v}
className={({ active }) =>
cls(
'relative w-full cursor-default select-none py-2 pl-3 pr-9',
{ 'bg-violet-100': active }
)
}
>
{({ active, selected }) => (
<>
<div className="flex items-center">
{v?.status && (
<span
className={cls(
'bg-gray-200 mr-3 inline-block h-2 w-2 flex-shrink-0 rounded-full',
{ 'bg-green-400': v.status === 'active' }
)}
aria-hidden="true"
/>
)}
<span
className={cls('text-gray-700 truncate', {
'font-semibold': selected
})}
>
{v?.filterValue}
</span>
<span className="text-gray-500 ml-2 truncate">
{v?.displayValue}
</span>
</div>
{selected && (
<span
className={cls(
'text-violet-600 absolute inset-y-0 right-0 flex items-center pr-4',
{ 'text-white': active }
)}
>
<CheckIcon className="h-5 w-5" aria-hidden="true" />
</span>
)}
</>
)}
</C.Option>
))}
{!filteredValues?.length && (
<div className="text-gray-500 w-full py-2 text-center">
No results found
</div>
)}
</C.Options>
)}
</div>
)}
</C>
);
}
``` | /content/code_sandbox/ui/src/components/forms/Combobox.tsx | xml | 2016-11-05T00:09:07 | 2024-08-16T13:44:10 | flipt | flipt-io/flipt | 3,489 | 1,032 |
```xml
import { keyframes } from "./common"
export const fadeInAndDown = keyframes`
from {
opacity: 0;
}
to {
opacity: 1;
}
`
``` | /content/code_sandbox/browser/src/UI/components/animations.ts | xml | 2016-11-16T14:42:55 | 2024-08-14T11:48:05 | oni | onivim/oni | 11,355 | 42 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="path_to_url"
package="com.github.rubensousa.viewpagercards">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
``` | /content/code_sandbox/app/src/main/AndroidManifest.xml | xml | 2016-08-20T15:24:12 | 2024-08-14T02:51:57 | ViewPagerCards | rubensousa/ViewPagerCards | 4,067 | 144 |
```xml
import HF2 = pxt.HF2
import U = pxt.U
import * as nodeutil from './nodeutil';
const PXT_USE_HID = !!process.env["PXT_USE_HID"];
function useWebUSB() {
return !!pxt.appTarget.compile.webUSB
}
let HID: any = undefined;
function requireHID(install?: boolean): boolean {
if (!PXT_USE_HID) return false;
if (useWebUSB()) {
// in node.js, we need "webusb" package
if (pxt.Util.isNodeJS)
return !!nodeutil.lazyRequire("webusb", install);
// in the browser, check that USB is defined
return pxt.usb.isAvailable();
}
else {
if (!HID)
HID = nodeutil.lazyRequire("node-hid", install);
return !!HID;
}
}
export function isInstalled(install?: boolean): boolean {
return requireHID(!!install);
}
export interface HidDevice {
vendorId: number; // 9025,
productId: number; // 589,
path: string; //.../UF2-HID@...
serialNumber: string; // '',
manufacturer: string; // 'Arduino',
product: string; // 'Zero',
release: number; // 0x4201
}
export function listAsync() {
if (!isInstalled(true))
return Promise.resolve();
return getHF2DevicesAsync()
.then(devices => {
pxt.log(`found ${devices.length} HID devices`);
devices.forEach(device => pxt.log(device));
})
}
export function serialAsync() {
if (!isInstalled(true))
return Promise.resolve();
return initAsync()
.then(d => {
d.autoReconnect = true
connectSerial(d)
})
}
export function dmesgAsync() {
HF2.enableLog()
return initAsync()
.then(d => d.talkAsync(pxt.HF2.HF2_CMD_DMESG)
.then(resp => {
console.log(U.fromUTF8Array(resp))
return d.disconnectAsync()
}))
}
function hex(n: number) {
return ("000" + n.toString(16)).slice(-4)
}
export function deviceInfo(h: HidDevice) {
return `${h.product} (by ${h.manufacturer} at USB ${hex(h.vendorId)}:${hex(h.productId)})`
}
function getHF2Devices(): HidDevice[] {
if (!isInstalled(false))
return [];
let devices = HID.devices() as HidDevice[]
for (let d of devices) {
pxt.debug(JSON.stringify(d))
}
let serial = pxt.appTarget.serial
return devices.filter(d =>
(serial && parseInt(serial.productId) == d.productId && parseInt(serial.vendorId) == d.vendorId) ||
(d.release & 0xff00) == 0x4200)
}
export function getHF2DevicesAsync(): Promise<HidDevice[]> {
return Promise.resolve(getHF2Devices());
}
function handleDevicesFound(devices: any[], selectFn: any) {
if (devices.length > 1) {
let d42 = devices.filter(d => d.deviceVersionMajor == 42)
if (d42.length > 0)
devices = d42
}
devices.forEach((device: any) => {
console.log(`DEV: ${device.productName || device.serialNumber}`);
});
selectFn(devices[0])
}
export function hf2ConnectAsync(path: string, raw = false) {
if (useWebUSB()) {
const g = global as any
if (!g.navigator)
g.navigator = {}
if (!g.navigator.usb) {
const webusb = nodeutil.lazyRequire("webusb", true)
const load = webusb.USBAdapter.prototype.loadDevice;
webusb.USBAdapter.prototype.loadDevice = function (device: any) {
// skip class 9 - USB HUB, as it causes SEGV on Windows
if (device.deviceDescriptor.bDeviceClass == 9)
return Promise.resolve(null)
return load.apply(this, arguments)
}
const USB = webusb.USB
g.navigator.usb = new USB({
devicesFound: handleDevicesFound
})
}
return pxt.usb.pairAsync()
.then(() => pxt.usb.mkWebUSBHIDPacketIOAsync())
.then(io => new HF2.Wrapper(io))
.then(d => d.reconnectAsync().then(() => d))
}
if (!isInstalled(true)) return Promise.resolve(undefined);
// in .then() to make sure we catch errors
let h = new HF2.Wrapper(new HidIO(path))
h.rawMode = raw
return h.reconnectAsync().then(() => h)
}
export function mkWebUSBOrHidPacketIOAsync(): Promise<pxt.packetio.PacketIO> {
if (useWebUSB()) {
pxt.debug(`packetio: mk cli webusb`)
return hf2ConnectAsync("")
}
pxt.debug(`packetio: mk cli hidio`)
return Promise.resolve()
.then(() => {
// in .then() to make sure we catch errors
return new HidIO(null)
})
}
pxt.packetio.mkPacketIOAsync = mkWebUSBOrHidPacketIOAsync;
let hf2Dev: Promise<HF2.Wrapper>
export function initAsync(path: string = null): Promise<HF2.Wrapper> {
if (!hf2Dev) {
hf2Dev = hf2ConnectAsync(path)
}
return hf2Dev
}
export function connectSerial(w: HF2.Wrapper) {
process.stdin.on("data", (buf: Buffer) => {
w.sendSerialAsync(new Uint8Array(buf))
})
w.onSerial = (arr, iserr) => {
let buf = Buffer.from(arr)
if (iserr) process.stderr.write(buf)
else process.stdout.write(buf)
}
}
export class HIDError extends Error {
constructor(m: string) {
super(m)
this.message = m
}
}
export class HidIO implements pxt.packetio.PacketIO {
dev: any;
private path: string;
private connecting = false;
onDeviceConnectionChanged = (connect: boolean) => { };
onConnectionChanged = () => { };
onData = (v: Uint8Array) => { };
onEvent = (v: Uint8Array) => { };
onError = (e: Error) => { };
constructor(private requestedPath: string) {
this.connect()
}
private setConnecting(v: boolean) {
if (v != this.connecting) {
this.connecting = v;
if (this.onConnectionChanged)
this.onConnectionChanged();
}
}
private connect() {
U.assert(isInstalled(false))
this.setConnecting(true);
try {
if (this.requestedPath == null) {
let devs = getHF2Devices()
if (devs.length == 0)
throw new HIDError("no devices found")
this.path = devs[0].path
} else {
this.path = this.requestedPath
}
this.dev = new HID.HID(this.path)
this.dev.on("data", (v: Buffer) => {
//console.log("got", v.toString("hex"))
this.onData(new Uint8Array(v))
})
this.dev.on("error", (v: Error) => this.onError(v))
} finally {
this.setConnecting(false);
}
}
disposeAsync(): Promise<void> {
return Promise.resolve();
}
isConnecting(): boolean {
return this.connecting;
}
isConnected(): boolean {
return !!this.dev;
}
sendPacketAsync(pkt: Uint8Array): Promise<void> {
//console.log("SEND: " + Buffer.from(pkt).toString("hex"))
return Promise.resolve()
.then(() => {
let lst = [0]
for (let i = 0; i < Math.max(64, pkt.length); ++i)
lst.push(pkt[i] || 0)
this.dev.write(lst)
})
}
error(msg: string): any {
let fullmsg = "HID error on " + this.path + ": " + msg
console.error(fullmsg)
throw new HIDError(fullmsg)
}
disconnectAsync(): Promise<void> {
if (!this.dev) return Promise.resolve()
// see path_to_url
this.dev.removeAllListeners("data");
this.dev.removeAllListeners("error");
const pkt = new Uint8Array([0x48])
this.sendPacketAsync(pkt).catch(e => { })
return U.delay(100)
.then(() => {
if (this.dev) {
const d = this.dev;
delete this.dev;
d.close()
}
if (this.onConnectionChanged)
this.onConnectionChanged();
})
}
reconnectAsync(): Promise<void> {
return this.disconnectAsync()
.then(() => {
this.connect()
})
}
}
``` | /content/code_sandbox/cli/hid.ts | xml | 2016-01-24T19:35:52 | 2024-08-16T16:39:39 | pxt | microsoft/pxt | 2,069 | 1,973 |
```xml
import { IterableX } from '../iterablex.js';
import { repeatValue } from '../repeatvalue.js';
import { catchAll } from '../catcherror.js';
import { MonoTypeOperatorFunction } from '../../interfaces.js';
/**
* Retries the iterable instance the number of given times. If not supplied, it will try infinitely.
*
* @template TSource The type of the elements in the source sequence.
* @param {number} [count=-1] An optional number of times to retry, otherwise is set to infinite retries
* @returns {MonoTypeOperatorAsyncFunction<TSource>} An iterable sequence producing the elements of the
* given sequence repeatedly until it terminates successfully.
*/
export function retry<TSource>(count = -1): MonoTypeOperatorFunction<TSource> {
return function retryOperatorFunction(source: Iterable<TSource>): IterableX<TSource> {
return catchAll<TSource>(repeatValue<Iterable<TSource>>(source, count));
};
}
``` | /content/code_sandbox/src/iterable/operators/retry.ts | xml | 2016-02-22T20:04:19 | 2024-08-09T18:46:41 | IxJS | ReactiveX/IxJS | 1,319 | 193 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.