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 <doxygenlayout version="1.0"> <!-- Navigation index tabs for HTML output --> <navindex> <tab type="mainpage" visible="yes" title=""/> <tab type="pages" visible="yes" title="Usage and Description" intro=""/> <tab type="modules" visible="yes" title="Reference" intro=""/> <tab type="namespaces" visible="no" title="Namespaces"> <tab type="namespacelist" visible="no" title="" intro=""/> <tab type="namespacemembers" visible="no" title="" intro=""/> </tab> <tab type="classes" visible="no" title="Data Structures"> <tab type="classlist" visible="yes" title="" intro=""/> <tab type="classindex" visible="$ALPHABETICAL_INDEX" title=""/> <tab type="hierarchy" visible="yes" title="" intro=""/> <tab type="classmembers" visible="yes" title="" intro=""/> </tab> <tab type="files" visible="no" title="Files"> <tab type="filelist" visible="no" title="" intro=""/> <tab type="globals" visible="no" title="" intro=""/> </tab> <tab type="examples" visible="no" title="" intro=""/> </navindex> <!-- Layout definition for a class page --> <class> <briefdescription visible="yes"/> <includes visible="$SHOW_INCLUDE_FILES"/> <inheritancegraph visible="$CLASS_GRAPH"/> <collaborationgraph visible="$COLLABORATION_GRAPH"/> <allmemberslink visible="yes"/> <memberdecl> <nestedclasses visible="yes" title=""/> <publictypes title=""/> <publicslots title=""/> <signals title=""/> <publicmethods title=""/> <publicstaticmethods title=""/> <publicattributes title=""/> <publicstaticattributes title=""/> <protectedtypes title=""/> <protectedslots title=""/> <protectedmethods title=""/> <protectedstaticmethods title=""/> <protectedattributes title=""/> <protectedstaticattributes title=""/> <packagetypes title=""/> <packagemethods title=""/> <packagestaticmethods title=""/> <packageattributes title=""/> <packagestaticattributes title=""/> <properties title=""/> <events title=""/> <privatetypes title=""/> <privateslots title=""/> <privatemethods title=""/> <privatestaticmethods title=""/> <privateattributes title=""/> <privatestaticattributes title=""/> <friends title=""/> <related title="" subtitle=""/> <membergroups visible="yes"/> </memberdecl> <detaileddescription title="Description"/> <memberdef> <inlineclasses title=""/> <typedefs title=""/> <enums title=""/> <constructors title=""/> <functions title=""/> <related title=""/> <variables title=""/> <properties title=""/> <events title=""/> </memberdef> <usedfiles visible="$SHOW_USED_FILES"/> <authorsection visible="yes"/> </class> <!-- Layout definition for a namespace page --> <namespace> <briefdescription visible="yes"/> <memberdecl> <nestednamespaces visible="yes" title=""/> <classes visible="yes" title=""/> <typedefs title=""/> <enums title=""/> <functions title=""/> <variables title=""/> <membergroups visible="yes"/> </memberdecl> <detaileddescription title="Description"/> <memberdef> <inlineclasses title=""/> <typedefs title=""/> <enums title=""/> <functions title=""/> <variables title=""/> </memberdef> <authorsection visible="yes"/> </namespace> <!-- Layout definition for a file page --> <file> <briefdescription visible="yes"/> <includes visible="$SHOW_INCLUDE_FILES"/> <includegraph visible="$INCLUDE_GRAPH"/> <includedbygraph visible="$INCLUDED_BY_GRAPH"/> <sourcelink visible="yes"/> <memberdecl> <classes visible="yes" title=""/> <namespaces visible="yes" title=""/> <defines title=""/> <typedefs title=""/> <enums title=""/> <functions title=""/> <variables title=""/> <membergroups visible="yes"/> </memberdecl> <detaileddescription title="Description"/> <memberdef> <inlineclasses title=""/> <defines title=""/> <typedefs title=""/> <enums title=""/> <functions title=""/> <variables title=""/> </memberdef> <authorsection/> </file> <!-- Layout definition for a group page --> <group> <briefdescription visible="yes"/> <groupgraph visible="$GROUP_GRAPHS"/> <memberdecl> <nestedgroups visible="yes" title="Content"/> <dirs visible="yes" title=""/> <files visible="yes" title=""/> <namespaces visible="yes" title=""/> <classes visible="yes" title=""/> <defines title=""/> <typedefs title=""/> <enums title=""/> <enumvalues title=""/> <functions title=""/> <variables title=""/> <signals title=""/> <publicslots title=""/> <protectedslots title=""/> <privateslots title=""/> <events title=""/> <properties title=""/> <friends title=""/> <membergroups visible="yes"/> </memberdecl> <detaileddescription title="Description"/> <memberdef> <pagedocs/> <inlineclasses title=""/> <defines title=""/> <typedefs title=""/> <enums title=""/> <enumvalues title=""/> <functions title=""/> <variables title=""/> <signals title=""/> <publicslots title=""/> <protectedslots title=""/> <privateslots title=""/> <events title=""/> <properties title=""/> <friends title=""/> </memberdef> <authorsection visible="yes"/> </group> <!-- Layout definition for a directory page --> <directory> <briefdescription visible="yes"/> <directorygraph visible="yes"/> <memberdecl> <dirs visible="yes"/> <files visible="yes"/> </memberdecl> <detaileddescription title="Description"/> </directory> </doxygenlayout> ```
/content/code_sandbox/CMSIS/DoxyGen/Doxygen_Templates/DoxygenLayout_forUser.xml
xml
2016-02-18T08:04:18
2024-08-16T08:24:23
CMSIS_5
ARM-software/CMSIS_5
1,295
1,337
```xml <dict> <key>CommonPeripheralDSP</key> <array> <dict> <key>DeviceID</key> <integer>0</integer> <key>DeviceType</key> <string>Headphone</string> </dict> <dict> <key>DeviceID</key> <integer>0</integer> <key>DeviceType</key> <string>Microphone</string> </dict> </array> <key>PathMaps</key> <array> <dict> <key>PathMap</key> <array> <array> <array> <array> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>8</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>35</integer> </dict> <dict> <key>Boost</key> <integer>3</integer> <key>NodeID</key> <integer>25</integer> </dict> </array> </array> </array> <array> <array> <array> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>7</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>36</integer> </dict> <dict> <key>Boost</key> <integer>3</integer> <key>NodeID</key> <integer>18</integer> </dict> </array> </array> </array> <array> <array> <array> <dict> <key>Amp</key> <dict> <key>MuteInputAmp</key> <false/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>20</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <false/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>2</integer> </dict> </array> </array> <array> <array> <dict> <key>Amp</key> <dict> <key>MuteInputAmp</key> <false/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>33</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <false/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>3</integer> </dict> </array> </array> </array> </array> <key>PathMapID</key> <integer>212</integer> </dict> </array> </dict> ```
/content/code_sandbox/Resources/ALC285/Platforms21.xml
xml
2016-03-07T20:45:58
2024-08-14T08:57:03
AppleALC
acidanthera/AppleALC
3,420
1,962
```xml import { TestBed, inject } from '@angular/core/testing'; import { ConfirmationDialogService } from './confirmation-dialog.service'; describe('ConfirmationDialogService', () => { beforeEach(() => { TestBed.configureTestingModule({ providers: [ConfirmationDialogService], }); }); it('should be created', inject( [ConfirmationDialogService], (service: ConfirmationDialogService) => { expect(service).toBeTruthy(); } )); }); ```
/content/code_sandbox/src/portal/src/app/base/global-confirmation-dialog/confirmation-dialog.service.spec.ts
xml
2016-01-28T21:10:28
2024-08-16T15:28:34
harbor
goharbor/harbor
23,335
91
```xml let monitoring = true; let scriptPromises = new Array<Promise<any>>(); export const OriginalPromise = Promise; export class ProxiedPromise<T> extends Promise<T> { constructor( executor: ( resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void, ) => void, ) { super(executor); if (monitoring) { scriptPromises.push(this); } } static override all(promises: Promise<any>[]) { const promise = super.all(promises); if (monitoring) { scriptPromises.push(promise); } return promise; } static override allSettled(promises: Promise<any>[]) { // promise will be counted in Promise.resolve return super.allSettled(promises); } // TODO: super.any seems not supported for the compile target (es2021) // eslint-disable-next-line @typescript-eslint/no-unused-vars static any(_: Promise<any>[]) { return super.reject("'super.any' not supported"); } static override race(promises: Promise<any>[]) { const promise = super.race(promises); if (monitoring) { scriptPromises.push(promise); } return promise; } static override reject(value: any) { const promise = super.reject(value); if (monitoring) { scriptPromises.push(promise); } return promise; } static override resolve<T>(value?: T | PromiseLike<T>) { const promise = super.resolve(value); if (monitoring) { scriptPromises.push(promise); } return promise; } // TODO: Promise.any seems not supported for the compile target (es2021) // eslint-disable-next-line @typescript-eslint/no-unused-vars static withResolvers() { return super.reject("'Promise.withResolvers' not supported"); } } export const asyncTasksAllSettled = async () => { await Promise.allSettled(scriptPromises); scriptPromises = []; }; export const stopMonitorAsyncTasks = () => { monitoring = false; }; export const resetAsyncTasks = async () => { scriptPromises = []; monitoring = true; }; ```
/content/code_sandbox/packages/insomnia-sdk/src/objects/async_objects.ts
xml
2016-04-23T03:54:26
2024-08-16T16:50:44
insomnia
Kong/insomnia
34,054
489
```xml import { GitLFSProgressParser } from '../../../src/lib/progress/lfs' describe('GitLFSProgressParser', () => { describe('#parse', () => { let parser: GitLFSProgressParser beforeEach(() => { parser = new GitLFSProgressParser() }) it('understands valid lines', () => { const result = parser.parse('download 1/2 5/300 my cool image.jpg') expect(result.kind).toBe('progress') }) it("ignores lines it doesn't understand", () => { const result = parser.parse('All this happened, more or less.') expect(result.kind).toBe('context') }) }) }) ```
/content/code_sandbox/app/test/unit/progress/lfs-test.ts
xml
2016-05-11T15:59:00
2024-08-16T17:00:41
desktop
desktop/desktop
19,544
150
```xml /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at path_to_url */ export {DialogHarnessFilters} from './dialog-harness-filters'; export {MatDialogHarness, MatDialogSection} from './dialog-harness'; export * from './dialog-opener'; ```
/content/code_sandbox/src/material/dialog/testing/public-api.ts
xml
2016-01-04T18:50:02
2024-08-16T11:21:13
components
angular/components
24,263
73
```xml <?xml version="1.0" encoding="utf-8"?> <WixLocalization Culture="uk-ua" xmlns="path_to_url"> <String Id="Locale" Overridable="yes">uk</String> <String Id="ProductName" Overridable="yes"> Aspia</String> <String Id="DowngradeErrorMessage" Overridable="yes"> .</String> <String Id="CreateDesktopShortcut" Overridable="yes"> </String> <String Id="CreateProgramMenuShortcut" Overridable="yes"> ""</String> </WixLocalization> ```
/content/code_sandbox/installer/translations/host.uk-ua.wxl
xml
2016-10-26T16:17:31
2024-08-16T13:37:42
aspia
dchapyshev/aspia
1,579
130
```xml import * as React from 'react'; import cx from 'classnames'; import { createSvgIcon } from '../utils/createSvgIcon'; import { iconClassNames } from '../utils/iconClassNames'; export const ScreencastIcon = createSvgIcon({ svg: ({ classes }) => ( <svg role="presentation" focusable="false" viewBox="2 2 16 16" className={classes.svg}> <g className={cx(iconClassNames.outline, classes.outlinePart)}> <path fillRule="evenodd" clipRule="evenodd" d="M2 5.5C2 4.67157 2.67157 4 3.5 4H16.5C17.3284 4 18 4.67157 18 5.5V14.5C18 15.3284 17.3284 16 16.5 16H3.5C2.67157 16 2 15.3284 2 14.5V5.5ZM3.5 5C3.22386 5 3 5.22386 3 5.5V14.5C3 14.7761 3.22386 15 3.5 15H16.5C16.7761 15 17 14.7761 17 14.5V5.5C17 5.22386 16.7761 5 16.5 5H3.5Z" /> <path d="M5.4989 13.2495C5.4989 13.6634 5.16336 13.9989 4.74945 13.9989C4.33554 13.9989 4 13.6634 4 13.2495C4 12.8355 4.33554 12.5 4.74945 12.5C5.16336 12.5 5.4989 12.8355 5.4989 13.2495Z" /> <path fillRule="evenodd" clipRule="evenodd" d="M3.9973 10.5C3.9973 10.2239 4.22116 10 4.4973 10C6.43169 10 7.99982 11.5681 7.99982 13.5025C7.99982 13.7787 7.77596 14.0025 7.49982 14.0025C7.22368 14.0025 6.99982 13.7787 6.99982 13.5025C6.99982 12.1204 5.87941 11 4.4973 11C4.22116 11 3.9973 10.7761 3.9973 10.5Z" /> <path fillRule="evenodd" clipRule="evenodd" d="M3.99731 8C3.99731 7.72386 4.22117 7.5 4.49731 7.5C7.81251 7.5 10.5 10.1875 10.5 13.5027C10.5 13.7788 10.2761 14.0027 10 14.0027C9.72386 14.0027 9.5 13.7788 9.5 13.5027C9.5 10.7398 7.26022 8.5 4.49731 8.5C4.22117 8.5 3.99731 8.27614 3.99731 8Z" /> </g> <path className={cx(iconClassNames.filled, classes.filledPart)} fillRule="evenodd" clipRule="evenodd" d="M3.5 4C2.67157 4 2 4.67157 2 5.5V14.5C2 15.3284 2.67157 16 3.5 16H16.5C17.3284 16 18 15.3284 18 14.5V5.5C18 4.67157 17.3284 4 16.5 4H3.5ZM3.99731 8C3.99731 7.72386 4.22117 7.5 4.49731 7.5C7.81251 7.5 10.5 10.1875 10.5 13.5027C10.5 13.7788 10.2761 14.0027 10 14.0027C9.72386 14.0027 9.5 13.7788 9.5 13.5027C9.5 10.7398 7.26022 8.5 4.49731 8.5C4.22117 8.5 3.99731 8.27614 3.99731 8ZM4.49731 10C4.22117 10 3.99731 10.2239 3.99731 10.5C3.99731 10.7761 4.22117 11 4.49731 11C5.87942 11 6.99984 12.1204 6.99984 13.5025C6.99984 13.7787 7.2237 14.0025 7.49984 14.0025C7.77598 14.0025 7.99984 13.7787 7.99984 13.5025C7.99984 11.5681 6.4317 10 4.49731 10ZM4.74945 13.9989C5.16336 13.9989 5.4989 13.6634 5.4989 13.2495C5.4989 12.8355 5.16336 12.5 4.74945 12.5C4.33554 12.5 4 12.8355 4 13.2495C4 13.6634 4.33554 13.9989 4.74945 13.9989Z" /> </svg> ), displayName: 'ScreencastIcon', }); ```
/content/code_sandbox/packages/fluentui/react-icons-northstar/src/components/ScreencastIcon.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
1,462
```xml import type { DeepMutable, DeepReadonly, HashFunction, MaybeReadonly, RxDocumentData, RxJsonSchema, StringKeys } from './types/index.d.ts'; export declare class RxSchema<RxDocType = any> { readonly jsonSchema: RxJsonSchema<RxDocumentData<RxDocType>>; readonly hashFunction: HashFunction; indexes: MaybeReadonly<string[]>[]; readonly primaryPath: StringKeys<RxDocumentData<RxDocType>>; finalFields: string[]; constructor(jsonSchema: RxJsonSchema<RxDocumentData<RxDocType>>, hashFunction: HashFunction); get version(): number; get defaultValues(): { [P in keyof RxDocType]: RxDocType[P]; }; /** * @overrides itself on the first call * * TODO this should be a pure function that * caches the hash in a WeakMap. */ get hash(): Promise<string>; /** * checks if a given change on a document is allowed * Ensures that: * - final fields are not modified * @throws {Error} if not valid */ validateChange(dataBefore: any, dataAfter: any): void; /** * creates the schema-based document-prototype, * see RxCollection.getDocumentPrototype() */ getDocumentPrototype(): any; getPrimaryOfDocumentData(documentData: Partial<RxDocType>): string; } export declare function getIndexes<RxDocType = any>(jsonSchema: RxJsonSchema<RxDocType>): MaybeReadonly<string[]>[]; /** * array with previous version-numbers */ export declare function getPreviousVersions(schema: RxJsonSchema<any>): number[]; export declare function createRxSchema<T>(jsonSchema: RxJsonSchema<T>, hashFunction: HashFunction, runPreCreateHooks?: boolean): RxSchema<T>; export declare function isRxSchema(obj: any): boolean; /** * Used as helper function the generate the document type out of the schema via typescript. * @link path_to_url */ export declare function toTypedRxJsonSchema<T extends DeepReadonly<RxJsonSchema<any>>>(schema: T): DeepMutable<T>; ```
/content/code_sandbox/dist/types/rx-schema.d.ts
xml
2016-12-02T19:34:42
2024-08-16T15:47:20
rxdb
pubkey/rxdb
21,054
458
```xml <?xml version="1.0" encoding="utf-8"?> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="path_to_url" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd"> <file datatype="xml" source-language="en" target-language="de" original="../LocalizableStrings.resx"> <body> <trans-unit id="AppFullName"> <source>Remove a project-to-project reference from the project.</source> <target state="translated">Hiermit entfernen Sie einen Projekt-zu-Projekt-Verweis aus dem Projekt.</target> <note /> </trans-unit> <trans-unit id="AppDescription"> <source>Command to remove project to project reference</source> <target state="translated">Befehl zum Entfernen von Projekt-zu-Projekt-Verweisen</target> <note /> </trans-unit> <trans-unit id="CmdFrameworkDescription"> <source>Remove the reference only when targeting a specific framework.</source> <target state="translated">Der Verweis wird nur dann entfernt, wenn ein bestimmtes Zielframework als Zielversion verwendet wird.</target> <note /> </trans-unit> <trans-unit id="ProjectPathArgumentName"> <source>PROJECT_PATH</source> <target state="translated">PROJECT_PATH</target> <note /> </trans-unit> <trans-unit id="ProjectPathArgumentDescription"> <source>The paths to the referenced projects to remove.</source> <target state="translated">Die Pfade zu den referenzierten Projekten, die entfernt werden sollen.</target> <note /> </trans-unit> </body> </file> </xliff> ```
/content/code_sandbox/src/Cli/dotnet/commands/dotnet-remove/dotnet-remove-reference/xlf/LocalizableStrings.de.xlf
xml
2016-07-22T21:26:02
2024-08-16T17:23:58
sdk
dotnet/sdk
2,627
413
```xml // See LICENSE.txt for license information. import {withDatabase, withObservables} from '@nozbe/watermelondb/react'; import {of as of$, combineLatest} from 'rxjs'; import {Preferences} from '@constants'; import {getDisplayNamePreferenceAsBool} from '@helpers/api/preference'; import {queryDisplayNamePreferences} from '@queries/servers/preference'; import {observeConfigBooleanValue} from '@queries/servers/system'; import Opengraph from './opengraph'; import type {WithDatabaseArgs} from '@typings/database/database'; const enhance = withObservables( ['removeLinkPreview'], ({database, removeLinkPreview}: WithDatabaseArgs & {removeLinkPreview: boolean}) => { if (removeLinkPreview) { return {showLinkPreviews: of$(false)}; } const linkPreviewsConfig = observeConfigBooleanValue(database, 'EnableLinkPreviews'); const linkPreviewPreference = queryDisplayNamePreferences(database, Preferences.LINK_PREVIEW_DISPLAY). observeWithColumns(['value']); const showLinkPreviews = combineLatest([linkPreviewsConfig, linkPreviewPreference], (cfg, pref) => { const previewsEnabled = getDisplayNamePreferenceAsBool(pref, Preferences.LINK_PREVIEW_DISPLAY, true); return of$(previewsEnabled && cfg); }); return {showLinkPreviews}; }, ); export default withDatabase(enhance(Opengraph)); ```
/content/code_sandbox/app/components/post_list/post/body/content/opengraph/index.ts
xml
2016-10-07T16:52:32
2024-08-16T12:08:38
mattermost-mobile
mattermost/mattermost-mobile
2,155
295
```xml // See LICENSE.txt for license information. export default { TERMS_OF_SERVICE: 'path_to_url PRIVACY_POLICY: 'path_to_url }; ```
/content/code_sandbox/app/constants/about_links.ts
xml
2016-10-07T16:52:32
2024-08-16T12:08:38
mattermost-mobile
mattermost/mattermost-mobile
2,155
33
```xml import React, { Component } from 'react'; import { localized, Actions, DateUtils } from 'mailspring-exports'; import DateInput from './date-input'; import { Menu } from './menu'; import { Moment } from 'moment'; const { DATE_FORMAT_SHORT, DATE_FORMAT_LONG } = DateUtils; type DatePickerPopoverProps = { className?: string; footer?: React.ReactNode; onSelectDate?: (...args: any[]) => any; header: React.ReactNode; dateOptions: { [optionKey: string]: () => Moment | Date }; shouldSelectDateWhenInterpreted?: boolean; }; class DatePickerPopover extends Component<DatePickerPopoverProps> { static displayName = 'DatePickerPopover'; static defaultProps = { shouldSelectDateWhenInterpreted: false, }; private _dateInputComponent: DateInput; private _menuComponent: Menu; onEscape() { Actions.closePopover(); } onSelectMenuOption = optionKey => { const { dateOptions } = this.props; const date = dateOptions[optionKey](); this._dateInputComponent.clearInput(); this.selectDate(date, optionKey); }; onCustomDateInterpreted = date => { const { shouldSelectDateWhenInterpreted } = this.props; if (date && shouldSelectDateWhenInterpreted) { this._menuComponent.clearSelection(); this.selectDate(date, 'Custom'); } }; onCustomDateSelected = (date, inputValue) => { if (date) { this._menuComponent.clearSelection(); this.selectDate(date, 'Custom'); } else { AppEnv.showErrorDialog( localized(`Sorry, we can't interpret %@ as a valid date.`, inputValue) ); } }; selectDate = (date, dateLabel) => { const nonMomentDate = date.toDate ? date.toDate() : date; this.props.onSelectDate(nonMomentDate, dateLabel); }; renderMenuOption = optionKey => { const { dateOptions } = this.props; const date = dateOptions[optionKey](); const formatted = DateUtils.format(date, DATE_FORMAT_SHORT); return ( <div className="date-picker-popover-option"> {optionKey} <span className="time">{formatted}</span> </div> ); }; render() { const { className, header, footer, dateOptions } = this.props; let footerComponents: React.ReactNode[] = [ <div key="divider" className="divider" />, <DateInput ref={cm => { this._dateInputComponent = cm; }} key="custom-section" className="section date-input-section" dateFormat={DATE_FORMAT_LONG} onDateSubmitted={this.onCustomDateSelected} onDateInterpreted={this.onCustomDateInterpreted} />, ]; if (footer) { if (Array.isArray(footer)) { footerComponents = footerComponents.concat(footer); } else { footerComponents = footerComponents.concat([footer]); } } return ( <div className={`date-picker-popover ${className}`}> <Menu ref={cm => { this._menuComponent = cm; }} items={Object.keys(dateOptions)} itemKey={item => item} itemContent={this.renderMenuOption} defaultSelectedIndex={-1} headerComponents={header} footerComponents={footerComponents} onEscape={this.onEscape} onSelect={this.onSelectMenuOption} /> </div> ); } } export default DatePickerPopover; ```
/content/code_sandbox/app/src/components/date-picker-popover.tsx
xml
2016-10-13T06:45:50
2024-08-16T18:14:37
Mailspring
Foundry376/Mailspring
15,331
774
```xml /// <reference types="node" /> import { EventEmitter } from 'events'; declare function once<T>(emitter: EventEmitter, name: string): once.CancellablePromise<T>; declare namespace once { interface CancelFunction { (): void; } interface CancellablePromise<T> extends Promise<T> { cancel: CancelFunction; } } export = once; ```
/content/code_sandbox/deps/node_modules/@tootallnate/once/dist/index.d.ts
xml
2016-10-10T16:41:53
2024-08-14T15:09:44
nvs
jasongin/nvs
2,695
77
```xml import { c, msgid } from 'ttag'; import { canonicalizeEmail, canonicalizeInternalEmail } from '@proton/shared/lib/helpers/email'; import { isBlockedIncomingDefaultAddress } from '@proton/shared/lib/helpers/incomingDefaults'; import type { Address, IncomingDefault, Recipient } from '@proton/shared/lib/interfaces'; import type { Message } from '@proton/shared/lib/interfaces/mail/Message'; import { isSent, isSentAndReceived } from '@proton/shared/lib/mail/messages'; import isTruthy from '@proton/utils/isTruthy'; import unique from '@proton/utils/unique'; import { MESSAGE_ACTIONS } from '../../constants'; import type { RecipientGroup, RecipientOrGroup } from '../../models/address'; import type { Conversation } from '../../models/conversation'; import type { Element } from '../../models/element'; import type { ContactGroupsMap, ContactsMap } from '../../store/contacts/contactsTypes'; import type { MessageState } from '../../store/messages/messagesTypes'; import { isSelfAddress } from '../addresses'; import { isMessage, isConversation as testIsConversation } from '../elements'; /** * Return the matching ContactEmail in the map taking care of email normalization */ export const getContactEmail = (contactsMap: ContactsMap, email: string | undefined) => { const normalizedEmail = canonicalizeEmail(email || ''); return contactsMap[normalizedEmail]; }; export const recipientsWithoutGroup = (recipients: Recipient[], groupPath?: string) => recipients.filter((recipient) => recipient.Group !== groupPath); export const getRecipientLabelDetailed = (recipient: Recipient, contactsMap: ContactsMap) => { const { Name, Address } = recipient || {}; const contact = getContactEmail(contactsMap, Address); if (contact?.Name?.trim()) { return contact.Name; } if (Name) { return Name; } return Address; }; export const getRecipientLabel = (recipient: Recipient, contactsMap: ContactsMap) => { const { Name, Address } = recipient || {}; const contact = getContactEmail(contactsMap, Address); if (contact?.Name?.trim()) { return contact.Name; } if (!Name || Name === Address) { return Address; } if (Name) { return Name; } return ''; }; export const getRecipientGroupLabel = (recipientGroup?: RecipientGroup, contactsInGroup = 0, isShortName = false) => { const count = recipientGroup?.recipients.length || 0; if (isShortName) { if (count === contactsInGroup) { return `${recipientGroup?.group?.Name} (${contactsInGroup})`; } return `${recipientGroup?.group?.Name} (${count}/${contactsInGroup})`; } // Copy variables to give explicit naming in the translation string const contactGroupName = recipientGroup?.group?.Name || ''; const numberOfSelectedContacts = count; const numberOfContactsInGroup = contactsInGroup; // translator: The final string looks like "Work (2/10 members)" return c('Info').ngettext( msgid`${contactGroupName} (${numberOfSelectedContacts}/${numberOfContactsInGroup} member)`, `${contactGroupName} (${numberOfSelectedContacts}/${numberOfContactsInGroup} members)`, numberOfContactsInGroup ); }; export const recipientsToRecipientOrGroup = ( recipients: Recipient[], contactGroupsMap?: ContactGroupsMap, alwaysShowRecipients: boolean = false ) => recipients.reduce<RecipientOrGroup[]>((acc, value) => { if (value.Group && !alwaysShowRecipients) { const existingGroup = acc.find((recipientsOrGroup) => recipientsOrGroup.group?.group?.Path === value.Group); if (existingGroup) { existingGroup.group?.recipients.push(value); } else { if (contactGroupsMap) { const group = contactGroupsMap[value.Group]; if (group) { acc.push({ group: { group, recipients: [value] } }); } else { acc.push({ recipient: value }); } } else { acc.push({ recipient: value }); } } } else { // Show recipient if no group is set or when we force the recipient display (e.g. print modal) acc.push({ recipient: value }); } return acc; }, []); export const recipientOrGroupToRecipients = (recipientsOrGroups: RecipientOrGroup[]) => recipientsOrGroups .map((recipientOrGroup) => recipientOrGroup.recipient ? recipientOrGroup.recipient : (recipientOrGroup.group?.recipients as Recipient[]) ) .flat(); export const getRecipientOrGroupKey = (recipientOrGroup: RecipientOrGroup) => recipientOrGroup.recipient ? recipientOrGroup.recipient.Address : recipientOrGroup.group?.group?.ID; export const matchRecipientOrGroup = (rog1: RecipientOrGroup, rog2: RecipientOrGroup) => getRecipientOrGroupKey(rog1) === getRecipientOrGroupKey(rog2); /** * Find the current sender for a message */ export const findSender = ( addresses: Address[] = [], message?: Partial<Message>, ableToSend = false ): Address | undefined => { const enabledAddresses = addresses .filter((address) => address.Status === 1) .filter((address) => (ableToSend ? address.Send === 1 : true)) .sort((a1, a2) => (a1.Order || 0) - (a2.Order || 0)); if (message?.AddressID) { const originalAddress = enabledAddresses.find((address) => address.ID === message?.AddressID); if (originalAddress) { return originalAddress; } } return enabledAddresses[0]; }; export const getNumParticipants = (element: Element) => { let recipients: Recipient[]; if (isMessage(element)) { const { ToList = [], CCList = [], BCCList = [], Sender = {} } = element as Message; recipients = [...ToList, ...CCList, ...BCCList, Sender as Recipient]; } else { const { Senders = [], Recipients = [] } = element as Conversation; recipients = [...Recipients, ...Senders]; } return unique(recipients.map(({ Address }: Recipient) => canonicalizeInternalEmail(Address))).length; }; export const getSendersToBlock = ( elements: Element[], incomingDefaultsAddresses: IncomingDefault[], addresses: Address[] ) => { const allSenders: Recipient[] = []; // Get all senders without duplicates elements.forEach((el) => { const isConversation = testIsConversation(el); if (isConversation) { (el as Conversation)?.Senders?.map((sender) => { if (sender && allSenders.every((s) => s.Address !== sender.Address)) { allSenders.push(sender); } }); } else { const sender = (el as Message).Sender; if (sender && allSenders.every((s) => s.Address !== sender.Address)) { allSenders.push((el as Message).Sender); } } }, []); // Remove self and blocked addresses return allSenders .filter((sender) => { if (sender) { const isSenderBlocked = isBlockedIncomingDefaultAddress(incomingDefaultsAddresses, sender.Address); const isSenderSelfAddress = isSelfAddress(sender.Address, addresses); return !isSenderBlocked && !isSenderSelfAddress; } return; }) .filter(isTruthy); }; export const getRecipients = (referenceMessage: MessageState, action: MESSAGE_ACTIONS, addresses: Address[]) => { const { data } = referenceMessage; const toList = data?.ToList || []; const replyTos = data?.ReplyTos || []; const ccList = data?.CCList || []; const bccList = data?.BCCList || []; let returnToList: Recipient[] = []; let returnCCList: Recipient[] = []; let returnBCCList: Recipient[] = []; if (action === MESSAGE_ACTIONS.REPLY) { if (isSent(referenceMessage.data) || isSentAndReceived(referenceMessage.data)) { returnToList = [...toList]; } else { returnToList = [...replyTos]; } } else { if (isSent(referenceMessage.data) || isSentAndReceived(referenceMessage.data)) { returnToList = [...toList]; returnCCList = [...ccList]; returnBCCList = [...bccList]; } else { // Remove user address in CCList and ToList const userAddresses = addresses.map(({ Email = '' }) => canonicalizeInternalEmail(Email)); const CCListAll: Recipient[] = unique([...(toList || []), ...(ccList || [])]); const CCList = CCListAll.filter( ({ Address = '' }) => !userAddresses.includes(canonicalizeInternalEmail(Address)) ); returnToList = [...replyTos]; returnCCList = [...CCList]; } } return { ToList: returnToList, CCList: returnCCList, BCCList: returnBCCList }; }; export const getReplyRecipientListAsString = ( referenceMessage: MessageState, action: MESSAGE_ACTIONS, addresses: Address[], contactsMap: ContactsMap ) => { const getContactLabel = (recipientList: Recipient[]) => { return recipientList.map((recipient) => getRecipientLabel(recipient, contactsMap)); }; const { ToList, CCList, BCCList } = getRecipients(referenceMessage, action, addresses); const recipientList = getContactLabel([...ToList, ...CCList, ...BCCList]); let recipientAsString = ''; recipientList.forEach((recipient, index) => { const isLastElement = index === recipientList.length - 1; recipientAsString = isLastElement ? `${recipientAsString}${recipient}` : `${recipientAsString}${recipient}, `; }); return recipientAsString; }; ```
/content/code_sandbox/applications/mail/src/app/helpers/message/messageRecipients.ts
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
2,178
```xml import { LitElement, html, css } from "lit"; import {customElement, property} from "lit/decorators.js"; import { Node, NodeType } from "@openremote/model"; import { EditorWorkspace } from "./editor-workspace"; import { Utilities } from "../utils"; import { i18next, translate } from "@openremote/or-translate"; import { newIds, project } from "./flow-editor"; import { CopyMachine } from "../node-structure"; @customElement("node-menu-item") export class NodeMenuItem extends translate(i18next)(LitElement) { @property({ attribute: false }) public node!: Node; @property({ attribute: false }) private isDragging = false; @property({ attribute: false }) private x = 0; @property({ attribute: false }) private y = 0; @property({ attribute: false }) private workspace !: EditorWorkspace; private xOffset = 0; private yOffset = 0; constructor() { super(); this.addEventListener("mousedown", this.startDrag); } static get styles() { return css` :host, .node-drag-item{ padding: 4px; margin: 0 0 15px 0; display: inline-block; text-align: center; color: white; border-radius: var(--roundness); box-shadow: rgba(0, 0, 0, 0.2) 0px 5px 5px -5px; width: calc(var(--nodepanel-width) - 4px * 2); height: 22px; line-height: 22px; cursor:grab; transition: box-shadow 150ms; } :host(.small), .small{ width: 26px; height: 26px; line-height: 26px; margin: 0; } .node-drag-item{ z-index: 5000; position: fixed; background: inherit; box-shadow: rgba(0, 0, 0, 0.2) 0 2px 15px; filter: opacity(90%); pointer-events: none; } `; } protected render() { switch (this.node.type) { case NodeType.INPUT: this.classList.add("input-node"); break; case NodeType.PROCESSOR: this.classList.add("processor-node"); break; case NodeType.OUTPUT: this.classList.add("output-node"); break; } if (this.node.displayCharacter) { this.classList.add("small"); } this.title = i18next.t(this.node.name!, Utilities.humanLike(this.node.name!)); return html` <div class="label">${this.flowNodeName}</div> ${this.isDragging ? this.dragNodeTemplate : null} `; } private get dragNodeTemplate() { return html`<div class="node-drag-item ${(this.node.displayCharacter ? "small" : null)}" style="top: ${this.y - this.yOffset}px; left: ${this.x - this.xOffset}px"><div class="label">${this.flowNodeName}</div></div>`; } private get flowNodeName() { return i18next.t(this.node.displayCharacter || this.node.name!, this.node.displayCharacter || Utilities.humanLike(this.node.name || "invalid node name")); } private startDrag = (e: MouseEvent) => { this.xOffset = e.offsetX; this.yOffset = e.offsetY; this.x = e.clientX; this.y = e.clientY; this.isDragging = true; window.addEventListener("mouseup", this.stopDrag); window.addEventListener("mousemove", this.onMove); } private onMove = (e: MouseEvent) => { this.x = e.clientX; this.y = e.clientY; } private stopDrag = (e: MouseEvent) => { window.removeEventListener("mouseup", this.stopDrag); window.removeEventListener("mousemove", this.onMove); this.isDragging = false; if (Utilities.isPointInsideBox(e.offsetX, e.offsetY, { x: this.workspace.clientRect.left, y: this.workspace.clientRect.top, width: this.workspace.clientRect.width, height: this.workspace.clientRect.height, })) { const copy = CopyMachine.copy(this.node); newIds.add(copy.id!); copy.position = this.workspace.offsetToWorld({ x: e.offsetX - this.workspace.clientRect.left, y: e.offsetY - this.workspace.clientRect.top }); project.createUndoSnapshot(); project.addNode(copy); project.notifyChange(); } } } ```
/content/code_sandbox/ui/component/or-rules/src/flow-viewer/components/node-menu-item.ts
xml
2016-02-03T11:14:02
2024-08-16T12:45:50
openremote
openremote/openremote
1,184
1,006
```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="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\rpmalloc\rpmalloc.c" /> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\rpmalloc\rpmalloc.h" /> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{01b8c8be-038d-482f-b016-3a9496ac41b0}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>rpmalloc-test</RootNamespace> <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v142</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v142</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v142</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v142</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Label="Shared"> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='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 Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <OutDir>..\..\lib\windows\debug\x86\</OutDir> <IntDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <OutDir>..\..\lib\windows\release\x86\</OutDir> <IntDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <IntDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</IntDir> <OutDir>..\..\lib\windows\debug\x86-64\</OutDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <IntDir>$(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\</IntDir> <OutDir>..\..\lib\windows\release\x86-64\</OutDir> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>ENABLE_ASSERTS=1;ENABLE_STATISTICS=1;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <ExceptionHandling>false</ExceptionHandling> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>false</BufferSecurityCheck> <FunctionLevelLinking>false</FunctionLevelLinking> <EnableParallelCodeGeneration>false</EnableParallelCodeGeneration> <FloatingPointModel>Fast</FloatingPointModel> <FloatingPointExceptions>false</FloatingPointExceptions> <CreateHotpatchableImage>false</CreateHotpatchableImage> <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAsManaged>false</CompileAsManaged> <CompileAsWinRT>false</CompileAsWinRT> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <Link> <SubSystem>Windows</SubSystem> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>ENABLE_ASSERTS=1;ENABLE_STATISTICS=1;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>false</MinimalRebuild> <ExceptionHandling>false</ExceptionHandling> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>false</BufferSecurityCheck> <FunctionLevelLinking>false</FunctionLevelLinking> <EnableParallelCodeGeneration>false</EnableParallelCodeGeneration> <FloatingPointModel>Fast</FloatingPointModel> <FloatingPointExceptions>false</FloatingPointExceptions> <CreateHotpatchableImage>false</CreateHotpatchableImage> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAsManaged>false</CompileAsManaged> <CompileAsWinRT>false</CompileAsWinRT> <MultiProcessorCompilation>true</MultiProcessorCompilation> </ClCompile> <Link> <SubSystem>Windows</SubSystem> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader> </PrecompiledHeader> <Optimization>Full</Optimization> <FunctionLevelLinking>false</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>ENABLE_ASSERTS=1;ENABLE_STATISTICS=1;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>false</ExceptionHandling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>false</BufferSecurityCheck> <EnableParallelCodeGeneration>false</EnableParallelCodeGeneration> <FloatingPointModel>Fast</FloatingPointModel> <FloatingPointExceptions>false</FloatingPointExceptions> <CreateHotpatchableImage>false</CreateHotpatchableImage> <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet> <CompileAsManaged>false</CompileAsManaged> <CompileAsWinRT>false</CompileAsWinRT> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <OmitFramePointers>true</OmitFramePointers> <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations> <MultiProcessorCompilation>true</MultiProcessorCompilation> <StringPooling>true</StringPooling> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader> </PrecompiledHeader> <Optimization>Full</Optimization> <FunctionLevelLinking>false</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>ENABLE_ASSERTS=1;ENABLE_STATISTICS=1;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>false</ExceptionHandling> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <BufferSecurityCheck>false</BufferSecurityCheck> <EnableParallelCodeGeneration>false</EnableParallelCodeGeneration> <FloatingPointModel>Fast</FloatingPointModel> <FloatingPointExceptions>false</FloatingPointExceptions> <CreateHotpatchableImage>false</CreateHotpatchableImage> <CompileAsManaged>false</CompileAsManaged> <CompileAsWinRT>false</CompileAsWinRT> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed> <OmitFramePointers>true</OmitFramePointers> <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations> <MultiProcessorCompilation>true</MultiProcessorCompilation> <StringPooling>true</StringPooling> </ClCompile> <Link> <SubSystem>Windows</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> </Link> </ItemDefinitionGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project> ```
/content/code_sandbox/build/msvs/rpmalloc-test.vcxproj
xml
2016-11-18T12:57:26
2024-08-15T15:59:02
rpmalloc
mjansson/rpmalloc
2,084
2,635
```xml import { format, formatRelative } from 'date-fns'; import type { Location } from 'history'; import { MAILBOX_LABEL_IDS } from '@proton/shared/lib/constants'; import { omit, toMap } from '@proton/shared/lib/helpers/object'; import type { MailSettings } from '@proton/shared/lib/interfaces'; import type { Folder } from '@proton/shared/lib/interfaces/Folder'; import type { Label, LabelCount } from '@proton/shared/lib/interfaces/Label'; import type { Message } from '@proton/shared/lib/interfaces/mail/Message'; import { getSender, hasAttachments as messageHasAttachments } from '@proton/shared/lib/mail/messages'; import diff from '@proton/utils/diff'; import unique from '@proton/utils/unique'; import { ELEMENT_TYPES } from '../constants'; import type { Conversation } from '../models/conversation'; import type { Element } from '../models/element'; import type { LabelIDsChanges } from '../models/event'; import type { Filter, SearchParameters, Sort } from '../models/tools'; import { getLabelIDs as conversationGetLabelIDs, getSenders as conversationGetSenders, getTime as conversationGetTime, hasAttachments as conversationHasAttachments, isUnread as conversationIsUnread, getNumAttachments as conversationNumAttachments, } from './conversation'; import { isConversationMode } from './mailSettings'; import { getSnoozeDate } from './snooze'; const { INBOX, TRASH, SPAM, ARCHIVE, SCHEDULED, SNOOZED } = MAILBOX_LABEL_IDS; export interface TypeParams { labelID?: string; mailSettings: any; location: Location; } export const getCurrentType = ({ labelID, mailSettings, location }: TypeParams) => isConversationMode(labelID, mailSettings, location) ? ELEMENT_TYPES.CONVERSATION : ELEMENT_TYPES.MESSAGE; export const isMessage = (element: Element | undefined): boolean => typeof (element as Message)?.ConversationID === 'string'; export const isConversation = (element: Element | undefined): boolean => !isMessage(element); /** * Get the date of an element. * @param element * @param labelID is only used for a conversation. Yet mandatory not to forget to consider its use. */ export const getDate = (element: Element | undefined, labelID: string | undefined) => { if (!element) { return new Date(); } const time = isMessage(element) ? element.Time : conversationGetTime(element, labelID); return new Date((time || 0) * 1000); }; /** * Get readable time to display from message / conversation * @param element.Time * @return Jan 17, 2016 */ export const getReadableTime = (element: Element | undefined, labelID: string | undefined) => formatRelative(getDate(element, labelID), new Date()); export const getReadableFullTime = (element: Element | undefined, labelID: string | undefined) => format(getDate(element, labelID), 'Ppp'); /** * Return if the element is to be considered in read or unread status * @param element * @param labelID is only used for a conversation. Yet mandatory not to forget to consider its use. */ export const isUnread = (element: Element | undefined, labelID: string | undefined) => { if (!element) { return false; } if (isMessage(element)) { return (element as Message).Unread !== 0; } return conversationIsUnread(element as Conversation, labelID); }; export const isUnreadMessage = (message: Message) => isUnread(message, undefined); export const getLabelIDs = (element: Element | undefined, contextLabelID: string | undefined) => isMessage(element) ? (element as Message | undefined)?.LabelIDs?.reduce<{ [labelID: string]: boolean | undefined }>( (acc, labelID) => { acc[labelID] = true; return acc; }, {} ) || {} : conversationGetLabelIDs(element, contextLabelID); export const hasLabel = (element: Element | undefined, labelID: string) => getLabelIDs(element, undefined)[labelID] !== undefined; export const isStarred = (element: Element) => hasLabel(element, MAILBOX_LABEL_IDS.STARRED); export const getSize = (element: Element) => element.Size || 0; export const sort = (elements: Element[], sort: Sort, labelID: string) => { const getValue = { Time: (element: Element, labelID: string) => getDate(element, labelID).getTime(), Size: getSize, SnoozeTime: (element: Element) => getSnoozeDate(element, labelID).getTime(), }[sort.sort] as any; const compare = (a: Element, b: Element) => { let valueA = getValue(a, labelID); let valueB = getValue(b, labelID); if (valueA === valueB && sort.sort === 'Time') { valueA = a.Order || 0; valueB = b.Order || 0; } return sort.desc ? valueB - valueA : valueA - valueB; }; return [...elements].sort((e1, e2) => compare(e1, e2)); }; export const getCounterMap = ( labels: Label[], conversationCounters: LabelCount[], messageCounters: LabelCount[], mailSettings: MailSettings ) => { const labelIDs = [...Object.values(MAILBOX_LABEL_IDS), ...labels.map((label) => label.ID || '')]; const conversationCountersMap = toMap(conversationCounters, 'LabelID') as { [labelID: string]: LabelCount }; const messageCountersMap = toMap(messageCounters, 'LabelID') as { [labelID: string]: LabelCount }; return labelIDs.reduce<{ [labelID: string]: LabelCount | undefined }>((acc, labelID) => { const conversationMode = isConversationMode(labelID, mailSettings); const countersMap = conversationMode ? conversationCountersMap : messageCountersMap; acc[labelID] = countersMap[labelID]; return acc; }, {}); }; export const hasAttachments = (element: Element) => isMessage(element) ? messageHasAttachments(element as Message) : conversationHasAttachments(element); export const getNumAttachments = (element: Element) => isMessage(element) ? (element as Message)?.NumAttachments || 0 : conversationNumAttachments(element); /** * Starting from the element LabelIDs list, add and remove labels from an event manager event */ export const parseLabelIDsInEvent = <T extends Element>(element: T, changes: T & LabelIDsChanges): T => { const omitted = omit(changes, ['LabelIDsRemoved', 'LabelIDsAdded']); if (isMessage(element)) { if (omitted?.LabelIDs) { return { ...element, ...omitted }; } const LabelIDs = unique( diff((element as Message).LabelIDs || [], changes.LabelIDsRemoved || []).concat(changes.LabelIDsAdded || []) ); return { ...element, ...omitted, LabelIDs }; } // Conversation don't use LabelIDs even if these properties are still present in update events // The conversation.Labels object is fully updated each time so we can safely ignore them return { ...element, ...omitted }; }; export const isSearch = (searchParams: SearchParameters) => !!searchParams.address || !!searchParams.begin || !!searchParams.end || !!searchParams.from || !!searchParams.keyword || !!searchParams.to || !!searchParams.wildcard; export const isEmpty = (filter: Filter) => !Object.keys(filter).length; export const hasAttachmentsFilter = (filter?: Filter) => filter?.Attachments === 1; /** * Get the IDs of the folder where the element is currently located */ export const getCurrentFolderIDs = (element: Element | undefined, customFoldersList: Folder[]): string[] => { const labelIDs = getLabelIDs(element, undefined); const standardFolders: { [labelID: string]: boolean } = { [INBOX]: true, [TRASH]: true, [SPAM]: true, [ARCHIVE]: true, [SCHEDULED]: true, [SNOOZED]: true, }; const customFolders = toMap(customFoldersList, 'ID'); return Object.keys(labelIDs).filter((labelID) => standardFolders[labelID] || customFolders[labelID]) || ''; }; export const getSenders = (element: Element) => { if (isMessage(element)) { return [getSender(element as Message)]; } return conversationGetSenders(element as Conversation); }; export const getFirstSenderAddress = (element: Element) => { const senders = getSenders(element); const [sender] = senders; const { Address = '' } = sender || {}; return Address; }; export const getLocationElementsCount = ( labelID: string, conversationsCount: LabelCount[], messagesCount: LabelCount[], conversationMode: boolean ) => { if (conversationMode && conversationsCount && conversationsCount.length > 0) { return conversationsCount.find((conversationCount) => labelID === conversationCount.LabelID)?.Total || 0; } else if (messagesCount && messagesCount.length > 0) { return messagesCount.find((messageCount) => labelID === messageCount.LabelID)?.Total || 0; } return 0; }; ```
/content/code_sandbox/applications/mail/src/app/helpers/elements.ts
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
2,063
```xml import { CameraType, ImageType } from '../legacy/Camera.types'; // path_to_url export const VIDEO_ASPECT_RATIOS = { '3840x2160': 3840 / 2160, '1920x1080': 1920 / 1080, '1280x720': 1280 / 720, '640x480': 640 / 480, '352x288': 352 / 288, }; export const PictureSizes = Object.keys(VIDEO_ASPECT_RATIOS); export const ImageTypeFormat = { [ImageType.jpg]: 'image/jpeg', [ImageType.png]: 'image/png', }; export const MinimumConstraints: MediaStreamConstraints = { audio: false, video: true, }; export const CameraTypeToFacingMode = { [CameraType.front]: 'user', [CameraType.back]: 'environment', }; export const FacingModeToCameraType = { user: CameraType.front, environment: CameraType.back, }; ```
/content/code_sandbox/packages/expo-camera/src/web/WebConstants.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
218
```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 data-nodes="db.t_shadow,shadow_db.t_shadow"> <column name="order_id" type="long" /> <column name="user_id" type="int" /> <column name="order_name" type="varchar" /> <column name="type_char" type="char" /> <column name="type_boolean" type="boolean" /> <column name="type_smallint" type="smallint" /> <column name="type_enum" type="enum#season" /> <column name="type_decimal" type="decimal" /> <column name="type_date" type="Date" /> <column name="type_time" type="time" /> <column name="type_timestamp" type="timestamp" /> </metadata> <metadata data-nodes="db.t_merchant,shadow_db.t_merchant"> <column name="merchant_id" type="numeric" /> <column name="country_id" type="numeric" /> <column name="merchant_name" type="varchar" /> <column name="business_code" type="varchar" /> <column name="telephone" type="varchar" /> <column name="creation_date" type="datetime" /> </metadata> <row data-node="db.t_shadow" values="1, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" /> <row data-node="db.t_shadow" values="2, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" /> <row data-node="db.t_shadow" values="3, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" /> <row data-node="db.t_shadow" values="4, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" /> <row data-node="db.t_shadow" values="5, 1, pro_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" /> <row data-node="shadow_db.t_shadow" values="1, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" /> <row data-node="shadow_db.t_shadow" values="2, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" /> <row data-node="shadow_db.t_shadow" values="3, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" /> <row data-node="shadow_db.t_shadow" values="4, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" /> <row data-node="shadow_db.t_shadow" values="5, 0, shadow_order, S, true, 5, summer, 10.00, 2017-08-08, 18:30:30, 2017-08-08 18:30:30.0" /> <row data-node="db.t_merchant" values="1, 86, tencent, 86000001, 86100000001, 2017-08-08" /> <row data-node="db.t_merchant" values="2, 86, haier, 86000002, 86100000002, 2017-08-08" /> <row data-node="db.t_merchant" values="3, 86, huawei, 86000003, 86100000003, 2017-08-08" /> <row data-node="db.t_merchant" values="4, 86, alibaba, 86000004, 86100000004, 2017-08-08" /> <row data-node="db.t_merchant" values="5, 86, lenovo, 86000005, 86100000005, 2017-08-08" /> <row data-node="db.t_merchant" values="6, 86, moutai, 86000006, 86100000006, 2017-08-08" /> <row data-node="db.t_merchant" values="7, 86, baidu, 86000007, 86100000007, 2017-08-08" /> <row data-node="db.t_merchant" values="8, 86, xiaomi, 86000008, 86100000008, 2017-08-08" /> <row data-node="db.t_merchant" values="9, 86, vivo, 86000009, 86100000009, 2017-08-08" /> <row data-node="db.t_merchant" values="10, 86, oppo, 86000010, 86100000010, 2017-08-08" /> <row data-node="db.t_merchant" values="11, 1, google, 01000011, 01100000011, 2017-08-08" /> <row data-node="db.t_merchant" values="12, 1, walmart, 01000012, 01100000012, 2017-08-08" /> <row data-node="db.t_merchant" values="13, 1, amazon, 01000013, 01100000013, 2017-08-08" /> <row data-node="db.t_merchant" values="14, 1, apple, 01000014, 01100000014, 2017-08-08" /> <row data-node="db.t_merchant" values="15, 1, microsoft, 01000015, 01100000015, 2017-08-08" /> <row data-node="db.t_merchant" values="16, 1, dell, 01000016, 01100000016, 2017-08-08" /> <row data-node="db.t_merchant" values="17, 1, johnson, 01000017, 01100000017, 2017-08-08" /> <row data-node="db.t_merchant" values="18, 1, intel, 01000018, 01100000018, 2017-08-08" /> <row data-node="db.t_merchant" values="19, 1, hp, 01000019, 01100000019, 2017-08-08" /> <row data-node="db.t_merchant" values="20, 1, tesla, 01000020, 01100000020, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="1, 86, shadow_tencent, 86000001, 86100000001, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="2, 86, shadow_haier, 86000002, 86100000002, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="3, 86, shadow_huawei, 86000003, 86100000003, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="4, 86, shadow_alibaba, 86000004, 86100000004, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="5, 86, shadow_lenovo, 86000005, 86100000005, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="6, 86, shadow_moutai, 86000006, 86100000006, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="7, 86, shadow_baidu, 86000007, 86100000007, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="8, 86, shadow_xiaomi, 86000008, 86100000008, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="9, 86, shadow_vivo, 86000009, 86100000009, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="10, 86, shadow_oppo, 86000010, 86100000010, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="11, 1, shadow_google, 01000011, 01100000011, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="12, 1, shadow_walmart, 01000012, 01100000012, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="13, 1, shadow_amazon, 01000013, 01100000013, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="14, 1, shadow_apple, 01000014, 01100000014, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="15, 1, shadow_microsoft, 01000015, 01100000015, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="16, 1, shadow_dell, 01000016, 01100000016, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="17, 1, shadow_johnson, 01000017, 01100000017, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="18, 1, shadow_intel, 01000018, 01100000018, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="19, 1, shadow_hp, 01000019, 01100000019, 2017-08-08" /> <row data-node="shadow_db.t_merchant" values="20, 1, shadow_tesla, 01000020, 01100000020, 2017-08-08" /> </dataset> ```
/content/code_sandbox/test/e2e/sql/src/test/resources/env/scenario/shadow/data/actual/dataset.xml
xml
2016-01-18T12:49:26
2024-08-16T15:48:11
shardingsphere
apache/shardingsphere
19,707
2,685
```xml import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { NbButtonModule, NbCardModule, NbCheckboxModule, NbDialogModule, NbInputModule, NbPopoverModule, NbSelectModule, NbTabsetModule, NbTooltipModule, NbWindowModule, } from '@nebular/theme'; // modules import { ThemeModule } from '../../@theme/theme.module'; import { ModalOverlaysRoutingModule } from './modal-overlays-routing.module'; // components import { ModalOverlaysComponent } from './modal-overlays.component'; import { DialogComponent } from './dialog/dialog.component'; import { ShowcaseDialogComponent } from './dialog/showcase-dialog/showcase-dialog.component'; import { DialogNamePromptComponent } from './dialog/dialog-name-prompt/dialog-name-prompt.component'; import { WindowComponent } from './window/window.component'; import { WindowFormComponent } from './window/window-form/window-form.component'; import { ToastrComponent } from './toastr/toastr.component'; import { PopoversComponent } from './popovers/popovers.component'; import { NgxPopoverCardComponent, NgxPopoverFormComponent, NgxPopoverTabsComponent, } from './popovers/popover-examples.component'; import { TooltipComponent } from './tooltip/tooltip.component'; const COMPONENTS = [ ModalOverlaysComponent, ToastrComponent, DialogComponent, ShowcaseDialogComponent, DialogNamePromptComponent, WindowComponent, WindowFormComponent, PopoversComponent, NgxPopoverCardComponent, NgxPopoverFormComponent, NgxPopoverTabsComponent, TooltipComponent, ]; const ENTRY_COMPONENTS = [ ShowcaseDialogComponent, DialogNamePromptComponent, WindowFormComponent, NgxPopoverCardComponent, NgxPopoverFormComponent, NgxPopoverTabsComponent, ]; const MODULES = [ FormsModule, ThemeModule, ModalOverlaysRoutingModule, NbDialogModule.forChild(), NbWindowModule.forChild(), NbCardModule, NbCheckboxModule, NbTabsetModule, NbPopoverModule, NbButtonModule, NbInputModule, NbSelectModule, NbTooltipModule, ]; const SERVICES = [ ]; @NgModule({ imports: [ ...MODULES, ], declarations: [ ...COMPONENTS, ], providers: [ ...SERVICES, ], }) export class ModalOverlaysModule { } ```
/content/code_sandbox/src/app/pages/modal-overlays/modal-overlays.module.ts
xml
2016-05-25T10:09:03
2024-08-16T16:34:03
ngx-admin
akveo/ngx-admin
25,169
505
```xml import * as React from 'react'; import { ITheme, IPalette, ISemanticColors } from '@fluentui/react/lib/Styling'; import { Stack } from '@fluentui/react'; import { mergeStyles } from '@fluentui/merge-styles'; import { SemanticSlotsDetailsList } from './SemanticSlotsDetailsList'; import { MainPanelInnerContent } from '../shared/MainPanelStyles'; import { getVariant, VariantThemeType } from '@fluentui/scheme-utilities'; export interface ISemanticSlotsProps { theme?: ITheme; } const slotClassName = mergeStyles({ display: 'flex', alignItems: 'center', overflow: 'auto', }); const semanticPaletteColorBox = mergeStyles({ width: 15, height: 15, display: 'inline-block', left: 5, top: 5, border: '1px solid black', flexShrink: 0, }); type IPaletteSlots = { [key: string]: string; }; type IMapping = { [key: string]: string; }; type ISlotNames = string[]; export const SemanticSlots: React.FunctionComponent<ISemanticSlotsProps> = (props: ISemanticSlotsProps) => { let slotNames: ISlotNames = []; let noneSlots: JSX.Element[] = []; let neutralSlots: JSX.Element[] = []; let softSlots: JSX.Element[] = []; let strongSlots: JSX.Element[] = []; const semanticSlotWidget = (color: string, name: string): JSX.Element => { return ( <div key={name} className={slotClassName}> <Stack horizontal gap={5}> <div key={name} className={semanticPaletteColorBox} style={{ backgroundColor: color }} /> <div>{name}</div> </Stack> </div> ); }; /** * Filters the list of palette slots pulled from getVariant to only include the ones starting with 'theme' * and 'neutral' or the 4 unique ones called 'black', 'white', 'redDark', and 'accent' because these are * the only ones to be displayed on the theme designer site. */ const trimPaletteSlots = (paletteSlots: IPalette): IPaletteSlots => { let trimmedPaletteSlots: IPaletteSlots = {}; for (let palette in paletteSlots) { if ( palette.startsWith('theme') || palette.startsWith('neutral') || palette === 'black' || palette === 'white' || palette === 'redDark' ) { trimmedPaletteSlots[palette] = paletteSlots[palette as keyof IPalette]; } } return trimmedPaletteSlots; }; const isASemanticColor = (semanticString: string): boolean => { return ( semanticString.startsWith('body') || semanticString.startsWith('primary') || semanticString.startsWith('disabled') || semanticString.startsWith('focus') || semanticString.startsWith('variant') || semanticString.startsWith('default') || semanticString.includes('action') || semanticString.includes('link') || semanticString.startsWith('list') || semanticString.startsWith('button') || semanticString.startsWith('menu') || semanticString.startsWith('input') || semanticString.startsWith('small') ); }; /** * Filters the list of semantic slots pulled from getVariant to only ones with strings that are appropriate. * The appropriate ones are in the method above 'isASemanticColor'. These are the only ones we selected to include * on the theme designer site. Input can be type ISemanticColors, which is a dictionary mapping each slot to * its hex color value or an array of strings. Output is similar whether an array or a dictionary. */ function trimSemanticSlotsOrNames(semanticSlots: ISemanticColors): Partial<ISemanticColors>; function trimSemanticSlotsOrNames(semanticSlots: Array<string>): Array<string>; function trimSemanticSlotsOrNames( semanticSlots: Array<string> | ISemanticColors, ): Array<string> | Partial<ISemanticColors> { if (semanticSlots instanceof Array) { let trimmedSemanticSlotNames = []; for (let i = 0; i < semanticSlots.length; i++) { let slotName = semanticSlots[i]; if (isASemanticColor(slotName)) { trimmedSemanticSlotNames.push(slotName); } } return trimmedSemanticSlotNames; } else { let trimmedSemanticSlots: Partial<ISemanticColors> = {}; for (let semanticColor in semanticSlots) { if (isASemanticColor(semanticColor)) { trimmedSemanticSlots[semanticColor as keyof ISemanticColors] = semanticSlots[semanticColor as keyof ISemanticColors]; } } return trimmedSemanticSlots; } } const fillVariantSlotsList = (variantType: VariantThemeType): JSX.Element[] => { if (props.theme) { let currThemeVariant: ITheme; let noneVariant = getVariant(props.theme, VariantThemeType.None); currThemeVariant = getVariant(props.theme, variantType); const currVariantSemanticSlots = currThemeVariant.semanticColors; /* "trimming" to get rid of the semantic color slots & palette slots we don't use for theme designer app */ const trimmedSemanticSlots = trimSemanticSlotsOrNames(currVariantSemanticSlots); // palette slot values should be based off the default variant const currVariantPaletteSlots = noneVariant.palette; const trimmedPaletteSlots = trimPaletteSlots(currVariantPaletteSlots); const mapping: IMapping = {}; /** * Iterate through the list of semantic colors. * For each semantic color, check if its hex color string is in the list of palette colors. * If it is, add it to the mapping. */ for (let semanticColor in trimmedSemanticSlots) { if (semanticColor) { const paletteColorHexStr = trimmedSemanticSlots[semanticColor as keyof ISemanticColors]; for (let palette in trimmedPaletteSlots) { if (trimmedPaletteSlots[palette] === paletteColorHexStr) { mapping[semanticColor] = palette; } else if (paletteColorHexStr === 'transparent') { mapping[semanticColor] = 'transparent'; } } } } const tempJSXList: JSX.Element[] = []; for (let i = 0; i < slotNames.length; i++) { let slot = slotNames[i]; let currSlotJSX = semanticSlotWidget(currVariantSemanticSlots[slot as keyof ISemanticColors], mapping[slot]); tempJSXList.push(currSlotJSX); } return tempJSXList; } else { return []; } }; let semanticSlotsNone = props.theme!.semanticColors; slotNames = trimSemanticSlotsOrNames(Object.keys(semanticSlotsNone)) as ISlotNames; noneSlots = fillVariantSlotsList(VariantThemeType.None); neutralSlots = fillVariantSlotsList(VariantThemeType.Neutral); softSlots = fillVariantSlotsList(VariantThemeType.Soft); strongSlots = fillVariantSlotsList(VariantThemeType.Strong); return ( <div className={MainPanelInnerContent}> <SemanticSlotsDetailsList slotNames={slotNames} noneSlots={noneSlots} neutralSlots={neutralSlots} softSlots={softSlots} strongSlots={strongSlots} /> </div> ); }; ```
/content/code_sandbox/apps/theming-designer/src/components/SemanticSlots.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
1,613
```xml import { AccountsTypeorm, entities } from '@accounts/typeorm'; import { type DatabaseInterface } from '@accounts/types'; import { type Connection, ConnectionManager, type ConnectionOptions } from 'typeorm'; import { createAccountsTypeORMModule } from '@accounts/module-typeorm'; import { type DatabaseTestInterface } from '.'; import { type Module } from 'graphql-modules'; const connectionName = 'typeorm-accounts-js-test'; const connectionConfig: ConnectionOptions = { name: connectionName, type: 'postgres', host: 'localhost', port: 5432, username: 'postgres', entities, password: '', database: 'accounts-js-tests-e2e', }; export class DatabaseTest implements DatabaseTestInterface { public connectionManager = new ConnectionManager(); public accountsDatabase: DatabaseInterface; public connection: Connection; public databaseModule: Module; constructor() { this.connection = this.connectionManager.create(connectionConfig); this.databaseModule = createAccountsTypeORMModule({ connection: this.connection }); this.accountsDatabase = new AccountsTypeorm({}, this.connection); } public async start() { await this.connection.connect(); await this.connection.synchronize(); } public async stop() { if (this.connection.isConnected) { await this.connection.close(); } } } ```
/content/code_sandbox/packages/e2e/__tests__/databases/typeorm.ts
xml
2016-10-07T01:43:23
2024-07-14T11:57:08
accounts
accounts-js/accounts
1,492
276
```xml import {ColorInputParams} from '../../blade/common/api/params.js'; import {parseRecord} from '../../common/micro-parsers.js'; import {parsePickerLayout} from '../../common/picker-util.js'; import {ColorType} from './model/color-model.js'; function parseColorType(value: unknown): ColorType | undefined { return value === 'int' ? 'int' : value === 'float' ? 'float' : undefined; } export function parseColorInputParams( params: Record<string, unknown>, ): ColorInputParams | undefined { return parseRecord<ColorInputParams>(params, (p) => ({ color: p.optional.object({ alpha: p.optional.boolean, type: p.optional.custom(parseColorType), }), expanded: p.optional.boolean, picker: p.optional.custom(parsePickerLayout), readonly: p.optional.constant(false), })); } export function getKeyScaleForColor(forAlpha: boolean): number { return forAlpha ? 0.1 : 1; } export function extractColorType( params: ColorInputParams, ): ColorType | undefined { return params.color?.type; } ```
/content/code_sandbox/packages/core/src/input-binding/color/util.ts
xml
2016-05-10T15:45:13
2024-08-16T19:57:27
tweakpane
cocopon/tweakpane
3,480
237
```xml import { createDynamicComponent } from "../../../src/node"; import { getContainer } from "@xarc/subapp"; import { renderToString } from "react-dom/server"; import { describe, it } from "mocha"; import { expect } from "chai"; import { createElement } from "react"; // eslint-disable-line describe("createDynamicComponent", function () { it("should create a component from a subapp", async () => { const container = getContainer(); const Component = createDynamicComponent({ name: "test", getModule: () => import("../../blah") }); expect(container.getNames()).contains("test"); expect(Component).to.be.a("function"); // data-reactroot isn't getting created due to Context.Provider // see path_to_url const html = renderToString(<Component />); expect(html).to.equal( `<div>subapp <!-- -->test<!-- --> component loading... </div>` ); await container.get("test")._getModule(); const html2 = renderToString(<Component />); expect(html2).to.equal(`<div>hello</div>`); }); }); ```
/content/code_sandbox/packages/xarc-react/test/spec/node/index.spec.tsx
xml
2016-09-06T19:02:39
2024-08-11T11:43:11
electrode
electrode-io/electrode
2,103
240
```xml <?xml version="1.0" encoding="utf-8"?> <android.support.v7.widget.Toolbar xmlns:android="path_to_url" xmlns:app="path_to_url" android:id="@+id/tool_bar" android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true" app:titleTextColor="@android:color/white" android:background="?attr/colorPrimaryDark" android:minHeight="?attr/actionBarSize" /> ```
/content/code_sandbox/app/src/main/res/layout/view_toolbar.xml
xml
2016-08-07T14:56:56
2024-08-13T01:11:07
GeekNews
codeestX/GeekNews
3,498
107
```xml import { isConformant } from '../../testing/isConformant'; import { NavDivider } from './NavDivider'; describe('NavDivider', () => { isConformant({ Component: NavDivider, displayName: 'NavDivider', testOptions: { 'has-static-classnames': [ { props: { children: 'Test Children' }, }, ], }, }); }); ```
/content/code_sandbox/packages/react-components/react-nav-preview/library/src/components/NavDivider/NavDivider.test.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
88
```xml import chalk from 'chalk'; import { ModPlatform } from '../Plugin.types'; /** * Log a warning that doesn't disrupt the spinners. * * ```sh * android: android.package: property is invalid path_to_url * ``` * * @param property Name of the config property that triggered the warning (best-effort) * @param text Main warning message * @param link Useful link to resources related to the warning */ export function addWarningAndroid(property: string, text: string, link?: string) { console.warn(formatWarning('android', property, text, link)); } /** * Log a warning that doesn't disrupt the spinners. * * ```sh * ios: ios.bundleIdentifier: property is invalid path_to_url * ``` * * @param property Name of the config property that triggered the warning (best-effort) * @param text Main warning message * @param link Useful link to resources related to the warning */ export function addWarningIOS(property: string, text: string, link?: string) { console.warn(formatWarning('ios', property, text, link)); } export function addWarningForPlatform( platform: ModPlatform & string, property: string, text: string, link?: string ) { console.warn(formatWarning(platform, property, text, link)); } function formatWarning(platform: string, property: string, warning: string, link?: string) { return chalk.yellow`${' ' + chalk.bold(platform)}: ${property}: ${warning}${ link ? chalk.gray(' ' + link) : '' }`; } ```
/content/code_sandbox/packages/@expo/config-plugins/src/utils/warnings.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
336
```xml import { ASSET_STATUSES } from '../../../common/constant/asset'; import { IAssetCategoriesDocument } from '../../../common/types/asset'; import { IContext } from '../../../connectionResolver'; export default { async __resolveReference({ _id }, { models }: IContext) { return models.AssetCategories.findOne({ _id }); }, async isRoot(category: IAssetCategoriesDocument, {}) { return !category.parentId; }, async assetCount( category: IAssetCategoriesDocument, {}, { models }: IContext ) { const order = category.order.slice(-1) ? category.order.replace(/\\/g, '\\\\') : category.order; const asset_category_ids = await models.AssetCategories.find( { order: { $regex: new RegExp(order) } }, { _id: 1 } ); return models.Assets.countDocuments({ categoryId: { $in: asset_category_ids }, status: { $ne: ASSET_STATUSES.DELETED } }); } }; ```
/content/code_sandbox/packages/plugin-assets-api/src/dataloaders/resolvers/customResolvers/assetCategory.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
219
```xml <?xml version="1.0" encoding="utf-8"?> <resources> <string-array name="merge_ff_type"> <item>Fast Forward</item> <item>Fast Forward Only</item> <item>No Fast Forward</item> </string-array> <string-array name="repo_file_operations"> <item>Add to stage</item> <item>Checkout (Reset Changes)</item> <item>Delete</item> <item>Remove cached from repository</item> <item>Remove force from repository</item> </string-array> <string-array name="repo_operation_names"> <item>New Branch</item> <item>Pull</item> <item>Push</item> <item>Add all to stage</item> <item>Commit</item> <item>Reset (HARD)</item> <item>Merge</item> <item>Fetch</item> <item>Rebase</item> <item>Cherry Pick</item> <item>Diff</item> <item>New File</item> <item>New Directory</item> <item>Add Remote</item> <item>Remove Remote</item> <item>Delete</item> <item>Raw config</item> <item>Config</item> </string-array> <string-array name="dialog_choose_repo_action_items"> <item>Rename</item> <item>Delete</item> </string-array> <!-- MUST KEY theme_names and theme_ids in SYNC --> <string-array name="theme_names"> <item>light</item> <item>dark</item> </string-array> <string-array name="codemirror_theme_names"> <item>default</item> <item>midnight</item> </string-array> <string-array name="theme_ids"> <item>0</item> <item>1</item> </string-array> </resources> ```
/content/code_sandbox/app/src/main/res/values-ko/arrays.xml
xml
2016-10-14T02:54:01
2024-08-16T16:01:33
MGit
maks/MGit
1,193
434
```xml /* eslint-disable max-classes-per-file */ /* * * 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 { encodeBlock } from '../../../../src/engine/legacy/codec'; import { validateLegacyBlock } from '../../../../src/engine/legacy/validate'; import { blockFixtures } from './fixtures'; describe('Legacy validate', () => { let encodedBlock: Buffer; beforeEach(() => { encodedBlock = encodeBlock(blockFixtures[0]); }); describe('validateBlock', () => { it('should fail if property includes invalid generator public key length', () => { const invalidEncodedBlock = encodeBlock({ header: { ...blockFixtures[0].header, generatorPublicKey: Buffer.from([0, 0, 1]), }, payload: [...blockFixtures[0].payload], }); expect(() => validateLegacyBlock(invalidEncodedBlock, blockFixtures[1])).toThrow( "Property '.generatorPublicKey' minLength not satisfied", ); }); it('should fail if property includes invalid transaction root length', () => { const invalidEncodedBlock = encodeBlock({ header: { ...blockFixtures[0].header, transactionRoot: Buffer.from([0, 0, 1]), }, payload: [...blockFixtures[0].payload], }); expect(() => validateLegacyBlock(invalidEncodedBlock, blockFixtures[1])).toThrow( "Property '.transactionRoot' minLength not satisfied", ); }); it('should fail if property includes invalid previous block id length', () => { const invalidEncodedBlock = encodeBlock({ header: { ...blockFixtures[0].header, previousBlockID: Buffer.from([0, 0, 1]), }, payload: [...blockFixtures[0].payload], }); expect(() => validateLegacyBlock(invalidEncodedBlock, blockFixtures[1])).toThrow( "Property '.previousBlockID' minLength not satisfied", ); }); it('should fail if property includes invalid signature length', () => { const invalidEncodedBlock = encodeBlock({ header: { ...blockFixtures[0].header, signature: Buffer.from([0, 0, 1]), }, payload: [...blockFixtures[0].payload], }); expect(() => validateLegacyBlock(invalidEncodedBlock, blockFixtures[1])).toThrow( "Property '.signature' minLength not satisfied", ); }); it('should fail if height is not consecutive', () => { expect(() => validateLegacyBlock(encodedBlock, { header: { ...blockFixtures[1].header, height: 3333, }, payload: blockFixtures[1].payload, }), ).toThrow('Received block at height 16270306 is not consecutive to next block 3333'); }); it('should fail if previous id does not match', () => { expect(() => validateLegacyBlock(encodedBlock, { header: { ...blockFixtures[1].header, previousBlockID: Buffer.from( your_sha256_hash, 'hex', ), }, payload: blockFixtures[1].payload, }), ).toThrow('is not previous block of'); }); it('should fail if transaction root does not match', () => { const invalidEncodedBlock = encodeBlock({ header: { ...blockFixtures[0].header, }, payload: [], }); expect(() => validateLegacyBlock(invalidEncodedBlock, blockFixtures[1])).toThrow( 'Received block has invalid transaction root', ); }); it('should not throw when received block is a valid previous block', () => { expect(() => validateLegacyBlock(encodedBlock, blockFixtures[1])).not.toThrow(); }); }); }); ```
/content/code_sandbox/framework/test/unit/engine/legacy/validate.spec.ts
xml
2016-02-01T21:45:35
2024-08-15T19:16:48
lisk-sdk
LiskArchive/lisk-sdk
2,721
944
```xml import { injectable } from 'inversify'; import * as ESTree from 'estree'; import { ICalleeData } from '../../../interfaces/analyzers/calls-graph-analyzer/ICalleeData'; import { ICalleeDataExtractor } from '../../../interfaces/analyzers/calls-graph-analyzer/ICalleeDataExtractor'; @injectable() export abstract class AbstractCalleeDataExtractor implements ICalleeDataExtractor { /** * @param {Node[]} blockScopeBody * @param {Node} callee * @returns {ICalleeData} */ public abstract extract (blockScopeBody: ESTree.Node[], callee: ESTree.Node): ICalleeData | null; } ```
/content/code_sandbox/src/analyzers/calls-graph-analyzer/callee-data-extractors/AbstractCalleeDataExtractor.ts
xml
2016-05-09T08:16:53
2024-08-16T19:43:07
javascript-obfuscator
javascript-obfuscator/javascript-obfuscator
13,358
145
```xml <?xml version="1.0" encoding="utf-8"?> <!-- path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <manifest xmlns:android="path_to_url" package="com.example.android.sunshine"> <!-- This permission is necessary in order for Sunshine to perform network access. --> <uses-permission android:name="android.permission.INTERNET"/> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <!--The manifest entry for our MainActivity. Each Activity requires a manifest entry--> <activity android:name=".MainActivity" android:label="@string/app_name" android:launchMode="singleTop"> <intent-filter> <action android:name="android.intent.action.MAIN"/> <category android:name="android.intent.category.LAUNCHER"/> </intent-filter> </activity> <!--The manifest entry for our DetailActivity. Each Activity requires a manifest entry--> <activity android:name=".DetailActivity" android:label="@string/title_activity_detail" android:parentActivityName=".MainActivity"> <meta-data android:name="android.support.PARENT_ACTIVITY" android:value=".MainActivity"/> </activity> <!--The manifest entry for our SettingsActivity. Each Activity requires a manifest entry--> <activity android:name=".SettingsActivity"/> <!-- TODO (4) Register WeatherProvider in the manifest with the correct authorities --> </application> </manifest> ```
/content/code_sandbox/S09.01-Exercise-ContentProviderFoundation/app/src/main/AndroidManifest.xml
xml
2016-11-02T04:42:26
2024-08-12T19:38:06
ud851-Sunshine
udacity/ud851-Sunshine
1,999
356
```xml import { TemplatePipe } from '~/app/shared/pipes/template.pipe'; describe('TemplatePipe', () => { const pipe = new TemplatePipe(); it('create an instance', () => { expect(pipe).toBeTruthy(); }); it('transforms (1)', () => { expect(pipe.transform('{{ a }}', { a: 'hello' })).toBe('hello'); }); }); ```
/content/code_sandbox/deb/openmediavault/workbench/src/app/shared/pipes/template.pipe.spec.ts
xml
2016-05-03T10:35:34
2024-08-16T08:03:04
openmediavault
openmediavault/openmediavault
4,954
81
```xml import { isMessagingSupportedFactory } from './is-messaging-supported-factory'; export const isSupported = isMessagingSupportedFactory.async; ```
/content/code_sandbox/src/messaging/overrides.ts
xml
2016-01-11T20:47:23
2024-08-14T12:09:31
angularfire
angular/angularfire
7,648
28
```xml import type { PayloadAction } from '@reduxjs/toolkit'; import { createSlice } from '@reduxjs/toolkit'; interface LayoutState { sidebarExpanded: boolean; selectAll: boolean; } export const layoutInitialState: LayoutState = { /** * Used on narrow devices when burger menu allows to toggle sidebar */ sidebarExpanded: false, selectAll: false, }; const name = 'layout'; const layoutSlice = createSlice({ name, initialState: layoutInitialState, reducers: { setSidebarExpanded: (state, action: PayloadAction<boolean>) => { state.sidebarExpanded = action.payload; }, toggleSidebarExpand: (state) => { state.sidebarExpanded = !state.sidebarExpanded; }, setSelectAll: (state, action: PayloadAction<boolean>) => { state.selectAll = action.payload; }, }, }); export const layoutActions = layoutSlice.actions; export const layoutReducer = { [name]: layoutSlice.reducer }; ```
/content/code_sandbox/applications/mail/src/app/store/layout/layoutSlice.ts
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
207
```xml import { createContext } from 'react'; import { AuthProvider } from '../types'; export const AuthContext = createContext<AuthProvider | undefined>(undefined); AuthContext.displayName = 'AuthContext'; ```
/content/code_sandbox/packages/ra-core/src/auth/AuthContext.tsx
xml
2016-07-13T07:58:54
2024-08-16T18:32:27
react-admin
marmelab/react-admin
24,624
39
```xml <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>net6.0</TargetFramework> <ImplicitUsings>enable</ImplicitUsings> <Nullable>enable</Nullable> </PropertyGroup> <ItemGroup> <PackageReference Include="Pulumi" Version="3.66.1" /> <PackageReference Include="Pulumi.Aws" Version="4.26.0" /> </ItemGroup> </Project> ```
/content/code_sandbox/tests/testdata/codegen/transpiled_examples/getting-started-pp/dotnet/dotnet.csproj
xml
2016-10-31T21:02:47
2024-08-16T19:47:04
pulumi
pulumi/pulumi
20,743
114
```xml import { parseSmartTagsOptsString } from "../src/utils.js"; const EXPECTED_VALUE_1 = { args: ["TOPIC"], params: { name: "SingleTableTopic", attributes: "title>subject!", }, }; const EXPECTED_VALUE_2 = { args: ["typeA"], params: { via: "(id_1,id_2)->types_a.a(id_1, id_2)", singular: "", }, }; const EXPECTED_VALUE_3 = { args: ["( { [ 1, {2} ], }, )(){}[]({[]})"], params: {}, }; const EXPECTED_VALUE_4 = { args: ["blah"], params: { stuff: "( { [ 1, {2} ], }, )(){}[]({[]})", }, }; test.each([ ["TOPIC name:SingleTableTopic attributes:title>subject!", EXPECTED_VALUE_1], ["TOPIC name:SingleTableTopic attributes:title>subject!", EXPECTED_VALUE_1], [" TOPIC name:SingleTableTopic attributes:title>subject!", EXPECTED_VALUE_1], [ " TOPIC name: SingleTableTopic attributes: title>subject!", EXPECTED_VALUE_1, ], [ ' TOPIC name: "SingleTableTopic" attributes: "title>subject!"', EXPECTED_VALUE_1, ], [ ' \t TOPIC name:\t"SingleTableTopic" attributes:t"i""tle>subj"ect!', EXPECTED_VALUE_1, ], ['typeA via:"(id_1,id_2)->types_a.a(id_1, id_2)" singular', EXPECTED_VALUE_2], ["typeA via:(id_1,id_2)->types_a.a(id_1, id_2) singular", EXPECTED_VALUE_2], ["( { [ 1, {2} ], }, )(){}[]({[]})", EXPECTED_VALUE_3], ['"( { [ 1, {2} ], }, )(){}[]({[]})"', EXPECTED_VALUE_3], ["blah stuff:( { [ 1, {2} ], }, )(){}[]({[]})", EXPECTED_VALUE_4], ['blah stuff:"( { [ 1, {2} ], }, )(){}[]({[]})"', EXPECTED_VALUE_4], ])("%s", (str, expected) => { const result = parseSmartTagsOptsString(str, 1); expect(result).toEqual(expected); }); test.each([ [ "name:SingleTableItem mode:single type:type", 0, { args: [], params: { name: "SingleTableItem", mode: "single", type: "type" }, }, ], ])("%s", (str, nargs, expected) => { const result = parseSmartTagsOptsString(str, nargs); expect(result).toEqual(expected); }); ```
/content/code_sandbox/graphile-build/graphile-build-pg/__tests__/utils.test.ts
xml
2016-04-14T21:29:19
2024-08-16T17:12:51
crystal
graphile/crystal
12,539
633
```xml import test from 'tape-promise/tape'; import {Program} from '@luma.gl/webgl-legacy'; import {fixture} from 'test/setup'; const vs = ` attribute vec3 positions; uniform mat4 uMVMatrix; uniform mat4 uPMatrix; void main(void) { gl_Position = uPMatrix * uMVMatrix * vec4(positions, 1.0); } `; const fs = ` void main(void) { gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0); } `; test('WebGL#draw', (t) => { const {gl} = fixture; t.ok(gl, 'Created gl context'); const program = new Program(gl, {vs, fs}); t.ok(program instanceof Program, 'Program construction successful'); t.end(); }); ```
/content/code_sandbox/wip/modules-wip/webgl-legacy/test/classic/draw.spec.ts
xml
2016-01-25T09:41:59
2024-08-16T10:03:05
luma.gl
visgl/luma.gl
2,280
185
```xml <vector xmlns:android="path_to_url" android:height="34.0dp" android:tint="?attr/colorControlNormal" android:viewportHeight="15" android:viewportWidth="15" android:width="34.0dp"> <path android:fillColor="@android:color/white" android:pathData="M14.5 8.5C14 9.5 1 14 0.5 13.5C0 13 8.5 2.5 10 2C12.5 1.5 15.5 6.5 14.5 8.5zM10 2.5C9.5 4.5 12 8 14 8.5C15 6.5 12 2.5 10 2.5zM11.25 4C10.75 4.5 12.5 7 13 6.5C13.5 6 11.5 3.5 11.25 4z"/> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/ic_preset_temaki_temaki.xml
xml
2016-07-02T10:44:04
2024-08-16T18:55:54
StreetComplete
streetcomplete/StreetComplete
3,781
228
```xml export { default as CommentContent } from "./CommentContent"; export { default as InReplyTo } from "./InReplyTo"; export { default as Username } from "./Username"; export { default as UsernameButton } from "./UsernameButton"; ```
/content/code_sandbox/client/src/core/client/admin/components/Comment/index.ts
xml
2016-10-31T16:14:05
2024-08-06T16:15:57
talk
coralproject/talk
1,881
49
```xml /* * Squidex Headless CMS * * @license */ import { AsyncPipe } from '@angular/common'; import { Component, OnInit } from '@angular/core'; import { combineLatest } from 'rxjs'; import { map, take } from 'rxjs/operators'; import { AppDto, AppFormComponent, AppsState, AuthService, DialogModel, FeatureDto, FormHintComponent, LocalStoreService, ModalDirective, NewsService, Settings, TeamDto, TeamsState, TemplateDto, TemplatesState, TitleComponent, TourState, TourStepDirective, TranslatePipe, UIOptions, UIState } from '@app/shared'; import { AppComponent } from './app.component'; import { NewsDialogComponent } from './news-dialog.component'; import { OnboardingDialogComponent } from './onboarding-dialog.component'; import { TeamComponent } from './team.component'; type GroupedApps = { team?: TeamDto; apps: AppDto[] }; @Component({ standalone: true, selector: 'sqx-apps-page', styleUrls: ['./apps-page.component.scss'], templateUrl: './apps-page.component.html', imports: [ AppComponent, AppFormComponent, AsyncPipe, FormHintComponent, ModalDirective, NewsDialogComponent, OnboardingDialogComponent, TeamComponent, TitleComponent, TourStepDirective, TranslatePipe, ], }) export class AppsPageComponent implements OnInit { public addAppDialog = new DialogModel(); public addAppTemplate?: TemplateDto; public onboardingDialog = new DialogModel(); public newsFeatures?: ReadonlyArray<FeatureDto>; public newsDialog = new DialogModel(); public info = ''; public templates = this.templatesState.templates.pipe( map(x => x.filter(t => t.isStarter))); public groupedApps = combineLatest([ this.appsState.apps, this.teamsState.teams, ]).pipe(map(([apps, teams]) => { const grouped: GroupedApps[] = [{ apps: [] }]; for (const team of teams) { grouped.push({ team, apps: [] }); } for (const app of apps) { const group = grouped.find(x => x.team?.id === app.teamId) || grouped[0]; group.apps.push(app); } if (grouped[0].apps.length === 0) { grouped.shift(); } return grouped; })); constructor( public readonly authState: AuthService, public readonly uiState: UIState, private readonly appsState: AppsState, private readonly localStore: LocalStoreService, private readonly newsService: NewsService, private readonly teamsState: TeamsState, private readonly templatesState: TemplatesState, private readonly tourState: TourState, private readonly uiOptions: UIOptions, ) { if (uiOptions.value.showInfo) { this.info = uiOptions.value.info; } } public ngOnInit() { this.appsState.apps.pipe(take(1)) .subscribe(apps => { if (apps.length === 0 && this.uiOptions.value.hideOnboarding !== true && this.tourState.snapshot.status !== 'Completed' && this.tourState.snapshot.status !== 'Started') { this.onboardingDialog.show(); return; } if (this.tourState.snapshot.status !== 'Started') { this.tourState.complete(); } if (!this.uiOptions.value.hideNews) { const newsVersion = this.localStore.getInt(Settings.Local.NEWS_VERSION); this.newsService.getFeatures(newsVersion) .subscribe(result => { if (result.version !== newsVersion) { if (result.features.length > 0) { this.newsFeatures = result.features; this.newsDialog.show(); } this.localStore.setInt(Settings.Local.NEWS_VERSION, result.version); } }); } }); this.templatesState.load(false, true); } public createNewApp(template?: TemplateDto) { this.addAppTemplate = template; this.addAppDialog.show(); } public leaveApp(app: AppDto) { this.appsState.leave(app); } public leaveTeam(team: TeamDto) { this.teamsState.leave(team); } public trackByGroup(_index: number, group: GroupedApps) { return group.team?.id || '0'; } } ```
/content/code_sandbox/frontend/src/app/features/apps/pages/apps-page.component.ts
xml
2016-08-29T05:53:40
2024-08-16T17:39:38
squidex
Squidex/squidex
2,222
925
```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 /** * Boolean indicating if the current environment is a mobile device. * * @example * var bool = IS_MOBILE; * // returns <boolean> */ declare const IS_MOBILE: boolean; // EXPORTS // export = IS_MOBILE; ```
/content/code_sandbox/lib/node_modules/@stdlib/assert/is-mobile/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
107
```xml <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="15.0" xmlns="path_to_url"> <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{312965E5-C4F6-4D95-BA64-79906B8BC7AC}</ProjectGuid> <OutputType>Exe</OutputType> <RootNamespace>DeepSpeechConsole</RootNamespace> <AssemblyName>DeepSpeechConsole</AssemblyName> <TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <Deterministic>true</Deterministic> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <DebugSymbols>true</DebugSymbols> <OutputPath>bin\x64\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <DebugType>full</DebugType> <PlatformTarget>x64</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <Prefer32Bit>true</Prefer32Bit> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'"> <OutputPath>bin\x64\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <Optimize>true</Optimize> <DebugType>pdbonly</DebugType> <PlatformTarget>x64</PlatformTarget> <ErrorReport>prompt</ErrorReport> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <Prefer32Bit>true</Prefer32Bit> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <ItemGroup> <Reference Include="NAudio, Version=1.8.5.0, Culture=neutral, processorArchitecture=MSIL"> <HintPath>..\packages\NAudio.1.8.5\lib\net35\NAudio.dll</HintPath> </Reference> <Reference Include="System" /> <Reference Include="System.Core" /> <Reference Include="System.Xml.Linq" /> <Reference Include="System.Data.DataSetExtensions" /> <Reference Include="Microsoft.CSharp" /> <Reference Include="System.Data" /> <Reference Include="System.Net.Http" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <None Include="App.config" /> <None Include="packages.config" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\DeepSpeechClient\DeepSpeechClient.csproj"> <Project>{56DE4091-BBBE-47E4-852D-7268B33B971F}</Project> <Name>DeepSpeechClient</Name> </ProjectReference> </ItemGroup> <ItemGroup> <Content Include="arctic_a0024.wav"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> </Project> ```
/content/code_sandbox/native_client/dotnet/DeepSpeechConsole/DeepSpeechConsole.csproj
xml
2016-06-02T15:04:53
2024-08-16T13:13:57
DeepSpeech
mozilla/DeepSpeech
24,922
819
```xml import * as nodeChildProcess from "child_process"; import { kill } from "process"; import { ErrorHelper } from "../error/errorHelper"; import { InternalErrorCode } from "../error/internalErrorCode"; import { notNullOrUndefined } from "../utils"; // Uncomment the following lines to record all spawned processes executions // import {Recorder} from "../../../test/resources/processExecution/recorder"; // Recorder.installGlobalRecorder(); export interface IExecResult { process: nodeChildProcess.ChildProcess; outcome: Promise<string>; } export interface ISpawnResult { spawnedProcess: nodeChildProcess.ChildProcess; stdin: NodeJS.WritableStream; stdout: NodeJS.ReadableStream; stderr: NodeJS.ReadableStream; outcome: Promise<void>; } interface IExecOptions { cwd?: string; stdio?: any; env?: any; encoding?: string; timeout?: number; maxBuffer?: number; killSignal?: string; } interface ISpawnOptions { cwd?: string; stdio?: any; env?: any; detached?: boolean; shell?: boolean; } export class ChildProcess { public static ERROR_TIMEOUT_MILLISECONDS = 300; private childProcess: typeof nodeChildProcess; constructor({ childProcess = nodeChildProcess } = {}) { this.childProcess = childProcess; } public exec(command: string, options: IExecOptions = {}): Promise<IExecResult> { let outcome: Promise<string>; let process: nodeChildProcess.ChildProcess; return new Promise<IExecResult>(resolveRes => { outcome = new Promise<string>((resolve, reject) => { process = this.childProcess.exec( command, options, // eslint-disable-next-line @typescript-eslint/no-unused-vars (error: Error, stdout: string, stderr: string) => { if (error) { reject( ErrorHelper.getNestedError( error, InternalErrorCode.CommandFailed, command, ), ); } else { resolve(stdout); } }, ); }); resolveRes({ process, outcome }); }); } public async execToString(command: string, options: IExecOptions = {}): Promise<string> { const execResult = await this.exec(command, options); const stdout = await execResult.outcome; return stdout.toString(); } public execFileSync( command: string, args: string[] = [], options: IExecOptions = {}, ): Buffer | string { return this.childProcess.execFileSync(command, args, options); } public spawn( command: string, args: string[] = [], options: ISpawnOptions = {}, showStdOutputsOnError: boolean = false, ): ISpawnResult { const spawnedProcess = this.childProcess.spawn( command, args, Object.assign({}, options, { shell: true }), ); const outcome: Promise<void> = new Promise((resolve, reject) => { spawnedProcess.once("error", (error: any) => { reject(error); }); const stderrChunks: string[] = []; const stdoutChunks: string[] = []; spawnedProcess.stderr.on("data", data => { stderrChunks.push(data.toString()); }); spawnedProcess.stdout.on("data", data => { stdoutChunks.push(data.toString()); }); spawnedProcess.once("exit", (code: number) => { if (code === 0) { resolve(); } else { const commandWithArgs = `${command} ${args.join(" ")}`; if (showStdOutputsOnError) { let details = ""; if (stdoutChunks.length > 0) { details = details.concat( `\n\tSTDOUT: ${stdoutChunks[stdoutChunks.length - 1]}`, ); } if (stderrChunks.length > 0) { details = details.concat(`\n\tSTDERR: ${stderrChunks.join("\n\t")}`); } if (details === "") { details = "STDOUT and STDERR are empty!"; } reject( ErrorHelper.getInternalError( InternalErrorCode.CommandFailedWithDetails, commandWithArgs, details, ), ); } else { reject( ErrorHelper.getInternalError( InternalErrorCode.CommandFailed, commandWithArgs, code, ), ); } } }); }); return { spawnedProcess, stdin: spawnedProcess.stdin, stdout: spawnedProcess.stdout, stderr: spawnedProcess.stderr, outcome, }; } // Kills any orphaned Instruments processes belonging to the user. // // In some cases, we've seen interactions between Instruments and the iOS // simulator that cause hung instruments and DTServiceHub processes. If // enough instances pile up, the host machine eventually becomes // unresponsive. Until the underlying issue is resolved, manually kill any // orphaned instances (where the parent process has died and PPID is 1) // before launching another instruments run. public async killOrphanedInstrumentsProcesses(): Promise<void> { const result = await this.execToString("ps -e -o user,ppid,pid,comm"); if (result) { result .split("\n") .filter(notNullOrUndefined) .map(a => /^(\S+)\s+1\s+(\d+)\s+(.+)$/.exec(a)) .filter(notNullOrUndefined) .filter(m => m[1] === process.env.USER) .filter( m => m[3] && ["/instruments", "/DTServiceHub"].some(name => m[3].endsWith(name)), ) .forEach(m => { const pid = m[2]; console.debug(`Killing orphaned Instruments process: ${pid}`); kill(parseInt(pid, 10), "SIGKILL"); }); } } } ```
/content/code_sandbox/src/common/node/childProcess.ts
xml
2016-01-20T21:10:07
2024-08-16T15:29:52
vscode-react-native
microsoft/vscode-react-native
2,617
1,254
```xml import { createAsyncAction, createStandardAction } from 'typesafe-actions'; import { SignInResponseBody, SignUpResponseBody } from '@nuclear/core/src/rest/Nuclear/Identity.types'; import { ErrorBody } from '@nuclear/core/src/rest/Nuclear/types'; import { NuclearIdentity } from '../actionTypes'; export const signUpAction = createAsyncAction( NuclearIdentity.SIGN_UP_START, NuclearIdentity.SIGN_UP_SUCCESS, NuclearIdentity.SIGN_UP_ERROR )<undefined, SignUpResponseBody, ErrorBody>(); export const signInAction = createAsyncAction( NuclearIdentity.SIGN_IN_START, NuclearIdentity.SIGN_IN_SUCCESS, NuclearIdentity.SIGN_IN_ERROR )<undefined, SignInResponseBody, ErrorBody>(); export const signOutAction = createStandardAction(NuclearIdentity.SIGN_OUT)<undefined>(); ```
/content/code_sandbox/packages/app/app/actions/nuclear/identity.ts
xml
2016-09-22T22:58:21
2024-08-16T15:47:39
nuclear
nukeop/nuclear
11,862
169
```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 a double-precision floating-point numeric value is a nonpositive finite number. * * @param x - value to test * @returns boolean indicating whether the value is a nonpositive finite number * * @example * var bool = isNonPositiveFinite( -3.14 ); * // returns true * * @example * var bool = isNonPositiveFinite( 0.0 ); * // returns true * * @example * var bool = isNonPositiveFinite( -Infinity ); * // returns false * * @example * var bool = isNonPositiveFinite( 3.14 ); * // returns false * * @example * var bool = isNonPositiveFinite( NaN ); * // returns false */ declare function isNonPositiveFinite( x: number ): boolean; // EXPORTS // export = isNonPositiveFinite; ```
/content/code_sandbox/lib/node_modules/@stdlib/math/base/assert/is-nonpositive-finite/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
243
```xml import 'reflect-metadata'; import { type EmailCtor, type EmailCtorArgs as AccountsEmailCtorArgs, getEmailCtor, } from '@accounts/mikro-orm'; import { Entity, Property } from '@mikro-orm/core'; import { type User } from './user'; export type EmailCtorArgs = AccountsEmailCtorArgs<User> & { fullName: string; }; const AccountsEmail: EmailCtor<User> = getEmailCtor<User>({ abstract: true }); @Entity() export class Email extends AccountsEmail { @Property() fullName: string; constructor({ fullName, ...otherProps }: EmailCtorArgs) { super(otherProps); this.fullName = fullName; } } ```
/content/code_sandbox/examples/graphql-server-mikro-orm-postgres/src/entities/email.ts
xml
2016-10-07T01:43:23
2024-07-14T11:57:08
accounts
accounts-js/accounts
1,492
154
```xml import { basename } from 'node:path'; import type { Path } from '@storybook/core/types'; /** * Calculate a name to use for a docs entry if not specified. The rule is: * * 1. If the name of the MDX file is the "same" as the CSF file (e.g. Button.mdx, Button.stories.jsx) * use the default name. * 2. Else use the (ext-less) name of the MDX file * * @param mdxImportPath ImportPath of the MDX file with of={} * @param csfImportPath ImportPath of the of CSF file */ export function autoName(mdxImportPath: Path, csfImportPath: Path, defaultName: string) { const mdxBasename = basename(mdxImportPath); const csfBasename = basename(csfImportPath); const [mdxFilename] = mdxBasename.split('.'); const [csfFilename] = csfBasename.split('.'); if (mdxFilename === csfFilename) { return defaultName; } return mdxFilename; } ```
/content/code_sandbox/code/core/src/core-server/utils/autoName.ts
xml
2016-03-18T04:23:44
2024-08-16T19:22:08
storybook
storybookjs/storybook
83,755
239
```xml <controls:ContentPopup x:Class="Telegram.Views.Popups.InputPopup" xmlns="path_to_url" xmlns:d="path_to_url" xmlns:x="path_to_url" xmlns:mc="path_to_url" xmlns:muxc="using:Microsoft.UI.Xaml.Controls" xmlns:controls="using:Telegram.Controls" mc:Ignorable="d" Title="TITLE" PrimaryButtonText="Button1" SecondaryButtonText="Button2" PrimaryButtonClick="ContentDialog_PrimaryButtonClick" SecondaryButtonClick="ContentDialog_SecondaryButtonClick"> <StackPanel> <TextBlock x:Name="MessageLabel" Margin="0,0,0,4" Style="{StaticResource BodyTextBlockStyle}" /> <Grid Margin="0,12,0,0" VerticalAlignment="Top"> <TextBox x:Name="Label" x:Load="False" TextChanged="Label_TextChanged" KeyDown="Label_KeyDown" /> <PasswordBox x:Name="Password" x:Load="False" PasswordChanged="Label_PasswordChanged" KeyDown="Label_KeyDown" /> <muxc:NumberBox x:Name="Number" x:Load="False" ValueChanged="Number_ValueChanged" KeyDown="Label_KeyDown" /> <controls:PremiumStarCount x:Name="StarCount" x:Load="False" Margin="4,0,0,0" HorizontalAlignment="Left" VerticalAlignment="Center" Width="24" Height="24" /> </Grid> </StackPanel> </controls:ContentPopup> ```
/content/code_sandbox/Telegram/Views/Popups/InputPopup.xaml
xml
2016-05-23T09:03:33
2024-08-16T16:17:48
Unigram
UnigramDev/Unigram
3,744
345
```xml import { TemplateImpl } from './template-impl' import type { Emitter } from '../emitters/emitter' import type { Parser, Tokenizer } from '../parser' import type { Context } from '../context/context' import type { TopLevelToken, TagToken } from '../tokens' import type { Template } from './template' import type { Liquid } from '../liquid' export type TagRenderReturn = Generator<unknown, unknown, unknown> | Promise<unknown> | unknown export abstract class Tag extends TemplateImpl<TagToken> implements Template { public name: string public liquid: Liquid protected tokenizer: Tokenizer public constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) { super(token) this.name = token.name this.liquid = liquid this.tokenizer = token.tokenizer } public abstract render (ctx: Context, emitter: Emitter): TagRenderReturn; } export interface TagClass { new(token: TagToken, tokens: TopLevelToken[], liquid: Liquid, parser: Parser): Tag } ```
/content/code_sandbox/src/template/tag.ts
xml
2016-06-13T07:39:30
2024-08-16T16:56:50
liquidjs
harttle/liquidjs
1,485
231
```xml // See LICENSE.txt for license information. /* eslint-disable max-lines */ import DatabaseManager from '@database/manager'; import { updateDraftFile, removeDraftFile, updateDraftMessage, addFilesToDraft, removeDraft, updateDraftPriority, } from './draft'; import type ServerDataOperator from '@database/operator/server_data_operator'; import type DraftModel from '@typings/database/models/servers/draft'; let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, } as Channel; const fileInfo: FileInfo = { id: 'fileid', clientId: 'clientid', localPath: 'path1', } as FileInfo; const draft: Draft = { channel_id: channel.id, message: 'test', root_id: '', } as Draft; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); describe('updateDraftFile', () => { it('handle not found database', async () => { const {error} = await updateDraftFile('foo', channelId, '', fileInfo, false); expect(error).toBeTruthy(); }); it('handle no draft', async () => { const {error} = await updateDraftFile(serverUrl, channelId, '', fileInfo, false); expect(error).toBeTruthy(); expect(error).toBe('no draft'); }); it('handle no file', async () => { await operator.handleDraft({drafts: [draft], prepareRecordsOnly: false}); const {error} = await updateDraftFile(serverUrl, channelId, '', fileInfo, false); expect(error).toBeTruthy(); expect(error).toBe('file not found'); }); it('update draft file', async () => { await operator.handleDraft({drafts: [{...draft, files: [{...fileInfo, localPath: 'path0'}]}], prepareRecordsOnly: false}); const {draft: draftModel, error} = await updateDraftFile(serverUrl, channelId, '', fileInfo, false); expect(error).toBeUndefined(); expect(draftModel).toBeDefined(); expect(draftModel?.files?.length).toBe(1); expect(draftModel?.files![0].localPath).toBe('path1'); }); }); describe('removeDraftFile', () => { it('handle not found database', async () => { const {error} = await removeDraftFile('foo', channelId, '', '', false); expect(error).toBeTruthy(); }); it('handle no draft', async () => { const {error} = await removeDraftFile(serverUrl, channelId, '', 'clientid', false); expect(error).toBeTruthy(); expect(error).toBe('no draft'); }); it('handle no file', async () => { await operator.handleDraft({drafts: [draft], prepareRecordsOnly: false}); const {error} = await removeDraftFile(serverUrl, channelId, '', 'clientid', false); expect(error).toBeTruthy(); expect(error).toBe('file not found'); }); it('remove draft file', async () => { await operator.handleDraft({drafts: [{...draft, files: [fileInfo]}], prepareRecordsOnly: false}); const {draft: draftModel, error} = await removeDraftFile(serverUrl, channelId, '', 'clientid', false); expect(error).toBeUndefined(); expect(draftModel).toBeDefined(); }); it('remove draft file, no message', async () => { await operator.handleDraft({drafts: [{channel_id: channel.id, files: [fileInfo], root_id: ''}], prepareRecordsOnly: false}); const {draft: draftModel, error} = await removeDraftFile(serverUrl, channelId, '', 'clientid', false); expect(error).toBeUndefined(); expect(draftModel).toBeDefined(); }); }); describe('updateDraftMessage', () => { it('handle not found database', async () => { const result = await updateDraftMessage('foo', channelId, '', 'newmessage', false) as {draft: unknown; error: unknown}; expect(result.error).toBeDefined(); expect(result.draft).toBeUndefined(); }); it('update draft message, blank message, no draft', async () => { const result = await updateDraftMessage(serverUrl, channelId, '', '', false) as {draft: unknown; error: unknown}; expect(result.error).toBeUndefined(); expect(result.draft).toBeUndefined(); }); it('update draft message, no draft', async () => { const models = await updateDraftMessage(serverUrl, channelId, '', 'newmessage', false) as DraftModel[]; expect(models).toBeDefined(); expect(models?.length).toBe(1); }); it('update draft message', async () => { await operator.handleDraft({drafts: [{...draft, files: [fileInfo]}], prepareRecordsOnly: false}); const result = await updateDraftMessage(serverUrl, channelId, '', 'newmessage', false) as {draft: DraftModel; error: unknown}; expect(result.error).toBeUndefined(); expect(result.draft).toBeDefined(); expect(result.draft.message).toBe('newmessage'); }); it('update draft message, same message', async () => { await operator.handleDraft({drafts: [{...draft, files: [fileInfo]}], prepareRecordsOnly: false}); const result = await updateDraftMessage(serverUrl, channelId, '', 'test', false) as {draft: DraftModel; error: unknown}; expect(result.error).toBeUndefined(); expect(result.draft).toBeDefined(); expect(result.draft.message).toBe('test'); }); it('update draft message, no file', async () => { await operator.handleDraft({drafts: [{channel_id: channel.id, files: [], root_id: ''}], prepareRecordsOnly: false}); const result = await updateDraftMessage(serverUrl, channelId, '', 'newmessage', false) as {draft: DraftModel; error: unknown}; expect(result.error).toBeUndefined(); expect(result.draft).toBeDefined(); expect(result.draft.message).toBe('newmessage'); }); }); describe('addFilesToDraft', () => { it('handle not found database', async () => { const result = await addFilesToDraft('foo', channelId, '', [], false) as {draft: unknown; error: unknown}; expect(result.error).toBeDefined(); expect(result.draft).toBeUndefined(); }); it('add draft files, no draft', async () => { const models = await addFilesToDraft(serverUrl, channelId, '', [fileInfo], false) as DraftModel[]; expect(models).toBeDefined(); expect(models?.length).toBe(1); }); it('add draft files', async () => { await operator.handleDraft({drafts: [draft], prepareRecordsOnly: false}); const result = await addFilesToDraft(serverUrl, channelId, '', [fileInfo], false) as {draft: DraftModel; error: unknown}; expect(result.error).toBeUndefined(); expect(result.draft).toBeDefined(); expect(result?.draft.files.length).toBe(1); }); }); describe('removeDraft', () => { it('handle not found database', async () => { const result = await removeDraft('foo', channelId, ''); expect(result.error).toBeDefined(); expect(result.draft).toBeUndefined(); }); it('handle no draft', async () => { const result = await removeDraft(serverUrl, channelId, ''); expect(result.error).toBeUndefined(); expect(result.draft).toBeUndefined(); }); it('remove draft', async () => { await operator.handleDraft({drafts: [draft], prepareRecordsOnly: false}); const result = await removeDraft(serverUrl, channelId, ''); expect(result.error).toBeUndefined(); expect(result.draft).toBeDefined(); }); }); describe('updateDraftPriority', () => { const postPriority: PostPriority = { priority: 'urgent', } as PostPriority; it('handle not found database', async () => { const result = await updateDraftPriority('foo', channelId, '', postPriority) as {draft: unknown; error: unknown}; expect(result.error).toBeDefined(); expect(result.draft).toBeUndefined(); }); it('handle no draft', async () => { const models = await updateDraftPriority(serverUrl, channelId, '', postPriority) as DraftModel[]; expect(models).toBeDefined(); expect(models.length).toBe(1); expect(models[0].metadata?.priority?.priority).toBe(postPriority.priority); }); it('update draft priority', async () => { await operator.handleDraft({drafts: [draft], prepareRecordsOnly: false}); const result = await updateDraftPriority(serverUrl, channelId, '', postPriority) as {draft: DraftModel; error: unknown}; expect(result.error).toBeUndefined(); expect(result.draft).toBeDefined(); expect(result.draft.metadata?.priority?.priority).toBe(postPriority.priority); }); }); ```
/content/code_sandbox/app/actions/local/draft.test.ts
xml
2016-10-07T16:52:32
2024-08-16T12:08:38
mattermost-mobile
mattermost/mattermost-mobile
2,155
1,991
```xml import chalk from 'chalk'; import { LOGO, NAME } from '@vercel-internals/constants'; import Table, { CellOptions } from 'cli-table3'; import { noBorderChars } from '../util/output/table'; import { globalCommandOptions } from '../util/arg-common'; const INDENT = ' '.repeat(2); const NEWLINE = '\n'; export type PrimitiveConstructor = | typeof String | typeof Boolean | typeof Number; export interface CommandOption { readonly name: string; readonly shorthand: string | null; readonly type: PrimitiveConstructor | ReadonlyArray<PrimitiveConstructor>; readonly argument?: string; readonly deprecated: boolean; readonly description?: string; } export interface CommandArgument { readonly name: string; readonly required: boolean; } export interface CommandExample { readonly name: string; readonly value: string | ReadonlyArray<string>; } export interface Command { readonly name: string; readonly description: string; readonly arguments: ReadonlyArray<CommandArgument>; readonly subcommands?: ReadonlyArray<Command>; readonly options: ReadonlyArray<CommandOption>; readonly examples: ReadonlyArray<CommandExample>; } // path_to_url adds // word wrapping per cell but did not include updated types. type _CellOptions = CellOptions & { wordWrap?: boolean; }; const tableOptions = { chars: noBorderChars, style: { 'padding-left': 0, 'padding-right': 0, }, }; // Use the word wrapping ability of cli-table3 // by creating a one row, one cell, one column table. // This allows us to avoid pulling in the word-wrap // package which ironically seems to do a worse job. function wordWrap(text: string, maxWidth: number) { const _tableOptions = Object.assign({}, tableOptions, { colWidths: [maxWidth], style: { 'padding-left': INDENT.length, }, }); const table = new Table(_tableOptions); table.push([ { content: text, wordWrap: true, } as _CellOptions, ]); return table.toString(); } // Insert spaces in between non-whitespace items only export function lineToString(line: string[]) { let string = ''; for (let i = 0; i < line.length; i++) { if (i === line.length - 1) { string += line[i]; } else { const curr = line[i]; const next = line[i + 1]; string += curr; if (curr.trim() !== '' && next.trim() !== '') { string += ' '; } } } return string; } export function outputArrayToString(outputArray: (string | null)[]) { return outputArray.filter(line => line !== null).join(NEWLINE); } /** * Example: ` vercel deploy [path] [options]` * @param command * @returns */ export function buildCommandSynopsisLine(command: Command) { const line: string[] = [ INDENT, LOGO, chalk.bold(NAME), chalk.bold(command.name), ]; if (command.arguments.length > 0) { for (const argument of command.arguments) { line.push(argument.required ? argument.name : `[${argument.name}]`); } } if (command.options.length > 0) { line.push('[options]'); } line.push(NEWLINE); return lineToString(line); } export function buildCommandOptionLines( commandOptions: ReadonlyArray<CommandOption>, options: BuildHelpOutputOptions, sectionTitle: String ) { if (commandOptions.length === 0) { return null; } // Filter out deprecated and intentionally undocumented options const filteredCommandOptions = commandOptions.filter( option => !option.deprecated && option.description !== undefined ); // Sort command options alphabetically filteredCommandOptions.sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0 ); // word wrapping requires the wrapped cell to have a fixed width. // We need to track cell sizes to ensure the final column of cells is // equal to the remainder of unused horizontal space. let maxWidthOfUnwrappedColumns = 0; const rows: (string | undefined | _CellOptions)[][] = []; for (const option of filteredCommandOptions) { const shorthandCell = option.shorthand ? `${INDENT}-${option.shorthand},` : ''; let longhandCell = `${INDENT}--${option.name}`; if (option.argument) { longhandCell += ` <${option.argument}>`; } longhandCell += INDENT; const widthOfUnwrappedColumns = shorthandCell.length + longhandCell.length; maxWidthOfUnwrappedColumns = Math.max( widthOfUnwrappedColumns, maxWidthOfUnwrappedColumns ); rows.push([ shorthandCell, longhandCell, { content: option.description, wordWrap: true, }, ]); } const finalColumnWidth = options.columns - maxWidthOfUnwrappedColumns; const table = new Table( Object.assign({}, tableOptions, { colWidths: [null, null, finalColumnWidth], }) ); table.push(...rows); return [ `${INDENT}${chalk.dim(sectionTitle)}:`, NEWLINE, NEWLINE, table.toString(), NEWLINE, NEWLINE, ].join(''); } export function buildSubcommandLines( subcommands: ReadonlyArray<Command> | undefined, options: BuildHelpOutputOptions ) { if (!subcommands) { return null; } // word wrapping requires the wrapped cell to have a fixed width. // We need to track cell sizes to ensure the final column of cells is // equal to the remainder of unused horizontal space. let maxWidthOfUnwrappedColumns = 0; const rows: (string | undefined | _CellOptions)[][] = []; for (const command of subcommands) { const nameCell = `${INDENT}${command.name}`; let argsCell = INDENT; argsCell += command.arguments .map(arg => { return arg.required ? arg.name : `[${arg.name}]`; }) .join(' '); argsCell += INDENT; const widthOfUnwrappedColumns = nameCell.length + argsCell.length; maxWidthOfUnwrappedColumns = Math.max( widthOfUnwrappedColumns, maxWidthOfUnwrappedColumns ); rows.push([ nameCell, argsCell, { content: command.description, wordWrap: true, }, ]); } // Really long descriptions go RIGHT up to the edge, which looks unpleasant. const rightMargin = INDENT.repeat(4).length; const finalColumnWidth = options.columns - maxWidthOfUnwrappedColumns - rightMargin; const table = new Table( Object.assign({}, tableOptions, { colWidths: [null, null, finalColumnWidth], }) ); table.push(...rows); return [ `${INDENT}${chalk.dim('Commands')}:`, NEWLINE, NEWLINE, table.toString(), NEWLINE, NEWLINE, ].join(''); } export function buildCommandExampleLines(command: Command) { const outputArray: string[] = [`${INDENT}${chalk.dim('Examples:')}`, '']; for (const example of command.examples) { const nameLine: string[] = [INDENT]; nameLine.push(chalk.gray('-')); nameLine.push(example.name); outputArray.push(lineToString(nameLine)); outputArray.push(''); const buildValueLine = (value: string) => { return lineToString([INDENT, INDENT, chalk.cyan(`$ ${value}`)]); }; if (Array.isArray(example.value)) { for (const line of example.value) { outputArray.push(buildValueLine(line)); } } else { // The `as string` cast is necessary here since for // some reason the `Array.isArray()` check above is // properly narrowing the `readonly string[]` type outputArray.push(buildValueLine(example.value as string)); } outputArray.push(''); } return outputArrayToString(outputArray); } function buildDescriptionLine( command: Command, options: BuildHelpOutputOptions ) { let wrapingText = wordWrap(command.description, options.columns); return `${wrapingText}${NEWLINE}`; } interface BuildHelpOutputOptions { columns: number; } export function buildHelpOutput( command: Command, options: BuildHelpOutputOptions ) { const outputArray: (string | null)[] = [ '', buildCommandSynopsisLine(command), buildDescriptionLine(command, options), buildSubcommandLines(command.subcommands, options), buildCommandOptionLines(command.options, options, 'Options'), buildCommandOptionLines(globalCommandOptions, options, 'Global Options'), buildCommandExampleLines(command), '', ]; return outputArrayToString(outputArray); } export interface HelpOptions { columns?: number; } export function help(command: Command, options: HelpOptions) { return buildHelpOutput(command, { columns: options.columns ?? 80, }); } ```
/content/code_sandbox/packages/cli/src/commands/help.ts
xml
2016-09-09T01:12:08
2024-08-16T17:39:45
vercel
vercel/vercel
12,545
2,002
```xml import type { RouterOptions } from '@nuxt/schema' export default <RouterOptions>{ linkActiveClass: 'foo-active-class', linkExactActiveClass: 'foo-exact-active-class' } ```
/content/code_sandbox/test/fixtures/basic/extends/node_modules/foo/app/router.options.ts
xml
2016-10-26T11:18:47
2024-08-16T19:32:46
nuxt
nuxt/nuxt
53,705
43
```xml declare interface ITenantWideExtensionManagerWebPartStrings { } declare module 'TenantWideExtensionManagerWebPartStrings' { const strings: ITenantWideExtensionManagerWebPartStrings; export = strings; } ```
/content/code_sandbox/samples/react-extension-manager/src/webparts/tenantWideExtensionManager/loc/mystrings.d.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
44
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="path_to_url"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="debug|x64"> <Configuration>debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="checked|x64"> <Configuration>checked</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="profile|x64"> <Configuration>profile</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="release|x64"> <Configuration>release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{24546E40-3140-20F4-C5AC-E4001B9880B8}</ProjectGuid> <RootNamespace>LowLevelCloth</RootNamespace> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='checked|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='profile|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'" Label="Configuration"> <ConfigurationType>StaticLibrary</ConfigurationType> <PlatformToolset>v120</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)'=='checked|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)'=='profile|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/vc12win64\</OutDir> <IntDir>./x64/LowLevelCloth/debug\</IntDir> <TargetExt>.lib</TargetExt> <TargetName>$(ProjectName)DEBUG</TargetName> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules /> <CodeAnalysisRuleAssemblies /> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <StringPooling>true</StringPooling> <RuntimeTypeInfo>false</RuntimeTypeInfo> <BufferSecurityCheck>false</BufferSecurityCheck> <FloatingPointModel>Fast</FloatingPointModel> <BasicRuntimeChecks>UninitializedLocalUsageCheck</BasicRuntimeChecks> <AdditionalOptions>/MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /d2Zi+</AdditionalOptions> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>./../../Common/include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../../../PxShared/src/pvd/include;./../../../Include;./../../../Include/common;./../../Common/src;./../../LowLevelCloth/include;./../../LowLevelCloth/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PX_PHYSX_STATIC_LIB;_DEBUG;PX_DEBUG=1;PX_CHECKED=1;PX_NVTX=1;PX_SUPPORT_PVD=1;PX_PHYSX_DLL_NAME_POSTFIX=DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>false</ExceptionHandling> <WarningLevel>Level4</WarningLevel> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeaderFile></PrecompiledHeaderFile> <ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Lib> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(ProjectName)DEBUG.lib</OutputFile> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile> <TargetMachine>MachineX64</TargetMachine> </Lib> <ResourceCompile> </ResourceCompile> <ProjectReference> <LinkLibraryDependencies>true</LinkLibraryDependencies> </ProjectReference> </ItemDefinitionGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='checked|x64'"> <OutDir>./../../../Lib/vc12win64\</OutDir> <IntDir>./x64/LowLevelCloth/checked\</IntDir> <TargetExt>.lib</TargetExt> <TargetName>$(ProjectName)CHECKED</TargetName> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules /> <CodeAnalysisRuleAssemblies /> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='checked|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <StringPooling>true</StringPooling> <RuntimeTypeInfo>false</RuntimeTypeInfo> <BufferSecurityCheck>false</BufferSecurityCheck> <FloatingPointModel>Fast</FloatingPointModel> <AdditionalOptions>/MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /d2Zi+</AdditionalOptions> <Optimization>Full</Optimization> <AdditionalIncludeDirectories>./../../Common/include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../../../PxShared/src/pvd/include;./../../../Include;./../../../Include/common;./../../Common/src;./../../LowLevelCloth/include;./../../LowLevelCloth/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PX_PHYSX_STATIC_LIB;NDEBUG;PX_CHECKED=1;PX_NVTX=1;PX_SUPPORT_PVD=1;PX_PHYSX_DLL_NAME_POSTFIX=CHECKED;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>false</ExceptionHandling> <WarningLevel>Level4</WarningLevel> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeaderFile></PrecompiledHeaderFile> <ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Lib> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(ProjectName)CHECKED.lib</OutputFile> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile> <TargetMachine>MachineX64</TargetMachine> </Lib> <ResourceCompile> </ResourceCompile> <ProjectReference> <LinkLibraryDependencies>true</LinkLibraryDependencies> </ProjectReference> </ItemDefinitionGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='profile|x64'"> <OutDir>./../../../Lib/vc12win64\</OutDir> <IntDir>./x64/LowLevelCloth/profile\</IntDir> <TargetExt>.lib</TargetExt> <TargetName>$(ProjectName)PROFILE</TargetName> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules /> <CodeAnalysisRuleAssemblies /> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='profile|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <StringPooling>true</StringPooling> <RuntimeTypeInfo>false</RuntimeTypeInfo> <BufferSecurityCheck>false</BufferSecurityCheck> <FloatingPointModel>Fast</FloatingPointModel> <AdditionalOptions>/MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /d2Zi+</AdditionalOptions> <Optimization>Full</Optimization> <AdditionalIncludeDirectories>./../../Common/include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../../../PxShared/src/pvd/include;./../../../Include;./../../../Include/common;./../../Common/src;./../../LowLevelCloth/include;./../../LowLevelCloth/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PX_PHYSX_STATIC_LIB;NDEBUG;PX_PROFILE=1;PX_NVTX=1;PX_SUPPORT_PVD=1;PX_PHYSX_DLL_NAME_POSTFIX=PROFILE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>false</ExceptionHandling> <WarningLevel>Level4</WarningLevel> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeaderFile></PrecompiledHeaderFile> <ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Lib> <AdditionalOptions>/INCREMENTAL:NO</AdditionalOptions> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(ProjectName)PROFILE.lib</OutputFile> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile> <TargetMachine>MachineX64</TargetMachine> </Lib> <ResourceCompile> </ResourceCompile> <ProjectReference> <LinkLibraryDependencies>true</LinkLibraryDependencies> </ProjectReference> </ItemDefinitionGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'"> <OutDir>./../../../Lib/vc12win64\</OutDir> <IntDir>./x64/LowLevelCloth/release\</IntDir> <TargetExt>.lib</TargetExt> <TargetName>$(ProjectName)</TargetName> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules /> <CodeAnalysisRuleAssemblies /> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <StringPooling>true</StringPooling> <RuntimeTypeInfo>false</RuntimeTypeInfo> <BufferSecurityCheck>false</BufferSecurityCheck> <FloatingPointModel>Fast</FloatingPointModel> <AdditionalOptions>/MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /d2Zi+</AdditionalOptions> <Optimization>Full</Optimization> <AdditionalIncludeDirectories>./../../Common/include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../../../PxShared/src/pvd/include;./../../../Include;./../../../Include/common;./../../Common/src;./../../LowLevelCloth/include;./../../LowLevelCloth/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PX_PHYSX_STATIC_LIB;NDEBUG;PX_SUPPORT_PVD=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>false</ExceptionHandling> <WarningLevel>Level4</WarningLevel> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeaderFile></PrecompiledHeaderFile> <ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Lib> <AdditionalOptions>/INCREMENTAL:NO</AdditionalOptions> <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(ProjectName).lib</OutputFile> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile> <TargetMachine>MachineX64</TargetMachine> </Lib> <ResourceCompile> </ResourceCompile> <ProjectReference> <LinkLibraryDependencies>true</LinkLibraryDependencies> </ProjectReference> </ItemDefinitionGroup> <ItemGroup> <CustomBuild Include="..\..\LowLevelCloth\src\avx\SwSolveConstraints.cpp"> <Command Condition="'$(Configuration)|$(Platform)'=='debug|x64'">cl.exe /c /Zi /Ox /MT /arch:AVX /Fd"$(TargetDir)\$(TargetName).pdb" /Fo./x64/LowLevelCloth/debug/avx/SwSolveConstraints.obj ..\..\LowLevelCloth\src\avx\SwSolveConstraints.cpp</Command> <Message Condition="'$(Configuration)|$(Platform)'=='debug|x64'">Building %(Identity)</Message> <Outputs Condition="'$(Configuration)|$(Platform)'=='debug|x64'">./x64/LowLevelCloth/debug/avx/SwSolveConstraints.obj;</Outputs> <Command Condition="'$(Configuration)|$(Platform)'=='checked|x64'">cl.exe /c /Zi /Ox /MT /arch:AVX /Fd"$(TargetDir)\$(TargetName).pdb" /Fo./x64/LowLevelCloth/checked/avx/SwSolveConstraints.obj ..\..\LowLevelCloth\src\avx\SwSolveConstraints.cpp</Command> <Message Condition="'$(Configuration)|$(Platform)'=='checked|x64'">Building %(Identity)</Message> <Outputs Condition="'$(Configuration)|$(Platform)'=='checked|x64'">./x64/LowLevelCloth/checked/avx/SwSolveConstraints.obj;</Outputs> <Command Condition="'$(Configuration)|$(Platform)'=='profile|x64'">cl.exe /c /Zi /Ox /MT /arch:AVX /Fd"$(TargetDir)\$(TargetName).pdb" /Fo./x64/LowLevelCloth/profile/avx/SwSolveConstraints.obj ..\..\LowLevelCloth\src\avx\SwSolveConstraints.cpp</Command> <Message Condition="'$(Configuration)|$(Platform)'=='profile|x64'">Building %(Identity)</Message> <Outputs Condition="'$(Configuration)|$(Platform)'=='profile|x64'">./x64/LowLevelCloth/profile/avx/SwSolveConstraints.obj;</Outputs> <Command Condition="'$(Configuration)|$(Platform)'=='release|x64'">cl.exe /c /Zi /Ox /MT /arch:AVX /Fd"$(TargetDir)\$(TargetName).pdb" /Fo./x64/LowLevelCloth/release/avx/SwSolveConstraints.obj ..\..\LowLevelCloth\src\avx\SwSolveConstraints.cpp</Command> <Message Condition="'$(Configuration)|$(Platform)'=='release|x64'">Building %(Identity)</Message> <Outputs Condition="'$(Configuration)|$(Platform)'=='release|x64'">./x64/LowLevelCloth/release/avx/SwSolveConstraints.obj;</Outputs> </CustomBuild> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\LowLevelCloth\include\Cloth.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\include\Fabric.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\include\Factory.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\include\PhaseConfig.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\include\Range.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\include\Solver.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\include\Types.h"> </ClInclude> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\LowLevelCloth\src\Allocator.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\Array.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\BoundingBox.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\ClothBase.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\ClothImpl.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\IndexPair.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\IterationState.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\MovingAverage.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\PointInterpolator.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\Simd.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\Simd4f.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\Simd4i.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SimdTypes.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\StackAllocator.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SwCloth.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SwClothData.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SwCollision.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SwCollisionHelpers.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SwFabric.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SwFactory.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SwInterCollision.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SwSelfCollision.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SwSolver.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\SwSolverKernel.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\TripletScheduler.h"> </ClInclude> <ClInclude Include="..\..\LowLevelCloth\src\Vec4T.h"> </ClInclude> <ClCompile Include="..\..\LowLevelCloth\src\Allocator.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\Factory.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\PhaseConfig.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\SwCloth.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\SwClothData.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\SwCollision.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\SwFabric.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\SwFactory.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\SwInterCollision.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\SwSelfCollision.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\SwSolver.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\SwSolverKernel.cpp"> </ClCompile> <ClCompile Include="..\..\LowLevelCloth\src\TripletScheduler.cpp"> </ClCompile> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"></ImportGroup> </Project> ```
/content/code_sandbox/PhysX_3.4/Source/compiler/vc12win64/LowLevelCloth.vcxproj
xml
2016-10-12T16:34:31
2024-08-16T09:40:38
PhysX-3.4
NVIDIAGameWorks/PhysX-3.4
2,343
5,372
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ // TypeScript Version: 4.1 /// <reference types="@stdlib/types"/> import { Iterator } from '@stdlib/types/iter'; /** * Returns an iterator which iteratively computes a cumulative maximum absolute value. * * ## Notes * * - If an environment supports `Symbol.iterator`, the returned iterator is iterable. * * @param iterator - input iterator * @returns iterator * * @example * var runif = require( '@stdlib/random/iter/uniform' ); * * var rand = runif( -10.0, 10.0, { * 'iter': 100 * }); * * var it = itercumaxabs( rand ); * * var v = it.next().value; * // returns <number> * * v = it.next().value; * // returns <number> * * v = it.next().value; * // returns <number> * * // ... */ declare function itercumaxabs( iterator: Iterator ): Iterator; // EXPORTS // export = itercumaxabs; ```
/content/code_sandbox/lib/node_modules/@stdlib/stats/iter/cumaxabs/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
270
```xml <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="path_to_url"> <ItemGroup> <CustomBuild Include="CMakeFiles\e900ecaa291cea520b30854a0011de63\PACKAGE_force.rule"> <Filter>CMake Rules</Filter> </CustomBuild> </ItemGroup> <ItemGroup> <Filter Include="CMake Rules"> <UniqueIdentifier>{1B37BC7F-0564-4C49-8D72-61A6B8DCC219}</UniqueIdentifier> </Filter> </ItemGroup> </Project> ```
/content/code_sandbox/thirdparty/Lz4/Lz4_131/vs2010/PACKAGE.vcxproj.filters
xml
2016-03-18T17:55:48
2024-08-15T18:11:38
opentoonz
opentoonz/opentoonz
4,445
143
```xml import React from 'react'; import { PluginLayout } from '@erxes/ui/src/styles/main'; import GeneralRoutes from './generalRoutes'; import { AppProvider } from 'coreui/appContext'; import '@erxes/ui/src/styles/global-styles'; import 'erxes-icon/css/erxes.min.css'; import '@erxes/ui/src/styles/style.min.css'; import '@nateradebaugh/react-datetime/css/react-datetime.css'; import dayjs from 'dayjs'; import localizedFormat from 'dayjs/plugin/localizedFormat'; dayjs.extend(localizedFormat); const App = () => { return ( <AppProvider> <PluginLayout> <GeneralRoutes /> </PluginLayout> </AppProvider> ); }; export default App; ```
/content/code_sandbox/packages/plugin-tasks-ui/src/App.tsx
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
158
```xml import { CodedError, EventSubscription, UnavailabilityError } from 'expo-modules-core'; import { AppleAuthenticationCredential, AppleAuthenticationCredentialState, AppleAuthenticationOperation, AppleAuthenticationRefreshOptions, AppleAuthenticationSignInOptions, AppleAuthenticationSignOutOptions, } from './AppleAuthentication.types'; import ExpoAppleAuthentication from './ExpoAppleAuthentication'; // @needsAudit /** * Determine if the current device's operating system supports Apple authentication. * @return A promise that fulfills with `true` if the system supports Apple authentication, and `false` otherwise. */ export async function isAvailableAsync(): Promise<boolean> { if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.isAvailableAsync) { return false; } return ExpoAppleAuthentication.isAvailableAsync(); } // @needsAudit /** * Sends a request to the operating system to initiate the Apple authentication flow, which will * present a modal to the user over your app and allow them to sign in. * * You can request access to the user's full name and email address in this method, which allows you * to personalize your UI for signed in users. However, users can deny access to either or both * of these options at runtime. * * Additionally, you will only receive Apple Authentication Credentials the first time users sign * into your app, so you must store it for later use. It's best to store this information either * server-side, or using [SecureStore](./securestore), so that the data persists across app installs. * You can use [`AppleAuthenticationCredential.user`](#appleauthenticationcredential) to identify * the user, since this remains the same for apps released by the same developer. * * @param options An optional [`AppleAuthenticationSignInOptions`](#appleauthenticationsigninoptions) object * @return A promise that fulfills with an [`AppleAuthenticationCredential`](#appleauthenticationcredential) * object after a successful authentication, and rejects with `ERR_REQUEST_CANCELED` if the user cancels the * sign-in operation. */ export async function signInAsync( options?: AppleAuthenticationSignInOptions ): Promise<AppleAuthenticationCredential> { if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.requestAsync) { throw new UnavailabilityError('expo-apple-authentication', 'signInAsync'); } const requestOptions = { ...options, requestedOperation: AppleAuthenticationOperation.LOGIN, }; const credential = await ExpoAppleAuthentication.requestAsync(requestOptions); if (!credential.authorizationCode || !credential.identityToken || !credential.user) { throw new CodedError( 'ERR_REQUEST_FAILED', 'The credential returned by `signInAsync` is missing one or more required fields.' ); } return credential; } // @needsAudit /** * An operation that refreshes the logged-in users credentials. * Calling this method will show the sign in modal before actually refreshing the user credentials. * * @param options An [`AppleAuthenticationRefreshOptions`](#appleauthenticationrefreshoptions) object * @returns A promise that fulfills with an [`AppleAuthenticationCredential`](#appleauthenticationcredential) * object after a successful authentication, and rejects with `ERR_REQUEST_CANCELED` if the user cancels the * refresh operation. */ export async function refreshAsync( options: AppleAuthenticationRefreshOptions ): Promise<AppleAuthenticationCredential> { if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.requestAsync) { throw new UnavailabilityError('expo-apple-authentication', 'refreshAsync'); } const requestOptions = { ...options, requestedOperation: AppleAuthenticationOperation.REFRESH, }; const credential = await ExpoAppleAuthentication.requestAsync(requestOptions); if (!credential.authorizationCode || !credential.identityToken || !credential.user) { throw new CodedError( 'ERR_REQUEST_FAILED', 'The credential returned by `refreshAsync` is missing one or more required fields.' ); } return credential; } // @needsAudit /** * An operation that ends the authenticated session. * Calling this method will show the sign in modal before actually signing the user out. * * It is not recommended to use this method to sign out the user as it works counterintuitively. * Instead of using this method it is recommended to simply clear all the user's data collected * from using [`signInAsync`](./#signinasync) or [`refreshAsync`](./#refreshasync) methods. * * @param options An [`AppleAuthenticationSignOutOptions`](#appleauthenticationsignoutoptions) object * @returns A promise that fulfills with an [`AppleAuthenticationCredential`](#appleauthenticationcredential) * object after a successful authentication, and rejects with `ERR_REQUEST_CANCELED` if the user cancels the * sign-out operation. */ export async function signOutAsync( options: AppleAuthenticationSignOutOptions ): Promise<AppleAuthenticationCredential> { if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.requestAsync) { throw new UnavailabilityError('expo-apple-authentication', 'signOutAsync'); } const requestOptions = { ...options, requestedOperation: AppleAuthenticationOperation.LOGOUT, }; return ExpoAppleAuthentication.requestAsync(requestOptions); } // @needsAudit /** * Queries the current state of a user credential, to determine if it is still valid or if it has been revoked. * > **Note:** This method must be tested on a real device. On the iOS simulator it always throws an error. * * @param user The unique identifier for the user whose credential state you'd like to check. * This should come from the user field of an [`AppleAuthenticationCredential`](#appleauthenticationcredentialstate) object. * @return A promise that fulfills with an [`AppleAuthenticationCredentialState`](#appleauthenticationcredentialstate) * value depending on the state of the credential. */ export async function getCredentialStateAsync( user: string ): Promise<AppleAuthenticationCredentialState> { if (!ExpoAppleAuthentication || !ExpoAppleAuthentication.getCredentialStateAsync) { throw new UnavailabilityError('expo-apple-authentication', 'getCredentialStateAsync'); } return ExpoAppleAuthentication.getCredentialStateAsync(user); } // @docsMissing export function addRevokeListener(listener: () => void): EventSubscription { return ExpoAppleAuthentication.addListener('Expo.appleIdCredentialRevoked', listener); } export { EventSubscription as Subscription }; ```
/content/code_sandbox/packages/expo-apple-authentication/src/AppleAuthentication.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
1,343
```xml export { messageToSayable, payloadToSayableWechaty, sayableToPayload, } from '../sayable/mod.js' ```
/content/code_sandbox/src/mods/helpers.ts
xml
2016-05-01T14:36:45
2024-08-16T17:27:03
wechaty
wechaty/wechaty
19,828
33
```xml // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. import { PhaseView } from "../src/view"; import { anyToString, ViewElements, isIterable } from "../src/util"; import { MySelection } from "../src/selection"; import { SourceResolver } from "./source-resolver"; import { SelectionBroker } from "./selection-broker"; import { NodeSelectionHandler, BlockSelectionHandler } from "./selection-handler"; export abstract class TextView extends PhaseView { selectionHandler: NodeSelectionHandler; blockSelectionHandler: BlockSelectionHandler; selection: MySelection; blockSelection: MySelection; textListNode: HTMLUListElement; nodeIdToHtmlElementsMap: Map<string, Array<HTMLElement>>; blockIdToHtmlElementsMap: Map<string, Array<HTMLElement>>; blockIdtoNodeIds: Map<string, Array<string>>; nodeIdToBlockId: Array<string>; patterns: any; sourceResolver: SourceResolver; broker: SelectionBroker; constructor(id, broker) { super(id); const view = this; view.textListNode = view.divNode.getElementsByTagName('ul')[0]; view.patterns = null; view.nodeIdToHtmlElementsMap = new Map(); view.blockIdToHtmlElementsMap = new Map(); view.blockIdtoNodeIds = new Map(); view.nodeIdToBlockId = []; view.selection = new MySelection(anyToString); view.blockSelection = new MySelection(anyToString); view.broker = broker; view.sourceResolver = broker.sourceResolver; const selectionHandler = { clear: function () { view.selection.clear(); view.updateSelection(); broker.broadcastClear(selectionHandler); }, select: function (nodeIds, selected) { view.selection.select(nodeIds, selected); view.updateSelection(); broker.broadcastNodeSelect(selectionHandler, view.selection.selectedKeys(), selected); }, brokeredNodeSelect: function (nodeIds, selected) { const firstSelect = view.blockSelection.isEmpty(); view.selection.select(nodeIds, selected); view.updateSelection(firstSelect); }, brokeredClear: function () { view.selection.clear(); view.updateSelection(); } }; this.selectionHandler = selectionHandler; broker.addNodeHandler(selectionHandler); view.divNode.addEventListener('click', e => { if (!e.shiftKey) { view.selectionHandler.clear(); } e.stopPropagation(); }); const blockSelectionHandler = { clear: function () { view.blockSelection.clear(); view.updateSelection(); broker.broadcastClear(blockSelectionHandler); }, select: function (blockIds, selected) { view.blockSelection.select(blockIds, selected); view.updateSelection(); broker.broadcastBlockSelect(blockSelectionHandler, blockIds, selected); }, brokeredBlockSelect: function (blockIds, selected) { const firstSelect = view.blockSelection.isEmpty(); view.blockSelection.select(blockIds, selected); view.updateSelection(firstSelect); }, brokeredClear: function () { view.blockSelection.clear(); view.updateSelection(); } }; this.blockSelectionHandler = blockSelectionHandler; broker.addBlockHandler(blockSelectionHandler); } addHtmlElementForNodeId(anyNodeId: any, htmlElement: HTMLElement) { const nodeId = anyToString(anyNodeId); if (!this.nodeIdToHtmlElementsMap.has(nodeId)) { this.nodeIdToHtmlElementsMap.set(nodeId, []); } this.nodeIdToHtmlElementsMap.get(nodeId).push(htmlElement); } addHtmlElementForBlockId(anyBlockId, htmlElement) { const blockId = anyToString(anyBlockId); if (!this.blockIdToHtmlElementsMap.has(blockId)) { this.blockIdToHtmlElementsMap.set(blockId, []); } this.blockIdToHtmlElementsMap.get(blockId).push(htmlElement); } addNodeIdToBlockId(anyNodeId, anyBlockId) { const blockId = anyToString(anyBlockId); if (!this.blockIdtoNodeIds.has(blockId)) { this.blockIdtoNodeIds.set(blockId, []); } this.blockIdtoNodeIds.get(blockId).push(anyToString(anyNodeId)); this.nodeIdToBlockId[anyNodeId] = blockId; } blockIdsForNodeIds(nodeIds) { const blockIds = []; for (const nodeId of nodeIds) { const blockId = this.nodeIdToBlockId[nodeId]; if (blockId == undefined) continue; blockIds.push(blockId); } return blockIds; } updateSelection(scrollIntoView: boolean = false) { if (this.divNode.parentNode == null) return; const mkVisible = new ViewElements(this.divNode.parentNode as HTMLElement); const view = this; const elementsToSelect = view.divNode.querySelectorAll(`[data-pc-offset]`); for (const el of elementsToSelect) { el.classList.toggle("selected", false); } for (const [blockId, elements] of this.blockIdToHtmlElementsMap.entries()) { const isSelected = view.blockSelection.isSelected(blockId); for (const element of elements) { mkVisible.consider(element, isSelected); element.classList.toggle("selected", isSelected); } } for (const key of this.nodeIdToHtmlElementsMap.keys()) { for (const element of this.nodeIdToHtmlElementsMap.get(key)) { element.classList.toggle("selected", false); } } for (const nodeId of view.selection.selectedKeys()) { const elements = this.nodeIdToHtmlElementsMap.get(nodeId); if (!elements) continue; for (const element of elements) { mkVisible.consider(element, true); element.classList.toggle("selected", true); } } mkVisible.apply(scrollIntoView); } setPatterns(patterns) { this.patterns = patterns; } clearText() { while (this.textListNode.firstChild) { this.textListNode.removeChild(this.textListNode.firstChild); } } createFragment(text, style) { const fragment = document.createElement("SPAN"); if (typeof style.associateData == 'function') { if (style.associateData(text, fragment) === false) { return null; } } else { if (style.css != undefined) { const css = isIterable(style.css) ? style.css : [style.css]; for (const cls of css) { fragment.classList.add(cls); } } fragment.innerText = text; } return fragment; } processLine(line) { const view = this; const result = []; let patternSet = 0; while (true) { const beforeLine = line; for (const pattern of view.patterns[patternSet]) { const matches = line.match(pattern[0]); if (matches != null) { if (matches[0] != '') { const style = pattern[1] != null ? pattern[1] : {}; const text = matches[0]; if (text != '') { const fragment = view.createFragment(matches[0], style); if (fragment !== null) result.push(fragment); } line = line.substr(matches[0].length); } let nextPatternSet = patternSet; if (pattern.length > 2) { nextPatternSet = pattern[2]; } if (line == "") { if (nextPatternSet != -1) { throw ("illegal parsing state in text-view in patternSet" + patternSet); } return result; } patternSet = nextPatternSet; break; } } if (beforeLine == line) { throw ("input not consumed in text-view in patternSet" + patternSet); } } } processText(text) { const view = this; const textLines = text.split(/[\n]/); let lineNo = 0; for (const line of textLines) { const li = document.createElement("LI"); li.className = "nolinenums"; li.dataset.lineNo = "" + lineNo++; const fragments = view.processLine(line); for (const fragment of fragments) { li.appendChild(fragment); } view.textListNode.appendChild(li); } } initializeContent(data, rememberedSelection) { this.clearText(); this.processText(data); this.show(); } public onresize(): void {} } ```
/content/code_sandbox/current/deps/v8/tools/turbolizer/src/text-view.ts
xml
2016-10-10T12:09:49
2024-08-11T15:13:17
node-packer
pmq20/node-packer
3,069
1,823
```xml <resources> <string name="app_name">Open Note Scanner</string> <string name="title_activity_gallery">Galeri</string> <string name="title_activity_full_image">Taranm resim grntleme</string> <string name="images_scanned">Taranm resimler</string> <string name="action_share">Payla</string> <string name="action_delete">Sil</string> <string name="confirm_title">Onaylayn</string> <string name="confirm_delete_text">Bu resmi silmek istediinizden emin misiniz?</string> <string name="answer_yes">Evet</string> <string name="answer_no">Hayr</string> <string name="confirm_delete_multiple_text">Seili olan resimleri silmek istediinizden emin misiniz?</string> <string name="share_snackbar">Resimleri ununla payla</string> <string name="action_about">Hakknda</string> <string name="about_filename">about-tr.md</string> <string name="install_opencv">OpenCV Manager\' ykle</string> <string name="confirm_install_opencv">OpenCV Manager\' GitHub\'tan m indirmek istiyorsunuz?</string> <string name="answer_cancel">ptal</string> <string name="downloading">ndiriliyor</string> <string name="downloading_opencv">OpenCV Manager ndiriliyor</string> <string name="scanningToast">Belge aranyor\nTm resmi taramak iin tekrar hafife vurun</string> <string name="colorMode">Renkli</string> <string name="bwMode">Siyah-Beyaz</string> <string name="autoMode">Otomatik Mod</string> <string name="manualMode">Manuel Mod</string> <string name="share_app">Bu Uygulamay payla</string> <string name="share_app_using">Balanty ununla payla</string> <string name="share_app_body">"Kameranzla notlar, izimleri ve belgeleri tarayan bu harika uygulamaya bir gz atn"</string> <string name="share_app_subject">Notlar ve belgeleri taramak iin harika bir uygulama</string> <string name="settings">Ayarlar</string> <string name="basic_settings">Temel Ayarlar</string> <string name="automatic_tagging">Otomatik Etiketleme</string> <string name="automatic_tagging_summary">zel sayfa ablonunu kullanarak iaretli taramalara uygulanacak otomatik etiketleri tanmlama</string> <string name="match_aspect">nizleme en boy orann koru</string> <string name="match_aspect_summary">Baz cihazlarda nizleme grntsnn en boy oran, son resim ile ayn deildir. Bu seenek aldnda, son resim iin nizleme grntsnn en boy oranyla eleen en yksek znrl seer.</string> <string name="bug_rotate">Resmi 180 dndr</string> <string name="bug_rotate_summary">Baz cihazlarda kamera ters evrilmitir, bu ayar her eyi mantkl olacak ekilde ayarlar</string> <string name="usage_stats">Kullanm statistikleri</string> <string name="usage_stats_summary">Gelitiriciye eitli kullanm istatistikleri gnderin. erik verisi gnderilmeyecek</string> <string name="send_message">Mesaj gnder</string> <string name="send_message_summary">Gelitiriciye mesaj gnder</string> <string name="stats_optin_title">Kullanm statistikleri</string> <string name="stats_optin_text">Gelitiriciye anonim kullanm istatistikleri gndermek iin Open Note Scanner\' etkinletirmek istiyor musunuz?\n\nBunu istediiniz zaman ayarlar ekranndan deitirebilirsiniz.</string> <string name="answer_later">Sonra</string> <string name="ask_install_opencv">alabilmesi iin Open Note Scanner\'n henz kurulu olmayan OpenCV Manager hizmetlerine ihtiyac var.</string> <string name="googleplay">Google Play</string> <string name="githubdownload">Direkt indirme</string> <string name="activateunknown">Ayarlara gidiniz</string> <string name="messageactivateunknown">Google Play ulalabilir deil ve bilinmeyen kaynaktan yklemeye izin yok, Ltfen ayarlardan bilinmeyen kaynaktan yklemeye izin veriniz.</string> <string name="github_project">Projenin GitHub Sayfas</string> <string name="github_project_summary">Bu uygulama ak kaynak kodludur, projenin GitHub sayfas araclyla geri bildirim, sorun raporlar, kod ve evirilerle iyiletirmeye yardmc olabilirsiniz.</string> <string name="donate">Gelitiriciye bir kahve smarlayn</string> <string name="donate_summary">Bu uygulamay beendiyseniz ve yararl olduunu dnyorsanz, bata bulunmay dnebilirsiniz.</string> <string name="telegram">Telegram Grubuna katln</string> <string name="telegram_summary">Program hakknda Telegram zerinden dier kullanclarla ve gelitirici ile grebilirsiniz</string> <string name="feedback_and_contributions">Geri bildirim ve katk</string> <string name="bitcoin_summary">Bitcoin kullanarak ba yap</string> <string name="paypal_summary">Birok kredi kart kabul edilir</string> <string name="filterModeOn">Grnt lemci Ak</string> <string name="filterModeOff">Grnt lemci Kapal</string> <string name="action_tag">Etiket</string> <string name="storage_folder">Depolama Klasr</string> <string name="storage_folder_summary">Taranan dosyalarn nerede saklanacan ayarlar</string> <string name="save_png">PNG Formatnda kaydet</string> <string name="save_png_summary">Son grntleri PNG formatna kaydet. Meta verileri henz PNG formatnda desteklenmemektedir, bu nedenle baz zellikler kullanlamayacaktr.</string> <string name="format_not_supported">Format desteklenmiyor</string> <string name="format_not_supported_message">Resmin format etiketlemeyi desteklemiyor</string> <string name="set_scan_topic">Tarama konusu belirleyiniz</string> <string name="cancel">ptal</string> <string name="custom_scan_topic">zel tarama konusu</string> <string name="scan_topic_dialog_title">Ltfen bir konu belirtin</string> <string name="skip_scan_topic">Konuyu atla</string> <string name="no_files_selected">Herhangi bir dosya seilmedi</string> <string name="action_pdfexport">PDF olarak da aktar</string> <string name="googleplay_donation_summary">Google Play kullanarak ba yapn, program bir yl reklamsz kullann</string> <string name="reward_ad_summary">Open Note Scanner\'a kk bir katk salamak iin bir reklam vidyosunu sonuna kadar izleyin. Program bir hafta reklamsz olarak kullanabileceksiniz.</string> <string name="reward_ad_title">Reklam izle</string> <string name="privacy_policy">Gizlilik Politikas</string> <string name="close">Kapat</string> <string name="donation_pending">nceki ba beklemede</string> <string name="custom_scan_topic_summary">Dosya adn taramak iin zel bir konu ayarlamay etkinletirin</string> <string name="standard_tags">Standart etiketler</string> <string name="done">Bitti</string> <string name="scan_topic_placeholder">Ltfen bir konu girin</string> </resources> ```
/content/code_sandbox/app/src/main/res/values-tr/strings.xml
xml
2016-02-10T11:14:38
2024-08-14T18:33:50
OpenNoteScanner
allgood/OpenNoteScanner
1,332
1,822
```xml import { Component, Input } from "@angular/core"; import { ProviderUserBulkRequest } from "@bitwarden/common/admin-console/models/request/provider/provider-user-bulk.request"; import { BulkRemoveComponent as OrganizationBulkRemoveComponent } from "@bitwarden/web-vault/app/admin-console/organizations/members/components/bulk/bulk-remove.component"; /** * @deprecated Please use the {@link BulkRemoveDialogComponent} instead. */ @Component({ templateUrl: "../../../../../../../../apps/web/src/app/admin-console/organizations/members/components/bulk/bulk-remove.component.html", }) export class BulkRemoveComponent extends OrganizationBulkRemoveComponent { @Input() providerId: string; async deleteUsers() { const request = new ProviderUserBulkRequest(this.users.map((user) => user.id)); return await this.apiService.deleteManyProviderUsers(this.providerId, request); } protected get removeUsersWarning() { return this.i18nService.t("removeUsersWarning"); } } ```
/content/code_sandbox/bitwarden_license/bit-web/src/app/admin-console/providers/manage/bulk/bulk-remove.component.ts
xml
2016-03-09T23:14:01
2024-08-16T15:07:51
clients
bitwarden/clients
8,877
202
```xml /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at path_to_url */ import {TestKey} from '@angular/cdk/testing'; import {MatChipEditInputHarness} from './chip-edit-input-harness'; import {MatChipHarness} from './chip-harness'; import {ChipEditInputHarnessFilters} from './chip-harness-filters'; /** Harness for interacting with a mat-chip-row in tests. */ export class MatChipRowHarness extends MatChipHarness { static override hostSelector = '.mat-mdc-chip-row'; /** Whether the chip is editable. */ async isEditable(): Promise<boolean> { return (await this.host()).hasClass('mat-mdc-chip-editable'); } /** Whether the chip is currently being edited. */ async isEditing(): Promise<boolean> { return (await this.host()).hasClass('mat-mdc-chip-editing'); } /** Sets the chip row into an editing state, if it is editable. */ async startEditing(): Promise<void> { if (!(await this.isEditable())) { throw new Error('Cannot begin editing a chip that is not editable.'); } return (await this.host()).dispatchEvent('dblclick'); } /** Stops editing the chip, if it was in the editing state. */ async finishEditing(): Promise<void> { if (await this.isEditing()) { await (await this.host()).sendKeys(TestKey.ENTER); } } /** Gets the edit input inside the chip row. */ async getEditInput(filter: ChipEditInputHarnessFilters = {}): Promise<MatChipEditInputHarness> { return this.locatorFor(MatChipEditInputHarness.with(filter))(); } } ```
/content/code_sandbox/src/material/chips/testing/chip-row-harness.ts
xml
2016-01-04T18:50:02
2024-08-16T11:21:13
components
angular/components
24,263
378
```xml // See LICENSE in the project root for license information. import { ScopedCommandLineAction } from '../providers/ScopedCommandLineAction'; import type { CommandLineStringParameter } from '../parameters/CommandLineStringParameter'; import { CommandLineParser } from '../providers/CommandLineParser'; import type { CommandLineParameterProvider } from '../providers/CommandLineParameterProvider'; import { AliasCommandLineAction } from '../providers/AliasCommandLineAction'; import { CommandLineAction } from '../providers/CommandLineAction'; import type { CommandLineFlagParameter } from '../parameters/CommandLineFlagParameter'; class TestAliasAction extends AliasCommandLineAction { public done: boolean = false; public constructor(targetAction: CommandLineAction, defaultParameters?: string[]) { super({ toolFilename: 'example', aliasName: 'alias-action', defaultParameters, targetAction }); } } class TestAction extends CommandLineAction { public done: boolean = false; private _flag!: CommandLineFlagParameter; public constructor() { super({ actionName: 'action', summary: 'does the action', documentation: 'a longer description' }); this._flag = this.defineFlagParameter({ parameterLongName: '--flag', description: 'The flag' }); } protected async onExecute(): Promise<void> { expect(this._flag.value).toEqual(true); this.done = true; } } class TestScopedAction extends ScopedCommandLineAction { public done: boolean = false; public scopedValue: string | undefined; private _verboseArg!: CommandLineFlagParameter; private _scopeArg!: CommandLineStringParameter; private _scopedArg: CommandLineStringParameter | undefined; public constructor() { super({ actionName: 'scoped-action', summary: 'does the scoped action', documentation: 'a longer description' }); } protected async onExecute(): Promise<void> { if (this._scopedArg) { expect(this._scopedArg.longName).toBe(`--scoped-${this._scopeArg.value}`); this.scopedValue = this._scopedArg.value; } this.done = true; } protected onDefineUnscopedParameters(): void { this._verboseArg = this.defineFlagParameter({ parameterLongName: '--verbose', description: 'A flag parameter.' }); this._scopeArg = this.defineStringParameter({ parameterLongName: '--scope', parameterGroup: ScopedCommandLineAction.ScopingParameterGroup, argumentName: 'SCOPE', description: 'The scope' }); } protected onDefineScopedParameters(scopedParameterProvider: CommandLineParameterProvider): void { if (this._scopeArg.value) { this._scopedArg = scopedParameterProvider.defineStringParameter({ parameterLongName: `--scoped-${this._scopeArg.value}`, argumentName: 'SCOPED', description: 'The scoped argument.' }); } } } class TestCommandLine extends CommandLineParser { public constructor() { super({ toolFilename: 'example', toolDescription: 'An example project' }); this.addAction(new TestAction()); this.addAction(new TestScopedAction()); } } describe(AliasCommandLineAction.name, () => { it('executes the aliased action', async () => { const commandLineParser: TestCommandLine = new TestCommandLine(); const targetAction: TestAction = commandLineParser.getAction('action') as TestAction; const aliasAction: TestAliasAction = new TestAliasAction(targetAction); commandLineParser.addAction(aliasAction); await commandLineParser.executeAsync(['alias-action', '--flag']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); expect(targetAction.done).toBe(true); }); it('executes the aliased action with provided default arguments', async () => { const commandLineParser: TestCommandLine = new TestCommandLine(); const targetAction: TestAction = commandLineParser.getAction('action') as TestAction; const aliasAction: TestAliasAction = new TestAliasAction(targetAction, ['--flag']); commandLineParser.addAction(aliasAction); await commandLineParser.executeAsync(['alias-action']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); expect(targetAction.done).toBe(true); }); it('executes the aliased scoped action', async () => { const commandLineParser: TestCommandLine = new TestCommandLine(); const targetAction: TestScopedAction = commandLineParser.getAction('scoped-action') as TestScopedAction; const aliasAction: TestAliasAction = new TestAliasAction(targetAction); commandLineParser.addAction(aliasAction); await commandLineParser.executeAsync(['alias-action', '--scope', 'foo', '--', '--scoped-foo', 'bar']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); expect(targetAction.done).toBe(true); expect(targetAction.scopedValue).toBe('bar'); }); it('executes the aliased scoped action with provided default scoping arguments', async () => { const commandLineParser: TestCommandLine = new TestCommandLine(); const targetAction: TestScopedAction = commandLineParser.getAction('scoped-action') as TestScopedAction; const aliasAction: TestAliasAction = new TestAliasAction(targetAction, ['--scope', 'foo', '--']); commandLineParser.addAction(aliasAction); await commandLineParser.executeAsync(['alias-action', '--scoped-foo', 'bar']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); expect(targetAction.done).toBe(true); expect(targetAction.scopedValue).toBe('bar'); }); it('prints the action parameter map', async () => { const commandLineParser: TestCommandLine = new TestCommandLine(); const targetAction: TestAction = commandLineParser.getAction('action') as TestAction; const aliasAction: TestAliasAction = new TestAliasAction(targetAction); commandLineParser.addAction(aliasAction); // Execute the parser in order to populate the parameters await commandLineParser.executeAsync(['alias-action', '--flag']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); const selectedAction: TestAliasAction = commandLineParser.selectedAction as TestAliasAction; expect(targetAction.done).toBe(true); expect(selectedAction.parameters.length).toBe(targetAction.parameters.length); const parameterStringMap: Record<string, string> = targetAction.getParameterStringMap(); expect(parameterStringMap).toMatchSnapshot(); }); it('prints the unscoped action parameter map', async () => { const commandLineParser: TestCommandLine = new TestCommandLine(); const targetAction: TestScopedAction = commandLineParser.getAction('scoped-action') as TestScopedAction; const aliasAction: TestAliasAction = new TestAliasAction(targetAction); commandLineParser.addAction(aliasAction); // Execute the parser in order to populate the parameters await commandLineParser.executeAsync(['alias-action', '--verbose']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); const selectedAction: TestAliasAction = commandLineParser.selectedAction as TestAliasAction; expect(targetAction.done).toBe(true); expect(selectedAction.parameters.length).toBe(targetAction.parameters.length); const parameterStringMap: Record<string, string> = targetAction.getParameterStringMap(); expect(parameterStringMap).toMatchSnapshot(); }); it('prints the unscoped action parameter map with provided default arguments', async () => { const commandLineParser: TestCommandLine = new TestCommandLine(); const targetAction: TestScopedAction = commandLineParser.getAction('scoped-action') as TestScopedAction; const aliasAction: TestAliasAction = new TestAliasAction(targetAction, ['--verbose']); commandLineParser.addAction(aliasAction); // Execute the parser in order to populate the parameters await commandLineParser.executeAsync(['alias-action']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); const selectedAction: TestAliasAction = commandLineParser.selectedAction as TestAliasAction; expect(targetAction.done).toBe(true); expect(selectedAction.parameters.length).toBe(targetAction.parameters.length); const parameterStringMap: Record<string, string> = targetAction.getParameterStringMap(); expect(parameterStringMap).toMatchSnapshot(); }); it('prints the scoped action parameter map', async () => { let commandLineParser: TestCommandLine = new TestCommandLine(); let targetAction: TestScopedAction = commandLineParser.getAction('scoped-action') as TestScopedAction; let aliasAction: TestAliasAction = new TestAliasAction(targetAction); commandLineParser.addAction(aliasAction); // Execute the parser in order to populate the parameters await commandLineParser.executeAsync(['alias-action', '--scope', 'foo']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); let selectedAction: TestAliasAction = commandLineParser.selectedAction as TestAliasAction; expect(targetAction.done).toBe(true); // The alias action only has the 2 unscoped parameters, while the target action has 3 parameters // (2 unscoped, 1 scoped) expect(selectedAction.parameters.length).toBe(2); expect(targetAction.parameters.length).toBe(3); let parameterStringMap: Record<string, string> = targetAction.getParameterStringMap(); expect(parameterStringMap).toMatchSnapshot(); commandLineParser = new TestCommandLine(); targetAction = commandLineParser.getAction('scoped-action') as TestScopedAction; aliasAction = new TestAliasAction(targetAction); commandLineParser.addAction(aliasAction); // Execute the parser in order to populate the parameters await commandLineParser.executeAsync(['alias-action', '--scope', 'foo', '--', '--scoped-foo', 'bar']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); selectedAction = commandLineParser.selectedAction as TestAliasAction; expect(targetAction.done).toBe(true); expect(targetAction.scopedValue).toBe('bar'); // The alias action only has the 2 unscoped parameters, while the target action has 3 parameters // (2 unscoped, 1 scoped) expect(selectedAction.parameters.length).toBe(2); expect(targetAction.parameters.length).toBe(3); parameterStringMap = targetAction.getParameterStringMap(); expect(parameterStringMap).toMatchSnapshot(); }); it('prints the scoped action parameter map with provided default scoping arguments', async () => { let commandLineParser: TestCommandLine = new TestCommandLine(); let targetAction: TestScopedAction = commandLineParser.getAction('scoped-action') as TestScopedAction; let aliasAction: TestAliasAction = new TestAliasAction(targetAction, ['--scope', 'foo', '--']); commandLineParser.addAction(aliasAction); // Execute the parser in order to populate the parameters await commandLineParser.executeAsync(['alias-action']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); let selectedAction: TestAliasAction = commandLineParser.selectedAction as TestAliasAction; expect(targetAction.done).toBe(true); // The alias action only has the 2 unscoped parameters, while the target action has 3 parameters // (2 unscoped, 1 scoped) expect(selectedAction.parameters.length).toBe(2); expect(targetAction.parameters.length).toBe(3); let parameterStringMap: Record<string, string> = targetAction.getParameterStringMap(); expect(parameterStringMap).toMatchSnapshot(); commandLineParser = new TestCommandLine(); targetAction = commandLineParser.getAction('scoped-action') as TestScopedAction; aliasAction = new TestAliasAction(targetAction, ['--scope', 'foo', '--']); commandLineParser.addAction(aliasAction); // Execute the parser in order to populate the parameters await commandLineParser.executeAsync(['alias-action', '--scoped-foo', 'bar']); expect(commandLineParser.selectedAction).toBeDefined(); expect(commandLineParser.selectedAction!.actionName).toEqual('alias-action'); selectedAction = commandLineParser.selectedAction as TestAliasAction; expect(targetAction.done).toBe(true); expect(targetAction.scopedValue).toBe('bar'); // The alias action only has the 2 unscoped parameters, while the target action has 3 parameters // (2 unscoped, 1 scoped) expect(selectedAction.parameters.length).toBe(2); expect(targetAction.parameters.length).toBe(3); parameterStringMap = targetAction.getParameterStringMap(); expect(parameterStringMap).toMatchSnapshot(); }); }); ```
/content/code_sandbox/libraries/ts-command-line/src/test/AliasedCommandLineAction.test.ts
xml
2016-09-30T00:28:20
2024-08-16T18:54:35
rushstack
microsoft/rushstack
5,790
2,742
```xml <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="path_to_url" xmlns:xsi="path_to_url" xmlns:xsd="path_to_url" xmlns:flowable="path_to_url" xmlns:bpmndi="path_to_url" xmlns:omgdc="path_to_url" xmlns:omgdi="path_to_url" typeLanguage="path_to_url" expressionLanguage="path_to_url" targetNamespace="path_to_url"> <signal id="startAnotherTask" name="Start another task"></signal> <signal id="startAnotherSubTask" name="Start another sub task"></signal> <process id="startingAdditionalTasks" name="Starting additional tasks" isExecutable="true"> <startEvent id="startEvent"></startEvent> <userTask id="task1" name="Task 1" flowable:assignee="$INITIATOR"> <extensionElements> <modeler:activiti-idm-initiator xmlns:modeler="path_to_url"><![CDATA[true]]></modeler:activiti-idm-initiator> </extensionElements> </userTask> <sequenceFlow id="sid-3BFE51D9-7356-42F5-A1B9-5F6C12A4A419" sourceRef="startEvent" targetRef="task1"></sequenceFlow> <userTask id="task2" name="Task 2" flowable:assignee="$INITIATOR"> <extensionElements> <modeler:activiti-idm-initiator xmlns:modeler="path_to_url"><![CDATA[true]]></modeler:activiti-idm-initiator> </extensionElements> </userTask> <endEvent id="endEvent"></endEvent> <sequenceFlow id="sid-AAFDB0AD-FE6C-46E0-8C95-6FF3F8DA7EBA" sourceRef="task2" targetRef="endEvent"></sequenceFlow> <subProcess id="subProcess1" name="subProcess"> <startEvent id="subStartEvent"></startEvent> <userTask id="subTask1" name="Sub task 1" flowable:assignee="$INITIATOR"> <extensionElements> <modeler:activiti-idm-initiator xmlns:modeler="path_to_url"><![CDATA[true]]></modeler:activiti-idm-initiator> </extensionElements> </userTask> <endEvent id="subEndEvent"></endEvent> <subProcess id="eventSubProcess" name="subProcess" triggeredByEvent="true"> <startEvent id="subEventStartEvent" isInterrupting="false"> <signalEventDefinition signalRef="startAnotherSubTask"></signalEventDefinition> </startEvent> <userTask id="additionalSubTask" name="Additional sub task" flowable:assignee="$INITIATOR"> <extensionElements> <modeler:activiti-idm-initiator xmlns:modeler="path_to_url"><![CDATA[true]]></modeler:activiti-idm-initiator> </extensionElements> </userTask> <endEvent id="subEventEndEvent"></endEvent> <sequenceFlow id="subEventFlow1" sourceRef="subEventStartEvent" targetRef="additionalSubTask"></sequenceFlow> <sequenceFlow id="subEventFlow2" sourceRef="additionalSubTask" targetRef="subEventEndEvent"></sequenceFlow> </subProcess> <sequenceFlow id="subFlow2" sourceRef="subTask1" targetRef="subEndEvent"></sequenceFlow> <sequenceFlow id="subFlow1" sourceRef="subStartEvent" targetRef="subTask1"></sequenceFlow> </subProcess> <sequenceFlow id="sid-5FF6E4C0-F243-47AD-8A26-162FF45C768E" sourceRef="task1" targetRef="subProcess1"></sequenceFlow> <sequenceFlow id="sid-36154E3B-6CD8-46DA-897A-3E9B5B9D1DEF" sourceRef="subProcess1" targetRef="task2"></sequenceFlow> <subProcess id="eventProcess" name="subProcess" triggeredByEvent="true"> <startEvent id="signalStartEvent" isInterrupting="false"> <signalEventDefinition signalRef="startAnotherTask"></signalEventDefinition> </startEvent> <userTask id="additionalTask" name="Additional task" flowable:assignee="$INITIATOR"> <extensionElements> <modeler:activiti-idm-initiator xmlns:modeler="path_to_url"><![CDATA[true]]></modeler:activiti-idm-initiator> </extensionElements> </userTask> <endEvent id="eventEndEvent"></endEvent> <sequenceFlow id="mainEventFlow1" sourceRef="signalStartEvent" targetRef="additionalTask"></sequenceFlow> <sequenceFlow id="mainEventFlow2" sourceRef="additionalTask" targetRef="eventEndEvent"></sequenceFlow> </subProcess> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_startingAdditionalTasks"> <bpmndi:BPMNPlane bpmnElement="startingAdditionalTasks" id="BPMNPlane_startingAdditionalTasks"> <bpmndi:BPMNShape bpmnElement="startEvent" id="BPMNShape_startEvent"> <omgdc:Bounds height="30.0" width="30.0" x="100.0" y="163.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="task1" id="BPMNShape_task1"> <omgdc:Bounds height="80.0" width="100.0" x="195.0" y="138.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="task2" id="BPMNShape_task2"> <omgdc:Bounds height="80.0" width="100.0" x="765.0" y="138.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="endEvent" id="BPMNShape_endEvent"> <omgdc:Bounds height="28.0" width="28.0" x="915.0" y="164.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="subProcess1" id="BPMNShape_subProcess1"> <omgdc:Bounds height="282.0" width="377.0" x="345.0" y="37.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="subStartEvent" id="BPMNShape_subStartEvent"> <omgdc:Bounds height="30.0" width="30.0" x="375.0" y="90.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="subTask1" id="BPMNShape_subTask1"> <omgdc:Bounds height="80.0" width="100.0" x="450.0" y="65.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="subEndEvent" id="BPMNShape_subEndEvent"> <omgdc:Bounds height="28.0" width="28.0" x="595.0" y="91.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="eventSubProcess" id="BPMNShape_eventSubProcess"> <omgdc:Bounds height="117.0" width="303.0" x="375.0" y="180.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="subEventStartEvent" id="BPMNShape_subEventStartEvent"> <omgdc:Bounds height="30.0" width="30.0" x="405.0" y="223.5"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="additionalSubTask" id="BPMNShape_additionalSubTask"> <omgdc:Bounds height="80.0" width="100.0" x="480.0" y="198.5"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="subEventEndEvent" id="BPMNShape_subEventEndEvent"> <omgdc:Bounds height="28.0" width="28.0" x="625.0" y="224.5"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="eventProcess" id="BPMNShape_eventProcess"> <omgdc:Bounds height="157.0" width="484.0" x="105.0" y="390.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="signalStartEvent" id="BPMNShape_signalStartEvent"> <omgdc:Bounds height="30.0" width="30.0" x="154.0" y="452.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="additionalTask" id="BPMNShape_additionalTask"> <omgdc:Bounds height="80.0" width="100.0" x="229.0" y="427.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="eventEndEvent" id="BPMNShape_eventEndEvent"> <omgdc:Bounds height="28.0" width="28.0" x="374.0" y="453.0"></omgdc:Bounds> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="mainEventFlow1" id="BPMNEdge_mainEventFlow1"> <omgdi:waypoint x="184.0" y="467.0"></omgdi:waypoint> <omgdi:waypoint x="229.0" y="467.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="mainEventFlow2" id="BPMNEdge_mainEventFlow2"> <omgdi:waypoint x="329.0" y="467.0"></omgdi:waypoint> <omgdi:waypoint x="374.0" y="467.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="sid-3BFE51D9-7356-42F5-A1B9-5F6C12A4A419" id="BPMNEdge_sid-3BFE51D9-7356-42F5-A1B9-5F6C12A4A419"> <omgdi:waypoint x="130.0" y="178.0"></omgdi:waypoint> <omgdi:waypoint x="195.0" y="178.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="sid-5FF6E4C0-F243-47AD-8A26-162FF45C768E" id="BPMNEdge_sid-5FF6E4C0-F243-47AD-8A26-162FF45C768E"> <omgdi:waypoint x="295.0" y="178.0"></omgdi:waypoint> <omgdi:waypoint x="345.0" y="178.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="subEventFlow2" id="BPMNEdge_subEventFlow2"> <omgdi:waypoint x="580.0" y="238.5"></omgdi:waypoint> <omgdi:waypoint x="625.0" y="238.5"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="subEventFlow1" id="BPMNEdge_subEventFlow1"> <omgdi:waypoint x="435.0" y="238.5"></omgdi:waypoint> <omgdi:waypoint x="480.0" y="238.5"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="sid-AAFDB0AD-FE6C-46E0-8C95-6FF3F8DA7EBA" id="BPMNEdge_sid-AAFDB0AD-FE6C-46E0-8C95-6FF3F8DA7EBA"> <omgdi:waypoint x="865.0" y="178.0"></omgdi:waypoint> <omgdi:waypoint x="915.0" y="178.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="subFlow1" id="BPMNEdge_subFlow1"> <omgdi:waypoint x="405.0" y="105.0"></omgdi:waypoint> <omgdi:waypoint x="450.0" y="105.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="subFlow2" id="BPMNEdge_subFlow2"> <omgdi:waypoint x="550.0" y="105.0"></omgdi:waypoint> <omgdi:waypoint x="595.0" y="105.0"></omgdi:waypoint> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="sid-36154E3B-6CD8-46DA-897A-3E9B5B9D1DEF" id="BPMNEdge_sid-36154E3B-6CD8-46DA-897A-3E9B5B9D1DEF"> <omgdi:waypoint x="722.0" y="178.0"></omgdi:waypoint> <omgdi:waypoint x="765.0" y="178.0"></omgdi:waypoint> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions> ```
/content/code_sandbox/modules/flowable-engine/src/test/resources/org/flowable/engine/test/bpmn/event/signal/SignalEventSubprocessTest.testStartingAdditionalTasks.bpmn20.xml
xml
2016-10-13T07:21:43
2024-08-16T15:23:14
flowable-engine
flowable/flowable-engine
7,715
3,541
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE language SYSTEM "language.dtd"> <language name="ASP" version="9" kateversion="5.44" section="Markup" extensions="*.asp;" mimetype="text/x-asp-src;text/x-asp-src" author="Antonio Salazar (savedfastcool@gmail.com)" license="LGPL"> <highlighting> <list name="control structures"> <item>select</item> <item>case</item> <item>end select</item> <item>if</item> <item>then</item> <item>else</item> <item>elseif</item> <item>end if</item> <item>while</item> <item>do</item> <item>until</item> <item>loop</item> <item>wend</item> <item>for</item> <item>each</item> <item>to</item> <item>in</item> <item>next</item> <item>exit</item> <item>continue</item> </list> <list name="keywords"> <item>dim</item> <item>redim</item> <item>preserve</item> <item>const</item> <item>erase</item> <item>nothing</item> <item>set</item> <item>new</item> <item>me</item> <item>function</item> <item>sub</item> <item>call</item> <item>class</item> <item>private</item> <item>public</item> <item>with</item> <item>randomize</item> <item>open</item> <item>close</item> <item>movenext</item> <item>execute</item> <item>eof</item> <item>not</item> <item>true</item> <item>false</item> <item>or</item> <item>and</item> <item>xor</item> </list> <list name="functions"> <item>response</item> <item>write</item> <item>redirect</item> <item>end</item> <item>request</item> <item>form</item> <item>querystring</item> <item>servervariables</item> <item>cookies</item> <item>session</item> <item>server</item> <item>createobject</item> <item>abs</item> <item>array</item> <item>asc</item> <item>atn</item> <item>cbool</item> <item>cbyte</item> <item>ccur</item> <item>cdate</item> <item>cdbl</item> <item>chr</item> <item>cint</item> <item>clng</item> <item>cos</item> <item>csng</item> <item>cstr</item> <item>date</item> <item>dateadd</item> <item>DateDiff</item> <item>DatePart</item> <item>DateSerial</item> <item>DateValue</item> <item>Date</item> <item>Day</item> <item>Exp</item> <item>Filter</item> <item>Fix</item> <item>FormatCurrency</item> <item>FormatDateTime</item> <item>FormatNumber</item> <item>FormatPercent</item> <item>GetObject</item> <item>Hex</item> <item>Hour</item> <item>InputBox</item> <item>InStr</item> <item>InStrRev</item> <item>Int</item> <item>IsArray</item> <item>IsDate</item> <item>IsEmpty</item> <item>IsNull</item> <item>IsNumeric</item> <item>IsObject</item> <item>Join</item> <item>LBound</item> <item>LCase</item> <item>Left</item> <item>Len</item> <item>LoadPicture</item> <item>Log</item> <item>LTrim</item> <item>Mid</item> <item>Minute</item> <item>Month</item> <item>MonthName</item> <item>MsgBox</item> <item>Now</item> <item>Oct</item> <item>Replace</item> <item>RGB</item> <item>Right</item> <item>Rnd</item> <item>Round</item> <item>RTrim</item> <item>ScriptEngine</item> <item>ScriptEngineBuildVersion</item> <item>ScriptEngineMajorVersion</item> <item>ScriptEngineMinorVersion</item> <item>Second</item> <item>Sgn</item> <item>Sin</item> <item>Space</item> <item>Split</item> <item>Sqr</item> <item>StrComp</item> <item>StrReverse</item> <item>String</item> <item>Tan</item> <item>Time</item> <item>Timer</item> <item>TimeSerial</item> <item>TimeValue</item> <item>Trim</item> <item>TypeName</item> <item>UBound</item> <item>UCase</item> <item>VarType</item> <item>Weekday</item> <item>WeekdayName</item> <item>Year</item> <item>Add</item> <item>AddFolders</item> <item>BuildPath</item> <item>Clear</item> <item>Close</item> <item>Copy</item> <item>CopyFile</item> <item>CopyFolder</item> <item>CreateFolder</item> <item>CreateTextFile</item> <item>Delete</item> <item>DeleteFile</item> <item>DeleteFolder</item> <item>DriveExists</item> <item>Exists</item> <item>FileExists</item> <item>FolderExists</item> <item>GetAbsolutePathName</item> <item>GetBaseName</item> <item>GetDrive</item> <item>GetDriveName</item> <item>GetExtensionName</item> <item>GetFile</item> <item>GetFileName</item> <item>GetFolder</item> <item>GetParentFolderName</item> <item>GetSpecialFolder</item> <item>GetTempName</item> <item>Items</item> <item>item</item> <item>Keys</item> <item>Move</item> <item>MoveFile</item> <item>MoveFolder</item> <item>OpenAsTextStream</item> <item>OpenTextFile</item> <item>Raise</item> <item>Read</item> <item>ReadAll</item> <item>ReadLine</item> <item>Remove</item> <item>RemoveAll</item> <item>Skip</item> <item>SkipLine</item> <item>Write</item> <item>WriteBlankLines</item> <item>WriteLine</item> </list> <contexts> <context name="nosource" attribute="Normal Text" lineEndContext="#stay"> <IncludeRules context="find-aspsource" /> <RegExpr attribute="HTML Tag" context="aspsource" String="&lt;\s*script\s*language=&quot;VBScript&quot;[^&gt;]*&gt;" insensitive="true" /> <RegExpr attribute="HTML Tag" context="scripts" String="&lt;\s*script(?:\s|&gt;|$)" insensitive="true" /> <RegExpr attribute="HTML Tag" context="htmltag" String="&lt;\s*\/?\s*[a-zA-Z_:][a-zA-Z0-9._:-]*" /> <StringDetect attribute="HTML Comment" context="htmlcomment" String="&lt;!--" beginRegion="HTMLComment" /> </context> <context name="find-aspsource" attribute="Normal Text" lineEndContext="#stay"> <Detect2Chars attribute="ASP Source" context="aspsource" char="&lt;" char1="%" beginRegion="ASPSource" /> </context> <context name="aspsource" attribute="ASP Text" lineEndContext="#stay"> <Detect2Chars attribute="ASP Source" context="#pop" char="%" char1="&gt;" endRegion="ASPSource" /> <RegExpr attribute="HTML Tag" context="#pop" String="&lt;\s*\/\s*script\s*&gt;" insensitive="true" /> <DetectChar attribute="Comment" context="asp_onelinecomment" char="'" /> <DetectChar attribute="String" context="doublequotestring" char="&quot;" /> <DetectChar attribute="Keyword" context="#stay" char="&amp;" /> <RegExpr attribute="String" context="#stay" String="[0123456789]*\.\.\.[0123456789]*" /> <HlCOct attribute="Octal" context="#stay" /> <HlCHex attribute="Hex" context="#stay" /> <Float attribute="Float" context="#stay" /> <Int attribute="Decimal" context="#stay" /> <AnyChar attribute="Other" context="#stay" String=";()}{:,[]" /> <WordDetect attribute="Control Structures" context="#stay" String="elseif" insensitive="true" beginRegion="iffi1" endRegion="iffi1"/> <WordDetect attribute="Control Structures" context="#stay" String="else" insensitive="true" beginRegion="iffi1" endRegion="iffi1"/> <WordDetect attribute="Control Structures" context="#stay" String="if" insensitive="true" beginRegion="iffi1"/> <WordDetect attribute="Control Structures" context="#stay" String="end if" insensitive="true" endRegion="iffi1"/> <WordDetect attribute="Keyword" context="#stay" String="exit function" insensitive="true" /> <WordDetect attribute="Keyword" context="#stay" String="function" insensitive="true" beginRegion="funendfun1"/> <WordDetect attribute="Keyword" context="#stay" String="end function" insensitive="true" endRegion="funendfun1"/> <WordDetect attribute="Keyword" context="#stay" String="exit sub" insensitive="true" /> <WordDetect attribute="Keyword" context="#stay" String="sub" insensitive="true" beginRegion="subendsub1"/> <WordDetect attribute="Keyword" context="#stay" String="end sub" insensitive="true" endRegion="subendsub1"/> <WordDetect attribute="Keyword" context="#stay" String="class" insensitive="true" beginRegion="classendclass1"/> <WordDetect attribute="Keyword" context="#stay" String="end class" insensitive="true" endRegion="classendclass1"/> <WordDetect attribute="Control Structures" context="#stay" String="exit do" insensitive="true" /> <RegExpr attribute="Control Structures" context="#stay" String="\bdo(?:\s+while)?\b" insensitive="true" beginRegion="doloop1"/> <WordDetect attribute="Control Structures" context="#stay" String="loop" insensitive="true" endRegion="doloop1"/> <WordDetect attribute="Control Structures" context="#stay" String="exit while" insensitive="true" /> <WordDetect attribute="Control Structures" context="#stay" String="while" insensitive="true" beginRegion="whilewend1"/> <WordDetect attribute="Control Structures" context="#stay" String="wend" insensitive="true" endRegion="whilewend1"/> <WordDetect attribute="Control Structures" context="#stay" String="exit for" insensitive="true" /> <WordDetect attribute="Control Structures" context="#stay" String="for" insensitive="true" beginRegion="fornext1"/> <WordDetect attribute="Control Structures" context="#stay" String="next" insensitive="true" endRegion="fornext1"/> <WordDetect attribute="Control Structures" context="#stay" String="select case" insensitive="true" beginRegion="selcase1"/> <WordDetect attribute="Control Structures" context="#stay" String="end select" insensitive="true" endRegion="selcase1"/> <keyword attribute="Keyword" context="#stay" String="keywords" /> <keyword attribute="Control Structures" context="#stay" String="control structures" /> <keyword attribute="Function" context="#stay" String="functions" /> </context> <context name="asp_onelinecomment" attribute="Comment" lineEndContext="#pop"> <DetectSpaces /> <Detect2Chars context="#pop" char="%" char1="&gt;" lookAhead="true" /> <IncludeRules context="##Comments" /> </context> <context name="doublequotestring" attribute="String" lineEndContext="#stay"> <DetectSpaces /> <Detect2Chars attribute="Escape Code" context="#stay" char="&quot;" char1="&quot;" /> <RegExpr attribute="Escape Code" context="#stay" String="\\[0-7]{1,3}|\\x[0-9A-Fa-f]{1,2}" /> <DetectChar attribute="String" context="#pop" char="&quot;" /> </context> <context name="singlequotestring" attribute="String" lineEndContext="#stay"> <Detect2Chars attribute="Escape Code" context="#stay" char="'" char1="'"/> <DetectChar attribute="String" context="#pop" char="'" /> </context> <context name="htmltag" attribute="Identifier" lineEndContext="#stay"> <DetectSpaces /> <Detect2Chars attribute="HTML Tag" context="#pop" char="/" char1="&gt;" /> <DetectChar attribute="HTML Tag" context="#pop" char="&gt;"/> <IncludeRules context="find-aspsource" /> <DetectChar attribute="Identifier" context="identifiers" char="="/> </context> <context name="htmlcomment" attribute="HTML Comment" lineEndContext="#stay"> <DetectSpaces /> <IncludeRules context="find-aspsource" /> <StringDetect attribute="HTML Comment" context="#pop" String="--&gt;" endRegion="HTMLComment" /> <DetectChar attribute="Normal Text" context="identifiers" char="="/> <IncludeRules context="##Comments" /> </context> <context name="identifiers" attribute="Identifier" lineEndContext="#stay"> <DetectSpaces /> <RegExpr attribute="String" context="#pop" String="\s*#?[a-zA-Z0-9]*" /> <DetectChar attribute="Types" context="types1" char="'" /> <DetectChar attribute="Types" context="types2" char="&quot;" /> </context> <context name="types1" attribute="Types" lineEndContext="#stay"> <IncludeRules context="find-aspsource" /> <DetectChar attribute="Types" context="#pop#pop" char="'" /> </context> <context name="types2" attribute="Types" lineEndContext="#stay"> <IncludeRules context="find-aspsource" /> <DetectChar attribute="Types" context="#pop#pop" char="&quot;" /> </context> <context name="scripts" attribute="Normal Text" lineEndContext="#stay"> <Detect2Chars attribute="Comment" context="scripts_onelinecomment" char="/" char1="/" /> <Detect2Chars attribute="Comment" context="twolinecomment" char="/" char1="*" beginRegion="ScriptComment" /> <keyword attribute="Control Structures" context="#stay" String="control structures" /> <keyword attribute="Keyword" context="#stay" String="keywords" /> <keyword attribute="Function" context="#stay" String="functions" /> <IncludeRules context="find-aspsource" /> <RegExpr attribute="HTML Tag" context="#pop" String="&lt;\s*\/\s*script\s*&gt;" insensitive="true" /> <DetectChar attribute="String" context="doublequotestring" char="&quot;" /> <DetectChar attribute="String" context="singlequotestring" char="&#39;" /> <HlCOct attribute="Octal" context="#stay" /> <HlCHex attribute="Hex" context="#stay" /> <Float attribute="Float" context="#stay" /> <Int attribute="Decimal" context="#stay" /> <DetectChar attribute="Normal Text" context="#stay" char="{" beginRegion="Brace1" /> <DetectChar attribute="Normal Text" context="#stay" char="}" endRegion="Brace1" /> <AnyChar attribute="Other" context="#stay" String=";()}{:,[]" /> </context> <context name="scripts_onelinecomment" attribute="Comment" lineEndContext="#pop"> <DetectSpaces /> <RegExpr attribute="HTML Tag" context="#pop#pop" String="&lt;\s*\/\s*script\s*&gt;" insensitive="true" /> <IncludeRules context="##Comments" /> </context> <context name="twolinecomment" attribute="Comment" lineEndContext="#stay"> <DetectSpaces /> <Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="ScriptComment" /> <IncludeRules context="##Comments" /> </context> </contexts> <itemDatas> <itemData name="Normal Text" defStyleNum="dsNormal" /> <itemData name="ASP Text" defStyleNum="dsNormal" spellChecking="false" /> <itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" /> <itemData name="Function" defStyleNum="dsFunction" spellChecking="false" /> <itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false" /> <itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false" /> <itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false" /> <itemData name="Float" defStyleNum="dsFloat" spellChecking="false" /> <itemData name="String" defStyleNum="dsString" /> <itemData name="Comment" defStyleNum="dsComment" /> <itemData name="Control Structures" defStyleNum="dsControlFlow" spellChecking="false" /> <itemData name="Escape Code" defStyleNum="dsSpecialChar" spellChecking="false" /> <itemData name="Other" defStyleNum="dsOthers" spellChecking="false" /> <itemData name="ASP Source" defStyleNum="dsDataType" bold="1" spellChecking="false" /> <itemData name="HTML Tag" defStyleNum="dsKeyword" spellChecking="false" /> <itemData name="HTML Comment" defStyleNum="dsComment" /> <itemData name="Identifier" defStyleNum="dsOthers" spellChecking="false" /> <itemData name="Types" defStyleNum="dsString" /> </itemDatas> </highlighting> <general> <comments> <comment name="singleLine" start="'" /> </comments> <keywords casesensitive="0" weakDeliminator=""/> </general> </language> <!-- kate: replace-tabs on; tab-width 4; indent-width 4; --> ```
/content/code_sandbox/syntax/asp.xml
xml
2016-08-19T16:25:54
2024-08-11T08:59:44
matterhorn
matterhorn-chat/matterhorn
1,027
4,501
```xml <Project> <!-- Empty Directory.Build.props file to prevent test asset projects from picking up the repo's Directory.Build.props' --> </Project> ```
/content/code_sandbox/src/Layout/redist/targets/test/Empty.props
xml
2016-07-22T21:26:02
2024-08-16T17:23:58
sdk
dotnet/sdk
2,627
29
```xml import { RemovalPolicy } from "aws-cdk-lib"; import { AccountRecovery, CfnUserPoolUser, Mfa, OAuthScope, UserPool, UserPoolClient, UserPoolDomain, } from "aws-cdk-lib/aws-cognito"; import { Construct } from "constructs"; export interface AppAuthProps { email: string; callbackDomain: string; } export class AppAuth extends Construct { readonly userPool: UserPool; readonly userPoolDomain: UserPoolDomain; readonly appClient: UserPoolClient; readonly user: CfnUserPoolUser; constructor(scope: Construct, id: string, props: AppAuthProps) { super(scope, id); this.userPool = new UserPool(this, "login-pool", { passwordPolicy: { minLength: 6, requireDigits: false, requireLowercase: false, requireSymbols: false, requireUppercase: false, }, mfa: Mfa.OFF, accountRecovery: AccountRecovery.NONE, selfSignUpEnabled: false, removalPolicy: RemovalPolicy.DESTROY, }); this.userPoolDomain = this.userPool.addDomain("login-domain", { cognitoDomain: { domainPrefix: id, }, }); const callbackUrl = `path_to_url{props.callbackDomain}`; this.appClient = this.userPool.addClient("AppClient", { oAuth: { callbackUrls: [callbackUrl], logoutUrls: [callbackUrl], flows: { implicitCodeGrant: true }, scopes: [OAuthScope.PROFILE, OAuthScope.OPENID], }, }); this.user = new CfnUserPoolUser(this, "default-user", { userPoolId: this.userPool.userPoolId, userAttributes: [ { name: "email", value: props.email, }, ], username: props.email, }); } } ```
/content/code_sandbox/applications/feedback_sentiment_analyzer/cdk/lib/constructs/app-auth.ts
xml
2016-08-18T19:06:57
2024-08-16T18:59:44
aws-doc-sdk-examples
awsdocs/aws-doc-sdk-examples
9,298
422
```xml import { splitQueryInString } from '@/Utils' import { classNames } from '@standardnotes/utils' import { getTitleForLinkedTag } from '@/Utils/Items/Display/getTitleForLinkedTag' import { getIconForItem } from '@/Utils/Items/Icons/getIconForItem' import { LinkableItem } from '@/Utils/Items/Search/LinkableItem' import { observer } from 'mobx-react-lite' import { useApplication } from '../ApplicationProvider' import Icon from '../Icon/Icon' import { getItemTitleInContextOfLinkBubble } from '@/Utils/Items/Search/doesItemMatchSearchQuery' type Props = { item: LinkableItem searchQuery?: string } const LinkedItemMeta = ({ item, searchQuery }: Props) => { const application = useApplication() const [icon, className] = getIconForItem(item, application) const tagTitle = getTitleForLinkedTag(item, application) const title = getItemTitleInContextOfLinkBubble(item) return ( <> <Icon type={icon} className={classNames('flex-shrink-0', className)} /> <div className="min-w-0 flex-grow break-words text-left text-base lg:text-sm"> {tagTitle && <span className="text-passive-1">{tagTitle.titlePrefix}</span>} {searchQuery ? splitQueryInString(title, searchQuery).map((substring, index) => ( <span key={index} className={`${ substring.toLowerCase() === searchQuery.toLowerCase() ? 'whitespace-pre-wrap font-bold' : 'whitespace-pre-wrap ' }`} > {substring} </span> )) : title} </div> </> ) } export default observer(LinkedItemMeta) ```
/content/code_sandbox/packages/web/src/javascripts/Components/LinkedItems/LinkedItemMeta.tsx
xml
2016-12-05T23:31:33
2024-08-16T06:51:19
app
standardnotes/app
5,180
381
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>${PRODUCT_NAME}</string> <key>CFBundlePackageType</key> <string>FMWK</string> <key>CFBundleShortVersionString</key> <string>0.8.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>${CURRENT_PROJECT_VERSION}</string> <key>NSPrincipalClass</key> <string></string> </dict> </plist> ```
/content/code_sandbox/Vendor/SwiftGen/Pods/Target Support Files/GenumKit/Info.plist
xml
2016-06-12T02:03:36
2024-08-13T13:02:39
Iconic
home-assistant/Iconic
1,576
245
```xml import * as React from 'react'; import { Button, Flex, Grid, Ref, Segment } from '@fluentui/react-northstar'; type RefExampleState = { isMounted: boolean; }; class RefExample extends React.Component<{}, RefExampleState> { state = { isMounted: false }; createdRef = React.createRef<HTMLButtonElement>(); functionalRef = null; handleRef = (node: HTMLButtonElement) => (this.functionalRef = node); componentDidMount() { this.setState({ isMounted: true }); } render() { const { isMounted } = this.state; return ( <Grid columns={2}> <Segment> <Flex gap="gap.smaller"> <Ref innerRef={this.handleRef}> <Button primary>With functional ref</Button> </Ref> <Ref innerRef={this.createdRef}> <Button> With <code>createRef()</code> </Button> </Ref> </Flex> </Segment> {isMounted && ( <code style={{ margin: 10 }}> <pre> {JSON.stringify( { nodeName: this.functionalRef.nodeName, nodeType: this.functionalRef.nodeType, textContent: this.functionalRef.textContent, }, null, 2, )} </pre> <pre> {JSON.stringify( { nodeName: this.createdRef.current.nodeName, nodeType: this.createdRef.current.nodeType, textContent: this.createdRef.current.textContent, }, null, 2, )} </pre> </code> )} </Grid> ); } } export default RefExample; ```
/content/code_sandbox/packages/fluentui/docs/src/examples/components/Ref/Types/RefExample.shorthand.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
362
```xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <modelVersion>4.0.0</modelVersion> <groupId>com.didispace</groupId> <artifactId>eureka-feign-upload-server</artifactId> <version>1.0.0</version> <packaging>jar</packaging> <name>eureka-feign-upload-server</name> <description>Spring Cloud In Action</description> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.6.RELEASE</version> <relativePath/> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>1.8</java.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-eureka</artifactId> </dependency> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-feign</artifactId> </dependency> </dependencies> <dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>Dalston.SR2</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project> ```
/content/code_sandbox/2-Dalston版教程示例/eureka-feign-upload-server/pom.xml
xml
2016-08-21T03:39:52
2024-08-13T15:13:21
SpringCloud-Learning
dyc87112/SpringCloud-Learning
7,344
483
```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="checked|x64"> <Configuration>checked</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="profile|x64"> <Configuration>profile</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="release|x64"> <Configuration>release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{F5284425-F024-74C4-808B-7EF11F900C36}</ProjectGuid> <RootNamespace>SnippetContactReportCCD</RootNamespace> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <PlatformToolset>v141</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='checked|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <PlatformToolset>v141</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='profile|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <PlatformToolset>v141</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <PlatformToolset>v141</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='debug|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)'=='checked|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)'=='profile|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>./../../../bin/vc15win64\</OutDir> <IntDir>./x64/SnippetContactReportCCD/debug\</IntDir> <TargetExt>.exe</TargetExt> <TargetName>$(ProjectName)DEBUG</TargetName> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules /> <CodeAnalysisRuleAssemblies /> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <BufferSecurityCheck>false</BufferSecurityCheck> <FloatingPointModel>Fast</FloatingPointModel> <BasicRuntimeChecks>UninitializedLocalUsageCheck</BasicRuntimeChecks> <AdditionalOptions>/GR- /GF /MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /wd4577 /wd4464 /wd4623 /wd4626 /wd5027 /wd4987 /wd5038 /wd5045 /wd4548 /wd4350 /wd4668 /wd4365 /wd4548 /wd4625 /wd5026 /Zi /d2Zi+</AdditionalOptions> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>./../../../Include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../Graphics/include/win32/GL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_HAS_EXCEPTIONS=0;WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PHYSX_PROFILE_SDK;RENDER_SNIPPET;_DEBUG;PX_DEBUG=1;PX_CHECKED=1;PX_NVTX=1;PX_SUPPORT_PVD=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>false</ExceptionHandling> <WarningLevel>Level4</WarningLevel> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeaderFile></PrecompiledHeaderFile> <ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> <AdditionalOptions>/LIBPATH:../../../Lib/vc15win64 PhysX3CommonDEBUG_x64.lib PhysX3DEBUG_x64.lib PhysX3CookingDEBUG_x64.lib PhysX3CharacterKinematicDEBUG_x64.lib PhysX3ExtensionsDEBUG.lib PhysX3VehicleDEBUG.lib PxTaskDEBUG_x64.lib PxFoundationDEBUG_x64.lib PsFastXmlDEBUG_x64.lib PxPvdSDKDEBUG_x64.lib /LIBPATH:../../lib/vc15win64 SnippetUtilsDEBUG.lib /DEBUG</AdditionalOptions> <AdditionalDependencies>Winmm.lib;OpenGL32.lib;glut32.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(ProjectName)DEBUG.exe</OutputFile> <AdditionalLibraryDirectories>./../../../Common/lib/vc15win64;./../../lib/vc15win64;./../../../../PxShared/lib/vc15win64;./../../Graphics/lib/win64/glut;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile> <SubSystem>Console</SubSystem> <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> <GenerateDebugInformation>true</GenerateDebugInformation> <TargetMachine>MachineX64</TargetMachine> </Link> <ResourceCompile> </ResourceCompile> <ProjectReference> </ProjectReference> <PostBuildEvent> <Command>XCOPY "../../../../PxShared/bin\vc15win64\PxFoundationDEBUG_x64.dll" "$(OutDir)" /D /Y&#x0D;&#x0A; XCOPY "../../../../PxShared/bin\vc15win64\PxPvdSDKDEBUG_x64.dll" "$(OutDir)" /D /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='checked|x64'"> <OutDir>./../../../bin/vc15win64\</OutDir> <IntDir>./x64/SnippetContactReportCCD/checked\</IntDir> <TargetExt>.exe</TargetExt> <TargetName>$(ProjectName)CHECKED</TargetName> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules /> <CodeAnalysisRuleAssemblies /> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='checked|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <BufferSecurityCheck>false</BufferSecurityCheck> <FloatingPointModel>Fast</FloatingPointModel> <AdditionalOptions>/GR- /GF /MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /wd4577 /wd4464 /wd4623 /wd4626 /wd5027 /wd4987 /wd5038 /wd5045 /wd4548 /wd4350 /wd4668 /wd4365 /wd4548 /wd4625 /wd5026 /d2Zi+</AdditionalOptions> <Optimization>Full</Optimization> <AdditionalIncludeDirectories>./../../../Include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../Graphics/include/win32/GL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_HAS_EXCEPTIONS=0;WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PHYSX_PROFILE_SDK;RENDER_SNIPPET;NDEBUG;PX_CHECKED=1;PX_NVTX=1;PX_SUPPORT_PVD=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>false</ExceptionHandling> <WarningLevel>Level4</WarningLevel> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeaderFile></PrecompiledHeaderFile> <ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> <AdditionalOptions>/LIBPATH:../../../Lib/vc15win64 PhysX3CommonCHECKED_x64.lib PhysX3CHECKED_x64.lib PhysX3CookingCHECKED_x64.lib PhysX3CharacterKinematicCHECKED_x64.lib PhysX3ExtensionsCHECKED.lib PhysX3VehicleCHECKED.lib PxTaskCHECKED_x64.lib PxFoundationCHECKED_x64.lib PsFastXmlCHECKED_x64.lib PxPvdSDKCHECKED_x64.lib /LIBPATH:../../lib/vc15win64 SnippetUtilsCHECKED.lib</AdditionalOptions> <AdditionalDependencies>Winmm.lib;OpenGL32.lib;glut32.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(ProjectName)CHECKED.exe</OutputFile> <AdditionalLibraryDirectories>./../../../Common/lib/vc15win64;./../../lib/vc15win64;./../../../../PxShared/lib/vc15win64;./../../Graphics/lib/win64/glut;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile> <SubSystem>Console</SubSystem> <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> <GenerateDebugInformation>true</GenerateDebugInformation> <TargetMachine>MachineX64</TargetMachine> </Link> <ResourceCompile> </ResourceCompile> <ProjectReference> </ProjectReference> <PostBuildEvent> <Command>XCOPY "../../../../PxShared/bin\vc15win64\PxFoundationCHECKED_x64.dll" "$(OutDir)" /D /Y&#x0D;&#x0A; XCOPY "../../../../PxShared/bin\vc15win64\PxPvdSDKCHECKED_x64.dll" "$(OutDir)" /D /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='profile|x64'"> <OutDir>./../../../bin/vc15win64\</OutDir> <IntDir>./x64/SnippetContactReportCCD/profile\</IntDir> <TargetExt>.exe</TargetExt> <TargetName>$(ProjectName)PROFILE</TargetName> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules /> <CodeAnalysisRuleAssemblies /> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='profile|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <BufferSecurityCheck>false</BufferSecurityCheck> <FloatingPointModel>Fast</FloatingPointModel> <AdditionalOptions>/GR- /GF /MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /wd4577 /wd4464 /wd4623 /wd4626 /wd5027 /wd4987 /wd5038 /wd5045 /wd4548 /wd4350 /wd4668 /wd4365 /wd4548 /wd4625 /wd5026 /d2Zi+</AdditionalOptions> <Optimization>Full</Optimization> <AdditionalIncludeDirectories>./../../../Include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../Graphics/include/win32/GL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_HAS_EXCEPTIONS=0;WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PHYSX_PROFILE_SDK;RENDER_SNIPPET;NDEBUG;PX_PROFILE=1;PX_NVTX=1;PX_SUPPORT_PVD=1;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>false</ExceptionHandling> <WarningLevel>Level4</WarningLevel> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeaderFile></PrecompiledHeaderFile> <ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> <AdditionalOptions>/INCREMENTAL:NO /LIBPATH:../../../Lib/vc15win64 PhysX3CommonPROFILE_x64.lib PhysX3PROFILE_x64.lib PhysX3CookingPROFILE_x64.lib PhysX3CharacterKinematicPROFILE_x64.lib PhysX3ExtensionsPROFILE.lib PhysX3VehiclePROFILE.lib PxTaskPROFILE_x64.lib PxFoundationPROFILE_x64.lib PsFastXmlPROFILE_x64.lib PxPvdSDKPROFILE_x64.lib /LIBPATH:../../lib/vc15win64 SnippetUtilsPROFILE.lib /DEBUG</AdditionalOptions> <AdditionalDependencies>Winmm.lib;OpenGL32.lib;glut32.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(ProjectName)PROFILE.exe</OutputFile> <AdditionalLibraryDirectories>./../../../Common/lib/vc15win64;./../../lib/vc15win64;./../../../../PxShared/lib/vc15win64;./../../Graphics/lib/win64/glut;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile> <SubSystem>Console</SubSystem> <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> <GenerateDebugInformation>true</GenerateDebugInformation> <TargetMachine>MachineX64</TargetMachine> </Link> <ResourceCompile> </ResourceCompile> <ProjectReference> </ProjectReference> <PostBuildEvent> <Command>XCOPY "../../../../PxShared/bin\vc15win64\PxFoundationPROFILE_x64.dll" "$(OutDir)" /D /Y&#x0D;&#x0A; XCOPY "../../../../PxShared/bin\vc15win64\PxPvdSDKPROFILE_x64.dll" "$(OutDir)" /D /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'"> <OutDir>./../../../bin/vc15win64\</OutDir> <IntDir>./x64/SnippetContactReportCCD/release\</IntDir> <TargetExt>.exe</TargetExt> <TargetName>$(ProjectName)</TargetName> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules /> <CodeAnalysisRuleAssemblies /> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'"> <ClCompile> <TreatWarningAsError>true</TreatWarningAsError> <BufferSecurityCheck>false</BufferSecurityCheck> <FloatingPointModel>Fast</FloatingPointModel> <AdditionalOptions>/GR- /GF /MP /Wall /wd4514 /wd4820 /wd4127 /wd4710 /wd4711 /wd4435 /wd4577 /wd4464 /wd4623 /wd4626 /wd5027 /wd4987 /wd5038 /wd5045 /wd4548 /wd4350 /wd4668 /wd4365 /wd4548 /wd4625 /wd5026 /d2Zi+</AdditionalOptions> <Optimization>Full</Optimization> <AdditionalIncludeDirectories>./../../../Include;./../../../../PxShared/include;./../../../../PxShared/src/foundation/include;./../../../../PxShared/src/fastxml/include;./../../Graphics/include/win32/GL;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_HAS_EXCEPTIONS=0;WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;PHYSX_PROFILE_SDK;RENDER_SNIPPET;NDEBUG;PX_SUPPORT_PVD=0;%(PreprocessorDefinitions)</PreprocessorDefinitions> <ExceptionHandling>false</ExceptionHandling> <WarningLevel>Level4</WarningLevel> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <PrecompiledHeader>NotUsing</PrecompiledHeader> <PrecompiledHeaderFile></PrecompiledHeaderFile> <ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> <AdditionalOptions>/INCREMENTAL:NO /LIBPATH:../../../Lib/vc15win64 PhysX3Common_x64.lib PhysX3_x64.lib PhysX3Cooking_x64.lib PhysX3CharacterKinematic_x64.lib PhysX3Extensions.lib PhysX3Vehicle.lib PxTask_x64.lib PxFoundation_x64.lib PsFastXml_x64.lib PxPvdSDK_x64.lib /LIBPATH:../../lib/vc15win64 SnippetUtils.lib</AdditionalOptions> <AdditionalDependencies>Winmm.lib;OpenGL32.lib;glut32.lib;%(AdditionalDependencies)</AdditionalDependencies> <OutputFile>$(OutDir)$(ProjectName).exe</OutputFile> <AdditionalLibraryDirectories>./../../../Common/lib/vc15win64;./../../lib/vc15win64;./../../../../PxShared/lib/vc15win64;./../../Graphics/lib/win64/glut;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile> <SubSystem>Console</SubSystem> <ImportLibrary>$(OutDir)$(TargetName).lib</ImportLibrary> <GenerateDebugInformation>true</GenerateDebugInformation> <TargetMachine>MachineX64</TargetMachine> </Link> <ResourceCompile> </ResourceCompile> <ProjectReference> </ProjectReference> <PostBuildEvent> <Command>XCOPY "../../../../PxShared/bin\vc15win64\PxFoundation_x64.dll" "$(OutDir)" /D /Y&#x0D;&#x0A; XCOPY "../../../../PxShared/bin\vc15win64\PxPvdSDK_x64.dll" "$(OutDir)" /D /Y</Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\..\SnippetCommon\ClassicMain.cpp"> </ClCompile> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\SnippetContactReportCCD\SnippetContactReportCCD.cpp"> </ClCompile> <ClCompile Include="..\..\SnippetContactReportCCD\SnippetContactReportCCDRender.cpp"> </ClCompile> </ItemGroup> <ItemGroup> <ProjectReference Include="./SnippetUtils.vcxproj"> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> </ItemGroup> <ItemGroup> <ProjectReference Include="./SnippetRender.vcxproj"> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"></ImportGroup> </Project> ```
/content/code_sandbox/PhysX_3.4/Snippets/compiler/vc15win64/SnippetContactReportCCD.vcxproj
xml
2016-10-12T16:34:31
2024-08-16T09:40:38
PhysX-3.4
NVIDIAGameWorks/PhysX-3.4
2,343
4,858
```xml /** * @jest-environment @edge-runtime/jest-environment */ import { NextResponse } from 'next/dist/server/web/spec-extension/response' const toJSON = async (response: Response) => ({ body: await response.json(), contentType: response.headers.get('content-type'), status: response.status, }) it('automatically parses and formats JSON', async () => { expect(await toJSON(NextResponse.json({ message: 'hello!' }))).toMatchObject({ contentType: 'application/json', body: { message: 'hello!' }, }) expect( await toJSON(NextResponse.json({ status: 'success' }, { status: 201 })) ).toMatchObject({ contentType: 'application/json', body: { status: 'success' }, status: 201, }) expect( await toJSON( NextResponse.json({ error: { code: 'bad_request' } }, { status: 400 }) ) ).toMatchObject({ contentType: 'application/json', body: { error: { code: 'bad_request' } }, status: 400, }) expect(await toJSON(NextResponse.json(null))).toMatchObject({ contentType: 'application/json', body: null, }) expect(await toJSON(NextResponse.json(''))).toMatchObject({ contentType: 'application/json', body: '', }) }) it('can be cloned', async () => { const fetchResponse = await fetch('path_to_url const newResponse = new NextResponse(fetchResponse.body, fetchResponse) expect(await newResponse.text()).toContain('Example Domain') expect(Object.fromEntries(newResponse.headers)).toMatchObject({ server: 'Vercel', }) }) it('can return JSON', async () => { const response = NextResponse.json({ hello: 'world' }) expect(await response.json()).toEqual({ hello: 'world' }) }) ```
/content/code_sandbox/test/unit/web-runtime/next-response.test.ts
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
402
```xml import React from 'react'; import BrowserOnly from '@docusaurus/BrowserOnly'; import {Tabs, Tab} from './tabs'; import {useStore} from '../store/device-store'; interface DeviceTabsProps { devices?: ('webgl2' | 'webgpu')[]; } const DEFAULT_DEVICE_TABS_PROPS: Required<DeviceTabsProps> = { devices: ['webgl2', 'webgpu'] }; export const DeviceTabsPriv = (props?: DeviceTabsProps) => { props = {...DEFAULT_DEVICE_TABS_PROPS, ...props}; const deviceType = useStore(state => state.deviceType); const deviceError = useStore(state => state.deviceError); const setDeviceType = useStore(state => state.setDeviceType); return ( <Tabs selectedItem={deviceType} setSelectedItem={setDeviceType}> {props.devices.includes('webgl2') && ( <Tab key="WebGL2" title="WebGL2" tag="webgl"> {/* <img height="80" src="path_to_url" />*/} {deviceError} </Tab> )} {props.devices.includes('webgpu') && ( <Tab key="WebGPU" title="WebGPU" tag="webgpu"> {/* <img height="80" src="path_to_url" /> */} {deviceError} </Tab> )} </Tabs> ); }; export const DeviceTabs = (props?: DeviceTabsProps) => ( <BrowserOnly>{() => <DeviceTabsPriv {...props} />}</BrowserOnly> ); ```
/content/code_sandbox/website/src/react-luma/components/device-tabs.tsx
xml
2016-01-25T09:41:59
2024-08-16T10:03:05
luma.gl
visgl/luma.gl
2,280
333
```xml import * as React from 'react'; import { styled } from '../../Utilities'; import { DetailsColumnBase } from './DetailsColumn.base'; import { getDetailsColumnStyles } from './DetailsColumn.styles'; import type { IDetailsColumnProps, IDetailsColumnStyleProps, IDetailsColumnStyles } from './DetailsColumn.types'; export const DetailsColumn: React.FunctionComponent<IDetailsColumnProps> = styled< IDetailsColumnProps, IDetailsColumnStyleProps, IDetailsColumnStyles >(DetailsColumnBase, getDetailsColumnStyles, undefined, { scope: 'DetailsColumn' }); export type { IDetailsColumnProps }; ```
/content/code_sandbox/packages/react/src/components/DetailsList/DetailsColumn.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
130
```xml import { EntitySchema } from "../../../../src" import Post from "./Post" let id = 0 export default class PostAttachment { postPostId: number postOtherId: number attachmentId: number post: Post constructor() { this.attachmentId = id++ } } export const PostAttachmentSchema = new EntitySchema<PostAttachment>({ name: "PostAttachment", target: PostAttachment, columns: { postPostId: { type: Number, primary: true, nullable: false, }, postOtherId: { type: Number, primary: true, nullable: false, }, attachmentId: { type: Number, primary: true, nullable: false, }, }, relations: { post: { nullable: false, target: () => Post, type: "many-to-one", }, }, }) ```
/content/code_sandbox/test/github-issues/6416/entity/PostAttachment.ts
xml
2016-02-29T07:41:14
2024-08-16T18:28:52
typeorm
typeorm/typeorm
33,875
199
```xml import { scrypt as _nobleSync, scryptAsync as _nobleAsync } from "@noble/hashes/scrypt"; import { getBytes, hexlify as H } from "../utils/index.js"; import type { BytesLike } from "../utils/index.js"; /** * A callback during long-running operations to update any * UI or provide programatic access to the progress. * * The %%percent%% is a value between ``0`` and ``1``. * * @_docloc: api/crypto:Passwords */ export type ProgressCallback = (percent: number) => void; let lockedSync = false, lockedAsync = false; const _scryptAsync = async function(passwd: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number, onProgress?: ProgressCallback) { return await _nobleAsync(passwd, salt, { N, r, p, dkLen, onProgress }); } const _scryptSync = function(passwd: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number) { return _nobleSync(passwd, salt, { N, r, p, dkLen }); } let __scryptAsync: (passwd: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number, onProgress?: ProgressCallback) => Promise<BytesLike> = _scryptAsync; let __scryptSync: (passwd: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number) => BytesLike = _scryptSync /** * The [[link-wiki-scrypt]] uses a memory and cpu hard method of * derivation to increase the resource cost to brute-force a password * for a given key. * * This means this algorithm is intentionally slow, and can be tuned to * become slower. As computation and memory speed improve over time, * increasing the difficulty maintains the cost of an attacker. * * For example, if a target time of 5 seconds is used, a legitimate user * which knows their password requires only 5 seconds to unlock their * account. A 6 character password has 68 billion possibilities, which * would require an attacker to invest over 10,000 years of CPU time. This * is of course a crude example (as password generally aren't random), * but demonstrates to value of imposing large costs to decryption. * * For this reason, if building a UI which involved decrypting or * encrypting datsa using scrypt, it is recommended to use a * [[ProgressCallback]] (as event short periods can seem lik an eternity * if the UI freezes). Including the phrase //"decrypting"// in the UI * can also help, assuring the user their waiting is for a good reason. * * @_docloc: api/crypto:Passwords * * @example: * // The password must be converted to bytes, and it is generally * // best practices to ensure the string has been normalized. Many * // formats explicitly indicate the normalization form to use. * password = "hello" * passwordBytes = toUtf8Bytes(password, "NFKC") * * salt = id("some-salt") * * // Compute the scrypt * scrypt(passwordBytes, salt, 1024, 8, 1, 16) * //_result: */ export async function scrypt(_passwd: BytesLike, _salt: BytesLike, N: number, r: number, p: number, dkLen: number, progress?: ProgressCallback): Promise<string> { const passwd = getBytes(_passwd, "passwd"); const salt = getBytes(_salt, "salt"); return H(await __scryptAsync(passwd, salt, N, r, p, dkLen, progress)); } scrypt._ = _scryptAsync; scrypt.lock = function(): void { lockedAsync = true; } scrypt.register = function(func: (passwd: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number, progress?: ProgressCallback) => Promise<BytesLike>) { if (lockedAsync) { throw new Error("scrypt is locked"); } __scryptAsync = func; } Object.freeze(scrypt); /** * Provides a synchronous variant of [[scrypt]]. * * This will completely lock up and freeze the UI in a browser and will * prevent any event loop from progressing. For this reason, it is * preferred to use the [async variant](scrypt). * * @_docloc: api/crypto:Passwords * * @example: * // The password must be converted to bytes, and it is generally * // best practices to ensure the string has been normalized. Many * // formats explicitly indicate the normalization form to use. * password = "hello" * passwordBytes = toUtf8Bytes(password, "NFKC") * * salt = id("some-salt") * * // Compute the scrypt * scryptSync(passwordBytes, salt, 1024, 8, 1, 16) * //_result: */ export function scryptSync(_passwd: BytesLike, _salt: BytesLike, N: number, r: number, p: number, dkLen: number): string { const passwd = getBytes(_passwd, "passwd"); const salt = getBytes(_salt, "salt"); return H(__scryptSync(passwd, salt, N, r, p, dkLen)); } scryptSync._ = _scryptSync; scryptSync.lock = function(): void { lockedSync = true; } scryptSync.register = function(func: (passwd: Uint8Array, salt: Uint8Array, N: number, r: number, p: number, dkLen: number) => BytesLike) { if (lockedSync) { throw new Error("scryptSync is locked"); } __scryptSync = func; } Object.freeze(scryptSync); ```
/content/code_sandbox/src.ts/crypto/scrypt.ts
xml
2016-07-16T04:35:37
2024-08-16T13:37:46
ethers.js
ethers-io/ethers.js
7,843
1,346
```xml import React, { CSSProperties, ReactElement, useRef, useState } from 'react'; import { ContentState, EditorState } from 'draft-js'; import Editor from '@draft-js-plugins/editor'; import createMentionPlugin, { defaultSuggestionsFilter, } from '@draft-js-plugins/mention'; import editorStyles from './editorStyles.css'; import mentionsStyles from './mentionsStyles.css'; import mentions from './mentions'; const positionSuggestions = ({ props }): CSSProperties => { let transform; let transition; if (props.open) { if (props.suggestions.length > 0) { transform = 'scaleY(1)'; transition = 'all 0.25s cubic-bezier(.3,1.2,.2,1)'; } else { transform = 'scaleY(0)'; transition = 'all 0.25s cubic-bezier(.3,1,.2,1)'; } } return { transform, transition, }; }; const mentionPlugin = createMentionPlugin({ mentions, entityMutability: 'IMMUTABLE', theme: mentionsStyles, positionSuggestions, mentionPrefix: '@', supportWhitespace: true, }); const { MentionSuggestions } = mentionPlugin; const plugins = [mentionPlugin]; const Entry = (props): ReactElement => { const { mention, theme, isFocused, // eslint-disable-line @typescript-eslint/no-unused-vars searchValue, // eslint-disable-line @typescript-eslint/no-unused-vars ...parentProps } = props; return ( <div {...parentProps}> <div className={theme.mentionSuggestionsEntryContainer}> <div className={theme.mentionSuggestionsEntryContainerLeft}> <img src={mention.avatar} className={theme.mentionSuggestionsEntryAvatar} role="presentation" /> </div> <div className={theme.mentionSuggestionsEntryContainerRight}> <div className={theme.mentionSuggestionsEntryText}> {mention.name} </div> <div className={theme.mentionSuggestionsEntryTitle}> {mention.title} </div> </div> </div> </div> ); }; const CustomMentionEditor = (): ReactElement => { const [editorState, setEditorState] = useState( EditorState.createWithContent( ContentState.createFromText( 'Type a "@first last" name, mispelling the last name will drop the match' ) ) ); const editor = useRef(); const [open, setOpen] = useState(false); const [suggestions, setSuggestions] = useState(mentions); const onChange = (value): void => { setEditorState(value); }; const focus = (): void => { editor.current.focus(); }; const onOpenChange = (newOpen): void => { setOpen(newOpen); }; const onSearchChange = ({ value }): void => { setSuggestions(defaultSuggestionsFilter(value, mentions)); }; return ( <div className={editorStyles.editor} onClick={focus}> <Editor editorState={editorState} onChange={onChange} plugins={plugins} ref={(element) => { editor.current = element; }} /> <MentionSuggestions open={open} onOpenChange={onOpenChange} onSearchChange={onSearchChange} suggestions={suggestions} entryComponent={Entry} /> </div> ); }; export default CustomMentionEditor; ```
/content/code_sandbox/stories/mentions-with-whitespace/src/MentionEditorWithWhitespaceSupport.tsx
xml
2016-02-26T09:54:56
2024-08-16T18:16:31
draft-js-plugins
draft-js-plugins/draft-js-plugins
4,087
748
```xml import { IGitHubService, IGitHubContributor, IAuthorCommit } from "./IGitHubService.types"; import { HttpClient, HttpClientResponse } from '@microsoft/sp-http'; export class GitHubService implements IGitHubService { /** * Gets a list of github commits in a repo for a single contributor * @param client the HttpClient object that will make the call * @param repoOwner the repo owner (i.e.: the first slash after github.com. E.g.: path_to_url = sharepoint) * @param repo the repo name (i.e.: the second slash after github.com. E.g.: path_to_url = sp-dev-docs) * @param alias the GitHub contributor alias. e.g.: hugoabernier * * NOTE: GitHub only allows a certain number of API calls without authentication. If you plan on using this * more extensively, you may want to add authentication, by adding an Http headers: * "cache-control": "no-cache") -- no necessary, but useful * "Authorization" "token f11111f1100bb1ec1111ad11c1111ed1d1a1111a"); */ public getCommits(client: HttpClient, repoOwner: string, repo: string, alias: string): Promise<IAuthorCommit[]> { const requestUrl: string = `path_to_url{repoOwner}/${repo}/commits?author=${alias}`; // call the GitHub API return client.fetch(requestUrl, HttpClient.configurations.v1, {}).then((response: HttpClientResponse) => response.json()) .then((commits: IAuthorCommit[]): IAuthorCommit[] => { return commits; }); } /** * Gets a list of contributors in a repo * @param client the HttpClient * @param repoOwner the repo owner (i.e.: the first slash after github.com. E.g.: path_to_url = sharepoint) * @param repo the repo name (i.e.: the second slash after github.com. E.g.: path_to_url = sp-dev-docs) * * See above notes regarding daily limits on GitHub API */ public getContributors(client: HttpClient, repoOwner: string, repo: string): Promise<IGitHubContributor[]> { // note that for simplicity, we don't escape strings or verify that they are valid. const requestUrl: string = `path_to_url{repoOwner}/${repo}/contributors`; // call the GitHub API return client.fetch(requestUrl, HttpClient.configurations.v1, {}).then((response: HttpClientResponse) => response.json()) .then((contributors: IGitHubContributor[]): IGitHubContributor[] => { return contributors; }); } } ```
/content/code_sandbox/samples/react-chartcontrol/src/services/GitHubService/GitHubService.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
595
```xml export * from './wrapSchema.js'; export { defaultCreateProxyingResolver, generateProxyingResolvers, } from './generateProxyingResolvers.js'; export * from './transforms/index.js'; export * from './types.js'; export * from './introspect.js'; ```
/content/code_sandbox/packages/wrap/src/index.ts
xml
2016-03-22T00:14:38
2024-08-16T02:02:06
graphql-tools
ardatan/graphql-tools
5,331
58
```xml export type XMLValue = boolean | number | string | null | XMLArray | XMLObject; export interface XMLArray extends Array<XMLValue> { } export interface XMLObject { [key: string]: XMLValue | undefined; } export declare function writeXMLAsync(options: { path: string; xml: any; }): Promise<void>; export declare function readXMLAsync(options: { path: string; fallback?: string | null; }): Promise<XMLObject>; export declare function _processAndroidXML(manifest: any): XMLObject; export declare function parseXMLAsync(contents: string): Promise<XMLObject>; export declare function format(manifest: any, { indentLevel, newline }?: { indentLevel?: number | undefined; newline?: string | undefined; }): string; /** * Escapes Android string literals, specifically characters `"`, `'`, `\`, `\n`, `\r`, `\t` * * @param value unescaped Android XML string literal. */ export declare function escapeAndroidString(value: string): string; export declare function unescapeAndroidString(value: string): string; ```
/content/code_sandbox/packages/@expo/config-plugins/build/utils/XML.d.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
227
```xml import { Column, Entity, PrimaryGeneratedColumn } from "../../../../../../src" @Entity() export class Post { @PrimaryGeneratedColumn() id: number @Column() title: string @Column() useTitle: boolean @Column() firstName: string @Column() lastName: string @Column({ asExpression: `"firstName" || ' ' || "lastName"`, }) virtualFullName: string @Column({ asExpression: `"firstName" || ' ' || "lastName"`, generatedType: "STORED", }) storedFullName: string @Column({ asExpression: `"firstName" || "lastName"`, generatedType: "STORED", }) name: string } ```
/content/code_sandbox/test/functional/database-schema/generated-columns/sqlite/entity/Post.ts
xml
2016-02-29T07:41:14
2024-08-16T18:28:52
typeorm
typeorm/typeorm
33,875
164
```xml import * as fs from "fs" import * as prettier from "prettier" const mapLines = (s: string, func: (s: string) => string) => s.split("\n").map(func).join("\n") const createDTS = () => { const header = `// // Autogenerated from scripts/danger-dts.ts // import { Octokit as GitHub } from "@octokit/rest" import type * as Types from "@gitbeaker/rest" import { File } from "parse-diff" ` const footer = `` let fileOutput = "" const dslFiles = fs .readdirSync("source/dsl") .filter((f) => !f.startsWith("_tests")) .map((f) => `source/dsl/${f}`) dslFiles.forEach((file) => { // Sometimes they have more stuff, in those cases // offer a way to crop the file. const content = fs.readFileSync(file).toString() if (content.includes("/// End of Danger DSL definition")) { fileOutput += content.split("/// End of Danger DSL definition")[0] } else { fileOutput += content } fileOutput += "\n" }) // The definition of all the exposed vars is inside // the Dangerfile.js file. const allDangerfile = fs.readFileSync("source/runner/Dangerfile.ts").toString() const moduleContext = allDangerfile .split("/// Start of Danger DSL definition")[1] .split("/// End of Danger DSL definition")[0] // we need to add either `declare function` or `declare var` to the interface const context = mapLines(moduleContext, (line: string) => { if (line.length === 0 || line.includes("*")) { const newLine = line.trim() // Make sure TSLint passes if (newLine.startsWith("*")) { return " " + newLine } return newLine } if (line.includes("export type")) { return line } if (line.includes("(")) { return "declare function " + line.trim() } if (line.includes(":")) { return "declare const " + line.trim() } return "" }) fileOutput += context const chainDefs = fs.readFileSync("distribution/commands/utils/chainsmoker.d.ts", "utf8") const chainDefsMinusDefaultExport = chainDefs .split("\n") .filter((line) => { return !line.startsWith("export default function") }) .join("\n") fileOutput += chainDefsMinusDefaultExport // Remove all JS-y bits fileOutput = fileOutput .split("\n") .filter((line) => { return !line.startsWith("import") && !line.includes("* @type ") }) .filter((line) => { return !line.includes("Please don't have") }) .join("\n") const trimmedWhitespaceLines = fileOutput.replace(/\n\s*\n\s*\n/g, "\n") const noRedundantExports = trimmedWhitespaceLines .replace(/export interface/g, "interface") .replace(/export type/g, "type") const indentedBody = mapLines(noRedundantExports, (line) => (line.length ? line : "")) const def = header + indentedBody + footer return prettier.format(def, { parser: "typescript", printWidth: 120, semi: false, singleQuote: false, trailingComma: "es5", bracketSpacing: true, proseWrap: "always", }) } export default createDTS ```
/content/code_sandbox/scripts/danger-dts.ts
xml
2016-08-20T12:57:06
2024-08-13T14:00:02
danger-js
danger/danger-js
5,229
806
```xml declare /* module */ namespace A {} ```
/content/code_sandbox/tests/format/typescript/conformance/types/moduleDeclaration/kind-detection.ts
xml
2016-11-29T17:13:37
2024-08-16T17:29:57
prettier
prettier/prettier
48,913
8
```xml function removeHtmlTags(input: string): string { let previous; do { previous = input; input = input.replace(/<[^>]*>?/gm, ''); } while (input !== previous); return input; } export function cleanDescription(description: string): string { let output = description; // remove html tags from description (e.g. <h1...>) output = removeHtmlTags(output); // remove markdown links from description (e.g. [link](url)) output = output.replace(/\(.*?\)/gm, '').replace(/(\[!?|\])/gm, ''); return output; } ```
/content/code_sandbox/packages/ui-components/src/components/Search/utils.ts
xml
2016-04-15T16:21:12
2024-08-16T09:38:01
verdaccio
verdaccio/verdaccio
16,189
135
```xml import type { Comment } from "../../interfaces"; import distanceToNow from "../../lib/dateRelative"; import { useAuth0 } from "@auth0/auth0-react"; type CommentListProps = { comments?: Comment[]; onDelete: (comment: Comment) => Promise<void>; }; export default function CommentList({ comments, onDelete }: CommentListProps) { const { user } = useAuth0(); return ( <div className="space-y-6 mt-10"> {comments && comments.map((comment) => { const isAuthor = user && user.sub === comment.user.sub; const isAdmin = user && user.email === process.env.NEXT_PUBLIC_AUTH0_ADMIN_EMAIL; return ( <div key={comment.created_at} className="flex space-x-4"> <div className="flex-shrink-0"> <img src={comment.user.picture} alt={comment.user.name} width={40} height={40} className="rounded-full" /> </div> <div className="flex-grow"> <div className="flex space-x-2"> <b>{comment.user.name}</b> <time className="text-gray-400"> {distanceToNow(comment.created_at)} </time> {(isAdmin || isAuthor) && ( <button className="text-gray-400 hover:text-red-500" onClick={() => onDelete(comment)} aria-label="Close" > x </button> )} </div> <div>{comment.text}</div> </div> </div> ); })} </div> ); } ```
/content/code_sandbox/examples/blog-with-comment/components/comment/list.tsx
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
350
```xml import { Component, EventEmitter, Input, OnDestroy, OnInit, Output, ViewChild, } from '@angular/core'; import { ConfigurationService } from '../../../../services/config.service'; import { Robot } from '../../../../../../ng-swagger-gen/models/robot'; import { ListAllProjectsComponent } from '../list-all-projects/list-all-projects.component'; import { NgForm } from '@angular/forms'; import { debounceTime, distinctUntilChanged, filter, finalize, map, switchMap, } from 'rxjs/operators'; import { ExpirationType, getSystemAccess, NAMESPACE_ALL_PROJECTS, NAMESPACE_SYSTEM, NEW_EMPTY_ROBOT, onlyHasPushPermission, PermissionsKinds, } from '../system-robot-util'; import { clone, isSameArrayValue, isSameObject, } from '../../../../shared/units/utils'; import { RobotService } from '../../../../../../ng-swagger-gen/services/robot.service'; import { ClrLoadingState, ClrWizard } from '@clr/angular'; import { MessageHandlerService } from '../../../../shared/services/message-handler.service'; import { Subject, Subscription } from 'rxjs'; import { operateChanges, OperateInfo, OperationState, } from '../../../../shared/components/operation/operate'; import { OperationService } from '../../../../shared/components/operation/operation.service'; import { InlineAlertComponent } from '../../../../shared/components/inline-alert/inline-alert.component'; import { errorHandler } from '../../../../shared/units/shared.utils'; import { RobotPermission } from '../../../../../../ng-swagger-gen/models/robot-permission'; import { PermissionSelectPanelModes } from '../../../../shared/components/robot-permissions-panel/robot-permissions-panel.component'; import { Permissions } from '../../../../../../ng-swagger-gen/models/permissions'; const MINI_SECONDS_ONE_DAY: number = 60 * 24 * 60 * 1000; @Component({ selector: 'new-robot', templateUrl: './new-robot.component.html', styleUrls: ['./new-robot.component.scss'], }) export class NewRobotComponent implements OnInit, OnDestroy { isEditMode: boolean = false; originalRobotForEdit: Robot; @Output() addSuccess: EventEmitter<Robot> = new EventEmitter<Robot>(); addRobotOpened: boolean = false; systemRobot: Robot = clone(NEW_EMPTY_ROBOT); expirationType: string = ExpirationType.DAYS; systemExpirationDays: number; coverAll: boolean = false; coverAllForEdit: boolean = false; isNameExisting: boolean = false; loading: boolean = false; checkNameOnGoing: boolean = false; loadingSystemConfig: boolean = false; @ViewChild(ListAllProjectsComponent) listAllProjectsComponent: ListAllProjectsComponent; @ViewChild(InlineAlertComponent) inlineAlertComponent: InlineAlertComponent; @ViewChild('robotForm', { static: true }) robotForm: NgForm; saveBtnState: ClrLoadingState = ClrLoadingState.DEFAULT; private _nameSubject: Subject<string> = new Subject<string>(); private _nameSubscription: Subscription; @Input() robotMetadata: Permissions; permissionForCoverAll: RobotPermission = { access: [], kind: PermissionsKinds.PROJECT, namespace: NAMESPACE_ALL_PROJECTS, }; permissionForCoverAllForEdit: RobotPermission; permissionForSystem: RobotPermission = { access: [], kind: PermissionsKinds.SYSTEM, namespace: NAMESPACE_SYSTEM, }; permissionForSystemForEdit: RobotPermission; showPage3: boolean = false; @ViewChild('wizard') wizard: ClrWizard; constructor( private configService: ConfigurationService, private robotService: RobotService, private msgHandler: MessageHandlerService, private operationService: OperationService ) {} ngOnInit(): void { this.subscribeName(); } ngOnDestroy() { if (this._nameSubscription) { this._nameSubscription.unsubscribe(); this._nameSubscription = null; } } subscribeName() { if (!this._nameSubscription) { this._nameSubscription = this._nameSubject .pipe( distinctUntilChanged(), filter(name => { if ( this.isEditMode && this.originalRobotForEdit && this.originalRobotForEdit.name === name ) { return false; } return name?.length > 0; }), map(name => { this.checkNameOnGoing = !!name; return name; }), debounceTime(500), switchMap(name => { this.isNameExisting = false; this.checkNameOnGoing = true; return this.robotService .ListRobot({ q: encodeURIComponent(`name=${name}`), }) .pipe( finalize(() => (this.checkNameOnGoing = false)) ); }) ) .subscribe(res => { if (res && res.length > 0) { this.isNameExisting = true; } }); } } isExpirationInvalid(): boolean { return this.systemRobot.duration < -1; } inputExpiration() { if (+this.systemRobot.duration === -1) { this.expirationType = ExpirationType.NEVER; } else { this.expirationType = ExpirationType.DAYS; } } changeExpirationType() { if (this.expirationType === ExpirationType.DEFAULT) { this.systemRobot.duration = this.systemExpirationDays; } if (this.expirationType === ExpirationType.DAYS) { this.systemRobot.duration = this.systemExpirationDays; } if (this.expirationType === ExpirationType.NEVER) { this.systemRobot.duration = -1; } } getSystemRobotExpiration() { this.loadingSystemConfig = true; this.configService .getConfiguration() .pipe(finalize(() => (this.loadingSystemConfig = false))) .subscribe(res => { if ( res && res.robot_token_duration && res.robot_token_duration.value ) { this.systemRobot.duration = res.robot_token_duration.value; this.systemExpirationDays = this.systemRobot.duration; } }); } inputName() { this._nameSubject.next(this.systemRobot.name); } cancel() { this.wizard.reset(); this.reset(); this.addRobotOpened = false; } reset() { this.open(false); this.systemRobot = clone(NEW_EMPTY_ROBOT); this.permissionForCoverAll = { access: [], kind: PermissionsKinds.PROJECT, namespace: NAMESPACE_ALL_PROJECTS, }; this.permissionForSystem = { access: [], kind: PermissionsKinds.SYSTEM, namespace: NAMESPACE_SYSTEM, }; this.coverAll = false; this.showPage3 = false; this.robotForm.reset(); this.expirationType = ExpirationType.DAYS; this.getSystemRobotExpiration(); } resetForEdit(robot: Robot) { this.open(true); this.originalRobotForEdit = clone(robot); this.systemRobot = clone(robot); this.permissionForSystem = { access: getSystemAccess(robot), kind: PermissionsKinds.SYSTEM, namespace: NAMESPACE_SYSTEM, }; this.permissionForSystemForEdit = clone(this.permissionForSystem); this.expirationType = robot.duration === -1 ? ExpirationType.NEVER : ExpirationType.DAYS; if (robot && robot.permissions && robot.permissions.length) { this.coverAll = false; robot.permissions.forEach(item => { if ( item.kind === PermissionsKinds.PROJECT && item.namespace === NAMESPACE_ALL_PROJECTS ) { this.coverAll = true; this.permissionForCoverAll = clone(item); this.permissionForCoverAllForEdit = clone(item); } }); } this.robotForm.reset({ name: this.systemRobot.name, expiration: this.systemRobot.duration, description: this.systemRobot.description, }); this.coverAllForEdit = this.coverAll; } open(isEditMode: boolean) { this.isNameExisting = false; this.isEditMode = isEditMode; this.addRobotOpened = true; this.inlineAlertComponent.close(); this._nameSubject.next(''); } disabled(): boolean { if (!this.isEditMode) { return !this.canAdd(); } return !this.canEdit(); } canAdd(): boolean { if (this.robotForm.invalid) { return false; } if (this.coverAll) { if (!this.permissionForCoverAll.access?.length) { return false; } } else { if ( !this.permissionForSystem?.access?.length && !this.listAllProjectsComponent?.selectedRow?.length ) { return false; } if (this.listAllProjectsComponent?.selectedRow?.length) { for ( let i = 0; i < this.listAllProjectsComponent?.selectedRow?.length; i++ ) { if ( !this.listAllProjectsComponent ?.selectedProjectPermissionMap[ this.listAllProjectsComponent?.selectedRow[i].name ]?.length ) { return false; } } } } return true; } canEdit() { if (!this.canAdd()) { return false; } // eslint-disable-next-line eqeqeq if (this.systemRobot.duration != this.originalRobotForEdit.duration) { return true; } // eslint-disable-next-line eqeqeq if ( this.systemRobot.description != this.originalRobotForEdit.description ) { return true; } if ( !isSameObject( this.permissionForSystem, this.permissionForSystemForEdit ) ) { return true; } if (this.coverAll !== this.coverAllForEdit) { return true; } if (this.coverAll) { if ( !isSameObject( this.permissionForCoverAll, this.permissionForCoverAllForEdit ) ) { return true; } } if (this.listAllProjectsComponent) { if ( !isSameArrayValue( this.listAllProjectsComponent.selectedRow, this.listAllProjectsComponent.selectedRowForEdit ) ) { return true; } else { for ( let i = 0; i < this.listAllProjectsComponent.selectedRow.length; i++ ) { if ( !isSameArrayValue( this.listAllProjectsComponent .selectedProjectPermissionMap[ this.listAllProjectsComponent.selectedRow[i] .name ], this.listAllProjectsComponent .selectedProjectPermissionMapForEdit[ this.listAllProjectsComponent.selectedRow[i] .name ] ) ) { return true; } } } } return false; } save() { const robot: Robot = clone(this.systemRobot); robot.disable = false; robot.level = PermissionsKinds.SYSTEM; robot.duration = +this.systemRobot.duration; robot.permissions = []; if (this.permissionForSystem?.access?.length) { robot.permissions.push(this.permissionForSystem); } if (this.coverAll) { if (this.permissionForCoverAll?.access?.length) { robot.permissions.push(this.permissionForCoverAll); } } else { this.listAllProjectsComponent.selectedRow.forEach(item => { if ( this.listAllProjectsComponent.selectedProjectPermissionMap[ item.name ]?.length ) { robot.permissions.push({ kind: PermissionsKinds.PROJECT, namespace: item.name, access: this.listAllProjectsComponent .selectedProjectPermissionMap[item.name], }); } }); } // Push permission must work with pull permission if (robot.permissions && robot.permissions.length) { for (let i = 0; i < robot.permissions.length; i++) { if (onlyHasPushPermission(robot.permissions[i].access)) { this.inlineAlertComponent.showInlineError( 'SYSTEM_ROBOT.PUSH_PERMISSION_TOOLTIP' ); return; } } } this.saveBtnState = ClrLoadingState.LOADING; if (this.isEditMode) { robot.disable = this.systemRobot.disable; const opeMessage = new OperateInfo(); opeMessage.name = 'SYSTEM_ROBOT.UPDATE_ROBOT'; opeMessage.data.id = robot.id; opeMessage.state = OperationState.progressing; opeMessage.data.name = robot.name; this.operationService.publishInfo(opeMessage); this.robotService .UpdateRobot({ robotId: this.originalRobotForEdit.id, robot, }) .subscribe( res => { this.saveBtnState = ClrLoadingState.SUCCESS; this.addSuccess.emit(null); this.cancel(); operateChanges(opeMessage, OperationState.success); this.msgHandler.showSuccess( 'SYSTEM_ROBOT.UPDATE_ROBOT_SUCCESSFULLY' ); }, error => { this.saveBtnState = ClrLoadingState.ERROR; operateChanges( opeMessage, OperationState.failure, errorHandler(error) ); this.inlineAlertComponent.showInlineError(error); } ); } else { const opeMessage = new OperateInfo(); opeMessage.name = 'SYSTEM_ROBOT.ADD_ROBOT'; opeMessage.data.id = robot.id; opeMessage.state = OperationState.progressing; opeMessage.data.name = robot.name; this.operationService.publishInfo(opeMessage); this.robotService .CreateRobot({ robot: robot, }) .subscribe( res => { this.saveBtnState = ClrLoadingState.SUCCESS; this.addSuccess.emit(res); this.cancel(); operateChanges(opeMessage, OperationState.success); }, error => { this.saveBtnState = ClrLoadingState.ERROR; this.inlineAlertComponent.showInlineError(error); operateChanges( opeMessage, OperationState.failure, errorHandler(error) ); } ); } } calculateExpiresAt(): Date { if ( this.systemRobot && this.systemRobot.creation_time && this.systemRobot.duration > 0 ) { return new Date( new Date(this.systemRobot.creation_time).getTime() + this.systemRobot.duration * MINI_SECONDS_ONE_DAY ); } return null; } shouldShowWarning(): boolean { return new Date() >= this.calculateExpiresAt(); } clrWizardPageOnLoad() { this.inlineAlertComponent.close(); this.showPage3 = true; } protected readonly PermissionSelectPanelModes = PermissionSelectPanelModes; } ```
/content/code_sandbox/src/portal/src/app/base/left-side-nav/system-robot-accounts/new-robot/new-robot.component.ts
xml
2016-01-28T21:10:28
2024-08-16T15:28:34
harbor
goharbor/harbor
23,335
3,183
```xml <?xml version="1.0" encoding="UTF-8"?> <!-- or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file path_to_url Unless required by applicable law or agreed to in writing, "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY specific language governing permissions and limitations --> <project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.arrow</groupId> <artifactId>arrow-memory</artifactId> <version>18.0.0-SNAPSHOT</version> </parent> <artifactId>arrow-memory-unsafe</artifactId> <name>Arrow Memory - Unsafe</name> <description>Allocator and utils for allocating memory in Arrow based on sun.misc.Unsafe</description> <dependencies> <dependency> <groupId>org.apache.arrow</groupId> <artifactId>arrow-memory-core</artifactId> </dependency> <dependency> <groupId>org.immutables</groupId> <artifactId>value-annotations</artifactId> </dependency> </dependencies> </project> ```
/content/code_sandbox/java/memory/memory-unsafe/pom.xml
xml
2016-02-17T08:00:23
2024-08-16T19:00:48
arrow
apache/arrow
14,094
288
```xml import * as compose from "lodash.flowright"; import { BoardsGetLastQueryResponse, IBoard } from "@erxes/ui-sales/src/boards/types"; import { router as routerUtils, withProps } from "@erxes/ui/src/utils"; import Home from "../components/Home"; import { IOption } from "../types"; import React, { useEffect } from "react"; import Spinner from "@erxes/ui/src/components/Spinner"; import { gql } from "@apollo/client"; import { graphql } from "@apollo/client/react/hoc"; import { queries } from "@erxes/ui-sales/src/settings/boards/graphql"; import { useLocation, useNavigate } from "react-router-dom"; type HomeContainerProps = { boardId: string; }; type Props = { type: string; title: string; options?: IOption; }; function HomeContainer(props: HomeContainerProps & Props) { const navigate = useNavigate(); const location = useLocation(); const { boardId } = props; useEffect(() => { if (!routerUtils.getParam(location, "boardId") && boardId) { routerUtils.setParams(navigate, location, { boardId }); } }, [boardId, location, navigate]); return <Home {...props} />; } type LastBoardProps = { boardGetLastQuery: BoardsGetLastQueryResponse; }; // Getting lastBoard id to currentBoard const LastBoard = (props: LastBoardProps & Props) => { const { boardGetLastQuery } = props; if (boardGetLastQuery.loading) { return <Spinner objective={true} />; } const lastBoard = boardGetLastQuery.salesBoardGetLast || ({} as IBoard); const extendedProps = { ...props, boardId: lastBoard._id }; return <HomeContainer {...extendedProps} />; }; const LastBoardContainer = withProps<Props>( compose( graphql<Props, BoardsGetLastQueryResponse, {}>(gql(queries.boardGetLast), { name: "boardGetLastQuery", options: ({ type }) => ({ variables: { type } }) }) )(LastBoard) ); // Main home component const MainContainer = (props: Props) => { const location = useLocation(); const boardId = routerUtils.getParam(location, "boardId"); if (boardId) { const extendedProps = { ...props, boardId }; return <HomeContainer {...extendedProps} />; } return <LastBoardContainer {...props} />; }; export default MainContainer; ```
/content/code_sandbox/packages/plugin-sales-ui/src/settings/boards/containers/Home.tsx
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
546
```xml import { bindAll } from 'underscore'; import Frame from '../../canvas/model/Frame'; import Editor from '../../editor'; import { CommandObject } from './CommandAbstract'; import { isDef } from '../../utils/mixins'; export default { init() { bindAll(this, '_onFramesChange'); }, run(ed) { this.toggleVis(ed, true); }, stop(ed) { this.toggleVis(ed, false); }, toggleVis(ed: Editor, active = true) { if (!ed.Commands.isActive('preview')) { const cv = ed.Canvas; const mth = active ? 'on' : 'off'; const canvasModel = cv.getModel(); canvasModel[mth]('change:frames', this._onFramesChange); this.handleFrames(cv.getFrames(), active); } }, handleFrames(frames: Frame[], active?: boolean) { frames.forEach((frame: Frame & { __ol?: boolean }) => { frame.view?.loaded && this._upFrame(frame, active); if (!frame.__ol) { frame.on('loaded', () => this._upFrame(frame)); frame.__ol = true; } }); }, _onFramesChange(_: any, frames: Frame[]) { this.handleFrames(frames); }, _upFrame(frame: Frame, active?: boolean) { const { ppfx, em, id } = this; const isActive = isDef(active) ? active : em.Commands.isActive(id as string); const method = isActive ? 'add' : 'remove'; const cls = `${ppfx}dashed`; frame.view?.getBody().classList[method](cls); }, } as CommandObject< {}, { [key: string]: any; } >; ```
/content/code_sandbox/src/commands/view/SwitchVisibility.ts
xml
2016-01-22T00:23:19
2024-08-16T11:20:59
grapesjs
GrapesJS/grapesjs
21,687
377
```xml import * as React from 'react'; import createSvgIcon from '../utils/createSvgIcon'; const UserFollowedIcon = createSvgIcon({ svg: ({ classes }) => ( <svg xmlns="path_to_url" viewBox="0 0 2048 2048" className={classes.svg} focusable="false"> <path d="M1397 1550q-21-114-78-210t-141-166-189-110-221-40q-88 0-170 23t-153 64-129 100-100 130-65 153-23 170H0q0-117 35-229t101-207 157-169 203-113q-56-36-100-83t-76-103-47-119-17-129q0-106 40-199t109-163T568 40 768 0q106 0 199 40t163 109 110 163 40 200q0 66-16 129t-48 119-75 103-101 83q99 38 183 100t147 143 105 177 54 202l-57 58-75-76zM384 512q0 80 30 149t82 122 122 83 150 30q79 0 149-30t122-82 83-122 30-150q0-79-30-149t-82-122-123-83-149-30q-80 0-149 30t-122 82-83 123-30 149zm1645 941l-557 558-269-270 90-90 179 178 467-466 90 90z" /> </svg> ), displayName: 'UserFollowedIcon', }); export default UserFollowedIcon; ```
/content/code_sandbox/packages/react-icons-mdl2/src/components/UserFollowedIcon.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
409
```xml <RelativeLayout xmlns:android="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recyclerview" android:layout_width="fill_parent" android:layout_height="fill_parent" /> <TextView android:id="@+id/empty_view" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_centerInParent="true" android:gravity="center_horizontal" android:text="@string/no_files_found" android:textSize="25sp" android:textStyle="bold" android:visibility="gone" /> </RelativeLayout> ```
/content/code_sandbox/filepicker/src/main/res/layout/fragment_photo_picker.xml
xml
2016-07-31T20:07:34
2024-08-14T09:28:50
Android-FilePicker
DroidNinja/Android-FilePicker
2,691
161
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url"> <plist version="1.0"> <dict> <key>BuildMachineOSBuild</key> <string>11G63</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>VoodooHDA</string> <key>CFBundleIdentifier</key> <string>org.voodoo.driver.VoodooHDA</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>VoodooHDA</string> <key>CFBundlePackageType</key> <string>KEXT</string> <key>CFBundleShortVersionString</key> <string>2.8.7</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>2.8.7</string> <key>DTCompiler</key> <string>com.apple.compilers.llvmgcc42</string> <key>DTPlatformBuild</key> <string>4F1003</string> <key>DTPlatformVersion</key> <string>GM</string> <key>DTSDKBuild</key> <string>10K549</string> <key>DTSDKName</key> <string>macosx10.6</string> <key>DTXcode</key> <string>0441</string> <key>DTXcodeBuild</key> <string>4F1003</string> <key>IOKitPersonalities</key> <dict> <key>VoodooHDA</key> <dict> <key>AllowMSI</key> <true/> <key>Boost</key> <integer>1</integer> <key>CFBundleIdentifier</key> <string>org.voodoo.driver.VoodooHDA</string> <key>IOClass</key> <string>VoodooHDADevice</string> <key>IOMatchCategory</key> <string>VoodooHDADevice</string> <key>IOPCIClassMatch</key> <string>0x04020000&amp;0xfffe0000</string> <key>IOProviderClass</key> <string>IOPCIDevice</string> <key>IOUserClientClass</key> <string>VoodooHDAUserClient</string> <key>InhibitCache</key> <false/> <key>MixerValues</key> <dict> <key>PCM</key> <integer>90</integer> <key>Rec</key> <integer>70</integer> <key>iGain</key> <integer>80</integer> <key>iMix</key> <integer>0</integer> </dict> <key>NodesToPatch</key> <array> <dict> <key>Codec</key> <integer>0</integer> <key>Config</key> <string>0x90170140</string> <key>Node</key> <integer>23</integer> </dict> <dict> <key>Codec</key> <integer>0</integer> <key>Config</key> <string>0x0421104f</string> <key>Node</key> <integer>22</integer> </dict> <dict> <key>Codec</key> <integer>0</integer> <key>Config</key> <string>0x04a1112f</string> <key>Node</key> <integer>24</integer> </dict> <dict> <key>Codec</key> <integer>0</integer> <key>Config</key> <string>0x95a70120</string> <key>Node</key> <integer>26</integer> </dict> </array> <key>Noise</key> <integer>0</integer> <key>Vectorize</key> <true/> <key>VoodooHDAEnableHalfMicVolumeFix</key> <false/> <key>VoodooHDAEnableHalfVolumeFix</key> <false/> <key>VoodooHDAEnableMuteFix</key> <false/> <key>VoodooHDAEnableVolumeChangeFix</key> <false/> <key>VoodooHDAVerboseLevel</key> <integer>0</integer> </dict> </dict> <key>OSBundleLibraries</key> <dict> <key>com.apple.iokit.IOAudioFamily</key> <string>1.1fc9</string> <key>com.apple.iokit.IOPCIFamily</key> <string>2.1</string> <key>com.apple.kpi.iokit</key> <string>9.0.0</string> <key>com.apple.kpi.libkern</key> <string>9.0.0</string> <key>com.apple.kpi.mach</key> <string>9.0.0</string> <key>com.apple.kpi.unsupported</key> <string>9.0.0</string> </dict> </dict> </plist> ```
/content/code_sandbox/Clover-Configs/Asus/A550J/CLOVER/kexts/10.11/VoodooHDA.kext/Contents/Info.plist
xml
2016-11-05T04:22:54
2024-08-12T19:25:53
Hackintosh-Installer-University
huangyz0918/Hackintosh-Installer-University
3,937
1,328
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="path_to_url"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug-c++17|Win32"> <Configuration>Debug-c++17</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug-c++17|x64"> <Configuration>Debug-c++17</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug-static|Win32"> <Configuration>Debug-static</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug-static|x64"> <Configuration>Debug-static</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="DebugVLD|Win32"> <Configuration>DebugVLD</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="DebugVLD|x64"> <Configuration>DebugVLD</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release-c++17|Win32"> <Configuration>Release-c++17</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release-c++17|x64"> <Configuration>Release-c++17</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release-static|Win32"> <Configuration>Release-static</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release-static|x64"> <Configuration>Release-static</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="vc14-Debug|Win32"> <Configuration>vc14-Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="vc14-Debug|x64"> <Configuration>vc14-Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="vc14-Release|Win32"> <Configuration>vc14-Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="vc14-Release|x64"> <Configuration>vc14-Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\..\test\stress\main.cpp" /> <ClCompile Include="..\..\..\test\stress\set\delodd\set_delodd.cpp" /> <ClCompile Include="..\..\..\test\stress\set\delodd\set_delodd_cuckoo.cpp"> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-c++17|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='vc14-Release|Win32'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release-c++17|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='vc14-Release|x64'">_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <ClCompile Include="..\..\..\test\stress\set\delodd\set_delodd_ellentree.cpp"> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|x64'">4503</DisableSpecificWarnings> </ClCompile> <ClCompile Include="..\..\..\test\stress\set\delodd\set_delodd_feldman_hashset.cpp" /> <ClCompile Include="..\..\..\test\stress\set\delodd\set_delodd_michael.cpp" /> <ClCompile Include="..\..\..\test\stress\set\delodd\set_delodd_skip.cpp" /> <ClCompile Include="..\..\..\test\stress\set\delodd\set_delodd_split.cpp"> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release-c++17|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='vc14-Release|Win32'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='Release-c++17|x64'">4503</DisableSpecificWarnings> <DisableSpecificWarnings Condition="'$(Configuration)|$(Platform)'=='vc14-Release|x64'">4503</DisableSpecificWarnings> </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\..\..\test\stress\set\delodd\set_delodd.h" /> </ItemGroup> <ItemGroup> <Text Include="..\..\..\test\stress\set\delodd\CMakeLists.txt" /> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{8202D428-1E08-4744-B372-6B2E83A9928E}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>stress_set_delodd</RootNamespace> <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion> <ProjectName>stress-set-delodd</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v140</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-c++17|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v140</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v140</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-c++17|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v141</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PlatformToolset>v140</PlatformToolset> <WholeProgramOptimization>true</WholeProgramOptimization> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Label="Shared"> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-c++17|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Release|Win32'" Label="PropertySheets"> <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)'=='Debug|x64'"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'" Label="PropertySheets"> <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> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-c++17|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> <TargetName>$(ProjectName)_d</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'"> <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> <TargetName>$(ProjectName)_d</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|Win32'"> <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> <TargetName>$(ProjectName)_d</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|Win32'"> <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> <TargetName>$(ProjectName)_d</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'"> <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> <TargetName>$(ProjectName)_d</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> <TargetName>$(ProjectName)_d</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'"> <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> <TargetName>$(ProjectName)_d</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|x64'"> <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> <TargetName>$(ProjectName)_d</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|x64'"> <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> <TargetName>$(ProjectName)_d</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'"> <LinkIncremental>true</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> <TargetName>$(ProjectName)_d</TargetName> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <LinkIncremental>false</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'"> <LinkIncremental>false</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-c++17|Win32'"> <LinkIncremental>false</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Release|Win32'"> <LinkIncremental>false</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <LinkIncremental>false</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'"> <LinkIncremental>false</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-c++17|x64'"> <LinkIncremental>false</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Release|x64'"> <LinkIncremental>false</LinkIncremental> <OutDir>$(SolutionDir)..\..\..\bin\vc.$(PlatformToolset)\$(Platform)-$(Configuration)\</OutDir> <IntDir>$(SolutionDir)..\..\..\obj\vc.$(PlatformToolset)\$(Platform)\$(ProjectName)\$(Configuration)\</IntDir> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>libcds-$(PlatformTarget).lib;gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|Win32'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>CDS_BUILD_STATIC_LIB;_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>libcds-$(PlatformTarget).lib;gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|Win32'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> <LanguageStandard>stdcpp17</LanguageStandard> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>libcds-$(PlatformTarget).lib;gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|Win32'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|Win32'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>libcds-$(PlatformTarget).lib;gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-static|x64'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>CDS_BUILD_STATIC_LIB;_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>libcds-$(PlatformTarget).lib;gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-c++17|x64'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> <LanguageStandard>stdcpp17</LanguageStandard> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>libcds-$(PlatformTarget).lib;gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Debug|x64'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugVLD|x64'"> <ClCompile> <PrecompiledHeader>NotUsing</PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>DebugFastLink</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtestd.lib;stress-framework_d.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtest.lib;stress-framework.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>CDS_BUILD_STATIC_LIB;_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtest.lib;stress-framework.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-c++17|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> <LanguageStandard>stdcpp17</LanguageStandard> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtest.lib;stress-framework.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Release|Win32'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB32);$(GTEST_ROOT)/lib/x86;$(BOOST_PATH)/stage32/lib;$(BOOST_PATH)/stage/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtest.lib;stress-framework.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtest.lib;stress-framework.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-static|x64'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>CDS_BUILD_STATIC_LIB;_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtest.lib;stress-framework.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-c++17|x64'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> <LanguageStandard>stdcpp17</LanguageStandard> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtest.lib;stress-framework.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='vc14-Release|x64'"> <ClCompile> <WarningLevel>Level3</WarningLevel> <PrecompiledHeader>NotUsing</PrecompiledHeader> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_ENABLE_ATOMIC_ALIGNMENT_FIX;_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING;CDSUNIT_USE_URCU;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(SolutionDir)..\..\..;$(GTEST_ROOT)/include;$(SolutionDir)..\..\..\test\include;$(SolutionDir)..\..\..\test\stress\set;$(SolutionDir)..\..\..\test\stress\;$(BOOST_PATH);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AdditionalOptions>/bigobj /Zc:inline /permissive- %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <AdditionalLibraryDirectories>$(GTEST_LIB64);$(GTEST_ROOT)/lib/x64;$(BOOST_PATH)/stage64/lib;$(BOOST_PATH)/bin;%(AdditionalLibraryDirectories);$(OutDir)</AdditionalLibraryDirectories> <AdditionalDependencies>gtest.lib;stress-framework.lib;%(AdditionalDependencies)</AdditionalDependencies> </Link> </ItemDefinitionGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project> ```
/content/code_sandbox/extern/libcds/projects/Win/vc141/stress-set-delodd.vcxproj
xml
2016-03-16T06:10:37
2024-08-16T14:13:51
firebird
FirebirdSQL/firebird
1,223
13,549
```xml import cn from "classnames"; import React, { FunctionComponent } from "react"; import { withStyles } from "coral-ui/hocs"; import styles from "./Marker.css"; interface Props { className?: string; /** * Override or extend the styles applied to the component. */ classes: typeof styles; children: React.ReactNode; /** * The color of the component. It supports those theme colors that make sense for this component. */ color?: "reported" | "pending" | "warning"; variant?: "regular" | "filled"; } const Marker: FunctionComponent<Props> = (props) => { const { className, children, classes, color, variant, ...rest } = props; const rootClassName = cn(classes.root, className, { [classes.colorReported]: color === "reported", [classes.colorPending]: color === "pending", [classes.colorWarning]: color === "warning", [classes.variantRegular]: variant === "regular", [classes.variantFilled]: variant === "filled", }); return ( <span className={rootClassName} {...rest}> {children} </span> ); }; Marker.defaultProps = { color: "pending", variant: "regular", }; const enhanced = withStyles(styles)(Marker); export default enhanced; ```
/content/code_sandbox/client/src/core/client/ui/components/v2/Marker/Marker.tsx
xml
2016-10-31T16:14:05
2024-08-06T16:15:57
talk
coralproject/talk
1,881
278
```xml // See LICENSE in the project root for license information. import { HeftTask } from './HeftTask'; import type { InternalHeftSession } from './InternalHeftSession'; import type { IHeftConfigurationJsonPhaseSpecifier } from '../utilities/CoreConfigFiles'; import type { IDeleteOperation } from '../plugins/DeleteFilesPlugin'; const RESERVED_PHASE_NAMES: Set<string> = new Set(['lifecycle']); export class HeftPhase { private _internalHeftSession: InternalHeftSession; private _phaseName: string; private _phaseSpecifier: IHeftConfigurationJsonPhaseSpecifier; private _consumingPhases: Set<HeftPhase> | undefined; private _dependencyPhases: Set<HeftPhase> | undefined; private _cleanFiles: Set<IDeleteOperation> | undefined; private _tasks: Set<HeftTask> | undefined; private _tasksByName: Map<string, HeftTask> | undefined; public constructor( internalHeftSession: InternalHeftSession, phaseName: string, phaseSpecifier: IHeftConfigurationJsonPhaseSpecifier ) { this._internalHeftSession = internalHeftSession; this._phaseName = phaseName; this._phaseSpecifier = phaseSpecifier; this._validate(); } /** * The name of the phase. */ public get phaseName(): string { return this._phaseName; } /** * The description of the phase. */ public get phaseDescription(): string | undefined { return this._phaseSpecifier.phaseDescription; } /** * Returns delete operations that are specified on the phase. */ public get cleanFiles(): ReadonlySet<IDeleteOperation> { if (!this._cleanFiles) { this._cleanFiles = new Set(this._phaseSpecifier.cleanFiles || []); } return this._cleanFiles; } /** * Returns the set of phases that depend on this phase. */ public get consumingPhases(): ReadonlySet<HeftPhase> { if (!this._consumingPhases) { // Force initialize all dependency relationships // This needs to operate on every phase in the set because the relationships are only specified // in the consuming phase. const { phases } = this._internalHeftSession; for (const phase of phases) { phase._consumingPhases = new Set(); } for (const phase of phases) { for (const dependency of phase.dependencyPhases) { dependency._consumingPhases!.add(phase); } } } return this._consumingPhases!; } /** * Returns the set of phases that this phase depends on. */ public get dependencyPhases(): ReadonlySet<HeftPhase> { let dependencyPhases: Set<HeftPhase> | undefined = this._dependencyPhases; if (!dependencyPhases) { this._dependencyPhases = dependencyPhases = new Set(); const dependencyNamesSet: Set<string> = new Set(this._phaseSpecifier.phaseDependencies || []); for (const dependencyName of dependencyNamesSet) { // Skip if we can't find the dependency const dependencyPhase: HeftPhase | undefined = this._internalHeftSession.phasesByName.get(dependencyName); if (!dependencyPhase) { throw new Error(`Could not find dependency phase ${JSON.stringify(dependencyName)}.`); } dependencyPhases.add(dependencyPhase); } } return dependencyPhases; } /** * Returns the set of tasks contained by this phase. */ public get tasks(): ReadonlySet<HeftTask> { this._ensureTasks(); return this._tasks!; } /** * Returns a map of tasks by name. */ public get tasksByName(): ReadonlyMap<string, HeftTask> { this._ensureTasks(); return this._tasksByName!; } private _ensureTasks(): void { if (!this._tasks || !this._tasksByName) { this._tasks = new Set(); this._tasksByName = new Map(); for (const [taskName, taskSpecifier] of Object.entries(this._phaseSpecifier.tasksByName || {})) { const task: HeftTask = new HeftTask(this, taskName, taskSpecifier); this._tasks.add(task); this._tasksByName.set(taskName, task); } } } private _validate(): void { if (RESERVED_PHASE_NAMES.has(this.phaseName)) { throw new Error( `Phase name ${JSON.stringify(this.phaseName)} is reserved and cannot be used as a phase name.` ); } } } ```
/content/code_sandbox/apps/heft/src/pluginFramework/HeftPhase.ts
xml
2016-09-30T00:28:20
2024-08-16T18:54:35
rushstack
microsoft/rushstack
5,790
1,010