text stringlengths 9 39.2M | dir stringlengths 26 295 | lang stringclasses 185
values | created_date timestamp[us] | updated_date timestamp[us] | repo_name stringlengths 1 97 | repo_full_name stringlengths 7 106 | star int64 1k 183k | len_tokens int64 1 13.8M |
|---|---|---|---|---|---|---|---|---|
```xml
import * as types from './types';
export { types };
``` | /content/code_sandbox/webapp/client/src/features/versioning/repositoryData/store/index.ts | xml | 2016-10-19T01:07:26 | 2024-08-14T03:53:55 | modeldb | VertaAI/modeldb | 1,689 | 13 |
```xml
import { useContext } from 'react';
import { NotificationContext } from '~/components/NotificationProvider';
export const useSuccess = () => {
const { success, setSuccess, clearSuccess } = useContext(NotificationContext);
return { success, setSuccess, clearSuccess };
};
``` | /content/code_sandbox/ui/src/data/hooks/success.ts | xml | 2016-11-05T00:09:07 | 2024-08-16T13:44:10 | flipt | flipt-io/flipt | 3,489 | 57 |
```xml
import { CompositeDecorator, ContentBlock, ContentState } from 'draft-js';
import Immutable from 'immutable';
const KEY_SEPARATOR = '-';
export default class MultiDecorator {
decorators: Immutable.List<CompositeDecorator>;
constructor(
decorators: Immutable.List<CompositeDecorator> | CompositeDecorator[]
) {
this.decorators = Immutable.List(decorators);
}
/**
* Return list of decoration IDs per character
*/
getDecorations(
block: ContentBlock,
contentState: ContentState
): Immutable.List<string> {
const decorations: string[] = new Array(block.getText().length).fill(null);
this.decorators.forEach((decorator, i) => {
const subDecorations = decorator!.getDecorations(block, contentState);
subDecorations.forEach((key, offset) => {
if (!key) {
return;
}
decorations[offset!] = i + KEY_SEPARATOR + key;
});
});
return Immutable.List(decorations);
}
/**
* Return component to render a decoration
*/
// eslint-disable-next-line @typescript-eslint/ban-types
getComponentForKey(key: string): Function {
const decorator = this.getDecoratorForKey(key);
return decorator.getComponentForKey(MultiDecorator.getInnerKey(key));
}
/**
* Return props to render a decoration
*/
// eslint-disable-next-line @typescript-eslint/ban-types
getPropsForKey(key: string): object {
const decorator = this.getDecoratorForKey(key);
return decorator.getPropsForKey(MultiDecorator.getInnerKey(key));
}
/**
* Return a decorator for a specific key
*/
getDecoratorForKey(key: string): CompositeDecorator {
const parts = key.split(KEY_SEPARATOR);
const index = Number(parts[0]);
return this.decorators.get(index);
}
/**
* Return inner key for a decorator
*/
static getInnerKey(key: string): string {
const parts = key.split(KEY_SEPARATOR);
return parts.slice(1).join(KEY_SEPARATOR);
}
}
``` | /content/code_sandbox/packages/editor/src/Editor/MultiDecorator.ts | xml | 2016-02-26T09:54:56 | 2024-08-16T18:16:31 | draft-js-plugins | draft-js-plugins/draft-js-plugins | 4,087 | 430 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="path_to_url">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{674A6B7B-90E0-49E8-A090-2B7EE58A5478}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>sstc</RootNamespace>
<AssemblyName>sstc</AssemblyName>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.31.2301.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<CodeAnalysisRuleSet>SecurityRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<RunCodeAnalysis>false</RunCodeAnalysis>
<Prefer32Bit>false</Prefer32Bit>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisIgnoreGeneratedCode>false</CodeAnalysisIgnoreGeneratedCode>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.5.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.5.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
``` | /content/code_sandbox/Source/sstComposer/sstc.csproj | xml | 2016-03-18T08:12:31 | 2024-08-15T09:15:47 | SyscallTables | hfiref0x/SyscallTables | 1,115 | 1,089 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Itanium">
<Configuration>Debug</Configuration>
<Platform>Itanium</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseWithoutAsm|Itanium">
<Configuration>ReleaseWithoutAsm</Configuration>
<Platform>Itanium</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseWithoutAsm|Win32">
<Configuration>ReleaseWithoutAsm</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseWithoutAsm|x64">
<Configuration>ReleaseWithoutAsm</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Itanium">
<Configuration>Release</Configuration>
<Platform>Itanium</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{745DEC58-EBB3-47A9-A9B8-4C6627C01BF8}</ProjectGuid>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.30128.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">x86\ZlibStat$(Configuration)\Tmp\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">x64\ZlibStat$(Configuration)\Tmp\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">ia64\ZlibStat$(Configuration)\Tmp\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<PreBuildEvent>
<Command>cd ..\..\masmx86
bld_ml32.bat</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>..\..\masmx86\match686.obj;..\..\masmx86\inffas32.obj;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<PreBuildEvent>
<Command>cd ..\..\masmx86
bld_ml32.bat</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:X86 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<PreBuildEvent>
<Command>cd ..\..\masmx64
bld_ml64.bat</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">
<Midl>
<TargetEnvironment>Itanium</TargetEnvironment>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<AdditionalDependencies>..\..\masmx64\gvmat64.obj;..\..\masmx64\inffasx64.obj;%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
<PreBuildEvent>
<Command>cd ..\..\masmx64
bld_ml64.bat</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">
<Midl>
<TargetEnvironment>Itanium</TargetEnvironment>
</Midl>
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|x64'">
<Midl>
<TargetEnvironment>X64</TargetEnvironment>
</Midl>
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:AMD64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">
<Midl>
<TargetEnvironment>Itanium</TargetEnvironment>
</Midl>
<ClCompile>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\..\..;..\..\masmx86;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
</ExceptionHandling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>$(IntDir)zlibstat.pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)</ProgramDataBaseFileName>
<WarningLevel>Level3</WarningLevel>
<SuppressStartupBanner>true</SuppressStartupBanner>
</ClCompile>
<ResourceCompile>
<Culture>0x040c</Culture>
</ResourceCompile>
<Lib>
<AdditionalOptions>/MACHINE:IA64 /NODEFAULTLIB %(AdditionalOptions)</AdditionalOptions>
<OutputFile>$(OutDir)zlibstat.lib</OutputFile>
<SuppressStartupBanner>true</SuppressStartupBanner>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\..\adler32.c" />
<ClCompile Include="..\..\..\compress.c" />
<ClCompile Include="..\..\..\crc32.c" />
<ClCompile Include="..\..\..\deflate.c" />
<ClCompile Include="..\..\..\gzclose.c" />
<ClCompile Include="..\..\..\gzlib.c" />
<ClCompile Include="..\..\..\gzread.c" />
<ClCompile Include="..\..\..\gzwrite.c" />
<ClCompile Include="..\..\..\infback.c" />
<ClCompile Include="..\..\masmx64\inffas8664.c">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Itanium'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Itanium'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='ReleaseWithoutAsm|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Itanium'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="..\..\..\inffast.c" />
<ClCompile Include="..\..\..\inflate.c" />
<ClCompile Include="..\..\..\inftrees.c" />
<ClCompile Include="..\..\minizip\ioapi.c" />
<ClCompile Include="..\..\..\trees.c" />
<ClCompile Include="..\..\..\uncompr.c" />
<ClCompile Include="..\..\minizip\unzip.c" />
<ClCompile Include="..\..\minizip\zip.c" />
<ClCompile Include="..\..\..\zutil.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="zlib.rc" />
</ItemGroup>
<ItemGroup>
<None Include="zlibvc.def" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
``` | /content/code_sandbox/thirdparty/zlib-1.2.8/contrib/vstudio/vc10/zlibstat.vcxproj | xml | 2016-03-18T17:55:48 | 2024-08-15T18:11:38 | opentoonz | opentoonz/opentoonz | 4,445 | 6,855 |
```xml
import * as color from '@erxes/ui/src/styles/ecolor';
const rgb = color.rgb;
const rgba = color.rgba;
const darken = color.darken;
const lighten = color.lighten;
export { rgb, rgba, darken, lighten };
``` | /content/code_sandbox/packages/core-ui/src/modules/common/styles/color.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 52 |
```xml
// See LICENSE in the project root for license information.
// your_sha256_hash------------------------------------------
// TO AVOID EXTRA DEPENDENCIES, THE CODE IN THIS FILE WAS BORROWED FROM:
//
// rushstack/libraries/terminal/src/PrintUtilities.ts
//
// KEEP IT IN SYNC WITH THAT FILE.
// your_sha256_hash------------------------------------------
/**
* Applies word wrapping and returns an array of lines.
*
* @param text - The text to wrap
* @param maxLineLength - The maximum length of a line, defaults to the console width
* @param indent - The number of spaces to indent the wrapped lines, defaults to 0
*/
export function wrapWordsToLines(text: string, maxLineLength?: number, indent?: number): string[];
/**
* Applies word wrapping and returns an array of lines.
*
* @param text - The text to wrap
* @param maxLineLength - The maximum length of a line, defaults to the console width
* @param linePrefix - The string to prefix each line with, defaults to ''
*/
export function wrapWordsToLines(text: string, maxLineLength?: number, linePrefix?: string): string[];
/**
* Applies word wrapping and returns an array of lines.
*
* @param text - The text to wrap
* @param maxLineLength - The maximum length of a line, defaults to the console width
* @param indentOrLinePrefix - The number of spaces to indent the wrapped lines or the string to prefix
* each line with, defaults to no prefix
*/
export function wrapWordsToLines(
text: string,
maxLineLength?: number,
indentOrLinePrefix?: number | string
): string[];
export function wrapWordsToLines(
text: string,
maxLineLength?: number,
indentOrLinePrefix?: number | string
): string[] {
let linePrefix: string;
switch (typeof indentOrLinePrefix) {
case 'number':
linePrefix = ' '.repeat(indentOrLinePrefix);
break;
case 'string':
linePrefix = indentOrLinePrefix;
break;
default:
linePrefix = '';
break;
}
const linePrefixLength: number = linePrefix.length;
if (!maxLineLength) {
maxLineLength = process.stdout.getWindowSize()[0];
}
// Apply word wrapping and the provided line prefix, while also respecting existing newlines
// and prefix spaces that may exist in the text string already.
const lines: string[] = text.split(/\r?\n/);
const wrappedLines: string[] = [];
for (const line of lines) {
if (line.length + linePrefixLength <= maxLineLength) {
wrappedLines.push(linePrefix + line);
} else {
const lineAdditionalPrefix: string = line.match(/^\s*/)?.[0] || '';
const whitespaceRegexp: RegExp = /\s+/g;
let currentWhitespaceMatch: RegExpExecArray | null = null;
let previousWhitespaceMatch: RegExpExecArray | undefined;
let currentLineStartIndex: number = lineAdditionalPrefix.length;
let previousBreakRanOver: boolean = false;
while ((currentWhitespaceMatch = whitespaceRegexp.exec(line)) !== null) {
if (currentWhitespaceMatch.index + linePrefixLength - currentLineStartIndex > maxLineLength) {
let whitespaceToSplitAt: RegExpExecArray | undefined;
if (
!previousWhitespaceMatch ||
// Handle the case where there are two words longer than the maxLineLength in a row
previousBreakRanOver
) {
whitespaceToSplitAt = currentWhitespaceMatch;
} else {
whitespaceToSplitAt = previousWhitespaceMatch;
}
wrappedLines.push(
linePrefix +
lineAdditionalPrefix +
line.substring(currentLineStartIndex, whitespaceToSplitAt.index)
);
previousBreakRanOver = whitespaceToSplitAt.index - currentLineStartIndex > maxLineLength;
currentLineStartIndex = whitespaceToSplitAt.index + whitespaceToSplitAt[0].length;
} else {
previousBreakRanOver = false;
}
previousWhitespaceMatch = currentWhitespaceMatch;
}
if (currentLineStartIndex < line.length) {
wrappedLines.push(linePrefix + lineAdditionalPrefix + line.substring(currentLineStartIndex));
}
}
}
return wrappedLines;
}
``` | /content/code_sandbox/eslint/eslint-patch/src/eslint-bulk-suppressions/cli/utils/wrap-words-to-lines.ts | xml | 2016-09-30T00:28:20 | 2024-08-16T18:54:35 | rushstack | microsoft/rushstack | 5,790 | 919 |
```xml
import type {Placement} from '@floating-ui/core';
import {
arrow,
autoUpdate,
flip,
offset,
shift,
useFloating,
} from '@floating-ui/react-dom';
import {useRef, useState} from 'react';
import {BoxSizeControl} from '../utils/BoxSizeControl';
import {Container} from '../utils/Container';
import {Controls} from '../utils/Controls';
import {allPlacements} from '../utils/allPlacements';
import {useBoxSize} from '../utils/useBoxSize';
import {useSize} from '../utils/useSize';
export function Complex() {
const [floatingSizeValue, floatingSize, handleFloatingSizeChange] =
useBoxSize();
const [referenceSizeValue, referenceSize, handleReferenceSizeChange] =
useBoxSize();
const [offsetValue, handleOffsetChange] = useSize(15);
const [shiftValue, handleShiftChange] = useSize(5);
const [paddingValue, handlePaddingChange] = useSize(10);
const [placement, setPlacement] = useState<Placement>('bottom');
const arrowRef = useRef<HTMLDivElement | null>(null);
const {
x,
y,
refs,
strategy,
update,
placement: resultantPlacement,
middlewareData: {arrow: {x: arrowX, y: arrowY} = {}},
} = useFloating({
placement,
whileElementsMounted: autoUpdate,
middleware: [
offset(offsetValue),
flip(),
shift({padding: shiftValue}),
arrow({element: arrowRef, padding: paddingValue}),
],
});
const oppositeSidesMap: {[key: string]: string} = {
top: 'bottom',
left: 'right',
right: 'left',
bottom: 'top',
};
const staticSide = oppositeSidesMap[resultantPlacement.split('-')[0]];
return (
<>
<h1>Complex</h1>
<p>
This case shows a complex use case of having a nice popover pointing at
the reference just like a tooltip would.
</p>
<Container update={update}>
<div
ref={refs.setReference}
className="reference"
style={{width: referenceSizeValue, height: referenceSizeValue}}
>
Reference
</div>
<div
ref={refs.setFloating}
className="floating"
style={{
position: strategy,
top: y ?? '',
left: x ?? '',
width: floatingSizeValue,
height: floatingSizeValue,
}}
>
Floating
<div
ref={arrowRef}
className="arrow"
style={{
position: 'absolute',
top: arrowY ?? '',
left: arrowX ?? '',
right: '',
bottom: '',
[staticSide]: -15,
}}
/>
</div>
</Container>
<BoxSizeControl
id="reference-size"
label="Reference size"
onChange={handleReferenceSizeChange}
size={referenceSize}
/>
<BoxSizeControl
id="floating-size"
label="Floating size"
onChange={handleFloatingSizeChange}
size={floatingSize}
/>
<Controls>
<label htmlFor="offset">Offset</label>
<input
id="offset"
type="range"
min="0"
max="50"
value={offsetValue}
onChange={handleOffsetChange}
/>
</Controls>
<Controls>
<label htmlFor="shift">Shift</label>
<input
id="shift"
type="range"
min="0"
max="50"
value={shiftValue}
onChange={handleShiftChange}
/>
</Controls>
<Controls>
<label htmlFor="padding">Arrow padding</label>
<input
id="padding"
type="range"
min="0"
max="50"
value={paddingValue}
onChange={handlePaddingChange}
/>
</Controls>
<h3>Floating position</h3>
<Controls>
{allPlacements.map((localPlacement) => (
<button
key={localPlacement}
data-testid={`placement-${localPlacement}`}
onClick={() => setPlacement(localPlacement)}
style={{
backgroundColor: localPlacement === placement ? 'black' : '',
}}
>
{localPlacement}
</button>
))}
</Controls>
</>
);
}
``` | /content/code_sandbox/packages/dom/test/visual/spec/Complex.tsx | xml | 2016-03-29T17:00:47 | 2024-08-16T16:29:40 | floating-ui | floating-ui/floating-ui | 29,450 | 961 |
```xml
import { useEffect, useRef } from 'react';
import type { PaymentsVersion } from '@proton/shared/lib/api/payments';
import type { ADDON_NAMES, PLANS } from '@proton/shared/lib/constants';
import { APPS } from '@proton/shared/lib/constants';
import type { RequiredCheckResponse } from '@proton/shared/lib/helpers/checkout';
import type {
Api,
BillingPlatform,
ChargebeeEnabled,
ChargebeeUserExists,
Currency,
User,
} from '@proton/shared/lib/interfaces';
import { isTaxInclusive } from '@proton/shared/lib/interfaces';
import { useFlag } from '@proton/unleash';
import noop from '@proton/utils/noop';
import { useApi, useAuthentication, useConfig, useModals } from '../../hooks';
import { useCbIframe } from '../chargebee/ChargebeeIframe';
import type {
BillingAddress,
ChargeablePaymentParameters,
ChargebeeIframeEvents,
ChargebeeIframeHandles,
PaymentMethodFlows,
PaymentMethodStatusExtended,
PaymentMethodType,
PlainPaymentMethodType,
SavedPaymentMethod,
} from '../core';
import { PAYMENT_METHOD_TYPES, canUseChargebee } from '../core';
import type { OnMethodChangedHandler, Operations, OperationsData } from '../react-extensions';
import { usePaymentFacade as useInnerPaymentFacade } from '../react-extensions';
import type { PaymentProcessorType } from '../react-extensions/interface';
import type { ThemeCode, ThemeLike } from './helpers';
import { getThemeCode } from './helpers';
import { useChargebeeEnabledCache, useChargebeeUserStatusTracker } from './useChargebeeContext';
import { useChargebeeKillSwitch } from './useChargebeeKillSwitch';
import { wrapMethods } from './useMethods';
import { usePaymentsTelemetry } from './usePaymentsTelemetry';
import {
getDefaultVerifyPayment,
getDefaultVerifyPaypal,
useChargebeeCardVerifyPayment,
useChargebeePaypalHandles,
} from './validators/validators';
type PaymentFacadeProps = {
amount: number;
currency: Currency;
coupon?: string;
/**
* The flow parameter can modify the list of available payment methods and modify their behavior in certain cases.
*/
flow: PaymentMethodFlows;
/**
* The main callback that will be called when the payment is ready to be charged
* after the payment token is fetched and verified with 3DS or other confirmation from the user.
* @param operations - provides a common set of actions that can be performed with the verified payment token.
* For example, the verified (that is, chargeable) payment token can be used to create a subscription or buy
* credits.
* @param data - provides the raw payment token, the payment source (or processor type) and operation context
* like Plan or Cycle for subscription.
*/
onChargeable: (
operations: Operations,
data: {
chargeablePaymentParameters: ChargeablePaymentParameters;
source: PaymentMethodType;
sourceType: PlainPaymentMethodType;
context: OperationsData;
paymentsVersion: PaymentsVersion;
paymentProcessorType: PaymentProcessorType;
}
) => Promise<unknown>;
/**
* The callback that will be called when the payment method is changed by the user.
*/
onMethodChanged?: OnMethodChangedHandler;
paymentMethods?: SavedPaymentMethod[];
paymentMethodStatusExtended?: PaymentMethodStatusExtended;
/**
* Optional override for the API object. Can be helpful for auth/unauth flows.
*/
api?: Api;
/**
* Optional override for the chargebeeEnabled flag. Can be helpful for auth/unauth flows.
*/
chargebeeEnabled?: ChargebeeEnabled;
/**
* The selected plan will impact the displayed payment methods.
*/
selectedPlanName?: PLANS | ADDON_NAMES;
checkResult?: RequiredCheckResponse;
theme?: ThemeLike;
billingAddress?: BillingAddress;
billingPlatform?: BillingPlatform;
chargebeeUserExists?: ChargebeeUserExists;
user?: User;
forceInhouseSavedMethodProcessors?: boolean;
disableNewPaymentMethods?: boolean;
};
/**
* Entry point for the payment logic for the monorepo clients. It's a wrapper around the
* react-specific facade. The main purpose of this wrapper is to provide the default
* implementation for the client-specific logic. It includes the implementation of the
* token verification that depends on the view, as it requires user action. It also includes
* pre-fetching of the payment tokens for PayPal and PayPal Credit. In addition, the payment
* methods objects are enriched with the icons and texts.
*/
export const usePaymentFacade = ({
amount,
currency,
onChargeable,
coupon,
flow,
onMethodChanged,
paymentMethods,
paymentMethodStatusExtended,
api: apiOverride,
selectedPlanName,
chargebeeEnabled: chargebeeEnabledOverride,
checkResult,
theme,
billingAddress,
billingPlatform,
chargebeeUserExists,
user,
forceInhouseSavedMethodProcessors,
disableNewPaymentMethods,
}: PaymentFacadeProps) => {
const { APP_NAME } = useConfig();
const defaultApi = useApi();
const api = apiOverride ?? defaultApi;
const themeCode: ThemeCode = getThemeCode(theme);
const { createModal } = useModals();
const { UID } = useAuthentication();
const isAuthenticated = !!UID;
const enableChargebeeB2B = useFlag('ChargebeeFreeToPaidB2B');
const iframeHandles = useCbIframe();
const chargebeeHandles: ChargebeeIframeHandles = iframeHandles.handles;
const chargebeeEvents: ChargebeeIframeEvents = iframeHandles.events;
const chargebeeEnabledCache = useChargebeeEnabledCache();
const isChargebeeEnabled: () => ChargebeeEnabled = () => chargebeeEnabledOverride ?? chargebeeEnabledCache();
const { chargebeeKillSwitch, forceEnableChargebee } = useChargebeeKillSwitch();
useChargebeeUserStatusTracker();
const telemetry = usePaymentsTelemetry({
apiOverride: api,
plan: selectedPlanName,
flow,
amount,
cycle: checkResult?.Cycle,
});
const { reportPaymentLoad, reportPaymentAttempt, reportPaymentFailure } = telemetry;
const verifyPaymentChargebeeCard = useChargebeeCardVerifyPayment(api);
const chargebeePaypalModalHandles = useChargebeePaypalHandles({
onPaymentAttempt: reportPaymentAttempt,
onPaymentFailure: reportPaymentFailure,
});
const hook = useInnerPaymentFacade(
{
amount,
currency,
coupon,
flow,
onMethodChanged,
paymentMethods,
paymentMethodStatusExtended,
isChargebeeEnabled,
chargebeeKillSwitch,
forceEnableChargebee,
selectedPlanName,
onProcessPaymentToken: reportPaymentAttempt,
billingAddress,
onProcessPaymentTokenFailed: (type) => {
reportPaymentFailure(type);
},
onChargeable: async (operations, data) => {
try {
return await onChargeable(operations, data);
} catch (error) {
reportPaymentFailure(data.paymentProcessorType);
throw error;
}
},
enableChargebeeB2B,
billingPlatform,
chargebeeUserExists,
forceInhouseSavedMethodProcessors,
disableNewPaymentMethods,
},
{
api,
isAuthenticated,
verifyPaymentPaypal: getDefaultVerifyPaypal(createModal, api),
verifyPayment: getDefaultVerifyPayment(createModal, api),
verifyPaymentChargebeeCard,
chargebeeHandles,
chargebeeEvents,
chargebeePaypalModalHandles,
}
);
const methods = wrapMethods(hook.methods, flow);
const userCanTrigger = {
[PAYMENT_METHOD_TYPES.CARD]: true,
[PAYMENT_METHOD_TYPES.CASH]: false,
[PAYMENT_METHOD_TYPES.PAYPAL]: true,
[PAYMENT_METHOD_TYPES.PAYPAL_CREDIT]: true,
[PAYMENT_METHOD_TYPES.TOKEN]: false,
[PAYMENT_METHOD_TYPES.CHARGEBEE_CARD]: true,
[PAYMENT_METHOD_TYPES.CHARGEBEE_PAYPAL]: true,
[PAYMENT_METHOD_TYPES.BITCOIN]: false,
[PAYMENT_METHOD_TYPES.CHARGEBEE_BITCOIN]: false,
};
const userCanTriggerSelected = methods.selectedMethod?.type ? userCanTrigger[methods.selectedMethod.type] : false;
/**
* The longer I looked at this construction in its previous reincarnation, the more I was puzzled about it.
* Interestingly enough, it crystalized again during the refactoring of payments, so it might be the only
* way to make it work.
* This construction makes possible rendering PayPal and PayPal Credit buttons at the same time.
* - We must pre-fetch the payment token, otherwise we won't be able to open the payment verification tab
* in Safari (as of 16.5, both Desktop and Mobile). The tab can be opened only as a result of
* synchronous handler of the click.
* - We can't prefetch the tokens inside the Paypal and Paypal Credit buttons, because Captcha must go
* one after another.
* - We can't put this overall logic into the lower levels (react-extensions or core), because it depends
* on the view and app-specific assumptions.
*/
useEffect(() => {
async function run() {
if (hook.methods.isNewPaypal) {
hook.paypal.reset();
hook.paypalCredit.reset();
try {
await hook.paypal.fetchPaymentToken();
} catch {}
// even if token fetching fails (for example because of network or Human Verification),
// we still want to try to fetch the token for paypal-credit
try {
if (APP_NAME !== APPS.PROTONVPN_SETTINGS) {
await hook.paypalCredit.fetchPaymentToken();
}
} catch {}
}
}
run().catch(noop);
}, [hook.methods.isNewPaypal, amount, currency]);
const paypalAbortRef = useRef<AbortController | null>(null);
useEffect(() => {
const abort = () => {
paypalAbortRef.current?.abort();
paypalAbortRef.current = null;
};
async function run() {
if (hook.methods.selectedMethod?.type !== PAYMENT_METHOD_TYPES.CHARGEBEE_PAYPAL) {
return;
}
paypalAbortRef.current = new AbortController();
hook.chargebeePaypal.reset();
try {
await hook.chargebeePaypal.initialize(paypalAbortRef.current.signal);
} catch {
abort();
}
}
void run();
return abort;
}, [hook.methods.selectedMethod?.type, amount, currency]);
const taxCountryLoading = methods.loading;
const getShowTaxCountry = (): boolean => {
if (taxCountryLoading) {
return false;
}
const methodsWithTaxCountry: (PaymentMethodType | undefined)[] = [
PAYMENT_METHOD_TYPES.CHARGEBEE_CARD,
PAYMENT_METHOD_TYPES.CHARGEBEE_PAYPAL,
PAYMENT_METHOD_TYPES.CHARGEBEE_BITCOIN,
];
const isNewMethod = methodsWithTaxCountry.includes(methods.selectedMethod?.type);
const isSavedExternalMethod = methodsWithTaxCountry.includes(methods.savedExternalSelectedMethod?.Type);
const migratableMethods: (PaymentMethodType | undefined)[] = [
PAYMENT_METHOD_TYPES.CARD,
PAYMENT_METHOD_TYPES.PAYPAL,
];
const isSavedInternalMethod =
migratableMethods.includes(methods.savedInternalSelectedMethod?.Type) &&
canUseChargebee(isChargebeeEnabled());
const isMethodTaxCountry = isNewMethod || isSavedExternalMethod || isSavedInternalMethod;
const flowsWithTaxCountry: PaymentMethodFlows[] = [
'signup',
'signup-pass',
'signup-pass-upgrade',
'signup-vpn',
'subscription',
];
const showTaxCountry = isMethodTaxCountry && flowsWithTaxCountry.includes(flow);
return showTaxCountry;
};
const showInclusiveTax = getShowTaxCountry() && isTaxInclusive(checkResult);
const helpers = {
selectedMethodValue: methods.selectedMethod?.value,
selectedMethodType: methods.selectedMethod?.type,
showTaxCountry: getShowTaxCountry(),
taxCountryLoading,
statusExtended: methods.status,
showInclusiveTax,
};
return {
...hook,
...helpers,
methods,
api,
userCanTrigger,
userCanTriggerSelected,
iframeHandles,
isChargebeeEnabled,
selectedPlanName,
paymentComponentLoaded: reportPaymentLoad,
telemetry,
themeCode,
user,
};
};
``` | /content/code_sandbox/packages/components/payments/client-extensions/usePaymentFacade.ts | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 2,734 |
```xml
import { DevicePushToken } from './Tokens.types';
export default function getDevicePushTokenAsync(): Promise<DevicePushToken>;
//# sourceMappingURL=getDevicePushTokenAsync.web.d.ts.map
``` | /content/code_sandbox/packages/expo-notifications/build/getDevicePushTokenAsync.web.d.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 38 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="path_to_url">
<ItemGroup>
<NativeReference Include="$(MSBuildThisFileDirectory)..\..\runtimes\tvos\native\libHarfBuzzSharp.framework" Kind="Framework" />
</ItemGroup>
</Project>
``` | /content/code_sandbox/binding/HarfBuzzSharp.NativeAssets.tvOS/buildTransitive/HarfBuzzSharp.Local.targets | xml | 2016-02-22T17:54:43 | 2024-08-16T17:53:42 | SkiaSharp | mono/SkiaSharp | 4,347 | 69 |
```xml
<?xml version="1.0" encoding="utf-8"?>
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file. -->
<resources>
<item type="id" name="compressed_series" />
<item type="id" name="original_series" />
</resources>
``` | /content/code_sandbox/libraries_res/datausagechart_res/src/main/res/values/values.xml | xml | 2016-07-04T07:28:36 | 2024-08-15T05:20:42 | AndroidChromium | JackyAndroid/AndroidChromium | 3,090 | 72 |
```xml
import { ChildEntity, Column } from "../../../../../../src"
import { Person } from "./Person"
@ChildEntity()
export class Employee extends Person {
@Column()
salary: number
}
``` | /content/code_sandbox/test/functional/table-inheritance/single-table/database-option-inherited/entity/Employee.ts | xml | 2016-02-29T07:41:14 | 2024-08-16T18:28:52 | typeorm | typeorm/typeorm | 33,875 | 41 |
```xml
import { Model } from 'mongoose';
import { IModels } from '../connectionResolver';
import {
commentConversationSchema,
ICommentConversationDocument,
} from './definitions/comment_conversations';
export interface ICommentConversationModel
extends Model<ICommentConversationDocument> {
getCommentConversation(selector: any): Promise<ICommentConversationDocument>;
}
export const loadCommentConversationClass = (models: IModels) => {
class CommentConversation {
public static async getCommentConversation(selector: any) {
const comment = await models.CommentConversation.findOne(selector);
if (!comment) {
throw new Error('Comment not found');
}
return comment;
}
}
commentConversationSchema.loadClass(CommentConversation);
return commentConversationSchema;
};
``` | /content/code_sandbox/packages/plugin-instagram-api/src/models/Comment_conversations.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 156 |
```xml
export interface IDropdownWithRemoteDataWebPartProps {
list: string;
item: string;
}
``` | /content/code_sandbox/samples/react-custompropertypanecontrols/src/webparts/dropdownWithRemoteData/IDropdownWithRemoteDataWebPartProps.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 23 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions
name="UAEndpoints"
targetNamespace="path_to_url"
xmlns:tns="path_to_url"
xmlns:s0="path_to_url"
xmlns:s1="path_to_url"
xmlns:wsdl="path_to_url"
xmlns:soap="path_to_url"
xmlns:soap12="path_to_url"
xmlns:wsa10="path_to_url"
>
<wsdl:import namespace="path_to_url" location="path_to_url" />
<wsdl:types />
<wsdl:binding name="UaSoapXmlBinding_ISessionEndpoint" type="s0:ISessionEndpoint">
<soap12:binding transport="path_to_url"/>
<wsdl:operation name="InvokeService">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="InvokeServiceMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="InvokeServiceResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="InvokeServiceFaultMessage">
<soap12:fault name="InvokeServiceFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="CreateSession">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="CreateSessionMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="CreateSessionResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="CreateSessionFaultMessage">
<soap12:fault name="CreateSessionFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="ActivateSession">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="ActivateSessionMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="ActivateSessionResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ActivateSessionFaultMessage">
<soap12:fault name="ActivateSessionFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="CloseSession">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="CloseSessionMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="CloseSessionResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="CloseSessionFaultMessage">
<soap12:fault name="CloseSessionFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Cancel">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="CancelMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="CancelResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="CancelFaultMessage">
<soap12:fault name="CancelFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="AddNodes">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="AddNodesMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="AddNodesResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="AddNodesFaultMessage">
<soap12:fault name="AddNodesFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="AddReferences">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="AddReferencesMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="AddReferencesResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="AddReferencesFaultMessage">
<soap12:fault name="AddReferencesFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="DeleteNodes">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="DeleteNodesMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="DeleteNodesResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="DeleteNodesFaultMessage">
<soap12:fault name="DeleteNodesFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="DeleteReferences">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="DeleteReferencesMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="DeleteReferencesResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="DeleteReferencesFaultMessage">
<soap12:fault name="DeleteReferencesFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Browse">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="BrowseMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="BrowseResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="BrowseFaultMessage">
<soap12:fault name="BrowseFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="BrowseNext">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="BrowseNextMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="BrowseNextResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="BrowseNextFaultMessage">
<soap12:fault name="BrowseNextFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="TranslateBrowsePathsToNodeIds">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="TranslateBrowsePathsToNodeIdsMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="TranslateBrowsePathsToNodeIdsResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="TranslateBrowsePathsToNodeIdsFaultMessage">
<soap12:fault name="TranslateBrowsePathsToNodeIdsFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="RegisterNodes">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="RegisterNodesMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="RegisterNodesResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="RegisterNodesFaultMessage">
<soap12:fault name="RegisterNodesFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="UnregisterNodes">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="UnregisterNodesMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="UnregisterNodesResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="UnregisterNodesFaultMessage">
<soap12:fault name="UnregisterNodesFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="QueryFirst">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="QueryFirstMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="QueryFirstResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="QueryFirstFaultMessage">
<soap12:fault name="QueryFirstFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="QueryNext">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="QueryNextMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="QueryNextResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="QueryNextFaultMessage">
<soap12:fault name="QueryNextFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Read">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="ReadMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="ReadResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ReadFaultMessage">
<soap12:fault name="ReadFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="HistoryRead">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="HistoryReadMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="HistoryReadResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="HistoryReadFaultMessage">
<soap12:fault name="HistoryReadFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Write">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="WriteMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="WriteResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="WriteFaultMessage">
<soap12:fault name="WriteFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="HistoryUpdate">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="HistoryUpdateMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="HistoryUpdateResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="HistoryUpdateFaultMessage">
<soap12:fault name="HistoryUpdateFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Call">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="CallMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="CallResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="CallFaultMessage">
<soap12:fault name="CallFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="CreateMonitoredItems">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="CreateMonitoredItemsMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="CreateMonitoredItemsResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="CreateMonitoredItemsFaultMessage">
<soap12:fault name="CreateMonitoredItemsFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="ModifyMonitoredItems">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="ModifyMonitoredItemsMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="ModifyMonitoredItemsResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ModifyMonitoredItemsFaultMessage">
<soap12:fault name="ModifyMonitoredItemsFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="SetMonitoringMode">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="SetMonitoringModeMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="SetMonitoringModeResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="SetMonitoringModeFaultMessage">
<soap12:fault name="SetMonitoringModeFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="SetTriggering">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="SetTriggeringMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="SetTriggeringResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="SetTriggeringFaultMessage">
<soap12:fault name="SetTriggeringFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="DeleteMonitoredItems">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="DeleteMonitoredItemsMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="DeleteMonitoredItemsResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="DeleteMonitoredItemsFaultMessage">
<soap12:fault name="DeleteMonitoredItemsFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="CreateSubscription">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="CreateSubscriptionMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="CreateSubscriptionResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="CreateSubscriptionFaultMessage">
<soap12:fault name="CreateSubscriptionFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="ModifySubscription">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="ModifySubscriptionMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="ModifySubscriptionResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="ModifySubscriptionFaultMessage">
<soap12:fault name="ModifySubscriptionFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="SetPublishingMode">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="SetPublishingModeMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="SetPublishingModeResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="SetPublishingModeFaultMessage">
<soap12:fault name="SetPublishingModeFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Publish">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="PublishMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="PublishResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="PublishFaultMessage">
<soap12:fault name="PublishFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="Republish">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="RepublishMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="RepublishResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="RepublishFaultMessage">
<soap12:fault name="RepublishFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="TransferSubscriptions">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="TransferSubscriptionsMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="TransferSubscriptionsResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="TransferSubscriptionsFaultMessage">
<soap12:fault name="TransferSubscriptionsFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="DeleteSubscriptions">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="DeleteSubscriptionsMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="DeleteSubscriptionsResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="DeleteSubscriptionsFaultMessage">
<soap12:fault name="DeleteSubscriptionsFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="UaSoapXmlBinding_IDiscoveryEndpoint" type="s0:IDiscoveryEndpoint">
<soap12:binding transport="path_to_url"/>
<wsdl:operation name="InvokeService">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="InvokeServiceMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="InvokeServiceResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="InvokeServiceFaultMessage">
<soap12:fault name="InvokeServiceFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="FindServers">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="FindServersMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="FindServersResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="FindServersFaultMessage">
<soap12:fault name="FindServersFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="FindServersOnNetwork">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="FindServersOnNetworkMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="FindServersOnNetworkResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="FindServersOnNetworkFaultMessage">
<soap12:fault name="FindServersOnNetworkFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="GetEndpoints">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="GetEndpointsMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="GetEndpointsResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="GetEndpointsFaultMessage">
<soap12:fault name="GetEndpointsFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="UaSoapXmlBinding_IRegistrationEndpoint" type="s0:IRegistrationEndpoint">
<soap12:binding transport="path_to_url"/>
<wsdl:operation name="InvokeService">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="InvokeServiceMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="InvokeServiceResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="InvokeServiceFaultMessage">
<soap12:fault name="InvokeServiceFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="RegisterServer">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="RegisterServerMessage">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="RegisterServerResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="RegisterServerFaultMessage">
<soap12:fault name="RegisterServerFaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="RegisterServer2">
<soap12:operation soapAction="path_to_url" style="document"/>
<wsdl:input name="RegisterServer2Message">
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output name="RegisterServer2ResponseMessage">
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="RegisterServer2FaultMessage">
<soap12:fault name="RegisterServer2FaultMessage" use="literal" />
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="UAService">
<wsdl:port name="UaSoapXmlBinding_ISessionEndpoint" binding="tns:UaSoapXmlBinding_ISessionEndpoint">
<soap12:address location="path_to_url"/>
</wsdl:port>
<wsdl:port name="UaSoapXmlBinding_IDiscoveryEndpoint" binding="tns:UaSoapXmlBinding_IDiscoveryEndpoint">
<soap12:address location="path_to_url"/>
</wsdl:port>
</wsdl:service>
<wsdl:service name="UADiscoveryService">
<wsdl:port name="UaSoapXmlBinding_IDiscoveryEndpoint" binding="tns:UaSoapXmlBinding_IDiscoveryEndpoint">
<soap12:address location="path_to_url"/>
</wsdl:port>
<wsdl:port name="UaSoapXmlBinding_IRegistrationEndpoint" binding="tns:UaSoapXmlBinding_IRegistrationEndpoint">
<soap12:address location="path_to_url"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
``` | /content/code_sandbox/Stack/Opc.Ua.Core/Schema/Opc.Ua.Endpoints.wsdl | xml | 2016-02-12T14:57:06 | 2024-08-13T10:24:27 | UA-.NETStandard | OPCFoundation/UA-.NETStandard | 1,910 | 5,865 |
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Volo.Abp.TenantManagement.EntityFrameworkCore.Tests\Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj" />
<ProjectReference Include="..\Volo.Abp.TenantManagement.TestBase\Volo.Abp.TenantManagement.TestBase.csproj" />
</ItemGroup>
</Project>
``` | /content/code_sandbox/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo.Abp.TenantManagement.Domain.Tests.csproj | xml | 2016-12-03T22:56:24 | 2024-08-16T16:24:05 | abp | abpframework/abp | 12,657 | 130 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent">
<include
android:id="@+id/done_cancel_bar"
layout="@layout/crop__layout_done_cancel" />
<com.soundcloud.android.crop.CropImageView
android:id="@+id/crop_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/done_cancel_bar"
android:background="@drawable/crop__texture" />
</RelativeLayout>
``` | /content/code_sandbox/DragSquare/crop/src/main/res/layout/crop__activity_crop.xml | xml | 2016-05-27T07:13:04 | 2024-07-27T08:49:43 | DragRankSquare | xmuSistone/DragRankSquare | 1,113 | 137 |
```xml
import { memoizeFunction } from '@fluentui/react/lib/Utilities';
import type { IBasicPackageGroup } from '../interfaces/index';
// Don't reference anything importing Monaco in this file!
// Helper methods for transpile(). They're in a separate file that doesn't import Monaco so they
// can be tested with Jest (which doesn't like Monaco's ES modules).
/** Partial ts.Diagnostic @internal */
export interface IDiagnostic {
category: number;
code: number;
start?: number;
length?: number;
messageText: string | { messageText: string; code: number };
}
export function _getErrorMessages(errors: IDiagnostic[], text: string) {
const lineStarts = _getLineStarts(text);
return errors.map(error => {
if (error.messageText && typeof error.messageText === 'object') {
// This is a multi-line ts.DiagnosticMessageChain (not sure if this happens, but handling per typings)
error.code = error.messageText.code;
error.messageText = error.messageText.messageText;
}
if (typeof error.start === 'number') {
const lineInfo = _getErrorLineInfo(error, lineStarts);
return `Line ${lineInfo.line} - ${error.messageText} (TS${error.code})`;
} else {
return error.messageText;
}
});
}
export function _getLineStarts(text: string): number[] {
const lineStarts: number[] = [0];
const eol = /\r?\n/g;
let match: RegExpExecArray | null;
while ((match = eol.exec(text))) {
lineStarts.push(match.index + match[0].length);
}
return lineStarts;
}
export function _getErrorLineInfo(error: IDiagnostic, lineStarts: number[]): { line: number; col: number } {
let line = 1;
for (; line < lineStarts.length; line++) {
if (lineStarts[line] > error.start!) {
break;
}
}
return { line, col: error.start! - lineStarts[line - 1] + 1 };
}
/** Convert from IPackageGroup[] to a map from package name to global name. @internal */
export const _supportedPackageToGlobalMap = memoizeFunction((supportedPackages: IBasicPackageGroup[]) => {
const packagesToGlobals: { [packageName: string]: string } = {};
for (const group of supportedPackages) {
for (const pkg of group.packages) {
packagesToGlobals[pkg.packageName] = group.globalName;
}
}
return packagesToGlobals;
});
``` | /content/code_sandbox/packages/react-monaco-editor/src/transpiler/transpileHelpers.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 568 |
```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.
-->
<sql-parser-test-cases>
<drop-table sql-case-id="drop_table">
<table name="t_log" start-index="11" stop-index="15" />
</drop-table>
<drop-table sql-case-id="drop_table_if_exists">
<table name="t_log" start-index="21" stop-index="25" />
</drop-table>
<drop-table sql-case-id="drop_temporary_table_if_exists">
<table name="t_temp_log" start-index="31" stop-index="40" />
</drop-table>
<drop-table sql-case-id="drop_table_restrict">
<table name="t_log" start-index="11" stop-index="15" />
</drop-table>
<drop-table sql-case-id="drop_table_cascade">
<table name="t_log" start-index="11" stop-index="15" />
</drop-table>
<drop-table sql-case-id="drop_table_cascade_constraints_and_purge">
<table name="t_log" start-index="11" stop-index="15" />
</drop-table>
<drop-table sql-case-id="drop_table_purge_with_schema">
<table name="t_log" start-index="11" stop-index="27">
<owner name="sharding_db" start-index="11" stop-index="21" />
</table>
</drop-table>
<drop-table sql-case-id="drop_table_with_space">
<table name="t_order" start-index="23" stop-index="29" />
</drop-table>
<drop-table sql-case-id="drop_table_with_back_quota">
<table name="t_order" start-delimiter="`" end-delimiter="`" start-index="11" stop-index="19" />
</drop-table>
<drop-table sql-case-id="drop_tables">
<table name="t_order_item" start-index="11" stop-index="22" />
<table name="t_order" start-index="25" stop-index="31" />
</drop-table>
<drop-table sql-case-id="drop_temporary_table">
<table name="t_order" start-index="21" stop-index="27" />
</drop-table>
<drop-table sql-case-id="drop_table_with_quota">
<table name="t_order" start-delimiter=""" end-delimiter=""" start-index="11" stop-index="19" />
</drop-table>
<drop-table sql-case-id="drop_table_with_double_quota">
<table name="t_order" start-delimiter=""" end-delimiter=""" start-index="11" stop-index="19" />
</drop-table>
<drop-table sql-case-id="drop_table_with_bracket">
<table name="t_order" start-delimiter="[" end-delimiter="]" start-index="11" stop-index="19" />
</drop-table>
<drop-table sql-case-id="drop_bit_xor_table">
<table name="BIT_XOR" start-index="11" stop-index="17" />
</drop-table>
</sql-parser-test-cases>
``` | /content/code_sandbox/test/it/parser/src/main/resources/case/ddl/drop-table.xml | xml | 2016-01-18T12:49:26 | 2024-08-16T15:48:11 | shardingsphere | apache/shardingsphere | 19,707 | 768 |
```xml
<NamedItem2 ItemName="i1" xmlns="clr-namespace:MonoTests.System.Xaml;assembly=System.Xaml.TestCases" xmlns:x="path_to_url">
<NamedItem2.References>
<NamedItem2 ItemName="i2">
<NamedItem2.References>
<NamedItem2 ItemName="i3" />
</NamedItem2.References>
</NamedItem2>
<NamedItem2 ItemName="i4">
<NamedItem2.References>
<x:Reference>i3</x:Reference>
</NamedItem2.References>
</NamedItem2>
</NamedItem2.References>
</NamedItem2>
``` | /content/code_sandbox/src/Test/System.Xaml.TestCases/XmlFiles/NamedItems2.xml | xml | 2016-08-25T20:07:20 | 2024-08-13T22:23:35 | CoreWF | UiPath/CoreWF | 1,126 | 147 |
```xml
import ParentNode from './ParentNode';
export default class StackNode extends ParentNode {
constructor(layout: any, parentNode?: ParentNode) {
super(layout, 'Stack', parentNode);
}
getVisibleLayout() {
return this.children[this.children.length - 1].getVisibleLayout();
}
}
``` | /content/code_sandbox/lib/Mock/Layouts/StackNode.ts | xml | 2016-03-11T11:22:54 | 2024-08-15T09:05:44 | react-native-navigation | wix/react-native-navigation | 13,021 | 65 |
```xml
import { z, IntegrationDefinitionProps } from '@botpress/sdk'
export { actions } from './actions'
export { channels } from './channels'
export const configuration = {
schema: z.object({
apiToken: z.string().min(1).describe('API Token'),
workspaceGid: z.string().min(1).describe('Workspace Global ID'),
}),
} satisfies IntegrationDefinitionProps['configuration']
export const states = {
// voidStateOne: {
// type: 'integration',
// schema: z.object({
// dataField: z.string(),
// }),
// },
// voidStateTwo: {
// type: 'conversation',
// schema: z.object({
// otherDataField: z.string(),
// }),
// },
} satisfies IntegrationDefinitionProps['states']
export const user = {
tags: {
// id: {},
},
} satisfies IntegrationDefinitionProps['user']
``` | /content/code_sandbox/integrations/asana/src/definitions/index.ts | xml | 2016-11-16T21:57:59 | 2024-08-16T18:45:35 | botpress | botpress/botpress | 12,401 | 202 |
```xml
import { getBareExtensions } from '@expo/config/paths';
import assert from 'assert';
import fs from 'fs';
import path from 'path';
import { createFastResolver, FailedToResolvePathError } from '../createExpoMetroResolver';
import { isFailedToResolvePathError } from '../metroErrors';
type SupportedContext = Parameters<ReturnType<typeof createFastResolver>>[0];
const createContext = ({
platform,
isServer,
origin,
nodeModulesPaths = [],
packageExports,
override,
}: {
origin: string;
platform: string;
isServer?: boolean;
nodeModulesPaths?: string[];
packageExports?: boolean;
override?: Partial<SupportedContext>;
}): SupportedContext => {
const preferNativePlatform = platform === 'ios' || platform === 'android';
const sourceExtsConfig = { isTS: true, isReact: true, isModern: true };
const sourceExts = getBareExtensions([], sourceExtsConfig);
return {
resolveAsset: jest.fn((dirPath, basename, extension) => [
path.join(dirPath, basename + extension),
]),
customResolverOptions: Object.create({
environment: isServer ? 'node' : 'client',
}),
getPackage(packageJsonPath) {
return JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
},
mainFields: preferNativePlatform
? ['react-native', 'browser', 'main']
: isServer
? ['main', 'module']
: ['browser', 'module', 'main'],
nodeModulesPaths: ['node_modules', ...nodeModulesPaths],
originModulePath: origin,
preferNativePlatform,
sourceExts,
unstable_enablePackageExports: !!packageExports,
unstable_conditionsByPlatform: {},
unstable_conditionNames: isServer
? ['node', 'require']
: platform === 'web'
? ['require', 'import', 'browser']
: ['require', 'import', 'react-native'],
...override,
};
};
// This test runs on the actual fs.
jest.unmock('fs');
const originProjectRoot = path.join(
__dirname,
'../../../../../../../../apps/native-component-list'
);
function resolveToEmpty(
moduleId: string,
{
platform,
isServer,
from = 'index.js',
nodeModulesPaths,
packageExports,
preserveSymlinks,
}: {
platform: string;
isServer?: boolean;
from?: string;
nodeModulesPaths?: string[];
packageExports?: boolean;
preserveSymlinks?: boolean;
}
) {
const resolver = createFastResolver({ preserveSymlinks: !!preserveSymlinks, blockList: [] });
const context = createContext({
platform,
isServer,
origin: path.isAbsolute(from) ? from : path.join(originProjectRoot, from),
nodeModulesPaths,
packageExports,
});
const res = resolver(context, moduleId, platform);
expect(res.type).toBe('empty');
}
function resolveTo(
moduleId: string,
{
platform,
isServer,
from = 'index.js',
nodeModulesPaths,
packageExports,
preserveSymlinks,
}: {
platform: string;
isServer?: boolean;
from?: string;
nodeModulesPaths?: string[];
packageExports?: boolean;
preserveSymlinks?: boolean;
},
type: 'sourceFile' | 'assetFiles' = 'sourceFile'
) {
const resolver = createFastResolver({ preserveSymlinks: !!preserveSymlinks, blockList: [] });
const context = createContext({
platform,
isServer,
origin: path.isAbsolute(from) ? from : path.join(originProjectRoot, from),
nodeModulesPaths,
packageExports,
});
const res = resolver(context, moduleId, platform);
expect(res.type).toBe(type);
return res.type === 'sourceFile'
? res.filePath
: res.type === 'assetFiles'
? res.filePaths[0]
: null;
}
describe(isFailedToResolvePathError, () => {
it(`matches custom error`, () => {
const error = new FailedToResolvePathError('message');
expect(isFailedToResolvePathError(error)).toBe(true);
});
});
describe(createFastResolver, () => {
describe('node built-ins', () => {
it('shims node built-ins on non-server platforms', () => {
resolveToEmpty('node:path', { platform: 'ios', isServer: false });
resolveToEmpty('node:assert', { platform: 'web', isServer: false });
resolveToEmpty('node:punycode', { platform: 'web', isServer: false });
resolveTo('punycode', { platform: 'web', isServer: false });
});
it('supports node built-ins on server platforms', () => {
expect(resolveTo('node:assert', { platform: 'web', isServer: true })).toEqual('node:assert');
expect(resolveTo('http', { platform: 'ios', isServer: true })).toEqual('http');
});
// TODO: Test node_module installed with the same name as a node built-in.
});
describe('package exports', () => {
it('resolves react server files', () => {
expect(resolveTo('react-dom/server', { platform: 'web' })).toEqual(
expect.stringMatching(/\/node_modules\/react-dom\/server\.browser\.js$/)
);
expect(resolveTo('react-dom/server', { platform: 'web', packageExports: true })).toEqual(
expect.stringMatching(/\/node_modules\/react-dom\/server\.browser\.js$/)
);
expect(resolveTo('react-dom/server', { platform: 'ios', packageExports: true })).toEqual(
expect.stringMatching(/\/node_modules\/react-dom\/server\.node\.js$/)
);
expect(
resolveTo('react-dom/server', { platform: 'web', packageExports: true, isServer: true })
).toEqual(expect.stringMatching(/\/node_modules\/react-dom\/server\.node\.js$/));
expect(
resolveTo('react-dom/server', { platform: 'ios', packageExports: true, isServer: true })
).toEqual(expect.stringMatching(/\/node_modules\/react-dom\/server\.node\.js$/));
});
it(`asserts missing export in package`, () => {
// Sanity
expect(() =>
resolveTo('react-dom/foo.js', { platform: 'web', packageExports: true, isServer: true })
).toThrow(/Missing "\.\/foo\.js" specifier in "react-dom" package/);
// Actual check
expect(() =>
resolveTo('react-dom/server.js', { platform: 'web', packageExports: true, isServer: true })
).toThrow(/Missing "\.\/server\.js" specifier in "react-dom" package/);
resolveTo('react-dom/server.js', { platform: 'web', packageExports: false, isServer: true });
});
});
it('resolves react-server file', () => {
const resolver = createFastResolver({ preserveSymlinks: true, blockList: [] });
const context = createContext({
platform: 'web',
isServer: true,
origin: path.join(originProjectRoot, 'index.js'),
override: {
unstable_enablePackageExports: true,
// unstable_conditionsByPlatform: {},
unstable_conditionNames: ['node', 'require', 'react-server', 'workerd'],
},
});
const results = resolver(context, 'react-server-dom-webpack/server', 'web');
expect(results).toEqual({
filePath: expect.stringMatching(/\/react-server-dom-webpack\/server\.edge\.js$/),
type: 'sourceFile',
});
assert(results.type === 'sourceFile');
});
describe('ios', () => {
const platform = 'ios';
it('resolves near self first', () => {
const reactNativePath = resolveTo('react-native/Libraries/Promise.js', {
platform,
packageExports: true,
})!;
expect(
resolveTo('promise/setimmediate/es6-extensions', {
platform,
from: reactNativePath,
packageExports: true,
})
).toMatch(
/node_modules\/react-native\/node_modules\/promise\/setimmediate\/es6-extensions.js$/
);
});
describe('resolves assets near self', () => {
const initialPath = resolveTo('expo-router/build/views/Sitemap.js', {
platform,
packageExports: true,
preserveSymlinks: true,
})!;
it('exports and symlinks', () => {
expect(
resolveTo(
'expo-router/assets/file.png',
{
platform,
from: initialPath,
packageExports: true,
preserveSymlinks: true,
},
'assetFiles'
)
).toMatch(/packages\/expo-router\/assets\/file.png$/);
});
it('exports without symlinks', () => {
expect(
resolveTo(
'expo-router/assets/file.png',
{
platform,
from: initialPath,
packageExports: true,
preserveSymlinks: false,
},
'assetFiles'
)
).toMatch(/node_modules\/expo-router\/assets\/file.png$/);
});
it('no exports and symlinks enabled', () => {
expect(
resolveTo(
'expo-router/assets/file.png',
{
platform,
from: initialPath,
packageExports: false,
preserveSymlinks: true,
},
'assetFiles'
)
).toMatch(/packages\/expo-router\/assets\/file.png$/);
});
it('no exports or symlinks enabled', () => {
expect(
resolveTo(
'expo-router/assets/file.png',
{
platform,
from: initialPath,
packageExports: false,
preserveSymlinks: false,
},
'assetFiles'
)
).toMatch(/node_modules\/expo-router\/assets\/file.png$/);
});
});
it('asserts not found module', () => {
expect(() => resolveTo('react-native-fake-lib', { platform })).toThrowError(
/The module could not be resolved because no file or module matched the pattern:/
);
});
it('resolves ios file module', () => {
expect(resolveTo('react-native', { platform })).toEqual(
expect.stringMatching(/\/node_modules\/react-native\/index\.js$/)
);
expect(resolveTo('./App', { platform })).toEqual(
expect.stringMatching(/\/native-component-list\/App.tsx$/)
);
});
it('ignores package exports with @babel/runtime due to metro bugs', () => {
expect(resolveTo('@babel/runtime/helpers/interopRequireDefault', { platform })).toEqual(
expect.stringMatching(/\/@babel\/runtime\/helpers\/interopRequireDefault.js$/)
);
expect(
resolveTo('@babel/runtime/helpers/interopRequireDefault', {
platform,
packageExports: true,
})
).toEqual(expect.stringMatching(/\/@babel\/runtime\/helpers\/interopRequireDefault.js$/));
expect(
resolveTo('@babel/runtime/helpers/interopRequireDefault', {
platform,
packageExports: true,
isServer: true,
})
).toEqual(expect.stringMatching(/\/@babel\/runtime\/helpers\/interopRequireDefault.js$/));
});
it('resolves with baseUrl', () => {
expect(resolveTo('App.tsx', { platform, nodeModulesPaths: [originProjectRoot] })).toEqual(
expect.stringMatching(/\/native-component-list\/App.tsx$/)
);
expect(() => resolveTo('App.tsx', { platform })).toThrowError(
/The module could not be resolved because no file or module matched the pattern:/
);
});
[true, false].forEach((packageExports) => {
it(
'resolves module with browser shims' + (packageExports ? ' (package exports)' : ''),
() => {
// object-inspect doesn't contain package exports so the results should be the same
// regardless of if the feature is on or not.
const resolver = createFastResolver({ preserveSymlinks: false, blockList: [] });
const context = createContext({
platform,
packageExports,
origin: path.join(originProjectRoot, 'index.js'),
});
const results = resolver(context, 'object-inspect', platform);
expect(results).toEqual({
filePath: expect.stringMatching(/\/object-inspect\/index.js$/),
type: 'sourceFile',
});
assert(results.type === 'sourceFile');
// Browser shims are applied on native.
['web', 'ios'].forEach((platform) => {
expect(
resolver(
createContext({
platform,
packageExports,
origin: results.filePath,
}),
'./util.inspect.js',
platform
)
).toEqual({
type: 'empty',
});
});
// Browser shims are not applied in server contexts.
expect(
resolver(
createContext({
platform,
isServer: true,
origin: results.filePath,
packageExports,
}),
'./util.inspect.js',
platform
)
).toEqual({
filePath: expect.stringMatching(/object-inspect\/util\.inspect\.js$/),
type: 'sourceFile',
});
}
);
});
xit('resolves module with browser shims with non-matching extensions', () => {
const resolver = createFastResolver({ preserveSymlinks: false, blockList: [] });
const context = createContext({
platform,
origin: path.join(originProjectRoot, 'index.js'),
});
const results = resolver(context, 'uuid/v4', platform);
expect(results).toEqual({
filePath: expect.stringMatching(/\/uuid\/v4.js$/),
type: 'sourceFile',
});
assert(results.type === 'sourceFile');
// Browser shims are applied on native.
expect(
resolver(
createContext({
platform,
origin: results.filePath,
}),
'./lib/rng',
platform
)
).toEqual({
filePath: expect.stringMatching(/node_modules\/uuid\/lib\/rng-browser\.js/),
type: 'sourceFile',
});
});
it('resolves an asset', () => {
const resolver = createFastResolver({ preserveSymlinks: false, blockList: [] });
const context = createContext({
platform,
origin: path.join(originProjectRoot, 'index.js'),
});
const results = resolver(context, './assets/icons/icon.png', platform);
expect(results).toEqual({
filePaths: [expect.stringMatching(/\/native-component-list\/assets\/icons\/icon.png/)],
type: 'assetFiles',
});
expect(context.resolveAsset).toBeCalledWith(
expect.stringMatching(/\/native-component-list\/assets\/icons$/),
'icon',
'.png'
);
});
});
});
``` | /content/code_sandbox/packages/@expo/cli/src/start/server/metro/__tests__/createExpoMetroResolver.test.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 3,217 |
```xml
// See LICENSE.txt for license information.
import React, {useCallback, useState} from 'react';
import {useIntl} from 'react-intl';
import {leaveCallConfirmation} from '@calls/actions/calls';
import {leaveAndJoinWithAlert, showLimitRestrictedAlert} from '@calls/alerts';
import {useTryCallsFunction} from '@calls/hooks';
import Loading from '@components/loading';
import OptionBox, {OPTIONS_HEIGHT} from '@components/option_box';
import {useTheme} from '@context/theme';
import {preventDoubleTap} from '@utils/tap';
import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme';
import {typography} from '@utils/typography';
import type {LimitRestrictedInfo} from '@calls/observers';
export interface Props {
serverUrl: string;
channelId: string;
isACallInCurrentChannel: boolean;
alreadyInCall: boolean;
dismissChannelInfo: () => void;
limitRestrictedInfo: LimitRestrictedInfo;
otherParticipants: boolean;
isAdmin: boolean;
isHost: boolean;
}
const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => ({
container: {
alignItems: 'center',
backgroundColor: changeOpacity(theme.buttonBg, 0.08),
borderRadius: 4,
flex: 1,
maxHeight: OPTIONS_HEIGHT,
justifyContent: 'center',
minWidth: 60,
paddingTop: 12,
paddingBottom: 10,
},
text: {
color: theme.buttonBg,
paddingTop: 3,
width: '100%',
textAlign: 'center',
...typography('Body', 50, 'SemiBold'),
},
}));
const ChannelInfoStartButton = ({
serverUrl,
channelId,
isACallInCurrentChannel,
alreadyInCall,
dismissChannelInfo,
limitRestrictedInfo,
otherParticipants,
isAdmin,
isHost,
}: Props) => {
const intl = useIntl();
const theme = useTheme();
const styles = getStyleSheet(theme);
const isLimitRestricted = limitRestrictedInfo.limitRestricted;
const [connecting, setConnecting] = useState(false);
const [joiningMsg, setJoiningMsg] = useState('');
const starting = intl.formatMessage({id: 'mobile.calls_starting', defaultMessage: 'Starting...'});
const joining = intl.formatMessage({id: 'mobile.calls_joining', defaultMessage: 'Joining...'});
const toggleJoinLeave = useCallback(async () => {
if (alreadyInCall) {
await leaveCallConfirmation(intl, otherParticipants, isAdmin, isHost, serverUrl, channelId, dismissChannelInfo);
} else if (isLimitRestricted) {
showLimitRestrictedAlert(limitRestrictedInfo, intl);
dismissChannelInfo();
} else {
setJoiningMsg(isACallInCurrentChannel ? joining : starting);
setConnecting(true);
await leaveAndJoinWithAlert(intl, serverUrl, channelId);
setConnecting(false);
dismissChannelInfo();
}
}, [isLimitRestricted, alreadyInCall, dismissChannelInfo, intl, serverUrl, channelId, isACallInCurrentChannel, otherParticipants]);
const [tryJoin, msgPostfix] = useTryCallsFunction(toggleJoinLeave);
const joinText = intl.formatMessage({id: 'mobile.calls_join_call', defaultMessage: 'Join call'});
const startText = intl.formatMessage({id: 'mobile.calls_start_call', defaultMessage: 'Start call'});
const leaveText = intl.formatMessage({id: 'mobile.calls_leave_call', defaultMessage: 'Leave call'});
const text = isACallInCurrentChannel ? joinText + msgPostfix : startText + msgPostfix;
const icon = isACallInCurrentChannel ? 'phone-in-talk' : 'phone';
if (connecting) {
return (
<Loading
color={theme.buttonBg}
size={'small'}
footerText={joiningMsg}
containerStyle={styles.container}
footerTextStyles={styles.text}
/>
);
}
return (
<OptionBox
onPress={preventDoubleTap(tryJoin)}
text={text}
iconName={icon}
activeText={text}
activeIconName={icon}
isActive={isACallInCurrentChannel}
destructiveText={leaveText}
destructiveIconName={'phone-hangup'}
isDestructive={alreadyInCall}
testID='channel_info.channel_actions.join_start_call.action'
/>
);
};
export default ChannelInfoStartButton;
``` | /content/code_sandbox/app/products/calls/components/channel_info_start/channel_info_start_button.tsx | xml | 2016-10-07T16:52:32 | 2024-08-16T12:08:38 | mattermost-mobile | mattermost/mattermost-mobile | 2,155 | 962 |
```xml
import React from 'react';
const icon = require('./typescript.svg');
export function TypeScript() {
return <img alt="typescript" height="20" src={icon} width="20" />;
}
``` | /content/code_sandbox/packages/ui-components/src/components/Icons/DevsIcons/TypeScript.tsx | xml | 2016-04-15T16:21:12 | 2024-08-16T09:38:01 | verdaccio | verdaccio/verdaccio | 16,189 | 42 |
```xml
import { type EventSubscription } from 'expo-modules-core';
// Import the native module. On web, it will be resolved to <%- project.name %>.web.ts
// and on native platforms to <%- project.name %>.ts
import <%- project.moduleName %> from './src/<%- project.moduleName %>';
import <%- project.viewName %> from './src/<%- project.viewName %>';
import { ChangeEventPayload, <%- project.viewName %>Props } from './src/<%- project.name %>.types';
// Get the native constant value.
export const PI = <%- project.moduleName %>.PI;
export function hello(): string {
return <%- project.moduleName %>.hello();
}
export async function setValueAsync(value: string) {
return await <%- project.moduleName %>.setValueAsync(value);
}
export function addChangeListener(listener: (event: ChangeEventPayload) => void): EventSubscription {
return <%- project.moduleName %>.addListener<ChangeEventPayload>('onChange', listener);
}
export { <%- project.viewName %>, <%- project.viewName %>Props, ChangeEventPayload };
``` | /content/code_sandbox/packages/expo-module-template-local/index.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 231 |
```xml
// Import required packages
import { config } from 'dotenv';
import * as path from 'path';
import * as restify from 'restify';
import { INodeSocket } from 'botframework-streaming';
// Import required bot services.
// See path_to_url to learn more about the different parts of a bot.
import {
CloudAdapter,
ConfigurationBotFrameworkAuthentication,
ConfigurationBotFrameworkAuthenticationOptions
} from 'botbuilder';
// This bot's main dialog.
import { TeamsStartNewThreadInChannel } from './teamsStartNewThreadInChannel';
// Read botFilePath and botFileSecret from .env file.
const ENV_FILE = path.join( __dirname, '..', '.env' );
config( { path: ENV_FILE } );
const botFrameworkAuthentication = new ConfigurationBotFrameworkAuthentication(process.env as ConfigurationBotFrameworkAuthenticationOptions);
// Create adapter.
// See path_to_url to learn more about adapters.
const adapter = new CloudAdapter(botFrameworkAuthentication);
// Catch-all for errors.
const onTurnErrorHandler = async ( context, error ) => {
// This check writes out errors to console log .vs. app insights.
// NOTE: In production environment, you should consider logging this to Azure
// application insights.
console.error( `\n [onTurnError] unhandled error: ${ error }` );
// Send a trace activity, which will be displayed in Bot Framework Emulator
await context.sendTraceActivity(
'OnTurnError Trace',
`${ error }`,
'path_to_url
'TurnError'
);
// Send a message to the user
await context.sendActivity( 'The bot encountered an error or bug.' );
await context.sendActivity( 'To continue to run this bot, please fix the bot source code.' );
};
// Set the onTurnError for the singleton CloudAdapter.
adapter.onTurnError = onTurnErrorHandler;
// Create the bot that will handle incoming messages.
const bot = new TeamsStartNewThreadInChannel();
// Create HTTP server.
const server = restify.createServer();
server.use(restify.plugins.bodyParser());
server.listen( process.env.port || process.env.PORT || 3978, () => {
console.log( `\n${ server.name } listening to ${ server.url }` );
console.log( '\nGet Bot Framework Emulator: path_to_url );
console.log( '\nTo talk to your bot, open the emulator select "Open Bot"' );
} );
// Listen for incoming requests.
server.post('/api/messages', async (req, res) => {
// Route received a request to adapter for processing
await adapter.process(req, res, (context) => bot.run(context));
});
// Listen for Upgrade requests for Streaming.
server.on('upgrade', async (req, socket, head) => {
// Create an adapter scoped to this WebSocket connection to allow storing session data.
const streamingAdapter = new CloudAdapter(botFrameworkAuthentication);
// Set onTurnError for the CloudAdapter created for each connection.
streamingAdapter.onTurnError = onTurnErrorHandler;
await streamingAdapter.process(req, socket as unknown as INodeSocket, head, (context) => bot.run(context));
});
``` | /content/code_sandbox/archive/samples/typescript_nodejs/58.teams-start-new-thread-in-channel/src/index.ts | xml | 2016-09-20T16:17:28 | 2024-08-16T02:44:00 | BotBuilder-Samples | microsoft/BotBuilder-Samples | 4,323 | 661 |
```xml
<vector xmlns:android="path_to_url"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:pathData="M43.7363,23.8896 L79.1229,8.0571"
android:strokeWidth="2.80324674"
android:fillColor="#373737"
android:strokeColor="#202020"/>
<path
android:pathData="M85.7736,19.5714l4.1193,-0.8438l1.6875,8.2387l-4.1193,0.8438z"
android:fillColor="#202020"/>
<path
android:pathData="M74.9002,8.8326a4.2049,4.2049 66.1646,1 0,8.2387 -1.6875a4.2049,4.2049 66.1646,1 0,-8.2387 1.6875z"
android:fillColor="#373737"/>
<path
android:pathData="M39.617,24.7334a4.2049,4.2049 66.1646,1 0,8.2387 -1.6875a4.2049,4.2049 66.1646,1 0,-8.2387 1.6875z"
android:fillColor="#373737"/>
<path
android:pathData="M35.4976,25.5771l49.4322,-10.1251l6.7501,32.9548l-49.4322,10.1251z"
android:fillColor="#488b4c"/>
<path
android:pathData="M58.0963,38.117m-12.358,2.5313a12.6146,12.6146 123.4243,1 1,24.7161 -5.0626a12.6146,12.6146 123.4243,1 1,-24.7161 5.0626"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#1f1f1f"
android:strokeColor="#435844"
android:strokeLineCap="round"/>
<path
android:pathData="M73.4155,22.1027l8.2387,-1.6875l5.0625,24.7161l-8.2387,1.6875z"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#c1c1c1"
android:strokeColor="#435844"
android:strokeLineCap="round"/>
<path
android:pathData="M85.0292,36.8925 L76.7906,38.58"
android:strokeWidth="4.20487022"
android:strokeColor="#1f1f1f"
android:strokeLineCap="round"/>
<path
android:pathData="M57.9422,38.238m-5.4925,1.125a5.6065,5.6065 123.4243,1 1,10.9849 -2.25a5.6065,5.6065 123.4243,1 1,-10.9849 2.25"
android:fillColor="#050505"/>
<path
android:pathData="m45.1758,37.902 l24.7161,-5.0626"
android:strokeWidth="2"
android:strokeColor="#435844"/>
<path
android:pathData="m46.3008,43.3945 l24.7161,-5.0626"
android:strokeWidth="2"
android:strokeColor="#435844"/>
<path
android:pathData="m46.797,31.847 l19.2236,-3.9375"
android:strokeWidth="2"
android:strokeColor="#435844"/>
<path
android:pathData="M50.172,48.3244 L69.3956,44.3869"
android:strokeWidth="2"
android:strokeColor="#435844"/>
<path
android:pathData="M69.2323,71.6902 L26.4645,46.3878"
android:strokeWidth="2.81924725"
android:strokeColor="#323232"/>
<path
android:pathData="m46.3008,43.3945c10.1308,5.5871 6.6763,12.3999 25.422,23.6297l-5.7266,9.9188C50.3448,67.2782 45.0324,69.9491 38.51,68.2728 31.372,74.3419 29.9653,92.767 23.004,92.2034 8.2908,84.5218 22.6854,77.2345 29.7858,63.7287 26.0471,61.1614 22.6197,58.1058 20.9031,53.5535c0.8403,-4.6741 1.4385,-9.3227 8.4577,-14.6492 7.0376,-0.9124 11.8246,1.6692 16.9399,4.4902z"
android:fillColor="#eeb94f"/>
<path
android:pathData="M71.7228,67.0242 L84.2955,70.6208 75.3092,86.1856 65.9962,76.9429Z"
android:fillColor="#494949"/>
<path
android:pathData="m31.0117,80.4823c1.5825,0.751 3.7109,-0.422 4.7539,-2.62 1.043,-2.1979 0.6057,-4.5885 -0.9769,-5.3395z"
android:fillColor="#494949"/>
<path
android:pathData="m31.8969,38.7407c-4.5838,5.1518 -8.3215,12.5408 -9.9555,17.2434l-3.8613,-4.0605c-0.1458,-6.4736 1.9902,-11.7232 8.4577,-14.6492z"
android:fillColor="#494949"/>
<path
android:pathData="M70.8422,68.5486C50.276,56.1016 55.0051,51.9767 45.4298,45.5323c-4.2211,-2.8409 -7.8282,-2.7623 -7.7581,-2.1802 14.2757,7.4142 15.6296,19.4813 31.0044,28.3047z"
android:fillColor="#fff"
android:fillAlpha="0.38431373"/>
<path
android:pathData="M49.2033,69.5543C49.0457,69.1975 37.3606,69.3989 33.8205,66.169 29.121,64.4993 21.4875,56.414 21.9414,55.9841c0.9916,-3.4967 4.5591,-9.372 6.3496,-12.4075 0.7249,10.6369 12.8118,23.4512 20.9122,25.9777z"
android:fillColor="#000"
android:fillAlpha="0.24242428"/>
<path
android:pathData="M18.6667,5.6967L34.4519,9.9263A8.4434,3.2684 105,0 1,35.4237 18.9279L27.1054,49.9721A8.4434,3.2684 105,0 1,21.7631 57.2818L5.9779,53.0522A8.4434,3.2684 105,0 1,5.0062 44.0506L13.3244,13.0064A8.4434,3.2684 105,0 1,18.6667 5.6967z"
android:fillColor="#3c516b"/>
<path
android:pathData="M19.1552,8.0833C17.4062,7.6147 16.4826,9.6388 15.0766,14.8858l-3.5988,13.4308c5.2068,9.2211 8.7599,9.5164 17.8899,4.7936l3.5988,-13.4308c1.4059,-5.247 1.6181,-7.4617 -0.1309,-7.9304z"
android:fillColor="#101919"/>
<path
android:pathData="M19.258,13.7504L29.913,16.6054A1.1576,1.3618 105,0 1,30.9289 18.076L28.1443,28.4679A1.1576,1.3618 105,0 1,26.5293 29.2335L15.8743,26.3785A1.1576,1.3618 105,0 1,14.8585 24.908L17.643,14.516A1.1576,1.3618 105,0 1,19.258 13.7504z"
android:fillColor="#7faa6c"/>
<path
android:pathData="m11.1472,36.3909 l1.165,1.4401"
android:strokeWidth="3.26840353"
android:strokeColor="#a5a5a5"
android:strokeLineCap="round"/>
<path
android:pathData="M23.888,40.9327 L25.617,40.2681"
android:strokeWidth="3.26840353"
android:strokeColor="#a5a5a5"
android:strokeLineCap="round"/>
<path
android:pathData="m17.351,39.1811 l1.447,0.3877"
android:strokeWidth="3.26840353"
android:strokeColor="#a5a5a5"
android:strokeLineCap="round"/>
<path
android:pathData="M9.7373,41.6526 L10.9023,43.0927"
android:strokeWidth="3.26840353"
android:strokeColor="#a5a5a5"
android:strokeLineCap="round"/>
<path
android:pathData="m22.4781,46.1944 l1.7289,-0.6646"
android:strokeWidth="3.26840353"
android:strokeColor="#a5a5a5"
android:strokeLineCap="round"/>
<path
android:pathData="m15.9411,44.4428 l1.447,0.3877"
android:strokeWidth="3.26840353"
android:strokeColor="#a5a5a5"
android:strokeLineCap="round"/>
<path
android:pathData="m8.3275,46.9144 l1.165,1.4401"
android:strokeWidth="3.26840353"
android:strokeColor="#a5a5a5"
android:strokeLineCap="round"/>
<path
android:pathData="m21.0683,51.4562 l1.7289,-0.6646"
android:strokeWidth="3.26840353"
android:strokeColor="#a5a5a5"
android:strokeLineCap="round"/>
<path
android:pathData="m14.5313,49.7046 l1.447,0.3877"
android:strokeWidth="3.26840353"
android:strokeColor="#a5a5a5"
android:strokeLineCap="round"/>
<path
android:pathData="m22.6949,11.7106 l5.2617,1.4099"
android:strokeWidth="2"
android:fillColor="#7b7b7b"
android:strokeColor="#505050"
android:strokeLineCap="round"/>
<path
android:pathData="m19.4482,31.3543 l1.447,0.3877"
android:strokeWidth="4.35787153"
android:strokeColor="#a5a5a5"
android:strokeLineCap="round"/>
<path
android:pathData="m18.5127,6.6697 l7.7063,1.854C25.2438,14.9453 0.8824,65.5174 5.9837,44.6852l8.7663,-32.3443c0.7308,-1.7876 1.6253,-4.7604 3.7627,-5.6712z"
android:fillColor="#fff"
android:fillAlpha="0.23737374"/>
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable/ic_recycling_small_electrical_appliances.xml | xml | 2016-07-02T10:44:04 | 2024-08-16T18:55:54 | StreetComplete | streetcomplete/StreetComplete | 3,781 | 3,122 |
```xml
import * as dayjs from "dayjs";
import _ from "lodash";
import Form from "../containers/Form";
import React from "react";
import { FlexItem } from "../../common/styles";
import {
formatValue,
renderFullName,
renderUserFullName,
} from "@erxes/ui/src/utils";
import { IDonate } from "../types";
import { IDonateCampaign } from "../../../configs/donateCampaign/types";
import { IQueryParams } from "@erxes/ui/src/types";
import { Link } from "react-router-dom";
import { FormControl, ModalTrigger } from "@erxes/ui/src/components";
type Props = {
donate: IDonate;
currentCampaign?: IDonateCampaign;
isChecked: boolean;
toggleBulk: (donate: IDonate, isChecked?: boolean) => void;
queryParams: IQueryParams;
};
class DonateRow extends React.Component<Props> {
displayValue(donate, name) {
const value = _.get(donate, name);
if (name === "primaryName") {
return <FlexItem>{formatValue(donate.primaryName)}</FlexItem>;
}
return formatValue(value);
}
onChange = (e) => {
const { toggleBulk, donate } = this.props;
if (toggleBulk) {
toggleBulk(donate, e.target.checked);
}
};
renderOwner = () => {
const { donate } = this.props;
if (!donate.owner || !donate.owner._id) {
return "-";
}
if (donate.ownerType === "customer") {
return (
<FlexItem>
<Link to={`/contacts/details/${donate.ownerId}`}>
{formatValue(renderFullName(donate.owner))}
</Link>
</FlexItem>
);
}
if (donate.ownerType === "user") {
return (
<FlexItem>
<Link to={`/settings/team/details/${donate.ownerId}`}>
{formatValue(renderUserFullName(donate.owner))}
</Link>
</FlexItem>
);
}
if (donate.ownerType === "company") {
return (
<FlexItem>
<Link to={`/companies/details/${donate.ownerId}`}>
{formatValue(this.displayValue(donate.owner, "name"))}
</Link>
</FlexItem>
);
}
return "";
};
modalContent = (props) => {
const { donate } = this.props;
const updatedProps = {
...props,
donate,
};
return <Form {...updatedProps} />;
};
render() {
const { donate, isChecked, currentCampaign } = this.props;
const onClick = (e) => {
e.stopPropagation();
};
const trigger = (
<tr>
<td onClick={onClick}>
<FormControl
checked={isChecked}
componentclass="checkbox"
onChange={this.onChange}
/>
</td>
<td key={"createdAt"}>{dayjs(donate.createdAt).format("lll")} </td>
<td key={"ownerType"}>{this.displayValue(donate, "ownerType")}</td>
<td key={"ownerId"} onClick={onClick}>
{this.renderOwner()}
</td>
<td key={"status"}>{this.displayValue(donate, "donateScore")}</td>
<td key={"actions"} onClick={onClick}>
.
</td>
</tr>
);
return (
<ModalTrigger
title={`Edit donate`}
trigger={trigger}
autoOpenKey="showProductModal"
content={this.modalContent}
/>
);
}
}
export default DonateRow;
``` | /content/code_sandbox/packages/plugin-loyalties-ui/src/loyalties/donates/components/Row.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 791 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="path_to_url" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="tr" original="../LocalizableStrings.resx">
<body>
<trans-unit id="AppFullName">
<source>List all package references of the project or solution.</source>
<target state="translated">Proje veya zmdeki tm paket bavurularn listeleyin.</target>
<note />
</trans-unit>
<trans-unit id="CmdDeprecatedDescription">
<source>Lists packages that have been deprecated. Cannot be combined with '--vulnerable' or '--outdated' options.</source>
<target state="translated">Kullanm d braklan paketleri listeler. '--vulnerable' veya '--outdated' seenekleriyle birletirilemez.</target>
<note />
</trans-unit>
<trans-unit id="CmdFormatDescription">
<source>Specifies the output format type for the list packages command.</source>
<target state="translated">Liste paketleri komutunun k biimi trn belirtir.</target>
<note />
</trans-unit>
<trans-unit id="CmdFramework">
<source>FRAMEWORK | FRAMEWORK\RID</source>
<target state="translated">FRAMEWORK | FRAMEWORK\RID</target>
<note />
</trans-unit>
<trans-unit id="CmdFrameworkDescription">
<source>Chooses a framework to show its packages. Use the option multiple times for multiple frameworks.</source>
<target state="translated">Paketlerini grntlemek iin bir ereve sein. Birden fazla ereve iin seenei birden fazla kez kullann.</target>
<note />
</trans-unit>
<trans-unit id="CmdOutdatedDescription">
<source>Lists packages that have newer versions. Cannot be combined with '--deprecated' or '--vulnerable' options.</source>
<target state="translated">Daha yeni srmlere sahip paketleri listeler. '--deprecated' veya '--vulnerable' seenekleriyle birletirilemez.</target>
<note />
</trans-unit>
<trans-unit id="CmdOutputVersionDescription">
<source>Specifies the version of machine-readable output. Requires the '--format json' option.</source>
<target state="translated">Makine tarafndan okunabilir kn srmn belirtir. '--format json' seeneini gerektirir.</target>
<note />
</trans-unit>
<trans-unit id="CmdTransitiveDescription">
<source>Lists transitive and top-level packages.</source>
<target state="translated">Geili ve st dzey paketleri listeler.</target>
<note />
</trans-unit>
<trans-unit id="CmdVulnerableDescription">
<source>Lists packages that have known vulnerabilities. Cannot be combined with '--deprecated' or '--outdated' options.</source>
<target state="translated">Bilinen gvenlik aklarna sahip paketleri listeler. '--deprecated' veya '--outdated' seenekleriyle birletirilemez.</target>
<note />
</trans-unit>
<trans-unit id="NoProjectsOrSolutions">
<source>A project or solution file could not be found in {0}. Specify a project or solution file to use.</source>
<target state="translated">{0} iinde bir proje veya zm dosyas bulunamad. Kullanmak iin bir proje veya zm dosyas belirtin.</target>
<note />
</trans-unit>
<trans-unit id="CmdConfig">
<source>CONFIG_FILE</source>
<target state="translated">CONFIG_FILE</target>
<note />
</trans-unit>
<trans-unit id="CmdConfigDescription">
<source>The path to the NuGet config file to use. Requires the '--outdated', '--deprecated' or '--vulnerable' option.</source>
<target state="translated">Kullanlacak NuGet yaplandrma dosyasnn yolu. '--outdated', '--deprecated' veya '--vulnerable' seeneini gerektirir.</target>
<note />
</trans-unit>
<trans-unit id="CmdHighestMinorDescription">
<source>Consider only the packages with a matching major version number when searching for newer packages. Requires the '--outdated' option.</source>
<target state="translated">Daha yeni paketler aranrken yalnzca eleen birincil srm numarasna sahip paketleri gz nnde bulundurun. '--outdated' seeneini gerektirir.</target>
<note />
</trans-unit>
<trans-unit id="CmdHighestPatchDescription">
<source>Consider only the packages with a matching major and minor version numbers when searching for newer packages. Requires the '--outdated' option.</source>
<target state="translated">Daha yeni paketler aranrken yalnzca eleen birincil ve ikincil srm numaralarna sahip paketleri deerlendirin. '--outdated' seeneini gerektirir.</target>
<note />
</trans-unit>
<trans-unit id="CmdPrereleaseDescription">
<source>Consider packages with prerelease versions when searching for newer packages. Requires the '--outdated' option.</source>
<target state="translated">Daha yeni paketleri ararken yayn ncesi srmlere sahip olan paketleri gz nnde bulundurun. '--outdated' seeneini gerektirir.</target>
<note />
</trans-unit>
<trans-unit id="CmdSource">
<source>SOURCE</source>
<target state="translated">SOURCE</target>
<note />
</trans-unit>
<trans-unit id="CmdSourceDescription">
<source>The NuGet sources to use when searching for newer packages. Requires the '--outdated', '--deprecated' or '--vulnerable' option.</source>
<target state="translated">Daha yeni paketler aranrken kullanlacak NuGet kaynaklar. '--outdated', '--deprecated' veya '--vulnerable' seeneini gerektirir.</target>
<note />
</trans-unit>
<trans-unit id="FileNotFound">
<source>Could not find file or directory '{0}'.</source>
<target state="translated">'{0}' dosyas veya dizini bulunamad.</target>
<note />
</trans-unit>
<trans-unit id="OptionsCannotBeCombined">
<source>Options '--outdated', '--deprecated' and '--vulnerable' cannot be combined.</source>
<target state="translated">'--outdated', '--deprecated' ve '--vulnerable' seenekleri birletirilemez.</target>
<note />
</trans-unit>
</body>
</file>
</xliff>
``` | /content/code_sandbox/src/Cli/dotnet/commands/dotnet-list/dotnet-list-package/xlf/LocalizableStrings.tr.xlf | xml | 2016-07-22T21:26:02 | 2024-08-16T17:23:58 | sdk | dotnet/sdk | 2,627 | 1,551 |
```xml
import React from 'react';
import { HeaderCell } from './HeaderCell';
import { Row } from './Row';
import { TableHead } from './TableHead';
import { TextAlign } from './types';
type TableHeadersProps = {
headers: string[];
headersAlign?: TextAlign[];
};
export const TableHeaders = ({ headers, headersAlign = [] }: TableHeadersProps) => (
<TableHead>
<Row>
{headers.map((header, i) => (
<HeaderCell key={`table-header-${i}`} align={headersAlign[i]}>
{header}
</HeaderCell>
))}
</Row>
</TableHead>
);
``` | /content/code_sandbox/docs/ui/components/Table/TableHeaders.tsx | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 138 |
```xml
declare interface ITinymceEditorWebPartStrings {
PropertyPaneDescription: string;
BasicGroupName: string;
DescriptionFieldLabel: string;
AppLocalEnvironmentSharePoint: string;
AppLocalEnvironmentTeams: string;
AppLocalEnvironmentOffice: string;
AppLocalEnvironmentOutlook: string;
AppSharePointEnvironment: string;
AppTeamsTabEnvironment: string;
AppOfficeEnvironment: string;
AppOutlookEnvironment: string;
}
declare module 'TinymceEditorWebPartStrings' {
const strings: ITinymceEditorWebPartStrings;
export = strings;
}
``` | /content/code_sandbox/samples/react-sp-tinymce/src/webparts/tinymceEditor/loc/mystrings.d.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 127 |
```xml
export type AutoUpdateMechanism = 'Webhook' | 'Interval';
export { type RelativePathModel } from './RelativePathFieldset/types';
export interface AutoUpdateResponse {
/* Auto update interval */
Interval: string;
/* A UUID generated from client */
Webhook: string;
/* Force update ignores repo changes */
ForceUpdate: boolean;
/* Pull latest image */
ForcePullImage: boolean;
}
export interface GitAuthenticationResponse {
Username?: string;
Password?: string;
GitCredentialID?: number;
}
export interface RepoConfigResponse {
URL: string;
ReferenceName: string;
ConfigFilePath: string;
Authentication?: GitAuthenticationResponse;
ConfigHash: string;
TLSSkipVerify: boolean;
}
export type AutoUpdateModel = {
RepositoryAutomaticUpdates: boolean;
RepositoryMechanism: AutoUpdateMechanism;
RepositoryFetchInterval: string;
ForcePullImage: boolean;
RepositoryAutomaticUpdatesForce: boolean;
};
export type GitCredentialsModel = {
RepositoryAuthentication?: boolean;
RepositoryUsername?: string;
RepositoryPassword?: string;
RepositoryGitCredentialID?: number;
};
export type GitNewCredentialModel = {
NewCredentialName?: string;
SaveCredential?: boolean;
};
export type GitAuthModel = GitCredentialsModel & GitNewCredentialModel;
export type DeployMethod = 'compose' | 'manifest';
export interface GitFormModel extends GitAuthModel {
RepositoryURL: string;
RepositoryURLValid?: boolean;
ComposeFilePathInRepository: string;
RepositoryReferenceName?: string;
AdditionalFiles?: string[];
TLSSkipVerify?: boolean;
/**
* Auto update
*
* if undefined, GitForm won't show the AutoUpdate fieldset
*/
AutoUpdate?: AutoUpdateModel;
}
export function toGitFormModel(
response?: RepoConfigResponse,
autoUpdate?: AutoUpdateModel
): GitFormModel {
if (!response) {
return {
RepositoryURL: '',
ComposeFilePathInRepository: '',
RepositoryAuthentication: false,
TLSSkipVerify: false,
AutoUpdate: autoUpdate,
};
}
const { URL, ReferenceName, ConfigFilePath, Authentication, TLSSkipVerify } =
response;
return {
RepositoryURL: URL,
ComposeFilePathInRepository: ConfigFilePath,
RepositoryReferenceName: ReferenceName,
RepositoryAuthentication: !!(
Authentication &&
(Authentication?.GitCredentialID || Authentication?.Username)
),
RepositoryUsername: Authentication?.Username,
RepositoryPassword: Authentication?.Password,
RepositoryGitCredentialID: Authentication?.GitCredentialID,
TLSSkipVerify,
AutoUpdate: autoUpdate,
};
}
``` | /content/code_sandbox/app/react/portainer/gitops/types.ts | xml | 2016-05-19T20:15:28 | 2024-08-16T19:15:14 | portainer | portainer/portainer | 30,083 | 568 |
```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>Label</key>
<string>com.macports.zeek</string>
<key>Username</key>
<string>root</string>
<key>ProgramArguments</key>
<array>
<string>%%PREFIX%%/bin/zeekctl</string>
<string>cron</string>
</array>
<key>StartInterval</key>
<!-- default 1 day -->
<integer>86400</integer>
</dict>
</plist>
``` | /content/code_sandbox/net/zeek/files/org.macports.zeek.plist | xml | 2016-10-09T00:31:44 | 2024-08-16T18:11:47 | macports-ports | macports/macports-ports | 1,499 | 156 |
```xml
<dict>
<key>CommonPeripheralDSP</key>
<array>
<dict>
<key>DeviceID</key>
<integer>0</integer>
<key>DeviceType</key>
<string>Headphone</string>
</dict>
<dict>
<key>DeviceID</key>
<integer>0</integer>
<key>DeviceType</key>
<string>Microphone</string>
</dict>
</array>
<key>PathMaps</key>
<array>
<dict>
<key>PathMap</key>
<array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<true/>
</dict>
<key>NodeID</key>
<integer>8</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>35</integer>
</dict>
<dict>
<key>Boost</key>
<integer>2</integer>
<key>NodeID</key>
<integer>24</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>8</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>35</integer>
</dict>
<dict>
<key>Boost</key>
<integer>2</integer>
<key>NodeID</key>
<integer>25</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<true/>
</dict>
<key>NodeID</key>
<integer>9</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>34</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>26</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>NodeID</key>
<integer>20</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>12</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>2</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>NodeID</key>
<integer>27</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>38</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>37</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>NodeID</key>
<integer>21</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>13</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>3</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>NodeID</key>
<integer>22</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>14</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>4</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>NodeID</key>
<integer>30</integer>
</dict>
<dict>
<key>NodeID</key>
<integer>6</integer>
</dict>
</array>
</array>
</array>
</array>
<key>PathMapID</key>
<integer>18</integer>
</dict>
</array>
</dict>
``` | /content/code_sandbox/Resources/ALC892/Platforms18.xml | xml | 2016-03-07T20:45:58 | 2024-08-14T08:57:03 | AppleALC | acidanthera/AppleALC | 3,420 | 3,266 |
```xml
/*
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated, or distributed except according to the terms contained in the
* LICENSE file.
*
* Removal or modification of this copyright notice is prohibited.
*
*/
import { BaseIPCClientCommand } from '../base_ipc_client';
export abstract class InfoCommand extends BaseIPCClientCommand {
static description = 'Get node information from a running application.';
static examples = ['system:node-info', 'system:node-info --data-path ./lisk'];
static flags = {
...BaseIPCClientCommand.flags,
};
async run(): Promise<void> {
if (!this._client) {
this.error('APIClient is not initialized.');
}
try {
const nodeInfo = await this._client.node.getNodeInfo();
this.printJSON(nodeInfo as unknown as Record<string, unknown>);
} catch (errors) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
const errorMessage = Array.isArray(errors)
? errors.map(err => (err as Error).message).join(',')
: errors;
this.error(errorMessage as string);
}
}
}
``` | /content/code_sandbox/commander/src/bootstrapping/commands/system/node-info.ts | xml | 2016-02-01T21:45:35 | 2024-08-15T19:16:48 | lisk-sdk | LiskArchive/lisk-sdk | 2,721 | 284 |
```xml
import * as React from 'react';
import { makeStyles, mergeClasses } from '@griffel/react';
import { tokens } from '@fluentui/react-components';
import { Form } from './Form';
export interface SidebarProps {
className?: string;
}
const useStyles = makeStyles({
root: {
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'flex-start',
borderRight: `1px solid ${tokens.colorNeutralStroke1}`,
gap: `${tokens.spacingVerticalXXL} ${tokens.spacingHorizontalXXL}`,
backgroundColor: tokens.colorNeutralBackground3,
},
});
export const Sidebar: React.FC<SidebarProps> = props => {
const styles = useStyles();
return (
<div className={mergeClasses(styles.root, props.className)}>
<Form />
</div>
);
};
``` | /content/code_sandbox/packages/react-components/theme-designer/src/components/Sidebar/Sidebar.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 179 |
```xml
import vtkCompositeCameraManipulator, {
ICompositeCameraManipulatorInitialValues,
} from '../CompositeCameraManipulator';
import vtkCompositeMouseManipulator, {
ICompositeMouseManipulatorInitialValues,
} from '../CompositeMouseManipulator';
import { vtkObject } from '../../../interfaces';
export interface vtkMouseCameraTrackballZoomManipulator
extends vtkObject,
vtkCompositeCameraManipulator,
vtkCompositeMouseManipulator {
/**
* Sets whether to flip the zoom direction.
* @param flip
*/
setFlipDirection(flip: boolean): boolean;
/**
* Gets the flip direction.
*/
getFlipDirection(): boolean;
}
export interface IMouseCameraTrackballZoomManipulatorInitialValues
extends ICompositeCameraManipulatorInitialValues,
ICompositeMouseManipulatorInitialValues {
flipDirection?: boolean;
}
export function newInstance(
initialValues?: IMouseCameraTrackballZoomManipulatorInitialValues
): vtkMouseCameraTrackballZoomManipulator;
export function extend(
publicAPI: object,
model: object,
initialValues?: IMouseCameraTrackballZoomManipulatorInitialValues
): void;
export const vtkMouseCameraTrackballZoomManipulator: {
newInstance: typeof newInstance;
extend: typeof extend;
};
export default vtkMouseCameraTrackballZoomManipulator;
``` | /content/code_sandbox/Sources/Interaction/Manipulators/MouseCameraTrackballZoomManipulator/index.d.ts | xml | 2016-05-02T15:44:11 | 2024-08-15T19:53:44 | vtk-js | Kitware/vtk-js | 1,200 | 275 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="path_to_url">
<solid android:color="@color/color_schedule_blue"/>
<corners
android:bottomLeftRadius="@dimen/schedule_radius_size"
android:topLeftRadius="@dimen/schedule_radius_size"/>
</shape>
``` | /content/code_sandbox/app/src/main/res/drawable/blue_schedule_left_block.xml | xml | 2016-10-08T07:10:11 | 2024-08-14T08:22:32 | Calendar | xiaojianglaile/Calendar | 1,293 | 73 |
```xml
angular
.module('index')
.controller('ClusterRoutesCtl', ClusterRoutesCtl);
ClusterRoutesCtl.$inject = ['$scope', '$stateParams', 'ClusterService', 'toastr', 'AppUtil', 'ClusterType'];
function ClusterRoutesCtl($scope, $stateParams, ClusterService, toastr, AppUtil, ClusterType) {
$scope.clusterName = $stateParams.clusterName;
$scope.currentDcName = $stateParams.dcName;
$scope.dcs;
$scope.designatedRoutes=[];
$scope.usedRoutes=[];
$scope.defaultRoutes=[];
$scope.switchDc = switchDc;
$scope.loadDcClusterRoutes = loadDcClusterRoutes;
$scope.clusterTypes = ClusterType.selectData()
$scope.getTypeName = getTypeName;
if ($scope.clusterName) {
loadClusterRoutes();
}
function switchDc(dc) {
$scope.currentDcName = dc.dcName;
loadDcClusterRoutes($scope.currentDcName, $scope.clusterName);
}
function getTypeName(type) {
if (null == type || "" == type) return ""
var clusterType = ClusterType.lookup(type)
if (clusterType) return clusterType.name
else return ''
}
function loadClusterRoutes() {
ClusterService.findClusterDCs($scope.clusterName)
.then(function (result) {
$scope.dcs = result;
if($scope.currentDcName == 'true')
$scope.currentDcName = $scope.dcs[0].dcName;
loadDcClusterRoutes($scope.currentDcName, $scope.clusterName);
}, function (result) {
toastr.error(AppUtil.errorMsg(result));
});
}
function loadDcClusterRoutes(srcDcName, clusterName) {
ClusterService.getClusterDesignatedRoutesBySrcDcNameAndClusterName(srcDcName, clusterName)
.then(function (result) {
$scope.designatedRoutes = result;
}, function (result) {
toastr.error(AppUtil.errorMsg(result));
});
ClusterService.getClusterUsedRoutesBySrcDcNameAndClusterName(srcDcName, clusterName)
.then(function (result) {
$scope.usedRoutes = result;
}, function (result) {
toastr.error(AppUtil.errorMsg(result));
});
ClusterService.getClusterDefaultRoutesBySrcDcNameAndClusterName(srcDcName, clusterName)
.then(function (result) {
$scope.defaultRoutes = result;
}, function (result) {
toastr.error(AppUtil.errorMsg(result));
});
}
}
``` | /content/code_sandbox/redis/redis-console/src/main/resources/static/scripts/controllers/ClusterRoutesCtl.ts | xml | 2016-03-29T12:22:36 | 2024-08-12T11:25:42 | x-pipe | ctripcorp/x-pipe | 1,977 | 564 |
```xml
import * as React from 'react';
import { connect } from 'react-redux';
import { LIGHT_MODE_TRANSPARENT } from '../ImageEditor';
import { ImageEditorStore, TilemapState, TileCategory } from '../store/imageReducer';
export interface MinimapProps {
colors: string[];
tileset: pxt.TileSet;
tilemap: pxt.sprite.ImageState;
lightMode: boolean;
}
const SCALE = pxt.BrowserUtils.isEdge() ? 25 : 1;
class MinimapImpl extends React.Component<MinimapProps, {}> {
protected tileColors: string[] = [];
protected canvas: HTMLCanvasElement;
componentDidMount() {
this.canvas = this.refs["minimap-canvas"] as HTMLCanvasElement;
this.redrawCanvas();
}
componentDidUpdate() {
this.redrawCanvas();
}
render() {
return <div className="minimap-outer">
<canvas ref="minimap-canvas" className="paint-surface" />
</div>
}
redrawCanvas() {
const { tilemap, lightMode } = this.props;
let { bitmap, floating, layerOffsetX, layerOffsetY } = tilemap;
const context = this.canvas.getContext("2d");
const image = pxt.sprite.Tilemap.fromData(bitmap);
const floatingImage = floating && floating.bitmap ? pxt.sprite.Tilemap.fromData(floating.bitmap) : null;
this.canvas.width = image.width * SCALE;
this.canvas.height = image.height * SCALE;
this.tileColors = [];
for (let x = 0; x < image.width; x++) {
for (let y = 0; y < image.height; y++) {
const float = floatingImage ? floatingImage.get(x - layerOffsetX, y - layerOffsetY) : null;
const index = image.get(x, y);
if (float) {
context.fillStyle = this.getColor(float);
context.fillRect(x * SCALE, y * SCALE, SCALE, SCALE);
} else if (index) {
context.fillStyle = this.getColor(index);
context.fillRect(x * SCALE, y * SCALE, SCALE, SCALE);
}
else if (lightMode) {
context.fillStyle = LIGHT_MODE_TRANSPARENT;
context.fillRect(x * SCALE, y * SCALE, SCALE, SCALE);
} else {
context.clearRect(x * SCALE, y * SCALE, SCALE, SCALE);
}
}
}
}
protected getColor(index: number) {
if (!this.tileColors[index]) {
const { tileset, colors } = this.props;
if (index >= tileset.tiles.length) {
return "#ffffff";
}
const bitmap = pxt.sprite.Bitmap.fromData(tileset.tiles[index].bitmap);
this.tileColors[index] = pxt.sprite.computeAverageColor(bitmap, colors);
}
return this.tileColors[index];
}
}
function mapStateToProps({ store: { present }, editor }: ImageEditorStore, ownProps: any) {
let state = (present as TilemapState);
if (!state) return {};
return {
tilemap: state.tilemap,
tileset: state.tileset,
colors: state.colors
};
}
const mapDispatchToProps = {
};
export const Minimap = connect(mapStateToProps, mapDispatchToProps)(MinimapImpl);
``` | /content/code_sandbox/webapp/src/components/ImageEditor/tilemap/Minimap.tsx | xml | 2016-01-24T19:35:52 | 2024-08-16T16:39:39 | pxt | microsoft/pxt | 2,069 | 694 |
```xml
/*
*
* This source code is licensed under the MIT license which is detailed in the LICENSE.txt file.
*/
import * as fs from "node:fs";
import * as _ from "lodash-es";
import * as path from "node:path";
import { getLogger, log } from "extraterm-logging";
import { DebouncedDoLater } from "extraterm-timeoutqt";
import { ConfigChangeEvent, ConfigDatabase, ConfigKey } from "./ConfigDatabase.js";
import * as SharedMap from "../shared_map/SharedMap.js";
import { COMMAND_LINE_ACTIONS_CONFIG, GENERAL_CONFIG, SESSION_CONFIG, UserStoredConfig } from "./Config.js";
const MAIN_CONFIG = "extraterm.json";
const EXTENSION_CONFIG_DIR = "extension_config";
/**
* Config database which also loads and stores some config information on disk.
*/
export class PersistentConfigDatabase extends ConfigDatabase {
#configDirectory: string;
#writeExtensionConfig: DebouncedDoLater = null;
#queuedWriteExtensionConfig = new Set<string>();
constructor(configDirectory: string, sharedMap: SharedMap.SharedMap) {
super(sharedMap);
this._log = getLogger("PersistentConfigDatabase", this);
this.#configDirectory = configDirectory;
this.#writeExtensionConfig = new DebouncedDoLater(this._writeQueuedExtensionConfigs.bind(this), 250);
}
start(): void {
this._setUpDirectory();
this._loadApplicationConfigs();
this._loadExtensionConfigs();
this.onExtensionChange((e: ConfigChangeEvent) => {
this._queueWriteExtensionConfig(e.key);
});
super.start();
}
protected setConfig(key: ConfigKey, newConfig: any): void {
super.setConfig(key, newConfig);
if ([GENERAL_CONFIG, COMMAND_LINE_ACTIONS_CONFIG, SESSION_CONFIG].indexOf(key) !== -1) {
this._writeUserConfigFile();
}
}
private _setUpDirectory(): void {
const extConfigPath = this._getExtensionConfigDirectory();
if ( ! fs.existsSync(extConfigPath)) {
fs.mkdirSync(extConfigPath);
}
}
private _loadApplicationConfigs(): void {
const userConfig = this._readUserConfigFile();
const commandLineActions = userConfig.commandLineActions ?? [];
const sessions = userConfig.sessions ?? [];
userConfig.commandLineActions = null;
userConfig.sessions = null;
super.setConfig(GENERAL_CONFIG, userConfig);
super.setConfig(COMMAND_LINE_ACTIONS_CONFIG, commandLineActions);
super.setConfig(SESSION_CONFIG, sessions);
}
private _readUserConfigFile(): UserStoredConfig {
const filename = this._getUserConfigFilename();
let config: UserStoredConfig = { };
if (fs.existsSync(filename)) {
this._log.info("Reading user configuration from " + filename);
const configJson = fs.readFileSync(filename, {encoding: "utf8"});
try {
config = <UserStoredConfig>JSON.parse(configJson);
} catch(ex) {
this._log.warn("Unable to read " + filename, ex);
}
} else {
this._log.info("Couldn't find user configuration file at " + filename);
}
return config;
}
private _getUserConfigFilename(): string {
return path.join(this.#configDirectory, MAIN_CONFIG);
}
private _writeUserConfigFile(): void {
const cleanConfig = <UserStoredConfig> this.getConfigCopy(GENERAL_CONFIG);
cleanConfig.commandLineActions = this.getConfig(COMMAND_LINE_ACTIONS_CONFIG);
cleanConfig.sessions = this.getConfig(SESSION_CONFIG);
const formattedConfig = JSON.stringify(cleanConfig, null, " ");
fs.writeFileSync(this._getUserConfigFilename(), formattedConfig);
}
private _getExtensionConfigDirectory(): string {
return path.join(this.#configDirectory, EXTENSION_CONFIG_DIR);
}
private _loadExtensionConfigs(): void {
const extConfigDirectory = this._getExtensionConfigDirectory();
for (const filename of fs.readdirSync(extConfigDirectory)) {
if (filename.endsWith(".json")) {
const extensionName = filename.slice(0, -5);
const configJson = fs.readFileSync(path.join(extConfigDirectory, filename), {encoding: "utf8"});
try {
const config = JSON.parse(configJson);
super.setExtensionConfig(extensionName, config);
} catch(ex) {
this._log.warn("Unable to read " + filename, ex);
}
}
}
}
private _queueWriteExtensionConfig(extensionName: string): void {
this.#queuedWriteExtensionConfig.add(extensionName);
this.#writeExtensionConfig.trigger();
}
private _writeQueuedExtensionConfigs(): void {
for (const extensionName of this.#queuedWriteExtensionConfig) {
this._writeExtensionConfig(extensionName, this.getExtensionConfig(extensionName));
}
this.#queuedWriteExtensionConfig.clear();
}
private _writeExtensionConfig(extensionName: string, config: any): void {
const formattedConfig = JSON.stringify(config, null, " ");
const extConfigFilename = path.join(this._getExtensionConfigDirectory(), `${extensionName}.json`);
fs.writeFileSync(extConfigFilename, formattedConfig);
}
}
``` | /content/code_sandbox/main/src/config/PersistentConfigDatabase.ts | xml | 2016-03-04T12:39:59 | 2024-08-16T18:44:37 | extraterm | sedwards2009/extraterm | 2,501 | 1,088 |
```xml
<resources>
<string name="app_name">Visualize</string>
<!-- COMPLETED (4) Add string for Settings -->
<string name="action_settings">Settings</string>
<!-- - - - - - - - - - - - - - - -
- Used by Preferences -
- - - - - - - - - - - - - - - -->
<!-- Value in SharedPreferences for red color option -->
<string name="pref_color_red_value" translatable="false">red</string>
<!-- Value in SharedPreferences for blue color option -->
<string name="pref_color_blue_value" translatable="false">blue</string>
<!-- Value in SharedPreferences for green color option -->
<string name="pref_color_green_value" translatable="false">green</string>
</resources>
``` | /content/code_sandbox/Lesson06-Visualizer-Preferences/T06.01-Solution-SetupTheActivity/app/src/main/res/values/strings.xml | xml | 2016-11-02T04:41:25 | 2024-08-12T19:38:05 | ud851-Exercises | udacity/ud851-Exercises | 2,039 | 172 |
```xml
import "reflect-metadata"
import {
closeTestingConnections,
createTestingConnections,
reloadTestingDatabases,
} from "../../utils/test-utils"
import { DataSource } from "../../../src"
import { Post } from "./entity/Post"
import { expect } from "chai"
import { EntityPropertyNotFoundError } from "../../../src/error/EntityPropertyNotFoundError"
describe("other issues > preventing-injection", () => {
let connections: DataSource[]
before(
async () =>
(connections = await createTestingConnections({
entities: [__dirname + "/entity/*{.js,.ts}"],
})),
)
beforeEach(() => reloadTestingDatabases(connections))
after(() => closeTestingConnections(connections))
it("should not allow selection of non-exist columns via FindOptions", () =>
Promise.all(
connections.map(async function (connection) {
const post = new Post()
post.title = "hello"
await connection.manager.save(post)
const postWithOnlyIdSelected = await connection.manager.find(
Post,
{
select: { id: true },
},
)
postWithOnlyIdSelected.should.be.eql([{ id: 1 }])
await connection.manager.find(Post, {
select: "(WHERE LIMIT 1)" as any,
}).should.be.rejected
}),
))
it("should throw error for non-exist columns in where expression via FindOptions", () =>
Promise.all(
connections.map(async function (connection) {
const post = new Post()
post.title = "hello"
await connection.manager.save(post)
const postWithOnlyIdSelected = await connection.manager.find(
Post,
{
where: {
title: "hello",
},
},
)
postWithOnlyIdSelected.should.be.eql([
{ id: 1, title: "hello" },
])
let error: Error | undefined
try {
await connection.manager.find(Post, {
where: {
id: 2,
["(WHERE LIMIT 1)"]: "hello",
} as any,
})
} catch (err) {
error = err
}
expect(error).to.be.an.instanceof(EntityPropertyNotFoundError)
}),
))
it("should not allow selection of non-exist columns via FindOptions", () =>
Promise.all(
connections.map(async function (connection) {
const post = new Post()
post.title = "hello"
await connection.manager.save(post)
const loadedPosts = await connection.manager.find(Post, {
order: {
title: "DESC",
},
})
loadedPosts.should.be.eql([{ id: 1, title: "hello" }])
await connection.manager.find(Post, {
order: {
["(WHERE LIMIT 1)" as any]: "DESC",
},
}).should.be.rejected
}),
))
it("should not allow non-numeric values in skip and take via FindOptions", () =>
Promise.all(
connections.map(async function (connection) {
await connection.manager.find(Post, {
take: "(WHERE XXX)" as any,
}).should.be.rejected
await connection.manager.find(Post, {
skip: "(WHERE LIMIT 1)" as any,
take: "(WHERE XXX)" as any,
}).should.be.rejected
}),
))
it("should not allow non-numeric values in skip and take in QueryBuilder", () =>
Promise.all(
connections.map(async function (connection) {
expect(() => {
connection.manager
.createQueryBuilder(Post, "post")
.take("(WHERE XXX)" as any)
}).to.throw(Error)
expect(() => {
connection.manager
.createQueryBuilder(Post, "post")
.skip("(WHERE LIMIT 1)" as any)
}).to.throw(Error)
}),
))
it("should not allow non-allowed values in order by in QueryBuilder", () =>
Promise.all(
connections.map(async function (connection) {
expect(() => {
connection.manager
.createQueryBuilder(Post, "post")
.orderBy("post.id", "MIX" as any)
}).to.throw(Error)
expect(() => {
connection.manager
.createQueryBuilder(Post, "post")
.orderBy("post.id", "DESC", "SOMETHING LAST" as any)
}).to.throw(Error)
}),
))
})
``` | /content/code_sandbox/test/other-issues/preventing-injection/preventing-injection.ts | xml | 2016-02-29T07:41:14 | 2024-08-16T18:28:52 | typeorm | typeorm/typeorm | 33,875 | 926 |
```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
/**
* Copies elements to a new "generic" array after removing consecutive duplicated values.
*
* @param x - input array
* @param limit - number of allowed consecutive duplicates
* @param equalNaNs - boolean indicating whether NaNs should be considered equal
* @returns output array
*
* @example
* var x = [ 1, 1, 2, 3, 3 ];
*
* var y = dedupe( x, 1, false );
* // returns [ 1, 2, 3 ]
*
* var bool = ( x === y );
* // returns false
*
* @example
* var x = [ 1, 1, 1, 2, 1, 1, 3, 3 ];
*
* var y = dedupe( x, 2, false );
* // returns [ 1, 1, 2, 1, 1, 3, 3 ]
*
* var bool = ( x === y );
* // returns false
*/
declare function dedupe<T = unknown>( x: Array<T>, limit: number, equalNaNs: boolean ): Array<T>;
// EXPORTS //
export = dedupe;
``` | /content/code_sandbox/lib/node_modules/@stdlib/array/base/to-deduped/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 313 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="path_to_url">
<gradient
android:angle="315"
android:startColor="@color/colorCyanPrimary"
android:centerColor="@color/colorCyanPrimaryCenter"
android:endColor="@color/black" />
</shape>
``` | /content/code_sandbox/app/src/main/res/drawable/cyan_background.xml | xml | 2016-02-02T05:18:46 | 2024-08-15T02:04:44 | GanK | dongjunkun/GanK | 1,163 | 71 |
```xml
import type { ChangeEvent } from 'react';
import { c } from 'ttag';
import useLoading from '@proton/hooks/useLoading';
import { updatePromptPin } from '@proton/shared/lib/api/mailSettings';
import { DEFAULT_MAILSETTINGS } from '@proton/shared/lib/mail/mailSettings';
import { Toggle } from '../../components';
import { useApi, useEventManager, useMailSettings, useNotifications } from '../../hooks';
interface Props {
id?: string;
}
const PromptPinToggle = ({ id }: Props) => {
const { createNotification } = useNotifications();
const { call } = useEventManager();
const api = useApi();
const [loading, withLoading] = useLoading();
const [{ PromptPin } = DEFAULT_MAILSETTINGS] = useMailSettings();
const handleChange = async ({ target }: ChangeEvent<HTMLInputElement>) => {
await api(updatePromptPin(+target.checked));
await call();
createNotification({ text: c('Success').t`Preference saved` });
};
return <Toggle id={id} loading={loading} checked={!!PromptPin} onChange={(e) => withLoading(handleChange(e))} />;
};
export default PromptPinToggle;
``` | /content/code_sandbox/packages/components/containers/security/PromptPinToggle.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 249 |
```xml
import { initializeApp } from 'firebase/app';
import {
GithubAuthProvider,
connectAuthEmulator,
getAuth,
getRedirectResult,
onAuthStateChanged,
signInWithRedirect,
signOut,
} from 'firebase/auth';
import { firebaseConfig } from './config';
initializeApp(firebaseConfig);
const auth = getAuth();
if (window.location.hostname === 'localhost') {
connectAuthEmulator(auth, 'path_to_url
}
const signInButton = document.getElementById(
'quickstart-sign-in',
)! as HTMLButtonElement;
const oauthToken = document.getElementById(
'quickstart-oauthtoken',
)! as HTMLDivElement;
const signInStatus = document.getElementById(
'quickstart-sign-in-status',
)! as HTMLSpanElement;
const accountDetails = document.getElementById(
'quickstart-account-details',
)! as HTMLDivElement;
/**
* Function called when clicking the Login/Logout button.
*/
function toggleSignIn() {
if (!auth.currentUser) {
const provider = new GithubAuthProvider();
provider.addScope('repo');
signInWithRedirect(auth, provider);
} else {
signOut(auth);
}
signInButton.disabled = true;
}
// Result from Redirect auth flow.
getRedirectResult(auth)
.then(function (result) {
if (!result) return;
const credential = GithubAuthProvider.credentialFromResult(result);
if (credential) {
// This gives you a GitHub Access Token. You can use it to access the GitHub API.
const token = credential.accessToken;
oauthToken.textContent = token ?? '';
} else {
oauthToken.textContent = 'null';
}
// The signed-in user info.
const user = result.user;
})
.catch(function (error) {
// Handle Errors here.
const errorCode = error.code;
const errorMessage = error.message;
// The email of the user's account used.
const email = error.email;
// The firebase.auth.AuthCredential type that was used.
const credential = error.credential;
if (errorCode === 'auth/account-exists-with-different-credential') {
alert(
'You have already signed up with a different auth provider for that email.',
);
// If you are using multiple auth providers on your app you should handle linking
// the user's accounts here.
} else {
console.error(error);
}
});
// Listening for auth state changes.
onAuthStateChanged(auth, function (user) {
if (user) {
// User is signed in.
const displayName = user.displayName;
const email = user.email;
const emailVerified = user.emailVerified;
const photoURL = user.photoURL;
const isAnonymous = user.isAnonymous;
const uid = user.uid;
const providerData = user.providerData;
signInStatus.textContent = 'Signed in';
signInButton.textContent = 'Sign out';
accountDetails.textContent = JSON.stringify(user, null, ' ');
} else {
// User is signed out.
signInStatus.textContent = 'Signed out';
signInButton.textContent = 'Sign in with GitHub';
accountDetails.textContent = 'null';
oauthToken.textContent = 'null';
}
signInButton.disabled = false;
});
signInButton.addEventListener('click', toggleSignIn, false);
``` | /content/code_sandbox/auth/github-redirect.ts | xml | 2016-04-26T17:13:48 | 2024-08-16T13:54:58 | quickstart-js | firebase/quickstart-js | 5,069 | 684 |
```xml
<vector xmlns:android="path_to_url"
android:width="240dp"
android:height="160dp"
android:viewportWidth="72"
android:viewportHeight="48">
<path
android:pathData="M0,0h72v48h-72z"
android:fillColor="#009e60"/>
<path
android:pathData="M0,0h54v48h-54z"
android:fillColor="#fcd116"/>
<path
android:pathData="M0,0h18v48h-18z"
android:fillColor="#0072c6"/>
<path
android:pathData="m32,34 l4,8 4,-8 -4,-8z"
android:fillColor="#009e60"/>
<path
android:pathData="m27,24 l4,8 4,-8 -4,-8z"
android:fillColor="#009e60"/>
<path
android:pathData="m37,24 l4,8 4,-8 -4,-8z"
android:fillColor="#009e60"/>
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable/ic_flag_vc.xml | xml | 2016-07-02T10:44:04 | 2024-08-16T18:55:54 | StreetComplete | streetcomplete/StreetComplete | 3,781 | 253 |
```xml
/* eslint-disable import/no-commonjs */
import * as React from 'react';
import {
Animated,
View,
Image,
Text,
StyleSheet,
ImageRequireSource,
} from 'react-native';
import { TabView, SceneRendererProps } from 'react-native-tab-view';
type Route = {
key: string;
};
type Props = SceneRendererProps & {
index: number;
length: number;
route: Route;
};
const ALBUMS: { [key: string]: ImageRequireSource } = {
'Abbey Road': require('../assets/album-art-1.jpg'),
'Bat Out of Hell': require('../assets/album-art-2.jpg'),
'Homogenic': require('../assets/album-art-3.jpg'),
'Number of the Beast': require('../assets/album-art-4.jpg'),
"It's Blitz": require('../assets/album-art-5.jpg'),
'The Man-Machine': require('../assets/album-art-6.jpg'),
'The Score': require('../assets/album-art-7.jpg'),
'Lost Horizons': require('../assets/album-art-8.jpg'),
};
const Scene = ({ route, position, layout, index, length }: Props) => {
const coverflowStyle: any = React.useMemo(() => {
const { width } = layout;
const inputRange = Array.from({ length }, (_, i) => i);
const translateOutputRange = inputRange.map((i) => {
return (width / 2) * (index - i) * -1;
});
const scaleOutputRange = inputRange.map((i) => {
if (index === i) {
return 1;
} else {
return 0.7;
}
});
const opacityOutputRange = inputRange.map((i) => {
if (index === i) {
return 1;
} else {
return 0.3;
}
});
const translateX = position.interpolate({
inputRange,
outputRange: translateOutputRange,
extrapolate: 'clamp',
});
const scale = position.interpolate({
inputRange,
outputRange: scaleOutputRange,
extrapolate: 'clamp',
});
const opacity = position.interpolate({
inputRange,
outputRange: opacityOutputRange,
extrapolate: 'clamp',
});
return {
transform: [{ translateX }, { scale }],
opacity,
};
}, [index, layout, length, position]);
return (
<Animated.View style={[styles.page, coverflowStyle]}>
<View style={styles.album}>
<Image source={ALBUMS[route.key]} style={styles.cover} />
</View>
<Text style={styles.label}>{route.key}</Text>
</Animated.View>
);
};
export default function CoverflowExample() {
const [index, onIndexChange] = React.useState(2);
const [routes] = React.useState(Object.keys(ALBUMS).map((key) => ({ key })));
return (
<TabView
style={styles.container}
sceneContainerStyle={styles.scene}
offscreenPageLimit={3}
navigationState={{
index,
routes,
}}
onIndexChange={onIndexChange}
renderTabBar={() => null}
renderScene={(props: SceneRendererProps & { route: Route }) => (
<Scene
{...props}
index={routes.indexOf(props.route)}
length={routes.length}
/>
)}
/>
);
}
CoverflowExample.title = 'Coverflow';
CoverflowExample.backgroundColor = '#000';
CoverflowExample.appbarElevation = 0;
const styles = StyleSheet.create({
container: {
backgroundColor: '#000',
},
scene: {
overflow: 'visible',
},
page: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
album: {
backgroundColor: '#000',
width: 200,
height: 200,
elevation: 12,
shadowColor: '#000000',
shadowOpacity: 0.5,
shadowRadius: 8,
shadowOffset: {
height: 8,
width: 0,
},
},
cover: {
width: 200,
height: 200,
},
label: {
margin: 16,
color: '#fff',
},
});
``` | /content/code_sandbox/example/src/CoverflowExample.tsx | xml | 2016-06-15T21:38:19 | 2024-08-14T13:07:59 | react-native-tab-view | satya164/react-native-tab-view | 5,135 | 942 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="path_to_url">
<corners android:radius="5dp" />
<solid android:color="#77000000" />
</shape>
``` | /content/code_sandbox/app/src/main/res/drawable/shape_side_bar_bg.xml | xml | 2016-09-06T10:17:59 | 2024-08-15T11:27:15 | SuspensionIndexBar | mcxtzhang/SuspensionIndexBar | 1,866 | 52 |
```xml
<!--
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<dataset>
<metadata data-nodes="expect_dataset.t_order">
<column name="order_id" type="numeric" />
<column name="user_id" type="numeric" />
<column name="status" type="varchar" />
<column name="merchant_id" type="numeric" />
<column name="remark" type="varchar" />
<column name="creation_date" type="datetime" />
</metadata>
<metadata data-nodes="expect_dataset.t_order_item">
<column name="item_id" type="numeric" />
<column name="order_id" type="numeric" />
<column name="user_id" type="numeric" />
<column name="product_id" type="numeric" />
<column name="quantity" type="numeric" />
<column name="creation_date" type="datetime" />
</metadata>
<metadata data-nodes="expect_dataset.t_user">
<column name="user_id" type="numeric" />
<column name="user_name" type="varchar" />
<column name="password" type="varchar" />
<column name="email" type="varchar" />
<column name="telephone" type="varchar" />
<column name="creation_date" type="datetime" />
</metadata>
<metadata data-nodes="expect_dataset.t_merchant">
<column name="merchant_id" type="numeric" />
<column name="country_id" type="numeric" />
<column name="merchant_name" type="varchar" />
<column name="business_code" type="varchar" />
<column name="telephone" type="varchar" />
<column name="creation_date" type="datetime" />
</metadata>
<metadata data-nodes="expect_dataset.t_product">
<column name="product_id" type="numeric" />
<column name="product_name" type="varchar" />
<column name="category_id" type="numeric" />
<column name="price" type="decimal" />
<column name="status" type="varchar" />
<column name="creation_date" type="datetime" />
</metadata>
<metadata data-nodes="expect_dataset.t_product_detail">
<column name="detail_id" type="numeric" />
<column name="product_id" type="numeric" />
<column name="description" type="varchar" />
<column name="creation_date" type="datetime" />
</metadata>
<metadata data-nodes="expect_dataset.t_product_category">
<column name="category_id" type="numeric" />
<column name="category_name" type="varchar" />
<column name="parent_id" type="numeric" />
<column name="level" type="numeric" />
<column name="creation_date" type="datetime" />
</metadata>
<metadata data-nodes="expect_dataset.t_country">
<column name="country_id" type="numeric" />
<column name="country_name" type="varchar" />
<column name="continent_name" type="varchar" />
<column name="creation_date" type="datetime" />
</metadata>
<row data-node="expect_dataset.t_order" values="1000, 10, init, 1, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1001, 10, init, 2, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1002, 10, init, 3, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1003, 10, init, 4, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1004, 10, init, 5, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1005, 10, init, 6, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1006, 10, init, 7, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1007, 10, init, 8, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1008, 10, init, 9, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1009, 10, init, 10, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1100, 11, init, 11, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1101, 11, init, 12, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1102, 11, init, 13, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1103, 11, init, 14, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1104, 11, init, 15, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1105, 11, init, 16, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1106, 11, init, 17, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1107, 11, init, 18, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1108, 11, init, 19, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1109, 11, init, 20, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1200, 12, init, 1, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1201, 12, init, 2, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1202, 12, init, 3, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1203, 12, init, 4, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1204, 12, init, 5, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1205, 12, init, 6, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1206, 12, init, 7, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1207, 12, init, 8, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1208, 12, init, 9, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1209, 12, init, 10, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1300, 13, init, 11, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1301, 13, init, 12, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1302, 13, init, 13, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1303, 13, init, 14, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1304, 13, init, 15, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1305, 13, init, 16, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1306, 13, init, 17, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1307, 13, init, 18, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1308, 13, init, 19, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1309, 13, init, 20, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1400, 14, init, 1, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1401, 14, init, 2, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1402, 14, init, 3, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1403, 14, init, 4, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1404, 14, init, 5, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1405, 14, init, 6, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1406, 14, init, 7, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1407, 14, init, 8, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1408, 14, init, 9, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1409, 14, init, 10, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1500, 15, init, 11, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1501, 15, init, 12, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1502, 15, init, 13, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1503, 15, init, 14, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1504, 15, init, 15, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1505, 15, init, 16, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1506, 15, init, 17, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1507, 15, init, 18, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1508, 15, init, 19, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1509, 15, init, 20, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1600, 16, init, 1, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1601, 16, init, 2, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1602, 16, init, 3, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1603, 16, init, 4, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1604, 16, init, 5, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1605, 16, init, 6, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1606, 16, init, 7, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1607, 16, init, 8, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1608, 16, init, 9, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1609, 16, init, 10, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1700, 17, init, 11, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1701, 17, init, 12, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1702, 17, init, 13, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1703, 17, init, 14, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1704, 17, init, 15, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1705, 17, init, 16, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1706, 17, init, 17, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1707, 17, init, 18, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1708, 17, init, 19, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1709, 17, init, 20, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1800, 18, init, 1, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1801, 18, init, 2, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1802, 18, init, 3, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1803, 18, init, 4, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1804, 18, init, 5, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1805, 18, init, 6, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1806, 18, init, 7, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1807, 18, init, 8, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1808, 18, init, 9, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1809, 18, init, 10, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1900, 19, init, 11, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1901, 19, init, 12, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1902, 19, init, 13, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1903, 19, init, 14, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1904, 19, init, 15, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1905, 19, init, 16, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1906, 19, init, 17, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1907, 19, init, 18, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1908, 19, init, 19, test, 2017-08-08" />
<row data-node="expect_dataset.t_order" values="1909, 19, init, 20, test, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100000, 1000, 10, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100001, 1000, 10, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100100, 1001, 10, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100101, 1001, 10, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100200, 1002, 10, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100201, 1002, 10, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100300, 1003, 10, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100301, 1003, 10, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100400, 1004, 10, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100401, 1004, 10, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100500, 1005, 10, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100501, 1005, 10, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100600, 1006, 10, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100601, 1006, 10, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100700, 1007, 10, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100701, 1007, 10, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100800, 1008, 10, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100801, 1008, 10, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100900, 1009, 10, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="100901, 1009, 10, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110000, 1100, 11, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110001, 1100, 11, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110100, 1101, 11, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110101, 1101, 11, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110200, 1102, 11, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110201, 1102, 11, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110300, 1103, 11, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110301, 1103, 11, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110400, 1104, 11, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110401, 1104, 11, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110500, 1105, 11, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110501, 1105, 11, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110600, 1106, 11, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110601, 1106, 11, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110700, 1107, 11, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110701, 1107, 11, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110800, 1108, 11, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110801, 1108, 11, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110900, 1109, 11, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="110901, 1109, 11, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120000, 1200, 12, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120001, 1200, 12, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120100, 1201, 12, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120101, 1201, 12, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120200, 1202, 12, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120201, 1202, 12, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120300, 1203, 12, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120301, 1203, 12, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120400, 1204, 12, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120401, 1204, 12, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120500, 1205, 12, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120501, 1205, 12, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120600, 1206, 12, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120601, 1206, 12, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120700, 1207, 12, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120701, 1207, 12, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120800, 1208, 12, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120801, 1208, 12, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120900, 1209, 12, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="120901, 1209, 12, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130000, 1300, 13, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130001, 1300, 13, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130100, 1301, 13, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130101, 1301, 13, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130200, 1302, 13, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130201, 1302, 13, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130300, 1303, 13, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130301, 1303, 13, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130400, 1304, 13, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130401, 1304, 13, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130500, 1305, 13, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130501, 1305, 13, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130600, 1306, 13, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130601, 1306, 13, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130700, 1307, 13, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130701, 1307, 13, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130800, 1308, 13, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130801, 1308, 13, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130900, 1309, 13, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="130901, 1309, 13, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140000, 1400, 14, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140001, 1400, 14, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140100, 1401, 14, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140101, 1401, 14, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140200, 1402, 14, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140201, 1402, 14, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140300, 1403, 14, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140301, 1403, 14, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140400, 1404, 14, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140401, 1404, 14, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140500, 1405, 14, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140501, 1405, 14, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140600, 1406, 14, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140601, 1406, 14, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140700, 1407, 14, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140701, 1407, 14, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140800, 1408, 14, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140801, 1408, 14, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140900, 1409, 14, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="140901, 1409, 14, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150000, 1500, 15, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150001, 1500, 15, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150100, 1501, 15, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150101, 1501, 15, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150200, 1502, 15, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150201, 1502, 15, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150300, 1503, 15, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150301, 1503, 15, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150400, 1504, 15, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150401, 1504, 15, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150500, 1505, 15, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150501, 1505, 15, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150600, 1506, 15, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150601, 1506, 15, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150700, 1507, 15, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150701, 1507, 15, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150800, 1508, 15, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150801, 1508, 15, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150900, 1509, 15, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="150901, 1509, 15, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160000, 1600, 16, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160001, 1600, 16, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160100, 1601, 16, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160101, 1601, 16, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160200, 1602, 16, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160201, 1602, 16, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160300, 1603, 16, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160301, 1603, 16, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160400, 1604, 16, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160401, 1604, 16, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160500, 1605, 16, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160501, 1605, 16, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160600, 1606, 16, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160601, 1606, 16, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160700, 1607, 16, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160701, 1607, 16, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160800, 1608, 16, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160801, 1608, 16, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160900, 1609, 16, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="160901, 1609, 16, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170000, 1700, 17, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170001, 1700, 17, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170100, 1701, 17, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170101, 1701, 17, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170200, 1702, 17, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170201, 1702, 17, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170300, 1703, 17, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170301, 1703, 17, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170400, 1704, 17, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170401, 1704, 17, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170500, 1705, 17, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170501, 1705, 17, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170600, 1706, 17, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170601, 1706, 17, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170700, 1707, 17, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170701, 1707, 17, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170800, 1708, 17, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170801, 1708, 17, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170900, 1709, 17, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="170901, 1709, 17, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180000, 1800, 18, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180001, 1800, 18, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180100, 1801, 18, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180101, 1801, 18, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180200, 1802, 18, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180201, 1802, 18, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180300, 1803, 18, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180301, 1803, 18, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180400, 1804, 18, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180401, 1804, 18, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180500, 1805, 18, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180501, 1805, 18, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180600, 1806, 18, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180601, 1806, 18, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180700, 1807, 18, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180701, 1807, 18, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180800, 1808, 18, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180801, 1808, 18, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180900, 1809, 18, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="180901, 1809, 18, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190000, 1900, 19, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190001, 1900, 19, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190100, 1901, 19, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190101, 1901, 19, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190200, 1902, 19, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190201, 1902, 19, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190300, 1903, 19, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190301, 1903, 19, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190400, 1904, 19, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190401, 1904, 19, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190500, 1905, 19, 1, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190501, 1905, 19, 2, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190600, 1906, 19, 3, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190601, 1906, 19, 4, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190700, 1907, 19, 5, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190701, 1907, 19, 6, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190800, 1908, 19, 7, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190801, 1908, 19, 8, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190900, 1909, 19, 9, 1, 2017-08-08" />
<row data-node="expect_dataset.t_order_item" values="190901, 1909, 19, 10, 1, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="0, zhangsan, a00, zhangsan@gmail.com, 12345678900, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="1, lisi, b01, lisi@gmail.com, 12345678901, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="2, wangwu, c02, wangwu@gmail.com, 12345678902, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="3, zhaoliu, d03, zhaoliu@gmail.com, 12345678903, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="4, zhuqi, e04, zhuqi@gmail.com, 12345678904, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="5, liba, f05, liba@gmail.com, 12345678905, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="6, wangjiu, g06, wangjiu@gmail.com, 12345678906, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="7, zhuda, h07, zhuda@gmail.com, 12345678907, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="8, suner, i08, suner@gmail.com, 12345678908, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="9, zhousan, j09, zhousan@gmail.com, 12345678909, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="10, tom, a10, tom@gmail.com, 12345678910, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="11, kobe, b11, kobe@gmail.com, 12345678911, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="12, jerry, c12, jerry@gmail.com, 12345678912, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="13, james, d13, james@gmail.com, 12345678913, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="14, wade, e14, wade@gmail.com, 12345678914, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="15, rose, f15, rose@gmail.com, 12345678915, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="16, bosh, g16, bosh@gmail.com, 12345678916, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="17, jack, h17, jack@gmail.com, 12345678917, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="18, jordan, i18, jordan@gmail.com, 12345678918, 2017-08-08" />
<row data-node="expect_dataset.t_user" values="19, julie, j19, julie@gmail.com, 12345678919, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="1, 86, tencent, 86000001, 86100000001, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="2, 86, haier, 86000002, 86100000002, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="3, 86, huawei, 86000003, 86100000003, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="4, 86, alibaba, 86000004, 86100000004, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="5, 86, lenovo, 86000005, 86100000005, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="6, 86, moutai, 86000006, 86100000006, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="7, 86, baidu, 86000007, 86100000007, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="8, 86, xiaomi, 86000008, 86100000008, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="9, 86, vivo, 86000009, 86100000009, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="10, 86, oppo, 86000010, 86100000010, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="11, 1, google, 01000011, 01100000011, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="12, 1, walmart, 01000012, 01100000012, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="13, 1, amazon, 01000013, 01100000013, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="14, 1, apple, 01000014, 01100000014, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="15, 1, microsoft, 01000015, 01100000015, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="16, 1, dell, 01000016, 01100000016, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="17, 1, johnson, 01000017, 01100000017, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="18, 1, intel, 01000018, 01100000018, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="19, 1, hp, 01000019, 01100000019, 2017-08-08" />
<row data-node="expect_dataset.t_merchant" values="20, 1, tesla, 01000020, 01100000020, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="1, qq coins, 2, 200, off sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="2, haier washing machine, 4, 3120.5, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="3, huawei mobile phones, 6, 6666, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="4, alibaba cloud cards, 2, 500, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="5, lenovo mobile phones, 6, 3200, off sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="6, moutai liquor, 8, 3200, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="7, baidu cloud cards, 2, 700, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="8, xiaomi mobile phones, 6, 2799, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="9, vivo mobile phones, 6, 2899, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="10, oppo mobile phones, 6, 2299, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="11, google mobile phones, 6, 3399, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="12, walmart wine, 8, 1000, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="13, amazon cloud cards, 2, 1000, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="14, apple mobile phones, 6, 8200, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="15, microsoft x-box, 9, 5000, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="16, dell xps, 10, 9000, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="17, johnson shampoo, 12, 30, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="18, intel cpu, 10, 1600, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="19, hp computer, 10, 4600, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product" values="20, tesla model 3, 14, 324600, on sale, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="1, 1, qq coins, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="2, 2, haier washing machine, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="3, 3, huawei mobile phones, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="4, 4, alibaba cloud cards, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="5, 5, lenovo mobile phones, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="6, 6, moutai liquor, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="7, 7, baidu cloud cards, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="8, 8, xiaomi mobile phones, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="9, 9, vivo mobile phones, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="10, 10, oppo mobile phones, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="11, 11, google mobile phones, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="12, 12, walmart wine, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="13, 13, amazon cloud cards, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="14, 14, apple mobile phones, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="15, 15, microsoft x-box, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="16, 16, dell xps, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="17, 17, johnson shampoo, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="18, 18, intel cpu, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="19, 19, hp computer, 2017-08-08" />
<row data-node="expect_dataset.t_product_detail" values="20, 20, tesla model 3, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="1, virtual goods, 0, 1, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="2, prepaid cards, 1, 2, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="3, home appliance, 0, 1, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="4, washing machine, 3, 2, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="5, digital products, 0, 1, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="6, mobile phones, 5, 2, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="7, food and drinks, 0, 1, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="8, drinks, 7, 2, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="9, game console, 5, 2, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="10, computer related, 5, 2, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="11, daily commodities, 0, 1, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="12, shampoo, 11, 2, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="13, transportation, 0, 1, 2017-08-08" />
<row data-node="expect_dataset.t_product_category" values="14, car, 13, 2, 2017-08-08" />
<row data-node="expect_dataset.t_country" values="1, usa, north america, 2017-08-08" />
<row data-node="expect_dataset.t_country" values="86, china, asia, 2017-08-08" />
</dataset>
``` | /content/code_sandbox/test/e2e/sql/src/test/resources/env/scenario/sharding_and_encrypt/data/expected/dataset.xml | xml | 2016-01-18T12:49:26 | 2024-08-16T15:48:11 | shardingsphere | apache/shardingsphere | 19,707 | 15,654 |
```xml
import { DisplayMode } from "@microsoft/sp-core-library";
export interface ICAccordionProps {
tabs: any[];
displayMode: DisplayMode;
guid: string;
title: string;
accordion:boolean;
}
``` | /content/code_sandbox/samples/react-tabacordion/src/webparts/tabAccordion/components/ICAccordionProps.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 52 |
```xml
import { Scale } from '@fluentui/react-motion-components-preview';
import ScaleDescription from './ScaleDescription.md';
export { Default } from './ScaleDefault.stories';
export { Snappy } from './ScaleSnappy.stories';
export { Exaggerated } from './ScaleExaggerated.stories';
export { Customization } from './ScaleCustomization.stories';
export default {
title: 'Motion/Components (preview)/Scale',
component: Scale,
parameters: {
docs: {
description: {
component: ScaleDescription,
},
},
},
};
``` | /content/code_sandbox/packages/react-components/react-motion-components-preview/stories/src/Scale/index.stories.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 121 |
```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 iterExpit = require( './index' );
/**
* Returns an iterator protocol-compliant object.
*
* @returns iterator protocol-compliant object
*/
function iterator() {
return {
'next': next
};
}
/**
* Implements the iterator protocol `next` method.
*
* @returns iterator protocol-compliant object
*/
function next() {
return {
'value': true,
'done': false
};
}
// TESTS //
// The function returns an iterator...
{
iterExpit( iterator() ); // $ExpectType Iterator
}
// The compiler throws an error if the function is provided a first argument which is not an iterator protocol-compliant object...
{
iterExpit( '5' ); // $ExpectError
iterExpit( 5 ); // $ExpectError
iterExpit( true ); // $ExpectError
iterExpit( false ); // $ExpectError
iterExpit( null ); // $ExpectError
iterExpit( undefined ); // $ExpectError
iterExpit( [] ); // $ExpectError
iterExpit( {} ); // $ExpectError
iterExpit( ( x: number ): number => x ); // $ExpectError
}
// The compiler throws an error if the function is provided insufficient arguments...
{
iterExpit(); // $ExpectError
}
``` | /content/code_sandbox/lib/node_modules/@stdlib/math/iter/special/expit/docs/types/test.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 328 |
```xml
import {
AvatarImg,
FeedActions,
HeaderFeed,
NavItem,
NewsFeedLayout,
TextFeed,
} from "../../styles";
import Dropdown from "react-bootstrap/Dropdown";
import DropdownToggle from "../../../common/DropdownToggle";
import Icon from "../../../common/Icon";
import ModalTrigger from "../../../common/ModalTrigger";
import React from "react";
import ThankForm from "../../containers/feed/ThankForm";
import dayjs from "dayjs";
import { getUserAvatar } from "../../../utils";
type Props = {
list: any;
totalCount: number;
queryParams: any;
deleteItem: (_id: string) => void;
limit: number;
};
export default function ThankList({
list,
deleteItem,
totalCount,
queryParams,
limit,
}: Props) {
const editItem = (item) => {
const trigger = (
<span>
<a>Edit</a>
</span>
);
const content = (props) => {
return (
<ThankForm
queryParams={queryParams}
item={item}
transparent={true}
{...props}
/>
);
};
return <ModalTrigger title="Edit" trigger={trigger} content={content} />;
};
const renderItem = (item: any) => {
const createdUser = item.createdUser || {};
return (
<div key={item._id}>
<HeaderFeed>
<FeedActions>
<AvatarImg
alt={
(createdUser &&
createdUser.details &&
createdUser.details.fullName) ||
"author"
}
src={getUserAvatar(createdUser)}
/>
<div>
<b>
{createdUser &&
((createdUser.details && createdUser.details.fullName) ||
createdUser.username ||
createdUser.email)}
</b>
<b>
<Icon icon="angle-right" size={14} />{" "}
{item.recipients && item.recipients.length > 0
? item.recipients[0].username
: ""}
</b>
<p>
{dayjs(item.createdAt).format("lll")} <b>#{"ThankYou"}</b>
</p>
</div>
</FeedActions>
<FeedActions>
<NavItem>
<Dropdown alignRight={true}>
<Dropdown.Toggle as={DropdownToggle} id="dropdown-user">
<Icon icon="ellipsis-h" size={14} />
</Dropdown.Toggle>
<Dropdown.Menu>
<li>{editItem(item)}</li>
<li>
<a onClick={() => deleteItem(item._id)}>Delete</a>
</li>
</Dropdown.Menu>
</Dropdown>
</NavItem>
</FeedActions>
</HeaderFeed>
<TextFeed>{item.description}</TextFeed>
</div>
);
};
return (
<NewsFeedLayout>
{(list || []).map((filteredItem) => renderItem(filteredItem))}
{/* <LoadMore perPage={limit} all={totalCount} /> */}
</NewsFeedLayout>
);
}
``` | /content/code_sandbox/exm/modules/exmFeed/components/feed/ThankList.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 652 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="path_to_url">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{F977D041-B0A5-49DE-815E-B210DBE140A5}</ProjectGuid>
<ProjectTypeGuids>{A3F8F2AB-B479-4A4A-A458-A89E7DC349F1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Exe</OutputType>
<RootNamespace>linkremoveattributes1</RootNamespace>
<MonoMacResourcePrefix>Resources</MonoMacResourcePrefix>
<AssemblyName>link-remove-attributes-1</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<TargetFrameworkIdentifier>Xamarin.Mac</TargetFrameworkIdentifier>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseSGen>true</UseSGen>
<IncludeMonoRuntime>true</IncludeMonoRuntime>
<LinkMode>Full</LinkMode>
<MonoBundlingExtraArgs></MonoBundlingExtraArgs>
<AOTMode>None</AOTMode>
<EnableCodeSigning>false</EnableCodeSigning>
<CodeSigningKey>Mac Developer</CodeSigningKey>
<EnablePackageSigning>false</EnablePackageSigning>
<PackageSigningKey>Developer ID Installer</PackageSigningKey>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<DefineConstants></DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<UseSGen>true</UseSGen>
<IncludeMonoRuntime>true</IncludeMonoRuntime>
<LinkMode>Full</LinkMode>
<MonoBundlingExtraArgs></MonoBundlingExtraArgs>
<AOTMode>None</AOTMode>
<EnableCodeSigning>false</EnableCodeSigning>
<CodeSigningKey>Mac Developer</CodeSigningKey>
<EnablePackageSigning>false</EnablePackageSigning>
<PackageSigningKey>Developer ID Installer</PackageSigningKey>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="Xamarin.Mac" />
</ItemGroup>
<ItemGroup>
<None Include="Info.plist" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
<ItemGroup>
<Compile Include="..\common\Test.cs">
<Link>Test.cs</Link>
</Compile>
<Compile Include="LinkRemoveAttributes.cs" />
</ItemGroup>
</Project>
``` | /content/code_sandbox/tests/mmp-regression/link-remove-attributes-1/link-remove-attributes-1.csproj | xml | 2016-04-20T18:24:26 | 2024-08-16T13:29:19 | xamarin-macios | xamarin/xamarin-macios | 2,436 | 843 |
```xml
export default {
SECURITY: {displayName: 'Security', id: 'SEC'},
GAS: {displayName: 'Gas & Economy', id: 'GAS'},
MISC: {displayName: 'Miscellaneous', id: 'MISC'},
ERC: {displayName: 'ERC', id: 'ERC'}
}
``` | /content/code_sandbox/remix-analyzer/src/solidity-analyzer/modules/categories.ts | xml | 2016-04-11T09:05:03 | 2024-08-12T19:22:17 | remix | ethereum/remix | 1,177 | 67 |
```xml
import {html, LitElement, css} from "lit";
import {customElement, property} from "lit/decorators.js";
import "@openremote/or-mwc-components/or-mwc-input";
import i18next from "i18next";
import {translate} from "@openremote/or-translate";
import "@openremote/or-mwc-components/or-mwc-input";
import {InputType, OrInputChangedEvent} from "@openremote/or-mwc-components/or-mwc-input";
import {
RuleActionNotification,
PushNotificationMessage
} from "@openremote/model";
import { OrRulesJsonRuleChangedEvent } from "../or-rule-json-viewer";
import set from "lodash-es/set";
@customElement("or-rule-form-push-notification")
export class OrRuleFormPushNotification extends translate(i18next)(LitElement) {
@property({type: Object, attribute: false})
public action!: RuleActionNotification;
static get styles() {
return css`
or-mwc-input {
margin-bottom: 20px;
min-width: 420px;
width: 100%;
}
`
}
protected updated(_changedProperties: Map<PropertyKey, unknown>): void {
if(_changedProperties.has("action")) {
let message: PushNotificationMessage | undefined = this.action.notification!.message as PushNotificationMessage;
if (this.action.notification && message && !message.action) {
message = {type: "push", action: {openInBrowser: true}}
this.action.notification.message = {...this.action.notification.message, ...message};
}
}
}
protected render() {
const message: PushNotificationMessage | undefined = this.action.notification!.message as PushNotificationMessage;
const title = message && message.title ? message.title : "";
const body = message && message.body ? message.body : "";
const action = message && message.action ? message.action : "";
const actionUrl = action && action.url ? action.url : "";
const buttons = message && message.buttons ? message.buttons : [];
return html`
<form style="display:grid">
<or-mwc-input value="${title}"
@or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "title")}"
.label="${i18next.t("subject")}"
type="${InputType.TEXT}"
required
placeholder=" "></or-mwc-input>
<or-mwc-input value="${body}"
@or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "body")}"
.label="${i18next.t("message")}"
type="${InputType.TEXTAREA}"
required
placeholder=" " ></or-mwc-input>
<or-mwc-input value="${actionUrl}"
@or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "action.url")}"
.label="${i18next.t("openWebsiteUrl")}"
type="${InputType.TEXT}"
required
placeholder=" "></or-mwc-input>
<or-mwc-input .value="${action && typeof action.openInBrowser !== "undefined" ? (action && action.openInBrowser) : true}"
@or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "action.openInBrowser")}"
.label="${i18next.t("openInBrowser")}"
type="${InputType.SWITCH}"
placeholder=" "></or-mwc-input>
<or-mwc-input value="${buttons && buttons[0] && buttons[0].title ? buttons[0].title : ""}"
@or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "buttons.0.title")}"
.label="${i18next.t("buttonTextConfirm")}"
type="${InputType.TEXT}"
required
placeholder=" "></or-mwc-input>
<or-mwc-input value="${buttons && buttons[1] && buttons[1].title ? buttons[1].title : ""}"
@or-mwc-input-changed="${(e: OrInputChangedEvent) => this.setActionNotificationName(e.detail.value, "buttons.1.title")}"
.label="${i18next.t("buttonTextDecline")}"
type="${InputType.TEXT}"
placeholder=" "></or-mwc-input>
</form>
`
}
protected setActionNotificationName(value: string | undefined, key?: string) {
if(key && this.action.notification && this.action.notification.message){
let message:any = this.action.notification.message;
set(message, key, value);
if(key.includes('action')) {
set(message, "buttons.0."+key, value);
}
this.action.notification.message = {...message};
}
this.dispatchEvent(new OrRulesJsonRuleChangedEvent());
this.requestUpdate();
}
}
``` | /content/code_sandbox/ui/component/or-rules/src/json-viewer/forms/or-rule-form-push-notification.ts | xml | 2016-02-03T11:14:02 | 2024-08-16T12:45:50 | openremote | openremote/openremote | 1,184 | 1,077 |
```xml
import * as React from 'react';
import { DefaultButton } from '@fluentui/react/lib/Button';
import { Toggle } from '@fluentui/react/lib/Toggle';
import {
ContextualMenuItemType,
DirectionalHint,
IContextualMenuProps,
IContextualMenuItem,
} from '@fluentui/react/lib/ContextualMenu';
import { Dropdown, IDropdownOption, IDropdownStyles } from '@fluentui/react/lib/Dropdown';
import { getRTL } from '@fluentui/react/lib/Utilities';
import { Stack, IStackTokens } from '@fluentui/react/lib/Stack';
import { useBoolean } from '@fluentui/react-hooks';
export const ContextualMenuDirectionalExample: React.FunctionComponent = () => {
const [isBeakVisible, { toggle: toggleIsBeakVisible }] = useBoolean(false);
const [useDirectionalHintForRTL, { toggle: toggleUseDirectionalHintForRTL }] = useBoolean(false);
const [directionalHint, setDirectionalHint] = React.useState<DirectionalHint>(DirectionalHint.bottomLeftEdge);
const [directionalHintForRTL, setDirectionalHintForRTL] = React.useState<DirectionalHint>(
DirectionalHint.bottomLeftEdge,
);
const onDirectionalChanged = React.useCallback(
(event: React.FormEvent<HTMLDivElement>, option: IDropdownOption): void => {
setDirectionalHint(option.key as DirectionalHint);
},
[],
);
const onDirectionalRtlChanged = React.useCallback(
(event: React.FormEvent<HTMLDivElement>, option: IDropdownOption): void => {
setDirectionalHintForRTL(option.key as DirectionalHint);
},
[],
);
const menuProps: IContextualMenuProps = React.useMemo(
() => ({
isBeakVisible: isBeakVisible,
directionalHint: directionalHint,
directionalHintForRTL: useDirectionalHintForRTL ? directionalHintForRTL : undefined,
gapSpace: 0,
beakWidth: 20,
directionalHintFixed: false,
items: menuItems,
}),
[isBeakVisible, directionalHint, directionalHintForRTL, useDirectionalHintForRTL],
);
return (
<div>
<Stack horizontal wrap tokens={stackTokens}>
<Toggle label="Show beak" checked={isBeakVisible} onChange={toggleIsBeakVisible} />
<Dropdown
label="Directional hint"
selectedKey={directionalHint}
options={directionOptions}
onChange={onDirectionalChanged}
styles={dropdownStyles}
/>
{getRTL() && (
<Toggle
label="Use RTL directional hint"
checked={useDirectionalHintForRTL}
onChange={toggleUseDirectionalHintForRTL}
/>
)}
{getRTL() && (
<Dropdown
label="Directional hint for RTL"
selectedKey={directionalHintForRTL}
options={directionOptions}
onChange={onDirectionalRtlChanged}
disabled={!useDirectionalHintForRTL}
styles={dropdownStyles}
/>
)}
</Stack>
<br />
<DefaultButton text="Show context menu" menuProps={menuProps} />
</div>
);
};
const menuItems: IContextualMenuItem[] = [
{ key: 'newItem', text: 'New' },
{ key: 'divider_1', itemType: ContextualMenuItemType.Divider },
{ key: 'rename', text: 'Rename' },
{ key: 'edit', text: 'Edit' },
{ key: 'properties', text: 'Properties' },
{ key: 'disabled', text: 'Disabled item', disabled: true },
];
const directionOptions: IDropdownOption[] = [
{ key: DirectionalHint.topLeftEdge, text: 'Top left edge' },
{ key: DirectionalHint.topCenter, text: 'Top center' },
{ key: DirectionalHint.topRightEdge, text: 'Top right edge' },
{ key: DirectionalHint.topAutoEdge, text: 'Top auto edge' },
{ key: DirectionalHint.bottomLeftEdge, text: 'Bottom left edge' },
{ key: DirectionalHint.bottomCenter, text: 'Bottom center' },
{ key: DirectionalHint.bottomRightEdge, text: 'Bottom right edge' },
{ key: DirectionalHint.bottomAutoEdge, text: 'Bottom auto edge' },
{ key: DirectionalHint.leftTopEdge, text: 'Left top edge' },
{ key: DirectionalHint.leftCenter, text: 'Left center' },
{ key: DirectionalHint.leftBottomEdge, text: 'Left bottom edge' },
{ key: DirectionalHint.rightTopEdge, text: 'Right top edge' },
{ key: DirectionalHint.rightCenter, text: 'Right center' },
{ key: DirectionalHint.rightBottomEdge, text: 'Right bottom edge' },
];
const stackTokens: Partial<IStackTokens> = { childrenGap: 30 };
const dropdownStyles: Partial<IDropdownStyles> = { root: { width: 200 } };
``` | /content/code_sandbox/packages/react-examples/src/react/ContextualMenu/ContextualMenu.Directional.Example.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 1,111 |
```xml
import type { BrowserOptions } from '@sentry/browser';
import {
Integrations as SentryIntegrations,
captureException,
configureScope,
init,
makeFetchTransport,
captureMessage as sentryCaptureMessage,
} from '@sentry/browser';
import type { BrowserTransportOptions } from '@sentry/browser/types/transports/types';
import { Availability, AvailabilityTypes } from '@proton/utils/availability';
import { VPN_HOSTNAME } from '../constants';
import { ApiError } from '../fetch/ApiError';
import { getUIDHeaders } from '../fetch/headers';
import type { ProtonConfig } from '../interfaces';
import { isElectronApp } from './desktop';
type SentryContext = {
authHeaders: { [key: string]: string };
enabled: boolean;
};
type SentryConfig = {
host: string;
release: string;
environment: string;
};
type SentryDenyUrls = BrowserOptions['denyUrls'];
type SentryIgnoreErrors = BrowserOptions['ignoreErrors'];
type SentryOptions = {
sessionTracking?: boolean;
config: ProtonConfig;
UID?: string;
sentryConfig?: SentryConfig;
ignore?: (config: SentryConfig) => boolean;
denyUrls?: SentryDenyUrls;
ignoreErrors?: SentryIgnoreErrors;
};
const context: SentryContext = {
authHeaders: {},
enabled: true,
};
export const setUID = (uid: string | undefined) => {
context.authHeaders = uid ? getUIDHeaders(uid) : {};
};
export const setSentryEnabled = (enabled: boolean) => {
context.enabled = enabled;
};
type FirstFetchParameter = Parameters<typeof fetch>[0];
export const getContentTypeHeaders = (input: FirstFetchParameter): HeadersInit => {
const url = input.toString();
/**
* The sentry library does not append the content-type header to requests. The documentation states
* what routes accept what content-type. Those content-type headers are also expected through our sentry tunnel.
*/
if (url.includes('/envelope/')) {
return { 'content-type': 'application/x-sentry-envelope' };
}
if (url.includes('/store/')) {
return { 'content-type': 'application/json' };
}
return {};
};
const sentryFetch: typeof fetch = (input, init?) => {
return globalThis.fetch(input, {
...init,
headers: {
...init?.headers,
...getContentTypeHeaders(input),
...context.authHeaders,
},
});
};
const makeProtonFetchTransport = (options: BrowserTransportOptions) => {
return makeFetchTransport(options, sentryFetch);
};
const isLocalhost = (host: string) => host.startsWith('localhost');
export const isProduction = (host: string) => host.endsWith('.proton.me') || host === VPN_HOSTNAME;
const getDefaultSentryConfig = ({ APP_VERSION, COMMIT }: ProtonConfig): SentryConfig => {
const { host } = window.location;
return {
host,
release: isProduction(host) ? APP_VERSION : COMMIT,
environment: host.split('.').splice(1).join('.'),
};
};
const getDefaultDenyUrls = (): SentryDenyUrls => {
return [
// Google Adsense
/pagead\/js/i,
// Facebook flakiness
/graph\.facebook\.com/i,
// Facebook blocked
/connect\.facebook\.net\/en_US\/all\.js/i,
// Woopra flakiness
/eatdifferent\.com\.woopra-ns\.com/i,
/static\.woopra\.com\/js\/woopra\.js/i,
// Chrome extensions
/extensions\//i,
/chrome:\/\//i,
/chrome-extension:\/\//i,
/moz-extension:\/\//i,
/webkit-masked-url:\/\//i,
// Other plugins
/127\.0\.0\.1:4001\/isrunning/i, // Cacaoweb
/webappstoolbarba\.texthelp\.com\//i,
/metrics\.itunes\.apple\.com\.edgesuite\.net\//i,
];
};
const getDefaultIgnoreErrors = (): SentryIgnoreErrors => {
return [
// Ignore random plugins/extensions
'top.GLOBALS',
'canvas.contentDocument',
'MyApp_RemoveAllHighlights',
'atomicFindClose',
// See path_to_url
'conduitPage',
// path_to_url
'XDR encoding failure',
'Request timed out',
'No network connection',
'Failed to fetch',
'Load failed',
'NetworkError when attempting to fetch resource.',
'webkitExitFullScreen', // Bug in Firefox for iOS.
'InactiveSession',
'InvalidStateError', // Ignore Pale Moon throwing InvalidStateError trying to use idb
'UnhandledRejection', // Happens too often in extensions and we have lints for that, so should be safe to ignore.
/chrome-extension/,
/moz-extension/,
'TransferCancel', // User action to interrupt upload or download in Drive.
'UploadConflictError', // User uploading the same file again in Drive.
'UploadUserError', // Upload error on user's side in Drive.
'ValidationError', // Validation error on user's side in Drive.
'ChunkLoadError', // WebPack loading source code.
/ResizeObserver loop/, // Chromium bug path_to_url
// See: path_to_url
'originalCreateNotification',
'path_to_url
"Can't find variable: ZiteReader",
'jigsaw is not defined',
'ComboSearch is not defined',
'path_to_url
// Facebook borked
'fb_xd_fragment',
// ISP "optimizing" proxy - `Cache-Control: no-transform` seems to reduce this. (thanks @acdha)
// See path_to_url
'bmi_SafeAddOnload',
'EBCallBackMessageReceived',
// Avast extension error
'_avast_submit',
'AbortError',
/unleash/i,
/Unexpected EOF/i,
];
};
function main({
UID,
config,
sessionTracking = false,
sentryConfig = getDefaultSentryConfig(config),
ignore = ({ host }) => isLocalhost(host),
denyUrls = getDefaultDenyUrls(),
ignoreErrors = getDefaultIgnoreErrors(),
}: SentryOptions) {
const { SENTRY_DSN, SENTRY_DESKTOP_DSN, APP_VERSION } = config;
const sentryDSN = isElectronApp ? SENTRY_DESKTOP_DSN || SENTRY_DSN : SENTRY_DSN;
const { host, release, environment } = sentryConfig;
// No need to configure it if we don't load the DSN
if (!sentryDSN || ignore(sentryConfig)) {
return;
}
setUID(UID);
// Assumes sentryDSN is: path_to_url
// To get path_to_url
const dsn = sentryDSN.replace('sentry', `${host}/api/core/v4/reports/sentry`);
init({
dsn,
release,
environment,
normalizeDepth: 5,
transport: makeProtonFetchTransport,
autoSessionTracking: sessionTracking,
// do not log calls to console.log, console.error, etc.
integrations: [
new SentryIntegrations.Breadcrumbs({
console: false,
}),
],
// Disable client reports. Client reports are used by sentry to retry events that failed to send on visibility change.
// Unfortunately Sentry does not use the custom transport for those, and thus fails to add the headers the API requires.
sendClientReports: false,
beforeSend(event, hint) {
const error = hint?.originalException as any;
const stack = typeof error === 'string' ? error : error?.stack;
// Filter out broken ferdi errors
if (stack && stack.match(/ferdi|franz/i)) {
return null;
}
// Not interested in uncaught API errors, or known errors
if (error instanceof ApiError || error?.trace === false) {
return null;
}
if (!context.enabled) {
return null;
}
// Remove the hash from the request URL and navigation breadcrumbs to avoid
// leaking the search parameters of encrypted searches
if (event.request && event.request.url) {
[event.request.url] = event.request.url.split('#');
}
if (event.breadcrumbs) {
event.breadcrumbs = event.breadcrumbs.map((breadcrumb) => {
if (breadcrumb.category === 'navigation' && breadcrumb.data) {
[breadcrumb.data.from] = breadcrumb.data.from.split('#');
[breadcrumb.data.to] = breadcrumb.data.to.split('#');
}
return breadcrumb;
});
}
return event;
},
// Some ignoreErrors and denyUrls are taken from this gist: path_to_url
// This gist is suggested in the Sentry documentation: path_to_url#decluttering-sentry
ignoreErrors,
denyUrls,
});
configureScope((scope) => {
scope.setTag('appVersion', APP_VERSION);
});
}
export const traceError = (...args: Parameters<typeof captureException>) => {
if (!isLocalhost(window.location.host)) {
captureException(...args);
Availability.mark(AvailabilityTypes.SENTRY);
}
};
export const captureMessage = (...args: Parameters<typeof sentryCaptureMessage>) => {
if (!isLocalhost(window.location.host)) {
sentryCaptureMessage(...args);
}
};
type MailInitiative = 'drawer-security-center' | 'composer' | 'assistant';
export type SentryInitiative = MailInitiative;
type CaptureExceptionArgs = Parameters<typeof captureException>;
/**
* Capture error with an additional initiative tag
* @param initiative
* @param error
*/
export const traceInitiativeError = (initiative: MailInitiative, error: CaptureExceptionArgs[0]) => {
if (!isLocalhost(window.location.host)) {
captureException(error, {
tags: {
initiative,
},
});
}
};
/**
* Capture message with an additional initiative tag
* @param initiative
* @param error
*/
export const captureInitiativeMessage: (initiative: SentryInitiative, message: string) => void = (
initiative,
message
) => {
captureMessage(message, {
tags: {
initiative,
},
});
};
export default main;
``` | /content/code_sandbox/packages/shared/lib/helpers/sentry.ts | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 2,250 |
```xml
import { CharCellLine } from "extraterm-char-cell-line";
import { Font as FontFinderFont, ListOptions } from "font-finder";
export interface SubstitutionResult {
index: number;
contextRange: [number, number];
}
/**
* Information about ligatures found in a sequence of text
*/
export interface LigatureData {
/**
* The list of font glyphs in the input text.
*/
inputGlyphs: number[];
/**
* The list of font glyphs after performing replacements for font ligatures.
*/
outputGlyphs: number[];
/**
* Sorted array of ranges that must be rendered together to produce the
* ligatures in the output sequence. The ranges are inclusive on the left and
* exclusive on the right.
*/
contextRanges: [number, number][];
}
export interface Font {
/**
* Scans the provided text for font ligatures, returning an object with
* metadata about the text and any ligatures found.
*
* @param text String to search for ligatures
*/
findLigatures(text: string): LigatureData;
/**
* Scans the provided text for font ligatures, returning an array of ranges
* where ligatures are located.
*
* @param text String to search for ligatures
*/
findLigatureRanges(text: string): [number, number][];
markLigaturesCharCellLine(line: CharCellLine): void;
}
export interface Options {
/**
* Optional size of previous results to store, measured in total number of
* characters from input strings. Defaults to no cache (0)
*/
cacheSize?: number;
listVariants?: (name: string, options?: ListOptions) => Promise<FontFinderFont[]>;
}
export interface LookupTree {
individual: Map<number, LookupTreeEntry>;
range: {
range: [number, number];
entry: LookupTreeEntry;
}[];
}
export interface LookupTreeEntry {
lookup?: LookupResult;
forward?: LookupTree;
reverse?: LookupTree;
}
export interface LookupResult {
substitutions: (number | null)[];
length: number;
index: number;
subIndex: number;
contextRange: [number, number];
}
export type FlattenedLookupTree = Map<number, FlattenedLookupTreeEntry>;
export interface FlattenedLookupTreeEntry {
lookup?: LookupResult;
forward?: FlattenedLookupTree;
reverse?: FlattenedLookupTree;
}
``` | /content/code_sandbox/packages/extraterm-font-ligatures/src/types.ts | xml | 2016-03-04T12:39:59 | 2024-08-16T18:44:37 | extraterm | sedwards2009/extraterm | 2,501 | 542 |
```xml
/*
* one or more contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright ownership.
*/
import {FieldValidator} from 'final-form';
const promisifyValidator = (
validator: FieldValidator<string | undefined>,
debounceTimeout: number,
) => {
return (...params: Parameters<FieldValidator<string | undefined>>) => {
const errorMessage = validator(...params);
if (errorMessage === undefined) {
return undefined;
}
return new Promise((resolve) => {
setTimeout(() => {
resolve(errorMessage);
}, debounceTimeout);
});
};
};
export {promisifyValidator};
``` | /content/code_sandbox/operate/client/src/modules/utils/validators/promisifyValidator.tsx | xml | 2016-03-20T03:38:04 | 2024-08-16T19:59:58 | camunda | camunda/camunda | 3,172 | 132 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="path_to_url"
xmlns:app="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.bilibili.magicasakura.widgets.TintToolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/theme_color_primary"
android:fitsSystemWindows="true"
android:minHeight="?attr/actionBarSize"
android:theme="@style/Theme.AppCompat"
app:popupTheme="@style/ThemeOverlay.AppCompat.Light" />
<android.support.v7.widget.RecyclerView
android:layout_above="@+id/empty"
android:layout_below="@+id/toolbar"
android:id="@+id/recyclerview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<ImageView
android:id="@+id/empty"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_alignParentBottom="true" />
</RelativeLayout>
``` | /content/code_sandbox/app/src/main/res/layout/fragment_common.xml | xml | 2016-03-24T06:20:39 | 2024-08-15T11:37:10 | remusic | aa112901/remusic | 6,266 | 260 |
```xml
import { useGetSolar } from 'api/getWeatherData';
import { useAtomValue, useSetAtom } from 'jotai';
import { useEffect, useMemo, useRef, useState } from 'react';
import { isSolarLayerEnabledAtom, solarLayerLoadingAtom } from 'utils/state/atoms';
import { stackBlurImageOpacity } from './stackBlurImageOpacity';
import {
opacityToSolarIntensity,
solarColorComponents,
solarIntensityToOpacity,
} from './utils';
const RADIANS_PER_DEGREE = Math.PI / 180;
const DEGREES_PER_RADIAN = 180 / Math.PI;
function gudermannian(y: number): number {
return Math.atan(Math.sinh(y)) * DEGREES_PER_RADIAN;
}
function convertRange(value: number, r1: [number, number], r2: [number, number]): number {
return ((value - r1[0]) * (r2[1] - r2[0])) / (r1[1] - r1[0]) + r2[0];
}
function convertYToLat(yMax: number, y: number): number {
return convertRange(
y,
[0, yMax],
[90 * RADIANS_PER_DEGREE * 2, -90 * RADIANS_PER_DEGREE * 2]
);
}
export default function SolarLayer({ map }: { map?: maplibregl.Map }) {
const setIsLoadingSolarLayer = useSetAtom(solarLayerLoadingAtom);
const isSolarLayerEnabled = useAtomValue(isSolarLayerEnabledAtom);
const { data: solarDataArray, isSuccess } = useGetSolar({
enabled: isSolarLayerEnabled,
});
const solarData = solarDataArray?.[0];
const isVisibleReference = useRef(false);
isVisibleReference.current = isSuccess && isSolarLayerEnabled;
const [canvasScale, setCanvasScale] = useState(4);
// Shrink canvasScale so that canvas dimensions don't exceed WebGL MAX_TEXTURE_SIZE of the user's device
useEffect(() => {
const gl = document.createElement('canvas').getContext('webgl');
if (gl) {
const targetCanvasScale =
gl.getParameter(gl.MAX_TEXTURE_SIZE) /
Math.max(3 * (solarData?.header.nx ?? 360), solarData?.header.ny ?? 180);
const newCanvasScale = Math.max(1, Math.min(4, Math.floor(targetCanvasScale)));
setCanvasScale(newCanvasScale);
}
}, [solarData?.header.nx, solarData?.header.ny]);
const node: HTMLCanvasElement = useMemo(() => {
const canvas = document.createElement('canvas');
// wrap around Earth three times to avoid a seam where 180 and -180 meet
canvas.width = 3 * canvasScale * (solarData?.header.nx ?? 360);
canvas.height = canvasScale * (solarData?.header.ny ?? 180);
return canvas;
}, [canvasScale, solarData?.header.nx, solarData?.header.ny]);
useEffect(() => {
if (!node || !map?.isStyleLoaded()) {
return;
}
const north = gudermannian(convertYToLat(node.height - 1, 0));
const south = gudermannian(convertYToLat(node.height - 1, node.height - 1));
map.addSource(
'solar',
{
type: 'canvas',
canvas: node,
coordinates: [
[-540, north],
[539.999, north],
[539.999, south],
[-540, south],
],
} as any // Workaround for path_to_url
);
if (isVisibleReference.current) {
if (!map.getLayer('solar-point')) {
map.addLayer({ id: 'solar-point', type: 'raster', source: 'solar' });
}
setIsLoadingSolarLayer(false);
}
return () => {
if (map.getLayer('solar-point')) {
map.removeLayer('solar-point');
}
if (map.getSource('solar')) {
map.removeSource('solar');
}
};
}, [map, node, setIsLoadingSolarLayer, isVisibleReference.current]);
// Render the processed solar forecast image into the canvas.
useEffect(() => {
if (!map || !node || !solarData || !isVisibleReference.current) {
return;
}
const canvas = node.getContext('2d');
if (!canvas) {
return;
}
const image = canvas.createImageData(node.width, node.height);
const { lo1, la1, dx, dy, nx } = solarData.header;
// Project solar data onto the image opacity channel
for (let x = 0; x < image.width / 3; x += 1) {
const lon = ((x / canvasScale) % 360) - 180;
const sx = Math.floor(lon - lo1 / dx);
for (let y = 0; y < image.height; y += 1) {
const lat = gudermannian(convertYToLat(image.height - 1, y));
const sy = Math.floor(la1 - lat / dy);
const sourceIndex = sy * nx + sx;
const targetIndex = 4 * (y * image.width + x);
image.data[targetIndex + 3] = solarIntensityToOpacity(
solarData.data[sourceIndex]
);
}
}
// copy already calculated opacity data from the left
for (let x = Math.floor(image.width / 3); x < image.width; x += 1) {
for (let y = 0; y < image.height; y += 1) {
const targetIndex = 4 * (y * image.width + x);
const sourceIndex = 4 * (y * image.width + (x % (360 * canvasScale)));
image.data[targetIndex + 3] = image.data[sourceIndex + 3];
}
}
// Apply stack blur filter over the image opacity.
stackBlurImageOpacity(image, 0, 0, image.width, image.height, 10);
// Map image opacity channel onto solarColor scale to get the real solar colors.
for (let index = 0; index < image.data.length; index += 4) {
const color = solarColorComponents[opacityToSolarIntensity(image.data[index + 3])];
image.data[index + 0] = color.red;
image.data[index + 1] = color.green;
image.data[index + 2] = color.blue;
image.data[index + 3] = color.alpha;
}
// Render the image into canvas and mark as ready so that fading in can start.
canvas.clearRect(0, 0, node.width, node.height);
canvas.putImageData(image, 0, 0);
}, [node, solarData, map]);
return null;
}
``` | /content/code_sandbox/web/src/features/weather-layers/solar/SolarLayer.tsx | xml | 2016-05-21T16:36:17 | 2024-08-16T17:56:07 | electricitymaps-contrib | electricitymaps/electricitymaps-contrib | 3,437 | 1,501 |
```xml
<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
<class>HelloWorldWidget</class>
<comment>
<!--
(See accompanying file LICENSE_1_0.txt
or copy at path_to_url
-->
</comment>
<widget class="QWidget">
<property name="name">
<cstring>HelloWorldWidget</cstring>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>124</width>
<height>63</height>
</rect>
</property>
<property name="caption">
<string>Hello World!</string>
</property>
<vbox>
<property name="name">
<cstring>unnamed</cstring>
</property>
<property name="margin">
<number>11</number>
</property>
<property name="spacing">
<number>6</number>
</property>
<widget class="QLabel">
<property name="name">
<cstring>TextLabel2</cstring>
</property>
<property name="text">
<string>Hello World!</string>
</property>
<property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
<widget class="QPushButton">
<property name="name">
<cstring>OkButton</cstring>
</property>
<property name="text">
<string>OK</string>
</property>
</widget>
</vbox>
</widget>
<layoutdefaults spacing="6" margin="11"/>
</UI>
``` | /content/code_sandbox/deps/boost_1_66_0/tools/build/example/qt/qt3/uic/hello_world_widget.ui | xml | 2016-09-05T10:18:44 | 2024-08-11T13:21:40 | LiquidCore | LiquidPlayer/LiquidCore | 1,010 | 355 |
```xml
/*
* Wire
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* along with this program. If not, see path_to_url
*
*/
import {getLogger} from 'Util/Logger';
export const mlsMigrationLogger = getLogger('MLSMigration');
``` | /content/code_sandbox/src/script/mls/MLSMigration/MLSMigrationLogger.ts | xml | 2016-07-21T15:34:05 | 2024-08-16T11:40:13 | wire-webapp | wireapp/wire-webapp | 1,125 | 112 |
```xml
// Use to update maintenance state
export class UpdateMaintenance {
static readonly type = '[CDS] Update Maintenance';
constructor(public enable: boolean) { }
}
export class GetCDSStatus {
static readonly type = '[CDS] Get CDS Status';
constructor() { }
}
``` | /content/code_sandbox/ui/src/app/store/cds.action.ts | xml | 2016-10-11T08:28:23 | 2024-08-16T01:55:31 | cds | ovh/cds | 4,535 | 63 |
```xml
/*
Use of this source code is governed by an MIT-style
license that can be found in the LICENSE file or at
path_to_url
*/
import {BackgroundSyncPlugin} from './BackgroundSyncPlugin.js';
import {Queue, QueueOptions} from './Queue.js';
import {QueueStore} from './QueueStore.js';
import {StorableRequest} from './StorableRequest.js';
import './_version.js';
// See path_to_url
interface SyncManager {
getTags(): Promise<string[]>;
register(tag: string): Promise<void>;
}
declare global {
interface ServiceWorkerRegistration {
readonly sync: SyncManager;
}
interface SyncEvent extends ExtendableEvent {
readonly lastChance: boolean;
readonly tag: string;
}
interface ServiceWorkerGlobalScopeEventMap {
sync: SyncEvent;
}
}
/**
* @module workbox-background-sync
*/
export {BackgroundSyncPlugin, Queue, QueueOptions, QueueStore, StorableRequest};
``` | /content/code_sandbox/packages/workbox-background-sync/src/index.ts | xml | 2016-04-04T15:55:19 | 2024-08-16T08:33:26 | workbox | GoogleChrome/workbox | 12,245 | 205 |
```xml
import { Version } from '@microsoft/sp-core-library';
import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base';
import {
IPropertyPaneConfiguration,
PropertyPaneTextField
} from '@microsoft/sp-property-pane';
import { HttpClient, SPHttpClient, HttpClientConfiguration, HttpClientResponse, ODataVersion, IHttpClientConfiguration, IHttpClientOptions, ISPHttpClientOptions } from '@microsoft/sp-http';
import { escape } from '@microsoft/sp-lodash-subset';
import styles from './GitHubBadgeWebPart.module.scss';
import * as strings from 'GitHubBadgeWebPartStrings';
export interface IGitHubBadgeWebPartProps {
description: string;
gitHubUserName: string;
}
export interface IGitHubBadgeUserProfileProps {
login: string;
id: string;
node_id: string;
avatar_url: string;
gravatar_id: string;
url: string;
html_url: string;
followers_url: string;
following_url: string;
gists_url: string;
starred_url: string;
subscriptions_url: string;
organizations_url: string;
repos_url: string;
events_url: string;
received_events_url: string;
type: string;
site_admin: string;
name: string;
company: string;
blog: string;
location: string;
email: string;
hireable: string;
bio: string;
public_repos: string;
public_gists: string;
followers: string;
following: string;
created_at: string;
updated_at: string;
}
export default class GitHubBadgeWebPart extends BaseClientSideWebPart<IGitHubBadgeWebPartProps> {
protected getGitHubData(): void {
let gitHubUrl: string = "path_to_url"+this.properties.gitHubUserName;
let responseText: string = "";
let notfound: HTMLElement = document.getElementById("notfound");
let gitHubUserProfilePic: HTMLElement = document.getElementById("gitHubUserProfilePic");
let login: HTMLElement = document.getElementById("login");
let id: HTMLElement = document.getElementById("id");
let node_id: HTMLElement = document.getElementById("node_id");
let avatar_url: HTMLElement = document.getElementById("avatar_url");
let gravatar_id: HTMLElement = document.getElementById("gravatar_id");
let url: HTMLElement = document.getElementById("url");
let html_url: HTMLElement = document.getElementById("html_url");
let followers_url: HTMLElement = document.getElementById("followers_url");
let following_url: HTMLElement = document.getElementById("following_url");
let gists_url: HTMLElement = document.getElementById("gists_url");
let starred_url: HTMLElement = document.getElementById("starred_url");
let subscriptions_url: HTMLElement = document.getElementById("subscriptions_url");
let organizations_url: HTMLElement = document.getElementById("organizations_url");
let repos_url: HTMLElement = document.getElementById("repos_url");
let events_url: HTMLElement = document.getElementById("events_url");
let received_events_url: HTMLElement = document.getElementById("received_events_url");
let type: HTMLElement = document.getElementById("type");
let site_admin: HTMLElement = document.getElementById("site_admin");
let name: HTMLElement = document.getElementById("name");
let company: HTMLElement = document.getElementById("company");
let blog: HTMLElement = document.getElementById("blog");
let location: HTMLElement = document.getElementById("location");
let email: HTMLElement = document.getElementById("email");
let hireable: HTMLElement = document.getElementById("hireable");
let bio: HTMLElement = document.getElementById("bio");
let public_repos: HTMLElement = document.getElementById("public_repos");
let public_gists: HTMLElement = document.getElementById("public_gists");
let followers: HTMLElement = document.getElementById("followers");
let following: HTMLElement = document.getElementById("following");
let created_at: HTMLElement = document.getElementById("created_at");
let updated_at: HTMLElement = document.getElementById("updated_at");
let responseJSONparsed: IGitHubBadgeUserProfileProps;
this.context.httpClient.get(gitHubUrl, HttpClient.configurations.v1).then((response: HttpClientResponse) => {
response.json().then((responseJSON: JSON) => {
responseText = JSON.stringify(responseJSON);
responseJSONparsed = JSON.parse(responseText);
gitHubUserProfilePic.innerHTML= `<img src="${responseJSONparsed.avatar_url}" alt="GitHub User Profile Picture"></img>`;
login.innerText = responseJSONparsed.login;
id.innerText = responseJSONparsed.id;
node_id.innerText = responseJSONparsed.node_id;
avatar_url.innerText = responseJSONparsed.avatar_url;
gravatar_id.innerText = responseJSONparsed.gravatar_id;
url.innerText = responseJSONparsed.url;
html_url.innerText = responseJSONparsed.html_url;
followers_url.innerText = responseJSONparsed.followers_url;
following_url.innerText = responseJSONparsed.following_url;
gists_url.innerText = responseJSONparsed.gists_url;
starred_url.innerText = responseJSONparsed.starred_url;
subscriptions_url.innerText = responseJSONparsed.subscriptions_url;
organizations_url.innerText = responseJSONparsed.organizations_url;
repos_url.innerText = responseJSONparsed.repos_url;
events_url.innerText = responseJSONparsed.events_url;
received_events_url.innerText = responseJSONparsed.received_events_url;
type.innerText = responseJSONparsed.type;
site_admin.innerText = responseJSONparsed.site_admin;
name.innerText = responseJSONparsed.name;
company.innerText = responseJSONparsed.company;
blog.innerText = responseJSONparsed.blog;
location.innerText = responseJSONparsed.location;
email.innerText = responseJSONparsed.email;
hireable.innerText = responseJSONparsed.hireable;
bio.innerText = responseJSONparsed.bio;
public_repos.innerText = responseJSONparsed.public_repos;
public_gists.innerText = responseJSONparsed.public_gists;
followers.innerText = responseJSONparsed.followers;
following.innerText = responseJSONparsed.following;
created_at.innerText = responseJSONparsed.created_at;
updated_at.innerText = responseJSONparsed.updated_at;
})
.catch ((response: any) => {
let errMsg: string = `WARNING - error when calling URL ${gitHubUrl}. Error = ${response.message}`;
notfound.style.color = "red";
console.log(errMsg);
notfound.innerText = errMsg;
});
});
}
public render(): void {
this.domElement.innerHTML = `
<div class="${ styles.gitHubBadge }">
<div class="${ styles.container }">
<div class="${ styles.row }">
<div class="${ styles.column }">
<div id="gitHubUserProfilePic"></div>
<div id="gitHubUserName" class="${ styles.title }">${this.properties.gitHubUserName}</div>
<div id="login" class="${ styles.label }"></div>
<div id="id" class="${ styles.label }"></div>
<div id="node_id" class="${ styles.label }"></div>
<div id="avatar_url" class="${ styles.label }"></div>
<div id="gravatar_id" class="${ styles.label }"></div>
<div id="url" class="${ styles.label }"></div>
<div id="html_url" class="${ styles.label }"></div>
<div id="followers_url" class="${ styles.label }"></div>
<div id="following_url" class="${ styles.label }"></div>
<div id="gists_url" class="${ styles.label }"></div>
<div id="starred_url" class="${ styles.label }"></div>
<div id="subscriptions_url" class="${ styles.label }"></div>
<div id="organizations_url" class="${ styles.label }"></div>
<div id="repos_url" class="${ styles.label }"></div>
<div id="events_url" class="${ styles.label }"></div>
<div id="received_events_url" class="${ styles.label }"></div>
<div id="type" class="${ styles.label }"></div>
<div id="site_admin" class="${ styles.label }"></div>
<div id="name" class="${ styles.label }"></div>
<div id="company" class="${ styles.label }"></div>
<div id="blog" class="${ styles.label }"></div>
<div id="location" class="${ styles.label }"></div>
<div id="email" class="${ styles.label }"></div>
<div id="hireable" class="${ styles.label }"></div>
<div id="bio" class="${ styles.label }"></div>
<div id="public_repos" class="${ styles.label }"></div>
<div id="public_gists" class="${ styles.label }"></div>
<div id="followers" class="${ styles.label }"></div>
<div id="following" class="${ styles.label }"></div>
<div id="created_at" class="${ styles.label }"></div>
<div id="updated_at" class="${ styles.label }"></div>
<div id="notfound" class="${styles.label}"></div>
</div>
</div>
</div>
</div>`;
this.getGitHubData();
}
protected get dataVersion(): Version {
return Version.parse('1.0');
}
protected get disableReactivePropertyChanges(): boolean {
return true;
}
protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration {
return {
pages: [
{
header: {
description: strings.PropertyPaneDescription
},
groups: [
{
groupName: strings.BasicGroupName,
groupFields: [
PropertyPaneTextField('description', {
label: strings.DescriptionFieldLabel
}),
PropertyPaneTextField('gitHubUserName', {
label: strings.GitHubUserNameFieldLabel
})
]
}
]
}
]
};
}
}
``` | /content/code_sandbox/samples/js-gitHubBadge/src/webparts/gitHubBadge/GitHubBadgeWebPart.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 2,071 |
```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 * as React from "react";
import { HotkeysProvider, type HotkeysProviderProps } from "./hotkeys/hotkeysProvider";
import { OverlaysProvider, type OverlaysProviderProps } from "./overlays/overlaysProvider";
import { type PortalContextOptions, PortalProvider } from "./portal/portalProvider";
// for some props interfaces, it helps to prefix their property names with the name of the provider
// to avoid any ambiguity in the API
type HotkeysProviderPrefix<T> = {
[Property in keyof T as `hotkeysProvider${Capitalize<string & Property>}`]: T[Property];
};
export interface BlueprintProviderProps
extends OverlaysProviderProps,
PortalContextOptions,
HotkeysProviderPrefix<HotkeysProviderProps> {
// no props of its own, `children` comes from `OverlaysProviderProps`
}
/**
* Composite Blueprint context provider which enables & manages various global behaviors of Blueprint applications.
*
* @see path_to_url#core/context/blueprint-provider
*/
export const BlueprintProvider = ({ children, hotkeysProviderValue, ...props }: BlueprintProviderProps) => {
return (
<PortalProvider {...props}>
<OverlaysProvider>
<HotkeysProvider value={hotkeysProviderValue} {...props}>
{children}
</HotkeysProvider>
</OverlaysProvider>
</PortalProvider>
);
};
``` | /content/code_sandbox/packages/core/src/context/blueprintProvider.tsx | xml | 2016-10-25T21:17:50 | 2024-08-16T15:14:48 | blueprint | palantir/blueprint | 20,593 | 329 |
```xml
/**
* Cleans a URL by stripping the protocol, host, and search params.
*
* @param urlString the url to clean
* @returns the cleaned url
*/
export function cleanURL(url: string | URL): URL {
const u = new URL(url)
u.host = 'localhost:3000'
u.search = ''
u.protocol = 'http'
return u
}
``` | /content/code_sandbox/packages/next/src/server/route-modules/app-route/helpers/clean-url.ts | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 82 |
```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 mgf = require( './index' );
// TESTS //
// The function returns a number...
{
mgf( 2, 2, 4, 5 ); // $ExpectType number
mgf( 1, 2, 8, 4 ); // $ExpectType number
}
// The compiler throws an error if the function is provided values other than four numbers...
{
mgf( true, 3, 6, 5 ); // $ExpectError
mgf( false, 2, 4, 3 ); // $ExpectError
mgf( '5', 1, 2, 1.5 ); // $ExpectError
mgf( [], 1, 2, 1.5 ); // $ExpectError
mgf( {}, 2, 4, 3 ); // $ExpectError
mgf( ( x: number ): number => x, 2, 4, 3 ); // $ExpectError
mgf( 9, true, 12, 8 ); // $ExpectError
mgf( 9, false, 12, 8 ); // $ExpectError
mgf( 5, '5', 10, 8 ); // $ExpectError
mgf( 8, [], 16, 8 ); // $ExpectError
mgf( 9, {}, 18, 8 ); // $ExpectError
mgf( 8, ( x: number ): number => x, 16, 8 ); // $ExpectError
mgf( 9, 5, true, 8 ); // $ExpectError
mgf( 9, 5, false, 9 ); // $ExpectError
mgf( 5, 2, '5', 8 ); // $ExpectError
mgf( 8, 4, [], 8 ); // $ExpectError
mgf( 9, 4, {}, 8 ); // $ExpectError
mgf( 8, 5, ( x: number ): number => x, 8 ); // $ExpectError
mgf( 9, 5, 10, true ); // $ExpectError
mgf( 9, 5, 10, false ); // $ExpectError
mgf( 5, 2, 5, '5' ); // $ExpectError
mgf( 8, 4, 8, [] ); // $ExpectError
mgf( 9, 4, 8, {} ); // $ExpectError
mgf( 8, 5, 10, ( x: number ): number => x ); // $ExpectError
}
// The compiler throws an error if the function is provided an unsupported number of arguments...
{
mgf(); // $ExpectError
mgf( 2 ); // $ExpectError
mgf( 2, 0 ); // $ExpectError
mgf( 2, 0, 4 ); // $ExpectError
mgf( 2, 0, 4, 1, 5 ); // $ExpectError
}
// Attached to main export is a `factory` method which returns a function...
{
mgf.factory( 3, 5, 4 ); // $ExpectType Unary
}
// The `factory` method returns a function which returns a number...
{
const fcn = mgf.factory( 3, 5, 4 );
fcn( 2 ); // $ExpectType number
}
// The compiler throws an error if the function returned by the `factory` method is provided invalid arguments...
{
const fcn = mgf.factory( 3, 5, 4 );
fcn( true ); // $ExpectError
fcn( false ); // $ExpectError
fcn( '5' ); // $ExpectError
fcn( [] ); // $ExpectError
fcn( {} ); // $ExpectError
fcn( ( x: number ): number => x ); // $ExpectError
}
// The compiler throws an error if the function returned by the `factory` method is provided an unsupported number of arguments...
{
const fcn = mgf.factory( 3, 5, 4 );
fcn(); // $ExpectError
fcn( 2, 0 ); // $ExpectError
fcn( 2, 0, 1 ); // $ExpectError
}
// The compiler throws an error if the `factory` method is provided values other than three numbers...
{
mgf.factory( true, 3, 2 ); // $ExpectError
mgf.factory( false, 3, 2 ); // $ExpectError
mgf.factory( '5', 1, 0.5 ); // $ExpectError
mgf.factory( [], 1, 0.5 ); // $ExpectError
mgf.factory( {}, 2, 0.5 ); // $ExpectError
mgf.factory( ( x: number ): number => x, 2, 1 ); // $ExpectError
mgf.factory( 9, true, 2 ); // $ExpectError
mgf.factory( 9, false, 2 ); // $ExpectError
mgf.factory( 5, '5', 3 ); // $ExpectError
mgf.factory( 8, [], 3 ); // $ExpectError
mgf.factory( 9, {}, 3 ); // $ExpectError
mgf.factory( 8, ( x: number ): number => x, 3 ); // $ExpectError
mgf.factory( 9, 18, true ); // $ExpectError
mgf.factory( 9, 18, false ); // $ExpectError
mgf.factory( 5, 10, '5' ); // $ExpectError
mgf.factory( 8, 16, [] ); // $ExpectError
mgf.factory( 9, 18, {} ); // $ExpectError
mgf.factory( 8, 16, ( x: number ): number => x ); // $ExpectError
mgf.factory( [], true, 3 ); // $ExpectError
mgf.factory( {}, false, 3 ); // $ExpectError
mgf.factory( false, '5', 3 ); // $ExpectError
mgf.factory( {}, [], 3 ); // $ExpectError
mgf.factory( '5', ( x: number ): number => x, 3 ); // $ExpectError
mgf.factory( [], true, [] ); // $ExpectError
mgf.factory( {}, false, {} ); // $ExpectError
mgf.factory( false, '5', false ); // $ExpectError
mgf.factory( {}, [], '2' ); // $ExpectError
mgf.factory( '5', ( x: number ): number => x, ( x: number ): number => x ); // $ExpectError
}
// The compiler throws an error if the `factory` method is provided an unsupported number of arguments...
{
mgf.factory( 0 ); // $ExpectError
mgf.factory( 0, 4 ); // $ExpectError
mgf.factory( 0, 4, 3, 7 ); // $ExpectError
}
``` | /content/code_sandbox/lib/node_modules/@stdlib/stats/base/dists/triangular/mgf/docs/types/test.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 1,585 |
```xml
import { FC, MouseEventHandler } from 'react';
import { COLORS } from '@theme';
import { deriveIconSize, IconSize } from './helpers';
interface Props {
fillColor?: string;
size?: IconSize;
onClick?: MouseEventHandler<SVGSVGElement>;
}
const AddIcon: FC<Props> = ({ fillColor = COLORS.BLUE_BRIGHT, size, onClick }) => {
const iconSize = deriveIconSize(size);
return (
<svg
width={iconSize}
height={iconSize}
viewBox="0 0 32 32"
onClick={onClick}
style={{ cursor: 'pointer' }}
fill="none"
>
<path
fill={fillColor}
d="M17 13C17 12.4477 16.5523 12 16 12C15.4477 12 15 12.4477 15 13V15H13C12.4477 15 12 15.4477 12 16C12 16.5523 12.4477 17 13 17H15V19C15 19.5523 15.4477 20 16 20C16.5523 20 17 19.5523 17 19V17H19C19.5523 17 20 16.5523 20 16C20 15.4477 19.5523 15 19 15H17V13Z"
/>
<path
fill={fillColor}
fillRule="evenodd"
clipRule="evenodd"
d="M16 6C10.4772 6 6 10.4772 6 16C6 21.5228 10.4772 26 16 26C21.5228 26 26 21.5228 26 16C26 10.4772 21.5228 6 16 6ZM8 16C8 11.5817 11.5817 8 16 8C20.4183 8 24 11.5817 24 16C24 20.4183 20.4183 24 16 24C11.5817 24 8 20.4183 8 16Z"
/>
</svg>
);
};
export default AddIcon;
``` | /content/code_sandbox/src/components/icons/AddIcon.tsx | xml | 2016-12-04T01:35:27 | 2024-08-14T21:41:58 | MyCrypto | MyCryptoHQ/MyCrypto | 1,347 | 517 |
```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.
-->
<sql-parser-test-cases>
<select sql-case-id="select_with_lateral">
<from>
<join-table start-index="14" stop-index="94" join-type="COMMA">
<left>
<join-table start-index="14" stop-index="54" join-type="COMMA">
<left>
<simple-table start-index="14" stop-index="15" name="t1" />
</left>
<right>
<subquery-table alias="dt1" start-index="18" stop-index="54">
<subquery start-index="26" stop-index="47">
<select>
<projections distinct-row="true" start-index="43" stop-index="46">
<column-projection start-index="43" stop-index="46" name="x">
<owner start-index="43" stop-index="44" name="t1" />
</column-projection>
</projections>
</select>
</subquery>
</subquery-table>
</right>
</join-table>
</left>
<right>
<subquery-table alias="dt2" start-index="57" stop-index="94">
<subquery start-index="65" stop-index="87">
<select>
<projections distinct-row="true" start-index="82" stop-index="86">
<column-projection start-index="82" stop-index="86" name="x">
<owner start-index="82" stop-index="84" name="dt1" />
</column-projection>
</projections>
</select>
</subquery>
</subquery-table>
</right>
</join-table>
</from>
<projections start-index="7" stop-index="7">
<expression-projection start-index="7" stop-index="7" text="1">
<expr>
<literal-expression start-index="7" stop-index="7" value="1" />
</expr>
</expression-projection>
</projections>
<where start-index="96" stop-index="114">
<expr>
<binary-operation-expression start-index="102" stop-index="114">
<left>
<column start-index="102" stop-index="106" name="x">
<owner start-index="102" stop-index="104" name="dt1" />
</column>
</left>
<operator>=</operator>
<right>
<column start-index="110" stop-index="114" name="x">
<owner start-index="110" stop-index="112" name="dt2" />
</column>
</right>
</binary-operation-expression>
</expr>
</where>
</select>
<select sql-case-id="select_sub_query_with_project">
<from>
<simple-table name="t_order" start-index="40" stop-index="46" />
</from>
<projections start-index="7" stop-index="33">
<column-projection name="order_id" start-index="7" stop-index="14" />
<subquery-projection start-index="17" stop-index="26" alias="num" text="(SELECT 1)" literal-text="(SELECT 1)">
<subquery>
<select>
<projections start-index="25" stop-index="25">
<expression-projection start-index="25" stop-index="25" text="1" />
</projections>
</select>
</subquery>
</subquery-projection>
</projections>
</select>
<select sql-case-id="select_sub_query_with_table" parameters="3, 4">
<projections start-index="7" stop-index="9">
<shorthand-projection start-index="7" stop-index="9">
<owner start-index="7" stop-index="7" name="t" />
</shorthand-projection>
</projections>
<from>
<subquery-table alias="t" start-index="16" stop-index="65">
<subquery>
<select parameters="3, 4">
<projections start-index="24" stop-index="24">
<shorthand-projection start-index="24" stop-index="24" />
</projections>
<from>
<simple-table start-index="31" stop-index="37" name="t_order" />
</from>
<where start-index="39" stop-index="62">
<expr>
<in-expression start-index="45" stop-index="62">
<not>false</not>
<left>
<column name="order_id" start-index="45" stop-index="52" />
</left>
<right>
<list-expression start-index="57" stop-index="62">
<items>
<literal-expression value="3" start-index="58" stop-index="58" />
<parameter-marker-expression parameter-index="0" start-index="58" stop-index="58" />
</items>
<items>
<literal-expression value="4" start-index="61" stop-index="61" />
<parameter-marker-expression parameter-index="1" start-index="61" stop-index="61" />
</items>
</list-expression>
</right>
</in-expression>
</expr>
</where>
</select>
</subquery>
</subquery-table>
</from>
</select>
<select sql-case-id="select_with_equal_subquery">
<from>
<simple-table name="t_order" start-index="14" stop-index="20" />
</from>
<projections start-index="7" stop-index="7">
<shorthand-projection start-index="7" stop-index="7" />
</projections>
<where start-index="22" stop-index="85">
<expr>
<binary-operation-expression start-index="28" stop-index="85">
<left>
<column name="user_id" start-index="28" stop-index="34" />
</left>
<operator>=</operator>
<right>
<subquery start-index="38" stop-index="85">
<select>
<from start-index="59" stop-index="70">
<simple-table name="t_order_item" start-index="59" stop-index="70" />
</from>
<projections start-index="46" stop-index="52">
<column-projection name="user_id" start-index="46" stop-index="52" />
</projections>
<where start-index="72" stop-index="84">
<expr>
<binary-operation-expression start-index="78" stop-index="84">
<left>
<column name="id" start-index="78" stop-index="79" />
</left>
<operator>=</operator>
<right>
<literal-expression value="10" start-index="83" stop-index="84" />
</right>
</binary-operation-expression>
</expr>
</where>
</select>
</subquery>
</right>
</binary-operation-expression>
</expr>
</where>
</select>
<select sql-case-id="select_with_any_subquery">
<from>
<simple-table name="employees" start-index="14" stop-index="22" />
</from>
<projections start-index="7" stop-index="7">
<shorthand-projection start-index="7" stop-index="7" />
</projections>
<where start-index="24" stop-index="97">
<expr>
<binary-operation-expression start-index="30" stop-index="97">
<left>
<column name="salary" start-index="30" stop-index="35" />
</left>
<operator>=</operator>
<right>
<subquery start-index="43" stop-index="97">
<select>
<from start-index="63" stop-index="71">
<simple-table name="employees" start-index="63" stop-index="71"/>
</from>
<projections start-index="51" stop-index="56">
<column-projection name="salary" start-index="51" stop-index="56"/>
</projections>
<where start-index="73" stop-index="96">
<expr>
<binary-operation-expression start-index="79" stop-index="96">
<left>
<column name="department_id" start-index="79" stop-index="91" />
</left>
<operator>=</operator>
<right>
<literal-expression value="30" start-index="95" stop-index="96" />
</right>
</binary-operation-expression>
</expr>
</where>
</select>
</subquery>
</right>
</binary-operation-expression>
</expr>
</where>
<order-by>
<column-item name="employee_id" order-direction="ASC" start-index="108" stop-index="118" />
</order-by>
</select>
<select sql-case-id="select_with_in_subquery">
<from>
<simple-table name="t_order" start-index="14" stop-index="20" />
</from>
<projections start-index="7" stop-index="7">
<shorthand-projection start-index="7" stop-index="7" />
</projections>
<where start-index="22" stop-index="93">
<expr>
<in-expression start-index="28" stop-index="93">
<not>false</not>
<left>
<column name="user_id" start-index="28" stop-index="34" />
</left>
<right>
<subquery start-index="39" stop-index="93">
<select>
<from>
<simple-table name="t_order_item" start-index="60" stop-index="71" />
</from>
<projections start-index="47" stop-index="53">
<column-projection name="user_id" start-index="47" stop-index="53" />
</projections>
<where start-index="73" stop-index="92">
<expr>
<in-expression start-index="79" stop-index="92">
<not>false</not>
<left>
<column name="id" start-index="79" stop-index="80" />
</left>
<right>
<list-expression start-index="85" stop-index="92">
<items>
<literal-expression value="10" start-index="86" stop-index="87" />
</items>
<items>
<literal-expression value="11" start-index="90" stop-index="91" />
</items>
</list-expression>
</right>
</in-expression>
</expr>
</where>
</select>
</subquery>
</right>
</in-expression>
</expr>
</where>
</select>
<select sql-case-id="select_with_between_subquery" parameters="12">
<from>
<simple-table name="t_order" start-index="14" stop-index="20" />
</from>
<projections start-index="7" stop-index="7">
<shorthand-projection start-index="7" stop-index="7" />
</projections>
<where start-index="22" stop-index="103" literal-stop-index="104">
<expr>
<between-expression start-index="28" stop-index="103" literal-stop-index="104">
<not>false</not>
<left>
<column name="user_id" start-index="28" stop-index="34" />
</left>
<between-expr>
<subquery start-index="44" stop-index="97">
<select>
<from>
<simple-table name="t_order_item" start-index="65" stop-index="76" />
</from>
<projections start-index="52" stop-index="58">
<column-projection name="user_id" start-index="52" stop-index="58" />
</projections>
<where start-index="78" stop-index="96">
<expr>
<binary-operation-expression start-index="84" stop-index="96">
<left>
<column name="order_id" start-index="84" stop-index="91" />
</left>
<operator>=</operator>
<right>
<literal-expression value="10" start-index="95" stop-index="96" />
</right>
</binary-operation-expression>
</expr>
</where>
</select>
</subquery>
</between-expr>
<and-expr>
<literal-expression value="12" start-index="103" stop-index="104" />
<parameter-marker-expression parameter-index="0" start-index="103" stop-index="103" />
</and-expr>
</between-expression>
</expr>
</where>
</select>
<select sql-case-id="select_with_exists_sub_query_with_project">
<projections start-index="7" stop-index="36">
<subquery-projection start-index="14" stop-index="36" text="EXISTS (SELECT 1 FROM t_order)" literal-text="EXISTS (SELECT 1 FROM t_order)">
<subquery start-index="15" stop-index="35">
<select>
<from>
<simple-table name="t_order" start-index="29" stop-index="35" />
</from>
<projections start-index="22" stop-index="22">
<expression-projection start-index="22" stop-index="22" text="1" />
</projections>
</select>
</subquery>
</subquery-projection>
</projections>
</select>
<select sql-case-id="select_with_join_table_subquery">
<projections start-index="7" stop-index="68">
<column-projection name="order_id" start-index="7" stop-index="31">
<owner start-index="7" stop-index="22" name="t_order_federate" />
</column-projection>
<column-projection name="user_id" start-index="34" stop-index="57">
<owner start-index="34" stop-index="49" name="t_order_federate" />
</column-projection>
<column-projection name="user_id" start-index="60" stop-index="68">
<owner start-index="60" stop-index="60" name="u" />
</column-projection>
</projections>
<from start-index="70" stop-index="90">
<join-table join-type="COMMA">
<left>
<simple-table name="t_order_federate" start-index="75" stop-index="90" />
</left>
<right>
<subquery-table alias="u" start-index="93" stop-index="124">
<subquery>
<select>
<projections start-index="101" stop-index="101">
<shorthand-projection start-index="101" stop-index="101" />
</projections>
<from>
<simple-table start-index="108" stop-index="118" name="t_user_info" />
</from>
</select>
</subquery>
</subquery-table>
</right>
</join-table>
</from>
<where start-index="126" stop-index="167">
<expr>
<binary-operation-expression start-index="132" stop-index="167">
<left>
<column name="user_id" start-index="132" stop-index="155">
<owner start-index="132" stop-index="147" name="t_order_federate" />
</column>
</left>
<operator>=</operator>
<right>
<column name="user_id" start-index="159" stop-index="167">
<owner start-index="159" stop-index="159" name="u" />
</column>
</right>
</binary-operation-expression>
</expr>
</where>
</select>
<select sql-case-id="select_with_projection_subquery">
<projections start-index="7" stop-index="99">
<column-projection name="order_id" start-index="7" stop-index="31">
<owner start-index="7" stop-index="22" name="t_order_federate" />
</column-projection>
<column-projection name="user_id" start-index="34" stop-index="57">
<owner start-index="34" stop-index="49" name="t_order_federate" />
</column-projection>
<subquery-projection start-index="60" stop-index="99" text="(SELECT COUNT(user_id) FROM t_user_info)">
<subquery>
<select>
<projections start-index="68" stop-index="81">
<aggregation-projection type="COUNT" expression="COUNT(user_id)" start-index="68" stop-index="81" />
</projections>
<from start-index="83" stop-index="98">
<simple-table name="t_user_info" start-index="88" stop-index="98" />
</from>
</select>
</subquery>
</subquery-projection>
</projections>
<from start-index="101" stop-index="121">
<simple-table name="t_order_federate" start-index="106" stop-index="121" />
</from>
</select>
<select sql-case-id="select_with_projection_subquery_and_multiple_parameters">
<projections start-index="7" stop-index="110">
<column-projection name="order_id" start-index="7" stop-index="31">
<owner start-index="7" stop-index="22" name="t_order_federate" />
</column-projection>
<column-projection name="user_id" start-index="34" stop-index="57">
<owner start-index="34" stop-index="49" name="t_order_federate" />
</column-projection>
<subquery-projection start-index="60" stop-index="110" text="(SELECT CONCAT(order_id, user_id) FROM t_user_info)">
<subquery>
<select>
<projections start-index="68" stop-index="92">
<expression-projection text="CONCAT(order_id, user_id)" start-index="68" stop-index="92" />
</projections>
<from start-index="94" stop-index="109">
<simple-table name="t_user_info" start-index="99" stop-index="109" />
</from>
</select>
</subquery>
</subquery-projection>
</projections>
<from start-index="112" stop-index="132">
<simple-table name="t_order_federate" start-index="117" stop-index="132" />
</from>
</select>
<select sql-case-id="select_with_in_subquery_condition">
<projections start-index="7" stop-index="57">
<column-projection name="order_id" start-index="7" stop-index="31">
<owner start-index="7" stop-index="22" name="t_order_federate" />
</column-projection>
<column-projection name="user_id" start-index="34" stop-index="57">
<owner start-index="34" stop-index="49" name="t_order_federate" />
</column-projection>
</projections>
<from start-index="59" stop-index="79">
<simple-table name="t_order_federate" start-index="64" stop-index="79" />
</from>
<where start-index="81" stop-index="124">
<expr>
<in-expression start-index="87" stop-index="124">
<left>
<column name="user_id" start-index="87" stop-index="93" />
</left>
<right>
<subquery start-index="98" stop-index="124">
<select>
<projections start-index="106" stop-index="106">
<shorthand-projection start-index="106" stop-index="106" />
</projections>
<from start-index="108" stop-index="123">
<simple-table name="t_user_info" start-index="113" stop-index="123" />
</from>
</select>
</subquery>
</right>
</in-expression>
</expr>
</where>
</select>
<select sql-case-id="select_with_between_and_subquery_condition">
<projections start-index="7" stop-index="57">
<column-projection name="order_id" start-index="7" stop-index="31">
<owner start-index="7" stop-index="22" name="t_order_federate" />
</column-projection>
<column-projection name="user_id" start-index="34" stop-index="57">
<owner start-index="34" stop-index="49" name="t_order_federate" />
</column-projection>
</projections>
<from start-index="59" stop-index="79">
<simple-table name="t_order_federate" start-index="64" stop-index="79" />
</from>
<where start-index="81" stop-index="230">
<expr>
<between-expression start-index="87" stop-index="230">
<left>
<column name="user_id" start-index="87" stop-index="93" />
</left>
<between-expr>
<subquery start-index="103" stop-index="164">
<select>
<projections start-index="111" stop-index="117">
<column-projection name="user_id" start-index="111" stop-index="117" />
</projections>
<from start-index="119" stop-index="134">
<simple-table name="t_user_info" start-index="124" stop-index="134" />
</from>
<where start-index="136" stop-index="163">
<expr>
<binary-operation-expression start-index="142" stop-index="163">
<left>
<column name="information" start-index="142" stop-index="152" />
</left>
<operator>=</operator>
<right>
<literal-expression value="before" start-index="156" stop-index="163" />
</right>
</binary-operation-expression>
</expr>
</where>
</select>
</subquery>
</between-expr>
<and-expr>
<subquery start-index="170" stop-index="230">
<select>
<projections start-index="178" stop-index="184">
<column-projection name="user_id" start-index="178" stop-index="184" />
</projections>
<from start-index="186" stop-index="201">
<simple-table name="t_user_info" start-index="191" stop-index="201" />
</from>
<where start-index="203" stop-index="229">
<expr>
<binary-operation-expression start-index="209" stop-index="229">
<left>
<column name="information" start-index="209" stop-index="219" />
</left>
<operator>=</operator>
<right>
<literal-expression value="after" start-index="223" stop-index="229" />
</right>
</binary-operation-expression>
</expr>
</where>
</select>
</subquery>
</and-expr>
</between-expression>
</expr>
</where>
</select>
<select sql-case-id="select_with_exist_subquery_condition">
<projections start-index="7" stop-index="57">
<column-projection name="order_id" start-index="7" stop-index="31">
<owner start-index="7" stop-index="22" name="t_order_federate" />
</column-projection>
<column-projection name="user_id" start-index="34" stop-index="57">
<owner start-index="34" stop-index="49" name="t_order_federate" />
</column-projection>
</projections>
<from start-index="59" stop-index="79">
<simple-table name="t_order_federate" start-index="64" stop-index="79" />
</from>
<where start-index="81" stop-index="173">
<expr>
<exists-subquery start-index="87" stop-index="173">
<subquery start-index="94" stop-index="173">
<select>
<projections start-index="102" stop-index="102">
<shorthand-projection start-index="102" stop-index="102" />
</projections>
<from start-index="104" stop-index="119">
<simple-table name="t_user_info" start-index="109" stop-index="119" />
</from>
<where start-index="121" stop-index="172">
<expr>
<binary-operation-expression start-index="127" stop-index="172">
<left>
<column name="user_id" start-index="127" stop-index="150">
<owner start-index="127" stop-index="142" name="t_order_federate" />
</column>
</left>
<operator>=</operator>
<right>
<column name="user_id" start-index="154" stop-index="172">
<owner start-index="154" stop-index="164" name="t_user_info" />
</column>
</right>
</binary-operation-expression>
</expr>
</where>
</select>
</subquery>
</exists-subquery>
</expr>
</where>
</select>
<select sql-case-id="select_with_not_exist_subquery_condition">
<projections start-index="7" stop-index="57">
<column-projection name="order_id" start-index="7" stop-index="31">
<owner start-index="7" stop-index="22" name="t_order_federate" />
</column-projection>
<column-projection name="user_id" start-index="34" stop-index="57">
<owner start-index="34" stop-index="49" name="t_order_federate" />
</column-projection>
</projections>
<from start-index="59" stop-index="79">
<simple-table name="t_order_federate" start-index="64" stop-index="79" />
</from>
<where start-index="81" stop-index="177">
<expr>
<exists-subquery start-index="91" stop-index="177">
<not>true</not>
<subquery start-index="98" stop-index="177">
<select>
<projections start-index="106" stop-index="106">
<shorthand-projection start-index="106" stop-index="106" />
</projections>
<from start-index="108" stop-index="123">
<simple-table name="t_user_info" start-index="113" stop-index="123" />
</from>
<where start-index="125" stop-index="176">
<expr>
<binary-operation-expression start-index="131" stop-index="176">
<left>
<column name="user_id" start-index="131" stop-index="154">
<owner start-index="131" stop-index="146" name="t_order_federate" />
</column>
</left>
<operator>=</operator>
<right>
<column name="user_id" start-index="158" stop-index="176">
<owner start-index="158" stop-index="168" name="t_user_info" />
</column>
</right>
</binary-operation-expression>
</expr>
</where>
</select>
</subquery>
</exists-subquery>
</expr>
</where>
</select>
<select sql-case-id="select_with_exist_string_split_subquery">
<projections start-index="7" stop-index="27">
<column-projection name="ProductId" start-index="7" stop-index="15" />
<column-projection name="Name" start-index="18" stop-index="21" />
<column-projection name="Tags" start-index="24" stop-index="27" />
</projections>
<from start-index="34" stop-index="40">
<simple-table name="Product" start-index="34" stop-index="40"/>
</from>
<where start-index="42" stop-index="129">
<expr>
<subquery start-index="48" stop-index="129">
<select>
<projections start-index="63" stop-index="63">
<shorthand-projection start-index="63" stop-index="63" />
</projections>
<from start-index="70" stop-index="92">
<function-table>
<table-function function-name="STRING_SPLIT" text="STRING_SPLIT(Tags, ',')"/>
</function-table>
</from>
<where start-index="94" stop-index="128">
<expr>
<in-expression start-index="100" stop-index="128">
<left>
<column name="value" start-index="100" stop-index="104" />
</left>
<right>
<list-expression start-index="109" stop-index="128">
<items>
<literal-expression value="clothing" start-index="110" stop-index="119"/>
</items>
<items>
<literal-expression value="road" start-index="122" stop-index="127"/>
</items>
</list-expression>
</right>
</in-expression>
</expr>
</where>
</select>
</subquery>
</expr>
</where>
</select>
<select sql-case-id="select_sub_query_with_cast_function">
<projections start-index="7" stop-index="125">
<column-projection name="BusinessEntityID" start-delimiter="[" end-delimiter="]" start-index="7" stop-index="53" alias="BusinessEntityID">
<owner name="T1_1" start-delimiter="[" end-delimiter="]" start-index="7" stop-index="12"/>
</column-projection>
<column-projection name="rowguid" start-delimiter="[" end-delimiter="]" start-index="56" stop-index="84" alias="rowguid">
<owner name="T1_1" start-delimiter="[" end-delimiter="]" start-index="56" stop-index="61"/>
</column-projection>
<column-projection name="ModifiedDate" start-delimiter="[" end-delimiter="]" start-index="87" stop-index="125" alias="ModifiedDate">
<owner name="T1_1" start-delimiter="[" end-delimiter="]" start-index="87" stop-index="92"/>
</column-projection>
</projections>
<from start-index="133" stop-index="378">
<subquery-table alias="T1_1" start-index="133" stop-index="386">
<subquery start-index="133" stop-index="378">
<select>
<projections start-index="141" stop-index="259">
<column-projection name="BusinessEntityID" start-delimiter="[" end-delimiter="]" start-index="141" stop-index="187" alias="BusinessEntityID">
<owner name="T2_1" start-delimiter="[" end-delimiter="]" start-index="141" stop-index="146"/>
</column-projection>
<column-projection name="rowguid" start-delimiter="[" end-delimiter="]" start-index="190" stop-index="218" alias="rowguid">
<owner name="T2_1" start-delimiter="[" end-delimiter="]" start-index="190" stop-index="195"/>
</column-projection>
<column-projection name="ModifiedDate" start-delimiter="[" end-delimiter="]" start-index="221" stop-index="259" alias="ModifiedDate">
<owner name="T2_1" start-delimiter="[" end-delimiter="]" start-index="221" stop-index="226"/>
</column-projection>
</projections>
<from start-index="266" stop-index="319">
<simple-table name="BusinessEntity" start-delimiter="[" end-delimiter="]" start-index="266" stop-index="319" alias="T2_1">
<owner name="Person" start-delimiter="[" end-delimiter="]" start-index="287" stop-index="294">
<owner name="AdventureWorks2022" start-delimiter="[" end-delimiter="]" start-index="266" stop-index="285"/>
</owner>
</simple-table>
</from>
<where start-index="321" stop-index="377">
<expr>
<binary-operation-expression start-index="328" stop-index="376">
<left>
<column name="BusinessEntityID" start-delimiter="[" end-delimiter="]" start-index="328" stop-index="352">
<owner name="T2_1" start-delimiter="[" end-delimiter="]" start-index="328" stop-index="333"/>
</column>
</left>
<right>
<function function-name="CAST" text="CAST ((17907) AS INT)" start-index="356" stop-index="376">
<parameter>
<literal-expression value="17907" start-index="363" stop-index="367"/>
</parameter>
<parameter>
<data-type value="INT" start-index="373" stop-index="375"/>
</parameter>
</function>
</right>
<operator>=</operator>
</binary-operation-expression>
</expr>
</where>
</select>
</subquery>
</subquery-table>
</from>
</select>
<select sql-case-id="select_sub_query_with_inner_join">
<projections start-index="7" stop-index="88">
<column-projection name="BusinessEntityID" start-delimiter="[" end-delimiter="]" start-index="7" stop-index="53" alias="BusinessEntityID">
<owner name="T1_1" start-index="7" stop-index="12" start-delimiter="[" end-delimiter="]"/>
</column-projection>
<column-projection name="AddressID" start-index="56" stop-index="88" start-delimiter="[" end-delimiter="]" alias="AddressID">
<owner name="T1_1" start-index="56" stop-index="61" start-delimiter="[" end-delimiter="]"/>
</column-projection>
</projections>
<from>
<subquery-table alias="T1_1" start-index="95" stop-index="385">
<subquery start-index="95" stop-index="377">
<select>
<projections start-index="103" stop-index="184">
<column-projection name="BusinessEntityID" start-index="103" stop-index="149" start-delimiter="[" end-delimiter="]" alias="BusinessEntityID">
<owner name="T2_2" start-index="103" stop-index="108" start-delimiter="[" end-delimiter="]"/>
</column-projection>
<column-projection name="AddressID" start-index="152" stop-index="184" start-delimiter="[" end-delimiter="]" alias="AddressID">
<owner name="T2_1" start-index="152" stop-index="157" start-delimiter="[" end-delimiter="]"/>
</column-projection>
</projections>
<from>
<join-table join-type="INNER">
<left>
<simple-table name="BusinessEntityAddress" start-index="191" stop-index="251" start-delimiter="[" end-delimiter="]" alias="T2_1">
<owner name="Person" start-index="212" stop-index="219" start-delimiter="[" end-delimiter="]">
<owner name="AdventureWorks2022" start-index="191" stop-index="210" start-delimiter="[" end-delimiter="]"/>
</owner>
</simple-table>
</left>
<right>
<simple-table name="BusinessEntity" start-index="264" stop-index="317" start-delimiter="[" end-delimiter="]" alias="T2_2">
<owner name="Person" start-index="285" stop-index="292" start-delimiter="[" end-delimiter="]">
<owner name="AdventureWorks2022" start-index="264" stop-index="283" start-delimiter="[" end-delimiter="]"/>
</owner>
</simple-table>
</right>
<on-condition>
<binary-operation-expression start-index="323" stop-index="375">
<left>
<column name="BusinessEntityID" start-index="323" stop-index="347" start-delimiter="[" end-delimiter="]">
<owner name="T2_1" start-index="323" stop-index="328" start-delimiter="[" end-delimiter="]"/>
</column>
</left>
<operator>=</operator>
<right>
<column name="BusinessEntityID" start-index="351" stop-index="375" start-delimiter="[" end-delimiter="]">
<owner name="T2_2" start-index="351" stop-index="356" start-delimiter="[" end-delimiter="]"/>
</column>
</right>
</binary-operation-expression>
</on-condition>
</join-table>
</from>
</select>
</subquery>
</subquery-table>
</from>
</select>
<select sql-case-id="select_sub_query_with_sum">
<projections start-index="7" stop-index="27">
<column-projection name="col" start-index="7" stop-index="27" start-delimiter="[" end-delimiter="]" alias="col">
<owner name="T1_1" start-index="7" stop-index="12" start-delimiter="[" end-delimiter="]"/>
</column-projection>
</projections>
<from>
<subquery-table alias="T1_1" start-index="34" stop-index="147">
<subquery>
<select>
<projections start-index="42" stop-index="72">
<aggregation-projection expression="SUM([T2_1].[Quantity])" type="SUM" start-index="42" stop-index="63" alias="col"/>
</projections>
<from>
<simple-table name="ProductInventory" start-index="79" stop-index="138" start-delimiter="[" end-delimiter="]" alias="T2_1">
<owner name="Production" start-index="100" stop-index="111" start-delimiter="[" end-delimiter="]">
<owner name="AdventureWorks2022" start-index="79" stop-index="98" start-delimiter="[" end-delimiter="]"/>
</owner>
</simple-table>
</from>
</select>
</subquery>
</subquery-table>
</from>
</select>
<select sql-case-id="select_sub_query_with_rownumber">
<projections start-index="7" stop-index="7">
<shorthand-projection start-index="7" stop-index="7" />
</projections>
<from start-index="14" stop-index="110">
<function-table>
<subquery-table>
<subquery start-index="14" stop-index="110">
<select>
<projections start-index="22" stop-index="82">
<column-projection name="col1" start-index="22" stop-index="25" />
<expression-projection alias="rn" text="ROW_NUMBER () OVER (PARTITION by col1 ORDER BY col1)" start-index="28" stop-index="82">
<expr>
<function function-name="ROW_NUMBER" text="ROW_NUMBER () OVER (PARTITION by col1 ORDER BY col1)" start-index="28" stop-index="79" />
</expr>
</expression-projection>
</projections>
<from start-index="89" stop-index="92">
<simple-table name="tab1" start-index="89" stop-index="92" />
</from>
<where start-index="94" stop-index="109">
<expr>
<binary-operation-expression start-index="100" stop-index="109">
<left>
<column name="col1" start-index="100" stop-index="103" />
</left>
<right>
<literal-expression value="XYZ" start-index="105" stop-index="109" />
</right>
<operator>=</operator>
</binary-operation-expression>
</expr>
</where>
</select>
</subquery>
</subquery-table>
</function-table>
</from>
<where start-index="112" stop-index="123">
<expr>
<binary-operation-expression start-index="118" stop-index="123">
<left>
<column name="rn" start-index="118" stop-index="119" />
</left>
<right>
<literal-expression value="1" start-index="123" stop-index="123" />
</right>
<operator>=</operator>
</binary-operation-expression>
</expr>
</where>
</select>
</sql-parser-test-cases>
``` | /content/code_sandbox/test/it/parser/src/main/resources/case/dml/select-sub-query.xml | xml | 2016-01-18T12:49:26 | 2024-08-16T15:48:11 | shardingsphere | apache/shardingsphere | 19,707 | 9,218 |
```xml
<?xml version="1.0" encoding="utf-8"?><HelpTOCNode Title="CSScriptLib" Url="html/3bca438b-6a3b-acb6-218a-f07ec3aa462e.htm"><HelpTOCNode Title="CompileInfo Class" Url="html/aed98efc-048e-81bd-0174-d6d33d976047.htm" HasChildren="true" /><HelpTOCNode Title="CompilerException Class" Url="html/73d1f875-0f76-8ab8-10b1-8f40885c2ae0.htm" HasChildren="true" /><HelpTOCNode Title="CSharpParser Class" Url="html/0abb862d-f98f-3a95-2826-cf1bebbb23b7.htm" HasChildren="true" /><HelpTOCNode Title="CSharpParser.CmdScriptInfo Class" Url="html/4fceaaff-ad51-713d-8099-042988f73527.htm" HasChildren="true" /><HelpTOCNode Title="CSharpParser.ImportInfo Class" Url="html/1cf3a07f-22dd-f50a-a472-847296503259.htm" HasChildren="true" /><HelpTOCNode Title="CSharpParser.InitInfo Class" Url="html/c7b7c3e6-f83c-8bd0-3f0a-039089ddc51c.htm" HasChildren="true" /><HelpTOCNode Title="CSScript Class" Url="html/9f55be09-ce20-f8e8-84a9-c6c4c429d0af.htm" HasChildren="true" /><HelpTOCNode Title="DomainAssemblies Enumeration" Url="html/b28e37f3-1366-dd92-ac66-5c77512168d7.htm" /><HelpTOCNode Title="EvaluatorAccess Enumeration" Url="html/d781a151-36c2-0b0d-e72c-9ed09cd9ef26.htm" /><HelpTOCNode Title="EvaluatorConfig Class" Url="html/f706d49a-511f-da56-d67d-4d25ea24868a.htm" HasChildren="true" /><HelpTOCNode Title="EvaluatorEngine Enumeration" Url="html/78976dd5-4163-18cb-da0f-c7e70d9d356d.htm" /><HelpTOCNode Title="IEvaluator Interface" Url="html/3853215a-1dba-de06-cfdc-13a6edb2e37f.htm" HasChildren="true" /><HelpTOCNode Title="LinqExtensions Class" Url="html/c97f99a4-8518-1c6d-b5cf-910c99bddd55.htm" HasChildren="true" /><HelpTOCNode Title="MethodDelegate Delegate" Url="html/d102f883-37bb-3977-9012-0f21657bdf28.htm" /><HelpTOCNode Title="MethodDelegate(T) Delegate" Url="html/4e831977-d07c-c462-2ce8-4f5edac5c93c.htm" /><HelpTOCNode Title="ReflectionExtensions Class" Url="html/59a91107-b1f6-e858-80c2-9dc9a23478e6.htm" HasChildren="true" /><HelpTOCNode Title="RoslynEvaluator Class" Url="html/9674b5d1-3a9a-73ad-7eb0-38ff27b81336.htm" HasChildren="true" /><HelpTOCNode Title="Runtime Class" Url="html/ebc3afc5-8d42-9a7b-d9a4-eef0d80d73fd.htm" HasChildren="true" /><HelpTOCNode Title="Settings Class" Url="html/515d61bf-129c-2477-7f86-0aa117d45cef.htm" HasChildren="true" /><HelpTOCNode Title="StringExtensions Class" Url="html/98f348ea-cd3f-9c28-b493-1565d11f506d.htm" HasChildren="true" /></HelpTOCNode>
``` | /content/code_sandbox/docs/help/toc/3bca438b-6a3b-acb6-218a-f07ec3aa462e.xml | xml | 2016-01-16T05:50:23 | 2024-08-14T17:35:38 | cs-script | oleg-shilo/cs-script | 1,583 | 932 |
```xml
import { inject, injectable, } from 'inversify';
import { ServiceIdentifiers } from '../../container/ServiceIdentifiers';
import * as ESTree from 'estree';
import { IEscapeSequenceEncoder } from '../../interfaces/utils/IEscapeSequenceEncoder';
import { IOptions } from '../../interfaces/options/IOptions';
import { IRandomGenerator } from '../../interfaces/utils/IRandomGenerator';
import { IVisitor } from '../../interfaces/node-transformers/IVisitor';
import { NodeTransformationStage } from '../../enums/node-transformers/NodeTransformationStage';
import { NodeTransformer } from '../../enums/node-transformers/NodeTransformer';
import { AbstractNodeTransformer } from '../AbstractNodeTransformer';
import { NodeGuards } from '../../node/NodeGuards';
import { NodeLiteralUtils } from '../../node/NodeLiteralUtils';
import { NodeFactory } from '../../node/NodeFactory';
import { NodeUtils } from '../../node/NodeUtils';
@injectable()
export class EscapeSequenceTransformer extends AbstractNodeTransformer {
/**
* @type {NodeTransformer[]}
*/
public override readonly runAfter: NodeTransformer[] = [
NodeTransformer.CustomCodeHelpersTransformer
];
/**
* @type {IEscapeSequenceEncoder}
*/
private readonly escapeSequenceEncoder: IEscapeSequenceEncoder;
/**
* @param {IRandomGenerator} randomGenerator
* @param {IOptions} options
* @param {IEscapeSequenceEncoder} escapeSequenceEncoder
*/
public constructor (
@inject(ServiceIdentifiers.IRandomGenerator) randomGenerator: IRandomGenerator,
@inject(ServiceIdentifiers.IOptions) options: IOptions,
@inject(ServiceIdentifiers.IEscapeSequenceEncoder) escapeSequenceEncoder: IEscapeSequenceEncoder
) {
super(randomGenerator, options);
this.escapeSequenceEncoder = escapeSequenceEncoder;
}
/**
* @param {NodeTransformationStage} nodeTransformationStage
* @returns {IVisitor | null}
*/
public getVisitor (nodeTransformationStage: NodeTransformationStage): IVisitor | null {
switch (nodeTransformationStage) {
case NodeTransformationStage.Finalizing:
return {
enter: (node: ESTree.Node, parentNode: ESTree.Node | null): ESTree.Node | undefined => {
if (NodeGuards.isLiteralNode(node)) {
return this.transformNode(node, parentNode);
}
}
};
default:
return null;
}
}
/**
* @param {Literal} literalNode
* @param {Node | null} parentNode
* @returns {Literal}
*/
public transformNode (literalNode: ESTree.Literal, parentNode: ESTree.Node | null): ESTree.Literal {
if (!NodeLiteralUtils.isStringLiteralNode(literalNode)) {
return literalNode;
}
const encodedValue: string = this.escapeSequenceEncoder.encode(
literalNode.value,
this.options.unicodeEscapeSequence
);
const newLiteralNode: ESTree.Literal = NodeFactory.literalNode(encodedValue);
NodeUtils.parentizeNode(newLiteralNode, parentNode);
return newLiteralNode;
}
}
``` | /content/code_sandbox/src/node-transformers/finalizing-transformers/EscapeSequenceTransformer.ts | xml | 2016-05-09T08:16:53 | 2024-08-16T19:43:07 | javascript-obfuscator | javascript-obfuscator/javascript-obfuscator | 13,358 | 663 |
```xml
<vector xmlns:android="path_to_url"
xmlns:tools="path_to_url"
android:width="544dp"
android:height="512dp"
android:viewportWidth="544.0"
android:viewportHeight="512.0"
tools:keep="@drawable/fa_medrt">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M113.7,256c0,121.8 83.9,222.8 193.5,241.1 -18.7,4.5 -38.2,6.9 -58.2,6.9C111.4,504 0,393 0,256S111.4,8 248.9,8c20.1,0 39.6,2.4 58.2,6.9C197.5,33.2 113.7,134.2 113.7,256m297.4,100.3c-77.7,55.4 -179.6,47.5 -240.4,-14.6 5.5,14.1 12.7,27.7 21.7,40.5 61.6,88.2 182.4,109.3 269.7,47 87.3,-62.3 108.1,-184.3 46.5,-272.6 -9,-12.9 -19.3,-24.3 -30.5,-34.2 37.4,78.8 10.7,178.5 -67,233.9m-218.8,-244c-1.4,1 -2.7,2.1 -4,3.1 64.3,-17.8 135.9,4 178.9,60.5 35.7,47 42.9,106.6 24.4,158 56.7,-56.2 67.6,-142.1 22.3,-201.8 -50,-65.5 -149.1,-74.4 -221.6,-19.8M296,224c-4.4,0 -8,-3.6 -8,-8v-40c0,-4.4 -3.6,-8 -8,-8h-48c-4.4,0 -8,3.6 -8,8v40c0,4.4 -3.6,8 -8,8h-40c-4.4,0 -8,3.6 -8,8v48c0,4.4 3.6,8 8,8h40c4.4,0 8,3.6 8,8v40c0,4.4 3.6,8 8,8h48c4.4,0 8,-3.6 8,-8v-40c0,-4.4 3.6,-8 8,-8h40c4.4,0 8,-3.6 8,-8v-48c0,-4.4 -3.6,-8 -8,-8h-40z"/>
</vector>
``` | /content/code_sandbox/mobile/src/main/res/drawable/fa_medrt.xml | xml | 2016-10-24T13:23:25 | 2024-08-16T07:20:37 | freeotp-android | freeotp/freeotp-android | 1,387 | 701 |
```xml
import {
render,
screen,
userEvent,
within,
} from '@testing-library/react-native';
import LiteCreditCardInput from '../LiteCreditCardInput';
describe('LiteCreditCardInput', () => {
let onChange: ReturnType<typeof jest.fn>;
let user: ReturnType<typeof userEvent.setup>;
let cardInput: ReturnType<typeof within>;
beforeEach(() => {
onChange = jest.fn();
user = userEvent.setup();
render(
<LiteCreditCardInput
onChange={onChange}
testID="CARD_INPUT"
/>
);
cardInput = within(screen.getByTestId('CARD_INPUT'));
});
it('should validate and format valid credit-card information', async () => {
await user.type(cardInput.getByTestId('CC_NUMBER'), '4242424242424242');
await user.type(cardInput.getByTestId('CC_EXPIRY'), '233');
await user.type(cardInput.getByTestId('CC_CVC'), '333');
expect(onChange).toHaveBeenLastCalledWith({
valid: true,
status: {
number: 'valid',
expiry: 'valid',
cvc: 'valid',
},
values: {
number: '4242 4242 4242 4242',
expiry: '02/33',
cvc: '333',
type: 'visa',
},
});
});
it('should ignores non number characters ', async () => {
await user.type(
cardInput.getByTestId('CC_NUMBER'),
'--drop db "users" 4242-4242-4242-4242'
);
await user.type(cardInput.getByTestId('CC_EXPIRY'), '#$!@#!@# 12/33');
await user.type(cardInput.getByTestId('CC_CVC'), 'lorem ipsum 333');
expect(onChange).toHaveBeenLastCalledWith(
expect.objectContaining({
values: expect.objectContaining({
number: '4242 4242 4242 4242',
expiry: '12/33',
cvc: '333',
}),
})
);
});
it('should return validation error for invalid card information', async () => {
await user.type(cardInput.getByTestId('CC_NUMBER'), '5555 5555 5555 4443');
await user.type(cardInput.getByTestId('CC_EXPIRY'), '02 / 99');
await user.type(cardInput.getByTestId('CC_CVC'), '33');
expect(onChange).toHaveBeenLastCalledWith(
expect.objectContaining({
status: {
number: 'invalid', // failed crc
expiry: 'invalid', // too far in the future
cvc: 'incomplete', // cvv is too short
},
})
);
});
it('should return credit card issuer based on card number', async () => {
const numberField = cardInput.getByTestId('CC_NUMBER');
await user.clear(numberField);
await user.type(numberField, '4242424242424242');
expect(onChange).toHaveBeenLastCalledWith(
expect.objectContaining({
values: expect.objectContaining({ type: 'visa' }),
})
);
await user.clear(numberField);
await user.type(numberField, '5555555555554444');
expect(onChange).toHaveBeenLastCalledWith(
expect.objectContaining({
values: expect.objectContaining({ type: 'mastercard' }),
})
);
await user.clear(numberField);
await user.type(numberField, '371449635398431');
expect(onChange).toHaveBeenLastCalledWith(
expect.objectContaining({
values: expect.objectContaining({ type: 'american-express' }),
})
);
await user.clear(numberField);
await user.type(numberField, '6011111111111117');
expect(onChange).toHaveBeenLastCalledWith(
expect.objectContaining({
values: expect.objectContaining({ type: 'discover' }),
})
);
await user.clear(numberField);
await user.type(numberField, '3056930009020004');
expect(onChange).toHaveBeenLastCalledWith(
expect.objectContaining({
values: expect.objectContaining({ type: 'diners-club' }),
})
);
await user.clear(numberField);
await user.type(numberField, '3566002020360505');
expect(onChange).toHaveBeenLastCalledWith(
expect.objectContaining({
values: expect.objectContaining({ type: 'jcb' }),
})
);
});
});
``` | /content/code_sandbox/src/__tests__/LiteCreditCardInput.test.tsx | xml | 2016-09-01T05:39:55 | 2024-08-13T14:23:48 | react-native-credit-card-input | sbycrosz/react-native-credit-card-input | 1,449 | 955 |
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Amazon.Lambda.Core" Version="1.0.0" />
<PackageReference Include="Amazon.Lambda.Serialization.Json" Version="1.1.0" />
<PackageReference Include="Amazon.Lambda.APIGatewayEvents" Version="1.1.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
</Project>
``` | /content/code_sandbox/Tools/LambdaTestTool/tests/LambdaFunctions/ServerlessTemplateYamlExample/ServerlessTemplateYamlExample.csproj | xml | 2016-11-11T20:43:34 | 2024-08-15T16:57:53 | aws-lambda-dotnet | aws/aws-lambda-dotnet | 1,558 | 145 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Theme xmlns="path_to_url">
<Window Width="485" Height="400" HexStyle="100a0000" FontId="0">#(loc.Caption)</Window>
<Font Id="0" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
<Font Id="1" Height="-24" Weight="500" Foreground="000000">Segoe UI</Font>
<Font Id="2" Height="-22" Weight="500" Foreground="666666">Segoe UI</Font>
<Font Id="3" Height="-12" Weight="500" Foreground="000000" Background="FFFFFF">Segoe UI</Font>
<Font Id="4" Height="-12" Weight="500" Foreground="ff0000" Background="FFFFFF" Underline="yes">Segoe UI</Font>
<Image X="11" Y="11" Width="64" Height="64" ImageFile="logo.png" Visible="yes"/>
<Text X="80" Y="11" Width="-11" Height="64" FontId="1" Visible="yes" DisablePrefix="yes">#(loc.Title)</Text>
<Page Name="Help">
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.HelpHeader)</Text>
<Text X="11" Y="112" Width="-11" Height="-35" FontId="3" DisablePrefix="yes">#(loc.HelpText)</Text>
<Button Name="HelpCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.HelpCloseButton)</Button>
</Page>
<Page Name="Install">
<Richedit Name="EulaRichedit" X="11" Y="80" Width="-11" Height="-90" TabStop="yes" FontId="0" HexStyle="0x800000" />
<Checkbox Name="EulaAcceptCheckbox" X="-11" Y="-61" Width="260" Height="17" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.InstallAcceptCheckbox)</Checkbox>
<Checkbox Name="MyCheckbox" X="-11" Y="-41" Width="260" Height="17" TabStop="yes" FontId="3" >[MyCheckboxLabel]</Checkbox>
<Button Name="OptionsButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.InstallOptionsButton)</Button>
<Button Name="InstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallInstallButton)</Button>
<Button Name="WelcomeCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.InstallCloseButton)</Button>
</Page>
<Page Name="Options">
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.OptionsHeader)</Text>
<Text X="11" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OptionsLocationLabel)</Text>
<Editbox Name="FolderEditbox" X="11" Y="143" Width="-91" Height="21" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" >[InstallFolder]</Editbox>
<Button Name="BrowseButton" X="-11" Y="142" Width="75" Height="23" TabStop="yes" FontId="3">#(loc.OptionsBrowseButton)</Button>
<Button Name="OptionsOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsOkButton)</Button>
<Button Name="OptionsCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.OptionsCancelButton)</Button>
</Page>
<Page Name="FilesInUse">
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.FilesInUseHeader)</Text>
<Text X="11" Y="121" Width="-11" Height="34" FontId="3" DisablePrefix="yes">#(loc.FilesInUseLabel)</Text>
<Text Name="FilesInUseText" X="11" Y="150" Width="-11" Height="-86" FontId="3" DisablePrefix="yes" HexStyle="0x0000C000"></Text>
<Button Name="FilesInUseCloseRadioButton" X="11" Y="-60" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseCloseRadioButton)</Button>
<Button Name="FilesInUseDontCloseRadioButton" X="11" Y="-40" Width="-11" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes" HexStyle="0x000009">#(loc.FilesInUseDontCloseRadioButton)</Button>
<Button Name="FilesInUseOkButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FilesInUseOkButton)</Button>
<Button Name="FilesInUseCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FilesInUseCancelButton)</Button>
</Page>
<Page Name="Progress">
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ProgressHeader)</Text>
<Text X="11" Y="121" Width="70" Height="17" FontId="3" DisablePrefix="yes">#(loc.ProgressLabel)</Text>
<Text Name="OverallProgressPackageText" X="85" Y="121" Width="-11" Height="17" FontId="3" DisablePrefix="yes">#(loc.OverallProgressPackageText)</Text>
<Progressbar Name="OverallCalculatedProgressbar" X="11" Y="143" Width="-11" Height="15" />
<Button Name="ProgressCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ProgressCancelButton)</Button>
</Page>
<Page Name="Modify">
<Text X="11" Y="80" Width="-11" Height="30" FontId="2" DisablePrefix="yes">#(loc.ModifyHeader)</Text>
<Button Name="RepairButton" X="-171" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.ModifyRepairButton)</Button>
<Button Name="UninstallButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyUninstallButton)</Button>
<Button Name="ModifyCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.ModifyCloseButton)</Button>
</Page>
<Page Name="Success">
<Text Name="SuccessHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessHeader)</Text>
<Text Name="SuccessInstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessInstallHeader)</Text>
<Text Name="SuccessRepairHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRepairHeader)</Text>
<Text Name="SuccessUninstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessUninstallHeader)</Text>
<Button Name="LaunchButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessLaunchButton)</Button>
<Text Name="SuccessRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.SuccessRestartText)</Text>
<Button Name="SuccessRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.SuccessRestartButton)</Button>
<Button Name="SuccessCancelButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.SuccessCloseButton)</Button>
</Page>
<Page Name="Failure">
<Text Name="FailureHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureHeader)</Text>
<Text Name="FailureInstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureInstallHeader)</Text>
<Text Name="FailureUninstallHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureUninstallHeader)</Text>
<Text Name="FailureRepairHeader" X="11" Y="80" Width="-11" Height="30" FontId="2" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRepairHeader)</Text>
<Hypertext Name="FailureLogFileLink" X="11" Y="121" Width="-11" Height="42" FontId="3" TabStop="yes" HideWhenDisabled="yes">#(loc.FailureHyperlinkLogText)</Hypertext>
<Hypertext Name="FailureMessageText" X="22" Y="163" Width="-11" Height="51" FontId="3" TabStop="yes" HideWhenDisabled="yes" />
<Text Name="FailureRestartText" X="-11" Y="-51" Width="400" Height="34" FontId="3" HideWhenDisabled="yes" DisablePrefix="yes">#(loc.FailureRestartText)</Text>
<Button Name="FailureRestartButton" X="-91" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0" HideWhenDisabled="yes">#(loc.FailureRestartButton)</Button>
<Button Name="FailureCloseButton" X="-11" Y="-11" Width="75" Height="23" TabStop="yes" FontId="0">#(loc.FailureCloseButton)</Button>
</Page>
</Theme>
``` | /content/code_sandbox/Source/src/WixSharp.Samples/Wix# Samples/Bootstrapper/WixBootstrapper/Theme.xml | xml | 2016-01-16T05:51:01 | 2024-08-16T12:26:25 | wixsharp | oleg-shilo/wixsharp | 1,077 | 2,535 |
```xml
<vector xmlns:android="path_to_url" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
<path android:pathData="M21 9V7h-2v2zM9 5V3H7v2zM5 21h14c1.1 0 2-0.9 2-2v-3c0-0.55-0.45-1-1-1s-1 0.45-1 1v2c0 0.55-0.45 1-1 1H6c-0.55 0-1-0.45-1-1v-2c0-0.55-0.45-1-1-1s-1 0.45-1 1v3c0 1.1 0.9 2 2 2zM3 5h2V3C3.9 3 3 3.9 3 5zm20 7c0-0.55-0.45-1-1-1H2c-0.55 0-1 0.45-1 1s0.45 1 1 1h20c0.55 0 1-0.45 1-1zm-6-7V3h-2v2zM5 9V7H3v2zm8-4V3h-2v2zm8 0c0-1.1-0.9-2-2-2v2z" android:fillColor="#FFFFFF"/>
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable/ic_flip_vertically_vector.xml | xml | 2016-02-16T21:17:13 | 2024-08-16T15:29:22 | Simple-Gallery | SimpleMobileTools/Simple-Gallery | 3,580 | 361 |
```xml
<UserControl x:Class="Aurora.Settings.Control_ProfileManager"
xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:mc="path_to_url"
xmlns:d="path_to_url"
xmlns:local="clr-namespace:Aurora.Settings"
mc:Ignorable="d"
d:DesignHeight="25">
<Grid>
<ComboBox x:Name="profiles_combobox" HorizontalAlignment="Left" Width="170" Margin="46,0,0,3" IsEditable="True" Height="23"/>
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="Profile:" VerticalAlignment="Top" Margin="0,3,0,0"/>
<Button x:Name="load_profile_button" Content="Load" HorizontalAlignment="Left" Margin="221,1,0,0" VerticalAlignment="Top" Width="50" Click="load_profile_button_Click"/>
<Button x:Name="save_profile_button" Content="Save" HorizontalAlignment="Left" Margin="276,1,0,0" VerticalAlignment="Top" Width="50" Click="save_profile_button_Click"/>
<Button x:Name="view_folder_button" Content="View Profile Folder" HorizontalAlignment="Left" Margin="391,1,0,0" Click="view_folder_button_Click" Width="110" VerticalAlignment="Top"/>
<TextBlock HorizontalAlignment="Left" Margin="507,3,0,0" TextWrapping="Wrap" VerticalAlignment="Top" RenderTransformOrigin="0.49,0.531"><Hyperlink NavigateUri="path_to_url" RequestNavigate="Hyperlink_RequestNavigate"><Run Text="Download Profiles"/></Hyperlink></TextBlock>
<Button x:Name="reset_profile_button" Content="Reset" HorizontalAlignment="Left" Margin="331,1,0,0" VerticalAlignment="Top" Width="50" Click="reset_profile_button_Click"/>
</Grid>
</UserControl>
``` | /content/code_sandbox/Project-Aurora/Project-Aurora/Settings/Control_ProfileManager_old.xaml | xml | 2016-04-04T05:18:18 | 2024-08-03T10:11:45 | Aurora | antonpup/Aurora | 1,824 | 421 |
```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<note>
<to>Users</to>
<from>Mark</from>
<heading>Reminder</heading>
<body>Don't forget PHPSpreadsheet Security!</body>
</note>
``` | /content/code_sandbox/tests/data/Reader/Xml/SecurityScannerWithCallbackExample.xml | xml | 2016-06-19T16:58:48 | 2024-08-16T14:51:45 | PhpSpreadsheet | PHPOffice/PhpSpreadsheet | 13,180 | 64 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!--
~
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<LinearLayout
xmlns:android="path_to_url"
xmlns:app="path_to_url"
android:id="@+id/bsp_time_picker_dialog"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:focusable="true">
<FrameLayout
android:id="@+id/bsp_time_display_background"
android:layout_width="@dimen/bsp_left_side_width"
android:layout_height="match_parent"
android:background="@android:color/white" >
<include
layout="@layout/bsp_time_header_label"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center" />
</FrameLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<com.philliphsu.bottomsheetpickers.time.grid.GridPickerLayout
android:id="@+id/bsp_time_picker"
android:layout_width="match_parent"
android:layout_height="@dimen/bsp_time_picker_pad_height"
android:layout_marginTop="@dimen/bsp_bottom_sheet_vertical_space"
android:layout_marginLeft="@dimen/bsp_bottom_sheet_edge_margin"
android:layout_marginStart="@dimen/bsp_bottom_sheet_edge_margin"
android:layout_marginRight="@dimen/bsp_bottom_sheet_edge_margin"
android:layout_marginEnd="@dimen/bsp_bottom_sheet_edge_margin" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/bsp_fab"
android:layout_gravity="center"
style="@style/BSP_GridTimePicker_FabStyle" />
</LinearLayout>
</LinearLayout>
``` | /content/code_sandbox/bottomsheetpickers/src/main/res/layout-land/bsp_dialog_time_picker_grid.xml | xml | 2016-10-06T01:20:05 | 2024-08-05T10:12:07 | BottomSheetPickers | philliphsu/BottomSheetPickers | 1,101 | 442 |
```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="node"/>
/// <reference types="@stdlib/types"/>
import { Readable } from 'stream';
import * as random from '@stdlib/types/random';
/**
* Interface defining stream options.
*/
interface Options {
/**
* Specifies whether a stream should operate in object mode (default: `false`).
*/
objectMode?: boolean;
/**
* Specifies how `Buffer` objects should be decoded to strings (default: `null`).
*/
encoding?: string | null;
/**
* Specifies the maximum number of bytes to store in an internal buffer before ceasing to generate additional pseudorandom numbers.
*/
highWaterMark?: number;
/**
* Separator used to join streamed data (default: `'\n'`).
*/
sep?: string;
/**
* Number of iterations.
*/
iter?: number;
/**
* Pseudorandom number generator which generates uniformly distributed pseudorandom numbers.
*/
prng?: random.PRNG;
/**
* Pseudorandom number generator seed.
*/
seed?: random.PRNGSeedMT19937;
/**
* Pseudorandom number generator state.
*/
state?: random.PRNGStateMT19937;
/**
* Specifies whether to copy a provided pseudorandom number generator state (default: `true`).
*/
copy?: boolean;
/**
* Number of iterations after which to emit the PRNG state.
*/
siter?: number;
}
/**
* Class for creating readable streams which generate a stream of pseudorandom numbers drawn from a Rayleigh distribution.
*/
declare class RandomStream extends Readable {
/**
* Returns a readable stream for generating a stream of pseudorandom numbers drawn from a Rayleigh distribution.
*
* @param sigma - scale parameter
* @param options - stream options
* @throws `sigma` must be a positive number
* @throws must provide valid options
* @throws must provide a valid state
* @returns stream instance
*
* @example
* var inspectStream = require( '@stdlib/streams/node/inspect-sink' );
*
* function log( chunk ) {
* console.log( chunk.toString() );
* }
*
* var opts = {
* 'iter': 10
* };
*
* var stream = new RandomStream( 0.7, opts );
*
* stream.pipe( inspectStream( log ) );
*/
constructor( p: number, options?: Options );
/**
* Destruction state.
*/
private readonly _destroyed: boolean;
/**
* Flag indicating whether a stream is operating in object mode.
*/
private readonly _objectMode: boolean;
/**
* Data separator.
*/
private readonly _sep: string;
/**
* Total number of iterations.
*/
private readonly _iter: number;
/**
* Number of iterations after which to emit the underlying PRNG state.
*/
private readonly _siter: number;
/**
* Iteration counter.
*/
private _i: number;
/**
* Pseudorandom number generator for generating Rayleigh distributed pseudorandom numbers.
*/
private readonly _prng: random.PRNG;
/**
* Underlying PRNG.
*/
readonly PRNG: random.PRNG;
/**
* PRNG seed.
*/
readonly seed: random.PRNGSeedMT19937;
/**
* PRNG seed length.
*/
readonly seedLength: number;
/**
* PRNG state.
*/
state: random.PRNGStateMT19937;
/**
* PRNG state length.
*/
readonly stateLength: number;
/**
* PRNG state size (in bytes).
*/
readonly byteLength: number;
/**
* Implements the `_read` method.
*
* @param size - number (of bytes) to read
*/
_read( size: number ): void;
/**
* Gracefully destroys a stream, providing backward compatibility.
*
* @param error - error
*
* @example
* var stream = new RandomStream( 0.7 );
* stream.on( 'error', onError );
*
* function onError( err ) {
* stream.destroy( err );
* }
*/
destroy( error?: Error ): void;
}
/**
* Interface defining a stream constructor which is both "newable" and "callable".
*/
interface Constructor {
/**
* Returns a readable stream for generating a stream of pseudorandom numbers drawn from a Rayleigh distribution.
*
* @param sigma - scale parameter
* @param options - stream options
* @throws `sigma` must be a positive number
* @throws must provide valid options
* @throws must provide a valid state
* @returns stream instance
*
* @example
* var inspectStream = require( '@stdlib/streams/node/inspect-sink' );
*
* function log( chunk ) {
* console.log( chunk.toString() );
* }
*
* var opts = {
* 'iter': 10
* };
*
* var stream = new RandomStream( 0.7, opts );
*
* stream.pipe( inspectStream( log ) );
*/
new( p: number, options?: Options ): RandomStream; // newable
/**
* Returns a readable stream for generating a stream of pseudorandom numbers drawn from a Rayleigh distribution.
*
* @param sigma - scale parameter
* @param options - stream options
* @throws `sigma` must be a positive number
* @throws must provide valid options
* @throws must provide a valid state
* @returns stream instance
*
* @example
* var inspectStream = require( '@stdlib/streams/node/inspect-sink' );
*
* function log( chunk ) {
* console.log( chunk.toString() );
* }
*
* var opts = {
* 'iter': 10
* };
*
* var stream = randomStream( 0.7, opts );
*
* stream.pipe( inspectStream( log ) );
*/
( p: number, options?: Options ): RandomStream; // callable
/**
* Returns a function for creating readable streams which generate pseudorandom numbers drawn from a Rayleigh distribution.
*
* @param sigma - scale parameter
* @param options - stream options
* @throws `sigma` must be a positive number
* @returns factory function
*
* @example
* var opts = {
* 'sep': ',',
* 'objectMode': false,
* 'encoding': 'utf8',
* 'highWaterMark': 64
* };
*
* var createStream = RandomStream.factory( 0.7, opts );
*
* // Create 10 identically configured streams...
* var streams = [];
* var i;
* for ( i = 0; i < 10; i++ ) {
* streams.push( createStream() );
* }
*/
factory( p: number, options?: Options ): ( ...args: Array<any> ) => RandomStream;
/**
* Returns a function for creating readable streams which generate pseudorandom numbers drawn from a Rayleigh distribution.
*
* @param options - stream options
* @returns factory function
*
* @example
* var opts = {
* 'sep': ',',
* 'objectMode': false,
* 'encoding': 'utf8',
* 'highWaterMark': 64
* };
*
* var createStream = RandomStream.factory( opts );
*
* // Create 10 identically configured streams...
* var streams = [];
* var i;
* for ( i = 0; i < 10; i++ ) {
* streams.push( createStream( 0.7 ) );
* }
*/
factory( options?: Options ): ( p: number ) => RandomStream;
/**
* Returns an "objectMode" readable stream for generating a stream of pseudorandom numbers drawn from a Rayleigh distribution.
*
* @param sigma - scale parameter
* @param options - stream options
* @throws `sigma` must be a positive number
* @throws must provide valid options
* @throws must provide a valid state
* @returns stream instance
*
* @example
* var inspectStream = require( '@stdlib/streams/node/inspect-sink' );
*
* function log( v ) {
* console.log( v );
* }
*
* var opts = {
* 'iter': 10
* };
*
* var stream = RandomStream.objectMode( 0.7, opts );
*
* stream.pipe( inspectStream.objectMode( log ) );
*/
objectMode( p: number, options?: Options ): RandomStream;
}
/**
* Returns a readable stream for generating a stream of pseudorandom numbers drawn from a Rayleigh distribution.
*
* @param sigma - scale parameter
* @param options - stream options
* @throws `sigma` must be a positive number
* @throws must provide valid options
* @throws must provide a valid state
* @returns stream instance
*
* @example
* var inspectStream = require( '@stdlib/streams/node/inspect-sink' );
*
* function log( chunk ) {
* console.log( chunk.toString() );
* }
*
* var opts = {
* 'iter': 10
* };
*
* var stream = randomStream( 0.7, opts );
*
* stream.pipe( inspectStream( log ) );
*
* @example
* var inspectStream = require( '@stdlib/streams/node/inspect-sink' );
*
* function log( chunk ) {
* console.log( chunk.toString() );
* }
*
* var opts = {
* 'iter': 10
* };
*
* var RandomStream = randomStream;
* var stream = new RandomStream( 0.7, opts );
*
* stream.pipe( inspectStream( log ) );
*
* @example
* var inspectStream = require( '@stdlib/streams/node/inspect-sink' );
*
* function log( v ) {
* console.log( v );
* }
*
* var opts = {
* 'iter': 10
* };
*
* var stream = randomStream.objectMode( 0.7, opts );
*
* stream.pipe( inspectStream.objectMode( log ) );
*
* @example
* var opts = {
* 'sep': ',',
* 'objectMode': false,
* 'encoding': 'utf8',
* 'highWaterMark': 64
* };
*
* var createStream = randomStream.factory( 0.7, opts );
*
* // Create 10 identically configured streams...
* var streams = [];
* var i;
* for ( i = 0; i < 10; i++ ) {
* streams.push( createStream() );
* }
*
* @example
* var opts = {
* 'sep': ',',
* 'objectMode': false,
* 'encoding': 'utf8',
* 'highWaterMark': 64
* };
*
* var createStream = randomStream.factory( opts );
*
* // Create 10 identically configured streams...
* var streams = [];
* var i;
* for ( i = 0; i < 10; i++ ) {
* streams.push( createStream( 0.7 ) );
* }
*/
declare var randomStream: Constructor;
// EXPORTS //
export = randomStream;
``` | /content/code_sandbox/lib/node_modules/@stdlib/random/streams/rayleigh/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 2,608 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<definitions
xmlns="path_to_url"
xmlns:activiti="path_to_url"
targetNamespace="Examples">
<process id="historicProcessLocalization" name="Historic Process Name">
<documentation>Historic Process Description</documentation>
<startEvent id="theStart" />
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="theProcessTask" />
<userTask id="theProcessTask" name="my process task" />
<sequenceFlow id="flow2" sourceRef="theProcessTask" targetRef="theEnd" />
<endEvent id="theEnd" />
</process>
</definitions>
``` | /content/code_sandbox/modules/flowable5-test/src/test/resources/org/activiti/engine/test/api/history/HistoricProcessInstanceQueryTest.testLocalization.bpmn20.xml | xml | 2016-10-13T07:21:43 | 2024-08-16T15:23:14 | flowable-engine | flowable/flowable-engine | 7,715 | 162 |
```xml
export default class Utilities {
private static validExtensions: string[] = ["csv", "doc", "docx", "odp", "ods", "odt", "pot", "potm", "potx", "pps", "ppsx", "ppsxm", "ppt", "pptm", "pptx", "rtf", "xls", "xlsx"];
public static getFileExtension(fileName: string) {
if (fileName.indexOf('.') > 0) {
const extensions = fileName.split('.');
const fileExtension = extensions[extensions.length - 1];
return fileExtension;
}
}
public static getFileNameAsPDF(fileName: string) {
const orgExtension = this.getFileExtension(fileName);
const extensionStarts = fileName.lastIndexOf(orgExtension);
const namePart = fileName.substr(0, extensionStarts);
return namePart + `pdf`;
}
public static validFileExtension(fileName: string) {
const orgExtension = this.getFileExtension(fileName);
if (this.validExtensions.indexOf(orgExtension) > -1) {
return true;
}
else {
return false;
}
}
}
``` | /content/code_sandbox/samples/react-teams-graph-upload-as-pdf/src/services/Utilities.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 242 |
```xml
import {
Column,
Entity,
PrimaryGeneratedColumn,
TableInheritance,
} from "../../../../src"
@Entity()
@TableInheritance({ column: { type: String, name: "type" } })
export class Contact {
@PrimaryGeneratedColumn()
id: number
@Column()
userId: number
@Column()
value: string
}
``` | /content/code_sandbox/test/github-issues/7065/entity/Contact.ts | xml | 2016-02-29T07:41:14 | 2024-08-16T18:28:52 | typeorm | typeorm/typeorm | 33,875 | 78 |
```xml
import * as React from 'react';
import cx from 'classnames';
import { createSvgIcon } from '../utils/createSvgIcon';
import { iconClassNames } from '../utils/iconClassNames';
export const MeetingNewIcon = createSvgIcon({
svg: ({ classes }) => (
<svg
style={{ overflow: 'visible' }}
role="presentation"
focusable="false"
viewBox="2 2 16 16"
className={classes.svg}
>
<g className={cx(iconClassNames.outline, classes.outlinePart)}>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M14.5 3C15.8807 3 17 4.11929 17 5.5V9.59971C16.6832 9.43777 16.3486 9.30564 16 9.20703V7H4V14.5C4 15.3284 4.67157 16 5.5 16H9.20703C9.30564 16.3486 9.43777 16.6832 9.59971 17H5.5C4.11929 17 3 15.8807 3 14.5V5.5C3 4.11929 4.11929 3 5.5 3H14.5ZM14.5 4H5.5C4.67157 4 4 4.67157 4 5.5V6H16V5.5C16 4.67157 15.3284 4 14.5 4Z"
/>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M19 14.5C19 16.9853 16.9853 19 14.5 19C12.0147 19 10 16.9853 10 14.5C10 12.0147 12.0147 10 14.5 10C16.9853 10 19 12.0147 19 14.5ZM15 12.5C15 12.2239 14.7761 12 14.5 12C14.2239 12 14 12.2239 14 12.5V14H12.5C12.2239 14 12 14.2239 12 14.5C12 14.7761 12.2239 15 12.5 15H14V16.5C14 16.7761 14.2239 17 14.5 17C14.7761 17 15 16.7761 15 16.5V15H16.5C16.7761 15 17 14.7761 17 14.5C17 14.2239 16.7761 14 16.5 14H15V12.5Z"
/>
</g>
<g className={cx(iconClassNames.filled, classes.filledPart)}>
<path d="M17 7V9.59971C16.2499 9.21628 15.4002 9 14.5 9C11.4624 9 9 11.4624 9 14.5C9 15.4002 9.21628 16.2499 9.59971 17H5.5C4.11929 17 3 15.8807 3 14.5V7H17Z" />
<path d="M14.5 3C15.8807 3 17 4.11929 17 5.5V6H3V5.5C3 4.11929 4.11929 3 5.5 3H14.5Z" />
<path
fillRule="evenodd"
clipRule="evenodd"
d="M19 14.5C19 16.9853 16.9853 19 14.5 19C12.0147 19 10 16.9853 10 14.5C10 12.0147 12.0147 10 14.5 10C16.9853 10 19 12.0147 19 14.5ZM15 12.5C15 12.2239 14.7761 12 14.5 12C14.2239 12 14 12.2239 14 12.5V14H12.5C12.2239 14 12 14.2239 12 14.5C12 14.7761 12.2239 15 12.5 15H14V16.5C14 16.7761 14.2239 17 14.5 17C14.7761 17 15 16.7761 15 16.5V15H16.5C16.7761 15 17 14.7761 17 14.5C17 14.2239 16.7761 14 16.5 14H15V12.5Z"
/>
</g>
</svg>
),
displayName: 'MeetingNewIcon',
});
``` | /content/code_sandbox/packages/fluentui/react-icons-northstar/src/components/MeetingNewIcon.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 1,189 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!--
~
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<resources>
<string name="material_slider_range_start">Oraliq boshi</string>
<string name="material_slider_range_end">Oraliq oxiri</string>
<string name="material_slider_value">Qiymat</string>
</resources>
``` | /content/code_sandbox/lib/java/com/google/android/material/slider/res/values-uz/strings.xml | xml | 2016-12-05T16:11:29 | 2024-08-16T17:51:42 | material-components-android | material-components/material-components-android | 16,176 | 120 |
```xml
import { ImageLoadState } from '@fluentui/react';
import type { ISlotProp } from '@fluentui/foundation-legacy';
import type { IPersonaCoinProps } from '../PersonaCoin.types';
export type IPersonaCoinImageSlot = ISlotProp<IPersonaCoinImageProps>;
export interface IPersonaCoinImageProps {
src?: string;
className?: string;
dimension?: IPersonaCoinProps['size'];
imageAlt?: string;
onPhotoLoadingStateChange?: (loadState: ImageLoadState) => void;
imageShouldFadeIn?: boolean;
imageShouldStartVisible?: boolean;
}
``` | /content/code_sandbox/packages/react-experiments/src/components/PersonaCoin/PersonaCoinImage/PersonaCoinImage.types.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 137 |
```xml
import { Channel } from './channel';
/**
* This class represents a null channel.
*/
export class NullChannel extends Channel {
/**
* Subscribe to a channel.
*/
subscribe(): any {
//
}
/**
* Unsubscribe from a channel.
*/
unsubscribe(): void {
//
}
/**
* Listen for an event on the channel instance.
*/
listen(event: string, callback: Function): NullChannel {
return this;
}
/**
* Listen for all events on the channel instance.
*/
listenToAll(callback: Function): NullChannel {
return this;
}
/**
* Stop listening for an event on the channel instance.
*/
stopListening(event: string, callback?: Function): NullChannel {
return this;
}
/**
* Register a callback to be called anytime a subscription succeeds.
*/
subscribed(callback: Function): NullChannel {
return this;
}
/**
* Register a callback to be called anytime an error occurs.
*/
error(callback: Function): NullChannel {
return this;
}
/**
* Bind a channel to an event.
*/
on(event: string, callback: Function): NullChannel {
return this;
}
}
``` | /content/code_sandbox/src/channel/null-channel.ts | xml | 2016-04-30T01:56:59 | 2024-08-14T13:07:58 | echo | laravel/echo | 1,153 | 266 |
```xml
import { EnvironmentId } from '@/react/portainer/environments/types';
import { TagId } from '@/portainer/tags/types';
export interface FormValues {
name: string;
dynamic: boolean;
environmentIds: EnvironmentId[];
partialMatch: boolean;
tagIds: TagId[];
}
``` | /content/code_sandbox/app/react/edge/edge-groups/components/EdgeGroupForm/types.tsx | xml | 2016-05-19T20:15:28 | 2024-08-16T19:15:14 | portainer | portainer/portainer | 30,083 | 63 |
```xml
import { type FC } from 'react';
import { c } from 'ttag';
import { Button } from '@proton/atoms/Button';
import createItemArrow from '@proton/pass/assets/b2b-onboarding/create-arrow.svg';
export const OnboardingArrow: FC = () => {
return (
<div className="relative flex flex-nowrap items-end">
<Button pill shape="outline" color="norm" className="border-primary pointer-events-none">{c('Action')
.t`Create new items`}</Button>
<img src={createItemArrow} alt="" className="pb-4" />
</div>
);
};
``` | /content/code_sandbox/packages/pass/components/Onboarding/Panel/OnboardingArrow.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 137 |
```xml
import { IReadonlyTheme } from "@microsoft/sp-component-base";
import { DisplayMode } from "@microsoft/sp-core-library";
export interface IListItemsMenuProps {
title: string;
listId:string;
listBaseTemplate:number;
fieldName:string;
locale:string;
themeVariant: IReadonlyTheme | undefined;
onConfigure: () => void;
displayMode: DisplayMode;
updateProperty: (value: string) => void;
}
``` | /content/code_sandbox/samples/react-list-items-menu/src/components/IListItemsMenuProps.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 99 |
```xml
import type { Disposable } from 'vscode';
import { MarkdownString, TreeItem, TreeItemCollapsibleState } from 'vscode';
import { GlyphChars } from '../../../constants';
import type { GitUri } from '../../../git/gitUri';
import { getHighlanderProviders } from '../../../git/models/remote';
import type { RepositoryChangeEvent } from '../../../git/models/repository';
import { Repository, RepositoryChange, RepositoryChangeComparisonMode } from '../../../git/models/repository';
import { gate } from '../../../system/decorators/gate';
import { debug, log } from '../../../system/decorators/log';
import { weakEvent } from '../../../system/event';
import { basename } from '../../../system/path';
import { pad } from '../../../system/string';
import type { View } from '../../viewBase';
import { SubscribeableViewNode } from './subscribeableViewNode';
import type { ViewNode } from './viewNode';
import { ContextValues, getViewNodeId } from './viewNode';
export abstract class RepositoryFolderNode<
TView extends View = View,
TChild extends ViewNode = ViewNode,
> extends SubscribeableViewNode<'repo-folder', TView> {
protected override splatted = true;
constructor(
uri: GitUri,
view: TView,
protected override readonly parent: ViewNode,
public readonly repo: Repository,
splatted: boolean,
private readonly options?: { showBranchAndLastFetched?: boolean },
) {
super('repo-folder', uri, view, parent);
this.updateContext({ repository: this.repo });
this._uniqueId = getViewNodeId(this.type, this.context);
this.splatted = splatted;
}
private _child: TChild | undefined;
protected get child(): TChild | undefined {
return this._child;
}
protected set child(value: TChild | undefined) {
if (this._child === value) return;
this._child?.dispose();
this._child = value;
}
override dispose() {
super.dispose();
this.child = undefined;
}
override get id(): string {
return this._uniqueId;
}
override toClipboard(): string {
return this.repo.path;
}
get repoPath(): string {
return this.repo.path;
}
async getTreeItem(): Promise<TreeItem> {
this.splatted = false;
const branch = await this.repo.getBranch();
const ahead = (branch?.state.ahead ?? 0) > 0;
const behind = (branch?.state.behind ?? 0) > 0;
const expand = ahead || behind || this.repo.starred || this.view.container.git.isRepositoryForEditor(this.repo);
let label = this.repo.formattedName ?? this.uri.repoPath ?? '';
if (this.options?.showBranchAndLastFetched && branch != null) {
const remove = `: ${basename(branch.name)}`;
const suffix = `: ${branch.name}`;
if (label.endsWith(remove)) {
label = label.substring(0, label.length - remove.length) + suffix;
} else if (!label.endsWith(suffix)) {
label += suffix;
}
}
const item = new TreeItem(
label,
expand ? TreeItemCollapsibleState.Expanded : TreeItemCollapsibleState.Collapsed,
);
item.contextValue = `${ContextValues.RepositoryFolder}${this.repo.starred ? '+starred' : ''}`;
if (ahead) {
item.contextValue += '+ahead';
}
if (behind) {
item.contextValue += '+behind';
}
if (this.view.type === 'commits' && this.view.state.filterCommits.get(this.repo.id)?.length) {
item.contextValue += '+filtered';
}
if (branch != null && this.options?.showBranchAndLastFetched) {
const lastFetched = (await this.repo.getLastFetched()) ?? 0;
const status = branch.getTrackingStatus();
if (status) {
item.description = status;
if (lastFetched) {
item.description += pad(GlyphChars.Dot, 1, 1);
}
}
if (lastFetched) {
item.description = `${item.description ?? ''}Last fetched ${Repository.formatLastFetched(lastFetched)}`;
}
let providerName;
if (branch.upstream != null) {
const providers = getHighlanderProviders(
await this.view.container.git.getRemotesWithProviders(branch.repoPath),
);
providerName = providers?.length ? providers[0].name : undefined;
} else {
const remote = await branch.getRemote();
providerName = remote?.provider?.name;
}
item.tooltip = new MarkdownString(
`${this.repo.formattedName ?? this.uri.repoPath ?? ''}${
lastFetched
? `${pad(GlyphChars.Dash, 2, 2)}Last fetched ${Repository.formatLastFetched(
lastFetched,
false,
)}`
: ''
}${this.repo.formattedName ? `\n${this.uri.repoPath}` : ''}\n\nCurrent branch $(git-branch) ${
branch.name
}${
branch.upstream != null
? ` is ${branch.getTrackingStatus({
empty: branch.upstream.missing
? `missing upstream $(git-branch) ${branch.upstream.name}`
: `up to date with $(git-branch) ${branch.upstream.name}${
providerName ? ` on ${providerName}` : ''
}`,
expand: true,
icons: true,
separator: ', ',
suffix: ` $(git-branch) ${branch.upstream.name}${
providerName ? ` on ${providerName}` : ''
}`,
})}`
: `hasn't been published to ${providerName ?? 'a remote'}`
}`,
true,
);
} else {
item.tooltip = this.repo.formattedName
? `${this.repo.formattedName}\n${this.uri.repoPath}`
: this.uri.repoPath ?? '';
}
return item;
}
override async getSplattedChild() {
if (this.child == null) {
await this.getChildren();
}
return this.child;
}
@gate()
@debug()
override async refresh(reset: boolean = false) {
super.refresh(reset);
await this.child?.triggerChange(reset, false, this);
await this.ensureSubscription();
}
@log()
async star() {
await this.repo.star();
// void this.parent!.triggerChange();
}
@log()
async unstar() {
await this.repo.unstar();
// void this.parent!.triggerChange();
}
@debug()
protected subscribe(): Disposable | Promise<Disposable> {
return weakEvent(this.repo.onDidChange, this.onRepositoryChanged, this);
}
protected override etag(): number {
return this.repo.etag;
}
protected abstract changed(e: RepositoryChangeEvent): boolean;
@debug<RepositoryFolderNode['onRepositoryChanged']>({ args: { 0: e => e.toString() } })
private onRepositoryChanged(e: RepositoryChangeEvent) {
if (e.changed(RepositoryChange.Closed, RepositoryChangeComparisonMode.Any)) {
this.dispose();
void this.parent?.triggerChange(true);
return;
}
if (
e.changed(RepositoryChange.Opened, RepositoryChangeComparisonMode.Any) ||
e.changed(RepositoryChange.Starred, RepositoryChangeComparisonMode.Any)
) {
void this.parent?.triggerChange(true);
return;
}
if (this.changed(e)) {
// If we are sorting by last fetched, then we need to trigger the parent to resort
const node = !this.loaded || this.repo.orderByLastFetched ? this.parent ?? this : this;
void node.triggerChange(true);
}
}
}
``` | /content/code_sandbox/src/views/nodes/abstract/repositoryFolderNode.ts | xml | 2016-08-08T14:50:30 | 2024-08-15T21:25:09 | vscode-gitlens | gitkraken/vscode-gitlens | 8,889 | 1,700 |
```xml
import * as React from 'react';
import { mount } from '@cypress/react';
import type {} from '@cypress/react';
import { FluentProvider } from '@fluentui/react-provider';
import { webLightTheme } from '@fluentui/react-theme';
import { MoreHorizontalRegular, MoreHorizontalFilled, bundleIcon } from '@fluentui/react-icons';
import { Breadcrumb } from './Breadcrumb';
import { BreadcrumbItem } from '../BreadcrumbItem';
import { BreadcrumbButton } from '../BreadcrumbButton';
import { BreadcrumbDivider } from '../BreadcrumbDivider';
import { partitionBreadcrumbItems } from '../../utils';
import type { BreadcrumbProps } from './Breadcrumb.types';
import type { PartitionBreadcrumbItems } from '../../utils';
import { Button } from '@fluentui/react-button';
import { Menu, MenuList, MenuItemLink, MenuPopover, MenuTrigger, MenuItem } from '@fluentui/react-menu';
import { useIsOverflowItemVisible, useOverflowMenu } from '@fluentui/react-overflow';
const MoreHorizontal = bundleIcon(MoreHorizontalFilled, MoreHorizontalRegular);
const mountFluent = (element: JSX.Element) => {
mount(<FluentProvider theme={webLightTheme}>{element}</FluentProvider>);
};
const mapHelper = new Array(7).fill(0).map((_, i) => i);
type Item = {
key: number;
id: string;
item?: string;
href?: string;
};
const OverflowMenu: React.FC<{ id: string; item: Item; link?: boolean }> = props => {
const { item, id, link = false } = props;
const isVisible = useIsOverflowItemVisible(id);
if (isVisible) {
return null;
}
return link ? (
<MenuItemLink href={item.href || ''} id={item.id}>
{item.item}
</MenuItemLink>
) : (
<MenuItem id={item.id}>{item.item}</MenuItem>
);
};
function renderElement(el: Item, isLastItem: boolean = false) {
return (
<React.Fragment key={`items-${el.key}`}>
<BreadcrumbItem>
<BreadcrumbButton id={el.id} current={isLastItem}>
{el.item}
</BreadcrumbButton>
</BreadcrumbItem>
{!isLastItem && <BreadcrumbDivider />}
</React.Fragment>
);
}
const ControlledOverflowMenu = (props: PartitionBreadcrumbItems<Item>) => {
const { overflowItems, startDisplayedItems, endDisplayedItems } = props;
const { ref, isOverflowing, overflowCount } = useOverflowMenu<HTMLButtonElement>();
if (!isOverflowing && overflowItems && overflowItems.length === 0) {
return null;
}
return (
<Menu hasIcons>
<MenuTrigger disableButtonEnhancement>
<Button
id="menu"
appearance="transparent"
ref={ref}
icon={<MoreHorizontal />}
aria-label={`${overflowCount} more tabs`}
role="tab"
/>
</MenuTrigger>
<MenuPopover>
<MenuList>
{isOverflowing &&
startDisplayedItems.map((item: Item) => (
<OverflowMenu id={item.key.toString()} item={item} key={item.key} />
))}
{overflowItems && overflowItems.map((item: Item) => <OverflowMenu id={item.id} item={item} key={item.key} />)}
{isOverflowing &&
endDisplayedItems &&
endDisplayedItems.map((item: Item) => <OverflowMenu id={item.id} item={item} key={item.key} />)}
</MenuList>
</MenuPopover>
</Menu>
);
};
const BreadcrumbSampleWithMenu = (props: BreadcrumbProps) => {
const buttonItems = mapHelper.map(i => ({
key: i,
id: `breadcrumb-button-${i}`,
item: `Item ${i}`,
}));
const { startDisplayedItems, overflowItems, endDisplayedItems }: PartitionBreadcrumbItems<Item> =
partitionBreadcrumbItems({
items: buttonItems,
maxDisplayedItems: 4,
});
return (
<>
<p tabIndex={0} id="before">
Before
</p>
<Breadcrumb {...props}>
{startDisplayedItems.map((item: Item) => renderElement(item))}
<ControlledOverflowMenu
overflowItems={overflowItems}
startDisplayedItems={startDisplayedItems}
endDisplayedItems={endDisplayedItems}
/>
<BreadcrumbDivider />
{endDisplayedItems &&
endDisplayedItems.map((item: Item) => {
const isLastItem = item.key === buttonItems.length - 1;
return renderElement(item, isLastItem);
})}
</Breadcrumb>
<p tabIndex={0} id="after">
After
</p>
</>
);
};
describe('Breadcrumb with Overflow', () => {
describe('focus behaviors for BreadcrumbButton with Menu', () => {
describe('focusMode="tab"(default)', () => {
it('should be focusable', () => {
mountFluent(<BreadcrumbSampleWithMenu />);
cy.get('#before').focus();
cy.get('#breadcrumb-button-0').should('not.be.focused');
cy.realPress('Tab');
cy.get('#breadcrumb-button-0').should('be.focused');
cy.realPress('Tab');
cy.get('#menu').should('be.focused');
cy.realPress('Enter');
cy.get('#breadcrumb-button-1').should('be.focused');
cy.realPress('ArrowDown');
cy.get('#breadcrumb-button-2').should('be.focused');
cy.realPress('ArrowDown');
cy.get('#breadcrumb-button-3').should('be.focused');
cy.realPress('ArrowDown');
cy.get('#breadcrumb-button-1').should('be.focused');
cy.realPress('Escape');
cy.get('#menu').should('be.focused');
cy.realPress('Tab');
cy.get('#breadcrumb-button-4').should('be.focused');
cy.realPress('Tab');
cy.realPress('Tab');
cy.realPress('Tab');
cy.get('#after').focus();
});
});
describe('focusMode="arrow"', () => {
it('should be focusable', () => {
mountFluent(<BreadcrumbSampleWithMenu focusMode="arrow" />);
cy.get('#before').focus();
cy.get('#breadcrumb-button-0').should('not.be.focused');
cy.realPress('Tab');
cy.get('#breadcrumb-button-0').should('be.focused');
cy.realPress('ArrowRight');
cy.get('#menu').should('be.focused');
cy.realPress('Enter');
cy.get('#breadcrumb-button-1').should('be.focused');
cy.realPress('ArrowDown');
cy.get('#breadcrumb-button-2').should('be.focused');
cy.realPress('ArrowDown');
cy.get('#breadcrumb-button-3').should('be.focused');
cy.realPress('ArrowDown');
cy.get('#breadcrumb-button-1').should('be.focused');
cy.realPress('Escape');
cy.get('#menu').should('be.focused');
cy.realPress('ArrowRight');
cy.get('#breadcrumb-button-4').should('be.focused');
cy.realPress('ArrowRight');
cy.realPress('ArrowRight');
cy.realPress('ArrowRight');
cy.get('#after').focus();
});
});
});
});
``` | /content/code_sandbox/packages/react-components/react-breadcrumb/library/src/components/Breadcrumb/BreadcrumbWithMenu.cy.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 1,593 |
```xml
import {IScope} from '../program';
import {CodeTemplate, CTemplateBase} from '../template';
import {CString} from './literals';
import {RegexBuilder, RegexMachine, RegexState, RegexStateTransition, isRangeCondition} from '../regex';
import {CExpression} from './expressions';
@CodeTemplate(`
struct regex_match_struct_t {regexName}_search(const char *str, int16_t capture) {
int16_t state = 0, next = -1, iterator, len = strlen(str), index = 0, end = -1;
struct regex_match_struct_t result;
{#if hasChars}
char ch;
{/if}
{#if groupNumber}
int16_t started[{groupNumber}];
if (capture) {
result.matches = malloc({groupNumber} * sizeof(*result.matches));
assert(result.matches != NULL);
regex_clear_matches(&result, {groupNumber});
memset(started, 0, sizeof started);
}
{/if}
for (iterator = 0; iterator < len; iterator++) {
{#if hasChars}
ch = str[iterator];
{/if}
{stateBlocks}
if (next == -1) {
if ({finals { || }=> state == {this}})
break;
iterator = index;
index++;
state = 0;
end = -1;
{#if groupNumber}
if (capture) {
regex_clear_matches(&result, {groupNumber});
memset(started, 0, sizeof started);
}
{/if}
} else {
state = next;
next = -1;
}
if (iterator == len-1 && index < len-1 && {finals { && }=> state != {this}}) {
if (end > -1)
break;
iterator = index;
index++;
state = 0;
{#if groupNumber}
if (capture) {
regex_clear_matches(&result, {groupNumber});
memset(started, 0, sizeof started);
}
{/if}
}
}
if (end == -1 && {finals { && }=> state != {this}})
index = -1;
result.index = index;
result.end = end == -1 ? iterator : end;
result.matches_count = {groupNumber};
return result;
}
struct regex_struct_t {regexName} = { {templateString}, {regexName}_search };
`)
export class CRegexSearchFunction extends CTemplateBase {
public hasChars: boolean;
public finals: string[];
public templateString: CString;
public stateBlocks: CStateBlock[] = [];
public groupNumber: number = 0;
public gcVarName: string;
constructor(scope: IScope, template: string, public regexName: string, regexMachine: RegexMachine = null) {
super();
this.templateString = new CString(scope, template.replace(/\\/g,'\\\\').replace(/"/g, '\\"'));
if (/\/[a-z]+$/.test(template))
throw new Error("Flags not supported in regex literals yet (" + template + ").");
regexMachine = regexMachine || RegexBuilder.build(template.slice(1, -1));
let max = (arr, func) => arr && arr.reduce((acc, t) => Math.max(acc, func(t), 0), 0) || 0;
this.groupNumber = max(regexMachine.states, s => max(s.transitions, t => max(t.startGroup, g => g)));
this.hasChars = regexMachine.states.filter(s => s && s.transitions.filter(c => typeof c.condition == "string" || isRangeCondition(c.condition) || c.condition.tokens.length > 0)).length > 0;
for (let s = 0; s < regexMachine.states.length; s++) {
if (regexMachine.states[s] == null || regexMachine.states[s].transitions.length == 0)
continue;
this.stateBlocks.push(new CStateBlock(scope, s+"", regexMachine.states[s], this.groupNumber));
}
this.finals = regexMachine.states.length > 0 ? regexMachine.states.map((s, i) => s.final ? i : -1).filter(f => f > -1).map(f => f+"") : ["-1"];
if (this.groupNumber > 0)
scope.root.headerFlags.malloc = true;
scope.root.headerFlags.strings = true;
scope.root.headerFlags.bool = true;
}
}
@CodeTemplate(`
if (state == {stateNumber}) {
{#if final}
end = iterator;
{/if}
{conditions {\n}=> {this}}
{#if groupNumber && groupsToReset.length}
if (capture && next == -1) {
{groupsToReset {\n }=> started[{this}] = 0;}
}
{/if}
}
`)
class CStateBlock extends CTemplateBase {
public conditions: CharCondition[] = [];
public groupsToReset: string[] = [];
public final: boolean;
constructor(scope: IScope, public stateNumber: string, state: RegexState, public groupNumber: number) {
super();
this.final = state.final;
let allGroups = [];
state.transitions.forEach(t => allGroups = allGroups.concat(t.startGroup || []).concat(t.endGroup || []));
for (var i = 0; i < groupNumber; i++)
if (allGroups.indexOf(i+1) == -1)
this.groupsToReset.push(i+"");
for (let tr of state.transitions) {
this.conditions.push(new CharCondition(tr, groupNumber));
}
}
}
@CodeTemplate(`
{#if anyCharExcept}
if (next == -1 && {except { && }=> ch != '{this}'}{fixedConditions}) {nextCode}
{#elseif anyChar}
if (next == -1{fixedConditions}) {nextCode}
{#elseif charClass}
if (ch >= '{chFrom}' && ch <= '{ch}'{fixedConditions}) {nextCode}
{#else}
if (ch == '{ch}'{fixedConditions}) {nextCode}
{/if}`)
class CharCondition extends CTemplateBase {
public anyCharExcept: boolean = false;
public anyChar: boolean = false;
public charClass: boolean = false;
public chFrom: string;
public ch: string;
public except: string[];
public fixedConditions: string = '';
public nextCode;
constructor(tr: RegexStateTransition, groupN: number) {
super();
if (tr.fixedStart)
this.fixedConditions = " && iterator == 0";
else if (tr.fixedEnd)
this.fixedConditions = " && iterator == len - 1";
if (typeof tr.condition === "string")
this.ch = tr.condition.replace('\\','\\\\').replace("'","\\'");
else if (isRangeCondition(tr.condition)) {
this.charClass = true;
this.chFrom = tr.condition.fromChar;
this.ch = tr.condition.toChar;
}
else if (tr.condition.tokens.length) {
this.anyCharExcept = true;
this.except = tr.condition.tokens.map(ch => (<string>ch).replace('\\','\\\\').replace("'","\\'"));
} else
this.anyChar = true;
let groupCaptureCode = '';
for (var g of tr.startGroup || [])
groupCaptureCode += " if (capture && (!started[" + (g-1) + "] || iterator > result.matches[" + (g-1) + "].end)) { started[" + (g-1) + "] = 1; result.matches[" + (g-1) + "].index = iterator; }";
for (var g of tr.endGroup || [])
groupCaptureCode += " if (capture && started[" + (g-1) + "]) result.matches[" + (g-1) + "].end = iterator + 1;";
this.nextCode = "next = " + tr.next + ";";
if (groupCaptureCode)
this.nextCode = "{ " + this.nextCode + groupCaptureCode + " }";
}
}
@CodeTemplate(`{expression}.str`)
export class CRegexAsString extends CTemplateBase {
constructor (public expression: CExpression) { super(); }
}
``` | /content/code_sandbox/src/nodes/regexfunc.ts | xml | 2016-07-24T23:05:37 | 2024-08-12T19:23:59 | ts2c | andrei-markeev/ts2c | 1,252 | 1,786 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.