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 { Component } from '@angular/core';
import { Code } from '@domain/code';
@Component({
selector: 'basic-doc',
template: `
<app-docsectiontext>
<p>Two-way value binding is defined using <i>ngModel</i>.</p>
</app-docsectiontext>
<div class="card flex justify-content-center">
<p-password [(ngModel)]="value" [feedback]="false" />
</div>
<app-code [code]="code" selector="password-basic-demo"></app-code>
`
})
export class BasicDoc {
value!: string;
code: Code = {
basic: `<p-password [(ngModel)]="value" [feedback]="false" />`,
html: `<div class="card flex justify-content-center">
<p-password [(ngModel)]="value" [feedback]="false" />
</div>`,
typescript: `import { Component } from '@angular/core';
import { PasswordModule } from 'primeng/password';
import { FormsModule } from '@angular/forms';
@Component({
selector: 'password-basic-demo',
templateUrl: './password-basic-demo.html',
standalone: true,
imports: [FormsModule, PasswordModule]
})
export class PasswordBasicDemo {
value!: string;
}`
};
}
``` | /content/code_sandbox/src/app/showcase/doc/password/basicdoc.ts | xml | 2016-01-16T09:23:28 | 2024-08-16T19:58:20 | primeng | primefaces/primeng | 9,969 | 274 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="path_to_url"
xmlns:dc="path_to_url"
targetNamespace="path_to_url"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xsd:element name="Color" type="dc:Color"/>
<xsd:element name="Point" type="dc:Point"/>
<xsd:element name="Bounds" type="dc:Bounds"/>
<xsd:element name="Dimension" type="dc:Dimension"/>
<xsd:complexType name="Color">
<xsd:annotation>
<xsd:documentation>Color is a data type that represents a color value in the RGB format.</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="red" type="dc:rgb" use="required"/>
<xsd:attribute name="green" type="dc:rgb" use="required"/>
<xsd:attribute name="blue" type="dc:rgb" use="required"/>
</xsd:complexType>
<xsd:simpleType name="rgb">
<xsd:restriction base="xsd:int">
<xsd:minInclusive value="0"/>
<xsd:maxInclusive value="255"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:complexType name="Point">
<xsd:annotation>
<xsd:documentation>A Point specifies an location in some x-y coordinate system.</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="x" type="xsd:double" use="required"/>
<xsd:attribute name="y" type="xsd:double" use="required"/>
</xsd:complexType>
<xsd:complexType name="Dimension">
<xsd:annotation>
<xsd:documentation>Dimension specifies two lengths (width and height) along the x and y axes in some x-y coordinate system.</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="width" type="xsd:double" use="required"/>
<xsd:attribute name="height" type="xsd:double" use="required"/>
</xsd:complexType>
<xsd:complexType name="Bounds">
<xsd:annotation>
<xsd:documentation>Bounds specifies a rectangular area in some x-y coordinate system that is defined by a location (x and y) and a size (width and height).</xsd:documentation>
</xsd:annotation>
<xsd:attribute name="x" type="xsd:double" use="required"/>
<xsd:attribute name="y" type="xsd:double" use="required"/>
<xsd:attribute name="width" type="xsd:double" use="required"/>
<xsd:attribute name="height" type="xsd:double" use="required"/>
</xsd:complexType>
<xsd:simpleType name="AlignmentKind">
<xsd:annotation>
<xsd:documentation>AlignmentKind enumerates the possible options for alignment for layout purposes.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="start"/>
<xsd:enumeration value="end"/>
<xsd:enumeration value="center"/>
</xsd:restriction>
</xsd:simpleType>
<xsd:simpleType name="KnownColor">
<xsd:annotation>
<xsd:documentation>KnownColor is an enumeration of 17 known colors.</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:string">
<xsd:enumeration value="maroon">
<xsd:annotation>
<xsd:documentation>a color with a value of #800000</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="red">
<xsd:annotation>
<xsd:documentation>a color with a value of #FF0000</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="orange">
<xsd:annotation>
<xsd:documentation>a color with a value of #FFA500</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="yellow">
<xsd:annotation>
<xsd:documentation>a color with a value of #FFFF00</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="olive">
<xsd:annotation>
<xsd:documentation>a color with a value of #808000</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="purple">
<xsd:annotation>
<xsd:documentation>a color with a value of #800080</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="fuchsia">
<xsd:annotation>
<xsd:documentation>a color with a value of #FF00FF</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="white">
<xsd:annotation>
<xsd:documentation>a color with a value of #FFFFFF</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="lime">
<xsd:annotation>
<xsd:documentation>a color with a value of #00FF00</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="green">
<xsd:annotation>
<xsd:documentation>a color with a value of #008000</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="navy">
<xsd:annotation>
<xsd:documentation>a color with a value of #000080</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="blue">
<xsd:annotation>
<xsd:documentation>a color with a value of #0000FF</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="aqua">
<xsd:annotation>
<xsd:documentation>a color with a value of #00FFFF</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="teal">
<xsd:annotation>
<xsd:documentation>a color with a value of #008080</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="black">
<xsd:annotation>
<xsd:documentation>a color with a value of #000000</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="silver">
<xsd:annotation>
<xsd:documentation>a color with a value of #C0C0C0</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
<xsd:enumeration value="gray">
<xsd:annotation>
<xsd:documentation>a color with a value of #808080</xsd:documentation>
</xsd:annotation>
</xsd:enumeration>
</xsd:restriction>
</xsd:simpleType>
</xsd:schema>
``` | /content/code_sandbox/modules/flowable-cmmn-converter/src/main/resources/org/flowable/impl/cmmn/parser/DC.xsd | xml | 2016-10-13T07:21:43 | 2024-08-16T15:23:14 | flowable-engine | flowable/flowable-engine | 7,715 | 1,613 |
```xml
export {
SpinButton,
renderSpinButton_unstable,
spinButtonClassNames,
useSpinButtonStyles_unstable,
useSpinButton_unstable,
} from './SpinButton';
export type {
SpinButtonOnChangeData,
SpinButtonChangeEvent,
SpinButtonProps,
SpinButtonSlots,
SpinButtonState,
SpinButtonSpinState,
SpinButtonBounds,
} from './SpinButton';
``` | /content/code_sandbox/packages/react-components/react-spinbutton/library/src/index.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 87 |
```xml
import * as React from 'react';
import { DemoPage } from '../DemoPage';
import { PivotPageProps } from '@fluentui/react-examples/lib/react/Pivot/Pivot.doc';
export const PivotPage = (props: { isHeaderVisible: boolean }) => (
<DemoPage jsonDocs={require('../../../dist/api/react/Pivot.page.json')} {...{ ...PivotPageProps, ...props }} />
);
``` | /content/code_sandbox/apps/public-docsite-resources/src/components/pages/PivotPage.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 88 |
```xml
<vector xmlns:android="path_to_url"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M6.487,2.999C10.042,1.666 13.958,1.666 17.513,2.999L19.053,3.577C20.224,4.016 21,5.135 21,6.386V12C21,14.965 19.31,17.413 17.551,19.17C15.776,20.942 13.797,22.147 12.925,22.637C12.347,22.962 11.653,22.962 11.075,22.637C10.203,22.147 8.224,20.942 6.45,19.17C4.69,17.413 3,14.965 3,12V6.386C3,5.135 3.776,4.016 4.947,3.577L6.487,2.999ZM16.81,4.872C13.709,3.709 10.291,3.709 7.19,4.872L5.649,5.45C5.259,5.596 5,5.969 5,6.386V12C5,14.186 6.257,16.151 7.863,17.755C9.418,19.308 11.177,20.396 12,20.863C12.823,20.396 14.582,19.308 16.137,17.755C17.743,16.151 19,14.186 19,12V6.386C19,5.969 18.741,5.596 18.351,5.45L16.81,4.872Z"
android:fillColor="#303233"
android:fillType="evenOdd"/>
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable/ic_vpn_onboarding_dialog.xml | xml | 2016-05-04T11:46:20 | 2024-08-15T16:29:10 | android | meganz/android | 1,537 | 464 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<definitions id="taskCandidateGroupExample"
xmlns="path_to_url"
targetNamespace="Examples" xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<process id="testCandidateGroup">
<startEvent id="theStart"/>
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="theTask"/>
<userTask id="theTask">
<potentialOwner>
<resourceAssignmentExpression>
<formalExpression>user(kermit), group(sales)</formalExpression>
</resourceAssignmentExpression>
</potentialOwner>
</userTask>
<sequenceFlow id="flow2" sourceRef="theTask" targetRef="theEnd"/>
<endEvent id="theEnd"/>
</process>
</definitions>
``` | /content/code_sandbox/modules/flowable-spring-boot/flowable-spring-boot-samples/flowable-spring-boot-sample-ldap/src/main/resources/processes/candidateGroup.bpmn20.xml | xml | 2016-10-13T07:21:43 | 2024-08-16T15:23:14 | flowable-engine | flowable/flowable-engine | 7,715 | 189 |
```xml
/* eslint-disable */
/**
* This file was automatically generated by json-schema-to-typescript.
* DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,
* and run json-schema-to-typescript to regenerate this file.
*/
/**
* Measures the session recovery update api call successes and failures
*/
export interface WebCoreSessionRecoverySettingsUpdateTotal {
Value: number;
Labels: {
status: "success" | "failure" | "4xx" | "5xx";
};
}
``` | /content/code_sandbox/packages/metrics/types/web_core_session_recovery_settings_update_total_v1.schema.d.ts | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 107 |
```xml
import { FC, MouseEvent, useCallback } from 'react';
import styled, { css } from 'styled-components';
import Icon from '@components/Icon';
import ProtectIcon from '@components/icons/ProtectIcon';
import ProtectIconCheck from '@components/icons/ProtectIconCheck';
import { BREAK_POINTS, COLORS, FONT_SIZE, LINE_HEIGHT, SPACING } from '@theme';
import { translateRaw } from '@translations';
import { useScreenSize } from '@utils';
const TextWrapper = styled.div`
max-width: 85%;
text-align: left;
h6 {
font-size: ${FONT_SIZE.BASE};
line-height: 15px;
margin-top: 0;
color: #424242;
}
p {
font-size: ${FONT_SIZE.XS};
line-height: ${LINE_HEIGHT.MD};
margin-bottom: 0;
}
@media (min-width: ${BREAK_POINTS.SCREEN_SM}) {
max-width: 70%;
}
`;
const SButton = styled.div<{ disabled: boolean }>`
display: flex;
flex-direction: column;
width: 100%;
margin: 30px 0 15px;
border: 1px solid ${COLORS.PURPLE};
box-sizing: border-box;
border-radius: 2px;
background: ${COLORS.WHITE};
${(p) =>
p.disabled &&
css`
opacity: 0.5;
cursor: not-allowed;
`}
`;
const ButtonWrapper = styled.div<{ opened: boolean }>`
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
cursor: pointer;
width: 100%;
svg:nth-child(1) {
display: flex;
align-self: flex-start;
}
@media (min-width: ${BREAK_POINTS.SCREEN_SM}) {
padding: 16px 40px 14px;
svg:nth-child(1) {
display: flex;
align-self: center;
}
}
@media (max-width: ${BREAK_POINTS.SCREEN_MD}) {
padding: ${SPACING.BASE};
border-bottom: 2px solid ${(p) => (p.opened ? COLORS.GREY_LIGHTER : 'transparent')};
}
`;
const SIcon = styled(Icon)<{ $expanded: boolean }>`
@media (max-width: ${BREAK_POINTS.SCREEN_MD}) {
transform: rotate(${(p) => (p.$expanded ? '-90deg' : '90deg')});
}
transform: rotate(${(p) => (p.$expanded ? '180deg' : '0')});
transition: all 0.3s;
`;
interface Props {
disabled?: boolean;
reviewReport?: boolean;
protectTxShow: boolean;
onClick(e: MouseEvent<HTMLButtonElement, MouseEvent>): void;
stepper(): JSX.Element;
}
export const ProtectTxButton: FC<Props> = ({
onClick: onTransactionProtectionClick,
disabled = false,
reviewReport = false,
protectTxShow,
stepper
}) => {
const { isSmScreen, isMdScreen } = useScreenSize();
const onClickEvent = useCallback(
(e) => {
onTransactionProtectionClick(e);
},
[onTransactionProtectionClick]
);
const isDisabled = (() => {
if (!isMdScreen && reviewReport) {
return false;
} else if (isMdScreen && reviewReport) {
return true;
}
return disabled;
})();
return (
<SButton disabled={isDisabled}>
<ButtonWrapper opened={protectTxShow} onClick={onClickEvent}>
{isSmScreen && <ProtectIcon size="md" />}
{!isSmScreen && <ProtectIconCheck size="sm" />}
<TextWrapper>
{reviewReport && (
<>
<h6>{translateRaw('PROTECTED_TX_THIS_TX_IS_PROTECTED')}</h6>
<p>{translateRaw('PROTECTED_TX_THIS_TX_IS_PROTECTED_DESC')}</p>
</>
)}
{!reviewReport && (
<>
<h6>{translateRaw('PROTECTED_TX_GET_TX_PROTECTION')}</h6>
<p>{translateRaw('PROTECTED_TX_GET_TX_PROTECTION_DESC')}</p>
</>
)}
</TextWrapper>
<SIcon type="caret" color={COLORS.PURPLE} height="11px" $expanded={protectTxShow} />
</ButtonWrapper>
{!isMdScreen && protectTxShow && stepper()}
</SButton>
);
};
``` | /content/code_sandbox/src/features/ProtectTransaction/components/ProtectTxButton.tsx | xml | 2016-12-04T01:35:27 | 2024-08-14T21:41:58 | MyCrypto | MyCryptoHQ/MyCrypto | 1,347 | 979 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="path_to_url">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="fastest_interval_map_infix_mixed.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\test_type_lists.hpp">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
``` | /content/code_sandbox/deps/boost_1_66_0/libs/icl/test/fastest_interval_map_infix_mixed_/vc10_fastest_interval_map_infix_mixed.vcxproj.filters | xml | 2016-09-05T10:18:44 | 2024-08-11T13:21:40 | LiquidCore | LiquidPlayer/LiquidCore | 1,010 | 343 |
```xml
import gql from "graphql-tag";
import { ASTNode, print, stripIgnoredCharacters } from "graphql";
import { createOperation } from "../../utils/createOperation";
import {
selectHttpOptionsAndBody,
selectHttpOptionsAndBodyInternal,
fallbackHttpConfig,
} from "../selectHttpOptionsAndBody";
const query = gql`
query SampleQuery {
stub {
id
}
}
`;
describe("selectHttpOptionsAndBody", () => {
it("includeQuery allows the query to be ignored", () => {
const { body } = selectHttpOptionsAndBody(createOperation({}, { query }), {
http: { includeQuery: false },
});
expect(body).not.toHaveProperty("query");
});
it("includeExtensions allows the extensions to be added", () => {
const extensions = { yo: "what up" };
const { body } = selectHttpOptionsAndBody(
createOperation({}, { query, extensions }),
{ http: { includeExtensions: true } }
);
expect(body).toHaveProperty("extensions");
expect((body as any).extensions).toEqual(extensions);
});
it("the fallbackConfig is used if no other configs are specified", () => {
const defaultHeaders = {
accept: "*/*",
"content-type": "application/json",
};
const defaultOptions = {
method: "POST",
};
const extensions = { yo: "what up" };
const { options, body } = selectHttpOptionsAndBody(
createOperation({}, { query, extensions }),
fallbackHttpConfig
);
expect(body).toHaveProperty("query");
expect(body).not.toHaveProperty("extensions");
expect(options.headers).toEqual(defaultHeaders);
expect(options.method).toEqual(defaultOptions.method);
});
it("allows headers, credentials, and setting of method to function correctly", () => {
const headers = {
accept: "application/json",
"content-type": "application/graphql",
};
const credentials = {
"X-Secret": "djmashko",
};
const opts = {
opt: "hi",
};
const config = { headers, credentials, options: opts };
const extensions = { yo: "what up" };
const { options, body } = selectHttpOptionsAndBody(
createOperation({}, { query, extensions }),
fallbackHttpConfig,
config
);
expect(body).toHaveProperty("query");
expect(body).not.toHaveProperty("extensions");
expect(options.headers).toEqual(headers);
expect(options.credentials).toEqual(credentials);
expect(options.opt).toEqual("hi");
expect(options.method).toEqual("POST"); //from default
});
it("applies custom printer function when provided", () => {
const customPrinter = (ast: ASTNode, originalPrint: typeof print) => {
return stripIgnoredCharacters(originalPrint(ast));
};
const { body } = selectHttpOptionsAndBodyInternal(
createOperation({}, { query }),
customPrinter,
fallbackHttpConfig
);
expect(body.query).toBe("query SampleQuery{stub{id}}");
});
});
``` | /content/code_sandbox/src/link/http/__tests__/selectHttpOptionsAndBody.ts | xml | 2016-02-26T20:25:00 | 2024-08-16T10:56:57 | apollo-client | apollographql/apollo-client | 19,304 | 664 |
```xml
import async from 'async'
import fs from './fileSystem'
import { runTest } from './testRunner'
import { TestResultInterface, ResultsInterface, compilationInterface, ASTInterface, Options, AstNode } from './types'
import colors from 'colors'
import Web3 from 'web3';
import { compileFileOrFiles } from './compiler'
import { deployAll } from './deployer'
/**
* @dev run test contract files (used for CLI)
* @param filepath Path of file
* @param isDirectory True, if path is a directory
* @param web3 Web3
* @param finalCallback optional callback to run finally
* @param opts Options
*/
export function runTestFiles(filepath: string, isDirectory: boolean, web3: Web3, finalCallback: any = () => {}, opts?: Options) {
opts = opts || {}
const sourceASTs: any = {}
const { Signale } = require('signale')
// signale configuration
const options = {
types: {
result: {
badge: '\t',
label: '',
color: 'greenBright'
},
name: {
badge: '\n\t',
label: '',
color: 'white'
},
error: {
badge: '\t',
label: '',
color: 'redBright'
}
}
}
const signale = new Signale(options)
let accounts = opts['accounts'] || null
async.waterfall([
function getAccountList (next: Function) {
if (accounts) return next(null)
web3.eth.getAccounts((_err: Error | null | undefined, _accounts) => {
accounts = _accounts
next(null)
})
},
function compile(next: Function) {
compileFileOrFiles(filepath, isDirectory, { accounts }, next)
},
function deployAllContracts (compilationResult: compilationInterface, asts: ASTInterface, next: Function) {
// Extract AST of test contract file source
for(const filename in asts) {
if(filename.endsWith('_test.sol'))
sourceASTs[filename] = asts[filename].ast
}
deployAll(compilationResult, web3, false, (err, contracts) => {
if (err) {
next(err)
}
next(null, compilationResult, contracts)
})
},
function determineTestContractsToRun (compilationResult: compilationInterface, contracts: any, next: Function) {
let contractsToTest: string[] = []
let contractsToTestDetails: any[] = []
const gatherContractsFrom = function(filename: string) {
if (!filename.endsWith('_test.sol')) {
return
}
try {
Object.keys(compilationResult[filename]).forEach(contractName => {
contractsToTest.push(contractName)
contractsToTestDetails.push(compilationResult[filename][contractName])
})
} catch (e) {
console.error(e)
}
}
if (isDirectory) {
fs.walkSync(filepath, (foundpath: string) => {
gatherContractsFrom(foundpath)
})
} else {
gatherContractsFrom(filepath)
}
next(null, contractsToTest, contractsToTestDetails, contracts)
},
function runTests(contractsToTest: string[], contractsToTestDetails: any[], contracts: any, next: Function) {
let totalPassing: number = 0
let totalFailing: number = 0
let totalTime: number = 0
let errors: any[] = []
const _testCallback = function (err: Error | null | undefined, result: TestResultInterface) {
if(err) throw err;
if (result.type === 'contract') {
signale.name(result.value.white)
} else if (result.type === 'testPass') {
signale.result(result.value)
} else if (result.type === 'testFailure') {
signale.result(result.value.red)
errors.push(result)
}
}
const _resultsCallback = (_err: Error | null | undefined, result: ResultsInterface, cb) => {
totalPassing += result.passingNum
totalFailing += result.failureNum
totalTime += result.timePassed
cb()
}
async.eachOfLimit(contractsToTest, 1, (contractName: string, index, cb) => {
try {
const fileAST: AstNode = sourceASTs[contracts[contractName]['filename']]
runTest(contractName, contracts[contractName], contractsToTestDetails[index], fileAST, { accounts }, _testCallback, (err, result) => {
if (err) {
console.log(err)
return cb(err)
}
_resultsCallback(null, result, cb)
})
} catch(e) {
console.error(e)
}
}, function (err) {
if (err) {
return next(err)
}
console.log('\n')
if (totalPassing > 0) {
console.log(colors.green(totalPassing + ' passing ') + colors.grey('(' + totalTime + 's)'))
}
if (totalFailing > 0) {
console.log(colors.red(totalFailing + ' failing'))
}
console.log('')
errors.forEach((error, index) => {
console.log(' ' + (index + 1) + ') ' + error.context + ' ' + error.value)
console.log('')
console.log(colors.red('\t error: ' + error.errMsg))
})
console.log('')
next()
})
}
], finalCallback)
}
``` | /content/code_sandbox/remix-tests/src/runTestFiles.ts | xml | 2016-04-11T09:05:03 | 2024-08-12T19:22:17 | remix | ethereum/remix | 1,177 | 1,207 |
```xml
import { ChargeUsage } from "../types";
import Label from "modules/common/components/Label";
import React from "react";
import { __ } from "@erxes/ui/src/utils";
import { formatNumber } from "../utils";
type Props = {
name: string;
bottomSpace?: number;
showCompact?: boolean;
children?: React.ReactNode;
isBold?: boolean;
unit?: string;
comingSoon?: boolean;
usage: ChargeUsage;
unLimited?: boolean;
};
function ChargeItem(props: Props) {
const { name, children, unit, usage, unLimited } = props;
const {
totalAmount,
remainingAmount,
usedAmount,
freeAmount,
// promoCodeAmount,
purchasedAmount,
} = usage;
return (
<tr>
<td>
{__(name)}
{children}
</td>
<td>
<Label lblStyle="danger" ignoreTrans={true}>
{!unLimited ? (
`${formatNumber(usedAmount)} ${unit || ""}`
) : (
<span>∞</span>
)}
</Label>
</td>
<td>
<Label lblStyle="success" ignoreTrans={true}>
{!unLimited ? (
`${formatNumber(remainingAmount)} ${unit || ""}`
) : (
<span>∞</span>
)}
</Label>
</td>
<td>
{" "}
{!unLimited ? (
`${formatNumber(freeAmount)} ${unit || ""}`
) : freeAmount > 0 ? (
<span> ✓</span>
) : (
"-"
)}
</td>
{/* <td>
{!unLimited ? `${formatNumber(promoCodeAmount)} ${unit || ""}` : "-"}
</td> */}
<td>
{!unLimited ? (
`${formatNumber(purchasedAmount)} ${unit || ""}`
) : purchasedAmount > 0 ? (
<span> ✓</span>
) : (
"-"
)}
</td>
<td className="odd">
{!unLimited ? (
`${formatNumber(totalAmount)} ${unit || ""}`
) : (
<span>∞</span>
)}
</td>
</tr>
);
}
export default ChargeItem;
``` | /content/code_sandbox/packages/core-ui/src/modules/saas/settings/plans/components/ChargeItem.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 508 |
```xml
import { ChartType } from "@pnp/spfx-controls-react/lib/ChartControl";
export interface IPollAnalyticsInfo {
Question: string;
Labels: string[];
PollResponse: any[];
ChartType: ChartType;
}
``` | /content/code_sandbox/samples/react-quick-poll/src/Models/IPollAnalyticsInfo.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 50 |
```xml
///
///
///
/// path_to_url
///
/// Unless required by applicable law or agreed to in writing, software
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
///
import {
ChangeDetectorRef,
Component,
ElementRef,
forwardRef,
Input,
OnDestroy,
OnInit,
ViewChild
} from '@angular/core';
import {
ControlValueAccessor,
UntypedFormControl,
NG_VALIDATORS,
NG_VALUE_ACCESSOR,
Validator,
AbstractControl, ValidationErrors
} from '@angular/forms';
import { Ace } from 'ace-builds';
import { coerceBooleanProperty } from '@angular/cdk/coercion';
import { ActionNotificationHide, ActionNotificationShow } from '@core/notification/notification.actions';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { CancelAnimationFrame, RafService } from '@core/services/raf.service';
import { guid, isDefinedAndNotNull, isObject, isUndefined } from '@core/utils';
import { ResizeObserver } from '@juggle/resize-observer';
import { getAce } from '@shared/models/ace/ace.models';
import { coerceBoolean } from '@shared/decorators/coercion';
export const jsonRequired = (control: AbstractControl): ValidationErrors | null => !control.value ? {required: true} : null;
@Component({
selector: 'tb-json-object-edit',
templateUrl: './json-object-edit.component.html',
styleUrls: ['./json-object-edit.component.scss'],
providers: [
{
provide: NG_VALUE_ACCESSOR,
useExisting: forwardRef(() => JsonObjectEditComponent),
multi: true
},
{
provide: NG_VALIDATORS,
useExisting: forwardRef(() => JsonObjectEditComponent),
multi: true,
}
]
})
export class JsonObjectEditComponent implements OnInit, ControlValueAccessor, Validator, OnDestroy {
@ViewChild('jsonEditor', {static: true})
jsonEditorElmRef: ElementRef;
private jsonEditor: Ace.Editor;
private editorsResizeCaf: CancelAnimationFrame;
private editorResize$: ResizeObserver;
toastTargetId = `jsonObjectEditor-${guid()}`;
@Input() label: string;
@Input() disabled: boolean;
@Input() fillHeight: boolean;
@Input() editorStyle: { [klass: string]: any };
@Input() sort: (key: string, value: any) => any;
@coerceBoolean()
@Input()
jsonRequired: boolean;
@coerceBoolean()
@Input()
readonly: boolean;
fullscreen = false;
modelValue: any;
contentValue: string;
objectValid: boolean;
validationError: string;
errorShowed = false;
ignoreChange = false;
private propagateChange = null;
constructor(public elementRef: ElementRef,
protected store: Store<AppState>,
private raf: RafService,
private cd: ChangeDetectorRef) {
}
ngOnInit(): void {
const editorElement = this.jsonEditorElmRef.nativeElement;
let editorOptions: Partial<Ace.EditorOptions> = {
mode: 'ace/mode/json',
showGutter: true,
showPrintMargin: false,
readOnly: this.disabled || this.readonly
};
const advancedOptions = {
enableSnippets: true,
enableBasicAutocompletion: true,
enableLiveAutocompletion: true
};
editorOptions = {...editorOptions, ...advancedOptions};
getAce().subscribe(
(ace) => {
this.jsonEditor = ace.edit(editorElement, editorOptions);
this.jsonEditor.session.setUseWrapMode(false);
this.jsonEditor.setValue(this.contentValue ? this.contentValue : '', -1);
this.jsonEditor.setReadOnly(this.disabled || this.readonly);
this.jsonEditor.on('change', () => {
if (!this.ignoreChange) {
this.cleanupJsonErrors();
this.updateView();
}
});
this.editorResize$ = new ResizeObserver(() => {
this.onAceEditorResize();
});
this.editorResize$.observe(editorElement);
}
);
}
ngOnDestroy(): void {
if (this.editorResize$) {
this.editorResize$.disconnect();
}
if (this.jsonEditor) {
this.jsonEditor.destroy();
}
}
private onAceEditorResize() {
if (this.editorsResizeCaf) {
this.editorsResizeCaf();
this.editorsResizeCaf = null;
}
this.editorsResizeCaf = this.raf.raf(() => {
this.jsonEditor.resize();
this.jsonEditor.renderer.updateFull();
});
}
registerOnChange(fn: any): void {
this.propagateChange = fn;
}
registerOnTouched(fn: any): void {
}
setDisabledState(isDisabled: boolean): void {
this.disabled = isDisabled;
if (this.jsonEditor) {
this.jsonEditor.setReadOnly(this.disabled || this.readonly);
}
}
public validate(c: UntypedFormControl) {
return (this.objectValid) ? null : {
jsonParseError: {
valid: false,
},
};
}
validateOnSubmit(): void {
if (!this.disabled && !this.readonly) {
this.cleanupJsonErrors();
if (!this.objectValid) {
this.store.dispatch(new ActionNotificationShow(
{
message: this.validationError,
type: 'error',
target: this.toastTargetId,
verticalPosition: 'bottom',
horizontalPosition: 'left'
}));
this.errorShowed = true;
}
}
}
cleanupJsonErrors(): void {
if (this.errorShowed) {
this.store.dispatch(new ActionNotificationHide(
{
target: this.toastTargetId
}));
this.errorShowed = false;
}
}
beautifyJSON() {
if (this.jsonEditor && this.objectValid) {
const res = JSON.stringify(this.modelValue, null, 2);
this.jsonEditor.setValue(res ? res : '', -1);
this.updateView();
}
}
minifyJSON() {
if (this.jsonEditor && this.objectValid) {
const res = JSON.stringify(this.modelValue);
this.jsonEditor.setValue(res ? res : '', -1);
this.updateView();
}
}
writeValue(value: any): void {
this.modelValue = value;
this.contentValue = '';
this.objectValid = false;
try {
if (isDefinedAndNotNull(this.modelValue)) {
this.contentValue = JSON.stringify(this.modelValue, isUndefined(this.sort) ? undefined :
(key, objectValue) => this.sort(key, objectValue), 2);
this.objectValid = true;
} else {
this.objectValid = !this.jsonRequired;
this.validationError = 'Json object is required.';
}
} catch (e) {
//
}
if (this.jsonEditor) {
this.ignoreChange = true;
this.jsonEditor.setValue(this.contentValue ? this.contentValue : '', -1);
this.ignoreChange = false;
}
}
updateView() {
const editorValue = this.jsonEditor.getValue();
if (this.contentValue !== editorValue) {
this.contentValue = editorValue;
let data = null;
this.objectValid = false;
if (this.contentValue && this.contentValue.length > 0) {
try {
data = JSON.parse(this.contentValue);
if (!isObject(data)) {
throw new TypeError(`Value is not a valid JSON`);
}
this.objectValid = true;
this.validationError = '';
} catch (ex) {
let errorInfo = 'Error:';
if (ex.name) {
errorInfo += ' ' + ex.name + ':';
}
if (ex.message) {
errorInfo += ' ' + ex.message;
}
this.validationError = errorInfo;
}
} else {
this.objectValid = !this.jsonRequired;
this.validationError = this.jsonRequired ? 'Json object is required.' : '';
}
this.modelValue = data;
this.propagateChange(data);
this.cd.markForCheck();
}
}
onFullscreen() {
if (this.jsonEditor) {
setTimeout(() => {
this.jsonEditor.resize();
}, 0);
}
}
}
``` | /content/code_sandbox/ui-ngx/src/app/shared/components/json-object-edit.component.ts | xml | 2016-12-01T09:33:30 | 2024-08-16T19:58:25 | thingsboard | thingsboard/thingsboard | 16,820 | 1,785 |
```xml
import * as assert from 'assert';
import {BladeApi} from './blade.js';
export function assertInitialState(api: BladeApi) {
assert.strictEqual(api.disabled, false);
assert.strictEqual(api.hidden, false);
assert.strictEqual(api.controller.viewProps.get('disposed'), false);
}
export function assertDisposes(api: BladeApi) {
api.dispose();
assert.strictEqual(api.controller.viewProps.get('disposed'), true);
}
export function assertUpdates(api: BladeApi) {
api.disabled = true;
assert.strictEqual(api.disabled, true);
assert.strictEqual(
api.controller.view.element.classList.contains('tp-v-disabled'),
true,
);
api.hidden = true;
assert.strictEqual(api.hidden, true);
assert.strictEqual(
api.controller.view.element.classList.contains('tp-v-hidden'),
true,
);
}
``` | /content/code_sandbox/packages/core/src/blade/common/api/test-util.ts | xml | 2016-05-10T15:45:13 | 2024-08-16T19:57:27 | tweakpane | cocopon/tweakpane | 3,480 | 159 |
```xml
import * as React from 'react';
import { PrototypeSection, ComponentPrototype } from '../Prototypes';
import ImportantAndMentionMessages from './ImportantAndMentionMessages';
import ChatMessageWithPopover from './ChatMessageWithPopover';
import ControlMessages from './ControlMessages';
import ThreadedMessages from './ThreadedMessages';
export default () => (
<PrototypeSection title="Chat messages">
<ComponentPrototype
title="Chat message with popover and reactions"
description="The Popover can be use together with the chat messages."
>
<ChatMessageWithPopover />
</ComponentPrototype>
<ComponentPrototype
title="Important and mention messages"
description="Important and mention messages support in Teams theme."
>
<ImportantAndMentionMessages />
</ComponentPrototype>
<ComponentPrototype title="Control messages" description="Control messages example">
<ControlMessages />
</ComponentPrototype>
<ComponentPrototype title="Threaded messages" description="Threaded messages example">
<ThreadedMessages />
</ComponentPrototype>
</PrototypeSection>
);
``` | /content/code_sandbox/packages/fluentui/react-northstar-prototypes/src/prototypes/chatMessages/index.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 223 |
```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
/**
* Tests if two arguments are both double-precision complex floating-point numbers and have the same value.
*
* ## Notes
*
* - The function differs from the `===` operator in that the function treats `-0` and `+0` as distinct and `NaNs` as the same.
*
* @param v1 - first input value
* @param v2 - second input value
* @returns boolean indicating whether two arguments are the same
*
* @example
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
*
* var x = new Complex128( 1.0, 2.0 );
* var y = new Complex128( 1.0, 2.0 );
*
* var out = isSameComplex128( x, y );
* // returns true
*
* @example
* var Complex128 = require( '@stdlib/complex/float64/ctor' );
*
* var x = new Complex128( 1.0, 2.0 );
* var y = new Complex128( -1.0, -2.0 );
*
* var out = isSameComplex128( x, y );
* // returns false
*/
declare function isSameComplex128( v1: any, v2: any ): boolean;
// EXPORTS //
export = isSameComplex128;
``` | /content/code_sandbox/lib/node_modules/@stdlib/assert/is-same-complex128/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 344 |
```xml
import { SelectionTransforms } from '../interfaces/transforms/selection'
import { Transforms } from '../interfaces/transforms'
import { Range } from '../interfaces/range'
export const collapse: SelectionTransforms['collapse'] = (
editor,
options = {}
) => {
const { edge = 'anchor' } = options
const { selection } = editor
if (!selection) {
return
} else if (edge === 'anchor') {
Transforms.select(editor, selection.anchor)
} else if (edge === 'focus') {
Transforms.select(editor, selection.focus)
} else if (edge === 'start') {
const [start] = Range.edges(selection)
Transforms.select(editor, start)
} else if (edge === 'end') {
const [, end] = Range.edges(selection)
Transforms.select(editor, end)
}
}
``` | /content/code_sandbox/packages/slate/src/transforms-selection/collapse.ts | xml | 2016-06-18T01:52:42 | 2024-08-16T18:43:42 | slate | ianstormtaylor/slate | 29,492 | 188 |
```xml
<ResourceDictionary xmlns="path_to_url"
xmlns:x="path_to_url">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPicker.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerButton.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/ColorPicker/ColorPickerSlider.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/RadialGauge/RadialGauge.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/RangeSelector/RangeSelector.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/RemoteDevicePicker/RemoteDevicePicker.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/TokenizingTextBox/TokenizingTextBox.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Input/RichSuggestBox/RichSuggestBox.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
``` | /content/code_sandbox/Microsoft.Toolkit.Uwp.UI.Controls.Input/Themes/Generic.xaml | xml | 2016-06-17T21:29:46 | 2024-08-16T09:32:00 | WindowsCommunityToolkit | CommunityToolkit/WindowsCommunityToolkit | 5,842 | 261 |
```xml
<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0">
<Import Project="..\..\PowerShell.Common.props" />
<ItemGroup>
<!-- Keep version in sync with wix.psm1 line 18 -->
<PackageReference Include="Microsoft.Signed.Wix" Version="3.14.1-8722.20240403.1" />
</ItemGroup>
</Project>
``` | /content/code_sandbox/tools/wix/Microsoft.PowerShell.Packaging.csproj | xml | 2016-01-13T23:41:35 | 2024-08-16T19:59:07 | PowerShell | PowerShell/PowerShell | 44,388 | 88 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView
xmlns:app="path_to_url"
xmlns:android="path_to_url"
android:id="@+id/photo_details_card"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:cardCornerRadius="@dimen/card_corner_radius">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/details_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/details"
android:padding="@dimen/big_spacing"
android:textColor="@color/md_dark_primary_text"
android:background="@color/md_red_500"
android:textSize="@dimen/sub_big_text"
android:textStyle="bold" />
<ImageView
android:id="@+id/photo_map"
android:layout_width="match_parent"
android:layout_height="150dp"
android:visibility="gone" />
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:clickable="true"
android:background="@drawable/ripple">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/ll_list_details"
android:orientation="vertical"
android:paddingTop="@dimen/small_spacing" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/details_showmore"
android:text="@string/show_more"
android:textSize="@dimen/medium_text"
android:visibility="gone"
android:gravity="center"
android:clickable="true"
android:background="@drawable/ripple" />
</LinearLayout>
</ScrollView>
</LinearLayout>
</android.support.v7.widget.CardView>
``` | /content/code_sandbox/app/src/main/res/layout/dialog_media_detail.xml | xml | 2016-01-07T17:24:12 | 2024-08-16T06:55:33 | LeafPic | UnevenSoftware/LeafPic | 3,258 | 464 |
```xml
import { svgDefaultProps } from '@nivo/bar'
import {
themeProperty,
motionProperties,
defsProperties,
getLegendsProps,
groupProperties,
} from '../../../lib/componentProperties'
import {
chartDimensions,
ordinalColors,
chartGrid,
axes,
isInteractive,
commonAccessibilityProps,
} from '../../../lib/chart-properties'
import { ChartProperty, Flavor } from '../../../types'
const allFlavors: Flavor[] = ['svg', 'canvas', 'api']
const props: ChartProperty[] = [
{
key: 'data',
group: 'Base',
help: 'Chart data.',
type: 'object[]',
required: true,
flavors: allFlavors,
},
{
key: 'indexBy',
group: 'Base',
help: 'Key to use to index the data.',
description: `
Key to use to index the data,
this key must exist in each data item.
You can also provide a function which will
receive the data item and must return the desired index.
`,
type: 'string | (datum: RawDatum): string | number',
flavors: allFlavors,
required: false,
defaultValue: svgDefaultProps.indexBy,
},
{
key: 'keys',
group: 'Base',
help: 'Keys to use to determine each serie.',
type: 'string[]',
flavors: allFlavors,
required: false,
defaultValue: svgDefaultProps.keys,
},
{
key: 'groupMode',
group: 'Base',
help: `How to group bars.`,
type: `'grouped' | 'stacked'`,
flavors: allFlavors,
required: false,
defaultValue: svgDefaultProps.groupMode,
control: {
type: 'radio',
choices: [
{ label: 'stacked', value: 'stacked' },
{ label: 'grouped', value: 'grouped' },
],
},
},
{
key: 'layout',
group: 'Base',
help: `How to display bars.`,
type: `'horizontal' | 'vertical'`,
flavors: allFlavors,
required: false,
defaultValue: svgDefaultProps.layout,
control: {
type: 'radio',
choices: [
{ label: 'horizontal', value: 'horizontal' },
{ label: 'vertical', value: 'vertical' },
],
},
},
{
key: 'valueScale',
group: 'Base',
type: 'object',
help: `value scale configuration.`,
defaultValue: svgDefaultProps.valueScale,
flavors: allFlavors,
required: false,
control: {
type: 'object',
props: [
{
key: 'type',
help: `Scale type.`,
type: 'string',
required: true,
flavors: allFlavors,
control: {
type: 'choices',
disabled: true,
choices: ['linear', 'symlog'].map(v => ({
label: v,
value: v,
})),
},
},
],
},
},
{
key: 'indexScale',
group: 'Base',
type: 'object',
help: `index scale configuration.`,
defaultValue: svgDefaultProps.indexScale,
flavors: allFlavors,
required: false,
control: {
type: 'object',
props: [
{
key: 'type',
help: `Scale type.`,
type: 'string',
required: true,
flavors: ['svg', 'canvas', 'api'],
control: {
type: 'choices',
disabled: true,
choices: ['band'].map(v => ({
label: v,
value: v,
})),
},
},
{
key: 'round',
required: true,
flavors: ['svg', 'canvas', 'api'],
help: 'Toggle index scale (for bar width) rounding.',
type: 'boolean',
control: { type: 'switch' },
},
],
},
},
{
key: 'reverse',
group: 'Base',
help: 'Reverse bars, starts on top instead of bottom for vertical layout and right instead of left for horizontal one.',
type: 'boolean',
required: false,
flavors: allFlavors,
defaultValue: svgDefaultProps.reverse,
control: { type: 'switch' },
},
{
key: 'minValue',
group: 'Base',
help: 'Minimum value.',
description: `
Minimum value, if 'auto',
will use min value from the provided data.
`,
required: false,
flavors: allFlavors,
defaultValue: svgDefaultProps.minValue,
type: `number | 'auto'`,
control: {
type: 'switchableRange',
disabledValue: 'auto',
defaultValue: -1000,
min: -1000,
max: 0,
},
},
{
key: 'maxValue',
group: 'Base',
help: 'Maximum value.',
description: `
Maximum value, if 'auto',
will use max value from the provided data.
`,
required: false,
flavors: allFlavors,
defaultValue: svgDefaultProps.maxValue,
type: `number | 'auto'`,
control: {
type: 'switchableRange',
disabledValue: 'auto',
defaultValue: 1000,
min: 0,
max: 1000,
},
},
{
key: 'valueFormat',
group: 'Base',
help: 'Optional formatter for values.',
description: `
The formatted value can then be used for labels & tooltips.
Under the hood, nivo uses [d3-format](path_to_url
please have a look at it for available formats, you can also pass a function
which will receive the raw value and should return the formatted one.
`,
required: false,
flavors: allFlavors,
type: 'string | (value: number) => string | number',
control: { type: 'valueFormat' },
},
{
key: 'padding',
help: 'Padding between each bar (ratio).',
type: 'number',
required: false,
flavors: allFlavors,
defaultValue: svgDefaultProps.padding,
group: 'Base',
control: {
type: 'range',
min: 0,
max: 0.9,
step: 0.05,
},
},
{
key: 'innerPadding',
help: 'Padding between grouped/stacked bars.',
type: 'number',
required: false,
flavors: allFlavors,
defaultValue: svgDefaultProps.innerPadding,
group: 'Base',
control: {
type: 'range',
unit: 'px',
min: 0,
max: 10,
},
},
...chartDimensions(allFlavors),
themeProperty(allFlavors),
ordinalColors({
flavors: allFlavors,
defaultValue: svgDefaultProps.colors,
}),
{
key: 'colorBy',
type: `'id' | 'indexValue'`,
help: 'Property used to determine node color.',
description: `
Property to use to determine node color.
`,
flavors: allFlavors,
required: false,
defaultValue: svgDefaultProps.colorBy,
group: 'Style',
control: {
type: 'choices',
choices: [
{
label: 'id',
value: 'id',
},
{
label: 'indexValue',
value: 'indexValue',
},
],
},
},
{
key: 'borderRadius',
help: 'Rectangle border radius.',
type: 'number',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.borderRadius,
group: 'Style',
control: {
type: 'range',
unit: 'px',
min: 0,
max: 36,
},
},
{
key: 'borderWidth',
help: 'Width of bar border.',
type: 'number',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.borderWidth,
group: 'Style',
control: { type: 'lineWidth' },
},
{
key: 'borderColor',
help: 'Method to compute border color.',
description: `
how to compute border color,
[see dedicated documentation](self:/guides/colors).
`,
type: 'string | object |Function',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.borderColor,
group: 'Style',
control: { type: 'inheritedColor' },
},
...defsProperties('Style', ['svg']),
{
key: 'layers',
flavors: ['svg', 'canvas'],
help: 'Defines the order of layers.',
description: `
Defines the order of layers, available layers are:
\`grid\`, \`axes\`, \`bars\`, \`markers\`, \`legends\`,
\`annotations\`. The \`markers\` layer is not available
in the canvas flavor.
You can also use this to insert extra layers to the chart,
this extra layer must be a function which will receive
the chart computed data and must return a valid SVG
element.
`,
type: 'Array<string | Function>',
required: false,
defaultValue: svgDefaultProps.layers,
group: 'Customization',
},
{
key: 'enableLabel',
help: 'Enable/disable labels.',
type: 'boolean',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.enableLabel,
group: 'Labels',
control: { type: 'switch' },
},
{
key: 'label',
group: 'Labels',
help: 'Define how bar labels are computed.',
description: `
Define how bar labels are computed.
By default it will use the bar's value.
It accepts a string which will be used to access
a specific bar data property, such as
\`'value'\` or \`'id'\`.
You can also use a funtion if you want to
add more logic, this function will receive
the current bar's data and must return
the computed label which, depending on the context,
should return a string or an svg element (Bar) or
a string (BarCanvas). For example let's say you want
to use a label with both the id and the value,
you can achieve this with:
\`\`\`
label={d => \`\${d.id}: \${d.value}\`}
\`\`\`
`,
type: 'string | Function',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.label,
},
{
key: 'labelSkipWidth',
help: 'Skip label if bar width is lower than provided value, ignored if 0.',
type: 'number',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.labelSkipWidth,
group: 'Labels',
control: {
type: 'range',
unit: 'px',
min: 0,
max: 36,
},
},
{
key: 'labelSkipHeight',
help: 'Skip label if bar height is lower than provided value, ignored if 0.',
type: 'number',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.labelSkipHeight,
group: 'Labels',
control: {
type: 'range',
unit: 'px',
min: 0,
max: 36,
},
},
{
key: 'labelTextColor',
help: 'Defines how to compute label text color.',
type: 'string | object | Function',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.labelTextColor,
control: { type: 'inheritedColor' },
group: 'Labels',
},
{
key: 'labelPosition',
help: 'Defines the position of the label relative to its bar.',
type: `'start' | 'middle' | 'end'`,
flavors: allFlavors,
required: false,
defaultValue: svgDefaultProps.labelPosition,
control: {
type: 'radio',
choices: [
{ label: 'start', value: 'start' },
{ label: 'middle', value: 'middle' },
{ label: 'end', value: 'end' },
],
columns: 3,
},
group: 'Labels',
},
{
key: 'labelOffset',
help: 'Defines the vertical or horizontal (depends on layout) offset of the label.',
type: 'number',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.labelOffset,
control: {
type: 'range',
unit: 'px',
min: -16,
max: 16,
},
group: 'Labels',
},
{
key: 'enableTotals',
help: 'Enable/disable totals labels.',
type: 'boolean',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.enableTotals,
group: 'Labels',
control: { type: 'switch' },
},
{
key: 'totalsOffset',
help: 'Offset from the bar edge for the total label.',
type: 'number',
flavors: ['svg', 'canvas', 'api'],
required: false,
defaultValue: svgDefaultProps.totalsOffset,
group: 'Labels',
control: {
type: 'range',
unit: 'px',
min: 0,
max: 40,
},
},
...chartGrid({
flavors: allFlavors,
xDefault: svgDefaultProps.enableGridX,
yDefault: svgDefaultProps.enableGridY,
values: true,
}),
...axes({ flavors: allFlavors }),
isInteractive({
flavors: ['svg', 'canvas'],
defaultValue: svgDefaultProps.isInteractive,
}),
{
key: 'tooltip',
flavors: ['svg', 'canvas'],
group: 'Interactivity',
type: 'Function',
required: false,
help: 'Tooltip custom component',
description: `
A function allowing complete tooltip customisation,
it must return a valid HTML element and will receive
the following data:
\`\`\`
{
bar: {
id: string | number,
value: number,
formattedValue: string,
index: number,
indexValue: string | number,
// datum associated to the current index (raw data)
data: object
},
color: string,
label: string
}
\`\`\`
You can also customize the style of the tooltip
using the \`theme.tooltip\` object.
`,
},
{
key: 'custom tooltip example',
flavors: ['svg', 'canvas'],
group: 'Interactivity',
help: 'Showcase custom tooltip component.',
type: 'boolean',
required: false,
control: { type: 'switch' },
},
{
key: 'onClick',
flavors: ['svg', 'canvas'],
group: 'Interactivity',
type: 'Function',
required: false,
help: 'onClick handler',
description: `
onClick handler, will receive node data as first argument
& event as second one. The node data has the following shape:
\`\`\`
{
id: string | number,
value: number,
formattedValue: string,
index: number,
indexValue: string | number,
color: string,
// datum associated to the current index (raw data)
data: object
}
\`\`\`
`,
},
{
key: 'legends',
flavors: ['svg', 'canvas'],
type: 'object[]',
help: `Optional chart's legends.`,
group: 'Legends',
required: false,
control: {
type: 'array',
props: getLegendsProps(['svg']),
shouldCreate: true,
addLabel: 'add legend',
shouldRemove: true,
getItemTitle: (index: number, legend: any) =>
`legend[${index}]: ${legend.anchor}, ${legend.direction}`,
defaults: {
dataFrom: 'keys',
anchor: 'top-right',
direction: 'column',
justify: false,
translateX: 120,
translateY: 0,
itemWidth: 100,
itemHeight: 20,
itemsSpacing: 2,
symbolSize: 20,
itemDirection: 'left-to-right',
onClick: (data: any) => {
console.log(JSON.stringify(data, null, ' '))
},
},
},
},
...motionProperties(['svg'], svgDefaultProps),
{
key: 'isFocusable',
flavors: ['svg'],
required: false,
group: 'Accessibility',
help: 'Make the root SVG element and each bar item focusable, for keyboard navigation.',
description: `
If enabled, focusing will also reveal the tooltip if \`isInteractive\` is \`true\`,
when a bar gains focus and hide it on blur.
Also note that if this option is enabled, focusing a bar will reposition the tooltip
at a fixed location.
`,
type: 'boolean',
control: { type: 'switch' },
},
...commonAccessibilityProps(['svg']),
{
key: 'barAriaLabel',
flavors: ['svg'],
required: false,
group: 'Accessibility',
help: '[aria-label](path_to_url#aria-label) for bar items.',
type: '(data) => string',
},
{
key: 'barAriaLabelledBy',
flavors: ['svg'],
required: false,
group: 'Accessibility',
help: '[aria-labelledby](path_to_url#aria-labelledby) for bar items.',
type: '(data) => string',
},
{
key: 'barAriaDescribedBy',
flavors: ['svg'],
required: false,
group: 'Accessibility',
help: '[aria-describedby](path_to_url#aria-describedby) for bar items.',
type: '(data) => string',
},
{
key: 'barAriaHidden',
flavors: ['svg'],
required: false,
group: 'Accessibility',
help: '[aria-hidden](path_to_url#aria-hidden) for bar items.',
type: '(data) => boolean',
},
{
key: 'barAriaDisabled',
flavors: ['svg'],
required: false,
group: 'Accessibility',
help: '[aria-disabled](path_to_url#aria-disabled) for bar items.',
type: '(data) => boolean',
},
]
export const groups = groupProperties(props)
``` | /content/code_sandbox/website/src/data/components/bar/props.ts | xml | 2016-04-16T03:27:56 | 2024-08-16T03:38:37 | nivo | plouc/nivo | 13,010 | 4,211 |
```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="channel_name" />
<column name="group_name" />
<column name="source_uuid" />
<column name="thread_id" />
<column name="service_state" />
<column name="count_received_heartbeats" />
<column name="last_heartbeat_timestamp" />
<column name="received_transaction_set" />
<column name="last_error_number" />
<column name="last_error_message" />
<column name="last_error_timestamp" />
<column name="last_queued_transaction" />
<column name="last_queued_transaction_original_commit_timestamp" />
<column name="last_queued_transaction_immediate_commit_timestamp" />
<column name="last_queued_transaction_start_queue_timestamp" />
<column name="last_queued_transaction_end_queue_timestamp" />
<column name="queueing_transaction" />
<column name="queueing_transaction_original_commit_timestamp" />
<column name="queueing_transaction_immediate_commit_timestamp" />
<column name="queueing_transaction_start_queue_timestamp" />
</metadata>
</dataset>
``` | /content/code_sandbox/test/e2e/sql/src/test/resources/cases/dql/dataset/empty_storage_units/mysql/select_mysql_performance_schema_replication_connection_status.xml | xml | 2016-01-18T12:49:26 | 2024-08-16T15:48:11 | shardingsphere | apache/shardingsphere | 19,707 | 313 |
```xml
export { NameFormSection } from './NameFormSection';
export { appNameValidation } from './nameValidation';
``` | /content/code_sandbox/app/react/kubernetes/applications/components/NameFormSection/index.ts | xml | 2016-05-19T20:15:28 | 2024-08-16T19:15:14 | portainer | portainer/portainer | 30,083 | 23 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="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">
<ProjectGuid>{58C7E370-0EDD-4F5E-8617-3F5071170205}</ProjectGuid>
<RootNamespace>fbtracemgr</RootNamespace>
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='15.0'">10.0.17763.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='16.0'">10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion Condition="'$(VisualStudioVersion)'=='17.0'">10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='16.0'">v142</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='17.0'">v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='16.0'">v142</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='17.0'">v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='16.0'">v142</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='17.0'">v143</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>MultiByte</CharacterSet>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='15.0'">v141</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='16.0'">v142</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)'=='17.0'">v143</PlatformToolset>
</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="FirebirdCommon.props" />
<Import Project="FirebirdRelease.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="FirebirdCommon.props" />
<Import Project="FirebirdDebug.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="FirebirdCommon.props" />
<Import Project="FirebirdRelease.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="FirebirdCommon.props" />
<Import Project="FirebirdDebug.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\</OutDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\temp\$(PlatformName)\$(Configuration)\firebird\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;WIN32;_CONSOLE;SUPERCLIENT;CLIENT;DEV_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;WIN32;_CONSOLE;SUPERCLIENT;CLIENT;DEV_BUILD;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;SUPERCLIENT;CLIENT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<PreprocessorDefinitions>NDEBUG;WIN32;_CONSOLE;SUPERCLIENT;CLIENT;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;ws2_32.lib;mpr.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<DataExecutionPrevention>
</DataExecutionPrevention>
<TargetMachine>MachineX64</TargetMachine>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\src\utilities\fbtracemgr\traceMgrMain.cpp" />
<ClCompile Include="..\..\..\src\jrd\trace\TraceCmdLine.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\..\src\jrd\version.rc">
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\..\src\jrd</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\..\src\jrd</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\..\src\jrd</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\..\src\jrd</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="common.vcxproj">
<Project>{15605f44-bffd-444f-ad4c-55dc9d704465}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="yvalve.vcxproj">
<Project>{4fe03933-98cd-4879-a135-fd9430087a6b}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
``` | /content/code_sandbox/builds/win32/msvc15/fbtracemgr.vcxproj | xml | 2016-03-16T06:10:37 | 2024-08-16T14:13:51 | firebird | FirebirdSQL/firebird | 1,223 | 2,985 |
```xml
<project xmlns="path_to_url"
xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung</groupId>
<artifactId>jwt-auth-server</artifactId>
<name>jwt-auth-server</name>
<version>0.1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.1</version>
<relativePath />
</parent>
<dependencies>
<!-- web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- persistence -->
<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>
<!-- Keycloak server -->
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-multipart-provider</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>${resteasy.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-dependencies-server-all</artifactId>
<version>${keycloak.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-crypto-default</artifactId>
<version>${keycloak.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-admin-ui</artifactId>
<version>${keycloak.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-services</artifactId>
<version>${keycloak.version}</version>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-rest-admin-ui-ext</artifactId>
<version>${keycloak.version}</version>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>${liquibase.version}</version>
<exclusions>
<exclusion>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- config properties processor -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!-- test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<addResources>true</addResources>
<mainClass>com.baeldung.jwt.JWTAuthorizationServerApp</mainClass>
<requiresUnpack>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-model-jpa</artifactId>
</dependency>
</requiresUnpack>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>jks</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/*LiveTest.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
<developers>
<developer>
<email>eugen@baeldung.com</email>
<name>Eugen Paraschiv</name>
<url>path_to_url
<id>eugenp</id>
</developer>
</developers>
<properties>
<!-- non-dependencies -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>17</java.version>
<keycloak.version>24.0.4</keycloak.version>
<!-- these should be updated together with Keycloak -->
<!-- check keycloak-dependencies-server-all effective pom -->
<infinispan.version>14.0.6.Final</infinispan.version>
<resteasy.version>6.2.4.Final</resteasy.version>
<liquibase.version>4.25.1</liquibase.version>
</properties>
</project>
``` | /content/code_sandbox/oauth-jwt/jwt-auth-server/pom.xml | xml | 2016-03-02T09:04:07 | 2024-08-06T03:02:12 | spring-security-oauth | Baeldung/spring-security-oauth | 1,982 | 1,487 |
```xml
export * from "./MacOsApplicationIconExtractor";
export * from "./MacOsFolderIconExtractor";
``` | /content/code_sandbox/src/main/Core/ImageGenerator/macOS/index.ts | xml | 2016-10-11T04:59:52 | 2024-08-16T11:53:31 | ueli | oliverschwendener/ueli | 3,543 | 21 |
```xml
import { Component, inject } from "@angular/core";
import { UpdatePasswordComponent as BaseUpdatePasswordComponent } from "@bitwarden/angular/auth/components/update-password.component";
import { RouterService } from "../core";
import { AcceptOrganizationInviteService } from "./organization-invite/accept-organization.service";
@Component({
selector: "app-update-password",
templateUrl: "update-password.component.html",
})
export class UpdatePasswordComponent extends BaseUpdatePasswordComponent {
private routerService = inject(RouterService);
private acceptOrganizationInviteService = inject(AcceptOrganizationInviteService);
override async cancel() {
// clearing the login redirect url so that the user
// does not join the organization if they cancel
await this.routerService.getAndClearLoginRedirectUrl();
await this.acceptOrganizationInviteService.clearOrganizationInvitation();
await super.cancel();
}
}
``` | /content/code_sandbox/apps/web/src/app/auth/update-password.component.ts | xml | 2016-03-09T23:14:01 | 2024-08-16T15:07:51 | clients | bitwarden/clients | 8,877 | 179 |
```xml
import type { ReactNode } from 'react';
import { act, renderHook } from '@testing-library/react-hooks';
import { ModalsProvider } from '@proton/components';
import { TransferState } from '../../../components/TransferManager/transfer';
import { mockGlobalFile, testFile } from '../../../utils/test/file';
import { TransferConflictStrategy } from '../interface';
import type { FileUpload, FolderUpload } from './interface';
import useUploadConflict from './useUploadConflict';
const mockModal = jest.fn();
const mockShowModal = jest.fn();
jest.mock('../../../components/modals/ConflictModal.tsx', () => ({
useConflictModal: () => [mockModal, mockShowModal],
}));
describe('useUploadConflict', () => {
const mockUpdateState = jest.fn();
const mockUpdateWithData = jest.fn();
const mockCancelUploads = jest.fn();
let abortController: AbortController;
const renderConflict = () => {
const fileUploads: FileUpload[] = ['file1', 'file2'].map((id) => ({
id,
shareId: 'shareId',
startDate: new Date(),
state: TransferState.Conflict,
file: testFile(`${id}.txt`),
meta: {
filename: `${id}.txt`,
mimeType: 'txt',
},
numberOfErrors: 0,
}));
const folderUploads: FolderUpload[] = [];
const wrapper = ({ children }: { children: ReactNode }) => <ModalsProvider>{children}</ModalsProvider>;
const { result } = renderHook(
() => useUploadConflict(fileUploads, folderUploads, mockUpdateState, mockUpdateWithData, mockCancelUploads),
{ wrapper }
);
return result;
};
beforeEach(() => {
mockGlobalFile();
mockModal.mockClear();
mockShowModal.mockClear();
mockUpdateState.mockClear();
mockUpdateWithData.mockClear();
mockCancelUploads.mockClear();
abortController = new AbortController();
});
it('aborts promise returned by file conflict handler', async () => {
const hook = renderConflict();
await act(async () => {
const conflictHandler = hook.current.getFileConflictHandler('file1');
const promise = conflictHandler(abortController.signal);
expect(mockUpdateWithData.mock.calls).toMatchObject([
['file1', 'conflict', { originalIsFolder: undefined }],
]);
abortController.abort();
await expect(promise).rejects.toThrowError('Upload was canceled');
});
});
it('updates with info about original item', async () => {
const hook = renderConflict();
await act(async () => {
const conflictHandler = hook.current.getFileConflictHandler('file1');
const originalIsDraft = true;
const originalIsFolder = false;
const promise = conflictHandler(abortController.signal, originalIsDraft, originalIsFolder);
expect(mockUpdateWithData.mock.calls).toMatchObject([
['file1', 'conflict', { originalIsDraft, originalIsFolder }],
]);
abortController.abort();
await expect(promise).rejects.toThrowError('Upload was canceled');
});
});
it('waits and resolves in conflict strategy for one', async () => {
mockShowModal.mockImplementation(({ apply }) => {
apply(TransferConflictStrategy.Rename, false);
});
const hook = renderConflict();
await act(async () => {
const conflictHandler = hook.current.getFileConflictHandler('file1');
const promise = conflictHandler(abortController.signal);
await expect(promise).resolves.toBe(TransferConflictStrategy.Rename);
expect(mockUpdateState.mock.calls.length).toBe(1);
expect(mockUpdateState.mock.calls[0][0]).toBe('file1');
expect(mockCancelUploads.mock.calls.length).toBe(0);
});
});
it('waits and resolves in conflict strategy for all', async () => {
mockShowModal.mockImplementation(({ apply }) => {
apply(TransferConflictStrategy.Rename, true);
});
const hook = renderConflict();
await act(async () => {
const conflictHandler1 = hook.current.getFileConflictHandler('file1');
const promise1 = conflictHandler1(abortController.signal);
await expect(promise1).resolves.toBe(TransferConflictStrategy.Rename);
expect(mockUpdateState.mock.calls.length).toBe(1);
expect(mockUpdateState.mock.calls[0][0]).not.toBe('file1'); // It is dynamic function check later.
expect(mockCancelUploads.mock.calls.length).toBe(0);
const conflictHandler2 = hook.current.getFileConflictHandler('file2');
const promise2 = conflictHandler2(abortController.signal);
await expect(promise2).resolves.toBe(TransferConflictStrategy.Rename);
// Only conflicting files are updated for file resolver.
const updateState = mockUpdateState.mock.calls[0][0];
[
[TransferState.Conflict, testFile('a.txt'), true],
[TransferState.Conflict, undefined, false],
[TransferState.Progress, testFile('a.txt'), false],
[TransferState.Progress, undefined, false],
].forEach(([state, file, expectedResult]) => {
expect(updateState({ state, file })).toBe(expectedResult);
});
});
});
it('waits and cancels all uploads', async () => {
mockShowModal.mockImplementation(({ cancelAll }) => {
cancelAll();
});
const hook = renderConflict();
await act(async () => {
const conflictHandler1 = hook.current.getFileConflictHandler('file1');
const promise1 = conflictHandler1(abortController.signal);
await expect(promise1).resolves.toBe(TransferConflictStrategy.Skip);
const conflictHandler2 = hook.current.getFileConflictHandler('file2');
const promise2 = conflictHandler2(abortController.signal);
await expect(promise2).resolves.toBe(TransferConflictStrategy.Skip);
expect(mockUpdateState.mock.calls.length).toBe(0);
expect(mockCancelUploads.mock.calls.length).toBe(1);
});
});
});
``` | /content/code_sandbox/applications/drive/src/app/store/_uploads/UploadProvider/useUploadConflict.test.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 1,288 |
```xml
// Polyfills for IE11 and other ES5 browsers
// To maintain quality, we prefer polyfills without additives
// For example, we prefer Promise implementation from "core-js" than "bluebird"
// To reduce conflicts with hosting app, we should consider using
// @babel/plugin-transform-runtime to polyfill in transpiled code directly.
import 'core-js/features/array/find-index.js';
import 'core-js/features/array/find.js';
import 'core-js/features/array/from.js';
import 'core-js/features/array/includes.js';
import 'core-js/features/array/iterator.js';
import 'core-js/features/dom-collections/index.js';
import 'core-js/features/map/index.js';
import 'core-js/features/math/sign.js';
import 'core-js/features/number/is-finite.js';
import 'core-js/features/object/assign.js';
import 'core-js/features/object/entries.js';
import 'core-js/features/object/from-entries.js';
import 'core-js/features/object/is.js';
import 'core-js/features/object/values.js';
import 'core-js/features/promise/index.js';
import 'core-js/features/promise/finally.js';
import 'core-js/features/set/index.js';
import 'core-js/features/string/ends-with.js';
import 'core-js/features/string/starts-with.js';
import 'core-js/features/symbol/index.js';
import 'url-search-params-polyfill';
import 'whatwg-fetch';
``` | /content/code_sandbox/packages/bundle/src/polyfill.ts | xml | 2016-07-07T23:16:57 | 2024-08-16T00:12:37 | BotFramework-WebChat | microsoft/BotFramework-WebChat | 1,567 | 287 |
```xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
</style>
</resources>
``` | /content/code_sandbox/tinker-sample-android/app/src/main/res/values/styles.xml | xml | 2016-09-06T06:57:52 | 2024-08-16T09:58:06 | tinker | Tencent/tinker | 17,131 | 87 |
```xml
export { config } from '../internal/config';
export { InnerSubscriber } from '../internal/InnerSubscriber';
export { OuterSubscriber } from '../internal/OuterSubscriber';
export { Scheduler } from '../internal/Scheduler';
export { AnonymousSubject } from '../internal/Subject';
export { SubjectSubscription } from '../internal/SubjectSubscription';
export { Subscriber } from '../internal/Subscriber';
export { fromPromise } from '../internal/observable/fromPromise';
export { fromIterable } from '../internal/observable/fromIterable';
export { ajax } from '../internal/observable/dom/ajax';
export { webSocket } from '../internal/observable/dom/webSocket';
export { AjaxRequest, AjaxCreationMethod, ajaxGet, ajaxPost, ajaxDelete, ajaxPut, ajaxPatch, ajaxGetJSON, AjaxObservable, AjaxSubscriber, AjaxResponse, AjaxError, AjaxTimeoutError } from '../internal/observable/dom/AjaxObservable';
export { WebSocketSubjectConfig, WebSocketSubject } from '../internal/observable/dom/WebSocketSubject';
export { CombineLatestOperator } from '../internal/observable/combineLatest';
export { EventTargetLike } from '../internal/observable/fromEvent';
export { ConditionFunc, IterateFunc, ResultFunc, GenerateBaseOptions, GenerateOptions } from '../internal/observable/generate';
export { dispatch } from '../internal/observable/range';
export { SubscribeOnObservable } from '../internal/observable/SubscribeOnObservable';
export { Timestamp } from '../internal/operators/timestamp';
export { TimeInterval } from '../internal/operators/timeInterval';
export { GroupedObservable } from '../internal/operators/groupBy';
export { ThrottleConfig, defaultThrottleConfig } from '../internal/operators/throttle';
export { rxSubscriber } from '../internal/symbol/rxSubscriber';
export { iterator } from '../internal/symbol/iterator';
export { observable } from '../internal/symbol/observable';
export { ArgumentOutOfRangeError } from '../internal/util/ArgumentOutOfRangeError';
export { EmptyError } from '../internal/util/EmptyError';
export { Immediate } from '../internal/util/Immediate';
export { ObjectUnsubscribedError } from '../internal/util/ObjectUnsubscribedError';
export { TimeoutError } from '../internal/util/TimeoutError';
export { UnsubscriptionError } from '../internal/util/UnsubscriptionError';
export { applyMixins } from '../internal/util/applyMixins';
export { errorObject } from '../internal/util/errorObject';
export { hostReportError } from '../internal/util/hostReportError';
export { identity } from '../internal/util/identity';
export { isArray } from '../internal/util/isArray';
export { isArrayLike } from '../internal/util/isArrayLike';
export { isDate } from '../internal/util/isDate';
export { isFunction } from '../internal/util/isFunction';
export { isIterable } from '../internal/util/isIterable';
export { isNumeric } from '../internal/util/isNumeric';
export { isObject } from '../internal/util/isObject';
export { isInteropObservable as isObservable } from '../internal/util/isInteropObservable';
export { isPromise } from '../internal/util/isPromise';
export { isScheduler } from '../internal/util/isScheduler';
export { noop } from '../internal/util/noop';
export { not } from '../internal/util/not';
export { pipe } from '../internal/util/pipe';
export { root } from '../internal/util/root';
export { subscribeTo } from '../internal/util/subscribeTo';
export { subscribeToArray } from '../internal/util/subscribeToArray';
export { subscribeToIterable } from '../internal/util/subscribeToIterable';
export { subscribeToObservable } from '../internal/util/subscribeToObservable';
export { subscribeToPromise } from '../internal/util/subscribeToPromise';
export { subscribeToResult } from '../internal/util/subscribeToResult';
export { toSubscriber } from '../internal/util/toSubscriber';
export { tryCatch } from '../internal/util/tryCatch';
``` | /content/code_sandbox/deps/node-10.15.3/tools/node_modules/eslint/node_modules/rxjs/internal-compatibility/index.d.ts | xml | 2016-09-05T10:18:44 | 2024-08-11T13:21:40 | LiquidCore | LiquidPlayer/LiquidCore | 1,010 | 791 |
```xml
import type { FC } from 'react';
import React from 'react';
import { once } from 'storybook/internal/client-logger';
import { IconButton, Link, ResetWrapper } from 'storybook/internal/components';
import { styled } from 'storybook/internal/theming';
import { includeConditionalArg } from '@storybook/csf';
import { DocumentIcon, UndoIcon } from '@storybook/icons';
import pickBy from 'lodash/pickBy.js';
import { transparentize } from 'polished';
import { EmptyBlock } from '..';
import { ArgRow } from './ArgRow';
import { Empty } from './Empty';
import { SectionRow } from './SectionRow';
import { Skeleton } from './Skeleton';
import type { ArgType, ArgTypes, Args, Globals } from './types';
export const TableWrapper = styled.table<{
compact?: boolean;
inAddonPanel?: boolean;
isLoading?: boolean;
}>(({ theme, compact, inAddonPanel }) => ({
'&&': {
// Resets for cascading/system styles
borderSpacing: 0,
color: theme.color.defaultText,
'td, th': {
padding: 0,
border: 'none',
verticalAlign: 'top',
textOverflow: 'ellipsis',
},
// End Resets
fontSize: theme.typography.size.s2 - 1,
lineHeight: '20px',
textAlign: 'left',
width: '100%',
// Margin collapse
marginTop: inAddonPanel ? 0 : 25,
marginBottom: inAddonPanel ? 0 : 40,
'thead th:first-of-type, td:first-of-type': {
// intentionally specify thead here
width: '25%',
},
'th:first-of-type, td:first-of-type': {
paddingLeft: 20,
},
'th:nth-of-type(2), td:nth-of-type(2)': {
...(compact
? null
: {
// Description column
width: '35%',
}),
},
'td:nth-of-type(3)': {
...(compact
? null
: {
// Defaults column
width: '15%',
}),
},
'th:last-of-type, td:last-of-type': {
paddingRight: 20,
...(compact
? null
: {
// Controls column
width: '25%',
}),
},
th: {
color:
theme.base === 'light'
? transparentize(0.25, theme.color.defaultText)
: transparentize(0.45, theme.color.defaultText),
paddingTop: 10,
paddingBottom: 10,
paddingLeft: 15,
paddingRight: 15,
},
td: {
paddingTop: '10px',
paddingBottom: '10px',
'&:not(:first-of-type)': {
paddingLeft: 15,
paddingRight: 15,
},
'&:last-of-type': {
paddingRight: 20,
},
},
// Makes border alignment consistent w/other DocBlocks
marginLeft: inAddonPanel ? 0 : 1,
marginRight: inAddonPanel ? 0 : 1,
tbody: {
// Safari doesn't love shadows on tbody so we need to use a shadow filter. In order to do this,
// the table cells all need to be solid so they have a background color applied.
// I wasn't sure what kinds of content go in these tables so I was extra specific with selectors
// to avoid unexpected surprises.
...(inAddonPanel
? null
: {
filter:
theme.base === 'light'
? `drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))`
: `drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))`,
}),
'> tr > *': {
// For filter to work properly, the table cells all need to be opaque.
background: theme.background.content,
borderTop: `1px solid ${theme.appBorderColor}`,
},
...(inAddonPanel
? null
: {
// This works and I don't know why. :)
'> tr:first-of-type > *': {
borderBlockStart: `1px solid ${theme.appBorderColor}`,
},
'> tr:last-of-type > *': {
borderBlockEnd: `1px solid ${theme.appBorderColor}`,
},
'> tr > *:first-of-type': {
borderInlineStart: `1px solid ${theme.appBorderColor}`,
},
'> tr > *:last-of-type': {
borderInlineEnd: `1px solid ${theme.appBorderColor}`,
},
// Thank you, Safari, for making me write code like this.
'> tr:first-of-type > td:first-of-type': {
borderTopLeftRadius: theme.appBorderRadius,
},
'> tr:first-of-type > td:last-of-type': {
borderTopRightRadius: theme.appBorderRadius,
},
'> tr:last-of-type > td:first-of-type': {
borderBottomLeftRadius: theme.appBorderRadius,
},
'> tr:last-of-type > td:last-of-type': {
borderBottomRightRadius: theme.appBorderRadius,
},
}),
},
// End awesome table styling
},
}));
const StyledIconButton = styled(IconButton as any)(({ theme }) => ({
margin: '-4px -12px -4px 0',
}));
const ControlHeadingWrapper = styled.span({
display: 'flex',
justifyContent: 'space-between',
});
export enum ArgsTableError {
NO_COMPONENT = 'No component found.',
ARGS_UNSUPPORTED = 'Args unsupported. See Args documentation for your framework.',
}
export type SortType = 'alpha' | 'requiredFirst' | 'none';
type SortFn = (a: ArgType, b: ArgType) => number;
const sortFns: Record<SortType, SortFn | null> = {
alpha: (a: ArgType, b: ArgType) => a.name.localeCompare(b.name),
requiredFirst: (a: ArgType, b: ArgType) =>
Number(!!b.type?.required) - Number(!!a.type?.required) || a.name.localeCompare(b.name),
none: undefined,
};
export interface ArgsTableOptionProps {
children?: React.ReactNode;
updateArgs?: (args: Args) => void;
resetArgs?: (argNames?: string[]) => void;
compact?: boolean;
inAddonPanel?: boolean;
initialExpandedArgs?: boolean;
isLoading?: boolean;
sort?: SortType;
}
interface ArgsTableDataProps {
rows: ArgTypes;
args?: Args;
globals?: Globals;
}
interface ArgsTableErrorProps {
error: ArgsTableError;
}
export interface ArgsTableLoadingProps {
isLoading: boolean;
}
export type ArgsTableProps = ArgsTableOptionProps &
(ArgsTableDataProps | ArgsTableErrorProps | ArgsTableLoadingProps);
type Rows = ArgType[];
type Subsection = Rows;
type Section = {
ungrouped: Rows;
subsections: Record<string, Subsection>;
};
type Sections = {
ungrouped: Rows;
ungroupedSubsections: Record<string, Subsection>;
sections: Record<string, Section>;
};
const groupRows = (rows: ArgType, sort: SortType) => {
const sections: Sections = { ungrouped: [], ungroupedSubsections: {}, sections: {} };
if (!rows) {
return sections;
}
Object.entries(rows).forEach(([key, row]) => {
const { category, subcategory } = row?.table || {};
if (category) {
const section = sections.sections[category] || { ungrouped: [], subsections: {} };
if (!subcategory) {
section.ungrouped.push({ key, ...row });
} else {
const subsection = section.subsections[subcategory] || [];
subsection.push({ key, ...row });
section.subsections[subcategory] = subsection;
}
sections.sections[category] = section;
} else if (subcategory) {
const subsection = sections.ungroupedSubsections[subcategory] || [];
subsection.push({ key, ...row });
sections.ungroupedSubsections[subcategory] = subsection;
} else {
sections.ungrouped.push({ key, ...row });
}
});
// apply sort
const sortFn = sortFns[sort];
const sortSubsection = (record: Record<string, Subsection>) => {
if (!sortFn) {
return record;
}
return Object.keys(record).reduce<Record<string, Subsection>>(
(acc, cur) => ({
...acc,
[cur]: record[cur].sort(sortFn),
}),
{}
);
};
const sorted = {
ungrouped: sections.ungrouped.sort(sortFn),
ungroupedSubsections: sortSubsection(sections.ungroupedSubsections),
sections: Object.keys(sections.sections).reduce<Record<string, Section>>(
(acc, cur) => ({
...acc,
[cur]: {
ungrouped: sections.sections[cur].ungrouped.sort(sortFn),
subsections: sortSubsection(sections.sections[cur].subsections),
},
}),
{}
),
};
return sorted;
};
/**
* Wrap CSF's `includeConditionalArg` in a try catch so that invalid conditionals don't break the
* entire UI. We can safely swallow the error because `includeConditionalArg` is also called in the
* preview in `prepareStory`, and that exception will be bubbled up into the UI in a red screen.
* Nevertheless, we log the error here just in case.
*/
const safeIncludeConditionalArg = (row: ArgType, args: Args, globals: Globals) => {
try {
return includeConditionalArg(row, args, globals);
} catch (err) {
once.warn(err.message);
return false;
}
};
/**
* Display the props for a component as a props table. Each row is a collection of ArgDefs, usually
* derived from docgen info for the component.
*/
export const ArgsTable: FC<ArgsTableProps> = (props) => {
const {
updateArgs,
resetArgs,
compact,
inAddonPanel,
initialExpandedArgs,
sort = 'none',
isLoading,
} = props;
if ('error' in props) {
const { error } = props;
return (
<EmptyBlock>
{error}
<Link href="path_to_url" target="_blank" withArrow>
<DocumentIcon /> Read the docs
</Link>
</EmptyBlock>
);
}
// If the story is loading, show a skeleton
// This happen when you load the manager and the story is not yet loaded
// If the story is loading, show a skeleton
// This happen when you load the manager and the story is not yet loaded
if (isLoading) {
return <Skeleton />;
}
const { rows, args, globals } = 'rows' in props && props;
const groups = groupRows(
pickBy(
rows,
(row) => !row?.table?.disable && safeIncludeConditionalArg(row, args || {}, globals || {})
),
sort
);
// If there are no controls, show the empty state
const hasNoUngrouped = groups.ungrouped.length === 0;
const hasNoSections = Object.entries(groups.sections).length === 0;
const hasNoUngroupedSubsections = Object.entries(groups.ungroupedSubsections).length === 0;
if (hasNoUngrouped && hasNoSections && hasNoUngroupedSubsections) {
return <Empty inAddonPanel={inAddonPanel} />;
}
let colSpan = 1;
if (updateArgs) {
colSpan += 1;
}
if (!compact) {
colSpan += 2;
}
const expandable = Object.keys(groups.sections).length > 0;
const common = { updateArgs, compact, inAddonPanel, initialExpandedArgs };
return (
<ResetWrapper>
<TableWrapper {...{ compact, inAddonPanel }} className="docblock-argstable sb-unstyled">
<thead className="docblock-argstable-head">
<tr>
<th>
<span>Name</span>
</th>
{compact ? null : (
<th>
<span>Description</span>
</th>
)}
{compact ? null : (
<th>
<span>Default</span>
</th>
)}
{updateArgs ? (
<th>
<ControlHeadingWrapper>
Control{' '}
{!isLoading && resetArgs && (
<StyledIconButton onClick={() => resetArgs()} title="Reset controls">
<UndoIcon aria-hidden />
</StyledIconButton>
)}
</ControlHeadingWrapper>
</th>
) : null}
</tr>
</thead>
<tbody className="docblock-argstable-body">
{groups.ungrouped.map((row) => (
<ArgRow key={row.key} row={row} arg={args && args[row.key]} {...common} />
))}
{Object.entries(groups.ungroupedSubsections).map(([subcategory, subsection]) => (
<SectionRow key={subcategory} label={subcategory} level="subsection" colSpan={colSpan}>
{subsection.map((row) => (
<ArgRow
key={row.key}
row={row}
arg={args && args[row.key]}
expandable={expandable}
{...common}
/>
))}
</SectionRow>
))}
{Object.entries(groups.sections).map(([category, section]) => (
<SectionRow key={category} label={category} level="section" colSpan={colSpan}>
{section.ungrouped.map((row) => (
<ArgRow key={row.key} row={row} arg={args && args[row.key]} {...common} />
))}
{Object.entries(section.subsections).map(([subcategory, subsection]) => (
<SectionRow
key={subcategory}
label={subcategory}
level="subsection"
colSpan={colSpan}
>
{subsection.map((row) => (
<ArgRow
key={row.key}
row={row}
arg={args && args[row.key]}
expandable={expandable}
{...common}
/>
))}
</SectionRow>
))}
</SectionRow>
))}
</tbody>
</TableWrapper>
</ResetWrapper>
);
};
``` | /content/code_sandbox/code/lib/blocks/src/components/ArgsTable/ArgsTable.tsx | xml | 2016-03-18T04:23:44 | 2024-08-16T19:22:08 | storybook | storybookjs/storybook | 83,755 | 3,165 |
```xml
<resources>
<string name="app_name">BottomNavigationView</string>
</resources>
``` | /content/code_sandbox/BottomNavigationView/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 | 20 |
```xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"path_to_url" >
<mapper namespace="com.vip.saturn.job.console.mybatis.repository.UserRoleRepository">
<resultMap id="baseResultMap" type="com.vip.saturn.job.console.mybatis.entity.UserRole">
<result column="user_name" property="userName" jdbcType="VARCHAR"/>
<result column="role_key" property="roleKey" jdbcType="VARCHAR"/>
<result column="namespace" property="namespace" jdbcType="VARCHAR"/>
<result column="need_approval" property="needApproval" jdbcType="BOOLEAN"/>
<result column="created_by" property="createdBy" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="last_updated_by" property="lastUpdatedBy" jdbcType="VARCHAR"/>
<result column="last_update_time" property="lastUpdateTime" jdbcType="TIMESTAMP"/>
<result column="is_deleted" property="isDeleted" jdbcType="BOOLEAN"/>
</resultMap>
<insert id="insert" parameterType="com.vip.saturn.job.console.mybatis.entity.UserRole">
INSERT INTO `user_role`(`user_name`, `role_key`, `namespace`, `need_approval`, `created_by`, `create_time`,
`last_updated_by`, `last_update_time`, `is_deleted`)
VALUES(#{userName, jdbcType=VARCHAR}, #{roleKey, jdbcType=VARCHAR}, #{namespace, jdbcType=VARCHAR},
#{needApproval, jdbcType=BOOLEAN},#{createdBy, jdbcType=VARCHAR}, #{createTime, jdbcType=TIMESTAMP},
#{lastUpdatedBy, jdbcType=VARCHAR}, #{lastUpdateTime, jdbcType=TIMESTAMP}, #{isDeleted, jdbcType=BOOLEAN})
</insert>
<sql id="selectAllSql">
SELECT `user_name`, `role_key`, `namespace`, `need_approval`, `created_by`, `create_time`, `last_updated_by`,
`last_update_time`, `is_deleted` FROM `user_role`
</sql>
<select id="selectAll" resultMap="baseResultMap">
<include refid="selectAllSql"></include>
WHERE `is_deleted` = '0'
</select>
<select id="selectByUserName" resultMap="baseResultMap">
<include refid="selectAllSql"></include>
WHERE
`user_name` = #{userName, jdbcType=VARCHAR} AND
`is_deleted` = '0'
</select>
<select id="selectByRoleKey" resultMap="baseResultMap">
<include refid="selectAllSql"></include>
WHERE
`role_key` = #{roleKey, jdbcType=VARCHAR} AND
`is_deleted` = '0'
</select>
<select id="select" resultMap="baseResultMap">
<include refid="selectAllSql"></include>
WHERE 1 = 1 AND
<if test="userName != null">
`user_name` = #{userName, jdbcType=VARCHAR} AND
</if>
<if test="roleKey != null">
`role_key` = #{roleKey, jdbcType=VARCHAR} AND
</if>
<if test="namespace != null">
`namespace` = #{namespace, jdbcType=VARCHAR} AND
</if>
<if test="needApproval != null">
`need_approval` = #{needApproval, jdbcType=BOOLEAN} AND
</if>
`is_deleted` = '0'
</select>
<select id="selectWithNotFilterDeleted" resultMap="baseResultMap">
<include refid="selectAllSql"></include>
WHERE
`user_name` = #{userName, jdbcType=VARCHAR} AND
`role_key` = #{roleKey, jdbcType=VARCHAR} AND
`namespace` = #{namespace, jdbcType=VARCHAR}
</select>
<update id="delete">
UPDATE `user_role` SET
`is_deleted` = '1',
`last_updated_by` = #{lastUpdatedBy, jdbcType=VARCHAR}
WHERE
`user_name` = #{userName, jdbcType=VARCHAR} AND
`role_key` = #{roleKey, jdbcType=VARCHAR} AND
`namespace` = #{namespace, jdbcType=VARCHAR}
</update>
<update id="update">
UPDATE `user_role` SET
`user_name` = #{cur.userName, jdbcType=VARCHAR},
`role_key` = #{cur.roleKey, jdbcType=VARCHAR},
`namespace` = #{cur.namespace, jdbcType=VARCHAR},
`need_approval` = #{cur.needApproval, jdbcType=VARCHAR},
`last_updated_by` = #{cur.lastUpdatedBy, jdbcType=VARCHAR},
`is_deleted` = #{cur.isDeleted, jdbcType=BOOLEAN}
WHERE
`user_name` = #{pre.userName, jdbcType=VARCHAR} AND
`role_key` = #{pre.roleKey, jdbcType=VARCHAR} AND
`namespace` = #{pre.namespace, jdbcType=VARCHAR}
</update>
</mapper>
``` | /content/code_sandbox/saturn-console-api/src/main/resources/mapper/UserRoleMapper.xml | xml | 2016-11-30T08:06:30 | 2024-08-15T02:26:21 | Saturn | vipshop/Saturn | 2,272 | 1,130 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="path_to_url">
<solid android:color="#70000000"/>
<corners android:radius="4dp"/>
</shape>
``` | /content/code_sandbox/indexablerecyclerview/src/main/res/drawable/indexable_bg_center_overlay.xml | xml | 2016-03-25T06:05:32 | 2024-08-16T02:31:49 | IndexableRecyclerView | YoKeyword/IndexableRecyclerView | 1,327 | 50 |
```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>{3EF2E616-8432-4CC8-A939-9E2B143E8267}</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>
<AdditionalOptions>/EXPORT:__CxxFrameHandler4 %(AdditionalOptions)</AdditionalOptions>
</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>
<AdditionalOptions>/EXPORT:__CxxFrameHandler4 %(AdditionalOptions)</AdditionalOptions>
</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.20.27508/Build/vcruntime/vcruntime.vcxproj | xml | 2016-06-14T03:01:16 | 2024-08-12T19:23:19 | VC-LTL | Chuyu-Team/VC-LTL | 1,052 | 17,552 |
```xml
<Application
x:Class="WindowsUniversalTestApp14393.App"
xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:local="using:WindowsUniversalTestApp14393">
</Application>
``` | /content/code_sandbox/test-xamarin/WindowsUniversalTestApp14393/App.xaml | xml | 2016-04-08T16:41:51 | 2024-08-16T05:55:59 | System.Linq.Dynamic.Core | zzzprojects/System.Linq.Dynamic.Core | 1,537 | 48 |
```xml
export * from '../pages/_document'
export { default } from '../pages/_document'
``` | /content/code_sandbox/packages/next/src/api/document.tsx | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 19 |
```xml
import type { ReactNode } from 'react';
import type { IconName } from '@proton/components';
import type { Download, TransferType, Upload } from './transfer';
export interface DownloadProps {
transfer: Download;
type: TransferType.Download;
}
export interface UploadProps {
transfer: Upload;
type: TransferType.Upload;
}
export interface TransferProps<T extends TransferType> {
transfer: T extends TransferType.Download ? Download : Upload;
type: T;
}
export interface TransferManagerButtonProps {
disabled?: boolean;
testId?: string;
title: string;
onClick: () => void;
iconName: IconName;
}
export interface TransfersManagerButtonsProps {
buttons: TransferManagerButtonProps[];
className?: string;
id?: string;
children?: ReactNode;
}
``` | /content/code_sandbox/packages/drive-store/components/TransferManager/interfaces.ts | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 172 |
```xml
import moment from 'moment'
const dateFormat = 'YYYY-MM-DD HH:mm'
export const formatTimeRange = (timeRange: string | null): string => {
if (!timeRange) {
return ''
}
if (timeRange === 'now()') {
return moment(new Date()).format(dateFormat)
}
if (timeRange.match(/^now/)) {
const [, duration, unitOfTime] = timeRange.match(/(\d+)(\w+)/)
const d = duration as moment.unitOfTime.DurationConstructor
moment().subtract(d, unitOfTime)
}
return moment(timeRange.replace(/\'/g, '')).format(dateFormat)
}
``` | /content/code_sandbox/ui/src/shared/utils/time.ts | xml | 2016-08-24T23:28:56 | 2024-08-13T19:50:03 | chronograf | influxdata/chronograf | 1,494 | 145 |
```xml
import React from 'react'
import InputSelect from './InputSelect'
import InputMultiInput from './InputMultiInput'
function optionsLabelLength(options: any[]) {
let sum = 0;
options.forEach(([_, label]) => {
sum += label.length
})
return sum
}
export type InputEnumProps = {
"data-wd-key"?: string
value?: string
style?: object
default?: string
name?: string
onChange(...args: unknown[]): unknown
options: any[]
'aria-label'?: string
label?: string
};
export default class InputEnum extends React.Component<InputEnumProps> {
render() {
const {options, value, onChange, name, label} = this.props;
if(options.length <= 3 && optionsLabelLength(options) <= 20) {
return <InputMultiInput
name={name}
options={options}
value={(value || this.props.default)!}
onChange={onChange}
aria-label={this.props['aria-label'] || label}
/>
} else {
return <InputSelect
options={options}
value={(value || this.props.default)!}
onChange={onChange}
aria-label={this.props['aria-label'] || label}
/>
}
}
}
``` | /content/code_sandbox/src/components/InputEnum.tsx | xml | 2016-09-08T17:52:22 | 2024-08-16T12:54:23 | maputnik | maplibre/maputnik | 2,046 | 277 |
```xml
import styled from 'styled-components';
export const Container = styled.div`
display: flex;
align-items: stretch;
flex-grow: 1;
background-color: whitesmoke;
`;
export const AutoWidthContainer = styled.div`
display: flex;
align-items: stretch;
`;
export const FooterItem = styled.div`
position: relative;
display: flex;
align-items: center;
padding-left: 8px;
color: #666;
font-size: 13px;
&:hover {
cursor: pointer;
color: #146f8c;
transition: color 0.2s;
}
&:last-child {
color: #146f8c;
}
`;
export const rightIconContainer = styled.div`
overflow: hidden;
position: relative;
width: 20px;
height: 25px;
margin-left: 5px;
`;
export const rightIcon = styled.div`
position: absolute;
width: 25px;
height: 25px;
transform: rotate(45deg);
right: 7px;
border: 1px solid #ddd;
`;
``` | /content/code_sandbox/src/plugins/crumbs/index.style.ts | xml | 2016-09-20T11:57:51 | 2024-07-23T03:40:11 | gaea-editor | ascoders/gaea-editor | 1,339 | 251 |
```xml
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-not-found',
templateUrl: './not-found.component.html'
})
export class NotFoundComponent implements OnInit {
constructor() {}
ngOnInit() {}
}
``` | /content/code_sandbox/ClientApp/app/containers/not-found/not-found.component.ts | xml | 2016-09-20T15:25:10 | 2024-08-09T06:36:30 | aspnetcore-angular-universal | TrilonIO/aspnetcore-angular-universal | 1,464 | 48 |
```xml
import { NavigationComponent, NavigationComponentProps, Options } from 'react-native-navigation';
interface Props extends NavigationComponentProps {
order: OrderDetails;
}
class OrderScreen extends NavigationComponent<Props> {
static options(props: Props): Options {
return {
topBar: {
title: {
text: props.order.orderId,
},
},
};
}
}
``` | /content/code_sandbox/website/docs/docs/style-screens/static-options-props-class.tsx | xml | 2016-03-11T11:22:54 | 2024-08-15T09:05:44 | react-native-navigation | wix/react-native-navigation | 13,021 | 79 |
```xml
import * as React from 'react';
import createSvgIcon from '../utils/createSvgIcon';
const ReadingModeIcon = createSvgIcon({
svg: ({ classes }) => (
<svg xmlns="path_to_url" viewBox="0 0 2048 2048" className={classes.svg} focusable="false">
<path d="M1920 256v1664H0V256h256V128h384q88 0 169 27t151 81q69-54 150-81t170-27h384v128h256zm-640 0q-70 0-136 23t-120 69v1254q59-33 124-49t132-17h256V256h-256zM384 1536h256q67 0 132 16t124 50V348q-54-45-120-68t-136-24H384v1280zm-256 256h806q-32-31-65-54t-68-40-75-25-86-9H256V384H128v1408zM1792 384h-128v1280h-384q-46 0-85 8t-75 25-69 40-65 55h806V384z" />
</svg>
),
displayName: 'ReadingModeIcon',
});
export default ReadingModeIcon;
``` | /content/code_sandbox/packages/react-icons-mdl2/src/components/ReadingModeIcon.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 304 |
```xml
import * as autoprefixer from 'autoprefixer';
// tslint:disable:variable-name
const Browsers = require('autoprefixer/lib/browsers');
const Prefixes = require('autoprefixer/lib/prefixes');
// tslint:enable:variable-name
/**
* Utility to be used when checking whether a CSS declaration needs to be prefixed. Based on
* Stylelint's `no-vendor-prefix` rule, but instead of checking whether a rule has a prefix,
* we check whether it needs one.
* Reference path_to_url
*/
export class NeedsPrefix {
private _prefixes: {
add: Record<string, any>;
browsers: {selected: string[]};
};
constructor(browsers: string[]) {
this._prefixes = new Prefixes(
autoprefixer.data.prefixes,
new Browsers(autoprefixer.data.browsers, browsers),
);
}
/** Checks whether an @-rule needs to be prefixed. */
atRule(identifier: string): boolean {
return !!this._prefixes.add[`@${identifier.toLowerCase()}`];
}
/** Checks whether a selector needs to be prefixed. */
selector(identifier: string): boolean {
return this._prefixes.add.selectors.some((selectorObj: any) => {
return identifier.toLowerCase() === selectorObj.name;
});
}
/** Checks whether a media query value needs to be prefixed. */
mediaFeature(identifier: string): boolean {
return identifier.toLowerCase().indexOf('device-pixel-ratio') > -1;
}
/** Checks whether a property needs to be prefixed. */
property(identifier: string, value: string): string[] {
// `fill` is an edge case since it was part of a proposal that got renamed to `stretch`.
// see: path_to_url#changes
if (!identifier || identifier === 'fill') {
return [];
}
// `text-decoration` is another edge case which is supported
// unprefixed everywhere, except for the shorthand which requires a
// prefix on iOS. See: path_to_url
if (identifier === 'text-decoration' && !value.includes(' ')) {
return [];
}
const needsPrefix = autoprefixer.data.prefixes[identifier.toLowerCase()];
const browsersThatNeedPrefix = (needsPrefix as {browsers: string[]} | null)?.browsers || [];
return browsersThatNeedPrefix.filter(browser =>
this._prefixes.browsers.selected.includes(browser),
);
}
/** Checks whether a CSS property value needs to be prefixed. */
value(prop: string, value: string): boolean {
if (!prop || !value) {
return false;
}
const possiblePrefixableValues =
this._prefixes.add[prop.toLowerCase()] && this._prefixes.add[prop.toLowerCase()].values;
return (
!!possiblePrefixableValues &&
possiblePrefixableValues.some((valueObj: any) => {
return value.toLowerCase() === valueObj.name;
})
);
}
}
``` | /content/code_sandbox/tools/stylelint/no-prefixes/needs-prefix.ts | xml | 2016-01-04T18:50:02 | 2024-08-16T11:21:13 | components | angular/components | 24,263 | 625 |
```xml
<frames>
<frame0>
<robot0>
<X>0.384188</X>
<Y>0.267666</Y>
<R>100</R>
<G>0</G>
<B>0</B>
<Orientation>1.35254e+06</Orientation>
</robot0>
<robot1>
<X>0.521416</X>
<Y>0.117381</Y>
<R>100</R>
<G>0</G>
<B>0</B>
<Orientation>1.1491e+06</Orientation>
</robot1>
<robot2>
<X>0.429332</X>
<Y>0.387446</Y>
<R>100</R>
<G>0</G>
<B>0</B>
<Orientation>48.3457</Orientation>
</robot2>
<robot3>
<X>0.555107</X>
<Y>0.132936</Y>
<R>100</R>
<G>0</G>
<B>0</B>
<Orientation>28.9554</Orientation>
</robot3>
<robot4>
<X>0.43458</X>
<Y>0.240624</Y>
<R>100</R>
<G>0</G>
<B>0</B>
<Orientation>1.78086e+06</Orientation>
</robot4>
<robot5>
<X>0.214513</X>
<Y>0.149013</Y>
<R>100</R>
<G>0</G>
<B>0</B>
<Orientation>209.043</Orientation>
</robot5>
<robot6>
<X>0.146788</X>
<Y>0.318558</Y>
<R>100</R>
<G>0</G>
<B>0</B>
<Orientation>-356.324</Orientation>
</robot6>
<robot7>
<X>0.405798</X>
<Y>0.254309</Y>
<R>100</R>
<G>0</G>
<B>0</B>
<Orientation>-370.906</Orientation>
</robot7>
<robot8>
<X>0.620235</X>
<Y>0.0961371</Y>
<R>100</R>
<G>0</G>
<B>0</B>
<Orientation>-229.274</Orientation>
</robot8>
<robot9>
<X>0.1842</X>
<Y>0.185816</Y>
<R>100</R>
<G>0</G>
<B>0</B>
<Orientation>-85.1669</Orientation>
</robot9>
</frame0>
</frames>
``` | /content/code_sandbox/Software/Applications/Examples/Zooid_Keyframe/bin/data/smile.xml | xml | 2016-07-20T23:21:47 | 2024-08-12T19:58:09 | SwarmUI | ShapeLab/SwarmUI | 1,525 | 733 |
```xml
import { svgIcon } from "../icon";
export const Search = svgIcon`
<svg width="120" height="120" fill="none" xmlns="path_to_url">
<g opacity=".49">
<path class="tw-fill-secondary-300" fill-rule="evenodd" clip-rule="evenodd" d="M40.36 73.256a30.004 30.004 0 0 0 10.346 1.826c16.282 0 29.482-12.912 29.482-28.84 0-.384-.008-.766-.023-1.145h28.726v39.57H40.36v-11.41Z" />
<path class="tw-stroke-secondary-600" d="M21.546 46.241c0 15.929 13.2 28.841 29.482 28.841S80.51 62.17 80.51 46.241c0-15.928-13.2-28.841-29.482-28.841S21.546 30.313 21.546 46.241Z" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
<path class="tw-fill-secondary-600" d="M35.36 70.595a1.2 1.2 0 0 0-2.4 0h2.4Zm77.475-30.356a2.343 2.343 0 0 1 2.365 2.33h2.4c0-2.593-2.107-4.73-4.765-4.73v2.4Zm2.365 2.33v46.047h2.4V42.57h-2.4Zm0 46.047c0 1.293-1.058 2.33-2.365 2.33v2.4c2.59 0 4.765-2.069 4.765-4.73h-2.4Zm-2.365 2.33h-75.11v2.4h75.11v-2.4Zm-75.11 0a2.343 2.343 0 0 1-2.365-2.33h-2.4c0 2.594 2.107 4.73 4.766 4.73v-2.4Zm-2.365-2.33v-18.02h-2.4v18.02h2.4Zm44.508-48.377h32.967v-2.4H79.868v2.4Z" />
<path class="tw-stroke-secondary-600" d="M79.907 45.287h29.114v39.57H40.487V73.051" stroke-width="2" stroke-linejoin="round" />
<path class="tw-stroke-secondary-600" d="M57.356 102.56h35.849" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
<path class="tw-stroke-secondary-600" d="M68.954 92.147v10.413m11.599-10.413v10.413" stroke-width="4" stroke-linejoin="round" />
<path class="tw-stroke-secondary-600" d="m27.44 64.945-4.51 4.51L5.72 86.663a3 3 0 0 0 0 4.243l1.238 1.238a3 3 0 0 0 4.243 0L28.41 74.936l4.51-4.51" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" />
<path class="tw-stroke-secondary-600" d="M101.293 53.154H85.178m16.115 6.043H90.214m-5.036 0h-7.553m23.668 6.043h-7.05m-5.54 0h-15.61m28.2 6.042H85.178m-5.538 0h-8.562m30.215 6.043H78.632m-5.539 0H60m-5.54 0h-8.057" stroke-width="2" stroke-linecap="round" />
<path class="tw-stroke-secondary-600" d="M29.164 33.01h41.529a2.4 2.4 0 0 1 2.4 2.4v6.28a2.4 2.4 0 0 1-2.4 2.4h-41.53a2.4 2.4 0 0 1-2.4-2.4v-6.28a2.4 2.4 0 0 1 2.4-2.4Z" stroke-width="4" />
<path class="tw-stroke-secondary-600" d="M22.735 54.16h34.361a2.4 2.4 0 0 1 2.4 2.4v6.28a2.4 2.4 0 0 1-2.4 2.4H28.778m50.358-11.08h-6.161a2.4 2.4 0 0 0-2.4 2.4v6.414a2.266 2.266 0 0 0 2.266 2.265" stroke-width="4" stroke-linecap="round" />
</g>
</svg>
`;
``` | /content/code_sandbox/libs/components/src/icon/icons/search.ts | xml | 2016-03-09T23:14:01 | 2024-08-16T15:07:51 | clients | bitwarden/clients | 8,877 | 1,311 |
```xml
import 'rxjs-compat/add/observable/of';
``` | /content/code_sandbox/deps/node-10.15.3/tools/node_modules/eslint/node_modules/rxjs/src/add/observable/of.ts | xml | 2016-09-05T10:18:44 | 2024-08-11T13:21:40 | LiquidCore | LiquidPlayer/LiquidCore | 1,010 | 11 |
```xml
export * from './extensions.token';
``` | /content/code_sandbox/npm/ng-packs/packages/identity/src/lib/tokens/index.ts | xml | 2016-12-03T22:56:24 | 2024-08-16T16:24:05 | abp | abpframework/abp | 12,657 | 8 |
```xml
export const appProps = {
Component: (props: object) => <div {...props}>Component</div>,
pageProps: { test: '' },
}
export const contributors = [
{
url: 'path_to_url
avatar: 'path_to_url
id: 'contributor-id-123',
},
]
export const contributorsMock = [
{
html_url: 'path_to_url
avatar_url: 'path_to_url
id: 'contributor-id-123',
login: 'carloscuesta',
},
]
``` | /content/code_sandbox/packages/website/src/__tests__/stubs.tsx | xml | 2016-10-21T09:36:02 | 2024-08-16T14:16:08 | gitmoji | carloscuesta/gitmoji | 15,539 | 119 |
```xml
export interface IHelloWorldWebPartProps {
description: string;
test: string;
test1: boolean;
test2: string;
test3: boolean;
}
``` | /content/code_sandbox/tutorials/tutorial-getting-started/helloworld-webpart/src/webparts/helloWorld/IHelloWorldWebPartProps.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 39 |
```xml
export const types = `
type ExportHistory {
_id: String!
total: String
contentType: String
date: Date
status: String
user: User
exportLink: String
name: String
percentage: Float
uploadType: String
errorMsg: String
}
type ExportHistoryList {
list: [ExportHistory]
count: Int
}
`;
export const queries = `
exportHistories(perPage: Int, page: Int, type: String): ExportHistoryList
exportHistoryDetail(_id: String!): ImportHistory
exportHistoryGetColumns(attachmentName: String): JSON
exportHistoryGetDuplicatedHeaders(attachmentNames: [String]): JSON
`;
export const mutations = `
exportHistoriesCreate(contentType: String!, columnsConfig: [String], segmentData: JSON, name: String): JSON
`;
``` | /content/code_sandbox/packages/workers/src/data/schema/exportHistory.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 194 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string-array name="sort_options">
<item>Nome</item>
<item>Data</item>
<item>Dimensione </item>
<item>Dimensione </item>
</string-array>
<string-array name="sort_options_images">
<item>Nome </item>
<item>Nome </item>
<item>Data </item>
<item>Data </item>
</string-array>
<string-array name="filter_options_history">
<item>Create</item>
<item>Eliminate</item>
<item>Rinominate</item>
<item>Ruotate</item>
<item>Stampate</item>
<item>Decodificate</item>
<item>Crittografate</item>
<item>Invertite</item>
</string-array>
</resources>
``` | /content/code_sandbox/app/src/main/res/values-it/arrays.xml | xml | 2016-02-22T10:00:46 | 2024-08-16T15:37:50 | Images-to-PDF | Swati4star/Images-to-PDF | 1,174 | 203 |
```xml
export {};
//# sourceMappingURL=test-crypto.d.ts.map
``` | /content/code_sandbox/lib.commonjs/_tests/test-crypto.d.ts | xml | 2016-07-16T04:35:37 | 2024-08-16T13:37:46 | ethers.js | ethers-io/ethers.js | 7,843 | 11 |
```xml
import {Component, inject} from '@angular/core';
import {MatSnackBar} from '@angular/material/snack-bar';
import {MatButtonModule} from '@angular/material/button';
import {MatInputModule} from '@angular/material/input';
import {MatFormFieldModule} from '@angular/material/form-field';
/**
* @title Basic snack-bar
*/
@Component({
selector: 'snack-bar-overview-example',
templateUrl: 'snack-bar-overview-example.html',
styleUrl: 'snack-bar-overview-example.css',
standalone: true,
imports: [MatFormFieldModule, MatInputModule, MatButtonModule],
})
export class SnackBarOverviewExample {
private _snackBar = inject(MatSnackBar);
openSnackBar(message: string, action: string) {
this._snackBar.open(message, action);
}
}
``` | /content/code_sandbox/src/components-examples/material/snack-bar/snack-bar-overview/snack-bar-overview-example.ts | xml | 2016-01-04T18:50:02 | 2024-08-16T11:21:13 | components | angular/components | 24,263 | 168 |
```xml
export declare function registerServerReferenceDEV(proxy: typeof Proxy, reference: string, encodeFormAction: string): any;
export declare function getServerReference(reference: string): Function | undefined;
export declare function getDebugDescription(): string;
//# sourceMappingURL=server-actions.d.ts.map
``` | /content/code_sandbox/packages/expo-router/build/server-actions.d.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 56 |
```xml
<?xml version="1.0" encoding="utf-8" ?>
<menu xmlns:android="path_to_url"
xmlns:app="path_to_url">
<item
android:id="@+id/eventlog_search"
android:title="@string/search"
android:icon="@android:drawable/ic_menu_search"
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="always|collapseActionView"/>
<item android:id="@+id/returnHome"
android:title="@string/return_to_home_screen"
android:checkable="false"
android:orderInCategory="3"
android:onClick="returnHome"
android:visible="true"
android:showAsAction="never"/>
</menu>
``` | /content/code_sandbox/app/src/main/res/menu/menu_eventlog_activity.xml | xml | 2016-09-23T13:33:17 | 2024-08-15T09:51:19 | xDrip | NightscoutFoundation/xDrip | 1,365 | 162 |
```xml
/**
* @license
*
* 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.
*/
export function removeChildren(element: HTMLElement) {
while (true) {
const child = element.firstChild;
if (!child) {
break;
}
element.removeChild(child);
}
}
export function removeFromParent(element: HTMLElement) {
const { parentElement } = element;
if (parentElement) {
parentElement.removeChild(element);
return true;
}
return false;
}
export function updateInputFieldWidth(
element: HTMLInputElement,
length = Math.max(1, element.value.length),
) {
const newWidth = `${length}ch`;
if (element.style.width !== newWidth) {
// Force additional reflow to work around Chrome bug.
element.style.width = "0px";
element.offsetWidth;
element.style.width = newWidth;
}
}
export function updateChildren(
element: HTMLElement,
children: Iterable<HTMLElement>,
) {
let nextChild = element.firstElementChild;
for (const child of children) {
if (child !== nextChild) {
element.insertBefore(child, nextChild);
}
nextChild = child.nextElementSibling;
}
while (nextChild !== null) {
const next = nextChild.nextElementSibling;
element.removeChild(nextChild);
nextChild = next;
}
}
export function isInputTextTarget(target: EventTarget | null) {
if (!(target instanceof HTMLElement)) return false;
if (
target instanceof HTMLInputElement ||
target instanceof HTMLTextAreaElement ||
target.isContentEditable
) {
return true;
}
return false;
}
export function measureElementClone(element: HTMLElement) {
const clone = element.cloneNode(/*deep=*/ true) as HTMLElement;
clone.style.position = "absolute";
document.body.appendChild(clone);
return clone.getBoundingClientRect();
}
``` | /content/code_sandbox/src/util/dom.ts | xml | 2016-05-27T02:37:25 | 2024-08-16T07:24:25 | neuroglancer | google/neuroglancer | 1,045 | 415 |
```xml
import { Component } from '@angular/core';
import { MockServerResultsService } from '../paging/mock-server-results-service';
import { PagedData } from '../paging/model/paged-data';
import { CorporateEmployee } from '../paging/model/corporate-employee';
import { Page } from '../paging/model/page';
import { ColumnMode } from 'projects/swimlane/ngx-datatable/src/public-api';
@Component({
selector: 'summary-row-server-paging-demo',
providers: [MockServerResultsService],
template: `
<div>
<h3>
Server-side paging
<small>
<a
href="path_to_url"
>
Source
</a>
</small>
</h3>
<ngx-datatable
class="material"
[rows]="rows"
[columns]="columns"
[columnMode]="ColumnMode.force"
[headerHeight]="50"
[summaryRow]="true"
[summaryHeight]="55"
[footerHeight]="50"
rowHeight="auto"
[externalPaging]="true"
[count]="page.totalElements"
[offset]="page.pageNumber"
[limit]="page.size"
(page)="setPage($event)"
>
</ngx-datatable>
</div>
`
})
export class SummaryRowServerPagingComponent {
page = new Page();
rows = new Array<CorporateEmployee>();
columns = [
// NOTE: cells for current page only !
{ name: 'Name', summaryFunc: cells => `${cells.length} total` },
{ name: 'Gender', summaryFunc: () => this.getGenderSummary() },
{ name: 'Company', summaryFunc: () => null }
];
ColumnMode = ColumnMode;
constructor(private serverResultsService: MockServerResultsService) {
this.page.pageNumber = 0;
this.page.size = 20;
}
ngOnInit() {
this.setPage({ offset: 0 });
}
/**
* Populate the table with new data based on the page number
* @param page The page to select
*/
setPage(pageInfo) {
this.page.pageNumber = pageInfo.offset;
this.serverResultsService.getResults(this.page).subscribe(pagedData => {
this.page = pagedData.page;
this.rows = pagedData.data;
});
}
getGenderSummary(): string {
// NOTE: there should be logic to get required informations from server
return '10 males, 10 females';
}
}
``` | /content/code_sandbox/src/app/summary/summary-row-server-paging.component.ts | xml | 2016-05-31T19:25:47 | 2024-08-06T15:02:47 | ngx-datatable | swimlane/ngx-datatable | 4,624 | 539 |
```xml
/* eslint-disable @typescript-eslint/unified-signatures */
import * as path from "path";
import * as ws from "ws";
import { dartVMPath, tenMinutesInMs } from "../constants";
import { LogCategory } from "../enums";
import { DartSdks, IAmDisposable, Logger } from "../interfaces";
import { CategoryLogger } from "../logging";
import { PromiseCompleter, PromiseOr, disposeAll } from "../utils";
import { UnknownNotification } from "./interfaces";
import { StdIOService } from "./stdio_service";
import { DebugSessionChangedEvent, DebugSessionStartedEvent, DebugSessionStoppedEvent, DeviceAddedEvent, DeviceChangedEvent, DeviceRemovedEvent, DeviceSelectedEvent, DtdMessage, DtdRequest, DtdResponse, DtdResult, EnablePlatformTypeParams, Event, EventKind, GetDebugSessionsResult, GetDevicesResult, GetIDEWorkspaceRootsParams, GetIDEWorkspaceRootsResult, HotReloadParams, HotRestartParams, OpenDevToolsPageParams, ReadFileAsStringParams, ReadFileAsStringResult, RegisterServiceParams, RegisterServiceResult, SelectDeviceParams, Service, ServiceMethod, SetIDEWorkspaceRootsParams, SetIDEWorkspaceRootsResult, Stream, SuccessResult } from "./tooling_daemon_services";
export class DartToolingDaemon implements IAmDisposable {
protected readonly disposables: IAmDisposable[] = [];
private readonly logger: CategoryLogger;
private readonly dtdProcess: DartToolingDaemonProcess;
private connection: ConnectionInfo | undefined;
private nextId = 1;
private completers: { [key: string]: PromiseCompleter<DtdResult> } = {};
private serviceHandlers: { [key: string]: (params?: object) => PromiseOr<DtdResult> } = {};
private hasShownTerminatedError = false;
private isShuttingDown = false;
private connectedCompleter = new PromiseCompleter<ConnectionInfo | undefined>();
public get connected() { return this.connectedCompleter.promise; }
constructor(
logger: Logger,
sdks: DartSdks,
maxLogLineLength: number | undefined,
getToolEnv: () => any,
private readonly promptToReloadExtension: (prompt?: string, buttonText?: string, offerLog?: boolean) => Promise<void>,
) {
this.logger = new CategoryLogger(logger, LogCategory.DartToolingDaemon);
this.dtdProcess = new DartToolingDaemonProcess(this.logger, sdks, maxLogLineLength, getToolEnv);
this.disposables.push(this.dtdProcess);
void this.dtdProcess.dtdUri.then(() => this.connect());
void this.dtdProcess.processExit.then(() => this.handleClose());
}
public get dtdUri(): Promise<string | undefined> {
return this.dtdProcess.dtdUri;
}
private async connect() {
const dtdUri = await this.dtdProcess.dtdUri;
if (!dtdUri)
return;
const dtdSecret = await this.dtdProcess.dtdSecret;
this.logger.info(`Connecting to DTD at ${dtdUri}...`);
const socket = new ws.WebSocket(dtdUri, { followRedirects: true });
socket.on("open", () => this.handleOpen());
socket.on("message", (data) => this.handleData(data.toString()));
socket.on("close", () => this.handleClose());
socket.on("error", (e) => this.handleError(e));
this.connection = { socket, dtdUri, dtdSecret };
}
private handleOpen() {
this.logger.info(`Connected to DTD`);
this.connectedCompleter.resolve(this.connection);
}
protected async sendWorkspaceFolders(workspaceFolderUris: string[]): Promise<void> {
const connection = await this.connected;
if (connection) {
const secret = connection.dtdSecret;
await this.callMethod(ServiceMethod.setIDEWorkspaceRoots, { secret, roots: workspaceFolderUris });
}
}
private async handleData(data: string) {
this.logTraffic(`<== ${data}\n`);
const json = JSON.parse(data) as DtdMessage;
const id = json.id;
const method = json.method;
if (id !== undefined && method) {
const request = json as DtdRequest;
// Handle service request.
const serviceHandler = this.serviceHandlers[method];
if (serviceHandler) {
const result = await serviceHandler(request.params);
await this.send({
id,
jsonrpc: "2.0",
result,
});
}
} else if (id) {
// Handle response.
const completer: PromiseCompleter<DtdResult> = this.completers[id];
const response = json as DtdResponse;
if (completer) {
delete this.completers[id];
if ("error" in response)
completer.reject(response.error);
else
completer.resolve(response.result);
}
}
}
public async registerService(service: Service.Editor, method: "getDevices", capabilities: object | undefined, f: () => PromiseOr<DtdResult & GetDevicesResult>): Promise<void>;
public async registerService(service: Service.Editor, method: "selectDevice", capabilities: object | undefined, f: (params: SelectDeviceParams) => PromiseOr<DtdResult & SuccessResult>): Promise<void>;
public async registerService(service: Service.Editor, method: "enablePlatformType", capabilities: object | undefined, f: (params: EnablePlatformTypeParams) => PromiseOr<DtdResult & SuccessResult>): Promise<void>;
public async registerService(service: Service.Editor, method: "getDebugSessions", capabilities: object | undefined, f: () => PromiseOr<DtdResult & GetDebugSessionsResult>): Promise<void>;
public async registerService(service: Service.Editor, method: "hotReload", capabilities: object | undefined, f: (params: HotReloadParams) => PromiseOr<DtdResult & SuccessResult>): Promise<void>;
public async registerService(service: Service.Editor, method: "hotRestart", capabilities: object | undefined, f: (params: HotRestartParams) => PromiseOr<DtdResult & SuccessResult>): Promise<void>;
public async registerService(service: Service.Editor, method: "openDevToolsPage", capabilities: object | undefined, f: (params: OpenDevToolsPageParams) => PromiseOr<DtdResult & SuccessResult>): Promise<void>;
public async registerService(service: Service, method: string, capabilities: object | undefined, f: (params: any) => PromiseOr<DtdResult>): Promise<void> {
const serviceName = Service[service];
const resp = await this.callMethod(ServiceMethod.registerService, { service: serviceName, method, capabilities });
if (resp.type !== "Success") {
throw new Error(`Failed to register service ${serviceName}.${method}: ${resp.type}`);
}
this.serviceHandlers[`${serviceName}.${method}`] = f;
}
public callMethod(service: ServiceMethod.registerService, params: RegisterServiceParams): Promise<RegisterServiceResult>;
public callMethod(service: ServiceMethod.setIDEWorkspaceRoots, params: SetIDEWorkspaceRootsParams): Promise<SetIDEWorkspaceRootsResult>;
public callMethod(service: ServiceMethod.getIDEWorkspaceRoots, params: GetIDEWorkspaceRootsParams): Promise<GetIDEWorkspaceRootsResult>;
public callMethod(service: ServiceMethod.readFileAsString, params: ReadFileAsStringParams): Promise<ReadFileAsStringResult>;
public callMethod(service: string, params?: unknown): Promise<DtdResult>;
public async callMethod(method: ServiceMethod, params?: unknown): Promise<DtdResult> {
if (!this.connection)
return Promise.reject("DTD connection is unavailable");
const id = `${this.nextId++}`;
const completer = new PromiseCompleter<DtdResult>();
this.completers[id] = completer;
await this.send({
id,
jsonrpc: "2.0",
method,
params,
});
return completer.promise;
}
public sendEvent(stream: Stream.Editor, params: DeviceAddedEvent | DeviceRemovedEvent | DeviceChangedEvent | DeviceSelectedEvent): void;
public sendEvent(stream: Stream.Editor, params: DebugSessionStartedEvent | DebugSessionStoppedEvent | DebugSessionChangedEvent): void;
public sendEvent(stream: Stream, params: Event): void {
if (!this.connection)
throw Error("DTD connection is unavailable");
void this.send({
jsonrpc: "2.0",
method: "postEvent",
params: {
eventData: { ...params, kind: undefined },
eventKind: EventKind[params.kind],
streamId: Stream[stream],
},
});
}
private send(json: DtdMessage) {
if (!this.connection)
return Promise.reject("DTD connection is unavailable");
const str = JSON.stringify(json);
this.logTraffic(`==> ${str}\n`);
this.connection.socket.send(str);
}
protected handleClose() {
this.logger.info(`DTD connection closed`);
if (!this.isShuttingDown && !this.hasShownTerminatedError) {
const which = this.dtdProcess.hasTerminated ? "process" : "connection";
this.showTerminatedError(which, this.dtdProcess.hasReceivedConnectionInfo ? "has terminated" : "failed to start");
}
this.dispose();
}
private handleError(e: Error) {
this.logger.error(`${e}`);
}
private logTraffic(message: string) {
this.logger.info(message);
}
private lastShownTerminatedError: number | undefined;
private readonly noRepeatTerminatedErrorThresholdMs = tenMinutesInMs;
private showTerminatedError(which: "connection" | "process", message: string) {
// Don't show this notification if we've shown it recently.
if (this.lastShownTerminatedError && Date.now() - this.lastShownTerminatedError < this.noRepeatTerminatedErrorThresholdMs)
return;
this.lastShownTerminatedError = Date.now();
// This flag is set here, but checked in handleUncleanExit because explicit calls
// here can override hasShownTerminationError, for example to show the error when
// something tries to interact with the API (`notifyRequestAfterExit`).
this.hasShownTerminatedError = true;
void this.promptToReloadExtension(`The Dart Tooling Daemon ${which} ${message}.`, undefined, true);
}
public dispose(): any {
this.isShuttingDown = true;
try {
this.connection?.socket?.close();
this.connection = undefined;
} catch { }
disposeAll(this.disposables);
}
}
class DartToolingDaemonProcess extends StdIOService<UnknownNotification> {
public hasReceivedConnectionInfo = false;
private dtdUriCompleter = new PromiseCompleter<string | undefined>();
private dtdSecretCompleter = new PromiseCompleter<string>();
private processExitCompleter = new PromiseCompleter<void>();
public hasTerminated = false;
public get dtdUri(): Promise<string | undefined> {
return this.dtdUriCompleter.promise;
}
public get dtdSecret(): Promise<string> {
return this.dtdSecretCompleter.promise;
}
public get processExit(): Promise<void> {
return this.processExitCompleter.promise;
}
constructor(logger: Logger, private readonly sdks: DartSdks, maxLogLineLength: number | undefined, getToolEnv: () => any) {
super(logger, maxLogLineLength, true, true);
const executable = path.join(this.sdks.dart, dartVMPath);
const daemonArgs = [
"tooling-daemon",
"--machine",
];
this.createProcess(undefined, executable, daemonArgs, { toolEnv: getToolEnv() });
}
protected handleExit(code: number | null, signal: NodeJS.Signals | null) {
this.hasTerminated = true;
super.handleExit(code, signal);
this.processExitCompleter.resolve();
this.dtdUriCompleter.resolve(undefined);
}
protected shouldHandleMessage(_message: string): boolean {
// DTD only emits one thing we care about but it's not in the same format
// as our other things, so we treat every message as unhandled and extract
// the info in processUnhandledMessage.
return false;
}
protected async handleNotification(_evt: UnknownNotification): Promise<void> {
// We never get here because shouldHandleMessage is always false.
}
protected async processUnhandledMessage(message: string): Promise<void> {
message = message.trim();
if (!this.hasReceivedConnectionInfo && message.startsWith("{") && message.endsWith("}")) {
try {
const json = JSON.parse(message);
if (json?.tooling_daemon_details?.uri && json?.tooling_daemon_details?.trusted_client_secret) {
this.dtdUriCompleter.resolve(json?.tooling_daemon_details?.uri as string);
this.dtdSecretCompleter.resolve(json?.tooling_daemon_details?.trusted_client_secret as string);
this.hasReceivedConnectionInfo = true;
}
} catch { }
}
}
}
interface ConnectionInfo { socket: ws.WebSocket; dtdUri: string, dtdSecret: string }
``` | /content/code_sandbox/src/shared/services/tooling_daemon.ts | xml | 2016-07-30T13:49:11 | 2024-08-10T16:23:15 | Dart-Code | Dart-Code/Dart-Code | 1,472 | 2,791 |
```xml
import { addRecentlyRecord } from "./recently";
import { StatusList } from "../define";
/**
*
*/
class NaotuBase {
/**
*
*/
private _kmPath: string | null;
public getCurrentKm(): string | null {
return this._kmPath;
}
public setCurrentKm(value: string | null) {
this._kmPath = value;
//
if (value) addRecentlyRecord(value);
}
private _state: StatusList;
public getState() {
return this._state;
}
public setState(str: StatusList) {
this._state = str;
}
//
private _savedNum: number;
//
private _changedNum: number;
/**
*
*/
public OnSaved() {
this._savedNum = this._changedNum;
}
/**
*
*/
public OnEdited() {
this._changedNum++;
}
/**
*
*/
public HasSaved() {
//
return this._changedNum === this._savedNum;
}
//#region
//
private static instance: NaotuBase;
/**
*
*/
private constructor() {
this._state = "none";
this._kmPath = null;
this._changedNum = 0;
this._savedNum = 0;
}
/**
*
*/
public static getInstance(): NaotuBase {
if (!this.instance) {
this.instance = new NaotuBase();
}
return this.instance;
}
//#endregion
}
export let naotuBase: NaotuBase = NaotuBase.getInstance();
``` | /content/code_sandbox/app/src/lib/base.ts | xml | 2016-11-08T01:32:30 | 2024-08-15T06:02:18 | DesktopNaotu | NaoTu/DesktopNaotu | 4,189 | 364 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="path_to_url"
android:id="@+id/error_view"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
style="@style/MultipleStatusView.Content"
android:id="@+id/error_view_tv"
android:text="@string/error_view_hint"/>
</RelativeLayout>
``` | /content/code_sandbox/multiple-status-view/src/main/res/layout/error_view.xml | xml | 2016-01-17T06:48:05 | 2024-08-06T07:27:56 | MultipleStatusView | qyxxjd/MultipleStatusView | 1,688 | 88 |
```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
/**
* Returns the median of a Pareto (Type I) distribution.
*
* ## Notes
*
* - If `alpha <= 0` or `beta <= 0`, the function returns `NaN`.
*
* @param alpha - shape parameter
* @param beta - scale parameter
* @returns median
*
* @example
* var v = median( 1.0, 1.0 );
* // returns 2.0
*
* @example
* var v = median( 4.0, 12.0 );
* // returns ~14.27
*
* @example
* var v = median( 8.0, 2.0 );
* // returns ~2.181
*
* @example
* var v = median( 1.0, -0.1 );
* // returns NaN
*
* @example
* var v = median( -0.1, 1.0 );
* // returns NaN
*
* @example
* var v = median( 2.0, NaN );
* // returns NaN
*
* @example
* var v = median( NaN, 2.0 );
* // returns NaN
*/
declare function median( alpha: number, beta: number ): number;
// EXPORTS //
export = median;
``` | /content/code_sandbox/lib/node_modules/@stdlib/stats/base/dists/pareto-type1/median/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 333 |
```xml
// --> ipcMain
import { app, BrowserWindow, globalShortcut, Menu, ipcMain } from "electron";
import { logger } from "./core/logger";
import { naotuConf } from "./core/conf";
import { sIndexUrl } from "./define";
// Main Method
(() => {
let safeExit = false;
//
logger.info(`app start.`);
// Keep a global reference of the window object, if you don't, the window will
// be closed automatically when the JavaScript object is garbage collected.
let mainWindow: Electron.BrowserWindow | null;
const isDevMode = process.execPath.match(/[\\/]electron/);
process.on('unhandledRejection', error => {
logger.error('unhandledRejection');
});
// main.ts
const createWindow = async () => {
//
Menu.setApplicationMenu(null);
//
naotuConf.upgrade();
//
// 700
let conf = naotuConf.getModel();
let userWidth = (conf.editorWindowWidth && conf.editorWindowWidth >= 700)
? conf.editorWindowWidth : 1000;
let userHeight = (conf.editorWindowHeight && conf.editorWindowHeight >= 700)
? conf.editorWindowHeight : 800;
logger.info(`Last saved window size: [${[userWidth, userHeight]}]`);
// Create the browser window.
mainWindow = new BrowserWindow({
minWidth: 700,
minHeight: 700,
width: userWidth,
height: userHeight,
fullscreenable: true,
show: false,
backgroundColor: "#fbfbfb",
webPreferences: {
nodeIntegration: true,
contextIsolation: false
},
});
// and load the index.html of the app.
logger.info(`open url ${sIndexUrl} `);
mainWindow.loadURL(sIndexUrl);
globalShortcut.register("CmdOrCtrl+Shift+D", () => {
if (mainWindow) {
// Open the DevTools.
mainWindow.webContents.toggleDevTools();
}
});
// Emitted when the window is closed.
mainWindow.on("closed", () => {
// Dereference the window object, usually you would store windows
// in an array if your app supports multi windows, this is the time
// when you should delete the corresponding element.
mainWindow = null;
});
mainWindow.on("ready-to-show", () => {
if (mainWindow) {
mainWindow.show();
mainWindow.focus();
}
});
mainWindow.on("close", e => {
if (!safeExit) {
if (mainWindow) {
//
try {
//
let confObj = naotuConf.getModel();
//
confObj.editorWindowWidth = mainWindow.getSize()[0];
confObj.editorWindowHeight = mainWindow.getSize()[1];
//
naotuConf.save(confObj);
logger.info(`Saved current window size: [${confObj.editorWindowWidth}, ${confObj.editorWindowHeight}]`);
} catch (ex) {
logger.error(ex);
}
//
mainWindow.webContents.send("action", "exit");
}
e.preventDefault();
}
});
};
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on("ready", createWindow);
// Quit when all windows are closed.
app.on("window-all-closed", () => {
if (mainWindow) {
if (isDevMode) {
globalShortcut.unregisterAll();
}
// On OS X it is common for applications and their menu bar
// to stay active until the user quits explicitly with Cmd + Q
if (process.platform !== "darwin") {
app.quit();
}
}
return false;
});
app.on("activate", () => {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (mainWindow === null) {
createWindow();
}
});
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and import them here.
// global.sharedObject = { prop1: process.argv };
logger.info(`process.argv: ${process.argv}`);
//
ipcMain.on("reqaction", (event: Event, arg: string) => {
switch (arg) {
case "exit":
logger.info("app exit successfully!");
safeExit = true;
app.quit(); //
break;
}
});
})();
``` | /content/code_sandbox/app/src/main.ts | xml | 2016-11-08T01:32:30 | 2024-08-15T06:02:18 | DesktopNaotu | NaoTu/DesktopNaotu | 4,189 | 1,010 |
```xml
import {OperationVerbs} from "../../constants/OperationVerbs.js";
import {Operation} from "./operation.js";
export function Subscribe(event: string) {
return Operation(OperationVerbs.SUBSCRIBE, event);
}
``` | /content/code_sandbox/packages/specs/schema/src/decorators/operations/subscribe.ts | xml | 2016-02-21T18:38:47 | 2024-08-14T21:19:48 | tsed | tsedio/tsed | 2,817 | 45 |
```xml
// tests/server.test.ts
// Tests for the server creating function.
import { afterEach, describe, test, expect, vi } from 'vitest';
import { extend as createFetch } from 'got';
import { loadConfiguration } from '../source/utilities/config.js';
import { startServer } from '../source/utilities/server.js';
import { logger } from '../source/utilities/logger.js';
// The path to the fixtures for this test file.
const fixture = 'tests/__fixtures__/server/';
// The configuration from the fixture.
const config = await loadConfiguration(process.cwd(), fixture, {});
// A `fetch` instance to make requests to the server.
const fetch = createFetch({ throwHttpErrors: false });
afterEach(() => {
vi.restoreAllMocks();
});
describe('utilities/server', () => {
// Make sure the server starts on the specified port.
test('start server on specified port', async () => {
const address = await startServer({ port: 3001 }, config, {});
expect(address.local).toBe('path_to_url
expect(address.network).toMatch(/^http:\/\/.*:3001$/);
expect(address.previous).toBeUndefined();
const response = await fetch(address.local!);
expect(response.ok);
});
// Make sure the server starts on the specified port and host.
test('start server on specified port and host', async () => {
const address = await startServer({ port: 3002, host: '::1' }, config, {});
expect(address.local).toBe('path_to_url
expect(address.network).toMatch(/^http:\/\/.*:3002$/);
expect(address.previous).toBeUndefined();
const response = await fetch(address.local!);
expect(response.ok);
});
// Make sure the server starts on the specified port and host.
test('start server on different port if port is already occupied', async () => {
const address = await startServer({ port: 3002, host: '::1' }, config, {});
expect(address.local).not.toBe('path_to_url
expect(address.network).not.toMatch(/^http:\/\/.*:3002$/);
expect(address.previous).toBe(3002);
const response = await fetch(address.local!);
expect(response.ok);
});
// Make sure the server logs requests by default.
test('log requests to the server by default', async () => {
const consoleSpy = vi.spyOn(logger, 'http');
const address = await startServer({ port: 3003, host: '::1' }, config, {});
const response = await fetch(address.local!);
expect(response.ok);
expect(consoleSpy).toBeCalledTimes(2);
const requestLog = consoleSpy.mock.calls[0].join(' ');
const responseLog = consoleSpy.mock.calls[1].join(' ');
const time = new Date();
const formattedTime = `${time.toLocaleDateString()} ${time.toLocaleTimeString()}`;
const ip = '::1';
const requestString = 'GET /';
const status = 200;
expect(requestLog).toMatch(
new RegExp(`${formattedTime}.*${ip}.*${requestString}`),
);
expect(responseLog).toMatch(
new RegExp(
`${formattedTime}.*${ip}.*Returned ${status} in [0-9][0-9]? ms`,
),
);
});
// Make sure the server logs requests by default.
test('log requests to the server by default', async () => {
const consoleSpy = vi.spyOn(logger, 'http');
const address = await startServer({ port: 3004 }, config, {
'--no-request-logging': true,
});
const response = await fetch(address.local!);
expect(response.ok);
expect(consoleSpy).not.toHaveBeenCalled();
});
});
``` | /content/code_sandbox/tests/server.test.ts | xml | 2016-04-27T03:58:25 | 2024-08-16T05:46:59 | serve | vercel/serve | 9,295 | 801 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug|x64">
<Configuration>debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release|x64">
<Configuration>release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{223559A7-4AD8-97C2-820A-599906DBF2CC}</ProjectGuid>
<RootNamespace>Effects11</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'">
<OutDir>./../../lib/WIN64\</OutDir>
<IntDir>./x64/Effects11/debug\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>Effects11DEBUG</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'">
<ClCompile>
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions>/fp:fast /MTd /Zi /Oi /Oy- /EHsc /GS /Gd /nologo /wd4748</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(WindowsSDK_IncludePath);./../../include/Effects11;./../../include/Effects11/Binary;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN64;_UNICODE;UNICODE;_WINDOWS;_WIN32_WINNT=0x0600;_CRT_SECURE_NO_DEPRECATE;_LIB;_DEBUG;PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Lib>
<AdditionalOptions>/MACHINE:x64 /SUBSYSTEM:WINDOWS /NOLOGO</AdditionalOptions>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)Effects11DEBUG.lib</OutputFile>
<AdditionalLibraryDirectories>$(WindowsSDK_LibraryPath_x64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/Effects11DEBUG.lib.pdb</ProgramDatabaseFile>
<TargetMachine>MachineX64</TargetMachine>
</Lib>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'">
<OutDir>./../../lib/WIN64\</OutDir>
<IntDir>./x64/Effects11/release\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>Effects11</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'">
<ClCompile>
<FloatingPointModel>Precise</FloatingPointModel>
<AdditionalOptions>/fp:fast /MT /Zi /Oi /Oy- /GL /EHsc /GS /Gy /nologo /wd4748</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(WindowsSDK_IncludePath);./../../include/Effects11;./../../include/Effects11/Binary;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN64;_UNICODE;UNICODE;_WINDOWS;_WIN32_WINNT=0x0600;_CRT_SECURE_NO_DEPRECATE;_LIB;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<WarningLevel>Level4</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
</ClCompile>
<Lib>
<AdditionalOptions>/MACHINE:x64 /SUBSYSTEM:WINDOWS /NOLOGO</AdditionalOptions>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)Effects11.lib</OutputFile>
<AdditionalLibraryDirectories>$(WindowsSDK_LibraryPath_x64);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(OutDir)/Effects11.lib.pdb</ProgramDatabaseFile>
<TargetMachine>MachineX64</TargetMachine>
</Lib>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\src\Effects11\d3dxGlobal.cpp">
</ClCompile>
<ClCompile Include="..\..\src\Effects11\EffectAPI.cpp">
</ClCompile>
<ClCompile Include="..\..\src\Effects11\EffectLoad.cpp">
</ClCompile>
<ClCompile Include="..\..\src\Effects11\EffectNonRuntime.cpp">
</ClCompile>
<ClCompile Include="..\..\src\Effects11\EffectReflection.cpp">
</ClCompile>
<ClCompile Include="..\..\src\Effects11\EffectRuntime.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\Effects11\Binary\EffectBinaryFormat.h">
</ClInclude>
<ClInclude Include="..\..\include\Effects11\Binary\EffectStateBase11.h">
</ClInclude>
<ClInclude Include="..\..\include\Effects11\Binary\EffectStates11.h">
</ClInclude>
<ClInclude Include="..\..\include\Effects11\Binary\SOParser.h">
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\include\Effects11\d3dx11effect.h">
</ClInclude>
<ClInclude Include="..\..\include\Effects11\d3dxGlobal.h">
</ClInclude>
<ClInclude Include="..\..\include\Effects11\Effect.h">
</ClInclude>
<ClInclude Include="..\..\include\Effects11\EffectLoad.h">
</ClInclude>
<ClInclude Include="..\..\include\Effects11\IUnknownImp.h">
</ClInclude>
<ClInclude Include="..\..\include\Effects11\pchfx.h">
</ClInclude>
<ClInclude Include="..\..\include\Effects11\EffectVariable.inl">
</ClInclude>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"></ImportGroup>
</Project>
``` | /content/code_sandbox/APEX_1.4/externals/extensions/externals/build/vs2017WIN64/Effects11.vcxproj | xml | 2016-10-12T16:34:31 | 2024-08-16T09:40:38 | PhysX-3.4 | NVIDIAGameWorks/PhysX-3.4 | 2,343 | 1,970 |
```xml
/* eslint react/jsx-key: off */
import * as React from 'react';
import { useFormContext } from 'react-hook-form';
import {
Create,
SaveButton,
AutocompleteInput,
TabbedForm,
TextInput,
Toolbar,
required,
useNotify,
usePermissions,
useUnique,
} from 'react-admin';
import Aside from './Aside';
const UserEditToolbar = ({ permissions, ...props }) => {
const notify = useNotify();
const { reset } = useFormContext();
return (
<Toolbar {...props}>
<SaveButton label="user.action.save_and_show" />
{permissions === 'admin' && (
<SaveButton
label="user.action.save_and_add"
mutationOptions={{
onSuccess: () => {
notify('ra.notification.created', {
type: 'info',
messageArgs: {
smart_count: 1,
},
});
reset();
},
}}
type="button"
variant="text"
/>
)}
</Toolbar>
);
};
const isValidName = async value =>
new Promise<string | undefined>(resolve =>
setTimeout(() =>
resolve(value === 'Admin' ? "Can't be Admin" : undefined)
)
);
const UserCreate = () => {
const { permissions } = usePermissions();
const unique = useUnique();
return (
<Create aside={<Aside />} redirect="show">
<TabbedForm
mode="onBlur"
warnWhenUnsavedChanges
toolbar={<UserEditToolbar permissions={permissions} />}
>
<TabbedForm.Tab label="user.form.summary" path="">
<TextInput
source="name"
defaultValue="Slim Shady"
autoFocus
validate={[required(), isValidName, unique()]}
/>
</TabbedForm.Tab>
{permissions === 'admin' && (
<TabbedForm.Tab label="user.form.security" path="security">
<AutocompleteInput
source="role"
choices={[
{ id: '', name: 'None' },
{ id: 'admin', name: 'Admin' },
{ id: 'user', name: 'User' },
{ id: 'user_simple', name: 'UserSimple' },
]}
validate={[required()]}
/>
</TabbedForm.Tab>
)}
</TabbedForm>
</Create>
);
};
export default UserCreate;
``` | /content/code_sandbox/examples/simple/src/users/UserCreate.tsx | xml | 2016-07-13T07:58:54 | 2024-08-16T18:32:27 | react-admin | marmelab/react-admin | 24,624 | 514 |
```xml
import * as React from 'react';
import { CSSModule } from './utils';
export interface ListProps extends React.HTMLAttributes<HTMLElement> {
[key: string]: any;
tag?: React.ElementType;
cssModule?: CSSModule;
type?: string;
}
declare class List extends React.Component<ListProps> {}
export default List;
``` | /content/code_sandbox/types/lib/List.d.ts | xml | 2016-02-19T08:01:36 | 2024-08-16T11:48:48 | reactstrap | reactstrap/reactstrap | 10,591 | 72 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Checkstyle//DTD Checkstyle Configuration 1.3//EN" "path_to_url">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: Checks
Description: none
-->
<module name="Checker">
<property name="severity" value="error"/>
<module name="TreeWalker">
<module name="AvoidStarImport">
<property name="allowClassImports" value="false"/>
<property name="allowStaticMemberImports" value="false"/>
</module>
<property name="tabWidth" value="4"/>
<module name="JavadocStyle">
<property name="checkHtml" value="false"/>
</module>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName"/>
<module name="MemberName">
<property name="format" value="^(([a-z][a-zA-Z0-9]*$)|(_[A-Z][a-zA-Z0-9]*_[a-z][a-zA-Z0-9]*$))"/>
</module>
<module name="MethodName"/>
<module name="PackageName"/>
<module name="ParameterName"/>
<module name="TypeName">
<property name="format" value="^[A-Z][_a-zA-Z0-9]*$"/>
</module>
<module name="RedundantImport"/>
<module name="UnusedImports"/>
<module name="MethodParamPad"/>
<module name="NoWhitespaceAfter">
<property name="tokens" value="ARRAY_INIT,BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS"/>
</module>
<module name="NoWhitespaceBefore">
<property name="tokens" value="SEMI,DOT,POST_DEC,POST_INC"/>
</module>
<module name="ParenPad"/>
<module name="TypecastParenPad">
<property name="tokens" value="RPAREN,TYPECAST"/>
</module>
<module name="WhitespaceAfter"/>
<module name="WhitespaceAround">
<property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
</module>
<module name="RedundantModifier"/>
<module name="AvoidNestedBlocks">
<property name="allowInSwitchCase" value="true"/>
</module>
<module name="EmptyBlock">
<property name="option" value="text"/>
<property name="tokens" value="LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_IF,LITERAL_TRY,LITERAL_WHILE,STATIC_INIT"/>
</module>
<module name="LeftCurly"/>
<module name="NeedBraces"/>
<module name="RightCurly"/>
<module name="EmptyStatement"/>
<module name="HiddenField">
<property name="severity" value="ignore"/>
<property name="ignoreConstructorParameter" value="true"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="FinalClass"/>
<module name="HideUtilityClassConstructor">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="ArrayTypeStyle"/>
<module name="UpperEll"/>
<module name="FallThrough"/>
<module name="FinalLocalVariable">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="MultipleVariableDeclarations"/>
<module name="StringLiteralEquality">
<property name="severity" value="error"/>
</module>
<module name="SuperFinalize"/>
<module name="UnnecessaryParentheses">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="Indentation">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="StaticVariableName">
<property name="format" value="^[A-Za-z][a-zA-Z0-9]*$"/>
</module>
<module name="EmptyForInitializerPad"/>
<module name="EmptyForIteratorPad"/>
<module name="ModifierOrder"/>
<module name="DefaultComesLast"/>
<module name="InnerAssignment">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="ModifiedControlVariable"/>
<module name="MutableException">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="ParameterAssignment">
<property name="severity" value="ignore"/>
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
</module>
<module name="RegexpSinglelineJava">
<metadata name="net.sf.eclipsecs.core.comment" value="Illegal trailing whitespace(s) at the end of the line."/>
<property name="format" value="\s$"/>
<property name="message" value="Illegal trailing whitespace(s) at the end of the line."/>
<property name="ignoreComments" value="true"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Checks for trailing spaces at the end of a line"/>
</module>
<module name="RegexpSinglelineJava">
<metadata name="net.sf.eclipsecs.core.comment" value="illegal space before a comma"/>
<property name="format" value=" ,"/>
<property name="message" value="illegal space before a comma"/>
<property name="ignoreComments" value="true"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Checks for whitespace before a comma."/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.customMessage" value="Illegal whitespace before a comma."/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="[^\x00-\x7F]"/>
<property name="message" value="Only use ASCII characters."/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="new (Hashtable|Vector|Stack|StringBuffer)[^\w]"/>
<property name="message" value="Don't use old synchronized collection classes"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="instanceof MoveOp"/>
<property name="message" value="Do not use `op instanceof MoveOp`. Use `MoveOp.isMoveOp(op)` instead!"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="instanceof ValueMoveOp"/>
<property name="message" value="Do not use `op instanceof ValueMoveOp`. Use `ValueMoveOp.isValueMoveOp(op)` instead!"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="instanceof LoadConstantOp"/>
<property name="message" value="Do not use `op instanceof LoadConstantOp`. Use `LoadConstantOp.isLoadConstantOp(op)` instead!"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\(MoveOp\)"/>
<property name="message" value="Do not cast directly to `MoveOp`. Use `MoveOp.asMoveOp(op)` instead!"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\(ValueMoveOp\)"/>
<property name="message" value="Do not cast directly to `ValueMoveOp`. Use `ValueMoveOp.asValueMoveOp(op)` instead!"/>
</module>
<module name="RegexpSinglelineJava">
<property name="format" value="\(LoadConstantOp\)"/>
<property name="message" value="Do not cast directly to `LoadConstantOp`. Use `LoadConstantOp.asLoadConstantOp(op)` instead!"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Checkstyle: stop constant name check"/>
<property name="onCommentFormat" value="Checkstyle: resume constant name check"/>
<property name="checkFormat" value="ConstantNameCheck"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Allow non-conforming constant names"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Checkstyle: stop method name check"/>
<property name="onCommentFormat" value="Checkstyle: resume method name check"/>
<property name="checkFormat" value="MethodName"/>
<property name="checkC" value="false"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable method name checks"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle: stop parameter assignment check"/>
<property name="onCommentFormat" value="CheckStyle: resume parameter assignment check"/>
<property name="checkFormat" value="ParameterAssignment"/>
<property name="checkC" value="false"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable Parameter Assignment"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Checkstyle: stop final variable check"/>
<property name="onCommentFormat" value="Checkstyle: resume final variable check"/>
<property name="checkFormat" value="FinalLocalVariable"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable final variable checks"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle: stop inner assignment check"/>
<property name="onCommentFormat" value="CheckStyle: resume inner assignment check"/>
<property name="checkFormat" value="InnerAssignment"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable inner assignment checks"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Checkstyle: stop field name check"/>
<property name="onCommentFormat" value="Checkstyle: resume field name check"/>
<property name="checkFormat" value="MemberName"/>
<property name="checkC" value="false"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable field name checks"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle: stop header check"/>
<property name="onCommentFormat" value="CheckStyle: resume header check"/>
<property name="checkFormat" value=".*Header"/>
<metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="Disable header checks"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle: stop line length check"/>
<property name="onCommentFormat" value="CheckStyle: resume line length check"/>
<property name="checkFormat" value="LineLength"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="CheckStyle: start generated"/>
<property name="onCommentFormat" value="CheckStyle: stop generated"/>
<property name="checkFormat" value=".*Name|.*LineLength|.*Header"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="Checkstyle: stop"/>
<property name="onCommentFormat" value="Checkstyle: resume"/>
<property name="checkFormat" value=".*"/>
</module>
<module name="SuppressionCommentFilter">
<property name="offCommentFormat" value="@formatter:off"/>
<property name="onCommentFormat" value="@formatter:on"/>
<property name="checkFormat" value=".*"/>
</module>
<module name="Regexp">
<property name="illegalPattern" value="true"/>
<property name="message" value="Single year shouldn't be duplicated"/>
</module>
</module>
<module name="LineLength">
<property name="max" value="250"/>
</module>
<module name="RegexpHeader">
</module>
<module name="FileTabCharacter">
<property name="severity" value="error"/>
<property name="fileExtensions" value="java"/>
</module>
<module name="NewlineAtEndOfFile">
<property name="lineSeparator" value="lf"/>
</module>
<module name="Translation"/>
<module name="RegexpMultiline">
<metadata name="net.sf.eclipsecs.core.comment" value="illegal Windows line ending"/>
<property name="format" value="\r\n"/>
<property name="message" value="illegal Windows line ending"/>
</module>
<module name="SuppressWithPlainTextCommentFilter">
<property name="offCommentFormat" value="// @formatter:off"/>
<property name="onCommentFormat" value="// @formatter:on"/>
</module>
</module>
``` | /content/code_sandbox/sdk/src/org.graalvm.word/.checkstyle_checks.xml | xml | 2016-01-14T17:11:35 | 2024-08-16T17:54:25 | graal | oracle/graal | 20,129 | 3,106 |
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
import gcusumkbn2 = require( './index' );
// TESTS //
// The function returns a numeric array...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2( x.length, 0.0, x, 1, y, 1 ); // $ExpectType NumericArray
}
// The compiler throws an error if the function is provided a first argument which is not a number...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2( '10', 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( true, 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( false, 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( null, 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( undefined, 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( [], 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( {}, 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( ( x: number ): number => x, 0.0, x, 1, y, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a second argument which is not a number...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2( x.length, '10', 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, true, 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, false, 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, null, 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, undefined, 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, [], 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, {}, 0.0, x, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, ( x: number ): number => x, 0.0, x, 1, y, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a third argument which is not a numeric array...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2( x.length, 0.0, 10, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, '10', 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, true, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, false, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, null, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, undefined, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, [ '1' ], 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, {}, 1, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, ( x: number ): number => x, 1, y, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a fourth argument which is not a number...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2( x.length, 0.0, x, '10', y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, true, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, false, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, null, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, undefined, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, [], y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, {}, y, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, ( x: number ): number => x, y, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a fifth argument which is not a numeric array...
{
const x = new Float64Array( 10 );
gcusumkbn2( x.length, 0.0, x, 1, 10, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, '10', 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, true, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, false, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, null, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, undefined, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, [ '1' ], 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, {}, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, ( x: number ): number => x, 1 ); // $ExpectError
}
// The compiler throws an error if the function is provided a sixth argument which is not a number...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2( x.length, 0.0, x, 1, y, '10' ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, y, true ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, y, false ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, y, null ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, y, undefined ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, y, [] ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, y, {} ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, y, ( x: number ): number => x ); // $ExpectError
}
// The compiler throws an error if the function is provided an unsupported number of arguments...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2(); // $ExpectError
gcusumkbn2( x.length ); // $ExpectError
gcusumkbn2( x.length, 0.0 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1 ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, y ); // $ExpectError
gcusumkbn2( x.length, 0.0, x, 1, y, 1, 10 ); // $ExpectError
}
// Attached to main export is an `ndarray` method which returns a numeric array...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectType NumericArray
}
// The compiler throws an error if the `ndarray` method is provided a first argument which is not a number...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2.ndarray( '10', 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( true, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( false, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( null, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( undefined, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( [], 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( {}, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( ( x: number ): number => x, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a second argument which is not a number...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2.ndarray( x.length, '10', 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, true, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, false, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, null, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, undefined, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, [], 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, {}, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, ( x: number ): number => x, 0.0, x, 1, 0, y, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a third argument which is not a numeric array...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2.ndarray( x.length, 0.0, 10, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, '10', 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, true, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, false, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, null, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, undefined, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, [ '1' ], 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, {}, 1, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, ( x: number ): number => x, 1, 0, y, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2.ndarray( x.length, 0.0, x, '10', 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, true, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, false, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, null, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, undefined, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, [], 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, {}, 0, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, ( x: number ): number => x, 0, y, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a number...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2.ndarray( x.length, 0.0, x, 1, '10', y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, true, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, false, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, null, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, undefined, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, [], y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, {}, y, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, ( x: number ): number => x, y, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a numeric array...
{
const x = new Float64Array( 10 );
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, 10, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, '10', 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, true, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, false, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, null, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, undefined, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, [ '1' ], 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, {}, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, ( x: number ): number => x, 1, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, '10', 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, true, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, false, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, null, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, undefined, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, [], 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, {}, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, ( x: number ): number => x, 0 ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a number...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1, '10' ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1, true ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1, false ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1, null ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1, undefined ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1, [] ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1, {} ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1, ( x: number ): number => x ); // $ExpectError
}
// The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments...
{
const x = new Float64Array( 10 );
const y = new Float64Array( 10 );
gcusumkbn2.ndarray(); // $ExpectError
gcusumkbn2.ndarray( x.length ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1 ); // $ExpectError
gcusumkbn2.ndarray( x.length, 0.0, x, 1, 0, y, 1, 0, 10 ); // $ExpectError
}
``` | /content/code_sandbox/lib/node_modules/@stdlib/blas/ext/base/gcusumkbn2/docs/types/test.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 5,336 |
```xml
import * as path from "path";
import { app, BrowserWindow, Menu, MenuItemConstructorOptions, nativeImage, Tray } from "electron";
import { firstValueFrom } from "rxjs";
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
import { DesktopSettingsService } from "../platform/services/desktop-settings.service";
import { WindowMain } from "./window.main";
export class TrayMain {
contextMenu: Menu;
private appName: string;
private tray: Tray;
private icon: string | Electron.NativeImage;
private pressedIcon: Electron.NativeImage;
constructor(
private windowMain: WindowMain,
private i18nService: I18nService,
private desktopSettingsService: DesktopSettingsService,
) {
if (process.platform === "win32") {
this.icon = path.join(__dirname, "/images/icon.ico");
} else if (process.platform === "darwin") {
const nImage = nativeImage.createFromPath(path.join(__dirname, "/images/icon-template.png"));
nImage.setTemplateImage(true);
this.icon = nImage;
this.pressedIcon = nativeImage.createFromPath(
path.join(__dirname, "/images/icon-highlight.png"),
);
} else {
this.icon = path.join(__dirname, "/images/icon.png");
}
}
async init(appName: string, additionalMenuItems: MenuItemConstructorOptions[] = null) {
this.appName = appName;
const menuItemOptions: MenuItemConstructorOptions[] = [
{
label: this.i18nService.t("showHide"),
click: () => this.toggleWindow(),
},
{ type: "separator" },
{
label: this.i18nService.t("exit"),
click: () => this.closeWindow(),
},
];
if (additionalMenuItems != null) {
menuItemOptions.splice(1, 0, ...additionalMenuItems);
}
this.contextMenu = Menu.buildFromTemplate(menuItemOptions);
if (await firstValueFrom(this.desktopSettingsService.trayEnabled$)) {
this.showTray();
}
}
setupWindowListeners(win: BrowserWindow) {
win.on("minimize", async (e: Event) => {
if (await firstValueFrom(this.desktopSettingsService.minimizeToTray$)) {
e.preventDefault();
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.hideToTray();
}
});
win.on("close", async (e: Event) => {
if (await firstValueFrom(this.desktopSettingsService.closeToTray$)) {
if (!this.windowMain.isQuitting) {
e.preventDefault();
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.hideToTray();
}
}
});
win.on("show", async () => {
const enableTray = await firstValueFrom(this.desktopSettingsService.trayEnabled$);
if (!enableTray) {
setTimeout(() => this.removeTray(false), 100);
}
});
}
removeTray(showWindow = true) {
// Due to path_to_url
// we cannot destroy the tray icon on linux.
if (this.tray != null && process.platform !== "linux") {
this.tray.destroy();
this.tray = null;
}
if (showWindow && this.windowMain.win != null && !this.windowMain.win.isVisible()) {
this.windowMain.win.show();
}
}
async hideToTray() {
this.showTray();
if (this.windowMain.win != null) {
this.windowMain.win.hide();
}
if (this.isDarwin() && !(await firstValueFrom(this.desktopSettingsService.alwaysShowDock$))) {
this.hideDock();
}
}
restoreFromTray() {
if (this.windowMain.win == null || !this.windowMain.win.isVisible()) {
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.toggleWindow();
}
}
showTray() {
if (this.tray != null) {
return;
}
this.tray = new Tray(this.icon);
this.tray.setToolTip(this.appName);
this.tray.on("click", () => this.toggleWindow());
this.tray.on("right-click", () => this.tray.popUpContextMenu(this.contextMenu));
if (this.pressedIcon != null) {
this.tray.setPressedImage(this.pressedIcon);
}
if (this.contextMenu != null && !this.isDarwin()) {
this.tray.setContextMenu(this.contextMenu);
}
}
updateContextMenu() {
if (this.tray != null && this.contextMenu != null && this.isLinux()) {
this.tray.setContextMenu(this.contextMenu);
}
}
private hideDock() {
app.dock.hide();
}
private showDock() {
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
app.dock.show();
}
private isDarwin() {
return process.platform === "darwin";
}
private isLinux() {
return process.platform === "linux";
}
private async toggleWindow() {
if (this.windowMain.win == null) {
if (this.isDarwin()) {
// On MacOS, closing the window via the red button destroys the BrowserWindow instance.
// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.
// eslint-disable-next-line @typescript-eslint/no-floating-promises
this.windowMain.createWindow().then(() => {
this.windowMain.win.show();
this.showDock();
});
}
return;
}
if (this.windowMain.win.isVisible()) {
this.windowMain.win.hide();
if (this.isDarwin() && !(await firstValueFrom(this.desktopSettingsService.alwaysShowDock$))) {
this.hideDock();
}
} else {
this.windowMain.win.show();
if (this.isDarwin()) {
this.showDock();
}
}
}
private closeWindow() {
this.windowMain.isQuitting = true;
if (this.windowMain.win != null) {
this.windowMain.win.close();
}
}
}
``` | /content/code_sandbox/apps/desktop/src/main/tray.main.ts | xml | 2016-03-09T23:14:01 | 2024-08-16T15:07:51 | clients | bitwarden/clients | 8,877 | 1,455 |
```xml
import * as React from 'react';
import { useCallback } from 'react';
import DownloadIcon from '@mui/icons-material/GetApp';
import {
fetchRelatedRecords,
useDataProvider,
useNotify,
Exporter,
useListContext,
useResourceContext,
} from 'ra-core';
import { Button, ButtonProps } from './Button';
/**
* Export the selected rows
*
* To be used inside the <Datagrid bulkActionButtons> prop.
*
* @example // basic usage
* import { BulkDeleteButton, BulkExportButton, List, Datagrid } from 'react-admin';
*
* const PostBulkActionButtons = () => (
* <>
* <BulkExportButton />
* <BulkDeleteButton />
* </>
* );
*
* export const PostList = () => (
* <List>
* <Datagrid bulkActionButtons={<PostBulkActionButtons />}>
* ...
* </Datagrid>
* </List>
* );
*/
export const BulkExportButton = (props: BulkExportButtonProps) => {
const {
onClick,
label = 'ra.action.export',
icon = defaultIcon,
exporter: customExporter,
meta,
...rest
} = props;
const resource = useResourceContext(props);
const { exporter: exporterFromContext, selectedIds } = useListContext();
const exporter = customExporter || exporterFromContext;
const dataProvider = useDataProvider();
const notify = useNotify();
const handleClick = useCallback(
event => {
if (exporter && resource) {
dataProvider
.getMany(resource, { ids: selectedIds, meta })
.then(({ data }) =>
exporter(
data,
fetchRelatedRecords(dataProvider),
dataProvider,
resource
)
)
.catch(error => {
console.error(error);
notify('ra.notification.http_error', {
type: 'error',
});
});
}
if (typeof onClick === 'function') {
onClick(event);
}
},
[dataProvider, exporter, notify, onClick, resource, selectedIds, meta]
);
return (
<Button
onClick={handleClick}
label={label}
{...sanitizeRestProps(rest)}
>
{icon}
</Button>
);
};
const defaultIcon = <DownloadIcon />;
const sanitizeRestProps = ({
resource,
...rest
}: Omit<BulkExportButtonProps, 'exporter' | 'label' | 'meta'>) => rest;
interface Props {
exporter?: Exporter;
icon?: JSX.Element;
label?: string;
onClick?: (e: Event) => void;
resource?: string;
meta?: any;
}
export type BulkExportButtonProps = Props & ButtonProps;
``` | /content/code_sandbox/packages/ra-ui-materialui/src/button/BulkExportButton.tsx | xml | 2016-07-13T07:58:54 | 2024-08-16T18:32:27 | react-admin | marmelab/react-admin | 24,624 | 589 |
```xml
<test>
<settings>
<max_memory_usage>30000000000</max_memory_usage>
</settings>
<!-- 9. .
rand linear congruential generator ( , ), 32- .
, , .
, , system.numbers. , .
, .
, . , , .
( ) .
, numbers - UInt64 (8 ). , - 8 GB/sec. -->
<query>SELECT count() FROM zeros( 100000000) WHERE NOT ignore(rand())</query>
<query>SELECT count() FROM zeros_mt(1600000000) WHERE NOT ignore(rand())</query>
<!-- 10. - 64bit -> 64bit. -->
<query>SELECT count() FROM numbers( 100000000) WHERE NOT ignore(intHash64(number))</query>
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(intHash64(number))</query>
<!-- 11. - 64bit -> 32bit. -->
<query>SELECT count() FROM numbers( 100000000) WHERE NOT ignore(intHash32(number))</query>
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(intHash32(number))</query>
<!-- 12. . -->
<query>SELECT count() FROM numbers( 10000000) WHERE NOT ignore(toString(number))</query>
<query>SELECT count() FROM numbers_mt(160000000) WHERE NOT ignore(toString(number))</query>
<!-- 13. . -->
<query>SELECT count() FROM numbers( 100000000) WHERE NOT ignore(reinterpretAsString(number))</query>
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(reinterpretAsString(number))</query>
<!-- 26. . libdivide. -->
<query>SELECT count() FROM numbers( 100000000) WHERE NOT ignore(number / 7)</query>
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(number / 7)</query>
<!-- 27. . -->
<query>SELECT count() FROM numbers( 100000000) WHERE NOT ignore(number % 7)</query>
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(number % 7)</query>
<!-- 28. . -->
<query>SELECT count() FROM numbers( 100000000) WHERE NOT ignore(number % 34908756)</query>
<query>SELECT count() FROM numbers_mt(1600000000) WHERE NOT ignore(number % 34908756)</query>
<!-- 29.1. Lookup-, L1-. -->
<query>SELECT number % 10 AS k FROM numbers(100000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 10 AS k FROM numbers_mt(1600000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 256 AS k FROM numbers(100000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 256 AS k FROM numbers_mt(1600000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 10 AS k, count() FROM numbers(100000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 10 AS k, count() FROM numbers_mt(1600000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 256 AS k, count() FROM numbers(100000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 256 AS k, count() FROM numbers_mt(1600000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 10 AS k, count(), sum(number), avg(number) FROM numbers(100000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 10 AS k, count(), sum(number), avg(number) FROM numbers_mt(1600000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 256 AS k, count(), sum(number), avg(number) FROM numbers(100000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 256 AS k, count(), sum(number), avg(number) FROM numbers_mt(1600000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 256 AS k, count(), sum(number), avg(number), min(number), max(number), uniq(number), any(number), argMin(number, number), argMax(number, number) FROM numbers_mt(16000000) GROUP BY k FORMAT Null</query>
<!-- 29.2. Lookup-, L2-. -->
<query>SELECT number % 1000 AS k, count() FROM numbers( 100000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 1000 AS k, count() FROM numbers_mt(1600000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 1000 AS k FROM numbers( 100000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 1000 AS k FROM numbers_mt(1600000000) GROUP BY k FORMAT Null</query>
<!-- 30. -, L3-. -->
<query>SELECT number % 100000 AS k, count() FROM numbers( 10000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 100000 AS k, count() FROM numbers_mt(160000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 100000 AS k FROM numbers( 10000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 100000 AS k FROM numbers_mt(160000000) GROUP BY k FORMAT Null</query>
<!-- 31. -, L3-. -->
<query>SELECT number % 1000000 AS k, count() FROM numbers( 10000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 1000000 AS k, count() FROM numbers_mt(160000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 1000000 AS k FROM numbers( 10000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 1000000 AS k FROM numbers_mt(160000000) GROUP BY k FORMAT Null</query>
<!-- 32. -, L3-. -->
<query>SELECT number % 10000000 AS k, count() FROM numbers( 10000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 10000000 AS k, count() FROM numbers_mt(80000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 10000000 AS k FROM numbers( 10000000) GROUP BY k FORMAT Null</query>
<query>SELECT number % 10000000 AS k FROM numbers_mt(80000000) GROUP BY k FORMAT Null</query>
<!-- 33. -, . . -->
<!-- For this HT size, a single-threaded query that makes sense would be too slow (tens of seconds).
<query>SELECT number % 100000000 AS k, count() FROM numbers( 100000000) GROUP BY k FORMAT Null</query>
-->
<query>SELECT number % toUInt32(0.5e8) AS k, count() FROM numbers_mt(toUInt32(0.5e8)) GROUP BY k FORMAT Null</query>
<!-- 35. -, . -->
<!-- <query>SELECT number % (intDiv(100000000, {THREADS})) AS k, count() FROM numbers_mt(1600000000) GROUP BY k</query> -->
<!-- 46. , . -->
<query>SELECT count() FROM zeros(1000000) WHERE NOT ignore(materialize('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx') AS s, concat(s,s,s,s,s,s,s,s,s,s) AS t, concat(t,t,t,t,t,t,t,t,t,t) AS u) SETTINGS max_block_size = 1000</query>
</test>
``` | /content/code_sandbox/tests/performance/synthetic_hardware_benchmark.xml | xml | 2016-06-02T08:28:18 | 2024-08-16T18:39:33 | ClickHouse | ClickHouse/ClickHouse | 36,234 | 1,773 |
```xml
<Configurations xmlns="path_to_url">
<Configurations.Active>
<Configuration Version="10.0.0.0" Path="./Config" />
</Configurations.Active>
</Configurations>
``` | /content/code_sandbox/src/Test/System.Xaml.TestCases/XmlFiles/CurrentVersion.xaml | xml | 2016-08-25T20:07:20 | 2024-08-13T22:23:35 | CoreWF | UiPath/CoreWF | 1,126 | 45 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="anim_duration_default">400</integer>
<integer name="anim_duration_short">200</integer>
</resources>
``` | /content/code_sandbox/app/src/main/res/values/integers.xml | xml | 2016-05-06T21:55:37 | 2024-08-16T08:02:14 | Music-Player | andremion/Music-Player | 3,516 | 47 |
```xml
import { FC } from "react";
import EntityDetail from "src/components/entityDetail";
import useTranslate from "src/utility/localization";
import { Role } from "src/utility/api/roles";
type RoleDetailsProps = {
role: Role | null;
loading: boolean;
};
const RoleDetails: FC<RoleDetailsProps> = ({ role, loading }) => {
const { t } = useTranslate();
const { name, description } = role || {};
return (
<EntityDetail
label={t("Role details")}
data={[
{
label: t("Name"),
value: name,
},
{
label: t("Description"),
value: description,
},
]}
loading={loading}
/>
);
};
export default RoleDetails;
``` | /content/code_sandbox/identity/client/src/pages/roles/detail/RoleDetails.tsx | xml | 2016-03-20T03:38:04 | 2024-08-16T19:59:58 | camunda | camunda/camunda | 3,172 | 165 |
```xml
// ***********************************************
// This example namespace declaration will help
// with Intellisense and code completion in your
// IDE or Text Editor.
// ***********************************************
// declare namespace Cypress {
// interface Chainable<Subject = any> {
// customCommand(param: any): typeof customCommand;
// }
// }
//
// function customCommand(param: any): void {
// console.warn(param);
// }
//
// NOTE: You can use it like so:
// Cypress.Commands.add('customCommand', customCommand);
//
// ***********************************************
// This example commands.js shows you how to
// create various custom commands and overwrite
// existing commands.
//
// For more comprehensive examples of custom
// commands please read more here:
// path_to_url
// ***********************************************
//
//
// -- This is a parent command --
// Cypress.Commands.add("login", (email, password) => { ... })
//
//
// -- This is a child command --
// Cypress.Commands.add("drag", { prevSubject: 'element'}, (subject, options) => { ... })
//
//
// -- This is a dual command --
// Cypress.Commands.add("dismiss", { prevSubject: 'optional'}, (subject, options) => { ... })
//
//
// -- This will overwrite an existing command --
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
// eslint-disable-next-line @typescript-eslint/no-namespace
declare namespace Cypress {
interface Chainable<Subject = any> {
login(): Chainable<Subject>;
}
}
Cypress.Commands.add('login', () => {
cy.visit('/');
const username: string = Cypress.env('username');
const password: string = Cypress.env('password');
cy.get('[ng-reflect-name="username"]').type(username);
cy.get('[ng-reflect-name="password"]').type(password);
cy.get('button[type="submit"]').click();
});
``` | /content/code_sandbox/deb/openmediavault/workbench/cypress/support/commands.ts | xml | 2016-05-03T10:35:34 | 2024-08-16T08:03:04 | openmediavault | openmediavault/openmediavault | 4,954 | 393 |
```xml
// See LICENSE.txt for license information.
import {Q} from '@nozbe/watermelondb';
import {MM_TABLES} from '@constants/database';
import type {Clause} from '@nozbe/watermelondb/QueryDescription';
import type {RecordPair, SanitizeThreadParticipantsArgs} from '@typings/database/database';
import type ThreadParticipantModel from '@typings/database/models/servers/thread_participant';
const {THREAD_PARTICIPANT} = MM_TABLES.SERVER;
/**
* sanitizeThreadParticipants: Treats participants in a Thread. For example, a user can participate/not. Hence, this function
* tell us which participants to create/delete in the ThreadParticipants table.
* @param {SanitizeThreadParticipantsArgs} sanitizeThreadParticipants
* @param {Database} sanitizeThreadParticipants.database
* @param {string} sanitizeThreadParticipants.thread_id
* @param {UserProfile[]} sanitizeThreadParticipants.rawParticipants
* @returns {Promise<{createParticipants: ThreadParticipant[], deleteParticipants: ThreadParticipantModel[]}>}
*/
export const sanitizeThreadParticipants = async ({database, skipSync, thread_id, rawParticipants}: SanitizeThreadParticipantsArgs) => {
const clauses: Clause[] = [Q.where('thread_id', thread_id)];
// Check if we already have the participants
if (skipSync) {
clauses.push(
Q.where('user_id', Q.oneOf(
rawParticipants.map((participant) => participant.id),
)),
);
}
const participants = (await database.collections.
get<ThreadParticipantModel>(THREAD_PARTICIPANT).
query(...clauses).
fetch());
// similarObjects: Contains objects that are in both the RawParticipant array and in the ThreadParticipant table
const similarObjects = new Set<ThreadParticipantModel>();
const createParticipants: RecordPair[] = [];
const participantsMap = participants.reduce((result: Record<string, ThreadParticipantModel>, participant) => {
result[participant.userId] = participant;
return result;
}, {});
for (let i = 0; i < rawParticipants.length; i++) {
const rawParticipant = rawParticipants[i];
// If the participant is not present let's add them to the db
const exists = participantsMap[rawParticipant.id];
if (exists) {
similarObjects.add(exists);
} else {
createParticipants.push({raw: rawParticipant});
}
}
if (skipSync) {
return {createParticipants, deleteParticipants: []};
}
// finding out elements to delete using array subtract
const deleteParticipants = participants.
filter((participant) => !similarObjects.has(participant)).
map((outCast) => outCast.prepareDestroyPermanently());
return {createParticipants, deleteParticipants};
};
``` | /content/code_sandbox/app/database/operator/utils/thread.ts | xml | 2016-10-07T16:52:32 | 2024-08-16T12:08:38 | mattermost-mobile | mattermost/mattermost-mobile | 2,155 | 580 |
```xml
import { SharedVaultUserServerHash } from '@standardnotes/responses'
export type GetSharedVaultUsersResponse = {
users: SharedVaultUserServerHash[]
}
``` | /content/code_sandbox/packages/api/src/Domain/Response/SharedVaultUsers/GetSharedVaultUsersResponse.ts | xml | 2016-12-05T23:31:33 | 2024-08-16T06:51:19 | app | standardnotes/app | 5,180 | 35 |
```xml
import { TdDigitsPipe } from './digits.pipe';
import { registerLocaleData } from '@angular/common';
import localeEs from '@angular/common/locales/es';
// register 'es' locale
registerLocaleData(localeEs);
describe('TdDigitsPipe', () => {
let pipe: TdDigitsPipe;
let l10nEsPipe: TdDigitsPipe;
let l10nFrPipe: TdDigitsPipe;
beforeEach(() => {
pipe = new TdDigitsPipe();
l10nEsPipe = new TdDigitsPipe('es');
l10nFrPipe = new TdDigitsPipe('fr');
});
it('should return with an empty or invalid input', () => {
expect(pipe.transform('notanumber')).toEqual('notanumber');
expect(<any>pipe.transform(NaN)).toEqual(NaN);
expect(pipe.transform(undefined)).toEqual(undefined);
});
it('should return formatted digits', () => {
/* transformations in 'en'*/
expect(pipe.transform('34')).toEqual('34');
expect(pipe.transform(0.45, 1)).toEqual('0.5');
expect(pipe.transform(0.724, 2)).toEqual('0.72');
expect(pipe.transform(535)).toEqual('535');
expect(pipe.transform(138540)).toEqual('138.5 K');
expect(pipe.transform(138540, 2)).toEqual('138.54 K');
expect(pipe.transform(1571800)).toEqual('1.6 M');
expect(pipe.transform(1571800, 3)).toEqual('1.572 M');
expect(pipe.transform(10000000)).toEqual('10 M');
expect(pipe.transform(10200000)).toEqual('10.2 M');
expect(pipe.transform(3.81861e10)).toEqual('38.2 B');
expect(pipe.transform(1.890381861e14)).toEqual('189 T');
expect(pipe.transform(5.35765e16)).toEqual('53.6 Q');
/* transformations in 'es'*/
expect(l10nEsPipe.transform('34')).toEqual('34');
expect(l10nEsPipe.transform(0.45, 1)).toEqual('0,5');
expect(l10nEsPipe.transform(0.724, 2)).toEqual('0,72');
expect(l10nEsPipe.transform(535)).toEqual('535');
expect(l10nEsPipe.transform(138540)).toEqual('138,5 K');
expect(l10nEsPipe.transform(138540, 2)).toEqual('138,54 K');
expect(l10nEsPipe.transform(1571800)).toEqual('1,6 M');
expect(l10nEsPipe.transform(1571800, 3)).toEqual('1,572 M');
expect(l10nEsPipe.transform(10000000)).toEqual('10 M');
expect(l10nEsPipe.transform(10200000)).toEqual('10,2 M');
expect(l10nEsPipe.transform(3.81861e10)).toEqual('38,2 B');
expect(l10nEsPipe.transform(1.890381861e14)).toEqual('189 T');
expect(l10nEsPipe.transform(5.35765e16)).toEqual('53,6 Q');
});
it('should fail since locale is not registered', () => {
/* not registered transformations */
expect(() => {
l10nFrPipe.transform(1000);
}).toThrowError();
});
});
``` | /content/code_sandbox/libs/angular/common/src/pipes/digits/digits.pipe.spec.ts | xml | 2016-07-11T23:30:52 | 2024-08-15T15:20:45 | covalent | Teradata/covalent | 2,228 | 742 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">FreeOTP</string>
<string name="delete">Borrar</string>
<string name="error_camera_open">Hubieron problemas abriendo la cmara!</string>
</resources>
``` | /content/code_sandbox/mobile/src/main/res/values-es/strings.xml | xml | 2016-10-24T13:23:25 | 2024-08-16T07:20:37 | freeotp-android | freeotp/freeotp-android | 1,387 | 67 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="path_to_url"
xmlns:appx="path_to_url">
<data>
<import type="me.tatarka.bindingcollectionadapter2.LayoutManagers" />
<variable
name="prefs"
type="com.eveningoutpost.dexdrip.utilitymodels.PrefsViewImpl" />
<variable
name="sprefs"
type="com.eveningoutpost.dexdrip.utilitymodels.PrefsViewString" />
<variable
name="model"
type="com.eveningoutpost.dexdrip.eassist.EmergencyAssist" />
<variable
name="contactModel"
type="com.eveningoutpost.dexdrip.eassist.EmergencyAssistActivity.ContactModel" />
<variable
name="activity"
type="com.eveningoutpost.dexdrip.eassist.EmergencyAssistActivity" />
</data>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:descendantFocusability="beforeDescendants"
android:focusableInTouchMode="true"
android:orientation="vertical">
<Switch
android:id="@+id/emergencyAssistOnOff"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="center_vertical"
android:hint="Turn feature off/on"
android:switchMinWidth="55dp"
android:text="@string/emergency_message_feature"
android:textSize="18sp"
appx:checked="@={prefs[`emergency_assist_enabled`]}"
appx:onCheckedChanged="@{() -> activity.masterEnable()}" />
<TextView
android:id="@+id/eaIntroText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="5dp"
android:text="@string/your_sha256_hashyour_sha256_hashe"
android:textColor="@color/yellow100" />
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginTop="5dp"
android:hint="@string/your_name"
android:imeOptions="actionDone"
android:inputType="text"
android:lines="1"
android:maxLines="1"
android:text="@={model.username}" />
<androidx.cardview.widget.CardView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginBottom="10dp"
appx:cardBackgroundColor="#dadada"
appx:cardCornerRadius="7dp"
appx:cardElevation="3dp">
<TextView
android:id="@+id/previewText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_weight="1"
android:text="@{model.lastExtendedText, default=`Preview Text`}"
android:textColor="#000000"
android:textStyle="italic" />
</androidx.cardview.widget.CardView>
<View
android:id="@+id/divider1"
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_margin="5dp"
android:background="#484848" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp"
android:text="@{String.format(@string/d_selected_contacts_for_text_messages_format, contactModel.items.size()), default=`0 selected contacts for text messages`}"
android:textColor="@{contactModel.items.size() > 0 ? @android:color/white : @android:color/holo_red_dark}" />
<androidx.recyclerview.widget.RecyclerView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="10dp"
android:scrollbars="vertical"
appx:itemBinding="@{contactModel.itemBinding}"
appx:items="@{contactModel.items}"
appx:layoutManager="@{LayoutManagers.linear()}" />
<ImageButton
android:id="@+id/addContactButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:layout_weight="1"
android:onClick="chooseContact"
appx:srcCompat="@drawable/ic_group_add_grey_500_24dp" />
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_margin="5dp"
android:background="#484848" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:text="@string/choose_when_to_send_messages"
android:textSize="18sp" />
<Switch
android:id="@+id/switch2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_weight="1"
android:text="@string/low_alert_not_acknowledged"
appx:boldIfTrue="@{prefs[`emergency_assist_low_alert`]}"
appx:checked="@={prefs[`emergency_assist_low_alert`]}" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
appx:showIfTrueAnimated="@{prefs[`emergency_assist_low_alert`]}">
<SeekBar
android:id="@+id/seekBar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="0dp"
android:layout_weight="1"
android:max="360"
android:thumb="@drawable/ic_av_timer_white_36dp"
android:thumbTint="@color/accent_material_dark"
appx:progressString="@={sprefs[`emergency_assist_low_alert_minutes`]}" />
<TextView
android:id="@+id/textView22"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:minWidth="100dp"
android:text="@{activity.prettyMinutes(sprefs[`emergency_assist_low_alert_minutes`])}" />
</LinearLayout>
<Switch
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_weight="1"
android:text="@string/lowest_alert_not_acknowledged"
appx:boldIfTrue="@{prefs[`emergency_assist_lowest_alert`]}"
appx:checked="@={prefs[`emergency_assist_lowest_alert`]}" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
appx:showIfTrueAnimated="@{prefs[`emergency_assist_lowest_alert`]}">
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="0dp"
android:layout_weight="1"
android:max="360"
android:thumb="@drawable/ic_av_timer_white_36dp"
android:thumbTint="@color/accent_material_dark"
appx:progressString="@={sprefs[`emergency_assist_lowest_alert_minutes`]}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:minWidth="100dp"
android:text="@{activity.prettyMinutes(sprefs[`emergency_assist_lowest_alert_minutes`])}" />
</LinearLayout>
<Switch
android:id="@+id/switch3"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="5dp"
android:text="@string/high_alert_not_acknowledged"
appx:boldIfTrue="@{prefs[`emergency_assist_high_alert`]}"
appx:checked="@={prefs[`emergency_assist_high_alert`]}" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
appx:showIfTrueAnimated="@{prefs[`emergency_assist_high_alert`]}">
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="0dp"
android:layout_weight="1"
android:max="720"
android:thumb="@drawable/ic_av_timer_white_36dp"
android:thumbTint="@color/accent_material_dark"
appx:progressString="@={sprefs[`emergency_assist_high_alert_minutes`]}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:minWidth="100dp"
android:text="@{activity.prettyMinutes(sprefs[`emergency_assist_high_alert_minutes`])}" />
</LinearLayout>
<Switch
android:id="@+id/switch4"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginTop="5dp"
android:text="@string/device_inactivity"
appx:boldIfTrue="@{prefs[`emergency_assist_inactivity`]}"
appx:checked="@={prefs[`emergency_assist_inactivity`]}" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
appx:showIfTrueAnimated="@{prefs[`emergency_assist_inactivity`]}">
<SeekBar
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="0dp"
android:layout_weight="1"
android:max="2880"
android:thumb="@drawable/ic_av_timer_white_36dp"
android:thumbTint="@color/accent_material_dark"
appx:progressString="@={sprefs[`emergency_assist_inactivity_minutes`]}" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:minWidth="100dp"
android:text="@{activity.prettyMinutes(sprefs[`emergency_assist_inactivity_minutes`])}" />
</LinearLayout>
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_margin="5dp"
android:background="#484848" />
<Button
android:id="@+id/button29"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="20dp"
android:onClick="testButton"
android:text="@string/test_message_sending"
appx:invisibleIfFalse="@{contactModel.items.size > 0}" />
<View
android:layout_width="fill_parent"
android:layout_height="1dp"
android:layout_margin="5dp"
android:background="#484848" />
</LinearLayout>
</ScrollView>
</layout>
``` | /content/code_sandbox/app/src/main/res/layout/activity_emergency_assist.xml | xml | 2016-09-23T13:33:17 | 2024-08-15T09:51:19 | xDrip | NightscoutFoundation/xDrip | 1,365 | 2,760 |
```xml
import React from 'react';
import { Account } from 'mailspring-exports';
import { buildO365AccountFromAuthResponse, buildO365AuthURL } from './onboarding-helpers';
import OAuthSignInPage from './oauth-signin-page';
import * as OnboardingActions from './onboarding-actions';
import AccountProviders from './account-providers';
export default class AccountSettingsPageO365 extends React.Component<{ account: Account }> {
static displayName = 'AccountSettingsPageO365';
_authUrl = buildO365AuthURL();
onSuccess(account) {
OnboardingActions.finishAndAddAccount(account);
}
render() {
const providerConfig = AccountProviders.find(a => a.provider === this.props.account.provider);
const goBack = () => OnboardingActions.moveToPreviousPage();
return (
<OAuthSignInPage
serviceName="Office 365"
providerAuthPageUrl={this._authUrl}
providerConfig={providerConfig}
buildAccountFromAuthResponse={buildO365AccountFromAuthResponse}
onSuccess={this.onSuccess}
onTryAgain={goBack}
/>
);
}
}
``` | /content/code_sandbox/app/internal_packages/onboarding/lib/page-account-settings-o365.tsx | xml | 2016-10-13T06:45:50 | 2024-08-16T18:14:37 | Mailspring | Foundry376/Mailspring | 15,331 | 236 |
```xml
//
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing, software
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
import { Component } from '@angular/core';
import { UserDataService } from '../shared/services/userData.service';
@Component({
selector: 'app-resources',
templateUrl: './resources.component.html',
styleUrls: ['./resources.component.scss'],
})
export class ResourcesComponent {
public static PATH = 'resources';
constructor(protected userDataService: UserDataService) {}
}
``` | /content/code_sandbox/console-webapp/src/app/resources/resources.component.ts | xml | 2016-02-29T20:16:48 | 2024-08-15T19:49:29 | nomulus | google/nomulus | 1,685 | 111 |
```xml
import { makeStyles } from '@griffel/react';
import { SlotClassNames } from '@fluentui/react-utilities';
import type { TextSlots } from '../../Text/Text.types';
import { typographyStyles } from '@fluentui/react-theme';
export const title1ClassNames: SlotClassNames<TextSlots> = {
root: 'fui-Title1',
};
/**
* Styles for the root slot
*/
export const useTitle1Styles = makeStyles({
root: typographyStyles.title1,
});
``` | /content/code_sandbox/packages/react-components/react-text/library/src/components/presets/Title1/useTitle1Styles.styles.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 106 |
```xml
import { Component } from '@angular/core';
@Component({
selector: 'accessibility-doc',
template: ` <div>
<app-docsectiontext>
<h3>Screen Reader</h3>
<p>
TabMenu component uses the <i>menubar</i> role and the value to describe the menu can either be provided with <i>aria-labelledby</i> or <i>aria-label</i> props. Each list item has a <i>presentation</i> role whereas anchor elements
have a <i>menuitem</i> role with <i>aria-label</i> referring to the label of the item and <i>aria-disabled</i> defined if the item is disabled.
</p>
<h3>Keyboard Support</h3>
<div class="doc-tablewrapper">
<table class="doc-table">
<thead>
<tr>
<th>Key</th>
<th>Function</th>
</tr>
</thead>
<tbody>
<tr>
<td><i>tab</i></td>
<td>Adds focus to the active tab header when focus moves in to the component, if there is already a focused tab header moves the focus out of the component based on the page tab sequence.</td>
</tr>
<tr>
<td><i>enter</i></td>
<td>Activates the focused tab header.</td>
</tr>
<tr>
<td><i>space</i></td>
<td>Activates the focused tab header.</td>
</tr>
<tr>
<td><i>right arrow</i></td>
<td>Moves focus to the next header.</td>
</tr>
<tr>
<td><i>left arrow</i></td>
<td>Moves focus to the previous header.</td>
</tr>
<tr>
<td><i>home</i></td>
<td>Moves focus to the first header.</td>
</tr>
<tr>
<td><i>end</i></td>
<td>Moves focus to the last header.</td>
</tr>
</tbody>
</table>
</div>
</app-docsectiontext>
</div>`
})
export class AccessibilityDoc {}
``` | /content/code_sandbox/src/app/showcase/doc/tabmenu/accessibilitydoc.ts | xml | 2016-01-16T09:23:28 | 2024-08-16T19:58:20 | primeng | primefaces/primeng | 9,969 | 516 |
```xml
/*
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated, or distributed except according to the terms contained in the
* LICENSE file.
*
* Removal or modification of this copyright notice is prohibited.
*/
import { validator } from '@liskhq/lisk-validator';
import { address as cryptoAddress } from '@liskhq/lisk-cryptography';
import { Schema } from '@liskhq/lisk-codec';
import { ModuleEndpointContext } from '../../types';
import { VerifyStatus } from '../../state_machine';
import { BaseEndpoint } from '../base_endpoint';
import {
AuthAccountJSON,
VerifyEndpointResultJSON,
KeySignaturePair,
SortedMultisignatureGroup,
MultiSigRegMsgTag,
} from './types';
import { getTransactionFromParameter, verifyNonce, verifySignatures } from './utils';
import { AuthAccountStore } from './stores/auth_account';
import { multisigRegMsgSchema, sortMultisignatureGroupRequestSchema } from './schemas';
import { MESSAGE_TAG_MULTISIG_REG } from './constants';
export class AuthEndpoint extends BaseEndpoint {
public async getAuthAccount(context: ModuleEndpointContext): Promise<AuthAccountJSON> {
const {
params: { address },
} = context;
if (typeof address !== 'string') {
throw new Error('Invalid address format.');
}
cryptoAddress.validateLisk32Address(address);
const accountAddress = cryptoAddress.getAddressFromLisk32Address(address);
const authAccountStore = this.stores.get(AuthAccountStore);
const authAccount = await authAccountStore.getOrDefault(context, accountAddress);
return {
nonce: authAccount.nonce.toString(),
numberOfSignatures: authAccount.numberOfSignatures,
mandatoryKeys: authAccount.mandatoryKeys.map(key => key.toString('hex')),
optionalKeys: authAccount.optionalKeys.map(key => key.toString('hex')),
};
}
/**
* Validates signatures of the provided transaction, including transactions from multisignature accounts.
*
* path_to_url#isvalidsignature
*/
public async isValidSignature(context: ModuleEndpointContext): Promise<VerifyEndpointResultJSON> {
const {
params: { transaction: transactionParameter },
chainID,
} = context;
const transaction = getTransactionFromParameter(transactionParameter);
const accountAddress = cryptoAddress.getAddressFromPublicKey(transaction.senderPublicKey);
const authAccountStore = this.stores.get(AuthAccountStore);
const account = await authAccountStore.getOrDefault(context, accountAddress);
try {
verifySignatures(transaction, chainID, account);
} catch (error) {
return { verified: false };
}
return { verified: true };
}
public async isValidNonce(context: ModuleEndpointContext): Promise<VerifyEndpointResultJSON> {
const {
params: { transaction: transactionParameter },
} = context;
const transaction = getTransactionFromParameter(transactionParameter);
const accountAddress = cryptoAddress.getAddressFromPublicKey(transaction.senderPublicKey);
const authAccountStore = this.stores.get(AuthAccountStore);
const account = await authAccountStore.getOrDefault(context, accountAddress);
const verificationResult = verifyNonce(transaction, account).status;
return { verified: verificationResult === VerifyStatus.OK };
}
// eslint-disable-next-line @typescript-eslint/require-await
public async getMultiSigRegMsgSchema(
_context: ModuleEndpointContext,
): Promise<{ schema: Schema }> {
return { schema: multisigRegMsgSchema };
}
public sortMultisignatureGroup(context: ModuleEndpointContext): SortedMultisignatureGroup {
validator.validate(sortMultisignatureGroupRequestSchema, context.params);
const mandatory = context.params.mandatory as KeySignaturePair[];
const optional = context.params.optional as KeySignaturePair[];
const compareStrings = (a: string, b: string) => (a < b ? -1 : 1);
const sortedMandatory = mandatory
.slice()
.sort((keySignaturePairA, keySignaturePairB) =>
compareStrings(keySignaturePairA.publicKey, keySignaturePairB.publicKey),
);
const sortedOptional = optional
.slice()
.sort((keySignaturePairA, keySignaturePairB) =>
compareStrings(keySignaturePairA.publicKey, keySignaturePairB.publicKey),
);
return {
mandatoryKeys: sortedMandatory.map(keySignaturePair => keySignaturePair.publicKey),
optionalKeys: sortedOptional.map(keySignaturePair => keySignaturePair.publicKey),
signatures: sortedMandatory
.map(keySignaturePair => keySignaturePair.signature)
.concat(sortedOptional.map(keySignaturePair => keySignaturePair.signature)),
};
}
public getMultiSigRegMsgTag(): MultiSigRegMsgTag {
return { tag: MESSAGE_TAG_MULTISIG_REG };
}
}
``` | /content/code_sandbox/framework/src/modules/auth/endpoint.ts | xml | 2016-02-01T21:45:35 | 2024-08-15T19:16:48 | lisk-sdk | LiskArchive/lisk-sdk | 2,721 | 1,074 |
```xml
import { WordlistOwl } from "./wordlist-owl.js";
const words = "0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO";
const checksum = your_sha256_hash60";
let wordlist: null | LangEn = null;
/**
* The [[link-bip39-en]] for [mnemonic phrases](link-bip-39).
*
* @_docloc: api/wordlists
*/
export class LangEn extends WordlistOwl {
/**
* Creates a new instance of the English language Wordlist.
*
* This should be unnecessary most of the time as the exported
* [[langEn]] should suffice.
*
* @_ignore:
*/
constructor() { super("en", words, checksum); }
/**
* Returns a singleton instance of a ``LangEn``, creating it
* if this is the first time being called.
*/
static wordlist(): LangEn {
if (wordlist == null) { wordlist = new LangEn(); }
return wordlist;
}
}
``` | /content/code_sandbox/src.ts/wordlists/lang-en.ts | xml | 2016-07-16T04:35:37 | 2024-08-16T13:37:46 | ethers.js | ethers-io/ethers.js | 7,843 | 4,016 |
```xml
import { useMemo } from 'react';
import { HotKeys } from 'react-hotkeys';
import { navigateToProfile } from 'mastodon/actions/accounts';
import { mentionComposeById } from 'mastodon/actions/compose';
import type { NotificationGroup as NotificationGroupModel } from 'mastodon/models/notification_group';
import { useAppSelector, useAppDispatch } from 'mastodon/store';
import { NotificationAdminReport } from './notification_admin_report';
import { NotificationAdminSignUp } from './notification_admin_sign_up';
import { NotificationFavourite } from './notification_favourite';
import { NotificationFollow } from './notification_follow';
import { NotificationFollowRequest } from './notification_follow_request';
import { NotificationMention } from './notification_mention';
import { NotificationModerationWarning } from './notification_moderation_warning';
import { NotificationPoll } from './notification_poll';
import { NotificationReblog } from './notification_reblog';
import { NotificationSeveredRelationships } from './notification_severed_relationships';
import { NotificationStatus } from './notification_status';
import { NotificationUpdate } from './notification_update';
export const NotificationGroup: React.FC<{
notificationGroupId: NotificationGroupModel['group_key'];
unread: boolean;
onMoveUp: (groupId: string) => void;
onMoveDown: (groupId: string) => void;
}> = ({ notificationGroupId, unread, onMoveUp, onMoveDown }) => {
const notificationGroup = useAppSelector((state) =>
state.notificationGroups.groups.find(
(item) => item.type !== 'gap' && item.group_key === notificationGroupId,
),
);
const dispatch = useAppDispatch();
const accountId =
notificationGroup?.type === 'gap'
? undefined
: notificationGroup?.sampleAccountIds[0];
const handlers = useMemo(
() => ({
moveUp: () => {
onMoveUp(notificationGroupId);
},
moveDown: () => {
onMoveDown(notificationGroupId);
},
openProfile: () => {
if (accountId) dispatch(navigateToProfile(accountId));
},
mention: () => {
if (accountId) dispatch(mentionComposeById(accountId));
},
}),
[dispatch, notificationGroupId, accountId, onMoveUp, onMoveDown],
);
if (!notificationGroup || notificationGroup.type === 'gap') return null;
let content;
switch (notificationGroup.type) {
case 'reblog':
content = (
<NotificationReblog unread={unread} notification={notificationGroup} />
);
break;
case 'favourite':
content = (
<NotificationFavourite
unread={unread}
notification={notificationGroup}
/>
);
break;
case 'severed_relationships':
content = (
<NotificationSeveredRelationships
unread={unread}
notification={notificationGroup}
/>
);
break;
case 'mention':
content = (
<NotificationMention unread={unread} notification={notificationGroup} />
);
break;
case 'follow':
content = (
<NotificationFollow unread={unread} notification={notificationGroup} />
);
break;
case 'follow_request':
content = (
<NotificationFollowRequest
unread={unread}
notification={notificationGroup}
/>
);
break;
case 'poll':
content = (
<NotificationPoll unread={unread} notification={notificationGroup} />
);
break;
case 'status':
content = (
<NotificationStatus unread={unread} notification={notificationGroup} />
);
break;
case 'update':
content = (
<NotificationUpdate unread={unread} notification={notificationGroup} />
);
break;
case 'admin.sign_up':
content = (
<NotificationAdminSignUp
unread={unread}
notification={notificationGroup}
/>
);
break;
case 'admin.report':
content = (
<NotificationAdminReport
unread={unread}
notification={notificationGroup}
/>
);
break;
case 'moderation_warning':
content = (
<NotificationModerationWarning
unread={unread}
notification={notificationGroup}
/>
);
break;
default:
return null;
}
return <HotKeys handlers={handlers}>{content}</HotKeys>;
};
``` | /content/code_sandbox/app/javascript/mastodon/features/notifications_v2/components/notification_group.tsx | xml | 2016-02-22T15:01:25 | 2024-08-16T19:27:35 | mastodon | mastodon/mastodon | 46,560 | 915 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
- file, You can obtain one at path_to_url -->
<manifest xmlns:android="path_to_url"
package="com.mozilla.watcher"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.WRITE_SETTINGS"></uses-permission>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".WatcherMain"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".WatcherReceiver">
<intent-filter>
<action android:value="android.intent.action.BOOT_COMPLETED" android:name="android.intent.action.BOOT_COMPLETED"/>
<category android:value="android.intent.category.HOME" android:name="android.intent.category.HOME"/>
</intent-filter>
</receiver>
<service android:name="WatcherService">
<intent-filter>
<action android:name="com.mozilla.watcher.LISTENER_SERVICE" />
</intent-filter>
</service>
</application>
<uses-sdk android:minSdkVersion="5" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.DISABLE_KEYGUARD"></uses-permission>
<uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
<uses-permission android:name="android.permission.VIBRATE"></uses-permission>
</manifest>
``` | /content/code_sandbox/deps/3rdparty/spidermonkey/mozjs/build/mobile/sutagent/android/watcher/AndroidManifest.xml | xml | 2016-05-23T10:56:48 | 2024-05-23T14:42:06 | eventql | eventql/eventql | 1,180 | 389 |
```xml
import * as path from "path";
import { EventEmitter } from "events";
import * as vscode from "vscode";
import * as WebSocket from "ws";
import { logger } from "@vscode/debugadapter";
import * as nls from "vscode-nls";
import { ensurePackagerRunning } from "../common/packagerStatus";
import { ErrorHelper } from "../common/error/errorHelper";
import { ExecutionsLimiter } from "../common/executionsLimiter";
import { ReactNativeProjectHelper } from "../common/reactNativeProjectHelper";
import { InternalErrorCode } from "../common/error/internalErrorCode";
import { FileSystem } from "../common/node/fileSystem";
import { PromiseUtil } from "../common/node/promise";
import { ForkedAppWorker } from "./forkedAppWorker";
import { ScriptImporter } from "./scriptImporter";
nls.config({
messageFormat: nls.MessageFormat.bundle,
bundleFormat: nls.BundleFormat.standalone,
})();
const localize = nls.loadMessageBundle();
export interface RNAppMessage {
method: string;
url?: string;
// These objects have also other properties but that we don't currently use
}
export interface IDebuggeeWorker {
start(): Promise<any>;
stop(): void;
postMessage(message: RNAppMessage): void;
}
function printDebuggingError(error: Error, reason: any) {
const nestedError = ErrorHelper.getNestedError(
error,
InternalErrorCode.DebuggingWontWorkReloadJSAndReconnect,
reason,
);
logger.error(nestedError.message);
}
/** This class will create a SandboxedAppWorker that will run the RN App logic, and then create a socket
* and send the RN App messages to the SandboxedAppWorker. The only RN App message that this class handles
* is the prepareJSRuntime, which we reply to the RN App that the sandbox was created successfully.
* When the socket closes, we'll create a new SandboxedAppWorker and a new socket pair and discard the old ones.
*/
export class MultipleLifetimesAppWorker extends EventEmitter {
public static WORKER_BOOTSTRAP = `
// Initialize some variables before react-native code would access them
var onmessage=null, self=global;
// Cache Node's original require as __debug__.require
global.__debug__={require: require};
// Prevent leaking process.versions from debugger process to
// worker because pure React Native doesn't do that and some packages as js-md5 rely on this behavior
Object.defineProperty(process, "versions", {
value: undefined
});
// TODO: Replace by url.fileURLToPath method when Node 10 LTS become deprecated
function fileUrlToPath(url) {
if (process.platform === 'win32') {
return url.toString().replace('file:///', '');
} else {
return url.toString().replace('file://', '');
}
}
function getNativeModules() {
var NativeModules;
try {
// This approach is for old RN versions
NativeModules = global.require('NativeModules');
} catch (err) {
// ignore error and try another way for more recent RN versions
try {
var nativeModuleId;
var modules = global.__r.getModules();
var ids = Object.keys(modules);
for (var i = 0; i < ids.length; i++) {
if (modules[ids[i]].verboseName) {
var packagePath = new String(modules[ids[i]].verboseName);
if (packagePath.indexOf('Libraries/BatchedBridge/NativeModules.js') > 0 || packagePath.indexOf('Libraries\\\\BatchedBridge\\\\NativeModules.js') > 0) {
nativeModuleId = parseInt(ids[i], 10);
break;
}
}
}
if (nativeModuleId) {
NativeModules = global.__r(nativeModuleId);
}
}
catch (err) {
// suppress errors
}
}
return NativeModules;
}
// Originally, this was made for iOS only
var vscodeHandlers = {
'vscode_reloadApp': function () {
var NativeModules = getNativeModules();
if (NativeModules && NativeModules.DevSettings) {
NativeModules.DevSettings.reload();
}
},
'vscode_showDevMenu': function () {
var NativeModules = getNativeModules();
if (NativeModules && NativeModules.DevMenu) {
NativeModules.DevMenu.show();
}
}
};
process.on("message", function (message) {
if (message.data && vscodeHandlers[message.data.method]) {
vscodeHandlers[message.data.method]();
} else if(onmessage) {
onmessage(message);
}
});
var postMessage = function(message){
process.send(message);
};
if (!self.postMessage) {
self.postMessage = postMessage;
}
var importScripts = (function(){
var fs=require('fs'), vm=require('vm');
return function(scriptUrl){
scriptUrl = fileUrlToPath(scriptUrl);
var scriptCode = fs.readFileSync(scriptUrl, 'utf8');
// Add a 'debugger;' statement to stop code execution
// to wait for the sourcemaps to be processed by the debug adapter
vm.runInThisContext('debugger;' + scriptCode, {filename: scriptUrl});
};
})();
`;
public static CONSOLE_TRACE_PATCH = `// Worker is ran as nodejs process, so console.trace() writes to stderr and it leads to error in native app
// To avoid this console.trace() is overridden to print stacktrace via console.log()
// Please, see Node JS implementation: path_to_url
console.trace = (function() {
return function() {
try {
var err = {
name: 'Trace',
message: require('util').format.apply(null, arguments)
};
// Node uses 10, but usually it's not enough for RN app trace
Error.stackTraceLimit = 30;
Error.captureStackTrace(err, console.trace);
console.log(err.stack);
} catch (e) {
console.error(e);
}
};
})();
`;
public static PROCESS_TO_STRING_PATCH = `// As worker is ran in node, it breaks broadcast-channels package approach of identifying if its ran in node:
// path_to_url#L64
// To avoid it if process.toString() is called if will return empty string instead of [object process].
var nativeObjectToString = Object.prototype.toString;
Object.prototype.toString = function() {
if (this === process) {
return '';
} else {
return nativeObjectToString.call(this);
}
};
`;
public static WORKER_DONE = `// Notify debugger that we're done with loading
// and started listening for IPC messages
postMessage({workerLoaded:true});`;
public static FETCH_STUB = `(function(self) {
'use strict';
if (self.fetch) {
return;
}
self.fetch = fetch;
function fetch(url) {
return new Promise((resolve, reject) => {
var data = require('fs').readFileSync(fileUrlToPath(url), 'utf8');
resolve(
{
text: function () {
return data;
}
});
});
}
})(global);
`;
private packagerAddress: string;
private packagerPort: number;
private sourcesStoragePath: string;
private projectRootPath: string;
private packagerRemoteRoot?: string;
private packagerLocalRoot?: string;
private debuggerWorkerUrlPath?: string;
private socketToApp: WebSocket;
private cancellationToken: vscode.CancellationToken;
private singleLifetimeWorker: IDebuggeeWorker | null;
private webSocketConstructor: (url: string) => WebSocket;
private executionLimiter = new ExecutionsLimiter();
private nodeFileSystem = new FileSystem();
private scriptImporter: ScriptImporter;
constructor(
attachRequestArguments: any,
sourcesStoragePath: string,
projectRootPath: string,
cancellationToken: vscode.CancellationToken,
{ webSocketConstructor = (url: string) => new WebSocket(url) } = {},
) {
super();
this.packagerAddress = attachRequestArguments.address || "localhost";
this.packagerPort = attachRequestArguments.port;
this.packagerRemoteRoot = attachRequestArguments.remoteRoot;
this.packagerLocalRoot = attachRequestArguments.localRoot;
this.debuggerWorkerUrlPath = attachRequestArguments.debuggerWorkerUrlPath;
this.sourcesStoragePath = sourcesStoragePath;
this.projectRootPath = projectRootPath;
this.cancellationToken = cancellationToken;
if (!this.sourcesStoragePath)
throw ErrorHelper.getInternalError(InternalErrorCode.SourcesStoragePathIsNullOrEmpty);
this.webSocketConstructor = webSocketConstructor;
this.scriptImporter = new ScriptImporter(
this.packagerAddress,
this.packagerPort,
sourcesStoragePath,
this.packagerRemoteRoot,
this.packagerLocalRoot,
);
}
public async start(retryAttempt: boolean = false): Promise<void> {
const errPackagerNotRunning = ErrorHelper.getInternalError(
InternalErrorCode.CannotAttachToPackagerCheckPackagerRunningOnPort,
this.packagerPort,
);
await ensurePackagerRunning(this.packagerAddress, this.packagerPort, errPackagerNotRunning);
// Don't fetch debugger worker on socket disconnect
if (!retryAttempt) {
await this.downloadAndPatchDebuggerWorker();
}
return this.createSocketToApp(retryAttempt);
}
public stop(): void {
if (this.socketToApp) {
this.socketToApp.removeAllListeners();
this.socketToApp.close();
}
if (this.singleLifetimeWorker) {
this.singleLifetimeWorker.stop();
}
}
public async downloadAndPatchDebuggerWorker(): Promise<void> {
const scriptToRunPath = path.resolve(
this.sourcesStoragePath,
ScriptImporter.DEBUGGER_WORKER_FILENAME,
);
await this.scriptImporter.downloadDebuggerWorker(
this.sourcesStoragePath,
this.projectRootPath,
this.debuggerWorkerUrlPath,
);
const workerContent = await this.nodeFileSystem.readFile(scriptToRunPath, "utf8");
const isHaulProject = ReactNativeProjectHelper.isHaulProject(this.projectRootPath);
// Add our customizations to debugger worker to get it working smoothly
// in Node env and polyfill WebWorkers API over Node's IPC.
const modifiedDebuggeeContent = [
MultipleLifetimesAppWorker.WORKER_BOOTSTRAP,
MultipleLifetimesAppWorker.CONSOLE_TRACE_PATCH,
MultipleLifetimesAppWorker.PROCESS_TO_STRING_PATCH,
isHaulProject ? MultipleLifetimesAppWorker.FETCH_STUB : null,
workerContent,
MultipleLifetimesAppWorker.WORKER_DONE,
].join("\n");
return this.nodeFileSystem.writeFile(scriptToRunPath, modifiedDebuggeeContent);
}
public showDevMenuCommand(): void {
if (this.singleLifetimeWorker) {
this.singleLifetimeWorker.postMessage({
method: "vscode_showDevMenu",
});
}
}
public reloadAppCommand(): void {
if (this.singleLifetimeWorker) {
this.singleLifetimeWorker.postMessage({
method: "vscode_reloadApp",
});
}
}
private async startNewWorkerLifetime(): Promise<void> {
this.singleLifetimeWorker = new ForkedAppWorker(
this.packagerAddress,
this.packagerPort,
this.sourcesStoragePath,
this.projectRootPath,
message => {
this.sendMessageToApp(message);
},
this.packagerRemoteRoot,
this.packagerLocalRoot,
);
logger.verbose("A new app worker lifetime was created.");
const startedEvent = await this.singleLifetimeWorker.start();
this.emit("connected", startedEvent);
}
private async createSocketToApp(retryAttempt: boolean = false): Promise<void> {
return new Promise((resolve, reject) => {
this.socketToApp = this.webSocketConstructor(this.debuggerProxyUrl());
this.socketToApp.on("open", () => {
this.onSocketOpened();
});
this.socketToApp.on("close", () => {
this.executionLimiter.execute("onSocketClose.msg", /* limitInSeconds*/ 10, () => {
/*
* It is not the best idea to compare with the message, but this is the only thing React Native gives that is unique when
* it closes the socket because it already has a connection to a debugger.
* path_to_url#L38
*/
const msgKey = "_closeMessage";
if (this.socketToApp[msgKey] === "Another debugger is already connected") {
reject(
ErrorHelper.getInternalError(
InternalErrorCode.AnotherDebuggerConnectedToPackager,
),
);
}
logger.log(
localize(
"DisconnectedFromThePackagerToReactNative",
"Disconnected from the Proxy (Packager) to the React Native application. Retrying reconnection soon...",
),
);
});
if (!this.cancellationToken.isCancellationRequested) {
setTimeout(() => {
void this.start(true /* retryAttempt */);
}, 100);
}
});
this.socketToApp.on("message", (message: any) => this.onMessage(message));
this.socketToApp.on("error", (error: Error) => {
if (retryAttempt) {
printDebuggingError(
ErrorHelper.getInternalError(
InternalErrorCode.ReconnectionToPackagerFailedCheckForErrorsOrRestartReactNative,
),
error,
);
}
reject(error);
});
// In an attempt to catch failures in starting the packager on first attempt,
// wait for 300 ms before resolving the promise
void PromiseUtil.delay(300).then(() => resolve());
});
}
private debuggerProxyUrl() {
return `ws://${this.packagerAddress}:${this.packagerPort}/debugger-proxy?role=debugger&name=vscode`;
}
private onSocketOpened() {
this.executionLimiter.execute("onSocketOpened.msg", /* limitInSeconds*/ 10, () =>
logger.log(
localize(
"EstablishedConnectionWithPackagerToReactNativeApp",
"Established a connection with the Proxy (Packager) to the React Native application",
),
),
);
}
private killWorker() {
if (!this.singleLifetimeWorker) return;
this.singleLifetimeWorker.stop();
this.singleLifetimeWorker = null;
}
private onMessage(message: string) {
try {
logger.verbose(`From RN APP: ${message}`);
const object = <RNAppMessage>JSON.parse(message);
if (object.method === "prepareJSRuntime") {
// In RN 0.40 Android runtime doesn't seem to be sending "$disconnected" event
// when user reloads an app, hence we need to try to kill it here either.
this.killWorker();
// The MultipleLifetimesAppWorker will handle prepareJSRuntime aka create new lifetime
this.gotPrepareJSRuntime(object);
} else if (object.method === "$disconnected") {
// We need to shutdown the current app worker, and create a new lifetime
this.killWorker();
} else if (object.method) {
// All the other messages are handled by the single lifetime worker
if (this.singleLifetimeWorker) {
this.singleLifetimeWorker.postMessage(object);
}
} else {
// Message doesn't have a method. Ignore it. This is an info message instead of warn because it's normal and expected
logger.verbose(
`The react-native app sent a message without specifying a method: ${message}`,
);
}
} catch (exception) {
printDebuggingError(
ErrorHelper.getInternalError(
InternalErrorCode.FailedToProcessMessageFromReactNativeApp,
message,
),
exception,
);
}
}
private gotPrepareJSRuntime(message: any): void {
// Create the sandbox, and replay that we finished processing the message
this.startNewWorkerLifetime().then(
() => {
this.sendMessageToApp({ replyID: parseInt(message.id, 10) });
},
error =>
printDebuggingError(
ErrorHelper.getInternalError(
InternalErrorCode.FailedToPrepareJSRuntimeEnvironment,
message,
),
error,
),
);
}
private sendMessageToApp(message: any): void {
let stringified = "";
try {
stringified = JSON.stringify(message);
logger.verbose(`To RN APP: ${stringified}`);
this.socketToApp.send(stringified);
} catch (exception) {
const messageToShow = stringified || String(message); // Try to show the stringified version, but show the toString if unavailable
printDebuggingError(
ErrorHelper.getInternalError(
InternalErrorCode.FailedToSendMessageToTheReactNativeApp,
messageToShow,
),
exception,
);
}
}
}
``` | /content/code_sandbox/src/debugger/appWorker.ts | xml | 2016-01-20T21:10:07 | 2024-08-16T15:29:52 | vscode-react-native | microsoft/vscode-react-native | 2,617 | 3,581 |
```xml
//
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing, software
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
export const description = "Object captured across multiple functions";
const obj: any = { a: 1 };
function f1() { return obj; }
function f2() { console.log(obj); }
export const func = () => { f1(); obj.a = 2; f2(); };
``` | /content/code_sandbox/sdk/nodejs/tests/runtime/testdata/closure-tests/cases/60-Object-captured-across-multiple-functions/index.ts | xml | 2016-10-31T21:02:47 | 2024-08-16T19:47:04 | pulumi | pulumi/pulumi | 20,743 | 99 |
```xml
/**
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/**
* Given a path and some optional additional query parameters, create the dev server bundle URL.
* @param bundlePath like `/foobar`
* @param params like `{ platform: "web" }`
* @returns a URL like "/foobar.bundle?platform=android&modulesOnly=true&runModule=false&runtimeBytecodeVersion=null"
*/
export declare function buildUrlForBundle(bundlePath: string): string;
//# sourceMappingURL=buildUrlForBundle.d.ts.map
``` | /content/code_sandbox/packages/@expo/metro-runtime/build/async-require/buildUrlForBundle.d.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 124 |
```xml
import { fontFace } from './fontFace';
import { Stylesheet, InjectionMode } from './Stylesheet';
const _stylesheet: Stylesheet = Stylesheet.getInstance();
_stylesheet.setConfig({ injectionMode: InjectionMode.none });
describe('fontFace', () => {
it('can register a font face', () => {
fontFace({
fontFamily: 'Segoe UI',
src: 'url("foo")',
});
expect(_stylesheet.getRules()).toEqual('@font-face{font-family:Segoe UI;src:url("foo");}');
});
it('caches font face definitions', () => {
const definition = {
fontFamily: 'Segoe UI',
src: 'url("foo")',
};
fontFace(definition);
fontFace(definition);
fontFace(definition);
expect(_stylesheet.getRules()).toEqual('@font-face{font-family:Segoe UI;src:url("foo");}');
});
});
``` | /content/code_sandbox/packages/merge-styles/src/fontFace.test.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 194 |
```xml
import { GriffelStyle, tokens } from '@fluentui/react-components';
import { spinner } from './SpinnerMigration.mixins';
const testMixin = (mixin: GriffelStyle | undefined, expectedStyle: GriffelStyle | undefined) => {
const name = expectedStyle ? JSON.stringify(expectedStyle) : 'empty';
test(name, () => {
const result = { ...mixin };
expect(result).toEqual(expectedStyle || {});
});
};
describe('SpinnerMigration.mixins', () => {
describe('inline', () => {
const styles = {
display: 'inline-flex',
};
testMixin(spinner.v0Inline(), styles);
});
describe('v0 spinner label style', () => {
const styles = {
'& .fui-Label': {
fontSize: '14px',
fontWeight: tokens.fontWeightMedium,
},
};
testMixin(spinner.v0SpinnerLabelStyle(), styles);
});
});
``` | /content/code_sandbox/packages/react-components/react-migration-v0-v9/library/src/components/Spinner/SpinnerMigration.mixins.test.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 203 |
```xml
// activateWindowAsync
import { execAsync } from '@expo/osascript';
import { execFileSync } from 'child_process';
import { activateWindowAsync } from '../activateWindow';
const platform = process.platform;
function mockPlatform(value: typeof process.platform) {
Object.defineProperty(process, 'platform', {
value,
});
}
afterEach(() => {
mockPlatform(platform);
});
it(`skips on windows`, async () => {
mockPlatform('win32');
await activateWindowAsync({ type: 'emulator', pid: 'emulator-5554' });
expect(execFileSync).toBeCalledTimes(0);
});
it(`skips for devices`, async () => {
mockPlatform('darwin');
await activateWindowAsync({ type: 'device', pid: 'emulator-5554' });
expect(execFileSync).toBeCalledTimes(0);
});
it(`brings window to the front`, async () => {
mockPlatform('darwin');
jest.mocked(execFileSync).mockReturnValueOnce('36420' as any);
await activateWindowAsync({ type: 'emulator', pid: 'emulator-5554' });
expect(execFileSync).toBeCalledTimes(1);
expect(execAsync).toBeCalledTimes(1);
expect(execAsync).toBeCalledWith(expect.stringMatching(/36420/));
});
it(`skips if the pid cannot be found`, async () => {
mockPlatform('darwin');
jest.mocked(execFileSync).mockReturnValueOnce('' as any);
await activateWindowAsync({ type: 'emulator', pid: 'emulator-5554' });
expect(execFileSync).toBeCalledTimes(1);
expect(execAsync).toBeCalledTimes(0);
});
``` | /content/code_sandbox/packages/@expo/cli/src/start/platforms/android/__tests__/activateWindow-test.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 360 |
```xml
import { useEffect, useState } from 'react';
import type { TreeItem } from '../../../../../store';
export default function useSubfolderLoading(folder: TreeItem) {
const [isLoading, setIsLoading] = useState(false);
useEffect(() => {
if (folder.isLoaded) {
setIsLoading(false);
}
if (!folder.isExpanded || folder.isLoaded) {
return;
}
const t = setTimeout(() => setIsLoading(true), 250);
return () => {
clearTimeout(t);
};
}, [folder]);
return isLoading;
}
``` | /content/code_sandbox/applications/drive/src/app/components/layout/sidebar/DriveSidebar/DriveSidebarFolders/useSubfolderLoading.ts | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 118 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.