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 <RelativeLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <androidx.swiperefreshlayout.widget.SwipeRefreshLayout android:id="@+id/refresh_layout" android:layout_width="match_parent" android:layout_height="wrap_content"> <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" android:scrollbars="vertical" /> </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> </RelativeLayout> ```
/content/code_sandbox/app/src/main/res/layout/fragment_recycler.xml
xml
2016-05-21T08:47:10
2024-08-14T04:13:43
JAViewer
SplashCodes/JAViewer
4,597
142
```xml /* eslint-disable @next/next/no-head-element */ export default function RootLayout({ children, }: { children: React.ReactNode }) { return ( <html> <head></head> <body>{children}</body> </html> ) } ```
/content/code_sandbox/crates/next-core/src/assets/layout.tsx
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
59
```xml <?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="path_to_url"> <RelativeLayout android:id="@+id/ll_progress_bar" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/colorTabBgDefault"> <RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:layout_marginBottom="60dp" android:gravity="center_vertical"> <ImageView android:id="@+id/img_err" android:layout_width="50dp" android:layout_height="50dp" android:src="@mipmap/ic_launcher" /> <LinearLayout android:layout_width="wrap_content" android:layout_height="50dp" android:layout_marginLeft="10dp" android:layout_toRightOf="@+id/img_err" android:gravity="center_vertical" android:orientation="vertical"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="" android:textColor="@color/text_common" android:textSize="18sp" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="" android:textColor="@color/colorSubtitle" android:textSize="14sp" /> </LinearLayout> </RelativeLayout> </RelativeLayout> </layout> ```
/content/code_sandbox/app/src/main/res/layout/activity_transition.xml
xml
2016-11-20T11:59:25
2024-08-14T13:24:02
CloudReader
youlookwhat/CloudReader
4,933
333
```xml import React, {CSSProperties} from 'react'; import {RepositoryEntity} from '../Type/RepositoryEntity'; import {Icon} from './Icon'; import {color} from '../Style/color'; import {appTheme} from '../Style/appTheme'; import styled from 'styled-components'; import {ClickView} from './ClickView'; import {space} from '../Style/layout'; import {Text} from './Text'; import ReactDOM from 'react-dom'; type Props = { repository: RepositoryEntity; selected: boolean; className?: string; style?: CSSProperties; } type State = { } export class RepositoryRow extends React.Component<Props, State> { componentDidUpdate(prevProps: Readonly<Props>, _prevState: Readonly<State>, _snapshot?: any) { // if (!prevProps.selected && this.props.selected) { const el = ReactDOM.findDOMNode(this) as HTMLDivElement; // @ts-ignore el.scrollIntoViewIfNeeded(false); } } render() { const selectedClassName = this.props.selected ? 'repository-row-selected' : ''; const iconColor = this.props.selected ? color.white : appTheme().icon.normal; return ( <Root className={`${selectedClassName} ${this.props.style}`} style={this.props.style}> <Icon name='open-in-new' color={iconColor}/> <RepositoryText>{this.props.repository.fullName}</RepositoryText> </Root> ); } } const Root = styled(ClickView)` flex-direction: row; align-items: center; border-radius: 8px; padding: ${space.small2}px ${space.medium}px; margin: 0 ${space.medium}px; &:hover { background: ${() => appTheme().bg.primaryHover}; } &.repository-row-selected { background: ${() => appTheme().accent.normal}; color: ${color.white}; } `; const RepositoryText = styled(Text)` padding-left: ${space.medium}px; flex: 1; .repository-row-selected & { color: ${color.white}; } `; ```
/content/code_sandbox/src/Renderer/Library/View/RepositoryRow.tsx
xml
2016-05-10T12:55:31
2024-08-11T04:32:50
jasper
jasperapp/jasper
1,318
439
```xml <resources> <string name="app_name">library</string> <!-- TODO: Remove or change this placeholder text --> <string name="hello_blank_fragment">Hello blank fragment</string> </resources> ```
/content/code_sandbox/library/photoPicker/src/main/res/values/strings.xml
xml
2016-09-26T09:42:41
2024-08-12T07:09:06
AndroidFire
jaydenxiao2016/AndroidFire
2,634
45
```xml import { BarTooltipProps } from './types' import { BasicTooltip } from '@nivo/tooltip' export const BarTooltip = <RawDatum,>({ color, label, ...data }: BarTooltipProps<RawDatum>) => { return <BasicTooltip id={label} value={data.formattedValue} enableChip={true} color={color} /> } ```
/content/code_sandbox/packages/bar/src/BarTooltip.tsx
xml
2016-04-16T03:27:56
2024-08-16T03:38:37
nivo
plouc/nivo
13,010
76
```xml import type { GraphQLType } from 'graphql'; import React, { Fragment, PureComponent } from 'react'; import { MarkdownPreview } from '../markdown-preview'; import { GraphQLDefaultValue } from './graph-ql-default-value'; import { GraphQLExplorerTypeLink } from './graph-ql-explorer-type-link'; import type { GraphQLFieldWithParentName } from './graph-ql-types'; interface Props { onNavigateType: (type: GraphQLType) => void; field: GraphQLFieldWithParentName; } export class GraphQLExplorerField extends PureComponent<Props> { renderDescription() { const { field } = this.props; return <MarkdownPreview markdown={field.description || '*no description*'} />; } renderType() { const { field, onNavigateType } = this.props; return ( <Fragment> <h2 className="graphql-explorer__subheading">Type</h2> <GraphQLExplorerTypeLink type={field.type} onNavigate={onNavigateType} /> </Fragment> ); } renderArgumentsMaybe() { const { field, onNavigateType } = this.props; if (!field.args || field.args.length === 0) { return null; } return ( <Fragment> <h2 className="graphql-explorer__subheading">Arguments</h2> <ul className="graphql-explorer__defs"> {field.args.map(a => { return ( <li key={a.name}> <span className="info">{a.name}</span>:{' '} <GraphQLExplorerTypeLink onNavigate={onNavigateType} type={a.type} /> <GraphQLDefaultValue // @ts-expect-error -- TSCONVERSION field={a} /> {a.description && <MarkdownPreview markdown={a.description} />} </li> ); })} </ul> </Fragment> ); } render() { return ( <div className="graphql-explorer__field"> {this.renderDescription()} {this.renderType()} {this.renderArgumentsMaybe()} </div> ); } } ```
/content/code_sandbox/packages/insomnia/src/ui/components/graph-ql-explorer/graph-ql-explorer-field.tsx
xml
2016-04-23T03:54:26
2024-08-16T16:50:44
insomnia
Kong/insomnia
34,054
451
```xml import * as React from "react"; import Frame from "../components/Frame"; import { EmbedProps as Props } from "."; function YouTube({ matches, ...props }: Props) { const videoId = matches[1]; let src; try { const url = new URL(props.attrs.href); const searchParams = new URLSearchParams(url.search); const start = searchParams.get("t")?.replace(/s$/, ""); // Youtube returns the url in a html encoded format where // '&' is replaced by '&amp;'. So we also check if the search params // contain html encoded query params. const clip = ( searchParams.get("clip") || searchParams.get("amp;clip") )?.replace(/s$/, ""); const clipt = ( searchParams.get("clipt") || searchParams.get("amp;clipt") )?.replace(/s$/, ""); src = `path_to_url{videoId}?modestbranding=1${ start ? `&start=${start}` : "" }${clip ? `&clip=${clip}` : ""}${clipt ? `&clipt=${clipt}` : ""}`; } catch (_e) { // noop } return <Frame {...props} src={src} title={`YouTube (${videoId})`} />; } export default YouTube; ```
/content/code_sandbox/shared/editor/embeds/YouTube.tsx
xml
2016-05-22T21:31:47
2024-08-16T19:57:22
outline
outline/outline
26,751
288
```xml <resources xmlns:tools="path_to_url"> <string name="crop__saving">Salvando imagem</string> <string name="crop__wait">Por favor, aguarde</string> <string name="crop__pick_error">Sem fontes de imagem disponveis</string> <string name="crop__done">FINALIZADO</string> <string name="crop__cancel" tools:ignore="ButtonCase">CANCELAR</string> </resources> ```
/content/code_sandbox/DragSquare/crop/src/main/res/values-pt/strings.xml
xml
2016-05-27T07:13:04
2024-07-27T08:49:43
DragRankSquare
xmuSistone/DragRankSquare
1,113
104
```xml import { IButtonMutateProps, IFormProps } from "@erxes/ui/src/types"; import Button from "@erxes/ui/src/components/Button"; import ControlLabel from "@erxes/ui/src/components/form/Label"; import Form from "@erxes/ui/src/components/form/Form"; import FormControl from "@erxes/ui/src/components/form/Control"; import FormGroup from "@erxes/ui/src/components/form/Group"; import { ModalFooter } from "@erxes/ui/src/styles/main"; import Select from "react-select"; import React from "react"; import { WEBHOOK_ACTIONS } from "@erxes/ui-settings/src/constants"; import { __ } from "@erxes/ui/src/utils/core"; type Props = { renderButton: (props: IButtonMutateProps) => JSX.Element; callback: () => void; }; type State = { selectedActions: any[]; }; class OutgoingWebhookForm extends React.Component<Props, State> { constructor(props) { super(props); const webhook = props.object || {}; let webhookActions = [] as any; if (webhook.actions) { webhookActions = webhook.actions.map((item) => { return { label: item.label, value: item.label }; }) || []; } const selectedActions = webhookActions; this.state = { selectedActions, }; } select = <T extends keyof State>(name: T, value) => { this.setState({ [name]: value } as Pick<State, keyof State>); }; onChange = (e) => { const index = (e.currentTarget as HTMLInputElement).value; const isChecked = (e.currentTarget as HTMLInputElement).checked; const selected = this.state.selectedActions[index]; const selectedActions = this.state.selectedActions; selectedActions[index] = { type: selected.type, action: selected.action, label: selected.label, checked: isChecked, }; this.setState({ selectedActions }); }; collectValues = (selectedActions) => selectedActions.map( (selectedAction) => WEBHOOK_ACTIONS.find( (action) => action.label === selectedAction.label ) || {} ); generateDoc = (values: { _id?: string; url: string }) => { const { selectedActions } = this.state; return { url: values.url, actions: this.collectValues(selectedActions), }; }; generateActions = () => { return WEBHOOK_ACTIONS.map((action) => { return { label: action.label, value: action.label }; }); }; renderContent = (formProps: IFormProps) => { const { renderButton, callback } = this.props; const { values, isSubmitted } = formProps; return ( <> <FormGroup> <ControlLabel required={true}>Endpoint url</ControlLabel> <FormControl {...formProps} name="url" required={true} autoFocus={true} /> </FormGroup> <FormGroup> <ControlLabel required={true}>Actions</ControlLabel> <Select placeholder={__("Choose actions")} options={this.generateActions()} value={this.generateActions().filter((o) => this.state.selectedActions.includes(o.value) )} onChange={this.select.bind(this, "selectedActions")} isMulti={true} /> </FormGroup> <ModalFooter> <Button btnStyle="simple" type="button" onClick={callback} icon="times-circle" uppercase={false} > Cancel </Button> {renderButton({ name: "integration", values: this.generateDoc(values), isSubmitted, callback, })} </ModalFooter> </> ); }; render() { return <Form renderContent={this.renderContent} />; } } export default OutgoingWebhookForm; ```
/content/code_sandbox/packages/plugin-inbox-ui/src/settings/integrations/components/outgoing-webhook/Form.tsx
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
824
```xml import { NEXT_MESSAGE_ON_MOVE } from '@proton/shared/lib/mail/mailSettings'; import { Toggle } from '../../components'; interface Props { id?: string; loading?: boolean; nextMessageOnMove?: number; onToggle: (nextMessageOnMove: NEXT_MESSAGE_ON_MOVE) => void; } const NextMessageOnMoveToggle = ({ id, nextMessageOnMove, loading, onToggle }: Props) => { return ( <Toggle id={id} checked={Boolean(nextMessageOnMove)} onChange={({ target }) => onToggle(target.checked ? NEXT_MESSAGE_ON_MOVE.ENABLED : NEXT_MESSAGE_ON_MOVE.DISABLED) } loading={loading} /> ); }; export default NextMessageOnMoveToggle; ```
/content/code_sandbox/packages/components/containers/messages/NextMessageOnMoveToggle.tsx
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
159
```xml import config from "../../config"; const handleExtensionInstalledOrUpdated = (details: chrome.runtime.InstalledDetails) => { if (details.reason === chrome.runtime.OnInstalledReason.INSTALL) { chrome.tabs.create({ url: config.WEB_URL + "/sessions" }); } // if (details.reason === chrome.runtime.OnInstalledReason.UPDATE) { // chrome.tabs.create({ url: config.WEB_URL + "/extension-updated" }); // } }; export const handleInstallUninstall = () => { chrome.runtime.onInstalled.addListener(handleExtensionInstalledOrUpdated); chrome.runtime.setUninstallURL(config.WEB_URL + "/goodbye/"); }; ```
/content/code_sandbox/browser-extension/sessionbear/src/service-worker/services/installUninstall.ts
xml
2016-12-01T04:36:06
2024-08-16T19:12:19
requestly
requestly/requestly
2,121
136
```xml <Project> <PropertyGroup> <CodesignKey>iPhone Developer</CodesignKey> <NullabilityInfoContextSupport>true</NullabilityInfoContextSupport> <!-- MT7091 occurs when referencing a .framework bundle that consists of a static library. It only warns about not copying the library to the app bundle to save space, so there's nothing to be worried about. --> <NoWarn>$(NoWarn);MT7091</NoWarn> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)' == 'Debug'"> <!-- On debug configurations, we use Mono interpreter for faster compilation. --> <UseInterpreter>true</UseInterpreter> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)' == 'Release'"> <!-- On release configurations, we use AOT compiler for optimal performance. --> <UseInterpreter>false</UseInterpreter> </PropertyGroup> <ItemGroup> <NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\bass.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" /> <NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\bass_fx.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" /> <NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\bassmix.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" /> <NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libavcodec.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" /> <NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libavdevice.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" /> <NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libavformat.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" /> <NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libavutil.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" /> <NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libswresample.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" /> <NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\libswscale.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" /> <NativeReference Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\runtimes\ios\native\metal-mono-workaround.xcframework" Kind="Framework" SmartLink="false" ForceLoad="true" /> </ItemGroup> <!-- Veldrid references libraries which cannot be AOT'd on iOS, replace them with stub assemblies. See: path_to_url#issuecomment-1356461410 --> <Target Name="OsuFrameworkIOSCopyStubAssemblies" BeforeTargets="_AOTCompile"> <ItemGroup> <StubFiles Include="$(MSBuildThisFileDirectory)osu.Framework.iOS\stubs\*" /> </ItemGroup> <Copy Condition="'$(Platform)' == 'AnyCPU'" SourceFiles="@(StubFiles)" DestinationFolder="obj\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\linked\" /> <Copy Condition="'$(Platform)' != 'AnyCPU'" SourceFiles="@(StubFiles)" DestinationFolder="obj\$(Platform)\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\linked\" /> </Target> <!-- OpenTabletDriver contains P/Invokes to the "Quartz" framework for native macOS code. This leads iOS linker into attempting to include that framework, despite not existing on such platform. See: path_to_url / path_to_url#issuecomment-1141893683 --> <!-- There's also P/Invokes for "ApplicationServices" framework somewhere in the referenced libraries... --> <Target Name="OsuFrameworkIOSRemoveMacOSFrameworks" BeforeTargets="_ComputeLinkNativeExecutableInputs" AfterTargets="_LoadLinkerOutput"> <ItemGroup> <_LinkerFrameworks Remove="Quartz"/> <_LinkerFrameworks Remove="ApplicationServices"/> </ItemGroup> </Target> </Project> ```
/content/code_sandbox/osu.Framework.iOS.props
xml
2016-08-26T03:45:35
2024-08-16T05:03:32
osu-framework
ppy/osu-framework
1,618
975
```xml export interface Value { CheckInComment: string; CheckOutType: number; ContentTag: string; CustomizedPageStatus: number; ETag: string; Exists: boolean; IrmEnabled: boolean; Length: number; Level: number; LinkingUri?: any; LinkingUrl: string; MajorVersion: number; MinorVersion: number; Name: string; ServerRelativeUrl: string; TimeCreated: Date; TimeLastModified: Date; Title?: any; UIVersion: number; UIVersionLabel: string; UniqueId: string; } export interface IPhotosResponse { value: Value[]; } ```
/content/code_sandbox/samples/react-teams-tab-field-visit-mashup/src/webparts/fieldVisitTab/services/PhotoService/IPhotosResponse.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
151
```xml import * as React from "react"; import makeStyles from "@material-ui/styles/makeStyles"; import createStyles from "@material-ui/styles/createStyles"; import TextField from "@material-ui/core/TextField"; import Button from "@material-ui/core/Button"; import { LoginEntity, createEmptyLogin } from "../model/login"; interface PropsForm { onLogin: (login: LoginEntity) => void; } // path_to_url#makestyles-styles-options-hook const useFormStyles = makeStyles((theme) => createStyles({ formContainer: { display: "flex", flexDirection: "column", justifyContent: "center", }, }) ); export const LoginComponent: React.FC<PropsForm> = (props) => { const { onLogin } = props; const [loginInfo, setLoginInfo] = React.useState<LoginEntity>( createEmptyLogin() ); const classes = useFormStyles(); const onTexFieldChange = (fieldId) => (e) => { setLoginInfo({ ...loginInfo, [fieldId]: e.target.value, }); }; return ( <div className={classes.formContainer}> <TextField label="Name" margin="normal" value={loginInfo.login} onChange={onTexFieldChange("login")} /> <TextField label="Password" type="password" margin="normal" value={loginInfo.password} onChange={onTexFieldChange("password")} /> <Button variant="contained" color="primary" onClick={() => onLogin(loginInfo)} > Login </Button> </div> ); }; ```
/content/code_sandbox/hooks/13_LoginForm/src/pages/login.component.tsx
xml
2016-02-28T11:58:58
2024-07-21T08:53:34
react-typescript-samples
Lemoncode/react-typescript-samples
1,846
352
```xml export * from './YesIcon'; export * from './NoIcon'; export * from './PendingIcon'; export * from './WarningIcon'; ```
/content/code_sandbox/docs/ui/components/DocIcons/index.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
29
```xml import { IInsuranceType, insuranceTypeSchema, IInsuranceTypeDocument } from './definitions/insuranceTypes'; import { Model, FilterQuery } from 'mongoose'; import { IModels } from '../connectionResolver'; export interface IInsuranceTypeModel extends Model<IInsuranceTypeDocument> { getInsuranceType(selector: FilterQuery<IInsuranceTypeDocument>); createInsuranceType(doc: IInsuranceType); updateInsuranceType(_id: string, doc: IInsuranceType); removeInsuranceTypes(_ids: string[]); } export const loadInsuranceTypeClass = (models: IModels) => { class InsuranceType { /** * * Get InsuranceType */ public static async getInsuranceType( selector: FilterQuery<IInsuranceTypeDocument> ) { const insuranceType = await models.InsuranceTypes.findOne(selector); if (!insuranceType) { throw new Error('InsuranceType not found'); } return insuranceType; } /** * Create a insuranceType */ public static async createInsuranceType(doc: IInsuranceType) { if (!doc.companyId) throw new Error('Company is required'); return await models.InsuranceTypes.create(doc); } /** * Update InsuranceType */ public static async updateInsuranceType( _id: string, doc: IInsuranceTypeDocument ) { await models.InsuranceTypes.updateOne({ _id }, { $set: doc }); return await models.InsuranceTypes.findOne({ _id }); } /** * Remove InsuranceType */ public static async removeInsuranceTypes(_ids: string[]) { // await models.InsuranceTypes.getInsuranceTypeCatogery(models, { _id }); // TODO: check collateralsData return await models.InsuranceTypes.deleteMany({ _id: { $in: _ids } }); } } insuranceTypeSchema.loadClass(InsuranceType); return insuranceTypeSchema; }; ```
/content/code_sandbox/packages/plugin-loans-api/src/models/insuranceTypes.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
421
```xml /** * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #import "FBStandardGraphEdgeFilters.h" #import <objc/runtime.h> #import <UIKit/UIKit.h> #import "FBObjectiveCGraphElement.h" #import "FBRetainCycleDetector.h" FBGraphEdgeFilterBlock FBFilterBlockWithObjectIvarRelation(Class aCls, NSString *ivarName) { return FBFilterBlockWithObjectToManyIvarsRelation(aCls, [NSSet setWithObject:ivarName]); } FBGraphEdgeFilterBlock FBFilterBlockWithObjectToManyIvarsRelation(Class aCls, NSSet<NSString *> *ivarNames) { return ^(FBObjectiveCGraphElement *fromObject, NSString *byIvar, Class toObjectOfClass){ if (aCls && [[fromObject objectClass] isSubclassOfClass:aCls]) { // If graph element holds metadata about an ivar, it will be held in the name path, as early as possible if ([ivarNames containsObject:byIvar]) { return FBGraphEdgeInvalid; } } return FBGraphEdgeValid; }; } FBGraphEdgeFilterBlock FBFilterBlockWithObjectIvarObjectRelation(Class fromClass, NSString *ivarName, Class toClass) { return ^(FBObjectiveCGraphElement *fromObject, NSString *byIvar, Class toObjectOfClass) { if (toClass && [toObjectOfClass isSubclassOfClass:toClass]) { return FBFilterBlockWithObjectIvarRelation(fromClass, ivarName)(fromObject, byIvar, toObjectOfClass); } return FBGraphEdgeValid; }; } NSArray<FBGraphEdgeFilterBlock> *FBGetStandardGraphEdgeFilters() { #if _INTERNAL_RCD_ENABLED static Class heldActionClass; static Class transitionContextClass; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ heldActionClass = NSClassFromString(@"UIHeldAction"); transitionContextClass = NSClassFromString(@"_UIViewControllerOneToOneTransitionContext"); }); return @[FBFilterBlockWithObjectIvarRelation([UIView class], @"_subviewCache"), FBFilterBlockWithObjectIvarRelation(heldActionClass, @"m_target"), FBFilterBlockWithObjectToManyIvarsRelation([UITouch class], [NSSet setWithArray:@[@"_view", @"_gestureRecognizers", @"_window", @"_warpedIntoView"]]), FBFilterBlockWithObjectToManyIvarsRelation(transitionContextClass, [NSSet setWithArray:@[@"_toViewController", @"_fromViewController"]])]; #else return nil; #endif // _INTERNAL_RCD_ENABLED } ```
/content/code_sandbox/FBRetainCycleDetector/Filtering/FBStandardGraphEdgeFilters.mm
xml
2016-04-07T18:17:16
2024-08-07T03:44:31
FBRetainCycleDetector
facebook/FBRetainCycleDetector
4,206
593
```xml <library path="libmoveit_srv_kinematics_plugin"> <class name="srv_kinematics_plugin/SrvKinematicsPlugin" type="srv_kinematics_plugin::SrvKinematicsPlugin" base_class_type="kinematics::KinematicsBase"> <description> A implementation of kinematics as a plugin that uses a ROS service layer to communicate with an external IK solver </description> </class> </library> ```
/content/code_sandbox/moveit_kinematics/srv_kinematics_plugin_description.xml
xml
2016-07-27T20:38:09
2024-08-15T02:08:44
moveit
moveit/moveit
1,626
93
```xml import type { Recipient } from '@proton/shared/lib/interfaces'; import type { Message } from '@proton/shared/lib/interfaces/mail/Message'; import { getRecipients as getMessageRecipients, getSender } from '@proton/shared/lib/mail/messages'; import type { Element } from '../models/element'; import { getRecipients as getConversationRecipients, getSenders } from './conversation'; /** * Get an array of Recipients that we use to display the recipients in the message list * In most locations, we want to see the Senders at this place, but for some other (e.g. Sent) * we will need to display the recipients instead. */ export const getElementSenders = ( element: Element, conversationMode: boolean, displayRecipients: boolean ): Recipient[] => { // For some locations (e.g. Sent folder), if this is a message that the user sent, // we don't display the sender but the recipients let recipients: Recipient[] = []; if (displayRecipients) { recipients = conversationMode ? getConversationRecipients(element) : getMessageRecipients(element as Message); } else { if (conversationMode) { recipients = getSenders(element); } else { const sender = getSender(element as Message); recipients = sender ? [sender] : []; } } return recipients; }; ```
/content/code_sandbox/applications/mail/src/app/helpers/recipients.ts
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
294
```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>ACPI</key> <dict> <key>DSDT</key> <dict> <key>Patches</key> <array> <dict> <key>Comment</key> <string>change EHC1 to EH01</string> <key>Disabled</key> <false/> <key>Find</key> <data> RUhDMQ== </data> <key>Replace</key> <data> RUgwMQ== </data> </dict> <dict> <key>Comment</key> <string>change EHC2 to EH02</string> <key>Disabled</key> <false/> <key>Find</key> <data> RUhDMg== </data> <key>Replace</key> <data> RUgwMg== </data> </dict> <dict> <key>Comment</key> <string>change EUSB to EH01</string> <key>Disabled</key> <false/> <key>Find</key> <data> RVVTQg== </data> <key>Replace</key> <data> RUgwMQ== </data> </dict> <dict> <key>Comment</key> <string>change USBE to EH02</string> <key>Disabled</key> <false/> <key>Find</key> <data> VVNCRQ== </data> <key>Replace</key> <data> RUgwMg== </data> </dict> </array> </dict> <key>SSDT</key> <dict> <key>DropOem</key> <true/> <key>Generate</key> <dict> <key>CStates</key> <false/> <key>PStates</key> <false/> </dict> <key>PluginType</key> <integer>1</integer> </dict> <key>SortedOrder</key> <array> <string>SSDT.aml</string> <string>SSDT-0.aml</string> <string>SSDT-1.aml</string> <string>SSDT-2.aml</string> <string>SSDT-3.aml</string> <string>SSDT-4.aml</string> <string>SSDT-5.aml</string> <string>SSDT-6.aml</string> <string>SSDT-7.aml</string> <string>SSDT-8.aml</string> <string>SSDT-9.aml</string> <string>SSDT-10.aml</string> <string>SSDT-11.aml</string> <string>SSDT-12.aml</string> <string>SSDT-13.aml</string> <string>SSDT-14.aml</string> <string>SSDT-15.aml</string> <string>SSDT-16.aml</string> <string>SSDT-17.aml</string> <string>SSDT-18.aml</string> <string>SSDT-19.aml</string> </array> <key>SortedOrder-Comment</key> <string>This is the original order supported by Clover prior to build v3062. You can trim it as necessary.</string> </dict> <key>Boot</key> <dict> <key>Arguments</key> <string>dart=0 nv_disable=1 kext-dev-mode=1</string> <key>Legacy</key> <string>LegacyBiosDefault</string> <key>Log</key> <false/> <key>NeverHibernate</key> <true/> <key>NoEarlyProgress</key> <true/> <key>Secure</key> <false/> <key>Timeout</key> <integer>5</integer> <key>XMPDetection</key> <string>Yes</string> </dict> <key>CPU</key> <dict> <key>UseARTFrequency</key> <false/> </dict> <key>Devices</key> <dict> <key>AddProperties</key> <array> <dict> <key>Device</key> <string>IntelGFX</string> <key>Disabled</key> <false/> <key>Key</key> <string>AAPL,Gfx324</string> <key>Value</key> <data> AQAAAA== </data> </dict> <dict> <key>Device</key> <string>IntelGFX</string> <key>Disabled</key> <false/> <key>Key</key> <string>AAPL,GfxYTile</string> <key>Value</key> <data> AQAAAA== </data> </dict> </array> <key>Audio</key> <dict> <key>Inject</key> <integer>0</integer> </dict> <key>NoDefaultProperties</key> <true/> <key>USB</key> <dict> <key>AddClockID</key> <true/> <key>FixOwnership</key> <true/> <key>HighCurrent</key> <true/> <key>Inject</key> <true/> </dict> </dict> <key>DisableDrivers</key> <array> <string>VBoxHfs</string> </array> <key>GUI</key> <dict> <key>Custom</key> <dict> <key>Entries</key> <array> <dict> <key>Disabled</key> <false/> <key>FullTitle</key> <string>UEFI internal</string> <key>Hidden</key> <string>Always</string> <key>Ignore</key> <false/> <key>NoCaches</key> <false/> <key>Type</key> <string>Other</string> </dict> </array> </dict> <key>Hide</key> <array> <string>Install El Capitan 10.11.5 (15F34)</string> <string>Recovery HD</string> <string>LRS_ESP</string> <string>##El Capitan Custom Installer</string> <string>Sierra Custom Installer</string> </array> <key>Mouse</key> <dict> <key>Enabled</key> <false/> </dict> <key>Scan</key> <dict> <key>Entries</key> <true/> <key>Legacy</key> <false/> <key>Linux</key> <false/> <key>Tool</key> <true/> </dict> <key>ScreenResolution</key> <string>1920x1080</string> <key>Theme</key> <string>Bluemac</string> </dict> <key>Graphics</key> <dict> <key>EDID</key> <dict> <key>Inject</key> <false/> </dict> <key>Inject</key> <dict> <key>ATI</key> <false/> <key>Intel</key> <true/> <key>NVidia</key> <false/> </dict> <key>ig-platform-id</key> <string>0x19160000</string> </dict> <key>KernelAndKextPatches</key> <dict> <key>AppleRTC</key> <true/> <key>AsusAICPUPM</key> <false/> <key>KernelLapic</key> <false/> <key>KernelPm</key> <true/> <key>KextsToPatch</key> <array> <dict> <key>Comment</key> <string>-series)</string> <key>Disabled</key> <false/> <key>Find</key> <data> g710////EA== </data> <key>Name</key> <string>AppleUSBXHCIPCI</string> <key>Replace</key> <data> g710////Gw== </data> </dict> <dict> <key>Comment</key> <string>Disable minStolenSize less or equal fStolenMemorySize assertion, 10.12.0 ( (based on Austere.J patch)</string> <key>Disabled</key> <false/> <key>Find</key> <data> iUXIOcZ2UQ== </data> <key>Name</key> <string>AppleIntelSKLGraphicsFramebuffer</string> <key>Replace</key> <data> iUXIOcbrUQ== </data> </dict> <dict> <key>Comment</key> <string>Ds</string> <key>Disabled</key> <false/> <key>Find</key> <data> AEFQUExFIFNTRAA= </data> <key>Name</key> <string>IOAHCIBlockStorage</string> <key>Replace</key> <data> AAAAAAAAAAAAAAA= </data> </dict> <dict> <key>Comment</key> <string>kop)</string> <key>Disabled</key> <false/> <key>Find</key> <data> AQAAdSU= </data> <key>Name</key> <string>IOGraphicsFamily</string> <key>Replace</key> <data> AQAA6yU= </data> </dict> <dict> <key>Comment</key> <string>abMan</string> <key>Disabled</key> <false/> <key>Find</key> <data> MdtMO33YdRI= </data> <key>Name</key> <string>AirPortBrcm4360</string> <key>Replace</key> <data> Mdv/w5CQkJA= </data> </dict> <dict> <key>Comment</key> <string>oid</string> <key>Disabled</key> <false/> <key>Find</key> <data> QYP8/3QsSA== </data> <key>Name</key> <string>AirPortBrcm4360</string> <key>Replace</key> <data> ZscGVVPrKw== </data> </dict> <dict> <key>Comment</key> <string>void)</string> <key>Disabled</key> <false/> <key>Find</key> <data> gflSqgAAdSk= </data> <key>Name</key> <string>AirPortBrcm4360</string> <key>Replace</key> <data> gflSqgAAZpA= </data> </dict> <dict> <key>Comment</key> <string>ginal</string> <key>Disabled</key> <false/> <key>Find</key> <data> SIX/dEdIiwc= </data> <key>Name</key> <string>IOBluetoothFamily</string> <key>Replace</key> <data> Qb4PAAAA60Q= </data> </dict> <dict> <key>Comment</key> <string>00</string> <key>Disabled</key> <false/> <key>Find</key> <data> AQUJAAAEAACHAQAA </data> <key>Name</key> <string>AppleIntelSKLGraphicsFramebuffer</string> <key>Replace</key> <data> AQUJAAAIAACHAQAA </data> </dict> <dict> <key>Comment</key> <string>0</string> <key>Disabled</key> <false/> <key>Find</key> <data> AgQKAAAEAACHAQAA </data> <key>Name</key> <string>AppleIntelSKLGraphicsFramebuffer</string> <key>Replace</key> <data> AgQKAAAIAACHAQAA </data> </dict> </array> </dict> <key>RtVariables</key> <dict> <key>BooterConfig</key> <string>0x28</string> <key>CsrActiveConfig</key> <string>0x67</string> </dict> <key>SMBIOS</key> <dict> <key>BiosReleaseDate</key> <string>06/26/2017</string> <key>BiosVendor</key> <string>Apple Inc.</string> <key>BiosVersion</key> <string>MBP131.88Z.0206.B01.1706260154</string> <key>Board-ID</key> <string>Mac-473D31EABEB93F9B</string> <key>BoardManufacturer</key> <string>Apple Inc.</string> <key>BoardType</key> <integer>10</integer> <key>ChassisAssetTag</key> <string>MacBook-Aluminum</string> <key>ChassisManufacturer</key> <string>Apple Inc.</string> <key>ChassisType</key> <string>0x09</string> <key>Family</key> <string>MacBook Pro</string> <key>LocationInChassis</key> <string>Part Component</string> <key>Manufacturer</key> <string>Apple Inc.</string> <key>Memory</key> <dict> <key>Modules</key> <array> <dict> <key>Frequency</key> <integer>1600</integer> <key>Part</key> <string>AD HMT41GS6BFR8A-PB</string> <key>Serial</key> <string>1251D30D</string> <key>Size</key> <integer>8192</integer> <key>Slot</key> <integer>0</integer> <key>Type</key> <string>DDR3</string> <key>Vendor</key> <string>Hynix</string> </dict> </array> </dict> <key>Mobile</key> <true/> <key>ProductName</key> <string>MacBookPro13,1</string> <key>SerialNumber</key> <string>C02S2E3UGVC1</string> <key>Version</key> <string>1.0</string> </dict> <key>SystemParameters</key> <dict> <key>InjectKexts</key> <string>Detect</string> </dict> </dict> </plist> ```
/content/code_sandbox/Clover-Configs/LG/LG 15Z960/CLOVER/config.plist
xml
2016-11-05T04:22:54
2024-08-12T19:25:53
Hackintosh-Installer-University
huangyz0918/Hackintosh-Installer-University
3,937
3,956
```xml import { get, set, getAll, setAll } from '../shared/data.js'; import { isUndefined, isObjectLike } from '../shared/helper.js'; import type { PlainObject } from '../shared/helper.js'; /** * `value` `undefined` `data(element, key)` * * Note: `data-*` * * @param element * @param key * @param value `undefined` * @example ```js data(document.body, 'type', undefined) ``` */ export function data( element: Element | Document | Window, key: string, value: undefined, ): unknown; /** * * @param element * @param key * @param value * @example ```js data(document.body, 'type', 'image') // 'image' ``` */ export function data<T>( element: Element | Document | Window, key: string, value: T, ): T; /** * * * Note: `data-*` * * @param element * @param key * @example ```js data(document.body, 'key') ``` */ export function data( element: Element | Document | Window, key: string, ): unknown; /** * * * Note: `data-*` * * @param element * @example ```js data(document.body) // { 'type': 'image', 'width': 1020, 'height': 680 } ``` */ export function data(element: Element | Document | Window): PlainObject; /** * * @param element * @param data * @example ```js data(document.body, { 'width': 1020, 'height': 680 }) // { 'width': 1020, 'height': 680 } ``` */ export function data<T extends PlainObject>( element: Element | Document | Window, data: T, ): T; export function data( element: Element | Document | Window, key?: string | PlainObject, value?: unknown, ): unknown { // // data(element, { 'key' : 'value' }) if (isObjectLike(key)) { setAll(element, key); return key; } // keyvalue // data(element, 'key', 'value') if (!isUndefined(value)) { set(element, key as string, value); return value; } // // data(element) if (isUndefined(key)) { return getAll(element); } // // data(element, 'key') return get(element, key); } ```
/content/code_sandbox/packages/jq/src/functions/data.ts
xml
2016-07-11T17:39:02
2024-08-16T07:12:34
mdui
zdhxiong/mdui
4,077
564
```xml import type { EventEmitter, EventsMap } from './EventEmitter'; /** * Base class for all shared objects that extends the EventEmitter class. * The implementation is written in C++, installed through JSI and common for mobile platforms. */ export declare class SharedObject<TEventsMap extends EventsMap = Record<never, never>> extends EventEmitter<TEventsMap> implements EventEmitter<TEventsMap> { /** * A function that detaches the JS and native objects to let the native object deallocate * before the JS object gets deallocated by the JS garbage collector. Any subsequent calls to native * functions of the object will throw an error as it is no longer associated with its native counterpart. */ release(): void; } ```
/content/code_sandbox/packages/expo-modules-core/src/ts-declarations/SharedObject.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
152
```xml import { Component, OnInit } from '@angular/core'; import { Code } from '@domain/code'; interface City { name: string; code: string; } @Component({ selector: 'loading-state-doc', template: ` <app-docsectiontext> <p>Loading state can be used <i>loading</i> property.</p> </app-docsectiontext> <div class="card flex justify-content-center"> <p-multiSelect [options]="cities" [(ngModel)]="selectedCities" [loading]="true" optionLabel="name" placeholder="Loading..." /> </div> <app-code [code]="code" selector="multi-select-loading-state-demo"></app-code> ` }) export class LoadingStateDoc implements OnInit { cities!: City[]; selectedCities!: any[]; ngOnInit() { this.cities = [ { name: 'New York', code: 'NY' }, { name: 'Rome', code: 'RM' }, { name: 'London', code: 'LDN' }, { name: 'Istanbul', code: 'IST' }, { name: 'Paris', code: 'PRS' } ]; } code: Code = { basic: `<p-multiSelect [options]="cities" [(ngModel)]="selectedCities" [loading]="true" optionLabel="name" placeholder="Loading..." />`, html: `<div class="card flex justify-content-center"> <p-multiSelect [options]="cities" [(ngModel)]="selectedCities" [loading]="true" optionLabel="name" placeholder="Loading..." /> </div>`, typescript: `import { Component, OnInit } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { MultiSelectModule } from 'primeng/multiselect'; interface City { name: string, code: string } @Component({ selector: 'multi-select-loading-state-demo', templateUrl: './multi-select-loading-state-demo.html', standalone: true, imports: [FormsModule, MultiSelectModule] }) export class MultiSelectLoadingStateDemo implements OnInit { cities!: City[]; selectedCities!: City[]; ngOnInit() { this.cities = [ {name: 'New York', code: 'NY'}, {name: 'Rome', code: 'RM'}, {name: 'London', code: 'LDN'}, {name: 'Istanbul', code: 'IST'}, {name: 'Paris', code: 'PRS'} ]; } }` }; } ```
/content/code_sandbox/src/app/showcase/doc/multiselect/loadingstatedoc.ts
xml
2016-01-16T09:23:28
2024-08-16T19:58:20
primeng
primefaces/primeng
9,969
561
```xml import { NextRequest, NextResponse } from 'next/server' export const revalidate = 1 export function generateStaticParams() { console.log('generateStaticParams static/[slug]') return [{ slug: 'first' }, { slug: 'second' }] } export const GET = (req: NextRequest, { params }) => { return NextResponse.json({ params, now: Date.now() }) } ```
/content/code_sandbox/test/e2e/app-dir/app-routes/app/revalidate-1/[slug]/data.json/route.ts
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
87
```xml import { inject, injectable } from 'inversify'; import { ServiceIdentifiers } from '../../../container/ServiceIdentifiers'; import * as ESTree from 'estree'; import { TNodeWithStatements } from '../../../types/node/TNodeWithStatements'; import { TObjectExpressionKeysTransformerCustomNodeFactory } from '../../../types/container/custom-nodes/TObjectExpressionKeysTransformerCustomNodeFactory'; import { IObjectExpressionExtractorResult } from '../../../interfaces/node-transformers/converting-transformers/object-expression-extractors/IObjectExpressionExtractorResult'; import { TStatement } from '../../../types/node/TStatement'; import { ICustomNode } from '../../../interfaces/custom-nodes/ICustomNode'; import { TInitialData } from '../../../types/TInitialData'; import { IObjectExpressionExtractor } from '../../../interfaces/node-transformers/converting-transformers/object-expression-extractors/IObjectExpressionExtractor'; import { ObjectExpressionKeysTransformerCustomNode } from '../../../enums/custom-nodes/ObjectExpressionKeysTransformerCustomNode'; import { ObjectExpressionVariableDeclarationHostNode } from '../../../custom-nodes/object-expression-keys-transformer-nodes/ObjectExpressionVariableDeclarationHostNode'; import { NodeAppender } from '../../../node/NodeAppender'; import { NodeGuards } from '../../../node/NodeGuards'; import { NodeStatementUtils } from '../../../node/NodeStatementUtils'; import { NodeUtils } from '../../../node/NodeUtils'; import { TNodeWithLexicalScope } from '../../../types/node/TNodeWithLexicalScope'; import { NodeLexicalScopeUtils } from '../../../node/NodeLexicalScopeUtils'; @injectable() export class ObjectExpressionToVariableDeclarationExtractor implements IObjectExpressionExtractor { /** * @type {TObjectExpressionKeysTransformerCustomNodeFactory} */ private readonly objectExpressionKeysTransformerCustomNodeFactory: TObjectExpressionKeysTransformerCustomNodeFactory; /** * @param {TObjectExpressionKeysTransformerCustomNodeFactory} objectExpressionKeysTransformerCustomNodeFactory */ public constructor ( @inject(ServiceIdentifiers.Factory__IObjectExpressionKeysTransformerCustomNode) objectExpressionKeysTransformerCustomNodeFactory: TObjectExpressionKeysTransformerCustomNodeFactory, ) { this.objectExpressionKeysTransformerCustomNodeFactory = objectExpressionKeysTransformerCustomNodeFactory; } /** * extracts object expression: * var object = { * foo: 1, * bar: 2 * }; * * to: * var _0xabc123 = { * foo: 1, * bar: 2 * }; * var object = _0xabc123; * * @param {ObjectExpression} objectExpressionNode * @param {Statement} hostStatement * @returns {IObjectExpressionExtractorResult} */ public extract ( objectExpressionNode: ESTree.ObjectExpression, hostStatement: ESTree.Statement ): IObjectExpressionExtractorResult { return this.transformObjectExpressionToVariableDeclaration( objectExpressionNode, hostStatement ); } /** * @param {ObjectExpression} objectExpressionNode * @param {Statement} hostStatement * @returns {Node} */ private transformObjectExpressionToVariableDeclaration ( objectExpressionNode: ESTree.ObjectExpression, hostStatement: ESTree.Statement ): IObjectExpressionExtractorResult { const hostNodeWithStatements: TNodeWithStatements = NodeStatementUtils.getScopeOfNode(hostStatement); const lexicalScopeNode: TNodeWithLexicalScope | null = NodeGuards.isNodeWithLexicalScope(hostNodeWithStatements) ? hostNodeWithStatements : NodeLexicalScopeUtils.getLexicalScope(hostNodeWithStatements) ?? null; if (!lexicalScopeNode) { throw new Error('Cannot find lexical scope node for the host statement node'); } const properties: (ESTree.Property | ESTree.SpreadElement)[] = objectExpressionNode.properties; const newObjectExpressionHostStatement: ESTree.VariableDeclaration = this.getObjectExpressionHostNode( lexicalScopeNode, properties ); const statementsToInsert: TStatement[] = [newObjectExpressionHostStatement]; NodeAppender.insertBefore(hostNodeWithStatements, statementsToInsert, hostStatement); NodeUtils.parentizeAst(newObjectExpressionHostStatement); NodeUtils.parentizeNode(newObjectExpressionHostStatement, hostNodeWithStatements); const newObjectExpressionIdentifier: ESTree.Identifier = this.getObjectExpressionIdentifierNode(newObjectExpressionHostStatement); const newObjectExpressionNode: ESTree.ObjectExpression = this.getObjectExpressionNode(newObjectExpressionHostStatement); return { nodeToReplace: newObjectExpressionIdentifier, objectExpressionHostStatement: newObjectExpressionHostStatement, objectExpressionNode: newObjectExpressionNode }; } /** * @param {TNodeWithLexicalScope} lexicalScopeNode * @param {(Property | SpreadElement)[]} properties * @returns {VariableDeclaration} */ private getObjectExpressionHostNode ( lexicalScopeNode: TNodeWithLexicalScope, properties: (ESTree.Property | ESTree.SpreadElement)[] ): ESTree.VariableDeclaration { const variableDeclarationHostNodeCustomNode: ICustomNode<TInitialData<ObjectExpressionVariableDeclarationHostNode>> = this.objectExpressionKeysTransformerCustomNodeFactory( ObjectExpressionKeysTransformerCustomNode.ObjectExpressionVariableDeclarationHostNode ); variableDeclarationHostNodeCustomNode.initialize(lexicalScopeNode, properties); const statementNode: TStatement = variableDeclarationHostNodeCustomNode.getNode()[0]; if ( !statementNode || !NodeGuards.isVariableDeclarationNode(statementNode) ) { throw new Error('`objectExpressionHostCustomNode.getNode()[0]` should returns array with `VariableDeclaration` node'); } return statementNode; } /** * @param {VariableDeclaration} objectExpressionHostNode * @returns {Identifier} */ private getObjectExpressionIdentifierNode (objectExpressionHostNode: ESTree.VariableDeclaration): ESTree.Identifier { const newObjectExpressionIdentifierNode: ESTree.Pattern = objectExpressionHostNode.declarations[0].id; if (!NodeGuards.isIdentifierNode(newObjectExpressionIdentifierNode)) { throw new Error('`objectExpressionHostNode` should contain `VariableDeclarator` node with `Identifier` id property'); } return newObjectExpressionIdentifierNode; } /** * @param {VariableDeclaration} objectExpressionHostNode * @returns {Identifier} */ private getObjectExpressionNode (objectExpressionHostNode: ESTree.VariableDeclaration): ESTree.ObjectExpression { const newObjectExpressionNode: ESTree.Expression | null = objectExpressionHostNode.declarations[0].init ?? null; if (!newObjectExpressionNode || !NodeGuards.isObjectExpressionNode(newObjectExpressionNode)) { throw new Error('`objectExpressionHostNode` should contain `VariableDeclarator` node with `ObjectExpression` init property'); } return newObjectExpressionNode; } } ```
/content/code_sandbox/src/node-transformers/converting-transformers/object-expression-extractors/ObjectExpressionToVariableDeclarationExtractor.ts
xml
2016-05-09T08:16:53
2024-08-16T19:43:07
javascript-obfuscator
javascript-obfuscator/javascript-obfuscator
13,358
1,482
```xml <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <!-- Supress the warning about the assemblies we are putting in the task folder. --> <NoWarn>NU5100</NoWarn> <TargetFramework>netstandard2.0</TargetFramework> <Description>Package demonstrating how to integrate third party tools with Razor Class Libraries.</Description> <IsPackable>true</IsPackable> <IsShipping>true</IsShipping> <IncludeBuildOutput>false</IncludeBuildOutput> </PropertyGroup> <ItemGroup> <None Update="build\**" Pack="true" PackagePath="%(Identity)" /> <Content Include="_._" Pack="true" PackagePath="lib\netstandard2.0\_._" /> </ItemGroup> </Project> ```
/content/code_sandbox/src/ClientAssets/Microsoft.AspNetCore.ClientAssets/Microsoft.AspNetCore.ClientAssets.csproj
xml
2016-10-10T21:02:00
2024-08-13T18:02:26
AspLabs
aspnet/AspLabs
1,224
171
```xml <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>Form</class> <widget class="QWidget" name="Form"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>1227</width> <height>665</height> </rect> </property> <property name="windowTitle"> <string>Residuals</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="QTableView" name="tableView"/> </item> <item> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <widget class="QPushButton" name="calculateButton"> <property name="text"> <string>Calculate All Constraint Values</string> </property> </widget> </item> <item> <widget class="QPushButton" name="sortButton"> <property name="text"> <string>Sort</string> </property> </widget> </item> <item> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Qt.Orientation.Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </item> </layout> </widget> <resources/> <connections/> </ui> ```
/content/code_sandbox/pyomo/contrib/viewer/residual_table.ui
xml
2016-05-27T19:33:45
2024-08-16T08:09:25
pyomo
Pyomo/pyomo
1,945
361
```xml import { CommonModule } from "@angular/common"; import { Component, DestroyRef, OnInit } from "@angular/core"; import { takeUntilDestroyed } from "@angular/core/rxjs-interop"; import { FormBuilder, ReactiveFormsModule } from "@angular/forms"; import { firstValueFrom } from "rxjs"; import { JslibModule } from "@bitwarden/angular/jslib.module"; import { BadgeSettingsServiceAbstraction } from "@bitwarden/common/autofill/services/badge-settings.service"; import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service"; import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; import { MessagingService } from "@bitwarden/common/platform/abstractions/messaging.service"; import { ThemeType } from "@bitwarden/common/platform/enums"; import { ThemeStateService } from "@bitwarden/common/platform/theming/theme-state.service"; import { CheckboxModule } from "@bitwarden/components"; import { CardComponent } from "../../../../../../libs/components/src/card/card.component"; import { FormFieldModule } from "../../../../../../libs/components/src/form-field/form-field.module"; import { SelectModule } from "../../../../../../libs/components/src/select/select.module"; import { PopOutComponent } from "../../../platform/popup/components/pop-out.component"; import { PopupHeaderComponent } from "../../../platform/popup/layout/popup-header.component"; import { PopupPageComponent } from "../../../platform/popup/layout/popup-page.component"; @Component({ standalone: true, templateUrl: "./appearance-v2.component.html", imports: [ CommonModule, JslibModule, PopupPageComponent, PopupHeaderComponent, PopOutComponent, CardComponent, FormFieldModule, SelectModule, ReactiveFormsModule, CheckboxModule, ], }) export class AppearanceV2Component implements OnInit { appearanceForm = this.formBuilder.group({ enableFavicon: false, enableBadgeCounter: true, theme: ThemeType.System, }); /** Available theme options */ themeOptions: { name: string; value: ThemeType }[]; constructor( private messagingService: MessagingService, private domainSettingsService: DomainSettingsService, private badgeSettingsService: BadgeSettingsServiceAbstraction, private themeStateService: ThemeStateService, private formBuilder: FormBuilder, private destroyRef: DestroyRef, i18nService: I18nService, ) { this.themeOptions = [ { name: i18nService.t("systemDefault"), value: ThemeType.System }, { name: i18nService.t("light"), value: ThemeType.Light }, { name: i18nService.t("dark"), value: ThemeType.Dark }, { name: "Nord", value: ThemeType.Nord }, { name: i18nService.t("solarizedDark"), value: ThemeType.SolarizedDark }, ]; } async ngOnInit() { const enableFavicon = await firstValueFrom(this.domainSettingsService.showFavicons$); const enableBadgeCounter = await firstValueFrom(this.badgeSettingsService.enableBadgeCounter$); const theme = await firstValueFrom(this.themeStateService.selectedTheme$); // Set initial values for the form this.appearanceForm.setValue({ enableFavicon, enableBadgeCounter, theme, }); this.appearanceForm.controls.theme.valueChanges .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((newTheme) => { void this.saveTheme(newTheme); }); this.appearanceForm.controls.enableFavicon.valueChanges .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((enableFavicon) => { void this.updateFavicon(enableFavicon); }); this.appearanceForm.controls.enableBadgeCounter.valueChanges .pipe(takeUntilDestroyed(this.destroyRef)) .subscribe((enableBadgeCounter) => { void this.updateBadgeCounter(enableBadgeCounter); }); } async updateFavicon(enableFavicon: boolean) { await this.domainSettingsService.setShowFavicons(enableFavicon); } async updateBadgeCounter(enableBadgeCounter: boolean) { await this.badgeSettingsService.setEnableBadgeCounter(enableBadgeCounter); this.messagingService.send("bgUpdateContextMenu"); } async saveTheme(newTheme: ThemeType) { await this.themeStateService.setSelectedTheme(newTheme); } } ```
/content/code_sandbox/apps/browser/src/vault/popup/settings/appearance-v2.component.ts
xml
2016-03-09T23:14:01
2024-08-16T15:07:51
clients
bitwarden/clients
8,877
929
```xml import styled from "styled-components"; import { s } from "@shared/styles"; export const Emoji = styled.span` font-family: ${s("fontFamilyEmoji")}; width: 24px; height: 24px; `; ```
/content/code_sandbox/app/components/IconPicker/components/Emoji.tsx
xml
2016-05-22T21:31:47
2024-08-16T19:57:22
outline
outline/outline
26,751
51
```xml /** * @license * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ /** * CSS class names used in component. */ export const cssClasses = { INDETERMINATE_CLASS: 'mdc-circular-progress--indeterminate', CLOSED_CLASS: 'mdc-circular-progress--closed', }; /** * Attributes and selectors used in component. */ export const strings = { ARIA_HIDDEN: 'aria-hidden', ARIA_VALUENOW: 'aria-valuenow', DETERMINATE_CIRCLE_SELECTOR: '.mdc-circular-progress__determinate-circle', RADIUS: 'r', STROKE_DASHOFFSET: 'stroke-dashoffset', }; ```
/content/code_sandbox/packages/mdc-circular-progress/constants.ts
xml
2016-12-05T16:04:09
2024-08-16T15:42:22
material-components-web
material-components/material-components-web
17,119
354
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "path_to_url" [ <!ENTITY legal SYSTEM "legal.xml"> ]> <!--<?yelp:chunk-depth 4?> --> <!-- (Do not remove this comment block.) Version: 3.0 Last modified: Sep 8, 2010 Maintainers: Michael Vogt <mvo@ubuntu.com> Translators: (translators put your name and email here) --> <!-- =============Document Header ============================= --> <book id="index" lang="ug"> <!-- ============= Document Body ============================= --> <!-- ============= Introduction ============================== --> <bookinfo> <!-- please do not change the id; for translations, change lang to --> <!-- appropriate code --> <title>Ubuntu </title> <!-- translators: uncomment this: <copyright> <year>2000</year> <holder>ME-THE-TRANSLATOR (Latin translation)</holder> </copyright> --> <!-- An address can be added to the publisher information. If a role is not specified, the publisher/author is the same for all versions of the document. --> <!-- This file contains link to license for the documentation (GNU FDL), and other legal stuff such as "NO WARRANTY" statement. Please do not change any of this. --> <publisher> <publishername>Ubuntu Documentation Project</publishername> </publisher> &legal; <authorgroup> <author> <firstname>Michael</firstname> <surname>Vogt</surname> <email>mvo@ubuntu.com</email> </author> <author> <firstname>Matthew</firstname> <firstname>Paul</firstname> <surname>Thomas</surname> <email>mpt@ubuntu.com</email> </author> <author> <firstname>Andrew</firstname> <surname>Higginson</surname> <email>rugby471@gmail.com</email> </author> </authorgroup> <abstract> <para>How to install and remove software in Ubuntu.</para> </abstract> </bookinfo> <chapter id="introduction"> <title>What is Ubuntu Software Center?</title> <para> Ubuntu Software Center is a virtual catalog of thousands of free applications and other software to make your Ubuntu computer more useful. </para> <para> You can find software by category or by searching, and you can install an item with the click of a button. </para> <para> You can also examine which software is installed on the computer already, and remove anything you no longer need. </para> </chapter> <chapter id="installing"> <title>Installing software</title> <para> To install something with Ubuntu Software Center, you need administrator access and a working Internet connection. (If you set up Ubuntu on this computer yourself, you have administrator access automatically.) </para> <orderedlist> <listitem> <para> In the <guilabel>Get Software</guilabel> section, find the thing you want to install. If you already know its name, try typing the name in the search field. Or try searching for the type of program you want (like &#8220;spreadsheet&#8221;). Otherwise, browse the list of departments. </para> </listitem> <listitem> <para> Select the item in the list, and choose <guilabel>More Info</guilabel>. </para> </listitem> <listitem> <para> Choose <guilabel>Install</guilabel>. You may need to enter your Ubuntu password before the installation can begin. </para> </listitem> </orderedlist> <para> How long something takes to install depends on how large it is, and the speed of your computer and Internet connection. </para> <para> When the screen changes to say &#8220;Installed&#8221;, the software is ready to use. </para> <itemizedlist> <listitem><para><xref linkend="launching" endterm="launching-title"/></para></listitem> <listitem><para><xref linkend="missing" endterm="missing-title"/></para></listitem> </itemizedlist> </chapter> <chapter id="launching"> <title id="launching-title" >Using a program once it&#8217;s installed</title> <para> For most programs, once they are installed, you can launch them from the <guimenu>Applications</guimenu> menu. (Utilities for changing settings may appear inside <menuchoice><guimenu>System</guimenu> <guisubmenu>Preferences</guisubmenu></menuchoice> or <menuchoice><guimenu>System</guimenu> <guisubmenu>Administration</guisubmenu></menuchoice> instead). </para> <para> To find out where to launch a new program, navigate to the screen for that program in Ubuntu Software Center, if it is not still being displayed. The menu location should be displayed on that screen, below the colored bar. </para> <para> If you are using Ubuntu Netbook Edition, an application appears in the appropriate category on the home screen. </para> <para> Some items, such as media playback or Web browser plugins, do not appear in the menus. They are used automatically when Ubuntu needs them. For a Web browser plugin, you may need to close the browser and reopen it before the plugin will be used. </para> </chapter> <chapter id="removing"> <title id="removing-title">Removing software</title> <para> To remove software, you need administrator access. (If you set up Ubuntu on this computer yourself, you have administrator access automatically.) </para> <orderedlist> <listitem> <para> In the <guilabel>Installed Software</guilabel> section, find the item you want to remove. </para> </listitem> <listitem> <para> Select the item in the list, and choose <guilabel>Remove</guilabel>. You may need to enter your Ubuntu password. </para> </listitem> </orderedlist> <para> If a program is open when you remove it, usually it will stay open even after it is removed. As soon as you close it, it will no longer be available. </para> <itemizedlist> <listitem><para><xref linkend="metapackages" endterm="metapackages-title"/></para></listitem> </itemizedlist> </chapter> <chapter id="metapackages"> <title id="metapackages-title" >Why is it asking me to remove several programs together?</title> <para> Sometimes if you try to remove one item, Ubuntu Software Center will warn you that other items will be removed too. There are two main reasons this happens. </para> <itemizedlist> <listitem> <para> If you remove an application, any add-ons or plugins for that application usually will be removed too. </para> </listitem> <listitem> <para> Multiple applications are sometimes provided as a single package. If any of them are installed, all of them are installed. And if any of them are removed, all of them are removed. Ubuntu Software Center cannot remove them individually, because it has no instructions on how to separate them. </para> </listitem> </itemizedlist> <para> You can use the <guilabel>Main Menu</guilabel> settings to hide unwanted items without removing them from the computer. In Ubuntu, you can find <guilabel>Main Menu</guilabel> inside <menuchoice><guimenu>System</guimenu> <guisubmenu>Preferences</guisubmenu></menuchoice>. In Ubuntu Netbook Edition, it is in <menuchoice><guimenu>Settings</guimenu> <guisubmenu>Preferences</guisubmenu></menuchoice>. </para> <itemizedlist> <listitem> <para><ulink url="ghelp:user-guide?menu-editor" >Customizing the menu bar</ulink></para> </listitem> </itemizedlist> </chapter> <chapter id="canonical-maintained"> <title>What is &#8220;Canonical-maintained&#8221;?</title> <para> Some of the software available for Ubuntu is maintained by Canonical. Canonical engineers ensure that security fixes and other critical updates are provided for these programs. </para> <para> Other software is maintained by the Ubuntu developer community. Any updates are provided on a best-effort basis. </para> </chapter> <chapter id="canonical-partners"> <title>What is &#8220;Canonical Partners&#8221;?</title> <para> <guilabel>Canonical Partners</guilabel> shows software from vendors who have worked with Canonical to make their software available for Ubuntu. </para> <para> You can install this software in the same way as any other software in Ubuntu Software Center. </para> </chapter> <chapter id="commercial"> <title id="commercial-title">Do I need to pay anything?</title> <para> Most software in Ubuntu Software Center is free of charge. </para> <para> If something costs money, it has a <guilabel>Buy</guilabel> button instead of an <guilabel>Install</guilabel> button, and its price is shown on the screen for the individual item. </para> <para> To pay for commercial software, you need an Internet connection, and an Ubuntu Single Sign On account or Launchpad account. If you do not have an account, Ubuntu Software Center will help you register one. </para> </chapter> <chapter id="commercial-reinstalling"> <title id="commercial-reinstalling-title"> What if I paid for software and then lost it? </title> <para> If you accidentally removed software that you purchased, and you want it back, choose <menuchoice><guimenu>File</guimenu> <guimenuitem>Reinstall Previous Purchases</guimenuitem></menuchoice>. </para> <para> Once you sign in to the account that you used to buy the software, Ubuntu Software Center will display your purchases for reinstalling. </para> <para> This works even if you have reinstalled Ubuntu on the computer. </para> </chapter> <chapter id="missing"> <title id="missing-title" >What if a program I want isn&#8217;t available?</title> <para> First, check that <menuchoice><guimenu>View</guimenu> <guimenuitem>All Software</guimenuitem></menuchoice> is selected. </para> <para> If the software you want still isn&#8217;t there, but you know that it runs on Ubuntu, try contacting the original developers of the program to ask if they can help make it available. </para> <para> If a program is available for other operating systems but not for Ubuntu, let the developers know that you&#8217;re interested in running it on Ubuntu. </para> </chapter> <chapter id="bugs"> <title id="bugs-title" >What if a program doesn&#8217;t work?</title> <para> With tens of thousands of programs in Ubuntu Software Center, there&#8217;s always the chance that a few of them won&#8217;t work properly on your computer. </para> <para> If you are familiar with reporting bugs in software, you can help out by reporting the problem to the Ubuntu developers. Most programs have a <guimenuitem>Report a Problem</guimenuitem> item in their <guimenu>Help</guimenu> menu. </para> <para> Otherwise, look through Ubuntu Software Center for another program to do what you want. </para> <itemizedlist> <listitem><para><xref linkend="removing" endterm="removing-title"/></para></listitem> </itemizedlist> </chapter> </book> ```
/content/code_sandbox/help/ug/software-center.xml
xml
2016-08-08T17:54:58
2024-08-06T13:58:47
x-mario-center
fossasia/x-mario-center
1,487
2,880
```xml <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>ShaderDialogClass</class> <widget class="QWidget" name="ShaderDialogClass"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>430</width> <height>530</height> </rect> </property> <property name="windowTitle"> <string>Form</string> </property> <layout class="QVBoxLayout" name="verticalLayout_2"> <item> <widget class="QFrame" name="frame"> <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> <property name="frameShadow"> <enum>QFrame::Raised</enum> </property> <layout class="QVBoxLayout" name="verticalLayout"> <item> <widget class="QGroupBox" name="groupBox"> <property name="title"> <string>Radiance Scaling parameters</string> </property> <layout class="QVBoxLayout" name="verticalLayout_3"> <item> <layout class="QGridLayout" name="gridLayout"> <property name="horizontalSpacing"> <number>0</number> </property> <property name="verticalSpacing"> <number>2</number> </property> <item row="2" column="1"> <widget class="QComboBox" name="displayBox"> <item> <property name="text"> <string>Lambertian Radiance Scaling</string> </property> </item> <item> <property name="text"> <string>Lit Sphere Radiance Scaling</string> </property> </item> <item> <property name="text"> <string>Colored Descriptor</string> </property> </item> <item> <property name="text"> <string>Grey Descriptor</string> </property> </item> </widget> </item> <item row="3" column="1"> <widget class="QSlider" name="enSlider"> <property name="maximum"> <number>100</number> </property> <property name="value"> <number>50</number> </property> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item row="3" column="2"> <widget class="QLabel" name="enLabel"> <property name="layoutDirection"> <enum>Qt::LeftToRight</enum> </property> <property name="text"> <string>0.5</string> </property> <property name="alignment"> <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> </property> </widget> </item> <item row="2" column="0"> <widget class="QLabel" name="label"> <property name="text"> <string>Display Mode:</string> </property> </widget> </item> <item row="0" column="0"> <widget class="QCheckBox" name="enableCheckBox"> <property name="layoutDirection"> <enum>Qt::LeftToRight</enum> </property> <property name="text"> <string>Enable Radiance Scaling</string> </property> <property name="checked"> <bool>true</bool> </property> </widget> </item> <item row="3" column="0"> <widget class="QLabel" name="label_2"> <property name="text"> <string>Enhancement:</string> </property> </widget> </item> <item row="0" column="1"> <widget class="QCheckBox" name="invertCheckBox"> <property name="text"> <string>Invert Effect</string> </property> </widget> </item> <item row="0" column="2"> <widget class="QCheckBox" name="doubleSideCheckBox"> <property name="text"> <string>Double side</string> </property> </widget> </item> </layout> </item> </layout> </widget> </item> <item> <layout class="QGridLayout" name="gridLayout_3"> <item row="2" column="0"> <widget class="QLabel" name="litLabel1"> <property name="text"> <string>Convexities</string> </property> <property name="alignment"> <set>Qt::AlignHCenter|Qt::AlignTop</set> </property> </widget> </item> <item row="2" column="1"> <widget class="QLabel" name="litLabel2"> <property name="text"> <string>Concavities</string> </property> <property name="alignment"> <set>Qt::AlignHCenter|Qt::AlignTop</set> </property> </widget> </item> <item row="0" column="0"> <widget class="QCheckBox" name="litCheckBox"> <property name="layoutDirection"> <enum>Qt::LeftToRight</enum> </property> <property name="text"> <string>Use 2 Lit Spheres</string> </property> <property name="checked"> <bool>true</bool> </property> </widget> </item> <item row="3" column="0"> <widget class="QPushButton" name="loadButton1"> <property name="text"> <string>Load</string> </property> </widget> </item> <item row="3" column="1"> <widget class="QPushButton" name="loadButton2"> <property name="text"> <string>Load</string> </property> </widget> </item> <item row="1" column="0"> <widget class="QLabel" name="litIcon1"> <property name="text"> <string/> </property> <property name="alignment"> <set>Qt::AlignCenter</set> </property> </widget> </item> <item row="1" column="1"> <widget class="QLabel" name="litIcon2"> <property name="text"> <string/> </property> <property name="alignment"> <set>Qt::AlignCenter</set> </property> </widget> </item> </layout> </item> <item> <layout class="QHBoxLayout" name="horizontalLayout"> <item> <widget class="QLabel" name="transitionTitle"> <property name="text"> <string>Transition:</string> </property> </widget> </item> <item> <widget class="QSlider" name="transitionSlider"> <property name="maximum"> <number>100</number> </property> <property name="value"> <number>50</number> </property> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> </widget> </item> <item> <widget class="QLabel" name="transitionLabel"> <property name="text"> <string>0.5</string> </property> </widget> </item> </layout> </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>40</height> </size> </property> </spacer> </item> </layout> </widget> </item> </layout> </widget> <resources/> <connections/> </ui> ```
/content/code_sandbox/src/meshlabplugins/render_radiance_scaling/shaderDialog.ui
xml
2016-11-07T00:03:21
2024-08-16T16:55:49
meshlab
cnr-isti-vclab/meshlab
4,633
1,835
```xml <?xml version="1.0"?> <project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <modelVersion>4.0.0</modelVersion> <groupId>com.jsoniter</groupId> <version>0.9.21-SNAPSHOT</version> <artifactId>jsoniter-demo</artifactId> <name>json iterator demo</name> <description>jsoniter (json-iterator) is fast and flexible JSON parser available in Java and Go</description> <url>path_to_url <packaging>jar</packaging> <licenses> <license> <url>path_to_url </license> </licenses> <developers> <developer> <name>Tao Wen</name> <email>taowen@gmail.com</email> <organization>jsoniter</organization> <organizationUrl>path_to_url </developer> </developers> <scm> <connection>scm:git:git://github.com/json-iterator/java.git</connection> <developerConnection>scm:git:ssh://github.com:json-iterator/java.git</developerConnection> <url>path_to_url </scm> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.12</version> </dependency> <dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> <version>3.21.0-GA</version> </dependency> <dependency> <groupId>com.jsoniter</groupId> <artifactId>jsoniter</artifactId> <version>0.9.21-SNAPSHOT</version> </dependency> <dependency> <groupId>org.openjdk.jmh</groupId> <artifactId>jmh-core</artifactId> <version>1.17.3</version> </dependency> <dependency> <groupId>org.openjdk.jmh</groupId> <artifactId>jmh-generator-annprocess</artifactId> <version>1.17.3</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.8.5</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.module</groupId> <artifactId>jackson-module-afterburner</artifactId> <version>2.8.5</version> </dependency> <dependency> <groupId>com.dslplatform</groupId> <artifactId>dsl-json</artifactId> <version>1.3.2</version> </dependency> <dependency> <groupId>org.apache.thrift</groupId> <artifactId>libthrift</artifactId> <version>0.9.1</version> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> <version>1.7.22</version> </dependency> <!--<dependency>--> <!--<groupId>com.dslplatform</groupId>--> <!--<artifactId>dsl-json-processor</artifactId>--> <!--<version>1.4.1</version>--> <!--</dependency>--> <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>1.2.22</version> </dependency> <dependency> <groupId>com.squareup.moshi</groupId> <artifactId>moshi</artifactId> <version>1.3.1</version> </dependency> <dependency> <groupId>com.google.protobuf</groupId> <artifactId>protobuf-java</artifactId> <version>3.2.0rc2</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.6.0</version> <configuration> <source>1.6</source> <target>1.6</target> <encoding>UTF-8</encoding> </configuration> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.5.0</version> <executions> <execution> <id>static-codegen</id> <phase>compile</phase> <goals> <goal>exec</goal> </goals> <configuration> <executable>java</executable> <workingDirectory>${project.build.sourceDirectory}</workingDirectory> <arguments> <argument>-classpath</argument> <classpath/> <argument>com.jsoniter.static_codegen.StaticCodegen</argument> <argument>com.jsoniter.demo.DemoCodegenConfig</argument> </arguments> </configuration> </execution> </executions> </plugin> </plugins> </build> <distributionManagement> <snapshotRepository> <id>ossrh</id> <url>path_to_url </snapshotRepository> </distributionManagement> </project> ```
/content/code_sandbox/demo/pom.xml
xml
2016-12-05T12:15:21
2024-08-12T16:59:30
java
json-iterator/java
1,500
1,228
```xml <test> <!-- ORDER BY key is prefix of MergeTree sorting key --> <query>SELECT CounterID, EventDate FROM hits_10m_single ORDER BY CounterID SETTINGS optimize_read_in_order=1 FORMAT Null</query> <query>SELECT CounterID, EventDate FROM hits_10m_single ORDER BY CounterID SETTINGS optimize_read_in_order=0 FORMAT Null</query> <!-- MergeTree sorting key is prefix of ORDER BY key --> <query>SELECT CounterID, EventTime FROM hits_10m_single ORDER BY CounterID, EventTime SETTINGS optimize_read_in_order=1 format Null</query> <query>SELECT CounterID, EventTime FROM hits_10m_single ORDER BY CounterID, EventTime SETTINGS optimize_read_in_order=0 format Null</query> <!-- sorting step getting sort description from subquery --> <query>SELECT * FROM (SELECT CounterID, EventDate FROM hits_10m_single) ORDER BY CounterID SETTINGS optimize_read_in_order=1 FORMAT Null</query> <query>SELECT * FROM (SELECT CounterID, EventDate FROM hits_10m_single) ORDER BY CounterID SETTINGS optimize_read_in_order=0 FORMAT Null</query> <query>SELECT * FROM (SELECT CounterID, EventDate FROM hits_10m_single ORDER BY CounterID, EventDate) ORDER BY CounterID SETTINGS optimize_duplicate_order_by_and_distinct=1 FORMAT Null</query> <query>SELECT * FROM (SELECT CounterID, EventDate FROM hits_10m_single ORDER BY CounterID, EventDate) ORDER BY CounterID SETTINGS optimize_duplicate_order_by_and_distinct=0 FORMAT Null</query> <query>SELECT * FROM (SELECT CounterID, EventDate FROM hits_10m_single ORDER BY CounterID) ORDER BY CounterID, EventDate SETTINGS optimize_duplicate_order_by_and_distinct=1 FORMAT Null</query> <query>SELECT * FROM (SELECT CounterID, EventDate FROM hits_10m_single ORDER BY CounterID) ORDER BY CounterID, EventDate SETTINGS optimize_duplicate_order_by_and_distinct=0 FORMAT Null</query> </test> ```
/content/code_sandbox/tests/performance/optimize_sorting_for_input_stream.xml
xml
2016-06-02T08:28:18
2024-08-16T18:39:33
ClickHouse
ClickHouse/ClickHouse
36,234
440
```xml // See LICENSE.txt for license information. /* eslint-disable max-lines */ import {DeviceEventEmitter} from 'react-native'; import {Navigation} from '@constants'; import {SYSTEM_IDENTIFIERS} from '@constants/database'; import DatabaseManager from '@database/manager'; import {getMyChannel} from '@queries/servers/channel'; import {getCommonSystemValues, getTeamHistory} from '@queries/servers/system'; import {getTeamChannelHistory} from '@queries/servers/team'; import {dismissAllModalsAndPopToRoot, dismissAllModalsAndPopToScreen} from '@screens/navigation'; import { switchToChannel, removeCurrentUserFromChannel, setChannelDeleteAt, selectAllMyChannelIds, markChannelAsUnread, resetMessageCount, storeMyChannelsForTeam, updateMyChannelFromWebsocket, updateChannelInfoFromChannel, updateLastPostAt, updateChannelsDisplayName, showUnreadChannelsOnly, updateDmGmDisplayName, } from './channel'; import type {ChannelModel, MyChannelModel, SystemModel} from '@app/database/models/server'; import type ServerDataOperator from '@database/operator/server_data_operator'; import type {Database} from '@nozbe/watermelondb'; let mockIsTablet: jest.Mock; const now = new Date('2020-01-01').getTime(); jest.mock('@screens/navigation', () => { const original = jest.requireActual('@screens/navigation'); return { ...original, dismissAllModalsAndPopToScreen: jest.fn(), dismissAllModalsAndPopToRoot: jest.fn(), }; }); jest.mock('@utils/helpers', () => { const original = jest.requireActual('@utils/helpers'); mockIsTablet = jest.fn(() => false); return { ...original, isTablet: mockIsTablet, }; }); const queryDatabaseValues = async (database: Database, teamId: string, channelId: string) => ({ systemValues: await getCommonSystemValues(database), teamHistory: await getTeamHistory(database), channelHistory: await getTeamChannelHistory(database, teamId), member: await getMyChannel(database, channelId), }); describe('switchToChannel', () => { let operator: ServerDataOperator; let spyNow: jest.SpyInstance; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const team: Team = { id: teamId, } as Team; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, } as Channel; const channelMember: ChannelMembership = { id: 'id', channel_id: channelId, msg_count: 0, } as ChannelMembership; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; spyNow = jest.spyOn(Date, 'now').mockImplementation(() => now); }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); spyNow.mockRestore(); }); it('handle not found database', async () => { const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {error} = await switchToChannel('foo', 'channelId'); listener.remove(); expect(error).toBeTruthy(); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(0); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('handle no member', async () => { const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, 'channelId'); listener.remove(); expect(error).toBeUndefined(); expect(models?.length).toBe(0); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(systemValues.currentTeamId).toBe(''); expect(systemValues.currentChannelId).toBe(''); expect(teamHistory.length).toBe(0); expect(channelHistory.length).toBe(0); expect(member?.lastViewedAt).toBe(undefined); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(0); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('switch to current channel', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: teamId}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: channelId}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(2); // Viewed at, lastUnread expect(systemValues.currentTeamId).toBe(teamId); expect(systemValues.currentChannelId).toBe(channelId); expect(teamHistory.length).toBe(0); expect(channelHistory.length).toBe(0); expect(member?.lastViewedAt).toBe(now); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(1); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('switch to different channel in same team', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: teamId}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: 'currentChannelId'}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(4); // Viewed at, channel history and currentChannelId expect(systemValues.currentTeamId).toBe(teamId); expect(systemValues.currentChannelId).toBe(channelId); expect(teamHistory.length).toBe(0); expect(channelHistory.length).toBe(1); expect(channelHistory[0]).toBe(channelId); expect(member?.lastViewedAt).toBe(now); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(1); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('switch to different channel in different team', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: 'currentTeamId'}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: 'currentChannelId'}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId, teamId); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(6); // Viewed at, channel history, team history, currentTeamId and currentChannelId expect(systemValues.currentTeamId).toBe(teamId); expect(systemValues.currentChannelId).toBe(channelId); expect(teamHistory.length).toBe(1); expect(teamHistory[0]).toBe(teamId); expect(channelHistory.length).toBe(1); expect(channelHistory[0]).toBe(channelId); expect(member?.lastViewedAt).toBe(now); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(1); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('switch to same channel in different team', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); const tChannel = {...channel, team_id: ''}; await operator.handleChannel({channels: [tChannel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [tChannel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: 'currentTeamId'}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: channelId}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId, teamId); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(5); // Viewed at, channel history, team history and currentTeamId, lastUnread expect(systemValues.currentTeamId).toBe(teamId); expect(systemValues.currentChannelId).toBe(channelId); expect(teamHistory.length).toBe(1); expect(teamHistory[0]).toBe(teamId); expect(channelHistory.length).toBe(1); expect(channelHistory[0]).toBe(channelId); expect(member?.lastViewedAt).toBe(now); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(1); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('switch to dm channel in different team', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); const tChannel = {...channel, team_id: ''}; await operator.handleChannel({channels: [tChannel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [tChannel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: 'currentTeamId'}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: 'currentChannelId'}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId, teamId); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(6); // Viewed at, channel history, team history, currentTeamId and currentChannelId, lastUnread expect(systemValues.currentTeamId).toBe(teamId); expect(systemValues.currentChannelId).toBe(channelId); expect(teamHistory.length).toBe(1); expect(teamHistory[0]).toBe(teamId); expect(channelHistory.length).toBe(1); expect(channelHistory[0]).toBe(channelId); expect(member?.lastViewedAt).toBe(now); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(1); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('switch to a channel from different team without passing the teamId', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: 'currentTeamId'}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: 'currentChannelId'}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(6); // Viewed at, channel history, team history, currentTeamId and currentChannelId, lastUnread expect(systemValues.currentTeamId).toBe(teamId); expect(systemValues.currentChannelId).toBe(channelId); expect(teamHistory.length).toBe(1); expect(teamHistory[0]).toBe(teamId); expect(channelHistory.length).toBe(1); expect(channelHistory[0]).toBe(channelId); expect(member?.lastViewedAt).toBe(now); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(1); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('switch to a channel from the same team without passing a teamId', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: teamId}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: 'currentChannelId'}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(4); // Viewed at, channel history and currentChannelId, lastUnread expect(systemValues.currentTeamId).toBe(teamId); expect(systemValues.currentChannelId).toBe(channelId); expect(teamHistory.length).toBe(0); expect(channelHistory.length).toBe(1); expect(channelHistory[0]).toBe(channelId); expect(member?.lastViewedAt).toBe(now); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(1); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('switch to a DM without passing the teamId', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); const tChannel = {...channel, team_id: ''}; await operator.handleChannel({channels: [tChannel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [tChannel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: teamId}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: 'currentChannelId'}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(4); // Viewed at, channel history and currentChannelId, lastUnread expect(systemValues.currentTeamId).toBe(teamId); expect(systemValues.currentChannelId).toBe(channelId); expect(teamHistory.length).toBe(0); expect(channelHistory.length).toBe(1); expect(channelHistory[0]).toBe(channelId); expect(member?.lastViewedAt).toBe(now); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(1); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('switch to a channel passing a wrong teamId', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: 'currentTeamId'}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: 'currentChannelId'}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId, 'someTeamId'); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(6); // Viewed at, channel history, team history, currentTeamId and currentChannelId, lastUnread expect(systemValues.currentTeamId).toBe(teamId); expect(systemValues.currentChannelId).toBe(channelId); expect(teamHistory.length).toBe(1); expect(teamHistory[0]).toBe(teamId); expect(channelHistory.length).toBe(1); expect(channelHistory[0]).toBe(channelId); expect(member?.lastViewedAt).toBe(now); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(1); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('switch to a DM passing a non-existing teamId', async () => { const currentTeamId = 'ctid'; const currentChannelId = 'ccid'; await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); const tChannel = {...channel, team_id: ''}; await operator.handleChannel({channels: [tChannel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [tChannel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: currentTeamId}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: currentChannelId}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {error} = await switchToChannel(serverUrl, channelId, 'someTeamId'); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeTruthy(); expect(systemValues.currentTeamId).toBe(currentTeamId); expect(systemValues.currentChannelId).toBe(currentChannelId); expect(teamHistory.length).toBe(0); expect(channelHistory.length).toBe(0); expect(member?.lastViewedAt).toBe(0); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(0); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('prepare records only does not change the database', async () => { const currentTeamId = 'ctid'; const currentChannelId = 'ccid'; await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: currentTeamId}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: currentChannelId}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId, teamId, false, true); for (const model of models!) { model.cancelPrepareUpdate(); } listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(6); // Viewed at, channel history, team history, currentTeamId and currentChannelId, lastunread expect(systemValues.currentTeamId).toBe(currentTeamId); expect(systemValues.currentChannelId).toBe(currentChannelId); expect(teamHistory.length).toBe(0); expect(channelHistory.length).toBe(0); expect(member?.lastViewedAt).toBe(0); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(1); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(0); expect(listenerCallback).toHaveBeenCalledTimes(0); }); it('test behaviour when it is a tablet', async () => { mockIsTablet.mockImplementationOnce(() => true); await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: 'currentTeamId'}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: 'currentChannelId'}], prepareRecordsOnly: false}); const listenerCallback = jest.fn(); const listener = DeviceEventEmitter.addListener(Navigation.NAVIGATION_HOME, listenerCallback); const {models, error} = await switchToChannel(serverUrl, channelId, teamId); listener.remove(); const {systemValues, teamHistory, channelHistory, member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(models?.length).toBe(6); // Viewed at, channel history, team history, currentTeamId and currentChannelId, lastUnread expect(systemValues.currentTeamId).toBe(teamId); expect(systemValues.currentChannelId).toBe(channelId); expect(teamHistory.length).toBe(1); expect(teamHistory[0]).toBe(teamId); expect(channelHistory.length).toBe(1); expect(channelHistory[0]).toBe(channelId); expect(member?.lastViewedAt).toBe(now); expect(dismissAllModalsAndPopToScreen).toHaveBeenCalledTimes(0); expect(dismissAllModalsAndPopToRoot).toHaveBeenCalledTimes(1); expect(listenerCallback).toHaveBeenCalledTimes(1); }); }); describe('removeCurrentUserFromChannel', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const team: Team = { id: teamId, } as Team; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, } as Channel; const channelMember: ChannelMembership = { id: 'id', channel_id: channelId, msg_count: 0, } as ChannelMembership; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const {error} = await removeCurrentUserFromChannel('foo', 'channelId'); expect(error).toBeTruthy(); }); it('handle no member', async () => { const {models, error} = await removeCurrentUserFromChannel(serverUrl, 'channelId'); expect(error).toBeUndefined(); expect(models?.length).toBe(0); }); it('handle no channel', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: teamId}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: channelId}], prepareRecordsOnly: false}); const {models, error} = await removeCurrentUserFromChannel(serverUrl, channelId); expect(error).toBeTruthy(); expect(models).toBeUndefined(); }); it('remove user from current channel', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_TEAM_ID, value: teamId}, {id: SYSTEM_IDENTIFIERS.CURRENT_CHANNEL_ID, value: channelId}], prepareRecordsOnly: false}); const {models, error} = await removeCurrentUserFromChannel(serverUrl, channelId); const {member} = await queryDatabaseValues(operator.database, teamId, channelId); expect(error).toBeUndefined(); expect(member).toBeUndefined(); expect(models?.length).toBe(2); // Deleted my channel and channel }); }); describe('setChannelDeleteAt', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, delete_at: 0, } as Channel; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const {error} = await setChannelDeleteAt('foo', channelId, 0); expect(error).toBeTruthy(); }); it('handle no channel', async () => { const {models, error} = await setChannelDeleteAt(serverUrl, channelId, 0); expect(error).toBeDefined(); expect(error).toBe(`channel with id ${channelId} not found`); expect(models).toBeUndefined(); }); it('set channel delete at', async () => { await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); const {models, error} = await setChannelDeleteAt(serverUrl, channelId, 123); expect(error).toBeUndefined(); expect(models?.length).toBe(1); // Deleted channel expect(models![0].deleteAt).toBe(123); }); }); describe('selectAllMyChannelIds', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, delete_at: 0, } as Channel; const channelMember: ChannelMembership = { id: 'id', channel_id: channelId, msg_count: 0, } as ChannelMembership; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const result = await selectAllMyChannelIds('foo'); expect(result.length).toBe(0); }); it('handle no my channels', async () => { const result = await selectAllMyChannelIds(serverUrl); expect(result.length).toBe(0); }); it('select my channels', async () => { await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); const result = await selectAllMyChannelIds(serverUrl); expect(result.length).toBe(1); // My channel expect(result[0]).toBe(channelId); }); }); describe('markChannelAsUnread', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, delete_at: 0, } as Channel; const channelMember: ChannelMembership = { id: 'id', channel_id: channelId, msg_count: 0, } as ChannelMembership; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const {member, error} = await markChannelAsUnread('foo', channelId, 10, 1, 123, false); expect(error).toBeTruthy(); expect(member).toBeUndefined(); }); it('handle no member', async () => { const {member, error} = await markChannelAsUnread(serverUrl, channelId, 10, 1, 123, false); expect(error).toBe('not a member'); expect(member).toBeUndefined(); }); it('mark channel as unread', async () => { await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); const {member, error} = await markChannelAsUnread(serverUrl, channelId, 10, 1, 123, false); expect(error).toBeUndefined(); expect(member).toBeDefined(); expect(member?.viewedAt).toBe(122); expect(member?.lastViewedAt).toBe(122); expect(member?.messageCount).toBe(10); expect(member?.mentionsCount).toBe(1); }); }); describe('resetMessageCount', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 10, delete_at: 0, } as Channel; const channelMember: ChannelMembership = { id: 'id', channel_id: channelId, msg_count: 10, } as ChannelMembership; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const result = await resetMessageCount('foo', channelId); expect((result as { error: unknown }).error).toBeDefined(); }); it('handle no member', async () => { const result = await resetMessageCount(serverUrl, channelId); expect((result as { error: unknown }).error).toBe('not a member'); }); it('reset message count', async () => { await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); const member = await resetMessageCount(serverUrl, channelId); expect((member as { error: unknown }).error).toBeUndefined(); expect(member).toBeDefined(); expect((member as MyChannelModel).messageCount).toBe(0); }); }); describe('storeMyChannelsForTeam', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const team: Team = { id: teamId, } as Team; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, delete_at: 0, } as Channel; const channelMember: ChannelMembership = { id: 'id', user_id: 'userid', channel_id: channelId, msg_count: 0, } as ChannelMembership; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const {models, error} = await storeMyChannelsForTeam('foo', teamId, [channel], [channelMember], false, false); expect(models).toBeUndefined(); expect(error).toBeTruthy(); }); it('handle no member', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_USER_ID, value: 'userid'}], prepareRecordsOnly: false}); const {models, error} = await storeMyChannelsForTeam(serverUrl, teamId, [], [], false, false); expect(error).toBeUndefined(); expect(models).toBeDefined(); expect(models!.length).toBe(0); }); it('store my channels for team', async () => { await operator.handleTeam({teams: [team], prepareRecordsOnly: false}); const {models: prepModels, error: prepError} = await storeMyChannelsForTeam(serverUrl, teamId, [channel], [channelMember], true, false); expect(prepError).toBeUndefined(); expect(prepModels).toBeDefined(); expect(prepModels!.length).toBe(5); // Channel, channel info, member, settings and my channel const {models, error} = await storeMyChannelsForTeam(serverUrl, teamId, [channel], [channelMember], false, false); expect(error).toBeUndefined(); expect(models).toBeDefined(); expect(models!.length).toBe(5); }); }); describe('updateMyChannelFromWebsocket', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, delete_at: 0, } as Channel; const channelMember: ChannelMembership = { id: 'id', user_id: 'userid', channel_id: channelId, msg_count: 0, roles: '', } as ChannelMembership; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const {model, error} = await updateMyChannelFromWebsocket('foo', channelMember, false); expect(model).toBeUndefined(); expect(error).toBeTruthy(); }); it('update my channel from websocket', async () => { await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); const {model, error} = await updateMyChannelFromWebsocket(serverUrl, {...channelMember, roles: 'channel_user'}, false); expect(error).toBeUndefined(); expect(model).toBeDefined(); expect(model?.roles).toBe('channel_user'); }); }); describe('updateChannelInfoFromChannel', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, delete_at: 0, } as Channel; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const {model, error} = await updateChannelInfoFromChannel('foo', channel, false); expect(model).toBeUndefined(); expect(error).toBeTruthy(); }); it('update channel info from channel', async () => { await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); const {model, error} = await updateChannelInfoFromChannel(serverUrl, {...channel, header: 'newheader'}, false); expect(error).toBeUndefined(); expect(model).toBeDefined(); expect(model?.length).toBe(1); expect(model![0].header).toBe('newheader'); }); }); describe('updateLastPostAt', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, delete_at: 0, } as Channel; const channelMember: ChannelMembership = { id: 'id', user_id: 'userid', channel_id: channelId, msg_count: 0, roles: '', } as ChannelMembership; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const {member, error} = await updateLastPostAt('foo', channelId, 123, false); expect(member).toBeUndefined(); expect(error).toBeTruthy(); }); it('handle no member', async () => { const {member, error} = await updateLastPostAt(serverUrl, channelId, 123, false); expect(error).toBeDefined(); expect(error).toBe('not a member'); expect(member).toBeUndefined(); }); it('update last post at', async () => { await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); const {member, error} = await updateLastPostAt(serverUrl, channelId, 123, false); expect(error).toBeUndefined(); expect(member).toBeDefined(); expect(member?.lastPostAt).toBe(123); }); }); describe('updateChannelsDisplayName', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const dmChannel: Channel = { id: channelId, name: 'userid__userid2', display_name: '', team_id: '', total_msg_count: 0, delete_at: 0, type: 'D', } as Channel; const dmChannelMember: ChannelMembership = { id: 'id', user_id: 'userid', channel_id: dmChannel.id, msg_count: 0, roles: '', } as ChannelMembership; const gmChannel: Channel = { id: 'id2', name: 'name', display_name: '', team_id: '', total_msg_count: 0, delete_at: 0, type: 'G', } as Channel; const gmChannelMember: ChannelMembership = { id: 'id', user_id: 'userid', channel_id: gmChannel.id, msg_count: 0, roles: '', } as ChannelMembership; const user: UserProfile = { id: 'userid', username: 'username', roles: '', } as UserProfile; const user2: UserProfile = { id: 'userid2', username: 'username2', first_name: 'first', last_name: 'last', roles: '', } as UserProfile; const user3: UserProfile = { id: 'userid3', username: 'username3', first_name: 'first', last_name: 'last', roles: '', } as UserProfile; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const {models, error} = await updateChannelsDisplayName('foo', [], [], false); expect(models).toBeUndefined(); expect(error).toBeTruthy(); }); it('handle no currnet user', async () => { const {models, error} = await updateChannelsDisplayName(serverUrl, [], [], false); expect(models).toBeUndefined(); expect(error).toBeUndefined(); }); it('update channels display name', async () => { const channelModels = await operator.handleChannel({channels: [dmChannel, gmChannel], prepareRecordsOnly: false}); await operator.handleUsers({users: [user, user2, user3], prepareRecordsOnly: false}); await operator.handleChannelMembership({channelMemberships: [{...gmChannelMember, user_id: user2.id}, {...gmChannelMember, user_id: user3.id}], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [dmChannel, gmChannel], myChannels: [dmChannelMember, gmChannelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_USER_ID, value: user.id}], prepareRecordsOnly: false}); const {models, error} = await updateChannelsDisplayName(serverUrl, channelModels, [user, user2], false); expect(error).toBeUndefined(); expect(models).toBeDefined(); expect(models?.length).toBe(2); expect((models![0] as ChannelModel).displayName).toBe(user2.username); expect((models![1] as ChannelModel).displayName).toBe(`${user2.username}, ${user3.username}`); }); }); describe('showUnreadChannelsOnly', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const teamId = 'tId1'; const channel: Channel = { id: channelId, team_id: teamId, total_msg_count: 0, delete_at: 0, } as Channel; const channelMember: ChannelMembership = { id: 'id', user_id: 'userid', channel_id: channelId, msg_count: 0, roles: '', } as ChannelMembership; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const result = await showUnreadChannelsOnly('foo', true); expect((result as { error: unknown}).error).toBeTruthy(); }); it('show unread channels only', async () => { await operator.handleChannel({channels: [channel], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [channel], myChannels: [channelMember], prepareRecordsOnly: false}); const result = await showUnreadChannelsOnly(serverUrl, true); expect((result as { error: unknown}).error).toBeUndefined(); const models = (result as SystemModel[]); expect(models).toBeDefined(); expect(models?.length).toBe(1); expect(models![0].id).toBe(SYSTEM_IDENTIFIERS.ONLY_UNREADS); expect(models![0].value).toBe(true); }); }); describe('updateDmGmDisplayName', () => { let operator: ServerDataOperator; const serverUrl = 'baseHandler.test.com'; const channelId = 'id1'; const dmChannel: Channel = { id: channelId, name: 'userid__userid2', display_name: '', team_id: '', total_msg_count: 0, delete_at: 0, type: 'D', } as Channel; const dmChannelMember: ChannelMembership = { id: 'id', user_id: 'userid', channel_id: dmChannel.id, msg_count: 0, roles: '', } as ChannelMembership; const gmChannel: Channel = { id: 'id2', name: 'name', display_name: '', team_id: '', total_msg_count: 0, delete_at: 0, type: 'G', } as Channel; const gmChannelMember: ChannelMembership = { id: 'id', user_id: 'userid', channel_id: gmChannel.id, msg_count: 0, roles: '', } as ChannelMembership; const user: UserProfile = { id: 'userid', username: 'username', roles: '', } as UserProfile; const user2: UserProfile = { id: 'userid2', username: 'username2', first_name: 'first', last_name: 'last', roles: '', } as UserProfile; const user3: UserProfile = { id: 'userid3', username: 'username3', first_name: 'first', last_name: 'last', roles: '', } as UserProfile; beforeEach(async () => { await DatabaseManager.init([serverUrl]); operator = DatabaseManager.serverDatabases[serverUrl]!.operator; }); afterEach(async () => { await DatabaseManager.destroyServerDatabase(serverUrl); }); it('handle not found database', async () => { const {channels, error} = await updateDmGmDisplayName('foo'); expect(channels).toBeUndefined(); expect(error).toBeTruthy(); }); it('handle no currnet user', async () => { const {channels, error} = await updateDmGmDisplayName(serverUrl); expect(channels).toBeUndefined(); expect(error).toBeDefined(); expect(error).toBe('The current user id could not be retrieved from the database'); }); it('update dm gm display name', async () => { await operator.handleChannel({channels: [dmChannel, gmChannel], prepareRecordsOnly: false}); await operator.handleUsers({users: [user, user2, user3], prepareRecordsOnly: false}); await operator.handleChannelMembership({channelMemberships: [gmChannelMember, dmChannelMember, {...gmChannelMember, user_id: user2.id}, {...gmChannelMember, user_id: user3.id}], prepareRecordsOnly: false}); await operator.handleMyChannel({channels: [dmChannel, gmChannel], myChannels: [dmChannelMember, gmChannelMember], prepareRecordsOnly: false}); await operator.handleSystem({systems: [{id: SYSTEM_IDENTIFIERS.CURRENT_USER_ID, value: user.id}], prepareRecordsOnly: false}); const {channels, error} = await updateDmGmDisplayName(serverUrl); expect(error).toBeUndefined(); expect(channels).toBeDefined(); expect(channels?.length).toBe(2); expect((channels![0] as ChannelModel).displayName).toBe(user2.username); expect((channels![1] as ChannelModel).displayName).toBe(`${user2.username}, ${user3.username}`); }); }); ```
/content/code_sandbox/app/actions/local/channel.test.ts
xml
2016-10-07T16:52:32
2024-08-16T12:08:38
mattermost-mobile
mattermost/mattermost-mobile
2,155
10,805
```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. --> <merge xmlns:android="path_to_url" xmlns:tools="path_to_url"> <ProgressBar android:id="@+id/progress_bar" style="@android:style/Widget.Holo.ProgressBar" android:layout_width="32dp" android:layout_height="32dp" android:visibility="gone" tools:visibility="invisible"/> <TextView android:id="@+id/tv_load_more_message" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_vertical" android:textColor="@color/support_recycler_color_text_gray" android:visibility="gone" tools:text="Loading..." tools:visibility="invisible"/> </merge> ```
/content/code_sandbox/support/src/main/res/layout/support_recycler_view_load_more.xml
xml
2016-08-03T15:43:34
2024-08-14T01:11:22
SwipeRecyclerView
yanzhenjie/SwipeRecyclerView
5,605
208
```xml <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>AboutDialog</class> <widget class="QDialog" name="AboutDialog"> <property name="windowModality"> <enum>Qt::WindowModal</enum> </property> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>520</width> <height>310</height> </rect> </property> <property name="sizePolicy"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> <width>520</width> <height>310</height> </size> </property> <property name="maximumSize"> <size> <width>520</width> <height>310</height> </size> </property> <property name="baseSize"> <size> <width>520</width> <height>310</height> </size> </property> <property name="contextMenuPolicy"> <enum>Qt::NoContextMenu</enum> </property> <property name="windowTitle"> <string>About the Application</string> </property> <property name="windowIcon"> <iconset> <normaloff>../img/logo/polychromatic.svg</normaloff>../img/logo/polychromatic.svg</iconset> </property> <property name="modal"> <bool>true</bool> </property> <widget class="QLabel" name="AppIcon"> <property name="geometry"> <rect> <x>10</x> <y>10</y> <width>75</width> <height>75</height> </rect> </property> <property name="text"> <string notr="true"/> </property> <property name="scaledContents"> <bool>true</bool> </property> </widget> <widget class="QPushButton" name="Close"> <property name="geometry"> <rect> <x>420</x> <y>270</y> <width>91</width> <height>31</height> </rect> </property> <property name="text"> <string>Close</string> </property> <property name="icon"> <iconset theme="dialog-close"> <normaloff>.</normaloff>.</iconset> </property> <property name="default"> <bool>true</bool> </property> </widget> <widget class="QTabWidget" name="AboutTabs"> <property name="geometry"> <rect> <x>100</x> <y>90</y> <width>411</width> <height>171</height> </rect> </property> <property name="tabShape"> <enum>QTabWidget::Rounded</enum> </property> <property name="currentIndex"> <number>0</number> </property> <widget class="QWidget" name="TabVersion"> <attribute name="title"> <string extracomment="Column header to view the application's version information">Version</string> </attribute> <layout class="QVBoxLayout" name="verticalLayout_2"> <property name="spacing"> <number>0</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QTreeWidget" name="VersionTree"> <property name="frameShape"> <enum>QFrame::NoFrame</enum> </property> <property name="editTriggers"> <set>QAbstractItemView::NoEditTriggers</set> </property> <property name="showDropIndicator" stdset="0"> <bool>false</bool> </property> <property name="rootIsDecorated"> <bool>false</bool> </property> <property name="itemsExpandable"> <bool>false</bool> </property> <property name="columnCount"> <number>2</number> </property> <attribute name="headerVisible"> <bool>false</bool> </attribute> <column> <property name="text"> <string>Component</string> </property> </column> <column> <property name="text"> <string>Version</string> </property> </column> </widget> </item> </layout> </widget> <attribute name="title"> </attribute> <layout class="QVBoxLayout" name="verticalLayout_3"> <property name="spacing"> <number>0</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <property name="frameShape"> <enum>QFrame::NoFrame</enum> </property> <property name="horizontalScrollBarPolicy"> <enum>Qt::ScrollBarAlwaysOff</enum> </property> <property name="undoRedoEnabled"> <bool>false</bool> </property> <property name="readOnly"> <bool>true</bool> </property> <property name="acceptRichText"> <bool>false</bool> </property> </widget> </item> </layout> </widget> <widget class="QWidget" name="TabLinks"> <attribute name="title"> <string extracomment="Column header to view links for an application or backend">Links</string> </attribute> <layout class="QVBoxLayout" name="verticalLayout_4"> <property name="sizeConstraint"> <enum>QLayout::SetNoConstraint</enum> </property> </layout> </widget> </widget> <widget class="QLabel" name="AppName"> <property name="geometry"> <rect> <x>100</x> <y>10</y> <width>411</width> <height>41</height> </rect> </property> <property name="font"> <font> <pointsize>16</pointsize> </font> </property> <property name="text"> <string notr="true">Application Name</string> </property> </widget> <widget class="QLabel" name="AppURL"> <property name="geometry"> <rect> <x>100</x> <y>53</y> <width>411</width> <height>31</height> </rect> </property> <property name="cursor"> <cursorShape>PointingHandCursor</cursorShape> </property> <property name="text"> <string notr="true">path_to_url </property> </widget> </widget> <resources/> <connections/> </ui> ```
/content/code_sandbox/data/qt/about.ui
xml
2016-05-15T16:41:35
2024-08-08T18:26:04
polychromatic
polychromatic/polychromatic
1,025
1,733
```xml <dict> <key>LayoutID</key> <integer>16</integer> <key>PathMapRef</key> <array> <dict> <key>CodecID</key> <array> <integer>283902616</integer> </array> <key>Headphone</key> <dict> <key>AmpPostDelay</key> <integer>50</integer> <key>AmpPreDelay</key> <integer>100</integer> <key>DefaultVolume</key> <integer>4292870144</integer> <key>Headset_dBV</key> <integer>-1055916032</integer> </dict> <key>Inputs</key> <array> <string>Mic</string> <string>LineIn</string> </array> <key>IntSpeaker</key> <dict> <key>DefaultVolume</key> <integer>4293722112</integer> <key>MaximumBootBeepValue</key> <integer>48</integer> <key>MuteGPIO</key> <integer>0</integer> <key>SignalProcessing</key> <dict> <key>SoftwareDSP</key> <dict> <key>DspFunction0</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>0</integer> <key>DspFuncName</key> <string>DspEqualization</string> <key>DspFuncProcessingIndex</key> <integer>0</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>Filter</key> <array> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1121130925</integer> <key>7</key> <integer>1062181913</integer> <key>8</key> <integer>-1051960877</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1121437227</integer> <key>7</key> <integer>1062181913</integer> <key>8</key> <integer>-1052549551</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>1</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1147243075</integer> <key>7</key> <integer>1069052072</integer> <key>8</key> <integer>-1059648963</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>1</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1147243075</integer> <key>7</key> <integer>1069052072</integer> <key>8</key> <integer>-1059648963</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>2</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1153510794</integer> <key>7</key> <integer>1079650306</integer> <key>8</key> <integer>0</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>2</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1153270572</integer> <key>7</key> <integer>1074610652</integer> <key>8</key> <integer>-1062064882</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>3</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1163795438</integer> <key>7</key> <integer>1076603811</integer> <key>8</key> <integer>0</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>3</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1163927873</integer> <key>7</key> <integer>1076557096</integer> <key>8</key> <integer>-1067488498</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>4</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>5</integer> <key>6</key> <integer>1165447446</integer> <key>7</key> <integer>1093664768</integer> <key>8</key> <integer>-1094411354</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>4</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>5</integer> <key>6</key> <integer>1137180672</integer> <key>7</key> <integer>1093664768</integer> <key>8</key> <integer>-1095204569</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>5</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1120722521</integer> <key>7</key> <integer>1060714809</integer> <key>8</key> <integer>-1064028699</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>5</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1120926723</integer> <key>7</key> <integer>1060714809</integer> <key>8</key> <integer>-1079922904</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>6</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1125212588</integer> <key>7</key> <integer>1062958591</integer> <key>8</key> <integer>-1070587707</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>6</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1125238907</integer> <key>7</key> <integer>1062998322</integer> <key>8</key> <integer>-1071124578</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>7</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1122038312</integer> <key>7</key> <integer>1074440875</integer> <key>8</key> <integer>-1061498991</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>7</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1121924912</integer> <key>7</key> <integer>1074271873</integer> <key>8</key> <integer>-1061498991</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>8</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1128612513</integer> <key>7</key> <integer>1079014663</integer> <key>8</key> <integer>-1059382945</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>8</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1126665806</integer> <key>7</key> <integer>1087746943</integer> <key>8</key> <integer>-1063010452</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>9</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>6</integer> <key>6</key> <integer>1157720978</integer> <key>7</key> <integer>1103101952</integer> <key>8</key> <integer>-1076613600</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>9</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>6</integer> <key>6</key> <integer>1157720978</integer> <key>7</key> <integer>1103393070</integer> <key>8</key> <integer>-1076613600</integer> </dict> </array> </dict> <key>PatchbayInfo</key> <dict/> </dict> <key>DspFunction1</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>1</integer> <key>DspFuncName</key> <string>DspVirtualization</string> <key>DspFuncProcessingIndex</key> <integer>1</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>10</key> <integer>0</integer> <key>11</key> <integer>1</integer> <key>12</key> <integer>-1060850508</integer> <key>13</key> <integer>-1038329254</integer> <key>14</key> <integer>10</integer> <key>15</key> <integer>210</integer> <key>16</key> <integer>-1049408692</integer> <key>17</key> <integer>5</integer> <key>18</key> <integer>182</integer> <key>19</key> <integer>418</integer> <key>2</key> <integer>-1082130432</integer> <key>20</key> <integer>-1038976903</integer> <key>21</key> <integer>3</integer> <key>22</key> <integer>1633</integer> <key>23</key> <integer>4033</integer> <key>24</key> <integer>-1046401747</integer> <key>25</key> <integer>4003</integer> <key>26</key> <integer>9246</integer> <key>27</key> <integer>168</integer> <key>28</key> <integer>1060875180</integer> <key>29</key> <integer>0</integer> <key>3</key> <integer>-1085584568</integer> <key>30</key> <integer>-1048128813</integer> <key>31</key> <integer>982552730</integer> <key>32</key> <integer>16</integer> <key>33</key> <integer>-1063441106</integer> <key>34</key> <integer>1008902816</integer> <key>35</key> <integer>4</integer> <key>36</key> <integer>-1059986974</integer> <key>37</key> <integer>0</integer> <key>38</key> <integer>234</integer> <key>39</key> <integer>1</integer> <key>4</key> <integer>-1094466626</integer> <key>40</key> <integer>-1047912930</integer> <key>41</key> <integer>1022423360</integer> <key>42</key> <integer>0</integer> <key>43</key> <data>your_sha512_hash/PoLzKPoE9VliZvVAiGD1DUa692FG0PaD8kb1s7dW8Cvd1P4AH1rx9+your_sha256_hasheu8wK0EvN4bnzwcZ4o8XuerPN1Lhzk6gfk7OnQgvG5lGrzURc+8ogiRvJL8ELwRvBg8qQGUPM4QWzzNMaQ7QlzSu3iKYbsKSbK7kk/tuhTxlruJRKu6DVSwORAuiLrWfoA6Hp+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAAAAAAAAAAAAAAAACasrC7Y0/Tu/+3lLv0l7I5r0STO4dM6DtPRRM8zbj/O+Y2ijtWlU67mDwmvK2+GLyKIpu7Sp34um8TZDkTvp+7UZuaOWcGRTrf22i7D3MfPOY9aTyK8oA94CaQPc3Y2z0d9Ik+N3BQPv60hz28u6M975E8PZYjDT2eVgk9Xp1GPfiKqz3S4U49E7QoPZLzJj3+XNg8D5bCPMiRlTyuLAM9dBEcPTXIDT0m1xE9o7/NPE+Cazye/qw7Xhdjuyen1LtqMOG7/Eo9uxlBXDt1St07kpvdO/gnTjt2Fp+your_sha256_hash7lxMiOe/WVDsBH407KMBOO9ILWDn1ciO7L+CmuyDt3bue4My7DhNpu0im9jqJ+8E7SMSkOz/fcTuD/q46618ZO3WrlDvWWeQ6c5P0O7L/zjvkHyw8jTzBO4rc27wJi9C8CA22vV/your_sha256_hashn3rzvEbC8mcWGvHkexLz8tKu86dpLvOicNbzF2eK7zCAvu2TPYTpu+pw7oyjHO5aduDv60iA7afr8uq46j7sjqZK7q6Aeuxms8bjz6Ks6MH/your_sha256_hashyour_sha256_hashuvdhRtD2g/JG9bO3VvAr3dT+AB9a8ffmRvYRgtD2DIq69OpUYPa0bmb0oX4E9Cs+your_sha256_hash5Ozp0ILxuZRq81EXPvKIIkbyS/your_sha256_hashoi61n6AOh6fmTg=</data> <key>5</key> <integer>-1056748724</integer> <key>6</key> <integer>0</integer> <key>7</key> <integer>0</integer> <key>8</key> <integer>0</integer> <key>9</key> <integer>0</integer> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> <key>DspFunction2</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>1</integer> <key>DspFuncName</key> <string>DspMultibandDRC</string> <key>DspFuncProcessingIndex</key> <integer>1</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>Crossover</key> <dict> <key>4</key> <integer>2</integer> <key>5</key> <integer>0</integer> <key>6</key> <integer>1143079818</integer> </dict> <key>Limiter</key> <array> <dict> <key>10</key> <integer>-1058198226</integer> <key>11</key> <integer>1094651663</integer> <key>12</key> <integer>-1047897509</integer> <key>13</key> <integer>1067573730</integer> <key>14</key> <integer>-1027604480</integer> <key>15</key> <integer>1065353216</integer> <key>16</key> <integer>1065353216</integer> <key>17</key> <integer>1073741824</integer> <key>18</key> <integer>1103811283</integer> <key>19</key> <integer>1086830520</integer> <key>2</key> <integer>1</integer> <key>20</key> <integer>1137180672</integer> <key>21</key> <integer>0</integer> <key>22</key> <integer>0</integer> <key>23</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>7</key> <integer>0</integer> <key>8</key> <integer>0</integer> <key>9</key> <integer>-1096637784</integer> </dict> <dict> <key>10</key> <integer>-1060418742</integer> <key>11</key> <integer>1086941546</integer> <key>12</key> <integer>-1047786484</integer> <key>13</key> <integer>1067919143</integer> <key>14</key> <integer>-1027604480</integer> <key>15</key> <integer>1065353216</integer> <key>16</key> <integer>1065353216</integer> <key>17</key> <integer>1073741824</integer> <key>18</key> <integer>1111814385</integer> <key>19</key> <integer>1101004800</integer> <key>2</key> <integer>2</integer> <key>20</key> <integer>1137180672</integer> <key>21</key> <integer>0</integer> <key>22</key> <integer>0</integer> <key>23</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>7</key> <integer>0</integer> <key>8</key> <integer>0</integer> <key>9</key> <integer>-1099105016</integer> </dict> </array> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> </dict> </dict> </dict> <key>LineIn</key> <dict> <key>MuteGPIO</key> <integer>1342242840</integer> <key>SignalProcessing</key> <dict> <key>SoftwareDSP</key> <dict> <key>DspFunction0</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>0</integer> <key>DspFuncName</key> <string>DspNoiseReduction</string> <key>DspFuncProcessingIndex</key> <integer>0</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>2</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>-1073029587</integer> <key>5</key> <data>your_sha256_hashHMuYwrl9lcJXm4/CBhmQwuJvlMKbxJTC7qyUwtjDl8KU+ZzCnCaewsmuncK/your_sha512_hash+your_sha256_hashyour_sha256_hashfwhFzosLIZaPCwUOjwo6TosIkR6LC6vehwtrwosIdtJ/CXLmbwlSZmcKDhJXCDFGRwnV6j8JTjY/CrqGQwgqYk8INzpjCuTufwrjlocKviKPC5YqlwgdmpcKZ2aXCGiumwq95osJOIJ/Cxl+ewtWGl8KmPJPC+sSawkdHo8JWB6LCskyhwqk7pcIth6nCh4Wswk+crcK9J6zCYJWqwmVJq8K8063Cyour_sha512_hash+M0MKaftbCpcjdwm+p5sL/CfHCHcT8wrp3A8PiJAzD</data> </dict> <key>PatchbayInfo</key> <dict/> </dict> <key>DspFunction1</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>1</integer> <key>DspFuncName</key> <string>DspGainStage</string> <key>DspFuncProcessingIndex</key> <integer>1</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>2</key> <integer>1078616770</integer> <key>3</key> <integer>1078616770</integer> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> <key>DspFunction2</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>2</integer> <key>DspFuncName</key> <string>DspEqualization</string> <key>DspFuncProcessingIndex</key> <integer>2</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>Filter</key> <array> <dict> <key>2</key> <integer>2</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1132560510</integer> <key>7</key> <integer>1064190664</integer> <key>8</key> <integer>-1057196819</integer> </dict> <dict> <key>2</key> <integer>2</integer> <key>3</key> <integer>8</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1150544383</integer> <key>7</key> <integer>1068848526</integer> <key>8</key> <integer>-1073422534</integer> </dict> <dict> <key>2</key> <integer>2</integer> <key>3</key> <integer>15</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>0</integer> <key>6</key> <integer>1182094222</integer> <key>7</key> <integer>1063679547</integer> <key>8</key> <integer>-1048213171</integer> </dict> </array> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>1</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>1</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> <key>DspFunction3</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>3</integer> <key>DspFuncName</key> <string>DspMultibandDRC</string> <key>DspFuncProcessingIndex</key> <integer>3</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>Crossover</key> <dict> <key>4</key> <integer>1</integer> <key>5</key> <integer>0</integer> <key>6</key> <integer>1128792064</integer> </dict> <key>Limiter</key> <array> <dict> <key>10</key> <integer>-1068807345</integer> <key>11</key> <integer>1097982434</integer> <key>12</key> <integer>-1038380141</integer> <key>13</key> <integer>1068906038</integer> <key>14</key> <integer>-1036233644</integer> <key>15</key> <integer>1065353216</integer> <key>16</key> <integer>1101004800</integer> <key>17</key> <integer>1101004800</integer> <key>18</key> <integer>1128792064</integer> <key>19</key> <integer>1101004800</integer> <key>2</key> <integer>1</integer> <key>20</key> <integer>1127866850</integer> <key>21</key> <integer>0</integer> <key>22</key> <integer>0</integer> <key>23</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>7</key> <integer>0</integer> <key>8</key> <integer>0</integer> <key>9</key> <integer>0</integer> </dict> </array> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>2</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>2</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> </dict> </dict> </dict> <key>Mic</key> <dict> <key>MuteGPIO</key> <integer>1342242854</integer> <key>SignalProcessing</key> <dict> <key>SoftwareDSP</key> <dict> <key>DspFunction0</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>0</integer> <key>DspFuncName</key> <string>DspNoiseReduction</string> <key>DspFuncProcessingIndex</key> <integer>0</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>2</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>-1073029587</integer> <key>5</key> <data>your_sha256_hashHMuYwrl9lcJXm4/CBhmQwuJvlMKbxJTC7qyUwtjDl8KU+ZzCnCaewsmuncK/your_sha512_hash+your_sha256_hashyour_sha256_hashfwhFzosLIZaPCwUOjwo6TosIkR6LC6vehwtrwosIdtJ/CXLmbwlSZmcKDhJXCDFGRwnV6j8JTjY/CrqGQwgqYk8INzpjCuTufwrjlocKviKPC5YqlwgdmpcKZ2aXCGiumwq95osJOIJ/Cxl+ewtWGl8KmPJPC+sSawkdHo8JWB6LCskyhwqk7pcIth6nCh4Wswk+crcK9J6zCYJWqwmVJq8K8063Cyour_sha512_hash+M0MKaftbCpcjdwm+p5sL/CfHCHcT8wrp3A8PiJAzD</data> </dict> <key>PatchbayInfo</key> <dict/> </dict> <key>DspFunction1</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>1</integer> <key>DspFuncName</key> <string>DspGainStage</string> <key>DspFuncProcessingIndex</key> <integer>1</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>2</key> <integer>1078616770</integer> <key>3</key> <integer>1078616770</integer> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> <key>DspFunction2</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>2</integer> <key>DspFuncName</key> <string>DspEqualization</string> <key>DspFuncProcessingIndex</key> <integer>2</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>Filter</key> <array> <dict> <key>2</key> <integer>2</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1132560510</integer> <key>7</key> <integer>1064190664</integer> <key>8</key> <integer>-1057196819</integer> </dict> <dict> <key>2</key> <integer>2</integer> <key>3</key> <integer>8</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1150544383</integer> <key>7</key> <integer>1068848526</integer> <key>8</key> <integer>-1073422534</integer> </dict> <dict> <key>2</key> <integer>2</integer> <key>3</key> <integer>15</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>0</integer> <key>6</key> <integer>1182094222</integer> <key>7</key> <integer>1063679547</integer> <key>8</key> <integer>-1048213171</integer> </dict> </array> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>1</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>1</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> <key>DspFunction3</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>3</integer> <key>DspFuncName</key> <string>DspMultibandDRC</string> <key>DspFuncProcessingIndex</key> <integer>3</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>Crossover</key> <dict> <key>4</key> <integer>1</integer> <key>5</key> <integer>0</integer> <key>6</key> <integer>1128792064</integer> </dict> <key>Limiter</key> <array> <dict> <key>10</key> <integer>-1068807345</integer> <key>11</key> <integer>1097982434</integer> <key>12</key> <integer>-1038380141</integer> <key>13</key> <integer>1068906038</integer> <key>14</key> <integer>-1036233644</integer> <key>15</key> <integer>1065353216</integer> <key>16</key> <integer>1101004800</integer> <key>17</key> <integer>1101004800</integer> <key>18</key> <integer>1128792064</integer> <key>19</key> <integer>1101004800</integer> <key>2</key> <integer>1</integer> <key>20</key> <integer>1127866850</integer> <key>21</key> <integer>0</integer> <key>22</key> <integer>0</integer> <key>23</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>7</key> <integer>0</integer> <key>8</key> <integer>0</integer> <key>9</key> <integer>0</integer> </dict> </array> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>2</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>2</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> </dict> </dict> </dict> <key>Outputs</key> <array> <string>Headphone</string> <string>IntSpeaker</string> </array> <key>PathMapID</key> <integer>1</integer> </dict> </array> </dict> ```
/content/code_sandbox/Resources/ALC298/layout16.xml
xml
2016-03-07T20:45:58
2024-08-14T08:57:03
AppleALC
acidanthera/AppleALC
3,420
11,770
```xml /// <reference types="mocha" /> import { assert } from 'chai'; describe('ModernCalendarWebPart', () => { it('should do something', () => { assert.ok(true); }); }); ```
/content/code_sandbox/samples/js-modern-calendar/src/webparts/modernCalendar/tests/ModernCalendar.test.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
46
```xml <resources> <string name="app_name">BroadcastTest2</string> </resources> ```
/content/code_sandbox/chapter5/BroadcastTest2/app/src/main/res/values/strings.xml
xml
2016-10-04T02:55:57
2024-08-16T11:00:26
booksource
guolindev/booksource
3,105
21
```xml <?xml version="1.0" encoding="utf-8"?> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <LWM2M xmlns:xsi="path_to_url" xsi:noNamespaceSchemaLocation="path_to_url"> <Object ObjectType="MODefinition"> <Name>LiDAR</Name> <Description1><![CDATA[This LWM2M Object includes LiDAR information.]]></Description1> <ObjectID>10343</ObjectID> <ObjectURN>urn:oma:lwm2m:x:10343</ObjectURN> <LWM2MVersion>1.0</LWM2MVersion> <ObjectVersion>1.0</ObjectVersion> <MultipleInstances>Multiple</MultipleInstances> <Mandatory>Optional</Mandatory> <Resources> <Item ID="1"> <Name>LiDAR Name</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Mandatory</Mandatory> <Type>String</Type> <RangeEnumeration/> <Units/> <Description> <![CDATA[ Human readable LiDAR name ]]> </Description> </Item> <Item ID="5907"> <Name>Host Device Unique ID</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration/> <Units/> <Description> <![CDATA[ The host device unique ID as assigned by an OEM, MNO, or other as the Device ID in the onboarding or manufacturing process. ]]> </Description> </Item> <Item ID="5905"> <Name>Host Device Manufacturer</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration/> <Units/> <Description> <![CDATA[Human readable host device manufacturer name.]]> </Description> </Item> <Item ID="5906"> <Name>Host Device Model Number</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration/> <Units/> <Description> <![CDATA[A host device model identifier (manufacturer specified string).]]> </Description> </Item> </Resources> <Description2 /> </Object> </LWM2M> ```
/content/code_sandbox/application/src/main/data/lwm2m-registry/10343.xml
xml
2016-12-01T09:33:30
2024-08-16T19:58:25
thingsboard
thingsboard/thingsboard
16,820
874
```xml export interface BadgeMagic { name?: string; id: string; } ```
/content/code_sandbox/src/models/BadgeMagic.model.ts
xml
2016-06-30T15:27:34
2024-08-06T13:59:05
badgemagic-app
fossasia/badgemagic-app
1,509
17
```xml import React from 'react'; import { AutoForm, AutoField, SubmitField } from '../../lib/universal'; import { HTMLFieldProps, ModelTransformMode, connectField } from 'uniforms'; import { bridge as schema } from './RangeFieldSchema'; type RangeProps = HTMLFieldProps<{ start: Date; stop: Date }, HTMLDivElement>; const defaultDates = { start: new Date(), stop: new Date() }; function Range({ value: { start, stop } = defaultDates }: RangeProps) { return ( <div> <AutoField InputLabelProps={{ shrink: true }} name="start" max={stop} /> <AutoField InputLabelProps={{ shrink: true }} name="stop" min={start} /> </div> ); } const RangeField = connectField(Range); const model = { range: { start: new Date(2019, 7, 10), stop: new Date(2019, 7, 20) }, }; export function RangeFieldForm() { function transform(mode: ModelTransformMode, model: any) { if (mode === 'validate') { const { start, stop } = model.range || {}; return { range: { start: start && start.toISOString(), stop: stop && stop.toISOString(), }, }; } return model; } return ( <AutoForm model={model} modelTransform={transform} schema={schema} onSubmit={(model: any) => alert(JSON.stringify(model, null, 2))} > <RangeField name="range" /> <br /> <SubmitField /> </AutoForm> ); } ```
/content/code_sandbox/website/pages-parts/CustomFields/RangeField.tsx
xml
2016-05-10T13:08:50
2024-08-13T11:27:18
uniforms
vazco/uniforms
1,934
359
```xml import { defineAppConfig } from 'ice'; if (process.env.ICE_CORE_ERROR_BOUNDARY) { console.log('__REMOVED__'); } console.log('ICE_VERSION', process.env.ICE_VERSION); export default defineAppConfig(() => ({ app: {}, })); ```
/content/code_sandbox/examples/single-route/src/app.tsx
xml
2016-11-03T06:59:15
2024-08-16T10:11:29
ice
alibaba/ice
17,815
57
```xml import { connectAuthEmulator, getAuth } from 'firebase/auth' import type { FirebaseApp } from 'firebase/app' import { logger } from '../logging' import { defineNuxtPlugin, useRuntimeConfig } from '#imports' /** * Setups the auth Emulators */ export default defineNuxtPlugin((nuxtApp) => { const firebaseApp = nuxtApp.$firebaseApp as FirebaseApp if (connectedEmulators.has(firebaseApp)) { return } const { public: { vuefire }, } = useRuntimeConfig() const host = vuefire?.emulators?.auth?.host const port = vuefire?.emulators?.auth?.port if (!host || !port) { logger.warn('Auth emulator not connected, missing host or port') return } connectAuthEmulator( // NOTE: it's fine to use getAuth here because emulators are for dev only getAuth(firebaseApp), `path_to_url{host}:${port}`, vuefire?.emulators?.auth?.options ) logger.info(`Auth emulator connected to path_to_url{host}:${port}`) connectedEmulators.set(firebaseApp, true) }) const connectedEmulators = new WeakMap<FirebaseApp, unknown>() ```
/content/code_sandbox/packages/nuxt/src/runtime/emulators/auth.plugin.ts
xml
2016-01-07T22:57:53
2024-08-16T14:23:27
vuefire
vuejs/vuefire
3,833
276
```xml import Vue from 'vue'; import { library, config } from '@fortawesome/fontawesome-svg-core'; import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome'; import { faClock, faTrashAlt, faPaperPlane, faFileAlt, faSave, faQuestionCircle, faEye, faUser as farUser, faEnvelope } from '@fortawesome/free-regular-svg-icons'; import { faMapSigns, faSearch, faReply, faPenNib, faCommentDots, faComments, faUser, faPencilAlt, faPlus, faExternalLinkAlt, faUndo, faHistory, faTimes, faTrashAlt as fasTrashAlt, faLink, faSignOutAlt, faKey, faChartLine, faCogs, faMagic, faSyncAlt, faAlignJustify, faGlobeAmericas } from '@fortawesome/free-solid-svg-icons'; import { faMarkdown, faGithub } from '@fortawesome/free-brands-svg-icons'; config.autoAddCss = false; library.add( faClock, faMapSigns, faSearch, faMarkdown, faPaperPlane, faTrashAlt, fasTrashAlt, faReply, faPenNib, faCommentDots, faUser, faPencilAlt, faPlus, faExternalLinkAlt, faUndo, faSave, faHistory, faFileAlt, faTimes, faQuestionCircle, faComments, faEye, farUser, faEnvelope, faLink, faSignOutAlt, faKey, faChartLine, faCogs, faMagic, faSyncAlt, faAlignJustify, faGlobeAmericas, faGithub ); Vue.component('font-awesome-icon', FontAwesomeIcon); ```
/content/code_sandbox/plugins/font-awesome.ts
xml
2016-02-28T13:16:17
2024-08-16T01:48:50
iBlog
eshengsky/iBlog
1,337
414
```xml import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; import { Application } from 'app/model/application.model'; import { Project } from 'app/model/project.model'; @Component({ selector: 'app-usage-applications', templateUrl: './usage.applications.html', styleUrls: ['./usage.applications.scss'], changeDetection: ChangeDetectionStrategy.OnPush }) export class UsageApplicationsComponent { @Input() project: Project; @Input() applications: Array<Application>; constructor() { } } ```
/content/code_sandbox/ui/src/app/shared/usage/applications/usage.applications.component.ts
xml
2016-10-11T08:28:23
2024-08-16T01:55:31
cds
ovh/cds
4,535
108
```xml import * as fs from 'fs'; import { getBuildToolsInstallerPath } from './get-build-tools-installer-path'; import { getPythonInstallerPath } from './get-python-installer-path'; /** * Cleans existing log files */ export function cleanExistingLogFiles() { const files = [ getBuildToolsInstallerPath().logPath, getPythonInstallerPath().logPath ]; files.forEach((file) => { if (fs.existsSync(file)) { fs.unlinkSync(file); } }); } ```
/content/code_sandbox/src/utils/clean.ts
xml
2016-06-12T00:10:22
2024-08-15T12:11:21
windows-build-tools
felixrieseberg/windows-build-tools
3,397
106
```xml export default function(number: number, index: number): [string, string] { return [ ['just nu', 'om en stund'], ['%s sekunder sedan', 'om %s sekunder'], ['1 minut sedan', 'om 1 minut'], ['%s minuter sedan', 'om %s minuter'], ['1 timme sedan', 'om 1 timme'], ['%s timmar sedan', 'om %s timmar'], ['1 dag sedan', 'om 1 dag'], ['%s dagar sedan', 'om %s dagar'], ['1 vecka sedan', 'om 1 vecka'], ['%s veckor sedan', 'om %s veckor'], ['1 mnad sedan', 'om 1 mnad'], ['%s mnader sedan', 'om %s mnader'], ['1 r sedan', 'om 1 r'], ['%s r sedan', 'om %s r'], ][index] as [string, string]; } ```
/content/code_sandbox/src/lang/sv.ts
xml
2016-06-23T02:06:23
2024-08-16T02:07:26
timeago.js
hustcc/timeago.js
5,267
226
```xml <?xml version="1.0" encoding="UTF-8"?> <!-- ~ contributor license agreements. See the NOTICE file distributed with ~ this work for additional information regarding copyright ownership. ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <e2e-test-cases> <test-case sql="SELECT i.* FROM t_order o FORCE INDEX(order_index) JOIN t_order_item i ON o.order_id=i.order_id AND o.user_id = i.user_id AND o.order_id = ?" db-types="MySQL" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="1000:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.* FROM t_order o FORCE INDEX(order_index) JOIN t_order_item i ON o.order_id=i.order_id AND o.user_id = i.user_id AND o.order_id in (?,?)" db-types="MySQL" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="1000:int,1001:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT t_order_item.* FROM t_order JOIN t_order_item ON t_order.order_id = t_order_item.order_id WHERE t_order.order_id = ?" scenario-types="tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="1000:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.* FROM t_order o FORCE INDEX(order_index) JOIN t_order_item i ON o.order_id=i.order_id AND o.user_id = i.user_id WHERE o.order_id = ?" db-types="MySQL" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="1000:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE (o.order_id = ? OR o.order_id = ?) AND o.user_id = ?" scenario-types="dbtbl_with_readwrite_splitting,readwrite_splitting,db_tbl_sql_federation"> <assertion parameters="1000:int, 1100:int, 11:int" expected-data-source-name="read_dataset" /> </test-case> <!-- TODO Replace with standard table structure --> <!--<test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id JOIN t_broadcast_table c ON o.status = c.status WHERE (o.order_id = ? OR o.order_id = ?) AND o.user_id = ? AND o.status = ?" scenario-types="db,tbl,dbtbl_with_readwrite_splitting"> <assertion parameters="1000:int, 1100:int, 11:int, init:String" expected-data-source-name="read_dataset" /> </test-case>--> <test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id ORDER BY i.item_id" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.*, o.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id ORDER BY item_id" db-types="H2,MySQL" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? ORDER BY i.item_id" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="10:int, 11:int, 1000:int, 1909:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? ORDER BY i.item_id DESC LIMIT ?" db-types="MySQL,H2,PostgreSQL" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="10:int, 19:int, 1000:int, 1909:int, 2:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? ORDER BY i.item_id DESC OFFSET ?" db-types="PostgreSQL" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="10:int, 19:int, 1000:int, 1909:int, 6:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? ORDER BY i.item_id DESC OFFSET ? LIMIT ?" db-types="PostgreSQL" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="10:int, 19:int, 1000:int, 1909:int, 2:int, 2:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.* FROM `t_order` o JOIN `t_order_item` i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.`user_id` IN (?, ?) AND o.`order_id` BETWEEN ? AND ? ORDER BY i.item_id DESC LIMIT ?, ?" db-types="MySQL" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="10:int, 19:int, 1000:int, 1909:int, 2:int, 2:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.* FROM `t_order` o JOIN `t_order_item` i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.`user_id` IN (?, ?) AND o.`order_id` BETWEEN ? AND ? ORDER BY i.item_id DESC LIMIT ? OFFSET ?" db-types="MySQL" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="10:int, 19:int, 1000:int, 1909:int, 2:int, 2:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.user_id FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? GROUP BY i.item_id ORDER BY i.item_id DESC LIMIT ?, ?" db-types="MySQL,H2" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="10:int, 19:int, 1000:int, 1909:int, 1:int, 10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.user_id FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? GROUP BY i.user_id ORDER BY i.item_id DESC LIMIT ?, ?" db-types="MySQL" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="10:int, 19:int, 1000:int, 1909:int, 1:int, 10:int" expected-data-source-name="read_dataset" /> </test-case> <!-- TODO Replace with standard table structure --> <!--<test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i ON o.user_id = i.user_id AND o.order_id = i.order_id JOIN t_broadcast_table c ON o.status = c.status WHERE o.user_id IN (?, ?) AND o.order_id BETWEEN ? AND ? AND o.status = ? ORDER BY i.item_id" scenario-types="db,tbl,dbtbl_with_readwrite_splitting"> <assertion parameters="10:int, 11:int, 1001:int, 1100:int, init:String" expected-data-source-name="read_dataset" /> <assertion parameters="10:int, 11:int, 1009:int, 1108:int, none:String" expected-data-source-name="read_dataset" /> </test-case>--> <test-case sql="SELECT i.* FROM t_order o JOIN t_order_item i USING(order_id) WHERE o.order_id = ?" db-types="MySQL,PostgreSQL" scenario-types="tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="1000:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o NATURAL JOIN t_merchant m WHERE o.user_id = ? ORDER BY o.order_id" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o NATURAL JOIN t_order_item i WHERE o.user_id = ? ORDER BY o.order_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_product p NATURAL JOIN t_product_detail d WHERE p.product_id &gt; ? ORDER BY p.product_id DESC" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <!-- TODO add encrypt,encrypt_and_readwrite_splitting,dbtbl_with_readwrite_splitting_and_encrypt scenario when use standard table --> <test-case sql="SELECT * FROM t_product p INNER JOIN t_product_detail d ON p.product_id = d.product_id" db-types="MySQL,Oracle,SQLServer" scenario-types="sharding_and_encrypt"> <assertion expected-data-source-name="read_dataset" /> </test-case> <!-- TODO Replace with standard table structure --> <!--<test-case sql="SELECT * FROM t_single_table s INNER JOIN t_order o ON s.id = o.order_id" db-types="MySQL,Oracle,SQLServer" scenario-types="db,tbl,dbtbl_with_readwrite_splitting"> <assertion expected-data-source-name="read_dataset" /> </test-case>--> <test-case sql="SELECT * FROM t_order o INNER JOIN t_user i ON o.user_id = i.user_id WHERE user_name LIKE '%'" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT i.* FROM t_order o INNER JOIN t_order_item i ON o.order_id = i.order_id WHERE o.order_id = ?" db-types="MySQL,H2,PostgreSQL" scenario-types="tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion parameters="1000:int" expected-data-source-name="read_dataset" /> </test-case> <!-- TODO add dbtbl_with_readwrite_splitting_and_encrypt,sharding_and_encrypt,encrypt_and_readwrite_splitting,encrypt scenario when use standard t_user table in issue#21286 --> <!--<test-case sql="SELECT * FROM t_user u INNER JOIN t_user_item m ON u.user_id = m.user_id WHERE u.user_id IN (10, 11)" scenario-types="encrypt"> <assertion expected-data-source-name="read_dataset" /> </test-case>--> <test-case sql="SELECT * FROM t_merchant m1 INNER JOIN t_merchant m2 ON m1.merchant_id = m2.merchant_id WHERE m2.business_code LIKE '%18'" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db,encrypt" scenario-comments="Test single table's LIKE operator percentage wildcard in select join statement when use sharding feature.|Test encrypt table's LIKE operator percentage wildcard in select join statement when use encrypt feature."> <assertion expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_merchant m1 INNER JOIN t_merchant m2 ON m1.merchant_id = m2.merchant_id WHERE m2.business_code LIKE '_1000018'" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db,encrypt" scenario-comments="Test single table's LIKE operator underscore wildcard in select join statement when use sharding feature.|Test encrypt table's LIKE operator underscore wildcard in select join statement when use encrypt feature."> <assertion expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT u1.* FROM t_user u1 INNER JOIN t_user u2 ON u1.user_id = u2.user_id ORDER BY user_id" db-types="MySQL,PostgreSQL,openGauss" scenario-types="mask,mask_encrypt,mask_sharding,mask_encrypt_sharding"> <assertion expected-data-source-name="expected_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o INNER JOIN t_order_item i ON o.order_id = i.order_id WHERE o.user_id = ? ORDER BY o.order_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o INNER JOIN t_merchant m ON o.merchant_id = m.merchant_id WHERE o.user_id = ? ORDER BY o.order_id" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_product p INNER JOIN t_product_detail d ON p.product_id = d.product_id WHERE p.product_id &gt; ? ORDER BY p.product_id DESC" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o INNER JOIN t_merchant m USING(merchant_id) WHERE o.user_id = ? ORDER BY o.order_id" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o INNER JOIN t_order_item i USING(order_id) WHERE o.user_id = ? ORDER BY o.order_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_product p INNER JOIN t_product_detail d USING(product_id) WHERE p.product_id &gt; ? ORDER BY p.product_id DESC" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o FULL JOIN t_order_item i ON o.order_id = i.order_id WHERE o.user_id = ? OR i.user_id = ? ORDER BY o.order_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int, 10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o FULL JOIN t_merchant m ON o.merchant_id = m.merchant_id where o.user_id = ? OR m.country_id = 1 ORDER BY o.order_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_product p FULL JOIN t_product_detail d ON d.product_id = p.product_id WHERE d.detail_id = ? OR p.category_id = 10 ORDER BY d.product_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o FULL JOIN t_order_item i USING(order_id) WHERE o.user_id = ? OR i.user_id = ? ORDER BY o.order_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int, 10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o FULL JOIN t_merchant m USING(merchant_id) where o.user_id = ? OR m.country_id = 1 ORDER BY o.order_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_product p FULL JOIN t_product_detail d USING(product_id) WHERE d.detail_id = ? OR p.category_id = 10 ORDER BY d.product_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o NATURAL FULL JOIN t_order_item i WHERE o.user_id = ? OR i.user_id = ? ORDER BY o.order_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int, 10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o NATURAL FULL JOIN t_merchant m where o.user_id = ? OR m.country_id = 1 ORDER BY o.order_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_product p NATURAL FULL JOIN t_product_detail d WHERE d.detail_id = ? OR p.category_id = 10 ORDER BY d.product_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o LEFT JOIN t_order_item m ON o.order_id = m.order_id AND o.user_id = m.user_id order by o.order_id, m.item_id" db-types="MySQL,H2" scenario-types="db,tbl,dbtbl_with_readwrite_splitting,readwrite_splitting"> <assertion expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o LEFT JOIN t_order_item i ON o.order_id = i.order_id WHERE o.user_id = ? ORDER BY o.order_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o LEFT JOIN t_merchant m ON o.merchant_id = m.merchant_id WHERE o.user_id = ? ORDER BY o.order_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_product p LEFT JOIN t_product_detail d ON d.product_id = p.product_id WHERE p.category_id = ? ORDER BY p.product_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o LEFT JOIN t_order_item i USING(order_id) WHERE o.user_id = ? ORDER BY o.order_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o LEFT JOIN t_merchant m USING(merchant_id) WHERE o.user_id = ? ORDER BY o.order_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_product p LEFT JOIN t_product_detail d USING(product_id) WHERE p.category_id = ? ORDER BY p.product_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o NATURAL LEFT JOIN t_merchant m WHERE o.user_id = ? ORDER BY o.order_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o NATURAL LEFT JOIN t_order_item i WHERE o.user_id = ? ORDER BY o.order_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_product p NATURAL LEFT JOIN t_product_detail d WHERE p.category_id = ? ORDER BY p.product_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o RIGHT JOIN t_order_item i ON o.order_id = i.order_id WHERE i.user_id = ? ORDER BY i.item_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_product p RIGHT JOIN t_product_detail d ON d.product_id = p.product_id WHERE d.detail_id = ? ORDER BY d.product_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <test-case sql="SELECT * FROM t_order o RIGHT JOIN t_merchant m ON o.merchant_id = m.merchant_id WHERE m.country_id = 1 ORDER BY o.order_id, m.merchant_id, 7" db-types="MySQL,PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion expected-data-source-name="read_dataset" /> </test-case> <!-- TODO support MySQL using statement when calcite support right join using --> <test-case sql="SELECT * FROM t_order o RIGHT JOIN t_order_item i USING(order_id) WHERE i.user_id = ? ORDER BY i.item_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <!-- TODO support MySQL using statement when calcite support right join using --> <test-case sql="SELECT * FROM t_product p RIGHT JOIN t_product_detail d USING(product_id) WHERE d.detail_id = ? ORDER BY d.product_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <!-- TODO support MySQL using statement when calcite support right join using --> <test-case sql="SELECT * FROM t_order o RIGHT JOIN t_merchant m USING(merchant_id) WHERE m.country_id = 1 ORDER BY o.order_id, m.merchant_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion expected-data-source-name="read_dataset" /> </test-case> <!-- TODO support MySQL natural right join statement when calcite support natural right join --> <test-case sql="SELECT * FROM t_order o NATURAL RIGHT JOIN t_order_item i WHERE i.user_id = ? ORDER BY i.item_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <!-- TODO support MySQL natural right join statement when calcite support natural right join --> <test-case sql="SELECT * FROM t_product p NATURAL RIGHT JOIN t_product_detail d WHERE d.detail_id = ? ORDER BY d.product_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion parameters="10:int" expected-data-source-name="read_dataset" /> </test-case> <!-- TODO support MySQL natural right join statement when calcite support natural right join --> <test-case sql="SELECT * FROM t_order o NATURAL RIGHT JOIN t_merchant m WHERE m.country_id = 1 ORDER BY o.order_id, m.merchant_id, 7" db-types="PostgreSQL,openGauss" scenario-types="db_tbl_sql_federation"> <assertion expected-data-source-name="read_dataset" /> </test-case> </e2e-test-cases> ```
/content/code_sandbox/test/e2e/sql/src/test/resources/cases/dql/e2e-dql-select-join.xml
xml
2016-01-18T12:49:26
2024-08-16T15:48:11
shardingsphere
apache/shardingsphere
19,707
6,155
```xml import { Component } from '@angular/core'; import { Code } from '@domain/code'; @Component({ selector: 'accessibility-doc', template: ` <div> <app-docsectiontext> <h3>Screen Reader</h3> <p> Dialog component uses <i>dialog</i> role along with <i>aria-labelledby</i> referring to the header element however any attribute is passed to the root element so you may use <i>aria-labelledby</i> to override this default behavior. In addition <i>aria-modal</i> is added since focus is kept within the popup. </p> <p>It is recommended to use a trigger component that can be accessed with keyboard such as a button, if not adding <i>tabIndex</i> would be necessary.</p> <p>Trigger element also requires <i>aria-expanded</i> and <i>aria-controls</i> to be handled explicitly.</p> <p> Close element is a <i>button</i> with an <i>aria-label</i> that refers to the <i>aria.close</i> property of the <a href="/configuration/#locale">locale</a> API by default, you may use<i>closeButtonProps</i> to customize the element and override the default <i>aria-label</i>. </p> <app-code [code]="code" [hideToggleCode]="true"></app-code> <h3>Overlay Keyboard Support</h3> <div class="doc-tablewrapper"> <table class="doc-table"> <thead> <tr> <th>Key</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td><i>tab</i></td> <td>Moves focus to the next the focusable element within the dialog.</td> </tr> <tr> <td><i>shift</i> + <i>tab</i></td> <td>Moves focus to the previous the focusable element within the dialog.</td> </tr> <tr> <td><i>escape</i></td> <td>Closes the dialog if <i>closeOnEscape</i> is true.</td> </tr> </tbody> </table> </div> <h3>Close Button Keyboard Support</h3> <div class="doc-tablewrapper"> <table class="doc-table"> <thead> <tr> <th>Key</th> <th>Function</th> </tr> </thead> <tbody> <tr> <td><i>enter</i></td> <td>Closes the dialog.</td> </tr> <tr> <td><i>space</i></td> <td>Closes the dialog.</td> </tr> </tbody> </table> </div> </app-docsectiontext> </div>` }) export class AccessibilityDoc { code: Code = { html: `<p-button icon="pi pi-external-link" (click)="visible = true" aria-controls="{{visible ? 'dialog' : null}}" aria-expanded="{{visible ? true : false}}" /> <p-dialog id="dialog" header="Header" [(visible)]="visible" [style]="{ width: '50vw' }" (onHide)="visible = false"> <p>Content</p> </p-dialog>` }; } ```
/content/code_sandbox/src/app/showcase/doc/dialog/accessibilitydoc.ts
xml
2016-01-16T09:23:28
2024-08-16T19:58:20
primeng
primefaces/primeng
9,969
797
```xml import { mkdir, writeFile } from 'node:fs/promises'; import path from 'path'; import YAML from 'yaml'; import { InsoError } from '../cli'; export async function writeFileWithCliOptions( outputPath: string, contents: string, ): Promise<string> { try { await mkdir(path.dirname(outputPath), { recursive: true }); await writeFile(outputPath, contents); return outputPath; } catch (error) { console.error(error); throw new InsoError(`Failed to write to "${outputPath}"`, error); } } export async function exportSpecification({ specContent, skipAnnotations }: { specContent: string; skipAnnotations: boolean }) { if (!skipAnnotations) { return specContent; } const recursiveDeleteKey = (obj: any) => { Object.keys(obj).forEach(key => { if (key.startsWith('x-kong-')) { delete obj[key]; } else if (typeof obj[key] === 'object') { recursiveDeleteKey(obj[key]); } }); return obj; }; return YAML.stringify(recursiveDeleteKey(YAML.parse(specContent))); } ```
/content/code_sandbox/packages/insomnia-inso/src/commands/export-specification.ts
xml
2016-04-23T03:54:26
2024-08-16T16:50:44
insomnia
Kong/insomnia
34,054
244
```xml <Project Sdk="Microsoft.NET.Sdk" ToolsVersion="15.0" xmlns="path_to_url"> <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), testAsset.props))\testAsset.props" /> <PropertyGroup> <TargetFramework>$(CurrentTargetFramework)</TargetFramework> <OutputType>Exe</OutputType> <RestoreAdditionalProjectSources Condition="'$(TEST_PACKAGES)' != ''">$(RestoreAdditionalProjectSources);$(TEST_PACKAGES)</RestoreAdditionalProjectSources> </PropertyGroup> <ItemGroup> <DotNetCliToolReference Include="dotnet-portable" Version="1.0.0" /> <DotNetCliToolReference Include="dotnet-PreferCliRuntime" Version="1.0.0" /> </ItemGroup> </Project> ```
/content/code_sandbox/test/TestAssets/TestProjects/AppWithToolDependency/AppWithToolDependency.csproj
xml
2016-07-22T21:26:02
2024-08-16T17:23:58
sdk
dotnet/sdk
2,627
181
```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)' == '' ">x86</Platform> <ProjectGuid>{4C943B12-C5AF-4CD4-B583-B4011D13CAAB}</ProjectGuid> <ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <OutputType>Exe</OutputType> <RootNamespace>linkallmac</RootNamespace> <AssemblyName>link all</AssemblyName> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier> <MonoMacResourcePrefix>Resources</MonoMacResourcePrefix> <LangVersion>latest</LangVersion> <RestoreProjectStyle>PackageReference</RestoreProjectStyle> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\$(Platform)\Debug</OutputPath> <DefineConstants>__MACOS__;DEBUG</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <EnableCodeSigning>false</EnableCodeSigning> <CodeSigningKey>Mac Developer</CodeSigningKey> <CreatePackage>false</CreatePackage> <EnablePackageSigning>false</EnablePackageSigning> <IncludeMonoRuntime>false</IncludeMonoRuntime> <UseSGen>true</UseSGen> <UseRefCounting>true</UseRefCounting> <HttpClientHandler></HttpClientHandler> <LinkMode>Full</LinkMode> <XamMacArch></XamMacArch> <AOTMode>None</AOTMode> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <MonoBundlingExtraArgs>--optimize=all,-remove-uithread-checks</MonoBundlingExtraArgs> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> <DebugType></DebugType> <Optimize>true</Optimize> <OutputPath>bin\$(Platform)\Release</OutputPath> <DefineConstants>__MACOS__</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <EnableCodeSigning>false</EnableCodeSigning> <CreatePackage>false</CreatePackage> <EnablePackageSigning>false</EnablePackageSigning> <IncludeMonoRuntime>true</IncludeMonoRuntime> <UseSGen>true</UseSGen> <UseRefCounting>true</UseRefCounting> <LinkMode>Full</LinkMode> <HttpClientHandler></HttpClientHandler> <XamMacArch></XamMacArch> <AOTMode>None</AOTMode> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <MonoBundlingExtraArgs>--optimize=all</MonoBundlingExtraArgs> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Core" /> <Reference Include="Xamarin.Mac" /> <Reference Include="System.Xml" /> <Reference Include="System.Runtime.Serialization" /> <Reference Include="System.Net.Http" /> </ItemGroup> <ItemGroup> <None Include="Info.plist" /> </ItemGroup> <ItemGroup> <Compile Include="..\..\..\common\mac\MacMain.cs"> <Link>MacMain.cs</Link> </Compile> <Compile Include="..\..\..\common\mac\Mac.cs"> <Link>Mac.cs</Link> </Compile> <Compile Include="..\..\..\common\TestAssemblyLoader.cs"> <Link>TestAssemblyLoader.cs</Link> </Compile> <Compile Include="..\..\ios\link all\DataContractTest.cs"> <Link>DataContractTest.cs</Link> </Compile> <Compile Include="..\..\BaseOptimizeGeneratedCodeTest.cs" /> <Compile Include="LinkAllTest.cs" /> <Compile Include="..\..\..\..\tools\common\ApplePlatform.cs"> <Link>ApplePlatform.cs</Link> </Compile> <Compile Include="..\..\..\..\tools\common\SdkVersions.cs"> <Link>SdkVersions.cs</Link> </Compile> <Compile Include="..\..\..\common\PlatformInfo.cs"> <Link>PlatformInfo.cs</Link> </Compile> <Compile Include="OptimizeGeneratedCodeTest.cs" /> <Compile Include="..\..\..\common\TestRuntime.cs"> <Link>TestRuntime.cs</Link> </Compile> <Compile Include="..\..\CommonLinkAllTest.cs"> <Link>CommonLinkAllTest.cs</Link> </Compile> <Compile Include="..\..\ILReader.cs"> <Link>ILReader.cs</Link> </Compile> <Compile Include="..\LinkAnyTest.cs"> <Link>LinkAnyTest.cs</Link> </Compile> <Compile Include="..\..\CommonLinkAnyTest.cs"> <Link>CommonLinkAnyTest.cs</Link> </Compile> <Compile Include="..\..\..\monotouch-test\System.Net.Http\NetworkResources.cs"> <Link>NetworkResources.cs</Link> </Compile> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\..\..\external\Touch.Unit\Touch.Client\macOS\mobile\Touch.Client-macOS-mobile.csproj"> <Project>{88A8A1AC-0829-4C98-8F4A-9FC23DC42A06}</Project> <Name>Touch.Client-macOS-mobile</Name> </ProjectReference> <ProjectReference Include="..\..\..\bindings-test\macOS\bindings-test.csproj"> <Project>{20BEA313-7E2D-4209-93C0-E4D99C72695A}</Project> <Name>bindings-test</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" /> </Project> ```
/content/code_sandbox/tests/linker/mac/link all/link all-mac.csproj
xml
2016-04-20T18:24:26
2024-08-16T13:29:19
xamarin-macios
xamarin/xamarin-macios
2,436
1,460
```xml import { joinPaths, normalizePath } from '../../system/path'; import { maybeStopWatch } from '../../system/stopwatch'; import type { GitDiffFile, GitDiffHunk, GitDiffHunkLine, GitDiffShortStat } from '../models/diff'; import type { GitFile, GitFileStatus } from '../models/file'; import { GitFileChange } from '../models/file'; const shortStatDiffRegex = /(\d+)\s+files? changed(?:,\s+(\d+)\s+insertions?\(\+\))?(?:,\s+(\d+)\s+deletions?\(-\))?/; function parseHunkHeaderPart(headerPart: string) { const [startS, countS] = headerPart.split(','); const start = Number(startS); const count = Number(countS) || 1; return { count: count, position: { start: start, end: start + count - 1 } }; } export function parseGitFileDiff(data: string, includeContents = false): GitDiffFile | undefined { using sw = maybeStopWatch('Git.parseFileDiff', { log: false, logLevel: 'debug' }); if (!data) return undefined; const hunks: GitDiffHunk[] = []; const lines = data.split('\n'); // Skip header let i = -1; while (++i < lines.length) { if (lines[i].startsWith('@@')) { break; } } // Parse hunks let line; while (i < lines.length) { line = lines[i]; if (!line.startsWith('@@')) { i++; continue; } const header = line.split('@@')[1].trim(); const [previousHeaderPart, currentHeaderPart] = header.split(' '); const current = parseHunkHeaderPart(currentHeaderPart.slice(1)); const previous = parseHunkHeaderPart(previousHeaderPart.slice(1)); const hunkLines = new Map<number, GitDiffHunkLine>(); let fileLineNumber = current.position.start; line = lines[++i]; const contentStartLine = i; // Parse hunks lines while (i < lines.length && !line.startsWith('@@')) { switch (line[0]) { // deleted case '-': { let deletedLineNumber = fileLineNumber; while (line?.startsWith('-')) { hunkLines.set(deletedLineNumber++, { current: undefined, previous: line.slice(1), state: 'removed', }); line = lines[++i]; } if (line?.startsWith('+')) { let addedLineNumber = fileLineNumber; while (line?.startsWith('+')) { const hunkLine = hunkLines.get(addedLineNumber); if (hunkLine != null) { hunkLine.current = line.slice(1); hunkLine.state = 'changed'; } else { hunkLines.set(addedLineNumber, { current: line.slice(1), previous: undefined, state: 'added', }); } addedLineNumber++; line = lines[++i]; } fileLineNumber = addedLineNumber; } else { fileLineNumber = deletedLineNumber; } break; } // added case '+': hunkLines.set(fileLineNumber++, { current: line.slice(1), previous: undefined, state: 'added', }); line = lines[++i]; break; // unchanged (context) case ' ': hunkLines.set(fileLineNumber++, { current: line.slice(1), previous: line.slice(1), state: 'unchanged', }); line = lines[++i]; break; default: line = lines[++i]; break; } } const hunk: GitDiffHunk = { contents: `${lines.slice(contentStartLine, i).join('\n')}\n`, current: current, previous: previous, lines: hunkLines, }; hunks.push(hunk); } sw?.stop({ suffix: ` parsed ${hunks.length} hunks` }); return { contents: includeContents ? data : undefined, hunks: hunks, }; } export function parseGitDiffNameStatusFiles(data: string, repoPath: string): GitFile[] | undefined { using sw = maybeStopWatch('Git.parseDiffNameStatusFiles', { log: false, logLevel: 'debug' }); if (!data) return undefined; const files: GitFile[] = []; let status; const fields = data.split('\0'); for (let i = 0; i < fields.length - 1; i++) { status = fields[i][0]; if (status === '.') { status = '?'; } files.push({ status: status as GitFileStatus, path: fields[++i], originalPath: status.startsWith('R') || status.startsWith('C') ? fields[++i] : undefined, repoPath: repoPath, }); } sw?.stop({ suffix: ` parsed ${files.length} files` }); return files; } export function parseGitApplyFiles(data: string, repoPath: string): GitFileChange[] { using sw = maybeStopWatch('Git.parseApplyFiles', { log: false, logLevel: 'debug' }); if (!data) return []; const files = new Map<string, GitFileChange>(); const lines = data.split('\0'); // remove the summary (last) line to parse later const summary = lines.pop(); for (let line of lines) { line = line.trim(); if (!line) continue; const [insertions, deletions, path] = line.split('\t'); files.set( normalizePath(path), new GitFileChange(repoPath, path, 'M' as GitFileStatus, undefined, undefined, { changes: 0, additions: parseInt(insertions, 10), deletions: parseInt(deletions, 10), }), ); } for (let line of summary!.split('\n')) { line = line.trim(); if (!line) continue; const match = /(rename) (.*?)\{(.+?)\s+=>\s+(.+?)\}(?: \(\d+%\))|(create|delete) mode \d+ (.+)/.exec(line); if (match == null) continue; let [, rename, renameRoot, renameOriginalPath, renamePath, createOrDelete, createOrDeletePath] = match; if (rename != null) { renamePath = normalizePath(joinPaths(renameRoot, renamePath)); renameOriginalPath = normalizePath(joinPaths(renameRoot, renameOriginalPath)); const file = files.get(renamePath)!; files.set( renamePath, new GitFileChange( repoPath, renamePath, 'R' as GitFileStatus, renameOriginalPath, undefined, file.stats, ), ); } else { const file = files.get(normalizePath(createOrDeletePath))!; files.set( createOrDeletePath, new GitFileChange( repoPath, file.path, (createOrDelete === 'create' ? 'A' : 'D') as GitFileStatus, undefined, undefined, file.stats, ), ); } } sw?.stop({ suffix: ` parsed ${files.size} files` }); return [...files.values()]; } export function parseGitDiffShortStat(data: string): GitDiffShortStat | undefined { using sw = maybeStopWatch('Git.parseDiffShortStat', { log: false, logLevel: 'debug' }); if (!data) return undefined; const match = shortStatDiffRegex.exec(data); if (match == null) return undefined; const [, files, insertions, deletions] = match; const diffShortStat: GitDiffShortStat = { changedFiles: files == null ? 0 : parseInt(files, 10), additions: insertions == null ? 0 : parseInt(insertions, 10), deletions: deletions == null ? 0 : parseInt(deletions, 10), }; sw?.stop({ suffix: ` parsed ${diffShortStat.changedFiles} files, +${diffShortStat.additions} -${diffShortStat.deletions}`, }); return diffShortStat; } ```
/content/code_sandbox/src/git/parsers/diffParser.ts
xml
2016-08-08T14:50:30
2024-08-15T21:25:09
vscode-gitlens
gitkraken/vscode-gitlens
8,889
1,842
```xml /** * api-extractor-test-01 * * @remarks * This library is consumed by api-extractor-test-02 and api-extractor-test-03. * It tests the basic types of definitions, and all the weird cases for following * chains of type aliases. * * @packageDocumentation */ /// <reference types="jest" /> /// <reference lib="es2015.symbol.wellknown" /> /// <reference lib="es2018.intl" /> import { default as Long_2 } from 'long'; import { MAX_UNSIGNED_VALUE } from 'long'; /** * Example of an abstract class that is directly exported. * @public */ export declare abstract class AbstractClass { abstract test(): void; } /** * Example of an abstract class that is exported separately from its * definition. * * @public */ export declare abstract class AbstractClass2 { abstract test2(): void; } /** * Example of an abstract class that is not the default export * * @public */ export declare abstract class AbstractClass3 { abstract test3(): void; } /** * Test different kinds of ambient definitions * @public */ export declare class AmbientConsumer { /** * Found via tsconfig.json's "lib" setting, which specifies the built-in "es2015.collection" */ builtinDefinition1(): Map<string, string>; /** * Found via tsconfig.json's "lib" setting, which specifies the built-in "es2015.promise" */ builtinDefinition2(): Promise<void>; /** * Configured via tsconfig.json's "lib" setting, which specifies `@types/jest`. * The emitted index.d.ts gets a reference like this: <reference types="jest" /> */ definitelyTyped(): jest.MockContext<number, any>; /** * Found via tsconfig.json's "include" setting point to a *.d.ts file. * This is an old-style Definitely Typed definition, which is the worst possible kind, * because consumers are expected to provide this, with no idea where it came from. */ localTypings(): IAmbientInterfaceExample; } /** @public */ declare namespace ANamespace { const locallyExportedCustomSymbol: unique symbol; /** @public */ const fullyExportedCustomSymbol: unique symbol; } /** * Referenced by DefaultExportEdgeCaseReferencer. * @public */ export declare class ClassExportedAsDefault { } /** * This class gets aliased twice before being exported from the package. * @public */ export declare class ClassWithAccessModifiers { /** Doc comment */ private _privateField; /** Doc comment */ private privateMethod; /** Doc comment */ private get privateGetter(); /** Doc comment */ private privateSetter; /** Doc comment */ private constructor(); /** Doc comment */ private static privateStaticMethod; /** Doc comment */ protected protectedField: number; /** Doc comment */ protected get protectedGetter(): string; /** Doc comment */ protected protectedSetter(x: string): void; /** Doc comment */ static publicStaticField: number; /** Doc comment */ defaultPublicMethod(): void; } /** * @public */ export declare class ClassWithSymbols { readonly [unexportedCustomSymbol]: number; get [locallyExportedCustomSymbol](): string; [fullyExportedCustomSymbol](): void; get [ANamespace.locallyExportedCustomSymbol](): string; [ANamespace.fullyExportedCustomSymbol](): void; get [Symbol.toStringTag](): string; } /** * This class illustrates some cases involving type literals. * @public */ export declare class ClassWithTypeLiterals { /** type literal in */ method1(vector: { x: number; y: number; }): void; /** type literal output */ method2(): { classValue: ClassWithTypeLiterals; callback: () => number; } | undefined; } /** * @public */ export declare const enum ConstEnum { Zero = 0, One = 1, Two = 2 } /** * Tests a decorator * @public */ export declare class DecoratorTest { /** * Function with a decorator */ test(): void; } /** * @public */ export declare class DefaultExportEdgeCase { /** * This reference is encountered before the definition of DefaultExportEdgeCase. * The symbol.name will be "default" in this situation. */ reference: ClassExportedAsDefault; } /** @public */ export declare class ForgottenExportConsumer1 { test1(): IForgottenExport | undefined; } /** @public */ export declare class ForgottenExportConsumer2 { test2(): IForgottenExport_2 | undefined; } /** * This class directly consumes IForgottenDirectDependency * and indirectly consumes IForgottenIndirectDependency. * @beta */ export declare class ForgottenExportConsumer3 { test2(): IForgottenDirectDependency | undefined; } /** @public */ export declare const fullyExportedCustomSymbol: unique symbol; /** * This class is directly consumed by ForgottenExportConsumer3. */ declare interface IForgottenDirectDependency { member: IForgottenIndirectDependency; } /** * The ForgottenExportConsumer1 class relies on this IForgottenExport. * * This should end up as a non-exported "IForgottenExport" in the index.d.ts. */ declare interface IForgottenExport { instance1: string; } /** * The ForgottenExportConsumer2 class relies on this IForgottenExport. * * This should end up as a non-exported "IForgottenExport_2" in the index.d.ts. * It is renamed to avoid a conflict with the IForgottenExport from ForgottenExportConsumer1. */ declare interface IForgottenExport_2 { instance2: string; } /** * This class is indirectly consumed by ForgottenExportConsumer3. */ declare interface IForgottenIndirectDependency { } /** * This interface is exported as the default export for its source file. * @public */ export declare interface IInterfaceAsDefaultExport { /** * A member of the interface */ member: string; } /* Excluded from this release type: IMergedInterface */ /* Excluded from this release type: IMergedInterfaceReferencee */ /** * A simple, normal definition * @public */ export declare interface ISimpleInterface { } declare const locallyExportedCustomSymbol: unique symbol; export { MAX_UNSIGNED_VALUE } /** @public */ export declare namespace NamespaceContainingVariable { /* Excluded from this release type: variable */ } /** * This class gets aliased twice before being exported from the package. * @public */ export declare class ReexportedClass { getSelfReference(): ReexportedClass; getValue(): string; } /** @public */ export declare class ReferenceLibDirective extends Intl.PluralRules { } /** * @public */ export declare enum RegularEnum { /** * These are some docs for Zero */ Zero = 0, /** * These are some docs for One */ One = 1, /** * These are some docs for Two */ Two = 2 } /** * This class has links such as {@link TypeReferencesInAedoc}. * @public */ export declare class TypeReferencesInAedoc { /** * Returns a value * @param arg1 - The input parameter of type {@link TypeReferencesInAedoc}. * @returns An object of type {@link TypeReferencesInAedoc}. */ getValue(arg1: TypeReferencesInAedoc): TypeReferencesInAedoc; /** {@inheritDoc api-extractor-test-01#TypeReferencesInAedoc.getValue} */ getValue2(arg1: TypeReferencesInAedoc): TypeReferencesInAedoc; /** * @param arg - Malformed param reference. */ getValue3(arg1: TypeReferencesInAedoc): TypeReferencesInAedoc; } declare const unexportedCustomSymbol: unique symbol; /** @public */ export declare class UseLong { use_long(): Long_2; } /* Excluded from this release type: VARIABLE */ /** * Example decorator * @public */ export declare function virtual(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<any>): void; export { } ```
/content/code_sandbox/build-tests/api-extractor-test-01/dist/api-extractor-test-01-beta.d.ts
xml
2016-09-30T00:28:20
2024-08-16T18:54:35
rushstack
microsoft/rushstack
5,790
1,789
```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 {SVGCharMap, AddPaths} from '../../FontData.js'; import {texSize4 as font} from '../../../common/fonts/tex/tex-size4.js'; export const texSize4: SVGCharMap = AddPaths(font, { 0x28: '758 -1237T758 -1240T752 -1249H736Q718 -1249 717 -1248Q711 -1245 672 -1199Q237 -706 237 251T672 1700Q697 1730 716 1749Q718 1750 735 1750H752Q758 1744 758 1741Q758 1737 740 1713T689 1644T619 1537T540 1380T463 1176Q348 802 348 251Q348 -242 441 -599T744 -1218Q758 -1237 758 -1240', 0x29: '33 1741Q33 1750 51 1750H60H65Q73 1750 81 1743T119 1700Q554 1207 554 251Q554 -707 119 -1199Q76 -1250 66 -1250Q65 -1250 62 -1250T56 -1249Q55 -1249 53 -1249T49 -1250Q33 -1250 33 -1239Q33 -1236 50 -1214T98 -1150T163 -1052T238 -910T311 -727Q443 -335 443 251Q443 402 436 532T405 831T339 1142T224 1438T50 1716Q33 1737 33 1741', 0x2F: '1166 1738Q1176 1750 1189 1750T1211 1742T1221 1721Q1221 1720 1221 1718T1220 1715Q1219 1708 666 238T111 -1237Q102 -1249 86 -1249Q74 -1249 65 -1240T56 -1220Q56 -1219 56 -1217T57 -1214Q58 -1207 611 263T1166 1738', 0x5B: '269 -1249V1750H577V1677H342V-1176H577V-1249H269', 0x5C: '56 1720Q56 1732 64 1741T85 1750Q104 1750 111 1738Q113 1734 666 264T1220 -1214Q1220 -1215 1220 -1217T1221 -1220Q1221 -1231 1212 -1240T1191 -1249Q1175 -1249 1166 -1237Q1164 -1233 611 237T57 1715Q57 1716 56 1718V1720', 0x5D: '5 1677V1750H313V-1249H5V-1176H240V1677H5', 0x7B: '661 -1243L655 -1249H622L604 -1240Q503 -1190 434 -1107T348 -909Q346 -897 346 -499L345 -98L343 -82Q335 3 287 87T157 223Q146 232 145 236Q144 240 144 250Q144 265 145 268T157 278Q242 333 288 417T343 583L345 600L346 1001Q346 1398 348 1410Q379 1622 600 1739L622 1750H655L661 1744V1727V1721Q661 1712 661 1710T657 1705T648 1700T630 1690T602 1668Q589 1659 574 1643T531 1593T484 1508T459 1398Q458 1389 458 1001Q458 614 457 605Q441 435 301 316Q254 277 202 251L250 222Q260 216 301 185Q443 66 457 -104Q458 -113 458 -501Q458 -888 459 -897Q463 -944 478 -988T509 -1060T548 -1114T580 -1149T602 -1167Q620 -1183 634 -1192T653 -1202T659 -1207T661 -1220V-1226V-1243', 0x7D: '144 1727Q144 1743 146 1746T162 1750H167H183L203 1740Q274 1705 325 1658T403 1562T440 1478T456 1410Q458 1398 458 1001Q459 661 459 624T465 558Q470 526 480 496T502 441T529 395T559 356T588 325T615 301T637 284T654 273L660 269V266Q660 263 660 259T661 250V239Q661 236 661 234T660 232T656 229T649 224Q577 179 528 105T465 -57Q460 -86 460 -123T458 -499V-661Q458 -857 457 -893T447 -955Q425 -1048 359 -1120T203 -1239L183 -1249H168Q150 -1249 147 -1246T144 -1226Q144 -1213 145 -1210T153 -1202Q169 -1193 186 -1181T232 -1140T282 -1081T322 -1000T345 -897Q346 -888 346 -501Q346 -113 347 -104Q359 58 503 184Q554 226 603 250Q504 299 430 393T347 605Q346 614 346 1002Q346 1389 345 1398Q338 1493 288 1573T153 1703Q146 1707 145 1710T144 1727', 0x2C6: '5 561Q-4 561 -9 582T-14 618Q-14 623 -13 625Q-11 628 461 736T943 845Q945 845 1417 738T1896 628Q1902 628 1902 618Q1902 607 1897 584T1883 561Q1881 561 1412 654L945 750L476 654Q6 561 5 561', 0x2DC: '1212 583Q1124 583 1048 603T923 647T799 691T635 711Q524 711 375 679T120 615L16 583Q14 584 12 587T9 592Q-2 650 2 659Q2 669 38 687Q54 696 146 723T309 767Q527 823 666 823Q759 823 837 803T964 759T1088 715T1252 695Q1363 695 1512 727T1764 791T1871 823Q1872 822 1874 819T1878 814Q1885 783 1885 753Q1885 748 1884 747Q1884 738 1849 719Q1836 712 1740 682T1484 617T1212 583', 0x302: '-1884 561Q-1893 561 -1898 582T-1903 618Q-1903 623 -1902 625Q-1900 628 -1428 736T-946 845Q-944 845 -472 738T7 628Q13 628 13 618Q13 607 8 584T-6 561Q-8 561 -477 654L-944 750L-1413 654Q-1883 561 -1884 561', 0x303: '-677 583Q-765 583 -841 603T-966 647T-1090 691T-1254 711Q-1365 711 -1514 679T-1768 615L-1873 583Q-1875 584 -1877 587T-1880 592Q-1891 650 -1887 659Q-1887 669 -1851 687Q-1835 696 -1743 723T-1580 767Q-1362 823 -1223 823Q-1130 823 -1052 803T-925 759T-801 715T-637 695Q-526 695 -377 727T-125 791T-18 823Q-17 822 -15 819T-11 814Q-4 782 -4 753Q-4 748 -5 747Q-5 738 -40 719Q-53 712 -149 682T-405 617T-677 583', 0x2044: '1166 1738Q1176 1750 1189 1750T1211 1742T1221 1721Q1221 1720 1221 1718T1220 1715Q1219 1708 666 238T111 -1237Q102 -1249 86 -1249Q74 -1249 65 -1240T56 -1220Q56 -1219 56 -1217T57 -1214Q58 -1207 611 263T1166 1738', 0x221A: '983 1739Q988 1750 1001 1750Q1008 1750 1013 1745T1020 1733Q1020 1726 742 244T460 -1241Q458 -1250 439 -1250H436Q424 -1250 424 -1248L410 -1166Q395 -1083 367 -920T312 -601L201 44L137 -83L111 -57L187 96L264 247Q265 246 369 -357Q470 -958 473 -963L727 384Q979 1729 983 1739', 0x2308: '269 -1249V1750H633V1677H342V-1249H269', 0x2309: '5 1677V1750H369V-1249H296V1677H5', 0x230A: '269 -1249V1750H342V-1176H633V-1249H269', 0x230B: '296 -1176V1750H369V-1249H5V-1176H296', 0x2329: '140 242V260L386 994Q633 1729 635 1732Q643 1745 657 1749Q658 1749 662 1749T668 1750Q682 1749 692 1740T702 1714V1705L214 251L703 -1204L702 -1213Q702 -1230 692 -1239T667 -1248H664Q647 -1248 635 -1231Q633 -1228 386 -493L140 242', 0x232A: '103 1714Q103 1732 114 1741T137 1750Q157 1750 170 1732Q172 1729 419 994L665 260V242L419 -493Q172 -1228 170 -1231Q158 -1248 141 -1248H138Q123 -1248 113 -1239T103 -1213V-1204L591 251L103 1705V1714', 0x239B: '837 1154Q843 1148 843 1145Q843 1141 818 1106T753 1002T667 841T574 604T494 299Q417 -84 417 -609Q417 -641 416 -647T411 -654Q409 -655 366 -655Q299 -655 297 -654Q292 -652 292 -643T291 -583Q293 -400 304 -242T347 110T432 470T574 813T785 1136Q787 1139 790 1142T794 1147T796 1150T799 1152T802 1153T807 1154T813 1154H819H837', 0x239C: '413 -9Q412 -9 407 -9T388 -10T354 -10Q300 -10 297 -9Q294 -8 293 -5Q291 5 291 127V300Q291 602 292 605L296 609Q298 610 366 610Q382 610 392 610T407 610T412 609Q416 609 416 592T417 473V127Q417 -9 413 -9', 0x239D: '843 -635Q843 -638 837 -644H820Q801 -644 800 -643Q792 -635 785 -626Q684 -503 605 -363T473 -75T385 216T330 518T302 809T291 1093Q291 1144 291 1153T296 1164Q298 1165 366 1165Q409 1165 411 1164Q415 1163 416 1157T417 1119Q417 529 517 109T833 -617Q843 -631 843 -635', 0x239E: '31 1143Q31 1154 49 1154H59Q72 1154 75 1152T89 1136Q190 1013 269 873T401 585T489 294T544 -8T572 -299T583 -583Q583 -634 583 -643T577 -654Q575 -655 508 -655Q465 -655 463 -654Q459 -653 458 -647T457 -609Q457 -58 371 340T100 1037Q87 1059 61 1098T31 1143', 0x239F: '579 -9Q578 -9 573 -9T554 -10T520 -10Q466 -10 463 -9Q460 -8 459 -5Q457 5 457 127V300Q457 602 458 605L462 609Q464 610 532 610Q548 610 558 610T573 610T578 609Q582 609 582 592T583 473V127Q583 -9 579 -9', 0x23A0: '56 -644H50Q31 -644 31 -635Q31 -632 37 -622Q69 -579 100 -527Q286 -228 371 170T457 1119Q457 1161 462 1164Q464 1165 520 1165Q575 1165 577 1164Q582 1162 582 1153T583 1093Q581 910 570 752T527 400T442 40T300 -303T89 -626Q78 -640 75 -642T61 -644H56', 0x23A1: '319 -645V1154H666V1070H403V-645H319', 0x23A2: '319 0V602H403V0H319', 0x23A3: '319 -644V1155H403V-560H666V-644H319', 0x23A4: '0 1070V1154H347V-645H263V1070H0', 0x23A5: '263 0V602H347V0H263', 0x23A6: '263 -560V1155H347V-644H0V-560H263', 0x23A7: '712 899L718 893V876V865Q718 854 704 846Q627 793 577 710T510 525Q510 524 509 521Q505 493 504 349Q504 345 504 334Q504 277 504 240Q504 -2 503 -4Q502 -8 494 -9T444 -10Q392 -10 390 -9Q387 -8 386 -5Q384 5 384 230Q384 262 384 312T383 382Q383 481 392 535T434 656Q510 806 664 892L677 899H712', 0x23A8: '389 1159Q391 1160 455 1160Q496 1160 498 1159Q501 1158 502 1155Q504 1145 504 924Q504 691 503 682Q494 549 425 439T243 259L229 250L243 241Q349 175 421 66T503 -182Q504 -191 504 -424Q504 -600 504 -629T499 -659H498Q496 -660 444 -660T390 -659Q387 -658 386 -655Q384 -645 384 -425V-282Q384 -176 377 -116T342 10Q325 54 301 92T255 155T214 196T183 222T171 232Q170 233 170 250T171 268Q171 269 191 284T240 331T300 407T354 524T383 679Q384 691 384 925Q384 1152 385 1155L389 1159', 0x23A9: '718 -893L712 -899H677L666 -893Q542 -825 468 -714T385 -476Q384 -466 384 -282Q384 3 385 5L389 9Q392 10 444 10Q486 10 494 9T503 4Q504 2 504 -239V-310V-366Q504 -470 508 -513T530 -609Q546 -657 569 -698T617 -767T661 -812T699 -843T717 -856T718 -876V-893', 0x23AA: '384 150V266Q384 304 389 309Q391 310 455 310Q496 310 498 309Q502 308 503 298Q504 283 504 150Q504 32 504 12T499 -9H498Q496 -10 444 -10T390 -9Q386 -8 385 2Q384 17 384 150', 0x23AB: '170 875Q170 892 172 895T189 899H194H211L222 893Q345 826 420 715T503 476Q504 467 504 230Q504 51 504 21T499 -9H498Q496 -10 444 -10Q402 -10 394 -9T385 -4Q384 -2 384 240V311V366Q384 469 380 513T358 609Q342 657 319 698T271 767T227 812T189 843T171 856T170 875', 0x23AC: '389 1159Q391 1160 455 1160Q496 1160 498 1159Q501 1158 502 1155Q504 1145 504 925V782Q504 676 511 616T546 490Q563 446 587 408T633 345T674 304T705 278T717 268Q718 267 718 250T717 232Q717 231 697 216T648 169T588 93T534 -24T505 -179Q504 -191 504 -425Q504 -600 504 -629T499 -659H498Q496 -660 444 -660T390 -659Q387 -658 386 -655Q384 -645 384 -424Q384 -191 385 -182Q394 -49 463 61T645 241L659 250L645 259Q539 325 467 434T385 682Q384 692 384 873Q384 1153 385 1155L389 1159', 0x23AD: '384 -239V-57Q384 4 389 9Q391 10 455 10Q496 10 498 9Q501 8 502 5Q504 -5 504 -230Q504 -261 504 -311T505 -381Q505 -486 492 -551T435 -691Q357 -820 222 -893L211 -899H195Q176 -899 173 -896T170 -874Q170 -858 171 -855T184 -846Q262 -793 312 -709T378 -525Q378 -524 379 -522Q383 -493 384 -351Q384 -345 384 -334Q384 -276 384 -239', 0x23B7: '742 -871Q740 -873 737 -876T733 -880T730 -882T724 -884T714 -885H702L222 569L180 484Q138 399 137 399Q131 404 124 412L111 425L265 736L702 -586V168L703 922Q713 935 722 935Q734 935 742 920V-871', 0x27E8: '140 242V260L386 994Q633 1729 635 1732Q643 1745 657 1749Q658 1749 662 1749T668 1750Q682 1749 692 1740T702 1714V1705L214 251L703 -1204L702 -1213Q702 -1230 692 -1239T667 -1248H664Q647 -1248 635 -1231Q633 -1228 386 -493L140 242', 0x27E9: '103 1714Q103 1732 114 1741T137 1750Q157 1750 170 1732Q172 1729 419 994L665 260V242L419 -493Q172 -1228 170 -1231Q158 -1248 141 -1248H138Q123 -1248 113 -1239T103 -1213V-1204L591 251L103 1705V1714', 0x3008: '140 242V260L386 994Q633 1729 635 1732Q643 1745 657 1749Q658 1749 662 1749T668 1750Q682 1749 692 1740T702 1714V1705L214 251L703 -1204L702 -1213Q702 -1230 692 -1239T667 -1248H664Q647 -1248 635 -1231Q633 -1228 386 -493L140 242', 0x3009: '103 1714Q103 1732 114 1741T137 1750Q157 1750 170 1732Q172 1729 419 994L665 260V242L419 -493Q172 -1228 170 -1231Q158 -1248 141 -1248H138Q123 -1248 113 -1239T103 -1213V-1204L591 251L103 1705V1714', 0xE000: '722 -14H720Q708 -14 702 0V306L703 612Q713 625 722 625Q734 625 742 610V0Q734 -14 724 -14H722', 0xE001: '702 589Q706 601 718 605H1061Q1076 597 1076 585Q1076 572 1061 565H742V0Q734 -14 724 -14H722H720Q708 -14 702 0V589', 0xE150: '-18 -213L-24 -207V-172L-16 -158Q75 2 260 84Q334 113 415 119Q418 119 427 119T440 120Q454 120 457 117T460 98V60V25Q460 7 457 4T441 0Q308 0 193 -55T25 -205Q21 -211 18 -212T-1 -213H-18', 0xE151: '-10 60Q-10 104 -10 111T-5 118Q-1 120 10 120Q96 120 190 84Q375 2 466 -158L474 -172V-207L468 -213H451H447Q437 -213 434 -213T428 -209T423 -202T414 -187T396 -163Q331 -82 224 -41T9 0Q-4 0 -7 3T-10 25V60', 0xE152: '-24 327L-18 333H-1Q11 333 15 333T22 329T27 322T35 308T54 284Q115 203 225 162T441 120Q454 120 457 117T460 95V60V28Q460 8 457 4T442 0Q355 0 260 36Q75 118 -16 278L-24 292V327', 0xE153: '-10 60V95Q-10 113 -7 116T9 120Q151 120 250 171T396 284Q404 293 412 305T424 324T431 331Q433 333 451 333H468L474 327V292L466 278Q375 118 190 36Q95 0 8 0Q-5 0 -7 3T-10 24V60', 0xE154: '-10 0V120H410V0H-10', },{ 0xE155: "\uE153\uE152", 0xE156: "\uE151\uE150", }); ```
/content/code_sandbox/ts/output/svg/fonts/tex/tex-size4.ts
xml
2016-02-23T09:52:03
2024-08-16T04:46:50
MathJax-src
mathjax/MathJax-src
2,017
6,064
```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 { HarnessLoader } from "@angular/cdk/testing"; import { TestbedHarnessEnvironment } from "@angular/cdk/testing/testbed"; import { HttpClientModule } from "@angular/common/http"; import { ComponentFixture, TestBed } from "@angular/core/testing"; import { ReactiveFormsModule } from "@angular/forms"; import { MatButtonHarness } from "@angular/material/button/testing"; import { MatDialogModule } from "@angular/material/dialog"; import { MatDialogHarness } from "@angular/material/dialog/testing"; import { MatSelectModule } from "@angular/material/select"; import { NoopAnimationsModule } from "@angular/platform-browser/animations"; import { RouterTestingModule } from "@angular/router/testing"; import { ReplaySubject } from "rxjs"; import { ResponseCDN } from "trafficops-types"; import { CDNService } from "src/app/api"; import { APITestingModule } from "src/app/api/testing"; import { NavigationService } from "src/app/shared/navigation/navigation.service"; import { CDNTableComponent } from "./cdn-table.component"; const sampleCDN: ResponseCDN = { dnssecEnabled: false, domainName: "*", id: 2, lastUpdated: new Date(), name: "*", }; describe("CDNTableComponent", () => { let component: CDNTableComponent; let fixture: ComponentFixture<CDNTableComponent>; let loader: HarnessLoader; const navService = jasmine.createSpyObj([],{headerHidden: new ReplaySubject<boolean>(), headerTitle: new ReplaySubject<string>()}); beforeEach(async () => { await TestBed.configureTestingModule({ declarations: [CDNTableComponent], imports: [ APITestingModule, HttpClientModule, ReactiveFormsModule, RouterTestingModule, MatDialogModule, NoopAnimationsModule, MatSelectModule, ], providers: [ {provide: NavigationService, useValue: navService}, ], }) .compileComponents(); fixture = TestBed.createComponent(CDNTableComponent); component = fixture.componentInstance; fixture.detectChanges(); loader = TestbedHarnessEnvironment.documentRootLoader(fixture); }); it("should create", () => { expect(component).toBeTruthy(); }); it("queues CDN updates", async () => { component = fixture.componentInstance; const service = TestBed.inject(CDNService); const queueSpy = spyOn(service, "queueServerUpdates"); expect(queueSpy).not.toHaveBeenCalled(); let dialogs = await loader.getAllHarnesses(MatDialogHarness); expect(dialogs.length).toBe(0); component.handleContextMenu({action: "queue", data: sampleCDN}); dialogs = await loader.getAllHarnesses(MatDialogHarness); expect(dialogs.length).toBe(1); const dialog = dialogs[0]; const buttons = await dialog.getAllHarnesses(MatButtonHarness); expect(buttons.length).toBe(2); const button = buttons[0]; await button.click(); expect(queueSpy).toHaveBeenCalledTimes(1); }); }); ```
/content/code_sandbox/experimental/traffic-portal/src/app/core/cdns/cdn-table/cdn-table.component.spec.ts
xml
2016-09-02T07:00:06
2024-08-16T03:50:21
trafficcontrol
apache/trafficcontrol
1,043
660
```xml <?xml version="1.0" encoding="utf-8"?> <!-- FILE INFORMATION Public Reachable Information Path: path_to_url Name: 504.xml NORMATIVE INFORMATION Send comments to path_to_url LEGAL DISCLAIMER Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The above license is used as a license under copyright only. Please reference the OMA IPR Policy for patent licensing terms: path_to_url --> <LWM2M xmlns:xsi="path_to_url" xsi:noNamespaceSchemaLocation="path_to_url"> <Object ObjectType="MODefinition"> <Name>Remote SIM Provisioning</Name> <Description1><![CDATA[This is a device management object that should be used for Remote SIM Provisioning according to GSMA standards]]></Description1> <ObjectID>504</ObjectID> <ObjectURN>urn:oma:lwm2m:oma:504</ObjectURN> <LWM2MVersion>1.0</LWM2MVersion> <ObjectVersion>1.0</ObjectVersion> <MultipleInstances>Multiple</MultipleInstances> <Mandatory>Optional</Mandatory> <Resources> <Item ID="0"> <Name>Current SIM Type</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Mandatory</Mandatory> <Type>Integer</Type> <RangeEnumeration>0..3</RangeEnumeration> <Units></Units> <Description><![CDATA[Provides the information about the currently being used SIM Type: 0: UICC (removable) 1: eUICC (removable) 2: eUICC (non-removable) 3: iUICC 4-24: Reserved for future use]]></Description> </Item> <Item ID="1"> <Name>Supported SIM Type</Name> <Operations>R</Operations> <MultipleInstances>Multiple</MultipleInstances> <Mandatory>Mandatory</Mandatory> <Type>Integer</Type> <RangeEnumeration>0..3</RangeEnumeration> <Units></Units> <Description><![CDATA[Provides the information about the currently supported SIM Types: 0: UICC (removable) 1: eUICC (removable) 2: eUICC (non-removable) 3: iUICC 4-24: Reserved for future use]]></Description> </Item> <Item ID="2"> <Name>Service Provider Name</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration></RangeEnumeration> <Units></Units> <Description><![CDATA[Provides the name of the Service Provider assocatiated with the downloaded profile or the profile currently being downloaded.]]></Description> </Item> <Item ID="3"> <Name>Download URI/Information</Name> <Operations>RW</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration>0..255</RangeEnumeration> <Units></Units> <Description><![CDATA[URI, or formatted data containing the URI (e.g. GSMA SGP.22 Activation Code), from where the device can download the profile package by an alternative mechanism. The URI format is defined in RFC 3986.]]></Description> </Item> <Item ID="4"> <Name>RSP Update</Name> <Operations>E</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type></Type> <RangeEnumeration></RangeEnumeration> <Units></Units> <Description><![CDATA[Executes one or more RSP actions. The actions are given as arguments and in case providing multiple actions comma separation is used, e.g. 0,1,2. The following values are possible: 0: Download & install profile 1: Enable profile - for profile identified by resource 14 2: Disable profile - for profile identified by resource 14 3: Delete profile - for profile identified by resource 14 4: Reset memory of current SIM 5-24: Reserved for future use]]></Description> </Item> <Item ID="5"> <Name>RSP Update State</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>Integer</Type> <RangeEnumeration>0..10</RangeEnumeration> <Units></Units> <Description><![CDATA[Indicates current state with respect to the executed RSP action(s) in the RSP update resource. This value is set by the LwM2M Client. 0: Idle (before downloading a profile or after successful completetion of the action(s)) 1: Downloading (The data sequence is on the way) 2: Downloaded profile ready for installation 3: Installing 5: Enabling 6: Disabling 7: Deleting 8: Resetting memory 9: Pending end-user consent 10: Pending confirmation code 11-24: Reserved for future use]]></Description> </Item> <Item ID="6"> <Name>RSP Update Result</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>Integer</Type> <RangeEnumeration>0..16</RangeEnumeration> <Units></Units> <Description><![CDATA[Contains the result of the executed RSP action(s) in the RSP update resource. 0: Initial value. Once the updating process is initiated (Download /Update), this Resource MUST be reset to Initial value. 1: RSP action completed successfully. 2: Not enough SIM memory for the new Profile package. 3. Out of RAM during downloading process. 4: Connection lost during downloading process. 5: Integrity check failure for new downloaded profile package. 6: Unsupported profile package type. 7: Invalid URI 8: Unsupported protocol. 9: Not authorized to download profile at the given URI. 10: Failed to authenticate server given by the URI. 11: Generic download and installation error. 12: Error in profile package format 13: Failed to enable profile. 14: Failed to disable profile. 15: Failed to delete profile. 16: Failed to reset memory. 17-24: Reserved for future use]]></Description> </Item> <Item ID="7"> <Name>Profile Name</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration>0..255</RangeEnumeration> <Units></Units> <Description><![CDATA[Name of the downloaded profile / profile package or the profile / profile package currently being downloaded.]]></Description> </Item> <Item ID="8"> <Name>Profile Package Version</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration>0..255</RangeEnumeration> <Units></Units> <Description><![CDATA[Version of the downloaded profile / profile package or the profile / profile package currently being downloaded.]]></Description> </Item> <Item ID="9"> <Name>Free Memory on SIM</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>Integer</Type> <RangeEnumeration></RangeEnumeration> <Units>KiB</Units> <Description><![CDATA[Estimated current available amount of storage space on SIM which can store data and software in the LwM2M Device (expressed in kibibytes).]]></Description> </Item> <Item ID="10"> <Name>Total Memory on SIM</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>Integer</Type> <RangeEnumeration></RangeEnumeration> <Units>KiB</Units> <Description><![CDATA[Total amount of storage space which can store data and software in the LwM2M Device]]></Description> </Item> <Item ID="11"> <Name>Integrated Circuit Card Identifier (ICCID)</Name> <Operations>R</Operations> <MultipleInstances>Multiple</MultipleInstances> <Mandatory>Mandatory</Mandatory> <Type>String</Type> <RangeEnumeration></RangeEnumeration> <Units></Units> <Description><![CDATA[This resource provides the unique identification number for each installed profile of the current SIM in case of RSP support or the unique identification number of the current SIM in case of current SIM being a UICC with no RSP support. Please refer ETSI TS 102.22.1. In case of multiple installed profiles, the currently active profile is the first instance.]]></Description> </Item> <Item ID="12"> <Name>eUICC ID</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration></RangeEnumeration> <Units></Units> <Description><![CDATA[eUICC-ID (a.k.a. EID), see GSMA SGP.02 and GSMA SGP.29 for definitions]]></Description> </Item> <Item ID="13"> <Name>RSP Type</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Mandatory</Mandatory> <Type>Integer</Type> <RangeEnumeration></RangeEnumeration> <Units></Units> <Description><![CDATA[Provides the information about the Remote SIM Provisioning (RSP) type of the current SIM: 0: No RSP support 1: GSMA eSIM for M2M devices 2: GSMA eSIM for consumer devices 3-24: Reserved for future use]]></Description> </Item> <Item ID="14"> <Name>Selected ICCID for RSP operation</Name> <Operations>RW</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration></RangeEnumeration> <Units></Units> <Description><![CDATA[Indicates ICCID of profile selected for profile specific RSP operations. This resource must be present if multiple installed profiles is supported by the RSP implementation. In case of only support for a single profile at a time this resource is not required to be present for profile selection. After successful installation of a profile the value of this resource (if present) is updated to the ICCID of the installed profile.]]></Description> </Item> <Item ID="15"> <Name>RSP Consent Reason</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration></RangeEnumeration> <Units></Units> <Description><![CDATA[Provides information on the requested user consent]]></Description> </Item> <Item ID="16"> <Name>RSP User Consent</Name> <Operations>W</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>Integer</Type> <RangeEnumeration>0..1</RangeEnumeration> <Units></Units> <Description><![CDATA[User consent decision. The following values are possible: 0: Approved 1: Rejected 2-24: Reserved for future use]]></Description> </Item> <Item ID="17"> <Name>RSP Confirmation Code</Name> <Operations>W</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>String</Type> <RangeEnumeration></RangeEnumeration> <Units></Units> <Description><![CDATA[Provides a confirmation code (see e.g. GSMA SGP.21/22)]]></Description> </Item> <Item ID="18"> <Name>RSP Data Type</Name> <Operations>RW</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>Integer</Type> <RangeEnumeration>0..17</RangeEnumeration> <Units></Units> <Description><![CDATA[RSP data type for set and get RSP data: 0: SM-DP+ default address (see GSMA SGP.22) 1: eUICCInfo2 (see GSMA SGP.22) 2: DeviceInfo (see GSMA SGP.22) 3: eSIM Profile Metadata (GSMA SGP.22 ProfileInfo default data for all installed profiles) 5: ISD-P AID (see GSMA SGP.22) - for profile identified by resource 14 6: Profile state (see GSMA SGP.22) - for profile identified by resource 14 7: Profile Nickname (see GSMA SGP.22) - for profile identified by resource 14 8: Service provider name (see GSMA SGP.22) - for profile identified by resource 14 9: Profile name (see GSMA SGP.22) - for profile identified by resource 14 10: Icon type (see GSMA SGP.22) - for profile identified by resource 14 11: Icon (see GSMA SGP.22) - for profile identified by resource 14 12: Profile Class (see GSMA SGP.22) - for profile identified by resource 14 13: Notification Configuration Info (see GSMA SGP.22) - for profile identified by resource 14 14: Profile Owner (see GSMA SGP.22) - for profile identified by resource 14 15: SM-DP+ proprietary data (see GSMA SGP.22) - for profile identified by resource 14 16: Profile Policy Rules (see GSMA SGP.22) - for profile identified by resource 14 17: RSP formatted data request/response (RSP type specific) 18-24: Reserved for future use]]></Description> </Item> <Item ID="19"> <Name>Set RSP Data</Name> <Operations>W</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>Opaque</Type> <RangeEnumeration></RangeEnumeration> <Units></Units> <Description><![CDATA[This resource is used to update the (e/i)UICC data / profile specific data of type according to resource 30. It is up to the RSP type whether update of the data is possible or not.]]></Description> </Item> <Item ID="20"> <Name>Get RSP Data</Name> <Operations>R</Operations> <MultipleInstances>Single</MultipleInstances> <Mandatory>Optional</Mandatory> <Type>Opaque</Type> <RangeEnumeration></RangeEnumeration> <Units></Units> <Description><![CDATA[This resource is used to retrieve the (e/i)UICC data / profile specific data of type according to resource 30. It is up to the RSP type whether retrieval of the data is possible or not.]]></Description> </Item> </Resources> <Description2 /> </Object> </LWM2M> ```
/content/code_sandbox/application/src/main/data/lwm2m-registry/504.xml
xml
2016-12-01T09:33:30
2024-08-16T19:58:25
thingsboard
thingsboard/thingsboard
16,820
3,838
```xml import style from './cssWithEscapedSymbols.module.css'; console.log('style', style.test); export default function Bar() { return ( <div className={style.test}> bar </div> ); } ```
/content/code_sandbox/examples/basic-project/src/components/bar.tsx
xml
2016-11-03T06:59:15
2024-08-16T10:11:29
ice
alibaba/ice
17,815
48
```xml namespace pxt { // These functions are defined in docfiles/pxtweb/cookieCompliance.ts export declare function aiTrackEvent(id: string, data?: any, measures?: any): void; export declare function aiTrackException(err: any, kind: string, props: any): void; export declare function setInteractiveConsent(enabled: boolean): void; } namespace pxt.analytics { const defaultProps: Map<string> = {}; const defaultMeasures: Map<number> = {}; let enabled = false; export enum ConsoleTickOptions { Off, Short, Verbose }; export let consoleTicks: ConsoleTickOptions = ConsoleTickOptions.Off; export function addDefaultProperties(props: Map<string | number>) { Object.keys(props).forEach(k => { if (typeof props[k] == "string") { defaultProps[k] = <string>props[k]; } else { defaultMeasures[k] = <number>props[k]; } }); } export function enable(lang: string) { if (!pxt.aiTrackException || !pxt.aiTrackEvent || enabled) return; enabled = true; if (typeof lang != "string" || lang.length == 0) { lang = "en"; //Always have a default language. } addDefaultProperties({ lang: lang }) pxt.debug('setting up app insights') const te = pxt.tickEvent; pxt.tickEvent = function (id: string, data?: Map<string | number>, opts?: TelemetryEventOptions): void { if (consoleTicks != ConsoleTickOptions.Off) { const prefix = consoleTicks == ConsoleTickOptions.Short ? "" : `${new Date().toLocaleTimeString(undefined, { hour12: false })} - Tick - `; const tickInfo = `${id} ${data ? JSON.stringify(data) : "<no data>"} ${opts ? JSON.stringify(opts) : "<no opts>"}`; console.log(prefix + tickInfo); } if (te) te(id, data, opts); if (opts?.interactiveConsent) pxt.setInteractiveConsent(true); if (!data) pxt.aiTrackEvent(id); else { const props: Map<string> = { ...defaultProps } || {}; const measures: Map<number> = { ...defaultMeasures } || {}; Object.keys(data).forEach(k => { if (typeof data[k] == "string") props[k] = <string>data[k]; else if (typeof data[k] == "number") measures[k] = <number>data[k]; else props[k] = JSON.stringify(data[k] || ''); }); pxt.aiTrackEvent(id, props, measures); } }; const rexp = pxt.reportException; pxt.reportException = function (err: any, data: pxt.Map<string | number>): void { if (rexp) rexp(err, data); const props: pxt.Map<string> = { target: pxt.appTarget.id, version: pxt.appTarget.versions.target } if (data) Util.jsonMergeFrom(props, data); pxt.aiTrackException(err, 'exception', props) }; const re = pxt.reportError; pxt.reportError = function (cat: string, msg: string, data?: pxt.Map<string | number>): void { if (re) re(cat, msg, data); try { throw msg } catch (err) { const props: pxt.Map<string> = { target: pxt.appTarget.id, version: pxt.appTarget.versions.target, category: cat, message: msg } if (data) Util.jsonMergeFrom(props, data); pxt.aiTrackException(err, 'error', props); } }; } export function trackPerformanceReport() { if (pxt.perf.perfReportLogged) return; const data = pxt.perf.report(); if (data) { const { durations, milestones } = data; pxt.tickEvent("performance.milestones", milestones); pxt.tickEvent("performance.durations", durations); } } } ```
/content/code_sandbox/pxtlib/analytics.ts
xml
2016-01-24T19:35:52
2024-08-16T16:39:39
pxt
microsoft/pxt
2,069
909
```xml <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="path_to_url" xmlns:activiti="path_to_url" targetNamespace="Examples"> <process id="testExecutionAvailableProcess" name="Test execution available process"> <startEvent id="theStart" /> <sequenceFlow id="flow1" sourceRef="theStart" targetRef="servicetask1" /> <serviceTask id="servicetask1" name="ServiceTask 1" activiti:expression="${myVar.testMethod(execution)}" /> <sequenceFlow id="flow2" sourceRef="servicetask1" targetRef="userTask" /> <userTask id="userTask" /> <sequenceFlow id="flow3" sourceRef="userTask" targetRef="theEnd" /> <endEvent id="theEnd" /> </process> </definitions> ```
/content/code_sandbox/modules/flowable5-test/src/test/resources/org/activiti/engine/test/el/ExpressionManagerTest.testExecutionAvailable.bpmn20.xml
xml
2016-10-13T07:21:43
2024-08-16T15:23:14
flowable-engine
flowable/flowable-engine
7,715
203
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ // TypeScript Version: 4.1 /// <reference types="@stdlib/types"/> import { ArrayLike } from '@stdlib/types/array'; import { Complex64, Complex128, ComplexLike } from '@stdlib/types/complex'; /** * Default callback. * * @param x - input value * @returns result */ type DefaultCallback = ( x: number ) => number; /** * Callback for single-precision complex floating-point numbers. * * @param x - input value * @returns result */ type Complex64Callback = ( x: Complex64 ) => Complex64; /** * Callback for double-precision complex floating-point numbers. * * @param x - input value * @returns result */ type Complex128Callback = ( x: Complex128 ) => Complex128; /** * Real or complex number. */ type RealOrComplex = number | ComplexLike; /** * Callback. */ type Callback = ( x: RealOrComplex ) => RealOrComplex; /** * Interface describing a callback table. */ interface Table { /** * Default callback. */ default: DefaultCallback; /** * Callback for single-precision complex floating-point numbers. */ complex64: Complex64Callback; /** * Callback for double-precision complex floating-point numbers. */ complex128: Complex128Callback; } /** * Assigns callbacks to unary interfaces according to type promotion rules. * * ## Notes * * - The function assumes that the provided signature array has the following properties: * * - a strided array having a stride length of `2` (i.e., every `2` elements define a unary interface signature). * - for each signature (i.e., set of two consecutive non-overlapping strided array elements), the first element is the input data type and the second element is the return data type. * - all signatures follow type promotion rules. * * @param table - callback table * @param table.default - default callback * @param table.complex64 - callback for single-precision complex floating-point numbers * @param table.complex128 - callback for double-precision complex floating-point numbers * @param signatures - strided array containing unary interface signatures * @returns list of callbacks * * @example * var signatures = require( '@stdlib/strided/base/unary-dtype-signatures' ); * var identity = require( '@stdlib/math/base/special/identity' ); * var cidentity = require( '@stdlib/math/base/special/cidentity' ); * var cidentityf = require( '@stdlib/math/base/special/cidentityf' ); * * var dtypes = [ * 'float64', * 'float32', * 'int32', * 'uint8' * ]; * * var sigs = signatures( dtypes, dtypes ); * // returns [...] * * var table = { * 'default': identity, * 'complex64': cidentityf, * 'complex128': cidentity * }; * * var list = callbacks( table, sigs ); * // returns [...] */ declare function callbacks( table: Table, signatures: ArrayLike<any> ): ArrayLike<Callback>; // EXPORTS // export = callbacks; ```
/content/code_sandbox/lib/node_modules/@stdlib/strided/base/unary-signature-callbacks/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
729
```xml /* eslint-disable no-console */ import ms from 'ms'; import path from 'path'; import { once } from 'node:events'; import { URL } from 'url'; import semVer from 'semver'; import { homedir } from 'os'; import { runNpmInstall } from '@vercel/build-utils'; import { execCli } from './helpers/exec'; import fetch, { RequestInfo } from 'node-fetch'; import fs from 'fs-extra'; import { logo } from '../src/util/pkg-name'; import sleep from '../src/util/sleep'; import humanizePath from '../src/util/humanize-path'; import pkg from '../package.json'; import waitForPrompt from './helpers/wait-for-prompt'; import { getNewTmpDir, listTmpDirs } from './helpers/get-tmp-dir'; import { setupE2EFixture, prepareE2EFixtures, } from './helpers/setup-e2e-fixture'; import formatOutput from './helpers/format-output'; import type { DeploymentLike } from './helpers/types'; import { teamPromise, userPromise } from './helpers/get-account'; import { apiFetch } from './helpers/api-fetch'; const TEST_TIMEOUT = 3 * 60 * 1000; jest.setTimeout(TEST_TIMEOUT); const binaryPath = path.resolve(__dirname, `../scripts/start.js`); const deployHelpMessage = `${logo} vercel [options] <command | path>`; const session = Math.random().toString(36).split('.')[1]; const pickUrl = (stdout: string) => { const lines = stdout.split('\n'); return lines[lines.length - 1]; }; const waitForDeployment = async (href: RequestInfo) => { console.log(`waiting for ${href} to become ready...`); const start = Date.now(); const max = ms('4m'); // eslint-disable-next-line while (true) { const response = await fetch(href, { redirect: 'manual' }); const text = await response.text(); if ( response.status === 200 && !text.includes('<title>Deployment Overview') ) { break; } const current = Date.now(); if (current - start > max || response.status >= 500) { throw new Error( `Waiting for "${href}" failed since it took longer than 4 minutes.\n` + `Received status ${response.status}:\n"${text}"` ); } await sleep(2000); } }; beforeAll(async () => { try { const team = await teamPromise; await prepareE2EFixtures(team.slug, binaryPath); } catch (err) { console.log('Failed test suite `beforeAll`'); console.log(err); // force test suite to actually stop process.exit(1); } }); afterAll(async () => { delete process.env.ENABLE_EXPERIMENTAL_COREPACK; for (const tmpDir of listTmpDirs()) { console.log('Removing temp dir: ', tmpDir.name); tmpDir.removeCallback(); } }); test('[vc projects] should create a project successfully', async () => { const projectName = `vc-projects-add-${ Math.random().toString(36).split('.')[1] }`; const vc = execCli(binaryPath, ['project', 'add', projectName]); await waitForPrompt(vc, `Success! Project ${projectName} added`); const { exitCode, stdout, stderr } = await vc; expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); // creating the same project again should succeed const vc2 = execCli(binaryPath, ['project', 'add', projectName]); await waitForPrompt(vc2, `Success! Project ${projectName} added`); const { exitCode: exitCode2 } = await vc; expect(exitCode2).toBe(0); }); test('deploy with metadata containing "=" in the value', async () => { const target = await setupE2EFixture('static-v2-meta'); const { exitCode, stdout, stderr } = await execCli(binaryPath, [ target, '--yes', '--meta', 'someKey==', ]); expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); const { host } = new URL(stdout); const res = await apiFetch(`/v12/now/deployments/get?url=${host}`); const deployment = await res.json(); expect(deployment.meta.someKey).toBe('='); }); test('print the deploy help message', async () => { const { stderr, stdout, exitCode } = await execCli(binaryPath, ['help']); expect(exitCode, formatOutput({ stdout, stderr })).toBe(2); expect(stderr).toContain(deployHelpMessage); expect(stderr).not.toContain('ExperimentalWarning'); }); test('output the version', async () => { const { stdout, stderr, exitCode } = await execCli(binaryPath, ['--version']); const version = stdout.trim(); expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); expect(semVer.valid(version), `not valid semver: ${version}`).toBeTruthy(); expect(version).toBe(pkg.version); }); test('login with unregistered user', async () => { const { stdout, stderr, exitCode } = await execCli( binaryPath, ['login', `${session}@${session}.com`], { token: false } ); const goal = `Error: Please sign up: path_to_url`; const lines = stderr.trim().split('\n'); const last = lines[lines.length - 1]; expect(exitCode, formatOutput({ stdout, stderr })).toBe(1); expect(last).toContain(goal); }); test('ignore files specified in .nowignore', async () => { const directory = await setupE2EFixture('nowignore'); const args = ['--debug', '--public', '--name', session, '--yes']; const targetCall = await execCli(binaryPath, args, { cwd: directory, }); const { host } = new URL(targetCall.stdout); const ignoredFile = await fetch(`path_to_url{host}/ignored.txt`); expect(ignoredFile.status).toBe(404); const presentFile = await fetch(`path_to_url{host}/index.txt`); expect(presentFile.status).toBe(200); }); test('ignore files specified in .nowignore via allowlist', async () => { const directory = await setupE2EFixture('nowignore-allowlist'); const args = ['--debug', '--public', '--name', session, '--yes']; const targetCall = await execCli(binaryPath, args, { cwd: directory, }); const { host } = new URL(targetCall.stdout); const ignoredFile = await fetch(`path_to_url{host}/ignored.txt`); expect(ignoredFile.status).toBe(404); const presentFile = await fetch(`path_to_url{host}/index.txt`); expect(presentFile.status).toBe(200); }); test('list the scopes', async () => { const team = await teamPromise; const { stdout, stderr, exitCode } = await execCli(binaryPath, [ 'teams', 'ls', ]); expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); const include = new RegExp(`${team.slug}\\s+${team.name}`); expect(stderr).toMatch(include); }); test('domains inspect', async () => { const team = await teamPromise; const domainName = `inspect-${team.slug}-${Math.random() .toString() .slice(2, 8)}.org`; const directory = await setupE2EFixture('static-multiple-files'); const projectName = Math.random().toString().slice(2); const output = await execCli(binaryPath, [ directory, `--name=${projectName}`, '--yes', '--public', ]); expect(output.exitCode, formatOutput(output)).toBe(0); { // Add a domain that can be inspected const result = await execCli(binaryPath, [ `domains`, `add`, domainName, projectName, ]); expect(result.exitCode, formatOutput(result)).toBe(0); } const { exitCode, stdout, stderr } = await execCli(binaryPath, [ 'domains', 'inspect', domainName, ]); expect(stderr).toContain(`Renewal Price`); expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); { // Remove the domain again const result = await execCli(binaryPath, [`domains`, `rm`, domainName], { input: 'y', }); expect(result.exitCode, formatOutput(result)).toBe(0); } }); test('try to transfer-in a domain with "--code" option', async () => { const { stderr, stdout, exitCode } = await execCli(binaryPath, [ 'domains', 'transfer-in', '--code', 'xyz', `${session}-test.com`, ]); expect(stderr).toContain( `Error: The domain "${session}-test.com" is not transferable.` ); expect(exitCode, formatOutput({ stdout, stderr })).toBe(1); }); test('try to move an invalid domain', async () => { const { stderr, stdout, exitCode } = await execCli(binaryPath, [ 'domains', 'move', `${session}-invalid-test.org`, `${session}-invalid-user`, ]); expect(stderr).toContain(`Error: Domain not found under `); expect(exitCode, formatOutput({ stdout, stderr })).toBe(1); }); test('ensure we render a warning for deployments with no files', async () => { const directory = await setupE2EFixture('empty-directory'); const { stderr, stdout, exitCode } = await execCli(binaryPath, [ directory, '--public', '--name', session, '--yes', '--force', ]); // Ensure the warning is printed expect(stderr).toMatch(/There are no files inside your deployment/); // Test if the output is really a URL const { href, host } = new URL(stdout); expect(host.split('-')[0]).toBe(session); // Ensure the exit code is right expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); // Send a test request to the deployment const res = await fetch(href); expect(res.status).toBe(404); }); describe('given a deployment', () => { const context = { deploymentUrl: '', directory: '', stderr: '', stdout: '', exitCode: -1, }; beforeAll(async () => { const directory = await setupE2EFixture('runtime-logs'); Object.assign( context, await execCli(binaryPath, [directory, '--public', '--yes']) ); context.deploymentUrl = pickUrl(context.stdout); const { href } = new URL(context.deploymentUrl); await waitForDeployment(href); }); it('prints build logs', async () => { const { stderr, stdout, exitCode } = await execCli(binaryPath, [ 'inspect', context.deploymentUrl, '--logs', ]); const TIMESTAMP_FORMAT = /\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z)/; expect(stderr).toMatch(TIMESTAMP_FORMAT); const allLogs = formatOutput({ stdout, stderr }); expect(stderr, allLogs).toContain('Running "vercel build"'); expect(stderr, allLogs).toContain('Deploying outputs...'); expect(exitCode, allLogs).toBe(0); }); it('prints runtime logs as json', async () => { const [{ stdout, stderr }, res] = await Promise.all([ execCli( binaryPath, ['logs', context.deploymentUrl, '--json'], // kill the command since it could last up to 5 minutes { timeout: ms('10s') } ), fetch(`${context.deploymentUrl}/api/greetings`), ]); const allLogs = formatOutput({ stdout, stderr }); expect(res.status).toBe(200); expect(await res.json()).toEqual({ message: 'Hello, World!' }); expect(stderr, allLogs).toContain( `Displaying runtime logs for deployment ${ new URL(context.deploymentUrl).host }` ); expect(stdout, allLogs).toContain(`/api/greetings`); expect(stdout, allLogs).toContain(`hi!`); }); }); test('ensure we render a prompt when deploying home directory', async () => { const directory = homedir(); const { stderr, stdout, exitCode } = await execCli( binaryPath, [directory, '--public', '--name', session, '--force'], { input: 'N\n', } ); // Ensure the exit code is right expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); expect(stderr).toContain( 'You are deploying your home directory. Do you want to continue?' ); expect(stderr).toContain('Canceled'); }); test('ensure the `scope` property works with email', async () => { const directory = await setupE2EFixture('config-scope-property-email'); const { stderr, stdout, exitCode } = await execCli(binaryPath, [ directory, '--public', '--name', session, '--force', '--yes', ]); // Ensure we're deploying under the right scope expect(stderr).toContain(session); // Ensure the exit code is right expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); // Test if the output is really a URL const { href, host } = new URL(stdout); expect(host.split('-')[0]).toBe(session); // Send a test request to the deployment const response = await fetch(href); const contentType = response.headers.get('content-type'); expect(contentType).toBe('text/html; charset=utf-8'); }); test('ensure the `scope` property works with username', async () => { const team = await teamPromise; const directory = await setupE2EFixture('config-scope-property-username'); const { stderr, stdout, exitCode } = await execCli(binaryPath, [ directory, '--public', '--name', session, '--force', '--yes', ]); // Ensure we're deploying under the right scope expect(stderr).toContain(team.slug); // Ensure the exit code is right expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); // Test if the output is really a URL const { href, host } = new URL(stdout); expect(host.split('-')[0]).toBe(session); // Send a test request to the deployment const response = await fetch(href); const contentType = response.headers.get('content-type'); expect(contentType).toBe('text/html; charset=utf-8'); }); test('try to create a builds deployments with wrong now.json', async () => { const directory = await setupE2EFixture('builds-wrong'); const { stderr, stdout, exitCode } = await execCli(binaryPath, [ directory, '--public', '--yes', ]); // Ensure the exit code is right expect(exitCode, formatOutput({ stdout, stderr })).toBe(1); expect(stderr).toContain( 'Error: Invalid now.json - should NOT have additional property `builder`. Did you mean `builds`?' ); expect(stderr).toContain( 'path_to_url ); }); test('try to create a builds deployments with wrong vercel.json', async () => { const directory = await setupE2EFixture('builds-wrong-vercel'); const { stderr, stdout, exitCode } = await execCli(binaryPath, [ directory, '--public', '--yes', ]); expect(exitCode, formatOutput({ stdout, stderr })).toBe(1); expect(stderr).toContain( 'Error: Invalid vercel.json - should NOT have additional property `fake`. Please remove it.' ); expect(stderr).toContain( 'path_to_url ); }); test('try to create a builds deployments with wrong `build.env` property', async () => { const directory = await setupE2EFixture('builds-wrong-build-env'); const { exitCode, stdout, stderr } = await execCli( binaryPath, ['--public', '--yes'], { cwd: directory, } ); expect(exitCode, formatOutput({ stdout, stderr })).toBe(1); expect(stderr).toContain( 'Error: Invalid vercel.json - should NOT have additional property `build.env`. Did you mean `{ "build": { "env": {"name": "value"} } }`?' ); expect(stderr).toContain( 'path_to_url ); }); test('create a builds deployments with no actual builds', async () => { const directory = await setupE2EFixture('builds-no-list'); const { exitCode, stdout, stderr } = await execCli(binaryPath, [ directory, '--public', '--name', session, '--force', '--yes', ]); // Ensure the exit code is right expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); // Test if the output is really a URL const { host } = new URL(stdout); expect(host.split('-')[0]).toBe(session); }); test('create a staging deployment', async () => { const directory = await setupE2EFixture('static-deployment'); const args = ['--debug', '--public', '--name', session]; const targetCall = await execCli(binaryPath, [ directory, '--target=staging', ...args, '--yes', ]); expect(targetCall.stderr).toMatch(/Setting target to staging/gm); expect(targetCall.stdout).toMatch(/https:\/\//gm); expect(targetCall.exitCode, formatOutput(targetCall)).toBe(0); const { host } = new URL(targetCall.stdout); const deployment = await apiFetch( `/v10/now/deployments/unknown?url=${host}` ).then(resp => resp.json()); expect(deployment.target).toBe('staging'); }); test('create a production deployment', async () => { const directory = await setupE2EFixture('static-deployment'); const args = ['--debug', '--public', '--name', session]; const targetCall = await execCli(binaryPath, [ directory, '--target=production', ...args, '--yes', ]); expect(targetCall.exitCode, formatOutput(targetCall)).toBe(0); expect(targetCall.stderr).toMatch(/Setting target to production/gm); expect(targetCall.stderr).toMatch(/Inspect: https:\/\/vercel.com\//gm); expect(targetCall.stdout).toMatch(/https:\/\//gm); const { host: targetHost } = new URL(targetCall.stdout); const targetDeployment = await apiFetch( `/v10/now/deployments/unknown?url=${targetHost}` ).then(resp => resp.json()); expect(targetDeployment.target).toBe('production'); const call = await execCli(binaryPath, [directory, '--prod', ...args]); expect(call.exitCode, formatOutput(call)).toBe(0); expect(call.stderr).toMatch(/Setting target to production/gm); expect(call.stdout).toMatch(/https:\/\//gm); const { host } = new URL(call.stdout); const deployment = await apiFetch( `/v10/now/deployments/unknown?url=${host}` ).then(resp => resp.json()); expect(deployment.target).toBe('production'); }); test('try to deploy non-existing path', async () => { const goal = `Error: Could not find ${humanizePath( path.join(process.cwd(), session) )}`; const { stderr, stdout, exitCode } = await execCli(binaryPath, [ session, '--yes', ]); expect(exitCode, formatOutput({ stdout, stderr })).toBe(1); expect(stderr.trim().endsWith(goal), `should end with "${goal}"`).toBe(true); }); test('try to deploy with non-existing team', async () => { const target = await setupE2EFixture('static-deployment'); const goal = `Error: The specified scope does not exist`; const { stderr, stdout, exitCode } = await execCli(binaryPath, [ target, '--scope', session, '--yes', ]); expect(exitCode, formatOutput({ stdout, stderr })).toBe(1); expect(stderr).toContain(goal); }); test('initialize example "angular"', async () => { const cwd = getNewTmpDir(); const goal = '> Success! Initialized "angular" example in'; const { exitCode, stdout, stderr } = await execCli( binaryPath, ['init', 'angular'], { cwd } ); expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); expect(stderr).toContain(goal); expect( fs.existsSync(path.join(cwd, 'angular', 'package.json')), 'package.json' ).toBe(true); expect( fs.existsSync(path.join(cwd, 'angular', 'tsconfig.json')), 'tsconfig.json' ).toBe(true); expect( fs.existsSync(path.join(cwd, 'angular', 'angular.json')), 'angular.json' ).toBe(true); }); test('fail to add a domain without a project', async () => { const output = await execCli(binaryPath, [ 'domains', 'add', 'my-domain.vercel.app', ]); expect(output.exitCode, formatOutput(output)).toBe(1); expect(output.stderr).toMatch(/expects two arguments/gm); }); test('whoami', async () => { const user = await userPromise; const { exitCode, stdout, stderr } = await execCli(binaryPath, ['whoami']); expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); expect(stdout).toBe(user.username); }); test('[vercel dev] fails when dev script calls vercel dev recursively', async () => { const deploymentPath = await setupE2EFixture('now-dev-fail-dev-script'); const { exitCode, stdout, stderr } = await execCli(binaryPath, [ 'dev', deploymentPath, ]); expect(exitCode, formatOutput({ stdout, stderr })).toBe(1); expect(stderr).toContain('must not recursively invoke itself'); }); test('[vercel dev] fails when development command calls vercel dev recursively', async () => { expect.assertions(0); const dir = await setupE2EFixture('dev-fail-on-recursion-command'); const dev = execCli(binaryPath, ['dev', '--yes'], { cwd: dir, }); try { await waitForPrompt(dev, 'must not recursively invoke itself', 10000); } finally { const onClose = once(dev, 'close'); dev.kill(); await onClose; } }); test('`vercel rm` removes a deployment', async () => { const directory = await setupE2EFixture('static-deployment'); let host; { const { exitCode, stdout, stderr } = await execCli(binaryPath, [ directory, '--public', '--name', session, '--force', '--yes', ]); expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); host = new URL(stdout).host; } { const { exitCode, stdout, stderr } = await execCli(binaryPath, [ 'rm', host, '--yes', ]); expect(stderr).toContain(host); expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); } }); test('`vercel rm` should fail with unexpected option', async () => { const output = await execCli(binaryPath, [ 'rm', 'example.example.com', '--fake', ]); expect(output.exitCode, formatOutput(output)).toBe(1); expect(output.stderr).toMatch( /Error: unknown or unexpected option: --fake/gm ); }); test('`vercel rm` 404 exits quickly', async () => { const start = Date.now(); const { exitCode, stderr, stdout } = await execCli(binaryPath, [ 'rm', 'this.is.a.deployment.that.does.not.exist.example.com', ]); const delta = Date.now() - start; // "does not exist" case is exit code 1, similar to Unix `rm` expect(exitCode, formatOutput({ stdout, stderr })).toBe(1); expect(stderr).toContain( 'Could not find any deployments or projects matching "this.is.a.deployment.that.does.not.exist.example.com"' ); // "quickly" meaning < 5 seconds, because it used to hang from a previous bug expect(delta).toBeLessThan(5000); }); test('render build errors', async () => { const deploymentPath = await setupE2EFixture('failing-build'); const output = await execCli(binaryPath, [deploymentPath, '--yes']); expect(output.exitCode, formatOutput(output)).toBe(1); expect(output.stderr).toMatch(/Command "npm run build" exited with 1/gm); }); test('invalid deployment, projects and alias names', async () => { const check = async (...args: string[]) => { const output = await execCli(binaryPath, args); expect(output.exitCode, formatOutput(output)).toBe(1); expect(output.stderr).toMatch(/The provided argument/gm); }; await Promise.all([ check('alias', '/', 'test'), check('alias', 'test', '/'), check('rm', '/'), check('ls', '/'), ]); }); test('vercel certs ls', async () => { const output = await execCli(binaryPath, ['certs', 'ls']); expect(output.exitCode, formatOutput(output)).toBe(0); expect(output.stderr).toMatch(/certificates? found under/gm); }); test('vercel certs ls --next=123456', async () => { const output = await execCli(binaryPath, ['certs', 'ls', '--next=123456']); expect(output.exitCode, formatOutput(output)).toBe(0); expect(output.stderr).toMatch(/No certificates found under/gm); }); test('vercel hasOwnProperty not a valid subcommand', async () => { const output = await execCli(binaryPath, ['hasOwnProperty']); expect(output.exitCode, formatOutput(output)).toBe(1); expect( output.stderr.endsWith( `Error: Could not find ${humanizePath( path.join(process.cwd(), 'hasOwnProperty') )}` ) ).toEqual(true); }); test('create zero-config deployment', async () => { const fixturePath = await setupE2EFixture('zero-config-next-js'); const output = await execCli(binaryPath, [ fixturePath, '--force', '--public', '--yes', ]); expect(output.exitCode, formatOutput(output)).toBe(0); const { host } = new URL(output.stdout); const response = await apiFetch(`/v10/now/deployments/unkown?url=${host}`); const text = await response.text(); expect(response.status).toBe(200); const data = JSON.parse(text) as DeploymentLike; expect(data.error).toBe(undefined); const validBuilders = data.builds.every( build => !build.use.endsWith('@canary') ); expect(validBuilders).toBe(true); }); test('next unsupported functions config shows warning link', async () => { const fixturePath = await setupE2EFixture( 'zero-config-next-js-functions-warning' ); const output = await execCli(binaryPath, [ fixturePath, '--force', '--public', '--yes', ]); expect(output.exitCode, formatOutput(output)).toBe(0); expect(output.stderr).toMatch( /Ignoring function property `runtime`\. When using Next\.js, only `memory` and `maxDuration` can be used\./gm ); expect(output.stderr).toMatch( /Learn More: https:\/\/vercel\.link\/functions-property-next/gm ); }); test('deploy a Lambda with 128MB of memory', async () => { const directory = await setupE2EFixture('lambda-with-128-memory'); const output = await execCli(binaryPath, [directory, '--yes']); expect(output.exitCode, formatOutput(output)).toBe(0); const { host: url } = new URL(output.stdout); const response = await fetch('path_to_url + url + '/api/memory'); expect(response.status).toBe(200); // It won't be exactly 128MB, // so we just compare if it is lower than 450MB const { memory } = await response.json(); expect(memory).toBe(128); }); test('fail to deploy a Lambda with an incorrect value for of memory', async () => { const directory = await setupE2EFixture('lambda-with-123-memory'); const output = await execCli(binaryPath, [directory, '--yes']); expect(output.exitCode, formatOutput(output)).toBe(1); expect(output.stderr).toMatch(/Serverless Functions.+memory/gm); expect(output.stderr).toMatch(/Learn More/gm); }); test('deploy a Lambda with 3 seconds of maxDuration', async () => { const directory = await setupE2EFixture('lambda-with-3-second-timeout'); const output = await execCli(binaryPath, [directory, '--yes']); expect(output.exitCode, formatOutput(output)).toBe(0); const url = new URL(output.stdout); // Should time out url.pathname = '/api/wait-for/5'; const response1 = await fetch(url.href); expect(response1.status).toBe(504); // Should not time out url.pathname = '/api/wait-for/1'; const response2 = await fetch(url.href); expect(response2.status).toBe(200); }); test('fail to deploy a Lambda with an incorrect value for maxDuration', async () => { const directory = await setupE2EFixture('lambda-with-1000-second-timeout'); const output = await execCli(binaryPath, [directory, '--yes']); expect(output.exitCode, formatOutput(output)).toBe(1); // There's different error messages depending on plan type. As long as it contains // "maxDuration" then we can assume it's a validation error for `maxDuration`. expect(output.stderr).toContain('maxDuration'); }); test('invalid `--token`', async () => { const output = await execCli(binaryPath, ['--token', 'he\nl,o.']); expect(output.exitCode, formatOutput(output)).toBe(1); expect(output.stderr).toContain( 'Error: You defined "--token", but its contents are invalid. Must not contain: "\\n", ",", "."' ); }); test('deploy a Lambda with a specific runtime', async () => { const directory = await setupE2EFixture('lambda-with-php-runtime'); const output = await execCli(binaryPath, [directory, '--public', '--yes']); expect(output.exitCode, formatOutput(output)).toBe(0); const url = new URL(output.stdout); const res = await fetch(`${url}/api/test`); const text = await res.text(); expect(text).toBe('Hello from PHP'); }); test('fail to deploy a Lambda with a specific runtime but without a locked version', async () => { const directory = await setupE2EFixture('lambda-with-invalid-runtime'); const output = await execCli(binaryPath, [directory, '--yes']); expect(output.exitCode, formatOutput(output)).toBe(1); expect(output.stderr).toMatch( /Function Runtimes must have a valid version/gim ); }); test('use build-env', async () => { const directory = await setupE2EFixture('build-env'); const { exitCode, stdout, stderr } = await execCli(binaryPath, [ directory, '--public', '--yes', ]); // Ensure the exit code is right expect(exitCode, formatOutput({ stdout, stderr })).toBe(0); // Test if the output is really a URL const deploymentUrl = pickUrl(stdout); const { href } = new URL(deploymentUrl); await waitForDeployment(href); // get the content const response = await fetch(href); const content = await response.text(); expect(content.trim()).toBe('bar'); }); test('should invoke CLI extension', async () => { const fixture = path.join(__dirname, 'fixtures/e2e/cli-extension'); // Ensure the `.bin` is populated in the fixture await runNpmInstall(fixture); const [user, output] = await Promise.all([ userPromise, execCli(binaryPath, ['mywhoami'], { cwd: fixture }), ]); const formatted = formatOutput(output); expect(output.stdout, formatted).toContain('Hello from a CLI extension!'); expect(output.stdout, formatted).toContain('VERCEL_API: path_to_url expect(output.stdout, formatted).toContain(`Username: ${user.username}`); }); test('should pass through exit code for CLI extension', async () => { const fixture = path.join(__dirname, 'fixtures/e2e/cli-extension-exit-code'); // Ensure the `.bin` is populated in the fixture await runNpmInstall(fixture); const output = await execCli(binaryPath, ['fail'], { cwd: fixture, reject: false, }); expect(output.exitCode).toEqual(6); }); test('default command should prompt login with empty auth.json', async () => { const output = await execCli(binaryPath, ['-Q', '/tmp'], { // execCli passes the token automatically, undo that functionality for this test token: false, }); expect(output.stderr, formatOutput(output)).toBeTruthy(); expect(output.stderr).toContain( 'Error: No existing credentials found. Please run `vercel login` or pass "--token"' ); }); ```
/content/code_sandbox/packages/cli/test/integration-3.test.ts
xml
2016-09-09T01:12:08
2024-08-16T17:39:45
vercel
vercel/vercel
12,545
7,422
```xml <?xml version="1.0" encoding="UTF-8"?> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> <file source-language="en" target-language="sk" datatype="plaintext" original="tasks.en.xlf"> <body> <trans-unit id="7f4C38O" resname="tasks.pending" xml:space="preserve" approved="no"> <source>tasks.pending</source> <target state="translated">akajce lohy</target> </trans-unit> <trans-unit id="tLV1hoP" resname="report_tasks_assigned" xml:space="preserve" approved="no"> <source>report_tasks_assigned</source> <target state="translated">lohy na pouvatea</target> </trans-unit> <trans-unit id="taZkyYV" resname="task.help.user" xml:space="preserve" approved="no"> <source>task.help.user</source> <target state="translated">Prirate tto lohu pouvateovi</target> </trans-unit> <trans-unit id="8c0YWZm" resname="report_tasks_teams" xml:space="preserve" approved="no"> <source>report_tasks_teams</source> <target state="translated">Tmov lohy</target> </trans-unit> <trans-unit id="XjAwhoV" resname="task.start" xml:space="preserve" approved="no"> <source>task.start</source> <target state="translated">Spusti spracovanie</target> </trans-unit> <trans-unit id="XD7TZh7" resname="task.stop" xml:space="preserve" approved="no"> <source>task.stop</source> <target state="translated">Pauza spracovvanie</target> </trans-unit> <trans-unit id="sG_9DvK" resname="task.assign" xml:space="preserve" approved="no"> <source>task.assign</source> <target state="translated">Priradi mne</target> </trans-unit> <trans-unit id="qLewfPg" resname="task.unassign" xml:space="preserve" approved="no"> <source>task.unassign</source> <target state="translated">Uvolni lohu</target> </trans-unit> <trans-unit id="F1_rg1R" resname="task.reopen" xml:space="preserve" approved="no"> <source>task.reopen</source> <target state="translated">Znovu otvori lohu</target> </trans-unit> <trans-unit id="duBK63z" resname="task.close" xml:space="preserve" approved="no"> <source>task.close</source> <target state="translated">Dokoni lohu</target> </trans-unit> <trans-unit id="t.y642H" resname="task.create" xml:space="preserve" approved="no"> <source>task.create</source> <target state="translated">Vytvori lohu</target> </trans-unit> <trans-unit id="s6YOYaU" resname="Tasks" xml:space="preserve" approved="no"> <source>Tasks</source> <target state="translated">lohy</target> </trans-unit> <trans-unit id="rLKr7Zu" resname="tasks.my" xml:space="preserve" approved="no"> <source>tasks.my</source> <target state="translated">Moje lohy</target> </trans-unit> <trans-unit id="FhEb.Hn" resname="task.help.title" xml:space="preserve" approved="no"> <source>task.help.title</source> <target state="translated">Krtky popis pre lohu</target> </trans-unit> <trans-unit id="agwwK.J" resname="task_no_estimation" xml:space="preserve" approved="no"> <source>task_no_estimation</source> <target state="translated">Bez odhadu</target> </trans-unit> <trans-unit id="kgA8TVH" resname="task_with_estimation" xml:space="preserve" approved="no"> <source>task_with_estimation</source> <target state="translated">S odhadom</target> </trans-unit> <trans-unit id="H.zMNfb" resname="task_started" xml:space="preserve" approved="no"> <source>task_started</source> <target state="translated">Prca zaala</target> </trans-unit> <trans-unit id="cu1.2JS" resname="task_not_started" xml:space="preserve" approved="no"> <source>task_not_started</source> <target state="translated">Nezaat</target> </trans-unit> <trans-unit id="ZwdUYYa" resname="task_overdue" xml:space="preserve" approved="no"> <source>task_overdue</source> <target state="translated">Oneskoren</target> </trans-unit> <trans-unit id="QF_bQPv" resname="task.help.team" xml:space="preserve" approved="no"> <source>task.help.team</source> <target state="translated">Prirate tto lohu skupine</target> </trans-unit> <trans-unit id="kMOottI" resname="task.widget_rows" xml:space="preserve" approved="no"> <source>task.widget_rows</source> <target state="translated">Mnostvo loh na strnku vo widgete ovldacieho panelu</target> </trans-unit> <trans-unit id="tt.jOEH" resname="estimation" xml:space="preserve" approved="no"> <source>estimation</source> <target state="translated">asov odhad</target> </trans-unit> <trans-unit id="SzbkpWy" resname="task.help.description" xml:space="preserve" approved="no"> <source>task.help.description</source> <target state="translated">Tento opis sa skopruje do kadho zznamu v asovom vkaze</target> </trans-unit> <trans-unit id="WCaBimL" resname="task.help.end" xml:space="preserve" approved="no"> <source>task.help.end</source> <target state="translated">loha mus by dokonen do tohto dtumu</target> </trans-unit> <trans-unit id="ZCSPtzc" resname="task.help.estimation" xml:space="preserve" approved="no"> <source>task.help.estimation</source> <target state="translated">asov odhad potrebn na splnenie lohy vo formte hodiny:minty</target> </trans-unit> <trans-unit id="zJvuPBv" resname="task.help.tags" xml:space="preserve" approved="no"> <source>task.help.tags</source> <target state="translated">Tieto ttky sa skopruj do kadho zznamu v asovom vkaze</target> </trans-unit> <trans-unit id="1ltxm9V" resname="task_todo" xml:space="preserve" approved="no"> <source>task_todo</source> <target state="needs-translation">Popis lohy</target> </trans-unit> </body> </file> </xliff> ```
/content/code_sandbox/translations/tasks.sk.xlf
xml
2016-10-20T17:06:34
2024-08-16T18:27:30
kimai
kimai/kimai
3,084
1,733
```xml import { WorkspaceFolder, NotificationHandler, PublishDiagnosticsParams, } from "vscode-languageserver"; import { QuickPickItem } from "vscode"; import { GraphQLProject, DocumentUri } from "./project/base"; import { dirname } from "path"; import fg from "glob"; import { loadConfig, ApolloConfig, isClientConfig, ServiceConfig, } from "./config"; import { LanguageServerLoadingHandler } from "./loadingHandler"; import { ServiceID, SchemaTag, ClientIdentity } from "./engine"; import { GraphQLClientProject, isClientProject } from "./project/client"; import { GraphQLServiceProject } from "./project/service"; import URI from "vscode-uri"; import { Debug } from "./utilities"; export interface WorkspaceConfig { clientIdentity?: ClientIdentity; } export class GraphQLWorkspace { private _onDiagnostics?: NotificationHandler<PublishDiagnosticsParams>; private _onDecorations?: NotificationHandler<any>; private _onSchemaTags?: NotificationHandler<[ServiceID, SchemaTag[]]>; private _onConfigFilesFound?: NotificationHandler<ApolloConfig[]>; private _projectForFileCache: Map<string, GraphQLProject> = new Map(); private projectsByFolderUri: Map<string, GraphQLProject[]> = new Map(); constructor( private LanguageServerLoadingHandler: LanguageServerLoadingHandler, private config: WorkspaceConfig ) {} onDiagnostics(handler: NotificationHandler<PublishDiagnosticsParams>) { this._onDiagnostics = handler; } onDecorations(handler: NotificationHandler<any>) { this._onDecorations = handler; } onSchemaTags(handler: NotificationHandler<[ServiceID, SchemaTag[]]>) { this._onSchemaTags = handler; } onConfigFilesFound(handler: NotificationHandler<ApolloConfig[]>) { this._onConfigFilesFound = handler; } private createProject({ config, folder, }: { config: ApolloConfig; folder: WorkspaceFolder; }) { const { clientIdentity } = this.config; const project = isClientConfig(config) ? new GraphQLClientProject({ config, loadingHandler: this.LanguageServerLoadingHandler, rootURI: URI.parse(folder.uri), clientIdentity, }) : new GraphQLServiceProject({ config: config as ServiceConfig, loadingHandler: this.LanguageServerLoadingHandler, rootURI: URI.parse(folder.uri), clientIdentity, }); project.onDiagnostics((params) => { this._onDiagnostics && this._onDiagnostics(params); }); if (isClientProject(project)) { project.onDecorations((params) => { this._onDecorations && this._onDecorations(params); }); project.onSchemaTags((tags) => { this._onSchemaTags && this._onSchemaTags(tags); }); } // after a project has loaded, we do an initial validation to surface errors // on the start of the language server. Instead of doing this in the // base class which is used by codegen and other tools project.whenReady.then(() => project.validate()); return project; } async addProjectsInFolder(folder: WorkspaceFolder) { // load all possible workspace projects (contains possible config) // see if we can move this detection to cosmiconfig /* - monorepo (GraphQLWorkspace) as WorkspaceFolder -- engine-api (GraphQLProject) -- engine-frontend (GraphQLProject) OR - vscode workspace (fullstack) -- ~/:user/client (GraphQLProject) as WorkspaceFolder -- ~/:user/server (GraphQLProject) as WorkspaceFolder */ const apolloConfigFiles: string[] = fg.sync( "**/apollo.config.@(js|ts|cjs)", { cwd: URI.parse(folder.uri).fsPath, absolute: true, ignore: "**/node_modules/**", } ); // only have unique possible folders const apolloConfigFolders = new Set<string>(apolloConfigFiles.map(dirname)); // go from possible folders to known array of configs let foundConfigs: ApolloConfig[] = []; const projectConfigs = Array.from(apolloConfigFolders).map((configFolder) => loadConfig({ configPath: configFolder, requireConfig: true }) .then((config) => { if (config) { foundConfigs.push(config); const projectsForConfig = config.projects.map((projectConfig) => this.createProject({ config, folder }) ); const existingProjects = this.projectsByFolderUri.get(folder.uri) || []; this.projectsByFolderUri.set(folder.uri, [ ...existingProjects, ...projectsForConfig, ]); } else { Debug.error( `Workspace failed to load config from: ${configFolder}/` ); } }) .catch((error) => Debug.error(error)) ); await Promise.all(projectConfigs); if (this._onConfigFilesFound) { this._onConfigFilesFound(foundConfigs); } } reloadService() { this._projectForFileCache.clear(); this.projectsByFolderUri.forEach((projects, uri) => { this.projectsByFolderUri.set( uri, projects.map((project) => { project.clearAllDiagnostics(); return this.createProject({ config: project.config, folder: { uri } as WorkspaceFolder, }); }) ); }); } async reloadProjectForConfig(configUri: DocumentUri) { const configPath = dirname(URI.parse(configUri).fsPath); let config, error; try { config = await loadConfig({ configPath, requireConfig: true }); } catch (e) { error = e; } const project = this.projectForFile(configUri); if (!config && this._onConfigFilesFound) { this._onConfigFilesFound(error); } // If project exists, update the config if (project && config) { await Promise.all(project.updateConfig(config)); this.reloadService(); } // If project doesn't exist (new config file), create the project and add to workspace if (!project && config) { const folderUri = URI.file(configPath).toString(); const newProject = this.createProject({ config, folder: { uri: folderUri } as WorkspaceFolder, }); const existingProjects = this.projectsByFolderUri.get(folderUri) || []; this.projectsByFolderUri.set(folderUri, [ ...existingProjects, newProject, ]); this.reloadService(); } } updateSchemaTag(selection: QuickPickItem) { const serviceID = selection.detail; if (!serviceID) return; this.projectsByFolderUri.forEach((projects) => { projects.forEach((project) => { if (isClientProject(project) && project.serviceID === serviceID) { project.updateSchemaTag(selection.label); } }); }); } removeProjectsInFolder(folder: WorkspaceFolder) { const projects = this.projectsByFolderUri.get(folder.uri); if (projects) { projects.forEach((project) => project.clearAllDiagnostics()); this.projectsByFolderUri.delete(folder.uri); } } get projects(): GraphQLProject[] { return Array.from(this.projectsByFolderUri.values()).flat(); } projectForFile(uri: DocumentUri): GraphQLProject | undefined { const cachedResult = this._projectForFileCache.get(uri); if (cachedResult) { return cachedResult; } for (const projects of this.projectsByFolderUri.values()) { const project = projects.find((project) => project.includesFile(uri)); if (project) { this._projectForFileCache.set(uri, project); return project; } } return undefined; } } ```
/content/code_sandbox/packages/apollo-language-server/src/workspace.ts
xml
2016-08-12T15:28:09
2024-08-03T08:25:34
apollo-tooling
apollographql/apollo-tooling
3,040
1,682
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>English</string> <key>CFBundleExecutable</key> <string>desmume-cli</string> <key>CFBundleGetInfoString</key> <string>desmume CLI</string> <key>CFBundleIdentifier</key> <string>org.desmume.desmume.cli</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>Desmume CLI</string> <key>CFBundlePackageType</key> <string>APPL</string> </dict> </plist> ```
/content/code_sandbox/desmume/src/frontend/posix/cli/Info.plist
xml
2016-11-24T02:20:36
2024-08-16T13:18:50
desmume
TASEmulators/desmume
2,879
198
```xml <!-- All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Pilz GmbH & Co. KG nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> <testdata> <poses> <pos name="ZeroPose"> <group name="manipulator"> <joints>0.0 0.0 0.0 0.0 0.0 0.0</joints> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="PTPPose1"> <group name="manipulator"> <joints>0.5 0.0 0.0 0.0 0.0 0.0</joints> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="PTPJointValid"> <group name="manipulator"> <joints>0.0 0.785398 0.785398 0.0 1.570796 0.0</joints> </group> </pos> <pos name="PTPPose"> <group name="manipulator"> <xyzQuat link_name="prbt_tcp">0.45 -0.1 0.62 0.0 0.0 0.0 1.0</xyzQuat> </group> </pos> <pos name="LINPose1"> <group name="manipulator"> <joints>0.0 -0.52 1.13 0.0 -1.57 0.0</joints> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="LINPose2"> <group name="manipulator"> <joints>0.0 -0.63 1.4 0.0 1.19 0.0</joints> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="LINPose3"> <group name="manipulator"> <joints>0.463648 -0.418738 1.03505 0.0 -1.45379 -0.149488</joints> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="LINPose4"> <group name="manipulator"> <joints>0.0 0.278259 2.11585 0.0 -1.83759 0.785398</joints> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="LINPose1Opposite"> <group name="manipulator"> <joints>0.0 1.52001 1.13 0.0 -1.57 0.0</joints> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose1"> <group name="manipulator"> <!-- (0.4, 0.1, 0.6 0 0 0) tcp without gripper --> <joints>0.244979 0.333691 -1.48422 0.0 1.81791 -0.244979</joints> <xyzQuat link_name="prbt_tcp">0.4 0.1 0.6 0. 0. 0. 1.0</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose2"> <group name="manipulator"> <!-- (0.1, 0.4, 0.6 0 0 0) tcp without gripper --> <joints>1.32582 0.333691 -1.48422 0.0 1.81791 -1.32582</joints> <xyzQuat link_name="prbt_tcp">0.1 0.4 0.7 0 0 0.923916 -0.382596</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCAuxPose1"> <group name="manipulator"> <!-- (0.1, 0.1, 0.6) only position is needed for aux point --> <xyzQuat link_name="prbt_tcp">0.1 0.1 0.6 0 0 0 1.0</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose3"> <group name="manipulator"> <!-- (-0.2, 0.1, 0.6 0 0 0) tcp without gripper --> <joints>-0.463648 -1.64103 -2.06227 0 0.421241 0.463648</joints> <xyzQuat link_name="prbt_tcp">-0.2 0.1 0.6 0 0 0 1.0</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCAuxPose2"> <group name="manipulator"> <!-- wrong center point --> <xyzQuat>0 0.4 0.5 0 0 0 1</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose4"> <group name="manipulator"> <joints>0.0 -0.0107869 -1.72665 0.0 1.71586 0.0</joints> <xyzQuat link_name="prbt_tcp">0.3 0.0 0.65 0.0 0.0 0.0 1.0</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose4_delta1"> <group name="manipulator"> <xyzQuat link_name="prbt_tcp">0.300000001 0.0 0.65 0.0 0.0 0.0 1.0</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose4_delta2"> <group name="manipulator"> <joints>0.0 -0.010787 -1.72666 0.0 1.71586 0.0</joints> <xyzQuat link_name="prbt_tcp">0.300000001 0.0 0.650000001 0.0 0.0 0.0 1.0</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose5"> <group name="manipulator"> <joints>0.0 -1.56309 -1.72665 0.0 0.163561 0.0</joints> <xyzQuat link_name="prbt_tcp">-0.3 0.0 0.65 0.0 0.0 0.0 1.0</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose6"> <group name="manipulator"> <joints>2.61799 -0.0107869 -1.72665 0.0 1.71586 -1.0472</joints> <xyzQuat link_name="prbt_tcp">-0.25980762113533159 0.15 0.65 0 0 0.7071067811865475 0.7071067811865475</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCAuxPose3"> <group name="manipulator"> <xyzQuat>0.0 0.0 0.65 0.0 0.0 0.0 1.0</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCAuxPose4"> <group name="manipulator"> <xyzQuat>0.0 0.3 0.65 0.0 0.0 0.0 1.0</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose7"> <group name="manipulator"> <!-- (0.4, 0.1, 0.5 0 0 0) tcp without gripper --> <joints>0.244979 0.333691 -1.48422 0.0 1.81791 -0.244979</joints> <xyzQuat link_name="prbt_tcp">0.4 0.1 0.7 0. 0. 0.923916 -0.382596</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose8"> <group name="manipulator"> <!-- (0.1, 0.4, 0.5 0 0 0) tcp without gripper --> <joints>1.32582 0.333691 -1.48422 0.0 1.81791 -1.32582</joints> <xyzQuat link_name="prbt_tcp">0.3 0.2 0.7 0 0 0.923916 -0.382596</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> <pos name="CIRCPose9"> <group name="manipulator"> <!-- (-0.2, 0.1, 0.5 0 0 0) tcp without gripper --> <joints>-0.463648 -1.64103 -2.06227 0 0.421241 0.463648</joints> <xyzQuat link_name="prbt_tcp">0.2 0.1 0.7 0 0 0.923916 -0.382596</xyzQuat> </group> <group name="gripper"> <joints>0</joints> </group> </pos> </poses> <circs> <circ name="ValidCIRCCmd1"> <!-- valid circ cmd--> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>CIRCPose1</startPos> <centerPos>CIRCAuxPose1</centerPos> <endPos>CIRCPose6</endPos> <vel>0.05</vel> <acc>0.05</acc> </circ> <circ name="ValidCIRCCmd2"> <!-- valid circ cmd--> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>CIRCPose4</startPos> <centerPos>CIRCAuxPose3</centerPos> <endPos>CIRCPose6</endPos> <vel>0.1</vel> <acc>0.1</acc> </circ> <circ name="ValidCIRCCmd3"> <!-- valid circ cmd--> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>CIRCPose4</startPos> <intermediatePos>CIRCAuxPose4</intermediatePos> <endPos>CIRCPose6</endPos> <vel>0.1</vel> <acc>0.1</acc> </circ> <circ name="CIRCCmdAllPointsTheSame"> <!-- valid circ cmd--> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>CIRCPose4</startPos> <centerPos>CIRCPose4_delta1</centerPos> <endPos>CIRCPose4_delta2</endPos> <vel>0.1</vel> <acc>0.1</acc> </circ> <circ name="CIRCCmdToFast"> <!-- valid circ cmd--> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>CIRCPose4</startPos> <intermediatePos>CIRCAuxPose4</intermediatePos> <endPos>CIRCPose6</endPos> <vel>1.0</vel> <acc>1.0</acc> </circ> <circ name="CIRCCmd2"> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>CIRCPose4</startPos> <centerPos>CIRCAuxPose3</centerPos> <endPos>CIRCPose5</endPos> <vel>0.1</vel> <acc>0.1</acc> </circ> <circ name="CIRCCmd3"> <!-- circ cmd with wrong center point--> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>CIRCPose1</startPos> <intermediatePos>CIRCAuxPose2</intermediatePos> <centerPos>CIRCAuxPose2</centerPos> <endPos>CIRCPose2</endPos> <vel>0.05</vel> <acc>0.05</acc> </circ> <circ name="CIRCCmd4"> <!-- circ cmd with colinear center point due to interim point--> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>CIRCPose7</startPos> <intermediatePos>CIRCPose8</intermediatePos> <endPos>CIRCPose9</endPos> <vel>0.1</vel> <acc>0.1</acc> </circ> <circ name="CIRCCmd5"> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>CIRCPose4</startPos> <intermediatePos>CIRCAuxPose3</intermediatePos> <endPos>CIRCPose5</endPos> <vel>0.1</vel> <acc>0.1</acc> </circ> <circ name="CIRCCmd6"> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>CIRCPose4</startPos> <intermediatePos>CIRCAuxPose4</intermediatePos> <endPos>CIRCPose5</endPos> <vel>0.01</vel> <acc>0.01</acc> </circ> </circs> <lins> <lin name="LINCmd1"> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>LINPose1</startPos> <endPos>LINPose2</endPos> <vel>0.4</vel> <acc>0.3</acc> </lin> <lin name="LINCmd2"> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>LINPose3</startPos> <endPos>LINPose4</endPos> <vel>0.2</vel> <acc>0.2</acc> </lin> <lin name="LINCmdLimitViolation"> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>LINPose1</startPos> <endPos>LINPose1Opposite</endPos> <vel>1.0</vel> <acc>1.0</acc> </lin> <lin name="LINStartEqualsGoal"> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>LINPose1</startPos> <endPos>LINPose1</endPos> <vel>0.4</vel> <acc>0.4</acc> </lin> </lins> <ptps> <ptp name="FirstPtp"> <planningGroup>manipulator</planningGroup> <targetLink>prbt_tcp</targetLink> <startPos>ZeroPose</startPos> <endPos>PTPJointValid</endPos> <vel>1.0</vel> <acc>1.0</acc> </ptp> </ptps> </testdata> ```
/content/code_sandbox/moveit_planners/pilz_industrial_motion_planner/test/test_robots/prbt/test_data/testdata_deprecated.xml
xml
2016-07-27T20:38:09
2024-08-15T02:08:44
moveit
moveit/moveit
1,626
4,512
```xml import { ImgHTMLAttributes, useState } from 'react'; import Lightbox from 'yet-another-react-lightbox'; import Zoom from 'yet-another-react-lightbox/plugins/zoom'; import 'yet-another-react-lightbox/styles.css'; type Props = ImgHTMLAttributes<HTMLImageElement> & { src: string; }; export function LightboxImage({ src, alt, ...rest }: Props) { const [open, setOpen] = useState(false); return ( <> <button type="button" onClick={() => setOpen(true)}> <img src={src} alt={alt} {...rest} /> </button> <Lightbox open={open} close={() => setOpen(false)} slides={[{ src }]} styles={{ container: { backgroundColor: 'rgba(0, 0, 0, .8)' } }} controller={{ aria: true, closeOnBackdropClick: true, }} carousel={{ finite: true }} render={{ buttonPrev: () => null, buttonNext: () => null, }} plugins={[Zoom]} /> </> ); } ```
/content/code_sandbox/docs/ui/components/ContentSpotlight/LightboxImage.tsx
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
238
```xml <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="path_to_url"> <ItemGroup> <Filter Include="Source Files"> <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> </Filter> <Filter Include="Header Files"> <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> </Filter> <Filter Include="Resource Files"> <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> </Filter> </ItemGroup> <ItemGroup> <ClCompile Include="cmp_clang_ttp_passing.cpp"> <Filter>Source Files</Filter> </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="..\test_interval_map_shared.hpp"> <Filter>Header Files</Filter> </ClInclude> <ClInclude Include="..\test_type_lists.hpp"> <Filter>Header Files</Filter> </ClInclude> </ItemGroup> </Project> ```
/content/code_sandbox/deps/boost_1_66_0/libs/icl/test/cmp_clang_ttp_passing_/vc10_cmp_clang_ttp_passing.vcxproj.filters
xml
2016-09-05T10:18:44
2024-08-11T13:21:40
LiquidCore
LiquidPlayer/LiquidCore
1,010
369
```xml <vector xmlns:android="path_to_url" android:width="24dp" android:height="24dp" android:viewportHeight="424.83" android:viewportWidth="424.83"> <group android:translateX="0" android:translateY="56.84"> <path android:fillColor="@android:color/white" android:pathData="M193.69,114.14v26.05c0,3.79 2.84,7.58 6.63,7.58h6.63v-40.73h-6.63C196.53,107.5 193.69,110.35 193.69,114.14L193.69,114.14z"/> <path android:fillColor="@android:color/white" android:pathData="M415.33,170.02c-4.73,-23.68 -9.94,-54.46 -16.57,-73.41c-6.63,-18.94 -11.84,-27.94 -15.63,-34.1c-1.42,-2.37 -2.84,-4.26 -3.79,-5.68c-3.32,-32.68 -29.84,-56.83 -63.94,-56.83h-37.89v13.73c-6.16,-0.47 -10.42,-5.21 -10.42,-10.89v-2.37h-109.87v2.37c0,6.16 -4.26,10.89 -10.42,10.89v-13.73h-33.63c-34.57,0 -65.36,24.63 -68.19,58.25c-0.94,0.94 -1.89,2.37 -2.37,3.79c-3.79,6.63 -9.47,15.63 -15.63,34.1c-6.63,19.42 -11.84,50.2 -17.05,73.88c-5.21,23.68 -9.94,61.09 -9.94,71.04v13.26c0,27.47 18,49.25 39.78,49.25c9.94,0 19.42,-4.73 26.05,-12.31c12.31,12.31 29.36,19.89 46.88,19.89L314.93,311.15c17.52,0 33.15,-7.58 44.52,-19.42c7.11,7.11 16.1,11.84 25.57,11.84c22.26,0 39.78,-22.26 39.78,-49.25L424.8,241.06c0.47,-9.94 -4.74,-47.36 -9.47,-71.04L415.33,170.02zM140.65,305.47h-27.47h-2.84h-1.42h-1.89h-1.42h-1.42c-0.47,0 -1.42,0 -1.89,-0.47h-0.94c-0.47,0 -1.42,-0.47 -1.89,-0.47h-0.94c-0.94,0 -1.42,-0.47 -2.37,-0.47h-0.47c-0.94,-0.47 -1.42,-0.47 -2.37,-0.94h-0.47c-0.94,-0.47 -1.42,-0.47 -2.37,-0.94h-0.47c-0.94,-0.47 -1.89,-0.94 -2.37,-0.94c-0.94,-0.47 -1.89,-0.94 -2.37,-1.42c-5.21,-2.84 -9.94,-6.63 -14.21,-10.89c-11.37,-11.37 -18.94,-26.99 -18.94,-43.57v-36.47l-0.01,-144.93c0,-6.16 0.94,-11.84 2.84,-17.52c0.47,-0.94 0.47,-1.89 0.94,-2.37c0.47,-0.94 0.47,-1.42 0.94,-2.37c0.47,-0.94 0.94,-1.42 0.94,-2.37v-0.47c0.47,-0.94 0.94,-1.42 0.94,-1.89c0,0 0,-0.47 0.47,-0.47c0.47,-0.47 0.94,-1.42 1.42,-1.89l0.47,-0.47c0.47,-0.47 0.94,-0.94 1.42,-1.89c0,-0.47 0.47,-0.47 0.47,-0.94c0.47,-0.47 0.94,-0.94 0.94,-1.42c0.47,-0.47 0.47,-0.47 0.94,-0.94s0.47,-0.94 0.94,-1.42c0.47,-0.47 0.94,-0.94 0.94,-1.42c0.47,-0.47 0.47,-0.47 0.94,-0.94s1.42,-1.42 2.37,-1.89c11.84,-10.89 27.47,-16.57 43.57,-16.57h27.47l0.02,298.82L140.65,305.47zM211.22,152.03h-10.42c-6.16,0 -10.89,-5.21 -10.89,-11.84v-26.05c0,-6.16 4.73,-10.89 10.89,-10.89h10.42L211.22,152.03zM238.68,140.66c0,6.16 -5.21,11.84 -11.37,11.84h-10.89v-49.25h10.89c6.16,0 11.37,4.73 11.37,10.89L238.68,140.66zM373.18,207.44v35.99c0,16.1 -6.16,32.2 -17.05,43.57c-4.26,4.73 -9,8.52 -14.21,11.37c-0.94,0.47 -1.42,0.94 -2.37,1.42c-0.94,0.47 -1.42,0.94 -2.37,0.94h-0.47c-0.94,0.47 -1.42,0.47 -2.37,0.94h-0.47c-0.94,0.47 -1.42,0.47 -2.37,0.94h-0.47c-0.47,0 -1.42,0.47 -1.89,0.47h-0.94c-0.47,0 -1.42,0.47 -1.89,0.47h-0.94c-0.47,0 -1.42,0 -1.89,0.47h-1.42h-1.42h-1.89h-0.94h-2.84l-31.27,0v-297.88h31.73c16.1,0 30.78,5.68 41.68,16.57c10.89,10.42 16.57,25.1 16.57,41.2v143.49L373.18,207.44z"/> <path android:fillColor="@android:color/white" android:pathData="M87.61,165.28c0,6.8 -5.51,12.31 -12.31,12.31c-6.8,0 -12.31,-5.51 -12.31,-12.31c0,-6.8 5.51,-12.31 12.31,-12.31C82.1,152.96 87.61,158.48 87.61,165.28"/> <path android:fillColor="@android:color/white" android:pathData="M136.38,165.28c0,6.8 -5.51,12.31 -12.31,12.31c-6.8,0 -12.31,-5.51 -12.31,-12.31c0,-6.8 5.51,-12.31 12.31,-12.31C130.87,152.96 136.38,158.48 136.38,165.28"/> <path android:fillColor="@android:color/white" android:pathData="M112.23,141.13c0,6.8 -5.51,12.31 -12.31,12.31c-6.8,0 -12.31,-5.51 -12.31,-12.31c0,-6.8 5.51,-12.31 12.31,-12.31C106.72,128.81 112.23,134.33 112.23,141.13"/> <path android:fillColor="@android:color/white" android:pathData="M125.97,78.62c0,14.38 -11.66,26.05 -26.05,26.05c-14.39,0 -26.05,-11.66 -26.05,-26.05c0,-14.39 11.66,-26.05 26.05,-26.05C114.31,52.57 125.97,64.23 125.97,78.62"/> <path android:fillColor="@android:color/white" android:pathData="M112.23,189.91c0,6.8 -5.51,12.32 -12.31,12.32c-6.8,0 -12.31,-5.52 -12.31,-12.32c0,-6.8 5.51,-12.31 12.31,-12.31C106.72,177.59 112.23,183.11 112.23,189.91"/> <path android:fillColor="@android:color/white" android:pathData="M107.5,214.06h18.94v18.94L107.5,233L107.5,214.06z"/> <path android:fillColor="@android:color/white" android:pathData="M363.23,76.72c0,6.8 -5.52,12.31 -12.31,12.31c-6.8,0 -12.31,-5.51 -12.31,-12.31c0,-6.8 5.52,-12.31 12.31,-12.31C357.72,64.4 363.23,69.92 363.23,76.72"/> <path android:fillColor="@android:color/white" android:pathData="M314.45,76.72c0,6.8 -5.51,12.31 -12.31,12.31s-12.31,-5.51 -12.31,-12.31c0,-6.8 5.51,-12.31 12.31,-12.31C308.94,64.4 314.45,69.92 314.45,76.72"/> <path android:fillColor="@android:color/white" android:pathData="M339.08,52.1c0,6.8 -5.52,12.31 -12.32,12.31c-6.8,0 -12.31,-5.52 -12.31,-12.31c0,-6.8 5.52,-12.32 12.31,-12.32C333.57,39.78 339.08,45.3 339.08,52.1"/> <path android:fillColor="@android:color/white" android:pathData="M352.81,166.23c0,14.38 -11.66,26.05 -26.05,26.05c-14.38,0 -26.05,-11.66 -26.05,-26.05c0,-14.39 11.66,-26.05 26.05,-26.05C341.15,140.18 352.81,151.84 352.81,166.23"/> <path android:fillColor="@android:color/white" android:pathData="M339.08,100.88c0,6.8 -5.52,12.31 -12.32,12.31c-6.8,0 -12.31,-5.51 -12.31,-12.31c0,-6.8 5.52,-12.31 12.31,-12.31C333.57,88.56 339.08,94.08 339.08,100.88"/> <path android:fillColor="@android:color/white" android:pathData="M322.98,223.06c0,7.06 -5.73,12.78 -12.79,12.78c-7.06,0 -12.78,-5.72 -12.78,-12.78s5.72,-12.78 12.78,-12.78C317.26,210.27 322.98,215.99 322.98,223.06"/> </group> </vector> ```
/content/code_sandbox/app/src/main/res/drawable-night/ic_joystick_24dp.xml
xml
2016-02-01T23:48:36
2024-08-15T03:35:42
TagMo
HiddenRamblings/TagMo
2,976
3,207
```xml import * as React from 'react'; import type { ForwardRefComponent } from '@fluentui/react-utilities'; import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts'; import { useDrawerContextValue } from '../../contexts/drawerContext'; import type { InlineDrawerProps } from './InlineDrawer.types'; import { useInlineDrawer_unstable } from './useInlineDrawer'; import { renderInlineDrawer_unstable } from './renderInlineDrawer'; import { useInlineDrawerStyles_unstable } from './useInlineDrawerStyles.styles'; /** * InlineDrawer is often used for navigation that is not dismissible. As it is on the same level as * the main surface, users can still interact with other UI elements. */ export const InlineDrawer: ForwardRefComponent<InlineDrawerProps> = React.forwardRef((props, ref) => { const state = useInlineDrawer_unstable(props, ref); const contextValue = useDrawerContextValue(); useInlineDrawerStyles_unstable(state); useCustomStyleHook_unstable('useDrawerInlineStyles_unstable')(state); useCustomStyleHook_unstable('useInlineDrawerStyles_unstable')(state); return renderInlineDrawer_unstable(state, contextValue); }); InlineDrawer.displayName = 'InlineDrawer'; ```
/content/code_sandbox/packages/react-components/react-drawer/library/src/components/InlineDrawer/InlineDrawer.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
266
```xml import { MainAreaWidget } from '@jupyterlab/apputils'; import { CodeMirrorEditor, EditorSearchProvider } from '@jupyterlab/codemirror'; import { CodeEditor } from '@jupyterlab/codeeditor'; import { IFilters, IReplaceOptionsSupport, ISearchProvider } from '@jupyterlab/documentsearch'; import { ITranslator } from '@jupyterlab/translation'; import { Widget } from '@lumino/widgets'; import { FileEditor } from './widget'; import { ISharedText, SourceChange } from '@jupyter/ydoc'; /** * Helper type */ export type FileEditorPanel = MainAreaWidget<FileEditor>; /** * File editor search provider */ export class FileEditorSearchProvider extends EditorSearchProvider<CodeEditor.IModel> implements ISearchProvider { /** * Constructor * @param widget File editor panel */ constructor(protected widget: FileEditorPanel) { super(); } get isReadOnly(): boolean { return this.editor.getOption('readOnly') as boolean; } /** * Support for options adjusting replacement behavior. */ get replaceOptionsSupport(): IReplaceOptionsSupport { return { preserveCase: true }; } /** * Text editor */ get editor() { return this.widget.content.editor as CodeMirrorEditor; } /** * Editor content model */ get model(): CodeEditor.IModel { return this.widget.content.model; } async startQuery( query: RegExp, filters: IFilters | undefined ): Promise<void> { this._searchActive = true; await super.startQuery(query, filters); await this.highlightNext(true, { from: 'selection-start', scroll: false, select: false }); } /** * Stop the search and clean any UI elements. */ async endQuery(): Promise<void> { this._searchActive = false; await super.endQuery(); } /** * Callback on source change * * @param emitter Source of the change * @param changes Source change */ protected async onSharedModelChanged( emitter: ISharedText, changes: SourceChange ): Promise<void> { if (this._searchActive) { return super.onSharedModelChanged(emitter, changes); } } /** * Instantiate a search provider for the widget. * * #### Notes * The widget provided is always checked using `isApplicable` before calling * this factory. * * @param widget The widget to search on * @param translator [optional] The translator object * * @returns The search provider on the widget */ static createNew( widget: FileEditorPanel, translator?: ITranslator ): ISearchProvider { return new FileEditorSearchProvider(widget); } /** * Report whether or not this provider has the ability to search on the given object */ static isApplicable(domain: Widget): domain is FileEditorPanel { return ( domain instanceof MainAreaWidget && domain.content instanceof FileEditor && domain.content.editor instanceof CodeMirrorEditor ); } /** * Get an initial query value if applicable so that it can be entered * into the search box as an initial query * * @returns Initial value used to populate the search box. */ getInitialQuery(): string { const cm = this.editor as CodeMirrorEditor; const selection = cm.state.sliceDoc( cm.state.selection.main.from, cm.state.selection.main.to ); return selection; } private _searchActive = false; } ```
/content/code_sandbox/packages/fileeditor/src/searchprovider.ts
xml
2016-06-03T20:09:17
2024-08-16T19:12:44
jupyterlab
jupyterlab/jupyterlab
14,019
800
```xml <?xml version="1.0" encoding="UTF-8"?> <!-- ~ contributor license agreements. See the NOTICE file distributed with ~ this work for additional information regarding copyright ownership. ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.shardingsphere</groupId> <artifactId>shardingsphere-parser-sql-statement-type</artifactId> <version>5.5.1-SNAPSHOT</version> </parent> <artifactId>shardingsphere-parser-sql-statement-opengauss</artifactId> <name>${project.artifactId}</name> <dependencies> <dependency> <groupId>org.apache.shardingsphere</groupId> <artifactId>shardingsphere-parser-sql-statement-core</artifactId> <version>${project.version}</version> </dependency> </dependencies> </project> ```
/content/code_sandbox/parser/sql/statement/type/opengauss/pom.xml
xml
2016-01-18T12:49:26
2024-08-16T15:48:11
shardingsphere
apache/shardingsphere
19,707
276
```xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="path_to_url" android:id="@+id/layout_filter" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/common_bg" > <include android:id="@+id/common_top_bar" layout="@layout/layout_common_top_bar" /> <RelativeLayout android:id="@+id/picture" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/common_top_bar" android:layout_above="@+id/filtersSV" > <ImageView android:id="@+id/pictureShow" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_centerInParent="true" android:src="@drawable/river" /> <RelativeLayout android:id="@+id/regulator" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_alignParentRight="true" android:layout_marginRight="10dp" > <cn.jarlen.photoedit.demo.view.VerticalSeekBar android:id="@+id/verticalSeekBar" android:layout_width="wrap_content" android:layout_height="300dp" android:max="100" android:maxWidth="50dp" android:minWidth="50dp" android:progress="2" > </cn.jarlen.photoedit.demo.view.VerticalSeekBar> <TextView android:id="@+id/verticalSeekBarProgressText" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/verticalSeekBar" android:layout_marginTop="5dp" android:gravity="center" android:text="10%" android:textColor="#177d55" /> </RelativeLayout> </RelativeLayout> <HorizontalScrollView android:id="@+id/filtersSV" android:layout_width="wrap_content" android:layout_height="70dp" android:scrollbars="none" android:layout_alignParentBottom="true" > <LinearLayout android:id="@+id/filtersList" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center" android:orientation="horizontal" > <TextView android:id="@+id/filterWhite" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:visibility="gone" android:textColor="#117d55" /> <TextView android:id="@+id/filterGray" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:textColor="#117d55" /> <TextView android:id="@+id/filterMosatic" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:textColor="#117d55" /> <TextView android:id="@+id/filterLOMO" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="LOMO" android:textColor="#117d55" /> <TextView android:id="@+id/filterNostalgic" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:textColor="#117d55" /> <TextView android:id="@+id/filterComics" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:textColor="#117d55" /> <TextView android:id="@+id/filterBlackWhite" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:visibility="gone" android:textColor="#117d55" /> <TextView android:id="@+id/filterNegative" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:visibility="gone" android:textColor="#117d55" /> <TextView android:id="@+id/filterBrown" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:textColor="#117d55" /> <TextView android:id="@+id/filterSketchPencil" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:textColor="#117d55" /> <TextView android:id="@+id/filterOverExposure" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:visibility="gone" android:textColor="#117d55" /> <!-- --> <TextView android:id="@+id/filterSoftness" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:visibility="gone" android:textColor="#117d55" /> <TextView android:id="@+id/filterNiHong" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:visibility="gone" android:textColor="#117d55" /> <TextView android:id="@+id/filterSketch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:visibility="gone" android:textColor="#117d55" /> <!-- <TextView android:id="@+id/filterCarving" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:textColor="#117d55" /> --> <!-- <TextView android:id="@+id/filterSelief" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:textColor="#117d55" /> --> <!-- <TextView android:id="@+id/filterRuiHua" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="5dp" android:drawableTop="@drawable/icon_auto" android:text="" android:textColor="#117d55" /> --> </LinearLayout> </HorizontalScrollView> </RelativeLayout> ```
/content/code_sandbox/app/src/main/res/layout/layout_filter.xml
xml
2016-08-10T12:23:49
2024-08-12T03:08:54
PhotoEdit
jarlen/PhotoEdit
1,158
1,733
```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. --> <selector xmlns:android="path_to_url"> <!-- Disabled chips. --> <item android:alpha="@dimen/material_emphasis_disabled" android:color="?attr/colorOnSurface" android:state_enabled="false"/> <!-- Selected chips. --> <item android:color="?attr/colorOnSecondaryContainer" android:state_selected="true"/> <!-- Not-selected chips. --> <item android:color="?attr/colorOnSurfaceVariant"/> </selector> ```
/content/code_sandbox/lib/java/com/google/android/material/chip/res/color/m3_chip_text_color.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
147
```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 LN_SQRT_TWO_PI = require( './index' ); // TESTS // // The export is a number... { // eslint-disable-next-line @typescript-eslint/no-unused-expressions LN_SQRT_TWO_PI; // $ExpectType number } ```
/content/code_sandbox/lib/node_modules/@stdlib/constants/float64/ln-sqrt-two-pi/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
105
```xml import * as React from 'react'; import { ISPFormFieldProps } from './SPFormField'; import { Toggle } from 'office-ui-fabric-react/lib/Toggle'; import * as strings from 'FormFieldStrings'; const SPFieldBooleanEdit: React.SFC<ISPFormFieldProps> = (props) => { return <Toggle className='ard-booleanFormField' checked={props.value === '1' || props.value === 'true' || props.value === 'Yes'} onAriaLabel={strings.ToggleOnAriaLabel} offAriaLabel={strings.ToggleOffAriaLabel} onText={strings.ToggleOnText} offText={strings.ToggleOffText} onChanged={(checked: boolean) => props.valueChanged(checked.toString())} />; }; export default SPFieldBooleanEdit; ```
/content/code_sandbox/samples/react-list-form/src/webparts/listForm/components/formFields/SPFieldBooleanEdit.tsx
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
170
```xml import {BindingTarget} from '../../../common/binding/target.js'; import {Point3d} from '../model/point-3d.js'; export function point3dFromUnknown(value: unknown): Point3d { return Point3d.isObject(value) ? new Point3d(value.x, value.y, value.z) : new Point3d(); } export function writePoint3d(target: BindingTarget, value: Point3d) { target.writeProperty('x', value.x); target.writeProperty('y', value.y); target.writeProperty('z', value.z); } ```
/content/code_sandbox/packages/core/src/input-binding/point-3d/converter/point-3d.ts
xml
2016-05-10T15:45:13
2024-08-16T19:57:27
tweakpane
cocopon/tweakpane
3,480
124
```xml <Project Sdk="Microsoft.NET.Sdk"> <ItemGroup> <None Update="DependencyInjection\TestConfiguration\*.json"> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> </None> </ItemGroup> <ItemGroup> <PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.FileExtensions" Version="3.0.0" /> <PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="3.0.0" /> <PackageReference Include="NewtonSoft.Json" Version="12.0.3-beta2" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\src\App.Metrics.AspNetCore.Mvc.Core\App.Metrics.AspNetCore.Mvc.Core.csproj" /> </ItemGroup> </Project> ```
/content/code_sandbox/src/AspNetCore/test/App.Metrics.AspNetCore.Integration.Facts/App.Metrics.AspNetCore.Integration.Facts.csproj
xml
2016-11-20T04:39:02
2024-08-14T12:43:59
AppMetrics
AppMetrics/AppMetrics
2,215
183
```xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration type="org.lamport.tla.toolbox.tool.tlc.modelCheck"> <intAttribute key="autoLockTime" value="15"/> <stringAttribute key="configurationName" value="Model_3"/> <intAttribute key="dfidDepth" value="100"/> <booleanAttribute key="dfidMode" value="false"/> <booleanAttribute key="distributedTLC" value="false"/> <stringAttribute key="distributedTLCScript" value=""/> <stringAttribute key="distributedTLCVMArgs" value=""/> <intAttribute key="fpBits" value="0"/> <intAttribute key="maxHeapSize" value="500"/> <booleanAttribute key="mcMode" value="true"/> <stringAttribute key="modelBehaviorInit" value=""/> <stringAttribute key="modelBehaviorNext" value=""/> <stringAttribute key="modelBehaviorSpec" value=""/> <intAttribute key="modelBehaviorSpecType" value="0"/> <stringAttribute key="modelBehaviorVars" value=""/> <booleanAttribute key="modelCorrectnessCheckDeadlock" value="true"/> <listAttribute key="modelCorrectnessInvariants"/> <listAttribute key="modelCorrectnessProperties"/> <stringAttribute key="modelExpressionEval" value="AllSolutions"/> <stringAttribute key="modelParameterActionConstraint" value=""/> <listAttribute key="modelParameterConstants"> <listEntry value="N;;121;0;0"/> <listEntry value="P;;5;0;0"/> </listAttribute> <stringAttribute key="modelParameterContraint" value=""/> <listAttribute key="modelParameterDefinitions"/> <stringAttribute key="modelParameterModelValues" value="{}"/> <stringAttribute key="modelParameterNewDefinitions" value=""/> <intAttribute key="numberOfWorkers" value="1"/> <booleanAttribute key="recover" value="false"/> <intAttribute key="simuAril" value="-1"/> <intAttribute key="simuDepth" value="100"/> <intAttribute key="simuSeed" value="-1"/> <stringAttribute key="specName" value="CarTalkPuzzle"/> <stringAttribute key="view" value=""/> </launchConfiguration> ```
/content/code_sandbox/specifications/CarTalkPuzzle/CarTalkPuzzle.toolbox/CarTalkPuzzle___Model_3.launch
xml
2016-03-01T10:50:58
2024-08-15T09:26:38
Examples
tlaplus/Examples
1,258
437
```xml import { SchemaComposer } from '../../SchemaComposer'; import { dedent } from '../dedent'; describe('schemaPrinter', () => { describe('printSchemaComposer()', () => { const sc = new SchemaComposer(); sc.addTypeDefs(` extend type Query { me: User } type User @key(fields: "id") { id: ID! } scalar _FieldSet directive @key(fields: _FieldSet!) on OBJECT | INTERFACE `); it('should print schema in SDL without descriptions', () => { expect(sc.toSDL({ omitDescriptions: true })).toBe(dedent` directive @key(fields: _FieldSet!) on OBJECT | INTERFACE type Query { me: User } scalar _FieldSet scalar ID type User @key(fields: "id") { id: ID! } `); }); it('should print schema in SDL without directives', () => { expect( sc.toSDL({ omitDescriptions: true, omitDirectiveDefinitions: true, }) ).toBe(dedent` type Query { me: User } scalar ID type User @key(fields: "id") { id: ID! } `); }); it('should print schema in SDL exclude some types', () => { expect( sc.toSDL({ omitDescriptions: true, exclude: ['User'], }) ).toBe(dedent` directive @key(fields: _FieldSet!) on OBJECT | INTERFACE type Query { me: User } scalar _FieldSet `); }); it('should print schema in SDL include only selected types', () => { expect( sc.toSDL({ omitDescriptions: true, include: ['User'], }) ).toBe(dedent` directive @key(fields: _FieldSet!) on OBJECT | INTERFACE type User @key(fields: "id") { id: ID! } scalar _FieldSet scalar ID `); }); it('should print schema in SDL with simultaneously include & exclude', () => { expect( sc.toSDL({ omitDescriptions: true, include: ['User'], exclude: ['User', 'ID'], }) ).toBe(dedent` directive @key(fields: _FieldSet!) on OBJECT | INTERFACE type User @key(fields: "id") { id: ID! } scalar _FieldSet `); }); it('should print schema in SDL without scalars', () => { expect( sc.toSDL({ omitScalars: true, }) ).toBe(dedent` directive @key(fields: _FieldSet!) on OBJECT | INTERFACE type Query { me: User } type User @key(fields: "id") { id: ID! } `); }); }); }); ```
/content/code_sandbox/src/utils/__tests__/schemaPrinter-test.ts
xml
2016-06-07T07:43:40
2024-07-30T19:45:36
graphql-compose
graphql-compose/graphql-compose
1,205
642
```xml <dict> <key>CommonPeripheralDSP</key> <array> <dict> <key>DeviceID</key> <integer>0</integer> <key>DeviceType</key> <string>Headphone</string> </dict> <dict> <key>DeviceID</key> <integer>0</integer> <key>DeviceType</key> <string>Microphone</string> </dict> </array> <key>PathMaps</key> <array> <dict> <key>PathMap</key> <array> <array> <array> <array> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>17</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>31</integer> </dict> <dict> <key>Boost</key> <integer>4</integer> <key>NodeID</key> <integer>48</integer> </dict> </array> </array> <array> <array> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>17</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>31</integer> </dict> <dict> <key>Boost</key> <integer>3</integer> <key>NodeID</key> <integer>43</integer> </dict> </array> </array> </array> <array> <array> <array> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>36</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>20</integer> </dict> <dict> <key>NodeID</key> <integer>52</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>9</integer> </dict> </array> </array> <array> <array> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>37</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>21</integer> </dict> <dict> <key>NodeID</key> <integer>53</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>8</integer> </dict> </array> </array> </array> </array> <key>PathMapID</key> <integer>1</integer> </dict> </array> </dict> ```
/content/code_sandbox/Resources/VT1802/Platforms65.xml
xml
2016-03-07T20:45:58
2024-08-14T08:57:03
AppleALC
acidanthera/AppleALC
3,420
2,680
```xml export interface IPropertyPaneHTMLHostProps { html: string; } //# sourceMappingURL=IPropertyPaneHTMLHostProps.d.ts.map ```
/content/code_sandbox/samples/react-enhanced-powerapps/lib/controls/PropertyPaneHTML/IPropertyPaneHTMLHostProps.d.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
28
```xml export { default, default as useFeature } from '@proton/features/useFeature'; ```
/content/code_sandbox/packages/components/hooks/useFeature.ts
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
18
```xml import { filterDependenciesByType } from '@pnpm/manifest-utils' import { type Dependencies, type DependenciesMeta, type IncludedDependencies, type ProjectManifest, } from '@pnpm/types' import { whichVersionIsPinned } from '@pnpm/which-version-is-pinned' import { WorkspaceSpec } from '@pnpm/workspace.spec-parser' export type PinnedVersion = 'major' | 'minor' | 'patch' | 'none' export interface WantedDependency { alias: string pref: string // package reference dev: boolean optional: boolean raw: string pinnedVersion?: PinnedVersion nodeExecPath?: string updateSpec?: boolean } export function getWantedDependencies ( pkg: Pick<ProjectManifest, 'devDependencies' | 'dependencies' | 'optionalDependencies' | 'dependenciesMeta' | 'peerDependencies'>, opts?: { autoInstallPeers?: boolean includeDirect?: IncludedDependencies nodeExecPath?: string updateWorkspaceDependencies?: boolean } ): WantedDependency[] { let depsToInstall = filterDependenciesByType(pkg, opts?.includeDirect ?? { dependencies: true, devDependencies: true, optionalDependencies: true, }) if (opts?.autoInstallPeers) { depsToInstall = { ...pkg.peerDependencies, ...depsToInstall, } } return getWantedDependenciesFromGivenSet(depsToInstall, { dependencies: pkg.dependencies ?? {}, devDependencies: pkg.devDependencies ?? {}, optionalDependencies: pkg.optionalDependencies ?? {}, dependenciesMeta: pkg.dependenciesMeta ?? {}, peerDependencies: pkg.peerDependencies ?? {}, updatePref: opts?.updateWorkspaceDependencies === true ? updateWorkspacePref : (pref) => pref, }) } function updateWorkspacePref (pref: string): string { const spec = WorkspaceSpec.parse(pref) if (!spec) return pref spec.version = '*' return spec.toString() } function getWantedDependenciesFromGivenSet ( deps: Dependencies, opts: { dependencies: Dependencies devDependencies: Dependencies optionalDependencies: Dependencies peerDependencies: Dependencies dependenciesMeta: DependenciesMeta nodeExecPath?: string updatePref: (pref: string) => string } ): WantedDependency[] { if (!deps) return [] return Object.entries(deps).map(([alias, pref]) => { const updatedPref = opts.updatePref(pref) let depType if (opts.optionalDependencies[alias] != null) depType = 'optional' else if (opts.dependencies[alias] != null) depType = 'prod' else if (opts.devDependencies[alias] != null) depType = 'dev' else if (opts.peerDependencies[alias] != null) depType = 'prod' return { alias, dev: depType === 'dev', injected: opts.dependenciesMeta[alias]?.injected, optional: depType === 'optional', nodeExecPath: opts.nodeExecPath ?? opts.dependenciesMeta[alias]?.node, pinnedVersion: whichVersionIsPinned(pref), pref: updatedPref, raw: `${alias}@${pref}`, } }) } ```
/content/code_sandbox/pkg-manager/resolve-dependencies/src/getWantedDependencies.ts
xml
2016-01-28T07:40:43
2024-08-16T12:38:47
pnpm
pnpm/pnpm
28,869
698
```xml <?xml version="1.0" encoding="UTF-8"?> <project name="SkiaAndroid" default="help"> <!-- The local.properties file is created and updated by the 'android' tool. It contains the path to the SDK. It should *NOT* be checked into Version Control Systems. --> <property file="local.properties" /> <!-- The project.properties file is created and updated by the 'android' tool, as well as ADT. This contains project specific properties such as project target, and library dependencies. Lower level build properties are stored in ant.properties (or in .classpath for Eclipse projects). This file is an integral part of the build system for your application and should be checked into Version Control Systems. --> <loadproperties srcFile="project.properties" /> <!-- quick check on sdk.dir --> <fail message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var" unless="sdk.dir" /> <!-- Import per project custom build rules if present at the root of the project. This is the place to put custom intermediary targets such as: -pre-build -pre-compile -post-compile (This is typically used for code obfuscation. Compiled code location: ${out.classes.absolute.dir} If this is not done in place, override ${out.dex.input.absolute.dir}) -post-package -post-build -pre-clean --> <import file="custom_rules.xml" optional="true" /> <!-- Import the actual build file. To customize existing targets, there are two options: - Customize only one target: - copy/paste the target into this file, *before* the <import> task. - customize it to your needs. - Customize the whole content of build.xml - copy/paste the content of the rules files (minus the top node) into this file, replacing the <import> task. - customize to your needs. *********************** ****** IMPORTANT ****** *********************** In all cases you must update the value of version-tag below to read 'custom' instead of an integer, in order to avoid having your file be overridden by tools such as "android update project" --> <!-- version-tag: 1 --> <import file="${sdk.dir}/tools/ant/build.xml" /> </project> ```
/content/code_sandbox/third_party/skia/platform_tools/android/app/build.xml
xml
2016-09-27T03:41:10
2024-08-16T10:42:57
miniblink49
weolar/miniblink49
7,069
526
```xml import * as React from 'react'; import { ReactNode, useEffect } from 'react'; import { FormGroupContext } from './FormGroupContext'; import { useFormGroups } from './useFormGroups'; /** * This provider allows its input children to register to a specific group. * This enables other components in the group to access group properties such as its * validation (valid/invalid) or whether its inputs have been updated (dirty/pristine). * * @example * import { Edit, SimpleForm, TextInput, FormGroupContextProvider, useFormGroup } from 'react-admin'; * import { Accordion, AccordionDetails, AccordionSummary, Typography } from '@mui/material'; * * const PostEdit = () => ( * <Edit> * <SimpleForm> * <TextInput source="title" /> * <FormGroupContextProvider name="options"> * <Accordion> * <AccordionSummary * expandIcon={<ExpandMoreIcon />} * aria-controls="options-content" * id="options-header" * > * <AccordionSectionTitle name="options">Options</AccordionSectionTitle> * </AccordionSummary> * <AccordionDetails id="options-content" aria-labelledby="options-header"> * <TextInput source="teaser" validate={minLength(20)} /> * </AccordionDetails> * </Accordion> * </FormGroupContextProvider> * </SimpleForm> * </Edit> * ); * * const AccordionSectionTitle = ({ children, name }) => { * const formGroupState = useFormGroup(name); * return ( * <Typography color={formGroupState.invalid && formGroupState.dirty ? 'error' : 'inherit'}> * {children} * </Typography> * ); * } * * @param props The component props * @param {ReactNode} props.children The form group content * @param {String} props.name The form group name */ export const FormGroupContextProvider = ({ children, name, }: { children: ReactNode; name: string; }) => { const formGroups = useFormGroups(); useEffect(() => { if ( !formGroups || !formGroups.registerGroup || !formGroups.unregisterGroup ) { console.warn( `The FormGroupContextProvider can only be used inside a FormContext such as provided by the SimpleForm and TabbedForm components` ); return; } formGroups.registerGroup(name); return () => { formGroups.unregisterGroup(name); }; }, [formGroups, name]); return ( <FormGroupContext.Provider value={name}> {children} </FormGroupContext.Provider> ); }; ```
/content/code_sandbox/packages/ra-core/src/form/FormGroupContextProvider.tsx
xml
2016-07-13T07:58:54
2024-08-16T18:32:27
react-admin
marmelab/react-admin
24,624
566
```xml import { RootKeyInterface } from '@standardnotes/models' /* istanbul ignore file */ export type ChallengeArtifacts = { wrappingKey?: RootKeyInterface rootKey?: RootKeyInterface } ```
/content/code_sandbox/packages/services/src/Domain/Challenge/Types/ChallengeArtifacts.ts
xml
2016-12-05T23:31:33
2024-08-16T06:51:19
app
standardnotes/app
5,180
44
```xml <?xml version="1.0" encoding="utf-8"?> <resources> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="colorButtonNormal">@color/colorAccent</item> </style> </resources> ```
/content/code_sandbox/sample/src/main/res/values/themes.xml
xml
2016-01-05T13:41:06
2024-08-16T11:17:20
uCrop
Yalantis/uCrop
11,830
101
```xml /** * Usage: selectDropdownByNumber ( selector, index) * selector : select element * index : index in the dropdown, 1 base. */ export function selectDropdownByNumber(selector: string, index: number, milliseconds: number) { element(by.css(selector)).all(by.tagName('option')) .then(function(options: any) { options[index].click(); }); if (typeof milliseconds !== 'undefined') { browser.sleep(milliseconds); } } /** * Usage: selectDropdownByValue (selector, item) * selector : select element * item : option(s) in the dropdown. */ export async function selectDropdownByValue(selector: string, item: string) { // var desiredOption: any; return await element(by.css(selector)).sendKeys(item); } /** * Usage: selectRandomDropdownReturnText ( selector, milliseconds) * selector : select random element * index : wait time to select value for drop down. */ export function selectRandomDropdownReturnText(selector: string, milliseconds: number) { element(by.css(selector)).all(by.tagName('option')).then(function(options: any) { var randomNumber = Math.floor((Math.random() * options.length )); options[randomNumber].click(); return options[randomNumber].getText().then(function(text: string) { return text; }); }); if (typeof milliseconds !== 'undefined') { browser.sleep(milliseconds); } } ```
/content/code_sandbox/src/e2e/framework/dropdowns.ts
xml
2016-01-27T07:12:46
2024-08-15T11:32:04
angular-seed-advanced
NathanWalker/angular-seed-advanced
2,261
298
```xml import { Observable, map } from "rxjs"; import { ActiveUserState, StateProvider, USER_DECRYPTION_OPTIONS_DISK, UserKeyDefinition, } from "@bitwarden/common/platform/state"; import { UserId } from "@bitwarden/common/src/types/guid"; import { InternalUserDecryptionOptionsServiceAbstraction } from "../../abstractions/user-decryption-options.service.abstraction"; import { UserDecryptionOptions } from "../../models"; export const USER_DECRYPTION_OPTIONS = new UserKeyDefinition<UserDecryptionOptions>( USER_DECRYPTION_OPTIONS_DISK, "decryptionOptions", { deserializer: (decryptionOptions) => UserDecryptionOptions.fromJSON(decryptionOptions), clearOn: ["logout"], }, ); export class UserDecryptionOptionsService implements InternalUserDecryptionOptionsServiceAbstraction { private userDecryptionOptionsState: ActiveUserState<UserDecryptionOptions>; userDecryptionOptions$: Observable<UserDecryptionOptions>; hasMasterPassword$: Observable<boolean>; constructor(private stateProvider: StateProvider) { this.userDecryptionOptionsState = this.stateProvider.getActive(USER_DECRYPTION_OPTIONS); this.userDecryptionOptions$ = this.userDecryptionOptionsState.state$; this.hasMasterPassword$ = this.userDecryptionOptions$.pipe( map((options) => options?.hasMasterPassword ?? false), ); } userDecryptionOptionsById$(userId: UserId): Observable<UserDecryptionOptions> { return this.stateProvider.getUser(userId, USER_DECRYPTION_OPTIONS).state$; } async setUserDecryptionOptions(userDecryptionOptions: UserDecryptionOptions): Promise<void> { await this.userDecryptionOptionsState.update((_) => userDecryptionOptions); } } ```
/content/code_sandbox/libs/auth/src/common/services/user-decryption-options/user-decryption-options.service.ts
xml
2016-03-09T23:14:01
2024-08-16T15:07:51
clients
bitwarden/clients
8,877
369
```xml <vector android:height="64dp" android:viewportHeight="128" android:viewportWidth="128" android:width="64dp" xmlns:android="path_to_url"> <path android:fillColor="#808080" android:pathData="M0,64a64,64 0,1 0,128 0a64,64 0,1 0,-128 0z" android:strokeWidth="3.7796"/> <group> <clip-path android:pathData="M128,64a64,64 0,1 1,-128 0a64,64 0,1 1,128 0z"/> <path android:fillColor="#aaa" android:pathData="m52,0l-52,0l-0,128l52,0z"/> <path android:fillColor="#00000000" android:pathData="m52,88l-16,0m16,-24l-16,0m16,-48l-16,0m16,24l-16,0m16,72l-16,0m-16,-24l-16,0m16,-24l-16,0m16,-48l-16,0m16,24l-16,0m16,72l-16,0m32,12l-16,0m16,-48l-16,0m16,-24l-16,0m16,-48l-16,0m16,24l-16,0m16,72l-16,0m-16,-100l-0,128m16,0l-0,-128m16,0l-0,128m-32,-100.58l-4,0m4,24l-4,0m4,72l-4,0m4,-24l-4,0m4,-24l-4,0m4,-72l-4,0" android:strokeColor="#999" android:strokeWidth="4"/> <path android:fillColor="#999" android:pathData="m60,0l-8,0l-0,128l8,0z"/> <path android:fillColor="#666" android:pathData="m68,0l-8,0l-0,128l8,0z"/> </group> <path android:fillColor="#fff" android:pathData="m33.49,45.12c-2.78,0 -5.03,2.25 -5.03,5.03 0,2.78 2.25,5.03 5.03,5.03 2.78,0 5.03,-2.25 5.03,-5.03 0,-2.78 -2.25,-5.03 -5.03,-5.03zM28.23,57.01c-5.09,1.9 -9.01,5.14 -9.06,10.52 0,1.38 1.12,2.49 2.49,2.49 1.38,0 2.49,-1.12 2.49,-2.49 0.04,-1.37 0.62,-2.54 1.48,-3.47 0.03,1.22 0.22,2.6 0.64,4.13 -0.26,0.43 -0.37,1.08 -0.27,2.03 -0.88,5.06 -6.46,8.36 -10.06,9.99 -1.26,0.56 -1.83,2.03 -1.27,3.29 0.56,1.26 2.03,1.83 3.29,1.27 4.78,-2.49 10.85,-6.5 12.6,-11.77 3.97,1.85 7.68,6 8.35,9.84 0.19,1.36 1.46,2.31 2.82,2.12 1.36,-0.19 2.31,-1.46 2.12,-2.82 -1.03,-6.15 -5.28,-10.71 -10.58,-13.38 -1.54,-0.66 -1.66,-4.24 -1.57,-5.54 4.65,2.64 9.42,3.82 14.14,1.5 1.23,-0.62 1.73,-2.11 1.11,-3.35 -0.62,-1.23 -2.11,-1.73 -3.34,-1.11 -5.55,2.74 -9,-1.46 -11.92,-3.16 -1.04,-0.73 -2.43,-0.73 -3.47,-0.09z" android:strokeWidth=".1264"/> <path android:fillColor="#00000000" android:pathData="m92.95,68.53a8.07,8.04 0,0 1,-8.07 8.04,8.07 8.04,0 0,1 -8.07,-8.04 8.07,8.04 0,0 1,8.07 -8.04,8.07 8.04,0 0,1 8.07,8.04zM119.25,68.53a8.07,8.04 0,0 1,-8.07 8.04,8.07 8.04,0 0,1 -8.07,-8.04 8.07,8.04 0,0 1,8.07 -8.04,8.07 8.04,0 0,1 8.07,8.04zM89.37,56.15 L99.57,68.48h11.66l-8.01,-12.33h-13.84m10.2,12.33 l3.64,-15.23m0,0 l3.55,-0.01m-21.76,15.24 l6.07,-18h5.83" android:strokeColor="#fff" android:strokeLineCap="round" android:strokeLineJoin="round" android:strokeWidth="3.2418"/> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/ic_separate_cycleway_with_sidewalk_l.xml
xml
2016-07-02T10:44:04
2024-08-16T18:55:54
StreetComplete
streetcomplete/StreetComplete
3,781
1,446
```xml <vector xmlns:android="path_to_url" xmlns:tools="path_to_url" android:width="512dp" android:height="512dp" android:viewportWidth="512.0" android:viewportHeight="512.0" tools:keep="@drawable/fa_bitbucket"> <path android:fillColor="#FFFFFFFF" android:pathData="M23.1,32C14.2,31.9 7,38.9 6.9,47.8c0,0.9 0.1,1.8 0.2,2.8L74.9,462c1.7,10.4 10.7,18 21.2,18.1h325.1c7.9,0.1 14.7,-5.6 16,-13.4l67.8,-416c1.4,-8.7 -4.5,-16.9 -13.2,-18.3 -0.9,-0.1 -1.8,-0.2 -2.8,-0.2L23.1,32zM308.4,329.3L204.6,329.3l-28.1,-146.8h157l-25.1,146.8z"/> </vector> ```
/content/code_sandbox/mobile/src/main/res/drawable/fa_bitbucket.xml
xml
2016-10-24T13:23:25
2024-08-16T07:20:37
freeotp-android
freeotp/freeotp-android
1,387
287
```xml import { SchemaOf, array, bool, object, string } from 'yup'; import { EnvVar } from '@@/form-components/EnvironmentVariablesFieldset/types'; import { buildUniquenessTest } from '@@/form-components/validate-unique'; export function kubeEnvVarValidationSchema(): SchemaOf<EnvVar[]> { return array( object({ name: string() .required('Environment variable name is required') .matches( /^[a-zA-Z][a-zA-Z0-9_.-]*$/, `This field must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit (e.g. 'my.env-name', or 'MY_ENV.NAME', or 'MyEnvName1'` ), value: string().default(''), needsDeletion: bool().default(false), isNew: bool().default(false), }) ).test( 'unique', 'This environment variable is already defined', buildUniquenessTest( () => 'This environment variable is already defined', 'name' ) ); } ```
/content/code_sandbox/app/react/kubernetes/applications/components/EnvironmentVariablesFormSection/kubeEnvVarValidationSchema.ts
xml
2016-05-19T20:15:28
2024-08-16T19:15:14
portainer
portainer/portainer
30,083
234
```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 trunc10 = require( './index' ); // TESTS // // The function returns a number... { trunc10( 13 ); // $ExpectType number } // The compiler throws an error if the function is provided a value other than a number... { trunc10( true ); // $ExpectError trunc10( false ); // $ExpectError trunc10( null ); // $ExpectError trunc10( undefined ); // $ExpectError trunc10( '5' ); // $ExpectError trunc10( [] ); // $ExpectError trunc10( {} ); // $ExpectError trunc10( ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided insufficient arguments... { trunc10(); // $ExpectError } ```
/content/code_sandbox/lib/node_modules/@stdlib/math/base/special/trunc10/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
228
```xml <?xml version="1.0" encoding="utf-8"?> <WixLocalization Culture="ko-kr" xmlns="path_to_url"> <String Id="Locale" Overridable="yes">ko</String> <String Id="ProductName" Overridable="yes">Aspia Console</String> <String Id="ShortcutName" Overridable="yes">Aspia Console</String> <String Id="DowngradeErrorMessage" Overridable="yes">A newer version of the application is already installed.</String> <String Id="AddressBookFile" Overridable="yes">Aspia Address Book (.aab)</String> <String Id="CreateDesktopShortcut" Overridable="yes">Create desktop shortcut</String> <String Id="CreateProgramMenuShortcut" Overridable="yes">Create shortcut in the Start menu</String> </WixLocalization> ```
/content/code_sandbox/installer/translations/console.ko-kr.wxl
xml
2016-10-26T16:17:31
2024-08-16T13:37:42
aspia
dchapyshev/aspia
1,579
191
```xml /* * * This source code is licensed under the MIT license which is detailed in the LICENSE.txt file. */ import { AlignmentFlag, Direction, QIcon, QLabel, QPushButton, QSizePolicyPolicy, QStackedWidget, QWidget, TextFormat, TextInteractionFlag } from "@nodegui/nodegui"; import { BoxLayout, Frame, Label, PushButton, ScrollArea, StackedWidget, Widget } from "qt-construct"; import { EventEmitter, Event } from "extraterm-event-emitter"; import { getLogger, Logger } from "extraterm-logging"; import { ExtensionMetadata } from "../extension/ExtensionMetadata.js"; import { ExtensionManager } from "../InternalTypes.js"; import { createHtmlIcon } from "../ui/Icons.js"; import { UiStyle } from "../ui/UiStyle.js"; import { makeLinkLabel, makeSubTabBar } from "../ui/QtConstructExtra.js"; import { SettingsPageType } from "./SettingsPageType.js"; enum SubPage { ALL_EXTENSIONS = 0, EXTENSION_DETAILS = 1 } interface MenuPair { context: string; command: string; } export class ExtensionsPage implements SettingsPageType { private _log: Logger = null; #extensionManager: ExtensionManager = null; #uiStyle: UiStyle = null; #detailCards: ExtensionDetailCard[] = null; #topLevelStack: QStackedWidget = null; #detailsStack: QStackedWidget = null; #detailsStackMapping = new Map<string, number>(); constructor(extensionManager: ExtensionManager, uiStyle: UiStyle) { this._log = getLogger("ExtensionsPage", this); this.#extensionManager = extensionManager; this.#uiStyle = uiStyle; } getIconName(): string { return "fa-puzzle-piece"; } getMenuText(): string { return "Extensions"; } getName(): string { return null; } getPage(): QWidget { if (this.#topLevelStack == null) { this.#topLevelStack = this.#createPage(); } return this.#topLevelStack; } #createPage(): QStackedWidget { const topLevelStack = StackedWidget({ children: [ ScrollArea({ cssClass: "settings-tab", widgetResizable: true, widget: Widget({ cssClass: "settings-tab", sizePolicy: { horizontal: QSizePolicyPolicy.MinimumExpanding, vertical: QSizePolicyPolicy.Fixed, }, maximumWidth: 600, layout: BoxLayout({ direction: Direction.TopToBottom, children: [ Label({ text: `${createHtmlIcon("fa-puzzle-piece")}&nbsp;&nbsp;Extensions`, textFormat: TextFormat.RichText, cssClass: ["h2"]}), // All Extensions Cards Widget({ sizePolicy: { horizontal: QSizePolicyPolicy.MinimumExpanding, vertical: QSizePolicyPolicy.Fixed, }, maximumWidth: 600, layout: BoxLayout({ direction: Direction.TopToBottom, contentsMargins: [0, 0, 0, 0], children: [ ...this.#createCards() ] }) }), { widget: Widget({}), stretch: 1 } ] }) }) }), ScrollArea({ cssClass: "settings-tab", widgetResizable: true, widget: Widget({ cssClass: "settings-tab", sizePolicy: { horizontal: QSizePolicyPolicy.MinimumExpanding, vertical: QSizePolicyPolicy.Fixed, }, maximumWidth: 600, layout: BoxLayout({ direction: Direction.TopToBottom, children: [ Label({ text: `${createHtmlIcon("fa-puzzle-piece")}&nbsp;&nbsp;Extensions`, textFormat: TextFormat.RichText, cssClass: ["h2"]}), // Extension Details Widget({ sizePolicy: { horizontal: QSizePolicyPolicy.MinimumExpanding, vertical: QSizePolicyPolicy.Fixed, }, layout: BoxLayout({ direction: Direction.TopToBottom, contentsMargins: [0, 0, 0, 0], children: [ makeLinkLabel({ text: `<a href="_">${createHtmlIcon("fa-arrow-left")}&nbsp;All Extensions</a>`, uiStyle: this.#uiStyle, onLinkActivated: (url: string): void => this.#handleBackLink() }), this.#detailsStack = StackedWidget({ sizePolicy: { horizontal: QSizePolicyPolicy.MinimumExpanding, vertical: QSizePolicyPolicy.Fixed, }, children: [] }), { widget: Widget({}), stretch: 1 } ] }) }) ] }) }) }) ] }); return topLevelStack; } #createCards(): QWidget[] { const detailCards: ExtensionDetailCard[] = []; for (const emd of this.#extensionManager.getAllExtensions()) { if (emd.isInternal) { continue; } const card = new ExtensionDetailCard(this.#extensionManager, this.#uiStyle, emd); card.onDetailsClick((name: string): void => this.#handleDetailsClick(name)); detailCards.push(card); } this.#detailCards = detailCards; return this.#detailCards.map(card => card.getCardWidget()); } #handleDetailsClick(cardName: string): void { this.#showDetailsPage(cardName); } #showDetailsPage(cardName: string): void { this.#topLevelStack.setCurrentIndex(SubPage.EXTENSION_DETAILS); if (! this.#detailsStackMapping.has(cardName)) { for (const card of this.#detailCards) { if (card.getName() === cardName) { const detailsWidget = card.getDetailsWidget(); const count = this.#detailsStack.count(); this.#detailsStack.addWidget(detailsWidget); this.#detailsStackMapping.set(cardName, count); this.#detailsStack.setCurrentIndex(count); } } } else { this.#detailsStack.setCurrentIndex(this.#detailsStackMapping.get(cardName)); } } #handleBackLink(): void { this.#topLevelStack.setCurrentIndex(SubPage.ALL_EXTENSIONS); } } class ExtensionDetailCard { #extensionManager: ExtensionManager = null; #extensionMetadata: ExtensionMetadata = null; #uiStyle: UiStyle = null; #cardWidget: QWidget = null; #detailsWidget: QWidget = null; #onDetailsClickEventEmitter = new EventEmitter<string>(); onDetailsClick: Event<string> = null; constructor(extensionManager: ExtensionManager, uiStyle: UiStyle, extensionMetadata: ExtensionMetadata) { this.#extensionManager = extensionManager; this.#extensionMetadata = extensionMetadata; this.#uiStyle = uiStyle; this.onDetailsClick = this.#onDetailsClickEventEmitter.event; } getName(): string { return this.#extensionMetadata.name; } #createCardWidget(showDetailsButton: boolean): QWidget { let trafficLight: QLabel; let enableDisableButton: QPushButton; const metadata = this.#extensionMetadata; const result = Frame({ cssClass: ["card"], sizePolicy: { horizontal: QSizePolicyPolicy.MinimumExpanding, vertical: QSizePolicyPolicy.Fixed, }, layout: BoxLayout({ direction: Direction.TopToBottom, children: [ Label({ cssClass: ["h3"], text: `${metadata.displayName || metadata.name} ${metadata.version}`, }), Label({ text: metadata.description, wordWrap: true }), BoxLayout({ contentsMargins: [0, 0, 0, 0], direction: Direction.LeftToRight, children: [ showDetailsButton && { widget: PushButton({ text: "Details", cssClass: ["small"], onClicked: () => this.#onDetailsClickEventEmitter.fire(metadata.name), }), stretch: 0, }, { widget: Widget({}), stretch: 1, }, { widget: trafficLight = Label({ text: "", textFormat: TextFormat.RichText, }) }, { widget: enableDisableButton = PushButton({ text: "", cssClass: ["small"], onClicked: () => { if (this.#extensionManager.isExtensionEnabled(metadata.name)) { this.#extensionManager.disableExtension(metadata.name); } else { this.#extensionManager.enableExtension(metadata.name); } }, }), stretch: 0, alignment: AlignmentFlag.AlignRight }, ] }) ] }) }); const updateTrafficLight = () => { let color: string; let icon: QIcon; let text: string; if (this.#extensionManager.isExtensionEnabled(metadata.name)) { color = this.#uiStyle.getTrafficLightRunningColor(); text = "Disable"; icon = this.#uiStyle.getButtonIcon("fa-pause"); } else { color = this.#uiStyle.getTrafficLightStoppedColor(); text = "Enable"; icon = this.#uiStyle.getButtonIcon("fa-play"); } trafficLight.setText(`<font color="${color}">${createHtmlIcon("fa-circle")}</font>`); enableDisableButton.setIcon(icon); enableDisableButton.setText(text); }; this.#extensionManager.onDesiredStateChanged(updateTrafficLight); updateTrafficLight(); return result; } getCardWidget(): QWidget { this.#cardWidget = this.#createCardWidget(true); return this.#cardWidget; } getDetailsWidget(): QWidget { let detailsStack: QStackedWidget; const metadata = this.#extensionMetadata; this.#detailsWidget = Widget({ maximumWidth: 600, layout: BoxLayout({ direction: Direction.TopToBottom, contentsMargins: [0, 0, 0, 0], children: [ this.#createCardWidget(false), metadata.homepage && makeLinkLabel({ text: `${createHtmlIcon("fa-home")}&nbsp;Home page: <a href="${metadata.homepage}">${metadata.homepage}</a>`, uiStyle: this.#uiStyle, openExternalLinks: true, wordWrap: true }), makeSubTabBar({ tabs: ["Details", "Feature Contributions"], onCurrentChanged: (index: number): void => { detailsStack.setCurrentIndex(index); }, }), detailsStack = StackedWidget({ children: [ Label({ text: metadata.description, textFormat: TextFormat.RichText, wordWrap: true, alignment: AlignmentFlag.AlignTop | AlignmentFlag.AlignLeft, textInteractionFlag: TextInteractionFlag.TextSelectableByMouse, sizePolicy: { horizontal: QSizePolicyPolicy.MinimumExpanding, vertical: QSizePolicyPolicy.Fixed, }, }), Label({ text: this.#getContributionsHTML(), textFormat: TextFormat.RichText, wordWrap: true, alignment: AlignmentFlag.AlignTop | AlignmentFlag.AlignLeft, textInteractionFlag: TextInteractionFlag.TextSelectableByMouse, sizePolicy: { horizontal: QSizePolicyPolicy.MinimumExpanding, vertical: QSizePolicyPolicy.Fixed, }, }) ] }), { widget: Widget({}), stretch: 1 }, ] }) }); return this.#detailsWidget; } #getContributionsHTML(): string { const parts: string[] =[]; const contributes = this.#extensionMetadata.contributes; parts.push(this.#uiStyle.getHTMLStyleTag()); if (contributes.commands.length !== 0) { parts.push(` <h4>Commands</h4> <table width="100%"> <thead> <tr> <th>Title</th> <th>Command</th> </tr> </thead> <tbody> `); for(const command of contributes.commands) { parts.push(` <tr> <td>${command.title}</td> <td>${command.command}</td> </tr> `); } parts.push(` </tbody> </table> `); } if (contributes.keybindings.length !== 0) { parts.push(` <h4>Keybindings</h4> <table width="100%"> <thead> <tr> <th>Path</th> </tr> </thead> <tbody> `); for (const keybindings of contributes.keybindings) { parts.push(` <tr> <td>${keybindings.path}</td> </tr> `); } parts.push(` </tbody> </table> `); } const menus = this.#getMenus(); if (menus.length !== 0) { parts.push(` <h4>Menus</h4> <table width="100%"> <thead> <tr> <th>Context</th> <th>Command</th> </tr> </thead> <tbody> `); for (const menuPair of menus) { parts.push(` <tr> <td>${menuPair.context}</td> <td>${menuPair.command}</td> </tr> `); } parts.push(` </tbody> </table> `); } if (contributes.sessionBackends.length !== 0) { parts.push(` <h4>Session backends</h4> <table width="100%"> <thead> <tr> <th>Name</th> <th>Type</th> </tr> </thead> <tbody> `); for (const backend of contributes.sessionBackends) { parts.push(` <tr> <td>${backend.name}</td> <td>${backend.type}</td> </tr> `); } parts.push(` </tbody> </table> `); } if (contributes.sessionEditors.length !== 0) { parts.push(` <h4>Session editors</h4> <table width="100%"> <thead> <tr> <th>Name</th> <th>Type</th> </tr> </thead> <tbody> `); for (const sessionEditor of contributes.sessionEditors) { parts.push(` <tr> <td>${sessionEditor.name}</td> <td>${sessionEditor.type}</td> </tr> `); } parts.push(` </tbody> </table> `); } if (contributes.sessionSettings.length !== 0) { parts.push(` <h4>Session settings</h4> <table width="100%"> <thead> <tr> <th>Name</th> <th>ID</th> </tr> </thead> <tbody> `); for (const sessionSettings of contributes.sessionSettings) { parts.push(` <tr> <td>${sessionSettings.name}</td> <td>${sessionSettings.id}</td> </tr> `); } parts.push(` </tbody> </table> `); } if (contributes.tabTitleWidgets.length !== 0) { parts.push(` <h4>Tab title widgets</h4> <table width="100%"> <thead> <tr> <th>Name</th> </tr> </thead> <tbody> `); for (const tabTitleWidget of contributes.tabTitleWidgets) { parts.push(` <tr> <td>${tabTitleWidget.name}</td> </tr> `); } parts.push(` </tbody> </table> `); } if (contributes.terminalBorderWidgets.length !== 0) { parts.push(` <h4>Terminal border widgets</h4> <table width="100%"> <thead> <tr> <th>Name</th> <th>Border</th> </tr> </thead> <tbody> `); for (const terminalBorderWidget of contributes.terminalBorderWidgets) { parts.push(` <tr> <td>${terminalBorderWidget.name}</td> <td>${terminalBorderWidget.border}</td> </tr> `); } parts.push(` </tbody> </table> `); } if (contributes.terminalThemeProviders.length !== 0) { parts.push(` <h4>Terminal themes</h4> <table width="100%"> <thead> <tr> <th>Name</th> <th>Formats</th> </tr> </thead> <tbody> `); for (const terminalThemeProvider of contributes.terminalThemeProviders) { parts.push(` <tr> <td>${terminalThemeProvider.name}</td> <td>${terminalThemeProvider.humanFormatNames.join(", ")}</td> </tr> `); } parts.push(` </tbody> </table> `); } if (contributes.blocks.length !== 0) { parts.push(` <h4>Blocks</h4> <table width="100%"> <thead> <tr> <th>Name</th> <th>Mime-types</th> </tr> </thead> <tbody> `); for (const block of contributes.blocks) { parts.push(` <tr> <td>${block.name}</td> <td>${block.mimeTypes.join(", ")}</td> </tr> `); } parts.push(` </tbody> </table> `); } if (contributes.settingsTabs.length !== 0) { parts.push(` <h4>Settings Pages</h4> <table width="100%"> <thead> <tr> <th>Name</th> <th>Title</th> </tr> </thead> <tbody> `); for (const settingsTab of contributes.settingsTabs) { parts.push(` <tr> <td>${settingsTab.name}</td> <td>${settingsTab.title}</td> </tr> `); } parts.push(` </tbody> </table> `); } return parts.join(""); } #getMenus(): MenuPair[] { const menus = this.#extensionMetadata.contributes.menus; return [ ...menus.commandPalette.map(m => ({ context: "Command palette", command: m.command })), ...menus.contextMenu.map(m => ({ context: "Context menu", command: m.command })), ...menus.newTerminal.map(m => ({ context: "New terminal", command: m.command })), ...menus.terminalTab.map(m => ({ context: "Terminal tab", command: m.command })), ]; } } ```
/content/code_sandbox/main/src/settings/ExtensionsPage.ts
xml
2016-03-04T12:39:59
2024-08-16T18:44:37
extraterm
sedwards2009/extraterm
2,501
4,134
```xml import React from "react"; import { NavLink } from "react-router-dom"; import { PrimarySidebarItem } from "../../../type"; import { trackSidebarClicked } from "modules/analytics/events/common/onboarding/sidebar"; import { snakeCase } from "lodash"; export const PrimarySidebarLink: React.FC<PrimarySidebarItem> = ({ title, path, icon, activeColor = "var(--primary)", }) => ( <NavLink to={path} onClick={() => trackSidebarClicked(snakeCase(title))} className={({ isActive }) => `primary-sidebar-link ${isActive ? "primary-sidebar-active-link" : ""}`} style={({ isActive }) => { return { borderLeftColor: isActive ? activeColor : null, }; }} > <span className="icon__wrapper">{icon}</span> <span className="link-title">{title}</span> </NavLink> ); ```
/content/code_sandbox/app/src/layouts/DashboardLayout/Sidebar/PrimarySidebar/components/PrimarySidebarLink/PrimarySidebarLink.tsx
xml
2016-12-01T04:36:06
2024-08-16T19:12:19
requestly
requestly/requestly
2,121
190