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 <resources> <string name="app_name">IndexRecyclerView</string> </resources> ```
/content/code_sandbox/app/src/main/res/values/strings.xml
xml
2016-02-02T05:51:58
2024-06-09T03:30:10
IndexRecyclerView
jiang111/IndexRecyclerView
1,157
20
```xml import * as React from 'react'; import { CSSModule } from './utils'; interface CommonCarouselProps extends React.HTMLAttributes<HTMLElement> { [key: string]: any; activeIndex?: number; keyboard?: boolean; pause?: 'hover' | false; ride?: 'carousel'; interval?: number | string | boolean; mouseEnter?: () => void; mouseExit?: () => void; slide?: boolean; dark?: boolean; fade?: boolean; cssModule?: CSSModule; enableTouch?: boolean; } export interface CarouselProps extends CommonCarouselProps { next: () => void; previous: () => void; } export interface UncontrolledCarouselProps extends CommonCarouselProps { items: any[]; next?: () => void; previous?: () => void; controls?: boolean; indicators?: boolean; autoPlay?: boolean; } declare class Carousel extends React.Component<CarouselProps> {} export default Carousel; ```
/content/code_sandbox/types/lib/Carousel.d.ts
xml
2016-02-19T08:01:36
2024-08-16T11:48:48
reactstrap
reactstrap/reactstrap
10,591
204
```xml import { JsPackageManagerFactory, removeAddon as remove, versions, } from 'storybook/internal/common'; import { withTelemetry } from 'storybook/internal/core-server'; import { logger } from 'storybook/internal/node-logger'; import { addToGlobalContext, telemetry } from 'storybook/internal/telemetry'; import chalk from 'chalk'; import { program } from 'commander'; import envinfo from 'envinfo'; import { findPackageSync } from 'fd-package-json'; import leven from 'leven'; import invariant from 'tiny-invariant'; import { add } from '../add'; import { doAutomigrate } from '../automigrate'; import { doctor } from '../doctor'; import { link } from '../link'; import { migrate } from '../migrate'; import { sandbox } from '../sandbox'; import { type UpgradeOptions, upgrade } from '../upgrade'; addToGlobalContext('cliVersion', versions.storybook); const pkg = findPackageSync(__dirname); invariant(pkg, 'Failed to find the closest package.json file.'); const consoleLogger = console; const command = (name: string) => program .command(name) .option( '--disable-telemetry', 'Disable sending telemetry data', // default value is false, but if the user sets STORYBOOK_DISABLE_TELEMETRY, it can be true process.env.STORYBOOK_DISABLE_TELEMETRY && process.env.STORYBOOK_DISABLE_TELEMETRY !== 'false' ) .option('--debug', 'Get more logs in debug mode', false) .option('--enable-crash-reports', 'Enable sending crash reports to telemetry data'); command('add <addon>') .description('Add an addon to your Storybook') .option( '--package-manager <npm|pnpm|yarn1|yarn2>', 'Force package manager for installing dependencies' ) .option('-c, --config-dir <dir-name>', 'Directory where to load Storybook configurations from') .option('-s --skip-postinstall', 'Skip package specific postinstall config modifications') .action((addonName: string, options: any) => add(addonName, options)); command('remove <addon>') .description('Remove an addon from your Storybook') .option( '--package-manager <npm|pnpm|yarn1|yarn2>', 'Force package manager for installing dependencies' ) .action((addonName: string, options: any) => withTelemetry('remove', { cliOptions: options }, async () => { await remove(addonName, options); if (!options.disableTelemetry) { await telemetry('remove', { addon: addonName, source: 'cli' }); } }) ); command('upgrade') .description(`Upgrade your Storybook packages to v${versions.storybook}`) .option( '--package-manager <npm|pnpm|yarn1|yarn2>', 'Force package manager for installing dependencies' ) .option('-y --yes', 'Skip prompting the user') .option('-f --force', 'force the upgrade, skipping autoblockers') .option('-n --dry-run', 'Only check for upgrades, do not install') .option('-s --skip-check', 'Skip postinstall version and automigration checks') .option('-c, --config-dir <dir-name>', 'Directory where to load Storybook configurations from') .action(async (options: UpgradeOptions) => upgrade(options).catch(() => process.exit(1))); command('info') .description('Prints debugging information about the local environment') .action(async () => { consoleLogger.log(chalk.bold('\nStorybook Environment Info:')); const pkgManager = await JsPackageManagerFactory.getPackageManager(); const activePackageManager = pkgManager.type.replace(/\d/, ''); // 'yarn1' -> 'yarn' const output = await envinfo.run({ System: ['OS', 'CPU', 'Shell'], Binaries: ['Node', 'Yarn', 'npm', 'pnpm'], Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'], npmPackages: '{@storybook/*,*storybook*,sb,chromatic}', npmGlobalPackages: '{@storybook/*,*storybook*,sb,chromatic}', }); const activePackageManagerLine = output.match(new RegExp(`${activePackageManager}:.*`, 'i')); consoleLogger.log( output.replace( activePackageManagerLine, chalk.bold(`${activePackageManagerLine} <----- active`) ) ); }); command('migrate [migration]') .description('Run a Storybook codemod migration on your source files') .option('-l --list', 'List available migrations') .option('-g --glob <glob>', 'Glob for files upon which to apply the migration', '**/*.js') .option('-p --parser <babel | babylon | flow | ts | tsx>', 'jscodeshift parser') .option('-c, --config-dir <dir-name>', 'Directory where to load Storybook configurations from') .option( '-n --dry-run', 'Dry run: verify the migration exists and show the files to which it will be applied' ) .option( '-r --rename <from-to>', 'Rename suffix of matching files after codemod has been applied, e.g. ".js:.ts"' ) .action((migration, { configDir, glob, dryRun, list, rename, parser }) => { migrate(migration, { configDir, glob, dryRun, list, rename, parser, }).catch((err) => { logger.error(err); process.exit(1); }); }); command('sandbox [filterValue]') .alias('repro') // for backwards compatibility .description('Create a sandbox from a set of possible templates') .option('-o --output <outDir>', 'Define an output directory') .option('--no-init', 'Whether to download a template without an initialized Storybook', false) .action((filterValue, options) => sandbox({ filterValue, ...options }).catch((e) => { logger.error(e); process.exit(1); }) ); command('link <repo-url-or-directory>') .description('Pull down a repro from a URL (or a local directory), link it, and run storybook') .option('--local', 'Link a local directory already in your file system') .option('--no-start', 'Start the storybook', true) .action((target, { local, start }) => link({ target, local, start }).catch((e) => { logger.error(e); process.exit(1); }) ); command('automigrate [fixId]') .description('Check storybook for incompatibilities or migrations and apply fixes') .option('-y --yes', 'Skip prompting the user') .option('-n --dry-run', 'Only check for fixes, do not actually run them') .option('--package-manager <npm|pnpm|yarn1|yarn2>', 'Force package manager') .option('-l --list', 'List available migrations') .option('-c, --config-dir <dir-name>', 'Directory of Storybook configurations to migrate') .option('-s --skip-install', 'Skip installing deps') .option( '--renderer <renderer-pkg-name>', 'The renderer package for the framework Storybook is using.' ) .action(async (fixId, options) => { await doAutomigrate({ fixId, ...options }).catch((e) => { logger.error(e); process.exit(1); }); }); command('doctor') .description('Check Storybook for known problems and provide suggestions or fixes') .option('--package-manager <npm|pnpm|yarn1|yarn2>', 'Force package manager') .option('-c, --config-dir <dir-name>', 'Directory of Storybook configuration') .action(async (options) => { await doctor(options).catch((e) => { logger.error(e); process.exit(1); }); }); program.on('command:*', ([invalidCmd]) => { consoleLogger.error( ' Invalid command: %s.\n See --help for a list of available commands.', invalidCmd ); const availableCommands = program.commands.map((cmd) => cmd.name()); const suggestion = availableCommands.find((cmd) => leven(cmd, invalidCmd) < 3); if (suggestion) { consoleLogger.info(`\n Did you mean ${suggestion}?`); } process.exit(1); }); program.usage('<command> [options]').version(String(pkg.version)).parse(process.argv); ```
/content/code_sandbox/code/lib/cli-storybook/src/bin/index.ts
xml
2016-03-18T04:23:44
2024-08-16T19:22:08
storybook
storybookjs/storybook
83,755
1,868
```xml export * from './client/index'; export * from './types'; /* * ATTENTION: * - moduleMetadata * - NgModuleMetadata * - ICollection * * These typings are coped out of decorators.d.ts and types.d.ts in order to fix a bug with tsc * It was imported out of dist before which was not the proper way of exporting public API * * This can be fixed by migrating app/angular to typescript */ ```
/content/code_sandbox/code/frameworks/angular/src/index.ts
xml
2016-03-18T04:23:44
2024-08-16T19:22:08
storybook
storybookjs/storybook
83,755
93
```xml <?xml version="1.0" encoding="UTF-8"?> <ContentPage xmlns="path_to_url" xmlns:x="path_to_url" xmlns:controls="clr-namespace:Xamarin.Forms.Controls.Issues" x:Class="Xamarin.Forms.Controls.Issues.Issue9555"> <StackLayout VerticalOptions="Center" HorizontalOptions="Center"> <Frame WidthRequest="200" HeightRequest="100" > <Frame.Effects> <controls:FooEffect/> </Frame.Effects> </Frame> </StackLayout> </ContentPage> ```
/content/code_sandbox/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue9555.xaml
xml
2016-03-18T15:52:03
2024-08-16T16:25:43
Xamarin.Forms
xamarin/Xamarin.Forms
5,637
122
```xml import { html } from 'lit'; import { customElement, property } from 'lit/decorators.js'; import { createRef, ref } from 'lit/directives/ref.js'; import cc from 'classcat'; import { HasSlotController } from '@mdui/shared/controllers/has-slot.js'; import { booleanConverter } from '@mdui/shared/helpers/decorator.js'; import { nothingTemplate } from '@mdui/shared/helpers/template.js'; import { uniqueId } from '@mdui/shared/helpers/uniqueId.js'; import '@mdui/shared/icons/check.js'; import { ButtonBase } from '../button/button-base.js'; import '../icon.js'; import { segmentedButtonStyle } from './segmented-button-style.js'; import type { Ripple } from '../ripple/index.js'; import type { CSSResultGroup, TemplateResult } from 'lit'; import type { Ref } from 'lit/directives/ref.js'; /** * @summary `<mdui-segmented-button-group>` * * ```html * <mdui-segmented-button-group> * ..<mdui-segmented-button>Day</mdui-segmented-button> * ..<mdui-segmented-button>Week</mdui-segmented-button> * ..<mdui-segmented-button>Month</mdui-segmented-button> * </mdui-segmented-button-group> * ``` * * @event focus - * @event blur - * @event invalid - * * @slot - * @slot icon - * @slot selected-icon - * @slot end-icon - * * @csspart button - `<button>` `<a>` * @csspart icon - * @csspart selected-icon - * @csspart end-icon - * @csspart label - * @csspart loading - `<mdui-circular-progress>` */ @customElement('mdui-segmented-button') export class SegmentedButton extends ButtonBase<SegmentedButtonEventMap> { public static override styles: CSSResultGroup = [ ButtonBase.styles, segmentedButtonStyle, ]; /** * Material Icons `slot="icon"` */ @property({ reflect: true }) public icon?: string; /** * Material Icons `slot="end-icon"` */ @property({ reflect: true, attribute: 'end-icon' }) public endIcon?: string; /** * Material Icons `slot="selected-icon"` */ @property({ reflect: true, attribute: 'selected-icon' }) public selectedIcon?: string; /** * <mdui-segmented-button-group> */ @property({ type: Boolean, reflect: true, converter: booleanConverter, }) protected selected = false; /** * <mdui-segmented-button-group> */ @property({ type: Boolean, reflect: true, converter: booleanConverter, }) protected invalid = false; // <mdui-segmented-button-group> @property({ type: Boolean, reflect: true, converter: booleanConverter, attribute: 'group-disabled', }) protected groupDisabled = false; // segmented-button key protected readonly key = uniqueId(); private readonly rippleRef: Ref<Ripple> = createRef(); private readonly hasSlotController = new HasSlotController( this, '[default]', 'icon', 'end-icon', ); protected override get rippleElement() { return this.rippleRef.value!; } protected override get rippleDisabled(): boolean { return this.isDisabled() || this.loading; } protected override get focusDisabled(): boolean { return this.isDisabled() || this.loading; } protected override render(): TemplateResult { const className = cc({ button: true, 'has-icon': this.icon || this.selected || this.loading || this.hasSlotController.test('icon'), 'has-end-icon': this.endIcon || this.hasSlotController.test('end-icon'), }); return html`<mdui-ripple ${ref(this.rippleRef)} .noRipple=${this.noRipple} ></mdui-ripple> ${this.isButton() ? this.renderButton({ className, part: 'button', content: this.renderInner(), }) : this.isDisabled() || this.loading ? html`<span part="button" class="_a ${className}"> ${this.renderInner()} </span>` : this.renderAnchor({ className, part: 'button', content: this.renderInner(), })}`; } private isDisabled(): boolean { return this.disabled || this.groupDisabled; } private renderIcon(): TemplateResult { if (this.loading) { return this.renderLoading(); } if (this.selected) { return html`<slot name="selected-icon" part="selected-icon" class="selected-icon" > ${this.selectedIcon ? html`<mdui-icon name=${this.selectedIcon} class="i"></mdui-icon>` : html`<mdui-icon-check class="i"></mdui-icon-check>`} </slot>`; } return html`<slot name="icon" part="icon" class="icon"> ${this.icon ? html`<mdui-icon name=${this.icon} class="i"></mdui-icon>` : nothingTemplate} </slot>`; } private renderLabel(): TemplateResult { const hasLabel = this.hasSlotController.test('[default]'); if (!hasLabel) { return nothingTemplate; } return html`<slot part="label" class="label"></slot>`; } private renderEndIcon(): TemplateResult { return html`<slot name="end-icon" part="end-icon" class="end-icon"> ${this.endIcon ? html`<mdui-icon name=${this.endIcon} class="i"></mdui-icon>` : nothingTemplate} </slot>`; } private renderInner(): TemplateResult[] { return [this.renderIcon(), this.renderLabel(), this.renderEndIcon()]; } } export interface SegmentedButtonEventMap { focus: FocusEvent; blur: FocusEvent; invalid: CustomEvent<void>; } declare global { interface HTMLElementTagNameMap { 'mdui-segmented-button': SegmentedButton; } } ```
/content/code_sandbox/packages/mdui/src/components/segmented-button/segmented-button.ts
xml
2016-07-11T17:39:02
2024-08-16T07:12:34
mdui
zdhxiong/mdui
4,077
1,424
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> <string name="material_timepicker_pm">P/M</string> <string name="material_timepicker_am">PG</string> <string name="material_timepicker_select_time">Pilih masa</string> <string name="material_timepicker_minute">Minit</string> <string name="material_timepicker_hour">Jam</string> <string name="material_hour_suffix">Pukul %1$s</string> <string name="material_hour_24h_suffix">%1$s jam</string> <string name="material_minute_suffix">%1$s minit</string> <string name="material_hour_selection">Pilih jam</string> <string name="material_minute_selection">Pilih minit</string> <string name="material_clock_toggle_content_description">Pilih AM atau PM</string> <string name="mtrl_timepicker_confirm">OK</string> <string name="mtrl_timepicker_cancel">Batal</string> <string name="material_timepicker_text_input_mode_description">Beralih ke mod input teks untuk input masa.</string> <string name="material_timepicker_clock_mode_description">Beralih ke mod jam untuk input masa.</string> </resources> ```
/content/code_sandbox/lib/java/com/google/android/material/timepicker/res/values-ms/strings.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
349
```xml /* * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import classNames from "classnames"; import * as React from "react"; import { Boundary, Classes, DISPLAYNAME_PREFIX, type Props } from "../../common"; import { OVERFLOW_LIST_OBSERVE_PARENTS_CHANGED } from "../../common/errors"; import { shallowCompareKeys } from "../../common/utils"; import { ResizeSensor } from "../resize-sensor/resizeSensor"; export interface OverflowListProps<T> extends Props { /** * Whether to force the overflowRenderer to always be called, even if there are zero items * overflowing. This may be useful, for example, if your overflow renderer contains a Popover * which you do not want to close as the list is resized. * * @default false */ alwaysRenderOverflow?: boolean; /** * Which direction the items should collapse from: start or end of the * children. This also determines whether `overflowRenderer` appears before * (`START`) or after (`END`) the visible items. * * @default Boundary.START */ collapseFrom?: Boundary; /** * All items to display in the list. Items that do not fit in the container * will be rendered in the overflow instead. */ items: readonly T[]; /** * The minimum number of visible items that should never collapse into the * overflow menu, regardless of DOM dimensions. * * @default 0 */ minVisibleItems?: number; /** * If `true`, all parent DOM elements of the container will also be * observed. If changes to a parent's size is detected, the overflow will be * recalculated. * * Only enable this prop if the overflow should be recalculated when a * parent element resizes in a way that does not also cause the * `OverflowList` to resize. * * @default false */ observeParents?: boolean; /** * Callback invoked when the overflowed items change. This is called once * after the DOM has settled, rather that on every intermediate change. It * is not invoked if resizing produces an unchanged overflow state. */ onOverflow?: (overflowItems: T[]) => void; /** * Callback invoked to render the overflowed items. Unlike * `visibleItemRenderer`, this prop is invoked once with all items that do * not fit in the container. * * Typical use cases for this prop will put overflowed items in a dropdown * menu or display a "+X items" label. */ overflowRenderer: (overflowItems: T[]) => React.ReactNode; /** CSS properties to apply to the root element. */ style?: React.CSSProperties; /** * HTML tag name for the container element. * * @default "div" */ tagName?: keyof React.JSX.IntrinsicElements; /** * Callback invoked to render each visible item. * Remember to set a `key` on the rendered element! */ visibleItemRenderer: (item: T, index: number) => React.ReactChild; } export interface OverflowListState<T> { /** Whether repartitioning is still active. An overflow can take several frames to settle. */ repartitioning: boolean; /** Length of last overflow to dedupe `onOverflow` calls during smooth resizing. */ lastOverflowCount: number; overflow: readonly T[]; visible: readonly T[]; /** Pointer for the binary search algorithm used to find the finished non-overflowing state */ chopSize: number; lastChopSize: number | null; } /** * Overflow list component. * * @see path_to_url#core/components/overflow-list */ export class OverflowList<T> extends React.Component<OverflowListProps<T>, OverflowListState<T>> { public static displayName = `${DISPLAYNAME_PREFIX}.OverflowList`; public static defaultProps: Partial<OverflowListProps<any>> = { alwaysRenderOverflow: false, collapseFrom: Boundary.START, minVisibleItems: 0, }; public static ofType<U>() { return OverflowList as new (props: OverflowListProps<U>) => OverflowList<U>; } public state: OverflowListState<T> = { chopSize: this.defaultChopSize(), lastChopSize: null, lastOverflowCount: 0, overflow: [], repartitioning: false, visible: this.props.items, }; private spacer: HTMLElement | null = null; public componentDidMount() { this.repartition(); } public shouldComponentUpdate(nextProps: OverflowListProps<T>, nextState: OverflowListState<T>) { // We want this component to always re-render, even when props haven't changed, so that // changes in the renderers' behavior can be reflected. // The following statement prevents re-rendering only in the case where the state changes // identity (i.e. setState was called), but the state is still the same when // shallow-compared to the previous state. Original context: path_to_url // We also ensure that we re-render if the props DO change (which isn't necessarily accounted for by other logic). return this.props !== nextProps || !(this.state !== nextState && shallowCompareKeys(this.state, nextState)); } public componentDidUpdate(prevProps: OverflowListProps<T>, prevState: OverflowListState<T>) { if (prevProps.observeParents !== this.props.observeParents) { console.warn(OVERFLOW_LIST_OBSERVE_PARENTS_CHANGED); } if ( prevProps.collapseFrom !== this.props.collapseFrom || prevProps.items !== this.props.items || prevProps.minVisibleItems !== this.props.minVisibleItems || prevProps.overflowRenderer !== this.props.overflowRenderer || prevProps.alwaysRenderOverflow !== this.props.alwaysRenderOverflow || prevProps.visibleItemRenderer !== this.props.visibleItemRenderer ) { // reset visible state if the above props change. this.setState({ chopSize: this.defaultChopSize(), lastChopSize: null, lastOverflowCount: 0, overflow: [], repartitioning: true, visible: this.props.items, }); } const { repartitioning, overflow, lastOverflowCount } = this.state; if ( // if a resize operation has just completed repartitioning === false && prevState.repartitioning === true ) { // only invoke the callback if the UI has actually changed if (overflow.length !== lastOverflowCount) { this.props.onOverflow?.(overflow.slice()); } } else if (!shallowCompareKeys(prevState, this.state)) { this.repartition(); } } public render() { const { className, collapseFrom, observeParents, style, tagName = "div", visibleItemRenderer } = this.props; const overflow = this.maybeRenderOverflow(); const list = React.createElement( tagName, { className: classNames(Classes.OVERFLOW_LIST, className), style, }, collapseFrom === Boundary.START ? overflow : null, this.state.visible.map(visibleItemRenderer), collapseFrom === Boundary.END ? overflow : null, <div className={Classes.OVERFLOW_LIST_SPACER} ref={ref => (this.spacer = ref)} />, ); return ( <ResizeSensor onResize={this.resize} observeParents={observeParents}> {list} </ResizeSensor> ); } private maybeRenderOverflow() { const { overflow } = this.state; if (overflow.length === 0 && !this.props.alwaysRenderOverflow) { return null; } return this.props.overflowRenderer(overflow.slice()); } private resize = () => { this.repartition(); }; private repartition() { if (this.spacer == null) { return; } // if lastChopSize was 1, then our binary search has exhausted. const partitionExhausted = this.state.lastChopSize === 1; const minVisible = this.props.minVisibleItems ?? 0; // spacer has flex-shrink and width 1px so if it's much smaller then we know to shrink const shouldShrink = this.spacer.offsetWidth < 0.9 && this.state.visible.length > minVisible; // we only check partitionExhausted for shouldGrow to ensure shrinking is the final operation. const shouldGrow = (this.spacer.offsetWidth >= 1 || this.state.visible.length < minVisible) && this.state.overflow.length > 0 && !partitionExhausted; if (shouldShrink || shouldGrow) { this.setState(state => { let visible; let overflow; if (this.props.collapseFrom === Boundary.END) { const result = shiftElements( state.visible, state.overflow, this.state.chopSize * (shouldShrink ? 1 : -1), ); visible = result[0]; overflow = result[1]; } else { const result = shiftElements( state.overflow, state.visible, this.state.chopSize * (shouldShrink ? -1 : 1), ); overflow = result[0]; visible = result[1]; } return { chopSize: halve(state.chopSize), lastChopSize: state.chopSize, // if we're starting a new partition cycle, record the last overflow count so we can track whether the UI changes after the new overflow is calculated lastOverflowCount: this.isFirstPartitionCycle(state.chopSize) ? state.overflow.length : state.lastOverflowCount, overflow, repartitioning: true, visible, }; }); } else { // repartition complete! this.setState({ chopSize: this.defaultChopSize(), lastChopSize: null, repartitioning: false, }); } } private defaultChopSize(): number { return halve(this.props.items.length); } private isFirstPartitionCycle(currentChopSize: number): boolean { return currentChopSize === this.defaultChopSize(); } } function halve(num: number): number { return Math.ceil(num / 2); } function shiftElements<T>(leftArray: readonly T[], rightArray: readonly T[], num: number): [newFrom: T[], newTo: T[]] { // if num is positive then elements are shifted from left-to-right, if negative then right-to-left const allElements = leftArray.concat(rightArray); const newLeftLength = leftArray.length - num; if (newLeftLength <= 0) { return [[], allElements]; } else if (newLeftLength >= allElements.length) { return [allElements, []]; } const sliceIndex = allElements.length - newLeftLength; return [allElements.slice(0, -sliceIndex), allElements.slice(-sliceIndex)]; } ```
/content/code_sandbox/packages/core/src/components/overflow-list/overflowList.tsx
xml
2016-10-25T21:17:50
2024-08-16T15:14:48
blueprint
palantir/blueprint
20,593
2,393
```xml import React from 'react'; import ListItem from '..'; import { renderWithWrapper } from '../../../.ci/testHelper'; import { CreateThemeOptions, FullTheme } from '../../config'; describe('ListItem component', () => { it('should apply values from theme', () => { const theme: Partial<CreateThemeOptions> = { components: { ListItemTitle: { style: { color: 'red', }, }, }, }; const { wrapper } = renderWithWrapper( <ListItem> <ListItem.Title /> </ListItem>, 'listItemTitle', theme ); expect(wrapper.props.style.color).toBe('red'); }); }); ```
/content/code_sandbox/packages/themed/src/ListItem/__tests__/ListItem.test.tsx
xml
2016-09-08T14:21:41
2024-08-16T10:11:29
react-native-elements
react-native-elements/react-native-elements
24,875
145
```xml import * as React from 'react'; import { List } from '@fluentui/react-northstar'; const ListExample = () => ( <List> <List.Item header="Robert Tolbert" index={0} /> <List.Item header="Celeste Burton" index={1} /> <List.Item header="Cecil Folk" index={2} /> </List> ); export default ListExample; ```
/content/code_sandbox/packages/fluentui/docs/src/examples/components/List/Content/ListExampleHeader.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
90
```xml import { checkPermission } from '@erxes/api-utils/src'; import { IContext } from '../../../connectionResolver'; const operationMutations = { async addOperation(_root, params, { models }: IContext) { return await models.Operations.addOperation(params); }, async updateOperation(_root, { _id, ...doc }, { models }: IContext) { return await models.Operations.updateOperation(_id, doc); }, async removeOperation(_root, { ids }, { models }: IContext) { return await models.Operations.removeOperations(ids); } }; checkPermission(operationMutations, 'addOperation', 'manageRiskAssessment'); checkPermission(operationMutations, 'updateOperation', 'manageRiskAssessment'); checkPermission(operationMutations, 'removeOperation', 'manageRiskAssessment'); export default operationMutations; ```
/content/code_sandbox/packages/plugin-riskassessment-api/src/graphql/resolvers/mutations/operation.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
178
```xml /** * @license */ declare module 'pretty-json-stringify' { interface Params { tab?: string; spaceBeforeColon?: string; spaceAfterColon?: string; spaceAfterComma?: string; spaceInsideObject?: string; spaceInsideArray?: string; shouldExpand?(obj: Object, level: number, index: string): Boolean; } function stringify(object: Object, params: Params): string; export = stringify; } ```
/content/code_sandbox/types/internal/pretty-json-stringify.d.ts
xml
2016-03-08T01:03:11
2024-08-16T10:56:56
lighthouse
GoogleChrome/lighthouse
28,125
100
```xml import chalk from 'chalk'; import { packageName, logo } from './util/pkg-name'; export const help = () => ` ${chalk.bold(`${logo} ${packageName}`)} [options] <command | path> ${chalk.dim('For deploy command help, run `vercel deploy --help`')} ${chalk.dim('Commands:')} ${chalk.dim('Basic')} deploy [path] Performs a deployment ${chalk.bold( '(default)' )} dev Start a local development server env Manages the Environment Variables for your current Project git Manage Git provider repository for your current Project help [cmd] Displays complete help for [cmd] init [example] Initialize an example project inspect [id] Displays information related to a deployment link [path] Link local directory to a Vercel Project ls | list [app] Lists deployments login [email] Logs into your account or creates a new one logout Logs out of your account promote [url|id] Promote an existing deployment to current pull [path] Pull your Project Settings from the cloud redeploy [url|id] Rebuild and deploy a previous deployment. rollback [url|id] Quickly revert back to a previous deployment switch [scope] Switches between different scopes ${chalk.dim('Advanced')} alias [cmd] Manages your domain aliases bisect Use binary search to find the deployment that introduced a bug certs [cmd] Manages your SSL certificates dns [name] Manages your DNS records domains [name] Manages your domain names logs [url] Displays the logs for a deployment projects Manages your Projects rm | remove [id] Removes a deployment teams Manages your teams whoami Shows the username of the currently logged in user ${chalk.dim('Global Options:')} -h, --help Output usage information -v, --version Output the version number --cwd Current working directory -A ${chalk.bold.underline('FILE')}, --local-config=${chalk.bold.underline( 'FILE' )} Path to the local ${'`vercel.json`'} file -Q ${chalk.bold.underline('DIR')}, --global-config=${chalk.bold.underline( 'DIR' )} Path to the global ${'`.vercel`'} directory -d, --debug Debug mode [off] --no-color No color mode [off] -S, --scope Set a custom scope -t ${chalk.underline('TOKEN')}, --token=${chalk.underline( 'TOKEN' )} Login token ${chalk.dim('Examples:')} ${chalk.gray('')} Deploy the current directory ${chalk.cyan(`$ ${packageName}`)} ${chalk.gray('')} Deploy a custom path ${chalk.cyan(`$ ${packageName} /usr/src/project`)} ${chalk.gray('')} Deploy with Environment Variables ${chalk.cyan(`$ ${packageName} -e NODE_ENV=production`)} ${chalk.gray('')} Show the usage information for the sub command ${chalk.dim( '`list`' )} ${chalk.cyan(`$ ${packageName} help list`)} `; ```
/content/code_sandbox/packages/cli/src/args.ts
xml
2016-09-09T01:12:08
2024-08-16T17:39:45
vercel
vercel/vercel
12,545
758
```xml <vector xmlns:android="path_to_url" xmlns:tools="path_to_url" android:width="496dp" android:height="512dp" android:viewportWidth="496.0" android:viewportHeight="512.0" tools:keep="@drawable/fa_joget"> <path android:fillColor="#FFFFFFFF" android:pathData="M227.5,468.7c-9,-13.6 -19.9,-33.3 -23.7,-42.4 -5.7,-13.7 -27.2,-45.6 31.2,-67.1 51.7,-19.1 176.7,-16.5 208.8,-17.6 -4,9 -8.6,17.9 -13.9,26.6 -40.4,65.5 -110.4,101.5 -182,101.5 -6.8,0 -13.6,-0.4 -20.4,-1M66.1,143.9C128,43.4 259.6,12.2 360.1,74.1c74.8,46.1 111.2,130.9 99.3,212.7 -24.9,-0.5 -179.3,-3.6 -230.3,-4.9 -55.5,-1.4 -81.7,-20.8 -58.5,-48.2 23.2,-27.4 51.1,-40.7 68.9,-51.2 17.9,-10.5 27.3,-33.7 -23.6,-29.7C87.3,161.5 48.6,252.1 37.6,293c-8.8,-49.7 -0.1,-102.7 28.5,-149.1m-29.2,-18c-71.9,116.6 -35.6,269.3 81,341.2 116.6,71.9 269.3,35.6 341.2,-80.9 71.9,-116.6 35.6,-269.4 -81,-341.2 -40.5,-25.1 -85.5,-37 -129.9,-37C165,8 83.8,49.9 36.9,125.9m244.4,110.4c-31.5,20.5 -65.3,31.3 -65.3,31.3l169.5,-1.6 46.5,-23.4s3.6,-9.5 -19.1,-15.5c-22.7,-6 -57,11.3 -86.7,27.2 -29.7,15.8 -31.1,8.2 -31.1,8.2s40.2,-28.1 50.7,-34.5c10.5,-6.4 31.9,-14 13.4,-24.6 -3.2,-1.8 -6.7,-2.7 -10.4,-2.7 -17.8,0 -41.5,18.7 -67.5,35.6"/> </vector> ```
/content/code_sandbox/mobile/src/main/res/drawable/fa_joget.xml
xml
2016-10-24T13:23:25
2024-08-16T07:20:37
freeotp-android
freeotp/freeotp-android
1,387
735
```xml <?xml version="1.0" encoding="utf-8"?> <Tables Version="9.7.6698.29648" NameSpace="XCode.Extension" ConnName="Ext" Output="" BaseClass="Entity"> <Table Name="MyDbCache" Description="" ConnName="DbCache"> <Columns> <Column Name="Name" DataType="String" PrimaryKey="True" Master="True" Nullable="False" Description="" /> <Column Name="Value" DataType="String" Length="2000" Description="" /> <Column Name="CreateTime" DataType="DateTime" Description="" /> <Column Name="ExpiredTime" DataType="DateTime" Description="" /> </Columns> <Indexes> <Index Name="IU_TableCache_Name" Columns="Name" Unique="True" PrimaryKey="True" /> <Index Columns="ExpiredTime" /> </Indexes> </Table> </Tables> ```
/content/code_sandbox/XCode/Extension/Ext.xml
xml
2016-06-22T14:26:52
2024-08-16T04:07:33
X
NewLifeX/X
1,746
196
```xml export { Storage } from './storage'; export * from './lib/storage-utils'; export * from './lib/versions-utils'; export * from './lib/star-utils'; export * from './type'; ```
/content/code_sandbox/packages/store/src/index.ts
xml
2016-04-15T16:21:12
2024-08-16T09:38:01
verdaccio
verdaccio/verdaccio
16,189
40
```xml <?xml version="1.0" encoding="utf-8" ?> <settings version="1"> <section id="system"> <category id="display"> <group id="1"> <setting id="videoscreen.screenmode"> <visible>true</visible> <default>0192001080060.00000pstd</default> </setting> <setting id="videoscreen.limitedrange"> <visible>false</visible> </setting> <setting id="videoscreen.limitguisize"> <visible>true</visible> <default>3</default> </setting> </group> </category> </section> </settings> ```
/content/code_sandbox/projects/Amlogic/kodi/appliance.xml
xml
2016-03-13T01:46:18
2024-08-16T11:58:29
LibreELEC.tv
LibreELEC/LibreELEC.tv
2,216
149
```xml // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #import "base/message_loop/message_pump_mac.h" #include <dlfcn.h> #import <Foundation/Foundation.h> #include <limits> #include "base/logging.h" #include "base/mac/call_with_eh_frame.h" #include "base/mac/scoped_cftyperef.h" #include "base/message_loop/timer_slack.h" #include "base/run_loop.h" #include "base/time/time.h" #if !defined(OS_IOS) #import <AppKit/AppKit.h> #endif // !defined(OS_IOS) namespace base { namespace { void CFRunLoopAddSourceToAllModes(CFRunLoopRef rl, CFRunLoopSourceRef source) { CFRunLoopAddSource(rl, source, kCFRunLoopCommonModes); CFRunLoopAddSource(rl, source, kMessageLoopExclusiveRunLoopMode); } void CFRunLoopRemoveSourceFromAllModes(CFRunLoopRef rl, CFRunLoopSourceRef source) { CFRunLoopRemoveSource(rl, source, kCFRunLoopCommonModes); CFRunLoopRemoveSource(rl, source, kMessageLoopExclusiveRunLoopMode); } void CFRunLoopAddTimerToAllModes(CFRunLoopRef rl, CFRunLoopTimerRef timer) { CFRunLoopAddTimer(rl, timer, kCFRunLoopCommonModes); CFRunLoopAddTimer(rl, timer, kMessageLoopExclusiveRunLoopMode); } void CFRunLoopRemoveTimerFromAllModes(CFRunLoopRef rl, CFRunLoopTimerRef timer) { CFRunLoopRemoveTimer(rl, timer, kCFRunLoopCommonModes); CFRunLoopRemoveTimer(rl, timer, kMessageLoopExclusiveRunLoopMode); } void CFRunLoopAddObserverToAllModes(CFRunLoopRef rl, CFRunLoopObserverRef observer) { CFRunLoopAddObserver(rl, observer, kCFRunLoopCommonModes); CFRunLoopAddObserver(rl, observer, kMessageLoopExclusiveRunLoopMode); } void CFRunLoopRemoveObserverFromAllModes(CFRunLoopRef rl, CFRunLoopObserverRef observer) { CFRunLoopRemoveObserver(rl, observer, kCFRunLoopCommonModes); CFRunLoopRemoveObserver(rl, observer, kMessageLoopExclusiveRunLoopMode); } void NoOp(void* info) { } const CFTimeInterval kCFTimeIntervalMax = std::numeric_limits<CFTimeInterval>::max(); #if !defined(OS_IOS) // Set to true if MessagePumpMac::Create() is called before NSApp is // initialized. Only accessed from the main thread. bool g_not_using_cr_app = false; #endif // Call through to CFRunLoopTimerSetTolerance(), which is only available on // OS X 10.9. void SetTimerTolerance(CFRunLoopTimerRef timer, CFTimeInterval tolerance) { typedef void (*CFRunLoopTimerSetTolerancePtr)(CFRunLoopTimerRef timer, CFTimeInterval tolerance); static CFRunLoopTimerSetTolerancePtr settimertolerance_function_ptr; static dispatch_once_t get_timer_tolerance_function_ptr_once; dispatch_once(&get_timer_tolerance_function_ptr_once, ^{ NSBundle* bundle =[NSBundle bundleWithPath:@"/System/Library/Frameworks/CoreFoundation.framework"]; const char* path = [[bundle executablePath] fileSystemRepresentation]; CHECK(path); void* library_handle = dlopen(path, RTLD_LAZY | RTLD_LOCAL); CHECK(library_handle) << dlerror(); settimertolerance_function_ptr = reinterpret_cast<CFRunLoopTimerSetTolerancePtr>( dlsym(library_handle, "CFRunLoopTimerSetTolerance")); dlclose(library_handle); }); if (settimertolerance_function_ptr) settimertolerance_function_ptr(timer, tolerance); } } // namespace // static const CFStringRef kMessageLoopExclusiveRunLoopMode = CFSTR("kMessageLoopExclusiveRunLoopMode"); // A scoper for autorelease pools created from message pump run loops. // Avoids dirtying up the ScopedNSAutoreleasePool interface for the rare // case where an autorelease pool needs to be passed in. class MessagePumpScopedAutoreleasePool { public: explicit MessagePumpScopedAutoreleasePool(MessagePumpCFRunLoopBase* pump) : pool_(pump->CreateAutoreleasePool()) { } ~MessagePumpScopedAutoreleasePool() { [pool_ drain]; } private: NSAutoreleasePool* pool_; DISALLOW_COPY_AND_ASSIGN(MessagePumpScopedAutoreleasePool); }; // Must be called on the run loop thread. MessagePumpCFRunLoopBase::MessagePumpCFRunLoopBase() : delegate_(NULL), delayed_work_fire_time_(kCFTimeIntervalMax), timer_slack_(base::TIMER_SLACK_NONE), nesting_level_(0), run_nesting_level_(0), deepest_nesting_level_(0), delegateless_work_(false), delegateless_idle_work_(false) { run_loop_ = CFRunLoopGetCurrent(); CFRetain(run_loop_); // Set a repeating timer with a preposterous firing time and interval. The // timer will effectively never fire as-is. The firing time will be adjusted // as needed when ScheduleDelayedWork is called. CFRunLoopTimerContext timer_context = CFRunLoopTimerContext(); timer_context.info = this; delayed_work_timer_ = CFRunLoopTimerCreate(NULL, // allocator kCFTimeIntervalMax, // fire time kCFTimeIntervalMax, // interval 0, // flags 0, // priority RunDelayedWorkTimer, &timer_context); CFRunLoopAddTimerToAllModes(run_loop_, delayed_work_timer_); CFRunLoopSourceContext source_context = CFRunLoopSourceContext(); source_context.info = this; source_context.perform = RunWorkSource; work_source_ = CFRunLoopSourceCreate(NULL, // allocator 1, // priority &source_context); CFRunLoopAddSourceToAllModes(run_loop_, work_source_); source_context.perform = RunIdleWorkSource; idle_work_source_ = CFRunLoopSourceCreate(NULL, // allocator 2, // priority &source_context); CFRunLoopAddSourceToAllModes(run_loop_, idle_work_source_); source_context.perform = RunNestingDeferredWorkSource; nesting_deferred_work_source_ = CFRunLoopSourceCreate(NULL, // allocator 0, // priority &source_context); CFRunLoopAddSourceToAllModes(run_loop_, nesting_deferred_work_source_); CFRunLoopObserverContext observer_context = CFRunLoopObserverContext(); observer_context.info = this; pre_wait_observer_ = CFRunLoopObserverCreate(NULL, // allocator kCFRunLoopBeforeWaiting, true, // repeat 0, // priority PreWaitObserver, &observer_context); CFRunLoopAddObserverToAllModes(run_loop_, pre_wait_observer_); pre_source_observer_ = CFRunLoopObserverCreate(NULL, // allocator kCFRunLoopBeforeSources, true, // repeat 0, // priority PreSourceObserver, &observer_context); CFRunLoopAddObserverToAllModes(run_loop_, pre_source_observer_); enter_exit_observer_ = CFRunLoopObserverCreate(NULL, // allocator kCFRunLoopEntry | kCFRunLoopExit, true, // repeat 0, // priority EnterExitObserver, &observer_context); CFRunLoopAddObserverToAllModes(run_loop_, enter_exit_observer_); } // Ideally called on the run loop thread. If other run loops were running // lower on the run loop thread's stack when this object was created, the // same number of run loops must be running when this object is destroyed. MessagePumpCFRunLoopBase::~MessagePumpCFRunLoopBase() { CFRunLoopRemoveObserverFromAllModes(run_loop_, enter_exit_observer_); CFRelease(enter_exit_observer_); CFRunLoopRemoveObserverFromAllModes(run_loop_, pre_source_observer_); CFRelease(pre_source_observer_); CFRunLoopRemoveObserverFromAllModes(run_loop_, pre_wait_observer_); CFRelease(pre_wait_observer_); CFRunLoopRemoveSourceFromAllModes(run_loop_, nesting_deferred_work_source_); CFRelease(nesting_deferred_work_source_); CFRunLoopRemoveSourceFromAllModes(run_loop_, idle_work_source_); CFRelease(idle_work_source_); CFRunLoopRemoveSourceFromAllModes(run_loop_, work_source_); CFRelease(work_source_); CFRunLoopRemoveTimerFromAllModes(run_loop_, delayed_work_timer_); CFRelease(delayed_work_timer_); CFRelease(run_loop_); } // Must be called on the run loop thread. void MessagePumpCFRunLoopBase::Run(Delegate* delegate) { // nesting_level_ will be incremented in EnterExitRunLoop, so set // run_nesting_level_ accordingly. int last_run_nesting_level = run_nesting_level_; run_nesting_level_ = nesting_level_ + 1; Delegate* last_delegate = delegate_; SetDelegate(delegate); DoRun(delegate); // Restore the previous state of the object. SetDelegate(last_delegate); run_nesting_level_ = last_run_nesting_level; } void MessagePumpCFRunLoopBase::SetDelegate(Delegate* delegate) { delegate_ = delegate; if (delegate) { // If any work showed up but could not be dispatched for want of a // delegate, set it up for dispatch again now that a delegate is // available. if (delegateless_work_) { CFRunLoopSourceSignal(work_source_); delegateless_work_ = false; } if (delegateless_idle_work_) { CFRunLoopSourceSignal(idle_work_source_); delegateless_idle_work_ = false; } } } // May be called on any thread. void MessagePumpCFRunLoopBase::ScheduleWork() { CFRunLoopSourceSignal(work_source_); CFRunLoopWakeUp(run_loop_); } // Must be called on the run loop thread. void MessagePumpCFRunLoopBase::ScheduleDelayedWork( const TimeTicks& delayed_work_time) { TimeDelta delta = delayed_work_time - TimeTicks::Now(); delayed_work_fire_time_ = CFAbsoluteTimeGetCurrent() + delta.InSecondsF(); CFRunLoopTimerSetNextFireDate(delayed_work_timer_, delayed_work_fire_time_); if (timer_slack_ == TIMER_SLACK_MAXIMUM) { SetTimerTolerance(delayed_work_timer_, delta.InSecondsF() * 0.5); } else { SetTimerTolerance(delayed_work_timer_, 0); } } void MessagePumpCFRunLoopBase::SetTimerSlack(TimerSlack timer_slack) { timer_slack_ = timer_slack; } // Called from the run loop. // static void MessagePumpCFRunLoopBase::RunDelayedWorkTimer(CFRunLoopTimerRef timer, void* info) { MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info); // The timer won't fire again until it's reset. self->delayed_work_fire_time_ = kCFTimeIntervalMax; // CFRunLoopTimers fire outside of the priority scheme for CFRunLoopSources. // In order to establish the proper priority in which work and delayed work // are processed one for one, the timer used to schedule delayed work must // signal a CFRunLoopSource used to dispatch both work and delayed work. CFRunLoopSourceSignal(self->work_source_); } // Called from the run loop. // static void MessagePumpCFRunLoopBase::RunWorkSource(void* info) { MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info); base::mac::CallWithEHFrame(^{ self->RunWork(); }); } // Called by MessagePumpCFRunLoopBase::RunWorkSource. bool MessagePumpCFRunLoopBase::RunWork() { if (!delegate_) { // This point can be reached with a NULL delegate_ if Run is not on the // stack but foreign code is spinning the CFRunLoop. Arrange to come back // here when a delegate is available. delegateless_work_ = true; return false; } // The NSApplication-based run loop only drains the autorelease pool at each // UI event (NSEvent). The autorelease pool is not drained for each // CFRunLoopSource target that's run. Use a local pool for any autoreleased // objects if the app is not currently handling a UI event to ensure they're // released promptly even in the absence of UI events. MessagePumpScopedAutoreleasePool autorelease_pool(this); // Call DoWork and DoDelayedWork once, and if something was done, arrange to // come back here again as long as the loop is still running. bool did_work = delegate_->DoWork(); bool resignal_work_source = did_work; TimeTicks next_time; delegate_->DoDelayedWork(&next_time); if (!did_work) { // Determine whether there's more delayed work, and if so, if it needs to // be done at some point in the future or if it's already time to do it. // Only do these checks if did_work is false. If did_work is true, this // function, and therefore any additional delayed work, will get another // chance to run before the loop goes to sleep. bool more_delayed_work = !next_time.is_null(); if (more_delayed_work) { TimeDelta delay = next_time - TimeTicks::Now(); if (delay > TimeDelta()) { // There's more delayed work to be done in the future. ScheduleDelayedWork(next_time); } else { // There's more delayed work to be done, and its time is in the past. // Arrange to come back here directly as long as the loop is still // running. resignal_work_source = true; } } } if (resignal_work_source) { CFRunLoopSourceSignal(work_source_); } return resignal_work_source; } // Called from the run loop. // static void MessagePumpCFRunLoopBase::RunIdleWorkSource(void* info) { MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info); base::mac::CallWithEHFrame(^{ self->RunIdleWork(); }); } // Called by MessagePumpCFRunLoopBase::RunIdleWorkSource. bool MessagePumpCFRunLoopBase::RunIdleWork() { if (!delegate_) { // This point can be reached with a NULL delegate_ if Run is not on the // stack but foreign code is spinning the CFRunLoop. Arrange to come back // here when a delegate is available. delegateless_idle_work_ = true; return false; } // The NSApplication-based run loop only drains the autorelease pool at each // UI event (NSEvent). The autorelease pool is not drained for each // CFRunLoopSource target that's run. Use a local pool for any autoreleased // objects if the app is not currently handling a UI event to ensure they're // released promptly even in the absence of UI events. MessagePumpScopedAutoreleasePool autorelease_pool(this); // Call DoIdleWork once, and if something was done, arrange to come back here // again as long as the loop is still running. bool did_work = delegate_->DoIdleWork(); if (did_work) { CFRunLoopSourceSignal(idle_work_source_); } return did_work; } // Called from the run loop. // static void MessagePumpCFRunLoopBase::RunNestingDeferredWorkSource(void* info) { MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info); base::mac::CallWithEHFrame(^{ self->RunNestingDeferredWork(); }); } // Called by MessagePumpCFRunLoopBase::RunNestingDeferredWorkSource. bool MessagePumpCFRunLoopBase::RunNestingDeferredWork() { if (!delegate_) { // This point can be reached with a NULL delegate_ if Run is not on the // stack but foreign code is spinning the CFRunLoop. There's no sense in // attempting to do any work or signalling the work sources because // without a delegate, work is not possible. return false; } // Immediately try work in priority order. if (!RunWork()) { if (!RunIdleWork()) { return false; } } else { // Work was done. Arrange for the loop to try non-nestable idle work on // a subsequent pass. CFRunLoopSourceSignal(idle_work_source_); } return true; } // Called before the run loop goes to sleep or exits, or processes sources. void MessagePumpCFRunLoopBase::MaybeScheduleNestingDeferredWork() { // deepest_nesting_level_ is set as run loops are entered. If the deepest // level encountered is deeper than the current level, a nested loop // (relative to the current level) ran since the last time nesting-deferred // work was scheduled. When that situation is encountered, schedule // nesting-deferred work in case any work was deferred because nested work // was disallowed. if (deepest_nesting_level_ > nesting_level_) { deepest_nesting_level_ = nesting_level_; CFRunLoopSourceSignal(nesting_deferred_work_source_); } } // Called from the run loop. // static void MessagePumpCFRunLoopBase::PreWaitObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void* info) { MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info); base::mac::CallWithEHFrame(^{ // Attempt to do some idle work before going to sleep. self->RunIdleWork(); // The run loop is about to go to sleep. If any of the work done since it // started or woke up resulted in a nested run loop running, // nesting-deferred work may have accumulated. Schedule it for processing // if appropriate. self->MaybeScheduleNestingDeferredWork(); }); } // Called from the run loop. // static void MessagePumpCFRunLoopBase::PreSourceObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void* info) { MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info); // The run loop has reached the top of the loop and is about to begin // processing sources. If the last iteration of the loop at this nesting // level did not sleep or exit, nesting-deferred work may have accumulated // if a nested loop ran. Schedule nesting-deferred work for processing if // appropriate. base::mac::CallWithEHFrame(^{ self->MaybeScheduleNestingDeferredWork(); }); } // Called from the run loop. // static void MessagePumpCFRunLoopBase::EnterExitObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void* info) { MessagePumpCFRunLoopBase* self = static_cast<MessagePumpCFRunLoopBase*>(info); switch (activity) { case kCFRunLoopEntry: ++self->nesting_level_; if (self->nesting_level_ > self->deepest_nesting_level_) { self->deepest_nesting_level_ = self->nesting_level_; } break; case kCFRunLoopExit: // Not all run loops go to sleep. If a run loop is stopped before it // goes to sleep due to a CFRunLoopStop call, or if the timeout passed // to CFRunLoopRunInMode expires, the run loop may proceed directly from // handling sources to exiting without any sleep. This most commonly // occurs when CFRunLoopRunInMode is passed a timeout of 0, causing it // to make a single pass through the loop and exit without sleep. Some // native loops use CFRunLoop in this way. Because PreWaitObserver will // not be called in these case, MaybeScheduleNestingDeferredWork needs // to be called here, as the run loop exits. // // MaybeScheduleNestingDeferredWork consults self->nesting_level_ // to determine whether to schedule nesting-deferred work. It expects // the nesting level to be set to the depth of the loop that is going // to sleep or exiting. It must be called before decrementing the // value so that the value still corresponds to the level of the exiting // loop. base::mac::CallWithEHFrame(^{ self->MaybeScheduleNestingDeferredWork(); }); --self->nesting_level_; break; default: break; } base::mac::CallWithEHFrame(^{ self->EnterExitRunLoop(activity); }); } // Called by MessagePumpCFRunLoopBase::EnterExitRunLoop. The default // implementation is a no-op. void MessagePumpCFRunLoopBase::EnterExitRunLoop(CFRunLoopActivity activity) { } // Base version returns a standard NSAutoreleasePool. AutoreleasePoolType* MessagePumpCFRunLoopBase::CreateAutoreleasePool() { return [[NSAutoreleasePool alloc] init]; } MessagePumpCFRunLoop::MessagePumpCFRunLoop() : quit_pending_(false) { } MessagePumpCFRunLoop::~MessagePumpCFRunLoop() {} // Called by MessagePumpCFRunLoopBase::DoRun. If other CFRunLoopRun loops were // running lower on the run loop thread's stack when this object was created, // the same number of CFRunLoopRun loops must be running for the outermost call // to Run. Run/DoRun are reentrant after that point. void MessagePumpCFRunLoop::DoRun(Delegate* delegate) { // This is completely identical to calling CFRunLoopRun(), except autorelease // pool management is introduced. int result; do { MessagePumpScopedAutoreleasePool autorelease_pool(this); result = CFRunLoopRunInMode(kCFRunLoopDefaultMode, kCFTimeIntervalMax, false); } while (result != kCFRunLoopRunStopped && result != kCFRunLoopRunFinished); } // Must be called on the run loop thread. void MessagePumpCFRunLoop::Quit() { // Stop the innermost run loop managed by this MessagePumpCFRunLoop object. if (nesting_level() == run_nesting_level()) { // This object is running the innermost loop, just stop it. CFRunLoopStop(run_loop()); } else { // There's another loop running inside the loop managed by this object. // In other words, someone else called CFRunLoopRunInMode on the same // thread, deeper on the stack than the deepest Run call. Don't preempt // other run loops, just mark this object to quit the innermost Run as // soon as the other inner loops not managed by Run are done. quit_pending_ = true; } } // Called by MessagePumpCFRunLoopBase::EnterExitObserver. void MessagePumpCFRunLoop::EnterExitRunLoop(CFRunLoopActivity activity) { if (activity == kCFRunLoopExit && nesting_level() == run_nesting_level() && quit_pending_) { // Quit was called while loops other than those managed by this object // were running further inside a run loop managed by this object. Now // that all unmanaged inner run loops are gone, stop the loop running // just inside Run. CFRunLoopStop(run_loop()); quit_pending_ = false; } } MessagePumpNSRunLoop::MessagePumpNSRunLoop() : keep_running_(true) { CFRunLoopSourceContext source_context = CFRunLoopSourceContext(); source_context.perform = NoOp; quit_source_ = CFRunLoopSourceCreate(NULL, // allocator 0, // priority &source_context); CFRunLoopAddSourceToAllModes(run_loop(), quit_source_); } MessagePumpNSRunLoop::~MessagePumpNSRunLoop() { CFRunLoopRemoveSourceFromAllModes(run_loop(), quit_source_); CFRelease(quit_source_); } void MessagePumpNSRunLoop::DoRun(Delegate* delegate) { while (keep_running_) { // NSRunLoop manages autorelease pools itself. [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]]; } keep_running_ = true; } void MessagePumpNSRunLoop::Quit() { keep_running_ = false; CFRunLoopSourceSignal(quit_source_); CFRunLoopWakeUp(run_loop()); } #if defined(OS_IOS) MessagePumpUIApplication::MessagePumpUIApplication() : run_loop_(NULL) { } MessagePumpUIApplication::~MessagePumpUIApplication() {} void MessagePumpUIApplication::DoRun(Delegate* delegate) { NOTREACHED(); } void MessagePumpUIApplication::Quit() { NOTREACHED(); } void MessagePumpUIApplication::Attach(Delegate* delegate) { DCHECK(!run_loop_); run_loop_ = new RunLoop(); CHECK(run_loop_->BeforeRun()); SetDelegate(delegate); } #else MessagePumpNSApplication::MessagePumpNSApplication() : keep_running_(true), running_own_loop_(false) { } MessagePumpNSApplication::~MessagePumpNSApplication() {} void MessagePumpNSApplication::DoRun(Delegate* delegate) { bool last_running_own_loop_ = running_own_loop_; // NSApp must be initialized by calling: // [{some class which implements CrAppProtocol} sharedApplication] // Most likely candidates are CrApplication or BrowserCrApplication. // These can be initialized from C++ code by calling // RegisterCrApp() or RegisterBrowserCrApp(). CHECK(NSApp); if (![NSApp isRunning]) { running_own_loop_ = false; // NSApplication manages autorelease pools itself when run this way. [NSApp run]; } else { running_own_loop_ = true; NSDate* distant_future = [NSDate distantFuture]; while (keep_running_) { MessagePumpScopedAutoreleasePool autorelease_pool(this); NSEvent* event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:distant_future inMode:NSDefaultRunLoopMode dequeue:YES]; if (event) { [NSApp sendEvent:event]; } } keep_running_ = true; } running_own_loop_ = last_running_own_loop_; } void MessagePumpNSApplication::Quit() { if (!running_own_loop_) { [[NSApplication sharedApplication] stop:nil]; } else { keep_running_ = false; } // Send a fake event to wake the loop up. [NSApp postEvent:[NSEvent otherEventWithType:NSApplicationDefined location:NSZeroPoint modifierFlags:0 timestamp:0 windowNumber:0 context:NULL subtype:0 data1:0 data2:0] atStart:NO]; } MessagePumpCrApplication::MessagePumpCrApplication() { } MessagePumpCrApplication::~MessagePumpCrApplication() { } // Prevents an autorelease pool from being created if the app is in the midst of // handling a UI event because various parts of AppKit depend on objects that // are created while handling a UI event to be autoreleased in the event loop. // An example of this is NSWindowController. When a window with a window // controller is closed it goes through a stack like this: // (Several stack frames elided for clarity) // // #0 [NSWindowController autorelease] // #1 DoAClose // #2 MessagePumpCFRunLoopBase::DoWork() // #3 [NSRunLoop run] // #4 [NSButton performClick:] // #5 [NSWindow sendEvent:] // #6 [NSApp sendEvent:] // #7 [NSApp run] // // -performClick: spins a nested run loop. If the pool created in DoWork was a // standard NSAutoreleasePool, it would release the objects that were // autoreleased into it once DoWork released it. This would cause the window // controller, which autoreleased itself in frame #0, to release itself, and // possibly free itself. Unfortunately this window controller controls the // window in frame #5. When the stack is unwound to frame #5, the window would // no longer exists and crashes may occur. Apple gets around this by never // releasing the pool it creates in frame #4, and letting frame #7 clean it up // when it cleans up the pool that wraps frame #7. When an autorelease pool is // released it releases all other pools that were created after it on the // autorelease pool stack. // // CrApplication is responsible for setting handlingSendEvent to true just // before it sends the event through the event handling mechanism, and // returning it to its previous value once the event has been sent. AutoreleasePoolType* MessagePumpCrApplication::CreateAutoreleasePool() { if (MessagePumpMac::IsHandlingSendEvent()) return nil; return MessagePumpNSApplication::CreateAutoreleasePool(); } // static bool MessagePumpMac::UsingCrApp() { DCHECK([NSThread isMainThread]); // If NSApp is still not initialized, then the subclass used cannot // be determined. DCHECK(NSApp); // The pump was created using MessagePumpNSApplication. if (g_not_using_cr_app) return false; return [NSApp conformsToProtocol:@protocol(CrAppProtocol)]; } // static bool MessagePumpMac::IsHandlingSendEvent() { DCHECK([NSApp conformsToProtocol:@protocol(CrAppProtocol)]); NSObject<CrAppProtocol>* app = static_cast<NSObject<CrAppProtocol>*>(NSApp); return [app isHandlingSendEvent]; } #endif // !defined(OS_IOS) // static MessagePump* MessagePumpMac::Create() { if ([NSThread isMainThread]) { #if defined(OS_IOS) return new MessagePumpUIApplication; #else if ([NSApp conformsToProtocol:@protocol(CrAppProtocol)]) return new MessagePumpCrApplication; // The main-thread MessagePump implementations REQUIRE an NSApp. // Executables which have specific requirements for their // NSApplication subclass should initialize appropriately before // creating an event loop. [NSApplication sharedApplication]; g_not_using_cr_app = true; return new MessagePumpNSApplication; #endif } return new MessagePumpNSRunLoop; } } // namespace base ```
/content/code_sandbox/orig_chrome/base/message_loop/message_pump_mac.mm
xml
2016-09-27T03:41:10
2024-08-16T10:42:57
miniblink49
weolar/miniblink49
7,069
6,640
```xml <?xml version="1.0" encoding="utf-8"?> <resources> <color name="sak_default_bag">#efefef</color> <color name="sak_color_ffffff">#FFFFFF</color> <color name="sak_color_border">#f1f1f1</color> <color name="sak_color_ff0000">#FF0000</color> <color name="sak_color_ff333333">#FF333333</color> <color name="sak_color_primary">#ff48c09e</color> <color name="sak_color_ff999999">#c2c2c2</color> </resources> ```
/content/code_sandbox/saklib/src/main/res/values/colors.xml
xml
2016-11-30T10:14:50
2024-08-12T19:26:20
SwissArmyKnife
android-notes/SwissArmyKnife
1,346
139
```xml /** * This file is part of OpenMediaVault. * * @license path_to_url GPL Version 3 * @author Volker Theile <volker.theile@openmediavault.org> * * OpenMediaVault is free software: you can redistribute it and/or modify * any later version. * * OpenMediaVault is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ import { Pipe, PipeTransform } from '@angular/core'; import { isFormatable, renderTemplate } from '~/app/functions.helper'; @Pipe({ name: 'template' }) export class TemplatePipe implements PipeTransform { /** * Renders a Nunjucks/Jinja2 template. * * @param value The template to render. * @param data The object containing the data to replace * the tokens. */ transform(value: any, data?: Record<any, any>): any { if (!isFormatable(value)) { return value; } return renderTemplate(value, data); } } ```
/content/code_sandbox/deb/openmediavault/workbench/src/app/shared/pipes/template.pipe.ts
xml
2016-05-03T10:35:34
2024-08-16T08:03:04
openmediavault
openmediavault/openmediavault
4,954
243
```xml import React from 'react'; import { formatCurrency } from 'toolkit/extension/utils/currency'; import type { YNABTransaction } from 'toolkit/types/ynab/data/transaction'; interface TransactionRowProps { transaction: YNABTransaction; } export const TransactionRow = ({ transaction }: TransactionRowProps) => ( <div className="ynab-table-row"> <div className="ynab-table-col">{transaction.account.accountName}</div> <div className="ynab-table-col"> {ynab.YNABSharedLib.dateFormatter.formatDate(transaction.date)} </div> <div className="ynab-table-col"> {transaction.payee && transaction.payee.name ? transaction.payee.name : ''} </div> <div className="ynab-table-col">{transaction.memo}</div> <div className="ynab-table-col amount-column">{formatCurrency(transaction.amount)}</div> </div> ); ```
/content/code_sandbox/src/extension/features/accounts/reconcile-assistant/components/TransactionRow.tsx
xml
2016-01-03T05:38:10
2024-08-13T16:08:09
toolkit-for-ynab
toolkit-for-ynab/toolkit-for-ynab
1,418
197
```xml <Documentation> <Docs DocId="T:MapKit.MKMapView"> <summary>Embeddable Map View.</summary> <remarks> <para>The <see cref="T:MapKit.MKMapView" /> provides a zoomable map interface upon which the application developer can add information-bearing <see cref="T:MapKit.MKAnnotation" />s and area-based <see cref="T:MapKit.MKOverlay" />s. </para> <para>In iOS 7 and later, maps support 3D imagery when the <see cref="P:MapKit.MKMapView.MapType" /> property is <see cref="F:MapKit.MKMapType.Standard" />. To view 3D imagery, the <see cref="P:MapKit.MKMapView.ShowsBuildings" /> property must be <see langword="true" /> and the <see cref="P:MapKit.MKMapView.Camera" /> and and <see cref="P:MapKit.MKMapView.PitchEnabled" /> properties must be set to create a non-vertical perspective. The iOS simulator does not render 3D buildings. The following example shows how a camera can be set to provide 3D imagery:</para> <example> <code lang="csharp lang-csharp"><![CDATA[ var target = new CLLocationCoordinate2D(37.7952, -122.4028); var viewPoint = new CLLocationCoordinate2D(37.8009, -122.4100); //Enable 3D buildings mapView.ShowsBuildings = true; mapView.PitchEnabled = true; var camera = MKMapCamera.CameraLookingAtCenterCoordinate(target, viewPoint, 500); mapView.Camera = camera; ]]></code> </example> <para> <img href="~/MapKit/_images/MKMapCamera.png" alt="Image showing 3D map mode" /> </para> <format type="text/html"> <h3>Overlays</h3> </format> <para>iOS distinguishes between the <see cref="T:MapKit.MKOverlay" />, which represents the geometry of an overlay, and it's visual presentation. Prior to iOS 7, overlays were rendered using <see cref="T:MapKit.MKOverlayView" />s. In iOS 7, these classes have been deprecated, and overlays now use the more efficient subclasses of <see cref="T:MapKit.MKOverlayRenderer" />. </para> <para>To create an overlay and its renderer, application developers must add the overlay to the <see cref="T:MapKit.MKMapView" /> and return the renderer either using the <see cref="P:MapKit.MKMapView.OverlayRenderer" /> property or by overriding the <see cref="M:MapKit.MKMapViewDelegate.OverlayRenderer(MapKit.MKMapView,MapKit.IMKOverlay)" /> method.</para> <example> <code lang="csharp lang-csharp"><![CDATA[ MKPolygon hotelOverlay = MKPolygon.FromCoordinates(coordinates); mkMap.AddOverlay (hotelOverlay); var polygon = MKPolygon.FromCoordinates(coordinates); var renderer = new MKPolygonRenderer(polygon) { FillColor = UIColor.Red, Alpha = 0.5f }; mkMap.OverlayRenderer = (view, overlay) => renderer; ]]></code> </example> <para> <img href="~/MapKit/_images/MKOverlayRenderer.png" alt="Screenshot showing a custom overlay" /> </para> </remarks> <related type="recipe" href="path_to_url">Add an Annotation to a Map</related> <related type="recipe" href="path_to_url">Add an Overlay to a Map</related> <related type="recipe" href="path_to_url">Change Map Modes</related> <related type="recipe" href="path_to_url">Display Device Location</related> <related type="recipe" href="path_to_url">Handle Annotation Click</related> <related type="externalDocumentation" href="path_to_url">Apple documentation for <c>MKMapView</c></related> </Docs> </Documentation> ```
/content/code_sandbox/docs/api/MapKit/MKMapView.xml
xml
2016-04-20T18:24:26
2024-08-16T13:29:19
xamarin-macios
xamarin/xamarin-macios
2,436
894
```xml import { AccumulatorMap } from './AccumulatorMap.js'; /** * Groups array items into a Map, given a function to produce grouping key. */ export function groupBy<K, T>( list: ReadonlyArray<T>, keyFn: (item: T) => K, ): Map<K, ReadonlyArray<T>> { const result = new AccumulatorMap<K, T>(); for (const item of list) { result.add(keyFn(item), item); } return result; } ```
/content/code_sandbox/grafast/grafast/vendor/graphql-js/jsutils/groupBy.ts
xml
2016-04-14T21:29:19
2024-08-16T17:12:51
crystal
graphile/crystal
12,539
106
```xml import { useFocusEffect } from '@react-navigation/native'; import * as React from 'react'; export default function NavigationEvents(props: { children?: any; onDidFocus: () => void }) { useFocusEffect( React.useCallback(() => { props.onDidFocus(); }, [props.onDidFocus]) ); return props.children ?? null; } ```
/content/code_sandbox/apps/expo-go/src/components/NavigationEvents.tsx
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
78
```xml import * as Blockly from "blockly"; import { InlineSvgsExtensionBlock } from "../functions"; type IfElseMixinType = typeof IF_ELSE_MIXIN; interface IfElseMixin extends IfElseMixinType { } export type IfElseBlock = InlineSvgsExtensionBlock & IfElseMixin; const IF_ELSE_MIXIN = { elseifCount_: 0, elseCount_: 0, valueConnections_: [] as Blockly.Connection[], statementConnections_: [] as Blockly.Connection[], elseStatementConnection_: null as Blockly.Connection, /** * Create XML to represent the number of else-if and else inputs. * @return {Element} XML storage element. * @this Blockly.Block */ mutationToDom: function (this: IfElseBlock) { if (!this.elseifCount_ && !this.elseCount_) { return null; } const container = Blockly.utils.xml.createElement('mutation'); if (this.elseifCount_) { container.setAttribute('elseif', this.elseifCount_ + ""); } if (this.elseCount_) { container.setAttribute('else', "1"); } return container; }, /** * Parse XML to restore the else-if and else inputs. * @param {!Element} xmlElement XML storage element. * @this Blockly.Block */ domToMutation: function (this: IfElseBlock, xmlElement: Element) { if (!xmlElement) return; this.elseifCount_ = parseInt(xmlElement.getAttribute('elseif'), 10) || 0; this.elseCount_ = parseInt(xmlElement.getAttribute('else'), 10) || 0; this.rebuildShape_(); }, /** * Store pointers to any connected child blocks. */ storeConnections_: function (this: IfElseBlock, arg?: number) { if (!arg) arg = 0; this.valueConnections_ = [null]; this.statementConnections_ = [null]; this.elseStatementConnection_ = null; for (let i = 1; i <= this.elseifCount_; i++) { if (arg != i) { this.valueConnections_.push(this.getInput('IF' + i).connection.targetConnection); this.statementConnections_.push(this.getInput('DO' + i).connection.targetConnection); } } if (this.getInput('ELSE')) this.elseStatementConnection_ = this.getInput('ELSE').connection.targetConnection; }, /** * Restore pointers to any connected child blocks. */ restoreConnections_: function (this: IfElseBlock) { for (let i = 1; i <= this.elseifCount_; i++) { this.getInput('IF' + i).connection.setShadowState({ 'type': 'logic_boolean', 'fields': { 'BOOL': 'FALSE' } }); this.valueConnections_[i]?.reconnect(this, 'IF' + i); this.statementConnections_[i]?.reconnect(this, 'DO' + i); } if (this.getInput('ELSE')) this.elseStatementConnection_?.reconnect(this, 'ELSE'); }, addElse_: function (this: IfElseBlock) { this.storeConnections_(); const update = () => { this.elseCount_++; }; this.update_(update); this.restoreConnections_(); }, removeElse_: function (this: IfElseBlock) { this.storeConnections_(); const update = () => { this.elseCount_--; }; this.update_(update); this.restoreConnections_(); }, addElseIf_: function (this: IfElseBlock) { this.storeConnections_(); const update = () => { this.elseifCount_++; }; this.update_(update); this.restoreConnections_(); }, removeElseIf_: function (this: IfElseBlock, arg: number) { this.storeConnections_(arg); const update = () => { this.elseifCount_--; }; this.update_(update); this.restoreConnections_(); }, update_: function (this: IfElseBlock, update: () => void) { Blockly.Events.setGroup(true); const block = this; const oldMutationDom = block.mutationToDom(); const oldMutation = oldMutationDom && Blockly.Xml.domToText(oldMutationDom); // Update the mutation if (update) update.call(this); // Allow the source block to rebuild itself. this.updateShape_(); // Mutation may have added some elements that need initializing. if (block instanceof Blockly.BlockSvg) { block.initSvg(); } // Ensure that any bump is part of this mutation's event group. const group = Blockly.Events.getGroup(); const newMutationDom = block.mutationToDom(); const newMutation = newMutationDom && Blockly.Xml.domToText(newMutationDom); if (oldMutation != newMutation) { Blockly.Events.fire(new Blockly.Events.BlockChange( block, 'mutation', null, oldMutation, newMutation)); setTimeout(function () { Blockly.Events.setGroup(group); block.bumpNeighbours(); Blockly.Events.setGroup(false); }, Blockly.config.bumpDelay); } if (block.rendered && block instanceof Blockly.BlockSvg) { block.render(); } Blockly.Events.setGroup(false); }, /** * Modify this block to have the correct number of inputs. * @this Blockly.Block * @private */ updateShape_: function (this: IfElseBlock) { // Delete everything. if (this.getInput('ELSE')) { this.removeInput('ELSE'); this.removeInput('ELSETITLE'); this.removeInput('ELSEBUTTONS'); } let i = 1; while (this.getInput('IF' + i)) { this.removeInput('IF' + i); this.removeInput('IFTITLE' + i); this.removeInput('IFBUTTONS' + i); this.removeInput('DO' + i); i++; } // Rebuild block. for (let i = 1; i <= this.elseifCount_; i++) { const removeElseIf = function (arg) { return function () { that.removeElseIf_(arg); }; }(i); this.appendValueInput('IF' + i) .setCheck('Boolean') .appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSEIF); this.appendDummyInput('IFTITLE' + i) .appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN); this.appendDummyInput('IFBUTTONS' + i) .appendField( new Blockly.FieldImage(this.REMOVE_IMAGE_DATAURI, 24, 24, "*", removeElseIf, false)) .setAlign(Blockly.inputs.Align.RIGHT); this.appendStatementInput('DO' + i); } if (this.elseCount_) { this.appendDummyInput('ELSETITLE') .appendField(Blockly.Msg.CONTROLS_IF_MSG_ELSE); this.appendDummyInput('ELSEBUTTONS') .setAlign(Blockly.inputs.Align.RIGHT) .appendField( new Blockly.FieldImage(this.REMOVE_IMAGE_DATAURI, 24, 24, "*", this.removeElse_.bind(this), false)); this.appendStatementInput('ELSE'); } if (this.getInput('ADDBUTTON')) this.removeInput('ADDBUTTON'); const that = this; const addElseIf = function () { return function () { if (that.elseCount_ == 0) { that.addElse_(); } else { if (!that.elseifCount_) that.elseifCount_ = 0; that.addElseIf_(); } }; }(); this.appendDummyInput('ADDBUTTON') .appendField( new Blockly.FieldImage(this.ADD_IMAGE_DATAURI, 24, 24, "*", addElseIf, false)); }, /** * Reconstructs the block with all child blocks attached. */ rebuildShape_: function (this: IfElseBlock) { const valueConnections: Blockly.Connection[] = [null]; const statementConnections: Blockly.Connection[] = [null]; let elseStatementConnection: Blockly.Connection = null; if (this.getInput('ELSE')) { elseStatementConnection = this.getInput('ELSE').connection.targetConnection; } let i = 1; while (this.getInput('IF' + i)) { const inputIf = this.getInput('IF' + i); const inputDo = this.getInput('DO' + i); valueConnections.push(inputIf.connection.targetConnection); statementConnections.push(inputDo.connection.targetConnection); i++; } this.updateShape_(); this.reconnectChildBlocks_(valueConnections, statementConnections, elseStatementConnection); }, /** * Reconnects child blocks. * @param {!Array<?Blockly.RenderedConnection>} valueConnections List of value * connectsions for if input. * @param {!Array<?Blockly.RenderedConnection>} statementConnections List of * statement connections for do input. * @param {?Blockly.RenderedConnection} elseStatementConnection Statement * connection for else input. */ reconnectChildBlocks_: function (this: IfElseBlock, valueConnections: Blockly.Connection[], statementConnections: Blockly.Connection[], elseStatementConnection: Blockly.Connection) { for (let i = 1; i <= this.elseifCount_; i++) { valueConnections[i]?.reconnect(this, 'IF' + i); statementConnections[i]?.reconnect(this, 'DO' + i); } elseStatementConnection?.reconnect(this, 'ELSE'); } }; Blockly.Blocks["controls_if"] = { ...IF_ELSE_MIXIN, init(this: IfElseBlock) { Blockly.Extensions.apply('inline-svgs', this, false); this.elseifCount_ = 0; this.elseCount_ = 0; this.setHelpUrl(Blockly.Msg.CONTROLS_IF_HELPURL); this.appendValueInput('IF0') .setCheck('Boolean') .appendField(Blockly.Msg.CONTROLS_IF_MSG_IF); this.appendDummyInput('THEN0') .appendField(Blockly.Msg.CONTROLS_IF_MSG_THEN); this.appendStatementInput('DO0'); if (this.workspace instanceof Blockly.WorkspaceSvg) { const renderer = this.workspace.getRenderer(); this.setOutputShape(renderer.getConstants().SHAPES["HEXAGONAL"]); } this.updateShape_(); this.setInputsInline(true); this.setColour(Blockly.Msg.LOGIC_HUE); this.setPreviousStatement(true); this.setNextStatement(true); this.setTooltip(() => { if (!this.elseifCount_ && !this.elseCount_) { return Blockly.Msg['CONTROLS_IF_TOOLTIP_1']; } else if (!this.elseifCount_ && this.elseCount_) { return Blockly.Msg['CONTROLS_IF_TOOLTIP_2']; } else if (this.elseifCount_ && !this.elseCount_) { return Blockly.Msg['CONTROLS_IF_TOOLTIP_3']; } else if (this.elseifCount_ && this.elseCount_) { return Blockly.Msg['CONTROLS_IF_TOOLTIP_4']; } return ''; }); } } ```
/content/code_sandbox/pxtblocks/plugins/logic/ifElse.ts
xml
2016-01-24T19:35:52
2024-08-16T16:39:39
pxt
microsoft/pxt
2,069
2,407
```xml @sealed class Greeter { greeting: string; constructor(message: string) { this.greeting = message; } greet() { return "Hello, " + this.greeting; } } ```
/content/code_sandbox/tests/format/typescript/decorators-ts/class-decorator.ts
xml
2016-11-29T17:13:37
2024-08-16T17:29:57
prettier
prettier/prettier
48,913
47
```xml import cn from 'classnames'; import { bind } from 'decko'; import * as React from 'react'; import { OperatorType, IDateFilterData, NumberFilterOperator, } from 'shared/models/Filters'; import DatePicker from 'shared/view/elements/DatePicker/DatePicker'; import styles from './DateFilterEditor.module.css'; import FilterSelect from '../FilterSelect/FilterSelect'; interface ILocalProps { data: IDateFilterData; onChange: (newData: IDateFilterData) => void; isReadonly?: boolean; } const operatorOptions = (() => { const map: { [T in NumberFilterOperator]: { value: T; label: string } } = { [OperatorType.MORE]: { value: OperatorType.MORE, label: '>', }, [OperatorType.GREATER_OR_EQUALS]: { value: OperatorType.GREATER_OR_EQUALS, label: '>=', }, [OperatorType.EQUALS]: { value: OperatorType.EQUALS, label: '=', }, [OperatorType.NOT_EQUALS]: { value: OperatorType.NOT_EQUALS, label: '!=', }, [OperatorType.LESS]: { value: OperatorType.LESS, label: '<', }, [OperatorType.LESS_OR_EQUALS]: { value: OperatorType.LESS_OR_EQUALS, label: '<=', }, }; return Object.values(map); })(); export default class DateFilterEditor extends React.Component< ILocalProps, { value: number | undefined } > { public state: { value: number | undefined } = { value: this.props.data.value, }; public render() { const { data, isReadonly } = this.props; return ( <div className={cn(styles.root, { [styles.readonly]: isReadonly, })} > <div> <FilterSelect options={operatorOptions} currentOption={operatorOptions.find(o => o.value === data.operator)} onChange={({ value }) => this.onComparisonChanged(value)} isReadonly={isReadonly} /> </div> <div className={styles.input}> <DatePicker value={this.state.value ? new Date(this.state.value) : undefined} onChange={value => { this.setState({ value: +value, }); }} onBlur={this.onBlur} onKeyDown={this.onSubmit} /> </div> </div> ); } @bind private onSave(data: IDateFilterData) { if (this.props.onChange) { this.props.onChange(data); } } @bind private onComparisonChanged(operator: NumberFilterOperator) { this.onSave({ ...this.props.data, operator, }); } @bind private onSubmit(event: React.KeyboardEvent<HTMLInputElement>) { if (this.state.value && event.key === 'Enter') { this.onSave({ ...this.props.data, value: +this.state.value, }); } } @bind private onBlur() { if (this.state.value) { this.onSave({ ...this.props.data, value: +this.state.value }); } } } ```
/content/code_sandbox/webapp/client/src/features/filter/view/FilterManager/InstantFilterItem/DateFilterEditor/DateFilterEditor.tsx
xml
2016-10-19T01:07:26
2024-08-14T03:53:55
modeldb
VertaAI/modeldb
1,689
699
```xml /** * @packageDocumentation * @module @xarc/jsx-renderer */ /* eslint-disable filenames/match-regex */ import { processToken } from "../process-token"; /** * Require and invoke a token module with process handler * * @param props * @param context * @param scope */ export function Require(props: any, context: any, scope: any) { return processToken(props, context, scope, true); } ```
/content/code_sandbox/packages/xarc-jsx-renderer/src/tags/Require.ts
xml
2016-09-06T19:02:39
2024-08-11T11:43:11
electrode
electrode-io/electrode
2,103
96
```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 --> <assembly xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <id>dist</id> <baseDirectory>${project.artifactId}-${project.version}</baseDirectory> <!-- Output tar.gz --> <formats> <format>tar.gz</format> </formats> <!-- Include licenses and extension .jar --> <fileSets> <!-- Include licenses --> <fileSet> <outputDirectory></outputDirectory> <directory>target/licenses</directory> </fileSet> <!-- Include extension .jar --> <fileSet> <directory>target</directory> <outputDirectory></outputDirectory> <includes> <include>*.jar</include> </includes> </fileSet> </fileSets> </assembly> ```
/content/code_sandbox/extensions/guacamole-auth-radius/src/main/assembly/dist.xml
xml
2016-03-22T07:00:06
2024-08-16T13:03:48
guacamole-client
apache/guacamole-client
1,369
274
```xml import { Command } from '@expo/commander'; import chalk from 'chalk'; import { performance } from 'perf_hooks'; import logger from '../Logger'; import { Package, getPackageByName } from '../Packages'; import { buildFrameworksForProjectAsync, cleanTemporaryFilesAsync, cleanFrameworksAsync, generateXcodeProjectSpecAsync, PACKAGES_TO_PREBUILD, } from '../prebuilds/Prebuilder'; import XcodeProject from '../prebuilds/XcodeProject'; type ActionOptions = { removeArtifacts: boolean; cleanCache: boolean; generateSpecs: boolean; }; async function main(packageNames: string[], options: ActionOptions) { const filteredPackageNames = packageNames.length > 0 ? packageNames.filter((name) => PACKAGES_TO_PREBUILD.includes(name)) : PACKAGES_TO_PREBUILD; if (options.cleanCache) { logger.info(' Cleaning shared derived data directory'); await XcodeProject.cleanBuildFolderAsync(); } const packages = filteredPackageNames.map(getPackageByName).filter(Boolean) as Package[]; if (options.removeArtifacts) { logger.info(' Removing existing artifacts'); await cleanFrameworksAsync(packages); // Stop here, it doesn't make much sense to build them again ;) return; } for (const pkg of packages) { logger.info(` Prebuilding ${chalk.green(pkg.packageName)}`); const startTime = performance.now(); const xcodeProject = await generateXcodeProjectSpecAsync(pkg); if (!options.generateSpecs) { await buildFrameworksForProjectAsync(xcodeProject); await cleanTemporaryFilesAsync(xcodeProject); } const endTime = performance.now(); const timeDiff = (endTime - startTime) / 1000; logger.success(' Finished in: %s\n', chalk.magenta(timeDiff.toFixed(2) + 's')); } } export default (program: Command) => { program .command('prebuild-packages [packageNames...]') .description('Generates `.xcframework` artifacts for iOS packages.') .alias('prebuild') .option('-r, --remove-artifacts', 'Removes `.xcframework` artifacts for given packages.', false) .option('-c, --clean-cache', 'Cleans the shared derived data folder before prebuilding.', false) .option('-g, --generate-specs', 'Only generates project specs', false) .asyncAction(main); }; ```
/content/code_sandbox/tools/src/commands/PrebuildPackages.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
524
```xml <clickhouse> <macros> <default_cluster_macro>test_cluster_two_shards</default_cluster_macro> </macros> </clickhouse> ```
/content/code_sandbox/tests/integration/test_storage_hdfs/configs/macro.xml
xml
2016-06-02T08:28:18
2024-08-16T18:39:33
ClickHouse
ClickHouse/ClickHouse
36,234
33
```xml <vector xmlns:android="path_to_url" android:height="24dp" android:viewportHeight="200.0" android:viewportWidth="200.0" android:width="24dp"> <path android:fillColor="#f30b0b" android:pathData="M38.31,87.64c2.68,0 5.26,-0.97 7.29,-2.73 2.24,-1.95 3.59,-4.65 3.8,-7.61 0.06,-0.83 0.01,-1.65 -0.11,-2.46 0.02,-0.02 0.04,-0.03 0.06,-0.05l2.68,-2.33c0.69,-0.6 0.76,-1.64 0.16,-2.33 -0.6,-0.69 -1.64,-0.76 -2.33,-0.16l-1.69,1.47c-0.4,-0.78 -0.89,-1.52 -1.48,-2.2 -0.55,-0.63 -1.16,-1.19 -1.83,-1.67l1.66,-1.44c0.69,-0.6 0.76,-1.64 0.16,-2.33 -0.6,-0.69 -1.64,-0.76 -2.33,-0.16l-2.67,2.32c-1.08,-0.35 -2.22,-0.53 -3.39,-0.53 -2.68,0 -5.26,0.97 -7.29,2.73 -3.03,2.63 -4.27,6.56 -3.65,10.25l-2.67,2.32c-0.69,0.6 -0.76,1.64 -0.16,2.33 0.33,0.38 0.79,0.57 1.25,0.57 0.38,0 0.77,-0.13 1.08,-0.4l1.65,-1.44c0.38,0.72 0.85,1.4 1.4,2.04 0.59,0.68 1.26,1.26 1.98,1.77l-1.69,1.47c-0.69,0.6 -0.76,1.64 -0.16,2.33 0.33,0.38 0.79,0.57 1.25,0.57 0.38,0 0.77,-0.13 1.08,-0.41l2.68,-2.33c0.02,-0.02 0.03,-0.04 0.05,-0.06C36.14,87.47 37.21,87.64 38.31,87.64zM33.18,70.64c1.42,-1.24 3.24,-1.92 5.12,-1.92 2.26,0 4.41,0.98 5.9,2.69 1.37,1.57 2.04,3.59 1.9,5.67 -0.15,2.08 -1.09,3.98 -2.67,5.35 -1.42,1.24 -3.24,1.92 -5.12,1.92 -2.26,0 -4.41,-0.98 -5.9,-2.69C29.59,78.41 29.93,73.46 33.18,70.64zM53.71,36.97c0.27,0 0.55,-0.07 0.8,-0.21l1.82,-1.02 1.01,1.82c0.3,0.54 0.87,0.85 1.44,0.85 0.27,0 0.55,-0.07 0.8,-0.21 0.8,-0.44 1.08,-1.45 0.64,-2.25l-1.01,-1.82 1.83,-1.02c0.8,-0.44 1.08,-1.45 0.64,-2.25 -0.44,-0.8 -1.45,-1.08 -2.25,-0.64l-1.82,1.02 -1.02,-1.83c-0.44,-0.8 -1.45,-1.08 -2.25,-0.64 -0.8,0.44 -1.08,1.45 -0.64,2.25l1.02,1.83 -1.83,1.02c-0.8,0.44 -1.08,1.45 -0.64,2.25C52.57,36.67 53.13,36.97 53.71,36.97zM37.74,78.41c0.04,0.05 0.09,0.08 0.13,0.12 0.18,0.28 0.44,0.51 0.77,0.64 0.2,0.08 0.41,0.12 0.62,0.12 0.65,0 1.27,-0.39 1.53,-1.03l1.93,-4.77c0.34,-0.85 -0.06,-1.81 -0.91,-2.15 -0.85,-0.34 -1.81,0.06 -2.15,0.91l-0.92,2.27 -2.3,-2.65c-0.6,-0.69 -1.64,-0.76 -2.33,-0.16 -0.69,0.6 -0.76,1.64 -0.16,2.33L37.74,78.41zM48.78,47.64c0.65,1.17 1.91,1.87 3.38,1.87 0.81,0 1.62,-0.22 2.36,-0.63l16.84,-9.37c2.12,-1.18 3.01,-3.66 1.97,-5.53l-7.24,-13c-0.65,-1.17 -1.91,-1.87 -3.38,-1.87 -0.81,0 -1.62,0.22 -2.36,0.63l-2.38,1.33 -1.09,-1.96c-0.5,-0.9 -1.33,-1.56 -2.33,-1.84 -1,-0.29 -2.04,-0.16 -2.95,0.34l-5.3,2.95c-0.91,0.5 -1.56,1.33 -1.84,2.33 -0.28,1 -0.16,2.04 0.34,2.95l1.09,1.96 -2.38,1.33c-2.12,1.18 -3.01,3.66 -1.97,5.53L48.78,47.64zM47.69,24.22c-0.1,-0.18 -0.07,-0.35 -0.05,-0.44 0.02,-0.09 0.09,-0.24 0.27,-0.34l5.3,-2.95c0.18,-0.1 0.35,-0.07 0.44,-0.05 0.09,0.02 0.24,0.09 0.35,0.27l1.09,1.96 -6.3,3.51L47.69,24.22zM45.12,32l16.83,-9.37c0.24,-0.14 0.51,-0.21 0.76,-0.21 0.23,0 0.43,0.07 0.49,0.17l7.24,13c0.1,0.18 -0.09,0.71 -0.69,1.04l-16.84,9.37c-0.47,0.26 -1.13,0.24 -1.25,0.04l-7.23,-13C44.33,32.86 44.52,32.33 45.12,32zM132.78,42.71c5.09,0 9.22,-4.14 9.22,-9.23 0,-4.65 -6.74,-11.29 -8.09,-12.57l-1.14,-1.08 -1.14,1.08c-1.35,1.28 -8.09,7.91 -8.09,12.57C123.56,38.57 127.7,42.71 132.78,42.71zM132.78,24.44c2.75,2.86 5.92,6.95 5.92,9.04 0,3.26 -2.66,5.92 -5.92,5.92 -3.26,0 -5.92,-2.66 -5.92,-5.92C126.86,31.39 130.03,27.3 132.78,24.44zM175.74,104.24c0,-0.33 -0.01,-0.65 -0.02,-0.98 0,-0.12 0.02,-0.24 0.02,-0.36 0,-0.55 -0.03,-1.09 -0.09,-1.63 -1.14,-20.53 -13.95,-39.02 -32.83,-47.32 5.32,-5.62 8.32,-13.08 8.32,-20.84 0,-16.73 -13.61,-30.35 -30.34,-30.35 -16.74,0 -30.35,13.61 -30.35,30.35 0,7.76 3.01,15.22 8.33,20.84 -19.43,8.53 -32.42,27.85 -32.9,49.08l-21.47,0c-4.31,0 -7.81,3.5 -7.81,7.81l0,0.1 9.24,79c0.05,4.26 3.54,7.71 7.81,7.71l100.97,0c4.27,0 7.75,-3.45 7.81,-7.71l8.94,-76.42c2.26,-2.27 3.78,-5.27 4.23,-8.59C175.69,104.72 175.74,104.49 175.74,104.24zM168.22,111.92c-2.05,1.72 -4.69,2.77 -7.58,2.77 -5.31,0 -9.8,-3.52 -11.28,-8.35l14.49,0c2.45,0 4.46,1.97 4.51,4.42L168.22,111.92zM163.85,103.03 L148.86,103.03c0,-0.05 -0.01,-0.09 -0.01,-0.14 0,-6.5 5.29,-11.79 11.79,-11.79 6.06,0 11.06,4.59 11.72,10.47 0.03,0.56 0.05,1.13 0.06,1.7 -0.06,1.76 -0.5,3.41 -1.24,4.9C170.09,105.18 167.22,103.03 163.85,103.03zM102.32,56.06l2.53,-0.97 -2.03,-1.8c-5.77,-5.14 -9.08,-12.49 -9.08,-20.17 0,-14.91 12.13,-27.04 27.05,-27.04 14.91,0 27.04,12.13 27.04,27.04 0,7.68 -3.31,15.03 -9.07,20.17l-2.02,1.8 2.53,0.97c15.88,6.1 27.58,19.72 31.62,35.78 -2.7,-2.5 -6.29,-4.04 -10.25,-4.04 -8.32,0 -15.09,6.77 -15.09,15.1 0,0.05 0.01,0.09 0.01,0.14l-11.12,0 0,-6.65c0,-16.71 -13.6,-30.31 -30.31,-30.31 -16.71,0 -30.31,13.6 -30.31,30.31l0,6.65 -4.64,0C69.67,82.31 82.86,63.53 102.32,56.06zM119.23,89.07c0,-8.32 -6.77,-15.1 -15.1,-15.1 -8.32,0 -15.1,6.77 -15.1,15.1 0,6.3 3.88,11.7 9.37,13.97L77.13,103.03l0,-6.65c0,-14.89 12.11,-27 27,-27 14.89,0 27,12.11 27,27l0,6.65L109.85,103.03C115.35,100.77 119.23,95.37 119.23,89.07zM104.13,100.87c-6.5,0 -11.79,-5.29 -11.79,-11.8 0,-6.5 5.29,-11.79 11.79,-11.79 6.5,0 11.79,5.29 11.79,11.79C115.92,95.57 110.63,100.87 104.13,100.87zM159.13,189.64l-0.01,0.19c0,2.49 -2.02,4.51 -4.51,4.51L53.64,194.34c-2.49,0 -4.51,-2.02 -4.51,-4.51l0,-0.1 -9.24,-78.98c0.05,-2.44 2.05,-4.42 4.51,-4.42l29.42,0 0,15.72c-3.23,0.75 -5.65,3.64 -5.65,7.1 0,4.03 3.27,7.3 7.3,7.3 4.03,0 7.3,-3.27 7.3,-7.3 0,-3.46 -2.41,-6.35 -5.65,-7.1l0,-15.72L131.13,106.34l0,15.72c-3.24,0.75 -5.65,3.64 -5.65,7.1 0,4.03 3.27,7.3 7.3,7.3 4.03,0 7.3,-3.27 7.3,-7.3 0,-3.46 -2.41,-6.35 -5.65,-7.1l0,-15.72 11.52,0c1.56,6.67 7.55,11.66 14.68,11.66 2.56,0 4.96,-0.64 7.07,-1.77L159.13,189.64zM73.06,153.08c-2.7,0 -4.91,0.73 -6.65,2.2 -2.28,1.73 -3.79,4.33 -4.52,7.78 -0.73,3.39 -0.32,5.98 1.2,7.78 1.12,1.47 3.03,2.2 5.72,2.2 2.7,0 4.91,-0.73 6.64,-2.2 2.29,-1.8 3.79,-4.4 4.52,-7.78 0.73,-3.46 0.33,-6.05 -1.2,-7.78C77.67,153.81 75.76,153.08 73.06,153.08zM76.05,163.07c-0.45,2.13 -1.26,3.76 -2.43,4.92 -1.16,1.15 -2.53,1.73 -4.09,1.73 -1.56,0 -2.68,-0.58 -3.37,-1.73 -0.68,-1.15 -0.8,-2.79 -0.35,-4.92 0.45,-2.13 1.27,-3.76 2.44,-4.92 1.17,-1.15 2.54,-1.73 4.1,-1.73 1.56,0 2.68,0.58 3.35,1.74C76.38,159.31 76.49,160.95 76.05,163.07zM90.03,158.13c-2.4,0 -4.34,0.74 -5.84,2.21 -1.49,1.48 -2.45,3.22 -2.88,5.24 -0.44,2.05 -0.22,3.8 0.65,5.26 0.87,1.46 2.5,2.18 4.9,2.18 2.4,0 4.34,-0.73 5.83,-2.18 1.49,-1.46 2.45,-3.21 2.89,-5.26 0.43,-2.01 0.21,-3.76 -0.65,-5.24C94.05,158.86 92.42,158.13 90.03,158.13zM91.74,165.58c-0.3,1.4 -0.82,2.48 -1.55,3.24 -0.73,0.76 -1.63,1.14 -2.7,1.14s-1.81,-0.38 -2.22,-1.14c-0.41,-0.76 -0.47,-1.84 -0.17,-3.24 0.3,-1.4 0.81,-2.48 1.55,-3.23 0.73,-0.75 1.63,-1.13 2.7,-1.13s1.81,0.38 2.22,1.13C91.98,163.1 92.04,164.18 91.74,165.58zM110.93,160.34c-0.86,-1.48 -2.49,-2.21 -4.89,-2.21 -2.4,0 -4.34,0.74 -5.84,2.21 -1.49,1.48 -2.45,3.22 -2.88,5.24 -0.44,2.05 -0.22,3.8 0.65,5.26 0.87,1.46 2.5,2.18 4.9,2.18 2.4,0 4.34,-0.73 5.83,-2.18 1.49,-1.46 2.45,-3.21 2.89,-5.26C112.01,163.56 111.8,161.82 110.93,160.34zM107.76,165.58c-0.3,1.4 -0.81,2.48 -1.55,3.24 -0.73,0.76 -1.64,1.14 -2.7,1.14 -1.07,0 -1.81,-0.38 -2.22,-1.14 -0.41,-0.76 -0.47,-1.84 -0.17,-3.24 0.3,-1.4 0.81,-2.48 1.55,-3.23 0.73,-0.75 1.63,-1.13 2.7,-1.13 1.07,0 1.81,0.38 2.22,1.13C108,163.1 108.06,164.18 107.76,165.58zM123.29,158.27c-1.12,0 -2.15,0.31 -3.08,0.93 -0.52,0.35 -1.04,0.83 -1.56,1.43l0.44,-2.06 -3.5,0 -4.13,19.45 3.61,0 1.55,-7.27c0.26,0.59 0.56,1.04 0.9,1.34 0.61,0.55 1.48,0.83 2.59,0.83 1.74,0 3.3,-0.64 4.68,-1.93 1.38,-1.29 2.33,-3.16 2.85,-5.62 0.5,-2.33 0.3,-4.1 -0.57,-5.3C126.17,158.87 124.92,158.27 123.29,158.27zM123.81,165.55c-0.27,1.31 -0.76,2.35 -1.46,3.14 -0.7,0.79 -1.56,1.18 -2.57,1.18 -0.7,0 -1.27,-0.19 -1.7,-0.58 -0.72,-0.66 -0.9,-1.8 -0.56,-3.42 0.22,-1.02 0.53,-1.87 0.92,-2.54 0.76,-1.25 1.8,-1.88 3.12,-1.88 1.1,0 1.81,0.41 2.13,1.24C124,163.52 124.04,164.47 123.81,165.55zM141.17,159.22c-0.95,-0.7 -2.29,-1.04 -4.03,-1.04 -1.84,0 -3.36,0.46 -4.56,1.39 -1.21,0.93 -1.95,2.03 -2.22,3.32 -0.24,1.09 -0.09,1.93 0.44,2.51 0.52,0.59 1.53,1.08 3.02,1.47 2.08,0.52 3.27,0.89 3.57,1.1 0.3,0.21 0.41,0.53 0.32,0.93 -0.09,0.43 -0.38,0.75 -0.85,0.96 -0.47,0.21 -1.06,0.32 -1.78,0.32 -1.22,0 -2,-0.24 -2.34,-0.73 -0.2,-0.27 -0.28,-0.73 -0.22,-1.38l-3.7,0c-0.3,1.43 -0.02,2.61 0.82,3.54 0.85,0.93 2.37,1.39 4.56,1.39 2.15,0 3.83,-0.44 5.04,-1.31 1.21,-0.87 1.97,-2 2.27,-3.39 0.22,-1.05 0.05,-1.93 -0.52,-2.63 -0.58,-0.69 -1.56,-1.21 -2.93,-1.55 -2.07,-0.48 -3.27,-0.82 -3.58,-1.01 -0.32,-0.19 -0.44,-0.49 -0.35,-0.91 0.07,-0.33 0.3,-0.62 0.69,-0.87 0.39,-0.25 0.98,-0.37 1.77,-0.37 0.96,0 1.6,0.25 1.9,0.74 0.15,0.27 0.21,0.65 0.17,1.11l3.65,0C142.5,161.12 142.12,159.92 141.17,159.22zM147.47,158.51 L146.67,167.32 148.58,167.32 151.48,158.51 152.5,153.72 148.5,153.72ZM144.59,172.53 L148.41,172.53 149.19,168.83 145.37,168.83Z"/> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/erro_404.xml
xml
2016-02-20T13:10:14
2024-08-14T07:53:05
SeeWeather
xcc3641/SeeWeather
3,448
6,064
```xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:id="@+id/SSSSSSS" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.gtr.test.Test_Fragment_Activity" android:orientation="horizontal"> <FrameLayout android:id="@+id/sssssss" android:background="#555555" android:layout_height="250dp" android:layout_width="250dp"> </FrameLayout> <Button android:id="@+id/button10" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button" /> <Button android:id="@+id/button12" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:text="Button" /> </LinearLayout> ```
/content/code_sandbox/android/GTDemo/app/src/main/res/layout/activity_test_fragment.xml
xml
2016-01-13T10:29:55
2024-08-13T06:40:00
GT
Tencent/GT
4,384
236
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="path_to_url"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|ARM"> <Configuration>Debug</Configuration> <Platform>ARM</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|ARM"> <Configuration>Release</Configuration> <Platform>ARM</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{223c5d97-3200-4a3e-85a2-480415f24aba}</ProjectGuid> <Keyword>Win32Proj</Keyword> <ProjectName>cx_attributes</ProjectName> <RootNamespace>cx_attributes</RootNamespace> <DefaultLanguage>en-US</DefaultLanguage> <MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion> <AppContainerApplication>true</AppContainerApplication> <ApplicationType>Windows Store</ApplicationType> <ApplicationTypeRevision>8.1</ApplicationTypeRevision> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>DynamicLibrary</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <WholeProgramOptimization>true</WholeProgramOptimization> <PlatformToolset>v120</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <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|ARM'"> <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|ARM'"> <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 /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <GenerateManifest>false</GenerateManifest> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <GenerateManifest>false</GenerateManifest> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> <GenerateManifest>false</GenerateManifest> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> <GenerateManifest>false</GenerateManifest> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <GenerateManifest>false</GenerateManifest> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <GenerateManifest>false</GenerateManifest> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <PrecompiledHeader>Use</PrecompiledHeader> <PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile> <PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile> <AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories> <AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions> </ClCompile> <Link> <SubSystem>Console</SubSystem> <AdditionalDependencies>runtimeobject.lib;%(AdditionalDependencies)</AdditionalDependencies> <IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries> </Link> </ItemDefinitionGroup> <ItemGroup> <ClInclude Include="pch.h" /> <ClInclude Include="Class1.h" /> </ItemGroup> <ItemGroup> <ClCompile Include="pch.cpp"> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader> <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader> </ClCompile> <ClCompile Include="Class1.cpp" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project> ```
/content/code_sandbox/docs/cppcx/codesnippet/CPP/cx_attributes/cx_attributes.vcxproj
xml
2016-11-14T19:38:32
2024-08-16T09:06:37
cpp-docs
MicrosoftDocs/cpp-docs
1,425
2,880
```xml import type { IconName } from '@fortawesome/fontawesome-svg-core'; import React, { type FC } from 'react'; import { Button, Collection, Header, ListBox, ListBoxItem, Popover, Section, Select, SelectValue } from 'react-aria-components'; import { useParams, useRouteLoaderData } from 'react-router-dom'; import { CONTENT_TYPE_EDN, CONTENT_TYPE_FILE, CONTENT_TYPE_FORM_DATA, CONTENT_TYPE_FORM_URLENCODED, CONTENT_TYPE_GRAPHQL, CONTENT_TYPE_JSON, CONTENT_TYPE_OTHER, CONTENT_TYPE_PLAINTEXT, CONTENT_TYPE_XML, CONTENT_TYPE_YAML, getContentTypeName, METHOD_POST, } from '../../../common/constants'; import type { Request, RequestBody, RequestHeader, RequestParameter } from '../../../models/request'; import { deconstructQueryStringToParams } from '../../../utils/url/querystring'; import { SegmentEvent } from '../../analytics'; import { useRequestPatcher } from '../../hooks/use-request'; import type { RequestLoaderData } from '../../routes/request'; import { Icon } from '../icon'; import { showAlert } from '../modals/index'; const EMPTY_MIME_TYPE = null; const contentTypeSections: { id: string; icon: IconName; name: string; items: { id: string; name: string; }[]; }[] = [ { id: 'structured', name: 'Structured', icon: 'bars', items: [ { id: CONTENT_TYPE_FORM_DATA, name: 'Form Data', }, { id: CONTENT_TYPE_FORM_URLENCODED, name: 'Form URL Encoded', }, { id: CONTENT_TYPE_GRAPHQL, name: 'GraphQL', }, ], }, { id: 'text', icon: 'code', name: 'Text', items: [ { id: CONTENT_TYPE_JSON, name: 'JSON', }, { id: CONTENT_TYPE_XML, name: 'XML', }, { id: CONTENT_TYPE_YAML, name: 'YAML', }, { id: CONTENT_TYPE_EDN, name: 'EDN', }, { id: CONTENT_TYPE_PLAINTEXT, name: 'Plain Text', }, { id: CONTENT_TYPE_OTHER, name: 'Other', }, ], }, { id: 'other', icon: 'ellipsis-h', name: 'Other', items: [ { id: CONTENT_TYPE_FILE, name: 'File', }, { id: 'no-body', name: 'No Body', }, ], }, ]; export const ContentTypeDropdown: FC = () => { const { activeRequest } = useRouteLoaderData('request/:requestId') as RequestLoaderData; const patchRequest = useRequestPatcher(); const { requestId } = useParams() as { requestId: string }; const handleChangeMimeType = async (mimeType: string | null) => { const { body } = activeRequest; const hasMimeType = 'mimeType' in body; if (hasMimeType && body.mimeType === mimeType) { // Nothing to do since the mimeType hasn't changed return; } const hasParams = 'params' in body && body.params && body.params.length; const hasText = body.text && body.text.length; const hasFile = 'fileName' in body && body.fileName && body.fileName.length; const isEmpty = !hasParams && !hasText && !hasFile; const isFile = hasMimeType && body.mimeType === CONTENT_TYPE_FILE; const isMultipart = hasMimeType && body.mimeType === CONTENT_TYPE_FORM_DATA; const isFormUrlEncoded = hasMimeType && body.mimeType === CONTENT_TYPE_FORM_URLENCODED; const isText = !isFile && !isMultipart; const willBeFile = mimeType === CONTENT_TYPE_FILE; const willBeMultipart = mimeType === CONTENT_TYPE_FORM_DATA; const willBeGraphQL = mimeType === CONTENT_TYPE_GRAPHQL; const willConvertToText = !willBeGraphQL && !willBeFile && !willBeMultipart; const willPreserveText = willConvertToText && isText; const willPreserveForm = isFormUrlEncoded && willBeMultipart; if (!isEmpty && !willPreserveText && !willPreserveForm) { showAlert({ title: 'Switch Body Type?', message: 'Current body will be lost. Are you sure you want to continue?', addCancel: true, onConfirm: async () => { patchRequest(requestId, { body: { mimeType } }); window.main.trackSegmentEvent({ event: SegmentEvent.requestBodyTypeSelect, properties: { type: mimeType } }); }, }); } else { patchRequest(requestId, { body: { mimeType } }); window.main.trackSegmentEvent({ event: SegmentEvent.requestBodyTypeSelect, properties: { type: mimeType } }); } }; const { body } = activeRequest; const hasMimeType = 'mimeType' in body; const hasParams = body && 'params' in body && body.params; const numBodyParams = hasParams ? body.params?.filter(({ disabled }) => !disabled).length : 0; return ( <Select aria-label="Change Body Type" name="body-type" onSelectionChange={mimeType => { if (mimeType === 'no-body') { handleChangeMimeType(EMPTY_MIME_TYPE); } else { handleChangeMimeType(mimeType.toString()); } }} selectedKey={body.mimeType ?? 'no-body'} > <Button className="px-4 min-w-[12ch] py-1 font-bold flex flex-1 items-center justify-between gap-2 aria-pressed:bg-[--hl-sm] rounded-sm text-[--color-font] hover:bg-[--hl-xs] focus:ring-inset ring-1 ring-transparent focus:ring-[--hl-md] transition-all text-sm"> <SelectValue className="flex truncate items-center justify-center gap-2"> <div className='flex items-center gap-2 text-[--hl]'> {hasMimeType ? getContentTypeName(body.mimeType) : 'No Body'} {numBodyParams ? <span className='p-1 min-w-6 h-6 flex items-center justify-center text-xs rounded-lg border border-solid border-[--hl]'> {numBodyParams} </span> : null} </div> </SelectValue> <Icon icon="caret-down" /> </Button> <Popover className="min-w-max"> <ListBox items={contentTypeSections} className="border select-none text-sm min-w-max border-solid border-[--hl-sm] shadow-lg bg-[--color-bg] py-2 rounded-md overflow-y-auto max-h-[85vh] focus:outline-none" > {section => ( <Section> <Header className='pl-2 py-1 flex items-center gap-2 text-[--hl] text-xs uppercase'> <Icon icon={section.icon} /> <span>{section.name}</span> </Header> <Collection items={section.items}> {item => ( <ListBoxItem className="flex gap-2 px-[--padding-md] aria-selected:font-bold items-center text-[--color-font] h-[--line-height-xs] w-full text-md whitespace-nowrap bg-transparent hover:bg-[--hl-sm] disabled:cursor-not-allowed focus:bg-[--hl-xs] focus:outline-none transition-colors" aria-label={item.name} textValue={item.name} > {({ isSelected }) => ( <> <span>{item.name}</span> {isSelected && ( <Icon icon="check" className="text-[--color-success] justify-self-end" /> )} </> )} </ListBoxItem> )} </Collection> </Section> )} </ListBox> </Popover> </Select> ); }; export function newBodyGraphQL(rawBody: string): RequestBody { try { // Only strip the newlines if rawBody is a parsable JSON JSON.parse(rawBody); return { mimeType: CONTENT_TYPE_GRAPHQL, text: rawBody.replace(/\\\\n/g, ''), }; } catch (error) { if (error instanceof SyntaxError) { return { mimeType: CONTENT_TYPE_GRAPHQL, text: rawBody, }; } else { throw error; } } } export const updateMimeType = ( request: Request, mimeType: string | null, ): { body: RequestBody; headers: RequestHeader[]; params?: RequestParameter[]; method?: string } => { const withoutContentType = request.headers.filter(h => h?.name?.toLowerCase() !== 'content-type'); // 'No body' selected if (typeof mimeType !== 'string') { return { body: {}, headers: withoutContentType, }; } if (mimeType === CONTENT_TYPE_GRAPHQL) { return { body: newBodyGraphQL(request.body.text || ''), headers: [{ name: 'Content-Type', value: CONTENT_TYPE_JSON }, ...withoutContentType], method: METHOD_POST, }; } if (mimeType === CONTENT_TYPE_FORM_URLENCODED || mimeType === CONTENT_TYPE_FORM_DATA) { const params = request.body.params || deconstructQueryStringToParams(request.body.text); return { body: { mimeType, params }, headers: [{ name: 'Content-Type', value: mimeType || '' }, ...withoutContentType], }; } if (mimeType === CONTENT_TYPE_FILE) { return { body: { mimeType, fileName: '' }, headers: [{ name: 'Content-Type', value: mimeType || '' }, ...withoutContentType], }; } return { body: { mimeType: mimeType.split(';')[0], text: request.body.text || '' }, headers: [{ name: 'Content-Type', value: mimeType || '' }, ...withoutContentType], }; }; ```
/content/code_sandbox/packages/insomnia/src/ui/components/dropdowns/content-type-dropdown.tsx
xml
2016-04-23T03:54:26
2024-08-16T16:50:44
insomnia
Kong/insomnia
34,054
2,170
```xml <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup> <Description>Stateless Service Application</Description> <TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks> <ImplicitUsings>disable</ImplicitUsings> <Nullable>disable</Nullable> <AssemblyName>OcelotApplicationService</AssemblyName> <PackageId>OcelotApplicationService</PackageId> <PackageTargetFallback>$(PackageTargetFallback)</PackageTargetFallback> <PlatformTarget>x64</PlatformTarget> </PropertyGroup> <ItemGroup> <None Remove="global.json" /> </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.ServiceFabric" Version="10.1.1541" /> <PackageReference Include="Microsoft.ServiceFabric.Services" Version="7.1.1541" /> <PackageReference Include="Microsoft.ServiceFabric.AspNetCore.Kestrel" Version="7.1.1541" /> </ItemGroup> </Project> ```
/content/code_sandbox/samples/ServiceFabric/DownstreamService/Ocelot.Samples.ServiceFabric.DownstreamService.csproj
xml
2016-06-29T20:35:24
2024-08-15T16:00:38
Ocelot
ThreeMammals/Ocelot
8,277
222
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import isPositiveZerof = require( './index' ); // TESTS // // The function returns a boolean... { isPositiveZerof( 0 ); // $ExpectType boolean isPositiveZerof( -0 ); // $ExpectType boolean isPositiveZerof( 2 ); // $ExpectType boolean } // The compiler throws an error if the function is provided a value other than a number... { isPositiveZerof( true ); // $ExpectError isPositiveZerof( false ); // $ExpectError isPositiveZerof( null ); // $ExpectError isPositiveZerof( undefined ); // $ExpectError isPositiveZerof( [] ); // $ExpectError isPositiveZerof( {} ); // $ExpectError isPositiveZerof( ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided an unsupported number of arguments... { isPositiveZerof(); // $ExpectError isPositiveZerof( undefined, 123 ); // $ExpectError } ```
/content/code_sandbox/lib/node_modules/@stdlib/math/base/assert/is-positive-zerof/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
285
```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>15A178l</string> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>AirPortAtheros40</string> <key>CFBundleGetInfoString</key> <key>CFBundleIdentifier</key> <string>com.apple.driver.AirPort.Atheros40</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>AirPortAtheros40</string> <key>CFBundlePackageType</key> <string>KEXT</string> <key>CFBundleShortVersionString</key> <string>7.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleSupportedPlatforms</key> <array> <string>MacOSX</string> </array> <key>CFBundleVersion</key> <string>700.74.5</string> <key>DTCompiler</key> <string>com.apple.compilers.llvm.clang.1_0</string> <key>DTPlatformBuild</key> <string>7A176g</string> <key>DTPlatformVersion</key> <string>GM</string> <key>DTSDKBuild</key> <string>15A283</string> <key>DTSDKName</key> <string>macosx10.11internal</string> <key>DTXcode</key> <string>0700</string> <key>DTXcodeBuild</key> <string>7A176g</string> <key>IOKitPersonalities</key> <dict> <key>Atheros Wireless LAN PCI</key> <dict> <key>CFBundleIdentifier</key> <string>com.apple.driver.AirPort.Atheros40</string> <key>IOClass</key> <string>AirPort_AtherosNewma40</string> <key>IOMatchCategory</key> <string>IODefaultMatchCategory</string> <key>IONameMatch</key> <array> <string>pci168c,36</string> </array> <key>IOProbeScore</key> <integer>700</integer> <key>IOProviderClass</key> <string>IOPCIDevice</string> </dict> </dict> <key>OSBundleLibraries</key> <dict> <key>com.apple.iokit.IO80211Family</key> <string>600.0</string> <key>com.apple.iokit.IONetworkingFamily</key> <string>3.1</string> <key>com.apple.iokit.IOPCIFamily</key> <string>2.8</string> <key>com.apple.kpi.bsd</key> <string>13.0.0</string> <key>com.apple.kpi.iokit</key> <string>13.0.0</string> <key>com.apple.kpi.libkern</key> <string>13.0.0</string> <key>com.apple.kpi.mach</key> <string>13.0.0</string> <key>com.apple.kpi.unsupported</key> <string>13.0.0</string> </dict> <key>OSBundleRequired</key> <string>Network-Root</string> </dict> </plist> ```
/content/code_sandbox/Clover-Configs/Asus/FX50J/CLOVER/kexts/10.12/IO80211Family.kext/Contents/PlugIns/AirPortAtheros40.kext/Contents/Info.plist
xml
2016-11-05T04:22:54
2024-08-12T19:25:53
Hackintosh-Installer-University
huangyz0918/Hackintosh-Installer-University
3,937
881
```xml import spawnAsync from '@expo/spawn-async'; import { vol } from 'memfs'; import { mockSpawnPromise } from '../../__tests__/spawn-utils'; import { NativeToolingVersionCheck } from '../NativeToolingVersionCheck'; jest.mock('fs'); const projectRoot = '/tmp/project'; // required by runAsync const additionalProjectProps = { exp: { name: 'name', slug: 'slug', }, pkg: { name: 'name', version: '1.0.0' }, projectRoot, hasUnusedStaticConfig: false, staticConfigPath: null, dynamicConfigPath: null, }; describe('runAsync', () => { const platform = process.platform; const mockPlatform = (value: string) => Object.defineProperty(process, 'platform', { value, }); afterEach(() => { vol.reset(); mockPlatform(platform); }); describe('on macOS', () => { beforeEach(() => { mockPlatform('darwin'); }); it('returns result with isSuccessful = true if ios folder present, Cocoapods >= 1.15.2', async () => { jest.mocked(spawnAsync).mockImplementationOnce(() => mockSpawnPromise( Promise.resolve({ status: 0, stdout: '1.15.2', }) ) ); vol.fromJSON({ [projectRoot + '/ios/Podfile']: 'test', }); const check = new NativeToolingVersionCheck(); const result = await check.runAsync(additionalProjectProps); expect(result.isSuccessful).toBeTruthy(); }); it('returns result with isSuccessful = false if ios folder present, Cocoapods = 1.15.1', async () => { jest.mocked(spawnAsync).mockImplementationOnce(() => mockSpawnPromise( Promise.resolve({ status: 0, stdout: '1.15.1', }) ) ); vol.fromJSON({ [projectRoot + '/ios/Podfile']: 'test', }); const check = new NativeToolingVersionCheck(); const result = await check.runAsync(additionalProjectProps); expect(result.isSuccessful).toBeFalsy(); }); it('returns result with isSuccessful = false if ios folder present, Cocoapods version returns nonsense', async () => { jest.mocked(spawnAsync).mockImplementationOnce(() => mockSpawnPromise( Promise.resolve({ status: 0, stdout: 'slartibartfast', }) ) ); vol.fromJSON({ [projectRoot + '/ios/Podfile']: 'test', }); const check = new NativeToolingVersionCheck(); const result = await check.runAsync(additionalProjectProps); expect(result.isSuccessful).toBeFalsy(); }); it('returns result with isSuccessful = false if ios folder present, Cocoapods version check fails', async () => { jest.mocked(spawnAsync).mockImplementationOnce(() => { const error: any = new Error(); error.status = -1; return mockSpawnPromise(Promise.reject(error)); }); vol.fromJSON({ [projectRoot + '/ios/Podfile']: 'test', }); const check = new NativeToolingVersionCheck(); const result = await check.runAsync(additionalProjectProps); expect(result.isSuccessful).toBeFalsy(); }); it('returns result with isSuccessful = true if no ios folder present, even if Cocoapods = 1.15.1', async () => { jest.mocked(spawnAsync).mockImplementationOnce(() => mockSpawnPromise( Promise.resolve({ status: 0, stdout: '1.15.1', }) ) ); const check = new NativeToolingVersionCheck(); const result = await check.runAsync(additionalProjectProps); expect(result.isSuccessful).toBeTruthy(); }); }); test('on non-macOS, skips Cocoapods check and returns true', () => { mockPlatform('win32'); const check = new NativeToolingVersionCheck(); const result = check.runAsync(additionalProjectProps); expect(result).resolves.toMatchObject({ isSuccessful: true }); }); }); ```
/content/code_sandbox/packages/expo-doctor/src/checks/__tests__/NativeToolingVersionCheck.test.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
901
```xml import { requireNativeComponent } from 'react-native'; export default requireNativeComponent('RNSLifecycleAwareView'); ```
/content/code_sandbox/apps/native-component-list/src/screens/Screens/navigation/LifecycleAwareView.native.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
24
```xml import * as React from 'react'; import { createSvgIcon } from '../utils/createSvgIcon'; export const RaiseHandColoredIcon = createSvgIcon({ svg: ({ classes }) => ( <svg role="presentation" focusable="false" viewBox="8 8 16 16" className={classes.svg}> <defs> <linearGradient id="a" x1="14.98" y1="-2502.59" x2="14.98" y2="-2509.04" gradientTransform="matrix(1, 0, 0, -1, 0, -2486)" gradientUnits="userSpaceOnUse" > <stop offset="0" stopColor="#fdce4c" /> <stop offset="0.25" stopColor="#fec342" /> <stop offset="0.7" stopColor="#ffa528" /> <stop offset="0.75" stopColor="#ffa225" /> <stop offset="0.89" stopColor="#fda227" /> <stop offset="0.96" stopColor="#f7a22e" /> <stop offset="1" stopColor="#eda339" /> </linearGradient> </defs> <path d="M22.43,16.09h0a1.83,1.83,0,0,0-1.25-1.25,3,3,0,0,0-2.3.34c.06-.91.16-2.44.27-4.06a1.77,1.77,0,0,0-.45-1.3,2,2,0,0,0-1.36-.64h-.19a1.94,1.94,0,0,0-3.4-.32,1.48,1.48,0,0,0-.55-.06,1.89,1.89,0,0,0-1.37.58,1.78,1.78,0,0,0-.5,1.28v.16h0a2,2,0,0,0-1.35.64,1.77,1.77,0,0,0-.45,1.3l.22,3.16,0,.93a9.94,9.94,0,0,0,.5,3.72,5.78,5.78,0,0,0,1,1.67l.11.14C11.72,24,13.68,24,14.53,24h.25c1,0,3-.13,3.29-2A11.14,11.14,0,0,0,20,19.44l.12-.2.06-.15a1.74,1.74,0,0,1,1-1C22.74,17.51,22.53,16.41,22.43,16.09Z" fill="#303030" /> <path d="M17.25,10.18a.94.94,0,0,0-.76.37.29.29,0,0,0-.24,0c0-.22,0-.45,0-.68A.87.87,0,0,0,15.39,9a.89.89,0,0,0-.93.8v.55a.4.4,0,0,0-.24-.07l-.14,0a.92.92,0,0,0-.8-.5.86.86,0,0,0-.94.83c0,.39,0,.78,0,1.16A.42.42,0,0,0,12,12a1,1,0,0,0-.57-.19.87.87,0,0,0-.91.87l.22,3.18a.86.86,0,0,0,.9.76h5.31a.87.87,0,0,0,.9-.77c.13-1.6.24-3.22.32-4.82V11A.86.86,0,0,0,17.25,10.18Z" fill="#fdce4c" /> <path d="M17.38,18.53c0-.76,1.07-1.8,1.61-2.23a2.56,2.56,0,0,1,1.49-.56c.47,0,1,.27,1,.8s-.43.51-.71.64a2.78,2.78,0,0,0-1.56,1.61,1.08,1.08,0,0,1-.95.61A.82.82,0,0,1,17.38,18.53Zm-.33,1.36" fill="#fdc443" /> <path d="M18.12,17.18c-.15.09-.44,0-.37-.54s.06-.55.1-1.24c0-.18-7.17-.23-7.13.48,0,.42,0,.56,0,1a8.93,8.93,0,0,0,.44,3.35c.43,1.14,1.08,1.52,1.13,1.86.12.75,1,.91,2.22.92s2.42,0,2.55-1.25l.1-.32a10.1,10.1,0,0,0,2-2.65C19.27,18.73,18.12,17.18,18.12,17.18Z" fill="url(#a)" /> <path d="M14.38,20.09c-.4,0-.45-.36-.45-.68a2.89,2.89,0,0,1,2.84-2.77c.35,0,1.3.17,1.3.63a.4.4,0,0,1-.41.38c-.23,0-.46-.25-.89-.25a2.1,2.1,0,0,0-2,2c0,.1,0,.2,0,.3A.4.4,0,0,1,14.38,20.09Z" fill="#8a5835" /> <path d="M12.49,16a.41.41,0,0,1-.42-.36l-.14-3.44a.41.41,0,0,1,.45-.39.39.39,0,0,1,.39.36l.14,3.44A.41.41,0,0,1,12.49,16Z" fill="#8a5835" /> <path d="M14.28,15.53a.39.39,0,0,1-.41-.37l-.07-4.5a.4.4,0,0,1,.42-.38.39.39,0,0,1,.41.37l.07,4.49A.42.42,0,0,1,14.28,15.53Z" fill="#8a5835" /> <path d="M16.1,15.6a.39.39,0,0,1-.4-.39l.19-4.33a.41.41,0,0,1,.44-.37.41.41,0,0,1,.4.4l-.2,4.32A.4.4,0,0,1,16.1,15.6Z" fill="#8a5835" /> </svg> ), displayName: 'RaiseHandColoredIcon', }); ```
/content/code_sandbox/packages/fluentui/react-icons-northstar/src/components/RaiseHandColoredIcon.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
1,799
```xml <?xml version="1.0" encoding="utf-8" ?> <controls:TestContentPage xmlns="path_to_url" xmlns:controls="clr-namespace:Xamarin.Forms.Controls" xmlns:x="path_to_url" xmlns:d="path_to_url" xmlns:mc="path_to_url" mc:Ignorable="d" x:Class="Xamarin.Forms.Controls.Issues.Issue9196"> <ContentPage.Content> <StackLayout> <Label Text="Success"/> <CollectionView x:Name="ReceiptsCollection" SelectionMode="Single" ItemSizingStrategy="MeasureAllItems" ItemsSource="{Binding ReceiptsList}"> <CollectionView.EmptyView> <StackLayout Padding="30"> <Label Text="No Receipt Available" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" LineBreakMode="WordWrap" Margin="0,10"></Label> </StackLayout> </CollectionView.EmptyView> <CollectionView.ItemTemplate> <DataTemplate> <StackLayout> <Grid Padding="10"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="2*"/> <ColumnDefinition Width="1*"/> </Grid.ColumnDefinitions> <Label VerticalOptions="CenterAndExpand" Text="DateTime"/> <Label VerticalOptions="CenterAndExpand" FontAttributes="Bold" Grid.Column="1" HorizontalTextAlignment="End"> <Label.FormattedText> <FormattedString> <Span Text="$" /> <Span Text="100" /> </FormattedString> </Label.FormattedText> </Label> <Label VerticalOptions="CenterAndExpand" Grid.Row="1" Grid.ColumnSpan="2" Text="Item"/> </Grid> </StackLayout> </DataTemplate> </CollectionView.ItemTemplate> </CollectionView> </StackLayout> </ContentPage.Content> </controls:TestContentPage> ```
/content/code_sandbox/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue9196.xaml
xml
2016-03-18T15:52:03
2024-08-16T16:25:43
Xamarin.Forms
xamarin/Xamarin.Forms
5,637
445
```xml // Not complete definition export interface YNABAccountsService { selectedAccountId: string | null; collapsedSplits: { [transactionID: string]: boolean; }; filters: { reconciled: boolean; scheduled: boolean; set: (field: string, value: any) => void; applyFilters: VoidFunction; }; // Field here might be nested (e.g. 'filters.scheduled') addObserver: (field: string, cb: (target: YNABAccountsService, field: string) => void) => void; } ```
/content/code_sandbox/src/types/ynab/services/YNABAccountsService.ts
xml
2016-01-03T05:38:10
2024-08-13T16:08:09
toolkit-for-ynab
toolkit-for-ynab/toolkit-for-ynab
1,418
124
```xml <?xml version="1.0" encoding="UTF-8"?> <coverage generated="%i"> <project timestamp="%i" name="BankAccount"> <file name="%s/BankAccount.php"> <class name="BankAccount" namespace="global"> <metrics methods="4" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="10" coveredstatements="5" elements="14" coveredelements="8"/> </class> <line num="6" type="method" name="getBalance" crap="1" count="2"/> <line num="8" type="stmt" count="2"/> <line num="11" type="method" name="setBalance" crap="6" count="0"/> <line num="13" type="stmt" count="0"/> <line num="14" type="stmt" count="0"/> <line num="15" type="stmt" count="0"/> <line num="16" type="stmt" count="0"/> <line num="18" type="stmt" count="0"/> <line num="20" type="method" name="depositMoney" crap="1" count="2"/> <line num="22" type="stmt" count="2"/> <line num="24" type="stmt" count="1"/> <line num="27" type="method" name="withdrawMoney" crap="1" count="2"/> <line num="29" type="stmt" count="2"/> <line num="31" type="stmt" count="1"/> <metrics loc="33" ncloc="33" classes="1" methods="4" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="10" coveredstatements="5" elements="14" coveredelements="8"/> </file> <metrics files="1" loc="33" ncloc="33" classes="1" methods="4" coveredmethods="3" conditionals="0" coveredconditionals="0" statements="10" coveredstatements="5" elements="14" coveredelements="8"/> </project> </coverage> ```
/content/code_sandbox/samples/development-frameworks/laravel/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml
xml
2016-03-11T21:42:56
2024-08-16T09:31:00
sql-server-samples
microsoft/sql-server-samples
9,855
470
```xml import { AndroidConfig, XML } from '@expo/config-plugins' import { resolve } from 'path' import { addLocationPermissionToManifest, addScanPermissionToManifest, addBLEHardwareFeatureToManifest } from '../withBLEAndroidManifest' const { readAndroidManifestAsync } = AndroidConfig.Manifest const sampleManifestPath = resolve(__dirname, 'fixtures/AndroidManifest.xml') describe('addLocationPermissionToManifest', () => { it(`adds elements`, async () => { let androidManifest = await readAndroidManifestAsync(sampleManifestPath) androidManifest = addLocationPermissionToManifest(androidManifest, false) expect(androidManifest.manifest['uses-permission-sdk-23']).toContainEqual({ $: { 'android:name': 'android.permission.ACCESS_COARSE_LOCATION' } }) expect(androidManifest.manifest['uses-permission-sdk-23']).toContainEqual({ $: { 'android:name': 'android.permission.ACCESS_FINE_LOCATION' } }) // Sanity expect(XML.format(androidManifest)).toMatch( /<uses-permission-sdk-23 android:name="android\.permission\.ACCESS_COARSE_LOCATION"\/>/ ) expect(XML.format(androidManifest)).toMatch( /<uses-permission-sdk-23 android:name="android\.permission\.ACCESS_FINE_LOCATION"\/>/ ) }) it(`adds elements with SDK limit`, async () => { let androidManifest = await readAndroidManifestAsync(sampleManifestPath) androidManifest = addLocationPermissionToManifest(androidManifest, true) expect(androidManifest.manifest['uses-permission-sdk-23']).toContainEqual({ $: { 'android:name': 'android.permission.ACCESS_COARSE_LOCATION', 'android:maxSdkVersion': '30' } }) expect(androidManifest.manifest['uses-permission-sdk-23']).toContainEqual({ $: { 'android:name': 'android.permission.ACCESS_FINE_LOCATION', 'android:maxSdkVersion': '30' } }) // Sanity expect(XML.format(androidManifest)).toMatch( /<uses-permission-sdk-23 android:name="android\.permission\.ACCESS_COARSE_LOCATION" android:maxSdkVersion="30"\/>/ ) expect(XML.format(androidManifest)).toMatch( /<uses-permission-sdk-23 android:name="android\.permission\.ACCESS_FINE_LOCATION" android:maxSdkVersion="30"\/>/ ) }) }) describe('addScanPermissionToManifest', () => { it(`adds element`, async () => { let androidManifest = await readAndroidManifestAsync(sampleManifestPath) androidManifest = addScanPermissionToManifest(androidManifest, false) expect(androidManifest.manifest['uses-permission']).toContainEqual({ $: { 'android:name': 'android.permission.BLUETOOTH_SCAN', 'tools:targetApi': '31' } }) // Sanity expect(XML.format(androidManifest)).toMatch( /<uses-permission android:name="android\.permission\.BLUETOOTH_SCAN" tools:targetApi="31"\/>/ ) }) it(`adds element with 'neverForLocation' attribute`, async () => { let androidManifest = await readAndroidManifestAsync(sampleManifestPath) androidManifest = addScanPermissionToManifest(androidManifest, true) expect(androidManifest.manifest['uses-permission']).toContainEqual({ $: { 'android:name': 'android.permission.BLUETOOTH_SCAN', 'android:usesPermissionFlags': 'neverForLocation', 'tools:targetApi': '31' } }) // Sanity expect(XML.format(androidManifest)).toMatch( /<uses-permission android:name="android\.permission\.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation" tools:targetApi="31"\/>/ ) }) }) describe('addBLEHardwareFeatureToManifest', () => { it(`adds element`, async () => { let androidManifest = await readAndroidManifestAsync(sampleManifestPath) androidManifest = addBLEHardwareFeatureToManifest(androidManifest) expect(androidManifest.manifest['uses-feature']).toStrictEqual([ { $: { 'android:name': 'android.hardware.bluetooth_le', 'android:required': 'true' } } ]) // Sanity expect(XML.format(androidManifest)).toMatch( /<uses-feature android:name="android\.hardware\.bluetooth_le" android:required="true"\/>/ ) }) }) ```
/content/code_sandbox/plugin/src/__tests__/withBLEAndroidManifest-test.ts
xml
2016-07-27T10:57:27
2024-08-14T16:51:53
react-native-ble-plx
dotintent/react-native-ble-plx
3,006
946
```xml export interface Image { previewImageSrc?; thumbnailImageSrc?; alt?; title?; } ```
/content/code_sandbox/src/app/showcase/domain/image.ts
xml
2016-01-16T09:23:28
2024-08-16T19:58:20
primeng
primefaces/primeng
9,969
22
```xml <vector xmlns:android="path_to_url" android:width="128dp" android:height="128dp" android:viewportWidth="128" android:viewportHeight="128"> <path android:pathData="M13.138,1.014L114.99,1.014A12.004,12.004 0,0 1,126.994 13.018L126.994,114.87A12.004,12.004 0,0 1,114.99 126.874L13.138,126.874A12.004,12.004 0,0 1,1.134 114.87L1.134,13.018A12.004,12.004 0,0 1,13.138 1.014z" android:strokeWidth="2" android:fillColor="#fff" android:strokeColor="#000"/> <path android:pathData="m103.05,22.64 l-2.17,5.422 -27.054,-6.672 -9.248,-9.03zM100.87,30.976 L71.01,25.902 60.114,36.105zM101.842,36.105c0.165,8.629 -1.743,16.608 -12.296,16.932 -7.677,0.236 -14.583,-2.608 -16.932,-13.304zM110.31,57.673 L110.31,114.919 67.174,114.918c-2.688,-2.15 -2.688,-6.065 0,-8.752l38.702,-0.116c2.778,-1.747 0.722,-3.494 0,-5.241h-32.251zM71.201,56.867 L47.416,79.04 22.018,70.574c-3.218,1.842 -5.69,4.632 -4.031,9.272l33.058,12.901 15.722,-11.691 0.403,16.932 34.382,-41.236z" android:strokeLineJoin="round" android:strokeWidth="3" android:fillColor="#000" android:strokeColor="#000" android:strokeLineCap="round"/> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/ic_italian_police_type_polizia.xml
xml
2016-07-02T10:44:04
2024-08-16T18:55:54
StreetComplete
streetcomplete/StreetComplete
3,781
537
```xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"> <command> <update> <domain:update xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"> <domain:name>example.tld</domain:name> <domain:add> <domain:status s="serverRenewProhibited" lang="en"></domain:status> </domain:add> <domain:rem></domain:rem> </domain:update> </update> <extension> <metadata:metadata xmlns:metadata="urn:google:params:xml:ns:metadata-1.0"> <metadata:reason>Test this</metadata:reason> <metadata:requestedByRegistrar>false</metadata:requestedByRegistrar> </metadata:metadata> </extension> <clTRID>RegistryTool</clTRID> </command> </epp> ```
/content/code_sandbox/core/src/test/resources/google/registry/tools/server/update_server_locks_multiple_word_reason.xml
xml
2016-02-29T20:16:48
2024-08-15T19:49:29
nomulus
google/nomulus
1,685
219
```xml // A file is required to be in the root of the /src directory by the TypeScript compiler ```
/content/code_sandbox/samples/react-list-form/src/index.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
22
```xml import { Column } from "../../../../../src/decorator/columns/Column" import { PrimaryColumn } from "../../../../../src/decorator/columns/PrimaryColumn" import { Entity } from "../../../../../src/decorator/entity/Entity" import { OneToMany } from "../../../../../src/decorator/relations/OneToMany" import { Post } from "./Post" @Entity() export class User { @PrimaryColumn() id: number @Column() name: string @OneToMany((type) => Post, (post) => post.counters.likedUser) likedPosts: Post[] } ```
/content/code_sandbox/test/functional/embedded/embedded-many-to-one-case3/entity/User.ts
xml
2016-02-29T07:41:14
2024-08-16T18:28:52
typeorm
typeorm/typeorm
33,875
127
```xml import { Cmd } from '../index'; declare module 'react-redux' { export function useDispatch<TDispatch = Cmd.Dispatch>(): TDispatch; } ```
/content/code_sandbox/react-redux/index.d.ts
xml
2016-01-05T20:46:03
2024-08-02T02:20:10
redux-loop
redux-loop/redux-loop
1,960
31
```xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="path_to_url"> <solid android:color="@color/ic_default_bg_color"/> </shape> ```
/content/code_sandbox/ninegridview/src/main/res/drawable/ic_default_color.xml
xml
2016-01-28T12:16:02
2024-08-12T03:26:43
NineGridView
jeasonlzy/NineGridView
2,461
41
```xml <!-- ~ contributor license agreements. See the NOTICE file distributed with ~ this work for additional information regarding copyright ownership. ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <dataset> <metadata> <column name="thread_id" /> <column name="event_id" /> <column name="end_event_id" /> <column name="event_name" /> <column name="source" /> <column name="timer_start" /> <column name="timer_end" /> <column name="timer_wait" /> <column name="lock_time" /> <column name="sql_text" /> <column name="digest" /> <column name="digest_text" /> <column name="current_schema" /> <column name="object_type" /> <column name="object_schema" /> <column name="object_name" /> <column name="object_instance_begin" /> <column name="mysql_errno" /> <column name="returned_sqlstate" /> <column name="message_text" /> <column name="errors" /> <column name="warnings" /> <column name="rows_affected" /> <column name="rows_sent" /> <column name="rows_examined" /> <column name="created_tmp_disk_tables" /> <column name="created_tmp_tables" /> <column name="select_full_join" /> <column name="select_full_range_join" /> <column name="select_range" /> <column name="select_range_check" /> <column name="select_scan" /> <column name="sort_merge_passes" /> <column name="sort_range" /> <column name="sort_rows" /> <column name="sort_scan" /> <column name="no_index_used" /> <column name="no_good_index_used" /> <column name="nesting_event_id" /> <column name="nesting_event_type" /> <column name="nesting_event_level" /> <column name="statement_id" /> <column name="cpu_time" /> <column name="max_controlled_memory" /> <column name="max_total_memory" /> <column name="execution_engine" /> </metadata> </dataset> ```
/content/code_sandbox/test/e2e/sql/src/test/resources/cases/dql/dataset/empty_storage_units/mysql/select_mysql_performance_schema_events_statements_history.xml
xml
2016-01-18T12:49:26
2024-08-16T15:48:11
shardingsphere
apache/shardingsphere
19,707
522
```xml import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; // path_to_url export default defineConfig({ base: '', plugins: [react()], resolve: { alias: { src: "/src", }, }, server: { proxy: { "/v2": { target: "path_to_url", changeOrigin: true, }, }, }, }); ```
/content/code_sandbox/identity/client/vite.config.ts
xml
2016-03-20T03:38:04
2024-08-16T19:59:58
camunda
camunda/camunda
3,172
94
```xml import { ITermStore, ITermSet, ITermGroup, ITerm } from '../common/SPEntities'; import { IDataHelper } from './DataHelperBase'; /** * Interface for Term store with groups */ interface ITermStoreWithGroups extends ITermStore { /** * nested groups */ groups?: ITermGroupWithTermSets[]; } /** * Interface for term group with term sets */ interface ITermGroupWithTermSets extends ITermGroup { /** * nested term sets */ termSets?: ITermSetWithTerms[]; } /** * Interface for term set with terms */ interface ITermSetWithTerms extends ITermSet { /** * nested terms */ terms?: ITermWithTerms[]; } /** * Interface for term with nested terms */ interface ITermWithTerms extends ITerm { /** * nested terms */ terms?: ITermWithTerms[]; } /** * MOCK data helper. Gets data from hardcoded values */ export class DataHelperMock implements IDataHelper { private static _termStores: ITermStoreWithGroups[] = [{ name: 'Term Store 1', id: 'E920D42D-1540-4E39-B3F6-3795FBEF7F21', groups: [{ id: '6789F532-CCDE-44C4-AE45-2EC5FC509274', termStoreId: 'E920D42D-1540-4E39-B3F6-3795FBEF7F21', name: 'Group 1 from Term Store 1', description: 'This is the first group of the first term store', termSets: [{ name: 'TSet 1 Gr 1 TStore 1', id: 'B12D3D77-7DEA-435E-B1AF-3175DC9851DF', termGroupId: '6789F532-CCDE-44C4-AE45-2EC5FC509274', termStoreId: 'E920D42D-1540-4E39-B3F6-3795FBEF7F21', description: 'Term Set 1 from Group 1 from Term Store 1', terms: [{ id: '1494A0ED-0866-4082-92A8-1C83D5B117C4', termSetId: 'B12D3D77-7DEA-435E-B1AF-3175DC9851DF', name: 'T 1 TSet 1 Gr 1 TStore 1', description: 'Term 1 from Term Set 1 from Group 1 from Term Store 1', labels: [{ isDefaultForLanguage: true, value: 'Term Label', language: 'en-US' }], terms: [{ id: '1494A0ED-0866-4082-92A8-1C83D5B117C4', termSetId: 'B12D3D77-7DEA-435E-B1AF-3175DC9851DF', name: 'T 1.1 TSet 1 Gr 1 TStore 1', description: 'Term 1 from Term Set 1 from Group 1 from Term Store 1', labels: [{ isDefaultForLanguage: true, value: 'Term Label', language: 'en-US' }], termsCount: 0, isRoot: false }], termsCount: 1, isRoot: true }] }, { id: '6783B7F9-41CA-4405-A85C-5C74B98AC81C', termGroupId: '6789F532-CCDE-44C4-AE45-2EC5FC509274', termStoreId: 'E920D42D-1540-4E39-B3F6-3795FBEF7F21', name: 'TSet 2 Gr 1 TStore 1', description: 'Term Set 2 from Group 1 from Term Store 1', terms: [] }] }, { id: '9FC4934A-EFA2-4460-A5DB-1611B8B478FE', termStoreId: 'E920D42D-1540-4E39-B3F6-3795FBEF7F21', name: 'Group 2 from Term Store 1', description: 'This is the second group of the first term store', termSets: [{ id: '6AC24DB3-CF84-47D0-83E6-C118DD7C1D44', termGroupId: '9FC4934A-EFA2-4460-A5DB-1611B8B478FE', termStoreId: 'E920D42D-1540-4E39-B3F6-3795FBEF7F21', name: 'TSet 1 Gr 2 TStore 1', description: 'Term Set 1 from Group 2 from Term Store 1', terms: [] }] }] }, { name: 'Term Store 2', id: 'BBB5D5CF-F39E-45D4-A71A-F74681133D03', groups: [{ id: '96BD2791-BD83-4E1F-930C-0F2EBE943DFA', termStoreId: 'BBB5D5CF-F39E-45D4-A71A-F74681133D03', name: 'Group 1 from Term Store 2', description: 'This is the first group of the second term store', termSets: [{ id: 'DDF892AB-00D2-4F13-B70C-378BE3A95A1D', termGroupId: '96BD2791-BD83-4E1F-930C-0F2EBE943DFA', termStoreId: 'BBB5D5CF-F39E-45D4-A71A-F74681133D03', name: 'TSet 1 Gr 1 TStore 2', description: 'Term Set 1 from Group 1 from Term Store 2', terms: [] }] }] }]; /** * API to get Term Stores */ public getTermStores(): Promise<ITermStore[]> { return new Promise<ITermStore[]>((resolve) => { resolve(DataHelperMock._termStores); }); } /** * API to get Term Groups by Term Store */ public getTermGroups(termStoreId: string): Promise<ITermGroup[]> { return new Promise<ITermGroup[]>((resolve) => { for (let i = 0, len = DataHelperMock._termStores.length; i < len; i++) { const termStore = DataHelperMock._termStores[i]; if (termStore.id === termStoreId) { resolve(termStore.groups); return; } } }); } /** * API to get Term Sets by Term Group */ public getTermSets(termGroup: ITermGroup): Promise<ITermSet[]> { return new Promise<ITermSet[]>((resolve) => { const termGroupWithTermSets: ITermGroupWithTermSets = termGroup as ITermGroupWithTermSets; resolve(termGroupWithTermSets.termSets); }); } /** * API to get Terms by Term Set */ public getTerms(termSet: ITermSet): Promise<ITerm[]> { return new Promise<ITerm[]>((resolve) => { const termSetWithTerms: ITermSetWithTerms = termSet as ITermSetWithTerms; resolve(termSetWithTerms.terms); }); } /** * API to get Terms by Term */ public getChildTerms(term: ITerm): Promise<ITerm[]> { return new Promise<ITerm[]>((resolve) => { const termWithTerms: ITermWithTerms = term as ITermWithTerms; resolve(termWithTerms.terms); }); } } ```
/content/code_sandbox/samples/knockout-taxonomy/src/webparts/termSetRequester/data-helpers/DataHelperMock.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
1,823
```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>.notdef</key> <string>_notdef.glif</string> <key>A</key> <string>A_.glif</string> <key>AE</key> <string>A_E_.glif</string> <key>AEacute</key> <string>A_E_acute.glif</string> <key>Aacute</key> <string>A_acute.glif</string> <key>Abreve</key> <string>A_breve.glif</string> <key>Abreveacute</key> <string>A_breveacute.glif</string> <key>Abrevedotbelow</key> <string>A_brevedotbelow.glif</string> <key>Abrevegrave</key> <string>A_brevegrave.glif</string> <key>Abrevehookabove</key> <string>A_brevehookabove.glif</string> <key>Abrevetilde</key> <string>A_brevetilde.glif</string> <key>Acircumflex</key> <string>A_circumflex.glif</string> <key>Acircumflexacute</key> <string>A_circumflexacute.glif</string> <key>Acircumflexdotbelow</key> <string>A_circumflexdotbelow.glif</string> <key>Acircumflexgrave</key> <string>A_circumflexgrave.glif</string> <key>Acircumflexhookabove</key> <string>A_circumflexhookabove.glif</string> <key>Acircumflextilde</key> <string>A_circumflextilde.glif</string> <key>Adblgrave</key> <string>A_dblgrave.glif</string> <key>Adieresis</key> <string>A_dieresis.glif</string> <key>Adotbelow</key> <string>A_dotbelow.glif</string> <key>Agrave</key> <string>A_grave.glif</string> <key>Ahookabove</key> <string>A_hookabove.glif</string> <key>Ainvertedbreve</key> <string>A_invertedbreve.glif</string> <key>Amacron</key> <string>A_macron.glif</string> <key>Aogonek</key> <string>A_ogonek.glif</string> <key>Aring</key> <string>A_ring.glif</string> <key>Aringacute</key> <string>A_ringacute.glif</string> <key>Atilde</key> <string>A_tilde.glif</string> <key>B</key> <string>B_.glif</string> <key>C</key> <string>C_.glif</string> <key>CR</key> <string>C_R_.glif</string> <key>Cacute</key> <string>C_acute.glif</string> <key>Ccaron</key> <string>C_caron.glif</string> <key>Ccedilla</key> <string>C_cedilla.glif</string> <key>Ccircumflex</key> <string>C_circumflex.glif</string> <key>Cdotaccent</key> <string>C_dotaccent.glif</string> <key>D</key> <string>D_.glif</string> <key>Dcaron</key> <string>D_caron.glif</string> <key>Dcroat</key> <string>D_croat.glif</string> <key>Ddotbelow</key> <string>D_dotbelow.glif</string> <key>E</key> <string>E_.glif</string> <key>Eacute</key> <string>E_acute.glif</string> <key>Ebreve</key> <string>E_breve.glif</string> <key>Ecaron</key> <string>E_caron.glif</string> <key>Ecircumflex</key> <string>E_circumflex.glif</string> <key>Ecircumflexacute</key> <string>E_circumflexacute.glif</string> <key>Ecircumflexdotbelow</key> <string>E_circumflexdotbelow.glif</string> <key>Ecircumflexgrave</key> <string>E_circumflexgrave.glif</string> <key>Ecircumflexhookabove</key> <string>E_circumflexhookabove.glif</string> <key>Ecircumflextilde</key> <string>E_circumflextilde.glif</string> <key>Edblgrave</key> <string>E_dblgrave.glif</string> <key>Edieresis</key> <string>E_dieresis.glif</string> <key>Edotaccent</key> <string>E_dotaccent.glif</string> <key>Edotbelow</key> <string>E_dotbelow.glif</string> <key>Egrave</key> <string>E_grave.glif</string> <key>Ehookabove</key> <string>E_hookabove.glif</string> <key>Einvertedbreve</key> <string>E_invertedbreve.glif</string> <key>Emacron</key> <string>E_macron.glif</string> <key>Eng</key> <string>E_ng.glif</string> <key>Eogonek</key> <string>E_ogonek.glif</string> <key>Eth</key> <string>E_th.glif</string> <key>Etilde</key> <string>E_tilde.glif</string> <key>F</key> <string>F_.glif</string> <key>G</key> <string>G_.glif</string> <key>Gbreve</key> <string>G_breve.glif</string> <key>Gcircumflex</key> <string>G_circumflex.glif</string> <key>Gcommaaccent</key> <string>G_commaaccent.glif</string> <key>Gdotaccent</key> <string>G_dotaccent.glif</string> <key>H</key> <string>H_.glif</string> <key>Hbar</key> <string>H_bar.glif</string> <key>Hcircumflex</key> <string>H_circumflex.glif</string> <key>Hdotbelow</key> <string>H_dotbelow.glif</string> <key>I</key> <string>I_.glif</string> <key>Iacute</key> <string>I_acute.glif</string> <key>Ibreve</key> <string>I_breve.glif</string> <key>Icircumflex</key> <string>I_circumflex.glif</string> <key>Idblgrave</key> <string>I_dblgrave.glif</string> <key>Idieresis</key> <string>I_dieresis.glif</string> <key>Idotaccent</key> <string>I_dotaccent.glif</string> <key>Idotbelow</key> <string>I_dotbelow.glif</string> <key>Igrave</key> <string>I_grave.glif</string> <key>Ihookabove</key> <string>I_hookabove.glif</string> <key>Iinvertedbreve</key> <string>I_invertedbreve.glif</string> <key>Imacron</key> <string>I_macron.glif</string> <key>Iogonek</key> <string>I_ogonek.glif</string> <key>Itilde</key> <string>I_tilde.glif</string> <key>J</key> <string>J_.glif</string> <key>Jcircumflex</key> <string>J_circumflex.glif</string> <key>K</key> <string>K_.glif</string> <key>Kcommaaccent</key> <string>K_commaaccent.glif</string> <key>L</key> <string>L_.glif</string> <key>Lacute</key> <string>L_acute.glif</string> <key>Lcaron</key> <string>L_caron.glif</string> <key>Lcommaaccent</key> <string>L_commaaccent.glif</string> <key>Ldot</key> <string>L_dot.glif</string> <key>Lslash</key> <string>L_slash.glif</string> <key>M</key> <string>M_.glif</string> <key>N</key> <string>N_.glif</string> <key>Nacute</key> <string>N_acute.glif</string> <key>Ncaron</key> <string>N_caron.glif</string> <key>Ncommaaccent</key> <string>N_commaaccent.glif</string> <key>Ndotaccent</key> <string>N_dotaccent.glif</string> <key>Ntilde</key> <string>N_tilde.glif</string> <key>O</key> <string>O_.glif</string> <key>OE</key> <string>O_E_.glif</string> <key>Oacute</key> <string>O_acute.glif</string> <key>Obreve</key> <string>O_breve.glif</string> <key>Ocircumflex</key> <string>O_circumflex.glif</string> <key>Ocircumflexacute</key> <string>O_circumflexacute.glif</string> <key>Ocircumflexdotbelow</key> <string>O_circumflexdotbelow.glif</string> <key>Ocircumflexgrave</key> <string>O_circumflexgrave.glif</string> <key>Ocircumflexhookabove</key> <string>O_circumflexhookabove.glif</string> <key>Ocircumflextilde</key> <string>O_circumflextilde.glif</string> <key>Odblgrave</key> <string>O_dblgrave.glif</string> <key>Odieresis</key> <string>O_dieresis.glif</string> <key>Odotbelow</key> <string>O_dotbelow.glif</string> <key>Ograve</key> <string>O_grave.glif</string> <key>Ohm</key> <string>O_hm.glif</string> <key>Ohookabove</key> <string>O_hookabove.glif</string> <key>Ohorn</key> <string>O_horn.glif</string> <key>Ohornacute</key> <string>O_hornacute.glif</string> <key>Ohorndotbelow</key> <string>O_horndotbelow.glif</string> <key>Ohorngrave</key> <string>O_horngrave.glif</string> <key>Ohornhookabove</key> <string>O_hornhookabove.glif</string> <key>Ohorntilde</key> <string>O_horntilde.glif</string> <key>Ohungarumlaut</key> <string>O_hungarumlaut.glif</string> <key>Oinvertedbreve</key> <string>O_invertedbreve.glif</string> <key>Omacron</key> <string>O_macron.glif</string> <key>Oogonek</key> <string>O_ogonek.glif</string> <key>Oslash</key> <string>O_slash.glif</string> <key>Oslashacute</key> <string>O_slashacute.glif</string> <key>Otilde</key> <string>O_tilde.glif</string> <key>P</key> <string>P_.glif</string> <key>Q</key> <string>Q_.glif</string> <key>R</key> <string>R_.glif</string> <key>Racute</key> <string>R_acute.glif</string> <key>Rcaron</key> <string>R_caron.glif</string> <key>Rcommaaccent</key> <string>R_commaaccent.glif</string> <key>Rdblgrave</key> <string>R_dblgrave.glif</string> <key>Rdotbelow</key> <string>R_dotbelow.glif</string> <key>Rinvertedbreve</key> <string>R_invertedbreve.glif</string> <key>S</key> <string>S_.glif</string> <key>Sacute</key> <string>S_acute.glif</string> <key>Scaron</key> <string>S_caron.glif</string> <key>Scedilla</key> <string>S_cedilla.glif</string> <key>Schwa</key> <string>S_chwa.glif</string> <key>Scircumflex</key> <string>S_circumflex.glif</string> <key>Scommaaccent</key> <string>S_commaaccent.glif</string> <key>Sdotbelow</key> <string>S_dotbelow.glif</string> <key>T</key> <string>T_.glif</string> <key>Tbar</key> <string>T_bar.glif</string> <key>Tcaron</key> <string>T_caron.glif</string> <key>Tcedilla</key> <string>T_cedilla.glif</string> <key>Tcommaaccent</key> <string>T_commaaccent.glif</string> <key>Tdotbelow</key> <string>T_dotbelow.glif</string> <key>Thorn</key> <string>T_horn.glif</string> <key>U</key> <string>U_.glif</string> <key>Uacute</key> <string>U_acute.glif</string> <key>Ubreve</key> <string>U_breve.glif</string> <key>Ucircumflex</key> <string>U_circumflex.glif</string> <key>Udblgrave</key> <string>U_dblgrave.glif</string> <key>Udieresis</key> <string>U_dieresis.glif</string> <key>Udotbelow</key> <string>U_dotbelow.glif</string> <key>Ugrave</key> <string>U_grave.glif</string> <key>Uhookabove</key> <string>U_hookabove.glif</string> <key>Uhorn</key> <string>U_horn.glif</string> <key>Uhornacute</key> <string>U_hornacute.glif</string> <key>Uhorndotbelow</key> <string>U_horndotbelow.glif</string> <key>Uhorngrave</key> <string>U_horngrave.glif</string> <key>Uhornhookabove</key> <string>U_hornhookabove.glif</string> <key>Uhorntilde</key> <string>U_horntilde.glif</string> <key>Uhungarumlaut</key> <string>U_hungarumlaut.glif</string> <key>Uinvertedbreve</key> <string>U_invertedbreve.glif</string> <key>Umacron</key> <string>U_macron.glif</string> <key>Uogonek</key> <string>U_ogonek.glif</string> <key>Uring</key> <string>U_ring.glif</string> <key>Utilde</key> <string>U_tilde.glif</string> <key>V</key> <string>V_.glif</string> <key>W</key> <string>W_.glif</string> <key>Wacute</key> <string>W_acute.glif</string> <key>Wcircumflex</key> <string>W_circumflex.glif</string> <key>Wdieresis</key> <string>W_dieresis.glif</string> <key>Wgrave</key> <string>W_grave.glif</string> <key>X</key> <string>X_.glif</string> <key>Y</key> <string>Y_.glif</string> <key>Yacute</key> <string>Y_acute.glif</string> <key>Ycircumflex</key> <string>Y_circumflex.glif</string> <key>Ydieresis</key> <string>Y_dieresis.glif</string> <key>Ydotbelow</key> <string>Y_dotbelow.glif</string> <key>Ygrave</key> <string>Y_grave.glif</string> <key>Yhookabove</key> <string>Y_hookabove.glif</string> <key>Ytilde</key> <string>Y_tilde.glif</string> <key>Z</key> <string>Z_.glif</string> <key>Zacute</key> <string>Z_acute.glif</string> <key>Zcaron</key> <string>Z_caron.glif</string> <key>Zdotaccent</key> <string>Z_dotaccent.glif</string> <key>Zdotbelow</key> <string>Z_dotbelow.glif</string> <key>__horn</key> <string>__horn.glif</string> <key>_dot</key> <string>_dot.glif</string> <key>_emdash</key> <string>_emdash.glif</string> <key>_j-hook</key> <string>_j-hook.glif</string> <key>_ringacute</key> <string>_ringacute.glif</string> <key>a</key> <string>a.glif</string> <key>aacute</key> <string>aacute.glif</string> <key>abreve</key> <string>abreve.glif</string> <key>abreveacute</key> <string>abreveacute.glif</string> <key>abrevedotbelow</key> <string>abrevedotbelow.glif</string> <key>abrevegrave</key> <string>abrevegrave.glif</string> <key>abrevehookabove</key> <string>abrevehookabove.glif</string> <key>abrevetilde</key> <string>abrevetilde.glif</string> <key>acircumflex</key> <string>acircumflex.glif</string> <key>acircumflexacute</key> <string>acircumflexacute.glif</string> <key>acircumflexdotbelow</key> <string>acircumflexdotbelow.glif</string> <key>acircumflexgrave</key> <string>acircumflexgrave.glif</string> <key>acircumflexhookabove</key> <string>acircumflexhookabove.glif</string> <key>acircumflextilde</key> <string>acircumflextilde.glif</string> <key>acute</key> <string>acute.glif</string> <key>acutecomb</key> <string>acutecomb.glif</string> <key>acutecomb.narrow</key> <string>acutecomb.narrow.glif</string> <key>acutecomb.viet</key> <string>acutecomb.viet.glif</string> <key>adblgrave</key> <string>adblgrave.glif</string> <key>adieresis</key> <string>adieresis.glif</string> <key>adotbelow</key> <string>adotbelow.glif</string> <key>ae</key> <string>ae.glif</string> <key>aeacute</key> <string>aeacute.glif</string> <key>agrave</key> <string>agrave.glif</string> <key>ahookabove</key> <string>ahookabove.glif</string> <key>ainvertedbreve</key> <string>ainvertedbreve.glif</string> <key>amacron</key> <string>amacron.glif</string> <key>ampersand</key> <string>ampersand.glif</string> <key>aogonek</key> <string>aogonek.glif</string> <key>apostrophemod</key> <string>apostrophemod.glif</string> <key>approxequal</key> <string>approxequal.glif</string> <key>aring</key> <string>aring.glif</string> <key>aringacute</key> <string>aringacute.glif</string> <key>asciicircum</key> <string>asciicircum.glif</string> <key>asciitilde</key> <string>asciitilde.glif</string> <key>asterisk</key> <string>asterisk.glif</string> <key>at</key> <string>at.glif</string> <key>atilde</key> <string>atilde.glif</string> <key>b</key> <string>b.glif</string> <key>backslash</key> <string>backslash.glif</string> <key>bar</key> <string>bar.glif</string> <key>braceleft</key> <string>braceleft.glif</string> <key>braceright</key> <string>braceright.glif</string> <key>bracketleft</key> <string>bracketleft.glif</string> <key>bracketright</key> <string>bracketright.glif</string> <key>breve</key> <string>breve.glif</string> <key>brevecomb</key> <string>brevecomb.glif</string> <key>brevecomb_acutecomb</key> <string>brevecomb_acutecomb.glif</string> <key>brevecomb_gravecomb</key> <string>brevecomb_gravecomb.glif</string> <key>brevecomb_hookabovecomb</key> <string>brevecomb_hookabovecomb.glif</string> <key>brevecomb_tildecomb</key> <string>brevecomb_tildecomb.glif</string> <key>breveinvertedcomb</key> <string>breveinvertedcomb.glif</string> <key>brokenbar</key> <string>brokenbar.glif</string> <key>bullet</key> <string>bullet.glif</string> <key>bulletoperator</key> <string>bulletoperator.glif</string> <key>c</key> <string>c.glif</string> <key>cacute</key> <string>cacute.glif</string> <key>caron</key> <string>caron.glif</string> <key>caroncomb</key> <string>caroncomb.glif</string> <key>caroncomb.alt</key> <string>caroncomb.alt.glif</string> <key>ccaron</key> <string>ccaron.glif</string> <key>ccedilla</key> <string>ccedilla.glif</string> <key>ccircumflex</key> <string>ccircumflex.glif</string> <key>cdotaccent</key> <string>cdotaccent.glif</string> <key>cedilla</key> <string>cedilla.glif</string> <key>cedillacomb</key> <string>cedillacomb.glif</string> <key>cent</key> <string>cent.glif</string> <key>cent.tf</key> <string>cent.tf.glif</string> <key>circumflex</key> <string>circumflex.glif</string> <key>circumflexcomb</key> <string>circumflexcomb.glif</string> <key>circumflexcomb_acutecomb</key> <string>circumflexcomb_acutecomb.glif</string> <key>circumflexcomb_gravecomb</key> <string>circumflexcomb_gravecomb.glif</string> <key>circumflexcomb_hookabovecomb</key> <string>circumflexcomb_hookabovecomb.glif</string> <key>circumflexcomb_tildecomb</key> <string>circumflexcomb_tildecomb.glif</string> <key>colon</key> <string>colon.glif</string> <key>colonsign</key> <string>colonsign.glif</string> <key>colonsign.tf</key> <string>colonsign.tf.glif</string> <key>comma</key> <string>comma.glif</string> <key>comma.tf</key> <string>comma.tf.glif</string> <key>commaaccentcomb</key> <string>commaaccentcomb.glif</string> <key>commaturnedabovecomb</key> <string>commaturnedabovecomb.glif</string> <key>commaturnedmod</key> <string>commaturnedmod.glif</string> <key>copyright</key> <string>copyright.glif</string> <key>currency</key> <string>currency.glif</string> <key>d</key> <string>d.glif</string> <key>dagger</key> <string>dagger.glif</string> <key>daggerdbl</key> <string>daggerdbl.glif</string> <key>dblgravecomb</key> <string>dblgravecomb.glif</string> <key>dcaron</key> <string>dcaron.glif</string> <key>dcroat</key> <string>dcroat.glif</string> <key>ddotbelow</key> <string>ddotbelow.glif</string> <key>degree</key> <string>degree.glif</string> <key>dieresis</key> <string>dieresis.glif</string> <key>dieresiscomb</key> <string>dieresiscomb.glif</string> <key>divide</key> <string>divide.glif</string> <key>divisionslash</key> <string>divisionslash.glif</string> <key>dollar</key> <string>dollar.glif</string> <key>dollar.tf</key> <string>dollar.tf.glif</string> <key>dong</key> <string>dong.glif</string> <key>dong.tf</key> <string>dong.tf.glif</string> <key>dotaccent</key> <string>dotaccent.glif</string> <key>dotaccentcomb</key> <string>dotaccentcomb.glif</string> <key>dotbelowcomb</key> <string>dotbelowcomb.glif</string> <key>e</key> <string>e.glif</string> <key>eacute</key> <string>eacute.glif</string> <key>ebreve</key> <string>ebreve.glif</string> <key>ecaron</key> <string>ecaron.glif</string> <key>ecircumflex</key> <string>ecircumflex.glif</string> <key>ecircumflexacute</key> <string>ecircumflexacute.glif</string> <key>ecircumflexdotbelow</key> <string>ecircumflexdotbelow.glif</string> <key>ecircumflexgrave</key> <string>ecircumflexgrave.glif</string> <key>ecircumflexhookabove</key> <string>ecircumflexhookabove.glif</string> <key>ecircumflextilde</key> <string>ecircumflextilde.glif</string> <key>edblgrave</key> <string>edblgrave.glif</string> <key>edieresis</key> <string>edieresis.glif</string> <key>edotaccent</key> <string>edotaccent.glif</string> <key>edotbelow</key> <string>edotbelow.glif</string> <key>egrave</key> <string>egrave.glif</string> <key>ehookabove</key> <string>ehookabove.glif</string> <key>eight</key> <string>eight.glif</string> <key>eight.dnom</key> <string>eight.dnom.glif</string> <key>eight.numr</key> <string>eight.numr.glif</string> <key>eight.osf</key> <string>eight.osf.glif</string> <key>eight.subs</key> <string>eight.subs.glif</string> <key>eight.tf</key> <string>eight.tf.glif</string> <key>eightsuperior</key> <string>eightsuperior.glif</string> <key>einvertedbreve</key> <string>einvertedbreve.glif</string> <key>ellipsis</key> <string>ellipsis.glif</string> <key>emacron</key> <string>emacron.glif</string> <key>emdash</key> <string>emdash.glif</string> <key>emdash.alt</key> <string>emdash.alt.glif</string> <key>emptyset</key> <string>emptyset.glif</string> <key>endash</key> <string>endash.glif</string> <key>eng</key> <string>eng.glif</string> <key>eogonek</key> <string>eogonek.glif</string> <key>equal</key> <string>equal.glif</string> <key>espaciador</key> <string>espaciador.glif</string> <key>eth</key> <string>eth.glif</string> <key>etilde</key> <string>etilde.glif</string> <key>euro</key> <string>euro.glif</string> <key>euro.tf</key> <string>euro.tf.glif</string> <key>exclam</key> <string>exclam.glif</string> <key>exclamdown</key> <string>exclamdown.glif</string> <key>f</key> <string>f.glif</string> <key>fi</key> <string>fi.glif</string> <key>five</key> <string>five.glif</string> <key>five.dnom</key> <string>five.dnom.glif</string> <key>five.numr</key> <string>five.numr.glif</string> <key>five.osf</key> <string>five.osf.glif</string> <key>five.subs</key> <string>five.subs.glif</string> <key>five.tf</key> <string>five.tf.glif</string> <key>fiveeighths</key> <string>fiveeighths.glif</string> <key>fivesuperior</key> <string>fivesuperior.glif</string> <key>fl</key> <string>fl.glif</string> <key>florin</key> <string>florin.glif</string> <key>florin.tf</key> <string>florin.tf.glif</string> <key>four</key> <string>four.glif</string> <key>four.dnom</key> <string>four.dnom.glif</string> <key>four.numr</key> <string>four.numr.glif</string> <key>four.osf</key> <string>four.osf.glif</string> <key>four.subs</key> <string>four.subs.glif</string> <key>four.tf</key> <string>four.tf.glif</string> <key>foursuperior</key> <string>foursuperior.glif</string> <key>fraction</key> <string>fraction.glif</string> <key>fraction.alt</key> <string>fraction.alt.glif</string> <key>franc</key> <string>franc.glif</string> <key>franc.tf</key> <string>franc.tf.glif</string> <key>g</key> <string>g.glif</string> <key>g.ss01</key> <string>g.ss01.glif</string> <key>gbreve</key> <string>gbreve.glif</string> <key>gcircumflex</key> <string>gcircumflex.glif</string> <key>gcommaaccent</key> <string>gcommaaccent.glif</string> <key>gdotaccent</key> <string>gdotaccent.glif</string> <key>germandbls</key> <string>germandbls.glif</string> <key>grave</key> <string>grave.glif</string> <key>gravecomb</key> <string>gravecomb.glif</string> <key>gravecomb.narrow</key> <string>gravecomb.narrow.glif</string> <key>gravecomb.viet</key> <string>gravecomb.viet.glif</string> <key>greater</key> <string>greater.glif</string> <key>greaterequal</key> <string>greaterequal.glif</string> <key>guillemetleft</key> <string>guillemetleft.glif</string> <key>guillemetright</key> <string>guillemetright.glif</string> <key>guilsinglleft</key> <string>guilsinglleft.glif</string> <key>guilsinglright</key> <string>guilsinglright.glif</string> <key>h</key> <string>h.glif</string> <key>hbar</key> <string>hbar.glif</string> <key>hcircumflex</key> <string>hcircumflex.glif</string> <key>hdotbelow</key> <string>hdotbelow.glif</string> <key>hookabovecomb</key> <string>hookabovecomb.glif</string> <key>horncomb</key> <string>horncomb.glif</string> <key>hungarumlaut</key> <string>hungarumlaut.glif</string> <key>hungarumlautcomb</key> <string>hungarumlautcomb.glif</string> <key>hyphen</key> <string>hyphen.glif</string> <key>i</key> <string>i.glif</string> <key>iacute</key> <string>iacute.glif</string> <key>ibreve</key> <string>ibreve.glif</string> <key>icircumflex</key> <string>icircumflex.glif</string> <key>idblgrave</key> <string>idblgrave.glif</string> <key>idieresis</key> <string>idieresis.glif</string> <key>idotaccent</key> <string>idotaccent.glif</string> <key>idotbelow</key> <string>idotbelow.glif</string> <key>idotless</key> <string>idotless.glif</string> <key>igrave</key> <string>igrave.glif</string> <key>ihookabove</key> <string>ihookabove.glif</string> <key>iinvertedbreve</key> <string>iinvertedbreve.glif</string> <key>imacron</key> <string>imacron.glif</string> <key>increment</key> <string>increment.glif</string> <key>infinity</key> <string>infinity.glif</string> <key>integral</key> <string>integral.glif</string> <key>iogonek</key> <string>iogonek.glif</string> <key>itilde</key> <string>itilde.glif</string> <key>j</key> <string>j.glif</string> <key>jcircumflex</key> <string>jcircumflex.glif</string> <key>jdotless</key> <string>jdotless.glif</string> <key>k</key> <string>k.glif</string> <key>kcommaaccent</key> <string>kcommaaccent.glif</string> <key>kgreenlandic</key> <string>kgreenlandic.glif</string> <key>l</key> <string>l.glif</string> <key>l.ss01</key> <string>l.ss01.glif</string> <key>lacute</key> <string>lacute.glif</string> <key>lcaron</key> <string>lcaron.glif</string> <key>lcommaaccent</key> <string>lcommaaccent.glif</string> <key>ldot</key> <string>ldot.glif</string> <key>less</key> <string>less.glif</string> <key>lessequal</key> <string>lessequal.glif</string> <key>lira</key> <string>lira.glif</string> <key>lira.tf</key> <string>lira.tf.glif</string> <key>liraTurkish</key> <string>liraT_urkish.glif</string> <key>liraTurkish.tf</key> <string>liraT_urkish.tf.glif</string> <key>literSign</key> <string>literS_ign.glif</string> <key>logicalnot</key> <string>logicalnot.glif</string> <key>lozenge</key> <string>lozenge.glif</string> <key>lslash</key> <string>lslash.glif</string> <key>m</key> <string>m.glif</string> <key>macron</key> <string>macron.glif</string> <key>macroncomb</key> <string>macroncomb.glif</string> <key>micro</key> <string>micro.glif</string> <key>minus</key> <string>minus.glif</string> <key>multiply</key> <string>multiply.glif</string> <key>n</key> <string>n.glif</string> <key>nacute</key> <string>nacute.glif</string> <key>naira</key> <string>naira.glif</string> <key>nbspace</key> <string>nbspace.glif</string> <key>ncaron</key> <string>ncaron.glif</string> <key>ncommaaccent</key> <string>ncommaaccent.glif</string> <key>ndotaccent</key> <string>ndotaccent.glif</string> <key>nine</key> <string>nine.glif</string> <key>nine.dnom</key> <string>nine.dnom.glif</string> <key>nine.numr</key> <string>nine.numr.glif</string> <key>nine.osf</key> <string>nine.osf.glif</string> <key>nine.subs</key> <string>nine.subs.glif</string> <key>nine.tf</key> <string>nine.tf.glif</string> <key>ninesuperior</key> <string>ninesuperior.glif</string> <key>notequal</key> <string>notequal.glif</string> <key>ntilde</key> <string>ntilde.glif</string> <key>numbersign</key> <string>numbersign.glif</string> <key>numero</key> <string>numero.glif</string> <key>o</key> <string>o.glif</string> <key>oacute</key> <string>oacute.glif</string> <key>obreve</key> <string>obreve.glif</string> <key>ocircumflex</key> <string>ocircumflex.glif</string> <key>ocircumflexacute</key> <string>ocircumflexacute.glif</string> <key>ocircumflexdotbelow</key> <string>ocircumflexdotbelow.glif</string> <key>ocircumflexgrave</key> <string>ocircumflexgrave.glif</string> <key>ocircumflexhookabove</key> <string>ocircumflexhookabove.glif</string> <key>ocircumflextilde</key> <string>ocircumflextilde.glif</string> <key>odblgrave</key> <string>odblgrave.glif</string> <key>odieresis</key> <string>odieresis.glif</string> <key>odotbelow</key> <string>odotbelow.glif</string> <key>oe</key> <string>oe.glif</string> <key>ogonek</key> <string>ogonek.glif</string> <key>ogonekcomb</key> <string>ogonekcomb.glif</string> <key>ograve</key> <string>ograve.glif</string> <key>ohookabove</key> <string>ohookabove.glif</string> <key>ohorn</key> <string>ohorn.glif</string> <key>ohornacute</key> <string>ohornacute.glif</string> <key>ohorndotbelow</key> <string>ohorndotbelow.glif</string> <key>ohorngrave</key> <string>ohorngrave.glif</string> <key>ohornhookabove</key> <string>ohornhookabove.glif</string> <key>ohorntilde</key> <string>ohorntilde.glif</string> <key>ohungarumlaut</key> <string>ohungarumlaut.glif</string> <key>oinvertedbreve</key> <string>oinvertedbreve.glif</string> <key>omacron</key> <string>omacron.glif</string> <key>one</key> <string>one.glif</string> <key>one.dnom</key> <string>one.dnom.glif</string> <key>one.numr</key> <string>one.numr.glif</string> <key>one.osf</key> <string>one.osf.glif</string> <key>one.subs</key> <string>one.subs.glif</string> <key>one.tf</key> <string>one.tf.glif</string> <key>oneeighth</key> <string>oneeighth.glif</string> <key>onehalf</key> <string>onehalf.glif</string> <key>onequarter</key> <string>onequarter.glif</string> <key>onesuperior</key> <string>onesuperior.glif</string> <key>onethird</key> <string>onethird.glif</string> <key>oogonek</key> <string>oogonek.glif</string> <key>ordfeminine</key> <string>ordfeminine.glif</string> <key>ordmasculine</key> <string>ordmasculine.glif</string> <key>oslash</key> <string>oslash.glif</string> <key>oslashacute</key> <string>oslashacute.glif</string> <key>otilde</key> <string>otilde.glif</string> <key>p</key> <string>p.glif</string> <key>paragraph</key> <string>paragraph.glif</string> <key>parenleft</key> <string>parenleft.glif</string> <key>parenright</key> <string>parenright.glif</string> <key>partialdiff</key> <string>partialdiff.glif</string> <key>percent</key> <string>percent.glif</string> <key>period</key> <string>period.glif</string> <key>period.tf</key> <string>period.tf.glif</string> <key>periodcentered</key> <string>periodcentered.glif</string> <key>perthousand</key> <string>perthousand.glif</string> <key>pi</key> <string>pi.glif</string> <key>plus</key> <string>plus.glif</string> <key>plusminus</key> <string>plusminus.glif</string> <key>product</key> <string>product.glif</string> <key>published</key> <string>published.glif</string> <key>q</key> <string>q.glif</string> <key>question</key> <string>question.glif</string> <key>questiondown</key> <string>questiondown.glif</string> <key>quotedbl</key> <string>quotedbl.glif</string> <key>quotedblbase</key> <string>quotedblbase.glif</string> <key>quotedblleft</key> <string>quotedblleft.glif</string> <key>quotedblright</key> <string>quotedblright.glif</string> <key>quoteleft</key> <string>quoteleft.glif</string> <key>quoteright</key> <string>quoteright.glif</string> <key>quotesinglbase</key> <string>quotesinglbase.glif</string> <key>quotesingle</key> <string>quotesingle.glif</string> <key>r</key> <string>r.glif</string> <key>racute</key> <string>racute.glif</string> <key>radical</key> <string>radical.glif</string> <key>rcaron</key> <string>rcaron.glif</string> <key>rcommaaccent</key> <string>rcommaaccent.glif</string> <key>rdblgrave</key> <string>rdblgrave.glif</string> <key>rdotbelow</key> <string>rdotbelow.glif</string> <key>registered</key> <string>registered.glif</string> <key>ring</key> <string>ring.glif</string> <key>ringcomb</key> <string>ringcomb.glif</string> <key>rinvertedbreve</key> <string>rinvertedbreve.glif</string> <key>rupeeIndian</key> <string>rupeeI_ndian.glif</string> <key>rupeeIndian.tf</key> <string>rupeeI_ndian.tf.glif</string> <key>s</key> <string>s.glif</string> <key>sacute</key> <string>sacute.glif</string> <key>scaron</key> <string>scaron.glif</string> <key>scedilla</key> <string>scedilla.glif</string> <key>schwa</key> <string>schwa.glif</string> <key>scircumflex</key> <string>scircumflex.glif</string> <key>scommaaccent</key> <string>scommaaccent.glif</string> <key>sdotbelow</key> <string>sdotbelow.glif</string> <key>section</key> <string>section.glif</string> <key>semicolon</key> <string>semicolon.glif</string> <key>servicemark</key> <string>servicemark.glif</string> <key>seven</key> <string>seven.glif</string> <key>seven.dnom</key> <string>seven.dnom.glif</string> <key>seven.numr</key> <string>seven.numr.glif</string> <key>seven.osf</key> <string>seven.osf.glif</string> <key>seven.subs</key> <string>seven.subs.glif</string> <key>seven.tf</key> <string>seven.tf.glif</string> <key>seveneighths</key> <string>seveneighths.glif</string> <key>sevensuperior</key> <string>sevensuperior.glif</string> <key>six</key> <string>six.glif</string> <key>six.dnom</key> <string>six.dnom.glif</string> <key>six.numr</key> <string>six.numr.glif</string> <key>six.osf</key> <string>six.osf.glif</string> <key>six.subs</key> <string>six.subs.glif</string> <key>six.tf</key> <string>six.tf.glif</string> <key>sixsuperior</key> <string>sixsuperior.glif</string> <key>slash</key> <string>slash.glif</string> <key>softhyphen</key> <string>softhyphen.glif</string> <key>space</key> <string>space.glif</string> <key>sterling</key> <string>sterling.glif</string> <key>sterling.tf</key> <string>sterling.tf.glif</string> <key>summation</key> <string>summation.glif</string> <key>t</key> <string>t.glif</string> <key>tbar</key> <string>tbar.glif</string> <key>tcaron</key> <string>tcaron.glif</string> <key>tcedilla</key> <string>tcedilla.glif</string> <key>tcommaaccent</key> <string>tcommaaccent.glif</string> <key>tdotbelow</key> <string>tdotbelow.glif</string> <key>thorn</key> <string>thorn.glif</string> <key>three</key> <string>three.glif</string> <key>three.dnom</key> <string>three.dnom.glif</string> <key>three.numr</key> <string>three.numr.glif</string> <key>three.osf</key> <string>three.osf.glif</string> <key>three.subs</key> <string>three.subs.glif</string> <key>three.tf</key> <string>three.tf.glif</string> <key>threeeighths</key> <string>threeeighths.glif</string> <key>threequarters</key> <string>threequarters.glif</string> <key>threesuperior</key> <string>threesuperior.glif</string> <key>tilde</key> <string>tilde.glif</string> <key>tildecomb</key> <string>tildecomb.glif</string> <key>trademark</key> <string>trademark.glif</string> <key>two</key> <string>two.glif</string> <key>two.dnom</key> <string>two.dnom.glif</string> <key>two.numr</key> <string>two.numr.glif</string> <key>two.osf</key> <string>two.osf.glif</string> <key>two.subs</key> <string>two.subs.glif</string> <key>two.tf</key> <string>two.tf.glif</string> <key>twosuperior</key> <string>twosuperior.glif</string> <key>twothirds</key> <string>twothirds.glif</string> <key>u</key> <string>u.glif</string> <key>uacute</key> <string>uacute.glif</string> <key>ubreve</key> <string>ubreve.glif</string> <key>ucaron</key> <string>ucaron.glif</string> <key>ucircumflex</key> <string>ucircumflex.glif</string> <key>udblgrave</key> <string>udblgrave.glif</string> <key>udieresis</key> <string>udieresis.glif</string> <key>udotbelow</key> <string>udotbelow.glif</string> <key>ugrave</key> <string>ugrave.glif</string> <key>uhookabove</key> <string>uhookabove.glif</string> <key>uhorn</key> <string>uhorn.glif</string> <key>uhornacute</key> <string>uhornacute.glif</string> <key>uhorndotbelow</key> <string>uhorndotbelow.glif</string> <key>uhorngrave</key> <string>uhorngrave.glif</string> <key>uhornhookabove</key> <string>uhornhookabove.glif</string> <key>uhorntilde</key> <string>uhorntilde.glif</string> <key>uhungarumlaut</key> <string>uhungarumlaut.glif</string> <key>uinvertedbreve</key> <string>uinvertedbreve.glif</string> <key>umacron</key> <string>umacron.glif</string> <key>underscore</key> <string>underscore.glif</string> <key>uni0000</key> <string>uni0000.glif</string> <key>uogonek</key> <string>uogonek.glif</string> <key>uring</key> <string>uring.glif</string> <key>utilde</key> <string>utilde.glif</string> <key>v</key> <string>v.glif</string> <key>w</key> <string>w.glif</string> <key>wacute</key> <string>wacute.glif</string> <key>wcircumflex</key> <string>wcircumflex.glif</string> <key>wdieresis</key> <string>wdieresis.glif</string> <key>wgrave</key> <string>wgrave.glif</string> <key>won</key> <string>won.glif</string> <key>x</key> <string>x.glif</string> <key>y</key> <string>y.glif</string> <key>yacute</key> <string>yacute.glif</string> <key>ycircumflex</key> <string>ycircumflex.glif</string> <key>ydieresis</key> <string>ydieresis.glif</string> <key>ydotbelow</key> <string>ydotbelow.glif</string> <key>yen</key> <string>yen.glif</string> <key>yen.tf</key> <string>yen.tf.glif</string> <key>ygrave</key> <string>ygrave.glif</string> <key>yhookabove</key> <string>yhookabove.glif</string> <key>ytilde</key> <string>ytilde.glif</string> <key>z</key> <string>z.glif</string> <key>zacute</key> <string>zacute.glif</string> <key>zcaron</key> <string>zcaron.glif</string> <key>zdotaccent</key> <string>zdotaccent.glif</string> <key>zdotbelow</key> <string>zdotbelow.glif</string> <key>zero</key> <string>zero.glif</string> <key>zero.dnom</key> <string>zero.dnom.glif</string> <key>zero.numr</key> <string>zero.numr.glif</string> <key>zero.osf</key> <string>zero.osf.glif</string> <key>zero.subs</key> <string>zero.subs.glif</string> <key>zero.tf</key> <string>zero.tf.glif</string> <key>zerosuperior</key> <string>zerosuperior.glif</string> </dict> </plist> ```
/content/code_sandbox/sources/ufo/PublicSans-Black.ufo/glyphs/contents.plist
xml
2016-11-04T13:51:35
2024-08-16T16:28:40
public-sans
uswds/public-sans
4,449
13,913
```xml <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="path_to_url" android:shape="rectangle" android:visible="true"> <gradient android:angle="270" android:startColor="#263238" android:endColor="#080d10" /> </shape> ```
/content/code_sandbox/app/src/main/res/drawable/weather_background_cloudy_night.xml
xml
2016-02-21T04:39:19
2024-08-16T13:35:51
GeometricWeather
WangDaYeeeeee/GeometricWeather
2,420
71
```xml import * as React from 'react'; import { DevLauncher } from '../../native-modules/DevLauncher'; import { AppInfo, toggleDebugRemoteJSAsync, toggleElementInspectorAsync, toggleFastRefreshAsync, togglePerformanceMonitorAsync, copyToClipboardAsync, reloadAsync, } from '../../native-modules/DevMenu'; import { render, waitFor, fireEvent, act } from '../../test-utils'; import { Main } from '../Main'; const { navigateToLauncherAsync } = DevLauncher; const mockToggleDebugRemoteJSAsync = toggleDebugRemoteJSAsync as jest.Mock; const mockToggleElementInspectorAsync = toggleElementInspectorAsync as jest.Mock; const mockToggleFastRefreshAsync = toggleFastRefreshAsync as jest.Mock; const mockTogglePerformanceMonitorAsync = togglePerformanceMonitorAsync as jest.Mock; const mockCopyToClipboardAsync = copyToClipboardAsync as jest.Mock; const mockNavigateToLauncherAsync = navigateToLauncherAsync as jest.Mock; const mockReloadAsync = reloadAsync as jest.Mock; const mockFns: jest.Mock[] = [ mockToggleDebugRemoteJSAsync, mockToggleElementInspectorAsync, mockToggleFastRefreshAsync, mockTogglePerformanceMonitorAsync, mockCopyToClipboardAsync, mockNavigateToLauncherAsync, mockReloadAsync, ]; describe('<Main />', () => { afterEach(() => { mockFns.forEach((fn) => fn.mockClear()); }); test('renders', async () => { const { getByText } = render(<Main />, { initialAppProviderProps: {} }); await waitFor(() => getByText(/go home/i)); }); test('renders build info from dev menu', async () => { const fakeAppInfo: AppInfo = { appName: 'testing', appVersion: '123', appIcon: 'hello', hostUrl: '321', sdkVersion: '500.0.0', runtimeVersion: '10', }; const { getByText, queryByText } = render(<Main />, { initialAppProviderProps: { appInfo: fakeAppInfo }, }); await waitFor(() => getByText(/go home/i)); expect(queryByText(fakeAppInfo.appName)).not.toBe(null); expect(queryByText(fakeAppInfo.appVersion)).not.toBe(null); expect(queryByText(fakeAppInfo.hostUrl)).not.toBe(null); expect(queryByText(fakeAppInfo.runtimeVersion)).not.toBe(null); }); test('hooked up to devsettings fns', async () => { const { getByText, getByTestId } = render(<Main />); await waitFor(() => getByText(/go home/i)); expect(togglePerformanceMonitorAsync).toHaveBeenCalledTimes(0); await act(async () => fireEvent.press(getByText(/toggle performance monitor/i))); expect(togglePerformanceMonitorAsync).toHaveBeenCalledTimes(1); expect(toggleElementInspectorAsync).toHaveBeenCalledTimes(0); await act(async () => fireEvent.press(getByText(/toggle element inspector/i))); expect(toggleElementInspectorAsync).toHaveBeenCalledTimes(1); expect(toggleFastRefreshAsync).toHaveBeenCalledTimes(0); await act(async () => fireEvent.press(getByTestId('fast-refresh'))); expect(toggleFastRefreshAsync).toHaveBeenCalledTimes(1); }); describe('Remote JS Debugger', () => { it('should be available for SDK < 49', async () => { const { getByText, getByTestId } = render(<Main />, { initialAppProviderProps: { appInfo: { sdkVersion: '48.0.0', }, }, }); await waitFor(() => getByText(/go home/i)); expect(toggleDebugRemoteJSAsync).toHaveBeenCalledTimes(0); await act(async () => fireEvent.press(getByTestId('remote-js-debugger'))); expect(toggleDebugRemoteJSAsync).toHaveBeenCalledTimes(1); }); it('should be disabled for SDK 49+', async () => { const { getByText, getByTestId } = render(<Main />); await waitFor(() => getByText(/go home/i)); expect(getByTestId('remote-js-debugger')).toBeDisabled(); }); }); test('copy text functions', async () => { const fakeAppInfo: AppInfo = { appName: 'testing', appVersion: '123', appIcon: 'hello', hostUrl: '321', sdkVersion: '500.0.0', runtimeVersion: '10', }; const { getByText, getByTestId } = render(<Main />, { initialAppProviderProps: { appInfo: fakeAppInfo }, }); await waitFor(() => getByText(/go home/i)); expect(copyToClipboardAsync).toHaveBeenCalledTimes(0); await act(async () => fireEvent.press(getByText(/copy all/i))); expect(copyToClipboardAsync).toHaveBeenCalledTimes(1); expect(copyToClipboardAsync).toHaveBeenLastCalledWith(expect.stringContaining('sdkVersion')); expect(copyToClipboardAsync).toHaveBeenLastCalledWith(expect.stringContaining('appVersion')); expect(copyToClipboardAsync).toHaveBeenLastCalledWith(expect.stringContaining('appName')); expect(copyToClipboardAsync).toHaveBeenLastCalledWith( expect.stringContaining('runtimeVersion') ); mockCopyToClipboardAsync.mockClear(); expect(copyToClipboardAsync).toHaveBeenCalledTimes(0); await act(async () => fireEvent.press(getByTestId(/main.copyUrlButton/i))); expect(copyToClipboardAsync).toHaveBeenCalledTimes(1); expect(copyToClipboardAsync).toHaveBeenLastCalledWith(fakeAppInfo.hostUrl); }); test('return to dev launcher and reload', async () => { const { getByText } = render(<Main />); await waitFor(() => getByText(/go home/i)); expect(navigateToLauncherAsync).toHaveBeenCalledTimes(0); await act(async () => fireEvent.press(getByText(/go home/i))); expect(navigateToLauncherAsync).toHaveBeenCalledTimes(1); expect(reloadAsync).toHaveBeenCalledTimes(0); await act(async () => fireEvent.press(getByText(/reload/i))); expect(reloadAsync).toHaveBeenCalledTimes(1); }); }); ```
/content/code_sandbox/packages/expo-dev-menu/app/components/__tests__/Main.test.tsx
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
1,268
```xml // See LICENSE in the project root for license information. import { calculateShortestPath, calculateCriticalPathLength, calculateCriticalPathLengths, type ISortableOperation } from '../calculateCriticalPath'; interface ITestOperation extends ISortableOperation<ITestOperation> { // Nothing added, just need an interface to solve the infinite expansion. } function createGraph( edges: Iterable<[start: string, end: string]>, weights?: Iterable<[name: string, weight: number]> ): Map<string, ITestOperation> { const nodes: Map<string, ITestOperation> = new Map(); if (weights) { for (const [name, weight] of weights) { nodes.set(name, { name, weight, consumers: new Set() }); } } function getOrCreateNode(name: string): ITestOperation { let node: ITestOperation | undefined = nodes.get(name); if (!node) { node = { name, weight: 1, consumers: new Set() }; nodes.set(name, node); } return node; } for (const [start, end] of edges) { const startNode: ITestOperation = getOrCreateNode(start); const endNode: ITestOperation = getOrCreateNode(end); endNode.consumers.add(startNode); } return nodes; } describe(calculateShortestPath.name, () => { it('returns the shortest path', () => { const graph: Map<string, ITestOperation> = createGraph([ ['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e'], ['e', 'f'] ]); const result1: ITestOperation[] = calculateShortestPath(graph.get('a')!, graph.get('f')!); expect(result1.map((x) => x.name)).toMatchSnapshot('long'); graph.get('c')!.consumers.add(graph.get('a')!); const result2: ITestOperation[] = calculateShortestPath(graph.get('a')!, graph.get('f')!); expect(result2.map((x) => x.name)).toMatchSnapshot('with shortcut'); graph.get('f')!.consumers.add(graph.get('c')!); const result3: ITestOperation[] = calculateShortestPath(graph.get('a')!, graph.get('f')!); expect(result3.map((x) => x.name)).toMatchSnapshot('with multiple shortcuts'); graph.get('a')!.consumers.add(graph.get('f')!); const result4: ITestOperation[] = calculateShortestPath(graph.get('a')!, graph.get('a')!); expect(result4.map((x) => x.name)).toMatchSnapshot('with multiple shortcuts (circular)'); }); }); describe(calculateCriticalPathLength.name, () => { it('sets the critical path', () => { const graph1: Map<string, ITestOperation> = createGraph( [ ['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e'], ['e', 'f'], ['c', 'g'] ], Object.entries({ a: 1, b: 1, c: 1, d: 1, e: 1, f: 1, g: 10 }) ); const lengths: Record<string, number> = {}; for (const [name, node] of graph1) { const criticalPathLength: number = calculateCriticalPathLength(node, new Set()); lengths[name] = criticalPathLength; } expect(lengths).toMatchSnapshot(); }); it('reports circularities', () => { const graph1: Map<string, ITestOperation> = createGraph([ ['a', 'b'], ['b', 'c'], ['c', 'b'], ['c', 'd'], ['d', 'e'] ]); expect(() => { calculateCriticalPathLength(graph1.get('e')!, new Set()); }).toThrowErrorMatchingSnapshot(); }); }); describe(calculateCriticalPathLengths.name, () => { it('sets the critical path', () => { const graph1: Map<string, ITestOperation> = createGraph( [ ['a', 'b'], ['b', 'c'], ['c', 'd'], ['d', 'e'], ['e', 'f'], ['c', 'g'] ], Object.entries({ a: 1, b: 1, c: 1, d: 1, e: 1, f: 1, g: 10 }) ); calculateCriticalPathLengths(graph1.values()); const lengths: Record<string, number | undefined> = {}; for (const [name, node] of graph1) { lengths[name] = node.criticalPathLength; } expect(lengths).toMatchSnapshot(); }); }); ```
/content/code_sandbox/libraries/operation-graph/src/test/calculateCriticalPath.test.ts
xml
2016-09-30T00:28:20
2024-08-16T18:54:35
rushstack
microsoft/rushstack
5,790
1,095
```xml // See LICENSE in the project root for license information. import { type IDocNodeParameters, DocNode, DocSection } from '@microsoft/tsdoc'; import { CustomDocNodeKind } from './CustomDocNodeKind'; /** * Constructor parameters for {@link DocTableCell}. */ export interface IDocTableCellParameters extends IDocNodeParameters {} /** * Represents table cell, similar to an HTML `<td>` element. */ export class DocTableCell extends DocNode { public readonly content: DocSection; public constructor(parameters: IDocTableCellParameters, sectionChildNodes?: ReadonlyArray<DocNode>) { super(parameters); this.content = new DocSection({ configuration: this.configuration }, sectionChildNodes); } /** @override */ public get kind(): string { return CustomDocNodeKind.TableCell; } } ```
/content/code_sandbox/apps/api-documenter/src/nodes/DocTableCell.ts
xml
2016-09-30T00:28:20
2024-08-16T18:54:35
rushstack
microsoft/rushstack
5,790
170
```xml import { describe, expect, it } from 'vitest'; import { expectTypeOf } from 'expect-type'; import { reactive } from 'vue'; import { updateArgs } from './render'; describe('Render Story', () => { it('update reactive Args updateArgs()', () => { const reactiveArgs = reactive({ argFoo: 'foo', argBar: 'bar' }); // get reference to reactiveArgs or create a new one; expectTypeOf(reactiveArgs).toMatchTypeOf<Record<string, any>>(); expectTypeOf(reactiveArgs).toEqualTypeOf<{ argFoo: string; argBar: string }>(); const newArgs = { argFoo: 'foo2', argBar: 'bar2' }; updateArgs(reactiveArgs, newArgs); expectTypeOf(reactiveArgs).toEqualTypeOf<{ argFoo: string; argBar: string }>(); expect(reactiveArgs).toEqual({ argFoo: 'foo2', argBar: 'bar2' }); }); it('update reactive Args component inherit objectArg updateArgs()', () => { const reactiveArgs = reactive({ objectArg: { argFoo: 'foo', argBar: 'bar' } }); // get reference to reactiveArgs or create a new one; expectTypeOf(reactiveArgs).toMatchTypeOf<Record<string, any>>(); expectTypeOf(reactiveArgs).toEqualTypeOf<{ objectArg: { argFoo: string; argBar: string } }>(); const newArgs = { argFoo: 'foo2', argBar: 'bar2' }; updateArgs(reactiveArgs, newArgs); expectTypeOf(reactiveArgs).toEqualTypeOf<{ objectArg: { argFoo: string; argBar: string } }>(); expect(reactiveArgs).toEqual({ argFoo: 'foo2', argBar: 'bar2', }); }); it('update reactive Args component inherit objectArg', () => { const reactiveArgs = reactive({ objectArg: { argFoo: 'foo' } }); // get reference to reactiveArgs or create a new one; expectTypeOf(reactiveArgs).toMatchTypeOf<Record<string, any>>(); expectTypeOf(reactiveArgs).toEqualTypeOf<{ objectArg: { argFoo: string } }>(); const newArgs = { argFoo: 'foo2', argBar: 'bar2' }; updateArgs(reactiveArgs, newArgs); expect(reactiveArgs).toEqual({ argFoo: 'foo2', argBar: 'bar2' }); }); it('update reactive Args component 2 object args -> updateArgs()', () => { const reactiveArgs = reactive({ objectArg: { argFoo: 'foo' }, objectArg2: { argBar: 'bar' }, }); // get reference to reactiveArgs or create a new one; expectTypeOf(reactiveArgs).toMatchTypeOf<Record<string, any>>(); expectTypeOf(reactiveArgs).toEqualTypeOf<{ objectArg: { argFoo: string }; objectArg2: { argBar: string }; }>(); const newArgs = { argFoo: 'foo2', argBar: 'bar2' }; updateArgs(reactiveArgs, newArgs); expect(reactiveArgs).toEqual({ argFoo: 'foo2', argBar: 'bar2', }); }); it('update reactive Args component object with object -> updateArgs()', () => { const reactiveArgs = reactive({ objectArg: { argFoo: 'foo' }, }); // get reference to reactiveArgs or create a new one; expectTypeOf(reactiveArgs).toMatchTypeOf<Record<string, any>>(); expectTypeOf(reactiveArgs).toEqualTypeOf<{ objectArg: { argFoo: string }; }>(); const newArgs = { objectArg: { argFoo: 'bar' } }; updateArgs(reactiveArgs, newArgs); expect(reactiveArgs).toEqual({ objectArg: { argFoo: 'bar' } }); }); it('update reactive Args component no arg with all args -> updateArgs()', () => { const reactiveArgs = reactive({ objectArg: { argFoo: 'foo' } }); // get reference to reactiveArgs or create a new one; expectTypeOf(reactiveArgs).toMatchTypeOf<Record<string, any>>(); expectTypeOf(reactiveArgs).toEqualTypeOf<{ objectArg: { argFoo: string }; }>(); const newArgs = { objectArg: { argFoo: 'bar' } }; updateArgs(reactiveArgs, newArgs); expect(reactiveArgs).toEqual({ objectArg: { argFoo: 'bar' } }); }); }); ```
/content/code_sandbox/code/renderers/vue3/src/render.test.ts
xml
2016-03-18T04:23:44
2024-08-16T19:22:08
storybook
storybookjs/storybook
83,755
1,030
```xml import { ESLintUtils, TSESTree } from '@typescript-eslint/experimental-utils'; import { HTMLElement } from '../../types/index'; import { lintDecoratorTemplate } from '../decorator-template-helper'; import { getDeprecatedClassFixes, getTagFixes } from '../html-fixer-helpers'; export const createESLintRule = ESLintUtils.RuleCreator(() => ``); export type MessageIds = 'clrDatalistFailure'; const disallowedTag = `clr-datalist-container`; export default createESLintRule({ name: 'no-clr-datalist', meta: { type: 'problem', docs: { description: 'Disallow use of clr-datalist', recommended: 'warn', }, fixable: 'code', messages: { clrDatalistFailure: 'Using clr-datalist is not allowed!', }, schema: [{}], }, defaultOptions: [{}], create(context) { return { [`HTMLElement[tagName="${disallowedTag}"]`](node: HTMLElement): void { const classNode = node.attributes?.find(attribute => attribute.attributeName.value === 'class'); context.report({ node: node as any, messageId: 'clrDatalistFailure', fix: fixer => { const tagFixes = getTagFixes(fixer, node, 'clr-datalist-container', 'cds-datalist', [ `control-width="shrink"`, ]); const attributeFixes = getDeprecatedClassFixes(fixer, classNode, [] as any); return [...tagFixes, ...attributeFixes]; }, }); }, 'ClassDeclaration > Decorator'(node: TSESTree.Decorator): void { lintDecoratorTemplate(context, node, disallowedTag, 'clrDatalistFailure'); }, }; }, }); ```
/content/code_sandbox/packages/eslint-plugin-clarity-adoption/src/rules/no-clr-datalist/index.ts
xml
2016-09-29T17:24:17
2024-08-11T17:06:15
clarity
vmware-archive/clarity
6,431
399
```xml import * as React from 'react'; import createSvgIcon from '../utils/createSvgIcon'; const NotePinnedIcon = createSvgIcon({ svg: ({ classes }) => ( <svg xmlns="path_to_url" viewBox="0 0 2048 2048" className={classes.svg} focusable="false"> <path d="M1792 1271q61 27 128 36v613H677l-549-549V128h1792v229q-67 9-128 36V256H256v1024h512v512h1024v-521zM640 1408H347l293 293v-293zm1408-896v640h-64q-78 0-143-33t-112-95h-110q-28 59-70 106t-94 81-113 51-126 18h-64V896H640l-128-64 128-64h512V384h64q65 0 125 18t113 51 95 80 70 107h110q47-61 112-94t143-34h64zm-128 139q-24 8-41 20t-30 26-25 33-24 38h-269l-15-43q-28-79-91-134t-145-72v626q82-17 145-72t91-134l15-43h269q12 20 23 38t25 32 31 27 41 20V651z" /> </svg> ), displayName: 'NotePinnedIcon', }); export default NotePinnedIcon; ```
/content/code_sandbox/packages/react-icons-mdl2/src/components/NotePinnedIcon.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
368
```xml import Graph, {Attributes} from 'graphology-types'; import {MinimalEdgeMapper} from 'graphology-utils/getters'; type EdgeBetweennessCentralityMapping = {[edge: string]: number}; type EdgeBetweennessCentralityOptions<EdgeAttributes extends Attributes> = { edgeCentralityAttribute?: string; getEdgeWeight?: | keyof EdgeAttributes | MinimalEdgeMapper<number, EdgeAttributes> | null; normalized?: boolean; }; interface IEdgeBetweennessCentrality { < NodeAttributes extends Attributes = Attributes, EdgeAttributes extends Attributes = Attributes >( graph: Graph<NodeAttributes, EdgeAttributes>, options?: EdgeBetweennessCentralityOptions<EdgeAttributes> ): EdgeBetweennessCentralityMapping; assign< NodeAttributes extends Attributes = Attributes, EdgeAttributes extends Attributes = Attributes >( graph: Graph<NodeAttributes, EdgeAttributes>, options?: EdgeBetweennessCentralityOptions<EdgeAttributes> ): void; } declare const edgeBetweennessCentrality: IEdgeBetweennessCentrality; export default edgeBetweennessCentrality; ```
/content/code_sandbox/src/metrics/centrality/edge-betweenness.d.ts
xml
2016-08-24T16:59:27
2024-08-16T09:58:25
graphology
graphology/graphology
1,223
238
```xml import * as React from 'react'; import type { IButtonClassNames } from '../../components/Button/BaseButton.classNames'; import type { ITheme } from '../../Styling'; export interface IButtonGridCellProps<T> { /** * The option that will be made available to the user */ item: T; /** * Arbitrary unique string associated with this option */ id: string; /** * If the this option should be disabled */ disabled?: boolean; /** * If the cell is currently selected */ selected?: boolean; onClick?: (item: T, event?: React.MouseEvent<HTMLButtonElement>) => void; /** * The render callback to handle rendering the item */ onRenderItem: (item: T) => JSX.Element; onHover?: (item?: T, event?: React.MouseEvent<HTMLButtonElement>) => void; onFocus?: (item: T, event?: React.FocusEvent<HTMLButtonElement>) => void; /** * The accessible role for this option */ role?: string; /** * className(s) to apply */ className?: string; /** * CSS classes to apply when the cell is disabled */ cellDisabledStyle?: string[]; /** * CSS classes to apply when the cell is selected */ cellIsSelectedStyle?: string[]; /** * Index for this option */ index?: number; /** * The label for this item. */ label?: string; /** * Method to provide the classnames to style a button. * The default value for this prop is `getClassnames` defined in `BaseButton.classNames`. */ getClassNames?: ( theme: ITheme, className: string, variantClassName: string, iconClassName: string | undefined, menuIconClassName: string | undefined, disabled: boolean, checked: boolean, expanded: boolean, isSplit: boolean | undefined, ) => IButtonClassNames; onMouseEnter?: (ev: React.MouseEvent<HTMLButtonElement>) => boolean; onMouseMove?: (ev: React.MouseEvent<HTMLButtonElement>) => boolean; onMouseLeave?: (ev: React.MouseEvent<HTMLButtonElement>) => void; onWheel?: (ev: React.MouseEvent<HTMLButtonElement>) => void; onKeyDown?: (ev: React.KeyboardEvent<HTMLButtonElement>) => void; } ```
/content/code_sandbox/packages/react/src/utilities/ButtonGrid/ButtonGridCell.types.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
517
```xml import { CommandError } from '../../../../utils/errors'; import { getAttachedDevicesAsync } from '../adb'; import { listAvdsAsync } from '../emulator'; import { getDevicesAsync } from '../getDevices'; jest.mock('../adb', () => ({ getAttachedDevicesAsync: jest.fn(), })); jest.mock('../emulator', () => ({ listAvdsAsync: jest.fn(), })); it(`asserts no devices are available`, async () => { jest.mocked(getAttachedDevicesAsync).mockResolvedValueOnce([]); jest.mocked(listAvdsAsync).mockResolvedValueOnce([]); await expect(getDevicesAsync()).rejects.toThrowError(CommandError); expect(getAttachedDevicesAsync).toBeCalled(); expect(listAvdsAsync).toBeCalled(); }); ```
/content/code_sandbox/packages/@expo/cli/src/start/platforms/android/__tests__/getDevices-test.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
159
```xml <?xml version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xsi:schemaLocation="path_to_url path_to_url" xmlns:xsi="path_to_url" xmlns:xs="path_to_url" xml:lang="en"> <xs:element name="Types"> <xs:annotation> <xs:documentation>The `&lt;Types&gt;` tag encloses all of the types that are defined in the file. There should be only one pair of `&lt;Types&gt;` tags.</xs:documentation> </xs:annotation> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" name="Type" maxOccurs="unbounded" type="Type"> <xs:annotation> <xs:documentation>Each .NET Framework type mentioned in the file should be represented by a pair of `&lt;Type&gt;` tags.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <xs:complexType name="Type"> <xs:sequence> <xs:element name="Name" type="xs:string"> <xs:annotation> <xs:documentation>A pair of `&lt;Name&gt;` tags that enclose the name of the affected .NET Framework type.</xs:documentation> </xs:annotation> </xs:element> <xs:element minOccurs="0" name="Members" type="Members" /> <xs:element minOccurs="0" name="TypeConverter" type="TypeConverter" /> <xs:element minOccurs="0" name="TypeAdapter" type="TypeAdapter" /> </xs:sequence> </xs:complexType> <xs:complexType name="Members"> <xs:sequence maxOccurs="unbounded"> <xs:element minOccurs="0" name="NoteProperty" maxOccurs="unbounded" type="NoteProperty"> <xs:annotation> <xs:documentation>Defines a property with a static value.</xs:documentation> </xs:annotation> </xs:element> <xs:element minOccurs="0" name="AliasProperty" maxOccurs="unbounded" type="AliasProperty"> <xs:annotation> <xs:documentation>Defines a new name for an existing property.</xs:documentation> </xs:annotation> </xs:element> <xs:element minOccurs="0" name="ScriptProperty" maxOccurs="unbounded" type="ScriptProperty"> <xs:annotation> <xs:documentation>Defines a property whose value is the output of a script.</xs:documentation> </xs:annotation> </xs:element> <xs:element minOccurs="0" name="CodeProperty" maxOccurs="unbounded" type="CodeProperty"> <xs:annotation> <xs:documentation>References a static method of a .NET Framework class.</xs:documentation> </xs:annotation> </xs:element> <xs:element minOccurs="0" name="ScriptMethod" maxOccurs="unbounded" type="ScriptMethod"> <xs:annotation> <xs:documentation>Defines a method whose value is the output of a script.</xs:documentation> </xs:annotation> </xs:element> <xs:element minOccurs="0" name="CodeMethod" maxOccurs="unbounded" type="CodeMethod"> <xs:annotation> <xs:documentation> References a static method of a .NET Framework class.</xs:documentation> </xs:annotation> </xs:element> <xs:element minOccurs="0" name="PropertySet" maxOccurs="unbounded" type="PropertySet"> <xs:annotation> <xs:documentation>Defines a collection of properties of the object.</xs:documentation> </xs:annotation> </xs:element> <xs:element minOccurs="0" name="MemberSet" maxOccurs="unbounded" type="MemberSet"> <xs:annotation> <xs:documentation>Defines a collection of members (properties and methods).</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="TypeConverter"> <xs:sequence> <xs:element name="TypeName" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="TypeAdapter"> <xs:sequence> <xs:element name="TypeName" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="NoteProperty"> <xs:sequence> <xs:element name="Name" type="xs:string" /> <xs:element name="Value" type="xs:string" /> <xs:element minOccurs="0" name="TypeName" type="xs:string" /> </xs:sequence> <xs:attribute name="IsHidden" type="xs:boolean" /> </xs:complexType> <xs:complexType name="AliasProperty"> <xs:sequence> <xs:element name="Name" type="xs:string" /> <xs:element name="ReferencedMemberName" type="xs:string" /> <xs:element minOccurs="0" name="TypeName" type="xs:string" /> </xs:sequence> <xs:attribute name="IsHidden" type="xs:boolean" /> </xs:complexType> <xs:complexType name="ScriptProperty"> <xs:sequence> <xs:element name="Name" type="xs:string" /> <xs:element minOccurs="0" name="GetScriptBlock" type="xs:string" /> <xs:element minOccurs="0" name="SetScriptBlock" type="xs:string" /> </xs:sequence> <xs:attribute name="IsHidden" type="xs:boolean" /> </xs:complexType> <xs:complexType name="CodeProperty"> <xs:sequence> <xs:element name="Name" type="xs:string" /> <xs:element name="GetCodeReference" type="GetCodeReference" /> <xs:element minOccurs="0" name="SetCodeReference" type="SetCodeReference" /> </xs:sequence> <xs:attribute name="IsHidden" type="xs:boolean" /> </xs:complexType> <xs:complexType name="GetCodeReference"> <xs:sequence> <xs:element name="TypeName" type="xs:string" /> <xs:element name="MethodName" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="SetCodeReference"> <xs:sequence> <xs:element name="TypeName" type="xs:string" /> <xs:element name="MethodName" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="ScriptMethod"> <xs:sequence> <xs:element name="Name" type="xs:string" /> <xs:element name="Script" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="CodeMethod"> <xs:sequence> <xs:element name="Name" type="xs:string" /> <xs:element name="CodeReference" type="CodeReference" /> </xs:sequence> </xs:complexType> <xs:complexType name="CodeReference"> <xs:sequence> <xs:element name="TypeName" type="xs:string" /> <xs:element name="MethodName" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="PropertySet"> <xs:sequence> <xs:element name="Name" type="xs:string" /> <xs:element name="ReferencedProperties" type="ReferencedProperties" /> </xs:sequence> </xs:complexType> <xs:complexType name="ReferencedProperties"> <xs:sequence> <xs:element name="Name" maxOccurs="unbounded" type="xs:string" /> </xs:sequence> </xs:complexType> <xs:complexType name="MemberSet"> <xs:sequence> <xs:element name="Name" type="xs:string" /> <xs:element minOccurs="0" name="InheritMembers" type="xs:boolean" /> <xs:element name="Members" type="Members"> <xs:annotation> <xs:documentation>A pair of `&lt;Members&gt;` tags that enclose the tags for the new properties and methods that are defined for the .NET Framework type.</xs:documentation> </xs:annotation> </xs:element> </xs:sequence> </xs:complexType> </xs:schema> ```
/content/code_sandbox/src/Schemas/Types.xsd
xml
2016-01-13T23:41:35
2024-08-16T19:59:07
PowerShell
PowerShell/PowerShell
44,388
1,953
```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"/> /** * If provided a value, returns an updated sum of squared absolute values; otherwise, returns the current sum of squared absolute values. * * ## Notes * * - If provided `NaN` or a value which, when used in computations, results in `NaN`, the accumulated value is `NaN` for all future invocations. * * @param x - value * @returns sum of squared absolute values */ type accumulator = ( x?: number ) => number | null; /** * Returns an accumulator function which incrementally computes a sum of squared absolute values. * * @returns accumulator function * * @example * var accumulator = incrsumabs2(); * * var v = accumulator(); * // returns null * * v = accumulator( 2.0 ); * // returns 4.0 * * v = accumulator( -3.0 ); * // returns 13.0 * * v = accumulator( -4.0 ); * // returns 29.0 * * v = accumulator(); * // returns 29.0 */ declare function incrsumabs2(): accumulator; // EXPORTS // export = incrsumabs2; ```
/content/code_sandbox/lib/node_modules/@stdlib/stats/incr/sumabs2/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
309
```xml type ColorInput = | string | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Float32Array | Float64Array | Array | Uint8ClampedArray declare function colorNormalize(color: ColorInput, type: "float"): float[] declare function colorNormalize(color: ColorInput, type: "array"): float[] declare function colorNormalize(color: ColorInput, type: "int8"): Int8Array declare function colorNormalize(color: ColorInput, type: "int16"): Int8Array declare function colorNormalize(color: ColorInput, type: "int32"): Int8Array declare function colorNormalize(color: ColorInput, type: "uint"): Uint8Array declare function colorNormalize(color: ColorInput, type: "uint8"): Uint8Array declare function colorNormalize(color: ColorInput, type: "uint16"): Uint8Array declare function colorNormalize(color: ColorInput, type: "uint32"): Uint8Array declare function colorNormalize(color: ColorInput, type: "float32"): Float32Array declare function colorNormalize(color: ColorInput, type: "float64"): Float64Array declare function colorNormalize(color: ColorInput, type: "uint_clamped"): Uint8ClampedArray declare function colorNormalize(color: ColorInput, type: "uint8_clamped"): Uint8ClampedArray declare function colorNormalize(color: ColorInput): float[] declare module "color-normalize" { export default colorNormalize } ```
/content/code_sandbox/@types/color-normalize/index.d.ts
xml
2016-11-16T14:42:55
2024-08-14T11:48:05
oni
onivim/oni
11,355
343
```xml import { hasNext, noNext } from '../iterablehelpers.js'; import { filter } from 'ix/iterable/operators/index.js'; import { empty, throwError } from 'ix/iterable/index.js'; test('Iterable#filter', () => { const xs = [8, 5, 7, 4, 6, 9, 2, 1, 0]; const ys = filter<number>((x) => x % 2 === 0)(xs); const it = ys[Symbol.iterator](); hasNext(it, 8); hasNext(it, 4); hasNext(it, 6); hasNext(it, 2); hasNext(it, 0); noNext(it); }); test('Iterable#filter with index', () => { const xs = [8, 5, 7, 4, 6, 9, 2, 1, 0]; const ys = filter<number>((_, i) => i % 2 === 0)(xs); const it = ys[Symbol.iterator](); hasNext(it, 8); hasNext(it, 7); hasNext(it, 6); hasNext(it, 2); hasNext(it, 0); noNext(it); }); test('Iterable#filter with typeguard', () => { const xs = ['8', 5, '7', 4, '6', 9, '2', 1, '0']; const ys: Iterable<string> = filter<number | string, string>( (x): x is string => typeof x === 'string' )(xs); const it = ys[Symbol.iterator](); hasNext(it, '8'); hasNext(it, '7'); hasNext(it, '6'); hasNext(it, '2'); hasNext(it, '0'); noNext(it); }); test('Iterable#filter throws part way through', () => { const xs = [8, 5, 7, 4, 6, 9, 2, 1, 0]; const err = new Error(); const ys = filter((x) => { if (x === 4) { throw err; } return true; })(xs); const it = ys[Symbol.iterator](); hasNext(it, 8); hasNext(it, 5); hasNext(it, 7); expect(() => it.next()).toThrow(); }); test('Iterable#filter with index throws part way through', () => { const xs = [8, 5, 7, 4, 6, 9, 2, 1, 0]; const err = new Error(); const ys = filter((_, i) => { if (i === 3) { throw err; } return true; })(xs); const it = ys[Symbol.iterator](); hasNext(it, 8); hasNext(it, 5); hasNext(it, 7); expect(() => it.next()).toThrow(); }); test('Iterable#filter with error source', () => { const xs = throwError(new Error()); const ys = xs.pipe(filter((x) => x % 2 === 0)); const it = ys[Symbol.iterator](); expect(() => it.next()).toThrow(); }); test('Iterable#filter with empty source', () => { const xs = empty(); const ys = xs.pipe(filter((x) => x % 2 === 0)); const it = ys[Symbol.iterator](); noNext(it); }); ```
/content/code_sandbox/spec/iterable-operators/filter-spec.ts
xml
2016-02-22T20:04:19
2024-08-09T18:46:41
IxJS
ReactiveX/IxJS
1,319
761
```xml <Page x:Class="Telegram.Views.Calls.LiveStreamPage" xmlns="path_to_url" xmlns:x="path_to_url" xmlns:local="using:Telegram.Views" xmlns:common="using:Telegram.Common" xmlns:controls="using:Telegram.Controls" xmlns:settings="using:Telegram.Views.Settings" xmlns:xaml="using:Microsoft.Graphics.Canvas.UI.Xaml" xmlns:d="path_to_url" xmlns:mc="path_to_url" mc:Ignorable="d" d:DesignWidth="320" d:DesignHeight="200" Loaded="OnLoaded" Unloaded="OnUnloaded" SizeChanged="OnSizeChanged"> <Page.Resources> <SolidColorBrush x:Key="SignalBarForegroundBrush" Color="#FFFFFF" /> <SolidColorBrush x:Key="SignalBarForegroundDisabledBrush" Color="#99FFFFFF" /> <Style x:Key="CallGlyphButtonStyle" TargetType="controls:GlyphButton"> <Setter Property="Background" Value="Transparent" /> <Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" /> <Setter Property="BorderBrush" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" /> <Setter Property="BorderThickness" Value="0" /> <Setter Property="Padding" Value="0" /> <Setter Property="HorizontalAlignment" Value="Center" /> <Setter Property="HorizontalContentAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Top" /> <Setter Property="VerticalContentAlignment" Value="Center" /> <Setter Property="FontFamily" Value="{StaticResource SymbolThemeFontFamily}" /> <Setter Property="FontSize" Value="{StaticResource GlyphLargeFontSize}" /> <Setter Property="FontWeight" Value="Normal" /> <Setter Property="Height" Value="48" /> <Setter Property="Width" Value="48" /> <Setter Property="UseSystemFocusVisuals" Value="True" /> <Setter Property="FocusVisualMargin" Value="-3" /> <Setter Property="CornerRadius" Value="24" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="controls:GlyphButton"> <Grid Background="{TemplateBinding Background}" CornerRadius="{TemplateBinding CornerRadius}"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal" /> <VisualState x:Name="PointerOver"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootGrid"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundListLowBrush}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightBaseMediumHighBrush}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Pressed"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Background" Storyboard.TargetName="RootGrid"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlBackgroundListMediumBrush}" /> </ObjectAnimationUsingKeyFrames> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlHighlightBaseMediumBrush}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> <VisualState x:Name="Disabled"> <Storyboard> <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Foreground" Storyboard.TargetName="ContentPresenter"> <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource SystemControlForegroundBaseLowBrush}" /> </ObjectAnimationUsingKeyFrames> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> <Grid x:Name="RootGrid"> <TextBlock x:Name="ContentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" AutomationProperties.AccessibilityView="Raw" Text="{TemplateBinding Glyph}" /> </Grid> </Grid> </ControlTemplate> </Setter.Value> </Setter> </Style> </Page.Resources> <Grid Background="#FF000000" PointerMoved="Viewport_PointerEntered" PointerExited="Viewport_PointerExited" RequestedTheme="Dark"> <Grid.RowDefinitions> <RowDefinition Height="32" /> <RowDefinition Height="Auto" /> <RowDefinition /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <TextBlock x:Name="NoStream" TextWrapping="Wrap" TextAlignment="Center" VerticalAlignment="Center" Margin="12,0" Grid.Row="2" /> <Grid x:Name="ParticipantsPanel" Grid.Row="0" Grid.RowSpan="4"> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <xaml:CanvasControl x:Name="Viewport" /> <Rectangle x:Name="BottomShadow" Height="72" VerticalAlignment="Bottom" Canvas.ZIndex="2"> <Rectangle.Fill> <LinearGradientBrush StartPoint="0,0" EndPoint="0,1"> <common:Scrim.Gradient> <common:CubicBezierGradient TopColor="#00171717" BottomColor="#FF171717" /> </common:Scrim.Gradient> </LinearGradientBrush> </Rectangle.Fill> </Rectangle> </Grid> <Rectangle x:Name="TopShadow" VerticalAlignment="Top" Height="72" Grid.RowSpan="4"> <Rectangle.Fill> <LinearGradientBrush StartPoint="0,1" EndPoint="0,0"> <common:Scrim.Gradient> <common:CubicBezierGradient TopColor="#00171717" BottomColor="#FF171717" /> </common:Scrim.Gradient> </LinearGradientBrush> </Rectangle.Fill> </Rectangle> <Border x:Name="TitleArea" Background="Transparent" /> <StackPanel x:Name="TopButtons" GotFocus="Transport_GotFocus" LostFocus="Transport_LostFocus" VerticalAlignment="Top" Orientation="Horizontal" Margin="0,0,0,-8" Grid.RowSpan="2"> <controls:AnimatedGlyphButton x:Name="Resize" Click="Resize_Click" Glyph="&#xE966;" Width="40" Height="48" FontSize="16" IsTabStop="False" /> <controls:GlyphButton x:Name="Menu" Click="Menu_ContextRequested" Glyph="&#xE930;" Margin="-8,0,0,0" Width="40" Height="48" /> </StackPanel> <Border x:Name="TitlePanel" IsHitTestVisible="False" Margin="32,0,0,0"> <Grid HorizontalAlignment="Left"> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <TextBlock x:Name="TitleInfo" Text="{CustomResource VoipGroupVoiceChat}" TextLineBounds="TrimToCapHeight" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" VerticalAlignment="Center" Margin="12,0,0,0" AutomationProperties.LiveSetting="Assertive" Foreground="{ThemeResource PageHeaderForegroundBrush}" Style="{StaticResource CaptionTextBlockStyle}" /> <TextBlock x:Name="RecordingInfo" Visibility="Collapsed" Foreground="Red" Style="{StaticResource BaseTextBlockStyle}" Text=" " Grid.Column="1" /> </Grid> </Border> <TextBlock x:Name="SubtitleInfo" Foreground="{ThemeResource PageHeaderDisabledBrush}" Style="{StaticResource CaptionTextBlockStyle}" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" IsHitTestVisible="False" Margin="44,-8,0,12" Grid.Row="1" /> <Border x:Name="PointerListener" Background="Transparent" Grid.Row="2" Grid.RowSpan="2" /> <StackPanel x:Name="ScheduledPanel" x:Load="False" VerticalAlignment="Center" Grid.Row="2"> <TextBlock x:Name="ScheduledInfo" Text="{CustomResource VoipChatStartsIn}" TextAlignment="Center" TextLineBounds="TrimToBaseline" Style="{StaticResource TitleTextBlockStyle}" /> <TextBlock x:Name="StartsIn" FontWeight="Bold" TextAlignment="Center" Style="{StaticResource HeaderTextBlockStyle}" Foreground="{StaticResource VideoChatPurpleBrush}" /> <TextBlock x:Name="StartsAt" TextAlignment="Center" Style="{StaticResource SubtitleTextBlockStyle}" /> </StackPanel> <StackPanel x:Name="BottomPanel" GotFocus="Transport_GotFocus" LostFocus="Transport_LostFocus" Grid.Row="3"> <Grid x:Name="BottomRoot" HorizontalAlignment="Center"> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="Auto" /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition Height="24" /> <RowDefinition Height="Auto" /> <RowDefinition /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <controls:GlyphButton x:Name="Leave" Click="Leave_Click" Glyph="&#xE711;" Background="#66FF0000" Foreground="#FFFFFF" Content="{CustomResource VoipGroupLeave}" Style="{StaticResource CallGlyphButtonStyle}" Margin="0,0,0,8" Grid.Column="4" Grid.Row="1" /> </Grid> </StackPanel> </Grid> </Page> ```
/content/code_sandbox/Telegram/Views/Calls/LiveStreamPage.xaml
xml
2016-05-23T09:03:33
2024-08-16T16:17:48
Unigram
UnigramDev/Unigram
3,744
2,308
```xml <?xml version="1.0"?> ~ ~ Unless required by applicable law or agreed to in writing, software ~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ~ See the <project xsi:schemaLocation="path_to_url path_to_url" xmlns="path_to_url" xmlns:xsi="path_to_url"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>com.weibo</groupId> <artifactId>protocol-extension</artifactId> <version>1.2.4-SNAPSHOT</version> </parent> <artifactId>motan-protocol-grpc</artifactId> <name>motan-protocol-grpc</name> <url>path_to_url <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <grpc.version>1.0.0</grpc.version> </properties> <dependencies> <dependency> <groupId>com.weibo</groupId> <artifactId>motan-core</artifactId> <version>${project.parent.version}</version> </dependency> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-netty</artifactId> <version>${grpc.version}</version> </dependency> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-protobuf</artifactId> <version>${grpc.version}</version> </dependency> <dependency> <groupId>io.grpc</groupId> <artifactId>grpc-stub</artifactId> <version>${grpc.version}</version> </dependency> </dependencies> <build> <extensions> <extension> <groupId>kr.motd.maven</groupId> <artifactId>os-maven-plugin</artifactId> <version>1.4.1.Final</version> </extension> </extensions> <plugins> <plugin> <groupId>org.xolstice.maven.plugins</groupId> <artifactId>protobuf-maven-plugin</artifactId> <version>0.5.0</version> <configuration> <protocArtifact>com.google.protobuf:protoc:3.0.0:exe:${os.detected.classifier}</protocArtifact> <pluginId>grpc-java</pluginId> <pluginArtifact>io.grpc:protoc-gen-grpc-java:${grpc.version}:exe:${os.detected.classifier}</pluginArtifact> </configuration> <executions> <execution> <goals> <goal>compile</goal> <goal>compile-custom</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> ```
/content/code_sandbox/motan-extension/protocol-extension/motan-protocol-grpc/pom.xml
xml
2016-04-20T10:56:17
2024-08-16T01:20:43
motan
weibocom/motan
5,882
611
```xml import { IHtmlEngineHelper, IHandlebarsOptions } from './html-engine-helper.interface'; import DependenciesEngine from '../dependencies.engine'; export class ElementAloneHelper implements IHtmlEngineHelper { constructor() {} public helperFunc(context: any, elements, elementType: string, options: IHandlebarsOptions) { let alones = []; let modules = DependenciesEngine.modules; elements.forEach(element => { let foundInOneModule = false; modules.forEach(module => { module.declarations.forEach(declaration => { if (declaration.id === element.id) { foundInOneModule = true; } if (declaration.file === element.file) { foundInOneModule = true; } }); module.bootstrap.forEach(boostrapedElement => { if (boostrapedElement.id === element.id) { foundInOneModule = true; } if (boostrapedElement.file === element.file) { foundInOneModule = true; } }); module.controllers.forEach(controller => { if (controller.id === element.id) { foundInOneModule = true; } if (controller.file === element.file) { foundInOneModule = true; } }); module.providers.forEach(provider => { if (provider.id === element.id) { foundInOneModule = true; } if (provider.file === element.file) { foundInOneModule = true; } }); }); if (!foundInOneModule) { alones.push(element); } }); if (alones.length > 0) { switch (elementType) { case 'component': context.components = alones; break; case 'directive': context.directives = alones; break; case 'controller': context.controllers = alones; break; case 'injectable': context.injectables = alones; break; case 'pipe': context.pipes = alones; break; } return options.fn(context); } } } ```
/content/code_sandbox/src/app/engines/html-engine-helpers/element-alone.helper.ts
xml
2016-10-17T07:09:28
2024-08-14T16:30:10
compodoc
compodoc/compodoc
3,980
439
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="path_to_url"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectGuid>{3A4614D1-D366-49CE-9F01-B5FBD4A996AD}</ProjectGuid> <OutputType>Exe</OutputType> <RootNamespace>MobileTestApp</RootNamespace> <MonoMacResourcePrefix>Resources</MonoMacResourcePrefix> <AssemblyName>MobileTestApp</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier> <ProductVersion>8.0.30703</ProductVersion> <SchemaVersion>2.0</SchemaVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\bin\MobileTest-dynamic-newstyle\</OutputPath> <BaseIntermediateOutputPath>../bin/MobileTest-dynamic-newstyle/</BaseIntermediateOutputPath> <DefineConstants>DEBUG;</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <ConsolePause>false</ConsolePause> <Profiling>true</Profiling> <UseRefCounting>true</UseRefCounting> <UseSGen>true</UseSGen> <IncludeMonoRuntime>false</IncludeMonoRuntime> <CreatePackage>false</CreatePackage> <CodeSigningKey>Mac Developer</CodeSigningKey> <EnableCodeSigning>false</EnableCodeSigning> <EnablePackageSigning>false</EnablePackageSigning> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> <Reference Include="Xamarin.Mac" /> <Reference Include="MobileBinding"> <HintPath>..\bin\Mobile-dynamic-newstyle\MobileBinding.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> <None Include="Info.plist" /> </ItemGroup> <ItemGroup> <Compile Include="Main.cs" /> </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" /> </Project> ```
/content/code_sandbox/tests/mac-binding-project/MobileTestApp/MobileTestApp_dynamic_newstyle.csproj
xml
2016-04-20T18:24:26
2024-08-16T13:29:19
xamarin-macios
xamarin/xamarin-macios
2,436
633
```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="ru" original="../LocalizableStrings.resx"> <body> <trans-unit id="NonRetriableNugetSearchFailure"> <source>Failed to search. NuGet Search API response detail: RequestUrl: {0}. ReasonPhrase: {1}. StatusCode: {2}.</source> <target state="translated"> . API NuGet: RequestUrl: {0}. ReasonPhrase: {1}. StatusCode: {2}.</target> <note /> </trans-unit> <trans-unit id="RetriableNugetSearchFailure"> <source>Failed to search. Retry later may resolve the issue. NuGet Search API response detail: RequestUrl: {0}. ReasonPhrase: {1}. StatusCode: {2}.</source> <target state="translated"> . . API NuGet: RequestUrl: {0}. ReasonPhrase: {1}. StatusCode: {2}.</target> <note /> </trans-unit> </body> </file> </xliff> ```
/content/code_sandbox/src/Cli/dotnet/NugetSearch/xlf/LocalizableStrings.ru.xlf
xml
2016-07-22T21:26:02
2024-08-16T17:23:58
sdk
dotnet/sdk
2,627
324
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <resources> <string name="item_view_role_description">Zavihek</string> </resources> ```
/content/code_sandbox/lib/java/com/google/android/material/resources/res/values-sl/strings.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
85
```xml <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFrameworks>$(PERFLAB_TARGET_FRAMEWORKS)</TargetFrameworks> <TargetFramework Condition="'$(TargetFrameworks)' == ''">net5.0</TargetFramework> <LangVersion>11.0</LangVersion> </PropertyGroup> <ItemGroup> <PackageReference Include="CommandLineParser" Version="2.9.1" /> <PackageReference Include="MarkdownLog.NS20" Version="0.10.1" /> <PackageReference Include="Newtonsoft.Json" Version="13.0.3" /> <PackageReference Include="BenchmarkDotNet" Version="0.13.9" /> <PackageReference Include="Perfolizer" Version="0.3.5" /> </ItemGroup> </Project> ```
/content/code_sandbox/test/perf/dotnet-tools/ResultsComparer/ResultsComparer.csproj
xml
2016-01-13T23:41:35
2024-08-16T19:59:07
PowerShell
PowerShell/PowerShell
44,388
189
```xml <?xml version="1.0" encoding="UTF-8"?> <module external.linked.project.id=":sample" external.linked.project.path="$MODULE_DIR$" external.root.project.path="$MODULE_DIR$/.." external.system.id="GRADLE" external.system.module.group="XBanner" external.system.module.version="unspecified" type="JAVA_MODULE" version="4"> <component name="FacetManager"> <facet type="android-gradle" name="Android-Gradle"> <configuration> <option name="GRADLE_PROJECT_PATH" value=":sample" /> <option name="LAST_SUCCESSFUL_SYNC_AGP_VERSION" value="3.2.1" /> <option name="LAST_KNOWN_AGP_VERSION" value="3.2.1" /> </configuration> </facet> <facet type="android" name="Android"> <configuration> <option name="SELECTED_BUILD_VARIANT" value="debug" /> <option name="ASSEMBLE_TASK_NAME" value="assembleDebug" /> <option name="COMPILE_JAVA_TASK_NAME" value="compileDebugSources" /> <afterSyncTasks> <task>generateDebugSources</task> </afterSyncTasks> <option name="ALLOW_USER_CONFIGURATION" value="false" /> <option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" /> <option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" /> <option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/src/debug/res;file://$MODULE_DIR$/build/generated/res/rs/debug;file://$MODULE_DIR$/build/generated/res/resValues/debug" /> <option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/androidTest/res;file://$MODULE_DIR$/src/test/res;file://$MODULE_DIR$/src/androidTestDebug/res;file://$MODULE_DIR$/src/testDebug/res;file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug;file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" /> <option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" /> </configuration> </facet> </component> <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_7"> <output url="file://$MODULE_DIR$/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes" /> <output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/compileDebugUnitTestJavaWithJavac/classes" /> <exclude-output /> <content url="file://$MODULE_DIR$"> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/debug" isTestSource="false" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/debug" type="java-resource" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/androidTest/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/aidl/androidTest/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/androidTest/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/rs/androidTest/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" type="java-test-resource" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/res/resValues/androidTest/debug" type="java-test-resource" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/build/generated/source/apt/test/debug" isTestSource="true" generated="true" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/debug/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/aidl" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTestDebug/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/aidl" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/testDebug/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/main/res" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/main/assets" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/shaders" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/aidl" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/androidTest/shaders" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/res" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/test/assets" type="java-test-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/test/aidl" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/rs" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/shaders" isTestSource="true" /> <excludeFolder url="file://$MODULE_DIR$/build" /> </content> <orderEntry type="jdk" jdkName="Android API 28 Platform" jdkType="Android SDK" /> <orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="library" name="Gradle: com.github.bumptech.glide:glide:3.8.0@jar" level="project" /> <orderEntry type="library" name="Gradle: com.google.code.gson:gson:2.8.5@jar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:collections:28.0.0@jar" level="project" /> <orderEntry type="library" name="Gradle: android.arch.lifecycle:common:1.1.1@jar" level="project" /> <orderEntry type="library" name="Gradle: android.arch.core:common:1.1.1@jar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-annotations:28.0.0@jar" level="project" /> <orderEntry type="library" name="Gradle: com.squareup.okhttp3:okhttp:3.3.1@jar" level="project" /> <orderEntry type="library" name="Gradle: androidx.annotation:annotation:1.0.0@jar" level="project" /> <orderEntry type="library" name="Gradle: com.squareup.okio:okio:1.8.0@jar" level="project" /> <orderEntry type="library" name="Gradle: com.parse.bolts:bolts-tasks:1.4.0@jar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:appcompat-v7:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.zhy:okhttputils:2.6.2@aar" level="project" /> <orderEntry type="library" name="Gradle: com.facebook.fresco:fresco:1.10.0@aar" level="project" /> <orderEntry type="library" name="Gradle: me.relex:circleindicator:2.1.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.blankj:utilcode:1.23.7@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:cardview-v7:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-v4:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-fragment:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:animated-vector-drawable:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-core-ui:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-core-utils:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-vector-drawable:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-media-compat:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:loader:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:viewpager:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:coordinatorlayout:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:drawerlayout:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:slidingpanelayout:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:customview:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:swiperefreshlayout:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:asynclayoutinflater:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:support-compat:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:versionedparcelable:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:cursoradapter:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: android.arch.lifecycle:runtime:1.1.1@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:documentfile:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:localbroadcastmanager:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:print:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: android.arch.lifecycle:viewmodel:1.1.1@aar" level="project" /> <orderEntry type="library" name="Gradle: com.android.support:interpolator:28.0.0@aar" level="project" /> <orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata:1.1.1@aar" level="project" /> <orderEntry type="library" name="Gradle: android.arch.lifecycle:livedata-core:1.1.1@aar" level="project" /> <orderEntry type="library" name="Gradle: android.arch.core:runtime:1.1.1@aar" level="project" /> <orderEntry type="library" name="Gradle: com.facebook.fresco:drawee:1.10.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline:1.10.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.facebook.fresco:imagepipeline-base:1.10.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.facebook.fresco:fbcore:1.10.0@aar" level="project" /> <orderEntry type="library" name="Gradle: com.facebook.soloader:soloader:0.5.0@aar" level="project" /> <orderEntry type="module" module-name="xbanner" /> </component> </module> ```
/content/code_sandbox/sample/sample.iml
xml
2016-09-13T08:26:29
2024-08-15T09:49:27
XBanner
xiaohaibin/XBanner
2,159
3,704
```xml import { ProviderContextInput } from '@fluentui/react-bindings'; import type { CreateRenderer } from '@fluentui/react-northstar-styles-renderer'; import { mergeProviderContexts, mergePerformanceOptions, getRenderer } from 'src/utils/mergeProviderContexts'; describe('getRenderer', () => { const createRenderer = (target => { return { target }; }) as unknown as CreateRenderer; test(`without "target" defaults to a document`, () => { // will be "undefined" as we call createRenderer() with "undefined" expect(getRenderer(createRenderer)).toHaveProperty('target', undefined); }); test(`with "target" equals a default document will use its renderer`, () => { // will be "undefined" as we call createRenderer() with "undefined" expect(getRenderer(createRenderer)).toHaveProperty('target', undefined); }); test(`creates a new renderer for a new "target" and keeps it`, () => { const target = document.implementation.createDocument('path_to_url 'html', null); expect(getRenderer(createRenderer, target)).toHaveProperty('target', target); }); }); describe('mergePerformanceOptions', () => { test(`options from "sources" always override`, () => { expect(mergePerformanceOptions({ enableVariablesCaching: true }, {})).toMatchObject({ enableVariablesCaching: true, }); expect(mergePerformanceOptions({ enableVariablesCaching: true }, undefined)).toMatchObject({ enableVariablesCaching: true, }); expect( mergePerformanceOptions( { enableVariablesCaching: true, enableStylesCaching: true }, { enableStylesCaching: false }, ), ).toMatchObject({}); expect( mergePerformanceOptions( { enableVariablesCaching: true, enableStylesCaching: true }, { enableStylesCaching: undefined }, ), ).toMatchObject({}); }); }); describe('mergeContexts', () => { const createRenderer = jest.fn(); test(`always returns an object`, () => { expect(mergeProviderContexts(createRenderer, {}, {})).toMatchObject({}); expect(mergeProviderContexts(createRenderer, null, null)).toMatchObject({}); expect(mergeProviderContexts(createRenderer, undefined, undefined)).toMatchObject({}); expect(mergeProviderContexts(createRenderer, null, undefined)).toMatchObject({}); expect(mergeProviderContexts(createRenderer, undefined, null)).toMatchObject({}); expect(mergeProviderContexts(createRenderer, {}, undefined)).toMatchObject({}); expect(mergeProviderContexts(createRenderer, undefined, {})).toMatchObject({}); expect(mergeProviderContexts(createRenderer, {}, null)).toMatchObject({}); expect(mergeProviderContexts(createRenderer, null, {})).toMatchObject({}); }); test('gracefully handles merging a theme in with undefined values', () => { const target: ProviderContextInput = { theme: { siteVariables: { color: 'black' }, componentVariables: { Button: { color: 'black' } }, componentStyles: { Button: { root: { color: 'black' } } }, }, rtl: true, disableAnimations: false, }; const source: ProviderContextInput = { theme: undefined, rtl: undefined, disableAnimations: undefined, }; expect(() => mergeProviderContexts(createRenderer, target, source)).not.toThrow(); }); test('gracefully handles merging onto a theme with undefined values', () => { const target: ProviderContextInput = { theme: undefined, rtl: undefined, disableAnimations: undefined, }; const source: ProviderContextInput = { theme: { siteVariables: { color: 'black' }, componentVariables: { Button: { color: 'black' } }, componentStyles: { Button: { root: { color: 'black' } } }, }, rtl: true, disableAnimations: false, }; expect(() => mergeProviderContexts(createRenderer, target, source)).not.toThrow(); }); }); ```
/content/code_sandbox/packages/fluentui/react-northstar/test/specs/utils/mergeProviderContexts/mergeProviderContexts-test.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
873
```xml import * as React from "react"; import {styled, withStyle, withWrapper} from "styletron-react"; const Foo = styled("div", (props: {foo: "foo"}) => ({ color: props.foo, })); const Bar = withWrapper( Foo, StyledComponent => (props: {foo: "foo"; bar: "bar"}) => ( <div> <StyledComponent {...props} /> </div> ), ); // @ts-expect-error <Bar />; // missing foo and bar // @ts-expect-error <Bar foo="foo" />; // missing bar // @ts-expect-error <Bar bar="bar" />; // missing foo <Bar foo="foo" bar="bar" />; const Baz = withStyle(Bar, (props: {foo: "foo"; bar: "bar"; baz: "baz"}) => ({ color: props.baz, })); // @ts-expect-error <Baz bar="bar" baz="baz" />; // Missing foo // @ts-expect-error <Baz foo="notfoo" bar="bar" baz="baz" />; // Wrong foo // @ts-expect-error <Baz foo="foo" baz="baz" />; // Missing bar // @ts-expect-error <Baz foo="foo" bar="notbar" baz="baz" />; // Wrong bar // @ts-expect-error <Baz foo="foo" bar="bar" />; // Missing baz // @ts-expect-error <Baz foo="foo" bar="bar" baz="notbaz" />; // Wrong baz <Baz foo="foo" bar="bar" baz="baz" />; ```
/content/code_sandbox/packages/typescript-type-tests/src/with-wrapper-typed.tsx
xml
2016-04-01T00:00:06
2024-08-14T21:28:45
styletron
styletron/styletron
3,317
371
```xml import Head from 'next/head'; import { useRouter } from 'next/router'; import { useMemo, useState } from 'react'; import { useForm } from 'react-hook-form'; import { Button, Collapsible, HorizontalDivider, TextArea } from '~/ui'; import { useGoogleAnalytics } from '~/components/global/GoogleAnalytics'; import FullQuestionCard from '~/components/questions/card/question/FullQuestionCard'; import QuestionAnswerCard from '~/components/questions/card/QuestionAnswerCard'; import QuestionCommentListItem from '~/components/questions/comments/QuestionCommentListItem'; import FullScreenSpinner from '~/components/questions/FullScreenSpinner'; import BackButtonLayout from '~/components/questions/layout/BackButtonLayout'; import PaginationLoadMoreButton from '~/components/questions/PaginationLoadMoreButton'; import SortOptionsSelect from '~/components/questions/SortOptionsSelect'; import { APP_TITLE } from '~/utils/questions/constants'; import createSlug from '~/utils/questions/createSlug'; import relabelQuestionAggregates from '~/utils/questions/relabelQuestionAggregates'; import { useFormRegister } from '~/utils/questions/useFormRegister'; import { useProtectedCallback } from '~/utils/questions/useProtectedCallback'; import { trpc } from '~/utils/trpc'; import { SortOrder, SortType } from '~/types/questions.d'; export type AnswerQuestionData = { answerContent: string; }; export type QuestionCommentData = { commentContent: string; }; export default function QuestionPage() { const router = useRouter(); const { event } = useGoogleAnalytics(); const [answerSortOrder, setAnswerSortOrder] = useState<SortOrder>( SortOrder.DESC, ); const [answerSortType, setAnswerSortType] = useState<SortType>(SortType.NEW); const [commentSortOrder, setCommentSortOrder] = useState<SortOrder>( SortOrder.DESC, ); const [commentSortType, setCommentSortType] = useState<SortType>( SortType.NEW, ); const { register: ansRegister, handleSubmit, reset: resetAnswer, formState: { isDirty, isValid }, } = useForm<AnswerQuestionData>({ mode: 'onChange' }); const answerRegister = useFormRegister(ansRegister); const { register: comRegister, handleSubmit: handleCommentSubmitClick, reset: resetComment, formState: { isDirty: isCommentDirty, isValid: isCommentValid }, } = useForm<QuestionCommentData>({ mode: 'onChange' }); const commentRegister = useFormRegister(comRegister); const { questionId } = router.query; const { data: question } = trpc.useQuery([ 'questions.questions.getQuestionById', { id: questionId as string }, ]); const { data: aggregatedEncounters } = trpc.useQuery([ 'questions.questions.encounters.getAggregatedEncounters', { questionId: questionId as string }, ]); const relabeledAggregatedEncounters = useMemo(() => { if (!aggregatedEncounters) { return aggregatedEncounters; } return relabelQuestionAggregates(aggregatedEncounters); }, [aggregatedEncounters]); const utils = trpc.useContext(); const commentInfiniteQuery = trpc.useInfiniteQuery( [ 'questions.questions.comments.getQuestionComments', { limit: 5, questionId: questionId as string, sortOrder: commentSortOrder, sortType: commentSortType, }, ], { getNextPageParam: (lastPage) => lastPage.nextCursor, keepPreviousData: true, }, ); const { data: commentData } = commentInfiniteQuery; const { mutate: addComment } = trpc.useMutation( 'questions.questions.comments.user.create', { onSuccess: () => { utils.invalidateQueries( 'questions.questions.comments.getQuestionComments', ); const previousData = utils.getQueryData([ 'questions.questions.getQuestionById', { id: questionId as string }, ]); if (previousData === undefined) { return; } utils.setQueryData( ['questions.questions.getQuestionById', { id: questionId as string }], { ...previousData, numComments: previousData.numComments + 1, }, ); event({ action: 'questions.comment', category: 'engagement', label: 'comment on question', }); }, }, ); const answerInfiniteQuery = trpc.useInfiniteQuery( [ 'questions.answers.getAnswers', { limit: 5, questionId: questionId as string, sortOrder: answerSortOrder, sortType: answerSortType, }, ], { getNextPageParam: (lastPage) => lastPage.nextCursor, keepPreviousData: true, }, ); const { data: answerData } = answerInfiniteQuery; const { mutate: addAnswer } = trpc.useMutation( 'questions.answers.user.create', { onSuccess: () => { utils.invalidateQueries('questions.answers.getAnswers'); const previousData = utils.getQueryData([ 'questions.questions.getQuestionById', { id: questionId as string }, ]); if (previousData === undefined) { return; } utils.setQueryData( ['questions.questions.getQuestionById', { id: questionId as string }], { ...previousData, numAnswers: previousData.numAnswers + 1, }, ); event({ action: 'questions.answer', category: 'engagement', label: 'add answer to question', }); }, }, ); const { mutateAsync: addEncounterAsync } = trpc.useMutation( 'questions.questions.encounters.user.create', { onSuccess: () => { utils.invalidateQueries( 'questions.questions.encounters.getAggregatedEncounters', ); utils.invalidateQueries('questions.questions.getQuestionById'); event({ action: 'questions.create_question', category: 'engagement', label: 'create question encounter', }); }, }, ); const handleSubmitAnswer = useProtectedCallback( (data: AnswerQuestionData) => { addAnswer({ content: data.answerContent, questionId: questionId as string, }); resetAnswer(); }, ); const handleSubmitComment = useProtectedCallback( (data: QuestionCommentData) => { addComment({ content: data.commentContent, questionId: questionId as string, }); resetComment(); }, ); if (!question) { return <FullScreenSpinner />; } return ( <> <Head> <title> {question.content} - {APP_TITLE} </title> </Head> <BackButtonLayout href="/questions/browse"> <div className="flex flex-1 flex-col gap-4"> <div className="flex flex-col gap-4 rounded-md border bg-white p-4"> <FullQuestionCard {...question} companies={relabeledAggregatedEncounters?.companyCounts ?? {}} countries={relabeledAggregatedEncounters?.countryCounts ?? {}} createEncounterButtonText="I received this too" questionId={question.id} receivedCount={undefined} roles={relabeledAggregatedEncounters?.roleCounts ?? {}} timestamp={question.lastSeenAt} upvoteCount={question.numVotes} onReceivedSubmit={async (data) => { await addEncounterAsync({ cityId: data.cityId, companyId: data.company, countryId: data.countryId, questionId: questionId as string, role: data.role, seenAt: data.seenAt, stateId: data.stateId, }); }} /> <div className="sm:ml-13 ml-11 mr-2 md:ml-14"> <Collapsible label={ <div className="text-primary-700"> {question.numComments}{' '} {question.numComments === 1 ? 'comment' : 'comments'} </div> }> <div className="flex flex-col gap-4 text-black"> <div className="flex justify-end gap-2"> <div className="flex items-end gap-2"> <SortOptionsSelect sortOrderValue={commentSortOrder} sortTypeValue={commentSortType} onSortOrderChange={setCommentSortOrder} onSortTypeChange={setCommentSortType} /> </div> </div> <div className="flex flex-col gap-4"> {(commentData?.pages ?? []).flatMap(({ data: comments }) => comments.map((comment) => ( <QuestionCommentListItem key={comment.id} authorImageUrl={comment.userImage} authorName={comment.user} content={comment.content} createdAt={comment.createdAt} questionCommentId={comment.id} upvoteCount={comment.numVotes} /> )), )} </div> <PaginationLoadMoreButton query={commentInfiniteQuery} /> <form className="mt-4" onSubmit={handleCommentSubmitClick(handleSubmitComment)}> <TextArea {...commentRegister('commentContent', { minLength: 1, required: true, })} label="Post a comment" required={true} resize="vertical" rows={2} /> <div className="my-3 flex justify-end"> <Button disabled={!isCommentDirty || !isCommentValid} label="Post" type="submit" variant="primary" /> </div> </form> </div> </Collapsible> </div> </div> <HorizontalDivider /> <form onSubmit={handleSubmit(handleSubmitAnswer)}> <div className="flex flex-col gap-2"> <p className="text-md font-semibold">Contribute your answer</p> <TextArea {...answerRegister('answerContent', { minLength: 1, required: true, })} isLabelHidden={true} label="Contribute your answer" required={true} resize="vertical" rows={5} /> </div> <div className="mt-3 mb-1 flex justify-end"> <Button disabled={!isDirty || !isValid} label="Contribute" type="submit" variant="primary" /> </div> </form> <div className="flex items-center justify-between gap-4"> <p className="text-xl font-semibold"> {question.numAnswers}{' '} {question.numAnswers === 1 ? 'answer' : 'answers'} </p> <div className="flex items-end gap-4"> <SortOptionsSelect sortOrderValue={answerSortOrder} sortTypeValue={answerSortType} onSortOrderChange={setAnswerSortOrder} onSortTypeChange={setAnswerSortType} /> </div> </div> <div className="flex flex-col gap-4"> {/* TODO: Add button to load more */} {(answerData?.pages ?? []).flatMap(({ data: answers }) => answers.map((answer) => ( <QuestionAnswerCard key={answer.id} answerId={answer.id} authorImageUrl={answer.userImage} authorName={answer.user} commentCount={answer.numComments} content={answer.content} createdAt={answer.createdAt} href={`${router.asPath}/answer/${answer.id}/${createSlug( answer.content, )}`} upvoteCount={answer.numVotes} /> )), )} <PaginationLoadMoreButton query={answerInfiniteQuery} /> </div> </div> </BackButtonLayout> </> ); } ```
/content/code_sandbox/apps/portal/src/pages/questions/[questionId]/[questionSlug]/index.tsx
xml
2016-07-05T05:00:48
2024-08-16T19:01:19
tech-interview-handbook
yangshun/tech-interview-handbook
115,302
2,523
```xml import { getSnapshot } from "mobx-state-tree" import { TestUserModel, commandMetadataFixture, createMstPlugin } from "./fixtures" import type { Command } from "reactotron-core-contract" const STATE = { age: 1, name: "i" } const INBOUND = { ...commandMetadataFixture, type: "state.restore.request", payload: { state: STATE }, } satisfies Command<"state.restore.request"> describe("restore", () => { it("responds with current state", () => { const { track, plugin } = createMstPlugin() const user = TestUserModel.create() track(user) plugin.onCommand(INBOUND) expect(getSnapshot(user)).toEqual(STATE) }) it("won't die if we're not tracking nodes", () => { const { plugin } = createMstPlugin() expect(() => plugin.onCommand(INBOUND)).not.toThrow() }) }) ```
/content/code_sandbox/lib/reactotron-mst/test/restore.test.ts
xml
2016-04-15T21:58:32
2024-08-16T11:39:46
reactotron
infinitered/reactotron
14,757
202
```xml import { objectEntries, objectKeys } from './objectUtils'; it('gets the object keys', () => { expect(objectKeys({ THIS: 'this', that: 'that', theOther: 'the other' }).sort()).toEqual([ 'THIS', 'that', 'theOther', ]); }); it('gets the object entries', () => { expect( objectEntries({ THIS: 'this', that: 'that', theOther: 'the other' }).sort((a, b) => a[0].localeCompare(b[0]) ) ).toEqual([ ['that', 'that'], ['theOther', 'the other'], ['THIS', 'this'], ]); }); ```
/content/code_sandbox/packages/react-querybuilder/src/utils/objectUtils.test.ts
xml
2016-06-17T22:03:19
2024-08-16T10:28:42
react-querybuilder
react-querybuilder/react-querybuilder
1,131
152
```xml <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="12.0" DefaultTargets="Build" 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>{808F76E8-FE4A-48DD-A0AD-82638AE6E734}</ProjectGuid> <OutputType>Exe</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>SimpleFactory</RootNamespace> <AssemblyName>SimpleFactory</AssemblyName> <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <FileAlignment>512</FileAlignment> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\Debug\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PlatformTarget>AnyCPU</PlatformTarget> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\Release\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> </PropertyGroup> <ItemGroup> <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.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> </ItemGroup> <ItemGroup> <None Include="App.config" /> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project> ```
/content/code_sandbox/DesignPatterns/Factory/SimpleFactory/SimpleFactory/SimpleFactory.csproj
xml
2016-04-25T14:37:08
2024-08-16T09:19:37
Unity3DTraining
XINCGer/Unity3DTraining
7,368
634
```xml <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="path_to_url"> <ItemGroup> <Filter Include="guetzli"> <UniqueIdentifier>{C9FCBE14-35DC-3DB0-3EF4-C886AA52A411}</UniqueIdentifier> </Filter> <Filter Include="third_party"> <UniqueIdentifier>{0FB18DF1-7B66-06E7-045B-00BE700FFDEA}</UniqueIdentifier> </Filter> <Filter Include="third_party\butteraugli"> <UniqueIdentifier>{468B2B32-B2C2-73C9-BBCC-D7EC27839AC2}</UniqueIdentifier> </Filter> <Filter Include="third_party\butteraugli\butteraugli"> <UniqueIdentifier>{FD6FCB41-6929-36EC-F288-50C65E41EC5B}</UniqueIdentifier> </Filter> </ItemGroup> <ItemGroup> <ClInclude Include="guetzli\butteraugli_comparator.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\color_transform.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\comparator.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\dct_double.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\debug_print.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\entropy_encode.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\fast_log.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\fdct.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\gamma_correct.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\idct.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\jpeg_bit_writer.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\jpeg_data.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\jpeg_data_decoder.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\jpeg_data_encoder.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\jpeg_data_reader.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\jpeg_data_writer.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\jpeg_error.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\jpeg_huffman_decode.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\output_image.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\preprocess_downsample.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\processor.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\quality.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\quantize.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\score.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="guetzli\stats.h"> <Filter>guetzli</Filter> </ClInclude> <ClInclude Include="third_party\butteraugli\butteraugli\butteraugli.h"> <Filter>third_party\butteraugli\butteraugli</Filter> </ClInclude> </ItemGroup> <ItemGroup> <ClCompile Include="guetzli\butteraugli_comparator.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\dct_double.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\debug_print.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\entropy_encode.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\fdct.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\gamma_correct.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\idct.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\jpeg_data.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\jpeg_data_decoder.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\jpeg_data_encoder.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\jpeg_data_reader.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\jpeg_data_writer.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\jpeg_huffman_decode.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\output_image.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\preprocess_downsample.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\processor.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\quality.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\quantize.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="guetzli\score.cc"> <Filter>guetzli</Filter> </ClCompile> <ClCompile Include="third_party\butteraugli\butteraugli\butteraugli.cc"> <Filter>third_party\butteraugli\butteraugli</Filter> </ClCompile> </ItemGroup> </Project> ```
/content/code_sandbox/guetzli_static.vcxproj.filters
xml
2016-10-21T15:13:18
2024-08-15T22:29:55
guetzli
google/guetzli
12,897
1,629
```xml // Type definitions for ag-grid v6.2.1 // Project: path_to_url // Definitions by: Niall Crosby <path_to_url // Definitions: path_to_url import { RowNode } from "../entities/rowNode"; export interface IViewportDatasource { /** Gets called exactly once before viewPort is used. Passes methods to be used to tell viewPort of data loads / changes. */ init(params: IViewportDatasourceParams): void; /** Tell the viewport what the scroll position of the grid is, so it knows what rows it has to get */ setViewportRange(firstRow: number, lastRow: number): void; /** Gets called once when viewPort is no longer used. If you need to do any cleanup, do it here. */ destroy?(): void; } export interface IViewportDatasourceParams { /** datasource calls this method when the total row count changes. This in turn sets the height of the grids vertical scroll. */ setRowCount: (count: number) => void; /** datasource calls this when new data arrives. The grid then updates the provided rows. The rows are mapped [rowIndex]=>rowData].*/ setRowData: (rowData: { [key: number]: any; }) => void; /** datasource calls this when it wants a row node - typically used when it wants to update the row node */ getRow: (rowIndex: number) => RowNode; } ```
/content/code_sandbox/services/dashboard/assets-dev/js/vendor/ag-grid/dist/lib/interfaces/iViewportDatasource.d.ts
xml
2016-06-21T19:39:58
2024-08-12T19:23:26
mylg
mehrdadrad/mylg
2,691
309
```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="pl" original="../LocalizableStrings.resx"> <body> <trans-unit id="CommandDescription"> <source>Repair workload installations.</source> <target state="translated">Napraw instalacje obcie.</target> <note /> </trans-unit> <trans-unit id="NoWorkloadsToRepair"> <source>No workloads are installed, nothing to repair. Run `dotnet workload search` to find workloads to install.</source> <target state="translated">Nie zainstalowano adnych obcie i nie ma nic do naprawienia. Uruchom polecenie dotnet workload search, aby znale obcienia do zainstalowania.</target> <note /> </trans-unit> <trans-unit id="RepairSucceeded"> <source>Successfully repaired workloads: {0}</source> <target state="translated">Pomylnie naprawione obcienia: {0}</target> <note /> </trans-unit> <trans-unit id="RepairingWorkloads"> <source>Repairing workload installation for workloads: {0}</source> <target state="translated">Naprawianie instalacji obcienia dla pakietw roboczych: {0}</target> <note /> </trans-unit> <trans-unit id="WorkloadRepairFailed"> <source>Workload repair failed: {0}</source> <target state="translated">Nie mona naprawi obszaru roboczego: {0}</target> <note /> </trans-unit> </body> </file> </xliff> ```
/content/code_sandbox/src/Cli/dotnet/commands/dotnet-workload/repair/xlf/LocalizableStrings.pl.xlf
xml
2016-07-22T21:26:02
2024-08-16T17:23:58
sdk
dotnet/sdk
2,627
452
```xml import * as React from 'react'; import Rtl from './Rtl'; import Types from './Types'; import Variations from './Variations'; import Usage from './Usage'; import Visual from './Visual'; const PopupExamples = () => ( <> <Types /> <Variations /> <Rtl /> <Usage /> <Visual /> </> ); export default PopupExamples; ```
/content/code_sandbox/packages/fluentui/docs/src/examples/components/Popup/index.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
82
```xml <ResourceDictionary xmlns="path_to_url" xmlns:x="path_to_url" xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"> <Style TargetType="controls:HeaderedItemsControl"> <Setter Property="Padding" Value="2,0,0,0"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="controls:HeaderedItemsControl"> <StackPanel Orientation="{TemplateBinding Orientation}"> <ContentPresenter Content="{TemplateBinding Header}" ContentTemplate="{TemplateBinding HeaderTemplate}"/> <ItemsPresenter Margin="{TemplateBinding Padding}"/> </StackPanel> </ControlTemplate> </Setter.Value> </Setter> </Style> </ResourceDictionary> ```
/content/code_sandbox/Microsoft.Toolkit.Uwp.UI.Controls.Layout/HeaderedItemsControl/HeaderedItemsControl.xaml
xml
2016-06-17T21:29:46
2024-08-16T09:32:00
WindowsCommunityToolkit
CommunityToolkit/WindowsCommunityToolkit
5,842
156
```xml import os from 'os'; import pkg from './pkg'; export default `${pkg.name} ${pkg.version} node-${ process.version } ${os.platform()} (${os.arch()})`; ```
/content/code_sandbox/packages/cli/src/util/ua.ts
xml
2016-09-09T01:12:08
2024-08-16T17:39:45
vercel
vercel/vercel
12,545
41
```xml import log from '@apify/log'; import type { Source } from '@crawlee/cheerio'; import { Configuration, cheerioCrawlerEnqueueLinks, RequestQueue } from '@crawlee/cheerio'; import type { CheerioAPI } from 'cheerio'; import { load } from 'cheerio'; const apifyClient = Configuration.getStorageClient(); const HTML = ` <html> <head> <title>Example</title> </head> <body> <ul> <li><a class="first" href="path_to_url">I'm sorry, Dave. I'm afraid I can't do that.</a></li> <li><a class="second" href="path_to_url">I'm sorry, Dave. I'm afraid I can't do that.</a></li> </ul> </body> </html> `; function createRequestQueueMock() { const enqueued: Source[] = []; const requestQueue = new RequestQueue({ id: 'xxx', client: apifyClient }); // @ts-expect-error Override method for testing requestQueue.addRequests = async function (requests) { enqueued.push(...requests); return { processedRequests: requests, unprocessedRequests: [] as never[] }; }; return { enqueued, requestQueue }; } describe("enqueueLinks() - userData shouldn't be changed and outer label must take priority", () => { let ll: number; beforeAll(() => { ll = log.getLevel(); log.setLevel(log.LEVELS.ERROR); }); afterAll(() => { log.setLevel(ll); }); let $: CheerioAPI; beforeEach(() => { $ = load(HTML); }); test('multiple enqueues with different labels', async () => { const { enqueued, requestQueue } = createRequestQueueMock(); const userData = { foo: 'bar' }; await cheerioCrawlerEnqueueLinks({ options: { selector: 'a.first', userData, label: 'first', }, $, requestQueue, originalRequestUrl: 'path_to_url }); await cheerioCrawlerEnqueueLinks({ options: { selector: 'a.second', userData, label: 'second', }, $, requestQueue, originalRequestUrl: 'path_to_url }); expect(enqueued).toHaveLength(2); expect(enqueued[0].url).toBe('path_to_url expect(enqueued[0].userData.label).toBe('first'); expect(enqueued[1].url).toBe('path_to_url expect(enqueued[1].userData.label).toBe('second'); }); test("JSON string of userData shouldn't change, but enqueued label should be different", async () => { const { enqueued, requestQueue } = createRequestQueueMock(); const userData = { foo: 'bar', label: 'bogus' }; const originalUserData = JSON.stringify(userData); await cheerioCrawlerEnqueueLinks({ options: { selector: 'a.first', userData, label: 'first', }, $, requestQueue, originalRequestUrl: 'path_to_url }); const userDataAfterEnqueue = JSON.stringify(userData); expect(userDataAfterEnqueue).toEqual(originalUserData); expect(enqueued).toHaveLength(1); expect(enqueued[0].url).toBe('path_to_url expect(enqueued[0].label).toBe('first'); }); }); ```
/content/code_sandbox/packages/core/test/enqueue_links/userData.test.ts
xml
2016-08-26T18:35:03
2024-08-16T16:40:08
crawlee
apify/crawlee
14,153
763
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="path_to_url"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|ARM"> <Configuration>Debug</Configuration> <Platform>ARM</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|ARM64"> <Configuration>Debug</Configuration> <Platform>ARM64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|ARM"> <Configuration>Release</Configuration> <Platform>ARM</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|ARM64"> <Configuration>Release</Configuration> <Platform>ARM64</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="abi_guard.cpp" /> <ClCompile Include="agile_ref.cpp" /> <ClCompile Include="agility.cpp" /> <ClCompile Include="apartment_context.cpp" /> <ClCompile Include="array.cpp" /> <ClCompile Include="as.cpp" /> <ClCompile Include="async.cpp" /> <ClCompile Include="async_cancel.cpp" /> <ClCompile Include="as_implements.cpp" /> <ClCompile Include="Bindable.cpp" /> <ClCompile Include="boxing.cpp" /> <ClCompile Include="Boxing2.cpp" /> <ClCompile Include="buffer.cpp" /> <ClCompile Include="capture.cpp" /> <ClCompile Include="casts.cpp" /> <ClCompile Include="char16.cpp" /> <ClCompile Include="clock.cpp" /> <ClCompile Include="collection_base.cpp" /> <ClCompile Include="Composable.cpp" /> <ClCompile Include="com_ref.cpp" /> <ClCompile Include="conditional_implements.cpp" /> <ClCompile Include="conditional_implements_pure.cpp"> <PrecompiledHeader>NotUsing</PrecompiledHeader> </ClCompile> <ClCompile Include="constexpr.cpp" /> <ClCompile Include="create_instance.cpp" /> <ClCompile Include="delegate_weak_strong.cpp" /> <ClCompile Include="enum_flags.cpp" /> <ClCompile Include="Errors.cpp" /> <ClCompile Include="error_chaining.cpp" /> <ClCompile Include="Events.cpp" /> <ClCompile Include="factory_cache.cpp" /> <ClCompile Include="FastInput.cpp" /> <ClCompile Include="FastStrings.cpp" /> <ClCompile Include="foundation.cpp" /> <ClCompile Include="Generics.cpp" /> <ClCompile Include="get_activation_factory.cpp" /> <ClCompile Include="hstring_builder.cpp" /> <ClCompile Include="implements_nested.cpp" /> <ClCompile Include="interop.cpp" /> <ClCompile Include="lock.cpp" /> <ClCompile Include="Parameters.cpp" /> <ClCompile Include="param_hstring.cpp" /> <ClCompile Include="param_iterable.cpp" /> <ClCompile Include="param_map.cpp" /> <ClCompile Include="param_vector.cpp" /> <ClCompile Include="properties.cpp" /> <ClCompile Include="References.cpp" /> <ClCompile Include="sdk.cpp" /> <ClCompile Include="Security.cpp" /> <ClCompile Include="single_threaded_map.cpp" /> <ClCompile Include="param_map_view.cpp" /> <ClCompile Include="single_threaded_vector.cpp" /> <ClCompile Include="param_vector_view.cpp" /> <ClCompile Include="com_ptr.cpp" /> <ClCompile Include="delegate.cpp" /> <ClCompile Include="delegate_lambda.cpp" /> <ClCompile Include="event_consume.cpp" /> <ClCompile Include="event_produce.cpp" /> <ClCompile Include="handle.cpp" /> <ClCompile Include="Hash.cpp" /> <ClCompile Include="hresult_error.cpp" /> <ClCompile Include="hstring.cpp" /> <ClCompile Include="IInspectable_GetIids.cpp" /> <ClCompile Include="IInspectable_GetRuntimeClassName.cpp" /> <ClCompile Include="IInspectable_GetTrustLevel.cpp" /> <ClCompile Include="IReference.cpp" /> <ClCompile Include="IUnknown_QueryInterface.cpp" /> <ClCompile Include="Main.cpp" /> <ClCompile Include="make_self.cpp" /> <ClCompile Include="marshal.cpp" /> <ClCompile Include="meta.cpp" /> <ClCompile Include="pch.cpp"> <PrecompiledHeader>Create</PrecompiledHeader> </ClCompile> <ClCompile Include="produce.cpp" /> <ClCompile Include="produce_async.cpp" /> <ClCompile Include="produce_map.cpp" /> <ClCompile Include="produce_vector.cpp" /> <ClCompile Include="range_for.cpp" /> <ClCompile Include="Reference.cpp" /> <ClCompile Include="Release.cpp" /> <ClCompile Include="smart_pointers.cpp" /> <ClCompile Include="streams.cpp" /> <ClCompile Include="struct.cpp" /> <ClCompile Include="StructCodeGen.cpp" /> <ClCompile Include="Structures.cpp" /> <ClCompile Include="to_hstring.cpp" /> <ClCompile Include="TryLookup.cpp" /> <ClCompile Include="VariadicDelegate.cpp" /> <ClCompile Include="weak.cpp" /> <ClCompile Include="xaml_typename.cpp" /> </ItemGroup> <ItemGroup> <ClInclude Include="catch.hpp" /> <ClInclude Include="pch.h" /> <ClInclude Include="produce_IPropertyValue.h" /> <ClInclude Include="string_view_compare.h" /> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{C8B95FCB-9B0B-4E9F-B7D5-643883C192C9}</ProjectGuid> <Keyword>Win32Proj</Keyword> <RootNamespace>Tests</RootNamespace> <ProjectName>test_old</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PreferredToolArchitecture>x64</PreferredToolArchitecture> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PreferredToolArchitecture>x64</PreferredToolArchitecture> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PreferredToolArchitecture>x64</PreferredToolArchitecture> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PreferredToolArchitecture>x64</PreferredToolArchitecture> <WholeProgramOptimization>true</WholeProgramOptimization> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PreferredToolArchitecture>x64</PreferredToolArchitecture> <WholeProgramOptimization>true</WholeProgramOptimization> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PreferredToolArchitecture>x64</PreferredToolArchitecture> <WholeProgramOptimization>true</WholeProgramOptimization> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>true</UseDebugLibraries> <PreferredToolArchitecture>x64</PreferredToolArchitecture> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseDebugLibraries>false</UseDebugLibraries> <PreferredToolArchitecture>x64</PreferredToolArchitecture> <WholeProgramOptimization>true</WholeProgramOptimization> </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|ARM'" 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|ARM64'" 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|ARM'" 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|ARM64'" 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 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)'=='Debug'"> <LinkIncremental>true</LinkIncremental> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)'=='Release'"> <LinkIncremental>false</LinkIncremental> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_HAS_AUTO_PTR_ETC;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(OutputPath);..\Composable\Generated Files;..\Component\Generated Files;..\Composable;..\Reflection\Generated Files;..\..\;</AdditionalIncludeDirectories> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <MinimalRebuild>false</MinimalRebuild> <CompileAsWinRT>false</CompileAsWinRT> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <DisableSpecificWarnings>4100;4297;4458</DisableSpecificWarnings> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>false</GenerateMapFile> <OutputFile>$(OutDir)test_old.exe</OutputFile> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_HAS_AUTO_PTR_ETC;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(OutputPath);..\Composable\Generated Files;..\Component\Generated Files;..\Composable;..\Reflection\Generated Files;..\..\;</AdditionalIncludeDirectories> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <MinimalRebuild>false</MinimalRebuild> <CompileAsWinRT>false</CompileAsWinRT> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <DisableSpecificWarnings>4100;4297;4458</DisableSpecificWarnings> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>false</GenerateMapFile> <OutputFile>$(OutDir)test_old.exe</OutputFile> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_HAS_AUTO_PTR_ETC;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(OutputPath);..\Composable\Generated Files;..\Component\Generated Files;..\Composable;..\Reflection\Generated Files;..\..\;</AdditionalIncludeDirectories> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <MinimalRebuild>false</MinimalRebuild> <CompileAsWinRT>false</CompileAsWinRT> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <DisableSpecificWarnings>4100;4297;4458</DisableSpecificWarnings> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>false</GenerateMapFile> <OutputFile>$(OutDir)test_old.exe</OutputFile> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>_HAS_AUTO_PTR_ETC;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(OutputPath);..\Composable\Generated Files;..\Component\Generated Files;..\Composable;..\Reflection\Generated Files;..\..\;</AdditionalIncludeDirectories> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <BasicRuntimeChecks>Default</BasicRuntimeChecks> <MinimalRebuild>false</MinimalRebuild> <CompileAsWinRT>false</CompileAsWinRT> <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> <DisableSpecificWarnings>4100;4297;4458</DisableSpecificWarnings> </ClCompile> <Link> <SubSystem>Console</SubSystem> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>false</GenerateMapFile> <OutputFile>$(OutDir)test_old.exe</OutputFile> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_HAS_AUTO_PTR_ETC;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(OutputPath);..\Composable\Generated Files;..\Component\Generated Files;..\Composable;..\Reflection\Generated Files;..\..\;</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <DisableSpecificWarnings>4100;4297;4458</DisableSpecificWarnings> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>false</GenerateMapFile> <OutputFile>$(OutDir)test_old.exe</OutputFile> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'"> <ClCompile> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_HAS_AUTO_PTR_ETC;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(OutputPath);..\Composable\Generated Files;..\Component\Generated Files;..\Composable;..\Reflection\Generated Files;..\..\;</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <DisableSpecificWarnings>4100;4297;4458</DisableSpecificWarnings> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>false</GenerateMapFile> <OutputFile>$(OutDir)test_old.exe</OutputFile> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'"> <ClCompile> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_HAS_AUTO_PTR_ETC;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(OutputPath);..\Composable\Generated Files;..\Component\Generated Files;..\Composable;..\Reflection\Generated Files;..\..\;</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <DisableSpecificWarnings>4100;4297;4458</DisableSpecificWarnings> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>false</GenerateMapFile> <OutputFile>$(OutDir)test_old.exe</OutputFile> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <Optimization>MaxSpeed</Optimization> <FunctionLevelLinking>true</FunctionLevelLinking> <IntrinsicFunctions>true</IntrinsicFunctions> <PreprocessorDefinitions>_HAS_AUTO_PTR_ETC;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>$(OutputPath);..\Composable\Generated Files;..\Component\Generated Files;..\Composable;..\Reflection\Generated Files;..\..\;</AdditionalIncludeDirectories> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <DisableSpecificWarnings>4100;4297;4458</DisableSpecificWarnings> </ClCompile> <Link> <SubSystem>Console</SubSystem> <EnableCOMDATFolding>true</EnableCOMDATFolding> <OptimizeReferences>true</OptimizeReferences> <GenerateDebugInformation>true</GenerateDebugInformation> <GenerateMapFile>false</GenerateMapFile> <OutputFile>$(OutDir)test_old.exe</OutputFile> </Link> </ItemDefinitionGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project> ```
/content/code_sandbox/test/old_tests/UnitTests/Tests.vcxproj
xml
2016-09-14T16:28:57
2024-08-13T13:14:47
cppwinrt
microsoft/cppwinrt
1,628
4,783
```xml import * as React from 'react'; import styles from './SiteCollectionCatalog.module.scss'; import { ISiteCollectionCatalogState } from './ISiteCollectionCatalogProps'; import { SiteCollectionCatalogHelper } from './SiteCollectionCatalogHelper'; import { ListView, IViewField, SelectionMode } from "@pnp/spfx-controls-react/lib/ListView"; import { WebPartTitle } from "@pnp/spfx-controls-react/lib/WebPartTitle"; import { ISiteCollectionCatalogWebPartProps } from '../SiteCollectionCatalogWebPart'; import { IColumn } from 'office-ui-fabric-react/lib/components/DetailsList'; const _viewFields: IViewField[] = [ { name: "SiteTitle", linkPropertyName: "SiteURL", displayName: "Site Collection", sorting: true, minWidth: 120, isResizable: true }, { name: "AppTitle", displayName: "App Title", sorting: true, minWidth: 200, isResizable: true, render: (item: any) => { var _color = "Red"; if (!item.NoApps) { _color = "Green"; } const element: any = React.createElement("span", { style: { color: _color } }, item.AppTitle); return element; } }, { name: "AppCatalogVersion", displayName: "AppCatalogVersion", sorting: true, minWidth: 100 }, { name: "Deployed", displayName: "Deployed", minWidth: 70, render: (item: any) => { var _color = "Red"; if (String(item.Deployed).toLowerCase() == "true") { _color = "Green"; } const element: any = React.createElement("span", { style: { color: _color } }, item.Deployed); return element; } }, { name: "InstalledVersion", displayName: "Installed Version", sorting: true, minWidth: 100 }, { name: "IsClientSideSolution", displayName: "Is Client Side Solution", minWidth: 150, render: (item: any) => { var _color = "Red"; if (String(item.IsClientSideSolution).toLowerCase() == "true") { _color = "Green"; } const element: any = React.createElement("span", { style: { color: _color } }, item.IsClientSideSolution); return element; } } ]; export default class SiteCollectionCatalog extends React.Component<ISiteCollectionCatalogWebPartProps, ISiteCollectionCatalogState> { constructor(props: ISiteCollectionCatalogWebPartProps) { super(props); this.state = { siteAppCatalogs: [] }; } public componentDidMount() { var tmpRes: Promise<any[]> = SiteCollectionCatalogHelper.getSiteCollectionCatalogList(); tmpRes.then(res => { this.setState({ siteAppCatalogs: res }); }); } private _getSelection(items: any[]) { console.log('Selected items:', items); } public render(): React.ReactElement<ISiteCollectionCatalogWebPartProps> { return ( <div className={styles.siteCollectionCatalog}> <WebPartTitle displayMode={this.props.displayMode} title={this.props.title} updateProperty={this.props.updateProperty} /> <ListView items={this.state.siteAppCatalogs} viewFields={_viewFields} compact={true} selectionMode={SelectionMode.none} selection={this._getSelection} showFilter={true} filterPlaceHolder="Search..." /> </div> ); } } ```
/content/code_sandbox/samples/react-admin-sc-catalog-pnpjs/src/webparts/siteCollectionCatalog/components/SiteCollectionCatalog.tsx
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
799
```xml /** * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import type {RepoRelativePath} from './types'; import type {Hash, RepoPath} from 'shared/types/common'; import type {ExportFile, ImportCommit} from 'shared/types/stack'; import clientToServerAPI from './ClientToServerAPI'; import {t} from './i18n'; import {dagWithPreviews, uncommittedChangesWithPreviews} from './previews'; import {atomResetOnCwdChange} from './repositoryData'; import {latestUncommittedChangesTimestamp} from './serverAPIState'; import {ChunkSelectState} from './stackEdit/chunkSelectState'; import {assert} from './utils'; import Immutable from 'immutable'; import {atom, useAtom, useAtomValue} from 'jotai'; import {RateLimiter} from 'shared/RateLimiter'; import {SelfUpdate} from 'shared/immutableExt'; type SingleFileSelection = | false /* not selected */ | true /* selected, default */ | ChunkSelectState /* maybe partially selected */; type PartialSelectionProps = { /** Explicitly set selection. */ fileMap: Immutable.Map<RepoRelativePath, SingleFileSelection>; /** For files not in fileMap, whether they are selected or not. */ selectByDefault: boolean; expanded: Immutable.Set<RepoRelativePath>; }; const PartialSelectionRecord = Immutable.Record<PartialSelectionProps>({ fileMap: Immutable.Map(), selectByDefault: true, expanded: Immutable.Set(), }); type PartialSelectionRecord = Immutable.RecordOf<PartialSelectionProps>; /** * Selection of partial changes made by a commit. * * Intended to be useful for both concrete commits and the `wdir()` virtual commit. * This class does not handle the differences between `wdir()` and concrete commits, * like how to load the file content, and how to get the list of changed files. * Those differences are handled at a higher level. */ export class PartialSelection extends SelfUpdate<PartialSelectionRecord> { constructor(record: PartialSelectionRecord) { super(record); } set<K extends keyof PartialSelectionProps>( key: K, value: PartialSelectionProps[K], ): PartialSelection { return new PartialSelection(this.inner.set(key, value)); } /** Empty selection. */ static empty(props: {selectByDefault?: boolean}): PartialSelection { return new PartialSelection(PartialSelectionRecord(props)); } /** Explicitly select a file. */ select(path: RepoRelativePath): PartialSelection { return new PartialSelection(this.inner.setIn(['fileMap', path], true)); } /** Explicitly deselect a file. */ deselect(path: RepoRelativePath): PartialSelection { return new PartialSelection(this.inner.setIn(['fileMap', path], false)).toggleExpand( path, false, ); } /** Reset to the "default" state. Useful for commit/amend. */ clear(): PartialSelection { return this.set('fileMap', Immutable.Map()).set('expanded', Immutable.Set()); } /** Toggle expansion of a file. */ toggleExpand(path: RepoRelativePath, select?: boolean): PartialSelection { const expanded = this.inner.expanded; const newExpanded = select ?? !expanded.has(path) ? expanded.add(path) : expanded.remove(path); return this.set('expanded', newExpanded); } /** Test if a file was expanded. */ isExpanded(path: RepoRelativePath): boolean { return this.inner.expanded.has(path); } /** Drop "chunk selection" states. */ discardPartialSelections() { const newFileMap = this.inner.fileMap.filter( fileSelection => !(fileSelection instanceof ChunkSelectState), ); return new PartialSelection(this.inner.merge({fileMap: newFileMap, expanded: Immutable.Set()})); } /** Start chunk selection for the given file. */ startChunkSelect( path: RepoRelativePath, a: string, b: string, selected: boolean | string, normalize = false, ): PartialSelection { const chunkState = ChunkSelectState.fromText(a, b, selected, normalize); return new PartialSelection(this.inner.setIn(['fileMap', path], chunkState)); } /** Edit chunk selection for a file. */ editChunkSelect( path: RepoRelativePath, newValue: ((chunkState: ChunkSelectState) => ChunkSelectState) | ChunkSelectState, ): PartialSelection { const chunkState = this.inner.fileMap.get(path); assert( chunkState instanceof ChunkSelectState, 'PartialSelection.editChunkSelect() called without startChunkEdit', ); const newChunkState = typeof newValue === 'function' ? newValue(chunkState) : newValue; return new PartialSelection(this.inner.setIn(['fileMap', path], newChunkState)); } getSelection(path: RepoRelativePath): SingleFileSelection { const record = this.inner; return record.fileMap.get(path) ?? record.selectByDefault; } /** * Return true if a file is selected, false if deselected, * or a string with the edited content. * Even if the file is being chunk edited, this function might * still return true or false. */ getSimplifiedSelection(path: RepoRelativePath): boolean | string { const selected = this.getSelection(path); if (selected === true || selected === false) { return selected; } const chunkState: ChunkSelectState = selected; const text = chunkState.getSelectedText(); if (text === chunkState.a) { return false; } if (text === chunkState.b) { return true; } return text; } isFullyOrPartiallySelected(path: RepoRelativePath): boolean { return this.getSimplifiedSelection(path) !== false; } isPartiallySelected(path: RepoRelativePath): boolean { return typeof this.getSimplifiedSelection(path) !== 'boolean'; } isFullySelected(path: RepoRelativePath): boolean { return this.getSimplifiedSelection(path) === true; } isDeselected(path: RepoRelativePath): boolean { return this.getSimplifiedSelection(path) === false; } isEverythingSelected(getAllPaths: () => Array<RepoRelativePath>): boolean { const record = this.inner; const paths = record.selectByDefault ? record.fileMap.keySeq() : getAllPaths(); return paths.every(p => this.getSimplifiedSelection(p) === true); } isNothingSelected(getAllPaths: () => Array<RepoRelativePath>): boolean { const record = this.inner; const paths = record.selectByDefault ? getAllPaths() : record.fileMap.keySeq(); return paths.every(p => this.getSimplifiedSelection(p) === false); } /** * Produce a `ImportStack['files']` useful for the `debugimportstack` command * to create commits. * * `allPaths` provides extra file paths to be considered. This is useful * when we only track "deselected files". */ calculateImportStackFiles( allPaths: Array<RepoRelativePath>, inverse = false, ): ImportCommit['files'] { const files: ImportCommit['files'] = {}; // Process files in the fileMap. Note: this map might only contain the "deselected" // files, depending on selectByDefault. const fileMap = this.inner.fileMap; fileMap.forEach((fileSelection, path) => { if (fileSelection instanceof ChunkSelectState) { const text = inverse ? fileSelection.getInverseText() : fileSelection.getSelectedText(); if (inverse || text !== fileSelection.a) { // The file is edited. Use the changed content. files[path] = {data: text, copyFrom: '.', flags: '.'}; } } else if (fileSelection === true) { // '.' can be used for both inverse = true and false. // - For inverse = true, '.' is used with the 'write' debugimportstack command. // The 'write' command treats '.' as "working parent" to "revert" changes. // - For inverse = false, '.' is used with the 'commit' or 'amend' debugimportstack // commands. They treat '.' as "working copy" to "commit/amend" changes. files[path] = '.'; } }); // Process files outside the fileMap. allPaths.forEach(path => { if (!fileMap.has(path) && this.getSimplifiedSelection(path) !== false) { files[path] = '.'; } }); return files; } /** If any file is partially selected. */ hasChunkSelection(): boolean { return this.inner.fileMap .keySeq() .some(p => typeof this.getSimplifiedSelection(p) !== 'boolean'); } /** Get all paths with chunk selections (regardless of partial or not). */ chunkSelectionPaths(): Array<RepoRelativePath> { return this.inner.fileMap .filter((v, _path) => v instanceof ChunkSelectState) .keySeq() .toArray(); } } /** Default: select all files. */ const defaultUncommittedPartialSelection = PartialSelection.empty({ selectByDefault: true, }); /** PartialSelection for `wdir()`. See `UseUncommittedSelection` for the public API. */ export const uncommittedSelection = atomResetOnCwdChange<PartialSelection>( defaultUncommittedPartialSelection, ); const wdirRev = 'wdir()'; /** PartialSelection for `wdir()` that handles loading file contents. */ export class UseUncommittedSelection { // Persist across `UseUncommittedSelection` life cycles. // Not an atom so updating the cache does not trigger re-render. static fileContentCache: { wdirHash: Hash; files: Map<RepoPath, ExportFile | null>; parentFiles: Map<RepoPath, ExportFile | null>; asyncLoadingLock: RateLimiter; epoch: number; } = { wdirHash: '', files: new Map(), parentFiles: new Map(), asyncLoadingLock: new RateLimiter(1), epoch: 0, }; constructor( public selection: PartialSelection, private setSelection: (_v: PartialSelection) => void, wdirHash: Hash, private getPaths: () => Array<RepoRelativePath>, epoch: number, ) { const cache = UseUncommittedSelection.fileContentCache; if (wdirHash !== cache.wdirHash || epoch !== cache.epoch) { // Invalidate existing cache when `.` or epoch changes. cache.files.clear(); cache.parentFiles.clear(); cache.wdirHash = wdirHash; cache.epoch = epoch; } } /** Explicitly select a file. */ select(...paths: Array<RepoRelativePath>) { let newSelection = this.selection; for (const path of paths) { newSelection = newSelection.select(path); } this.setSelection(newSelection); } selectAll() { const newSelection = defaultUncommittedPartialSelection; this.setSelection(newSelection); } /** Explicitly deselect a file. Also drops the related file content cache. */ deselect(...paths: Array<RepoRelativePath>) { let newSelection = this.selection; const cache = UseUncommittedSelection.fileContentCache; for (const path of paths) { cache.files.delete(path); newSelection = newSelection.deselect(path); } this.setSelection(newSelection); } deselectAll() { let newSelection = this.selection; this.getPaths().forEach(path => (newSelection = newSelection.deselect(path))); this.setSelection(newSelection); } /** Toggle a file expansion. */ toggleExpand(path: RepoRelativePath, select?: boolean) { this.setSelection(this.selection.toggleExpand(path, select)); } /** Test if a path is marked as expanded. */ isExpanded(path: RepoRelativePath): boolean { return this.selection.isExpanded(path); } /** Drop "chunk selection" states. Useful to clear states after an wdir-changing operation. */ discardPartialSelections() { return this.setSelection(this.selection.discardPartialSelections()); } /** Restore to the default selection (select all). */ clear() { const newSelection = this.selection.clear(); this.setSelection(newSelection); } /** * Get the chunk select state for the given path. * The file content will be loaded on demand. * * `epoch` is used to invalidate existing caches. */ getChunkSelect(path: RepoRelativePath): ChunkSelectState | Promise<ChunkSelectState> { const fileSelection = this.selection.inner.fileMap.get(path); const cache = UseUncommittedSelection.fileContentCache; let maybeStaleResult = undefined; if (fileSelection instanceof ChunkSelectState) { maybeStaleResult = fileSelection; if (cache.files.has(path)) { // Up to date. return maybeStaleResult; } else { // Cache invalidated by constructor. // Trigger a new fetch below. // Still return `maybeStaleResult` to avoid flakiness. } } const maybeReadFromCache = (): ChunkSelectState | null => { const file = cache.files.get(path); if (file === undefined) { return null; } const parentPath = file?.copyFrom ?? path; const parentFile = cache.parentFiles.get(parentPath); if (parentFile?.dataBase85 || file?.dataBase85) { throw new Error(t('Cannot edit non-utf8 file')); } const a = parentFile?.data ?? ''; const b = file?.data ?? ''; const existing = this.getSelection(path); let selected: string | boolean; if (existing instanceof ChunkSelectState) { if (existing.a === a && existing.b === b) { return existing; } selected = existing.getSelectedText(); } else { selected = existing; } const newSelection = this.selection.startChunkSelect(path, a, b, selected, true); this.setSelection(newSelection); const newSelected = newSelection.getSelection(path); assert( newSelected instanceof ChunkSelectState, 'startChunkSelect() should provide ChunkSelectState', ); return newSelected; }; const promise = cache.asyncLoadingLock.enqueueRun(async () => { const chunkState = maybeReadFromCache(); if (chunkState !== null) { return chunkState; } // Not found in cache. Need to (re)load the file via the server. const revs = wdirRev; // Setup event listener before sending the request. const iter = clientToServerAPI.iterateMessageOfType('exportedStack'); // Explicitly ask for the file via assumeTracked. Note this also provides contents // of other tracked files. clientToServerAPI.postMessage({type: 'exportStack', revs, assumeTracked: [path]}); for await (const event of iter) { if (event.revs !== revs) { // Ignore unrelated response. continue; } if (event.error) { throw new Error(event.error); } if (event.stack.some(c => !c.requested && c.node !== cache.wdirHash)) { // The wdirHash has changed. Fail the load. // The exported stack usually has a non-requested commit that is the parent of // the requested "wdir()", which is the "." commit that should match `wdirHash`. // Note: for an empty repo there is no such non-requested commit exported so // we skip the check in that case. throw new Error(t('Working copy has changed')); } // Update cache. event.stack.forEach(commit => { if (commit.requested) { mergeObjectToMap(commit.files, cache.files); } else { mergeObjectToMap(commit.relevantFiles, cache.parentFiles); } }); // Try read from cache again. const chunkState = maybeReadFromCache(); if (chunkState === null) { if (event.assumeTracked.includes(path)) { // We explicitly requested the file, but the server does not provide // it somehow. break; } else { // It's possible that there are multiple export requests. // This one does not provide the file we want, continue checking other responses. continue; } } else { return chunkState; } } // Handles the `break` above. Tells tsc that we don't return undefined. throw new Error(t('Unable to get file content unexpectedly')); }); return maybeStaleResult ?? promise; } /** Edit chunk selection for a file. */ editChunkSelect( path: RepoRelativePath, newValue: ((chunkState: ChunkSelectState) => ChunkSelectState) | ChunkSelectState, ) { const newSelection = this.selection.editChunkSelect(path, newValue); this.setSelection(newSelection); } // ---------- Read-only methods below ---------- /** * Return true if a file is selected (default), false if deselected, * or a string with the edited content. */ getSelection(path: RepoRelativePath): SingleFileSelection { return this.selection.getSelection(path); } isFullyOrPartiallySelected(path: RepoRelativePath): boolean { return this.selection.isFullyOrPartiallySelected(path); } isPartiallySelected(path: RepoRelativePath): boolean { return this.selection.isPartiallySelected(path); } isFullySelected(path: RepoRelativePath): boolean { return this.selection.isFullySelected(path); } isDeselected(path: RepoRelativePath): boolean { return this.selection.isDeselected(path); } isEverythingSelected(): boolean { return this.selection.isEverythingSelected(this.getPaths); } isNothingSelected(): boolean { return this.selection.isNothingSelected(this.getPaths); } hasChunkSelection(): boolean { return this.selection.hasChunkSelection(); } } export const isFullyOrPartiallySelected = atom(get => { const sel = get(uncommittedSelection); const uncommittedChanges = get(uncommittedChangesWithPreviews); const epoch = get(latestUncommittedChangesTimestamp); const dag = get(dagWithPreviews); const wdirHash = dag.resolve('.')?.hash ?? ''; const getPaths = () => uncommittedChanges.map(c => c.path); const emptyFunction = () => {}; // NOTE: Usually UseUncommittedSelection is only used in React, but this is // a private shortcut path to get the logic outside React. const selection = new UseUncommittedSelection(sel, emptyFunction, wdirHash, getPaths, epoch); return selection.isFullyOrPartiallySelected.bind(selection); }); /** react hook to get the uncommitted selection state. */ export function useUncommittedSelection() { const [selection, setSelection] = useAtom(uncommittedSelection); const uncommittedChanges = useAtomValue(uncommittedChangesWithPreviews); const epoch = useAtomValue(latestUncommittedChangesTimestamp); const dag = useAtomValue(dagWithPreviews); const wdirHash = dag.resolve('.')?.hash ?? ''; const getPaths = () => uncommittedChanges.map(c => c.path); return new UseUncommittedSelection(selection, setSelection, wdirHash, getPaths, epoch); } function mergeObjectToMap<V>(obj: {[path: string]: V} | undefined, map: Map<string, V>) { if (obj === undefined) { return; } for (const k in obj) { const v = obj[k]; map.set(k, v); } } ```
/content/code_sandbox/addons/isl/src/partialSelection.ts
xml
2016-05-05T16:53:47
2024-08-16T19:12:02
sapling
facebook/sapling
5,987
4,274
```xml <project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <modelVersion>4.0.0</modelVersion> <groupId>ossfuzz</groupId> <artifactId>bcel-fuzzer</artifactId> <version>${bcelVersion}</version> <packaging>jar</packaging> <properties> <maven.compiler.source>15</maven.compiler.source> <maven.compiler.target>15</maven.compiler.target> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <exec.mainClass>ossfuzz.BcelFuzzer</exec.mainClass> </properties> <dependencies> <!-- On the CI, install the jazzer file with mvn install:install-file -Dfile=${JAZZER_API_PATH} \ -DgroupId="com.code-intelligence" \ -DartifactId="jazzer-api" \ -Dversion="0.12.0" \ -Dpackaging=jar in order to avoid mismatching driver/api versions. --> <dependency> <groupId>com.code-intelligence</groupId> <artifactId>jazzer-api</artifactId> <version>0.12.0</version> </dependency> <dependency> <groupId>org.apache.bcel</groupId> <artifactId>bcel</artifactId> <version>${bcelVersion}</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-shade-plugin</artifactId> <version>3.3.0</version> <executions> <execution> <phase>package</phase> <goals> <goal>shade</goal> </goals> </execution> </executions> </plugin> </plugins> </build> </project> ```
/content/code_sandbox/projects/apache-commons-bcel/pom.xml
xml
2016-07-20T19:39:50
2024-08-16T10:54:09
oss-fuzz
google/oss-fuzz
10,251
469
```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 /** * Computes the cosine of an angle measured in degrees. * * @param x - input value (in degrees) * @returns cosine * * @example * var v = cosd( 0.0 ); * // returns 1.0 * * @example * var v = cosd( 60.0 ); * // returns ~0.5 * * @example * var v = cosd( 90.0); * // returns 0 * * @example * var v = cosd( NaN ); * // returns NaN */ declare function cosd( x: number ): number; // EXPORTS // export = cosd; ```
/content/code_sandbox/lib/node_modules/@stdlib/math/base/special/cosd/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
201
```xml export * from './components/FlatTree/index'; ```
/content/code_sandbox/packages/react-components/react-tree/library/src/FlatTree.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
11
```xml import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { RetinaImg } from 'mailspring-component-kit'; import moment from 'moment'; import { Thread, localized, FocusedPerspectiveStore } from 'mailspring-exports'; import { updateReminderMetadata } from './send-reminders-utils'; import { PLUGIN_ID } from './send-reminders-constants'; interface SendRemindersThreadTimestampProps { thread: Thread; fallback: typeof React.Component; } class SendRemindersThreadTimestamp extends Component<SendRemindersThreadTimestampProps> { static displayName = 'SendRemindersThreadTimestamp'; static propTypes = { thread: PropTypes.object, fallback: PropTypes.func, }; static containerRequired = false; onRemoveReminder(thread) { updateReminderMetadata(thread, {}); } render() { const Fallback = this.props.fallback; const current = FocusedPerspectiveStore.current(); if (!(current as any).isReminders) { return <Fallback {...this.props} />; } const metadata = this.props.thread.metadataForPluginId(PLUGIN_ID); if (!metadata || !metadata.expiration) { return <Fallback {...this.props} />; } const mExpiration = moment(metadata.expiration); return ( <span className="send-reminders-thread-timestamp timestamp" title={localized(`Reminder set for %@ from now`, mExpiration.fromNow(true))} > <RetinaImg name="ic-timestamp-reminder.png" mode={RetinaImg.Mode.ContentIsMask} /> <span className="date-message">{localized('in %@', mExpiration.fromNow(true))}</span> </span> ); } } export default SendRemindersThreadTimestamp; ```
/content/code_sandbox/app/internal_packages/send-reminders/lib/send-reminders-thread-timestamp.tsx
xml
2016-10-13T06:45:50
2024-08-16T18:14:37
Mailspring
Foundry376/Mailspring
15,331
373
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import ctors = require( './index' ); // TESTS // // The function returns a function or null.. { ctors( 'complex128' ); // $ExpectType Complex128ArrayConstructor ctors( 'complex64' ); // $ExpectType Complex64ArrayConstructor ctors( 'float' ); // $ExpectType Function | null } // The compiler throws an error if the function is provided an unsupported number of arguments... { ctors(); // $ExpectError ctors( 'complex128', 3 ); // $ExpectError } ```
/content/code_sandbox/lib/node_modules/@stdlib/array/typed-complex-ctors/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
166
```xml <vector xmlns:android="path_to_url" android:width="128dp" android:height="128dp" android:viewportWidth="128" android:viewportHeight="128"> <path android:pathData="m128,64c0,35.346 -28.654,64 -64,64s-64,-28.654 -64,-64 28.654,-64 64,-64 64,28.654 64,64" android:strokeWidth=".2" android:fillColor="#9bbe55"/> <path android:fillColor="#000" android:pathData="m101.34,26.645c-4.579,2.29 -8.997,5.494 -13.164,9.356h-56.174v64h64v-54.516c3.636,-3.567 7.288,-6.397 10.705,-8.106z" android:fillAlpha="0.2"/> <path android:pathData="M36,36h56v56h-56z" android:strokeWidth="8" android:fillColor="#fff" android:strokeColor="#666"/> <path android:pathData="m44,60s14,6.678 23.333,15.556c7.259,-20.035 22.148,-40.296 36.667,-47.556" android:strokeWidth="12" android:strokeColor="#3150ab"/> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/ic_quest_check.xml
xml
2016-07-02T10:44:04
2024-08-16T18:55:54
StreetComplete
streetcomplete/StreetComplete
3,781
340