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 React from 'react';
const useClassNamesListener = (targetRef: React.RefObject<HTMLElement>, onChange: () => void): void => {
const latestCallback = React.useRef<() => void>();
latestCallback.current = onChange;
const observer = React.useMemo(
() =>
new MutationObserver(() => {
latestCallback.current();
}),
[],
);
React.useEffect(() => {
// Call also on initial render
latestCallback.current();
observer.observe(targetRef.current, {
attributes: true,
attributeFilter: ['class'],
childList: true,
subtree: true,
});
return () => observer.disconnect();
}, [observer, targetRef]);
};
export default useClassNamesListener;
``` | /content/code_sandbox/packages/fluentui/docs/src/components/VariableResolver/useClassNamesListener.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 157 |
```xml
import { TFabricPlatformPageProps } from '../../../interfaces/Platforms';
import { ListPageProps as ExternalProps } from '@fluentui/react-examples/lib/react/List/List.doc';
import { ISideRailLink } from '@fluentui/react-docsite-components/lib/index2';
const related: ISideRailLink[] = [];
export const ListPageProps: TFabricPlatformPageProps = {
web: {
...(ExternalProps as any),
related,
},
};
``` | /content/code_sandbox/apps/public-docsite/src/pages/Controls/ListPage/ListPage.doc.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 98 |
```xml
import(/* webpackChunkName: 'chunk' */ './chunks/chunk').then(({ ChunkClass }) => {
const chunk = new ChunkClass();
chunk.doStuff();
});
``` | /content/code_sandbox/build-tests/set-webpack-public-path-plugin-test/src/index.ts | xml | 2016-09-30T00:28:20 | 2024-08-16T18:54:35 | rushstack | microsoft/rushstack | 5,790 | 37 |
```xml
import { useEffect, useState } from 'react';
import type { WasmPasswordScore } from '@protontech/pass-rust-core';
import { usePassCore } from '@proton/pass/components/Core/PassCoreProvider';
import type { MaybeNull } from '@proton/pass/types';
import noop from '@proton/utils/noop';
export const usePasswordStrength = (password: string) => {
const { core } = usePassCore();
const [strength, setStrength] = useState<MaybeNull<WasmPasswordScore>>(null);
useEffect(() => {
(async () => {
const score = password ? (await core.analyze_password(password))?.password_score : null;
setStrength(score);
})().catch(noop);
}, [password]);
return strength;
};
``` | /content/code_sandbox/packages/pass/hooks/monitor/usePasswordStrength.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 166 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" xmlns:xsi="path_to_url" version="1.2" xsi:schemaLocation="urn:oasis:names:tc:xliff:document:1.2 xliff-core-1.2-transitional.xsd">
<file datatype="xml" source-language="en" target-language="de" original="../LocalizableStrings.resx">
<body>
<trans-unit id="CreateSuccessful">
<source>The template "{0}" was created successfully.</source>
<target state="translated">Die Vorlage "{0}" wurde erfolgreich erstellt.</target>
<note>{0} holds template name</note>
</trans-unit>
<trans-unit id="Error_ConfigDoesntExist">
<source>Template config: {0} doesn't exist. When using 'WithInstantiationThroughTemplateCreatorApi' the 'TemplatePath' parameter must specify path to the template.json or to the root of template (containing {1}).</source>
<target state="translated">Vorlagenkonfiguration: {0} ist nicht vorhanden. Bei Verwendung von WithInstantiationThroughTemplateCreatorApi muss der Parameter TemplatePath den Pfad zur Datei template.json oder zum Stamm der Vorlage angeben (die {1} enthlt).</target>
<note>Do not translate 'TemplatePath' and 'WithInstantiationThroughTemplateCreatorApi'
{0} and {1} contain paths</note>
</trans-unit>
<trans-unit id="Error_ConfigRetrieval">
<source>Template configuration file could not be retrieved from configured mount point.</source>
<target state="translated">Die Vorlagenkonfigurationsdatei konnte nicht vom konfigurierten Bereitstellungspunkt abgerufen werden.</target>
<note />
</trans-unit>
<trans-unit id="Error_DotnetPath">
<source>'DotnetExecutablePath' parameter must not be specified when using 'WithInstantiationThroughTemplateCreatorApi'.</source>
<target state="translated">Der Parameter DotnetExecutablePath darf nicht angegeben werden, wenn WithInstantiationThroughTemplateCreatorApi verwendet wird.</target>
<note>Do not translate 'DotnetExecutablePath' and 'WithInstantiationThroughTemplateCreatorApi'</note>
</trans-unit>
<trans-unit id="Error_InstallFail">
<source>Failed to install template: {0}, details: {1}.</source>
<target state="translated">Fehler beim Installieren der Vorlage: {0}, Details: {1}.</target>
<note>{0} is tamplate name, {1} is error message</note>
</trans-unit>
<trans-unit id="Error_NoPackages">
<source>No packages fetched after installation.</source>
<target state="translated">Nach der Installation wurden keine Pakete abgerufen.</target>
<note />
</trans-unit>
<trans-unit id="Error_TemplateArgsDisalowed">
<source>'TemplateSpecificArgs' parameter must not be specified when using WithInstantiationThroughTemplateCreatorApi. Parameters should be passed via the argument of 'WithInstantiationThroughTemplateCreatorApi'.</source>
<target state="translated">Der Parameter TemplateSpecificArgs darf nicht angegeben werden, wenn WithInstantiationThroughTemplateCreatorApi verwendet wird. Parameter sollten ber das Argument von WithInstantiationThroughTemplateCreatorApi bergeben werden.</target>
<note>Do not translate 'TemplateSpecificArgs' and 'WithInstantiationThroughTemplateCreatorApi'</note>
</trans-unit>
</body>
</file>
</xliff>
``` | /content/code_sandbox/tools/Microsoft.TemplateEngine.Authoring.TemplateApiVerifier/xlf/LocalizableStrings.de.xlf | xml | 2016-06-28T20:54:16 | 2024-08-16T14:39:38 | templating | dotnet/templating | 1,598 | 794 |
```xml
import { TFabricPlatformPageProps } from '../../../interfaces/Platforms';
import { DetailsListAnimationPageProps as ExternalProps } from '@fluentui/react-examples/lib/react/DetailsList/DetailsList.doc';
export const DetailsListAnimationPageProps: TFabricPlatformPageProps = {
web: {
...(ExternalProps as any),
title: 'DetailsList - Animation',
},
};
``` | /content/code_sandbox/apps/public-docsite/src/pages/Controls/DetailsListPage/DetailsListAnimationPage.doc.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 82 |
```xml
import { Chart } from '../../../src';
export function markChangeData(context) {
const { container, canvas } = context;
const button = document.createElement('button');
button.innerText = 'Update Data';
container.appendChild(button);
const div = document.createElement('div');
container.appendChild(div);
const chart = new Chart({ container: div, canvas });
chart.data([
{ genre: 'Sports', sold: 275 },
{ genre: 'Strategy', sold: 115 },
{ genre: 'Action', sold: 120 },
{ genre: 'Shooter', sold: 350 },
{ genre: 'Other', sold: 150 },
]);
const interval = chart
.interval()
.encode('x', 'genre')
.encode('y', 'sold')
.encode('color', 'genre');
const finished = chart.render();
button.onclick = () => {
interval.changeData([
{ genre: 'Action', sold: 120 },
{ genre: 'Shooter', sold: 350 },
{ genre: 'Other', sold: 150 },
{ genre: 'Sports', sold: 275 },
{ genre: 'Strategy', sold: 115 },
]);
};
return { chart, finished, button, canvas: chart.getContext().canvas };
}
``` | /content/code_sandbox/__tests__/plots/api/mark-change-data.ts | xml | 2016-05-26T09:21:04 | 2024-08-15T16:11:17 | G2 | antvis/G2 | 12,060 | 281 |
```xml
'use strict';
import * as chai from 'chai';
import { Boot, Kernel } from '../lib/kernel/kernel';
const expect = chai.expect;
const MINS = 60 * 1000; // milliseconds
const IS_KARMA = typeof window !== 'undefined' && typeof (<any>window).__karma__ !== 'undefined';
const ROOT = IS_KARMA ? '/base/fs/' : '/fs/';
export const name = 'test-echo';
describe('echo a b c', function(): void {
this.timeout(10 * MINS);
let kernel: Kernel = null;
it('should boot', function(done: MochaDone): void {
Boot('XmlHttpRequest', ['index.json', ROOT, true], function(err: any, freshKernel: Kernel): void {
expect(err).to.be.null;
expect(freshKernel).not.to.be.null;
kernel = freshKernel;
done();
});
});
it('should run `echo a b c`', function(done: MochaDone): void {
let stdout: string = '';
let stderr: string = '';
kernel.system('/usr/bin/echo a b c', onExit, onStdout, onStderr);
function onStdout(pid: number, out: string): void {
stdout += out;
}
function onStderr(pid: number, out: string): void {
stderr += out;
}
function onExit(pid: number, code: number): void {
try {
expect(code).to.equal(0);
expect(stdout).to.equal('a b c\n');
expect(stderr).to.equal('');
done();
} catch (e) {
done(e);
}
}
});
});
``` | /content/code_sandbox/test/test-echo.ts | xml | 2016-02-17T16:29:16 | 2024-08-12T22:21:27 | browsix | plasma-umass/browsix | 3,147 | 371 |
```xml
interface String {
prependHello(): string;
}
'foo'.prependHello();
``` | /content/code_sandbox/examples/declaration-files/23-merge-global-interface/src/index.ts | xml | 2016-05-11T03:02:41 | 2024-08-16T12:59:57 | typescript-tutorial | xcatliu/typescript-tutorial | 10,361 | 17 |
```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 vscode from 'vscode';
import {clearCoverage} from './coverageHelper';
import {println} from './logger';
// Import the command dispatcher functions
import {cmdInputCollectorRunSpecificFuzzer} from './commands/cmdRunFuzzer';
import {cmdInputCollectorBuildFuzzersFromWorkspace} from './commands/cmdBuildFuzzerFromWorkspace';
import {cmdInputCollectorBuildFuzzersFromWorkspaceCFLite} from './commands/cmdBuildFuzzerFromWorkspaceCFLite';
import {cmdInputCollectorTestFuzzerCFLite} from './commands/cmdTestFuzzerCFLite';
import {cmdDispatcherRe} from './commands/cmdRedo';
import {setupCIFuzzHandler} from './commands/cmdSetupCIFuzz';
import {cmdInputCollectorTestFuzzer} from './commands/cmdTestFuzzer';
import {displayCodeCoverageFromOssFuzz} from './commands/cmdDisplayCoverage';
import {createOssFuzzSetup} from './commands/cmdCreateOSSFuzzSetup';
import {runEndToEndAndGetCoverage} from './commands/cmdEndToEndCoverage';
import {listFuzzersHandler} from './commands/cmdListFuzzers';
import {cmdInputCollectorReproduceTestcase} from './commands/cmdReproduceTestcase';
import {cmdDispatcherTemplate} from './commands/cmdTemplate';
import {cmdDispatcherGenerateClusterfuzzLite} from './commands/cmdDispatcherGenerateClusterfuzzLite';
import {setUpOssFuzzHandler} from './commands/cmdSetupOSSFuzz';
import {setOssFuzzPath} from './commands/cmdSetOSSFuzzPath';
import {extensionConfig} from './config';
/**
* Extension entrypoint. Activate the extension and register the commands.
*/
export function activate(context: vscode.ExtensionContext) {
console.log('Activating extension)');
extensionConfig.printConfig();
println('OSS-Fuzz extension is now active!');
// Command registration
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.SetUp', async () => {
println('CMD start: SetUp');
await setUpOssFuzzHandler();
println('CMD end: SetUp');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.RunFuzzer', async () => {
println('CMD start: Run Fuzzer');
//await runFuzzerHandler('', '', '', '');
cmdInputCollectorRunSpecificFuzzer();
println('CMD end: Run Fuzzer');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.ListFuzzers', async () => {
println('CMD start: ListFuzzers');
await listFuzzersHandler();
println('CMD end: ListFuzzers');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.SetOSSFuzzPath', async () => {
println('CMD start: SetOSSFuzzPath');
await setOssFuzzPath();
println('CMD end: SetOSSFuzzPath');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.GetCodeCoverage', async () => {
println('CMD start: GetCodeCoverage');
await displayCodeCoverageFromOssFuzz(context);
println('CMD end: GetCodeCoverage');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.ClearCodeCoverage', async () => {
println('CMD start: ClearCodeCoverage');
await clearCoverage();
println('CMD end: ClearCodeCoverage');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.CreateOSSFuzzSetup', async () => {
println('CMD start: CreateOSSFuzzSetup');
await createOssFuzzSetup();
println('CMD end: CreateOSSFuzzSetup');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.WSBuildFuzzers', async () => {
println('CMD start: WSBuildFuzzers3');
await cmdInputCollectorBuildFuzzersFromWorkspace();
println('CMD end: WSBuildFuzzers4');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.SetupCIFuzz', async () => {
println('CMD start: SetupCIFuzz');
await setupCIFuzzHandler();
println('CMD end: SetupCIFuzz');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.testFuzzer', async () => {
println('CMD start: testFuzzer');
await cmdInputCollectorTestFuzzer();
println('CMD end: testFuzzer');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.testCodeCoverage', async () => {
println('CMD start: testCodeCoverage');
await runEndToEndAndGetCoverage(context);
println('CMD end: testCodeCoverage');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.Reproduce', async () => {
println('CMD start: Reproduce');
await cmdInputCollectorReproduceTestcase();
println('CMD end: Reproduce');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.Redo', async () => {
println('CMD start: Re');
await cmdDispatcherRe();
println('CMD end: Re');
})
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.Template', async () => {
println('CMD start: remplate');
await cmdDispatcherTemplate(context);
println('CMD end: template');
})
);
context.subscriptions.push(
vscode.commands.registerCommand(
'oss-fuzz.GenerateClusterfuzzLite',
async () => {
println('CMD start: GenerateClusterfuzzLite');
await cmdDispatcherGenerateClusterfuzzLite(context);
println('CMD end: GenerateClusterfuzzLite');
}
)
);
context.subscriptions.push(
vscode.commands.registerCommand(
'oss-fuzz.WSBuildFuzzersCFLite',
async () => {
println('CMD start: WSBuildFuzzersCFLite');
await cmdInputCollectorBuildFuzzersFromWorkspaceCFLite();
println('CMD end: WSBuildFuzzersCFLite');
}
)
);
context.subscriptions.push(
vscode.commands.registerCommand('oss-fuzz.testFuzzerCFLite', async () => {
println('CMD start: testFuzzerCFLite');
await cmdInputCollectorTestFuzzerCFLite();
println('CMD end: testFuzzerCFLite');
})
);
}
// This method is called when your extension is deactivated
export function deactivate() {
println('Deactivating the extension');
}
``` | /content/code_sandbox/tools/vscode-extension/src/extension.ts | xml | 2016-07-20T19:39:50 | 2024-08-16T10:54:09 | oss-fuzz | google/oss-fuzz | 10,251 | 1,467 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<launch4jConfig>
<dontWrapJar>true</dontWrapJar>
<headerType>gui</headerType>
<jar>Digital.jar</jar>
<outfile>Digital.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>normal</priority>
<downloadUrl>path_to_url
<supportUrl></supportUrl>
<stayAlive>false</stayAlive>
<restartOnCrash>false</restartOnCrash>
<manifest></manifest>
<icon>/home/hneemann/Dokumente/Java/digital/src/main/resources/icons/icon48.ico</icon>
<jre>
<path></path>
<bundledJre64Bit>false</bundledJre64Bit>
<bundledJreAsFallback>false</bundledJreAsFallback>
<minVersion>1.8.0</minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
<runtimeBits>64/32</runtimeBits>
</jre>
</launch4jConfig>
``` | /content/code_sandbox/distribution/l4jconfig.xml | xml | 2016-06-28T17:40:16 | 2024-08-16T14:57:06 | Digital | hneemann/Digital | 4,216 | 269 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="path_to_url"
package="me.shaohui.bottomdialogexample"
>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
>
<activity android:name="me.shaohui.bottomdialogexample.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
``` | /content/code_sandbox/example/src/main/AndroidManifest.xml | xml | 2016-10-11T09:04:21 | 2024-07-26T10:15:51 | BottomDialog | shaohui10086/BottomDialog | 1,271 | 150 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="ReleaseMT|x64">
<Configuration>ReleaseMT</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{F2F4AA4A-BEFE-4738-9412-820007919334}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>PCILeechFlash_Installer</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ProjectName>USB3380Flash_installer</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>false</SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>false</SpectreMitigation>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<SpectreMitigation>false</SpectreMitigation>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\files\USB3380Flash_installer\</OutDir>
<IntDir>$(SolutionDir)\files\temp\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\files\USB3380Flash_installer\</OutDir>
<IntDir>$(SolutionDir)\files\temp\$(ProjectName)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\files\USB3380Flash_installer\</OutDir>
<IntDir>$(SolutionDir)\files\temp\$(ProjectName)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<PostBuildEvent>
<Command>powershell Compress-Archive -Path '$(SolutionDir)\files\USB3380Flash\USB3380Flash\*.*', '$(SolutionDir)\files\USB3380Flash_installer\USB3380Flash_installer.exe' -DestinationPath '$(SolutionDir)\files\USB3380Flash.zip' -Force -CompressionLevel Optimal
del "$(SolutionDir)\files\pcileech_files.zip"
powershell Compress-Archive -Path '$(SolutionDir)\files\*.*' -DestinationPath '$(SolutionDir)\files\pcileech_files.zip' -Force -CompressionLevel Optimal</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<ProgramDatabaseFile />
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
<PostBuildEvent>
<Command>powershell Compress-Archive -Path '$(SolutionDir)\files\USB3380Flash\USB3380Flash\*.*', '$(SolutionDir)\files\USB3380Flash_installer\USB3380Flash_installer.exe' -DestinationPath '$(SolutionDir)\files\USB3380Flash.zip' -Force -CompressionLevel Optimal
del "$(SolutionDir)\files\pcileech_files.zip"
powershell Compress-Archive -Path '$(SolutionDir)\files\*.*' -DestinationPath '$(SolutionDir)\files\pcileech_files.zip' -Force -CompressionLevel Optimal</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMT|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<ProgramDatabaseFile>
</ProgramDatabaseFile>
<LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
</Link>
<PostBuildEvent>
<Command>powershell Compress-Archive -Path '$(SolutionDir)\files\USB3380Flash\USB3380Flash\*.*', '$(SolutionDir)\files\USB3380Flash_installer\USB3380Flash_installer.exe' -DestinationPath '$(SolutionDir)\files\USB3380Flash.zip' -Force -CompressionLevel Optimal
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="installer.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
``` | /content/code_sandbox/usb3380_flash/windows/USB3380Flash_Installer/USB3380Flash_Installer.vcxproj | xml | 2016-07-27T16:26:36 | 2024-08-16T09:54:47 | pcileech | ufrisk/pcileech | 4,640 | 2,098 |
```xml
describe('Chat API', () => {
it('should work', () => {
expect(1).toEqual(1);
});
});
``` | /content/code_sandbox/modules/chat/server-ts/__tests__/Chat.test.ts | xml | 2016-09-08T16:44:45 | 2024-08-16T06:17:16 | apollo-universal-starter-kit | sysgears/apollo-universal-starter-kit | 1,684 | 30 |
```xml
//
// Breadcrumb
//
import Vue from 'vue'
import { BvPlugin, BvComponent } from '../../'
// Plugin
export declare const BreadcrumbPlugin: BvPlugin
// Component: b-breadcrumb
export declare class BBreadcrumb extends BvComponent {}
// Component: b-breadcrumb-item
export declare class BBreadcrumbItem extends BvComponent {}
// Component: b-breadcrumb-link
export declare class BBreadcrumbLink extends BvComponent {}
``` | /content/code_sandbox/src/components/breadcrumb/index.d.ts | xml | 2016-10-08T15:59:35 | 2024-08-15T06:23:57 | bootstrap-vue | bootstrap-vue/bootstrap-vue | 14,501 | 95 |
```xml
export class SelectionReadOnlyRequest {
id: string;
readOnly: boolean;
hidePasswords: boolean;
manage: boolean;
constructor(id: string, readOnly: boolean, hidePasswords: boolean, manage: boolean) {
this.id = id;
this.readOnly = readOnly;
this.hidePasswords = hidePasswords;
this.manage = manage;
}
}
``` | /content/code_sandbox/libs/common/src/admin-console/models/request/selection-read-only.request.ts | xml | 2016-03-09T23:14:01 | 2024-08-16T15:07:51 | clients | bitwarden/clients | 8,877 | 78 |
```xml
import { Component, OnInit } from '@angular/core';
import { MenuItem, MessageService } from 'primeng/api';
import { Code } from '@domain/code';
@Component({
selector: 'command-doc',
template: `
<app-docsectiontext>
<p>The function to invoke when an item is clicked is defined using the <i>command</i> property.</p>
</app-docsectiontext>
<div class="card flex justify-content-center">
<p-toast />
<p-menu [model]="items" />
</div>
<app-code [code]="code" selector="menu-command-demo"></app-code>
`,
providers: [MessageService]
})
export class CommandDoc implements OnInit {
items: MenuItem[] | undefined;
constructor(private messageService: MessageService) {}
ngOnInit() {
this.items = [
{
label: 'New',
icon: 'pi pi-plus',
command: () => {
this.update();
}
},
{
label: 'Search',
icon: 'pi pi-search',
command: () => {
this.delete();
}
}
];
}
update() {
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'File created', life: 3000 });
}
delete() {
this.messageService.add({ severity: 'warn', summary: 'Search Completed', detail: 'No results found', life: 3000 });
}
code: Code = {
basic: `<p-toast />
<p-menu [model]="items" />`,
html: `<div class="card flex justify-content-center">
<p-toast />
<p-menu [model]="items" />
</div>`,
typescript: `import { Component, OnInit } from '@angular/core';
import { MenuItem, MessageService } from 'primeng/api';
import { MenuModule } from 'primeng/menu';
import { ToastModule } from 'primeng/toast';
@Component({
selector: 'menu-command-demo',
templateUrl: './menu-command-demo.html',
standalone: true,
imports: [MenuModule, ToastModule],
providers: [MessageService]
})
export class MenuCommandDemo implements OnInit {
items: MenuItem[] | undefined;
constructor(private messageService: MessageService) {}
ngOnInit() {
this.items = [
{
label: 'New',
icon: 'pi pi-plus',
command: () => {
this.update();
}
},
{
label: 'Search',
icon: 'pi pi-search',
command: () => {
this.delete();
}
}
];
}
update() {
this.messageService.add({ severity: 'success', summary: 'Success', detail: 'File created', life: 3000 });
}
delete() {
this.messageService.add({ severity: 'warn', summary: 'Search Completed', detail: 'No results found', life: 3000 });
}
}`
};
}
``` | /content/code_sandbox/src/app/showcase/doc/menu/commanddoc.ts | xml | 2016-01-16T09:23:28 | 2024-08-16T19:58:20 | primeng | primefaces/primeng | 9,969 | 636 |
```xml
import { PayloadEmitSource } from '../../Abstract/Payload'
import { isDecryptedPayload } from '../../Abstract/Payload/Interfaces/TypeCheck'
import { PayloadContentsEqual } from '../../Utilities/Payload/PayloadContentsEqual'
import { ConflictDelta } from './Conflict'
import { ContentType } from '@standardnotes/domain-core'
import { ItemsKeyDelta } from './ItemsKeyDelta'
import { payloadByFinalizingSyncState } from './Utilities/ApplyDirtyState'
import { ImmutablePayloadCollection } from '../Collection/Payload/ImmutablePayloadCollection'
import { HistoryMap } from '../History'
import { extendSyncDelta, SyncDeltaEmit } from './Abstract/DeltaEmit'
import { SyncDeltaInterface } from './Abstract/SyncDeltaInterface'
export class DeltaOutOfSync implements SyncDeltaInterface {
constructor(
readonly baseCollection: ImmutablePayloadCollection,
readonly applyCollection: ImmutablePayloadCollection,
readonly historyMap: HistoryMap,
) {}
public result(): SyncDeltaEmit {
const result: SyncDeltaEmit = {
emits: [],
ignored: [],
source: PayloadEmitSource.RemoteRetrieved,
}
for (const apply of this.applyCollection.all()) {
if (apply.content_type === ContentType.TYPES.ItemsKey) {
const itemsKeyDeltaEmit = new ItemsKeyDelta(this.baseCollection, [apply]).result()
extendSyncDelta(result, itemsKeyDeltaEmit)
continue
}
const base = this.baseCollection.find(apply.uuid)
if (!base) {
result.emits.push(payloadByFinalizingSyncState(apply, this.baseCollection))
continue
}
const isBaseDecrypted = isDecryptedPayload(base)
const isApplyDecrypted = isDecryptedPayload(apply)
const needsConflict =
isApplyDecrypted !== isBaseDecrypted ||
(isApplyDecrypted && isBaseDecrypted && !PayloadContentsEqual(apply, base))
if (needsConflict) {
const delta = new ConflictDelta(this.baseCollection, base, apply, this.historyMap)
extendSyncDelta(result, delta.result())
} else {
result.emits.push(payloadByFinalizingSyncState(apply, this.baseCollection))
}
}
return result
}
}
``` | /content/code_sandbox/packages/models/src/Domain/Runtime/Deltas/OutOfSync.ts | xml | 2016-12-05T23:31:33 | 2024-08-16T06:51:19 | app | standardnotes/app | 5,180 | 474 |
```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>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
``` | /content/code_sandbox/Clients/MonoTouchDemo/Info.plist | xml | 2016-10-27T20:15:17 | 2024-08-16T02:15:03 | ZXing.Net | micjahn/ZXing.Net | 2,676 | 109 |
```xml
export interface FeatureFlags {
[key: string]: boolean;
}
``` | /content/code_sandbox/web/src/features/feature-flags/types.ts | xml | 2016-05-21T16:36:17 | 2024-08-16T17:56:07 | electricitymaps-contrib | electricitymaps/electricitymaps-contrib | 3,437 | 15 |
```xml
// See LICENSE.txt for license information.
import {
Alert,
ProfilePicture,
} from '@support/ui/component';
import {ChannelScreen} from '@support/ui/screen';
import {isAndroid, timeouts, wait} from '@support/utils';
import {expect} from 'detox';
class ChannelInfoScreen {
testID = {
directMessageTitlePrefix: 'channel_info.title.direct_message.',
channelInfoScreen: 'channel_info.screen',
closeButton: 'close.channel_info.button',
scrollView: 'channel_info.scroll_view',
groupMessageTitleDisplayName: 'channel_info.title.group_message.display_name',
publicPrivateTitleDisplayName: 'channel_info.title.public_private.display_name',
publicPrivateTitlePurpose: 'channel_info.title.public_private.purpose',
favoriteAction: 'channel_info.channel_actions.favorite.action',
unfavoriteAction: 'channel_info.channel_actions.unfavorite.action',
muteAction: 'channel_info.channel_actions.mute.action',
unmuteAction: 'channel_info.channel_actions.unmute.action',
setHeaderAction: 'channel_info.channel_actions.set_header.action',
addMembersAction: 'channel_info.channel_actions.add_members.action',
copyChannelLinkAction: 'channel_info.channel_actions.copy_channel_link.action',
joinStartCallAction: 'channel_info.channel_actions.join_start_call.action',
extraHeader: 'channel_info.extra.header',
extraCreatedBy: 'channel_info.extra.created_by',
extraCreatedOn: 'channel_info.extra.created_on',
ignoreMentionsOptionToggledOff: 'channel_info.options.ignore_mentions.option.toggled.false',
ignoreMentionsOptionToggledOn: 'channel_info.options.ignore_mentions.option.toggled.true',
notificationPreferenceOption: 'channel_info.options.notification_preference.option',
pinnedMessagesOption: 'channel_info.options.pinned_messages.option',
membersOption: 'channel_info.options.members.option',
copyChannelLinkOption: 'channel_info.options.copy_channel_link.option',
editChannelOption: 'channel_info.options.edit_channel.option',
convertPrivateOption: 'channel_info.options.convert_private.option',
leaveChannelOption: 'channel_info.options.leave_channel.option',
archiveChannelOption: 'channel_info.options.archive_channel.option',
unarchiveChannelOption: 'channel_info.options.unarchive_channel.option',
};
channelInfoScreen = element(by.id(this.testID.channelInfoScreen));
closeButton = element(by.id(this.testID.closeButton));
scrollView = element(by.id(this.testID.scrollView));
groupMessageTitleDisplayName = element(by.id(this.testID.groupMessageTitleDisplayName));
publicPrivateTitleDisplayName = element(by.id(this.testID.publicPrivateTitleDisplayName));
publicPrivateTitlePurpose = element(by.id(this.testID.publicPrivateTitlePurpose));
favoriteAction = element(by.id(this.testID.favoriteAction));
unfavoriteAction = element(by.id(this.testID.unfavoriteAction));
muteAction = element(by.id(this.testID.muteAction));
unmuteAction = element(by.id(this.testID.unmuteAction));
setHeaderAction = element(by.id(this.testID.setHeaderAction));
addMembersAction = element(by.id(this.testID.addMembersAction));
copyChannelLinkAction = element(by.id(this.testID.copyChannelLinkAction));
joinStartCallAction = element(by.id(this.testID.joinStartCallAction));
extraHeader = element(by.id(this.testID.extraHeader));
extraCreatedBy = element(by.id(this.testID.extraCreatedBy));
extraCreatedOn = element(by.id(this.testID.extraCreatedOn));
ignoreMentionsOptionToggledOff = element(by.id(this.testID.ignoreMentionsOptionToggledOff));
ignoreMentionsOptionToggledOn = element(by.id(this.testID.ignoreMentionsOptionToggledOn));
notificationPreferenceOption = element(by.id(this.testID.notificationPreferenceOption));
pinnedMessagesOption = element(by.id(this.testID.pinnedMessagesOption));
membersOption = element(by.id(this.testID.membersOption));
copyChannelLinkOption = element(by.id(this.testID.copyChannelLinkOption));
editChannelOption = element(by.id(this.testID.editChannelOption));
convertPrivateOption = element(by.id(this.testID.convertPrivateOption));
leaveChannelOption = element(by.id(this.testID.leaveChannelOption));
archiveChannelOption = element(by.id(this.testID.archiveChannelOption));
unarchiveChannelOption = element(by.id(this.testID.unarchiveChannelOption));
getDirectMessageTitle = (userId: string) => {
const directMessageTitleTestId = `${this.testID.directMessageTitlePrefix}${userId}`;
const directMessageTitleProfilePictureMatcher = ProfilePicture.getProfilePictureItemMatcher(this.testID.directMessageTitlePrefix, userId);
const directMessageTitleUserDisplayNameMatcher = by.id(`${directMessageTitleTestId}.display_name`);
const directMessageTitleGuestTagMatcher = by.id(`${directMessageTitleTestId}.guest.tag`);
const directMessageTitleBotTagMatcher = by.id(`${directMessageTitleTestId}.bot.tag`);
const directMessageTitlePositionMatcher = by.id(`${directMessageTitleTestId}.position`);
const directMessageTitleBotDescriptionMatcher = by.id(`${directMessageTitleTestId}.bot_description`);
return {
directMessageTitleProfilePicture: element(directMessageTitleProfilePictureMatcher),
directMessageTitleUserDisplayName: element(directMessageTitleUserDisplayNameMatcher),
directMessageTitleGuestTag: element(directMessageTitleGuestTagMatcher),
directMessageTitleBotTag: element(directMessageTitleBotTagMatcher),
directMessageTitlePosition: element(directMessageTitlePositionMatcher),
directMessageTitleBotDescription: element(directMessageTitleBotDescriptionMatcher),
};
};
toBeVisible = async () => {
await waitFor(this.channelInfoScreen).toExist().withTimeout(timeouts.TEN_SEC);
return this.channelInfoScreen;
};
open = async () => {
// # Open channel info screen
await waitFor(ChannelScreen.headerTitle).toBeVisible().withTimeout(timeouts.TEN_SEC);
await ChannelScreen.headerTitle.tap();
return this.toBeVisible();
};
close = async () => {
await this.closeButton.tap();
await expect(this.channelInfoScreen).not.toBeVisible();
};
archiveChannel = async (alertArchiveChannelTitle: Detox.NativeElement, {confirm = true} = {}) => {
await waitFor(this.archiveChannelOption).toBeVisible().whileElement(by.id(this.testID.scrollView)).scroll(50, 'down');
await this.archiveChannelOption.tap({x: 1, y: 1});
const {
noButton,
yesButton,
} = Alert;
await expect(alertArchiveChannelTitle).toBeVisible();
await expect(noButton).toBeVisible();
await expect(yesButton).toBeVisible();
if (confirm) {
await yesButton.tap();
await wait(timeouts.ONE_SEC);
await expect(this.channelInfoScreen).not.toExist();
} else {
await noButton.tap();
await wait(timeouts.ONE_SEC);
await expect(this.channelInfoScreen).toExist();
}
};
archivePrivateChannel = async ({confirm = true} = {}) => {
await this.archiveChannel(Alert.archivePrivateChannelTitle, {confirm});
};
archivePublicChannel = async ({confirm = true} = {}) => {
await this.archiveChannel(Alert.archivePublicChannelTitle, {confirm});
};
convertToPrivateChannel = async (channelDisplayName: string, {confirm = true} = {}) => {
await this.scrollView.tap({x: 1, y: 1});
await this.scrollView.scroll(100, 'down');
await waitFor(this.convertPrivateOption).toExist().withTimeout(timeouts.TWO_SEC);
await this.convertPrivateOption.tap({x: 1, y: 1});
const {
channelNowPrivateTitle,
convertToPrivateChannelTitle,
noButton2,
okButton,
yesButton2,
} = Alert;
await expect(convertToPrivateChannelTitle(channelDisplayName)).toBeVisible();
await expect(noButton2).toBeVisible();
await expect(yesButton2).toBeVisible();
if (confirm) {
await yesButton2.tap();
await expect(channelNowPrivateTitle(channelDisplayName)).toBeVisible();
await okButton.tap();
await wait(timeouts.ONE_SEC);
await expect(this.channelInfoScreen).toExist();
} else {
await noButton2.tap();
await wait(timeouts.ONE_SEC);
await expect(this.channelInfoScreen).toExist();
}
};
leaveChannel = async ({confirm = true} = {}) => {
await this.scrollView.tap({x: 1, y: 1});
await this.scrollView.scroll(200, 'down');
await waitFor(this.leaveChannelOption).toExist().withTimeout(timeouts.TWO_SEC);
if (isAndroid()) {
await this.scrollView.scrollTo('bottom');
}
await this.leaveChannelOption.tap({x: 1, y: 1});
const {
leaveChannelTitle,
cancelButton,
leaveButton,
} = Alert;
await expect(leaveChannelTitle).toBeVisible();
await expect(cancelButton).toBeVisible();
await expect(leaveButton).toBeVisible();
if (confirm) {
await leaveButton.tap();
await wait(timeouts.ONE_SEC);
await expect(this.channelInfoScreen).not.toExist();
} else {
await cancelButton.tap();
await wait(timeouts.ONE_SEC);
await expect(this.channelInfoScreen).toExist();
}
};
toggleIgnoreMentionsOptionOn = async () => {
await this.ignoreMentionsOptionToggledOff.tap();
await expect(this.ignoreMentionsOptionToggledOn).toBeVisible();
};
toggleIgnoreMentionsOff = async () => {
await this.ignoreMentionsOptionToggledOn.tap();
await expect(this.ignoreMentionsOptionToggledOff).toBeVisible();
};
unarchiveChannel = async (alertUnarchiveChannelTitle: Detox.NativeElement, {confirm = true} = {}) => {
await waitFor(this.unarchiveChannelOption).toBeVisible().whileElement(by.id(this.testID.scrollView)).scroll(50, 'down');
await this.unarchiveChannelOption.tap({x: 1, y: 1});
const {
noButton,
yesButton,
} = Alert;
await expect(alertUnarchiveChannelTitle).toBeVisible();
await expect(noButton).toBeVisible();
await expect(yesButton).toBeVisible();
if (confirm) {
await yesButton.tap();
await wait(timeouts.ONE_SEC);
await expect(this.channelInfoScreen).not.toExist();
} else {
await noButton.tap();
await wait(timeouts.ONE_SEC);
await expect(this.channelInfoScreen).toExist();
}
};
unarchivePrivateChannel = async ({confirm = true} = {}) => {
await this.unarchiveChannel(Alert.unarchivePrivateChannelTitle, {confirm});
};
unarchivePublicChannel = async ({confirm = true} = {}) => {
await this.unarchiveChannel(Alert.unarchivePublicChannelTitle, {confirm});
};
}
const channelInfoScreen = new ChannelInfoScreen();
export default channelInfoScreen;
``` | /content/code_sandbox/detox/e2e/support/ui/screen/channel_info.ts | xml | 2016-10-07T16:52:32 | 2024-08-16T12:08:38 | mattermost-mobile | mattermost/mattermost-mobile | 2,155 | 2,317 |
```xml
<annotation>
<folder>toy_images</folder>
<filename>toy83.jpg</filename>
<path>/home/animesh/Documents/grocery_detection/toy_exptt/toy_images/toy83.jpg</path>
<source>
<database>Unknown</database>
</source>
<size>
<width>500</width>
<height>300</height>
<depth>3</depth>
</size>
<segmented>0</segmented>
<object>
<name>toy</name>
<pose>Unspecified</pose>
<truncated>0</truncated>
<difficult>0</difficult>
<bndbox>
<xmin>91</xmin>
<ymin>59</ymin>
<xmax>325</xmax>
<ymax>241</ymax>
</bndbox>
</object>
</annotation>
``` | /content/code_sandbox/Custom_Mask_RCNN/annotations/xmls/toy83.xml | xml | 2016-08-17T18:29:12 | 2024-08-12T19:24:24 | Deep-Learning | priya-dwivedi/Deep-Learning | 3,346 | 210 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Prosty meneder plikw</string>
<string name="app_launcher_name">Meneder plikw</string>
<string name="press_back_again">Nacinij ponownie przycisk wstecz, aby wyj</string>
<string name="go_to_home_folder">Przejd do folderu domowego</string>
<string name="set_as_home_folder">Ustaw jako folder domowy</string>
<string name="home_folder_updated">Folder domowy zaktualizowany</string>
<string name="copy_path">Kopiuj ciek do schowka</string>
<string name="path_copied">Skopiowano ciek</string>
<string name="select_audio_file">Wybierzplik audio</string>
<string name="search_folder">Przeszukaj folder</string>
<string name="rooted_device_only">Ta operacja dziaa tylko na zrootowanych urzdzeniach</string>
<string name="recents">Ostatnie</string>
<string name="show_recents">Poka ostatnie</string>
<string name="pdf_viewer">Czytnik PDF</string>
<string name="invert_colors">Odwr kolory</string>
<!-- Open as -->
<string name="open_as">Otwrz jako</string>
<string name="text_file">Plik tekstowy</string>
<string name="image_file">Plik graficzny</string>
<string name="audio_file">Plik audio</string>
<string name="video_file">Plik wideo</string>
<string name="other_file">Inny plik</string>
<!-- Compression -->
<string name="compress">Spakuj</string>
<string name="compress_pro">Spakuj (Pro)</string>
<string name="decompress">Rozpakuj</string>
<string name="compress_as">Spakuj jako</string>
<string name="compressing">Pakowanie</string>
<string name="decompressing">Rozpakowywanie</string>
<string name="compression_successful">Pakowanie powiodo si</string>
<string name="decompression_successful">Rozpakowywanie powiodo si</string>
<string name="compressing_failed">Pakowanie nie powiodo si</string>
<string name="decompressing_failed">Rozpakowywanie nie powiodo si</string>
<!-- Favorites -->
<string name="manage_favorites">Zarzdzaj ulubionymi</string>
<string name="go_to_favorite">Przejd do ulubionego</string>
<string name="favorites_activity_placeholder">Moesz doda czsto uywane foldery do ulubionych, aby mie do nich atwy dostp z dowolnego miejsca.</string>
<!-- File Editor -->
<string name="file_editor">Edytor plikw</string>
<!-- Storage analysis -->
<string name="storage_analysis">Analiza pamici</string>
<string name="images">Obrazy</string>
<string name="videos">Wideo</string>
<string name="audio">Audio</string>
<string name="documents">Dokumenty</string>
<string name="downloads">Pobrane</string>
<string name="archives">Archiwa</string>
<string name="others">Inne</string>
<string name="storage_free">wolne</string>
<string name="total_storage">Cakowita pami: %s</string>
<!-- Settings -->
<string name="enable_root_access">Wcz dostp do roota</string>
<string name="press_back_twice">Wymagaj dwukrotnego nacinicia przycisku Wstecz, aby wyj z aplikacji</string>
<!--
Haven't found some strings? There's more at
path_to_url
-->
</resources>
``` | /content/code_sandbox/app/src/main/res/values-pl/strings.xml | xml | 2016-07-12T20:06:21 | 2024-08-16T13:08:21 | Simple-File-Manager | SimpleMobileTools/Simple-File-Manager | 1,490 | 915 |
```xml
/*
* one or more contributor license agreements. See the NOTICE file distributed
* with this work for additional information regarding copyright ownership.
*/
import {useState} from 'react';
import {DangerButton} from 'modules/components/OperationItem/DangerButton';
import {OperationItems} from 'modules/components/OperationItems';
import {DeleteButtonContainer} from 'modules/components/DeleteDefinition/styled';
import {InlineLoading, Link, ListItem, Stack} from '@carbon/react';
import {DeleteDefinitionModal} from 'modules/components/DeleteDefinitionModal';
import {operationsStore} from 'modules/stores/operations';
import {panelStatesStore} from 'modules/stores/panelStates';
import {StructuredList} from 'modules/components/StructuredList';
import {UnorderedList} from 'modules/components/DeleteDefinitionModal/Warning/styled';
import {decisionDefinitionStore} from 'modules/stores/decisionDefinition';
import {notificationsStore} from 'modules/stores/notifications';
import {tracking} from 'modules/tracking';
type Props = {
decisionDefinitionId: string;
decisionName: string;
decisionVersion: string;
};
const DecisionOperations: React.FC<Props> = ({
decisionDefinitionId,
decisionName,
decisionVersion,
}) => {
const [isDeleteModalVisible, setIsDeleteModalVisible] =
useState<boolean>(false);
const [isOperationRunning, setIsOperationRunning] = useState(false);
return (
<>
<DeleteButtonContainer>
{isOperationRunning && (
<InlineLoading data-testid="delete-operation-spinner" />
)}
<OperationItems>
<DangerButton
title={`Delete Decision Definition "${decisionName} - Version ${decisionVersion}"`}
type="DELETE"
disabled={isOperationRunning}
onClick={() => {
tracking.track({
eventName: 'definition-deletion-button',
resource: 'decision',
version: decisionVersion,
});
setIsDeleteModalVisible(true);
}}
/>
</OperationItems>
</DeleteButtonContainer>
<DeleteDefinitionModal
title="Delete DRD"
description="You are about to delete the following DRD:"
confirmationText="Yes, I confirm I want to delete this DRD and all related instances."
isVisible={isDeleteModalVisible}
warningTitle="Deleting a decision definition will delete the DRD and will impact
the following:"
warningContent={
<Stack gap={6}>
<UnorderedList nested>
<ListItem>
By deleting a decision definition, you will be deleting the DRD
which contains this decision definition. All other decision
tables and literal expressions that are part of the DRD will
also be deleted.
</ListItem>
<ListItem>
Deleting the only existing version of a decision definition
could result in process incidents.
</ListItem>
</UnorderedList>
<Link
href="path_to_url"
target="_blank"
>
Read more about deleting a decision definition
</Link>
</Stack>
}
bodyContent={
<StructuredList
headerColumns={[
{
cellContent: 'DRD name',
},
]}
rows={[
{
key: decisionDefinitionStore.name,
columns: [
{
cellContent: decisionDefinitionStore.name,
},
],
},
]}
label="DRD Details"
/>
}
onClose={() => setIsDeleteModalVisible(false)}
onDelete={() => {
setIsOperationRunning(true);
setIsDeleteModalVisible(false);
tracking.track({
eventName: 'definition-deletion-confirmation',
resource: 'decision',
version: decisionVersion,
});
operationsStore.applyDeleteDecisionDefinitionOperation({
decisionDefinitionId,
onSuccess: () => {
setIsOperationRunning(false);
panelStatesStore.expandOperationsPanel();
notificationsStore.displayNotification({
kind: 'success',
title: 'Operation created',
isDismissable: true,
});
},
onError: (statusCode: number) => {
setIsOperationRunning(false);
notificationsStore.displayNotification({
kind: 'error',
title: 'Operation could not be created',
subtitle:
statusCode === 403 ? 'You do not have permission' : undefined,
isDismissable: true,
});
},
});
}}
/>
</>
);
};
export {DecisionOperations};
``` | /content/code_sandbox/operate/client/src/App/Decisions/Decision/DecisionOperations/index.tsx | xml | 2016-03-20T03:38:04 | 2024-08-16T19:59:58 | camunda | camunda/camunda | 3,172 | 911 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>com.googleusercontent.apps.848232511240-dmrj3gba506c9svge2p9gq35p1fg654p</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>location</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
``` | /content/code_sandbox/xcode-project/pokemon-webspoof/Info.plist | xml | 2016-07-15T22:22:10 | 2024-08-01T08:14:23 | pokemongo-webspoof | iam4x/pokemongo-webspoof | 2,142 | 527 |
```xml
import { isConformant } from 'test/specs/commonTests';
import { TreeItem } from 'src/components/Tree/TreeItem';
describe('TreeItem', () => {
isConformant(TreeItem, {
testPath: __filename,
constructorName: 'TreeItem',
requiredProps: { id: 'my-id' },
});
});
``` | /content/code_sandbox/packages/fluentui/react-northstar/test/specs/components/Tree/TreeItem-test.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 78 |
```xml
import "./PgTablesPlugin.js";
import "graphile-config";
import type {
PgCodec,
PgCodecRelation,
PgCodecWithAttributes,
PgRefDefinition,
PgResource,
PgResourceUnique,
} from "@dataplan/pg";
import * as dataplanPg from "@dataplan/pg";
import type { GraphQLType } from "grafast/graphql";
import { EXPORTABLE, gatherConfig } from "graphile-build";
import type { SQL } from "pg-sql2";
import sql from "pg-sql2";
import { getBehavior } from "../behavior.js";
import type { PgCodecMetaLookup } from "../inputUtils.js";
import { getCodecMetaLookupFromInput, makePgCodecMeta } from "../inputUtils.js";
import { version } from "../version.js";
declare global {
namespace GraphileConfig {
interface Plugins {
PgBasicsPlugin: true;
}
}
namespace GraphileBuild {
interface BuildVersions {
"graphile-build-pg": string;
"@dataplan/pg": string;
}
type HasGraphQLTypeForPgCodec = (
codec: PgCodec<any, any, any, any, any, any, any>,
situation?: string,
) => boolean;
type GetGraphQLTypeByPgCodec = (
codec: PgCodec<any, any, any, any, any, any, any>,
situation: string,
) => GraphQLType | null;
type GetGraphQLTypeNameByPgCodec = (
codec: PgCodec<any, any, any, any, any, any, any>,
situation: string,
) => string | null;
type SetGraphQLTypeForPgCodec = (
codec: PgCodec<any, any, any, any, any, any, any>,
situations: string | string[],
typeName: string,
) => void;
interface Build {
/**
* A copy of `import * from "@dataplan/pg"` so that plugins don't need to
* import it directly.
*/
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
dataplanPg: typeof import("@dataplan/pg");
/**
* A store of metadata for given codecs. Currently internal as this API
* may change.
*
* @internal
*/
pgCodecMetaLookup: PgCodecMetaLookup;
/**
* Do we already have a GraphQL type to use for the given codec in the
* given situation?
*/
hasGraphQLTypeForPgCodec: HasGraphQLTypeForPgCodec;
/**
* Get the GraphQL type for the given codec in the given situation.
*/
getGraphQLTypeByPgCodec: GetGraphQLTypeByPgCodec;
/**
* Get the GraphQL type name (string) for the given codec in the given
* situation.
*/
getGraphQLTypeNameByPgCodec: GetGraphQLTypeNameByPgCodec;
/**
* Set the GraphQL type to use for the given codec in the given
* situation. If this has already been set, will throw an error.
*/
setGraphQLTypeForPgCodec: SetGraphQLTypeForPgCodec;
/**
* pg-sql2 access on Build to avoid duplicate module issues.
*/
sql: typeof sql;
pgGetBehavior: typeof getBehavior;
/**
* Get a table-like resource for the given codec, assuming exactly one exists.
*/
pgTableResource<TCodec extends PgCodecWithAttributes>(
codec: TCodec,
strict?: boolean,
): PgResource<
string,
TCodec,
ReadonlyArray<PgResourceUnique>,
undefined
> | null;
}
interface BehaviorEntities {
pgCodec: PgCodec;
pgCodecAttribute: [codec: PgCodecWithAttributes, attributeName: string];
pgResource: PgResource<any, any, any, any, any>;
pgResourceUnique: [
resource: PgResource<any, any, any, any, any>,
unique: PgResourceUnique,
];
pgCodecRelation: PgCodecRelation;
pgCodecRef: [codec: PgCodec, refName: string];
pgRefDefinition: PgRefDefinition;
}
interface GatherOptions {
/** Set to 'unqualified' to omit the schema name from table, function, and type identifiers */
pgIdentifiers?: "qualified" | "unqualified";
}
}
namespace GraphileConfig {
interface GatherHelpers {
pgBasics: {
/**
* Create an SQL identifier from the given parts; skipping the very
* first part (schema) if pgIdentifiers is set to 'unqualified'
*/
identifier(...parts: string[]): SQL;
};
}
}
}
export const PgBasicsPlugin: GraphileConfig.Plugin = {
name: "PgBasicsPlugin",
description:
"Basic utilities required by many other graphile-build-pg plugins.",
version: version,
gather: gatherConfig({
namespace: "pgBasics",
helpers: {
identifier(info, ...parts) {
switch (info.options.pgIdentifiers) {
case "unqualified": {
// strip the schema
const [, ...partsWithoutSchema] = parts;
return EXPORTABLE(
(partsWithoutSchema, sql) =>
sql.identifier(...partsWithoutSchema),
[partsWithoutSchema, sql],
);
}
case "qualified":
case undefined: {
return EXPORTABLE(
(parts, sql) => sql.identifier(...parts),
[parts, sql],
);
}
default: {
throw new Error(
`Setting preset.gather.pgIdentifiers had unsupported value '${info.options.pgIdentifiers}'; please use a supported value: 'qualified' or 'unqualified'.`,
);
}
}
},
},
}),
schema: {
globalBehavior: "connection -list",
entityBehavior: {
pgCodec: {
after: ["default", "inferred"],
provides: ["override"],
callback(behavior, codec) {
return [behavior, getBehavior(codec.extensions)];
},
},
pgCodecAttribute: {
after: ["default", "inferred"],
provides: ["override"],
callback(behavior, [codec, attributeName]) {
if (typeof attributeName !== "string") {
throw new Error(
`pgCodecAttribute no longer accepts (codec, attribute) - it now accepts (codec, attributeName). Please update your code. Sorry! (Changed in PostGraphile V5 alpha 13.)`,
);
}
const attribute = codec.attributes[attributeName];
return [
behavior,
getBehavior([codec.extensions, attribute.extensions]),
];
},
},
pgResource: {
after: ["default", "inferred"],
provides: ["override"],
callback(behavior, resource) {
return [
behavior,
getBehavior([resource.codec.extensions, resource.extensions]),
];
},
},
pgResourceUnique: {
after: ["default", "inferred"],
provides: ["override"],
callback(behavior, [resource, unique]) {
return [
behavior,
getBehavior([
resource.codec.extensions,
resource.extensions,
unique.extensions,
]),
];
},
},
pgCodecRelation: {
after: ["default", "inferred"],
provides: ["override"],
callback(behavior, relationSpec) {
return [
behavior,
// The behavior is the relation behavior PLUS the remote table
// behavior. But the relation settings win.
getBehavior([
relationSpec.remoteResource.codec.extensions,
relationSpec.remoteResource.extensions,
relationSpec.extensions,
]),
];
},
},
pgCodecRef: {
after: ["default", "inferred"],
provides: ["override"],
callback(behavior, [codec, refName]) {
const ref = codec.refs?.[refName];
if (!ref) {
throw new Error(`Codec ${codec.name} has no ref '${refName}'`);
}
return [
behavior,
getBehavior([ref.definition.extensions, ref.extensions]),
];
},
},
pgRefDefinition: {
after: ["default", "inferred"],
provides: ["override"],
callback(behavior, refSpec) {
return [behavior, getBehavior(refSpec.extensions)];
},
},
},
hooks: {
build(build) {
const {
graphql: { GraphQLList, GraphQLNonNull },
} = build;
const pgCodecMetaLookup = getCodecMetaLookupFromInput(build.input);
const getGraphQLTypeNameByPgCodec: GraphileBuild.GetGraphQLTypeNameByPgCodec =
(codec, situation) => {
if (codec.arrayOfCodec) {
throw new Error(
"Do not use getGraphQLTypeNameByPgCodec with an array type, find the underlying type instead",
);
}
const meta = pgCodecMetaLookup.get(codec);
if (!meta) {
throw new Error(
`Codec '${codec.name}' does not have an entry in pgCodecMetaLookup, someone needs to call setGraphQLTypeForPgCodec passing this codec.`,
);
}
const typeName = meta.typeNameBySituation[situation] ?? null;
return typeName ?? null;
};
const getGraphQLTypeByPgCodec: GraphileBuild.GetGraphQLTypeByPgCodec = (
codec,
situation,
) => {
if (!build.status.isInitPhaseComplete) {
throw new Error(
`Calling build.getGraphQLTypeByPgCodec before the 'init' phase has completed is not allowed.`,
);
}
if (codec.arrayOfCodec) {
const type = getGraphQLTypeByPgCodec(codec.arrayOfCodec, situation);
const nonNull = codec.extensions?.listItemNonNull;
return type
? new GraphQLList(nonNull ? new GraphQLNonNull(type) : type)
: null;
}
const typeName = getGraphQLTypeNameByPgCodec(codec, situation);
return typeName ? build.getTypeByName(typeName) ?? null : null;
};
const hasGraphQLTypeForPgCodec: GraphileBuild.HasGraphQLTypeForPgCodec =
(codec, situation) => {
const meta = pgCodecMetaLookup.get(codec);
if (!meta) {
return false;
}
if (situation != null) {
const typeName = meta.typeNameBySituation[situation] ?? null;
return typeName != null;
} else {
return Object.keys(meta.typeNameBySituation).length > 0;
}
};
const setGraphQLTypeForPgCodec: GraphileBuild.SetGraphQLTypeForPgCodec =
(codec, variants, typeName) => {
build.assertTypeName(typeName);
let meta = pgCodecMetaLookup.get(codec);
if (!meta) {
meta = makePgCodecMeta(codec);
pgCodecMetaLookup.set(codec, meta);
}
const situations_ = Array.isArray(variants) ? variants : [variants];
for (const situation of situations_) {
if (meta.typeNameBySituation[situation] != null) {
// TODO: allow this?
throw new Error("Type already set");
}
meta.typeNameBySituation[situation] = typeName;
}
};
const resourceByCodecCacheUnstrict = new Map<
PgCodecWithAttributes,
PgResource<any, any, any, any, any> | null
>();
const resourceByCodecCacheStrict = new Map<
PgCodecWithAttributes,
PgResource<any, any, any, any, any> | null
>();
const pgTableResource = <TCodec extends PgCodecWithAttributes>(
codec: TCodec,
strict = true,
): PgResource<
string,
TCodec,
ReadonlyArray<PgResourceUnique>,
undefined
> | null => {
const resourceByCodecCache = strict
? resourceByCodecCacheStrict
: resourceByCodecCacheUnstrict;
if (resourceByCodecCache.has(codec)) {
return resourceByCodecCache.get(codec)!;
}
const resources = Object.values(
build.input.pgRegistry.pgResources,
).filter(
(
r: PgResource<any, any, any, any>,
): r is PgResource<string, TCodec, any, undefined> =>
r.codec === codec &&
!r.parameters &&
r.executor === codec.executor &&
(!strict || (!r.isVirtual && !r.isUnique)),
);
if (resources.length < 1) {
resourceByCodecCache.set(codec, null);
return null;
} else if (resources.length > 1) {
console.warn(
`[WARNING]: detected more than one table-like resource for codec '${codec.name}'; returning nothing to avoid ambiguity.`,
);
resourceByCodecCache.set(codec, null);
return null;
} else {
resourceByCodecCache.set(codec, resources[0]);
return resources[0] as any;
}
};
return build.extend(
build,
{
versions: build.extend(
build.versions,
{
"graphile-build-pg": version,
"@dataplan/pg": dataplanPg.version,
},
"Adding graphile-build-pg and @dataplan/pg version to build.versions",
),
dataplanPg,
pgCodecMetaLookup,
getGraphQLTypeNameByPgCodec,
getGraphQLTypeByPgCodec,
hasGraphQLTypeForPgCodec,
setGraphQLTypeForPgCodec,
sql,
pgGetBehavior: getBehavior,
// For slightly better backwards compatibility with v4.
pgSql: sql,
pgTableResource,
},
"Adding helpers from PgBasicsPlugin",
);
},
},
},
};
``` | /content/code_sandbox/graphile-build/graphile-build-pg/src/plugins/PgBasicsPlugin.ts | xml | 2016-04-14T21:29:19 | 2024-08-16T17:12:51 | crystal | graphile/crystal | 12,539 | 2,921 |
```xml
import React from "react";
import Alert from "@erxes/ui/src/utils/Alert/index";
import confirm from "@erxes/ui/src/utils/confirmation/confirm";
import { gql, useQuery, useMutation } from "@apollo/client";
import { __ } from "@erxes/ui/src/utils/index";
import { router } from "@erxes/ui/src/utils";
import Dashboard from "../../components/dashboard/Dashboard";
import { queries, mutations } from "../../graphql";
import {
DashboardDetailQueryResponse,
DashboardRemoveMutationResponse,
IDashboard,
IReport,
} from "../../types";
import { useLocation, useNavigate } from "react-router-dom";
type Props = {
queryParams: any;
};
const DashboardContainer = (props: Props) => {
const { queryParams } = props;
const location = useLocation();
const navigate = useNavigate();
const dashboardDetailQuery = useQuery<DashboardDetailQueryResponse>(
gql(queries.dashboardDetail),
{
skip: !queryParams.dashboardId,
variables: {
id: queryParams.dashboardId,
},
fetchPolicy: "network-only",
}
);
const [dashboardDuplicateMutation] = useMutation(
gql(mutations.dashboardDuplicate),
{
refetchQueries: [
{
query: gql(queries.sectionList),
variables: { type: "dashboard" },
},
{
query: gql(queries.dashboardList),
},
],
}
);
const [dashboardRemoveMutation] =
useMutation<DashboardRemoveMutationResponse>(
gql(mutations.dashboardRemove),
{
refetchQueries: [
{
query: gql(queries.dashboardList),
},
],
}
);
const dashboardDuplicate = (_id: string) => {
dashboardDuplicateMutation({ variables: { _id } })
.then((res) => {
Alert.success("Successfully duplicated a dashboard");
const { _id } = res.data.dashboardDuplicate;
if (_id) {
navigate(`/insight?dashboardId=${_id}`);
}
})
.catch((err) => {
Alert.error(err.message);
});
};
const dashboardRemove = (id: string) => {
confirm(__("Are you sure to delete selected dashboard?")).then(() => {
dashboardRemoveMutation({ variables: { id } })
.then(() => {
if (queryParams.dashboardId === id) {
router.removeParams(
navigate,
location,
...Object.keys(queryParams)
);
}
Alert.success(__("Successfully deleted a dashboard"));
})
.catch((e: Error) => Alert.error(e.message));
});
};
const [dashboardChartsEditMutation] = useMutation(gql(mutations.chartsEdit));
const [dashboardChartsRemoveMutation] = useMutation(
gql(mutations.chartsRemove),
{
refetchQueries: ["dashboards", "dashboardDetail"],
}
);
const dashboardChartsEdit = (_id: string, values: any) => {
dashboardChartsEditMutation({ variables: { _id, ...values } });
};
const dashboardChartsRemove = (_id: string) => {
dashboardChartsRemoveMutation({ variables: { _id } })
.then(() => {
Alert.success("Successfully removed chart");
})
.catch((err) => Alert.error(err.message));
};
const dashboard =
dashboardDetailQuery?.data?.dashboardDetail || ({} as IDashboard);
const loading = dashboardDetailQuery.loading;
const updatedProps = {
...props,
dashboard,
loading,
dashboardDuplicate,
dashboardRemove,
dashboardChartsEdit,
dashboardChartsRemove,
};
return <Dashboard {...updatedProps} />;
};
export default DashboardContainer;
``` | /content/code_sandbox/packages/plugin-insight-ui/src/containers/dashboard/Dashboard.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 782 |
```xml
import { IterableX } from '../../iterable/iterablex.js';
import { slice } from '../../iterable/operators/slice.js';
/**
* @ignore
*/
export function sliceProto<T>(this: IterableX<T>, begin: number, end: number): IterableX<T> {
return slice<T>(begin, end)(this);
}
IterableX.prototype.slice = sliceProto;
declare module '../../iterable/iterablex' {
interface IterableX<T> {
slice: typeof sliceProto;
}
}
``` | /content/code_sandbox/src/add/iterable-operators/slice.ts | xml | 2016-02-22T20:04:19 | 2024-08-09T18:46:41 | IxJS | ReactiveX/IxJS | 1,319 | 108 |
```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="app_name">Talon</string>
<string name="app_name_full">Talon for Twitter</string>
<string name="extension_description"></string>
<!-- Action Bar -->
<string name="menu_refresh"></string>
<string name="menu_compose"></string>
<string name="menu_logout"></string>
<string name="menu_settings"></string>
<string name="menu_follow"></string>
<string name="menu_unfollow"></string>
<string name="menu_tweet"></string>
<string name="menu_dm"></string>
<string name="menu_block"></string>
<string name="menu_unblock"></string>
<string name="menu_add_to_list"></string>
<string name="menu_change_picture"></string>
<string name="menu_change_bio"></string>
<string name="menu_change_banner"></string>
<string name="menu_direct_message"></string>
<string name="menu_save_image"></string>
<string name="menu_favorite"></string>
<string name="menu_unfavorite"></string>
<string name="menu_create_list"></string>
<string name="menu_spam"></string>
<!-- Times -->
<!-- When translating: put the %s where the number should go in the string. -->
<string name="just_now"></string>
<string name="a_min_ago">1 </string>
<string name="minutes_ago">%s </string>
<string name="an_hour_ago">1 </string>
<string name="hours_ago">%s </string>
<string name="yesterday"></string>
<string name="days_ago">%s </string>
<!-- Muting -->
<string name="mute"></string>
<string name="unmute"></string>
<string name="muted_users"></string>
<string name="no_users"></string>
<!-- Main Activity -->
<string name="links"></string>
<string name="pictures"></string>
<string name="timeline"></string>
<string name="mentions">\@ </string>
<string name="direct_messages"></string>
<string name="retweets"></string>
<string name="favorite_tweets"></string>
<string name="favorite_users"></string>
<string name="favorite_users_tweets"></string>
<string name="trends"></string>
<string name="local_trends"></string>
<string name="world_trends"></string>
<string name="search"></string>
<string name="lists"></string>
<string name="search_hint">...</string>
<string name="new_tweet"></string>
<string name="new_tweets"></string>
<string name="no_new_tweets"></string>
<string name="new_mention"> @ </string>
<string name="new_mentions"> @ </string>
<string name="no_new_mentions"> @ </string>
<string name="new_direct_message"></string>
<string name="new_direct_messages"></string>
<string name="no_new_direct_messages"></string>
<string name="tap_to_setup"></string>
<string name="new_account"></string>
<string name="from_top"></string>
<string name="jump_to_top"></string>
<string name="all_read"></string>
<string name="view_new"></string>
<string name="old_interactions"></string>
<!-- Notifications -->
<string name="tweet"></string>
<string name="tweets"></string>
<string name="mention">\@ </string>
<string name="message"></string>
<string name="messages"></string>
<string name="mentioned_by">\@ by</string>
<string name="message_from"> from</string>
<string name="mark_read"></string>
<string name="noti_reply"></string>
<string name="popup"></string>
<string name="fav_user_tweets"></string>
<string name="sec_acc"> 2 </string>
<string name="talon_pull">Talon Pull</string>
<string name="talon_pull_summary">: Android 5.0 Lollipop </string>
<string name="listening"></string>
<string name="listening_for_mentions"></string>
<string name="refreshing"></string>
<string name="refreshing_widget"></string>
<string name="downloading"></string>
<string name="new_interaction_upper"></string>
<string name="new_interactions_lower"></string>
<string name="new_interactions"></string>
<string name="retweeted"></string>
<string name="favorited"></string>
<string name="quoted"></string>
<string name="followed"></string>
<string name="new_retweets"></string>
<string name="new_favorites"></string>
<string name="new_quotes">RT</string>
<string name="new_tweets_upper"></string>
<!-- Login Screen -->
<string name="setup_talon">Talon </string>
<string name="login_to_twitter">Twitter </string>
<string name="first_welcome">Talon </string>
<string name="second_welcome"></string>
<string name="third_welcome"> - </string>
<string name="back_to_timeline"></string>
<string name="initial_sync"></string>
<string name="first_info">Twitter </string>
<string name="second_info">OK Twitter </string>
<string name="third_info"> Talon </string>
<string name="syncing_timeline">...</string>
<string name="syncing_mentions">\@ ...</string>
<string name="syncing_direct_messages">...</string>
<string name="syncing_user">...</string>
<string name="done_syncing"></string>
<string name="login_error">... !\n\nAPI</string>
<string name="no_network"></string>
<string name="no_thanks"></string>
<string name="follow_me"></string>
<string name="follow_me_description">
</string>
<!-- Compose New Activity -->
<string name="compose_activity"></string>
<string name="compose_tweet_hint">...</string>
<string name="send_to">...</string>
<string name="direct_message_sent"></string>
<string name="type_user"></string>
<string name="add_user"></string>
<string name="location_connected"></string>
<string name="location_disconnected"></string>
<string name="finding_location"></string>
<string name="draft_found"></string>
<string name="apply"></string>
<string name="tweet_failed"></string>
<string name="tap_to_retry"></string>
<string name="one_recepient"> 1 </string>
<!-- Actionbar Done-Discard -->
<string name="discard"></string>
<string name="send"></string>
<!-- Other -->
<string name="placeholder"></string>
<string name="reply">...</string>
<string name="error"></string>
<string name="error_loading_page"></string>
<string name="delete"></string>
<string name="cancel"></string>
<string name="delete_direct_message"></string>
<string name="save_image"></string>
<string name="tweet_success"></string>
<string name="error_sending_tweet"></string>
<string name="tweet_to_long"></string>
<string name="ok">OK</string>
<string name="no"></string>
<string name="yes"></string>
<string name="changelog"></string>
<string name="created_by">:</string>
<string name="no_location"></string>
<string name="take_picture"></string>
<string name="from_file"></string>
<string name="via">via</string>
<string name="version"></string>
<string name="from">From</string>
<string name="save"></string>
<string name="stop"></string>
<string name="tweeted"></string>
<!-- User Profile Activity -->
<string name="followers"></string>
<string name="following"></string>
<string name="blocked_user"></string>
<string name="unblocked_user"></string>
<string name="followed_user"></string>
<string name="unfollowed_user"></string>
<string name="no_description"></string>
<string name="favorite_user"></string>
<string name="unfavorite_user"></string>
<string name="updating_pro_pic"></string>
<string name="updating_banner_pic"></string>
<string name="uploaded"></string>
<string name="change_profile_info"></string>
<string name="update"></string>
<string name="optional_name"> ()</string>
<string name="optional_url">URL ()</string>
<string name="optional_location"> ()</string>
<string name="optional_description"> ()</string>
<string name="updated_profile"></string>
<string name="name_char_length">: 20 </string>
<string name="url_char_length">URL: 100 </string>
<string name="location_char_length">: 30 </string>
<string name="description_char_length">: 160 </string>
<!-- Retweets Activity -->
<string name="retweets_lower"></string>
<string name="retweet_lower"></string>
<string name="retweeter"> by @</string>
<!-- Tweet Activity -->
<string name="menu_open_web">Web </string>
<string name="menu_copy_text"></string>
<string name="menu_share"></string>
<string name="menu_delete_tweet"></string>
<string name="conversation"></string>
<string name="webpage">Web </string>
<string name="tweet_youtube">YouTube</string>
<string name="gif">/</string>
<string name="vine">Vine</string>
<string name="menu_quote"></string>
<string name="deleted_tweet"></string>
<string name="error_deleting"></string>
<string name="sending"></string>
<string name="open_what"></string>
<string name="youtube_error"></string>
<string name="no_conversation"></string>
<string name="saving_picture"></string>
<string name="saved_picture"></string>
<string name="retweet_success"></string>
<string name="favorite_success"></string>
<string name="success"></string>
<!-- User Lists -->
<string name="view_users"></string>
<string name="delete_list"></string>
<string name="remove_user"></string>
<string name="remove"></string>
<string name="from_list"></string>
<string name="removed_user"></string>
<string name="create_new_list"></string>
<string name="list_name">...</string>
<string name="list_description"> ()...</string>
<string name="deleted_list"></string>
<string name="back_to_refresh"></string>
<string name="sPrivate"></string>
<string name="sPublic"></string>
<string name="finding_lists">...</string>
<string name="choose_list"></string>
<string name="added_to_list"></string>
<!-- Tutorial Activity -->
<string name="part_1_tablet">\n\n\n\n</string>
<string name="part_1_phone">\n\n\n</string>
<string name="part_2">\n\n\n\n\n</string>
<string name="part_3">\n\n\n\n</string>
<string name="part_4"></string>
<string name="part_5">\n\n\n</string>
<!-- Settings Menu -->
<string name="theme_settings"></string>
<string name="theme_options"></string>
<string name="font_options"></string>
<string name="other_options"></string>
<string name="theme"></string>
<string name="addon_themes"></string>
<string name="addon_note">\n\n:\n- \n- </string>
<string name="use_addon_themes"></string>
<string name="make_a_theme"></string>
<string name="layout"></string>
<string name="themeing_complete"></string>
<string name="themeing_complete_summary">\"Talon\"\n\n
\"Talon\"\n\n
</string>
<string name="layout_summary"></string>
<string name="text_size"></string>
<string name="night_mode"></string>
<string name="night_mode_night"></string>
<string name="night_mode_day"></string>
<string name="night_mode_theme"></string>
<string name="device_font"></string>
<string name="device_font_summary"> \"Roboto\" Talon \"Roboto Light\" </string>
<string name="ui_extras">UI </string>
<string name="ui_extras_summary">:\n
- \n
- \n
- (Android 4.4)\n\n
</string>
<string name="inline_pics"></string>
<string name="use_screen_name">\@ </string>
<string name="use_screen_name_summary"> @ </string>
<string name="timestamp">24 </string>
<string name="enable_emojis">iOS </string>
<string name="to_market">Play </string>
<string name="get_ios"></string>
<string name="emoji_dialog_summary">iOS\"Sliding Emoji Keyboard\"\"Sliding Emoji Keyboard - iOS\"\n\n
Android\n\n
: ! </string>
<string name="theme_light"></string>
<string name="theme_dark"></string>
<string name="theme_black"></string>
<string name="sync_settings"></string>
<string name="sync_mobile_data"></string>
<string name="sync_mobile_data_summary"> WiFi </string>
<string name="auto_sync_notifications"></string>
<string name="notifications"></string>
<string name="sound"></string>
<string name="quiet_hours"></string>
<string name="max_number_on_refresh"></string>
<string name="fav_users_notifications"></string>
<string name="sync_second_mentions">2</string>
<string name="sync_second_mentions_summary"> @ </string>
<string name="max_number_summary"></string>
<string name="auto_refresh_category"></string>
<string name="refresh_on_startup"></string>
<string name="timeline_sync_interval"></string>
<string name="mentions_sync_interval">\@ </string>
<string name="dm_sync_interval"></string>
<string name="sync_friends"></string>
<string name="sync_friends_summary2"></string>
<string name="sync_friends_summary">\n\nTalon \"\" \n\n</string>
<string name="sync_success"></string>
<string name="sync_failed"></string>
<string name="push_notification_options">"\"\" "</string>
<string name="push_notifications">Talon Pull</string>
<string name="push_notifications_summary">()</string>
<string name="push_notification_warning">Talon Pull </string>
<string name="notification_settings"></string>
<string name="pebble_notifications">Pebble </string>
<string name="pebble_notifications_summary">Pebble 2 </string>
<string name="advanced_settings"></string>
<string name="app_feel_category"></string>
<string name="advance_windowed"></string>
<string name="advance_windowed_summary"> \"\" </string>
<string name="full_screen_browsers"></string>
<string name="full_screen_browsers_summary">Web </string>
<string name="reverse_click_actions"></string>
<string name="reverse_click_actions_summary">\n\n
():\n
- \n
- </string>
<string name="extra_pages"></string>
<string name="extra_pages_summary">/</string>
<string name="live_streaming"></string>
<string name="memory_management"></string>
<string name="delete_cache"></string>
<string name="cache_dialog"></string>
<string name="not_cache"></string>
<string name="current_cache_size"></string>
<string name="cache_dialog_summary"></string>
<string name="timeline_size"></string>
<string name="timeline_size_summary"></string>
<string name="mentions_size">\@ </string>
<string name="mentions_size_summary"> @ </string>
<string name="dm_size"></string>
<string name="dm_size_summary"></string>
<string name="auto_trim"></string>
<string name="trim_now"></string>
<string name="trim_dialog"></string>
<string name="trimming">...</string>
<string name="trim_success"></string>
<string name="trim_fail"></string>
<string name="backup_category"></string>
<string name="backup_settings"></string>
<string name="backup_settings_dialog"></string>
<string name="backup_settings_dialog_summary"></string>
<string name="backup_success"></string>
<string name="restore_success"></string>
<string name="restore_settings"></string>
<string name="restore_settings_summary"></string>
<string name="get_help_settings"></string>
<string name="rerun_tutorial"></string>
<string name="faq"></string>
<string name="features_explained"></string>
<string name="youtube">YouTube </string>
<string name="google_plus">Google+ </string>
<string name="xda_thread">XDA </string>
<string name="email_me"></string>
<string name="tweet_me"></string>
<string name="follow_talon">Twitter Talon </string>
<string name="credits"></string>
<string name="disclaimer"></string>
<string name="other_apps"></string>
<string name="whats_new"></string>
<string name="talon_settings">Talon </string>
<string name="feature_requests"></string>
<!-- Emoji Keyboard -->
<string name="recent"></string>
<string name="people"></string>
<string name="things"></string>
<string name="nature"></string>
<string name="places"></string>
<string name="symbols"></string>
<!-- Array value for translation -->
<string name="five_mins">5 </string>
<string name="ten_mins">10 </string>
<string name="twenty_mins">20 </string>
<string name="thirty_mins">30 </string>
<string name="fourty_five_mins">45 </string>
<string name="one_hour">1 </string>
<string name="two_hours">2 </string>
<string name="three_hours">3 </string>
<string name="four_hours">4 </string>
<string name="manual"></string>
<string name="layout_hangouts"></string>
<!-- added after release -->
<string name="use_inapp_browser"></string>
<string name="use_browser_on_tweet"></string>
<string name="dismiss_all"></string>
<string name="handle_and_name">\@ </string>
<string name="notification_types"></string>
<string name="with_talon_pull">\"Talon Pull\" </string>
<string name="favorited_tweet"></string>
<string name="new_followers"></string>
<string name="discussion"></string>
<string name="no_replies"></string>
<string name="rt_style_quotes">\"RT\" </string>
<string name="rt_style_quotes_summary">Talon \" RT @: ...\" \n\n</string>
<string name="absolute_date"></string>
<string name="clear_searches"></string>
<string name="compose_with_search"></string>
<string name="use_toast">\"\" </string>
<string name="ignore_retweets"></string>
<string name="ignore_retweets_summary"></string>
<string name="view"></string>
<string name="muted_hashtags"></string>
<string name="muted_hashtags_summary"></string>
<string name="no_hashtags"></string>
<string name="mute_hashtags"></string>
<string name="muted"></string>
<string name="auto_insert_hashtags"></string>
<string name="to_replies"></string>
<string name="clean_now"></string>
<string name="clean_now_summary"></string>
<string name="fill_gaps"></string>
<string name="fill_gaps_summary"></string>
<string name="filling_timeline">...</string>
<string name="follows_you"></string>
<string name="not_following_you"></string>
<string name="device"></string>
<string name="roboto_light">Roboto Light ()</string>
<string name="roboto_condensed">Roboto Condensed</string>
<string name="font_type"></string>
<string name="our_website">Web </string>
<string name="alert_types"></string>
<string name="timeline_notifications"></string>
<string name="interactions_notifications"></string>
<string name="timelines_settings"></string>
<string name="tweet_look_options"></string>
<string name="limiting_options"></string>
<string name="browser_options"></string>
<string name="custom_ringtone"></string>
<string name="use_twitlonger">TwitLonger </string>
<string name="twitlonger">TwitLonger</string>
<string name="post_with_twitlonger"> 140 \n\nTwitLonger </string>
<string name="remove_retweet"></string>
<string name="edit"></string>
<string name="use_twitpic">TwitPic </string>
<string name="twitpic_summary">Twitter TwitPic </string>
<string name="verified"></string>
<string name="use_tweetmarker">TweetMarker</string>
<string name="tweetmarker_summary"></string>
<string name="do_not_use"></string>
<string name="automatic_refresh">TweetMarker</string>
<string name="manual_refresh"> TweetMarker</string>
<string name="finding_tweetmarker">TweetMarker </string>
<string name="loading"></string>
<string name="loading_tweets">...</string>
<string name="pull_to_refresh"></string>
<string name="removing_retweet"></string>
<string name="retweeting_status"></string>
<string name="removing_favorite"></string>
<string name="favoriting_status"></string>
<string name="jumping_workaround"></string>
<string name="jumping_workaround_summary"></string>
<string name="menu_share_link"></string>
<string name="no_links"></string>
<string name="configure_pages"></string>
<string name="picture_page"></string>
<string name="link_page"></string>
<string name="list_page"></string>
<string name="current"></string>
<string name="here_is_home"></string>
<string name="dont_use"></string>
<string name="page_1"> 1</string>
<string name="page_2"> 2</string>
<string name="load_tweets"></string>
<string name="download_portal">Portal </string>
<string name="download_portal_summary">Klinker Apps\"Portal\"TalonEvolveSMS</string>
<string name="compose_dm_hint">...</string>
<string name="pwiccer">Pwiccer</string>
<string name="select_shortening_service"></string>
<string name="use_shortening_service"></string>
<string name="use_shortening_service_summary">TwitLonger Pwiccer () </string>
<string name="view_retweeters"></string>
<string name="view_favoriters"></string>
<string name="no_tweets"></string>
<string name="only_7_days">7 </string>
<string name="saved_searches"></string>
<string name="error_check_network"></string>
<string name="error_loading_timeline"> </string>
<string name="currently_in_beta"></string>
<string name="changed_screenname">Talon ID </string>
<string name="menu_save_search"></string>
<string name="saving_search"></string>
<string name="delete_saved_search"></string>
<string name="deleting_search"></string>
<string name="none"></string>
<string name="start"></string>
<string name="version_two"> 2.0.0</string>
<string name="cleaning_databases">...</string>
<string name="setup_version_two">\n\n</string>
<string name="setting_up_timeline">...</string>
<string name="setting_up_mentions">\@ ...</string>
<string name="setting_up_dms">...</string>
<string name="setting_up_lists">...</string>
<string name="version_two_setup_done">Talon 2.0 </string>
<string name="no_content"></string>
<string name="discover"></string>
<string name="suggested_users"></string>
<string name="nearby_tweets"></string>
<string name="local_trend_options"></string>
<string name="manually_config_location"></string>
<string name="country_region">/</string>
<string name="city"></string>
<string name="menu_apply_picture_filter"></string>
<string name="menu_remove_rt"></string>
<string name="input_expression">...</string>
<string name="mute_expression"></string>
<string name="view_muted_expressions"></string>
<string name="no_expression"></string>
<string name="regex_disclaimer"></string>
<string name="cleaning_cache"></string>
<string name="floating_compose"></string>
<string name="settings_links"></string>
<string name="other_links"></string>
<string name="display_options"></string>
<string name="third_party_services"></string>
<string name="open_keyboard"></string>
<string name="open_keyboard_summary"></string>
<string name="no_retweets"></string>
<string name="profile"></string>
<string name="favorites"></string>
<string name="load_pictures"></string>
<string name="pic_search_disclaimer"></string>
<string name="widget_theme"></string>
<string name="widget_theme_summary"></string>
<string name="widget_light"></string>
<string name="widget_dark"></string>
<string name="widget_trans_light"></string>
<string name="widget_trans_black"></string>
<string name="ui_settings">UI </string>
<string name="show_pos_dashclock"></string>
<string name="show_pos_dashclock_summary"></string>
<string name="talon_large_widget">Talon - </string>
<string name="unread_bar_widget">Talon - </string>
<string name="show_muted_mentions"></string>
<string name="force_overflow_summary">3 \"\" </string>
<string name="menu_view_drafts"></string>
<string name="menu_schedule_tweet"></string>
<string name="menu_save_draft"></string>
<string name="saved_draft"></string>
<string name="delete_draft"></string>
<string name="no_tweet"></string>
<string name="menu_attach_picture"></string>
<string name="twitpic_disclaimer">TwitPic </string>
<string name="twitpic_disclaimer_summary">Twitter API Talon TwitPic \n\n
TwitPic </string>
<string name="dont_show_again"></string>
<string name="error_attaching_image"></string>
<string name="sending_tweet"></string>
<string name="attached_images"></string>
<string name="twitpic_disclaimer_multi_summary">Twitter API 2 \n\n
Talon TwitPic </string>
<string name="loading_webpage">Web </string>
<string name="plain_text_browser"></string>
<string name="plain_text_summary"></string>
<string name="plain_text_on_data"></string>
<string name="plain_text_on_data_summary">WiFi </string>
<string name="layout_full_screen"></string>
<string name="pre_cache_images"></string>
<string name="pre_cache_summary"></string>
<string name="pre_cache_settings"></string>
<string name="pre_cache_only_wifi">WiFi </string>
<string name="tweet_page"></string>
<string name="web_page">Web </string>
<string name="conversation_page"></string>
<string name="viewer_page"></string>
<string name="viewer_page_summary"></string>
<string name="browser_settings"></string>
<string name="memory_manage"></string>
<string name="protected_account"></string>
<string name="mute_rt"></string>
<string name="unmute_rt"></string>
<string name="muted_rts"></string>
<string name="twitter">Twitter</string>
<string name="user"></string>
<string name="menu_translate"></string>
<string name="add_new_tweet"></string>
<string name="scheduled_tweets"></string>
<string name="done_label"></string>
<string name="tweet_queued"></string>
<string name="only_queue_no_pic"></string>
<string name="menu_view_queued"></string>
<string name="keep_queued_tweet"></string>
<string name="date_picker"></string>
<string name="time_picker"></string>
<string name="complete_form"></string>
<string name="no_drafts"></string>
<string name="no_queued"></string>
<string name="menu_show_top_tweets">\"\" </string>
<string name="delete_all"></string>
<string name="muted_clients"></string>
<string name="mute_client"></string>
<string name="no_clients"></string>
<string name="muted_clients_summary"></string>
<string name="client_not_found"></string>
<string name="favorite"></string>
<string name="menu_share_image"></string>
<string name="pick_time"></string>
<string name="pick_date"></string>
<string name="both_accounts"></string>
<string name="attach_gif">GIF</string>
<string name="attach_video"></string>
<string name="roboto_l">Android Lollipop Roboto</string>
<string name="second_account"> 2 </string>
<string name="second_account_login_info">Twitter Web \"\" 2 </string>
<string name="fetch_tweetmarker">TweetMarker </string>
<string name="rate_limit_reached"></string>
<string name="info"></string>
<string name="help_and_feedback">/</string>
<string name="faq_first">Talon \n\n
FAQ \n\n
Talon ( 1 ..)\n\n
</string>
<string name="contact"></string>
<string name="follow"></string>
<string name="menu_number_of_pages"></string>
<!-- %s will be replaced with a number for the currently selected page -->
<string name="page"> %s</string>
<string name="set_as_default"></string>
<string name="main_pages_and_drawer"></string>
<string name="drawer_elements"></string>
<string name="drawer_elements_summary">/</string>
<string name="second_acc_mentions"> 2 @ </string>
<string name="using_second_account">%s </string>
<!-- the username will replace %s -->
<string name="error_gif"></string>
<string name="saved_search"></string>
<string name="activity"></string>
<string name="sending_direct_message"></string>
<string name="fav_rt_multiple_accounts"></string>
<string name="fav_rt_multiple_accounts_summary"></string>
<string name="talon_pull_notifications">Talon Pull () </string>
<string name="talon_pull_turned_on">Talon Pull </string>
<string name="activity_sync_interval"></string>
<string name="mentioned_you"> @ </string>
<string name="favorites_lower"></string>
<string name="favorite_lower"></string>
<string name="retweeted_your_status"></string>
<string name="followed_you"></string>
<string name="new_activity"></string>
<string name="use_interaction_drawer"></string>
<string name="use_interaction_drawer_summary"> Talon Pull () </string>
<string name="no_activity_yet"></string>
<string name="no_activity_yet_desc"> Twitter \n\n
@ /</string>
<string name="retweet"></string>
<string name="new_follower_lower"></string>
<string name="new_followers_lower"></string>
<string name="item"></string>
<string name="items"></string>
<string name="and"></string>
<string name="no_favorites"></string>
<string name="quote_style"></string>
<string name="quote_style_twitter">Twitter ()</string>
<string name="quote_style_talon">\"\@lukeklinker …\"</string>
<string name="quote_style_rt">RT \@lukeklinker …</string>
<string name="show_pull_notification">Talon Pull</string>
<string name="show_pull_notification_summary"></string>
<string name="custom_tab_title">Chrome </string>
<string name="custom_tab_message">Chrome Chrome Talon \n\nChrome \"\" \"\" </string>
<string name="learn_more"></string>
<!-- Long click methods -->
<string name="open_profile"></string>
<string name="copy_handle">\@ </string>
<string name="search_user"></string>
<string name="mute_user"></string>
<string name="mute_retweets"></string>
<string name="share_profile"></string>
<string name="open_to_external_browser"></string>
<string name="open_to_internal_browser"></string>
<string name="copy_link"></string>
<string name="share_link"></string>
<string name="search_hashtag"></string>
<string name="mute_hashtag"></string>
<string name="copy_hashtag"></string>
<string name="search_cashtag"></string>
<string name="copy_cashtag"></string>
<string name="copied"></string>
<string name="favorite_user_text"></string>
<string name="open_to_web">Web </string>
<string name="open_to_web_summary"> URL URL </string>
<string name="open_webpage"></string>
<string name="get_android">Android </string>
<string name="play_gif"></string>
<string name="add_to_tweet_gif"></string>
<string name="find_a_gif">GIF</string>
<string name="three_mb_limit">5MB</string>
<string name="three_mb_message">Twitter5MBGIFTalonGiphyGIF\n\n5MB</string>
<string name="quoted_you">RT</string>
<string name="privacy_policy"></string>
<string name="saved_tweets"></string>
<string name="remove_from_saved_tweets"></string>
<string name="today"></string>
<string name="last_week"></string>
<string name="last_month"></string>
<string name="message_from_bullet">%1$s </string>
<string name="now"></string>
<string name="failed"></string>
<string name="delivered"></string>
<string name="attach_image"></string>
<string name="capture_image"></string>
<string name="record_video"></string>
<string name="flip_picture"></string>
<string name="fullscreen"></string>
<string name="attached_image"></string>
<string name="share"></string>
<string-array name="reply_choices">
<item></item>
<item></item>
<item>OK</item>
<item></item>
</string-array>
<string name="app_version"> </string>
<string name="faqs"></string>
<string name="get_help"></string>
<string name="google_plus_summary"> </string>
<string name="email"></string>
<string name="email_summary">luke@klinkerapps.com</string>
<string name="twitter_summary">\@KlinkerApps</string>
<string name="theme_settings_category"></string>
<string name="conversation_list_category"></string>
<string name="general_category"></string>
<string name="theme_settings_redirect"></string>
<string name="hours"></string>
<string name="minutes"></string>
<string name="test"></string>
<string name="off"></string>
<string name="on"></string>
<!-- Times -->
<string name="one_second">1 </string>
<string name="three_seconds">3 </string>
<string name="five_seconds">5 </string>
<string name="ten_seconds">10 </string>
<string name="fifteen_seconds">15 </string>
<string name="thirty_seconds">30 </string>
<string name="one_minute">1 </string>
<string name="one_week">1 </string>
<string name="two_weeks">2 </string>
<string name="one_month">1 </string>
<string name="three_months">3 </string>
<string name="six_months">6 </string>
<string name="one_year">1 </string>
</resources>
``` | /content/code_sandbox/app/src/main/res/values-ja/strings.xml | xml | 2016-07-08T03:18:40 | 2024-08-14T02:54:51 | talon-for-twitter-android | klinker24/talon-for-twitter-android | 1,189 | 8,453 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd"
[
<!ENTITY int "(?:[0-9](?:'?[0-9]++)*+)">
<!ENTITY hex_int "(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f]++)*+)">
<!ENTITY exp_float "(?:[eE][+-]?∫)">
<!ENTITY exp_hexfloat "(?:[pP][-+]?∫)">
<!ENTITY separators ",;">
<!ENTITY ns_punctuators "(){}[].+-/*%=<>!|&?~^">
<!ENTITY punctuators ":&ns_punctuators;">
<!-- printf-like format strings conversion specifiers -->
<!ENTITY printf_like "%[-+ #0]*(?:[0-9]+|\*)?(?:\.(?:[0-9]+|\*))?(?:(?:hh|ll|[hljzt])?[dioxXun]|[lL]?[fFeEaAgG]|l?[cs]|[p%])">
<!-- path_to_url#Standard_format_specification -->
<!ENTITY format_like "\{\{|\}\}|\{[0-9]*(?::(?:[^{}]?[<>^])?[-+ #0]*(?:[0-9]+|\{[0-9]*\})?(?:\.(?:[0-9]+|\{[0-9]*\}))?L?[sbBcdoxXaAeEfFgGp]?)?\}">
<!ENTITY ispphash "(?:#|%\:|\?\?=)">
<!ENTITY pphash "&ispphash;\s*">
<!ENTITY ppemptypp "($|(?=(/\*([^*]|\*[^/])*\*/\s*)?(//.*)?$))">
<!ENTITY ppcond0 "\s+(?:0|false)\s*&ppemptypp;">
<!ENTITY ppcond1 "\s+(?:1|true)\s*(\|\|([^/]|/[^*/])+)?&ppemptypp;">
]>
<language
name="ISO C++"
section="Sources"
version="25"
kateversion="5.0"
indenter="cstyle"
style="C++"
mimetype="text/x-c++src;text/x-c++hdr;text/x-chdr"
extensions="*.c++;*.cxx;*.cpp;*.cc;*.C;*.h;*.hh;*.H;*.h++;*.hxx;*.hpp;*.hcc;*.moc"
author="Alex Turbov (i.zaufi@gmail.com)"
license="LGPL"
priority="6"
>
<!--
Complete list of changes by Alex Turbov (I.zaufi@gmail.com)
can be found at:
path_to_url
-->
<highlighting>
<!-- path_to_url -->
<list name="controlflow">
<item>break</item>
<item>case</item>
<item>catch</item>
<item>continue</item>
<item>default</item>
<item>do</item>
<item>else</item>
<item>for</item>
<item>goto</item>
<item>if</item>
<item>return</item>
<item>switch</item>
<item>throw</item>
<item>try</item>
<item>while</item>
<!-- coroutine -->
<item>co_await</item>
<item>co_return</item>
<item>co_yield</item>
</list>
<!-- path_to_url -->
<list name="keywords">
<item>alignof</item>
<item>alignas</item>
<item>asm</item>
<item>auto</item>
<item>class</item>
<item>consteval</item> <!-- C++20 -->
<item>constinit</item> <!-- C++20 -->
<item>constexpr</item> <!-- C++11 -->
<item>const_cast</item>
<item>decltype</item>
<item>delete</item>
<item>dynamic_cast</item>
<item>enum</item>
<item>explicit</item>
<item>false</item>
<item>final</item> <!-- C++11 -->
<item>friend</item>
<item>inline</item>
<item>namespace</item>
<item>new</item>
<item>noexcept</item>
<item>nullptr</item>
<item>operator</item>
<item>override</item> <!-- C++11 -->
<item>private</item>
<item>protected</item>
<item>public</item>
<item>reinterpret_cast</item>
<item>sizeof</item>
<item>static_assert</item>
<item>static_cast</item>
<item>struct</item>
<item>template</item>
<item>this</item>
<item>true</item>
<item>typedef</item>
<item>typeid</item>
<item>typename</item>
<item>union</item>
<item>using</item>
<item>virtual</item>
<!-- Alternative operators (see 2.12) -->
<item>and</item>
<item>and_eq</item>
<item>bitand</item>
<item>bitor</item>
<item>compl</item>
<item>not</item>
<item>not_eq</item>
<item>or</item>
<item>or_eq</item>
<item>xor</item>
<item>xor_eq</item>
<!-- Concept -->
<item>concept</item>
<item>requires</item>
<!-- TM TS -->
<!-- <item>atomic_cancel</item>
<item>atomic_commit</item>
<item>atomic_noexcept</item>
<item>synchronized</item>
<item>transaction_safe</item>
<item>transaction_safe_dynamic</item> -->
<!-- module -->
<item>import</item>
<item>module</item>
<item>export</item> <!-- Unused but reserved, keyword since c++20 -->
<!-- reflexion TS -->
<!-- <item>reflexpr</item> -->
</list>
<!-- 7.6 Attributes -->
<!-- path_to_url -->
<list name="attributes">
<!-- C++11 -->
<item>noreturn</item>
<item>carries_dependency</item>
<!-- C++14 -->
<item>deprecated</item>
<!-- C++17 -->
<item>fallthrough</item>
<item>nodiscard</item>
<item>maybe_unused</item>
<!-- C++20 -->
<item>likely</item>
<item>unlikely</item>
<item>no_unique_address</item>
<!-- TM TS -->
<!-- <item>optimize_for_synchronized</item> -->
</list>
<!-- path_to_url -->
<!-- path_to_url -->
<list name="types">
<item>bool</item>
<item>char</item>
<item>char8_t</item> <!-- C++20 -->
<item>char16_t</item>
<item>char32_t</item>
<item>double</item>
<item>float</item>
<item>int</item>
<item>long</item>
<item>short</item>
<item>signed</item>
<item>unsigned</item>
<item>void</item>
<item>int8_t</item>
<item>int16_t</item>
<item>int32_t</item>
<item>int64_t</item>
<item>uint8_t</item>
<item>uint16_t</item>
<item>uint32_t</item>
<item>uint64_t</item>
<item>int_least8_t</item>
<item>int_least16_t</item>
<item>int_least32_t</item>
<item>int_least64_t</item>
<item>uint_least8_t</item>
<item>uint_least16_t</item>
<item>uint_least32_t</item>
<item>uint_least64_t</item>
<item>int_fast8_t</item>
<item>int_fast16_t</item>
<item>int_fast32_t</item>
<item>int_fast64_t</item>
<item>uint_fast8_t</item>
<item>uint_fast16_t</item>
<item>uint_fast32_t</item>
<item>uint_fast64_t</item>
<item>size_t</item>
<item>ssize_t</item>
<item>wchar_t</item>
<item>intptr_t</item>
<item>uintptr_t</item>
<item>intmax_t</item>
<item>uintmax_t</item>
<item>ptrdiff_t</item>
<item>sig_atomic_t</item>
<item>wint_t</item>
<item>va_list</item>
<item>FILE</item>
<item>fpos_t</item>
<item>time_t</item>
</list>
<list name="modifiers">
<item>const</item>
<item>extern</item>
<item>mutable</item>
<item>register</item> <!-- The keyword is unused and reserved (c++17) -->
<item>static</item>
<item>thread_local</item>
<item>volatile</item>
</list>
<!-- path_to_url -->
<list name="StdMacros">
<item>__DATE__</item>
<item>__FILE__</item>
<item>__LINE__</item>
<item>__STDCPP_DEFAULT_NEW_ALIGNMENT__</item>
<item>__STDCPP_STRICT_POINTER_SAFETY__</item>
<item>__STDCPP_THREADS__</item>
<item>__STDC_HOSTED__</item>
<item>__STDC_ISO_10646__</item>
<item>__STDC_MB_MIGHT_NEQ_WC__</item>
<item>__STDC_VERSION__</item>
<item>__STDC__</item>
<item>__TIME__</item>
<item>__cplusplus</item>
<item>__func__</item>
<item>assert</item>
<item>_Pragma</item>
<!-- C++17 -->
<item>__has_include</item>
<!-- C++20 -->
<item>__has_cpp_attribute</item>
</list>
<list name="InMacro">
<item>__VA_ARGS__</item>
<item>__VA_OPT__</item>
</list>
<list name="preprocessor">
<item>if</item>
<item>ifdef</item>
<item>ifndef</item>
<item>elif</item>
<item>else</item>
<item>endif</item>
<item>cmakedefine01</item>
<item>cmakedefine</item>
<item>define</item>
<item>include</item>
<item>error</item>
<item>line</item>
<item>pragma</item>
<item>undef</item>
<item>warning</item>
</list>
<list name="preprocessorIfDef">
<item>ifdef</item>
<item>ifndef</item>
</list>
<list name="preprocessorDefine">
<item>cmakedefine01</item>
<item>cmakedefine</item>
<item>define</item>
</list>
<list name="preprocessorOther">
<item>error</item>
<item>line</item>
<item>pragma</item>
<item>undef</item>
<item>warning</item>
</list>
<contexts>
<context name="Main" attribute="Normal Text" lineEndContext="#stay">
<DetectSpaces/>
<!-- Match scope regions -->
<DetectChar attribute="Symbol" context="#stay" char="{" beginRegion="Brace1" />
<DetectChar attribute="Symbol" context="#stay" char="}" endRegion="Brace1" />
<Detect2Chars attribute="Symbol" context="#stay" char="<" char1="%" beginRegion="Brace1" /> <!-- Digraph: { -->
<Detect2Chars attribute="Symbol" context="#stay" char="%" char1=">" endRegion="Brace1" /> <!-- Digraph: } -->
<!-- Detect attributes -->
<Detect2Chars attribute="Symbol" context="Attribute" char="[" char1="[" />
<StringDetect attribute="Symbol" context="Attribute" String="<:<:" /> <!-- Digraph: [[ -->
<!-- Match numbers -->
<RegExpr context="Number" String="\.?\d" lookAhead="true" />
<!-- Match comments -->
<IncludeRules context="match comments and region markers" />
<!-- Match keywords -->
<IncludeRules context="match keywords" />
<!-- Match string literals -->
<IncludeRules context="match string" />
<!-- Match GCC extensions -->
<IncludeRules context="DetectGccExtensions##GCCExtensions" />
<!-- Match most used namespaces and styles -->
<StringDetect attribute="Standard Classes" context="Standard Classes" String="std::" />
<StringDetect attribute="Boost Stuff" context="Boost Stuff" String="boost::" />
<StringDetect attribute="Boost Stuff" context="Boost Stuff" String="BOOST_" />
<StringDetect attribute="Internals" context="InternalsNS" String="detail::" />
<StringDetect attribute="Internals" context="InternalsNS" String="details::" />
<StringDetect attribute="Internals" context="InternalsNS" String="aux::" />
<StringDetect attribute="Internals" context="InternalsNS" String="internals::" />
<IncludeRules context="match identifier" />
<!-- Match preprocessor directives -->
<RegExpr attribute="Preprocessor" context="AfterHash" String="&ispphash;" lookAhead="true" />
<!-- Match punctuators -->
<AnyChar attribute="Separator Symbol" context="#stay" String="&separators;" />
<AnyChar attribute="Symbol" context="#stay" String="&punctuators;" />
<!-- Match invalid symbols -->
<AnyChar attribute="Error" context="#stay" String="$@`" />
</context>
<context name="match comments" attribute="Normal Text" lineEndContext="#pop">
<Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="/" lookAhead="true"/>
<Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" />
</context>
<context name="MatchComment" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<IncludeRules context="##Doxygen" />
<Detect2Chars attribute="Comment" context="#pop!Comment 1" char="/" char1="/" />
<Detect2Chars attribute="Comment" context="#pop!Comment 2" char="/" char1="*" beginRegion="Comment" />
</context>
<context name="match comments and region markers" attribute="Normal Text" lineEndContext="#pop">
<Detect2Chars attribute="Comment" context="MatchCommentAndRegionMarkers" char="/" char1="/" lookAhead="true"/>
<Detect2Chars attribute="Comment" context="MatchCommentAndRegionMarkers" char="/" char1="*" lookAhead="true" />
</context>
<context name="MatchCommentAndRegionMarkers" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//BEGIN" beginRegion="Region1" firstNonSpace="true" />
<StringDetect attribute="Region Marker" context="#pop!Region Marker" String="//END" endRegion="Region1" firstNonSpace="true" />
<IncludeRules context="MatchComment" />
</context>
<context name="match keywords" attribute="Normal Text" lineEndContext="#pop">
<WordDetect attribute="Keyword" context="CheckUDLOperator" String="operator" />
<keyword attribute="Control Flow" context="#stay" String="controlflow" />
<keyword attribute="Keyword" context="#stay" String="keywords" />
</context>
<context name="match string" attribute="Normal Text" lineEndContext="#pop">
<DetectChar attribute="String" context="String" char=""" />
<Detect2Chars attribute="String" context="String" char="U" char1=""" />
<Detect2Chars attribute="String" context="String16" char="u" char1=""" />
<Detect2Chars attribute="String" context="String16" char="L" char1=""" />
<StringDetect attribute="String" context="String8" String="u8"" />
<Detect2Chars attribute="Raw String Delimiter" context="RawString" char="R" char1=""" />
<StringDetect attribute="Raw String Delimiter" context="RawString" String="uR"" />
<StringDetect attribute="Raw String Delimiter" context="RawString" String="UR"" />
<StringDetect attribute="Raw String Delimiter" context="RawString" String="LR"" />
<StringDetect attribute="Raw String Delimiter" context="RawString" String="u8R"" />
<DetectChar attribute="Char" context="Char8 Literal" char="'" />
<Detect2Chars attribute="Char" context="Char16 Literal" char="L" char1="'" />
<Detect2Chars attribute="Char" context="Char16 Literal" char="u" char1="'" />
<Detect2Chars attribute="Char" context="Char32 Literal" char="U" char1="'" />
<StringDetect attribute="Char" context="Char8 Literal" String="u8'" />
</context>
<context name="match identifier" attribute="Normal Text" lineEndContext="#pop">
<keyword attribute="Data Type" context="#stay" String="types" />
<keyword attribute="Type Modifiers" context="#stay" String="modifiers" />
<keyword attribute="Standard Macros" context="#stay" String="StdMacros" />
<RegExpr attribute="Internals" context="#stay" String="_[a-zA-Z0-9_]+|[a-zA-Z][a-zA-Z0-9_]*__\b" />
<RegExpr attribute="Data Members (m_*)" context="#stay" String="m_[a-zA-Z0-9_]+|[a-z][a-zA-Z0-9_]*_\b" />
<RegExpr attribute="Globals (g_*)" context="#stay" String="g_[a-zA-Z0-9_]+" />
<RegExpr attribute="Statics (s_*)" context="#stay" String="s_[a-zA-Z0-9_]+" />
<RegExpr attribute="CONSTS/MACROS" context="#stay" String="[A-Z][A-Z0-9_]{2,}\b" />
<RegExpr attribute="Types (*_t/*_type)" context="#stay" String="[a-zA-Z][a-zA-Z0-9_]*_t(ype)?\b" />
<DetectIdentifier />
</context>
<context name="Number" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr attribute="Float" context="FloatSuffix" String="\.∫&exp_float;?|0[xX](?:\.&hex_int;&exp_hexfloat;?|&hex_int;(?:&exp_hexfloat;|\.&hex_int;?&exp_hexfloat;?))|∫(?:&exp_float;|\.∫?&exp_float;?)" />
<IncludeRules context="Integer" />
</context>
<context name="Integer" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr attribute="Hex" context="IntSuffix" String="0[xX]&hex_int;" />
<RegExpr attribute="Binary" context="IntSuffix" String="0[Bb][01](?:'?[01]++)*+" />
<RegExpr attribute="Octal" context="IntSuffix" String="0(?:'?[0-7]++)++" />
<RegExpr attribute="Decimal" context="IntSuffix" String="0(?![xXbB0-9])|[1-9](?:'?[0-9]++)*+" />
<RegExpr attribute="Error" context="#pop" String="[._0-9A-Za-z']++" />
</context>
<context name="IntSuffix" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError">
<DetectChar attribute="Error" context="#stay" char="'" />
<AnyChar attribute="Error" context="#pop!IntSuffixPattern" String="uUlLimunshyd_" lookAhead="true" />
</context>
<context name="IntSuffixPattern" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError">
<RegExpr attribute="Standard Suffix" context="NumericSuffixError" String="([Uu][Ll]{0,2}|[Ll]{0,2}[Uu]?)\b" />
<!-- path_to_url#Standard_library -->
<RegExpr attribute="Standard Classes" context="NumericSuffixError" String="(?:i[fl]?|min|[mun]?s|[hyd])\b" />
<DetectChar attribute="Error" context="#pop!NumericUserSuffixPattern" char="_" lookAhead="true" />
</context>
<context name="FloatSuffix" attribute="Error" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="NumericSuffixError">
<AnyChar attribute="Standard Suffix" context="NumericSuffixError" String="fFlL" />
<!-- path_to_url#Standard_library -->
<RegExpr attribute="Standard Classes" context="NumericSuffixError" String="(?:i[fl]?|min|[mun]?s|h)\b" />
<DetectChar attribute="Error" context="#pop!NumericUserSuffixPattern" char="_" lookAhead="true" />
</context>
<context name="NumericUserSuffixPattern" attribute="Error" lineEndContext="#pop#pop">
<!--
path_to_url#Notes
Due to maximal munch, user-defined integer and floating point literals ending in
p, P, (since C++17) e and E, when followed by the operators + or -,
must be separated from the operator with whitespace or parentheses in the source
-->
<RegExpr attribute="Error" context="#pop#pop" String="_[eEpP][+-]" />
<RegExpr attribute="UDL Numeric Suffix" context="NumericSuffixError" String="_[_[:alnum:]]*" />
</context>
<context name="NumericSuffixError" attribute="Error" lineEndContext="#pop#pop#pop" fallthrough="true" fallthroughContext="#pop#pop#pop">
<RegExpr attribute="Error" context="#pop#pop#pop" String="\.[_0-9A-Za-z]*|[_0-9A-Za-z]+" />
</context>
<context name="CheckUDLOperator" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<DetectSpaces />
<Detect2Chars attribute="String" context="UDLOperatorName" char=""" char1=""" />
</context>
<context name="UDLOperatorName" attribute="Normal Text" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!IdentifierError">
<DetectSpaces />
<RegExpr attribute="Normal Text" context="#pop#pop" String="_[_[:alnum:]]*\b" />
</context>
<context name="IdentifierError" attribute="Error" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop#pop">
<RegExpr attribute="Error" context="#pop#pop" String=".[^\s()]*" />
</context>
<context name="Char8 Literal" attribute="Char" lineEndContext="#pop" fallthrough="true" fallthroughContext="Char Literal Close">
<RegExpr attribute="String Char" context="Char Literal Close" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})" />
<DetectChar attribute="Error" context="#pop" char="'" />
<RegExpr attribute="Char" context="Char Literal Close" String="." />
</context>
<context name="Char16 Literal" attribute="Char" lineEndContext="#pop" fallthrough="true" fallthroughContext="Char Literal Close">
<RegExpr attribute="String Char" context="Char Literal Close" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4})" />
<DetectChar attribute="Error" context="#pop" char="'" />
<RegExpr attribute="Char" context="Char Literal Close" String="." />
</context>
<context name="Char32 Literal" attribute="Char" lineEndContext="#pop" fallthrough="true" fallthroughContext="Char Literal Close">
<RegExpr attribute="String Char" context="Char Literal Close" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|x[0-9A-Fa-f]{1,8}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})" />
<DetectChar attribute="Error" context="#pop" char="'" />
<RegExpr attribute="Char" context="Char Literal Close" String="." />
</context>
<context name="Char Literal Close" attribute="Error" lineEndContext="#pop#pop">
<DetectChar attribute="Char" context="#pop#pop" char="'" />
</context>
<context name="String" attribute="String" lineEndContext="#pop">
<IncludeRules context="string normal char" />
<RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,8}" />
<IncludeRules context="string special char" />
</context>
<context name="String8" attribute="String" lineEndContext="#pop">
<IncludeRules context="string normal char" />
<RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,2}" />
<IncludeRules context="string special char" />
</context>
<context name="String16" attribute="String" lineEndContext="#pop">
<IncludeRules context="string normal char" />
<RegExpr attribute="String Char" context="StringNoHex" String="\\x[0-9A-Fa-f]{1,4}" />
<IncludeRules context="string special char" />
</context>
<context name="StringNoHex" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop">
<RegExpr attribute="Error" context="#pop" String="[0-9A-Fa-f]{1,}" />
</context>
<context name="string special char" attribute="String" lineEndContext="#pop">
<RegExpr attribute="String Char" context="#stay" String="\\(?:[tnvbrfa'"\\?]|[0-7]{1,3}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})|&printf_like;|&format_like;" />
<RegExpr attribute="Error" context="#stay" String="\\(?:u[^"]{0,3}|U[^"]{0,7}|.)" />
<LineContinue attribute="String" context="#stay" />
</context>
<context name="string normal char" attribute="String" lineEndContext="#pop">
<!-- fast way, can be replaced by a `UntilChars` rule if it exists -->
<!-- % -> printf format ; {} -> std::format -->
<RegExpr attribute="String" context="#stay" String="[^%\\"{}]+" />
<DetectChar attribute="String" context="UDLStringSuffix" char=""" />
</context>
<context name="UDLStringSuffix" attribute="String" fallthrough="true" fallthroughContext="#pop#pop" lineEndContext="#pop#pop">
<WordDetect attribute="Standard Classes" context="#pop#pop" String="sv" />
<WordDetect attribute="Standard Classes" context="#pop#pop" String="s" />
<RegExpr attribute="UDL String Suffix" context="#pop#pop" String="_[_0-9A-Za-z]*\b" />
</context>
<context name="Attribute" attribute="Attribute" lineEndContext="#stay">
<DetectSpaces/>
<keyword attribute="Standard Attribute" context="#stay" String="attributes" />
<Detect2Chars attribute="Symbol" context="#pop" char="]" char1="]" />
<StringDetect attribute="Symbol" context="#pop" String=":>:>" /> <!-- Digraph: ]] -->
<DetectChar attribute="Separator Symbol" context="#stay" char="," />
<AnyChar attribute="Symbol" context="#stay" String="&punctuators;" />
<!-- Attributes may contain some text: [[deprecated("Reason text")]] -->
<DetectChar attribute="String" context="String" char=""" />
<AnyChar attribute="Decimal" context="Integer" String="0123456789" lookAhead="true" />
<!-- This keyword may appear in Attribute context. For example in code:
[[using CC: opt(1), debug]]
and it should be displayed as keyword, not like part of attribute...
-->
<WordDetect attribute="Keyword" context="AttributeNamespace" String="using" />
<IncludeRules context="DetectGccAttributes##GCCExtensions" />
<RegExpr attribute="CONSTS/MACROS" context="#stay" String="[A-Z][A-Z0-9_]{2,}\b" />
<DetectIdentifier />
</context>
<context name="Attribute In PP" attribute="Attribute" lineEndContext="#pop">
<IncludeRules context="InPreprocessor" />
<IncludeRules context="Attribute" />
</context>
<context name="AttributeNamespace" attribute="Attribute" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop">
<DetectSpaces />
<IncludeRules context="DetectNamespaceGccAttributes##GCCExtensions" />
<DetectIdentifier />
</context>
<context name="RawString" attribute="String" lineEndContext="#stay" fallthrough="true" fallthroughContext="#pop!LineError">
<RegExpr attribute="Raw String Delimiter" context="#pop!InRawString" String="([^\(]{0,16})\(" beginRegion="Raw String" />
</context>
<context name="InRawString" attribute="Raw String" lineEndContext="#stay" dynamic="true">
<!-- fast way, can be replaced by a `UntilChars` rule if it exists -->
<RegExpr attribute="Raw String" context="#stay" String="[^%)]+" />
<RegExpr attribute="String Char" context="#stay" String="&printf_like;|&format_like;" />
<StringDetect attribute="Raw String Delimiter" context="#pop" String=")%1"" dynamic="true" endRegion="Raw String" />
</context>
<context name="Region Marker" attribute="Region Marker" lineEndContext="#pop" />
<context name="DetectNSEnd" attribute="Normal Text" lineEndContext="#stay">
<!-- This keyword may appear in InternalsNS context. For example in code:
details::some_class::template some_templated_static();
and it should be displayed as keyword, not like part of details namespace...
-->
<WordDetect attribute="Keyword" context="#stay" String="template" />
<DetectIdentifier context="#stay" />
<AnyChar attribute="Separator Symbol" context="#pop" String="&separators;" />
<AnyChar attribute="Symbol" context="#pop" String="&ns_punctuators; 	" />
</context>
<context name="Standard Classes" attribute="Standard Classes" lineEndContext="#stay">
<IncludeRules context="DetectNSEnd" />
</context>
<context name="Boost Stuff" attribute="Boost Stuff" lineEndContext="#stay">
<IncludeRules context="DetectNSEnd" />
</context>
<context name="InternalsNS" attribute="Internals" lineEndContext="#stay">
<IncludeRules context="DetectNSEnd" />
</context>
<context name="Standard Classes In PP" attribute="Standard Classes" lineEndContext="#pop">
<IncludeRules context="InPreprocessor" />
<IncludeRules context="DetectNSEnd" />
</context>
<context name="Boost Stuff In PP" attribute="Boost Stuff" lineEndContext="#pop">
<IncludeRules context="InPreprocessor" />
<IncludeRules context="DetectNSEnd" />
</context>
<context name="InternalsNS In PP" attribute="Internals" lineEndContext="#pop">
<IncludeRules context="InPreprocessor" />
<IncludeRules context="DetectNSEnd" />
</context>
<context name="Comment 1" attribute="Comment" lineEndContext="#pop">
<LineContinue attribute="Error" context="#stay" />
<DetectSpaces />
<IncludeRules context="##Comments" />
<DetectIdentifier />
</context>
<context name="Comment 2" attribute="Comment" lineEndContext="#stay">
<DetectSpaces />
<LineContinue attribute="Comment" context="#stay" />
<Detect2Chars attribute="Comment" context="#pop" char="*" char1="/" endRegion="Comment" />
<IncludeRules context="##Comments" />
<DetectIdentifier />
</context>
<context name="AfterHash" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!AfterHashLineError">
<RegExpr attribute="Preprocessor" context="#pop!PreprocessorCmd" String="&pphash;(?=.)" firstNonSpace="true" />
</context>
<context name="AfterHashLineError" attribute="Region Marker" lineEndContext="#pop">
<LineContinue attribute="Error" context="#stay" />
<RegExpr attribute="Error" context="#pop!LineError" String="[^\\]+" />
</context>
<context name="LineError" attribute="Error" lineEndContext="#pop">
<LineContinue attribute="Error" context="#stay" />
</context>
<context name="PreprocessorCmd" attribute="Error" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!AfterHashLineError">
<WordDetect attribute="Preprocessor" context="#pop!Include" String="include" />
<keyword attribute="Preprocessor" context="#pop!PreprocessorIfDef" String="preprocessorIfDef" beginRegion="PP" lookAhead="true" />
<WordDetect attribute="Preprocessor" context="#pop!PreprocessorIf" String="if" beginRegion="PP" lookAhead="true" />
<WordDetect attribute="Preprocessor" context="#pop!PreprocessorIf" String="elif" endRegion="PP" beginRegion="PP" lookAhead="true" />
<WordDetect attribute="Preprocessor" context="PreprocessorEndOfLineSpace" String="else" endRegion="PP" beginRegion="PP" />
<WordDetect attribute="Preprocessor" context="PreprocessorEndOfLineSpace" String="endif" endRegion="PP" />
<keyword attribute="Preprocessor" context="#pop!Preprocessor" String="preprocessorOther" />
<keyword attribute="Preprocessor" context="#pop!Define" String="preprocessorDefine" />
<!-- GCC extension -->
<WordDetect attribute="Preprocessor" context="#pop!Include" String="include_next" />
<Int attribute="Preprocessor" context="#pop!Preprocessor"/>
</context>
<context name="Include" attribute="Preprocessor" lineEndContext="#pop" >
<LineContinue attribute="Preprocessor" context="#stay" />
<RangeDetect attribute="Prep. Lib" context="PreprocessorEndOfLineSpace" char=""" char1=""" />
<RangeDetect attribute="Prep. Lib" context="PreprocessorEndOfLineSpace" char="<" char1=">" />
<IncludeRules context="Preprocessor" />
</context>
<context name="PreprocessorIfDef" attribute="Preprocessor" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!LineError">
<RegExpr attribute="Preprocessor" context="#pop!Preprocessor" String="\w+\s+([_A-Za-z][A-Za-z0-9]*\s*|(?=//|/\*))" />
</context>
<context name="PreprocessorIf" attribute="Preprocessor" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!LineError">
<RegExpr attribute="Preprocessor" context="#pop!Inscoped" String="\w+&ppcond1;" />
<RegExpr attribute="Preprocessor" context="#pop!Outscoped" String="\w+&ppcond0;" />
<RegExpr attribute="Preprocessor" context="#pop!Preprocessor" String="\w+\s+(?=[^\s])" />
</context>
<context name="PreprocessorEndOfLineSpace" attribute="Preprocessor" lineEndContext="#pop#pop" fallthrough="true" fallthroughContext="#pop#pop!LineError">
<DetectSpaces />
<IncludeRules context="match comments" />
</context>
<context name="Preprocessor" attribute="Preprocessor" lineEndContext="#pop">
<LineContinue attribute="Preprocessor" context="#stay" />
<keyword attribute="Standard Macros" context="#stay" String="StdMacros" />
<IncludeRules context="GNUMacros##GCCExtensions" />
<IncludeRules context="match comments" />
</context>
<context name="Define" attribute="Preprocessor" lineEndContext="#pop">
<DetectSpaces/>
<!--
Old version: non-contextual macro
<IncludeRules context="InPreprocessor" />
<keyword attribute="Standard Macros" context="#stay" String="StdMacros" />
<keyword attribute="Standard Macros" context="#stay" String="InMacro" />
<IncludeRules context="GNUMacros##GCCExtensions" />
<IncludeRules context="match comments" />
-->
<IncludeRules context="InPreprocessor" />
<Detect2Chars attribute="Error" context="#pop!LineError" char="/" char1="/" />
<Detect2Chars attribute="Comment" context="MatchComment" char="/" char1="*" lookAhead="true" />
<IncludeRules context="GNUMacros##GCCExtensions" />
<DetectIdentifier attribute="Preprocessor" context="#pop!In Define"/>
</context>
<context name="In Define" attribute="Preprocessor" lineEndContext="#pop">
<DetectSpaces/>
<IncludeRules context="InPreprocessor" />
<!-- Match scope regions -->
<AnyChar attribute="Symbol" context="#stay" String="{}" />
<!-- Detect attributes -->
<Detect2Chars attribute="Symbol" context="Attribute In PP" char="[" char1="[" />
<StringDetect attribute="Symbol" context="Attribute In PP" String="<:<:" /> <!-- Digraph: [[ -->
<!-- Match numbers -->
<RegExpr context="Number" String="\.?\d" lookAhead="true" />
<!-- Match comments -->
<IncludeRules context="match comments" />
<!-- Match punctuators -->
<AnyChar attribute="Separator Symbol" context="#stay" String="&separators;" />
<AnyChar attribute="Symbol" context="#stay" String="&punctuators;" />
<!-- Match keywords -->
<IncludeRules context="match keywords" />
<!-- Match string literals -->
<IncludeRules context="match string" />
<!-- Match GCC extensions -->
<IncludeRules context="DetectGccExtensionsInPP##GCCExtensions" />
<!-- Match most used namespaces and styles -->
<StringDetect attribute="Standard Classes" context="Standard Classes In PP" String="std::" />
<StringDetect attribute="Boost Stuff" context="Boost Stuff In PP" String="boost::" />
<StringDetect attribute="Boost Stuff" context="Boost Stuff In PP" String="BOOST_" />
<StringDetect attribute="Internals" context="InternalsNS In PP" String="detail::" />
<StringDetect attribute="Internals" context="InternalsNS In PP" String="details::" />
<StringDetect attribute="Internals" context="InternalsNS In PP" String="aux::" />
<StringDetect attribute="Internals" context="InternalsNS In PP" String="internals::" />
<keyword attribute="Standard Macros" context="#stay" String="InMacro" />
<IncludeRules context="match identifier" />
<!-- Match preprocessor directives -->
<DetectChar attribute="Preprocessor" context="#stay" char="#" />
<!-- Match invalid symbols -->
<AnyChar attribute="Error" context="#stay" String="$@`" />
</context>
<context name="InPreprocessor" attribute="Normal Text" lineEndContext="#pop">
<LineContinue attribute="Separator Symbol" context="#stay" />
<DetectChar attribute="Error" context="#stay" char="\" />
</context>
<context name="Outscoped Common" attribute="Comment" lineEndContext="#stay">
<DetectSpaces />
<IncludeRules context="##Comments" />
<DetectIdentifier />
<!-- prevent incorrect highlighting in case of not closed properly comment block -->
<Detect2Chars attribute="Comment" context="#stay" char="*" char1="/" />
<IncludeRules context="match comments" />
<RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if" beginRegion="PP" firstNonSpace="true" />
<LineContinue context="#stay" />
</context>
<context name="Outscoped" attribute="Comment" lineEndContext="#stay">
<DetectSpaces />
<RegExpr attribute="Preprocessor" context="Outscoped AfterHash" String="&ispphash;" firstNonSpace="true" lookAhead="true" />
<IncludeRules context="Outscoped Common" />
</context>
<context name="Outscoped AfterHash" attribute="Comment" lineEndContext="#pop">
<RegExpr attribute="Preprocessor" context="#pop#pop!PreprocessorEndOfLineSpace" String="&pphash;endif\b" endRegion="PP" />
<RegExpr attribute="Preprocessor" context="#pop#pop!Inscoped" String="&pphash;else\b" endRegion="PP" beginRegion="PP" />
<RegExpr attribute="Comment" context="#pop!Outscoped intern" String="&pphash;if" beginRegion="PP" />
<RegExpr attribute="Preprocessor" context="#pop#pop!Inscoped" String="&pphash;elif&ppcond1;" endRegion="PP" beginRegion="PP" />
<RegExpr attribute="Preprocessor" context="#pop" String="&pphash;elif&ppcond0;" endRegion="PP" beginRegion="PP" />
<RegExpr attribute="Preprocessor" context="#pop#pop!Preprocessor" String="&pphash;elif\b" endRegion="PP" beginRegion="PP" />
<RegExpr attribute="Comment" context="#pop" String="&pphash;" />
</context>
<context name="Outscoped 2" attribute="Comment" lineEndContext="#stay">
<IncludeRules context="Outscoped Common" />
<RegExpr attribute="Preprocessor" context="#pop!PreprocessorEndOfLineSpace" String="&pphash;endif" endRegion="PP" firstNonSpace="true" />
</context>
<context name="Inscoped" attribute="Normal Text" lineEndContext="#stay">
<DetectSpaces />
<RegExpr attribute="Preprocessor" context="Inscoped AfterHash" String="&ispphash;" firstNonSpace="true" lookAhead="true" />
<IncludeRules context="Main" />
</context>
<context name="Inscoped AfterHash" attribute="Normal Text" lineEndContext="#pop" fallthrough="true" fallthroughContext="#pop!AfterHash">
<DetectSpaces />
<RegExpr attribute="Preprocessor" context="#pop!Outscoped 2" String="&pphash;el(?:se|if)" endRegion="PP" beginRegion="PP"/>
<RegExpr attribute="Preprocessor" context="#pop#pop!PreprocessorEndOfLineSpace" String="&pphash;endif\b" endRegion="PP" />
</context>
<context name="Outscoped intern" attribute="Comment" lineEndContext="#stay">
<DetectSpaces />
<IncludeRules context="##Comments" />
<DetectIdentifier />
<!-- prevent incorrect highlighting in case of not closed properly comment block -->
<Detect2Chars attribute="Comment" context="#stay" char="*" char1="/" />
<IncludeRules context="match comments" />
<RegExpr attribute="Comment" context="Outscoped intern" String="&pphash;if" beginRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Comment" context="#stay" String="&pphash;el(se|if)" beginRegion="PP" endRegion="PP" firstNonSpace="true" />
<RegExpr attribute="Comment" context="PreprocessorEndOfLineSpace" String="&pphash;endif" endRegion="PP" firstNonSpace="true" />
</context>
</contexts>
<itemDatas>
<itemData name="Normal Text" defStyleNum="dsNormal" spellChecking="false" />
<itemData name="Control Flow" defStyleNum="dsControlFlow" spellChecking="false" />
<itemData name="Keyword" defStyleNum="dsKeyword" spellChecking="false" />
<itemData name="Data Type" defStyleNum="dsDataType" spellChecking="false" />
<itemData name="Type Modifiers" defStyleNum="dsAttribute" spellChecking="false" />
<itemData name="Attribute" defStyleNum="dsAttribute" spellChecking="false" bold="false" italic="true" />
<itemData name="Standard Attribute" defStyleNum="dsAttribute" spellChecking="false" bold="false" italic="true" />
<itemData name="Decimal" defStyleNum="dsDecVal" spellChecking="false" />
<itemData name="Octal" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Hex" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Binary" defStyleNum="dsBaseN" spellChecking="false" />
<itemData name="Float" defStyleNum="dsFloat" spellChecking="false" />
<itemData name="Char" defStyleNum="dsChar" spellChecking="false" />
<itemData name="String" defStyleNum="dsString" spellChecking="true" />
<itemData name="String Char" defStyleNum="dsSpecialChar" spellChecking="false" />
<itemData name="Raw String" defStyleNum="dsVerbatimString" spellChecking="true" />
<itemData name="Raw String Delimiter" defStyleNum="dsString" spellChecking="false" />
<itemData name="Comment" defStyleNum="dsComment" spellChecking="true" />
<itemData name="Symbol" defStyleNum="dsOperator" spellChecking="false" />
<itemData name="Separator Symbol" defStyleNum="dsOperator" spellChecking="false" />
<itemData name="Data Members (m_*)" defStyleNum="dsVariable" spellChecking="false" />
<itemData name="Globals (g_*)" defStyleNum="dsVariable" spellChecking="false" />
<itemData name="Statics (s_*)" defStyleNum="dsVariable" spellChecking="false" />
<itemData name="Types (*_t/*_type)" defStyleNum="dsDataType" spellChecking="false" />
<itemData name="CONSTS/MACROS" defStyleNum="dsNormal" spellChecking="false" />
<itemData name="Preprocessor" defStyleNum="dsPreprocessor" spellChecking="false" />
<itemData name="Prep. Lib" defStyleNum="dsImport" spellChecking="false" />
<itemData name="Standard Macros" defStyleNum="dsOthers" spellChecking="false" />
<itemData name="Standard Classes" defStyleNum="dsBuiltIn" spellChecking="false" />
<itemData name="Boost Stuff" defStyleNum="dsExtension" spellChecking="false" />
<itemData name="Internals" defStyleNum="dsNormal" spellChecking="false" color="#808080" selColor="#808080" />
<itemData name="Region Marker" defStyleNum="dsRegionMarker" spellChecking="false" />
<itemData name="UDL Numeric Suffix" defStyleNum="dsDecVal" spellChecking="false" />
<itemData name="UDL String Suffix" defStyleNum="dsString" spellChecking="false" />
<itemData name="Standard Suffix" defStyleNum="dsBuiltIn" spellChecking="false" />
<itemData name="Error" defStyleNum="dsError" spellChecking="false" />
</itemDatas>
</highlighting>
<general>
<comments>
<comment name="singleLine" start="//" />
<comment name="multiLine" start="/*" end="*/" region="Comment" />
</comments>
<keywords casesensitive="1" additionalDeliminator="#"" />
</general>
</language>
<!-- kate: indent-width 2; tab-width 2; -->
``` | /content/code_sandbox/syntax/isocpp.xml | xml | 2016-08-19T16:25:54 | 2024-08-11T08:59:44 | matterhorn | matterhorn-chat/matterhorn | 1,027 | 11,348 |
```xml
import { CombineLatestOperator } from '../observable/combineLatest';
import { Observable } from '../Observable';
import { OperatorFunction, ObservableInput } from '../types';
export function combineAll<T>(): OperatorFunction<ObservableInput<T>, T[]>;
export function combineAll<T>(): OperatorFunction<any, T[]>;
export function combineAll<T, R>(project: (...values: T[]) => R): OperatorFunction<ObservableInput<T>, R>;
export function combineAll<R>(project: (...values: Array<any>) => R): OperatorFunction<any, R>;
/**
* Flattens an Observable-of-Observables by applying {@link combineLatest} when the Observable-of-Observables completes.
*
* 
*
* `combineAll` takes an Observable of Observables, and collects all Observables from it. Once the outer Observable completes,
* it subscribes to all collected Observables and combines their values using the {@link combineLatest}</a> strategy, such that:
*
* * Every time an inner Observable emits, the output Observable emits
* * When the returned observable emits, it emits all of the latest values by:
* * If a `project` function is provided, it is called with each recent value from each inner Observable in whatever order they
* arrived, and the result of the `project` function is what is emitted by the output Observable.
* * If there is no `project` function, an array of all the most recent values is emitted by the output Observable.
*
* ---
*
* ## Examples
* ### Map two click events to a finite interval Observable, then apply `combineAll`
* ```javascript
* import { map, combineAll, take } from 'rxjs/operators';
* import { fromEvent } from 'rxjs/observable/fromEvent';
*
* const clicks = fromEvent(document, 'click');
* const higherOrder = clicks.pipe(
* map(ev =>
* interval(Math.random() * 2000).pipe(take(3))
* ),
* take(2)
* );
* const result = higherOrder.pipe(
* combineAll()
* );
*
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link combineLatest}
* @see {@link mergeAll}
*
* @param {function(...values: Array<any>)} An optional function to map the most recent values from each inner Observable into a new result.
* Takes each of the most recent values from each collected inner Observable as arguments, in order.
* @return {Observable<T>}
* @name combineAll
*/
export function combineAll<T, R>(project?: (...values: Array<any>) => R): OperatorFunction<T, R> {
return (source: Observable<T>) => source.lift(new CombineLatestOperator(project));
}
``` | /content/code_sandbox/deps/node-10.15.3/tools/node_modules/eslint/node_modules/rxjs/src/internal/operators/combineAll.ts | xml | 2016-09-05T10:18:44 | 2024-08-11T13:21:40 | LiquidCore | LiquidPlayer/LiquidCore | 1,010 | 577 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="path_to_url"
xmlns:context="path_to_url"
xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url
path_to_url path_to_url">
<context:component-scan base-package="org.activiti.spring.test.servicetask"/>
<bean id="sentenceGenerator" class="org.activiti.spring.test.servicetask.SentenceGenerator"/>
<bean id="delegateExpressionBean" class="org.activiti.spring.test.servicetask.DelegateExpressionBean">
<property name="sentenceGenerator" ref="sentenceGenerator"/>
</bean>
<bean id="sentenceToUpperCaseBean" class="org.activiti.spring.test.servicetask.SentenceToUpperCaseBean">
<property name="sentenceGenerator" ref="sentenceGenerator"/>
</bean>
<bean id="myExecutionListenerBean" class="org.activiti.spring.test.servicetask.MyExecutionListenerBean"/>
<bean id="myTaskListenerBean" class="org.activiti.spring.test.servicetask.MyTaskListenerBean"/>
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" />
<bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
<property name="driverClass" value="${jdbc.driver:org.h2.Driver}" />
<property name="url" value="${jdbc.url:jdbc:h2:mem:flowable;DB_CLOSE_DELAY=1000}" />
<property name="username" value="${jdbc.username:sa}" />
<property name="password" value="${jdbc.password:}" />
</bean>
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"/>
</bean>
<bean id="processEngineConfiguration" class="org.flowable.spring.SpringProcessEngineConfiguration">
<property name="dataSource" ref="dataSource"/>
<property name="transactionManager" ref="transactionManager"/>
<property name="databaseSchemaUpdate" value="true"/>
<property name="flowable5CompatibilityEnabled" value="true" />
<property name="flowable5CompatibilityHandlerFactory" ref="flowable5CompabilityFactory" />
<property name="asyncExecutorActivate" value="false" />
</bean>
<bean id="processEngine" class="org.flowable.spring.ProcessEngineFactoryBean">
<property name="processEngineConfiguration" ref="processEngineConfiguration"/>
</bean>
<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService"/>
<bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService"/>
<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService"/>
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService"/>
<bean id="managementService" factory-bean="processEngine" factory-method="getManagementService"/>
<bean id="flowable5CompabilityFactory" class="org.activiti.compatibility.spring.SpringFlowable5CompatibilityHandlerFactory" />
</beans>
``` | /content/code_sandbox/modules/flowable5-spring-test/src/test/resources/org/activiti/spring/test/servicetask/servicetaskSpringTest-context.xml | xml | 2016-10-13T07:21:43 | 2024-08-16T15:23:14 | flowable-engine | flowable/flowable-engine | 7,715 | 684 |
```xml
import React, { Component } from 'react';
import SVGInline from 'react-svg-inline';
import backArrow from '../../assets/images/back-arrow-ic.inline.svg';
import styles from './DialogBackButton.scss';
type Props = {
onBack: (...args: Array<any>) => any;
};
export default class DialogBackButton extends Component<Props> {
render() {
const { onBack } = this.props;
return (
<button onClick={onBack} className={styles.component}>
<SVGInline svg={backArrow} />
</button>
);
}
}
``` | /content/code_sandbox/source/renderer/app/components/widgets/DialogBackButton.tsx | xml | 2016-10-05T13:48:54 | 2024-08-13T22:03:19 | daedalus | input-output-hk/daedalus | 1,230 | 121 |
```xml
import React from 'react';
import { PinInput, Center, FormControl } from 'native-base';
export const Example = () => {
return (
<Center>
<FormControl isRequired isInvalid>
<FormControl.Label>OTP</FormControl.Label>
<PinInput>
<PinInput.Field />
<PinInput.Field />
<PinInput.Field />
<PinInput.Field />
</PinInput>
<FormControl.HelperText>
An otp is send to number ending with +91-XXXXX-XX007.
</FormControl.HelperText>
<FormControl.ErrorMessage>Please Retry.</FormControl.ErrorMessage>
</FormControl>
</Center>
);
};
``` | /content/code_sandbox/example/storybook/stories/components/composites/PinInput/FormControlled.tsx | xml | 2016-04-15T11:37:23 | 2024-08-14T16:16:44 | NativeBase | GeekyAnts/NativeBase | 20,132 | 138 |
```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>
<style name="Widget.MaterialComponents.NavigationRailView.PrimarySurface" parent="Widget.MaterialComponents.NavigationRailView"/>
</resources>
``` | /content/code_sandbox/lib/java/com/google/android/material/navigationrail/res/values-night/styles.xml | xml | 2016-12-05T16:11:29 | 2024-08-16T17:51:42 | material-components-android | material-components/material-components-android | 16,176 | 92 |
```xml
import { Component } from '@angular/core';
import { Code } from '@domain/code';
@Component({
selector: 'basic-doc',
template: `
<app-docsectiontext>
<p>ScrollTop listens window scroll by default.</p>
</app-docsectiontext>
<div class="card flex flex-column align-items-center">
<p>Scroll down the page to display the ScrollTo component.</p>
<i class="pi pi-angle-down fadeout animation-duration-1000 animation-iteration-infinite" style="fontsize: 2rem; margin-bottom: 30rem"></i>
<p-scrollTop />
</div>
<app-code [code]="code" selector="scroll-top-basic-demo"></app-code>
`
})
export class BasicDoc {
code: Code = {
basic: `<p-scrollTop />`,
html: `<div class="card flex flex-column align-items-center">
<p>Scroll down the page to display the ScrollTo component.</p>
<i class="pi pi-angle-down fadeout animation-duration-1000 animation-iteration-infinite" style="fontsize: 2rem"></i>
<p-scrollTop />
</div>`,
typescript: `import { Component } from '@angular/core';
import { ScrollTopModule } from 'primeng/scrolltop';
@Component({
selector: 'scroll-top-basic-demo',
templateUrl: './scroll-top-basic-demo.html',
standalone: true,
imports: [ScrollTopModule]
})
export class ScrollTopBasicDemo {}`
};
}
``` | /content/code_sandbox/src/app/showcase/doc/scrolltop/basicdoc.ts | xml | 2016-01-16T09:23:28 | 2024-08-16T19:58:20 | primeng | primefaces/primeng | 9,969 | 329 |
```xml
<response status="success">
<result>
<enabled>no</enabled>
<local-info>
<encrypt-imported>no</encrypt-imported>
</local-info>
</result>
</response>
``` | /content/code_sandbox/Packs/PAN-OS/Integrations/Panorama/test_data/show_ha_state_disabled.xml | xml | 2016-06-06T12:17:02 | 2024-08-16T11:52:59 | content | demisto/content | 1,108 | 48 |
```xml
import type { Conditional } from 'storybook/internal/types';
// TODO ?
export interface JsDocParam {
name: string;
description?: string;
}
export interface JsDocParamDeprecated {
deprecated?: string;
}
export interface JsDocReturns {
description?: string;
}
export interface JsDocTags {
params?: JsDocParam[];
deprecated?: JsDocParamDeprecated;
returns?: JsDocReturns;
}
export interface PropSummaryValue {
summary: string;
detail?: string;
required?: boolean;
}
export type PropType = PropSummaryValue;
export type PropDefaultValue = PropSummaryValue;
export interface TableAnnotation {
type: PropType;
jsDocTags?: JsDocTags;
defaultValue?: PropDefaultValue;
category?: string;
}
export interface ArgType {
name?: string;
description?: string;
defaultValue?: any;
if?: Conditional;
table?: {
category?: string;
disable?: boolean;
subcategory?: string;
defaultValue?: {
summary?: string;
detail?: string;
};
type?: {
summary?: string;
detail?: string;
};
readonly?: boolean;
[key: string]: any;
};
[key: string]: any;
}
export interface ArgTypes {
[key: string]: ArgType;
}
export interface Args {
[key: string]: any;
}
export type Globals = { [name: string]: any };
``` | /content/code_sandbox/code/lib/blocks/src/components/ArgsTable/types.ts | xml | 2016-03-18T04:23:44 | 2024-08-16T19:22:08 | storybook | storybookjs/storybook | 83,755 | 299 |
```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.
-->
<PreferenceScreen
xmlns:android="path_to_url" >
<com.klinker.android.twitter_l.views.preference.MaterialPreferenceCategory
android:title="@string/manage_mutes_options">
<Preference
android:key="manage_mutes"
android:title="@string/muted_users" />
<Preference
android:key="manage_mutes_rt"
android:title="@string/muted_rts" />
<Preference
android:key="manage_mutes_hashtags"
android:title="@string/muted_hashtags"
android:summary="@string/muted_hashtags_summary" />
<Preference
android:key="manage_muted_clients"
android:title="@string/muted_clients"
android:summary="@string/muted_clients_summary" />
<Preference
android:key="mute_regex"
android:title="@string/mute_expression"
android:summary="@string/regex_disclaimer" />
<Preference
android:key="manage_regex_mute"
android:title="@string/view_muted_expressions" />
</com.klinker.android.twitter_l.views.preference.MaterialPreferenceCategory>
<com.klinker.android.twitter_l.views.preference.MaterialPreferenceCategory
android:title="@string/manage_muffles" >
<Preference
android:summary="@string/muffle_definition" />
<Preference
android:key="manage_muffles"
android:title="@string/muffled_users"
android:summary="@string/click_to_remove_muffle"/>
</com.klinker.android.twitter_l.views.preference.MaterialPreferenceCategory>
<com.klinker.android.twitter_l.views.preference.MaterialPreferenceCategory
android:title="@string/advanced">
<SwitchPreference
android:key="ignore_retweets"
android:title="@string/ignore_retweets"
android:summary="@string/ignore_retweets_summary"
android:defaultValue="false" />
<SwitchPreference
android:key="show_muted_mentions"
android:title="@string/show_muted_mentions"
android:defaultValue="false" />
</com.klinker.android.twitter_l.views.preference.MaterialPreferenceCategory>
</PreferenceScreen>
``` | /content/code_sandbox/app/src/main/res/xml/settings_mutes.xml | xml | 2016-07-08T03:18:40 | 2024-08-14T02:54:51 | talon-for-twitter-android | klinker24/talon-for-twitter-android | 1,189 | 487 |
```xml
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/dist/zone-testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting
} from '@angular/platform-browser-dynamic/testing';
// First, initialize the Angular testing environment.
getTestBed().initTestEnvironment(
BrowserDynamicTestingModule,
platformBrowserDynamicTesting()
);
``` | /content/code_sandbox/openvidu-components-angular/src/test.ts | xml | 2016-10-10T13:31:27 | 2024-08-15T12:14:04 | openvidu | OpenVidu/openvidu | 1,859 | 94 |
```xml
import { Action } from 'redux'
export type PendingAction<T extends string, P> = Action<T> & Promise<P> & {
status: 'pending'
}
export type ResolvedAction<T extends string, P> = Action<T> & {
payload: P
status: 'resolved'
}
export type RejectedAction<T extends string> = Action<T> & {
payload: Error
status: 'rejected'
}
export function isRejectedAction(
value: unknown,
): value is RejectedAction<string> {
// eslint-disable-next-line
const v = value as any
return !!v && 'type' in v && typeof v.type === 'string' &&
'status' in v && v.status === 'rejected'
}
export type AsyncAction<T extends string, P> =
PendingAction<T, P> |
ResolvedAction<T, P> |
RejectedAction<T>
export type GetAsyncAction<A> =
A extends PendingAction<infer T, infer P>
? AsyncAction<T, P>
: A extends ResolvedAction<infer T, infer P>
? AsyncAction<T, P>
: never
export type GetAllActions<T> = {
[K in keyof T]: T[K] extends (...args: any[]) => infer R
? R
: never
}[keyof T]
export type GetAllAsyncActions<T> = GetAsyncAction<GetAllActions<T>>
function isPromise(value: unknown): value is Promise<unknown> {
return !!value && typeof value === 'object' &&
typeof (value as Promise<unknown>).then === 'function'
}
export function isPendingAction(
value: unknown,
): value is PendingAction<string, unknown> {
return isPromise(value) &&
typeof (value as unknown as { type: 'string' }).type === 'string'
}
export function makeAction<A extends unknown[], T extends string, P>(
type: T,
impl: (...args: A) => Promise<P>,
): (...args: A) => PendingAction<T, P> {
return (...args: A) => {
const pendingAction = impl(...args) as PendingAction<T, P>
pendingAction.type = type
pendingAction.status = 'pending'
return pendingAction
}
}
``` | /content/code_sandbox/src/client/async/action.ts | xml | 2016-03-31T22:41:02 | 2024-08-12T19:22:09 | peer-calls | peer-calls/peer-calls | 1,365 | 488 |
```xml
import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
import { SharedModule } from '../../shared/shared.module';
import { PipelineAddComponent } from './add/pipeline.add.component';
import { pipelineRouting } from './pipeline.routing';
import { PipelineAdminComponent } from './show/admin/pipeline.admin.component';
import { PipelineAsCodeEditorComponent } from './show/ascode-editor/pipeline.ascode.editor.component';
import { PipelineAuditComponent } from './show/audit/pipeline.audit.component';
import { PipelineShowComponent } from './show/pipeline.show.component';
import { PipelineWorkflowComponent } from './show/workflow/pipeline.workflow.component';
import { PipelineStageFormComponent } from './show/workflow/stage/form/pipeline.stage.form.component';
@NgModule({
declarations: [
PipelineShowComponent,
PipelineAddComponent,
PipelineWorkflowComponent,
PipelineStageFormComponent,
PipelineAuditComponent,
PipelineAdminComponent,
PipelineAsCodeEditorComponent,
],
imports: [
SharedModule,
pipelineRouting,
],
schemas: [
CUSTOM_ELEMENTS_SCHEMA
]
})
export class PipelineModule {
}
``` | /content/code_sandbox/ui/src/app/views/pipeline/pipeline.module.ts | xml | 2016-10-11T08:28:23 | 2024-08-16T01:55:31 | cds | ovh/cds | 4,535 | 229 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "path_to_url">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: path_to_url -->
<!-- code: path_to_url -->
<plist version="1.0">
<dict>
<key>comment</key>
<string>https://github.com/uonick</string>
<key>name</key>
<string>Dimmed Fluid</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
<dict>
<key>background</key>
<string>#FFFFFF</string>
<key>caret</key>
<string>#AEAFAD</string>
<key>foreground</key>
<string>#4D4D4C</string>
<key>invisibles</key>
<string>#D1D1D1</string>
<key>lineHighlight</key>
<string>#e8e8e8</string>
<key>selection</key>
<string>#D6D6D6</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Comment</string>
<key>scope</key>
<string>comment</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#999999</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Foreground</string>
<key>scope</key>
<string>keyword.operator.class, constant.other, source.php.embedded.line</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#666666</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Variable, String Link, Regular Expression, Tag Name</string>
<key>scope</key>
<string>variable, support.other.variable, string.other.link, string.regexp, entity.name.tag, entity.other.attribute-name, meta.tag, declaration.tag</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#f55800</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Number, Constant, Function Argument, Tag Attribute, Embedded</string>
<key>scope</key>
<string>constant.numeric, constant.language, support.constant, constant.character, variable.parameter, punctuation.section.embedded, keyword.other.unit</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#6969ff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Class, Support</string>
<key>scope</key>
<string>entity.name.class, entity.name.type.class, support.type, support.class</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#f0ae00</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>String, Symbols, Inherited Class, Markup Heading</string>
<key>scope</key>
<string>string, constant.other.symbol, entity.other.inherited-class, markup.heading</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#699200</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Operator, Misc</string>
<key>scope</key>
<string>keyword.operator, constant.other.color</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#1aa7b0</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Function, Special Method, Block Level</string>
<key>scope</key>
<string>entity.name.function, meta.function-call, support.function, keyword.other.special-method, meta.block-level</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#3366CC</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Keyword, Storage</string>
<key>scope</key>
<string>keyword, storage, storage.type</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#8e44be</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Separator</string>
<key>scope</key>
<string>meta.separator</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#2169c7</string>
<key>foreground</key>
<string>#ffffff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Deprecated</string>
<key>scope</key>
<string>invalid.deprecated</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#8e44be</string>
<key>fontStyle</key>
<string></string>
<key>foreground</key>
<string>#ffffff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff foreground</string>
<key>scope</key>
<string>markup.inserted.diff, markup.deleted.diff, meta.diff.header.to-file, meta.diff.header.from-file</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffffff</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff insertion</string>
<key>scope</key>
<string>markup.inserted.diff, meta.diff.header.to-file</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#008f00</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff deletion</string>
<key>scope</key>
<string>markup.deleted.diff, meta.diff.header.from-file</string>
<key>settings</key>
<dict>
<key>background</key>
<string>#ef0000</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff header</string>
<key>scope</key>
<string>meta.diff.header.from-file, meta.diff.header.to-file</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#ffffff</string>
<key>background</key>
<string>#333333</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Diff range</string>
<key>scope</key>
<string>meta.diff.range</string>
<key>settings</key>
<dict>
<key>fontStyle</key>
<string>italic</string>
<key>foreground</key>
<string>#333333</string>
</dict>
</dict>
</array>
<key>author</key>
<string>uonick</string>
<key>colorSpaceName</key>
<string>sRGB</string>
<key>semanticClass</key>
<string>theme.light.dimmed_fluid</string>
</dict>
</plist>
``` | /content/code_sandbox/sublime/themes/dimmed-fluid.tmTheme | xml | 2016-12-06T02:57:25 | 2024-08-16T19:49:35 | zola | getzola/zola | 13,258 | 2,068 |
```xml
import { Entity } from './entity.dto';
export class BinarySensor extends Entity {
state: boolean;
}
``` | /content/code_sandbox/src/entities/binary-sensor.ts | xml | 2016-08-18T18:50:21 | 2024-08-12T16:12:05 | room-assistant | mKeRix/room-assistant | 1,255 | 23 |
```xml
import { logger } from '@storybook/core/node-logger';
import {
getIncompatiblePackagesSummary,
getIncompatibleStorybookPackages,
} from '../../../../lib/cli-storybook/src/doctor/getIncompatibleStorybookPackages';
export const warnOnIncompatibleAddons = async (currentStorybookVersion: string) => {
const incompatiblePackagesList = await getIncompatibleStorybookPackages({
skipUpgradeCheck: true,
skipErrors: true,
currentStorybookVersion,
});
const incompatiblePackagesMessage = await getIncompatiblePackagesSummary(
incompatiblePackagesList,
currentStorybookVersion
);
if (incompatiblePackagesMessage) {
logger.warn(incompatiblePackagesMessage);
}
};
``` | /content/code_sandbox/code/core/src/core-server/utils/warnOnIncompatibleAddons.ts | xml | 2016-03-18T04:23:44 | 2024-08-16T19:22:08 | storybook | storybookjs/storybook | 83,755 | 148 |
```xml
import clsx from 'clsx';
import {Heading} from '~/components';
import {missingClass} from '~/lib/utils';
export function Section({
as: Component = 'section',
children,
className,
divider = 'none',
display = 'grid',
heading,
padding = 'all',
...props
}: {
as?: React.ElementType;
children?: React.ReactNode;
className?: string;
divider?: 'none' | 'top' | 'bottom' | 'both';
display?: 'grid' | 'flex';
heading?: string;
padding?: 'x' | 'y' | 'swimlane' | 'all';
[key: string]: any;
}) {
const paddings = {
x: 'px-6 md:px-8 lg:px-12',
y: 'py-6 md:py-8 lg:py-12',
swimlane: 'pt-4 md:pt-8 lg:pt-12 md:pb-4 lg:pb-8',
all: 'p-6 md:p-8 lg:p-12',
};
const dividers = {
none: 'border-none',
top: 'border-t border-primary/05',
bottom: 'border-b border-primary/05',
both: 'border-y border-primary/05',
};
const displays = {
flex: 'flex',
grid: 'grid',
};
const styles = clsx(
'w-full gap-4 md:gap-8',
displays[display],
missingClass(className, '\\mp[xy]?-') && paddings[padding],
dividers[divider],
className,
);
return (
<Component {...props} className={styles}>
{heading && (
<Heading size="lead" className={padding === 'y' ? paddings['x'] : ''}>
{heading}
</Heading>
)}
{children}
</Component>
);
}
``` | /content/code_sandbox/packages/hydrogen/test/fixtures/demo-store-ts/src/components/elements/Section.tsx | xml | 2016-09-09T01:12:08 | 2024-08-16T17:39:45 | vercel | vercel/vercel | 12,545 | 425 |
```xml
import { AsyncIterableX } from '../../asynciterable/asynciterablex.js';
import { zip as zipStatic } from '../../asynciterable/zip.js';
/** @nocollapse */
AsyncIterableX.zip = zipStatic;
export declare namespace asynciterable {
let zip: typeof zipStatic;
}
declare module '../../asynciterable/asynciterablex' {
// eslint-disable-next-line no-shadow
namespace AsyncIterableX {
export let zip: typeof zipStatic;
}
}
``` | /content/code_sandbox/src/add/asynciterable/zip.ts | xml | 2016-02-22T20:04:19 | 2024-08-09T18:46:41 | IxJS | ReactiveX/IxJS | 1,319 | 104 |
```xml
import React from 'react';
import { Button, Modal, FormControl, Input, Center } from 'native-base';
import { useState } from 'react';
export const Example = () => {
const [showModal, setShowModal] = useState(false);
return (
<Center>
<Button onPress={() => setShowModal(true)}>Button</Button>
<Modal isOpen={showModal} onClose={() => setShowModal(false)}>
<Modal.Content maxWidth="400px">
<Modal.CloseButton />
<Modal.Header>Contact Us</Modal.Header>
<Modal.Body>
<FormControl>
<FormControl.Label>Name</FormControl.Label>
<Input />
</FormControl>
<FormControl mt="3">
<FormControl.Label>Email</FormControl.Label>
<Input />
</FormControl>
</Modal.Body>
<Modal.Footer>
<Button.Group space={2}>
<Button
variant="ghost"
colorScheme="blueGray"
onPress={() => {
setShowModal(false);
}}
>
Cancel
</Button>
<Button
onPress={() => {
setShowModal(false);
}}
>
Save
</Button>
</Button.Group>
</Modal.Footer>
</Modal.Content>
</Modal>
</Center>
);
};
``` | /content/code_sandbox/example/storybook/stories/components/composites/Modal/Basic.tsx | xml | 2016-04-15T11:37:23 | 2024-08-14T16:16:44 | NativeBase | GeekyAnts/NativeBase | 20,132 | 269 |
```xml
import { SceneContext } from "../../SceneBase.js";
import { GfxClipSpaceNearZ, GfxDevice } from "../platform/GfxPlatform.js";
import * as GX from '../../gx/gx_enum.js';
import { GfxRenderInst, GfxRenderInstManager } from "../render/GfxRenderInstManager.js";
import { fillMatrix4x3 } from "./UniformBufferHelpers.js";
import { mat4, vec3, vec4 } from "gl-matrix";
import { projectionMatrixForCuboid, MathConstants } from "../../MathHelpers.js";
import { colorCopy, colorNewCopy, OpaqueBlack, White } from "../../Color.js";
// TODO(jstpierre): Don't use the Super Mario Galaxy system for this... use our own font data,
// or use HTML5 canvas? It would be helpful to have in any case...
import { CharWriter, parseBRFNT, ResFont } from "../../Common/NW4R/lyt/Font.js";
import { decompress } from "../../Common/Compression/Yaz0.js";
import * as JKRArchive from "../../Common/JSYSTEM/JKRArchive.js";
import { TDDraw } from "../../SuperMarioGalaxy/DDraw.js";
import { GX_Program } from "../../gx/gx_material.js";
import { fillSceneParamsData, gxBindingLayouts, SceneParams, ub_SceneParamsBufferSize } from "../../gx/gx_render.js";
import { projectionMatrixConvertClipSpaceNearZ } from "./ProjectionHelpers.js";
import { GfxRenderCache } from "../render/GfxRenderCache.js";
const scratchMatrix = mat4.create();
const scratchVec4 = vec4.create();
const sceneParams = new SceneParams();
export class DebugTextDrawer {
private charWriter = new CharWriter();
private ddraw = new TDDraw();
private renderCache: GfxRenderCache;
public textColor = colorNewCopy(White);
public strokeColor = colorNewCopy(OpaqueBlack);
constructor(device: GfxDevice, private fontData: ResFont) {
this.renderCache = new GfxRenderCache(device);
this.charWriter.setFont(fontData, 0, 0);
const ddraw = this.ddraw;
ddraw.setVtxDesc(GX.Attr.POS, true);
ddraw.setVtxDesc(GX.Attr.CLR0, true);
ddraw.setVtxDesc(GX.Attr.TEX0, true);
}
private setSceneParams(renderInst: GfxRenderInst, w: number, h: number, clipSpaceNearZ: GfxClipSpaceNearZ): void {
let offs = renderInst.allocateUniformBuffer(GX_Program.ub_SceneParams, ub_SceneParamsBufferSize);
const d = renderInst.mapUniformBufferF32(GX_Program.ub_SceneParams);
projectionMatrixForCuboid(sceneParams.u_Projection, 0, w, 0, h, -10000.0, 10000.0);
projectionMatrixConvertClipSpaceNearZ(sceneParams.u_Projection, clipSpaceNearZ, GfxClipSpaceNearZ.NegativeOne);
fillSceneParamsData(d, offs, sceneParams);
}
private setDrawParams(renderInst: GfxRenderInst): void {
let offs = renderInst.allocateUniformBuffer(GX_Program.ub_DrawParams, 16);
const d = renderInst.mapUniformBufferF32(GX_Program.ub_DrawParams);
mat4.identity(scratchMatrix);
offs += fillMatrix4x3(d, offs, scratchMatrix);
}
public beginDraw(): void {
this.ddraw.beginDraw(this.renderCache);
}
public endDraw(renderInstManager: GfxRenderInstManager): void {
this.ddraw.endDraw(renderInstManager);
}
public setFontScale(scale: number): void {
this.charWriter.scale[0] = scale;
this.charWriter.scale[1] = scale;
}
public getScaledLineHeight(): number {
return this.charWriter.getScaledLineHeight();
}
public reserveString(numChars: number, strokeNum: number = 4): void {
const numQuadsPerChar = 1 + strokeNum;
// a bit overeager, but should be OK
const numQuads = numQuadsPerChar * numChars;
this.ddraw.allocPrimitives(GX.Command.DRAW_QUADS, 4 * numQuads);
}
public drawString(renderInstManager: GfxRenderInstManager, vw: number, vh: number, str: string, x: number, y: number, strokeWidth = 1, strokeNum = 4): void {
const cache = this.renderCache;
vec3.zero(this.charWriter.origin);
vec3.copy(this.charWriter.cursor, this.charWriter.origin);
this.charWriter.calcRect(scratchVec4, str);
// Center align
const rx0 = scratchVec4[0], rx1 = scratchVec4[2];
const w = rx1 - rx0;
x -= w / 2;
const template = renderInstManager.pushTemplateRenderInst();
template.setBindingLayouts(gxBindingLayouts);
const clipSpaceNearZ = cache.device.queryVendorInfo().clipSpaceNearZ;
this.setSceneParams(template, vw, vh, clipSpaceNearZ);
this.setDrawParams(template);
// Stroke
colorCopy(this.charWriter.color1, this.strokeColor);
for (let i = 0; i < strokeNum; i++) {
const theta = i * MathConstants.TAU / strokeNum;
const sy = strokeWidth * Math.sin(theta), sx = strokeWidth * Math.cos(theta);
vec3.set(this.charWriter.cursor, x + sx, y + sy, 0);
this.charWriter.drawString(renderInstManager, cache, this.ddraw, str);
}
// Main fill
colorCopy(this.charWriter.color1, this.textColor);
vec3.set(this.charWriter.cursor, x, y, 0);
this.charWriter.drawString(renderInstManager, cache, this.ddraw, str);
renderInstManager.popTemplateRenderInst();
}
public destroy(device: GfxDevice): void {
this.fontData.destroy(device);
this.ddraw.destroy(device);
this.renderCache.destroy();
}
}
export async function makeDebugTextDrawer(context: SceneContext): Promise<DebugTextDrawer> {
return context.dataShare.ensureObject<DebugTextDrawer>(`DebugTextDrawer`, async () => {
const fontArcData = await context.dataFetcher.fetchData(`SuperMarioGalaxy/LayoutData/Font.arc`);
const fontArc = JKRArchive.parse(await decompress(fontArcData));
const fontBRFNT = parseBRFNT(fontArc.findFileData(`messagefont26.brfnt`)!);
const fontData = new ResFont(context.device, fontBRFNT);
return new DebugTextDrawer(context.device, fontData);
});
}
``` | /content/code_sandbox/src/gfx/helpers/DebugTextDrawer.ts | xml | 2016-10-06T21:43:45 | 2024-08-16T17:03:52 | noclip.website | magcius/noclip.website | 3,206 | 1,477 |
```xml
import * as React from 'react';
import createSvgIcon from '../utils/createSvgIcon';
const HeadsetIcon = createSvgIcon({
svg: ({ classes }) => (
<svg xmlns="path_to_url" viewBox="0 0 2048 2048" className={classes.svg} focusable="false">
<path d="M1024 0q106 0 204 27t183 78 156 120 120 155 77 184 28 204v448q0 40-15 75t-41 61-61 41-75 15h-192V768h192q17 0 33 3t31 9q0-135-49-253t-134-207-203-140-254-52q-88 0-170 23t-153 64-129 100-100 130-65 153-23 170v12q15-5 31-8t33-4h192v640H512v128q0 53 20 99t55 82 81 55 100 20q0-27 10-50t27-40 41-28 50-10h256q27 0 50 10t40 27 28 41 10 50v128q0 27-10 50t-27 40-41 28-50 10H896q-27 0-50-10t-40-27-28-41-10-50q-80 your_sha256_hash-59V768q0-106 27-204t78-183 120-156 155-120 184-77 204-28zM896 1920h256v-128H896v128zM448 896q-26 0-45 19t-19 45v256q0 26 19 45t45 19h64V896h-64zm1216 64q0-26-19-45t-45-19h-64v384h64q26 0 45-19t19-45V960z" />
</svg>
),
displayName: 'HeadsetIcon',
});
export default HeadsetIcon;
``` | /content/code_sandbox/packages/react-icons-mdl2/src/components/HeadsetIcon.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 482 |
```xml
//
//
// Microsoft Bot Framework: path_to_url
//
// Bot Framework Emulator Github:
// path_to_url
//
// All rights reserved.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
import * as React from 'react';
import { disconnected } from './chat.scss';
export interface ConnectionMessageProps {
documentId?: string;
pendingSpeechTokenRetrieval?: boolean;
}
export const ConnectionMessage = (props: ConnectionMessageProps) => {
return props.pendingSpeechTokenRetrieval ? <div className={disconnected}>Connecting...</div> : null;
};
``` | /content/code_sandbox/packages/app/client/src/ui/editor/emulator/parts/chat/connectionMessage.tsx | xml | 2016-11-11T23:15:09 | 2024-08-16T12:45:29 | BotFramework-Emulator | microsoft/BotFramework-Emulator | 1,803 | 333 |
```xml
<test>
<settings>
<max_block_size>1000</max_block_size>
</settings>
<create_query>
CREATE TABLE squash_performance
(
s1 String,
s2 Nullable(String),
a1 Array(Array(String)),
a2 Array(Array(UInt32)),
m1 Map(String, Array(String)),
m2 Map(String, Array(UInt64)),
t Tuple(String, Array(String), Map(String, String))
)
ENGINE = Null;
</create_query>
<query>INSERT INTO squash_performance SELECT * FROM generateRandom(42) LIMIT 500000</query>
<drop_query>DROP TABLE IF EXISTS squash_performance</drop_query>
</test>
``` | /content/code_sandbox/tests/performance/insert_select_squashing.xml | xml | 2016-06-02T08:28:18 | 2024-08-16T18:39:33 | ClickHouse | ClickHouse/ClickHouse | 36,234 | 145 |
```xml
import * as gen from './gen'
import * as types from './types'
type ListOperation = keyof {
[K in types.Operation as types.ClientInputs[K] extends { nextToken?: string | undefined } ? K : never]: null
}
type ListInputs = {
[K in ListOperation]: Omit<types.ClientInputs[K], 'nextToken'>
}
type PageLister<R> = (t: { nextToken?: string }) => Promise<{ items: R[]; meta: { nextToken?: string } }>
class AsyncCollection<T> {
public constructor(private _list: PageLister<T>) {}
public async *[Symbol.asyncIterator]() {
let nextToken: string | undefined
do {
const { items, meta } = await this._list({ nextToken })
nextToken = meta.nextToken
for (const item of items) {
yield item
}
} while (nextToken)
}
public async collect(props: { limit?: number } = {}) {
const limit = props.limit ?? Number.POSITIVE_INFINITY
const arr: T[] = []
let count = 0
for await (const item of this) {
arr.push(item)
count++
if (count >= limit) {
break
}
}
return arr
}
}
// lots of repeated code here, but I prefer using vertical selection than to make the code more complex - fleur
export class Lister {
public constructor(private client: gen.Client) {}
public readonly conversations = (props: ListInputs['listConversations']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listConversations({ nextToken, ...props }).then((r) => ({ ...r, items: r.conversations }))
)
public readonly participants = (props: ListInputs['listParticipants']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listParticipants({ nextToken, ...props }).then((r) => ({ ...r, items: r.participants }))
)
public readonly events = (props: ListInputs['listEvents']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listEvents({ nextToken, ...props }).then((r) => ({ ...r, items: r.events }))
)
public readonly messages = (props: ListInputs['listMessages']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listMessages({ nextToken, ...props }).then((r) => ({ ...r, items: r.messages }))
)
public readonly users = (props: ListInputs['listUsers']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listUsers({ nextToken, ...props }).then((r) => ({ ...r, items: r.users }))
)
public readonly tasks = (props: ListInputs['listTasks']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listTasks({ nextToken, ...props }).then((r) => ({ ...r, items: r.tasks }))
)
public readonly publicIntegrations = (props: ListInputs['listPublicIntegrations']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listPublicIntegrations({ nextToken, ...props }).then((r) => ({ ...r, items: r.integrations }))
)
public readonly bots = (props: ListInputs['listBots']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listBots({ nextToken, ...props }).then((r) => ({ ...r, items: r.bots }))
)
public readonly botIssues = (props: ListInputs['listBotIssues']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listBotIssues({ nextToken, ...props }).then((r) => ({ ...r, items: r.issues }))
)
public readonly workspaces = (props: ListInputs['listWorkspaces']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listWorkspaces({ nextToken, ...props }).then((r) => ({ ...r, items: r.workspaces }))
)
public readonly publicWorkspaces = (props: ListInputs['listPublicWorkspaces']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listPublicWorkspaces({ nextToken, ...props }).then((r) => ({ ...r, items: r.workspaces }))
)
public readonly workspaceMembers = (props: ListInputs['listWorkspaceMembers']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listWorkspaceMembers({ nextToken, ...props }).then((r) => ({ ...r, items: r.members }))
)
public readonly integrations = (props: ListInputs['listIntegrations']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listIntegrations({ nextToken, ...props }).then((r) => ({ ...r, items: r.integrations }))
)
public readonly interfaces = (props: ListInputs['listInterfaces']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listInterfaces({ nextToken, ...props }).then((r) => ({ ...r, items: r.interfaces }))
)
public readonly activities = (props: ListInputs['listActivities']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listActivities({ nextToken, ...props }).then((r) => ({ ...r, items: r.activities }))
)
public readonly files = (props: ListInputs['listFiles']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listFiles({ nextToken, ...props }).then((r) => ({ ...r, items: r.files }))
)
public readonly filePassages = (props: ListInputs['listFilePassages']) =>
new AsyncCollection(({ nextToken }) =>
this.client.listFilePassages({ nextToken, ...props }).then((r) => ({ ...r, items: r.passages }))
)
}
``` | /content/code_sandbox/packages/client/src/lister.ts | xml | 2016-11-16T21:57:59 | 2024-08-16T18:45:35 | botpress | botpress/botpress | 12,401 | 1,252 |
```xml
import * as mysqlDump from 'mysqldump';
import * as path from 'path';
import * as fs from 'fs-extra';
import { Setting } from '../utils/setting';
import { Log } from '../utils/log';
export class BackupService {
static isBackuping = false;
static backupHour = 23;
static backupMaxCount = 10;
static backupFolder = path.join(__dirname, '../backup');
static async backupDB() {
if (this.isBackuping) {
Log.info('is backuping');
return;
}
Log.info('try to backup db');
if (new Date().getHours() !== this.backupHour) {
Log.info('not the backup time');
return;
}
const files = fs.readdirSync(this.backupFolder);
const isBackuped = files.some(f => fs.statSync(path.join(this.backupFolder, f)).birthtime.toLocaleDateString() === new Date().toLocaleDateString());
if (isBackuped) {
Log.info('db was backuped today');
return;
}
this.isBackuping = true;
try {
if (!fs.existsSync(this.backupFolder)) {
fs.mkdirSync(this.backupFolder, 0o666);
}
if (files.length >= this.backupMaxCount) {
let oldFile = path.join(this.backupFolder, files[0]);
let oldFileDate = fs.statSync(oldFile).birthtime;
for (let i = 1; i < files.length; i++) {
const newFile = path.join(this.backupFolder, files[i]);
const newFileDate = fs.statSync(newFile).birthtime;
if (newFileDate > oldFileDate) {
oldFile = newFile;
oldFileDate = newFileDate;
}
}
fs.unlinkSync(oldFile);
}
Log.info('dump mysql');
await this.dump(new Date().toLocaleDateString());
Log.info('backup completely');
} catch (ex) {
Log.error(ex);
} finally {
this.isBackuping = false;
}
}
private static dump(name: string): Promise<any> {
return new Promise((resolve, reject) => {
mysqlDump({
host: process.env.HITCHHIKER_DB_HOST || Setting.instance.db.host,
port: parseInt(process.env.HITCHHIKER_DB_PORT) || Setting.instance.db.port,
user: process.env.HITCHHIKER_DB_USERNAME || Setting.instance.db.username,
password: process.env.MYSQL_ROOT_PASSWORD || Setting.instance.db.password,
database: process.env.MYSQL_DATABASE || Setting.instance.db.database,
dest: path.join(this.backupFolder, name)
}, function (err: any) {
if (err) {
Log.error('dump mysql failed');
Log.error(err.toString());
reject(err);
} else {
Log.info('dump mysql success');
resolve();
}
});
});
}
}
``` | /content/code_sandbox/api/src/services/backup_service.ts | xml | 2016-09-26T02:47:43 | 2024-07-24T09:32:20 | Hitchhiker | brookshi/Hitchhiker | 2,193 | 620 |
```xml
///
///
///
/// path_to_url
///
/// Unless required by applicable law or agreed to in writing, software
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
///
import { Component, Inject, OnDestroy, OnInit } from '@angular/core';
import { DialogComponent } from '@shared/components/dialog.component';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { Router } from '@angular/router';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { ActionPreferencesPutUserSettings } from '@core/auth/auth.actions';
import {
EdgeInfo,
EdgeInstructions,
EdgeInstructionsMethod,
edgeVersionAttributeKey
} from '@shared/models/edge.models';
import { EdgeService } from '@core/http/edge.service';
import { AttributeService } from '@core/http/attribute.service';
import { AttributeScope } from '@shared/models/telemetry/telemetry.models';
import { mergeMap, Observable } from 'rxjs';
export interface EdgeInstructionsDialogData {
edge: EdgeInfo;
afterAdd: boolean;
upgradeAvailable: boolean;
}
@Component({
selector: 'tb-edge-installation-dialog',
templateUrl: './edge-instructions-dialog.component.html',
styleUrls: ['./edge-instructions-dialog.component.scss']
})
export class EdgeInstructionsDialogComponent extends DialogComponent<EdgeInstructionsDialogComponent> implements OnInit, OnDestroy {
dialogTitle: string;
showDontShowAgain: boolean;
loadedInstructions = false;
notShowAgain = false;
tabIndex = 0;
instructionsMethod = EdgeInstructionsMethod;
contentData: any = {};
constructor(protected store: Store<AppState>,
protected router: Router,
@Inject(MAT_DIALOG_DATA) private data: EdgeInstructionsDialogData,
public dialogRef: MatDialogRef<EdgeInstructionsDialogComponent>,
private attributeService: AttributeService,
private edgeService: EdgeService) {
super(store, router, dialogRef);
if (this.data.afterAdd) {
this.dialogTitle = 'edge.install-connect-instructions-edge-created';
this.showDontShowAgain = true;
} else if (this.data.upgradeAvailable) {
this.dialogTitle = 'edge.upgrade-instructions';
this.showDontShowAgain = false;
} else {
this.dialogTitle = 'edge.install-connect-instructions';
this.showDontShowAgain = false;
}
}
ngOnInit() {
this.getInstructions(this.instructionsMethod[this.tabIndex]);
}
ngOnDestroy() {
super.ngOnDestroy();
}
close(): void {
if (this.notShowAgain && this.showDontShowAgain) {
this.store.dispatch(new ActionPreferencesPutUserSettings({notDisplayInstructionsAfterAddEdge: true}));
this.dialogRef.close(null);
} else {
this.dialogRef.close(null);
}
}
selectedTabChange(index: number) {
this.getInstructions(this.instructionsMethod[index]);
}
getInstructions(method: string) {
if (!this.contentData[method]) {
this.loadedInstructions = false;
let edgeInstructions$: Observable<EdgeInstructions>;
if (this.data.upgradeAvailable) {
edgeInstructions$ = this.attributeService.getEntityAttributes(this.data.edge.id, AttributeScope.SERVER_SCOPE, [edgeVersionAttributeKey])
.pipe(mergeMap(attributes => {
if (attributes.length) {
const edgeVersion = attributes[0].value;
return this.edgeService.getEdgeUpgradeInstructions(edgeVersion, method);
}
}));
} else {
edgeInstructions$ = this.edgeService.getEdgeInstallInstructions(this.data.edge.id.id, method);
}
edgeInstructions$.subscribe(res => {
this.contentData[method] = res.instructions;
this.loadedInstructions = true;
});
}
}
}
``` | /content/code_sandbox/ui-ngx/src/app/modules/home/pages/edge/edge-instructions-dialog.component.ts | xml | 2016-12-01T09:33:30 | 2024-08-16T19:58:25 | thingsboard | thingsboard/thingsboard | 16,820 | 787 |
```xml
import { extname } from 'path';
export type Config = {
generates: Record<
string,
{
plugins: (string | unknown)[];
preset?: string;
presetConfig?: {
baseTypesPath: string;
extension: string;
typesPath: string;
};
}
>;
};
export function getMode(config: Config) {
const ext = extname(Object.keys(config.generates)[0]);
switch (ext.slice(1)) {
case 'graphql':
return 'graphql';
case 'json':
return 'json';
case 'java':
return 'java';
case 'js':
case 'jsx':
return 'javascript';
default:
return 'text/typescript';
}
}
``` | /content/code_sandbox/website/src/components/live-demo/formatter.ts | xml | 2016-12-05T19:15:11 | 2024-08-15T14:56:08 | graphql-code-generator | dotansimha/graphql-code-generator | 10,759 | 160 |
```xml
import { ElementProvisioner } from './ElementProvisioner';
import { IListDefinition, IFieldDefinition } from "./IElementDefinitions";
import { IUpgradeAction } from "./IUpgradeAction";
export abstract class DeleteListFieldUpgradeAction implements IUpgradeAction {
constructor(
private readonly _listDefinition: IListDefinition,
private readonly _fieldDefinition: IFieldDefinition
) { }
public get description(): string {
const fieldName = this._fieldDefinition.displayName || this._fieldDefinition.name;
const listTitle = this._listDefinition.title;
return `Deleting field '${fieldName}' from list '${listTitle}'`;
}
public async execute(): Promise<void> {
const provisioner: ElementProvisioner = new ElementProvisioner();
await provisioner.deleteField(this._fieldDefinition, this._listDefinition);
}
}
``` | /content/code_sandbox/samples/react-rhythm-of-business-calendar/src/common/sharepoint/schema/DeleteListFieldUpgradeAction.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 178 |
```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.
-->
<vector xmlns:android="path_to_url"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
</vector>
``` | /content/code_sandbox/testapp/src/main/res/drawable/ic_add_black_24dp.xml | xml | 2016-05-18T03:15:58 | 2024-07-26T13:38:08 | firebase-jobdispatcher-android | googlearchive/firebase-jobdispatcher-android | 1,790 | 136 |
```xml
import { PagesRouteModule } from '../../server/route-modules/pages/module.compiled'
import { RouteKind } from '../../server/route-kind'
import { hoist } from './helpers'
// Import the app and document modules.
import Document from 'VAR_MODULE_DOCUMENT'
import App from 'VAR_MODULE_APP'
// Import the userland code.
import * as userland from 'VAR_USERLAND'
// Re-export the component (should be the default export).
export default hoist(userland, 'default')
// Re-export methods.
export const getStaticProps = hoist(userland, 'getStaticProps')
export const getStaticPaths = hoist(userland, 'getStaticPaths')
export const getServerSideProps = hoist(userland, 'getServerSideProps')
export const config = hoist(userland, 'config')
export const reportWebVitals = hoist(userland, 'reportWebVitals')
// Re-export legacy methods.
export const unstable_getStaticProps = hoist(
userland,
'unstable_getStaticProps'
)
export const unstable_getStaticPaths = hoist(
userland,
'unstable_getStaticPaths'
)
export const unstable_getStaticParams = hoist(
userland,
'unstable_getStaticParams'
)
export const unstable_getServerProps = hoist(
userland,
'unstable_getServerProps'
)
export const unstable_getServerSideProps = hoist(
userland,
'unstable_getServerSideProps'
)
// Create and export the route module that will be consumed.
export const routeModule = new PagesRouteModule({
definition: {
kind: RouteKind.PAGES,
page: 'VAR_DEFINITION_PAGE',
pathname: 'VAR_DEFINITION_PATHNAME',
// The following aren't used in production.
bundlePath: '',
filename: '',
},
components: {
App,
Document,
},
userland,
})
``` | /content/code_sandbox/packages/next/src/build/templates/pages.ts | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 400 |
```xml
import { FormContextKey } from './symbols';
import { FormState, ResetFormOpts } from './types';
import { injectWithSelf, warn } from './utils';
export function useResetForm<TValues extends Record<string, unknown> = Record<string, unknown>>() {
const form = injectWithSelf(FormContextKey);
if (!form) {
if (__DEV__) {
warn('No vee-validate <Form /> or `useForm` was detected in the component tree');
}
}
return function resetForm(state?: Partial<FormState<TValues>>, opts?: ResetFormOpts) {
if (!form) {
return;
}
return form.resetForm(state, opts);
};
}
``` | /content/code_sandbox/packages/vee-validate/src/useResetForm.ts | xml | 2016-07-30T01:10:44 | 2024-08-16T10:19:58 | vee-validate | logaretm/vee-validate | 10,699 | 148 |
```xml
import React from 'react';
import 'chart.js/auto';
import { Line } from '../src';
import * as defaultLine from '../sandboxes/line/default/App';
import * as multiaxisLine from '../sandboxes/line/multiaxis/App';
export default {
title: 'Components/Line',
component: Line,
parameters: {
layout: 'centered',
},
args: {
width: 500,
height: 400,
},
};
export const Default = args => <Line {...args} />;
Default.args = {
data: defaultLine.data,
options: defaultLine.options,
};
export const MultiAxis = args => <Line {...args} />;
MultiAxis.args = {
data: multiaxisLine.data,
options: multiaxisLine.options,
};
``` | /content/code_sandbox/stories/Line.tsx | xml | 2016-05-06T22:01:08 | 2024-08-16T12:44:53 | react-chartjs-2 | reactchartjs/react-chartjs-2 | 6,538 | 172 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Behavior Version="5">
<Node Class="Behaviac.Design.Nodes.Behavior" AgentType="AgentNodeTest" Domains="" Enable="true" HasOwnPrefabData="false" Id="-1" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
<DescriptorRefs value="0:" />
<Connector Identifier="GenericChildren">
<Node Class="PluginBehaviac.Nodes.SelectorLoop" Enable="true" HasOwnPrefabData="false" Id="0" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
<Connector Identifier="GenericChildren">
<Node Class="PluginBehaviac.Nodes.WithPrecondition" Enable="true" HasOwnPrefabData="false" Id="1" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
<Connector Identifier="Precondition">
<Node Class="PluginBehaviac.Nodes.True" Enable="true" HasOwnPrefabData="false" Id="4" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
</Node>
</Connector>
<Connector Identifier="Action">
<Node Class="PluginBehaviac.Nodes.Action" Enable="true" HasOwnPrefabData="false" Id="5" Method="Self.AgentNodeTest::setTestVar_0(0)" PrefabName="" PrefabNodeId="-1" ResultFunctor="""" ResultOption="BT_FAILURE">
<Comment Background="NoColor" Text="" />
</Node>
</Connector>
</Node>
<Node Class="PluginBehaviac.Nodes.WithPrecondition" Enable="true" HasOwnPrefabData="false" Id="2" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
<Connector Identifier="Precondition">
<Node Class="PluginBehaviac.Nodes.False" Enable="true" HasOwnPrefabData="false" Id="3" PrefabName="" PrefabNodeId="-1">
<Comment Background="NoColor" Text="" />
</Node>
</Connector>
<Connector Identifier="Action">
<Node Class="PluginBehaviac.Nodes.Action" Enable="true" HasOwnPrefabData="false" Id="6" Method="Self.AgentNodeTest::setTestVar_0(1)" PrefabName="" PrefabNodeId="-1" ResultFunctor="""" ResultOption="BT_SUCCESS">
<Comment Background="NoColor" Text="" />
</Node>
</Connector>
</Node>
</Connector>
</Node>
</Connector>
</Node>
</Behavior>
``` | /content/code_sandbox/integration/unity/Assets/behaviac/workspace/behaviors/node_test/selector_loop_ut_2.xml | xml | 2016-11-21T05:08:08 | 2024-08-16T07:18:30 | behaviac | Tencent/behaviac | 2,831 | 597 |
```xml
<?xml version="1.0"?>
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. -->
<!DOCTYPE feature SYSTEM "gdb-syscalls.dtd">
<!-- This file was generated using the following file:
/usr/src/linux/arch/x86/include/asm/unistd_64.h
The file mentioned above belongs to the Linux Kernel. -->
<syscalls_info>
<syscall name="read" number="0"/>
<syscall name="write" number="1"/>
<syscall name="open" number="2"/>
<syscall name="close" number="3"/>
<syscall name="stat" number="4"/>
<syscall name="fstat" number="5"/>
<syscall name="lstat" number="6"/>
<syscall name="poll" number="7"/>
<syscall name="lseek" number="8"/>
<syscall name="mmap" number="9"/>
<syscall name="mprotect" number="10"/>
<syscall name="munmap" number="11"/>
<syscall name="brk" number="12"/>
<syscall name="rt_sigaction" number="13"/>
<syscall name="rt_sigprocmask" number="14"/>
<syscall name="rt_sigreturn" number="15"/>
<syscall name="ioctl" number="16"/>
<syscall name="pread64" number="17"/>
<syscall name="pwrite64" number="18"/>
<syscall name="readv" number="19"/>
<syscall name="writev" number="20"/>
<syscall name="access" number="21"/>
<syscall name="pipe" number="22"/>
<syscall name="select" number="23"/>
<syscall name="sched_yield" number="24"/>
<syscall name="mremap" number="25"/>
<syscall name="msync" number="26"/>
<syscall name="mincore" number="27"/>
<syscall name="madvise" number="28"/>
<syscall name="shmget" number="29"/>
<syscall name="shmat" number="30"/>
<syscall name="shmctl" number="31"/>
<syscall name="dup" number="32"/>
<syscall name="dup2" number="33"/>
<syscall name="pause" number="34"/>
<syscall name="nanosleep" number="35"/>
<syscall name="getitimer" number="36"/>
<syscall name="alarm" number="37"/>
<syscall name="setitimer" number="38"/>
<syscall name="getpid" number="39"/>
<syscall name="sendfile" number="40"/>
<syscall name="socket" number="41"/>
<syscall name="connect" number="42"/>
<syscall name="accept" number="43"/>
<syscall name="sendto" number="44"/>
<syscall name="recvfrom" number="45"/>
<syscall name="sendmsg" number="46"/>
<syscall name="recvmsg" number="47"/>
<syscall name="shutdown" number="48"/>
<syscall name="bind" number="49"/>
<syscall name="listen" number="50"/>
<syscall name="getsockname" number="51"/>
<syscall name="getpeername" number="52"/>
<syscall name="socketpair" number="53"/>
<syscall name="setsockopt" number="54"/>
<syscall name="getsockopt" number="55"/>
<syscall name="clone" number="56"/>
<syscall name="fork" number="57"/>
<syscall name="vfork" number="58"/>
<syscall name="execve" number="59"/>
<syscall name="exit" number="60"/>
<syscall name="wait4" number="61"/>
<syscall name="kill" number="62"/>
<syscall name="uname" number="63"/>
<syscall name="semget" number="64"/>
<syscall name="semop" number="65"/>
<syscall name="semctl" number="66"/>
<syscall name="shmdt" number="67"/>
<syscall name="msgget" number="68"/>
<syscall name="msgsnd" number="69"/>
<syscall name="msgrcv" number="70"/>
<syscall name="msgctl" number="71"/>
<syscall name="fcntl" number="72"/>
<syscall name="flock" number="73"/>
<syscall name="fsync" number="74"/>
<syscall name="fdatasync" number="75"/>
<syscall name="truncate" number="76"/>
<syscall name="ftruncate" number="77"/>
<syscall name="getdents" number="78"/>
<syscall name="getcwd" number="79"/>
<syscall name="chdir" number="80"/>
<syscall name="fchdir" number="81"/>
<syscall name="rename" number="82"/>
<syscall name="mkdir" number="83"/>
<syscall name="rmdir" number="84"/>
<syscall name="creat" number="85"/>
<syscall name="link" number="86"/>
<syscall name="unlink" number="87"/>
<syscall name="symlink" number="88"/>
<syscall name="readlink" number="89"/>
<syscall name="chmod" number="90"/>
<syscall name="fchmod" number="91"/>
<syscall name="chown" number="92"/>
<syscall name="fchown" number="93"/>
<syscall name="lchown" number="94"/>
<syscall name="umask" number="95"/>
<syscall name="gettimeofday" number="96"/>
<syscall name="getrlimit" number="97"/>
<syscall name="getrusage" number="98"/>
<syscall name="sysinfo" number="99"/>
<syscall name="times" number="100"/>
<syscall name="ptrace" number="101"/>
<syscall name="getuid" number="102"/>
<syscall name="syslog" number="103"/>
<syscall name="getgid" number="104"/>
<syscall name="setuid" number="105"/>
<syscall name="setgid" number="106"/>
<syscall name="geteuid" number="107"/>
<syscall name="getegid" number="108"/>
<syscall name="setpgid" number="109"/>
<syscall name="getppid" number="110"/>
<syscall name="getpgrp" number="111"/>
<syscall name="setsid" number="112"/>
<syscall name="setreuid" number="113"/>
<syscall name="setregid" number="114"/>
<syscall name="getgroups" number="115"/>
<syscall name="setgroups" number="116"/>
<syscall name="setresuid" number="117"/>
<syscall name="getresuid" number="118"/>
<syscall name="setresgid" number="119"/>
<syscall name="getresgid" number="120"/>
<syscall name="getpgid" number="121"/>
<syscall name="setfsuid" number="122"/>
<syscall name="setfsgid" number="123"/>
<syscall name="getsid" number="124"/>
<syscall name="capget" number="125"/>
<syscall name="capset" number="126"/>
<syscall name="rt_sigpending" number="127"/>
<syscall name="rt_sigtimedwait" number="128"/>
<syscall name="rt_sigqueueinfo" number="129"/>
<syscall name="rt_sigsuspend" number="130"/>
<syscall name="sigaltstack" number="131"/>
<syscall name="utime" number="132"/>
<syscall name="mknod" number="133"/>
<syscall name="uselib" number="134"/>
<syscall name="personality" number="135"/>
<syscall name="ustat" number="136"/>
<syscall name="statfs" number="137"/>
<syscall name="fstatfs" number="138"/>
<syscall name="sysfs" number="139"/>
<syscall name="getpriority" number="140"/>
<syscall name="setpriority" number="141"/>
<syscall name="sched_setparam" number="142"/>
<syscall name="sched_getparam" number="143"/>
<syscall name="sched_setscheduler" number="144"/>
<syscall name="sched_getscheduler" number="145"/>
<syscall name="sched_get_priority_max" number="146"/>
<syscall name="sched_get_priority_min" number="147"/>
<syscall name="sched_rr_get_interval" number="148"/>
<syscall name="mlock" number="149"/>
<syscall name="munlock" number="150"/>
<syscall name="mlockall" number="151"/>
<syscall name="munlockall" number="152"/>
<syscall name="vhangup" number="153"/>
<syscall name="modify_ldt" number="154"/>
<syscall name="pivot_root" number="155"/>
<syscall name="_sysctl" number="156"/>
<syscall name="prctl" number="157"/>
<syscall name="arch_prctl" number="158"/>
<syscall name="adjtimex" number="159"/>
<syscall name="setrlimit" number="160"/>
<syscall name="chroot" number="161"/>
<syscall name="sync" number="162"/>
<syscall name="acct" number="163"/>
<syscall name="settimeofday" number="164"/>
<syscall name="mount" number="165"/>
<syscall name="umount2" number="166"/>
<syscall name="swapon" number="167"/>
<syscall name="swapoff" number="168"/>
<syscall name="reboot" number="169"/>
<syscall name="sethostname" number="170"/>
<syscall name="setdomainname" number="171"/>
<syscall name="iopl" number="172"/>
<syscall name="ioperm" number="173"/>
<syscall name="create_module" number="174"/>
<syscall name="init_module" number="175"/>
<syscall name="delete_module" number="176"/>
<syscall name="get_kernel_syms" number="177"/>
<syscall name="query_module" number="178"/>
<syscall name="quotactl" number="179"/>
<syscall name="nfsservctl" number="180"/>
<syscall name="getpmsg" number="181"/>
<syscall name="putpmsg" number="182"/>
<syscall name="afs_syscall" number="183"/>
<syscall name="tuxcall" number="184"/>
<syscall name="security" number="185"/>
<syscall name="gettid" number="186"/>
<syscall name="readahead" number="187"/>
<syscall name="setxattr" number="188"/>
<syscall name="lsetxattr" number="189"/>
<syscall name="fsetxattr" number="190"/>
<syscall name="getxattr" number="191"/>
<syscall name="lgetxattr" number="192"/>
<syscall name="fgetxattr" number="193"/>
<syscall name="listxattr" number="194"/>
<syscall name="llistxattr" number="195"/>
<syscall name="flistxattr" number="196"/>
<syscall name="removexattr" number="197"/>
<syscall name="lremovexattr" number="198"/>
<syscall name="fremovexattr" number="199"/>
<syscall name="tkill" number="200"/>
<syscall name="time" number="201"/>
<syscall name="futex" number="202"/>
<syscall name="sched_setaffinity" number="203"/>
<syscall name="sched_getaffinity" number="204"/>
<syscall name="set_thread_area" number="205"/>
<syscall name="io_setup" number="206"/>
<syscall name="io_destroy" number="207"/>
<syscall name="io_getevents" number="208"/>
<syscall name="io_submit" number="209"/>
<syscall name="io_cancel" number="210"/>
<syscall name="get_thread_area" number="211"/>
<syscall name="lookup_dcookie" number="212"/>
<syscall name="epoll_create" number="213"/>
<syscall name="epoll_ctl_old" number="214"/>
<syscall name="epoll_wait_old" number="215"/>
<syscall name="remap_file_pages" number="216"/>
<syscall name="getdents64" number="217"/>
<syscall name="set_tid_address" number="218"/>
<syscall name="restart_syscall" number="219"/>
<syscall name="semtimedop" number="220"/>
<syscall name="fadvise64" number="221"/>
<syscall name="timer_create" number="222"/>
<syscall name="timer_settime" number="223"/>
<syscall name="timer_gettime" number="224"/>
<syscall name="timer_getoverrun" number="225"/>
<syscall name="timer_delete" number="226"/>
<syscall name="clock_settime" number="227"/>
<syscall name="clock_gettime" number="228"/>
<syscall name="clock_getres" number="229"/>
<syscall name="clock_nanosleep" number="230"/>
<syscall name="exit_group" number="231"/>
<syscall name="epoll_wait" number="232"/>
<syscall name="epoll_ctl" number="233"/>
<syscall name="tgkill" number="234"/>
<syscall name="utimes" number="235"/>
<syscall name="vserver" number="236"/>
<syscall name="mbind" number="237"/>
<syscall name="set_mempolicy" number="238"/>
<syscall name="get_mempolicy" number="239"/>
<syscall name="mq_open" number="240"/>
<syscall name="mq_unlink" number="241"/>
<syscall name="mq_timedsend" number="242"/>
<syscall name="mq_timedreceive" number="243"/>
<syscall name="mq_notify" number="244"/>
<syscall name="mq_getsetattr" number="245"/>
<syscall name="kexec_load" number="246"/>
<syscall name="waitid" number="247"/>
<syscall name="add_key" number="248"/>
<syscall name="request_key" number="249"/>
<syscall name="keyctl" number="250"/>
<syscall name="ioprio_set" number="251"/>
<syscall name="ioprio_get" number="252"/>
<syscall name="inotify_init" number="253"/>
<syscall name="inotify_add_watch" number="254"/>
<syscall name="inotify_rm_watch" number="255"/>
<syscall name="migrate_pages" number="256"/>
<syscall name="openat" number="257"/>
<syscall name="mkdirat" number="258"/>
<syscall name="mknodat" number="259"/>
<syscall name="fchownat" number="260"/>
<syscall name="futimesat" number="261"/>
<syscall name="newfstatat" number="262"/>
<syscall name="unlinkat" number="263"/>
<syscall name="renameat" number="264"/>
<syscall name="linkat" number="265"/>
<syscall name="symlinkat" number="266"/>
<syscall name="readlinkat" number="267"/>
<syscall name="fchmodat" number="268"/>
<syscall name="faccessat" number="269"/>
<syscall name="pselect6" number="270"/>
<syscall name="ppoll" number="271"/>
<syscall name="unshare" number="272"/>
<syscall name="set_robust_list" number="273"/>
<syscall name="get_robust_list" number="274"/>
<syscall name="splice" number="275"/>
<syscall name="tee" number="276"/>
<syscall name="sync_file_range" number="277"/>
<syscall name="vmsplice" number="278"/>
<syscall name="move_pages" number="279"/>
<syscall name="utimensat" number="280"/>
<syscall name="epoll_pwait" number="281"/>
<syscall name="signalfd" number="282"/>
<syscall name="timerfd_create" number="283"/>
<syscall name="eventfd" number="284"/>
<syscall name="fallocate" number="285"/>
<syscall name="timerfd_settime" number="286"/>
<syscall name="timerfd_gettime" number="287"/>
<syscall name="accept4" number="288"/>
<syscall name="signalfd4" number="289"/>
<syscall name="eventfd2" number="290"/>
<syscall name="epoll_create1" number="291"/>
<syscall name="dup3" number="292"/>
<syscall name="pipe2" number="293"/>
<syscall name="inotify_init1" number="294"/>
<syscall name="preadv" number="295"/>
<syscall name="pwritev" number="296"/>
</syscalls_info>
``` | /content/code_sandbox/buildtools/gcc-arm-none-eabi-5_4-2016q2-osx/arm-none-eabi/share/gdb/syscalls/amd64-linux.xml | xml | 2016-10-27T09:31:28 | 2024-08-16T19:00:35 | nexmon | seemoo-lab/nexmon | 2,381 | 3,824 |
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.1.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\providers\WorkflowCore.Persistence.MongoDB\WorkflowCore.Persistence.MongoDB.csproj" />
<ProjectReference Include="..\..\providers\WorkflowCore.Persistence.PostgreSQL\WorkflowCore.Persistence.PostgreSQL.csproj" />
<ProjectReference Include="..\..\providers\WorkflowCore.Persistence.Sqlite\WorkflowCore.Persistence.Sqlite.csproj" />
<ProjectReference Include="..\..\providers\WorkflowCore.Persistence.SqlServer\WorkflowCore.Persistence.SqlServer.csproj" />
<ProjectReference Include="..\..\WorkflowCore\WorkflowCore.csproj" />
</ItemGroup>
</Project>
``` | /content/code_sandbox/src/samples/WorkflowCore.Sample12/WorkflowCore.Sample12.csproj | xml | 2016-11-15T23:32:24 | 2024-08-16T06:12:22 | workflow-core | danielgerlag/workflow-core | 5,247 | 190 |
```xml
/** @jsx jsx */
import { Transforms } from 'slate'
import { jsx } from '../../..'
export const run = editor => {
Transforms.delete(editor)
}
export const input = (
<editor>
<block>
word
<cursor />
</block>
</editor>
)
export const output = (
<editor>
<block>
word
<cursor />
</block>
</editor>
)
``` | /content/code_sandbox/packages/slate/test/transforms/delete/unit-character/document-end.tsx | xml | 2016-06-18T01:52:42 | 2024-08-16T18:43:42 | slate | ianstormtaylor/slate | 29,492 | 96 |
```xml
import React from 'react';
export const ViewFinder = () => (
<>
<svg
width="50px"
viewBox="0 0 100 100"
style={{
top: 0,
left: 0,
zIndex: 1,
boxSizing: 'border-box',
border: '50px solid rgba(0, 0, 0, 0.3)',
position: 'absolute',
width: '100%',
height: '100%',
}}
>
<path
fill="none"
d="M13,0 L0,0 L0,13"
stroke="rgba(255, 0, 0, 0.5)"
strokeWidth="5"
/>
<path
fill="none"
d="M0,87 L0,100 L13,100"
stroke="rgba(255, 0, 0, 0.5)"
strokeWidth="5"
/>
<path
fill="none"
d="M87,100 L100,100 L100,87"
stroke="rgba(255, 0, 0, 0.5)"
strokeWidth="5"
/>
<path
fill="none"
d="M100,13 L100,0 87,0"
stroke="rgba(255, 0, 0, 0.5)"
strokeWidth="5"
/>
</svg>
</>
);
``` | /content/code_sandbox/stories/ViewFinder.tsx | xml | 2016-05-14T08:12:28 | 2024-08-11T03:47:29 | react-qr-reader | JodusNodus/react-qr-reader | 1,124 | 319 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>12F45</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>RealtekRTL8111</string>
<key>CFBundleIdentifier</key>
<string>com.insanelymac.RealtekRTL8111</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>RealtekRTL8111</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>1.2.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.2.3</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>4H1503</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12D75</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0463</string>
<key>DTXcodeBuild</key>
<string>4H1503</string>
<key>IOKitPersonalities</key>
<dict>
<key>RTL8111 PCIe Adapter</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.insanelymac.RealtekRTL8111</string>
<key>Driver_Version</key>
<string>1.2.3</string>
<key>IOClass</key>
<string>RTL8111</string>
<key>IOPCIMatch</key>
<string>0x816810ec 0x81681186</string>
<key>IOProbeScore</key>
<integer>1000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>Model</key>
<string>RTL8111</string>
<key>Vendor</key>
<string>Realtek</string>
<key>disableASPM</key>
<true/>
<key>enableCSO6</key>
<true/>
<key>enableEEE</key>
<true/>
<key>enableTSO4</key>
<true/>
<key>enableTSO6</key>
<true/>
<key>intrMitigate</key>
<integer>53080</integer>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IONetworkingFamily</key>
<string>1.5.0</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>1.7</string>
<key>com.apple.kpi.bsd</key>
<string>8.10.0</string>
<key>com.apple.kpi.iokit</key>
<string>8.10.0</string>
<key>com.apple.kpi.libkern</key>
<string>8.10.0</string>
<key>com.apple.kpi.mach</key>
<string>8.10.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Network-Root</string>
</dict>
</plist>
``` | /content/code_sandbox/Clover-Configs/Acer/E1-570/CLOVER/kexts/10.11/RealtekRTL8111.kext/Contents/Info.plist | xml | 2016-11-05T04:22:54 | 2024-08-12T19:25:53 | Hackintosh-Installer-University | huangyz0918/Hackintosh-Installer-University | 3,937 | 927 |
```xml
<Page
x:Class="IntelligentKioskSample.Views.BingVisualSearch"
xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:local="using:IntelligentKioskSample.Views"
xmlns:ctl="using:IntelligentKioskSample.Controls"
xmlns:d="path_to_url"
xmlns:mc="path_to_url"
mc:Ignorable="d">
<Page.Resources>
<ctl:BooleanToVisibilityConverter x:Key="bolleanToVisibilityConverter"/>
<DataTemplate x:Key="PhotoResultTemplate">
<Border Width="120" Height="120" Background="#FF111111">
<Image Source="{Binding ImageUrl}" />
</Border>
</DataTemplate>
<DataTemplate x:Key="ProductResultTemplate">
<Grid Background="#FF111111" Margin="6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="240"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding ImageUrl}" Width="100" Height="100" />
<Grid Grid.Column="1" Margin="6, 0, 0, 0" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Name}" TextWrapping="WrapWholeWords" VerticalAlignment="Top" Style="{StaticResource CaptionTextBlockStyle}" />
<TextBlock Grid.Row="1" Text="{Binding Price}" Foreground="Gray" Style="{StaticResource CaptionTextBlockStyle}" />
<HyperlinkButton Grid.Row="2" Background="Transparent" NavigateUri="{Binding ReferenceUrl}">
<TextBlock Text="{Binding ReferenceUrl}" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Style="{StaticResource CaptionTextBlockStyle}" Foreground="Gray" />
</HyperlinkButton>
</Grid>
</Grid>
</DataTemplate>
<DataTemplate x:Key="CelebrityResultTemplate">
<Grid Background="#FF111111" Margin="6">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="180"/>
</Grid.ColumnDefinitions>
<Image Source="{Binding ImageUrl}" Width="90" Height="90" />
<Grid Grid.Column="1" Margin="6,0,0,0" >
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Name}" TextWrapping="WrapWholeWords" VerticalAlignment="Top" />
<TextBlock Grid.Row="1" Text="{Binding Occupation}" Foreground="Gray" Style="{StaticResource CaptionTextBlockStyle}" VerticalAlignment="Center"/>
<StackPanel Orientation="Horizontal" Grid.Row="2" VerticalAlignment="Center">
<TextBlock Text="Similarity Score:" Style="{StaticResource CaptionTextBlockStyle}" Foreground="Gray" Margin="0,0,6,0"/>
<TextBlock Text="{Binding SimilarityScore}" Style="{StaticResource CaptionTextBlockStyle}" Foreground="Gray"/>
</StackPanel>
<HyperlinkButton Grid.Row="3" Background="Transparent" NavigateUri="{Binding ReferenceUrl}">
<TextBlock Text="{Binding ReferenceUrl}" TextWrapping="NoWrap" TextTrimming="CharacterEllipsis" Style="{StaticResource CaptionTextBlockStyle}" Foreground="Gray" />
</HyperlinkButton>
</Grid>
</Grid>
</DataTemplate>
<local:ResultItemTemplateSelector x:Key="SearchResultTemplateSelector" PhotoTemplate="{StaticResource PhotoResultTemplate}" ProductTemplate="{StaticResource ProductResultTemplate}" CelebrityTemplate="{StaticResource CelebrityResultTemplate}"/>
</Page.Resources>
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
EntranceNavigationTransitionInfo.IsTargetElement="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<CommandBar x:Name="commandBar" Style="{StaticResource PageTitleCommandBarStyle}">
<CommandBar.Content>
<TextBlock Text="Bing Visual Search" Style="{ThemeResource PageTitleTextBlockStyle}"/>
</CommandBar.Content>
</CommandBar>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="0.15*"/>
<RowDefinition/>
<RowDefinition Height="0.1*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.1*"/>
<ColumnDefinition/>
<ColumnDefinition Width="0.6*"/>
</Grid.ColumnDefinitions>
<Image x:Name="DisplayImage" Grid.Row="1" Grid.Column="1" VerticalAlignment="Top"/>
<StackPanel Orientation="Horizontal" Margin="6" HorizontalAlignment="Right" Grid.Column="2" VerticalAlignment="Top">
<TextBlock Text="Search type:" VerticalAlignment="Center" Margin="0,0,6,0" />
<ComboBox SelectionChanged="OnResultTypeSelectionChanged" x:Name="resultTypeComboBox">
<ComboBoxItem Content="Similar images" IsSelected="True" x:Name="similarImagesResultType"/>
<ComboBoxItem Content="Similar products" x:Name="similarProductsResultType"/>
</ComboBox>
</StackPanel>
<ScrollViewer x:Name="resultsDetails" Visibility="Visible" Grid.Row="1" Grid.Column="2" Margin="24,0,0,0" HorizontalScrollBarVisibility="Disabled">
<Grid>
<GridView x:Name="resultsGridView" IsItemClickEnabled="False" SelectionMode="None" ItemTemplateSelector="{StaticResource SearchResultTemplateSelector}"/>
<ProgressRing x:Name="progressRing" Width="100" Height="100" Foreground="White"/>
<TextBlock x:Name="searchErrorTextBlock" Visibility="Collapsed" HorizontalAlignment="Center" VerticalAlignment="Center" TextAlignment="Center" Style="{StaticResource SubtitleTextBlockStyle}"/>
</Grid>
</ScrollViewer>
</Grid>
<ctl:ImagePickerControl x:Name="imagePicker" SubheaderText="We will look for similar images, celebrities or products on the internet" ImageContentType="" Grid.Row="1" OnImageSearchCompleted="OnImageSearchCompleted" />
</Grid>
</Page>
``` | /content/code_sandbox/Kiosk/Views/BingVisualSearch.xaml | xml | 2016-06-09T17:19:24 | 2024-07-17T02:43:08 | Cognitive-Samples-IntelligentKiosk | microsoft/Cognitive-Samples-IntelligentKiosk | 1,049 | 1,381 |
```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>3</integer>
<key>NodeID</key>
<integer>18</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>Boost</key>
<integer>3</integer>
<key>NodeID</key>
<integer>25</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>MuteInputAmp</key>
<false/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>20</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<false/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>2</integer>
</dict>
</array>
</array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>MuteInputAmp</key>
<false/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>33</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<false/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>3</integer>
</dict>
</array>
</array>
</array>
</array>
<key>PathMapID</key>
<integer>19</integer>
</dict>
</array>
</dict>
``` | /content/code_sandbox/Resources/ALC236/Platforms19.xml | xml | 2016-03-07T20:45:58 | 2024-08-14T08:57:03 | AppleALC | acidanthera/AppleALC | 3,420 | 1,572 |
```xml
import { assetFields } from "../../common/graphql/asset";
export const listParamDefs = `
$parentId: String,
$categoryId: String,
$searchValue: String,
$perPage: Int,
$page: Int,
$ids: [String],
$excludeIds: Boolean,
$pipelineId: String,
$boardId: String,
$ignoreIds: [String]
$irregular: Boolean
$articleIds: [String]
$withKnowledgebase:Boolean
`;
export const listParams = `
categoryId: $categoryId,
parentId: $parentId,
searchValue: $searchValue,
perPage: $perPage,
page: $page,
ids: $ids,
excludeIds: $excludeIds,
pipelineId: $pipelineId,
boardId: $boardId,
ignoreIds: $ignoreIds
irregular: $irregular,
articleIds:$articleIds
withKnowledgebase:$withKnowledgebase
`;
const assets = `
query assets(${listParamDefs}) {
assets(${listParams}) {
${assetFields}
kbArticleIds
}
}
`;
const assetsCount = `
query assetsTotalCount(${listParamDefs}) {
assetsTotalCount(${listParams})
}
`;
const assetDetail = `
query assetDetail($_id: String) {
assetDetail(_id: $_id) {
${assetFields}
customFieldsData
kbArticleIds
knowledgeData
}
}
`;
const assetCategory = `
query assetCategories($status: String) {
assetCategories(status: $status) {
_id
name
order
code
parentId
description
status
attachment {
name
url
type
size
duration
}
isRoot
assetCount
}
}
`;
const assetCategoryDetail = `
query assetCategoryDetail($_id: String) {
assetCategoryDetail(_id: $_id) {
_id
name
assetCount
}
}
`;
const assetCategoriesTotalCount = `
query assetCategoriesTotalCount {
assetCategoriesTotalCount
}
`;
const knowledgeBaseTopics = `
query knowledgeBaseTopics {
knowledgeBaseTopics {
_id
title
categories {
_id
title
numOfArticles
parentCategoryId
}
}
}
`;
const knowledgeBaseArticles = `
query knowledgeBaseArticles($articleIds: [String],$categoryIds: [String],$perPage:Int) {
knowledgeBaseArticles(articleIds: $articleIds,categoryIds: $categoryIds,perPage:$perPage) {
_id
title
categoryId
topicId
}
}
`;
const assetKbArticlesHistories = `
query AssetKbArticlesHistories($assetId: String) {
assetKbArticlesHistories(assetId: $assetId) {
_id
action
article
asset {
_id
name
order
}
assetId
createdAt
kbArticleId
user {
_id
email
username
details {
firstName
lastName
fullName
}
}
userId
}
}
`;
export default {
assets,
assetsCount,
assetDetail,
assetCategory,
assetCategoryDetail,
assetCategoriesTotalCount,
knowledgeBaseArticles,
knowledgeBaseTopics,
assetKbArticlesHistories
};
``` | /content/code_sandbox/packages/plugin-assets-ui/src/asset/graphql/queries.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 748 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="path_to_url"
package="com.journaldev.expandablelistview" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
``` | /content/code_sandbox/Android/ExpandableListView/app/src/main/AndroidManifest.xml | xml | 2016-05-02T05:43:21 | 2024-08-16T06:51:39 | journaldev | WebJournal/journaldev | 1,314 | 146 |
```xml
/*your_sha256_hash-----------------------------
*your_sha256_hash----------------------------*/
import { InputBoxOptions, QuickPickOptions } from 'vscode';
// A class that simplifies populating values on an object from the VSCode command palette.
// Provides a wrapper around the necessary options to display, a callback to see if update
// is needed, and the setter to be called on the object
export class PropertyUpdater<T> {
constructor(
public inputBoxOptions: InputBoxOptions,
public quickPickOptions: QuickPickOptions,
private propertyChecker: (obj: T) => boolean,
private propertySetter: (obj: T, input: string) => void) {
}
public static createQuickPickUpdater<T>(
quickPickOptions: QuickPickOptions,
propertyChecker: (obj: T) => boolean,
propertySetter: (obj: T, input: string) => void): PropertyUpdater<T> {
return new PropertyUpdater<T>(undefined, quickPickOptions, propertyChecker, propertySetter);
}
public static createInputBoxUpdater<T>(
inputBoxOptions: InputBoxOptions,
propertyChecker: (obj: T) => boolean,
propertySetter: (obj: T, input: string) => void): PropertyUpdater<T> {
return new PropertyUpdater<T>(inputBoxOptions, undefined, propertyChecker, propertySetter);
}
public isQuickPickUpdater(): boolean {
if (this.quickPickOptions) {
return true;
}
return false;
}
public isUpdateRequired(parentObject: T): boolean {
return this.propertyChecker(parentObject);
}
public updatePropery(parentObject: T, propertyValue: string): void {
this.propertySetter(parentObject, propertyValue);
}
}
``` | /content/code_sandbox/src/models/propertyUpdater.ts | xml | 2016-06-26T04:38:04 | 2024-08-16T20:04:12 | vscode-mssql | microsoft/vscode-mssql | 1,523 | 366 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!--
This file contains Runtime Directives, specifications about types your application accesses
through reflection and other dynamic code patterns. Runtime Directives are used to control the
.NET Native optimizer and ensure that it does not remove code accessed by your library. If your
library does not do any reflection, then you generally do not need to edit this file. However,
if your library reflects over types, especially types passed to it or derived from its types,
then you should write Runtime Directives.
The most common use of reflection in libraries is to discover information about types passed
to the library. Runtime Directives have three ways to express requirements on types passed to
your library.
1. Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
Use these directives to reflect over types passed as a parameter.
2. SubTypes
Use a SubTypes directive to reflect over types derived from another type.
3. AttributeImplies
Use an AttributeImplies directive to indicate that your library needs to reflect over
types or methods decorated with an attribute.
For more information on writing Runtime Directives for libraries, please visit
path_to_url
-->
<Directives xmlns="path_to_url">
<Library Name="MahApps.Metro.IconPacks.Octicons">
</Library>
</Directives>
``` | /content/code_sandbox/src/MahApps.Metro.IconPacks.Octicons/Properties/MahApps.Metro.IconPacks.Octicons.rd.xml | xml | 2016-07-17T00:10:12 | 2024-08-16T16:16:36 | MahApps.Metro.IconPacks | MahApps/MahApps.Metro.IconPacks | 1,748 | 300 |
```xml
import { useCallback, useMemo, useRef } from 'react';
import { c } from 'ttag';
import { useActiveBreakpoint } from '@proton/components';
import ContactEmailsProvider from '@proton/components/containers/contacts/ContactEmailsProvider';
import { isProtonDocument } from '@proton/shared/lib/helpers/mimetype';
import useNavigate from '../../../hooks/drive/useNavigate';
import type { EncryptedLink, useSharedWithMeView } from '../../../store';
import { useThumbnailsDownload } from '../../../store';
import { useDocumentActions, useDriveDocsFeatureFlag } from '../../../store/_documents';
import type { ExtendedInvitationDetails } from '../../../store/_links/useLinksListing/usePendingInvitationsListing';
import { SortField } from '../../../store/_views/utils/useSorting';
import { sendErrorReport } from '../../../utils/errorHandling';
import type { BrowserItemId, FileBrowserBaseItem, ListViewHeaderItem } from '../../FileBrowser';
import FileBrowser, { Cells, GridHeader, useItemContextMenu, useSelection } from '../../FileBrowser';
import { GridViewItem } from '../FileBrowser/GridViewItemLink';
import { AcceptOrRejectInviteCell, NameCell, SharedByCell, SharedOnCell } from '../FileBrowser/contentCells';
import headerItems from '../FileBrowser/headerCells';
import { translateSortField } from '../SortDropdown';
import { getSelectedSharedWithMeItems } from '../helpers';
import EmptySharedWithMe from './EmptySharedWithMe';
import { SharedWithMeContextMenu } from './SharedWithMeItemContextMenu';
export interface SharedWithMeItem extends FileBrowserBaseItem {
activeRevision?: EncryptedLink['activeRevision'];
cachedThumbnailUrl?: string;
hasThumbnail?: boolean;
isFile: boolean;
mimeType: string;
name: string;
signatureIssues?: any;
signatureAddress?: string;
size: number;
trashed: number | null;
rootShareId: string;
volumeId: string;
sharedOn?: number;
sharedBy?: string;
parentLinkId: string;
invitationDetails?: ExtendedInvitationDetails;
acceptInvitation?: (invitationId: string) => Promise<void>;
rejectInvitation?: (invitationId: string) => Promise<void>;
}
type Props = {
shareId: string;
sharedWithMeView: ReturnType<typeof useSharedWithMeView>;
};
const { CheckboxCell, ContextMenuCell } = Cells;
const largeScreenCells: React.FC<{ item: SharedWithMeItem }>[] = [
CheckboxCell,
NameCell,
SharedByCell,
({ item }) => (item.isInvitation ? <AcceptOrRejectInviteCell item={item} /> : <SharedOnCell item={item} />),
ContextMenuCell,
];
const smallScreenCells: React.FC<{ item: SharedWithMeItem }>[] = [
CheckboxCell,
NameCell,
({ item }) => (item.isInvitation ? <AcceptOrRejectInviteCell item={item} /> : null),
ContextMenuCell,
];
const headerItemsLargeScreen: ListViewHeaderItem[] = [
headerItems.checkbox,
headerItems.name,
headerItems.sharedBy,
headerItems.sharedOnDate,
headerItems.placeholder,
];
const headerItemsSmallScreen: ListViewHeaderItem[] = [headerItems.checkbox, headerItems.name, headerItems.placeholder];
type SharedWithMeSortFields = Extract<SortField, SortField.name | SortField.sharedBy | SortField.sharedOn>;
const SORT_FIELDS: SharedWithMeSortFields[] = [SortField.name, SortField.sharedBy, SortField.sharedOn];
const SharedWithMe = ({ sharedWithMeView }: Props) => {
const contextMenuAnchorRef = useRef<HTMLDivElement>(null);
const { navigateToLink } = useNavigate();
const browserItemContextMenu = useItemContextMenu();
const thumbnails = useThumbnailsDownload();
const selectionControls = useSelection();
const { viewportWidth } = useActiveBreakpoint();
const { openDocument } = useDocumentActions();
const { canUseDocs } = useDriveDocsFeatureFlag();
const { layout, items, sortParams, setSorting, isLoading } = sharedWithMeView;
const selectedItemIds = selectionControls!.selectedItemIds;
const selectedBrowserItems = useMemo(
() => getSelectedSharedWithMeItems(items, selectedItemIds),
[items, selectedItemIds]
);
const handleClick = useCallback(
(id: BrowserItemId) => {
const item = items.find((item) => item.id === id);
if (!item) {
return;
}
document.getSelection()?.removeAllRanges();
if (isProtonDocument(item.mimeType)) {
void canUseDocs(item.rootShareId)
.then((canUse) => {
if (!canUse) {
return;
}
return openDocument({
linkId: item.linkId,
shareId: item.rootShareId,
openBehavior: 'tab',
});
})
.catch(sendErrorReport);
return;
}
navigateToLink(item.rootShareId, item.linkId, item.isFile);
},
[navigateToLink, items]
);
const handleItemRender = (item: SharedWithMeItem) => {
if (item.hasThumbnail && item.activeRevision && !item.cachedThumbnailUrl) {
thumbnails.addToDownloadQueue(item.rootShareId, item.linkId, item.activeRevision.id);
}
};
/* eslint-disable react/display-name */
const GridHeaderComponent = useMemo(
() =>
({ scrollAreaRef }: { scrollAreaRef: React.RefObject<HTMLDivElement> }) => {
const activeSortingText = translateSortField(sortParams.sortField);
return (
<GridHeader
isLoading={isLoading}
sortFields={SORT_FIELDS}
onSort={setSorting}
sortField={sortParams.sortField}
sortOrder={sortParams.sortOrder}
itemCount={items.length}
scrollAreaRef={scrollAreaRef}
activeSortingText={activeSortingText}
/>
);
},
[sortParams.sortField, sortParams.sortOrder, isLoading]
);
if (!items.length && !isLoading) {
return <EmptySharedWithMe />;
}
const Cells = viewportWidth['>=large'] ? largeScreenCells : smallScreenCells;
const headerItems = viewportWidth['>=large'] ? headerItemsLargeScreen : headerItemsSmallScreen;
return (
<ContactEmailsProvider>
<SharedWithMeContextMenu
selectedBrowserItems={selectedBrowserItems}
anchorRef={contextMenuAnchorRef}
close={browserItemContextMenu.close}
isOpen={browserItemContextMenu.isOpen}
open={browserItemContextMenu.open}
position={browserItemContextMenu.position}
/>
<FileBrowser
caption={c('Title').t`Shared`}
items={items}
headerItems={headerItems}
layout={layout}
loading={isLoading}
sortParams={sortParams}
Cells={Cells}
GridHeaderComponent={GridHeaderComponent}
GridViewItem={GridViewItem}
contextMenuAnchorRef={contextMenuAnchorRef}
onItemContextMenu={browserItemContextMenu.handleContextMenu}
onItemOpen={handleClick}
onItemRender={handleItemRender}
onSort={setSorting}
onScroll={browserItemContextMenu.close}
/>
</ContactEmailsProvider>
);
};
export default SharedWithMe;
``` | /content/code_sandbox/applications/drive/src/app/components/sections/SharedWithMe/SharedWithMe.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 1,551 |
```xml
import * as React from 'react';
import createSvgIcon from '../utils/createSvgIcon';
const BufferTimeBeforeIcon = createSvgIcon({
svg: ({ classes }) => (
<svg xmlns="path_to_url" viewBox="0 0 2048 2048" className={classes.svg} focusable="false">
<path d="M1024 320q97 0 187 25t168 71 143 110 110 142 71 169 25 187q0 97-25 187t-71 168-110 143-142 110-169 71-187 25q-97 0-187-25t-168-71-143-110-110-142-71-169-25-187q0-97 25-187t71-168 110-143 142-110 169-71 187-25zm0 1280q119 0 224-45t183-124 123-183 46-224q0-119-45-224t-124-183-183-123-224-46q-119 0-224 45T617 617 494 800t-46 224q0 119 45 224t124 183 183 123 224 your_sha256_hash-68q-180 0-343 67T390 390l-90-90q72-72 156-128t176-94 191-58 201-20q102 0 200 19t191 58 177 95 156 128l-90 90z" />
</svg>
),
displayName: 'BufferTimeBeforeIcon',
});
export default BufferTimeBeforeIcon;
``` | /content/code_sandbox/packages/react-icons-mdl2/src/components/BufferTimeBeforeIcon.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 375 |
```xml
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<vector xmlns:android="path_to_url"
android:width="18dp"
android:height="18dp"
android:viewportHeight="24.0"
android:viewportWidth="24.0">
<path
android:fillColor="#000000"
android:pathData="M3,18h18v-2L3,16v2zM3,13h18v-2L3,11v2zM3,6v2h18L21,6L3,6z" />
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable-v21/ic_menu_black.xml | xml | 2016-04-09T15:47:45 | 2024-08-14T04:30:04 | MusicLake | caiyonglong/MusicLake | 2,654 | 134 |
```xml
export interface IPluginCreator {
name: string;
address?: string;
phone?: string;
email?: string;
logo?: string;
description?: string;
}
export interface Plugin {
_id: string;
language?: string;
createdAt?: Date;
modifiedAt?: Date;
createdBy?: string;
modifiedBy?: string;
// tab1
avatar?: string;
images?: string;
image?: string;
video?: string;
title?: string;
creator?: IPluginCreator;
department?: string;
description?: string;
shortDescription?: string;
screenShots?: string;
features?: string;
// tab 2
tango?: string;
// tab3
changeLog?: string;
lastUpdatedInfo?: string;
contributors?: string;
support?: string;
// add-on fields
mainType: string;
osName: string;
displayLocations: string[];
type: string;
limit?: number;
count: number;
initialCount?: number;
growthInitialCount?: number;
resetMonthly?: boolean;
unit?: string;
comingSoon?: boolean;
categories?: string[];
dependencies?: string[];
stripeProductId: string;
testProductId: string;
relatedPlugins?: string[];
unLimited?: boolean;
// erxes-ui
icon?: string;
price?: {
monthly?: number | string | null;
yearly?: number | string | null;
oneTime?: number | string | null;
};
status?: string;
}
interface ManageInstallVariables {
type: string;
name: string;
}
interface ManageInstallResponse {
successMessage: string;
}
export type ManageInstallFunction = (options: {
variables: ManageInstallVariables;
}) => Promise<ManageInstallResponse>;
``` | /content/code_sandbox/packages/core-ui/src/modules/settings/marketplace/types.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 387 |
```xml
/* your_sha256_hash-------------
|your_sha256_hash------------*/
/**
* @packageDocumentation
* @module cells
*/
export * from './celldragutils';
export * from './collapser';
export * from './headerfooter';
export * from './inputarea';
export * from './model';
export * from './placeholder';
export * from './searchprovider';
export * from './widget';
``` | /content/code_sandbox/packages/cells/src/index.ts | xml | 2016-06-03T20:09:17 | 2024-08-16T19:12:44 | jupyterlab | jupyterlab/jupyterlab | 14,019 | 82 |
```xml
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { PickListModule } from 'primeng/picklist';
import { AppDocModule } from '@layout/doc/app.doc.module';
import { AppCodeModule } from '@layout/doc/app.code.component';
import { AccessibilityDoc } from './accessibilitydoc';
import { BasicDoc } from './basicdoc';
import { FilterDoc } from './filterdoc';
import { ImportDoc } from './importdoc';
import { StyleDoc } from './styledoc';
import { TemplatesDoc } from './templatesdoc';
@NgModule({
imports: [CommonModule, AppCodeModule, AppDocModule, PickListModule, RouterModule],
exports: [AppDocModule],
declarations: [ImportDoc, BasicDoc, FilterDoc, TemplatesDoc, StyleDoc, AccessibilityDoc]
})
export class PicklistDocModule {}
``` | /content/code_sandbox/src/app/showcase/doc/picklist/picklistdoc.module.ts | xml | 2016-01-16T09:23:28 | 2024-08-16T19:58:20 | primeng | primefaces/primeng | 9,969 | 192 |
```xml
import { NetworkId, TTicker, TURL } from '@types';
export const INFURA_API_KEY = 'f3b4711ae677488bb3c56de93c6cab1a';
export const POCKET_API_KEY = '5f6a53d75053d3232349e41e';
export const ETHERSCAN_API_KEY = '3BJCKMTC6BY9XEJPZEQ7BIWJR4MCP94UB4';
export const MYC_API_MAINNET = 'path_to_url
export const DEFI_RESERVE_MAPPING_URL = 'path_to_url
export const GITHUB_RELEASE_NOTES_URL = 'path_to_url as TURL;
// The URL for Token Info API requests.
export const TOKEN_INFO_URL = 'path_to_url
// The URL for MYC api.
export const MYC_API = 'path_to_url
export const HISTORY_API = 'path_to_url
export const NANSEN_API = 'path_to_url
export const CUSTOM_ASSET_API = 'path_to_url
export const ENS_MANAGER_URL = 'path_to_url
export const FAUCET_API = 'path_to_url
export const OPENSEA_API = 'path_to_url
export const OPENSEA_IMAGE_PROXY_API = 'path_to_url
export const OPENSEA_IMAGE_PROXY = 'path_to_url
export const POAP_CLAIM_API = 'path_to_url
// The URL and site ID for the Matomo analytics instance.
export const ANALYTICS_API = 'path_to_url
export const ANALYTICS_SITE_ID_PROD = 17;
export const ANALYTICS_SITE_ID_DEV = 11;
// this will be changed when we figure out networks
export const DEFAULT_NETWORK_FOR_FALLBACK = 'ropsten';
export const DEFAULT_NETWORK: NetworkId = 'Ethereum';
export const XDAI_NETWORK: NetworkId = 'xDAI';
export const POLYGON_NETWORK: NetworkId = 'MATIC';
export const DEFAULT_NETWORK_TICKER = 'ETH' as TTicker;
export const DEFAULT_ASSET_DECIMAL = 18;
export const DEFAULT_COIN_TYPE = 60;
export const MYC_DEX_COMMISSION_RATE = 0.0025;
export const CREATION_ADDRESS = '0x0000000000000000000000000000000000000000';
export const DEFAULT_NETWORK_CHAINID = 1;
export const SECONDS_IN_MONTH = 60 * 60 * 24 * 30;
// Assets that are excluded when loading assets from asset API
// Tokens which are non-standard and/or may return Infinity value for every balance query.
export const EXCLUDED_ASSETS = [
'1e917c91-e52b-5997-af67-2ffd01843701',
'17da00cc-4901-5e04-87e0-f7e3cf9b382a',
'2e96d50d-af13-5186-8ece-fc33872ab70c',
'b1ef1841-6348-584e-a12e-ff2e3bbcd7ff',
'd41becc2-9f3a-57e8-a60a-e93ad17d1ea7',
'f383cc01-4942-5d0e-8442-3dbbc8cc8836'
];
export const ETH_SCAN_BATCH_SIZE = 300;
export const DEFAULT_NUM_OF_ACCOUNTS_TO_SCAN = 5;
export const DEFAULT_GAP_TO_SCAN_FOR = 5;
export const SETTINGS_FILENAME = 'MyCrypto_Settings_File';
export const ASSET_DROPDOWN_SIZE_THRESHOLD = 150;
export const PRIVACY_POLICY_LINK = 'path_to_url
``` | /content/code_sandbox/src/config/constants.ts | xml | 2016-12-04T01:35:27 | 2024-08-14T21:41:58 | MyCrypto | MyCryptoHQ/MyCrypto | 1,347 | 770 |
```xml
import { UnavailabilityError } from 'expo-modules-core';
import { DeviceType } from './Device.types';
import ExpoDevice from './ExpoDevice';
export { DeviceType };
/**
* `true` if the app is running on a real device and `false` if running in a simulator or emulator.
* On web, this is always set to `true`.
*/
export const isDevice: boolean = ExpoDevice ? ExpoDevice.isDevice : true;
/**
* The device brand. The consumer-visible brand of the product/hardware. On web, this value is always `null`.
*
* @example
* ```js
* Device.brand; // Android: "google", "xiaomi"; iOS: "Apple"; web: null
* ```
* @platform android
* @platform ios
*/
export const brand: string | null = ExpoDevice ? ExpoDevice.brand : null;
/**
* The actual device manufacturer of the product or hardware. This value of this field may be `null` if it cannot be determined.
*
* To view difference between `brand` and `manufacturer` on Android see [official documentation](path_to_url
*
* @example
* ```js
* Device.manufacturer; // Android: "Google", "xiaomi"; iOS: "Apple"; web: "Google", null
* ```
*/
export const manufacturer: string | null = ExpoDevice ? ExpoDevice.manufacturer : null;
/**
* The internal model ID of the device. This is useful for programmatically identifying the type of device and is not a human-friendly string.
* On web and Android, this value is always `null`.
*
* @example
* ```js
* Device.modelId; // iOS: "iPhone7,2"; Android: null; web: null
* ```
* @platform ios
*/
export const modelId = ExpoDevice ? ExpoDevice.modelId || null : null;
/**
* The human-friendly name of the device model. This is the name that people would typically use to refer to the device rather than a programmatic model identifier.
* This value of this field may be `null` if it cannot be determined.
*
* @example
* ```js
* Device.modelName; // Android: "Pixel 2"; iOS: "iPhone XS Max"; web: "iPhone", null
* ```
*/
export const modelName: string | null = ExpoDevice ? ExpoDevice.modelName : null;
/**
* The specific configuration or name of the industrial design. It represents the device's name when it was designed during manufacturing into mass production.
* On Android, it corresponds to [`Build.DEVICE`](path_to_url#DEVICE). On web and iOS, this value is always `null`.
*
* @example
* ```js
* Device.designName; // Android: "kminilte"; iOS: null; web: null
* ```
* @platform android
*/
export const designName: string | null = ExpoDevice ? ExpoDevice.designName || null : null;
/**
* The device's overall product name chosen by the device implementer containing the development name or code name of the device.
* Corresponds to [`Build.PRODUCT`](path_to_url#PRODUCT). On web and iOS, this value is always `null`.
*
* @example
* ```js
* Device.productName; // Android: "kminiltexx"; iOS: null; web: null
* ```
* @platform android
*/
export const productName: string | null = ExpoDevice ? ExpoDevice.productName || null : null;
/**
* The type of the device as a [`DeviceType`](#devicetype) enum value.
*
* On Android, for devices other than TVs, the device type is determined by the screen resolution (screen diagonal size), so the result may not be completely accurate.
* If the screen diagonal length is between 3" and 6.9", the method returns `DeviceType.PHONE`. For lengths between 7" and 18", the method returns `DeviceType.TABLET`.
* Otherwise, the method returns `DeviceType.UNKNOWN`.
*
* @example
* ```js
* Device.deviceType; // UNKNOWN, PHONE, TABLET, TV, DESKTOP
* ```
*/
export const deviceType: DeviceType | null = ExpoDevice ? ExpoDevice.deviceType : null;
/**
* The [device year class](path_to_url of this device. On web, this value is always `null`.
*/
export const deviceYearClass: number | null = ExpoDevice ? ExpoDevice.deviceYearClass : null;
/**
* The device's total memory, in bytes. This is the total memory accessible to the kernel, but not necessarily to a single app.
* This is basically the amount of RAM the device has, not including below-kernel fixed allocations like DMA buffers, RAM for the baseband CPU, etc
* On web, this value is always `null`.
*
* @example
* ```js
* Device.totalMemory; // 17179869184
* ```
*/
export const totalMemory: number | null = ExpoDevice ? ExpoDevice.totalMemory : null;
/**
* A list of supported processor architecture versions. The device expects the binaries it runs to be compiled for one of these architectures.
* This value is `null` if the supported architectures could not be determined, particularly on web.
*
* @example
* ```js
* Device.supportedCpuArchitectures; // ['arm64 v8', 'Intel x86-64h Haswell', 'arm64-v8a', 'armeabi-v7a", 'armeabi']
* ```
*/
export const supportedCpuArchitectures: string[] | null = ExpoDevice
? ExpoDevice.supportedCpuArchitectures
: null;
/**
* The name of the OS running on the device.
*
* @example
* ```js
* Device.osName; // Android: "Android"; iOS: "iOS" or "iPadOS"; web: "iOS", "Android", "Windows"
* ```
*/
export const osName: string | null = ExpoDevice ? ExpoDevice.osName : null;
/**
* The human-readable OS version string. Note that the version string may not always contain three numbers separated by dots.
*
* @example
* ```js
* Device.osVersion; // Android: "4.0.3"; iOS: "12.3.1"; web: "11.0", "8.1.0"
* ```
*/
export const osVersion: string | null = ExpoDevice ? ExpoDevice.osVersion : null;
/**
* The build ID of the OS that more precisely identifies the version of the OS. On Android, this corresponds to `Build.DISPLAY` (not `Build.ID`)
* and currently is a string as described [here](path_to_url On iOS, this corresponds to `kern.osversion`
* and is the detailed OS version sometimes displayed next to the more human-readable version. On web, this value is always `null`.
*
* @example
* ```js
* Device.osBuildId; // Android: "PSR1.180720.075"; iOS: "16F203"; web: null
* ```
*/
export const osBuildId: string | null = ExpoDevice ? ExpoDevice.osBuildId : null;
/**
* The internal build ID of the OS running on the device. On Android, this corresponds to `Build.ID`.
* On iOS, this is the same value as [`Device.osBuildId`](#deviceosbuildid). On web, this value is always `null`.
*
* @example
* ```js
* Device.osInternalBuildId; // Android: "MMB29K"; iOS: "16F203"; web: null,
* ```
*/
export const osInternalBuildId: string | null = ExpoDevice ? ExpoDevice.osInternalBuildId : null;
/**
* A string that uniquely identifies the build of the currently running system OS. On Android, it follows this template:
* - `$(BRAND)/$(PRODUCT)/$(DEVICE)/$(BOARD):$(VERSION.RELEASE)/$(ID)/$(VERSION.INCREMENTAL):$(TYPE)/\$(TAGS)`
* On web and iOS, this value is always `null`.
*
* @example
* ```js
* Device.osBuildFingerprint;
* // Android: "google/sdk_gphone_x86/generic_x86:9/PSR1.180720.075/5124027:user/release-keys";
* // iOS: null; web: null
* ```
* @platform android
*/
export const osBuildFingerprint: string | null = ExpoDevice
? ExpoDevice.osBuildFingerprint || null
: null;
/**
* The Android SDK version of the software currently running on this hardware device. This value never changes while a device is booted,
* but it may increase when the hardware manufacturer provides an OS update. See [here](path_to_url
* to see all possible version codes and corresponding versions. On iOS and web, this value is always `null`.
*
* @example
* ```js
* Device.platformApiLevel; // Android: 19; iOS: null; web: null
* ```
* @platform android
*/
export const platformApiLevel: number | null = ExpoDevice
? ExpoDevice.platformApiLevel || null
: null;
/**
* The human-readable name of the device, which may be set by the device's user. If the device name is unavailable, particularly on web, this value is `null`.
*
* > On iOS 16 and newer, this value will be set to generic "iPhone" until you add the correct entitlement, see [iOS Capabilities page](/build-reference/ios-capabilities)
* > to learn how to add one and check out [Apple documentation](path_to_url#discussion)
* > for more details on this change.
*
* @example
* ```js
* Device.deviceName; // "Vivian's iPhone XS"
* ```
*/
export const deviceName: string | null = ExpoDevice ? ExpoDevice.deviceName : null;
/**
* Checks the type of the device as a [`DeviceType`](#devicetype) enum value.
*
* On Android, for devices other than TVs, the device type is determined by the screen resolution (screen diagonal size), so the result may not be completely accurate.
* If the screen diagonal length is between 3" and 6.9", the method returns `DeviceType.PHONE`. For lengths between 7" and 18", the method returns `DeviceType.TABLET`.
* Otherwise, the method returns `DeviceType.UNKNOWN`.
*
* @return Returns a promise that resolves to a [`DeviceType`](#devicetype) enum value.
* @example
* ```js
* await Device.getDeviceTypeAsync();
* // DeviceType.PHONE
* ```
*/
export async function getDeviceTypeAsync(): Promise<DeviceType> {
if (!ExpoDevice.getDeviceTypeAsync) {
throw new UnavailabilityError('expo-device', 'getDeviceTypeAsync');
}
return await ExpoDevice.getDeviceTypeAsync();
}
/**
* Gets the uptime since the last reboot of the device, in milliseconds. Android devices do not count time spent in deep sleep.
* @return Returns a promise that resolves to a `number` that represents the milliseconds since last reboot.
* @example
* ```js
* await Device.getUptimeAsync();
* // 4371054
* ```
* @platform android
* @platform ios
*/
export async function getUptimeAsync(): Promise<number> {
if (!ExpoDevice.getUptimeAsync) {
throw new UnavailabilityError('expo-device', 'getUptimeAsync');
}
return await ExpoDevice.getUptimeAsync();
}
/**
* Returns the maximum amount of memory that the Java VM will attempt to use. If there is no inherent limit then `Number.MAX_SAFE_INTEGER` is returned.
* @return Returns a promise that resolves to the maximum available memory that the Java VM will use, in bytes.
* @example
* ```js
* await Device.getMaxMemoryAsync();
* // 402653184
* ```
* @platform android
*/
export async function getMaxMemoryAsync(): Promise<number> {
if (!ExpoDevice.getMaxMemoryAsync) {
throw new UnavailabilityError('expo-device', 'getMaxMemoryAsync');
}
let maxMemory = await ExpoDevice.getMaxMemoryAsync();
if (maxMemory === -1) {
maxMemory = Number.MAX_SAFE_INTEGER;
}
return maxMemory;
}
/**
* > **warning** This method is experimental and is not completely reliable. See description below.
*
* Checks whether the device has been rooted (Android) or jailbroken (iOS). This is not completely reliable because there exist solutions to bypass root-detection
* on both [iOS](path_to_url and [Android](path_to_url
* Further, many root-detection checks can be bypassed via reverse engineering.
* - On Android, it's implemented in a way to find all possible files paths that contain the `"su"` executable but some devices that are not rooted may also have this executable. Therefore, there's no guarantee that this method will always return correctly.
* - On iOS, [these jailbreak checks](path_to_url are used to detect if a device is rooted/jailbroken. However, since there are closed-sourced solutions such as [xCon](path_to_url that aim to hook every known method and function responsible for informing an application of a jailbroken device, this method may not reliably detect devices that have xCon or similar packages installed.
* - On web, this always resolves to `false` even if the device is rooted.
* @return Returns a promise that resolves to a `boolean` that specifies whether this device is rooted.
* @example
* ```js
* await Device.isRootedExperimentalAsync();
* // true or false
* ```
*/
export async function isRootedExperimentalAsync(): Promise<boolean> {
if (!ExpoDevice.isRootedExperimentalAsync) {
throw new UnavailabilityError('expo-device', 'isRootedExperimentalAsync');
}
return await ExpoDevice.isRootedExperimentalAsync();
}
/**
* **Using this method requires you to [add the `REQUEST_INSTALL_PACKAGES` permission](./../config/app/#permissions).**
* Returns whether applications can be installed for this user via the system's [`ACTION_INSTALL_PACKAGE`](path_to_url#ACTION_INSTALL_PACKAGE)
* mechanism rather than through the OS's default app store, like Google Play.
* @return Returns a promise that resolves to a `boolean` that represents whether the calling package is allowed to request package installation.
* @example
* ```js
* await Device.isSideLoadingEnabledAsync();
* // true or false
* ```
* @platform android
*/
export async function isSideLoadingEnabledAsync(): Promise<boolean> {
if (!ExpoDevice.isSideLoadingEnabledAsync) {
throw new UnavailabilityError('expo-device', 'isSideLoadingEnabledAsync');
}
return await ExpoDevice.isSideLoadingEnabledAsync();
}
/**
* Gets a list of features that are available on the system. The feature names are platform-specific.
* See [Android documentation](<path_to_url#getSystemAvailableFeatures()>)
* to learn more about this implementation.
* @return Returns a promise that resolves to an array of strings, each of which is a platform-specific name of a feature available on the current device.
* On iOS and web, the promise always resolves to an empty array.
* @example
* ```js
* await Device.getPlatformFeaturesAsync();
* // [
* // 'android.software.adoptable_storage',
* // 'android.software.backup',
* // 'android.hardware.sensor.accelerometer',
* // 'android.hardware.touchscreen',
* // ]
* ```
* @platform android
*/
export async function getPlatformFeaturesAsync(): Promise<string[]> {
if (!ExpoDevice.getPlatformFeaturesAsync) {
return [];
}
return await ExpoDevice.getPlatformFeaturesAsync();
}
/**
* Tells if the device has a specific system feature.
* @param feature The platform-specific name of the feature to check for on the device. You can get all available system features with `Device.getSystemFeatureAsync()`.
* See [Android documentation](<path_to_url#hasSystemFeature(java.lang.String)>) to view acceptable feature strings.
* @return Returns a promise that resolves to a boolean value indicating whether the device has the specified system feature.
* On iOS and web, the promise always resolves to `false`.
* @example
* ```js
* await Device.hasPlatformFeatureAsync('amazon.hardware.fire_tv');
* // true or false
* ```
* @platform android
*/
export async function hasPlatformFeatureAsync(feature: string): Promise<boolean> {
if (!ExpoDevice.hasPlatformFeatureAsync) {
return false;
}
return await ExpoDevice.hasPlatformFeatureAsync(feature);
}
``` | /content/code_sandbox/packages/expo-device/src/Device.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 3,517 |
```xml
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
// import component
import { ChallengeCreateComponent } from './challenge-create.component';
// import module
import { ChallengeCreateRoutingModule } from './challenge-create-routing.module';
import { SharedModule } from '../../shared/shared.module';
@NgModule({
declarations: [ChallengeCreateComponent],
imports: [CommonModule, ChallengeCreateRoutingModule, SharedModule],
exports: [ChallengeCreateComponent],
})
export class ChallengeCreateModule {}
``` | /content/code_sandbox/frontend_v2/src/app/components/challenge-create/challenge-create.module.ts | xml | 2016-10-21T00:51:45 | 2024-08-16T14:41:56 | EvalAI | Cloud-CV/EvalAI | 1,736 | 100 |
```xml
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ChallengeevaluationComponent } from './challengeevaluation.component';
import { ChallengeService } from '../../../services/challenge.service';
import { ApiService } from '../../../services/api.service';
import { GlobalService } from '../../../services/global.service';
import { HttpClientModule } from '@angular/common/http';
import { RouterTestingModule } from '@angular/router/testing';
import { AuthService } from '../../../services/auth.service';
import { EndpointsService } from '../../../services/endpoints.service';
import { Observable } from 'rxjs';
describe('ChallengeevaluationComponent', () => {
let component: ChallengeevaluationComponent;
let fixture: ComponentFixture<ChallengeevaluationComponent>;
let globalService, apiService;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ChallengeevaluationComponent],
providers: [ChallengeService, ApiService, GlobalService, AuthService, EndpointsService],
imports: [RouterTestingModule, HttpClientModule],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(ChallengeevaluationComponent);
globalService = TestBed.get(GlobalService);
apiService = TestBed.get(ApiService);
component = fixture.componentInstance;
spyOn(globalService, 'showModal');
spyOn(globalService, 'showToast');
spyOn(component, 'updateView');
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
it('global variables', () => {
expect(component.isChallengeHost).toBeFalsy();
});
it('should show modal and successfully edit the evaluation details', () => {
const updatedEvaluationDetails = 'Updated challenge evaluation details';
const expectedSuccessMsg = 'The evaluation details is successfully updated!';
spyOn(apiService, 'patchUrl').and.returnValue(
new Observable((observer) => {
observer.next({ evaluation_details: updatedEvaluationDetails });
observer.complete();
return { unsubscribe() {} };
})
);
component.editEvaluationCriteria();
expect(globalService.showModal).toHaveBeenCalled();
component.apiCall(updatedEvaluationDetails);
expect(apiService.patchUrl).toHaveBeenCalled();
expect(component.challenge.evaluation_details).toEqual(updatedEvaluationDetails);
expect(component.updateView).toHaveBeenCalled();
expect(component.challenge.evaluation_details).toEqual(updatedEvaluationDetails);
expect(globalService.showToast).toHaveBeenCalledWith('success', expectedSuccessMsg, 5);
});
it('should handle the API error for `editEvaluationCriteria` method', () => {
const updatedEvaluationDetails = 'Updated challenge evaluation details';
const expectedErrorMsg = {
error: 'Api error',
};
spyOn(apiService, 'patchUrl').and.returnValue(
new Observable((observer) => {
observer.error({ error: expectedErrorMsg.error });
observer.complete();
return { unsubscribe() {} };
})
);
component.editEvaluationCriteria();
expect(globalService.showModal).toHaveBeenCalled();
component.apiCall(updatedEvaluationDetails);
expect(apiService.patchUrl).toHaveBeenCalled();
expect(globalService.showToast).toHaveBeenCalledWith('error', expectedErrorMsg);
});
it('should show modal and successfully edit the terms and conditions', () => {
const updatedTermsAndConditions = 'Updated terms and conditions of challenge';
const expectedSuccessMsg = 'The terms and conditions are successfully updated!';
spyOn(apiService, 'patchUrl').and.returnValue(
new Observable((observer) => {
observer.next({ terms_and_conditions: updatedTermsAndConditions });
observer.complete();
return { unsubscribe() {} };
})
);
component.editTermsAndConditions();
expect(globalService.showModal).toHaveBeenCalled();
component.apiCall(updatedTermsAndConditions);
expect(apiService.patchUrl).toHaveBeenCalled();
expect(component.challenge.terms_and_conditions).toEqual(updatedTermsAndConditions);
expect(component.updateView).toHaveBeenCalled();
expect(component.challenge.terms_and_conditions).toEqual(updatedTermsAndConditions);
expect(globalService.showToast).toHaveBeenCalledWith('success', expectedSuccessMsg, 5);
});
it('should handle the API error for `editTermsAndConditions` method', () => {
const updatedTermsAndConditions = 'Updated terms and conditions of challenge';
const expectedErrorMsg = {
error: 'Api error',
};
spyOn(apiService, 'patchUrl').and.returnValue(
new Observable((observer) => {
observer.error({ error: expectedErrorMsg.error });
observer.complete();
return { unsubscribe() {} };
})
);
component.editTermsAndConditions();
expect(globalService.showModal).toHaveBeenCalled();
component.apiCall(updatedTermsAndConditions);
expect(apiService.patchUrl).toHaveBeenCalled();
expect(globalService.showToast).toHaveBeenCalledWith('error', expectedErrorMsg);
});
it('should show modal and successfully edit evaluation script', () => {
const parameters = {
evaluation_script: 'evaluation_script',
};
const expectedSuccessMsg = 'The evaluation script is successfully updated!';
spyOn(apiService, 'patchFileUrl').and.returnValue(
new Observable((observer) => {
observer.next({ results: [{}] });
observer.complete();
return { unsubscribe() {} };
})
);
component.editEvaluationScript();
expect(globalService.showModal).toHaveBeenCalled();
component.apiCall(parameters);
expect(apiService.patchFileUrl).toHaveBeenCalled();
expect(globalService.showToast).toHaveBeenCalledWith('success', expectedSuccessMsg);
});
it('should handle the API error for `editEvaluationScript` method', () => {
const parameters = {
evaluation_script: 'evaluation_script',
};
const expectedErrorMsg = {
error: 'Api error',
};
spyOn(apiService, 'patchFileUrl').and.returnValue(
new Observable((observer) => {
observer.error({ error: expectedErrorMsg.error });
observer.complete();
return { unsubscribe() {} };
})
);
component.editEvaluationScript();
expect(globalService.showModal).toHaveBeenCalled();
component.apiCall(parameters);
expect(apiService.patchFileUrl).toHaveBeenCalled();
expect(globalService.showToast).toHaveBeenCalledWith('error', expectedErrorMsg);
});
});
``` | /content/code_sandbox/frontend_v2/src/app/components/challenge/challengeevaluation/challengeevaluation.component.spec.ts | xml | 2016-10-21T00:51:45 | 2024-08-16T14:41:56 | EvalAI | Cloud-CV/EvalAI | 1,736 | 1,229 |
```xml
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
//
// path_to_url
//
// Unless required by applicable law or agreed to in writing,
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// specific language governing permissions and limitations
import {
generateDictionaryTables,
generateRandomTables
} from '../../../data/tables.js';
import * as generate from '../../../generate-test-data.js';
import { validateRecordBatchIterator } from '../validate.js';
import type { RecordBatchStreamWriterOptions } from 'apache-arrow/ipc/writer';
import {
builderThroughIterable,
Data,
Dictionary,
Field,
Int32,
RecordBatch,
RecordBatchReader,
RecordBatchStreamWriter,
Schema,
Table,
Uint32,
Vector
} from 'apache-arrow';
describe('RecordBatchStreamWriter', () => {
const type = generate.sparseUnion(0, 0).vector.type;
const schema = new Schema([new Field('dictSparseUnion', type)]);
const table = generate.table([10, 20, 30], schema).table;
const testName = `[${table.schema.fields.join(', ')}]`;
testStreamWriter(table, testName, { writeLegacyIpcFormat: true });
testStreamWriter(table, testName, { writeLegacyIpcFormat: false });
for (const table of generateRandomTables([10, 20, 30])) {
const testName = `[${table.schema.fields.join(', ')}]`;
testStreamWriter(table, testName, { writeLegacyIpcFormat: true });
testStreamWriter(table, testName, { writeLegacyIpcFormat: false });
}
for (const table of generateDictionaryTables([10, 20, 30])) {
const testName = `${table.schema.fields[0]}`;
testStreamWriter(table, testName, { writeLegacyIpcFormat: true });
testStreamWriter(table, testName, { writeLegacyIpcFormat: false });
}
it(`should write multiple tables to the same output stream`, async () => {
const tables = [] as Table[];
const writer = new RecordBatchStreamWriter({ autoDestroy: false });
const validate = (async () => {
for await (const reader of RecordBatchReader.readAll(writer)) {
const sourceTable = tables.shift()!;
const streamTable = new Table(await reader.readAll());
expect(streamTable).toEqualTable(sourceTable);
}
})();
for (const table of generateRandomTables([10, 20, 30])) {
tables.push(table);
await writer.writeAll((async function* () {
for (const chunk of table.batches) {
yield chunk; // insert some asynchrony
await new Promise((r) => setTimeout(r, 1));
}
}()));
}
writer.close();
await validate;
});
it('should write replacement dictionary batches', async () => {
const name = 'dictionary_encoded_uint32';
const type = new Dictionary<Uint32, Int32>(new Uint32, new Int32, 0);
const sourceChunks: Data<Dictionary<Uint32, Int32>>[] = [];
const resultChunks: Data<Dictionary<Uint32, Int32>>[] = [];
const writer = RecordBatchStreamWriter.writeAll((function* () {
for (let i = 0; i < 1000; i += 50) {
const { vector: { data: [chunk] } } = generate.dictionary(50, 20, type.dictionary, type.indices);
sourceChunks.push(chunk);
// Clone the data with the original Dictionary type so the cloned chunk has id 0
resultChunks.push(chunk.clone(type));
yield new RecordBatch({ [name]: resultChunks.at(-1)! });
}
})());
expect(new Vector(resultChunks)).toEqualVector(new Vector(sourceChunks));
type T = { [name]: Dictionary<Uint32, Int32> };
const sourceTable = new Table({ [name]: new Vector(sourceChunks) });
const resultTable = new Table(RecordBatchReader.from<T>(await writer.toUint8Array()));
// 1000 / 50 = 20
expect(sourceTable.batches).toHaveLength(20);
expect(resultTable.batches).toHaveLength(20);
expect(resultTable).toEqualTable(sourceTable);
for (const batch of resultTable.batches) {
for (const [_, dictionary] of batch.dictionaries) {
expect(dictionary).toBeInstanceOf(Vector);
expect(dictionary.data).toHaveLength(1);
}
}
});
it('should write delta dictionary batches', async () => {
const name = 'dictionary_encoded_uint32';
const resultChunks: Vector<Dictionary<Uint32, Int32>>[] = [];
const {
vector: sourceVector, values: sourceValues,
} = generate.dictionary(1000, 20, new Uint32(), new Int32());
const writer = RecordBatchStreamWriter.writeAll((function* () {
const transform = builderThroughIterable({
type: sourceVector.type, nullValues: [null],
queueingStrategy: 'count', highWaterMark: 50,
});
for (const chunk of transform(sourceValues())) {
resultChunks.push(chunk);
yield new RecordBatch({ [name]: chunk.data[0] });
}
})());
expect(new Vector(resultChunks)).toEqualVector(sourceVector);
type T = { [name]: Dictionary<Uint32, Int32> };
const sourceTable = new Table({ [name]: sourceVector });
const resultTable = new Table(RecordBatchReader.from<T>(await writer.toUint8Array()));
const child = resultTable.getChild(name)!;
const dicts = child.data.map(({ dictionary }) => dictionary!);
const dictionary = dicts[child.data.length - 1];
expect(resultTable).toEqualTable(sourceTable);
expect(dictionary).toBeInstanceOf(Vector);
expect(dictionary.data).toHaveLength(20);
});
});
function testStreamWriter(table: Table, name: string, options: RecordBatchStreamWriterOptions) {
describe(`should write the Arrow IPC stream format (${name})`, () => {
test(`Table`, validateTable.bind(0, table, options));
});
}
async function validateTable(source: Table, options: RecordBatchStreamWriterOptions) {
const writer = RecordBatchStreamWriter.writeAll(source, options);
const reader = RecordBatchReader.from(await writer.toUint8Array());
const result = new Table(...reader);
validateRecordBatchIterator(3, source.batches);
expect(result).toEqualTable(source);
}
``` | /content/code_sandbox/js/test/unit/ipc/writer/stream-writer-tests.ts | xml | 2016-02-17T08:00:23 | 2024-08-16T19:00:48 | arrow | apache/arrow | 14,094 | 1,400 |
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
// TypeScript Version: 4.1
/// <reference types="@stdlib/types"/>
import * as random from '@stdlib/types/random';
import { TypedIterator } from '@stdlib/types/iter';
/**
* Interface defining function options.
*/
interface Options {
/**
* 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;
/**
* Boolean indicating whether to copy a provided pseudorandom number generator state (default: true).
*/
copy?: boolean;
/**
* Number of iterations.
*/
iter?: number;
}
/**
* Interface for iterators of pseudorandom numbers having integer values.
*/
interface Iterator<T> extends TypedIterator<T> {
/**
* Underlying pseudorandom number generator.
*/
readonly PRNG: random.PRNG;
/**
* Pseudorandom number generator seed.
*/
readonly seed: random.PRNGSeedMT19937;
/**
* Length of generator seed.
*/
readonly seedLength: number;
/**
* Generator state.
*/
state: random.PRNGStateMT19937;
/**
* Length of generator state.
*/
readonly stateLength: number;
/**
* Size (in bytes) of generator state.
*/
readonly byteLength: number;
}
/**
* Returns an iterator for generating pseudorandom numbers drawn from a standard normal distribution using the Box-Muller transform.
*
* @param options - function options
* @param options.prng - pseudorandom number generator which generates uniformly distributed pseudorandom numbers
* @param options.seed - pseudorandom number generator seed
* @param options.state - pseudorandom number generator state
* @param options.copy - boolean indicating whether to copy a provided pseudorandom number generator state (default: true)
* @param options.iter - number of iterations
* @throws must provide valid options
* @returns iterator
*
* @example
* var iter = iterator();
*
* var r = iter.next().value;
* // returns <number>
*
* r = iter.next().value;
* // returns <number>
*
* r = iter.next().value;
* // returns <number>
*
* // ...
*/
declare function iterator( options?: Options ): Iterator<number>;
// EXPORTS //
export = iterator;
``` | /content/code_sandbox/lib/node_modules/@stdlib/random/iter/box-muller/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 582 |
```xml
// See LICENSE in the project root for license information.
import * as os from 'os';
/**
* Parses a command line specification for desired parallelism.
* Factored out to enable unit tests
*/
export function parseParallelism(
rawParallelism: string | undefined,
numberOfCores: number = os.cpus().length
): number {
if (rawParallelism) {
if (rawParallelism === 'max') {
return numberOfCores;
} else {
const parallelismAsNumber: number = Number(rawParallelism);
if (typeof rawParallelism === 'string' && rawParallelism.trim().endsWith('%')) {
const parsedPercentage: number = Number(rawParallelism.trim().replace(/\%$/, ''));
if (parsedPercentage <= 0 || parsedPercentage > 100) {
throw new Error(
`Invalid percentage value of '${rawParallelism}', value cannot be less than '0%' or more than '100%'`
);
}
const workers: number = Math.floor((parsedPercentage / 100) * numberOfCores);
return Math.max(workers, 1);
} else if (!isNaN(parallelismAsNumber)) {
return Math.max(parallelismAsNumber, 1);
} else {
throw new Error(
`Invalid parallelism value of '${rawParallelism}', expected a number, a percentage, or 'max'`
);
}
}
} else {
// If an explicit parallelism number wasn't provided, then choose a sensible
// default.
if (os.platform() === 'win32') {
// On desktop Windows, some people have complained that their system becomes
// sluggish if Rush is using all the CPU cores. Leave one thread for
// other operations. For CI environments, you can use the "max" argument to use all available cores.
return Math.max(numberOfCores - 1, 1);
} else {
// Unix-like operating systems have more balanced scheduling, so default
// to the number of CPU cores
return numberOfCores;
}
}
}
``` | /content/code_sandbox/libraries/rush-lib/src/cli/parsing/ParseParallelism.ts | xml | 2016-09-30T00:28:20 | 2024-08-16T18:54:35 | rushstack | microsoft/rushstack | 5,790 | 448 |
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
// TypeScript Version: 4.1
/**
* Tests if a value is an anagram.
*
* @param str - comparison string
* @param x - value to test
* @returns boolean indicating if a value is an anagram
*
* @example
* var bool = isAnagram( 'I am a weakish speller', 'William Shakespeare' );
* // returns true
*
* @example
* var bool = isAnagram( 'bat', 'tabba' );
* // returns false
*/
declare function isAnagram( str: string, x: any ): boolean;
// EXPORTS //
export = isAnagram;
``` | /content/code_sandbox/lib/node_modules/@stdlib/assert/is-anagram/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 186 |
```xml
import Dialog from '@mui/material/Dialog';
import DialogContent from '@mui/material/DialogContent';
import i18next from 'i18next';
import isEmpty from 'lodash/isEmpty';
import React, { useCallback, useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
import { Dispatch, LoginBody, RootState } from '../../';
import LoginDialogCloseButton from './LoginDialogCloseButton';
import LoginDialogForm, { FormValues } from './LoginDialogForm';
import LoginDialogHeader from './LoginDialogHeader';
interface Props {
open?: boolean;
onClose: () => void;
}
const LoginDialog: React.FC<Props> = ({ onClose, open = false }) => {
const loginStore: any = useSelector((state: RootState) => state.login);
const dispatch = useDispatch<Dispatch>();
const makeLogin = useCallback(
async (username?: string, password?: string): Promise<LoginBody | void> => {
// checks isEmpty
if (!username || !password || isEmpty(username) || isEmpty(password)) {
dispatch.login.addError({
type: 'error',
description: i18next.t('form-validation.username-or-password-cant-be-empty'),
});
return;
}
// checks min username and password length
if (username.length < 2 || password.length < 2) {
dispatch.login.addError({
type: 'error',
description: i18next.t('form-validation.required-min-length', { length: 2 }),
});
return;
}
try {
dispatch.login.getUser({ username, password });
// const response: LoginBody = await doLogin(username as string, password as string);
dispatch.login.clearError();
} catch (e: any) {
dispatch.login.addError({
type: 'error',
description: i18next.t('form-validation.unable-to-sign-in'),
});
// eslint-disable-next-line no-console
console.error('login error', e.message);
}
},
[dispatch]
);
const handleDoLogin = useCallback(
async (data: FormValues) => {
await makeLogin(data.username, data.password);
},
[makeLogin]
);
useEffect(() => {
if (loginStore.token && typeof loginStore.error === 'undefined') {
onClose();
}
}, [loginStore, onClose]);
return (
<Dialog
data-testid="login--dialog"
fullWidth={true}
id="login--dialog"
maxWidth="sm"
onClose={onClose}
open={open}
>
<LoginDialogCloseButton onClose={onClose} />
<DialogContent data-testid="dialogContentLogin">
<LoginDialogHeader />
<LoginDialogForm error={loginStore.error} onSubmit={handleDoLogin} />
</DialogContent>
</Dialog>
);
};
export default LoginDialog;
``` | /content/code_sandbox/packages/ui-components/src/components/LoginDialog/LoginDialog.tsx | xml | 2016-04-15T16:21:12 | 2024-08-16T09:38:01 | verdaccio | verdaccio/verdaccio | 16,189 | 601 |
```xml
import { graphql } from "react-relay";
import { Environment } from "relay-runtime";
import {
commitMutationPromiseNormalized,
createMutation,
MutationInput,
} from "coral-framework/lib/relay";
import { GQLSTORY_STATUS } from "coral-framework/schema";
import { CloseStoryMutation as MutationTypes } from "coral-admin/__generated__/CloseStoryMutation.graphql";
let clientMutationId = 0;
const CloseStoryMutation = createMutation(
"closeStory",
(environment: Environment, input: MutationInput<MutationTypes>) =>
commitMutationPromiseNormalized<MutationTypes>(environment, {
mutation: graphql`
mutation CloseStoryMutation($input: CloseStoryInput!) {
closeStory(input: $input) {
story {
id
status
closedAt
isClosed
isArchiving
isArchived
}
clientMutationId
}
}
`,
optimisticResponse: {
closeStory: {
story: {
id: input.id,
status: GQLSTORY_STATUS.CLOSED,
closedAt: new Date().toISOString(),
isClosed: true,
isArchived: false,
isArchiving: false,
},
clientMutationId: clientMutationId.toString(),
},
},
variables: {
input: {
...input,
clientMutationId: (clientMutationId++).toString(),
},
},
})
);
export default CloseStoryMutation;
``` | /content/code_sandbox/client/src/core/client/admin/components/StoryInfoDrawer/CloseStoryMutation.ts | xml | 2016-10-31T16:14:05 | 2024-08-06T16:15:57 | talk | coralproject/talk | 1,881 | 314 |
```xml
import BigNumber from 'bignumber.js';
import { IModels } from '../../connectionResolver';
import { IContractDocument } from '../definitions/contracts';
import { IStoredInterest, IStoredInterestDocument } from '../definitions/storedInterest';
import { calcInterest, getDiffDay, getFullDate } from './utils';
import { IConfig } from '../../interfaces/config';
export async function storeInterestContract(
contract: IContractDocument,
storeDate: Date,
models: IModels,
periodLockId: string,
config:IConfig
) {
const beginDate = getFullDate(contract.lastStoredDate);
const invDate = getFullDate(storeDate);
const lastStoredInterest = await models.StoredInterest.findOne({
invDate: { $lte: invDate }
})
.sort({ invDate: -1 })
.lean<IStoredInterestDocument>();
if (invDate === lastStoredInterest?.invDate) return;
if (!contract.loanBalanceAmount) return;
const diffDay = getDiffDay(beginDate, invDate);
const storeInterestAmount = calcInterest({
balance: contract.loanBalanceAmount,
interestRate: contract.interestRate,
dayOfMonth: diffDay,
fixed:config.calculationFixed
});
if (storeInterestAmount > 0) {
const storeInterest:IStoredInterest = {
amount:storeInterestAmount,
contractId: contract._id,
invDate: invDate,
prevStoredDate: contract.lastStoredDate,
commitmentInterest:0,
periodLockId,
number: contract.number,
description:'',
type:''
}
await models.StoredInterest.create(storeInterest);
if (new BigNumber(contract.storedInterest).isGreaterThan(0))
await models.Contracts.updateOne(
{ _id: contract._id },
{
$inc: { storedInterest: storeInterestAmount },
$set: {
lastStoredDate: invDate
}
}
);
else {
await models.Contracts.updateOne(
{ _id: contract._id },
{
$set: {
lastStoredDate: invDate,
storedInterest: storeInterestAmount
}
}
);
}
}
}
``` | /content/code_sandbox/packages/plugin-loans-api/src/models/utils/storeInterestUtils.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 474 |
```xml
import { store } from "statorgfc";
import GdbApi from "./GdbApi";
import constants from "./constants";
import Actions from "./Actions";
import React from "react"; // needed for jsx
void React;
let debug_print: any;
// @ts-expect-error ts-migrate(2304) FIXME: Cannot find name 'debug'.
if (debug) {
/* global debug */
debug_print = console.info;
} else {
debug_print = function() {
// stubbed out
};
}
let FileFetcher = {
_is_fetching: false,
_queue: [],
_fetch: function(fullname: any, start_line: any, end_line: any) {
if (FileOps.is_missing_file(fullname)) {
// file doesn't exist and we already know about it
// don't keep trying to fetch disassembly
console.warn(`tried to fetch a file known to be missing ${fullname}`);
FileFetcher._is_fetching = false;
FileFetcher._fetch_next();
return;
}
// @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '_'.
if (!_.isString(fullname)) {
console.warn(`trying to fetch filename that is not a string`, fullname);
FileOps.add_missing_file(fullname);
FileFetcher._is_fetching = false;
FileFetcher._fetch_next();
}
FileFetcher._is_fetching = true;
const data = {
start_line: start_line,
end_line: end_line,
path: fullname,
highlight: store.get("highlight_source_code")
};
$.ajax({
beforeSend: function(xhr) {
xhr.setRequestHeader(
"x-csrftoken",
// @ts-expect-error ts-migrate(2304) FIXME: Cannot find name 'initial_data'.
initial_data.csrf_token
); /* global initial_data */
},
url: "/read_file",
cache: false,
type: "GET",
data: data,
success: function(response) {
response.source_code;
let source_code_obj = {};
let linenum = response.start_line;
for (let line of response.source_code_array) {
// @ts-expect-error ts-migrate(7053) FIXME: Element implicitly has an 'any' type because expre... Remove this comment to see the full error message
source_code_obj[linenum] = line;
linenum++;
}
FileOps.add_source_file_to_cache(
fullname,
source_code_obj,
response.last_modified_unix_sec,
response.num_lines_in_file
);
},
error: function(response) {
if (response.responseJSON && response.responseJSON.message) {
Actions.add_console_entries(
// @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '_'.
_.escape(response.responseJSON.message),
constants.console_entry_type.STD_ERR
);
} else {
Actions.add_console_entries(
`${response.statusText} (${response.status} error)`,
constants.console_entry_type.STD_ERR
);
}
FileOps.add_missing_file(fullname);
},
complete: function() {
FileFetcher._is_fetching = false;
// @ts-expect-error ts-migrate(2339) FIXME: Property 'fullname' does not exist on type 'never'... Remove this comment to see the full error message
FileFetcher._queue = FileFetcher._queue.filter(o => o.fullname !== fullname);
FileFetcher._fetch_next();
}
});
},
_fetch_next: function() {
if (FileFetcher._is_fetching) {
return;
}
if (FileFetcher._queue.length) {
let obj = FileFetcher._queue.shift();
// @ts-expect-error ts-migrate(2532) FIXME: Object is possibly 'undefined'.
FileFetcher._fetch(obj.fullname, obj.start_line, obj.end_line);
}
},
fetch_complete() {
FileFetcher._is_fetching = false;
FileFetcher._fetch_next();
},
fetch: function(fullname: any, start_line: any, end_line: any) {
if (!start_line) {
start_line = 1;
console.warn("expected start line");
}
if (!end_line) {
end_line = start_line;
console.warn("expected end line");
}
if (FileOps.lines_are_cached(fullname, start_line, end_line)) {
debug_print(
`not fetching ${fullname}:${start_line}:${end_line} because it's cached`
);
return;
}
// @ts-expect-error ts-migrate(2322) FIXME: Type 'any' is not assignable to type 'never'.
FileFetcher._queue.push({ fullname, start_line, end_line });
FileFetcher._fetch_next();
}
};
const FileOps = {
warning_shown_for_old_binary: false,
unfetchable_disassembly_addresses: {},
disassembly_addr_being_fetched: null,
init: function() {
// @ts-expect-error ts-migrate(2339) FIXME: Property 'subscribeToKeys' does not exist on type ... Remove this comment to see the full error message
store.subscribeToKeys(
[
"inferior_program",
"source_code_selection_state",
"paused_on_frame",
"current_assembly_address",
"disassembly_for_missing_file",
"highlight_source_code",
"missing_files",
"files_being_fetched",
"gdb_version_array",
"fullname_to_render",
"line_of_source_to_flash",
"cached_source_files",
"max_lines_of_code_to_fetch"
],
FileOps._store_change_callback
);
},
user_select_file_to_view: function(fullname: any, line: any) {
store.set(
"source_code_selection_state",
constants.source_code_selection_states.USER_SELECTION
);
store.set("fullname_to_render", fullname);
store.set("line_of_source_to_flash", line);
store.set("make_current_line_visible", true);
store.set("source_code_infinite_scrolling", false);
},
_store_change_callback: function() {
if (store.get("inferior_program") === constants.inferior_states.running) {
return;
}
let source_code_selection_state = store.get("source_code_selection_state"),
fullname = null,
is_paused = false,
paused_addr = null,
paused_frame_fullname = null,
paused_frame = store.get("paused_on_frame");
if (paused_frame) {
paused_frame_fullname = paused_frame.fullname;
}
let require_cached_line_num;
if (
source_code_selection_state ===
constants.source_code_selection_states.USER_SELECTION
) {
fullname = store.get("fullname_to_render");
is_paused = false;
paused_addr = null;
require_cached_line_num = parseInt(store.get("line_of_source_to_flash"));
} else if (
source_code_selection_state === constants.source_code_selection_states.PAUSED_FRAME
) {
is_paused = store.get("inferior_program") === constants.inferior_states.paused;
paused_addr = store.get("current_assembly_address");
fullname = paused_frame_fullname;
require_cached_line_num = parseInt(store.get("line_of_source_to_flash"));
}
let source_code_infinite_scrolling = store.get("source_code_infinite_scrolling"),
assembly_is_cached = FileOps.assembly_is_cached(fullname),
file_is_missing = FileOps.is_missing_file(fullname),
start_line,
end_line;
({ start_line, end_line, require_cached_line_num } = FileOps.get_start_and_end_lines(
fullname,
require_cached_line_num,
source_code_infinite_scrolling
));
FileOps.update_source_code_state(
fullname,
start_line,
require_cached_line_num,
end_line,
assembly_is_cached,
file_is_missing,
is_paused,
paused_addr
);
},
get_start_and_end_lines(
fullname: any,
require_cached_line_num: any,
source_code_infinite_scrolling: any
) {
let start_line, end_line;
if (source_code_infinite_scrolling) {
start_line = store.get("source_linenum_to_display_start");
end_line = store.get("source_linenum_to_display_end");
require_cached_line_num = start_line;
} else {
let source_file_obj = FileOps.get_source_file_obj_from_cache(fullname);
if (!require_cached_line_num) {
require_cached_line_num = 1;
}
start_line = Math.max(
Math.floor(require_cached_line_num - store.get("max_lines_of_code_to_fetch") / 2),
1
);
end_line = Math.ceil(start_line + store.get("max_lines_of_code_to_fetch"));
if (source_file_obj) {
// @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1.
end_line = Math.ceil(Math.min(end_line, FileOps.get_num_lines_in_file(fullname))); // don't go past the end of the line
}
if (start_line > end_line) {
start_line = Math.floor(
Math.max(1, end_line - store.get("max_lines_of_code_to_fetch"))
);
}
require_cached_line_num = Math.min(require_cached_line_num, end_line);
}
return { start_line, end_line, require_cached_line_num };
},
update_source_code_state(
fullname: any,
start_line: any,
require_cached_line_num: any,
end_line: any,
assembly_is_cached: any,
file_is_missing: any,
is_paused: any,
paused_addr: any
) {
const states = constants.source_code_states,
// @ts-expect-error ts-migrate(2554) FIXME: Expected 3 arguments, but got 2.
line_is_cached = FileOps.line_is_cached(fullname, require_cached_line_num);
if (fullname && line_is_cached) {
// we have file cached. We may have assembly cached too.
store.set(
"source_code_state",
assembly_is_cached ? states.ASSM_AND_SOURCE_CACHED : states.SOURCE_CACHED
);
store.set("source_linenum_to_display_start", start_line);
// @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1.
end_line = Math.min(end_line, FileOps.get_num_lines_in_file(fullname));
store.set("source_linenum_to_display_end", end_line);
} else if (fullname && !file_is_missing) {
// we don't have file cached, and it is not known to be missing on the file system, so try to get it
store.set("source_code_state", states.FETCHING_SOURCE);
FileFetcher.fetch(fullname, start_line, end_line);
} else if (
is_paused &&
paused_addr &&
store
.get("disassembly_for_missing_file")
.some((obj: any) => parseInt(obj.address, 16) === parseInt(paused_addr, 16))
) {
store.set("source_code_state", states.ASSM_CACHED);
} else if (is_paused && paused_addr) {
if (paused_addr in FileOps.unfetchable_disassembly_addresses) {
store.set("source_code_state", states.ASSM_UNAVAILABLE);
} else {
// get disassembly
store.set("source_code_state", states.FETCHING_ASSM);
FileOps.fetch_disassembly_for_missing_file(paused_addr);
}
} else if (file_is_missing) {
store.set("source_code_state", states.FILE_MISSING);
} else {
store.set("source_code_state", states.NONE_AVAILABLE);
}
},
get_num_lines_in_file: function(fullname: any, source_file_obj: any) {
if (!source_file_obj) {
source_file_obj = FileOps.get_source_file_obj_from_cache(fullname);
}
if (!source_file_obj) {
console.error("Developer error: expected to find file object for " + fullname);
return;
}
if (!source_file_obj.num_lines_in_file) {
console.error('Developer error: expected key "num_lines_in_file"');
return Infinity;
}
return source_file_obj.num_lines_in_file;
},
lines_are_cached: function(fullname: any, start_line: any, end_line: any) {
let source_file_obj = FileOps.get_source_file_obj_from_cache(fullname),
linenum = start_line;
if (!source_file_obj) {
return false;
}
const num_lines_in_file = FileOps.get_num_lines_in_file(fullname, source_file_obj);
if (start_line > num_lines_in_file) {
return false;
}
let safe_end_line = Math.min(end_line, num_lines_in_file);
while (linenum <= safe_end_line) {
if (!FileOps.line_is_cached(fullname, linenum, source_file_obj)) {
return false;
}
linenum++;
}
return true;
},
line_is_cached: function(fullname: any, linenum: any, source_file_obj: any) {
if (!source_file_obj) {
source_file_obj = FileOps.get_source_file_obj_from_cache(fullname);
}
return (
source_file_obj &&
source_file_obj.source_code_obj &&
source_file_obj.source_code_obj[linenum] !== undefined
);
},
get_line_from_file: function(fullname: any, linenum: any) {
let source_file_obj = FileOps.get_source_file_obj_from_cache(fullname);
if (!source_file_obj) {
return null;
}
return source_file_obj.source_code_obj[linenum];
},
assembly_is_cached: function(fullname: any) {
let source_file_obj = FileOps.get_source_file_obj_from_cache(fullname);
return (
source_file_obj &&
source_file_obj.assembly &&
Object.keys(source_file_obj.assembly).length
);
},
get_source_file_obj_from_cache: function(fullname: any) {
let cached_files = store.get("cached_source_files");
for (let sf of cached_files) {
if (sf.fullname === fullname) {
return sf;
}
}
return null;
},
add_source_file_to_cache: function(
fullname: any,
source_code_obj: any,
last_modified_unix_sec: any,
num_lines_in_file: any
) {
let cached_file_obj = FileOps.get_source_file_obj_from_cache(fullname);
if (cached_file_obj === null) {
// nothing cached in the front end, add a new entry
let new_source_file = {
fullname: fullname,
source_code_obj: source_code_obj,
assembly: {},
last_modified_unix_sec: last_modified_unix_sec,
num_lines_in_file: num_lines_in_file,
exists: true
},
cached_source_files = store.get("cached_source_files");
cached_source_files.push(new_source_file);
store.set("cached_source_files", cached_source_files);
FileOps.warning_shown_for_old_binary = false;
FileOps.show_modal_if_file_modified_after_binary(
fullname,
new_source_file.last_modified_unix_sec
);
} else {
// mutate existing source code object by adding keys (lines) of the new source code object
Object.assign(cached_file_obj.source_code_obj, source_code_obj);
store.set("cached_source_files", store.get("cached_source_files"));
}
},
/**
* Show modal warning if user is trying to show a file that was modified after the binary was compiled
*/
show_modal_if_file_modified_after_binary(
fullname: any,
src_last_modified_unix_sec: any
) {
if (store.get("inferior_binary_path")) {
if (
src_last_modified_unix_sec >
store.get("inferior_binary_path_last_modified_unix_sec") &&
FileOps.warning_shown_for_old_binary === false
) {
Actions.show_modal(
"Warning",
<div>
This source file was modified <span className="bold">after</span> the binary
was compiled. Recompile the binary, then try again. Otherwise the source code
may not match the binary.
<p />
{/* @ts-expect-error ts-migrate(2304) FIXME: Cannot find name 'moment'. */}
<p>{`Source file: ${fullname}, modified ${moment(
src_last_modified_unix_sec * 1000
).format(constants.DATE_FORMAT)}`}</p>
<p>
{/* @ts-expect-error ts-migrate(2304) FIXME: Cannot find name 'moment'. */}
{`Binary: ${store.get("inferior_binary_path")}, modified ${moment(
store.get("inferior_binary_path_last_modified_unix_sec") * 1000
).format(constants.DATE_FORMAT)}`}
)
</p>
</div>
);
FileOps.warning_shown_for_old_binary = true;
}
}
},
get_cached_assembly_for_file: function(fullname: any) {
for (let file of store.get("cached_source_files")) {
if (file.fullname === fullname) {
return file.assembly;
}
}
return [];
},
refresh_cached_source_files: function() {
FileOps.clear_cached_source_files();
},
clear_cached_source_files: function() {
store.set("cached_source_files", []);
},
fetch_more_source_at_beginning() {
let fullname = store.get("fullname_to_render");
let center_on_line = store.get("source_linenum_to_display_start") - 1;
// store.set('source_code_infinite_scrolling', true)
store.set(
"source_linenum_to_display_start",
Math.max(
store.get("source_linenum_to_display_start") -
Math.floor(store.get("max_lines_of_code_to_fetch") / 2),
1
)
);
store.set(
"source_linenum_to_display_end",
Math.ceil(
store.get("source_linenum_to_display_start") +
store.get("max_lines_of_code_to_fetch")
)
);
Actions.view_file(fullname, center_on_line);
FileFetcher.fetch(
fullname,
store.get("source_linenum_to_display_start"),
store.get("source_linenum_to_display_end")
);
},
fetch_more_source_at_end() {
store.set("source_code_infinite_scrolling", true);
let fullname = store.get("fullname_to_render");
let end_line =
store.get("source_linenum_to_display_end") +
Math.ceil(store.get("max_lines_of_code_to_fetch") / 2);
let source_file_obj = FileOps.get_source_file_obj_from_cache(fullname);
if (source_file_obj) {
// @ts-expect-error ts-migrate(2554) FIXME: Expected 2 arguments, but got 1.
end_line = Math.min(end_line, FileOps.get_num_lines_in_file(fullname)); // don't go past the end of the line
}
let start_line = end_line - store.get("max_lines_of_code_to_fetch");
start_line = Math.max(1, start_line);
store.set("source_linenum_to_display_end", end_line);
store.set("source_linenum_to_display_start", start_line);
FileFetcher.fetch(
fullname,
store.get("source_linenum_to_display_start"),
store.get("source_linenum_to_display_end")
);
},
is_missing_file: function(fullname: any) {
return store.get("missing_files").indexOf(fullname) !== -1;
},
add_missing_file: function(fullname: any) {
let missing_files = store.get("missing_files");
missing_files.push(fullname);
store.set("missing_files", missing_files);
},
/**
* gdb changed its api for the data-disassemble command
* see path_to_url
* TODO not sure which version this change occured in. I know in 7.7 it needs the '3' option,
* and in 7.11 it needs the '4' option. I should test the various version at some point.
*/
get_dissasembly_format_num: function(gdb_version_array: any) {
if (gdb_version_array.length === 0) {
// assuming new version, but we shouldn't ever not know the version...
return 4;
} else if (
gdb_version_array[0] < 7 ||
(parseInt(gdb_version_array[0]) === 7 && gdb_version_array[1] <= 7)
) {
// this option has been deprecated in newer versions, but is required in older ones
return 3;
} else {
return 4;
}
},
get_fetch_disassembly_command: function(
fullname: any,
start_line: any,
mi_response_format: any
) {
// @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '_'.
if (_.isString(fullname)) {
return (
constants.INLINE_DISASSEMBLY_STR +
`-data-disassemble -f ${fullname} -l ${start_line} -n 1000 -- ${mi_response_format}`
);
} else {
console.warn("not fetching undefined file");
}
},
/**
* Fetch disassembly for current file/line.
*/
fetch_assembly_cur_line: function(mi_response_format = null) {
// @ts-expect-error ts-migrate(2304) FIXME: Cannot find name '_'.
if (mi_response_format === null || !_.isNumber(mi_response_format)) {
// try to determine response format based on our guess of the gdb version being used
// @ts-expect-error ts-migrate(2322) FIXME: Type '4' is not assignable to type 'null'.
mi_response_format = FileOps.get_dissasembly_format_num(
store.get("gdb_version_array")
);
}
let fullname = store.get("fullname_to_render"),
line = parseInt(store.get("line_of_source_to_flash"));
if (!line) {
line = 1;
}
FileOps.fetch_disassembly(fullname, line, mi_response_format);
},
fetch_disassembly: function(fullname: any, start_line: any, mi_response_format: any) {
let cmd = FileOps.get_fetch_disassembly_command(
fullname,
start_line,
mi_response_format
);
if (cmd) {
GdbApi.run_gdb_command(cmd);
}
},
fetch_disassembly_for_missing_file: function(hex_addr: any) {
// path_to_url
if (window.isNaN(hex_addr)) {
return;
}
Actions.add_console_entries(
"Fetching assembly since file is missing",
constants.console_entry_type.GDBGUI_OUTPUT
);
let start = parseInt(hex_addr, 16),
end = start + 100;
FileOps.disassembly_addr_being_fetched = hex_addr;
GdbApi.run_gdb_command(
constants.DISASSEMBLY_FOR_MISSING_FILE_STR +
`-data-disassemble -s 0x${start.toString(16)} -e 0x${end.toString(16)} -- 0`
);
},
fetch_disassembly_for_missing_file_failed: function() {
let addr_being_fetched = FileOps.disassembly_addr_being_fetched;
// @ts-expect-error ts-migrate(2538) FIXME: Type 'null' cannot be used as an index type.
FileOps.unfetchable_disassembly_addresses[addr_being_fetched] = true;
FileOps.disassembly_addr_being_fetched = null;
Actions.add_console_entries(
"Failed to retrieve assembly for missing file",
constants.console_entry_type.GDBGUI_OUTPUT
);
},
/**
* Save assembly and render source code if desired
* @param mi_assembly: array of assembly instructions
* @param mi_token (int): corresponds to either null (when src file is known and exists),
* constants.DISASSEMBLY_FOR_MISSING_FILE_INT when source file is undefined or does not exist on filesystem
*/
save_new_assembly: function(mi_assembly: any, mi_token: any) {
FileOps.disassembly_addr_being_fetched = null;
if (!Array.isArray(mi_assembly) || mi_assembly.length === 0) {
console.error("Attempted to save unexpected assembly", mi_assembly);
}
let fullname = mi_assembly[0].fullname;
// @ts-expect-error ts-migrate(2551) FIXME: Property 'DISASSEMBLY_FOR_MISSING_FILE_INT' does n... Remove this comment to see the full error message
if (mi_token === constants.DISASSEMBLY_FOR_MISSING_FILE_INT) {
store.set("disassembly_for_missing_file", mi_assembly);
return;
}
// convert assembly to an object, with key corresponding to line numbers
// and values corresponding to asm instructions for that line
let assembly_to_save = {};
for (let obj of mi_assembly) {
// @ts-expect-error ts-migrate(7053) FIXME: No index signature with a parameter of type 'numbe... Remove this comment to see the full error message
assembly_to_save[parseInt(obj.line)] = obj.line_asm_insn;
}
let cached_source_files = store.get("cached_source_files");
for (let cached_file of cached_source_files) {
if (cached_file.fullname === fullname) {
cached_file.assembly = Object.assign(cached_file.assembly, assembly_to_save);
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'string[]' is not assignable to p... Remove this comment to see the full error message
let max_assm_line = Math.max(Object.keys(cached_file.assembly)),
// @ts-expect-error ts-migrate(2345) FIXME: Argument of type 'string[]' is not assignable to p... Remove this comment to see the full error message
max_source_line = Math.max(Object.keys(cached_file.source_code_obj));
if (max_assm_line > max_source_line) {
cached_file.source_code_obj[max_assm_line] = "";
for (let i = 0; i < max_assm_line; i++) {
if (!cached_file.source_code_obj[i]) {
cached_file.source_code_obj[i] = "";
}
}
}
store.set("cached_source_files", cached_source_files);
break;
}
}
}
};
export default FileOps;
``` | /content/code_sandbox/gdbgui/src/js/FileOps.tsx | xml | 2016-10-27T03:19:25 | 2024-08-16T06:39:35 | gdbgui | cs01/gdbgui | 9,816 | 5,750 |
```xml
/**
* @license
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at path_to_url
*/
export * from './table';
export * from './module';
export * from './cell';
export * from './row';
export * from './table-data-source';
export * from './text-column';
``` | /content/code_sandbox/src/material/table/public-api.ts | xml | 2016-01-04T18:50:02 | 2024-08-16T11:21:13 | components | angular/components | 24,263 | 75 |
```xml
import { Uri, workspace } from 'vscode';
import type {
CloudWorkspacesPathMap,
CodeWorkspaceFileContents,
LocalWorkspaceFileData,
WorkspaceAutoAddSetting,
} from '../../../plus/workspaces/models';
import type { WorkspacesPathMappingProvider } from '../../../plus/workspaces/workspacesPathMappingProvider';
import { Logger } from '../../../system/logger';
import {
acquireSharedFolderWriteLock,
getSharedCloudWorkspaceMappingFileUri,
getSharedLegacyLocalWorkspaceMappingFileUri,
getSharedLocalWorkspaceMappingFileUri,
releaseSharedFolderWriteLock,
} from './sharedGKDataFolder';
export class WorkspacesLocalPathMappingProvider implements WorkspacesPathMappingProvider {
private _cloudWorkspacePathMap: CloudWorkspacesPathMap | undefined = undefined;
private async ensureCloudWorkspacePathMap(): Promise<void> {
if (this._cloudWorkspacePathMap == null) {
await this.loadCloudWorkspacePathMap();
}
}
private async getCloudWorkspacePathMap(): Promise<CloudWorkspacesPathMap> {
await this.ensureCloudWorkspacePathMap();
return this._cloudWorkspacePathMap ?? {};
}
private async loadCloudWorkspacePathMap(): Promise<void> {
const localFileUri = getSharedCloudWorkspaceMappingFileUri();
try {
const data = await workspace.fs.readFile(localFileUri);
this._cloudWorkspacePathMap = (JSON.parse(data.toString())?.workspaces ?? {}) as CloudWorkspacesPathMap;
} catch (error) {
Logger.error(error, 'loadCloudWorkspacePathMap');
}
}
async getCloudWorkspaceRepoPath(cloudWorkspaceId: string, repoId: string): Promise<string | undefined> {
const cloudWorkspacePathMap = await this.getCloudWorkspacePathMap();
return cloudWorkspacePathMap[cloudWorkspaceId]?.repoPaths?.[repoId];
}
async getCloudWorkspaceCodeWorkspacePath(cloudWorkspaceId: string): Promise<string | undefined> {
const cloudWorkspacePathMap = await this.getCloudWorkspacePathMap();
return cloudWorkspacePathMap[cloudWorkspaceId]?.externalLinks?.['.code-workspace'];
}
async removeCloudWorkspaceCodeWorkspaceFilePath(cloudWorkspaceId: string): Promise<void> {
if (!(await acquireSharedFolderWriteLock())) {
return;
}
await this.loadCloudWorkspacePathMap();
if (this._cloudWorkspacePathMap?.[cloudWorkspaceId]?.externalLinks?.['.code-workspace'] == null) return;
delete this._cloudWorkspacePathMap[cloudWorkspaceId].externalLinks['.code-workspace'];
const localFileUri = getSharedCloudWorkspaceMappingFileUri();
const outputData = new Uint8Array(Buffer.from(JSON.stringify({ workspaces: this._cloudWorkspacePathMap })));
try {
await workspace.fs.writeFile(localFileUri, outputData);
} catch (error) {
Logger.error(error, 'writeCloudWorkspaceCodeWorkspaceFilePathToMap');
}
await releaseSharedFolderWriteLock();
}
async confirmCloudWorkspaceCodeWorkspaceFilePath(cloudWorkspaceId: string): Promise<boolean> {
const cloudWorkspacePathMap = await this.getCloudWorkspacePathMap();
const codeWorkspaceFilePath = cloudWorkspacePathMap[cloudWorkspaceId]?.externalLinks?.['.code-workspace'];
if (codeWorkspaceFilePath == null) return false;
try {
await workspace.fs.stat(Uri.file(codeWorkspaceFilePath));
return true;
} catch {
return false;
}
}
async writeCloudWorkspaceRepoDiskPathToMap(
cloudWorkspaceId: string,
repoId: string,
repoLocalPath: string,
): Promise<void> {
if (!(await acquireSharedFolderWriteLock())) {
return;
}
await this.loadCloudWorkspacePathMap();
if (this._cloudWorkspacePathMap == null) {
this._cloudWorkspacePathMap = {};
}
if (this._cloudWorkspacePathMap[cloudWorkspaceId] == null) {
this._cloudWorkspacePathMap[cloudWorkspaceId] = { repoPaths: {}, externalLinks: {} };
}
if (this._cloudWorkspacePathMap[cloudWorkspaceId].repoPaths == null) {
this._cloudWorkspacePathMap[cloudWorkspaceId].repoPaths = {};
}
this._cloudWorkspacePathMap[cloudWorkspaceId].repoPaths[repoId] = repoLocalPath;
const localFileUri = getSharedCloudWorkspaceMappingFileUri();
const outputData = new Uint8Array(Buffer.from(JSON.stringify({ workspaces: this._cloudWorkspacePathMap })));
try {
await workspace.fs.writeFile(localFileUri, outputData);
} catch (error) {
Logger.error(error, 'writeCloudWorkspaceRepoDiskPathToMap');
}
await releaseSharedFolderWriteLock();
}
async writeCloudWorkspaceCodeWorkspaceFilePathToMap(
cloudWorkspaceId: string,
codeWorkspaceFilePath: string,
): Promise<void> {
if (!(await acquireSharedFolderWriteLock())) {
return;
}
await this.loadCloudWorkspacePathMap();
if (this._cloudWorkspacePathMap == null) {
this._cloudWorkspacePathMap = {};
}
if (this._cloudWorkspacePathMap[cloudWorkspaceId] == null) {
this._cloudWorkspacePathMap[cloudWorkspaceId] = { repoPaths: {}, externalLinks: {} };
}
if (this._cloudWorkspacePathMap[cloudWorkspaceId].externalLinks == null) {
this._cloudWorkspacePathMap[cloudWorkspaceId].externalLinks = {};
}
this._cloudWorkspacePathMap[cloudWorkspaceId].externalLinks['.code-workspace'] = codeWorkspaceFilePath;
const localFileUri = getSharedCloudWorkspaceMappingFileUri();
const outputData = new Uint8Array(Buffer.from(JSON.stringify({ workspaces: this._cloudWorkspacePathMap })));
try {
await workspace.fs.writeFile(localFileUri, outputData);
} catch (error) {
Logger.error(error, 'writeCloudWorkspaceCodeWorkspaceFilePathToMap');
}
await releaseSharedFolderWriteLock();
}
// TODO@ramint: May want a file watcher on this file down the line
async getLocalWorkspaceData(): Promise<LocalWorkspaceFileData> {
// Read from file at path defined in the constant localWorkspaceDataFilePath
// If file does not exist, create it and return an empty object
let localFileUri;
let data;
try {
localFileUri = getSharedLocalWorkspaceMappingFileUri();
data = await workspace.fs.readFile(localFileUri);
if (data?.length) return JSON.parse(data.toString()) as LocalWorkspaceFileData;
} catch (ex) {
// Fall back to using legacy location for file
try {
localFileUri = getSharedLegacyLocalWorkspaceMappingFileUri();
data = await workspace.fs.readFile(localFileUri);
if (data?.length) return JSON.parse(data.toString()) as LocalWorkspaceFileData;
} catch (ex) {
Logger.error(ex, 'getLocalWorkspaceData');
}
}
return { workspaces: {} };
}
async writeCodeWorkspaceFile(
uri: Uri,
workspaceRepoFilePaths: string[],
options?: { workspaceId?: string; workspaceAutoAddSetting?: WorkspaceAutoAddSetting },
): Promise<boolean> {
let codeWorkspaceFileContents: CodeWorkspaceFileContents;
let data;
try {
data = await workspace.fs.readFile(uri);
codeWorkspaceFileContents = JSON.parse(data.toString()) as CodeWorkspaceFileContents;
} catch (error) {
codeWorkspaceFileContents = { folders: [], settings: {} };
}
codeWorkspaceFileContents.folders = workspaceRepoFilePaths.map(repoFilePath => ({ path: repoFilePath }));
if (options?.workspaceId != null) {
codeWorkspaceFileContents.settings['gitkraken.workspaceId'] = options.workspaceId;
}
if (options?.workspaceAutoAddSetting != null) {
codeWorkspaceFileContents.settings['gitkraken.workspaceAutoAddSetting'] = options.workspaceAutoAddSetting;
}
const outputData = new Uint8Array(Buffer.from(JSON.stringify(codeWorkspaceFileContents)));
try {
await workspace.fs.writeFile(uri, outputData);
if (options?.workspaceId != null) {
await this.writeCloudWorkspaceCodeWorkspaceFilePathToMap(options.workspaceId, uri.fsPath);
}
} catch (error) {
Logger.error(error, 'writeCodeWorkspaceFile');
return false;
}
return true;
}
async updateCodeWorkspaceFileSettings(
uri: Uri,
options: { workspaceAutoAddSetting?: WorkspaceAutoAddSetting },
): Promise<boolean> {
let codeWorkspaceFileContents: CodeWorkspaceFileContents;
let data;
try {
data = await workspace.fs.readFile(uri);
codeWorkspaceFileContents = JSON.parse(data.toString()) as CodeWorkspaceFileContents;
} catch (error) {
return false;
}
if (options.workspaceAutoAddSetting != null) {
codeWorkspaceFileContents.settings['gitkraken.workspaceAutoAddSetting'] = options.workspaceAutoAddSetting;
}
const outputData = new Uint8Array(Buffer.from(JSON.stringify(codeWorkspaceFileContents)));
try {
await workspace.fs.writeFile(uri, outputData);
} catch (error) {
Logger.error(error, 'updateCodeWorkspaceFileSettings');
return false;
}
return true;
}
}
``` | /content/code_sandbox/src/env/node/pathMapping/workspacesLocalPathMappingProvider.ts | xml | 2016-08-08T14:50:30 | 2024-08-15T21:25:09 | vscode-gitlens | gitkraken/vscode-gitlens | 8,889 | 2,017 |
```xml
//main entry point
import { platformBrowserDynamic } from "@angular/platform-browser-dynamic";
import { AppModule } from "./app-module";
platformBrowserDynamic().bootstrapModule(AppModule);
``` | /content/code_sandbox/demo/frameworks/angular2_TypeScript/main.ts | xml | 2016-05-27T17:05:58 | 2024-08-13T09:22:20 | zoid | krakenjs/zoid | 2,003 | 38 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<resources xmlns:android="path_to_url"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="bsp_done_label" msgid="7007948707597430919">"Fertig"</string>
<string name="bsp_hour_picker_description" msgid="7586639618712934060">"Kreisfrmiger Schieberegler fr Stunden"</string>
<string name="bsp_minute_picker_description" msgid="6024811202872705251">"Kreisfrmiger Schieberegler fr Minuten"</string>
<string name="bsp_select_hours" msgid="7651068754188418859">"Stunden auswhlen"</string>
<string name="bsp_select_minutes" msgid="8327182090226828481">"Minuten auswhlen"</string>
<string name="bsp_day_picker_description" msgid="3968620852217927702">"Monatsraster mit einzelnen Tagen"</string>
<string name="bsp_year_picker_description" msgid="6963340404644587098">"Jahresliste"</string>
<string name="bsp_select_day" msgid="3973338219107019769">"Monat und Tag auswhlen"</string>
<string name="bsp_select_year" msgid="2603330600102539372">"Jahr auswhlen"</string>
<string name="bsp_item_is_selected" msgid="2674929164900463786">"<xliff:g id="ITEM">%1$s</xliff:g> ausgewhlt"</string>
<string name="bsp_deleted_key" msgid="6908431551612331381">"<xliff:g id="KEY">%1$s</xliff:g> gelscht"</string>
</resources>
``` | /content/code_sandbox/bottomsheetpickers/src/main/res/values-de/strings.xml | xml | 2016-10-06T01:20:05 | 2024-08-05T10:12:07 | BottomSheetPickers | philliphsu/BottomSheetPickers | 1,101 | 442 |
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Volo.Blogging.Application\Volo.Blogging.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.Blogging.Admin.Application\Volo.Blogging.Admin.Application.csproj" />
<ProjectReference Include="..\..\src\Volo.Blogging.Web\Volo.Blogging.Web.csproj" />
<ProjectReference Include="..\Volo.Blogging.Domain.Tests\Volo.Blogging.Domain.Tests.csproj" />
</ItemGroup>
</Project>
``` | /content/code_sandbox/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj | xml | 2016-12-03T22:56:24 | 2024-08-16T16:24:05 | abp | abpframework/abp | 12,657 | 166 |
```xml
import { getGlobalClassNames, AnimationVariables } from '../../Styling';
import type { IGroupedListStyleProps, IGroupedListStyles } from './GroupedList.types';
const GlobalClassNames = {
root: 'ms-GroupedList',
compact: 'ms-GroupedList--Compact',
group: 'ms-GroupedList-group',
link: 'ms-Link',
listCell: 'ms-List-cell',
};
const beziers = {
easeInOutSine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)',
};
export const getStyles = (props: IGroupedListStyleProps): IGroupedListStyles => {
const { theme, className, compact } = props;
const { palette } = theme;
const classNames = getGlobalClassNames(GlobalClassNames, theme!);
return {
root: [
classNames.root,
theme.fonts.small,
{
position: 'relative',
selectors: {
[`.${classNames.listCell}`]: {
minHeight: 38, // be consistent with DetailsList styles
},
},
},
compact && [
classNames.compact,
{
selectors: {
[`.${classNames.listCell}`]: {
minHeight: 32, // be consistent with DetailsList styles
},
},
},
],
className,
],
group: [
classNames.group,
{
transition: `background-color ${AnimationVariables.durationValue2} ${beziers.easeInOutSine}`,
},
],
groupIsDropping: {
backgroundColor: palette.neutralLight,
},
};
};
``` | /content/code_sandbox/packages/react/src/components/GroupedList/GroupedList.styles.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 350 |
```xml
import {Component, TemplateRef, ViewChild} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {HarnessLoader} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {
MatBottomSheet,
MatBottomSheetConfig,
MatBottomSheetModule,
} from '@angular/material/bottom-sheet';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {MatBottomSheetHarness} from './bottom-sheet-harness';
describe('MatBottomSheetHarness', () => {
let fixture: ComponentFixture<BottomSheetHarnessTest>;
let loader: HarnessLoader;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [MatBottomSheetModule, NoopAnimationsModule, BottomSheetHarnessTest],
});
fixture = TestBed.createComponent(BottomSheetHarnessTest);
fixture.detectChanges();
loader = TestbedHarnessEnvironment.documentRootLoader(fixture);
});
it('should load harness for a bottom sheet', async () => {
fixture.componentInstance.open();
const bottomSheets = await loader.getAllHarnesses(MatBottomSheetHarness);
expect(bottomSheets.length).toBe(1);
});
it('should be able to get aria-label of the bottom sheet', async () => {
fixture.componentInstance.open({ariaLabel: 'Confirm purchase.'});
const bottomSheet = await loader.getHarness(MatBottomSheetHarness);
expect(await bottomSheet.getAriaLabel()).toBe('Confirm purchase.');
});
it('should be able to dismiss the bottom sheet', async () => {
fixture.componentInstance.open();
let bottomSheets = await loader.getAllHarnesses(MatBottomSheetHarness);
expect(bottomSheets.length).toBe(1);
await bottomSheets[0].dismiss();
bottomSheets = await loader.getAllHarnesses(MatBottomSheetHarness);
expect(bottomSheets.length).toBe(0);
});
});
@Component({
template: `
<ng-template>
Hello from the bottom sheet!
</ng-template>
`,
standalone: true,
imports: [MatBottomSheetModule],
})
class BottomSheetHarnessTest {
@ViewChild(TemplateRef) template: TemplateRef<any>;
constructor(readonly bottomSheet: MatBottomSheet) {}
open(config?: MatBottomSheetConfig) {
return this.bottomSheet.open(this.template, config);
}
}
``` | /content/code_sandbox/src/material/bottom-sheet/testing/bottom-sheet-harness.spec.ts | xml | 2016-01-04T18:50:02 | 2024-08-16T11:21:13 | components | angular/components | 24,263 | 491 |
```xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<epp xmlns="urn:ietf:params:xml:ns:epp-1.0">
<command>
<update>
<domain:update
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
<domain:name>example.tld</domain:name>
<domain:rem>
<domain:ns>
<domain:hostObj>ns4.zdns.google</domain:hostObj>
</domain:ns>
<domain:contact type="admin">crr-admin1</domain:contact>
<domain:contact type="tech">crr-tech1</domain:contact>
<domain:status s="serverHold"/>
</domain:rem>
</domain:update>
</update>
<extension>
<secDNS:update xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1">
<secDNS:rem>
<secDNS:dsData>
<secDNS:keyTag>7</secDNS:keyTag>
<secDNS:alg>8</secDNS:alg>
<secDNS:digestType>1</secDNS:digestType>
<secDNS:digest>A94A8FE5CCB19BA61C4C0873D391E987982FBBD3</secDNS:digest>
</secDNS:dsData>
<secDNS:dsData>
<secDNS:keyTag>6</secDNS:keyTag>
<secDNS:alg>5</secDNS:alg>
<secDNS:digestType>4</secDNS:digestType>
<secDNS:digest>your_sha256_hashB7EF1CCB126255D196047DFEDF17A0A9</secDNS:digest>
</secDNS:dsData>
</secDNS:rem>
</secDNS:update>
</extension>
<clTRID>RegistryTool</clTRID>
</command>
</epp>
``` | /content/code_sandbox/core/src/test/resources/google/registry/tools/server/domain_update_remove.xml | xml | 2016-02-29T20:16:48 | 2024-08-15T19:49:29 | nomulus | google/nomulus | 1,685 | 446 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.