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
<!--
~ Nextcloud - Android Client
~
-->
<vector xmlns:android="path_to_url"
android:height="24dp"
android:width="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path android:fillColor="#757575" android:pathData="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" />
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable/ic_plus.xml | xml | 2016-06-06T21:23:36 | 2024-08-16T18:22:36 | android | nextcloud/android | 4,122 | 104 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="path_to_url">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="MemInfo.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="MemInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
``` | /content/code_sandbox/MemInfo/MemInfo.vcxproj.filters | xml | 2016-11-15T08:01:35 | 2024-08-14T08:55:28 | WindowsInternals | zodiacon/WindowsInternals | 2,319 | 433 |
```xml
import React, { FunctionComponent } from "react";
const ArrowsDownIcon: FunctionComponent = () => {
// path_to_url
return (
<svg xmlns="path_to_url" viewBox="0 0 24 24">
<path
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
d="M23.25 7.311L12.53 18.03C12.4604 18.0997 12.3778 18.1549 12.2869 18.1926C12.1959 18.2304 12.0984 18.2498 12 18.2498C11.9016 18.2498 11.8041 18.2304 11.7131 18.1926C11.6222 18.1549 11.5396 18.0997 11.47 18.03L0.75 7.311"
></path>
</svg>
);
};
export default ArrowsDownIcon;
``` | /content/code_sandbox/client/src/core/client/ui/components/icons/ArrowsDownIcon.tsx | xml | 2016-10-31T16:14:05 | 2024-08-06T16:15:57 | talk | coralproject/talk | 1,881 | 234 |
```xml
export default function Layout(props) {
return (
<>
<div>{props.children}</div>
<div>{props.modal}</div>
</>
)
}
``` | /content/code_sandbox/test/e2e/app-dir/interception-route-prefetch-cache/app/baz/layout.tsx | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 36 |
```xml
import { useTransition } from '@react-spring/web'
import { useMotionConfig } from '@nivo/core'
import { BarDatum, CommonProps, MouseEventHandlers } from './types'
import { Bar } from './Bar'
interface BarsProps<RawDatum> extends MouseEventHandlers<RawDatum, SVGRectElement> {
isInteractive: boolean
bars: readonly BarDatum<RawDatum>[]
tooltip: CommonProps<RawDatum>['tooltip']
}
export const Bars = <RawDatum,>({
bars,
isInteractive,
tooltip,
onClick,
onMouseEnter,
onMouseMove,
onMouseLeave,
}: BarsProps<RawDatum>) => {
const { animate, config: springConfig } = useMotionConfig()
const transition = useTransition<
BarDatum<RawDatum>,
{
x: number
y: number
width: number
height: number
color: string
opacity: number
borderColor: string
}
>(bars, {
keys: bar => bar.key,
initial: bar => ({
x: bar.x,
y: bar.y,
width: bar.width,
height: bar.height,
color: bar.color,
opacity: 1,
borderColor: bar.borderColor,
}),
from: bar => ({
x: bar.x,
y: bar.y,
width: bar.width,
height: bar.height,
color: bar.color,
opacity: 0,
borderColor: bar.borderColor,
}),
enter: bar => ({
x: bar.x,
y: bar.y,
width: bar.width,
height: bar.height,
color: bar.color,
opacity: 1,
borderColor: bar.borderColor,
}),
update: bar => ({
x: bar.x,
y: bar.y,
width: bar.width,
height: bar.height,
color: bar.color,
opacity: 1,
borderColor: bar.borderColor,
}),
leave: bar => ({
opacity: 0,
x: bar.x,
y: bar.y,
width: bar.width,
height: bar.height,
color: bar.color,
}),
config: springConfig,
immediate: !animate,
})
return (
<>
{transition((style, bar) => (
<Bar<RawDatum>
key={bar.key}
bar={bar}
animatedProps={style}
isInteractive={isInteractive}
tooltip={tooltip}
onClick={onClick}
onMouseEnter={onMouseEnter}
onMouseMove={onMouseMove}
onMouseLeave={onMouseLeave}
/>
))}
</>
)
}
``` | /content/code_sandbox/packages/marimekko/src/Bars.tsx | xml | 2016-04-16T03:27:56 | 2024-08-16T03:38:37 | nivo | plouc/nivo | 13,010 | 567 |
```xml
import { describe, expect, it } from 'vitest';
import box from '../../../../src/util/output/box';
import chalk from 'chalk';
import stripAnsi from 'strip-ansi';
describe('box()', () => {
it('should show single line box with default padding', () => {
const result = box('Hello world!');
expect(stripAnsi(result)).toEqual(
`
Hello world!
`.trim()
);
});
it('should show single line box without padding', () => {
const result = box('Hello world!', { padding: 0 });
expect(stripAnsi(result)).toEqual(
`
Hello world!
`.trim()
);
});
it('should show single line box with padding 2', () => {
const result = box('Hello world!', { padding: 2 });
expect(stripAnsi(result)).toEqual(
`
Hello world!
`.trim()
);
});
it('should show multiple lines with default padding', () => {
const result = box(
'Hello world!\nThis is a really, really long line of text\n\nWow!'
);
expect(stripAnsi(result)).toEqual(
`
Hello world!
This is a really, really long line of text
Wow!
`.trim()
);
});
it('should ignore ansi color escape sequences', () => {
const result = box(chalk.red('This text is red'));
expect(stripAnsi(result)).toEqual(
`
This text is red
`.trim()
);
});
it('should left align contents', () => {
const result = box(
'This is left aligned\nThis is a really, really long line of text',
{ textAlignment: 'left' }
);
expect(stripAnsi(result)).toEqual(
`
This is left aligned
This is a really, really long line of text
`.trim()
);
});
it('should right align contents', () => {
const result = box(
'This is right aligned\nThis is a really, really long line of text',
{ textAlignment: 'right' }
);
expect(stripAnsi(result)).toEqual(
`
This is right aligned
This is a really, really long line of text
`.trim()
);
});
it('should slim if terminal width too small', () => {
const result = box('This is a really, really long line of text', {
terminalColumns: 30,
});
expect(stripAnsi(result)).toEqual(
`
This is a really, really long line of text
`.trim()
);
});
});
``` | /content/code_sandbox/packages/cli/test/unit/util/output/box.test.ts | xml | 2016-09-09T01:12:08 | 2024-08-16T17:39:45 | vercel | vercel/vercel | 12,545 | 603 |
```xml
import * as _app from './app';
import * as _data from './data';
import * as _network from './network';
import * as _request from './request';
import * as _response from './response';
import * as _store from './store';
export type { PluginStore } from './store';
export const app = _app;
export const data = _data;
export const network = _network;
export const request = _request;
export const response = _response;
export const store = _store;
``` | /content/code_sandbox/packages/insomnia/src/plugins/context/index.ts | xml | 2016-04-23T03:54:26 | 2024-08-16T16:50:44 | insomnia | Kong/insomnia | 34,054 | 107 |
```xml
import * as path from 'path';
import { fileURLToPath } from 'url';
import { afterAll, expect, it } from 'vitest';
import fse from 'fs-extra';
import esbuild from 'esbuild';
import { createUnplugin } from 'unplugin';
import preBundleDeps from '../src/service/preBundleDeps';
import { scanImports } from '../src/service/analyze';
import transformImport from '../src/esbuild/transformImport';
import externalPlugin from '../src/esbuild/external';
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const alias = { '@': path.join(__dirname, './fixtures/scan') };
const rootDir = path.join(__dirname, './fixtures/scan');
const cacheDir = path.join(rootDir, '.cache');
const appEntry = path.join(__dirname, './fixtures/scan/import.js');
const outdir = path.join(rootDir, 'build');
it('transform module import', async () => {
const deps = await scanImports([appEntry], { alias, rootDir });
const { metadata } = await preBundleDeps(deps, {
rootDir,
cacheDir,
alias,
taskConfig: { mode: 'production' },
});
const transformImportPlugin = createUnplugin(() => transformImport(metadata!, path.join(outdir, 'server'))).esbuild;
await esbuild.build({
alias,
bundle: true,
entryPoints: [appEntry],
outdir,
plugins: [
externalPlugin({ format: 'esm', externalDependencies: false }),
transformImportPlugin(),
],
});
const buildContent = await fse.readFile(path.join(outdir, 'import.js'), 'utf-8');
expect(buildContent.includes('../../.cache/deps/@ice_runtime_client.mjs')).toBeTruthy();
expect(buildContent.includes('../../.cache/deps/@ice_runtime.mjs')).toBeTruthy();
});
afterAll(async () => {
await fse.remove(cacheDir);
});
``` | /content/code_sandbox/packages/ice/tests/transformImport.test.ts | xml | 2016-11-03T06:59:15 | 2024-08-16T10:11:29 | ice | alibaba/ice | 17,815 | 418 |
```xml
/*your_sha256_hash-----------------------------
*your_sha256_hash----------------------------*/
import {
action,
autorun,
computed,
observable,
reaction,
runInAction,
} from "mobx";
import {
IMonacoSetup,
loadMonaco,
waitForLoadedMonaco,
} from "../../../monaco-loader";
import { IPlaygroundProject, IPreviewState } from "../../../shared";
import { Debouncer } from "../../utils/Debouncer";
import { ObservablePromise } from "../../utils/ObservablePromise";
import { Disposable } from "../../utils/utils";
import { PlaygroundExample } from "./playgroundExamples";
import {
getDefaultSettings,
JsonString,
Settings,
SettingsModel,
toLoaderConfig,
} from "./SettingsModel";
import { BisectModel } from "./BisectModel";
import { LocationModel } from "./LocationModel";
import { createJsonWebEditorClient, vObj, vString } from "@vscode/web-editors";
export class PlaygroundModel {
public readonly dispose = Disposable.fn();
public readonly settings = new SettingsModel();
@observable
public html = "";
@observable
public js = "";
@observable
public css = "";
@observable
public reloadKey = 0;
private readonly webEditorClient = createJsonWebEditorClient(
vObj({
js: vString(),
html: vString(),
css: vString(),
}),
(data) => {
runInAction(() => {
this.html = data.html;
this.js = data.js;
this.css = data.css;
});
}
);
public readonly historyModel = new LocationModel(
this,
this.webEditorClient === undefined
);
public reload(): void {
this.reloadKey++;
}
public get previewShouldBeFullScreen(): boolean {
return this.settings.previewFullScreen;
}
private _wasEverNonFullScreen = false;
public get wasEverNonFullScreen(): boolean {
if (this._wasEverNonFullScreen) {
return true;
}
if (!this.settings.previewFullScreen) {
this._wasEverNonFullScreen = true;
}
return this._wasEverNonFullScreen;
}
@computed.struct
get monacoSetup(): IMonacoSetup {
const sourceOverride = this.historyModel.sourceOverride;
if (sourceOverride) {
return toLoaderConfig({
...getDefaultSettings(),
...sourceOverride.toPartialSettings(),
});
}
return this.settings.monacoSetup;
}
@computed
public get playgroundProject(): IPlaygroundProject {
const project: IPlaygroundProject = {
html: this.html,
js: this.js,
css: this.css,
};
return project;
}
@computed
public get state(): IPreviewState {
return {
...this.playgroundProject,
monacoSetup: this.monacoSetup,
reloadKey: this.reloadKey,
};
}
@observable.ref
private _previewState: IPreviewState | undefined = undefined;
public readonly getPreviewState = (): IPreviewState | undefined => {
return this._previewState;
};
public readonly getCompareWithPreviewState = ():
| IPreviewState
| undefined => {
const previewState = this.getPreviewState();
if (!previewState) {
return undefined;
}
return {
...previewState,
monacoSetup: toLoaderConfig({
...getDefaultSettings(),
...this.historyModel.compareWith!.toPartialSettings(),
}),
};
};
@observable
public settingsDialogModel: SettingsDialogModel | undefined = undefined;
@observable.ref
private _selectedExample: PlaygroundExample | undefined;
@observable.ref
public selectedExampleProject:
| { example: PlaygroundExample; project: IPlaygroundProject }
| undefined;
public get selectedExample(): PlaygroundExample | undefined {
return this._selectedExample;
}
public set selectedExample(value: PlaygroundExample | undefined) {
this._selectedExample = value;
this.selectedExampleProject = undefined;
if (value) {
value.load().then((p) => {
runInAction("update example", () => {
this.selectedExampleProject = {
example: value,
project: p,
};
this.reloadKey++;
this.setState(p);
});
});
}
}
private readonly debouncer = new Debouncer(700);
@observable
public isDirty = false;
constructor() {
let lastState: IPreviewState | undefined = undefined;
this.webEditorClient?.onDidConnect.then(() => {
autorun(() => {
const state = this.playgroundProject;
this.webEditorClient!.updateContent({
js: state.js,
html: state.html,
css: state.css,
});
});
});
this.dispose.track({
dispose: reaction(
() => ({ state: this.state }),
() => {
const state = this.state;
if (!this.settings.autoReload) {
if (
(!lastState ||
JSON.stringify(state.monacoSetup) ===
JSON.stringify(lastState.monacoSetup)) &&
state.reloadKey === (lastState?.reloadKey ?? 0)
) {
this.isDirty = true;
return;
}
}
const updatePreviewState = () => {
this.isDirty = false;
this._previewState = state;
lastState = this._previewState;
};
if (state.reloadKey !== lastState?.reloadKey) {
updatePreviewState();
} else {
this.debouncer.run(updatePreviewState);
}
},
{ name: "update preview", fireImmediately: true }
),
});
const observablePromise = new ObservablePromise(waitForLoadedMonaco());
let disposable: Disposable | undefined = undefined;
waitForLoadedMonaco().then((m) => {
this.dispose.track(
monaco.editor.addEditorAction({
id: "reload",
label: "Reload",
run: (editor, ...args) => {
this.reload();
},
keybindings: [monaco.KeyMod.CtrlCmd | monaco.KeyCode.Enter],
})
);
const options =
monaco.languages.typescript.javascriptDefaults.getCompilerOptions();
monaco.languages.typescript.javascriptDefaults.setDiagnosticsOptions(
{ noSemanticValidation: false }
);
monaco.languages.typescript.javascriptDefaults.setCompilerOptions({
...options,
checkJs: true,
strictNullChecks: false,
});
});
this.dispose.track({
dispose: autorun(
async () => {
const monaco = observablePromise.value;
if (!monaco) {
return;
}
const monacoTypesUrl = this.monacoSetup.monacoTypesUrl;
this.reloadKey; // Allow reload to reload the d.ts file.
let content = "";
if (monacoTypesUrl) {
content = await (await fetch(monacoTypesUrl)).text();
}
if (disposable) {
disposable.dispose();
disposable = undefined;
}
if (content) {
disposable =
monaco.languages.typescript.javascriptDefaults.addExtraLib(
content,
"ts:monaco.d.ts"
);
}
},
{ name: "update types" }
),
});
}
setCodeString(codeStringName: string, value: string) {
function escapeRegexpChars(str: string) {
return str.replace(/[-[\]/{}()*+?.\\^$|]/g, "\\$&");
}
const regexp = new RegExp(
"(\\b" +
escapeRegexpChars(codeStringName) +
":[^\\w`]*`)([^`\\\\\\n]|\\n|\\\\\\\\|\\\\\\`|\\\\\\$)*`"
);
const js = this.js;
const str = value
.replaceAll("\\", "\\\\")
.replaceAll("$", "\\$$$$")
.replaceAll("`", "\\`");
const newJs = js.replace(regexp, "$1" + str + "`");
const autoReload = this.settings.autoReload;
this.settings.autoReload = false;
this.js = newJs;
this.settings.autoReload = autoReload;
}
public showSettingsDialog(): void {
this.settingsDialogModel = new SettingsDialogModel(
this.settings.settings
);
}
public closeSettingsDialog(acceptChanges: boolean): void {
if (!this.settingsDialogModel) {
return;
}
if (acceptChanges) {
this.settings.setSettings(this.settingsDialogModel.settings);
}
this.settingsDialogModel = undefined;
}
@action
public setState(state: IPlaygroundProject) {
this.html = state.html;
this.js = state.js;
this.css = state.css;
}
public readonly bisectModel = new BisectModel(this);
@action
compareWithLatestDev(): void {
this.settings.previewFullScreen = true;
this.historyModel.compareWithLatestDev();
}
}
export class SettingsDialogModel {
@observable settings: Settings;
@computed get monacoSetupJsonString(): JsonString<IMonacoSetup> {
if (this.settings.monacoSource === "custom") {
return this.settings.customConfig;
}
return JSON.stringify(toLoaderConfig(this.settings), undefined, 4);
}
constructor(settings: Settings) {
this.settings = Object.assign({}, settings);
}
}
``` | /content/code_sandbox/website/src/website/pages/playground/PlaygroundModel.ts | xml | 2016-06-07T16:56:31 | 2024-08-16T17:17:05 | monaco-editor | microsoft/monaco-editor | 39,508 | 2,073 |
```xml
import styles from "./view-source.module.css";
type ViewSourceProps = {
pathname: string;
};
const ViewSource = ({ pathname }: ViewSourceProps) => (
<svg
xmlns="path_to_url"
width="80"
height="80"
viewBox="0 0 250 250"
fill="#151513"
className={styles.svg}
>
<a
title="View Source"
href={`path_to_url{pathname}`}
>
<path d="M0 0l115 115h15l12 27 108 108V0z" fill="#fff" />
<path
className={styles.arm}
d="M128 109c-15-9-9-19-9-19 3-7 2-11 2-11-1-7 3-2 3-2 4 5 2 11 2 11-3 10 5 15 9 16"
/>
<path d="M115 115s4 2 5 0l14-14c3-2 6-3 8-3-8-11-15-24 2-41 5-5 10-7 16-7 1-2 3-7 12-11 0 0 5 3 7 16 4 2 8 5 12 9s7 8 9 12c14 3 17 7 17 7-4 8-9 11-11 11 0 6-2 11-7 16-16 16-30 10-41 2 0 3-1 7-5 11l-12 11c-1 1 1 5 1 5z" />
</a>
</svg>
);
export default ViewSource;
``` | /content/code_sandbox/examples/image-legacy-component/components/view-source.tsx | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 411 |
```xml
import type { ComponentProps } from 'react'
export const ShortcutLabelContainer = (props: ComponentProps<'div'>) => (
<div {...props} className="align-center flex justify-center gap-0.5" />
)
``` | /content/code_sandbox/applications/docs-editor/src/app/Plugins/KeyboardShortcuts/ShortcutLabelContainer.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 49 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="path_to_url"
package="github.nisrulz.example.activitylifecycle">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/AppTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
``` | /content/code_sandbox/ActivityLifecycle/app/src/main/AndroidManifest.xml | xml | 2016-02-25T11:06:48 | 2024-08-07T21:41:59 | android-examples | nisrulz/android-examples | 1,747 | 172 |
```xml
<Page
x:Class="$rootnamespace$.$safeitemname$"
xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:local="using:$rootnamespace$"
xmlns:d="path_to_url"
xmlns:mc="path_to_url"
mc:Ignorable="d">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button x:Name="Button" Click="ClickHandler">Click Me</Button>
</StackPanel>
</Page>
``` | /content/code_sandbox/vsix/ItemTemplates/BlankPage/BlankPage.xaml | xml | 2016-09-14T16:28:57 | 2024-08-13T13:14:47 | cppwinrt | microsoft/cppwinrt | 1,628 | 114 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
<file source-language="en" target-language="nb-NO" datatype="plaintext" original="messages.en.xlf">
<body>
<trans-unit id="inmIkP6" resname="yes">
<source>yes</source>
<target>Ja</target>
</trans-unit>
<trans-unit id="k5Apjz_" resname="no">
<source>no</source>
<target>Nei</target>
</trans-unit>
<trans-unit id=".3dyBTq" resname="both">
<source>both</source>
<target>Begge</target>
</trans-unit>
<trans-unit id="KLIuHvt" resname="This is a mandatory field">
<source>This is a mandatory field</source>
<target>Obligatorisk</target>
</trans-unit>
<trans-unit id="_ohHsMM" resname="create">
<source>create</source>
<target>Opprett</target>
</trans-unit>
<trans-unit id="PyZ8KrQ" resname="confirm">
<source>confirm</source>
<target>Bekreft</target>
</trans-unit>
<trans-unit id=".0CFrRV" resname="upload">
<source>upload</source>
<target>Last opp</target>
</trans-unit>
<trans-unit id="JBkykGe" resname="search">
<source>search</source>
<target>Sk</target>
</trans-unit>
<trans-unit id="8W_TZI0" resname="searchTerm">
<source>searchTerm</source>
<target>Skebegrep</target>
</trans-unit>
<trans-unit id="CiA4s9E" resname="set_as_default">
<source>set_as_default</source>
<target state="translated">Lagre innstilingen som skefavoritt</target>
</trans-unit>
<trans-unit id="DUDrvjk" resname="remove_default">
<source>remove_default</source>
<target>Slett skefavoritt</target>
</trans-unit>
<trans-unit id="1o0.9vf" resname="asc">
<source>asc</source>
<target>Stigende</target>
</trans-unit>
<trans-unit id="l4ZOh4." resname="desc">
<source>desc</source>
<target state="translated">Synkende</target>
</trans-unit>
<trans-unit id="VSo_gmO" resname="orderBy">
<source>orderBy</source>
<target>Sorter etter</target>
</trans-unit>
<trans-unit id="hBNESu6" resname="my.profile">
<source>my.profile</source>
<target>Min profil</target>
</trans-unit>
<trans-unit id="J258iS6" resname="update_multiple">
<source>update_multiple</source>
<target>%action% %count% oppfringer?</target>
</trans-unit>
<trans-unit id="OTDmccn" resname="attachments">
<source>attachments</source>
<target>Filer</target>
</trans-unit>
<trans-unit id="O5w1jzb" resname="file">
<source>file</source>
<target>Fil</target>
</trans-unit>
<trans-unit id="XohImNo" resname="password">
<source>password</source>
<target state="translated">Passord</target>
</trans-unit>
<trans-unit id="hLEZkoC" resname="password_repeat">
<source>password_repeat</source>
<target>Gjenta passord</target>
</trans-unit>
<trans-unit id="ACcM9j_" resname="logout">
<source>logout</source>
<target>Logg ut</target>
</trans-unit>
<trans-unit id="_x2He8M" resname="user_profile">
<source>user_profile</source>
<target>Min profil</target>
</trans-unit>
<trans-unit id="T4nAM7X" resname="api_token">
<source>api_token</source>
<target>API-passord</target>
</trans-unit>
<trans-unit id="aq59Sk8" resname="api_token_repeat">
<source>api_token_repeat</source>
<target>Gjenta API-passord</target>
</trans-unit>
<trans-unit id=".372.o7" resname="login_required">
<source>login_required</source>
<target state="translated">Manglende tillatelse. Videresend til innlogging?</target>
</trans-unit>
<trans-unit id="wvvYSw_" resname="menu.admin">
<source>menu.admin</source>
<target>Administrasjon</target>
</trans-unit>
<trans-unit id="6OKwCUB" resname="menu.system">
<source>menu.system</source>
<target>System</target>
</trans-unit>
<trans-unit id="wBTFKFR" resname="menu.logout">
<source>menu.logout</source>
<target state="translated">Logg ut</target>
</trans-unit>
<trans-unit id="eI_tMbq" resname="endtime">
<source>endtime</source>
<target>Slutt</target>
</trans-unit>
<trans-unit id="yqea9Nt" resname="duration">
<source>duration</source>
<target>Varighet</target>
</trans-unit>
<trans-unit id="BPiZbad" resname="user">
<source>user</source>
<target>Bruker</target>
</trans-unit>
<trans-unit id="FveKfWM" resname="username">
<source>username</source>
<target>Bruker</target>
</trans-unit>
<trans-unit id="yQRveje" resname="description">
<source>Description</source>
<target state="translated">Beskrivelse</target>
</trans-unit>
<trans-unit id="gqNTf.D" resname="name">
<source>name</source>
<target>Navn</target>
</trans-unit>
<trans-unit id="xEuy.VF" resname="comment">
<source>comment</source>
<target>Kommentar</target>
</trans-unit>
<trans-unit id="pWFFJwz" resname="id">
<source>id</source>
<target>ID</target>
</trans-unit>
<trans-unit id="1C7xSXk" resname="visible">
<source>visible</source>
<target>Synlig</target>
</trans-unit>
<trans-unit id="CvlqjtY" resname="budget">
<source>budget</source>
<target>Budsjett</target>
</trans-unit>
<trans-unit id="qbD0dHa" resname="timeBudget">
<source>timeBudget</source>
<target>Tidsbudsjett</target>
</trans-unit>
<trans-unit id="BlGGO.X" resname="activity">
<source>activity</source>
<target>Aktivitet</target>
</trans-unit>
<trans-unit id="JEIQ5IQ" resname="project">
<source>project</source>
<target>Prosjekt</target>
</trans-unit>
<trans-unit id="KhBzpuZ" resname="tag">
<source>tag</source>
<target>Etiketter</target>
</trans-unit>
<trans-unit id="l4wviUE" resname="tags">
<source>tags</source>
<target>Etiketter</target>
</trans-unit>
<trans-unit id="QEMUsfS" resname="hours">
<source>hours</source>
<target>Timer</target>
</trans-unit>
<trans-unit id="ovKkXwU" resname="action.edit">
<source>action.edit</source>
<target>Rediger</target>
</trans-unit>
<trans-unit id="YZdZVQP" resname="delete">
<source>action.delete</source>
<target>Slett</target>
</trans-unit>
<trans-unit id="HLtdhYw" resname="action.save">
<source>action.save</source>
<target>Lagre</target>
</trans-unit>
<trans-unit id="tKZKI2Z" resname="action.reset">
<source>action.reset</source>
<target>Tilbakestill</target>
</trans-unit>
<trans-unit id="wCazS.X" resname="action.close">
<source>action.close</source>
<target>Lukk</target>
</trans-unit>
<trans-unit id="muzkQpM" resname="toggle_dropdown">
<source>toggle_dropdown</source>
<target>Vis meny</target>
</trans-unit>
<trans-unit id="Ia0kvPi" resname="my_team_projects">
<source>my_team_projects</source>
<target>Mine prosjekter</target>
</trans-unit>
<trans-unit id="tfkKlua" resname="progress">
<source>progress</source>
<target>Framdrift</target>
</trans-unit>
<trans-unit id="5vB9Q7X" resname="begin">
<source>begin</source>
<target>Fra</target>
</trans-unit>
<trans-unit id="Nh5I0DC" resname="end">
<source>end</source>
<target>Til</target>
</trans-unit>
<trans-unit id="dChNncv" resname="color">
<source>color</source>
<target>Farge</target>
</trans-unit>
<trans-unit id="1_wnK76" resname="profile.title">
<source>profile.title</source>
<target>Brukerprofil</target>
</trans-unit>
<trans-unit id="HWKJZ0T" resname="profile.about_me">
<source>profile.about_me</source>
<target>Om meg</target>
</trans-unit>
<trans-unit id="xEYQXPy" resname="profile.settings">
<source>profile.settings</source>
<target>Profil</target>
</trans-unit>
<trans-unit id="A6TLLQa" resname="profile.password">
<source>profile.password</source>
<target>Passord</target>
</trans-unit>
<trans-unit id="Z34ZpjK" resname="profile.api-token">
<source>profile.api-token</source>
<target>API</target>
</trans-unit>
<trans-unit id="ygtTz8." resname="profile.roles">
<source>profile.roles</source>
<target>Roller</target>
</trans-unit>
<trans-unit id="MQKiG33" resname="profile.preferences">
<source>profile.preferences</source>
<target>Innstillinger</target>
</trans-unit>
<trans-unit id="gRIArHS" resname="lastLogin">
<source>lastLogin</source>
<target>Siste innlogging</target>
</trans-unit>
<trans-unit id="pcfRcZ4" resname="month">
<source>month</source>
<target>Mned</target>
</trans-unit>
<trans-unit id="Irm6dfx" resname="agendaWeek">
<source>agendaWeek</source>
<target>Uke</target>
</trans-unit>
<trans-unit id="Q0Zip02" resname="agendaDay">
<source>agendaDay</source>
<target>Dag</target>
</trans-unit>
<trans-unit id="UVJ5Die" resname="calendar">
<source>calendar</source>
<target>Kalender</target>
</trans-unit>
<trans-unit id="Xyjr.V." resname="project_start">
<source>project_start</source>
<target>Prosjektstart</target>
</trans-unit>
<trans-unit id="TBWoUYf" resname="project_end">
<source>project_end</source>
<target>Prosjektslutt</target>
</trans-unit>
<trans-unit id="EohvnQA" resname="number">
<source>number</source>
<target>Konto</target>
</trans-unit>
<trans-unit id="8WjM3ZF" resname="company">
<source>company</source>
<target>Bedriftsnavn</target>
</trans-unit>
<trans-unit id="fFErSLq" resname="vat">
<source>vat</source>
<target>Skatt</target>
</trans-unit>
<trans-unit id="CT59X9u" resname="contact">
<source>contact</source>
<target state="translated">Kontakt</target>
</trans-unit>
<trans-unit id="2Ayb_RD" resname="address">
<source>address</source>
<target>Adresse</target>
</trans-unit>
<trans-unit id="r.ZOT9U" resname="country">
<source>country</source>
<target>Land</target>
</trans-unit>
<trans-unit id="RVadpX9" resname="phone">
<source>phone</source>
<target>Telefon</target>
</trans-unit>
<trans-unit id="1STBoIE" resname="mobile">
<source>mobile</source>
<target>Mobil</target>
</trans-unit>
<trans-unit id="pcWhXux" resname="homepage">
<source>homepage</source>
<target>Hjemmeside</target>
</trans-unit>
<trans-unit id="OWLt7pw" resname="timezone">
<source>timezone</source>
<target>Tidssone</target>
</trans-unit>
<trans-unit id="Rm5bnNV" resname="currency">
<source>currency</source>
<target>Valuta</target>
</trans-unit>
<trans-unit id="GgpqNso" resname="alias">
<source>alias</source>
<target>Navn</target>
</trans-unit>
<trans-unit id="h7voece" resname="avatar">
<source>avatar</source>
<target>Profilbilde</target>
</trans-unit>
<trans-unit id="Zs9VE7N" resname="roles">
<source>roles</source>
<target>Rolle</target>
</trans-unit>
<trans-unit id="ZlZ20pG" resname="user_permissions.title">
<source>user_permissions.title</source>
<target>Brukertilganger</target>
</trans-unit>
<trans-unit id="G.GEdlk" resname="user_role.title">
<source>user_role.title</source>
<target>Brukerrolle</target>
</trans-unit>
<trans-unit id="XKTzhQz" resname="version">
<source>version</source>
<target>Versjon</target>
</trans-unit>
<trans-unit id="718iPw6" resname="ROLE_ADMIN">
<source>ROLE_ADMIN</source>
<target>Administrator</target>
</trans-unit>
<trans-unit id="yttGLAB" resname="ROLE_TEAMLEAD">
<source>ROLE_TEAMLEAD</source>
<target>Lagleder</target>
</trans-unit>
<trans-unit id="rvO5ZXf" resname="ROLE_USER">
<source>ROLE_USER</source>
<target>Bruker</target>
</trans-unit>
<trans-unit id="BXBFJP8" resname="stats.workingTime" xml:space="preserve">
<source>Working hours</source>
<target>Arbeidstid</target>
</trans-unit>
<trans-unit id="t5eIWp8" resname="stats.userTotal">
<source>stats.userTotal</source>
<target>Brukere</target>
</trans-unit>
<trans-unit id="Bor.76M" resname="stats.activityTotal">
<source>stats.activityTotal</source>
<target>Aktiviteter</target>
</trans-unit>
<trans-unit id="67uSaR3" resname="stats.projectTotal">
<source>stats.projectTotal</source>
<target>Prosjekter</target>
</trans-unit>
<trans-unit id="tnD6aPj" resname="stats.customerTotal">
<source>stats.customerTotal</source>
<target>Kunder</target>
</trans-unit>
<trans-unit id="unC5MXv" resname="stats.percentUsed">
<source>stats.percentUsed</source>
<target>%percent%% brukt</target>
</trans-unit>
<trans-unit id="WXXPG7p" resname="preview">
<source>preview</source>
<target>Forhndsvisning</target>
</trans-unit>
<trans-unit id="X70dwP8" resname="button.print">
<source>button.print</source>
<target>Skriv ut</target>
</trans-unit>
<trans-unit id="W_TXvSi" resname="button.csv">
<source>button.csv</source>
<target>CSV</target>
</trans-unit>
<trans-unit id="vC2IsaP" resname="button.xlsx">
<source>button.xlsx</source>
<target state="translated">Excel</target>
</trans-unit>
<trans-unit id="aAa5uRR" resname="button.pdf">
<source>button.pdf</source>
<target>PDF</target>
</trans-unit>
<trans-unit id="ulYFDIo" resname="button.ods">
<source>button.ods</source>
<target>ODS</target>
</trans-unit>
<trans-unit id="XN4PEpj" resname="template">
<source>template</source>
<target>Mal</target>
</trans-unit>
<trans-unit id="zzjZXJx" resname="amount">
<source>amount</source>
<target>Mengde</target>
</trans-unit>
<trans-unit id="UoOv6mx" resname="menu.homepage">
<source>menu.homepage</source>
<target state="translated">Dashbord</target>
</trans-unit>
<trans-unit id="N7mikjJ" resname="time_tracking" xml:space="preserve">
<source>Time Tracking</source>
<target state="translated">Tidsregistrering</target>
</trans-unit>
<trans-unit id="DYHuW58" resname="confirm.delete">
<source>confirm.delete</source>
<target state="translated">Er du sikker p at du vil slette dette?</target>
</trans-unit>
<trans-unit id="vDd3alC" resname="admin_entity.delete_confirm">
<source>admin_entity.delete_confirm</source>
<target state="translated">Denne dataen vil ogs bli slettet! Alternativt kan du velge en oppfring hvor all data vil bli overfrt til:</target>
</trans-unit>
<trans-unit id="_cY.wHP" resname="resetting.check_email" xml:space="preserve">
<source>An email has been sent with a link to reset your password. Note: You can only request a new password once every %tokenLifetime% hours. If you don't receive the email, please check your spam folder or try again.</source>
<target state="needs-translation">En e-post har blitt sendt. Den inneholder en lenke du m klikke for tilbakestille passordet ditt. Merk: Du kan kun foresprre nytt passord n gang i lpet av %tokenLifetime% timer. Hvis du ikke fr en e-post kan du sjekke sppelposten eller prve igjen.</target>
</trans-unit>
<trans-unit id="I3TZF5S" resname="cancel">
<source>cancel</source>
<target>Avbryt</target>
</trans-unit>
<trans-unit id="COyxNde" resname="delete.not_in_use">
<source>delete.not_in_use</source>
<target>Dette elementet kan slettes trygt.</target>
</trans-unit>
<trans-unit id="mflwMcX" resname="rates.title">
<source>rates.title</source>
<target state="translated">Priser</target>
</trans-unit>
<trans-unit id="0M_Gylq" resname="rates.empty">
<source>rates.empty</source>
<target state="needs-translation">Ingen timevise satser har blitt satt opp enda.</target>
</trans-unit>
<trans-unit id="zFfl7jw" resname="sum.total">
<source>sum.total</source>
<target>Totalt</target>
</trans-unit>
<trans-unit id="XP5zkiN" resname="modal.dirty">
<source>modal.dirty</source>
<target state="translated">Skjemaet har endret seg. Vennligst trykk "Lagre" for lagre endringene eller "Lukk" for avbryte.</target>
</trans-unit>
<trans-unit id=".ndupSK" resname="registration.check_email">
<source>registration.check_email</source>
<target state="translated">En e-post har blitt sendt til %email%. Den inneholder en aktiveringslenke du m klikke p for aktivere kontoen din.</target>
</trans-unit>
<trans-unit id="ypVQO7o" resname="menu.reporting">
<source>menu.reporting</source>
<target>Rapportering</target>
</trans-unit>
<trans-unit id="IeshU90" resname="customers">
<source>customers</source>
<target>Kunder</target>
</trans-unit>
<trans-unit id="JXfA9Ve" resname="projects">
<source>projects</source>
<target>Prosjekter</target>
</trans-unit>
<trans-unit id="YkyVVAY" resname="activities">
<source>activities</source>
<target>Aktiviteter</target>
</trans-unit>
<trans-unit id="fftM9nd" resname="users">
<source>users</source>
<target>Brukere</target>
</trans-unit>
<trans-unit id="_t.2z4V" resname="teams">
<source>teams</source>
<target>Lag</target>
</trans-unit>
<trans-unit id="hOZxcaK" resname="menu.plugin">
<source>menu.plugin</source>
<target>Programtillegg</target>
</trans-unit>
<trans-unit id="IXtkHRw" resname="menu.system_configuration">
<source>menu.system_configuration</source>
<target>Innstillinger</target>
</trans-unit>
<trans-unit id="DodjLNR" resname="date">
<source>date</source>
<target>Dato</target>
</trans-unit>
<trans-unit id="BHk4pZ3" resname="starttime">
<source>starttime</source>
<target>Begynnelse</target>
</trans-unit>
<trans-unit id="E_bHhGR" resname="hourlyRate">
<source>hourlyRate</source>
<target>Timesats</target>
</trans-unit>
<trans-unit id="xUl3nXn" resname="rate">
<source>rate</source>
<target>Sats</target>
</trans-unit>
<trans-unit id="djL6LMC" resname="help.rate">
<source>help.rate</source>
<target state="translated">Timevis pris fakturere</target>
</trans-unit>
<trans-unit id="5ofAsOs" resname="internalRate">
<source>internalRate</source>
<target>Intern sats</target>
</trans-unit>
<trans-unit id="Qc5nsFn" resname="recalculate_rates">
<source>recalculate_rates</source>
<target>Regn ut satser igjen</target>
</trans-unit>
<trans-unit id="pO8wS6Q" resname="language">
<source>language</source>
<target>Sprk</target>
</trans-unit>
<trans-unit id="tsRYY4d" resname="customer">
<source>customer</source>
<target>Kunde</target>
</trans-unit>
<trans-unit id="giREF.l" resname="email">
<source>email</source>
<target>E-post</target>
</trans-unit>
<trans-unit id="yosi0Nu" resname="team">
<source>team</source>
<target>Lag</target>
</trans-unit>
<trans-unit id="evFI7nW" resname="teamlead">
<source>teamlead</source>
<target>Lagleder</target>
</trans-unit>
<trans-unit id="ebTjBb9" resname="my_times">
<source>my_times</source>
<target state="translated">Min timeseddel</target>
</trans-unit>
<trans-unit id="yxQop43" resname="all_times">
<source>all_times</source>
<target state="translated">Timesedler</target>
</trans-unit>
<trans-unit id="Cxv_0wG" resname="help.internalRate">
<source>help.internalRate</source>
<target>Interne kostnader (hvis dette ikke er angitt bruker normal sats)</target>
</trans-unit>
<trans-unit id="LIOnolg" resname="placeholder.type_message">
<source>placeholder.type_message</source>
<target>Skriv meldingen din </target>
</trans-unit>
<trans-unit id="aVwNQcX" resname="billable">
<source>billable</source>
<target>Fakturerbar</target>
</trans-unit>
<trans-unit id="Kw3N1AA" resname="actions">
<source>actions</source>
<target>Handlinger</target>
</trans-unit>
<trans-unit id="L05Qw2x" resname="my_teams">
<source>my_teams</source>
<target>Mine lag</target>
</trans-unit>
<trans-unit id="dwEVXUR" resname="timesheet.edit">
<source>timesheet.edit</source>
<target>Rediger oppfring</target>
</trans-unit>
<trans-unit id="iNOVZRh" resname="daterange">
<source>daterange</source>
<target>Tidsomrde</target>
</trans-unit>
<trans-unit id="UbnqJLn" resname="modal.columns.title">
<source>modal.columns.title</source>
<target state="translated">Tilpass visning</target>
</trans-unit>
<trans-unit id="_0tuMNE" resname="fixedRate">
<source>fixedRate</source>
<target>Fast sats</target>
</trans-unit>
<trans-unit id="j4Kd9N1" resname="calendar_initial_view">
<source>calendar_initial_view</source>
<target>Startvisning for kalender</target>
</trans-unit>
<trans-unit id="H.IqJTQ" resname="login_initial_view">
<source>login_initial_view</source>
<target>Startvisning etter innlogging</target>
</trans-unit>
<trans-unit id="r49TNAg" resname="daily_stats">
<source>daily_stats</source>
<target>Vis daglig statistikk i tidstabell</target>
</trans-unit>
<trans-unit id="3bqLM8Q" resname="dashboard.title">
<source>dashboard.title</source>
<target>Oversikt</target>
</trans-unit>
<trans-unit id="VXj0Y3h" resname="timesheet.title">
<source>timesheet.title</source>
<target>Min timeseddel</target>
</trans-unit>
<trans-unit id="b43sCwO" resname="help.fixedRate">
<source>help.fixedRate</source>
<target state="translated">Hver tidsoppfring fr samme verdi, uavhengig av varighet</target>
</trans-unit>
<trans-unit id="Fm.kwVn" resname="profile.first_entry">
<source>profile.first_entry</source>
<target>Arbeidet siden</target>
</trans-unit>
<trans-unit id="1c0EQaz" resname="profile.registration_date">
<source>profile.registration_date</source>
<target>Registrert</target>
</trans-unit>
<trans-unit id="SvTiF8B" resname="fax">
<source>fax</source>
<target>Faks.</target>
</trans-unit>
<trans-unit id="qvIyBkY" resname="title">
<source>title</source>
<target>Tittel</target>
</trans-unit>
<trans-unit id="loeWEWU" resname="active">
<source>active</source>
<target>Aktiv</target>
</trans-unit>
<trans-unit id="E7G60OF" resname="Allowed character: A-Z and _">
<source>Allowed character: A-Z and _ (min. 5 uppercase characters)</source>
<target state="needs-translation">Tillatte tegn: A-Z og _ (min. 5 store bokstaver)</target>
</trans-unit>
<trans-unit id="WRuKTcz" resname="ROLE_SUPER_ADMIN">
<source>ROLE_SUPER_ADMIN</source>
<target>Systemadministrator</target>
</trans-unit>
<trans-unit id="lfSTZGe" resname="stats.workingTimeToday">
<source>stats.workingTimeToday</source>
<target>I dag, %day%</target>
</trans-unit>
<trans-unit id="XdYs3I8" resname="stats.workingTimeWeek">
<source>stats.workingTimeWeek</source>
<target>Kalenderuke %week%</target>
</trans-unit>
<trans-unit id="pX_3dNm" resname="stats.revenue">
<source>stats.revenue</source>
<target>Inntekter</target>
</trans-unit>
<trans-unit id="TdBJBAl" resname="stats.durationToday">
<source>stats.durationToday</source>
<target>Arbeidstimer i dag</target>
</trans-unit>
<trans-unit id="XhKalZH" resname="stats.durationWeek">
<source>stats.durationWeek</source>
<target>Arbeidstimer denne uken</target>
</trans-unit>
<trans-unit id="uaOwf_P" resname="stats.durationMonth">
<source>stats.durationMonth</source>
<target>Arbeidstimer denne mneden</target>
</trans-unit>
<trans-unit id="WqF84KR" resname="stats.durationYear">
<source>stats.durationYear</source>
<target>Arbeidstimer dette ret</target>
</trans-unit>
<trans-unit id="dherSTU" resname="export_decimal">
<source>export_decimal</source>
<target>Bruk desimalvarighet i eksport</target>
</trans-unit>
<trans-unit id="EJDS9HY" resname="vat_id">
<source>vat_id</source>
<target>Moms-ID</target>
</trans-unit>
<trans-unit id="JnUFsNi" resname="stats.workingTimeYear">
<source>stats.workingTimeYear</source>
<target>Helr %year%</target>
</trans-unit>
<trans-unit id="HWB4OGJ" resname="stats.workingTimeFinancialYear">
<source>stats.workingTimeFinancialYear</source>
<target>Budsjettr</target>
</trans-unit>
<trans-unit id="7zptTeh" resname="update_browser_title">
<source>update_browser_title</source>
<target>Oppdater nettlesertittel</target>
</trans-unit>
<trans-unit id="qX_CKtU" resname="tax_rate">
<source>tax_rate</source>
<target>Skattesats</target>
</trans-unit>
<trans-unit id="JIKNAYP" resname="stats.workingTimeMonth">
<source>stats.workingTimeMonth</source>
<target>%month% %year%</target>
</trans-unit>
<trans-unit id="YtvPnl1" resname="stats.durationTotal">
<source>stats.durationTotal</source>
<target>Arbeidstimer totalt</target>
</trans-unit>
<trans-unit id="IFOLMgp" resname="stats.yourWorkingHours">
<source>stats.yourWorkingHours</source>
<target>Mine arbeidstimer</target>
</trans-unit>
<trans-unit id="023M9Ta" resname="stats.amountToday">
<source>stats.amountToday</source>
<target>Inntekter i dag</target>
</trans-unit>
<trans-unit id="xnJvYAE" resname="stats.amountWeek">
<source>stats.amountWeek</source>
<target>Inntekter denne uken</target>
</trans-unit>
<trans-unit id="ulr3reE" resname="stats.amountMonth">
<source>stats.amountMonth</source>
<target>Inntekter denne mneden</target>
</trans-unit>
<trans-unit id="bQZyZaO" resname="stats.amountYear">
<source>stats.amountYear</source>
<target>Inntekter dette ret</target>
</trans-unit>
<trans-unit id="Z0fz23v" resname="stats.amountTotal">
<source>stats.amountTotal</source>
<target>Lnn totalt</target>
</trans-unit>
<trans-unit id="HzICegM" resname="stats.activeUsersToday">
<source>stats.activeUsersToday</source>
<target>Aktive brukere i dag</target>
</trans-unit>
<trans-unit id="7oP64Kh" resname="stats.activeUsersWeek">
<source>stats.activeUsersWeek</source>
<target>Aktive brukere denne uken</target>
</trans-unit>
<trans-unit id="40xQ.Qt" resname="stats.activeUsersMonth">
<source>stats.activeUsersMonth</source>
<target>Aktive brukere denne mneden</target>
</trans-unit>
<trans-unit id="lGuZo7g" resname="stats.activeUsersYear">
<source>stats.activeUsersYear</source>
<target>Aktive brukere dette ret</target>
</trans-unit>
<trans-unit id="8FFVmiv" resname="stats.activeUsersTotal">
<source>stats.activeUsersTotal</source>
<target>Aktive brukere noensinne</target>
</trans-unit>
<trans-unit id="lEW82ex" resname="stats.activeRecordings">
<source>stats.activeRecordings</source>
<target>Aktive oppfringer</target>
</trans-unit>
<trans-unit id="xN7MfSA" resname="stats.percentUsed_month">
<source>stats.percentUsed_month</source>
<target>%percent%% brukt denne mneden</target>
</trans-unit>
<trans-unit id="Oq.KtC6" resname="admin_invoice_template.title">
<source>admin_invoice_template.title</source>
<target>Fakturamal</target>
</trans-unit>
<trans-unit id="ohNu8DK" resname="due_days">
<source>due_days</source>
<target>Betalingsfrist i dager</target>
</trans-unit>
<trans-unit id="rAJrxSK" resname="invoice.due_days">
<source>invoice.due_days</source>
<target>Forfallsdato</target>
</trans-unit>
<trans-unit id="Xij3oQl" resname="invoice.payment_date">
<source>invoice.payment_date</source>
<target>Betalingsdag</target>
</trans-unit>
<trans-unit id="4XKFnWh" resname="invoice.from">
<source>invoice.from</source>
<target>Fra</target>
</trans-unit>
<trans-unit id="hx7vsMA" resname="invoice.to">
<source>invoice.to</source>
<target>Til</target>
</trans-unit>
<trans-unit id="x_W5sV4" resname="invoice.number">
<source>invoice.number</source>
<target>Fakturanummer</target>
</trans-unit>
<trans-unit id="N68vyvo" resname="invoice.total">
<source>invoice.total</source>
<target>Totalt</target>
</trans-unit>
<trans-unit id="BAkWQqr" resname="total_rate">
<source>total_rate</source>
<target>Total pris</target>
</trans-unit>
<trans-unit id="xkugSAA" resname="stats.durationFinancialYear">
<source>stats.durationFinancialYear</source>
<target>Arbeidstimer dette budsjettret</target>
</trans-unit>
<trans-unit id="wuUWovn" resname="stats.amountFinancialYear">
<source>stats.amountFinancialYear</source>
<target>Inntekter dette budsjettret</target>
</trans-unit>
<trans-unit id="_Pym9RO" resname="stats.activeUsersFinancialYear">
<source>stats.activeUsersFinancialYear</source>
<target>Aktive brukere dette budsjettret</target>
</trans-unit>
<trans-unit id="HkjvwLc" resname="stats.percentUsedLeft">
<source>stats.percentUsedLeft</source>
<target>%percent%% brukt (%left% tilgjengelig)</target>
</trans-unit>
<trans-unit id="vWJPpYU" resname="stats.percentUsedLeft_month">
<source>stats.percentUsedLeft_month</source>
<target>%percent%% brukt (%left% tilgjengelig denne mneden)</target>
</trans-unit>
<trans-unit id="ov4OQOh" resname="invoice.filter">
<source>invoice.filter</source>
<target>Filtrer fakturadata</target>
</trans-unit>
<trans-unit id="86KyrKO" resname="invoice.subtotal">
<source>invoice.subtotal</source>
<target state="translated">Nettobelp</target>
</trans-unit>
<trans-unit id="EO57yXg" resname="invoice.tax">
<source>invoice.tax</source>
<target>Skatt</target>
</trans-unit>
<trans-unit id="TPzFWUs" resname="invoice.service_date">
<source>invoice.service_date</source>
<target>Ytelsesdato</target>
</trans-unit>
<trans-unit id="tCNBGKG" resname="orderDate">
<source>orderDate</source>
<target>Ordredato</target>
</trans-unit>
<trans-unit id="cjgNYUB" resname="entryState">
<source>entryState</source>
<target>Oppfringer</target>
</trans-unit>
<trans-unit id="ccCiXyR" resname="entryState.not_exported">
<source>entryState.not_exported</source>
<target>pne</target>
</trans-unit>
<trans-unit id="XvXvA2S" resname="all">
<source>all</source>
<target>Alle</target>
</trans-unit>
<trans-unit id="xm7mqoK" resname="entryState.running">
<source>entryState.running</source>
<target>Aktiv</target>
</trans-unit>
<trans-unit id="spHpd_I" resname="entryState.stopped">
<source>entryState.stopped</source>
<target>Stoppet</target>
</trans-unit>
<trans-unit id="BhsaLxX" resname="export.clear_all">
<source>export.clear_all</source>
<target>Marker alle viste oppfringer som pne?</target>
</trans-unit>
<trans-unit id="qtjPKUT" resname="export.mark_all">
<source>export.mark_all</source>
<target>Marker alle viste oppfringer som tmt?</target>
</trans-unit>
<trans-unit id="8BPmHPa" resname="batch_meta_fields">
<source>batch_meta_fields</source>
<target>Ytterligere felter</target>
</trans-unit>
<trans-unit id="2dm.ZWM" resname="not_exported">
<source>not_exported</source>
<target>Ikke eksportert</target>
</trans-unit>
<trans-unit id="o0yOFHL" resname="not_invoiced">
<source>not_invoiced</source>
<target>Ikke fakturert</target>
</trans-unit>
<trans-unit id="WMJwy8r" resname="invoice_tax_number">
<source>invoice_tax_number</source>
<target>Moms-nr:</target>
</trans-unit>
<trans-unit id="crrlEUA" resname="preview.skipped_rows">
<source>preview.skipped_rows</source>
<target>Hoppet over forhndsvisning av %rows% flere rader </target>
</trans-unit>
<trans-unit id="3CQ7A2m" resname="export.document_title">
<source>export.document_title</source>
<target>Eksport av tidstabeller</target>
</trans-unit>
<trans-unit id="ElDyzrx" resname="export.page_of">
<source>export.page_of</source>
<target>Side %page% av %pages%</target>
</trans-unit>
<trans-unit id="vKY0tof" resname="export.date_copyright">
<source>export.date_copyright</source>
<target>Laget %date% med %kimai%</target>
</trans-unit>
<trans-unit id="WVU_S.A" resname="recent.activities">
<source>recent.activities</source>
<target>Start n av dine siste aktiviteter igjen</target>
</trans-unit>
<trans-unit id="Qn2ouiL" resname="exported">
<source>exported</source>
<target>Eksportert</target>
</trans-unit>
<trans-unit id="_DDecAV" resname="entryState.exported">
<source>entryState.exported</source>
<target>Tmt</target>
</trans-unit>
<trans-unit id="L0hRlcf" resname="includeNoBudget">
<source>includeNoBudget</source>
<target>Vis oppfringer uten budsjett</target>
</trans-unit>
<trans-unit id="9p2KQag" resname="invoice.signature_user">
<source>invoice.signature_user</source>
<target>Bekreftelse: Dato/konsulentnavn/signatur</target>
</trans-unit>
<trans-unit id="Q9ykNhO" resname="invoice.signature_customer">
<source>invoice.signature_customer</source>
<target>Bekreftelse: Dato/kundenavn/signatur</target>
</trans-unit>
<trans-unit id="iwWaUoa" resname="export.filter">
<source>export.filter</source>
<target>Filtrer dato for eksport</target>
</trans-unit>
<trans-unit id="W92QGbY" resname="export.warn_result_amount">
<source>export.warn_result_amount</source>
<target>Ske ditt leder til %count% resultater. Hvis eksporten mislyktes m du begrense sket ditt ytterligere.</target>
</trans-unit>
<trans-unit id="dTHY7Mw" resname="timesheet.start">
<source>timesheet.start</source>
<target state="needs-translation">Opprett ny tidsregistrering</target>
</trans-unit>
<trans-unit id="NNsA8i2" resname="globalsOnly">
<source>globalsOnly</source>
<target>Kun globalt</target>
</trans-unit>
<trans-unit id="9Wt8Pp_" resname="help.batch_meta_fields">
<source>help.batch_meta_fields</source>
<target>Felter som skal oppdateres m frst aktiveres ved klikke p tilknyttet avkryssningsboks.</target>
</trans-unit>
<trans-unit id="L27KvC9" resname="includeNoWork">
<source>includeNoWork</source>
<target>Vis oppfringer uten reservasjoner</target>
</trans-unit>
<trans-unit id="_YiKaOT" resname="last_record">
<source>last_record</source>
<target>Siste oppfring</target>
</trans-unit>
<trans-unit id="wYqyL6A" resname="budgetType_month">
<source>budgetType_month</source>
<target>Mnedlig</target>
</trans-unit>
<trans-unit id="Zif614Q" resname="add_user.label">
<source>add_user.label</source>
<target>Legg til bruker</target>
</trans-unit>
<trans-unit id="4Ndj7Xo" resname="budgetType">
<source>budgetType</source>
<target>Budsjett-type</target>
</trans-unit>
<trans-unit id="tp.gIrE" resname="team.add_user.help">
<source>team.add_user.help</source>
<target>Legg til en ny bruker i laget ved velge fra listen. Etterp kan du bestemme om brukeren skal bli lagleder.</target>
</trans-unit>
<trans-unit id="vpqPF8v" resname="last_record_before">
<source>last_record_before</source>
<target>Ingen tidsreservasjoner siden</target>
</trans-unit>
<trans-unit id="KH2hgil" resname="account_number">
<source>account_number</source>
<target>Stabsnummer</target>
</trans-unit>
<trans-unit id="tvV0NhL" resname="delete_warning.short_stats">
<source>delete_warning.short_stats</source>
<target>For tiden finnes %records% tidsoppfringer, som totalt har en varighet p %duration%.</target>
</trans-unit>
<trans-unit id="033t0aO" resname="payment_terms">
<source>payment_terms</source>
<target>Betalingsvilkr</target>
</trans-unit>
<trans-unit id="vjmoQGo" resname="export.period">
<source>export.period</source>
<target>Periode</target>
</trans-unit>
<trans-unit id="JGaf9IK" resname="Doctor">
<source>Doctor</source>
<target>Doktor</target>
</trans-unit>
<trans-unit id="Vz3Igj3" resname="error.no_entries_found">
<source>error.no_entries_found</source>
<target>Ingen oppfringer funnet basert p valgte filtre.</target>
</trans-unit>
<trans-unit id="hlu4iX5" resname="error.no_comments_found">
<source>error.no_comments_found</source>
<target>Ingen kommentarer enda.</target>
</trans-unit>
<trans-unit id="XQ2.pq2" resname="error.too_many_entries">
<source>error.too_many_entries</source>
<target state="translated">Foresprselen kunne ikke behandles. For mange resultater ble funnet.</target>
</trans-unit>
<trans-unit id="SR2r1Cs" resname="invoices">
<source>invoices</source>
<target>Fakturaer</target>
</trans-unit>
<trans-unit id="zPcx3O_" resname="invoice_print">
<source>invoice_print</source>
<target>Faktura</target>
</trans-unit>
<trans-unit id="dicW36D" resname="mark_as_exported">
<source>mark_as_exported</source>
<target>Marker som eksportert</target>
</trans-unit>
<trans-unit id="IoKfYkz" resname="unit_price">
<source>unit_price</source>
<target>Enhetspris</target>
</trans-unit>
<trans-unit id="c3d6p33" resname="invoice.total_working_time">
<source>invoice.total_working_time</source>
<target>Total varighet</target>
</trans-unit>
<trans-unit id="BzwWNMS" resname="status">
<source>status</source>
<target>Status</target>
</trans-unit>
<trans-unit id="Uvo1CbP" resname="status.pending">
<source>status.pending</source>
<target>Utestende</target>
</trans-unit>
<trans-unit id="1GruCMx" resname="export">
<source>export</source>
<target>Eksporter</target>
</trans-unit>
<trans-unit id="d5wyWRD" resname="export.full_list">
<source>export.full_list</source>
<target>Full liste</target>
</trans-unit>
<trans-unit id="EwPAaws" resname="type">
<source>type</source>
<target>Type</target>
</trans-unit>
<trans-unit id="3tegKgk" resname="orderNumber">
<source>orderNumber</source>
<target>Ordrenummer</target>
</trans-unit>
<trans-unit id="lswYe8s" resname="invoice_bank_account">
<source>invoice_bank_account</source>
<target>Bankkonto</target>
</trans-unit>
<trans-unit id="X_NRsed" resname="status.new">
<source>status.new</source>
<target>Ny</target>
</trans-unit>
<trans-unit id="PHJwR4w" resname="status.paid">
<source>status.paid</source>
<target>Betalt</target>
</trans-unit>
<trans-unit id="N778uJ6" resname="export.summary">
<source>export.summary</source>
<target>Sammendrag</target>
</trans-unit>
<trans-unit id="OxdYMR3" resname="active.entries">
<source>active.entries</source>
<target>Dine aktive tidsmlinger</target>
</trans-unit>
<trans-unit id="igCkqAP" resname="pageSize">
<source>pageSize</source>
<target>Sidestrrelse</target>
</trans-unit>
<trans-unit id="yNWIi5U" resname="default_value_new">
<source>default_value_new</source>
<target>Forvalgte verdier for nye oppfringer</target>
</trans-unit>
<trans-unit id="gT9W2pZ" resname="status.canceled">
<source>status.canceled</source>
<target>Avbrutt</target>
</trans-unit>
<trans-unit id="jdbtx6z" resname="action.add">
<source>action.add</source>
<target>Legg til</target>
</trans-unit>
<trans-unit id="GzWKgBk" resname="error.directory_missing">
<source>The directory %dir% does not exist and could not be created.</source>
<target>Mappen %dir% finnes ikke og kunne ikke opprettes.</target>
</trans-unit>
<trans-unit id="ViUuILv" resname="includeBudgetType_month">
<source>includeBudgetType_month</source>
<target>Vis oppfringer med mnedlig budsjett</target>
</trans-unit>
<trans-unit id="KukrzcT" resname="includeBudgetType_full">
<source>includeBudgetType_full</source>
<target state="translated">Vis oppfringer med "livssyklus"-budsjett</target>
</trans-unit>
<trans-unit id="f8oNzSP" resname="quick_entry.title">
<source>quick_entry.title</source>
<target state="translated">Ukentlige timer</target>
</trans-unit>
<trans-unit id="fVA3M2x" resname="choice_pattern">
<source>Display of entries in selection lists</source>
<target state="translated">Visning av oppfringer i utvalgslister</target>
</trans-unit>
<trans-unit id="HPhRbtc" resname="stats.workingTimeWeekShort">
<source>stats.workingTimeWeekShort</source>
<target>Uke %week%</target>
</trans-unit>
<trans-unit id="C2TGff0" resname="error.directory_protected">
<source>error.directory_protected</source>
<target>Mappen %dir% er skrivebeskyttet.</target>
</trans-unit>
<trans-unit id="IPHM4iP" resname="updated_at">
<source>Updated at</source>
<target>Oppdatert</target>
</trans-unit>
<trans-unit id="nlwMf5w" resname="invoice_document.max_reached">
<source>invoice_document.max_reached</source>
<target state="translated">Ndde maksimalt antall p %max% fakturadokumenter. Du kan legge til flere etter ha fjernet ett.</target>
</trans-unit>
<trans-unit id="dnQEYoJ" resname="budgetType_full">
<source>budgetType_full</source>
<target state="translated">Livssyklus</target>
</trans-unit>
<trans-unit id="HcWuW2g" resname="layout">
<source>layout</source>
<target state="translated">Visning: oppsett</target>
</trans-unit>
<trans-unit id="U_D.NIy" resname="automatic">
<source>automatic</source>
<target>Automatisk</target>
</trans-unit>
<trans-unit id="3Clo55j" resname="about.title">
<source>about.title</source>
<target>Om Kimai</target>
</trans-unit>
<trans-unit id="OJ.wI1U" resname="invoiceText">
<source>invoiceText</source>
<target state="translated">Fakturatekst</target>
</trans-unit>
<trans-unit id="HNFpvnH" resname="globalActivities">
<source>globalActivities</source>
<target state="translated">Tillat globale hendelser</target>
</trans-unit>
<trans-unit id="853W5Iu" resname="security.unlock.button">
<source>security.unlock.button</source>
<target state="translated">Ls opp</target>
</trans-unit>
<trans-unit id="Eq2E_Rd" resname="menu.apps">
<source>Apps</source>
<target state="translated">Programmer</target>
</trans-unit>
<trans-unit id="FxwWVFI" resname="help.globalActivity">
<source>help.globalActivity</source>
<target state="needs-translation">Hvis du ikke velger et prosjekt blir denne aktiviteten global, og kan kombineres med ethvert prosjekt. Hvis du velger et prosjekt vil aktiviteten kun kunne brukes i det. Innstillingen kan ikke endres senere.</target>
</trans-unit>
<trans-unit id="LDS9o5X" resname="stats.userAmountWeek">
<source>stats.userAmountWeek</source>
<target state="translated">Min omsetning denne uken</target>
</trans-unit>
<trans-unit id="1MfS6X5" resname="remove_filter">
<source>remove_filter</source>
<target state="translated">Tilbakestill skefilter</target>
</trans-unit>
<trans-unit id="SdLZTel" resname="favorite_routes">
<source>favorite_routes</source>
<target state="translated">Favoritter</target>
</trans-unit>
<trans-unit id="i7aSJ1i" resname="notifications">
<source>notifications</source>
<target state="translated">Merknader</target>
</trans-unit>
<trans-unit id="DXcvOMM" resname="stats.userDurationWeek">
<source>stats.userDurationWeek</source>
<target state="translated">Mine arbeidstimer denne uken</target>
</trans-unit>
<trans-unit id="0WpgaGa" resname="stats.userDurationMonth">
<source>stats.userDurationMonth</source>
<target state="translated">Mine arbeidstimer denne mneden</target>
</trans-unit>
<trans-unit id="QT8.BCN" resname="api_password.missing_title">
<source>api_password.missing_title</source>
<target state="translated">API kan ikke brukes</target>
</trans-unit>
<trans-unit id="ojfv7Jl" resname="invoice_form.title">
<source>invoice_form.title</source>
<target state="translated">Opprett faktura</target>
</trans-unit>
<trans-unit id="BjyLITj" resname="stats.userDurationYear">
<source>stats.userDurationYear</source>
<target state="translated">Mine arbeidstimer dette ret</target>
</trans-unit>
<trans-unit id="EedlgkM" resname="stats.userDurationTotal">
<source>stats.userDurationTotal</source>
<target state="translated">Mine arbeidstimer totalt</target>
</trans-unit>
<trans-unit id="GxuKjNb" resname="help.invoiceTemplate_customer">
<source>help.invoiceTemplate_customer</source>
<target state="translated">Fakturaer for denne klienten genereres som forvalg med denne malen. Den kan endres under fakturagenerering hvis det nskes.</target>
</trans-unit>
<trans-unit id="Fkrev.q" resname="help.globalActivities">
<source>help.globalActivities</source>
<target state="needs-translation">Tillater kun registrering av tider med prosjektspesifikke aktiviteter hvis avskrudd.</target>
</trans-unit>
<trans-unit id="fQ3Prt4" resname="security.unlock.title">
<source>security.unlock.title</source>
<target state="translated">Ls opp konto</target>
</trans-unit>
<trans-unit id="nqEYrfk" resname="security.unlock.intro">
<source>security.unlock.intro</source>
<target state="translated">Skriv inn passordet ditt for full tilgang</target>
</trans-unit>
<trans-unit id="3rJ5QDP" resname="help.teams">
<source>help.teams</source>
<target state="translated">Innskrenker synlighet til valgte lag.</target>
</trans-unit>
<trans-unit id="aOJITgv" resname="help.invoiceText">
<source>help.invoiceText</source>
<target state="translated">Denne teksten brukes i fakturadokumenter og kan brukes til f.eks. angi videre leveringsbetingelser.</target>
</trans-unit>
<trans-unit id="IDDfzoR" resname="invoiceLabel">
<source>invoiceLabel</source>
<target state="translated">Fakturatekst</target>
</trans-unit>
<trans-unit id="jLzX0Ae" resname="help.invoiceLabel">
<source>help.invoiceLabel</source>
<target state="translated">Denne teksten erstatter navnet p objektet, noe som tillat mer detaljerte etiketter for fakturaelementer.</target>
</trans-unit>
<trans-unit id="KgBw0BS" resname="skin">
<source>skin</source>
<target state="translated">Design</target>
</trans-unit>
<trans-unit id="AeMGtJO" resname="help.visible">
<source>help.visible</source>
<target state="needs-translation">Slutter vise objektet i rullegardinsbokser og listevisinger hvis avskrudd.</target>
</trans-unit>
<trans-unit id="WOAx9yz" resname="modal.columns.profile">
<source>modal.columns.profile</source>
<target state="translated">Profil</target>
</trans-unit>
<trans-unit id="aGk9Aqt" resname="desktop">
<source>desktop</source>
<target state="translated">Skrivebord</target>
</trans-unit>
<trans-unit id="FeFBn_3" resname="profile.2fa">
<source>profile.2fa</source>
<target state="translated">To-faktor (2FA)</target>
</trans-unit>
<trans-unit id="oq1jcSQ" resname="help.billable">
<source>help.billable</source>
<target state="needs-translation">Markerer alle tidsoppfringer registrert i fremtiden som ikke fakturerbar hvis avskrudd.</target>
</trans-unit>
<trans-unit id="wv3n.FT" resname="dashboard.edit_mode">
<source>dashboard.edit_mode</source>
<target state="translated">Endre miniprogramsrekkeflge med dra og slipp. Tillegg av miniprogrammer lagrer ventende endringer.</target>
</trans-unit>
<trans-unit id="LDsHBXd" resname="modal.columns.label">
<source>modal.columns.label</source>
<target state="translated">Tabellkolonner</target>
</trans-unit>
<trans-unit id="hPY2VcD" resname="profile.2fa_intro">
<source>profile.2fa_intro</source>
<target state="translated">Du kan aktivere en ny enhet ved skanne bildet i programmet ditt.</target>
</trans-unit>
<trans-unit id="Y0PRG9Z" resname="profile.2fa_confirmation">
<source>profile.2fa_confirmation</source>
<target state="translated">Bekreft koden, som aktiverer to-faktor-identitetsbekreftelse for denne kontoen.</target>
</trans-unit>
<trans-unit id="FgKTw5v" resname="login.2fa_label">
<source>login.2fa_label</source>
<target state="translated">Bekreftelseskode</target>
</trans-unit>
<trans-unit id="PLLl1E0" resname="system_account">
<source>system_account</source>
<target state="translated">Systemkonto</target>
</trans-unit>
<trans-unit id="On18MKP" resname="plugin.installed">
<source>plugin.installed</source>
<target state="translated">Installerte programtillegg</target>
</trans-unit>
<trans-unit id="IRzPWmL" resname="login.2fa_intro">
<source>login.2fa_intro</source>
<target state="translated">Skriv inn bekreftelseskode for fullfre innloggingsprosessen.</target>
</trans-unit>
<trans-unit id="0ZWvn12" resname="notifications.welcome" xml:space="preserve">
<source>notifications.welcome</source>
<target state="translated">Takk for at du samtykker til merknader!</target>
</trans-unit>
<trans-unit id="EI5gPkp" resname="stats.userDurationToday">
<source>stats.userDurationToday</source>
<target state="translated">Mine arbeidstimer i dag</target>
</trans-unit>
<trans-unit id="BrOQ92O" resname="notifications.denied">
<source>You have rejected notifications. Please refer to your web-browser documentation to find out how to turn them on.</source>
<target state="translated">Du har avsltt merknader. Henvend deg til nettleserdokumetasjoen for finne ut hvordan du skrur dem p.</target>
</trans-unit>
<trans-unit id="52lzpZE" resname="active.help">
<source>active.help</source>
<target state="translated">Deaktiverte brukere kan ikke logge inn og skjules i rapporter og utvalgsbokser.</target>
</trans-unit>
<trans-unit id="0Hhg4zQ" resname="system_account.help">
<source>system_account.help</source>
<target state="translated">Vil bli skjult i rapporter og rullegardinsmenyer</target>
</trans-unit>
<trans-unit id="t.jgy7A" resname="all_invoices">
<source>all_invoices</source>
<target state="translated">Fakturahistorikk</target>
</trans-unit>
<trans-unit id="o0hsx2H" resname="mark_as_open">
<source>mark_as_open</source>
<target state="translated">Marker som pen</target>
</trans-unit>
<trans-unit id="2lL9ACs" resname="help.invoiceTemplate">
<source>help.invoiceTemplate</source>
<target state="translated">Fakturaen genereres med denne malen.</target>
</trans-unit>
<trans-unit id="mQMcndl" resname="stats.userAmountToday">
<source>stats.userAmountToday</source>
<target state="translated">Min omsetning i dag</target>
</trans-unit>
<trans-unit id="E3Kj9lt" resname="stats.userAmountMonth">
<source>stats.userAmountMonth</source>
<target state="translated">Min omsetning denne mneden</target>
</trans-unit>
<trans-unit id="xvdsZsS" resname="stats.userAmountYear">
<source>stats.userAmountYear</source>
<target state="translated">Min omsetning dette ret</target>
</trans-unit>
<trans-unit id="9jlbhkf" resname="stats.userAmountTotal">
<source>stats.userAmountTotal</source>
<target state="translated">Min totale omsetning</target>
</trans-unit>
<trans-unit id="5kFod8o" resname="team.configure_teamlead.help">
<source>team.configure_teamlead.help</source>
<target state="translated">Valgte/framhevede brukere er lagledere.</target>
</trans-unit>
<trans-unit id="wwrREDg" resname="pagination">
<source>pagination</source>
<target state="translated">Vis oppfringer %start% til %end% fra %total%.</target>
</trans-unit>
<trans-unit id="mjKOAgQ" resname="skin.light">
<source>skin.light</source>
<target state="translated">Lys</target>
</trans-unit>
<trans-unit id="WOFPb2i" resname="skin.dark">
<source>skin.dark</source>
<target state="translated">Mrk</target>
</trans-unit>
<trans-unit id="JSBReoa" resname="api_password.intro" xml:space="preserve">
<source>api_password.intro</source>
<target state="needs-translation">API-passord brukes for kommunikasjon mellom Kimai og dine programmer</target>
</trans-unit>
<trans-unit id="5NugIxO" resname="includeWithBudget">
<source>includeWithBudget</source>
<target state="translated">Vis oppfringer med budsjett</target>
</trans-unit>
<trans-unit id="dru_Thv" resname="please_choose">
<source>please_choose</source>
<target state="translated">Velg</target>
</trans-unit>
<trans-unit id="WbT2QLP" resname="extended_settings">
<source>extended_settings</source>
<target state="translated">Utvidede innstillinger</target>
</trans-unit>
<trans-unit id="ZZaqTEr" resname="no_activity">
<source>no_activity</source>
<target state="translated">Uten aktivitet</target>
</trans-unit>
<trans-unit id="Uu8YvYV" resname="deactivated">
<source>Deactivated</source>
<target state="needs-translation">Deaktivert</target>
</trans-unit>
<trans-unit id="3WHV.yf" resname="activated">
<source>Activated</source>
<target state="translated">Aktivert</target>
</trans-unit>
<trans-unit id="wYcx0So" resname="search.no_results">
<source>search.no_results</source>
<target state="translated">Fant ingen resultater for %input%</target>
</trans-unit>
<trans-unit id="biHjm0h" resname="select.add_new">
<source>select.add_new</source>
<target state="translated">Opprett ny med navnet %input%</target>
</trans-unit>
<trans-unit id="m8V2yFG" resname="status.progress">
<source>status.progress</source>
<target state="translated">Underveis</target>
</trans-unit>
<trans-unit id="ulgdXdi" resname="hour_24">
<source>hour_24</source>
<target state="needs-translation">24-timer</target>
</trans-unit>
<trans-unit id="HF70hZq" resname="status.closed">
<source>status.closed</source>
<target state="translated">Fullfrt</target>
</trans-unit>
<trans-unit id="M2B0gF." resname="time">
<source>time</source>
<target state="translated">Tid</target>
</trans-unit>
<trans-unit id="Zngu6M9" resname="status.planned">
<source>status.planned</source>
<target state="translated">Planlagt</target>
</trans-unit>
<trans-unit id="JmkKf48" resname="user.language.help">
<source>user.language.help</source>
<target state="needs-translation">I tillegg til oversette grensesnittet avgjr denne innstillingen tid-, dato- og valutaformater.</target>
</trans-unit>
<trans-unit id="i_XOmN4" resname="help_locales">
<source>help_locales</source>
<target state="needs-translation">Stttede sprk med formateringsregler</target>
</trans-unit>
<trans-unit id="F7xeAn4" resname="invoice_date">
<source>invoice_date</source>
<target state="translated">Fakturadato</target>
</trans-unit>
<trans-unit id="NOEx3FF" resname="invoice_date.help">
<source>invoice_date.help</source>
<target state="translated">Du kan endre fakturadato her</target>
</trans-unit>
<trans-unit id="EGpYQvx" resname="help">
<source>help</source>
<target>Dokumentasjon</target>
</trans-unit>
<trans-unit id="oYYDCG5" resname="support">
<source>support</source>
<target state="translated">Forum</target>
</trans-unit>
<trans-unit id="mz4ieCN" resname="donate">
<source>donate</source>
<target state="translated">Doner</target>
</trans-unit>
<trans-unit id="cR5DD88" resname="invoice_number_generator.date">
<source>invoice_number_generator.date</source>
<target>Dato</target>
</trans-unit>
<trans-unit id="Qh1X4Vu" resname="invoice_number_generator.default">
<source>invoice_number_generator.default</source>
<target>Oppsatt format</target>
</trans-unit>
<trans-unit id="UI6nPeP" resname="invoice_number_generator">
<source>invoice_number_generator</source>
<target>Fakturanummer-generator</target>
</trans-unit>
</body>
</file>
</xliff>
``` | /content/code_sandbox/translations/messages.nb_NO.xlf | xml | 2016-10-20T17:06:34 | 2024-08-16T18:27:30 | kimai | kimai/kimai | 3,084 | 17,031 |
```xml
<?xml version="1.0" encoding="utf-8"?><!--
~
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<LinearLayout
xmlns:android="path_to_url"
android:layout_width="match_parent"
android:layout_height="@dimen/list_item_height"
android:orientation="horizontal"
android:padding="16dp">
<ImageView
android:layout_width="44dp"
android:layout_height="44dp"
android:src="@drawable/ic_extension_24dp"/>
<Space
android:layout_width="16dp"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:id="@+id/text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Line 1"
android:textSize="20sp"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Detail text"
android:textSize="18sp"/>
</LinearLayout>
</LinearLayout>
``` | /content/code_sandbox/sample/src/main/res/layout/list_item.xml | xml | 2016-01-13T01:35:25 | 2024-08-16T15:39:28 | RecyclerView-FastScroll | timusus/RecyclerView-FastScroll | 1,386 | 298 |
```xml
export class TrustedDeviceKeysRequest {
constructor(
public encryptedUserKey: string,
public encryptedPublicKey: string,
public encryptedPrivateKey: string,
) {}
}
``` | /content/code_sandbox/libs/common/src/auth/services/devices/requests/trusted-device-keys.request.ts | xml | 2016-03-09T23:14:01 | 2024-08-16T15:07:51 | clients | bitwarden/clients | 8,877 | 37 |
```xml
import { Nevercode } from "../Nevercode"
import { getCISourceForEnv } from "../../get_ci_source"
const correctEnv = {
NEVERCODE: "true",
NEVERCODE_REPO_SLUG: "danger/danger-js",
NEVERCODE_PULL_REQUEST: "true",
NEVERCODE_PULL_REQUEST_NUMBER: "2",
NEVERCODE_GIT_PROVIDER_PULL_REQUEST: "123234",
}
describe("being found when looking for CI", () => {
it("finds Nevercode with the right ENV", () => {
const ci = getCISourceForEnv(correctEnv)
expect(ci).toBeInstanceOf(Nevercode)
})
})
describe(".isCI", () => {
it("validates when all Nevercode environment vars are set", () => {
const nevercode = new Nevercode(correctEnv)
expect(nevercode.isCI).toBeTruthy()
})
it("does not validate without env", () => {
const nevercode = new Nevercode({})
expect(nevercode.isCI).toBeFalsy()
})
})
describe(".isPR", () => {
it("validates when all nevercode environment vars are set", () => {
const nevercode = new Nevercode(correctEnv)
expect(nevercode.isPR).toBeTruthy()
})
it("does not validate outside of nevercode", () => {
const nevercode = new Nevercode({})
expect(nevercode.isPR).toBeFalsy()
})
const envs = ["NEVERCODE_PULL_REQUEST", "NEVERCODE", "NEVERCODE_GIT_PROVIDER_PULL_REQUEST"]
envs.forEach((key: string) => {
let env = Object.assign({}, correctEnv)
env[key] = null
it(`does not validate when ${key} is missing`, () => {
const nevercode = new Nevercode(env)
expect(nevercode.isCI && nevercode.isPR).toBeFalsy()
})
})
})
``` | /content/code_sandbox/source/ci_source/providers/_tests/_nevercode.test.ts | xml | 2016-08-20T12:57:06 | 2024-08-13T14:00:02 | danger-js | danger/danger-js | 5,229 | 401 |
```xml
export default defineNuxtConfig({})
``` | /content/code_sandbox/test/fixtures/basic-types/extends/bar/nuxt.config.ts | xml | 2016-10-26T11:18:47 | 2024-08-16T19:32:46 | nuxt | nuxt/nuxt | 53,705 | 8 |
```xml
import { subSeconds } from "date-fns";
import { computed, observable } from "mobx";
import { now } from "mobx-utils";
import type { ProsemirrorData } from "@shared/types";
import User from "~/models/User";
import Document from "./Document";
import Model from "./base/Model";
import Field from "./decorators/Field";
import Relation from "./decorators/Relation";
class Comment extends Model {
static modelName = "Comment";
/**
* Map to keep track of which users are currently typing a reply in this
* comments thread.
*/
@observable
typingUsers: Map<string, Date> = new Map();
@Field
@observable
id: string;
/**
* The Prosemirror data representing the comment content
*/
@Field
@observable
data: ProsemirrorData;
/**
* If this comment is a reply then the parent comment will be set, otherwise
* it is a top thread.
*/
@Field
@observable
parentCommentId: string | null;
/**
* The comment that this comment is a reply to.
*/
@Relation(() => Comment, { onDelete: "cascade" })
parentComment?: Comment;
/**
* The document ID to which this comment belongs.
*/
@Field
@observable
documentId: string;
/**
* The document that this comment belongs to.
*/
@Relation(() => Document, { onDelete: "cascade" })
document: Document;
/**
* The user who created this comment.
*/
@Relation(() => User)
createdBy: User;
/**
* The ID of the user who created this comment.
*/
createdById: string;
/**
* The date and time that this comment was resolved, if it has been resolved.
*/
@observable
resolvedAt: string;
/**
* The user who resolved this comment, if it has been resolved.
*/
@Relation(() => User)
resolvedBy: User | null;
/**
* The ID of the user who resolved this comment, if it has been resolved.
*/
resolvedById: string | null;
/**
* An array of users that are currently typing a reply in this comments thread.
*/
@computed
public get currentlyTypingUsers(): User[] {
return Array.from(this.typingUsers.entries())
.filter(([, lastReceivedDate]) => lastReceivedDate > subSeconds(now(), 3))
.map(([userId]) => this.store.rootStore.users.get(userId))
.filter(Boolean) as User[];
}
/**
* Whether the comment is resolved
*/
@computed
public get isResolved() {
return !!this.resolvedAt;
}
/**
* Whether the comment is a reply to another comment.
*/
@computed
public get isReply() {
return !!this.parentCommentId;
}
/**
* Resolve the comment
*/
public resolve() {
return this.store.rootStore.comments.resolve(this.id);
}
/**
* Unresolve the comment
*/
public unresolve() {
return this.store.rootStore.comments.unresolve(this.id);
}
}
export default Comment;
``` | /content/code_sandbox/app/models/Comment.ts | xml | 2016-05-22T21:31:47 | 2024-08-16T19:57:22 | outline | outline/outline | 26,751 | 695 |
```xml
// Type definitions for ag-grid v6.2.1
// Project: path_to_url
// Definitions by: Niall Crosby <path_to_url
// Definitions: path_to_url
import { ColDef } from "./colDef";
import { Column } from "./column";
export declare class RowNode {
static EVENT_ROW_SELECTED: string;
static EVENT_DATA_CHANGED: string;
static EVENT_CELL_CHANGED: string;
static EVENT_MOUSE_ENTER: string;
static EVENT_MOUSE_LEAVE: string;
private mainEventService;
private gridOptionsWrapper;
private selectionController;
private columnController;
private valueService;
private rowModel;
/** Unique ID for the node. Either provided by the grid, or user can set to match the primary
* key in the database (or whatever data source is used). */
id: string;
/** The user provided data */
data: any;
/** The parent node to this node, or empty if top level */
parent: RowNode;
/** How many levels this node is from the top */
level: number;
/** True if this node is a group node (ie has children) */
group: boolean;
/** True if this node can flower (ie can be expanded, but has no direct children) */
canFlower: boolean;
/** True if this node is a flower */
flower: boolean;
/** True if this node is a group and the group is the bottom level in the tree */
leafGroup: boolean;
/** True if this is the first child in this group */
firstChild: boolean;
/** True if this is the last child in this group */
lastChild: boolean;
/** The index of this node in the group */
childIndex: number;
/** Either 'top' or 'bottom' if floating, otherwise undefined or null */
floating: string;
/** If using quick filter, stores a string representation of the row for searching against */
quickFilterAggregateText: string;
/** Groups only - True if row is a footer. Footers have group = true and footer = true */
footer: boolean;
/** Groups only - The field we are grouping on eg Country*/
field: string;
/** Groups only - The key for the group eg Ireland, UK, USA */
key: any;
/** All user provided nodes */
allLeafChildren: RowNode[];
/** Groups only - Children of this group */
childrenAfterGroup: RowNode[];
/** Groups only - Filtered children of this group */
childrenAfterFilter: RowNode[];
/** Groups only - Sorted children of this group */
childrenAfterSort: RowNode[];
/** Groups only - Number of children and grand children */
allChildrenCount: number;
/** Children mapped by the pivot columns */
childrenMapped: {
[key: string]: any;
};
/** Groups only - True if group is expanded, otherwise false */
expanded: boolean;
/** Groups only - If doing footers, reference to the footer node for this group */
sibling: RowNode;
/** Not to be used, internal temporary map used by the grid when creating groups */
_childrenMap: {};
/** The height, in pixels, of this row */
rowHeight: number;
/** The top pixel for this row */
rowTop: number;
private selected;
private eventService;
setData(data: any): void;
setDataAndId(data: any, id: string): void;
setId(id: string): void;
private dispatchLocalEvent(eventName, event?);
setDataValue(colKey: string | ColDef | Column, newValue: any): void;
resetQuickFilterAggregateText(): void;
isExpandable(): boolean;
isSelected(): boolean;
deptFirstSearch(callback: (rowNode: RowNode) => void): void;
calculateSelectedFromChildren(): void;
private calculateSelectedFromChildrenBubbleUp();
setSelectedInitialValue(selected: boolean): void;
setSelected(newValue: boolean, clearSelection?: boolean, tailingNodeInSequence?: boolean): void;
setSelectedParams(params: {
newValue: boolean;
clearSelection?: boolean;
tailingNodeInSequence?: boolean;
rangeSelect?: boolean;
}): void;
private doRowRangeSelection();
private isParentOfNode(potentialParent);
private calculatedSelectedForAllGroupNodes();
selectThisNode(newValue: boolean): void;
private selectChildNodes(newValue);
addEventListener(eventType: string, listener: Function): void;
removeEventListener(eventType: string, listener: Function): void;
onMouseEnter(): void;
onMouseLeave(): void;
}
``` | /content/code_sandbox/services/dashboard/assets-dev/js/vendor/ag-grid/dist/lib/entities/rowNode.d.ts | xml | 2016-06-21T19:39:58 | 2024-08-12T19:23:26 | mylg | mehrdadrad/mylg | 2,691 | 986 |
```xml
<!--
***********************************************************************************************
Microsoft.NET.ApiCompat.ValidatePackage.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
***********************************************************************************************
-->
<Project>
<PropertyGroup>
<_ApiCompatValidatePackageSemaphoreFile>$(IntermediateOutputPath)$(MSBuildThisFileName).semaphore</_ApiCompatValidatePackageSemaphoreFile>
<!-- Add any custom targets that need to run before package validation to the following property. -->
<RunPackageValidationDependsOn>CollectApiCompatInputs;_GetReferencePathFromInnerProjects;$(RunPackageValidationDependsOn)</RunPackageValidationDependsOn>
</PropertyGroup>
<Target Name="RunPackageValidation"
DependsOnTargets="$(RunPackageValidationDependsOn)"
AfterTargets="Pack"
Inputs="@(NuGetPackInput);
@(ApiCompatSuppressionFile);
$(ApiCompatSuppressionOutputFile)"
Outputs="$(_ApiCompatValidatePackageSemaphoreFile)"
Condition="'$(EnablePackageValidation)' == 'true' and '$(IsPackable)' == 'true'">
<PropertyGroup>
<PackageValidationBaselineName Condition="'$(PackageValidationBaselineName)' == ''">$(PackageId)</PackageValidationBaselineName>
<PackageValidationBaselinePath Condition="'$(PackageValidationBaselinePath)' == '' and '$(PackageValidationBaselineVersion)' != ''">$([MSBuild]::NormalizePath('$(NuGetPackageRoot)', '$(PackageValidationBaselineName.ToLower())', '$(PackageValidationBaselineVersion)', '$(PackageValidationBaselineName.ToLower()).$(PackageValidationBaselineVersion).nupkg'))</PackageValidationBaselinePath>
<_packageValidationBaselinePath Condition="'$(DisablePackageBaselineValidation)' != 'true'">$(PackageValidationBaselinePath)</_packageValidationBaselinePath>
</PropertyGroup>
<ItemGroup>
<_PackageTargetPath Include="@(NuGetPackOutput->WithMetadataValue('Extension', '.nupkg'))"
Condition="!$([System.String]::new('%(Identity)').EndsWith('.symbols.nupkg'))" />
</ItemGroup>
<!-- PackageTargetPath isn't exposed by NuGet: path_to_url -->
<Microsoft.DotNet.ApiCompat.Task.ValidatePackageTask
PackageTargetPath="@(_PackageTargetPath)"
RuntimeGraph="$(RuntimeIdentifierGraphPath)"
NoWarn="$(NoWarn)"
RespectInternals="$(ApiCompatRespectInternals)"
EnableRuleAttributesMustMatch="$(ApiCompatEnableRuleAttributesMustMatch)"
ExcludeAttributesFiles="@(ApiCompatExcludeAttributesFile)"
EnableRuleCannotChangeParameterName="$(ApiCompatEnableRuleCannotChangeParameterName)"
RunApiCompat="$(RunApiCompat)"
EnableStrictModeForCompatibleTfms="$(EnableStrictModeForCompatibleTfms)"
EnableStrictModeForCompatibleFrameworksInPackage="$(EnableStrictModeForCompatibleFrameworksInPackage)"
EnableStrictModeForBaselineValidation="$(EnableStrictModeForBaselineValidation)"
GenerateSuppressionFile="$(ApiCompatGenerateSuppressionFile)"
PreserveUnnecessarySuppressions="$(ApiCompatPreserveUnnecessarySuppressions)"
PermitUnnecessarySuppressions="$(ApiCompatPermitUnnecessarySuppressions)"
SuppressionFiles="@(ApiCompatSuppressionFile)"
SuppressionOutputFile="$(ApiCompatSuppressionOutputFile)"
BaselinePackageTargetPath="$(_packageValidationBaselinePath)"
RoslynAssembliesPath="$(RoslynAssembliesPath)"
PackageAssemblyReferences="@(PackageValidationReferencePath)"
BaselinePackageFrameworksToIgnore="@(PackageValidationBaselineFrameworkToIgnore)" />
<MakeDir Directories="$([System.IO.Path]::GetDirectoryName('$(_ApiCompatValidatePackageSemaphoreFile)'))" />
<Touch Files="$(_ApiCompatValidatePackageSemaphoreFile)" AlwaysCreate="true" />
</Target>
<Target Name="GetReferencesForApiCompatValidatePackage"
DependsOnTargets="FindReferenceAssembliesForReferences"
Returns="@(ApiCompatAssemblyReferencesWithTargetFramework)">
<ItemGroup>
<ApiCompatAssemblyReferencesWithTargetFramework Include="$(TargetFramework)"
TargetFrameworkMoniker="$(TargetFrameworkMoniker)"
ReferencePath="@(ReferencePathWithRefAssemblies, ',')">
<TargetPlatformMoniker Condition="'$(ApiCompatIgnoreTargetPlatformMoniker)' != 'true'">$(TargetPlatformMoniker)</TargetPlatformMoniker>
</ApiCompatAssemblyReferencesWithTargetFramework>
</ItemGroup>
</Target>
<!-- Depends on NuGet's _GetTargetFrameworksOutput target to calculate inner target frameworks. -->
<Target Name="_GetReferencePathFromInnerProjects"
DependsOnTargets="_GetTargetFrameworksOutput"
Condition="'$(RunPackageValidationWithoutReferences)' != 'true'">
<MSBuild Projects="$(MSBuildProjectFullPath)"
Targets="GetReferencesForApiCompatValidatePackage"
Properties="TargetFramework=%(_TargetFrameworks.Identity);
BuildProjectReferences=false">
<Output ItemName="PackageValidationReferencePath" TaskParameter="TargetOutputs" />
</MSBuild>
</Target>
</Project>
``` | /content/code_sandbox/src/Tasks/Microsoft.NET.Build.Tasks/targets/Microsoft.NET.ApiCompat.ValidatePackage.targets | xml | 2016-07-22T21:26:02 | 2024-08-16T17:23:58 | sdk | dotnet/sdk | 2,627 | 1,071 |
```xml
export class SomeClass5 {}
``` | /content/code_sandbox/build-tests/api-extractor-scenarios/src/referenceTokens/internal.ts | xml | 2016-09-30T00:28:20 | 2024-08-16T18:54:35 | rushstack | microsoft/rushstack | 5,790 | 7 |
```xml
export * from './Event/EventType'
export * from './Event/EventTypeEnum'
export * from './Factory/CreateClientEventMessage'
export * from './Factory/CreateCommit'
export * from './Factory/CreateDocumentUpdate'
export * from './Factory/CreateDocumentUpdateArray'
export * from './Factory/CreateDocumentUpdateMessage'
export * from './Factory/CreateEvent'
export * from './Factory/CreateMessageAck'
export * from './Factory/CreateServerMessageWithEvents'
export * from './Factory/CreateServerMessageWithMessageAcks'
export * from './Factory/CreateSquashCommit'
export * from './Factory/CreateClientMessageWithDocumentUpdates'
export * from './Generated'
export * from './Payload/ConnectionReadyPayload'
export * from './Payload/DocumentCommitUpdatedPayload'
export * from './Payload/SHMOLGTCEIHPayload'
export * from './ServerMessage/ServerMessageType'
export * from './ServerMessage/ServerMessageTypeEnum'
export * from './ServerMessage/ServerMessageTypeProps'
export * from './ConnectionCloseReason/ConnectionCloseReason'
export * from './ConnectionCloseReason/ConnectionCloseReasonProps'
export * from './Version'
export * from './Heartbeat'
export * from './RTSConfig'
``` | /content/code_sandbox/packages/docs-proto/lib/index.ts | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 249 |
```xml
import cn from 'classnames';
import React from 'react';
import { getAlignClassname } from './helpers';
import styles from './styles.module.css';
import { ICell, IRow, IAdditionalClassNames, ISelection } from './types';
export function NoData({
noData = () => 'No data',
}: {
noData?: () => React.ReactNode;
}) {
return (
<div className={styles.noData} data-test="no-data">
{noData()}
</div>
);
}
export function Row<T>({
row,
additionalClassNames,
selection,
onClick,
}: {
row: IRow<T>;
additionalClassNames: IAdditionalClassNames;
selection?: ISelection<T>;
onClick?: () => void;
}) {
return (
<div className={styles.rowWrapper} onClick={onClick}>
<div className={styles.selectionCell}>
{selection && selection.showSelectionColumn
? selection.cellComponent(row.data)
: null}
</div>
<div
className={cn(styles.row, additionalClassNames.row)}
style={row.style}
>
{row.cells.map((cell, index) => (
<Cell
key={cell.key}
cell={cell}
rowData={row.data}
additionalClassNames={additionalClassNames}
/>
))}
</div>
</div>
);
}
export function Cell<T>({
cell,
additionalClassNames,
rowData,
}: {
rowData: T;
cell: ICell<T>;
additionalClassNames: IAdditionalClassNames;
}) {
return (
<div
className={cn(
styles.cell,
additionalClassNames.cell,
getAlignClassname(cell.align)
)}
data-type={cell.dataType}
style={cell.style}
>
{cell.render(rowData)}
</div>
);
}
``` | /content/code_sandbox/webapp/client/src/shared/view/elements/Table/components.tsx | xml | 2016-10-19T01:07:26 | 2024-08-14T03:53:55 | modeldb | VertaAI/modeldb | 1,689 | 399 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-authority</artifactId>
<version>5.5.1-SNAPSHOT</version>
</parent>
<artifactId>shardingsphere-authority-distsql</artifactId>
<packaging>pom</packaging>
<name>${project.artifactId}</name>
<modules>
<module>statement</module>
<module>parser</module>
<module>handler</module>
</modules>
</project>
``` | /content/code_sandbox/kernel/authority/distsql/pom.xml | xml | 2016-01-18T12:49:26 | 2024-08-16T15:48:11 | shardingsphere | apache/shardingsphere | 19,707 | 254 |
```xml
import { useEffect, useState } from 'react';
import { get } from 'lodash';
import { Databases } from 'shared/core';
export const useTables = (example, explains, databaseType): any[] => {
const { jsonExplain, classicExplain } = explains;
const [tables, setTables] = useState<any[]>([]);
const [loading, setLoading] = useState<boolean>(false);
useEffect(() => {
const getTables = async () => {
setLoading(true);
setTables([]);
if (databaseType === Databases.mysql && jsonExplain.value) {
const parsedJSON = JSON.parse(jsonExplain.value);
const realTableName = [
get(parsedJSON, 'real_table_name'),
].filter(Boolean);
setTables(realTableName);
}
if (databaseType === Databases.postgresql && example) {
const tablesResult = example.tables || [];
setTables(tablesResult);
}
setLoading(false);
};
getTables();
}, [jsonExplain, classicExplain, example, databaseType]);
return [tables, loading];
};
``` | /content/code_sandbox/pmm-app/src/pmm-qan/panel/components/Details/Table/TableContainer.hooks.ts | xml | 2016-01-22T07:14:23 | 2024-08-13T13:01:59 | grafana-dashboards | percona/grafana-dashboards | 2,661 | 231 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="urn:ietf:params:xml:ns:allocationToken-1.0"
xmlns:allocationToken="urn:ietf:params:xml:ns:allocationToken-1.0"
xmlns="path_to_url"
elementFormDefault="qualified">
<annotation>
<documentation>
Extensible Provisioning Protocol v1.0
Allocation Token Extension.
</documentation>
</annotation>
<!-- Element used in info command to get allocation token. -->
<element name="info"/>
<!-- Allocation Token used in transform
commands and info response -->
<element name="allocationToken"
type="allocationToken:allocationTokenType"/>
<complexType name="allocationTokenType">
<simpleContent>
<extension base="token"/>
</simpleContent>
</complexType>
<!-- End of schema.-->
</schema>
``` | /content/code_sandbox/core/src/main/java/google/registry/xml/xsd/allocationToken-1.0.xsd | xml | 2016-02-29T20:16:48 | 2024-08-15T19:49:29 | nomulus | google/nomulus | 1,685 | 195 |
```xml
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<root>
test: Valid
</root>
``` | /content/code_sandbox/tests/data/Reader/Xml/XEETestValidUTF-8-single-quote.xml | xml | 2016-06-19T16:58:48 | 2024-08-16T14:51:45 | PhpSpreadsheet | PHPOffice/PhpSpreadsheet | 13,180 | 30 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="path_to_url" xmlns:flowable="path_to_url"
xmlns:bpmndi="path_to_url" xmlns:omgdc="path_to_url"
xmlns:omgdi="path_to_url" typeLanguage="path_to_url"
expressionLanguage="path_to_url" targetNamespace="path_to_url">
<process id="externalWorkerJobQueryTest" name="External Worker Job Query Test" isExecutable="true">
<startEvent id="theStart"/>
<parallelGateway id="gw1"/>
<serviceTask id="externalCustomer1" name="Customer Service" flowable:type="external-worker" flowable:topic="customerService"
flowable:exclusive="false"/>
<sequenceFlow id="flow1" sourceRef="theStart" targetRef="gw1"/>
<sequenceFlow id="flow2" sourceRef="gw1" targetRef="externalCustomer1"/>
<sequenceFlow id="flow3" sourceRef="gw1" targetRef="externalOrder"/>
<serviceTask id="externalOrder" name="Order Service" flowable:type="external-worker" flowable:topic="orderService"
flowable:exclusive="false"/>
<exclusiveGateway id="gw2"/>
<sequenceFlow id="flow4" sourceRef="externalCustomer1" targetRef="gw2"/>
<sequenceFlow id="flow5" sourceRef="externalOrder" targetRef="gw2"/>
<endEvent id="theEnd"/>
<serviceTask id="externalCustomer2" name="Customer Service 2" flowable:type="external-worker" flowable:topic="customer"
flowable:exclusive="false"/>
<sequenceFlow id="flow6" sourceRef="gw2" targetRef="externalCustomer2"/>
<sequenceFlow id="flow7" sourceRef="externalCustomer2" targetRef="theEnd"/>
</process>
<bpmndi:BPMNDiagram id="BPMNDiagram_externalWorkerJobQueryTest">
<bpmndi:BPMNPlane bpmnElement="externalWorkerJobQueryTest" id="BPMNPlane_externalWorkerJobQueryTest">
<bpmndi:BPMNShape bpmnElement="theStart" id="BPMNShape_theStart">
<omgdc:Bounds height="30.0" width="30.0" x="100.0" y="163.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="gw1" id="BPMNShape_gw1">
<omgdc:Bounds height="40.0" width="40.0" x="175.0" y="158.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="externalCustomer1" id="BPMNShape_externalCustomer1">
<omgdc:Bounds height="80.0" width="100.0" x="255.0" y="30.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="externalOrder" id="BPMNShape_externalOrder">
<omgdc:Bounds height="80.0" width="100.0" x="260.0" y="285.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="gw2" id="BPMNShape_gw2">
<omgdc:Bounds height="40.0" width="40.0" x="420.0" y="158.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="theEnd" id="BPMNShape_theEnd">
<omgdc:Bounds height="28.0" width="28.0" x="780.0" y="164.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="externalCustomer2" id="BPMNShape_externalCustomer2">
<omgdc:Bounds height="80.0" width="100.0" x="540.0" y="138.0"/>
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
<omgdi:waypoint x="129.9496588110467" y="178.09285545292158"/>
<omgdi:waypoint x="175.375" y="178.375"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
<omgdi:waypoint x="195.5" y="158.5"/>
<omgdi:waypoint x="195.5" y="70.0"/>
<omgdi:waypoint x="255.0" y="70.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
<omgdi:waypoint x="195.5" y="197.443536834925"/>
<omgdi:waypoint x="195.5" y="325.0"/>
<omgdi:waypoint x="260.0" y="325.0"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow4" id="BPMNEdge_flow4">
<omgdi:waypoint x="354.95000000000005" y="70.0"/>
<omgdi:waypoint x="440.5" y="70.0"/>
<omgdi:waypoint x="440.5" y="158.5"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow5" id="BPMNEdge_flow5">
<omgdi:waypoint x="359.94999999993263" y="325.0"/>
<omgdi:waypoint x="444.48983362654405" y="325.0"/>
<omgdi:waypoint x="444.48983362654405" y="193.41303899977814"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
<omgdi:waypoint x="459.5351898101823" y="178.405"/>
<omgdi:waypoint x="539.9999999999964" y="178.0047263681592"/>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge bpmnElement="flow7" id="BPMNEdge_flow7">
<omgdi:waypoint x="639.9499999999294" y="178.0"/>
<omgdi:waypoint x="780.0" y="178.0"/>
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</definitions>
``` | /content/code_sandbox/modules/flowable-external-job-rest/src/test/resources/org/flowable/external/job/rest/service/api/parallelExternalWorkerJobs.bpmn20.xml | xml | 2016-10-13T07:21:43 | 2024-08-16T15:23:14 | flowable-engine | flowable/flowable-engine | 7,715 | 1,645 |
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
// TypeScript Version: 4.1
/// <reference types="@stdlib/types"/>
import { Iterator as Iter, IterableIterator } from '@stdlib/types/iter';
import { ArrayLike } from '@stdlib/types/array';
// Define a union type representing both iterable and non-iterable iterators:
type Iterator = Iter | IterableIterator;
/**
* Map function invoked for each iterated value.
*
* @returns iterator value
*/
type Nullary = () => any;
/**
* Map function invoked for each iterated value.
*
* @param value - iterated value
* @returns iterator value
*/
type Unary = ( value: any ) => any;
/**
* Map function invoked for each iterated value.
*
* @param value - iterated value
* @param index - iterated value index
* @returns iterator value
*/
type Binary = ( value: any, index: number ) => any;
/**
* Map function invoked for each iterated value.
*
* @param value - iterated value
* @param index - iterated value index
* @param src - source array-like object
* @returns iterator value
*/
type Ternary = ( value: any, index: number, src: ArrayLike<any> ) => any;
/**
* Map function invoked for each iterated value.
*
* @param value - iterated value
* @param index - iterated value index
* @param src - source array-like object
* @returns iterator value
*/
type MapFunction = Nullary | Unary | Binary | Ternary;
/**
* Returns an iterator which iterates from right to left over each element in an array-like object.
*
* ## Notes
*
* - For dynamic array resizing, the only behavior made intentionally consistent with iterating from left to right is when elements are pushed onto the beginning (end) of an array. In other words, iterating from left to right combined with `[].push()` is consistent with iterating from right to left combined with `[].unshift()`.
*
* @param src - input value
* @param mapFcn - function to invoke for each iterated value
* @param thisArg - execution context
* @returns iterator
*
* @example
* var iter = array2iteratorRight( [ 1, 2, 3, 4 ] );
*
* var v = iter.next().value;
* // returns 4
*
* v = iter.next().value;
* // returns 3
*
* v = iter.next().value;
* // returns 2
*
* // ...
*/
declare function array2iteratorRight( src: ArrayLike<any>, mapFcn?: MapFunction, thisArg?: any ): Iterator;
// EXPORTS //
export = array2iteratorRight;
``` | /content/code_sandbox/lib/node_modules/@stdlib/array/to-iterator-right/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 618 |
```xml
/*
*
* This source code is licensed under the MIT license which is detailed in the LICENSE.txt file.
*/
import * as ExtensionApi from "@extraterm/extraterm-extension-api";
import { EventEmitter } from "extraterm-event-emitter";
import { Direction, QBoxLayout, QWidget } from "@nodegui/nodegui";
import { BoxLayout, Widget } from "qt-construct";
import { Tab } from "../../Tab.js";
import { Window } from "../../Window.js";
import { ErrorTolerantEventEmitter } from "../ErrorTolerantEventEmitter.js";
import { InternalExtensionContext } from "../../InternalTypes.js";
export class ExtensionTabBridge implements Tab {
iconName: string = "";
title: string = "";
#parent: any = null;
#onWindowTitleChangedEventEmitter = new EventEmitter<string>();
onWindowTitleChanged: ExtensionApi.Event<string> = null;
#onDidCloseEventEmitter: ErrorTolerantEventEmitter<void> = null;
#extensionTabImpl: ExtensionTabImpl;
#containerWidget: QWidget;
#containerLayout: QBoxLayout;
#extensionWidget: QWidget = null;
#internalExtensionContext: InternalExtensionContext = null;
#window: Window;
#windowTitle = "";
#isOpen = false;
constructor(internalExtensionContext: InternalExtensionContext, window: Window, log: ExtensionApi.Logger) {
this.#internalExtensionContext = internalExtensionContext;
this.onWindowTitleChanged = this.#onWindowTitleChangedEventEmitter.event;
this.#onDidCloseEventEmitter = new ErrorTolerantEventEmitter<void>("onDidClose", log);
this.#window = window;
this.#extensionTabImpl = new ExtensionTabImpl(this);
this.#window.onTabCloseRequest((t: Tab) => {
if (t === this) {
this.close();
this.#onDidCloseEventEmitter.fire();
}
});
this.#containerWidget = Widget({
contentsMargins: 0,
cssClass: "background",
layout: this.#containerLayout = BoxLayout({
direction: Direction.TopToBottom,
spacing: 0,
children: []
})
});
}
dispose(): void {
}
setParent(parent: any): void {
this.#parent = parent;
}
getParent(): any {
return this.#parent;
}
getIconName(): string {
return this.iconName;
}
getTitle(): string {
return this.title;
}
getTabWidget(): QWidget {
return null;
}
getContents(): QWidget {
return this.#containerWidget;
}
getOnDidCloseEvent(): ExtensionApi.Event<void> {
return this.#onDidCloseEventEmitter.event;
}
setContentWidget(contentWidget: QWidget): void {
if (this.#extensionWidget != null) {
this.#extensionWidget.setParent(null);
}
this.#containerLayout.addWidget(contentWidget);
this.#extensionWidget = contentWidget;
}
setIsCurrent(isCurrent: boolean): void {
}
focus(): void {
}
unfocus(): void {
// TODO
}
setWindowTitle(title: string): void {
this.#windowTitle = title;
this.#onWindowTitleChangedEventEmitter.fire(title);
}
getWindowTitle(): string {
return this.#windowTitle;
}
getExtensionTabImpl(): ExtensionTabImpl {
return this.#extensionTabImpl;
}
open(): void {
if (!this.#isOpen) {
this.#window.addTab(this, null, this.#internalExtensionContext.getActiveInternalTab());
}
this.#window.focus();
this.#window.focusTab(this);
this.#isOpen = true;
}
close(): void {
if (!this.#isOpen) {
return;
}
this.#window.removeTab(this);
this.#isOpen = false;
}
}
export class ExtensionTabImpl implements ExtensionApi.ExtensionTab {
#extensionTabBridge: ExtensionTabBridge;
constructor(extensionTabBridge: ExtensionTabBridge) {
this.#extensionTabBridge = extensionTabBridge;
}
set contentWidget(contentWidget: QWidget) {
this.#extensionTabBridge.setContentWidget(contentWidget);
}
get icon(): string {
return this.#extensionTabBridge.iconName;
}
set icon(icon: string) {
this.#extensionTabBridge.iconName = icon;
}
get title(): string {
return this.#extensionTabBridge.title;
}
set title(title: string) {
this.#extensionTabBridge.title = title;
}
get onDidClose(): ExtensionApi.Event<void> {
return this.#extensionTabBridge.getOnDidCloseEvent();
}
open(): void {
this.#extensionTabBridge.open();
}
close(): void {
this.#extensionTabBridge.close();
}
}
``` | /content/code_sandbox/main/src/extension/api/ExtensionTabImpl.ts | xml | 2016-03-04T12:39:59 | 2024-08-16T18:44:37 | extraterm | sedwards2009/extraterm | 2,501 | 1,016 |
```xml
import { type EventSubscription, requireNativeModule } from 'expo-modules-core';
const ExpoLocalizationModule = requireNativeModule('ExpoLocalization');
export function addLocaleListener(listener: (event) => void): EventSubscription {
return ExpoLocalizationModule.addListener('onLocaleSettingsChanged', listener);
}
export function addCalendarListener(listener: (event) => void): EventSubscription {
return ExpoLocalizationModule.addListener('onCalendarSettingsChanged', listener);
}
export function removeSubscription(subscription: EventSubscription) {
subscription.remove();
}
export default ExpoLocalizationModule;
``` | /content/code_sandbox/packages/expo-localization/src/ExpoLocalization.native.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 114 |
```xml
import {
closeTestingConnections,
createTestingConnections,
reloadTestingDatabases,
} from "../../../utils/test-utils"
import { DataSource } from "../../../../src/data-source/DataSource"
import { expect } from "chai"
import { Test } from "./entity/Test"
describe("query builder > exists", () => {
let connections: DataSource[]
before(
async () =>
(connections = await createTestingConnections({
entities: [Test],
schemaCreate: true,
dropSchema: true,
})),
)
beforeEach(() => reloadTestingDatabases(connections))
after(() => closeTestingConnections(connections))
it("Exists query of empty table should be false", () =>
Promise.all(
connections.map(async (connection) => {
const repo = connection.getRepository(Test)
const exists = await repo.exists()
expect(exists).to.be.equal(false)
}),
))
it("Exists query of non empty table should be true", () =>
Promise.all(
connections.map(async (connection) => {
const repo = connection.getRepository(Test)
await repo.save({ id: "ok" })
await repo.save({ id: "nok" })
const exists = await repo.exists()
expect(exists).to.be.equal(true)
}),
))
})
``` | /content/code_sandbox/test/functional/query-builder/exists/query-builder-exists.ts | xml | 2016-02-29T07:41:14 | 2024-08-16T18:28:52 | typeorm | typeorm/typeorm | 33,875 | 271 |
```xml
import { ClassAttributes, ComponentProps, ComponentType } from 'react';
import { StyleProp, Text as NativeText, TextStyle as NativeTextStyle } from 'react-native';
import { WebViewStyle } from './View';
import { createSafeStyledView } from '../css/createSafeStyledView';
// path_to_url
type NativeTextProps = ComponentProps<typeof NativeText> & ClassAttributes<typeof NativeText>;
export interface WebTextStyle {
/** string is only available on web */
fontSize?: NativeTextStyle['fontSize'] | string;
/** string is only available on web */
lineHeight?: NativeTextStyle['lineHeight'] | string;
/** @platform web */
fontFeatureSettings?: string;
/** @platform web */
textIndent?: string;
/** @platform web */
textOverflow?: string;
/** @platform web */
textRendering?: string;
/** @platform web */
textTransform?: string;
/** @platform web */
unicodeBidi?: string;
/** @platform web */
wordWrap?: string;
}
export type TextStyle = Omit<NativeTextStyle, 'position' | 'fontSize' | 'lineHeight'> &
WebTextStyle &
WebViewStyle;
export type WebTextProps = {
style?: StyleProp<TextStyle>;
/** @platform web */
tabIndex?: number;
/** @platform web */
'aria-level'?: number;
/**
* @deprecated use `aria-level` instead.
* @platform web
*/
accessibilityLevel?: number;
/** @platform web */
href?: string;
/** @deprecated use the prop `hrefAttrs={{ target: '...' }}` instead. */
target?: string;
/** @platform web */
hrefAttrs?: {
/** @platform web */
target?: string;
/** @platform web */
rel?: string;
/** @platform web */
download?: boolean | string;
};
/** @platform web */
lang?: string;
};
export type TextProps = Omit<NativeTextProps, 'style'> & WebTextProps;
const Text = NativeText as ComponentType<TextProps>;
export default createSafeStyledView(Text) as ComponentType<TextProps>;
``` | /content/code_sandbox/packages/html-elements/src/primitives/Text.tsx | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 455 |
```xml
import * as React from 'react';
import styles from './App.module.scss';
import { IAppProps } from './IAppProps';
import AppContext,{IMessageBarSettings} from "./AppContext";
import { MessageBarType } from 'office-ui-fabric-react/lib/MessageBar';
import AppContent from "./AppContent";
import * as Strings from "SiteProvisioningManagerWebPartStrings";
const App: React.FC<IAppProps> = (props) => {
const {webUrl,appService} = props;
const [isGlobalAdmin,setIsGlobalAdmin] = React.useState(false);
const [isSiteOwner,setIsSiteOwner] = React.useState(false);
const [isLoading,setIsLoading] = React.useState(false);
const [messageBarSettings,setMessageBarSettings] =React.useState({
message:"",
type:MessageBarType.info,
visible:false
} as IMessageBarSettings);
const updateMessageBarSettings = (settings:IMessageBarSettings)=>{
setMessageBarSettings(settings);
};
const toggleLoading = (visibleLoading:boolean)=>{
setIsLoading(visibleLoading);
};
React.useEffect(()=>{
let didCancel = false;
const fetchIsGloablAdmin = async ()=>{
const globalAdmin = await appService.checkUserIsGlobalAdmin();
if (!didCancel) {
setIsGlobalAdmin(globalAdmin);
}
};
const fetchIsSiteOwner = async ()=>{
const siteOwner = await appService.IsSiteOwner();
if (!didCancel) {
setIsSiteOwner(siteOwner);
if(!siteOwner){
setMessageBarSettings({
message: Strings.ErrorMessageUserNotAdmin,
type: MessageBarType.error,
visible: false
});
}
}
};
fetchIsGloablAdmin();
fetchIsSiteOwner();
return ()=>{didCancel=true;};
},[]);
return (
<div className={styles.siteProvisioningWebPart}>
<AppContext.Provider value={{
appService,
isGlobalAdmin,
isSiteOwner,
webUrl,
messageBarSettings,
isLoading,
toggleLoading,
updateMessageBarSettings
} }>
<AppContent/>
</AppContext.Provider>
</div>
);
};
export default App;
``` | /content/code_sandbox/samples/react-site-provisioning-manager/webpart/src/webparts/siteProvisioningManager/components/App/App.tsx | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 480 |
```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
-->
<FindBugsFilter>
<Match>
<Class name="~org.apache.pulsar.transaction.coordinator.proto.*"/>
<Bug pattern="UUF_UNUSED_FIELD"/>
</Match>
<!-- Ignore violations that were present when the rule was enabled -->
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.impl.MLTransactionLogImpl"/>
<Method name="getManagedLedger"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.impl.MLTransactionLogImpl"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.impl.MLTransactionLogImpl"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.impl.MLTransactionLogImpl"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.impl.MLTransactionMetadataStore"/>
<Method name="getMetadataStoreStats"/>
<Bug pattern="EI_EXPOSE_REP"/>
</Match>
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.impl.MLTransactionMetadataStore"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.impl.MLTransactionMetadataStore"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.impl.TxnLogBufferedWriter"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.impl.TxnLogBufferedWriterMetricsStats"/>
<Method name="<init>"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.proto.BatchedTransactionMetadataEntry"/>
<Method name="parseFrom"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
<Match>
<Class name="org.apache.pulsar.transaction.coordinator.proto.TransactionMetadataEntry"/>
<Method name="parseFrom"/>
<Bug pattern="EI_EXPOSE_REP2"/>
</Match>
</FindBugsFilter>
``` | /content/code_sandbox/pulsar-transaction/coordinator/src/main/resources/findbugsExclude.xml | xml | 2016-06-28T07:00:03 | 2024-08-16T17:12:43 | pulsar | apache/pulsar | 14,047 | 697 |
```xml
/** @jsx jsx */
import { jsx } from 'slate-hyperscript'
export const input = (
<editor>
<element>
<element>
<cursor />
word
</element>
</element>
</editor>
)
export const output = {
children: [
{
children: [
{
children: [
{
text: 'word',
},
],
},
],
},
],
selection: {
anchor: {
path: [0, 0, 0],
offset: 0,
},
focus: {
path: [0, 0, 0],
offset: 0,
},
},
}
``` | /content/code_sandbox/packages/slate-hyperscript/test/fixtures/cursor-element-nested-start.tsx | xml | 2016-06-18T01:52:42 | 2024-08-16T18:43:42 | slate | ianstormtaylor/slate | 29,492 | 152 |
```xml
<?xml version='1.0' encoding="UTF-8"?>
<!DOCTYPE part PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"path_to_url" [
]>
<part label="V">
<title>Related Tools</title>
<partintro>
<para>
Several useful developer tools have been build around GObject
technology. The next sections briefly introduce them and link to
the respective project pages.
</para>
<para>
For example, writing GObjects is often seen as a tedious task. It
requires a lot of typing and just doing a copy/paste requires a
great deal of care. A lot of projects and scripts have been
written to generate GObject skeleton form boilerplate code, or
even translating higher-level language into plain C.
</para>
</partintro>
<chapter id="tools-vala">
<title>Vala</title>
<para>
From the <ulink url="path_to_url">Vala
homepage</ulink> itself: <quote>Vala is a new programming language
that aims to bring modern programming language features to GNOME
developers without imposing any additional runtime requirements
and without using a different ABI compared to applications and
libraries written in C.</quote>
</para>
<para>
The syntax of Vala is similar to C#. The available compiler
translates Vala into GObject C code. It can also compile
non-GObject C, using plain C API.
</para>
</chapter>
<chapter id="tools-gob">
<title>GObject builder</title>
<para>
In order to help a GObject class developer, one obvious idea is
to use some sort of templates for the skeletons and then run
them through a special tool to generate the real C files. <ulink
url="path_to_url">GOB</ulink> (or GOB2) is
such a tool. It is a preprocessor which can be used to build
GObjects with inline C code so that there is no need to edit the
generated C code. The syntax is inspired by Java and Yacc or
Lex. The implementation is intentionally kept simple: the inline C
code provided by the user is not parsed.
</para>
</chapter>
<chapter id="tools-ginspector">
<title>Graphical inspection of GObjects</title>
<para>
Yet another tool that you may find helpful when working with
GObjects is <ulink
url="path_to_url">G-Inspector</ulink>. It
is able to display GLib/GTK+ objects and their properties.
</para>
</chapter>
<chapter id="tools-refdb">
<title>Debugging reference count problems</title>
<para>
The reference counting scheme used by GObject does solve quite
a few memory management problems but also introduces new sources of bugs.
In large applications, finding the exact spot where the reference count
of an Object is not properly handled can be very difficult.
</para>
<para>
A useful tool in debugging reference counting problems is to
set breakpoints in gdb on g_object_ref() and g_object_unref().
Once you know the address of the object you are interested in,
you can make the breakpoints conditional:
<programlisting>
break g_object_ref if _object == 0xcafebabe
break g_object_unref if _object == 0xcafebabe
</programlisting>
</para>
</chapter>
<chapter id="tools-gtkdoc">
<title>Writing API docs</title>
<para>The API documentation for most of the GLib, GObject, GTK+ and GNOME
libraries is built with a combination of complex tools. Typically, the part of
the documentation which describes the behavior of each function is extracted
from the specially-formatted source code comments by a tool named gtk-doc which
generates DocBook XML and merges this DocBook XML with a set of master XML
DocBook files. These XML DocBook files are finally processed with xsltproc
(a small program part of the libxslt library) to generate the final HTML
output. Other tools can be used to generate PDF output from the source XML.
The following code excerpt shows what these comments look like.
<informalexample><programlisting>
/**
* gtk_widget_freeze_child_notify:
* @widget: a #GtkWidget
*
* Stops emission of "child-notify" signals on @widget. The signals are
* queued until gtk_widget_thaw_child_notify() is called on @widget.
*
* This is the analogue of g_object_freeze_notify() for child properties.
**/
void
gtk_widget_freeze_child_notify (GtkWidget *widget)
{
...
</programlisting></informalexample>
</para>
<para>
Thorough
<ulink url="path_to_url">documentation</ulink>
on how to set up and use gtk-doc in your project is provided on the
<ulink url="path_to_url">GNOME developer website</ulink>.
</para>
</chapter>
</part>
``` | /content/code_sandbox/utilities/glib/docs/reference/gobject/tut_tools.xml | xml | 2016-10-27T09:31:28 | 2024-08-16T19:00:35 | nexmon | seemoo-lab/nexmon | 2,381 | 1,143 |
```xml
import React, { FunctionComponent } from "react";
const ViewOffIcon: FunctionComponent = () => {
// path_to_url
return (
<svg xmlns="path_to_url" viewBox="-0.25 -0.25 24.5 24.5">
<g>
<line
x1="2.78"
y1="21"
x2="21.53"
y2="3"
fill="none"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
></line>
<path
d="M9,19.05a9.91,9.91,0,0,0,3,.45c4.1.07,8.26-2.81,10.82-5.64a1.65,1.65,0,0,0,0-2.22,20.06,20.06,0,0,0-3.07-2.76"
fill="none"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
></path>
<path
d="M17.09,7.27A11.31,11.31,0,0,0,12,6C8,5.93,3.8,8.75,1.18,11.64a1.65,1.65,0,0,0,0,2.22,20,20,0,0,0,4.93,4"
fill="none"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
></path>
<path
d="M9,15.07a3.85,3.85,0,0,1,5.5-5.28"
fill="none"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
></path>
<path
d="M15.75,12.75h0A3.75,3.75,0,0,1,12,16.5"
fill="none"
stroke="currentColor"
strokeLinecap="round"
strokeLinejoin="round"
></path>
</g>
</svg>
);
};
export default ViewOffIcon;
``` | /content/code_sandbox/client/src/core/client/ui/components/icons/ViewOffIcon.tsx | xml | 2016-10-31T16:14:05 | 2024-08-06T16:15:57 | talk | coralproject/talk | 1,881 | 504 |
```xml
import {
IPropertyPaneCustomFieldProps,
IWebPartContext
} from '@microsoft/sp-webpart-base';
/**
* Complex object to define property in a web part
*/
export interface IPropertyPaneViewSelectorProps {
/**
* Selected list id
*/
listId: string;
/**
* Selected view id
*/
viewId: string;
}
/**
* PropertyPaneViewSelector component public props
*/
export interface IPropertyPaneViewSelectorFieldProps {
/**
* web part context
*/
wpContext: IWebPartContext;
/**
* selected list id
*/
listId: string;
/**
* selected view id
*/
viewId: string;
/**
* onPropertyChange event handler
*/
onPropertyChange: (propertyPath: string, newValue: any) => void;
/**
* Label to show in list dropdown
*/
listLabel: string;
/**
* Label to show in view dropdown
*/
viewLabel: string;
}
/**
* PropertyPaneViewSelector component internal props
*/
export interface IPropertyPaneViewSelectorFieldPropsInternal extends IPropertyPaneCustomFieldProps {
/**
* Path to target property in web part properties
*/
targetProperty: string;
/**
* web part context
*/
wpContext: IWebPartContext;
/**
* selected list id
*/
listId: string;
/**
* selected view id
*/
viewId: string;
/**
* onPropertyChange event handler
*/
onPropertyChange: (propertyPath: string, newValue: any) => void;
/**
* Label to show in list dropdown
*/
listLabel: string;
/**
* Label to show in view dropdown
*/
viewLabel: string;
}
``` | /content/code_sandbox/samples/knockout-dependent-properties/src/webparts/depProps/controls/Common.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 393 |
```xml
/// <reference types="./css" />
/// <reference types="./macro" />
/// <reference types="./style" />
/// <reference types="./global" />
declare module 'styled-jsx' {
import type { JSX } from "react";
export type StyledJsxStyleRegistry = {
styles(options?: { nonce?: string }): JSX.Element[]
flush(): void
add(props: any): void
remove(props: any): void
}
export function useStyleRegistry(): StyledJsxStyleRegistry
export function StyleRegistry({
children,
registry
}: {
children: JSX.Element | import('react').ReactNode
registry?: StyledJsxStyleRegistry
}): JSX.Element
export function createStyleRegistry(): StyledJsxStyleRegistry
}
``` | /content/code_sandbox/index.d.ts | xml | 2016-12-05T13:58:02 | 2024-08-14T09:15:42 | styled-jsx | vercel/styled-jsx | 7,675 | 165 |
```xml
import {EventEmitter, Injectable} from '@angular/core';
import {BehaviorSubject} from 'rxjs';
import {JobProgressDTO, JobProgressStates, OnTimerJobProgressDTO,} from '../../../../common/entities/job/JobProgressDTO';
import {NetworkService} from '../../model/network/network.service';
import {JobScheduleDTO} from '../../../../common/entities/job/JobScheduleDTO';
import {JobDTO, JobDTOUtils, JobStartDTO} from '../../../../common/entities/job/JobDTO';
import {BackendtextService} from '../../model/backendtext.service';
import {NotificationService} from '../../model/notification.service';
import {DynamicConfig} from '../../../../common/entities/DynamicConfig';
@Injectable()
export class ScheduledJobsService {
public progress: BehaviorSubject<Record<string, OnTimerJobProgressDTO>>;
public onJobFinish: EventEmitter<string> = new EventEmitter<string>();
timer: number = null;
public availableJobs: BehaviorSubject<JobDTO[]>;
public availableMessengers: BehaviorSubject<string[]>;
public jobStartingStopping: { [key: string]: boolean } = {};
private subscribers = 0;
constructor(
private networkService: NetworkService,
private notification: NotificationService,
private backendTextService: BackendtextService
) {
this.progress = new BehaviorSubject({});
this.availableJobs = new BehaviorSubject([]);
this.availableMessengers = new BehaviorSubject([]);
}
public isValidJob(name: string): boolean {
return !!this.availableJobs.value.find(j => j.Name === name);
}
public async getAvailableJobs(): Promise<void> {
this.availableJobs.next(
await this.networkService.getJson<JobDTO[]>('/admin/jobs/available')
);
}
public async getAvailableMessengers(): Promise<void> {
this.availableMessengers.next(
await this.networkService.getJson<string[]>('/admin/messengers/available')
);
}
public getConfigTemplate(JobName: string): DynamicConfig[] {
const job = this.availableJobs.value.find(
(t) => t.Name === JobName
);
if (job && job.ConfigTemplate && job.ConfigTemplate.length > 0) {
return job.ConfigTemplate;
}
return null;
}
public getDefaultConfig(jobName: string): Record<string, unknown> {
const ct = this.getConfigTemplate(jobName);
if (!ct) {
return null;
}
const config = {} as Record<string, unknown>;
ct.forEach(c => config[c.id] = c.defaultValue);
return config;
}
getProgress(schedule: JobScheduleDTO): JobProgressDTO {
return this.progress.value[
JobDTOUtils.getHashName(schedule.jobName, schedule.config)
];
}
subscribeToProgress(): void {
this.incSubscribers();
}
unsubscribeFromProgress(): void {
this.decSubscribers();
}
public async forceUpdate(): Promise<void> {
return await this.loadProgress();
}
public async start(
jobName: string,
config?: Record<string, unknown>,
soloRun = false,
allowParallelRun = false
): Promise<void> {
try {
this.jobStartingStopping[jobName] = true;
await this.networkService.postJson(
'/admin/jobs/scheduled/' + jobName + '/start',
{
config,
allowParallelRun,
soloRun,
} as JobStartDTO
);
// placeholder to force showing running job
this.addDummyProgress(jobName, config);
} finally {
delete this.jobStartingStopping[jobName];
this.forceUpdate();
}
}
public async stop(jobName: string): Promise<void> {
this.jobStartingStopping[jobName] = true;
await this.networkService.postJson(
'/admin/jobs/scheduled/' + jobName + '/stop'
);
delete this.jobStartingStopping[jobName];
this.forceUpdate();
}
protected async loadProgress(): Promise<void> {
const prevPrg = this.progress.value;
this.progress.next(
await this.networkService.getJson<{ [key: string]: JobProgressDTO }>(
'/admin/jobs/scheduled/progress'
)
);
for (const prg of Object.keys(prevPrg)) {
if (
// eslint-disable-next-line no-prototype-builtins
!(this.progress.value).hasOwnProperty(prg) ||
// state changed from running to finished
((prevPrg[prg].state === JobProgressStates.running ||
prevPrg[prg].state === JobProgressStates.cancelling) &&
!(
this.progress.value[prg].state === JobProgressStates.running ||
this.progress.value[prg].state === JobProgressStates.cancelling
))
) {
this.onJobFinish.emit(prg);
if (this.progress.value[prg].state === JobProgressStates.failed) {
this.notification.warning(
$localize`Job failed` +
': ' +
this.backendTextService.getJobName(prevPrg[prg].jobName)
);
} else {
this.notification.success(
$localize`Job finished` +
': ' +
this.backendTextService.getJobName(prevPrg[prg].jobName)
);
}
}
}
}
protected isAnyJobRunning(): boolean {
return Object.values(this.progress.value)
.findIndex(p => p.state === JobProgressStates.running ||
p.state === JobProgressStates.cancelling) !== -1;
}
protected getProgressPeriodically(): void {
if (this.timer != null || this.subscribers === 0) {
return;
}
let repeatTime = 5000;
if (!this.isAnyJobRunning()) {
repeatTime = 15000;
}
this.timer = window.setTimeout(async () => {
this.timer = null;
this.getProgressPeriodically();
}, repeatTime);
this.loadProgress().catch(console.error);
}
private addDummyProgress(jobName: string, config: any): void {
const prgs = this.progress.value;
prgs[JobDTOUtils.getHashName(jobName, config)] = {
jobName,
state: JobProgressStates.running,
HashName: JobDTOUtils.getHashName(jobName, config),
logs: [],
steps: {
skipped: 0,
processed: 0,
all: 0,
},
time: {
start: Date.now(),
end: Date.now(),
},
};
this.progress.next(prgs);
}
private incSubscribers(): void {
this.subscribers++;
this.getProgressPeriodically();
}
private decSubscribers(): void {
this.subscribers--;
}
}
``` | /content/code_sandbox/src/frontend/app/ui/settings/scheduled-jobs.service.ts | xml | 2016-03-12T11:46:41 | 2024-08-16T19:56:44 | pigallery2 | bpatrik/pigallery2 | 1,727 | 1,423 |
```xml
import { defineConfig, mergeConfig } from 'vitest/config';
import { vitestCommonConfig } from '../../vitest.workspace';
export default mergeConfig(
vitestCommonConfig,
defineConfig({
// Add custom config here
})
);
``` | /content/code_sandbox/code/lib/blocks/vitest.config.ts | xml | 2016-03-18T04:23:44 | 2024-08-16T19:22:08 | storybook | storybookjs/storybook | 83,755 | 53 |
```xml
export { VTextField } from './VTextField'
``` | /content/code_sandbox/packages/vuetify/src/components/VTextField/index.ts | xml | 2016-09-12T00:39:35 | 2024-08-16T20:06:39 | vuetify | vuetifyjs/vuetify | 39,539 | 11 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="path_to_url"
android:id="@+id/dialog_radio_holder"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/dialog_wrapper"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<RadioGroup
android:id="@+id/dialog_radio_group"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/activity_margin"
android:paddingTop="@dimen/normal_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/normal_margin" />
<ImageView
android:id="@+id/dialog_radio_divider"
android:layout_width="match_parent"
android:layout_height="@dimen/divider_height"
android:background="@color/divider_grey"
android:importantForAccessibility="no" />
<com.simplemobiletools.commons.views.MyTextView
android:id="@+id/dialog_manage_event_types"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/ripple_background"
android:paddingStart="@dimen/big_margin"
android:paddingTop="@dimen/activity_margin"
android:paddingEnd="@dimen/activity_margin"
android:paddingBottom="@dimen/activity_margin"
android:text="@string/manage_event_types" />
</LinearLayout>
</ScrollView>
``` | /content/code_sandbox/app/src/main/res/layout/dialog_select_event_type.xml | xml | 2016-01-26T21:02:54 | 2024-08-15T00:35:32 | Simple-Calendar | SimpleMobileTools/Simple-Calendar | 3,512 | 339 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="path_to_url"
xmlns:tools="path_to_url"
android:id="@+id/activity_tab_fragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
tools:context="q.rorbin.verticaltablayoutdemo.TabFragmentActivity">
<q.rorbin.verticaltablayout.VerticalTabLayout
android:id="@+id/tablayout"
android:layout_width="0dp"
android:layout_weight="0.3"
android:layout_height="match_parent"
android:background="#EFEFEF"/>
<FrameLayout
android:id="@+id/fragment_container"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="1" />
</LinearLayout>
``` | /content/code_sandbox/verticaltablayoutdemo/src/main/res/layout/activity_tab_fragment.xml | xml | 2016-08-04T10:38:20 | 2024-08-09T11:22:09 | VerticalTabLayout | qstumn/VerticalTabLayout | 1,225 | 191 |
```xml
import { checkPermission } from '@erxes/api-utils/src/permissions';
import { ICommonParams } from '../../../models/definitions/common';
import { IContext } from '../../../connectionResolver';
import { paginate } from '@erxes/api-utils/src/core';
interface IParams extends ICommonParams {
voucherCampaignId: string;
}
const generateFilter = (params: IParams) => {
const filter: any = {};
if (params.campaignId) {
filter.campaignId = params.campaignId;
}
if (params.status) {
filter.status = params.status;
}
if (params.ownerType) {
filter.ownerType = params.ownerType;
}
if (params.ownerId) {
filter.ownerId = params.ownerId;
}
if (params.voucherCampaignId) {
filter.voucherCampaignId = params.voucherCampaignId;
}
return filter;
};
const spinQueries = {
async spins(_root, params: IParams, { models }: IContext) {
const filter: any = generateFilter(params);
return paginate(models.Spins.find(filter), params);
},
async spinsMain(_root, params: IParams, { models }: IContext) {
const filter: any = generateFilter(params);
const list = await paginate(models.Spins.find(filter), params);
const totalCount = await models.Spins.find(filter).countDocuments();
return {
list,
totalCount
};
}
};
checkPermission(spinQueries, 'spinsMain', 'showLoyalties', {
list: [],
totalCount: 0
});
export default spinQueries;
``` | /content/code_sandbox/packages/plugin-loyalties-api/src/graphql/resolvers/queries/spins.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 344 |
```xml
export const input = {
title: 'Referencing',
type: 'object',
properties: {
foo: {
$ref: 'test/resources/ReferencedType.json',
},
},
required: ['foo'],
additionalProperties: false,
}
export const options = {
declareExternallyReferenced: true,
}
``` | /content/code_sandbox/test/e2e/ref.1a.ts | xml | 2016-03-22T03:56:58 | 2024-08-12T18:37:05 | json-schema-to-typescript | bcherny/json-schema-to-typescript | 2,877 | 72 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="path_to_url"
android:shape="rectangle">
<solid android:color="@android:color/white" />
<stroke
android:width="1dp"
android:color="@color/diary_photo_layout_boarder" />
<corners android:radius="3dp" />
<padding
android:bottom="5dp"
android:left="5dp"
android:right="5dp"
android:top="5dp" />
</shape>
``` | /content/code_sandbox/app/src/main/res/drawable/diary_photo_bg.xml | xml | 2016-11-04T02:04:13 | 2024-08-07T01:13:41 | MyDiary | DaxiaK/MyDiary | 1,580 | 123 |
```xml
import type { LoadComponentsReturnType } from '../load-components'
import type { ServerRuntime, SizeLimit } from '../../types'
import type { NextConfigComplete } from '../../server/config-shared'
import type { ClientReferenceManifest } from '../../build/webpack/plugins/flight-manifest-plugin'
import type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin'
import type { ParsedUrlQuery } from 'querystring'
import type { AppPageModule } from '../route-modules/app-page/module'
import type { SwrDelta } from '../lib/revalidate'
import type { LoadingModuleData } from '../../shared/lib/app-router-context.shared-runtime'
import type { DeepReadonly } from '../../shared/lib/deep-readonly'
import s from 'next/dist/compiled/superstruct'
import type { RequestLifecycleOpts } from '../base-server'
import type { InstrumentationOnRequestError } from '../instrumentation/types'
import type { NextRequestHint } from '../web/adapter'
import type { BaseNextRequest } from '../base-http'
import type { IncomingMessage } from 'http'
export type DynamicParamTypes =
| 'catchall'
| 'catchall-intercepted'
| 'optional-catchall'
| 'dynamic'
| 'dynamic-intercepted'
const dynamicParamTypesSchema = s.enums(['c', 'ci', 'oc', 'd', 'di'])
export type DynamicParamTypesShort = s.Infer<typeof dynamicParamTypesSchema>
const segmentSchema = s.union([
s.string(),
s.tuple([s.string(), s.string(), dynamicParamTypesSchema]),
])
export type Segment = s.Infer<typeof segmentSchema>
// unfortunately the tuple is not understood well by Describe so we have to
// use any here. This does not have any impact on the runtime type since the validation
// does work correctly.
export const flightRouterStateSchema: s.Describe<any> = s.tuple([
segmentSchema,
s.record(
s.string(),
s.lazy(() => flightRouterStateSchema)
),
s.optional(s.nullable(s.string())),
s.optional(s.nullable(s.union([s.literal('refetch'), s.literal('refresh')]))),
s.optional(s.boolean()),
])
/**
* Router state
*/
export type FlightRouterState = [
segment: Segment,
parallelRoutes: { [parallelRouterKey: string]: FlightRouterState },
url?: string | null,
/*
/* "refresh" and "refetch", despite being similarly named, have different semantics.
* - "refetch" is a server indicator which informs where rendering should start from.
* - "refresh" is a client router indicator that it should re-fetch the data from the server for the current segment.
* It uses the "url" property above to determine where to fetch from.
*/
refresh?: 'refetch' | 'refresh' | null,
isRootLayout?: boolean,
]
/**
* Individual Flight response path
*/
export type FlightSegmentPath =
// Uses `any` as repeating pattern can't be typed.
| any[]
// Looks somewhat like this
| [
segment: Segment,
parallelRouterKey: string,
segment: Segment,
parallelRouterKey: string,
segment: Segment,
parallelRouterKey: string,
]
/**
* Represents a tree of segments and the Flight data (i.e. React nodes) that
* correspond to each one. The tree is isomorphic to the FlightRouterState;
* however in the future we want to be able to fetch arbitrary partial segments
* without having to fetch all its children. So this response format will
* likely change.
*/
export type CacheNodeSeedData = [
segment: Segment,
node: React.ReactNode | null,
parallelRoutes: {
[parallelRouterKey: string]: CacheNodeSeedData | null
},
loading: LoadingModuleData,
]
export type FlightDataPath =
// Uses `any` as repeating pattern can't be typed.
| any[]
// Looks somewhat like this
| [
// Holds full path to the segment.
...FlightSegmentPath[],
/* segment of the rendered slice: */ Segment,
/* treePatch */ FlightRouterState,
/* cacheNodeSeedData */ CacheNodeSeedData, // Can be null during prefetch if there's no loading component
/* head */ React.ReactNode | null,
]
/**
* The Flight response data
*/
export type FlightData = Array<FlightDataPath> | string
export type ActionResult = Promise<any>
export type ServerOnInstrumentationRequestError = (
error: unknown,
// The request could be middleware, node server or web server request,
// we normalized them into an aligned format to `onRequestError` API later.
request: NextRequestHint | BaseNextRequest | IncomingMessage,
errorContext: Parameters<InstrumentationOnRequestError>[2]
) => void | Promise<void>
export interface RenderOptsPartial {
err?: Error | null
dev?: boolean
buildId: string
basePath: string
trailingSlash: boolean
clientReferenceManifest?: DeepReadonly<ClientReferenceManifest>
supportsDynamicResponse: boolean
runtime?: ServerRuntime
serverComponents?: boolean
enableTainting?: boolean
assetPrefix?: string
crossOrigin?: '' | 'anonymous' | 'use-credentials' | undefined
nextFontManifest?: DeepReadonly<NextFontManifest>
isBot?: boolean
incrementalCache?: import('../lib/incremental-cache').IncrementalCache
setAppIsrStatus?: (key: string, value: false | number | null) => void
isRevalidate?: boolean
nextExport?: boolean
nextConfigOutput?: 'standalone' | 'export'
onInstrumentationRequestError?: ServerOnInstrumentationRequestError
isDraftMode?: boolean
deploymentId?: string
onUpdateCookies?: (cookies: string[]) => void
loadConfig?: (
phase: string,
dir: string,
customConfig?: object | null,
rawConfig?: boolean,
silent?: boolean
) => Promise<NextConfigComplete>
serverActions?: {
bodySizeLimit?: SizeLimit
allowedOrigins?: string[]
}
params?: ParsedUrlQuery
isPrefetch?: boolean
experimental: {
/**
* When true, it indicates that the current page supports partial
* prerendering.
*/
isRoutePPREnabled?: boolean
swrDelta: SwrDelta | undefined
clientTraceMetadata: string[] | undefined
after: boolean
}
postponed?: string
/**
* When true, only the static shell of the page will be rendered. This will
* also enable other debugging features such as logging in development.
*/
isDebugStaticShell?: boolean
/**
* When true, the page will be rendered using the static rendering to detect
* any dynamic API's that would have stopped the page from being fully
* statically generated.
*/
isDebugDynamicAccesses?: boolean
/**
* The maximum length of the headers that are emitted by React and added to
* the response.
*/
reactMaxHeadersLength: number | undefined
isStaticGeneration?: boolean
}
export type RenderOpts = LoadComponentsReturnType<AppPageModule> &
RenderOptsPartial &
RequestLifecycleOpts
export type PreloadCallbacks = (() => void)[]
export type InitialRSCPayload = {
/** buildId */
b: string
/** assetPrefix */
p: string
/** initialCanonicalUrl */
c: string
/** couldBeIntercepted */
i: boolean
/** initialFlightData */
f: FlightDataPath[]
/** missingSlots */
m: Set<string> | undefined
/** GlobalError */
G: React.ComponentType<any>
/** postponed */
s: boolean
}
// Response from `createFromFetch` for normal rendering
export type NavigationFlightResponse = {
/** buildId */
b: string
/** flightData */
f: FlightData
}
// Response from `createFromFetch` for server actions. Action's flight data can be null
export type ActionFlightResponse = {
/** actionResult */
a: ActionResult
/** buildId */
b: string
/** flightData */
f: FlightData | null
}
export type FetchServerResponseResult = {
flightData: FlightData
canonicalUrl: URL | undefined
couldBeIntercepted: boolean
isPrerender: boolean
postponed: boolean
}
export type RSCPayload =
| InitialRSCPayload
| NavigationFlightResponse
| ActionFlightResponse
``` | /content/code_sandbox/packages/next/src/server/app-render/types.ts | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 1,852 |
```xml
import type { AdornmentSide, AdornmentType } from './enums';
export type AdornmentConfig = {
side: AdornmentSide;
type: AdornmentType;
};
export type AdornmentStyleAdjustmentForNativeInput = {
adornmentStyleAdjustmentForNativeInput: Array<
{ paddingRight: number; paddingLeft: number } | {}
>;
};
``` | /content/code_sandbox/src/components/TextInput/Adornment/types.tsx | xml | 2016-10-19T05:56:53 | 2024-08-16T08:48:04 | react-native-paper | callstack/react-native-paper | 12,646 | 78 |
```xml
<dict>
<key>LayoutID</key>
<integer>92</integer>
<key>PathMapRef</key>
<array>
<dict>
<key>CodecID</key>
<array>
<integer>283904146</integer>
</array>
<key>Headphone</key>
<dict/>
<key>Inputs</key>
<array>
<string>Mic</string>
<string>LineIn</string>
<string>SPDIFIn</string>
</array>
<key>IntSpeaker</key>
<dict/>
<key>LineIn</key>
<dict>
<key>MuteGPIO</key>
<integer>1342242841</integer>
<key>SignalProcessing</key>
<dict>
<key>SoftwareDSP</key>
<dict>
<key>DspFunction0</key>
<dict>
<key>FunctionInfo</key>
<dict>
<key>DspFuncInstance</key>
<integer>0</integer>
<key>DspFuncName</key>
<string>DspNoiseReduction</string>
<key>DspFuncProcessingIndex</key>
<integer>0</integer>
</dict>
<key>ParameterInfo</key>
<dict>
<key>1</key>
<integer>0</integer>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>0</integer>
<key>4</key>
<integer>-1111411312</integer>
</dict>
<key>PatchbayInfo</key>
<dict/>
</dict>
<key>DspFunction1</key>
<dict>
<key>FunctionInfo</key>
<dict>
<key>DspFuncInstance</key>
<integer>1</integer>
<key>DspFuncName</key>
<string>DspEqualization32</string>
<key>DspFuncProcessingIndex</key>
<integer>1</integer>
</dict>
<key>ParameterInfo</key>
<dict>
<key>1</key>
<integer>0</integer>
<key>Filter</key>
<array>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>0</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>1</integer>
<key>6</key>
<integer>1120723891</integer>
<key>7</key>
<integer>1060439283</integer>
<key>8</key>
<integer>0</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>1</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1133968303</integer>
<key>7</key>
<integer>1084477243</integer>
<key>8</key>
<integer>-1080988787</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>2</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1150664980</integer>
<key>7</key>
<integer>1098102506</integer>
<key>8</key>
<integer>-1073195820</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>3</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1148869092</integer>
<key>7</key>
<integer>1091475860</integer>
<key>8</key>
<integer>-1076223660</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>4</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1142287878</integer>
<key>7</key>
<integer>1085842969</integer>
<key>8</key>
<integer>-1079797505</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>5</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1171916736</integer>
<key>7</key>
<integer>1096762195</integer>
<key>8</key>
<integer>-1082229705</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>6</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>6</integer>
<key>6</key>
<integer>1184316119</integer>
<key>7</key>
<integer>1109056511</integer>
<key>8</key>
<integer>-1045200702</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>7</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1139168842</integer>
<key>7</key>
<integer>1089375144</integer>
<key>8</key>
<integer>-1082229705</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>8</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1169906445</integer>
<key>7</key>
<integer>1092320018</integer>
<key>8</key>
<integer>-1086994832</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>9</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1174300519</integer>
<key>7</key>
<integer>1100485297</integer>
<key>8</key>
<integer>-1084612268</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>10</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1153948405</integer>
<key>7</key>
<integer>1086231536</integer>
<key>8</key>
<integer>-1079797505</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>0</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>1</integer>
<key>6</key>
<integer>1120723891</integer>
<key>7</key>
<integer>1060439283</integer>
<key>8</key>
<integer>0</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>1</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1133968303</integer>
<key>7</key>
<integer>1084477243</integer>
<key>8</key>
<integer>-1080988787</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>2</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1150664980</integer>
<key>7</key>
<integer>1098102506</integer>
<key>8</key>
<integer>-1073195820</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>3</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1148869092</integer>
<key>7</key>
<integer>1091475860</integer>
<key>8</key>
<integer>-1076223660</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>4</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1142287878</integer>
<key>7</key>
<integer>1085842969</integer>
<key>8</key>
<integer>-1079797505</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>5</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1171916736</integer>
<key>7</key>
<integer>1096762195</integer>
<key>8</key>
<integer>-1082229705</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>6</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>6</integer>
<key>6</key>
<integer>1184316119</integer>
<key>7</key>
<integer>1109056511</integer>
<key>8</key>
<integer>-1045200702</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>7</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1139168842</integer>
<key>7</key>
<integer>1089375144</integer>
<key>8</key>
<integer>-1082229705</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>8</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1169906445</integer>
<key>7</key>
<integer>1092320018</integer>
<key>8</key>
<integer>-1086994832</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>9</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1174300519</integer>
<key>7</key>
<integer>1100485297</integer>
<key>8</key>
<integer>-1084612268</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>10</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1153948405</integer>
<key>7</key>
<integer>1086231536</integer>
<key>8</key>
<integer>-1079797505</integer>
</dict>
</array>
</dict>
<key>PatchbayInfo</key>
<dict>
<key>InputPort0</key>
<dict>
<key>PortInstance</key>
<integer>0</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>0</integer>
<key>SourcePortIndex</key>
<integer>0</integer>
</dict>
<key>InputPort1</key>
<dict>
<key>PortInstance</key>
<integer>1</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>0</integer>
<key>SourcePortIndex</key>
<integer>1</integer>
</dict>
</dict>
</dict>
<key>DspFunction2</key>
<dict>
<key>FunctionInfo</key>
<dict>
<key>DspFuncInstance</key>
<integer>2</integer>
<key>DspFuncName</key>
<string>DspGainStage</string>
<key>DspFuncProcessingIndex</key>
<integer>2</integer>
</dict>
<key>ParameterInfo</key>
<dict>
<key>1</key>
<integer>0</integer>
<key>2</key>
<integer>1065353216</integer>
<key>3</key>
<integer>1065353216</integer>
</dict>
<key>PatchbayInfo</key>
<dict>
<key>InputPort0</key>
<dict>
<key>PortInstance</key>
<integer>0</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>1</integer>
<key>SourcePortIndex</key>
<integer>0</integer>
</dict>
<key>InputPort1</key>
<dict>
<key>PortInstance</key>
<integer>1</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>1</integer>
<key>SourcePortIndex</key>
<integer>1</integer>
</dict>
</dict>
</dict>
<key>DspFunction3</key>
<dict>
<key>FunctionInfo</key>
<dict>
<key>DspFuncInstance</key>
<integer>3</integer>
<key>DspFuncName</key>
<string>DspMultibandDRC</string>
<key>DspFuncProcessingIndex</key>
<integer>3</integer>
</dict>
<key>ParameterInfo</key>
<dict>
<key>1</key>
<integer>0</integer>
<key>Crossover</key>
<dict>
<key>4</key>
<integer>1</integer>
<key>5</key>
<integer>0</integer>
<key>6</key>
<integer>1128792064</integer>
</dict>
<key>Limiter</key>
<array>
<dict>
<key>10</key>
<integer>-1068807345</integer>
<key>11</key>
<integer>1097982434</integer>
<key>12</key>
<integer>-1038380141</integer>
<key>13</key>
<integer>1068906038</integer>
<key>14</key>
<integer>-1036233644</integer>
<key>15</key>
<integer>1065353216</integer>
<key>16</key>
<integer>1101004800</integer>
<key>17</key>
<integer>1101004800</integer>
<key>18</key>
<integer>1128792064</integer>
<key>19</key>
<integer>1101004800</integer>
<key>2</key>
<integer>1</integer>
<key>20</key>
<integer>1127866850</integer>
<key>21</key>
<integer>0</integer>
<key>22</key>
<integer>0</integer>
<key>23</key>
<integer>1</integer>
<key>3</key>
<integer>0</integer>
<key>7</key>
<integer>0</integer>
<key>8</key>
<integer>0</integer>
<key>9</key>
<integer>0</integer>
</dict>
</array>
</dict>
<key>PatchbayInfo</key>
<dict>
<key>InputPort0</key>
<dict>
<key>PortInstance</key>
<integer>0</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>2</integer>
<key>SourcePortIndex</key>
<integer>0</integer>
</dict>
<key>InputPort1</key>
<dict>
<key>PortInstance</key>
<integer>1</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>2</integer>
<key>SourcePortIndex</key>
<integer>1</integer>
</dict>
</dict>
</dict>
</dict>
</dict>
</dict>
<key>LineOut</key>
<dict/>
<key>Mic</key>
<dict>
<key>MuteGPIO</key>
<integer>1342242840</integer>
<key>SignalProcessing</key>
<dict>
<key>SoftwareDSP</key>
<dict>
<key>DspFunction0</key>
<dict>
<key>FunctionInfo</key>
<dict>
<key>DspFuncInstance</key>
<integer>0</integer>
<key>DspFuncName</key>
<string>DspNoiseReduction</string>
<key>DspFuncProcessingIndex</key>
<integer>0</integer>
</dict>
<key>ParameterInfo</key>
<dict>
<key>1</key>
<integer>0</integer>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>0</integer>
<key>4</key>
<integer>-1111411312</integer>
</dict>
<key>PatchbayInfo</key>
<dict/>
</dict>
<key>DspFunction1</key>
<dict>
<key>FunctionInfo</key>
<dict>
<key>DspFuncInstance</key>
<integer>1</integer>
<key>DspFuncName</key>
<string>DspEqualization32</string>
<key>DspFuncProcessingIndex</key>
<integer>1</integer>
</dict>
<key>ParameterInfo</key>
<dict>
<key>1</key>
<integer>0</integer>
<key>Filter</key>
<array>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>0</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>1</integer>
<key>6</key>
<integer>1120723891</integer>
<key>7</key>
<integer>1060439283</integer>
<key>8</key>
<integer>0</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>1</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1133968303</integer>
<key>7</key>
<integer>1084477243</integer>
<key>8</key>
<integer>-1080988787</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>2</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1150664980</integer>
<key>7</key>
<integer>1098102506</integer>
<key>8</key>
<integer>-1073195820</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>3</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1148869092</integer>
<key>7</key>
<integer>1091475860</integer>
<key>8</key>
<integer>-1076223660</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>4</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1142287878</integer>
<key>7</key>
<integer>1085842969</integer>
<key>8</key>
<integer>-1079797505</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>5</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1171916736</integer>
<key>7</key>
<integer>1096762195</integer>
<key>8</key>
<integer>-1082229705</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>6</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>6</integer>
<key>6</key>
<integer>1184316119</integer>
<key>7</key>
<integer>1109056511</integer>
<key>8</key>
<integer>-1045200702</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>7</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1139168842</integer>
<key>7</key>
<integer>1089375144</integer>
<key>8</key>
<integer>-1082229705</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>8</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1169906445</integer>
<key>7</key>
<integer>1092320018</integer>
<key>8</key>
<integer>-1086994832</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>9</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1174300519</integer>
<key>7</key>
<integer>1100485297</integer>
<key>8</key>
<integer>-1084612268</integer>
</dict>
<dict>
<key>2</key>
<integer>0</integer>
<key>3</key>
<integer>10</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1153948405</integer>
<key>7</key>
<integer>1086231536</integer>
<key>8</key>
<integer>-1079797505</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>0</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>1</integer>
<key>6</key>
<integer>1120723891</integer>
<key>7</key>
<integer>1060439283</integer>
<key>8</key>
<integer>0</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>1</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1133968303</integer>
<key>7</key>
<integer>1084477243</integer>
<key>8</key>
<integer>-1080988787</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>2</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1150664980</integer>
<key>7</key>
<integer>1098102506</integer>
<key>8</key>
<integer>-1073195820</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>3</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1148869092</integer>
<key>7</key>
<integer>1091475860</integer>
<key>8</key>
<integer>-1076223660</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>4</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1142287878</integer>
<key>7</key>
<integer>1085842969</integer>
<key>8</key>
<integer>-1079797505</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>5</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1171916736</integer>
<key>7</key>
<integer>1096762195</integer>
<key>8</key>
<integer>-1082229705</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>6</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>6</integer>
<key>6</key>
<integer>1184316119</integer>
<key>7</key>
<integer>1109056511</integer>
<key>8</key>
<integer>-1045200702</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>7</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1139168842</integer>
<key>7</key>
<integer>1089375144</integer>
<key>8</key>
<integer>-1082229705</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>8</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1169906445</integer>
<key>7</key>
<integer>1092320018</integer>
<key>8</key>
<integer>-1086994832</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>9</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1174300519</integer>
<key>7</key>
<integer>1100485297</integer>
<key>8</key>
<integer>-1084612268</integer>
</dict>
<dict>
<key>2</key>
<integer>1</integer>
<key>3</key>
<integer>10</integer>
<key>4</key>
<integer>0</integer>
<key>5</key>
<integer>4</integer>
<key>6</key>
<integer>1153948405</integer>
<key>7</key>
<integer>1086231536</integer>
<key>8</key>
<integer>-1079797505</integer>
</dict>
</array>
</dict>
<key>PatchbayInfo</key>
<dict>
<key>InputPort0</key>
<dict>
<key>PortInstance</key>
<integer>0</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>0</integer>
<key>SourcePortIndex</key>
<integer>0</integer>
</dict>
<key>InputPort1</key>
<dict>
<key>PortInstance</key>
<integer>1</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>0</integer>
<key>SourcePortIndex</key>
<integer>1</integer>
</dict>
</dict>
</dict>
<key>DspFunction2</key>
<dict>
<key>FunctionInfo</key>
<dict>
<key>DspFuncInstance</key>
<integer>2</integer>
<key>DspFuncName</key>
<string>DspGainStage</string>
<key>DspFuncProcessingIndex</key>
<integer>2</integer>
</dict>
<key>ParameterInfo</key>
<dict>
<key>1</key>
<integer>0</integer>
<key>2</key>
<integer>1065353216</integer>
<key>3</key>
<integer>1065353216</integer>
</dict>
<key>PatchbayInfo</key>
<dict>
<key>InputPort0</key>
<dict>
<key>PortInstance</key>
<integer>0</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>1</integer>
<key>SourcePortIndex</key>
<integer>0</integer>
</dict>
<key>InputPort1</key>
<dict>
<key>PortInstance</key>
<integer>1</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>1</integer>
<key>SourcePortIndex</key>
<integer>1</integer>
</dict>
</dict>
</dict>
<key>DspFunction3</key>
<dict>
<key>FunctionInfo</key>
<dict>
<key>DspFuncInstance</key>
<integer>3</integer>
<key>DspFuncName</key>
<string>DspMultibandDRC</string>
<key>DspFuncProcessingIndex</key>
<integer>3</integer>
</dict>
<key>ParameterInfo</key>
<dict>
<key>1</key>
<integer>0</integer>
<key>Crossover</key>
<dict>
<key>4</key>
<integer>1</integer>
<key>5</key>
<integer>0</integer>
<key>6</key>
<integer>1128792064</integer>
</dict>
<key>Limiter</key>
<array>
<dict>
<key>10</key>
<integer>-1068807345</integer>
<key>11</key>
<integer>1097982434</integer>
<key>12</key>
<integer>-1038380141</integer>
<key>13</key>
<integer>1068906038</integer>
<key>14</key>
<integer>-1036233644</integer>
<key>15</key>
<integer>1065353216</integer>
<key>16</key>
<integer>1101004800</integer>
<key>17</key>
<integer>1101004800</integer>
<key>18</key>
<integer>1128792064</integer>
<key>19</key>
<integer>1101004800</integer>
<key>2</key>
<integer>1</integer>
<key>20</key>
<integer>1127866850</integer>
<key>21</key>
<integer>0</integer>
<key>22</key>
<integer>0</integer>
<key>23</key>
<integer>1</integer>
<key>3</key>
<integer>0</integer>
<key>7</key>
<integer>0</integer>
<key>8</key>
<integer>0</integer>
<key>9</key>
<integer>0</integer>
</dict>
</array>
</dict>
<key>PatchbayInfo</key>
<dict>
<key>InputPort0</key>
<dict>
<key>PortInstance</key>
<integer>0</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>2</integer>
<key>SourcePortIndex</key>
<integer>0</integer>
</dict>
<key>InputPort1</key>
<dict>
<key>PortInstance</key>
<integer>1</integer>
<key>PortWidth</key>
<integer>1</integer>
<key>SourceFuncInstance</key>
<integer>2</integer>
<key>SourcePortIndex</key>
<integer>1</integer>
</dict>
</dict>
</dict>
</dict>
</dict>
</dict>
<key>Outputs</key>
<array>
<string>Headphone</string>
<string>IntSpeaker</string>
<string>LineOut</string>
<string>SPDIFOut</string>
</array>
<key>PathMapID</key>
<integer>892</integer>
<key>SPDIFIn</key>
<dict/>
<key>SPDIFOut</key>
<dict/>
</dict>
</array>
</dict>
``` | /content/code_sandbox/Resources/ALC892/layout92.xml | xml | 2016-03-07T20:45:58 | 2024-08-14T08:57:03 | AppleALC | acidanthera/AppleALC | 3,420 | 10,495 |
```xml
/*
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this project.
*/
import { LitElement } from 'lit';
export type ResponsiveComponent = LitElement & { layout: string; responsive: boolean; layoutStable: boolean };
export interface LayoutConfig {
layouts: string[];
initialLayout: string;
}
export function elementResize(element: HTMLElement, callbackFn: () => void) {
const observer = new ResizeObserver(() => {
// We wrap the callback in requestAnimationFrame to
// avoid the error of "ResizeObserver loop limit exceeded".
window.requestAnimationFrame(() => callbackFn());
});
observer.observe(element);
(observer as any).__testTrigger = callbackFn; // hook to trigger resize event as ResizeObserver does not run in headless chrome.
return observer;
}
export function elementVisible(element: HTMLElement, callbackFn: () => void) {
const observer = new IntersectionObserver(
entries => {
if (entries[0].isIntersecting === true) {
callbackFn();
}
},
{ threshold: [0] }
);
observer.observe(element);
return observer;
}
/**
* Given a ResponsiveComponent this function will loop through a list of layout
* options and change the layout of the component until the components layout
* condition is satisfied.
*/
export function updateComponentLayout(component: ResponsiveComponent, layoutConfig: LayoutConfig, fn: () => void) {
return elementResize(component, () => {
if (component.responsive) {
calculateOptimalLayout(component, layoutConfig).then(updated => {
if (updated) {
fn();
}
});
}
});
}
function calculateOptimalLayout(component: ResponsiveComponent, layoutConfig: LayoutConfig): Promise<boolean> {
return component.updateComplete.then(() => {
const currentLayout = component.layout;
component.layout = layoutConfig.layouts[0];
return layoutConfig.layouts
.reduce((prev, next) => {
return prev.then(() => {
if (component.layout === layoutConfig.initialLayout) {
return next;
} else {
const prev = component.layout;
component.layout = next;
return component.updateComplete.then(() => {
component.layout = component.layoutStable ? component.layout : prev;
return next;
});
}
});
}, Promise.resolve<string>(layoutConfig.layouts[0]))
.then(() => currentLayout !== component.layout);
});
}
``` | /content/code_sandbox/packages/core/src/internal/utils/responsive.ts | xml | 2016-09-29T17:24:17 | 2024-08-11T17:06:15 | clarity | vmware-archive/clarity | 6,431 | 520 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="path_to_url">
<solid android:color="@color/assist_blue" />
<corners android:radius="25.0dip" />
<padding android:left="18.0dip" android:top="6.0dip" android:right="18.0dip" android:bottom="6.0dip" />
</shape>
``` | /content/code_sandbox/app/src/main/res/drawable/shape_item_topup_pressed.xml | xml | 2016-11-21T02:35:32 | 2024-07-16T14:34:43 | likequanmintv | chenchengyin/likequanmintv | 1,050 | 100 |
```xml
<ResourceDictionary xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:uwp="using:MahApps.Metro.IconPacks">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.ForkAwesome/Themes/PackIconForkAwesome.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="uwp:PackIconForkAwesome" BasedOn="{StaticResource MahApps.Styles.PackIconForkAwesome}" />
</ResourceDictionary>
``` | /content/code_sandbox/src/MahApps.Metro.IconPacks.ForkAwesome/Themes/UAP/Generic.xaml | xml | 2016-07-17T00:10:12 | 2024-08-16T16:16:36 | MahApps.Metro.IconPacks | MahApps/MahApps.Metro.IconPacks | 1,748 | 116 |
```xml
import { Outline } from "../analysis/lsp/custom_protocol";
import { isWin } from "../constants";
import { IAmDisposable, Logger, Range } from "../interfaces";
import { ErrorNotification, GroupNotification, Notification, PrintNotification, SuiteNotification, TestDoneNotification, TestStartNotification } from "../test_protocol";
import { disposeAll, maybeUriToFilePath, uriToFilePath } from "../utils";
import { normalizeSlashes } from "../utils/fs";
import { LspTestOutlineVisitor } from "../utils/outline_lsp";
import { isSetupOrTeardownTestName } from "../utils/test";
import { SuiteData, TestModel, TestSource } from "./test_model";
/// Handles results from a test debug session and provides them to the test model.
export class TestSessionCoordinator implements IAmDisposable {
private disposables: IAmDisposable[] = [];
/// A link between a suite path and the debug session ID that owns it, so we can ensure
/// it is correctly ended when the debug session ends, even if we don't get the correct
/// end events.
private owningDebugSessions: { [key: string]: string | undefined } = {};
/// For a given debug session, lookups by IDs to get back to the suite.
private debugSessionLookups: {
[key: string]: {
suiteForID: { [key: string]: SuiteData | undefined },
suiteForTestID: { [key: string]: SuiteData | undefined },
} | undefined
} = {};
/// A link between a suite path and a visitor for visiting its latest outline data.
/// This data is refreshed when a test suite starts running.
private suiteOutlineVisitors: { [key: string]: LspTestOutlineVisitor | undefined } = {};
/// For each debug session ID, stores a mapping of phantom (empty) groups and their parent IDs so we can
/// jump over them.
private phantomGroupParents: { [key: string]: { [key: number]: number | null | undefined } } = {};
constructor(private readonly logger: Logger, private readonly data: TestModel, private readonly fileTracker: { getOutlineFor(file: { fsPath: string } | string): Outline | undefined } | undefined) { }
public handleDebugSessionCustomEvent(debugSessionID: string, dartCodeDebugSessionID: string | undefined, event: string, body?: any) {
if (event === "dart.testNotification") {
void this.handleNotification(debugSessionID, dartCodeDebugSessionID ?? `untagged-session-${debugSessionID}`, body as Notification).catch((e) => this.logger.error(e));
}
}
public handleDebugSessionEnd(debugSessionID: string, dartCodeDebugSessionID: string | undefined) {
// Get the suite paths that have us as the owning debug session.
const suitePaths = Object.keys(this.owningDebugSessions).filter((suitePath) => {
const owningSessionID = this.owningDebugSessions[suitePath];
return owningSessionID === debugSessionID;
});
// End them all and remove from the lookup.
for (const suitePath of suitePaths) {
this.handleSuiteEnd(dartCodeDebugSessionID, this.data.suites[suitePath]);
this.owningDebugSessions[suitePath] = undefined;
delete this.owningDebugSessions[suitePath];
}
}
public async handleNotification(debugSessionID: string, dartCodeDebugSessionID: string, evt: Notification): Promise<void> {
switch (evt.type) {
// We won't get notifications that aren't directly tied to Suites because
// of how the DA works.
// case "start":
// this.handleStartNotification(evt as StartNotification);
// break;
// We won't get notifications that aren't directly tied to Suites because
// of how the DA works.
// case "allSuites":
// this.handleAllSuitesNotification(evt as AllSuitesNotification);
// break;
case "suite":
const event = evt as SuiteNotification;
// HACK: Handle paths with wrong slashes.
// path_to_url
if (isWin)
event.suite.path = normalizeSlashes(event.suite.path);
this.owningDebugSessions[event.suite.path] = debugSessionID;
this.handleSuiteNotification(dartCodeDebugSessionID, event);
break;
case "testStart":
this.handleTestStartNotification(dartCodeDebugSessionID, evt as TestStartNotification);
break;
case "testDone":
this.handleTestDoneNotification(dartCodeDebugSessionID, evt as TestDoneNotification);
break;
case "group":
this.handleGroupNotification(dartCodeDebugSessionID, evt as GroupNotification);
break;
// We won't get notifications that aren't directly tied to Suites because
// of how the DA works.
// case "done":
// this.handleDoneNotification(suite, evt as DoneNotification);
// break;
case "print":
this.handlePrintNotification(dartCodeDebugSessionID, evt as PrintNotification);
break;
case "error":
this.handleErrorNotification(dartCodeDebugSessionID, evt as ErrorNotification);
break;
}
}
private handleSuiteNotification(dartCodeDebugSessionID: string, evt: SuiteNotification) {
if (!this.debugSessionLookups[dartCodeDebugSessionID])
this.debugSessionLookups[dartCodeDebugSessionID] = { suiteForID: {}, suiteForTestID: {} };
const suiteData = this.data.suiteDiscovered(dartCodeDebugSessionID, evt.suite.path);
this.debugSessionLookups[dartCodeDebugSessionID].suiteForID[evt.suite.id] = suiteData;
// Also capture the test nodes from the outline so that we can look up the full range for a test (instead of online its line/col)
// to provide to VS Code to better support "run test at cursor".
this.captureTestOutlne(evt.suite.path);
}
private captureTestOutlne(path: string) {
const visitor = new LspTestOutlineVisitor(this.logger, path);
this.suiteOutlineVisitors[path] = visitor;
const outline = this.fileTracker?.getOutlineFor(path);
if (outline)
visitor.visit(outline);
}
private handleTestStartNotification(dartCodeDebugSessionID: string, evt: TestStartNotification) {
// Skip loading tests.
if (evt.test.name?.startsWith("loading ") && !evt.test.groupIDs?.length)
return;
const suite = this.debugSessionLookups[dartCodeDebugSessionID]!.suiteForID[evt.test.suiteID];
if (!suite) {
this.logger.warn(`Could not find suite ${evt.test.suiteID} for session ${dartCodeDebugSessionID}`);
return;
}
this.debugSessionLookups[dartCodeDebugSessionID]!.suiteForTestID[evt.test.id] = suite;
/// We prefer the root location (the location inside the executed test suite) for normal tests, but for
// setup/tearDown we want to consider them in their actual locations so that failures will be attributed
// to them correctly.
// path_to_url#issuecomment-1671191742
const useRootLocation = !isSetupOrTeardownTestName(evt.test.name) && !!evt.test.root_url && !!evt.test.root_line && !!evt.test.root_column;
const path = maybeUriToFilePath(useRootLocation ? evt.test.root_url : evt.test.url);
const line = useRootLocation ? evt.test.root_line : evt.test.line;
const character = useRootLocation ? evt.test.root_column : evt.test.column;
const range = this.getRangeForNode(suite, line, character);
const groupID = evt.test.groupIDs?.length ? evt.test.groupIDs[evt.test.groupIDs.length - 1] : undefined;
this.data.testDiscovered(dartCodeDebugSessionID, suite.path, TestSource.Result, evt.test.id, evt.test.name, this.getRealGroupId(dartCodeDebugSessionID, groupID), path, range, evt.time, true);
}
private handleTestDoneNotification(dartCodeDebugSessionID: string, evt: TestDoneNotification) {
// If we don't have a test, it was likely a "loading foo.dart" test that we skipped over, so skip the result too.
const suite = this.debugSessionLookups[dartCodeDebugSessionID]?.suiteForTestID[evt.testID];
if (!suite) {
return;
}
const test = suite.getCurrentTest(dartCodeDebugSessionID, evt.testID);
if (!test)
return;
const result = evt.skipped ? "skipped" : evt.result;
this.data.testDone(dartCodeDebugSessionID, suite.path, evt.testID, result, evt.time);
}
private handleGroupNotification(dartCodeDebugSessionID: string, evt: GroupNotification) {
// Skip phantom groups.
if (!evt.group.name) {
if (dartCodeDebugSessionID) {
this.phantomGroupParents[dartCodeDebugSessionID] = this.phantomGroupParents[dartCodeDebugSessionID] || {};
this.phantomGroupParents[dartCodeDebugSessionID][evt.group.id] = evt.group.parentID ?? null; // Null signifies top-level.
}
return;
}
const suite = this.debugSessionLookups[dartCodeDebugSessionID]?.suiteForID[evt.group.suiteID];
if (!suite) {
this.logger.warn(`Could not find suite ${evt.group.suiteID} for session ${dartCodeDebugSessionID}`);
return;
}
const path = (evt.group.root_url || evt.group.url) ? uriToFilePath(evt.group.root_url || evt.group.url!) : undefined;
const line = evt.group.root_line || evt.group.line;
const character = evt.group.root_column || evt.group.column;
const range = this.getRangeForNode(suite, line, character);
this.data.groupDiscovered(dartCodeDebugSessionID, suite.path, TestSource.Result, evt.group.id, evt.group.name, this.getRealGroupId(dartCodeDebugSessionID, evt.group.parentID), path, range, true);
}
private getRealGroupId(dartCodeDebugSessionID: string, groupID: number | undefined) {
const mapping = dartCodeDebugSessionID ? this.phantomGroupParents[dartCodeDebugSessionID] : undefined;
const mappedValue = mapping && groupID ? mapping[groupID] : undefined;
// Null is a special value that means undefined top-level)
return mappedValue === null
? undefined
// Whereas a real undefined we just pass-through as it was.
: mappedValue ?? groupID;
}
private handleSuiteEnd(dartCodeDebugSessionID: string | undefined, suite: SuiteData) {
this.data.suiteDone(dartCodeDebugSessionID, suite.path);
}
private handlePrintNotification(dartCodeDebugSessionID: string, evt: PrintNotification) {
const suite = this.debugSessionLookups[dartCodeDebugSessionID]?.suiteForTestID[evt.testID];
if (!suite) {
this.logger.warn(`Could not find suite for test ${evt.testID} for session ${dartCodeDebugSessionID}`);
return;
}
const test = suite.getCurrentTest(dartCodeDebugSessionID, evt.testID);
// It's possible we'll get notifications for tests we don't track (like loading tests) - for example package:test
// may send "Consider enabling the flag chain-stack-traces to receive more detailed exceptions" against the first
// loading test.
if (!test)
return;
test.outputEvents.push(evt);
this.data.testOutput(dartCodeDebugSessionID, suite.path, evt.testID, evt.message);
}
private handleErrorNotification(dartCodeDebugSessionID: string, evt: ErrorNotification) {
const suite = this.debugSessionLookups[dartCodeDebugSessionID]?.suiteForTestID[evt.testID];
if (!suite) {
this.logger.warn(`Could not find suite for test ${evt.testID} for session ${dartCodeDebugSessionID}`);
return;
}
const test = suite.getCurrentTest(dartCodeDebugSessionID, evt.testID);
// It's possible we'll get notifications for tests we don't track (like loading tests) - for example package:test
// may send "Consider enabling the flag chain-stack-traces to receive more detailed exceptions" against the first
// loading test.
if (!test)
return;
// Flutter emits an error when tests fail which when reported to the VS Code API will result in not-so-useful text
// in the Test Error Peek window, so we suppress messages that match this pattern.
const pattern = new RegExp(`
Test failed. See exception logs above.
The test description was: .*
`.trim());
if (pattern.test(evt.error.trim()))
return;
test.outputEvents.push(evt);
this.data.testErrorOutput(dartCodeDebugSessionID, suite.path, evt.testID, evt.isFailure, evt.error, evt.stackTrace);
}
private getRangeForNode(suite: SuiteData, line: number | undefined, character: number | undefined): Range | undefined {
if (!line || !character)
return;
// VS Code is zero-based, but package:test is 1-based.
const zeroBasedLine = line - 1;
const zeroBasedCharacter = character - 1;
// In test notifications, we only get the start line/column but we need to give VS Code the full range for "Run Test at Cursor" to work.
// The outline data was captured when the suite started, so we can assume it's reasonable accurate, so try to look up the node
// there and use its range. Otherwise, just make a range that goes from the start position to the next line (assuming the rest
// of the line is the test name, and we can at least support running it there).
const testsOnLine = line ? this.suiteOutlineVisitors[suite.path]?.testsByLine[zeroBasedLine] : undefined;
const test = testsOnLine ? testsOnLine.find((t) => t.range.start.character === zeroBasedCharacter) : undefined;
const range = line && character
? test?.range ?? {
end: { line: zeroBasedLine + 1, character: zeroBasedCharacter },
start: { line: zeroBasedLine, character: zeroBasedCharacter },
} as Range
: undefined;
return range;
}
public dispose(): any {
disposeAll(this.disposables);
}
}
``` | /content/code_sandbox/src/shared/test/coordinator.ts | xml | 2016-07-30T13:49:11 | 2024-08-10T16:23:15 | Dart-Code | Dart-Code/Dart-Code | 1,472 | 3,196 |
```xml
<vector android:height="120dp" android:viewportHeight="600"
android:viewportWidth="1200" android:width="240dp" xmlns:android="path_to_url">
<path android:fillColor="#012169" android:pathData="m0,0h1200v600h-1200z"/>
<path
android:fillColor="#000"
android:pathData="m0,0 l600,300m0,-300 l-600,300"
android:strokeColor="#fff"
android:strokeWidth="60"/>
<group>
<clip-path android:pathData="m0,0v150h700v150h-100zM0,300v50h300v-350h300z"/>
<path
android:fillColor="#000"
android:pathData="m0,0 l600,300m0,-300 l-600,300"
android:strokeColor="#c8102e"
android:strokeWidth="40"/>
</group>
<path
android:fillColor="#000"
android:pathData="m0,150h700m-400,-150v350"
android:strokeColor="#fff"
android:strokeWidth="100"/>
<path
android:fillColor="#000"
android:pathData="m0,150h700m-400,-150v350"
android:strokeColor="#c8102e"
android:strokeWidth="60"/>
<path android:fillColor="#0095c8" android:pathData="m0,300h600v-300h600v600h-1200z"/>
<path android:fillColor="#fedd00" android:pathData="m645.34,490.91 l29.44,90.6 -77.07,-55.99h95.26l-77.07,55.99z"/>
<path android:fillColor="#fedd00" android:pathData="m817.46,464 l-29.44,90.6 -29.44,-90.6 77.07,55.99 -95.26,0z"/>
<path android:fillColor="#fedd00" android:pathData="m817.46,342.02 l-29.44,90.6 -29.44,-90.6 77.07,55.99 -95.26,0z"/>
<path android:fillColor="#fedd00" android:pathData="m943.47,433.17 l-29.44,90.6 -29.44,-90.6 77.07,55.99 -95.26,0z"/>
<path android:fillColor="#fedd00" android:pathData="m943.47,167.75 l-29.44,90.6 -29.44,-90.6 77.07,55.99 -95.26,0z"/>
<path android:fillColor="#fedd00" android:pathData="m996.44,339.96 l29.44,90.6 -77.07,-55.99h95.26l-77.07,55.99z"/>
<path android:fillColor="#fedd00" android:pathData="m1049.36,131.56 l-29.44,90.6 -29.44,-90.6 77.07,55.99 -95.26,0z"/>
<path android:fillColor="#fedd00" android:pathData="m1102.84,271.47 l29.44,90.6 -77.07,-55.99h95.26l-77.07,55.99z"/>
<path android:fillColor="#fedd00" android:pathData="m1102.84,37.41 l29.44,90.6 -77.07,-55.99h95.26l-77.07,55.99z"/>
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable/ic_flag_tv.xml | xml | 2016-07-02T10:44:04 | 2024-08-16T18:55:54 | StreetComplete | streetcomplete/StreetComplete | 3,781 | 861 |
```xml
import { put, select, take, takeEvery } from 'redux-saga/effects';
import {
vaultMoveAllItemsFailure,
vaultMoveAllItemsIntent,
vaultMoveAllItemsProgress,
vaultMoveAllItemsSuccess,
} from '@proton/pass/store/actions';
import { type BulkMoveItemsChannel, bulkMoveChannel } from '@proton/pass/store/sagas/items/item-bulk-move.saga';
import { selectItemsByShareId } from '@proton/pass/store/selectors';
import type { RootSagaOptions } from '@proton/pass/store/types';
import type { ItemRevision } from '@proton/pass/types';
function* moveAllItemsWorker(
{ onItemsUpdated }: RootSagaOptions,
{ payload, meta }: ReturnType<typeof vaultMoveAllItemsIntent>
) {
const { shareId, content, destinationShareId } = payload;
const itemsToMove: ItemRevision[] = yield select(selectItemsByShareId(shareId));
const channel = bulkMoveChannel(itemsToMove, destinationShareId);
while (true) {
const action: BulkMoveItemsChannel = yield take(channel);
if (action.type === 'progress') {
yield put(
vaultMoveAllItemsProgress(meta.request.id, action.progress, {
...action.data,
destinationShareId,
})
);
onItemsUpdated?.();
}
if (action.type === 'done') yield put(vaultMoveAllItemsSuccess(meta.request.id, { content }));
if (action.type === 'error') yield put(vaultMoveAllItemsFailure(meta.request.id, payload, action.error));
}
}
export default function* watcher(options: RootSagaOptions) {
yield takeEvery(vaultMoveAllItemsIntent.match, moveAllItemsWorker, options);
}
``` | /content/code_sandbox/packages/pass/store/sagas/vaults/vault-move-all-items.saga.ts | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 369 |
```xml
import { getDocument } from './dom/getDocument';
import { mergeStyles } from '@fluentui/merge-styles';
import { EventGroup } from './EventGroup';
import { getWindow } from './dom/getWindow';
let _scrollbarWidth: number;
let _bodyScrollDisabledCount = 0;
const DisabledScrollClassName = mergeStyles({
overflow: 'hidden !important' as 'hidden',
});
/**
* Placing this attribute on scrollable divs optimizes detection to know
* if the div is scrollable or not (given we can avoid expensive operations
* like getComputedStyle.)
*
* @public
*/
export const DATA_IS_SCROLLABLE_ATTRIBUTE = 'data-is-scrollable';
/**
* Allows the user to scroll within a element,
* while preventing the user from scrolling the body
*/
export const allowScrollOnElement = (element: HTMLElement | null, events: EventGroup): void => {
const window = getWindow(element);
if (!element || !window) {
return;
}
let _previousClientY = 0;
let _element: Element | null = null;
let computedStyles: CSSStyleDeclaration | undefined = window.getComputedStyle(element);
// remember the clientY for future calls of _preventOverscrolling
const _saveClientY = (event: TouchEvent): void => {
if (event.targetTouches.length === 1) {
_previousClientY = event.targetTouches[0].clientY;
}
};
// prevent the body from scrolling when the user attempts
// to scroll past the top or bottom of the element
const _preventOverscrolling = (event: TouchEvent): void => {
// only respond to a single-finger touch
if (event.targetTouches.length !== 1) {
return;
}
// prevent the body touchmove handler from firing
// so that scrolling is allowed within the element
event.stopPropagation();
if (!_element) {
return;
}
const clientY = event.targetTouches[0].clientY - _previousClientY;
const scrollableParent = findScrollableParent(event.target as HTMLElement) as HTMLElement;
if (scrollableParent && _element !== scrollableParent) {
_element = scrollableParent;
computedStyles = window.getComputedStyle(_element);
}
const scrollTop = _element.scrollTop;
const isColumnReverse = computedStyles?.flexDirection === 'column-reverse';
// if the element is scrolled to the top,
// prevent the user from scrolling up
if (scrollTop === 0 && (isColumnReverse ? clientY < 0 : clientY > 0)) {
event.preventDefault();
}
// if the element is scrolled to the bottom,
// prevent the user from scrolling down
if (
_element.scrollHeight - Math.abs(Math.ceil(scrollTop)) <= _element.clientHeight &&
(isColumnReverse ? clientY > 0 : clientY < 0)
) {
event.preventDefault();
}
};
events.on(element, 'touchstart', _saveClientY, { passive: false });
events.on(element, 'touchmove', _preventOverscrolling, { passive: false });
_element = element;
};
/**
* Same as allowScrollOnElement but does not prevent overscrolling.
*/
export const allowOverscrollOnElement = (element: HTMLElement | null, events: EventGroup): void => {
if (!element) {
return;
}
const _allowElementScroll = (event: TouchEvent) => {
event.stopPropagation();
};
events.on(element, 'touchmove', _allowElementScroll, { passive: false });
};
const _disableIosBodyScroll = (event: TouchEvent) => {
event.preventDefault();
};
/**
* Disables the body scrolling.
*
* @public
*/
export function disableBodyScroll(): void {
let doc = getDocument();
if (doc && doc.body && !_bodyScrollDisabledCount) {
doc.body.classList.add(DisabledScrollClassName);
doc.body.addEventListener('touchmove', _disableIosBodyScroll, { passive: false, capture: false });
}
_bodyScrollDisabledCount++;
}
/**
* Enables the body scrolling.
*
* @public
*/
export function enableBodyScroll(): void {
if (_bodyScrollDisabledCount > 0) {
let doc = getDocument();
if (doc && doc.body && _bodyScrollDisabledCount === 1) {
doc.body.classList.remove(DisabledScrollClassName);
doc.body.removeEventListener('touchmove', _disableIosBodyScroll);
}
_bodyScrollDisabledCount--;
}
}
/**
* Calculates the width of a scrollbar for the browser/os.
*
* @public
*/
export function getScrollbarWidth(doc?: Document): number {
if (_scrollbarWidth === undefined) {
const theDoc = doc ?? getDocument()!;
let scrollDiv: HTMLElement = theDoc.createElement('div');
scrollDiv.style.setProperty('width', '100px');
scrollDiv.style.setProperty('height', '100px');
scrollDiv.style.setProperty('overflow', 'scroll');
scrollDiv.style.setProperty('position', 'absolute');
scrollDiv.style.setProperty('top', '-9999px');
theDoc.body.appendChild(scrollDiv);
// Get the scrollbar width
_scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
// Delete the DIV
theDoc.body.removeChild(scrollDiv);
}
return _scrollbarWidth;
}
/**
* Traverses up the DOM for the element with the data-is-scrollable=true attribute, or returns
* document.body.
*
* @public
*/
export function findScrollableParent(startingElement: HTMLElement | null): HTMLElement | Window | undefined | null {
let el: HTMLElement | Window | undefined | null = startingElement;
const doc = getDocument(startingElement)!;
// First do a quick scan for the scrollable attribute.
while (el && el !== doc.body) {
if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) === 'true') {
return el;
}
el = el.parentElement;
}
// If we haven't found it, the use the slower method: compute styles to evaluate if overflow is set.
el = startingElement;
while (el && el !== doc.body) {
if (el.getAttribute(DATA_IS_SCROLLABLE_ATTRIBUTE) !== 'false') {
const computedStyles = getComputedStyle(el);
let overflowY = computedStyles ? computedStyles.getPropertyValue('overflow-y') : '';
if (overflowY && (overflowY === 'scroll' || overflowY === 'auto')) {
return el;
}
}
el = el.parentElement;
}
// Fall back to window scroll.
if (!el || el === doc.body) {
el = getWindow(startingElement);
}
return el;
}
``` | /content/code_sandbox/packages/utilities/src/scroll.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 1,447 |
```xml
if ((true as any) == (false as any)) {
}
if (("hello" as any) == ("goodbye" as any)) {
}
if ((3 as any) == (5 as any)) {
}
if ((3 as any) > (5 as any)) {
}
``` | /content/code_sandbox/tests/blocklycompiler-test/baselines/compare_literals.ts | xml | 2016-01-24T19:35:52 | 2024-08-16T16:39:39 | pxt | microsoft/pxt | 2,069 | 60 |
```xml
import { browser, by, element } from 'protractor';
export class AppPage {
navigateTo() {
return browser.get(browser.baseUrl) as Promise<any>;
}
getTitleText() {
return element(by.css('app-root h1')).getText() as Promise<string>;
}
}
``` | /content/code_sandbox/e2e/src/app.po.ts | xml | 2016-06-21T19:27:57 | 2024-08-05T15:07:44 | ng2-pdf-viewer | VadimDez/ng2-pdf-viewer | 1,291 | 62 |
```xml
import {editor, IPosition, Range} from "monaco-editor";
import {FlatElement, FlatElementPosition, FlatSchema} from "./schema.model";
import ITextModel = editor.ITextModel;
export class Editor {
static completionProvider(monaco): any {
return {
triggerCharacters: [' ', ':', '\n'],
async provideCompletionItems(model, position) {
let flatSchema: FlatSchema = monaco.languages.json.jsonDefaults._diagnosticsOptions.schemas[0].schema;
const wordInfo = model.getWordUntilPosition(position);
let currentLine = model.getLineContent(position.lineNumber);
let firstColon = currentLine.indexOf(':');
let result = [];
let currentDepthCursor = Editor.findDepth(model.getLineContent(position.lineNumber));
if (firstColon !== -1 && (position.column - 1) > firstColon) {
// Value suggestion : manage enum
result = Editor.autoCompleteValue(model, position, flatSchema, currentDepthCursor);
} else {
if (currentDepthCursor === -1) {
return {
incomplete: false,
suggestions: [],
};
}
result = Editor.autoCompleteKey(model, position, flatSchema, currentDepthCursor);
}
if (!result) {
return null;
}
return {
incomplete: false,
suggestions: result.map(r => {
return {
label: r,
kind: 13,//CompletionItemKind.Value;
insertText: r,
range: new Range(
position.lineNumber,
wordInfo.startColumn,
position.lineNumber,
wordInfo.endColumn,
)
}
}),
};
},
}
}
static autoCompleteValue(model: ITextModel, position: IPosition, flatSchema: FlatSchema, currentDepth): string[] {
let currentLineContent = model.getLineContent(position.lineNumber);
let key = currentLineContent.replace(':', '').trim();
let parents = Editor.findParent(model, position, currentDepth);
let flatEltPosition = Editor.findElement(key, parents, flatSchema.flatElements);
if (!flatEltPosition) {
return [];
}
return flatEltPosition.enum;
}
static findElement(key: string, parents: Array<string>, flatElts: FlatElement[]): FlatElementPosition {
let currentEltPosition = new FlatElementPosition();
all: for (let i=0; i<flatElts.length; i++) {
let flatElt = flatElts[i];
if (flatElt.name !== key) {
continue
}
posLoop: for (let j=0; j<flatElt.positions.length; j++) {
let eltPos = flatElt.positions[j];
if (parents.length !== eltPos.parent.length) {
continue;
}
for (let k = 0; k<eltPos.parent.length; k++) {
if (!parents[k].match(eltPos.parent[k])) {
continue posLoop
}
}
currentEltPosition = eltPos;
break all;
}
}
return currentEltPosition;
}
static findParent(model: ITextModel, position: IPosition, currentDepth: number) {
let parents = [];
for (let i = position.lineNumber; i > 0; i--) {
let currentText = model.getLineContent(i);
if (currentText.indexOf(':') === -1) {
continue
}
// if has key, find indentation
let currentLintDepth = Editor.findDepth(currentText);
if (currentLintDepth >= currentDepth) {
continue
}
// find parent key
let pkey = currentText.substring(0, currentText.indexOf(':')).trim();
parents.unshift(pkey);
currentDepth = currentLintDepth;
if (currentDepth === 0) {
break;
}
}
return parents;
}
static findDepth(text) {
let spaceNumber = 0;
for (let i = 0; i < text.length; i++) {
if (text[i] === ' ' || text[i] === '-') {
spaceNumber++;
continue;
} else {
break;
}
}
let depth = -1;
if (spaceNumber % 2 === 0) {
depth = spaceNumber / 2;
}
return depth;
}
static autoCompleteKey(model: ITextModel, position: IPosition, flatSchema: FlatSchema, currentDepthCursor: number) {
let parents = Editor.findParent(model, position, currentDepthCursor);
// Get suggestion
return Editor.findKeySuggestion(model, position, parents, flatSchema, currentDepthCursor);
}
// Exclude key that are already here
static findKeyToExclude(model: ITextModel, position: IPosition, lastParent: string, flatSchema: FlatSchema) {
// Find neighbour to know which keys are already here
let neighbour = Editor.findNeighbour(model, position);
// Exclude key from oneOf.required
let keyToExclude = [];
let parent = flatSchema.flatElements.find(e => e.name === lastParent);
if (parent && parent.oneOf) {
for (let i = 0; i < neighbour.length; i++) {
let key = neighbour[i];
if (!parent.oneOf[key]) {
continue
}
keyToExclude = Object.keys(parent.oneOf).filter(k => parent.oneOf[key].findIndex(kk => kk === k) === -1);
}
}
// Add neighbour in exclude array
keyToExclude.push(...neighbour);
return keyToExclude;
}
// Find all key at the same level/ same parent
static findNeighbour(model: ITextModel, position: IPosition) {
let neighbour = [];
let givenLine = model.getLineContent(position.lineNumber);
let nbOfSpaces = givenLine.length - givenLine.trim().length;
if (position.lineNumber > 0) {
// find neighbour before
for (let i = position.lineNumber; i >= 1; i--) {
let currentLine = model.getLineContent(i);
let currentText = currentLine.trim();
let currentSpace = currentLine.length - currentText.length;
if (currentSpace !== nbOfSpaces) {
// check if we are in a array
if (currentSpace + 2 !== nbOfSpaces || currentText.indexOf('-') !== 0) {
break;
}
currentText = currentText.substr(1, currentText.length).trim();
} else if (currentText.indexOf('-') === 0) {
continue;
}
neighbour.push(currentText.split(':')[0]);
}
}
if (position.lineNumber <= model.getLineCount()) {
if (nbOfSpaces !== 0) {
for (let i = position.lineNumber; i <= model.getLineCount(); i++) {
let currentLine = model.getLineContent(i);
let currentSpace = currentLine.length - currentLine.trim().length;
if (currentSpace !== nbOfSpaces) {
break;
}
neighbour.push(currentLine.trim().split(':')[0]);
}
} else {
for (let i = 1; i <= model.getLineCount(); i++) {
let currentLine = model.getLineContent(i);
let currentSpace = currentLine.length - currentLine.trim().length;
if (currentSpace == nbOfSpaces) {
neighbour.push(currentLine.trim().split(':')[0]);
}
}
}
}
return neighbour;
}
static findKeySuggestion(model: ITextModel, position: IPosition, parents: string[], schema: FlatSchema, depth: number) {
let eltMatchesLevel = schema.flatElements
.filter(felt => felt.positions.findIndex(p => p.depth === depth) !== -1)
.map(felt => {
felt.positions = felt.positions.filter(p => p.depth === depth);
return felt;
});
let suggestions = [];
let lastParent = parents[parents.length - 1];
if (lastParent && parents[parents.length - 1].indexOf('-') === 0) {
let lastParentTrimmed = lastParent.substring(1, lastParent.length).trim();
suggestions = schema.flatElements
.filter(elt => elt.positions.filter(p => p.depth === depth && p.parent[depth - 1] === lastParentTrimmed).length > 0)
.map(elt => elt.name);
} else {
if (lastParent && parents[parents.length - 1].indexOf('-') === 0) {
let lastParentTrimmed = lastParent.substring(1, lastParent.length).trim();
suggestions = schema.flatElements
.filter(elt => elt.positions.filter(p => p.depth === depth && p.parent[depth - 1] === lastParentTrimmed).length > 0)
.map(elt => elt.name);
} else {
// Find key to exclude from suggestion
let keyToExclude = Editor.findKeyToExclude(model, position, lastParent, schema);
// Filter suggestion ( match match and not in exclude array )
suggestions = eltMatchesLevel.map(elt => {
let keepElt = false;
for (let i = 0; i < elt.positions.length; i++) {
let parentMatch = true;
for (let j = 0; j < elt.positions[i].parent.length; j++) {
const regExp = RegExp(elt.positions[i].parent[j]);
if (!regExp.test(parents[j])) {
parentMatch = false;
break;
}
}
if (parentMatch) {
keepElt = true;
break;
}
}
if (keepElt && keyToExclude.findIndex(e => e === elt.name) === -1) {
return elt.name + ': ';
}
}).filter(elt => elt);
}
}
return suggestions;
}
}
``` | /content/code_sandbox/ui/src/app/model/editor.model.ts | xml | 2016-10-11T08:28:23 | 2024-08-16T01:55:31 | cds | ovh/cds | 4,535 | 2,131 |
```xml
import type { FullField } from '../types/index.noReact';
import { getValueSourcesUtil } from './getValueSourcesUtil';
import { toFullOption } from './toFullOption';
const f: FullField = toFullOption({ name: 'f', label: 'FullField' });
const f1: FullField = toFullOption({ name: 'f1', label: 'F1', valueSources: ['value'] });
const f2: FullField = toFullOption({ name: 'f2', label: 'F2', valueSources: ['field'] });
const f3: FullField = toFullOption({ name: 'f3', label: 'F3', valueSources: ['value', 'field'] });
const f4: FullField = toFullOption({ name: 'f4', label: 'F4', valueSources: ['field', 'value'] });
const f1f: FullField = toFullOption({ name: 'f1f', label: 'F1F', valueSources: () => ['value'] });
const f2f: FullField = toFullOption({ name: 'f2f', label: 'F2F', valueSources: () => ['field'] });
const f3f: FullField = toFullOption({
name: 'f3f',
label: 'F3F',
valueSources: () => ['value', 'field'],
});
const f4f: FullField = toFullOption({
name: 'f4f',
label: 'F4F',
valueSources: () => ['field', 'value'],
});
const f1fo: FullField = toFullOption({
name: 'f1fo',
label: 'F1FO',
valueSources: (op: string) => (op === '=' ? ['value'] : ['value']),
});
const f2fo: FullField = toFullOption({
name: 'f2fo',
label: 'F2FO',
valueSources: (op: string) => (op === '=' ? ['value'] : ['field']),
});
const f3fo: FullField = toFullOption({
name: 'f3fo',
label: 'F3FO',
valueSources: (op: string) => (op === '=' ? ['value'] : ['value', 'field']),
});
const f4fo: FullField = toFullOption({
name: 'f4fo',
label: 'F4FO',
valueSources: (op: string) => (op === '=' ? ['value'] : ['field', 'value']),
});
it('gets the correct value sources array', () => {
expect(getValueSourcesUtil(f, '=')).toEqual(['value']);
expect(getValueSourcesUtil(f, '=')).toEqual(['value']);
expect(getValueSourcesUtil(f1, '=')).toEqual(['value']);
expect(getValueSourcesUtil(f2, '=')).toEqual(['field']);
expect(getValueSourcesUtil(f3, '=')).toEqual(['value', 'field']);
expect(getValueSourcesUtil(f4, '=')).toEqual(['field', 'value']);
expect(getValueSourcesUtil(f1f, '=')).toEqual(['value']);
expect(getValueSourcesUtil(f2f, '=')).toEqual(['field']);
expect(getValueSourcesUtil(f3f, '=')).toEqual(['value', 'field']);
expect(getValueSourcesUtil(f4f, '=')).toEqual(['field', 'value']);
expect(getValueSourcesUtil(f1fo, '=')).toEqual(['value']);
expect(getValueSourcesUtil(f2fo, '=')).toEqual(['value']);
expect(getValueSourcesUtil(f3fo, '=')).toEqual(['value']);
expect(getValueSourcesUtil(f4fo, '=')).toEqual(['value']);
expect(getValueSourcesUtil(f1fo, '>')).toEqual(['value']);
expect(getValueSourcesUtil(f2fo, '>')).toEqual(['field']);
expect(getValueSourcesUtil(f3fo, '>')).toEqual(['value', 'field']);
expect(getValueSourcesUtil(f4fo, '>')).toEqual(['field', 'value']);
expect(getValueSourcesUtil(f, '=', () => ['value'])).toEqual(['value']);
});
it('calls the custom getValueSources function correctly', () => {
const getValueSources = jest.fn();
getValueSourcesUtil(f, '=', getValueSources);
expect(getValueSources).toHaveBeenCalledWith(f.name, '=', { fieldData: toFullOption(f) });
});
``` | /content/code_sandbox/packages/react-querybuilder/src/utils/getValueSourcesUtil.test.ts | xml | 2016-06-17T22:03:19 | 2024-08-16T10:28:42 | react-querybuilder | react-querybuilder/react-querybuilder | 1,131 | 931 |
```xml
import './vendor';
import createMuiTheme from '@material-ui/core/styles/createMuiTheme';
import responsiveFontSizes from '@material-ui/core/styles/responsiveFontSizes';
import ThemeProvider from '@material-ui/styles/ThemeProvider';
import * as React from 'react';
import { render } from 'react-dom';
import { Main } from './Main';
const theme = createMuiTheme({
palette: {
error: {
main: '#f44336',
},
primary: {
main: '#304FF3',
},
secondary: {
main: '#fff',
},
text: {
primary: '#191919',
secondary: '#000',
},
},
zIndex: {
appBar: 1201,
},
});
const passcoreTheme = responsiveFontSizes(theme);
render(
<ThemeProvider theme={passcoreTheme}>
<Main />
</ThemeProvider>,
document.getElementById('rootNode'),
);
``` | /content/code_sandbox/src/Unosquare.PassCore.Web/ClientApp/App.tsx | xml | 2016-01-07T21:36:00 | 2024-08-16T09:03:42 | passcore | unosquare/passcore | 1,030 | 193 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>fscheck</class>
<widget class="QDialog" name="fscheck">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>307</height>
</rect>
</property>
<property name="windowTitle">
<string>File System Check</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QPlainTextEdit" name="plainTextEdit">
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>fscheck</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>fscheck</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
``` | /content/code_sandbox/recovery/fscheck.ui | xml | 2016-03-19T14:59:48 | 2024-08-15T01:49:02 | pinn | procount/pinn | 1,085 | 495 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<e2e-test-cases>
<test-case sql="CREATE USER 'user_dev_new'@'localhost'" db-types="MySQL" />
<test-case sql="CREATE USER user_dev_new" db-types="PostgreSQL" />
<test-case sql="CREATE USER 'user_dev_new'@'localhost' identified by 'passwd_dev'" db-types="MySQL" />
<test-case sql="CREATE USER user_dev_new identified by passwd_dev" db-types="Oracle" />
<test-case sql="CREATE USER user_dev_new FOR LOGIN login_dev" db-types="SQLServer" />
<test-case sql="CREATE USER user_dev_new PASSWORD 'passwd_dev'" db-types="PostgreSQL" />
<test-case sql="CREATE USER user_dev IDENTIFIED EXTERNALLY" db-types="Oracle" />
<test-case sql="CREATE USER user_dev IDENTIFIED GLOBALLY" db-types="Oracle" />
<test-case sql="CREATE USER IF NOT EXISTS user_dev DEFAULT ROLE default_role" db-types="MySQL" />
<test-case sql="CREATE USER user_dev" db-types="PostgreSQL,SQLServer" />
<test-case sql="CREATE USER user_dev FROM ASYMMETRIC KEY asym_key" db-types="SQLServer" />
<test-case sql="CREATE USER user_dev FROM CERTIFICATE certificate" db-types="SQLServer" />
<test-case sql="CREATE USER user_dev FROM LOGIN login1" db-types="SQLServer" />
<test-case sql="CREATE USER user_dev WITHOUT LOGIN" db-types="SQLServer" />
<test-case sql="CREATE USER user_dev WITH SUPERUSER" db-types="PostgreSQL" />
<test-case sql="CREATE USER user_dev WITH CREATEDB CREATEROLE" db-types="PostgreSQL" />
<test-case sql="CREATE USER user_dev WITH ENCRYPTED PASSWORD 'password'" db-types="PostgreSQL" />
<test-case sql="CREATE USER user_dev IDENTIFIED BY password QUOTA 1M ON tablespace1" db-types="Oracle" />
<test-case sql="CREATE USER user_dev WITH ROLE role2" db-types="PostgreSQL" />
<test-case sql="CREATE USER user_dev WITH ROLE role2, role3" db-types="PostgreSQL" />
<test-case sql="CREATE USER user_dev WITH DEFAULT_SCHEMA = schema" db-types="SQLServer" />
<test-case sql="CREATE USER user_dev IDENTIFIED BY password DEFAULT TABLESPACE tablespace1" db-types="Oracle" />
</e2e-test-cases>
``` | /content/code_sandbox/test/e2e/sql/src/test/resources/cases/dcl/e2e-dcl-create-user.xml | xml | 2016-01-18T12:49:26 | 2024-08-16T15:48:11 | shardingsphere | apache/shardingsphere | 19,707 | 618 |
```xml
<ResourceDictionary xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:uwp="using:MahApps.Metro.IconPacks">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ms-appx:///MahApps.Metro.IconPacks.Codicons/Themes/PackIconCodicons.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="uwp:PackIconCodicons" BasedOn="{StaticResource MahApps.Styles.PackIconCodicons}" />
</ResourceDictionary>
``` | /content/code_sandbox/src/MahApps.Metro.IconPacks.Codicons/Themes/UAP/Generic.xaml | xml | 2016-07-17T00:10:12 | 2024-08-16T16:16:36 | MahApps.Metro.IconPacks | MahApps/MahApps.Metro.IconPacks | 1,748 | 113 |
```xml
import React from 'react';
// @ts-ignore
import Modal from 'react-native-modal';
import ModalBaseScene from '../utils/ModalBaseScene';
import DefaultModalContent from '../utils/DefaultModalContent';
class FancyModal extends ModalBaseScene {
renderModal(): React.ReactElement<any> {
return (
<Modal
testID={'modal'}
isVisible={this.isVisible()}
backdropColor="#B4B3DB"
backdropOpacity={0.8}
animationIn="zoomInDown"
animationOut="zoomOutUp"
animationInTiming={600}
animationOutTiming={600}
backdropTransitionInTiming={600}
backdropTransitionOutTiming={600}>
<DefaultModalContent onPress={this.close} />
</Modal>
);
}
}
export default FancyModal;
``` | /content/code_sandbox/example/src/modals/FancyModal.tsx | xml | 2016-09-23T16:45:46 | 2024-08-16T09:51:03 | react-native-modal | react-native-modal/react-native-modal | 5,444 | 170 |
```xml
import * as React from 'react';
import Box from '@material-ui/core/Box';
export interface ITabPanelProps {
children?: React.ReactNode;
index: any;
value: any;
}
export const TabPanel: React.FunctionComponent<ITabPanelProps> = (props: ITabPanelProps) => {
const { children, value, index, ...other } = props;
return (
<div
role="tabpanel"
hidden={value !== index}
id={`scrollable-auto-tabpanel-${index}`}
aria-labelledby={`scrollable-auto-tab-${index}`}
{...other}
>
{value === index && (
<Box p={3}>
<div>{children}</div>
</Box>
)}
</div>
);
};
``` | /content/code_sandbox/samples/react-avatar/src/webparts/avatarGenerator/components/TabPanel.tsx | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 165 |
```xml
export const injectedStyles = '@--INJECTED-STYLES-CONTENT--@';
export default function injectStyles() {
if (globalThis.document) {
const style = document.createElement('style');
style.append(document.createTextNode(injectedStyles));
document.head.appendChild(style);
}
}
``` | /content/code_sandbox/packages/fluent-theme/src/styles/injectStyle.ts | xml | 2016-07-07T23:16:57 | 2024-08-16T00:12:37 | BotFramework-WebChat | microsoft/BotFramework-WebChat | 1,567 | 59 |
```xml
import { UseKnobOptions } from '@fluentui/docs-components';
import { ThemePrepared } from '@fluentui/react-northstar';
export type ExampleSource = {
js: string;
ts: string;
};
export type BehaviorInfo = {
name: string;
displayName: string;
category: string;
};
export type BehaviorVariantionInfo = {
name: string;
description: string;
specification: string;
};
export type ComponentInfo = {
behaviors?: BehaviorInfo[];
constructorName: string;
componentClassName: string;
implementsCreateShorthand: boolean;
mappedShorthandProp?: string;
displayName: string;
filename: string;
filenameWithoutExt: string;
docblock: {
description: string;
tags: { description: string; title: string }[];
};
apiPath: string;
isChild: boolean;
isParent: boolean;
parentDisplayName: null | string;
props: ComponentProp[];
repoPath: string;
subcomponentName: null | string;
subcomponents: string[] | null;
type: 'component';
};
export type ComponentProp = {
defaultValue: any;
description: string;
name: string;
tags: {
title: string;
description: string;
type: null;
name: string;
}[];
types: ComponentPropType[];
required: boolean;
};
export type ComponentPropType = {
name?: 'any' | 'boolean' | 'never' | 'string' | 'array' | 'literal' | string;
keyword?: boolean;
parameters?: ComponentPropType[];
value?: string;
};
export type KnobGeneratorOptions = {
propName?: string;
propDef: ComponentProp;
componentInfo: ComponentInfo;
theme: ThemePrepared;
};
export type KnobDefinition = UseKnobOptions<any> & { hook: Function };
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type KnobGenerator<T> = (options: KnobGeneratorOptions) => KnobDefinition;
export type KnobComponentGenerators<P> = Partial<Record<keyof P, KnobGenerator<any>>>;
``` | /content/code_sandbox/packages/fluentui/docs/src/types.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 465 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="path_to_url"
xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<artifactId>cloud-tenant-base</artifactId>
<name>Vespa Cloud tenant base</name>
<version>8-SNAPSHOT</version>
<description>Parent POM for all Vespa Cloud applications.</description>
<url>path_to_url
<packaging>pom</packaging>
<parent>
<artifactId>hosted-tenant-base</artifactId>
<groupId>com.yahoo.vespa</groupId>
<version>8-SNAPSHOT</version>
<relativePath>../hosted-tenant-base/pom.xml</relativePath>
</parent>
<properties>
<endpoint>path_to_url
<extraTestBundleScopeOverrides>
com.yahoo.vespa:cloud-tenant-cd:provided
</extraTestBundleScopeOverrides>
</properties>
<dependencies>
<dependency>
<groupId>com.yahoo.vespa</groupId>
<artifactId>cloud-tenant-cd</artifactId>
<version>${vespaversion}</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
``` | /content/code_sandbox/cloud-tenant-base/pom.xml | xml | 2016-06-03T20:54:20 | 2024-08-16T15:32:01 | vespa | vespa-engine/vespa | 5,524 | 303 |
```xml
import { Modal } from '../../../../Modal'
export default function FooPagePostInterceptSlot({
params: { id },
}: {
params: {
id: string
}
}) {
return <Modal title={`Post ${id}`} context="Intercepted on Foo Page" />
}
``` | /content/code_sandbox/test/e2e/app-dir/interception-route-prefetch-cache/app/foo/@modal/(...)post/[id]/page.tsx | xml | 2016-10-05T23:32:51 | 2024-08-16T19:44:30 | next.js | vercel/next.js | 124,056 | 61 |
```xml
import * as ad from "../types/ad.js";
import { PathCmd, PathDataV, SubPath } from "../types/value.js";
/**
* Class for building SVG paths
*/
export class PathBuilder {
private path: PathDataV<ad.Num>;
constructor() {
this.path = {
tag: "PathDataV",
contents: [],
};
}
private newCoord = (x: ad.Num, y: ad.Num): SubPath<ad.Num> => {
return {
tag: "CoordV",
contents: [x, y],
};
};
private newValue = (v: ad.Num[]): SubPath<ad.Num> => {
return {
tag: "ValueV",
contents: v,
};
};
getPath = () => this.path;
/**
* Moves SVG cursor to coordinate [x,y]
*/
moveTo = ([x, y]: [ad.Num, ad.Num]) => {
this.path.contents.push({
cmd: "M",
contents: [this.newCoord(x, y)],
});
return this;
};
/**
* closes the SVG path by drawing a line between the last point and
* the start point
*/
closePath = () => {
this.path.contents.push({
cmd: "Z",
contents: [],
});
return this;
};
/**
* Draws a line to point [x,y]
*/
lineTo = ([x, y]: [ad.Num, ad.Num]) => {
this.path.contents.push({
cmd: "L",
contents: [this.newCoord(x, y)],
});
return this;
};
/**
* Draws a quadratic bezier curve ending at [x,y] with one control point
* at [cpx, cpy]
*/
quadraticCurveTo = (
[cpx, cpy]: [ad.Num, ad.Num],
[x, y]: [ad.Num, ad.Num],
) => {
this.path.contents.push({
cmd: "Q",
contents: [this.newCoord(cpx, cpy), this.newCoord(x, y)],
});
return this;
};
/**
* Draws a cubic bezier curve ending at [x, y] with first control pt at
* [cpx1, cpy1] and the second control pt at [cpx2, cpy2]
*/
bezierCurveTo = (
[cpx1, cpy1]: [ad.Num, ad.Num],
[cpx2, cpy2]: [ad.Num, ad.Num],
[x, y]: [ad.Num, ad.Num],
) => {
this.path.contents.push({
cmd: "C",
contents: [
this.newCoord(cpx1, cpy1),
this.newCoord(cpx2, cpy2),
this.newCoord(x, y),
],
});
return this;
};
/**
* Shortcut quadratic bezier curve command ending at [x,y]
*/
quadraticCurveJoin = ([x, y]: [ad.Num, ad.Num]) => {
this.path.contents.push({
cmd: "T",
contents: [this.newCoord(x, y)],
});
return this;
};
/**
* Shortcut cubic bezier curve command ending at [x, y]. The second control
* pt is inferred to be the reflection of the first control pt, [cpx, cpy].
*/
cubicCurveJoin = ([cpx, cpy]: [ad.Num, ad.Num], [x, y]: [ad.Num, ad.Num]) => {
this.path.contents.push({
cmd: "S",
contents: [this.newCoord(cpx, cpy), this.newCoord(x, y)],
});
return this;
};
/**
* Create an arc along ellipse with radius [rx, ry], ending at [x, y]
* @param rotation: angle in degrees to rotate ellipse about its center
* @param largeArc: 0 to draw shorter of 2 arcs, 1 to draw longer
* @param arcSweep: 0 to rotate CCW, 1 to rotate CW
*/
arcTo = (
[rx, ry]: [ad.Num, ad.Num],
[x, y]: [ad.Num, ad.Num],
[rotation, majorArc, sweep]: ad.Num[],
) => {
this.path.contents.push({
cmd: "A",
contents: [
this.newValue([rx, ry, rotation, majorArc, sweep]),
this.newCoord(x, y),
],
});
return this;
};
/**
* Concatenate paths according to the specified connection policy.
* @param pathDataList List of paths, given as lists of path commands (a list of lists)
* @param connect Given start command, transform it to a new command (or lack thereof)
* @param connectLast Should the ends of the paths be connected according to `connect`?
*/
static concatPaths(
pathDataList: PathCmd<ad.Num>[][],
connect?: (startCmd: PathCmd<ad.Num>) => PathCmd<ad.Num> | null,
connectLast: boolean = false,
): PathCmd<ad.Num>[] {
if (pathDataList.length === 0) {
return [];
}
let resPathData: PathCmd<ad.Num>[] = [];
for (let i = 0; i < pathDataList.length; i++) {
// shallow copy
const pathData = pathDataList[i].map((x) => x);
if (pathData.length === 0) {
continue;
}
if (connect && i > 0) {
const oldStart: PathCmd<ad.Num> | null = pathData[0];
const newStart = connect(oldStart);
if (newStart) {
pathData[0] = newStart;
} else {
pathData.shift();
}
}
resPathData = resPathData.concat(pathData);
}
if (connect && connectLast) {
const start: PathCmd<ad.Num> | null = resPathData[0];
const newEnd = connect(start);
if (newEnd) {
resPathData.push(newEnd);
}
}
return resPathData;
}
}
``` | /content/code_sandbox/packages/core/src/renderer/PathBuilder.ts | xml | 2016-09-22T04:47:19 | 2024-08-16T13:00:54 | penrose | penrose/penrose | 6,760 | 1,366 |
```xml
<resources>
<string name="gettipsi_card_number">Numero carta</string>
<string name="gettipsi_save">Salva</string>
<string name="gettipsi_card_cvc">CVC</string>
<string name="gettipsi_google_pay_unavaliable">Google Pay non disponibile sul tuo dispositivo.</string>
<string name="gettipsi_user_cancel_dialog">Un utente ha annullato l\'operazione. Nessun addebito stato effettuato!</string>
<string name="gettipsi_card_enter_dialog_title">Inserisci i dati della tua carta</string>
<string name="gettipsi_card_enter_dialog_positive_button">Completato</string>
<string name="gettipsi_card_enter_dialog_negative_button">Annulla</string>
<string name="gettipsi_card_number_label">Carta</string>
<string-array name="gettipsi_currency_array">
<item>Currency (optional)</item>
<item>Unspecified</item>
<item>EUR</item>
</string-array>
</resources>
``` | /content/code_sandbox/android/src/main/res/values-it/strings.xml | xml | 2016-10-27T09:03:49 | 2024-07-16T17:40:56 | tipsi-stripe | tipsi/tipsi-stripe | 1,134 | 244 |
```xml
import * as vs from "vscode";
import * as as from "../../shared/analysis_server_types";
import { flatMap, notUndefined } from "../../shared/utils";
import { fsPath } from "../../shared/utils/fs";
import { toRange } from "../../shared/vscode/utils";
import { DasAnalyzer } from "../analysis/analyzer_das";
import { findNearestOutlineNode } from "../utils/vscode/outline";
export class DartImplementationProvider implements vs.ImplementationProvider {
constructor(readonly analyzer: DasAnalyzer) { }
public async provideImplementation(document: vs.TextDocument, position: vs.Position, token: vs.CancellationToken): Promise<vs.Definition | undefined> {
// Try to use the Outline data to snap our location to a node.
// For example in:
//
// void b();
//
// The search.getTypeHierarchy call will only work over "b" but by using outline we
// can support the whole "void b();".
const outlineNode = findNearestOutlineNode(this.analyzer.fileTracker, document, position, true);
const offset = outlineNode && outlineNode.element && outlineNode.element.location
? outlineNode.element.location.offset
: document.offsetAt(position);
const hierarchy = await this.analyzer.client.searchGetTypeHierarchy({
file: fsPath(document.uri),
offset,
});
if (token.isCancellationRequested || !hierarchy || !hierarchy.hierarchyItems || !hierarchy.hierarchyItems.length || hierarchy.hierarchyItems.length === 1)
return;
// Find the element we started with, since we only want implementations (not super classes).
const currentItem = hierarchy.hierarchyItems.find((h) => {
const elm = h.memberElement || h.classElement;
return elm.location && elm.location.offset <= offset && elm.location.offset + elm.location.length >= offset;
})
// If we didn't find the element when we might have been at a call site, so we'll have to start
// at the root.
|| hierarchy.hierarchyItems[0];
const isClass = !currentItem.memberElement;
function getDescendants(item: as.TypeHierarchyItem): as.TypeHierarchyItem[] {
return [
...item.subclasses.map((i) => hierarchy.hierarchyItems![i]),
...flatMap(item.subclasses, (i) => getDescendants(hierarchy.hierarchyItems![i])),
];
}
const descendants = getDescendants(currentItem)
.map((d) => isClass ? d.classElement : d.memberElement)
.filter(notUndefined);
const locations: vs.Location[] = [];
for (const element of descendants) {
if (!element.location)
continue;
const range = toRange(
await vs.workspace.openTextDocument(element.location.file),
element.location.offset,
element.location.length,
);
locations.push(new vs.Location(vs.Uri.file(element.location.file), range));
}
return locations;
}
}
``` | /content/code_sandbox/src/extension/providers/dart_implementation_provider.ts | xml | 2016-07-30T13:49:11 | 2024-08-10T16:23:15 | Dart-Code | Dart-Code/Dart-Code | 1,472 | 642 |
```xml
import { Observable, firstValueFrom, map } from "rxjs";
import { I18nService as I18nServiceAbstraction } from "../abstractions/i18n.service";
import { GlobalState, GlobalStateProvider, KeyDefinition, TRANSLATION_DISK } from "../state";
import { TranslationService } from "./translation.service";
const LOCALE_KEY = new KeyDefinition<string>(TRANSLATION_DISK, "locale", {
deserializer: (value) => value,
});
export class I18nService extends TranslationService implements I18nServiceAbstraction {
translationLocale: string;
protected translationLocaleState: GlobalState<string>;
userSetLocale$: Observable<string | undefined>;
locale$: Observable<string>;
constructor(
protected systemLanguage: string,
protected localesDirectory: string,
protected getLocalesJson: (formattedLocale: string) => Promise<any>,
globalStateProvider: GlobalStateProvider,
) {
super(systemLanguage, localesDirectory, getLocalesJson);
this.translationLocaleState = globalStateProvider.get(LOCALE_KEY);
this.userSetLocale$ = this.translationLocaleState.state$;
this.locale$ = this.userSetLocale$.pipe(map((locale) => locale ?? this.translationLocale));
}
async setLocale(locale: string): Promise<void> {
await this.translationLocaleState.update(() => locale);
}
override async init() {
const storedLocale = await firstValueFrom(this.translationLocaleState.state$);
await super.init(storedLocale);
}
}
``` | /content/code_sandbox/libs/common/src/platform/services/i18n.service.ts | xml | 2016-03-09T23:14:01 | 2024-08-16T15:07:51 | clients | bitwarden/clients | 8,877 | 318 |
```xml
import React, { PropsWithChildren, useCallback, useRef } from 'react'
import styled from '../../lib/styled'
import { AppComponent } from '../../lib/types'
import DoublePane from '../atoms/DoublePane'
import PageHelmet from '../atoms/PageHelmet'
import cc from 'classcat'
import { isFocusRightSideShortcut } from '../../lib/shortcuts'
import {
preventKeyboardEventPropagation,
useGlobalKeyDownHandler,
} from '../../lib/keyboard'
import { focusFirstChildFromElement } from '../../lib/dom'
import Topbar, { TopbarPlaceholder, TopbarProps } from '../organisms/Topbar'
export interface ContentLayoutProps {
helmet?: { title?: string; indexing?: boolean }
header?: React.ReactNode
right?: React.ReactNode
reduced?: boolean
}
const ContentLayout: AppComponent<ContentLayoutProps> = ({
helmet,
right,
children,
}) => {
const rightSideContentRef = useRef<HTMLDivElement>(null)
const keydownHandler = useCallback(
async (event: KeyboardEvent) => {
if (isFocusRightSideShortcut(event)) {
preventKeyboardEventPropagation(event)
focusFirstChildFromElement(rightSideContentRef.current)
}
},
[rightSideContentRef]
)
useGlobalKeyDownHandler(keydownHandler)
return (
<Container className='layout' ref={rightSideContentRef}>
<PageHelmet title={helmet?.title} indexing={helmet?.indexing} />
<DoublePane
className='two__pane content__layout'
right={right}
rightFlex='0 0 auto'
idRight='content__layout__right'
>
{children}
</DoublePane>
</Container>
)
}
export interface ChartedContentLayoutProps {
helmet?: { title?: string; indexing?: boolean }
header?: React.ReactNode
topbar?: TopbarProps
right?: React.ReactNode
reduced?: boolean
}
export const ChartedContentLayout: AppComponent<ChartedContentLayoutProps> = ({
children,
helmet,
topbar,
right,
reduced,
header,
}) => {
return (
<ContentLayout helmet={helmet} right={right}>
{topbar != null ? (
<Topbar
tree={topbar.tree}
controls={topbar.controls}
navigation={topbar.navigation}
breadcrumbs={topbar.breadcrumbs}
className='topbar'
>
{topbar.children}
</Topbar>
) : (
<TopbarPlaceholder />
)}
<ContentWrapper reduced={reduced} header={header}>
{children}
</ContentWrapper>
</ContentLayout>
)
}
export interface ContentWrapperProps {
header?: React.ReactNode
reduced?: boolean
}
export const ContentWrapper = ({
reduced,
header,
children,
}: PropsWithChildren<ContentWrapperProps>) => {
return (
<div className='layout__content'>
<div className='layout__content__wrapper'>
<div
className={cc([
'content__wrapper',
reduced && 'content__wrapper--reduced',
])}
>
{header != null && (
<h1 className='layout__content__header'>{header}</h1>
)}
{children}
</div>
</div>
</div>
)
}
const Container = styled.div`
flex: 1 1 0;
min-width: 0;
overflow: hidden;
height: 100vh;
.two__pane {
width: 100%;
height: 100%;
overflow: hidden;
.two__pane__left {
display: flex;
flex-direction: column;
flex: 1 1 auto;
width: 100%;
height: 100%;
}
.topbar {
width: 100%;
flex: 0 0 auto;
}
.layout__content {
flex: 1 1 auto;
overflow: auto;
}
.layout__content__wrapper {
height: 100%;
width: 100%;
}
.content__wrapper {
display: flex;
flex-direction: column;
flex: 1 1 auto;
height: 100%;
position: relative;
}
.content__wrapper--reduced {
max-width: 1280px;
padding: 0 ${({ theme }) => theme.sizes.spaces.sm}px;
margin: auto;
}
}
.layout__content__header {
display: flex;
justify-content: left;
flex-wrap: nowrap;
align-items: center;
width: 100%;
margin: ${({ theme }) => theme.sizes.spaces.df}px 0;
font-size: 16px;
}
`
export default ContentLayout
``` | /content/code_sandbox/src/design/components/templates/ContentLayout.tsx | xml | 2016-11-19T14:30:34 | 2024-08-16T03:13:45 | BoostNote-App | BoostIO/BoostNote-App | 3,745 | 1,030 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="path_to_url"
xmlns:app="path_to_url"
xmlns:tools="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.RecyclerView
android:id="@+id/wordList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
app:layoutManager="android.support.v7.widget.LinearLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
android:src="@drawable/ic_filter_list"
app:layout_constraintRight_toRightOf="parent" />
</android.support.constraint.ConstraintLayout>
``` | /content/code_sandbox/Android/AndroidWebScrapingRetrofit/app/src/main/res/layout/activity_main.xml | xml | 2016-05-02T05:43:21 | 2024-08-16T06:51:39 | journaldev | WebJournal/journaldev | 1,314 | 272 |
```xml
import { describe, expect, it } from 'vitest';
import { __internal, diff } from '../diff';
describe('diff()', () => {
it('creates block map', () => {
const result = __internal.getBlockMap('Hello World!!', 3);
expect(result).toEqual({
dbc2d1fed0dc37a70aea0f376958c802eddc0559: [
{
start: 0,
len: 3,
hash: 'dbc2d1fed0dc37a70aea0f376958c802eddc0559',
},
],
'263b8ac41bd2ffb775af535c54d8b0a0e6b9e743': [
{
start: 3,
len: 3,
hash: '263b8ac41bd2ffb775af535c54d8b0a0e6b9e743',
},
],
'3603dd999f7dd952041d3bdb27f74e511cfd6b2a': [
{
start: 6,
len: 3,
hash: '3603dd999f7dd952041d3bdb27f74e511cfd6b2a',
},
],
c20d168802bbae1c84f90b9b0495e0d918da3aea: [
{
start: 9,
len: 3,
hash: 'c20d168802bbae1c84f90b9b0495e0d918da3aea',
},
],
'0ab8318acaf6e678dd02e2b5c343ed41111b393d': [
{
start: 12,
len: 1,
hash: '0ab8318acaf6e678dd02e2b5c343ed41111b393d',
},
],
});
});
it('creates operations', () => {
// hel|lo |Wor|ld!|!
const result = diff('Hello World!!', 'Hello there World!!', 3);
expect(result).toEqual([
{
type: 'COPY',
start: 0,
len: 6,
},
{
type: 'INSERT',
content: 'there ',
},
{
type: 'COPY',
start: 6,
len: 7,
},
]);
});
it('creates operations 2', () => {
const result2 = diff(
'Hello, this is a pretty long sentence about not much at all.',
'Hello, this is a pretty short sentence.',
2,
);
expect(result2).toEqual([
{
len: 24,
start: 0,
type: 'COPY',
},
{
content: 'shor',
type: 'INSERT',
},
{
len: 2,
start: 42,
type: 'COPY',
},
{
content: 's',
type: 'INSERT',
},
{
len: 7,
start: 30,
type: 'COPY',
},
{
content: '.',
type: 'INSERT',
},
]);
});
});
``` | /content/code_sandbox/packages/insomnia/src/sync/delta/__tests__/diff.test.ts | xml | 2016-04-23T03:54:26 | 2024-08-16T16:50:44 | insomnia | Kong/insomnia | 34,054 | 723 |
```xml
export * from './LargeTitle';
export { largeTitleClassNames } from './useLargeTitleStyles.styles';
``` | /content/code_sandbox/packages/react-components/react-text/library/src/components/presets/LargeTitle/index.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 23 |
```xml
import { SearchBox } from '@fluentui/react-components';
import descriptionMd from './SearchBoxDescription.md';
import bestPracticesMd from './SearchBoxBestPractices.md';
export { Default } from './SearchBoxDefault.stories';
export { Appearance } from './SearchBoxAppearance.stories';
export { ContentBeforeAfter } from './SearchBoxContentBeforeAfter.stories';
export { Disabled } from './SearchBoxDisabled.stories';
export { Placeholder } from './SearchBoxPlaceholder.stories';
export { Size } from './SearchBoxSize.stories';
export { Controlled } from './SearchBoxControlled.stories';
export default {
title: 'Components/SearchBox',
component: SearchBox,
parameters: {
docs: {
description: {
component: [descriptionMd, bestPracticesMd].join('\n'),
},
},
},
};
``` | /content/code_sandbox/packages/react-components/react-search/stories/src/SearchBox/index.stories.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 179 |
```xml
import { useState } from 'react';
import {
refreshableSettings,
createPersistedStore,
ZustandSetFunc,
} from '@@/datatables/types';
import { useTableState } from '@@/datatables/useTableState';
import { TableSettings } from './DefaultDatatableSettings';
import { systemResourcesSettings } from './SystemResourcesSettings';
export function createStore<T extends TableSettings>(
storageKey: string,
initialSortBy?: string | { id: string; desc: boolean },
create: (set: ZustandSetFunc<T>) => Omit<T, keyof TableSettings> = () =>
({}) as T
) {
return createPersistedStore<T>(
storageKey,
initialSortBy,
(set) =>
({
...refreshableSettings(set),
...systemResourcesSettings(set),
...create(set),
}) as T
);
}
export function useKubeStore<T extends TableSettings>(
...args: Parameters<typeof createStore<T>>
) {
const [store] = useState(() => createStore(...args));
return useTableState(store, args[0]);
}
``` | /content/code_sandbox/app/react/kubernetes/datatables/default-kube-datatable-store.ts | xml | 2016-05-19T20:15:28 | 2024-08-16T19:15:14 | portainer | portainer/portainer | 30,083 | 237 |
```xml
import { Component, AfterViewInit, OnDestroy } from '@angular/core';
import { NbThemeService } from '@nebular/theme';
@Component({
selector: 'ngx-echarts-multiple-xaxis',
template: `
<div echarts [options]="options" class="echart"></div>
`,
})
export class EchartsMultipleXaxisComponent implements AfterViewInit, OnDestroy {
options: any = {};
themeSubscription: any;
constructor(private theme: NbThemeService) {
}
ngAfterViewInit() {
this.themeSubscription = this.theme.getJsTheme().subscribe(config => {
const colors: any = config.variables;
const echarts: any = config.variables.echarts;
this.options = {
backgroundColor: echarts.bg,
color: [colors.success, colors.info],
tooltip: {
trigger: 'none',
axisPointer: {
type: 'cross',
},
},
legend: {
data: ['2015 Precipitation', '2016 Precipitation'],
textStyle: {
color: echarts.textColor,
},
},
grid: {
top: 70,
bottom: 50,
},
xAxis: [
{
type: 'category',
axisTick: {
alignWithLabel: true,
},
axisLine: {
onZero: false,
lineStyle: {
color: colors.info,
},
},
axisLabel: {
textStyle: {
color: echarts.textColor,
},
},
axisPointer: {
label: {
formatter: params => {
return (
'Precipitation ' + params.value + (params.seriesData.length ? '' + params.seriesData[0].data : '')
);
},
},
},
data: [
'2016-1',
'2016-2',
'2016-3',
'2016-4',
'2016-5',
'2016-6',
'2016-7',
'2016-8',
'2016-9',
'2016-10',
'2016-11',
'2016-12',
],
},
{
type: 'category',
axisTick: {
alignWithLabel: true,
},
axisLine: {
onZero: false,
lineStyle: {
color: colors.success,
},
},
axisLabel: {
textStyle: {
color: echarts.textColor,
},
},
axisPointer: {
label: {
formatter: params => {
return (
'Precipitation ' + params.value + (params.seriesData.length ? '' + params.seriesData[0].data : '')
);
},
},
},
data: [
'2015-1',
'2015-2',
'2015-3',
'2015-4',
'2015-5',
'2015-6',
'2015-7',
'2015-8',
'2015-9',
'2015-10',
'2015-11',
'2015-12',
],
},
],
yAxis: [
{
type: 'value',
axisLine: {
lineStyle: {
color: echarts.axisLineColor,
},
},
splitLine: {
lineStyle: {
color: echarts.splitLineColor,
},
},
axisLabel: {
textStyle: {
color: echarts.textColor,
},
},
},
],
series: [
{
name: '2015 Precipitation',
type: 'line',
xAxisIndex: 1,
smooth: true,
data: [2.6, 5.9, 9.0, 26.4, 28.7, 70.7, 175.6, 182.2, 48.7, 18.8, 6.0, 2.3],
},
{
name: '2016 Precipitation',
type: 'line',
smooth: true,
data: [3.9, 5.9, 11.1, 18.7, 48.3, 69.2, 231.6, 46.6, 55.4, 18.4, 10.3, 0.7],
},
],
};
});
}
ngOnDestroy(): void {
this.themeSubscription.unsubscribe();
}
}
``` | /content/code_sandbox/src/app/pages/charts/echarts/echarts-multiple-xaxis.component.ts | xml | 2016-05-25T10:09:03 | 2024-08-16T16:34:03 | ngx-admin | akveo/ngx-admin | 25,169 | 971 |
```xml
export * from '@crawlee/browser';
export * from './internals/puppeteer-crawler';
export * from './internals/puppeteer-launcher';
export * as puppeteerRequestInterception from './internals/utils/puppeteer_request_interception';
export type { InterceptHandler } from './internals/utils/puppeteer_request_interception';
export * as puppeteerUtils from './internals/utils/puppeteer_utils';
export type {
BlockRequestsOptions,
CompiledScriptFunction,
CompiledScriptParams,
DirectNavigationOptions as PuppeteerDirectNavigationOptions,
InfiniteScrollOptions,
InjectFileOptions,
SaveSnapshotOptions,
} from './internals/utils/puppeteer_utils';
export * as puppeteerClickElements from './internals/enqueue-links/click-elements';
export type { EnqueueLinksByClickingElementsOptions } from './internals/enqueue-links/click-elements';
``` | /content/code_sandbox/packages/puppeteer-crawler/src/index.ts | xml | 2016-08-26T18:35:03 | 2024-08-16T16:40:08 | crawlee | apify/crawlee | 14,153 | 184 |
```xml
/**
* This file is part of OpenMediaVault.
*
* @license path_to_url GPL Version 3
* @author Volker Theile <volker.theile@openmediavault.org>
*
* OpenMediaVault is free software: you can redistribute it and/or modify
* any later version.
*
* OpenMediaVault is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*/
import { DataStore } from '~/app/shared/models/data-store.type';
export type RrdPageGraphConfig = {
// The label of the tab.
label?: string;
// The name of the RRD PNG image, e.g. 'cpu-0' or 'uptime'.
name: string;
};
export type RrdPageConfig = {
// The RRD graphs rendered per tab. If only one graph is configured,
// no tab page is display, hence the `label` property is not needed.
graphs: Array<RrdPageGraphConfig>;
// If a store is defined, then a top tab is displayed with the number
// of tabs as items are in the store.
// The 'name' and 'label' properties in the `graphs` configuration
// will be formatted using the data in the store, thus make sure the
// store data is an array of objects.
store?: DataStore;
// The label used in the top tab headers. This can be a tokenized
// string which is formatted using the store items. Note, this
// property is only used when a store is defined.
// Example:
// store.data = [{name: 'foo', x: 0}, {name: 'bar', x: 2}]
// label = '{{ name }}'
// This will result in two tabs with the headers 'foo' and 'bar'.
label?: string;
};
``` | /content/code_sandbox/deb/openmediavault/workbench/src/app/core/components/intuition/models/rrd-page-config.type.ts | xml | 2016-05-03T10:35:34 | 2024-08-16T08:03:04 | openmediavault | openmediavault/openmediavault | 4,954 | 416 |
```xml
import * as React from 'react';
import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
import type { ImageProps, ImageState } from './Image.types';
/**
* Given user props, returns state and render function for an Image.
*/
export const useImage_unstable = (props: ImageProps, ref: React.Ref<HTMLImageElement>): ImageState => {
const { bordered = false, fit = 'default', block = false, shape = 'square', shadow = false } = props;
const state: ImageState = {
bordered,
fit,
block,
shape,
shadow,
components: {
root: 'img',
},
root: slot.always(
getIntrinsicElementProps('img', {
ref,
...props,
}),
{ elementType: 'img' },
),
};
return state;
};
``` | /content/code_sandbox/packages/react-components/react-image/library/src/components/Image/useImage.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 189 |
```xml
export * from '../../dist/types/plugins/storage-memory/index';
``` | /content/code_sandbox/plugins/storage-memory/index.ts | xml | 2016-12-02T19:34:42 | 2024-08-16T15:47:20 | rxdb | pubkey/rxdb | 21,054 | 12 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="path_to_url"
xmlns:app="path_to_url">
<item
android:id="@+id/reset"
android:icon="@drawable/restart"
android:title="@string/reset"
app:showAsAction="always"/>
</menu>
``` | /content/code_sandbox/example/src/main/res/menu/main_menu.xml | xml | 2016-05-09T00:47:18 | 2024-08-16T12:23:05 | slidetoact | cortinico/slidetoact | 1,190 | 74 |
```xml
import * as compose from 'lodash.flowright';
import React from 'react';
import { gql } from '@apollo/client';
import { graphql } from '@apollo/client/react/hoc';
import { ConversationDetailQueryResponse } from '@erxes/ui-inbox/src/inbox/types';
import { IActivityLog } from '@erxes/ui-log/src/activityLogs/types';
import Spinner from '@erxes/ui/src/components/Spinner';
import { queries as inboxQueries } from '@erxes/ui-inbox/src/inbox/graphql';
import { withProps } from '@erxes/ui/src/utils';
import Conversation from '../components/ActivityLogs';
import { queries } from '../graphql/index';
import {
InstagramCommentsQueryResponse,
MessagesQueryResponse
} from '../types';
type Props = {
activity: IActivityLog;
conversationId: string;
};
type FinalProps = {
messagesQuery: MessagesQueryResponse;
commentsQuery: InstagramCommentsQueryResponse;
conversationDetailQuery: ConversationDetailQueryResponse;
} & Props;
class ConversationContainer extends React.Component<FinalProps> {
render() {
const {
conversationDetailQuery,
messagesQuery,
commentsQuery
} = this.props;
if (conversationDetailQuery.loading || messagesQuery.loading) {
return <Spinner />;
}
const conversation = conversationDetailQuery.conversationDetail;
const messages = messagesQuery.instagramConversationMessages || [];
const comments =
(commentsQuery && commentsQuery.instagramGetComments) || [];
const updatedProps = {
...this.props,
conversation,
messages,
comments
};
return <Conversation {...updatedProps} />;
}
}
export default withProps<Props>(
compose(
graphql<Props, ConversationDetailQueryResponse>(
gql(inboxQueries.conversationDetail),
{
name: 'conversationDetailQuery',
options: ({ conversationId }) => ({
variables: {
_id: conversationId
}
})
}
),
graphql<Props, MessagesQueryResponse>(
gql(queries.instagramConversationMessages),
{
name: 'messagesQuery',
options: ({ conversationId }) => ({
variables: {
conversationId,
limit: 10,
getFirst: true
}
})
}
)
)(ConversationContainer)
);
``` | /content/code_sandbox/packages/plugin-instagram-ui/src/containers/ActivityLogsContainer.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 471 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="path_to_url"
xmlns:app="path_to_url"
xmlns:tools="path_to_url"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="48dp"
android:minHeight="160dp">
<include
android:id="@+id/selectButton"
layout="@layout/view_image_select"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:animateLayoutChanges="true"
android:paddingLeft="16dp"
android:paddingRight="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toTopOf="@+id/lastPickedButtons" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/lastPickedButtons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:itemCount="6"
tools:listitem="@layout/cell_last_picked_button"
app:layout_constraintBottom_toBottomOf="parent"
tools:ignore="RtlHardcoded,RtlSymmetry"
android:paddingTop="8dp"
android:paddingBottom="8dp"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
``` | /content/code_sandbox/app/src/main/res/layout/fragment_grouped_overlay_image_select.xml | xml | 2016-07-02T10:44:04 | 2024-08-16T18:55:54 | StreetComplete | streetcomplete/StreetComplete | 3,781 | 338 |
```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
*/
/**
* Type describing the allowed values for a number input
* @docs-private
*/
export type NumberInput = string | number | null | undefined;
/** Coerces a data-bound value (typically a string) to a number. */
export function coerceNumberProperty(value: any): number;
export function coerceNumberProperty<D>(value: any, fallback: D): number | D;
export function coerceNumberProperty(value: any, fallbackValue = 0) {
if (_isNumberValue(value)) {
return Number(value);
}
return arguments.length === 2 ? fallbackValue : 0;
}
/**
* Whether the provided value is considered a number.
* @docs-private
*/
export function _isNumberValue(value: any): boolean {
// parseFloat(value) handles most of the cases we're interested in (it treats null, empty string,
// and other non-number values as NaN, where Number just uses 0) but it considers the string
// '123hello' to be a valid number. Therefore we also check if Number(value) is NaN.
return !isNaN(parseFloat(value as any)) && !isNaN(Number(value));
}
``` | /content/code_sandbox/src/cdk/coercion/number-property.ts | xml | 2016-01-04T18:50:02 | 2024-08-16T11:21:13 | components | angular/components | 24,263 | 275 |
```xml
import type { StyleProp, ViewStyle, ViewProps } from 'react-native';
export declare type AppleAuthenticationButtonProps = ViewProps & {
/**
* The method to call when the user presses the button. You should call [`AppleAuthentication.signInAsync`](#appleauthenticationisavailableasync)
* in here.
*/
onPress: () => void;
/**
* The type of button text to display ("Sign In with Apple" vs. "Continue with Apple").
*/
buttonType: AppleAuthenticationButtonType;
/**
* The Apple-defined color scheme to use to display the button.
*/
buttonStyle: AppleAuthenticationButtonStyle;
/**
* The border radius to use when rendering the button. This works similarly to
* `style.borderRadius` in other Views.
*/
cornerRadius?: number;
/**
* The custom style to apply to the button. Should not include `backgroundColor` or `borderRadius`
* properties.
*/
style?: StyleProp<Omit<ViewStyle, 'backgroundColor' | 'borderRadius'>>;
};
/**
* The options you can supply when making a call to [`AppleAuthentication.signInAsync()`](#appleauthenticationsigninasyncoptions).
* None of these options are required.
*
* @see [Apple
* Documentation](path_to_url
* for more details.
*/
export type AppleAuthenticationSignInOptions = {
/**
* Array of user information scopes to which your app is requesting access. Note that the user can
* choose to deny your app access to any scope at the time of logging in. You will still need to
* handle `null` values for any scopes you request. Additionally, note that the requested scopes
* will only be provided to you the first time each user signs into your app; in subsequent
* requests they will be `null`. Defaults to `[]` (no scopes).
*/
requestedScopes?: AppleAuthenticationScope[];
/**
* An arbitrary string that is returned unmodified in the corresponding credential after a
* successful authentication. This can be used to verify that the response was from the request
* you made and avoid replay attacks. More information on this property is available in the
* OAuth 2.0 protocol [RFC6749](path_to_url#section-10.12).
*/
state?: string;
/**
* An arbitrary string that is used to prevent replay attacks. See more information on this in the
* [OpenID Connect specification](path_to_url#CodeFlowSteps).
*/
nonce?: string;
};
/**
* The options you can supply when making a call to [`AppleAuthentication.refreshAsync()`](#appleauthenticationrefreshasyncoptions).
* You must include the ID string of the user whose credentials you'd like to refresh.
*
* @see [Apple
* Documentation](path_to_url
* for more details.
*/
export type AppleAuthenticationRefreshOptions = {
user: string;
/**
* Array of user information scopes to which your app is requesting access. Note that the user can
* choose to deny your app access to any scope at the time of logging in. You will still need to
* handle `null` values for any scopes you request. Additionally, note that the requested scopes
* will only be provided to you the first time each user signs into your app; in subsequent
* requests they will be `null`. Defaults to `[]` (no scopes).
*/
requestedScopes?: AppleAuthenticationScope[];
/**
* An arbitrary string that is returned unmodified in the corresponding credential after a
* successful authentication. This can be used to verify that the response was from the request
* you made and avoid replay attacks. More information on this property is available in the
* OAuth 2.0 protocol [RFC6749](path_to_url#section-10.12).
*/
state?: string;
};
/**
* The options you can supply when making a call to [`AppleAuthentication.signOutAsync()`](#appleauthenticationsignoutasyncoptions).
* You must include the ID string of the user to sign out.
*
* @see [Apple
* Documentation](path_to_url
* for more details.
*/
export type AppleAuthenticationSignOutOptions = {
user: string;
/**
* An arbitrary string that is returned unmodified in the corresponding credential after a
* successful authentication. This can be used to verify that the response was from the request
* you made and avoid replay attacks. More information on this property is available in the
* OAuth 2.0 protocol [RFC6749](path_to_url#section-10.12).
*/
state?: string;
};
/**
* The object type returned from a successful call to [`AppleAuthentication.signInAsync()`](#appleauthenticationsigninasyncoptions),
* [`AppleAuthentication.refreshAsync()`](#appleauthenticationrefreshasyncoptions), or [`AppleAuthentication.signOutAsync()`](#appleauthenticationsignoutasyncoptions)
* which contains all of the pertinent user and credential information.
*
* @see [Apple
* Documentation](path_to_url
* for more details.
*/
export type AppleAuthenticationCredential = {
/**
* An identifier associated with the authenticated user. You can use this to check if the user is
* still authenticated later. This is stable and can be shared across apps released under the same
* development team. The same user will have a different identifier for apps released by other
* developers.
*/
user: string;
/**
* An arbitrary string that your app provided as `state` in the request that generated the
* credential. Used to verify that the response was from the request you made. Can be used to
* avoid replay attacks. If you did not provide `state` when making the sign-in request, this field
* will be `null`.
*/
state: string | null;
/**
* The user's name. May be `null` or contain `null` values if you didn't request the `FULL_NAME`
* scope, if the user denied access, or if this is not the first time the user has signed into
* your app.
*/
fullName: AppleAuthenticationFullName | null;
/**
* The user's email address. Might not be present if you didn't request the `EMAIL` scope. May
* also be null if this is not the first time the user has signed into your app. If the user chose
* to withhold their email address, this field will instead contain an obscured email address with
* an Apple domain.
*/
email: string | null;
/**
* A value that indicates whether the user appears to the system to be a real person.
*/
realUserStatus: AppleAuthenticationUserDetectionStatus;
/**
* A JSON Web Token (JWT) that securely communicates information about the user to your app.
*/
identityToken: string | null;
/**
* A short-lived session token used by your app for proof of authorization when interacting with
* the app's server counterpart. Unlike `user`, this is ephemeral and will change each session.
*/
authorizationCode: string | null;
};
/**
* An object representing the tokenized portions of the user's full name. Any of all of the fields
* may be `null`. Only applicable fields that the user has allowed your app to access will be nonnull.
*/
export type AppleAuthenticationFullName = {
namePrefix: string | null;
givenName: string | null;
middleName: string | null;
familyName: string | null;
nameSuffix: string | null;
nickname: string | null;
};
/**
* An enum whose values specify scopes you can request when calling [`AppleAuthentication.signInAsync()`](#appleauthenticationsigninasyncoptions).
*
* > Note that it is possible that you will not be granted all of the scopes which you request.
* > You will still need to handle null values for any fields you request.
*
* @see [Apple
* Documentation](path_to_url
* for more details.
*/
export declare enum AppleAuthenticationScope {
FULL_NAME = 0,
EMAIL = 1
}
export declare enum AppleAuthenticationOperation {
/**
* An operation that depends on the particular kind of credential provider.
*/
IMPLICIT = 0,
LOGIN = 1,
REFRESH = 2,
LOGOUT = 3
}
/**
* An enum whose values specify state of the credential when checked with [`AppleAuthentication.getCredentialStateAsync()`](#appleauthenticationgetcredentialstateasyncuser).
*
* @see [Apple
* Documentation](path_to_url
* for more details.
*/
export declare enum AppleAuthenticationCredentialState {
REVOKED = 0,
AUTHORIZED = 1,
NOT_FOUND = 2,
TRANSFERRED = 3
}
/**
* An enum whose values specify the system's best guess for how likely the current user is a real person.
*
* @see [Apple
* Documentation](path_to_url
* for more details.
*/
export declare enum AppleAuthenticationUserDetectionStatus {
/**
* The system does not support this determination and there is no data.
*/
UNSUPPORTED = 0,
/**
* The system has not determined whether the user might be a real person.
*/
UNKNOWN = 1,
/**
* The user appears to be a real person.
*/
LIKELY_REAL = 2
}
/**
* An enum whose values control which pre-defined text to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationbutton).
*/
export declare enum AppleAuthenticationButtonType {
/**
* "Sign in with Apple"
*/
SIGN_IN = 0,
/**
* "Continue with Apple"
*/
CONTINUE = 1,
/**
* "Sign up with Apple"
* @platform ios 13.2+
*/
SIGN_UP = 2
}
/**
* An enum whose values control which pre-defined color scheme to use when rendering an [`AppleAuthenticationButton`](#appleauthenticationbutton).
*/
export declare enum AppleAuthenticationButtonStyle {
/**
* White button with black text.
*/
WHITE = 0,
/**
* White button with a black outline and black text.
*/
WHITE_OUTLINE = 1,
/**
* Black button with white text.
*/
BLACK = 2
}
//# sourceMappingURL=AppleAuthentication.types.d.ts.map
``` | /content/code_sandbox/packages/expo-apple-authentication/build/AppleAuthentication.types.d.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 2,226 |
```xml
import { ABP } from '@abp/ng.core';
import { Injector, Type } from '@angular/core';
import { AsyncValidatorFn, ValidatorFn } from '@angular/forms';
import { Observable } from 'rxjs';
import {
Prop,
PropCallback,
PropContributorCallback,
PropContributorCallbacks,
PropData,
PropDisplayTextResolver,
PropList,
PropPredicate,
Props,
PropsFactory,
} from './props';
import { FilteredWithOptions, PartialWithOptions } from '../utils/model.utils';
export class FormPropList<R = any> extends PropList<R, FormProp<R>> {}
export class FormProps<R = any> extends Props<PropList<R, FormProp<R>>> {
protected _ctor: Type<FormPropList<R>> = FormPropList;
}
export interface FormPropGroup {
name: string;
className?: string;
}
export interface FormPropTooltip {
text: string;
placement?: 'top' | 'end' | 'bottom' | 'start';
}
export class GroupedFormPropList<R = any> {
public readonly items: GroupedFormPropItem[] = [];
count = 1;
addItem(item: FormProp<R>) {
const groupName = item.group?.name;
let group = this.items.find(i => i.group?.name === groupName);
if (group) {
group.formPropList.addTail(item);
} else {
group = {
formPropList: new FormPropList(),
group: item.group || { name: `default${this.count++}`, className: item.group?.className },
};
group.formPropList.addHead(item);
this.items.push(group);
}
}
}
export interface GroupedFormPropItem {
group?: FormPropGroup;
formPropList: FormPropList;
}
export class CreateFormPropsFactory<R = any> extends PropsFactory<FormProps<R>> {
protected _ctor: Type<FormProps<R>> = FormProps;
}
export class EditFormPropsFactory<R = any> extends PropsFactory<FormProps<R>> {
protected _ctor: Type<FormProps<R>> = FormProps;
}
export class FormProp<R = any> extends Prop<R> {
readonly validators: PropCallback<R, ValidatorFn[]>;
readonly asyncValidators: PropCallback<R, AsyncValidatorFn[]>;
readonly disabled: PropPredicate<R>;
readonly readonly: PropPredicate<R>;
readonly autocomplete: string;
readonly defaultValue: boolean | number | string | Date | Array<string>;
readonly options: PropCallback<R, Observable<ABP.Option<any>[]>> | undefined;
readonly id: string | undefined;
readonly template?: Type<any>;
readonly className?: string;
readonly group?: FormPropGroup | undefined;
readonly displayTextResolver?: PropDisplayTextResolver<R>;
readonly formText?: string;
readonly tooltip?: FormPropTooltip;
constructor(options: FormPropOptions<R>) {
super(
options.type,
options.name,
options.displayName || '',
options.permission || '',
options.visible,
options.isExtra,
options.template,
options.className,
options.formText,
options.tooltip,
);
this.group = options.group;
this.className = options.className;
this.formText = options.formText;
this.tooltip = options.tooltip;
this.asyncValidators = options.asyncValidators || (_ => []);
this.validators = options.validators || (_ => []);
this.disabled = options.disabled || (_ => false);
this.readonly = options.readonly || (_ => false);
this.autocomplete = options.autocomplete || 'off';
this.options = options.options;
this.id = options.id || options.name;
const defaultValue = options.defaultValue;
this.defaultValue = isFalsyValue(defaultValue) ? (defaultValue as number) : defaultValue || '';
this.displayTextResolver = options.displayTextResolver;
}
static create<R = any>(options: FormPropOptions<R>) {
return new FormProp<R>(options);
}
static createMany<R = any>(arrayOfOptions: FormPropOptions<R>[]) {
return arrayOfOptions.map(FormProp.create);
}
}
export class FormPropData<R = any> extends PropData<R> {
getInjected: PropData<R>['getInjected'];
constructor(
injector: Injector,
public readonly record: R,
) {
super();
this.getInjected = injector.get.bind(injector);
}
}
type OptionalKeys =
| 'permission'
| 'visible'
| 'displayName'
| 'isExtra'
| 'validators'
| 'asyncValidators'
| 'disabled'
| 'readonly'
| 'autocomplete'
| 'defaultValue'
| 'options'
| 'id'
| 'displayTextResolver'
| 'formText'
| 'tooltip';
export type FormPropOptions<R = any> = PartialWithOptions<FormProp<R>, OptionalKeys> &
FilteredWithOptions<FormProp<R>, OptionalKeys>;
export type CreateFormPropDefaults<R = any> = Record<string, FormProp<R>[]>;
export type CreateFormPropContributorCallback<R = any> = PropContributorCallback<FormPropList<R>>;
export type CreateFormPropContributorCallbacks<R = any> = PropContributorCallbacks<FormPropList<R>>;
export type EditFormPropDefaults<R = any> = Record<string, FormProp<R>[]>;
export type EditFormPropContributorCallback<R = any> = PropContributorCallback<FormPropList<R>>;
export type EditFormPropContributorCallbacks<R = any> = PropContributorCallbacks<FormPropList<R>>;
function isFalsyValue(defaultValue?: FormProp['defaultValue']): boolean {
return [0, '', false].indexOf(defaultValue as any) > -1;
}
``` | /content/code_sandbox/npm/ng-packs/packages/components/extensible/src/lib/models/form-props.ts | xml | 2016-12-03T22:56:24 | 2024-08-16T16:24:05 | abp | abpframework/abp | 12,657 | 1,200 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="path_to_url"
xmlns:tools="path_to_url"
android:id="@+id/activity_simple_circle_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context="com.nightonke.boommenusample.SimpleCircleButtonActivity">
<ListView
android:id="@+id/list_view"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<com.nightonke.boommenu.BoomMenuButton
android:id="@+id/bmb"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
/>
</RelativeLayout>
``` | /content/code_sandbox/app/src/main/res/layout/activity_simple_circle_button.xml | xml | 2016-03-19T12:04:12 | 2024-08-12T03:29:06 | BoomMenu | Nightonke/BoomMenu | 5,806 | 236 |
```xml
import {isObject} from '../utils.ts';
import type {RequestData, RequestOpts} from '../types.ts';
const {csrfToken} = window.config;
// safe HTTP methods that don't need a csrf token
const safeMethods = new Set(['GET', 'HEAD', 'OPTIONS', 'TRACE']);
// fetch wrapper, use below method name functions and the `data` option to pass in data
// which will automatically set an appropriate headers. For json content, only object
// and array types are currently supported.
export function request(url: string, {method = 'GET', data, headers = {}, ...other}: RequestOpts = {}) {
let body: RequestData;
let contentType: string;
if (data instanceof FormData || data instanceof URLSearchParams) {
body = data;
} else if (isObject(data) || Array.isArray(data)) {
contentType = 'application/json';
body = JSON.stringify(data);
}
const headersMerged = new Headers({
...(!safeMethods.has(method) && {'x-csrf-token': csrfToken}),
...(contentType && {'content-type': contentType}),
});
for (const [name, value] of Object.entries(headers)) {
headersMerged.set(name, value);
}
return fetch(url, {
method,
headers: headersMerged,
...other,
...(body && {body}),
});
}
export const GET = (url: string, opts?: RequestOpts) => request(url, {method: 'GET', ...opts});
export const POST = (url: string, opts?: RequestOpts) => request(url, {method: 'POST', ...opts});
export const PATCH = (url: string, opts?: RequestOpts) => request(url, {method: 'PATCH', ...opts});
export const PUT = (url: string, opts?: RequestOpts) => request(url, {method: 'PUT', ...opts});
export const DELETE = (url: string, opts?: RequestOpts) => request(url, {method: 'DELETE', ...opts});
``` | /content/code_sandbox/web_src/js/modules/fetch.ts | xml | 2016-11-01T02:13:26 | 2024-08-16T19:51:49 | gitea | go-gitea/gitea | 43,694 | 425 |
```xml
import Board from "./boards";
import Purchase from "./purchases";
import PipelineLabel from "./pipelineLabels";
import PipelineTemplate from "./pipelineTemplates";
import Checklists from "./checklists";
export { Board, Purchase, PipelineLabel, PipelineTemplate, Checklists };
``` | /content/code_sandbox/packages/plugin-purchases-api/src/graphql/resolvers/mutations/index.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 53 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Notwithstanding anything to the contrary herein, any previous version
of Tencent GT shall not be subject to the license hereunder.
All right, title, and interest, including all intellectual property rights,
in and to the previous version of Tencent GT (including any and all copies thereof)
shall be owned and retained by Tencent and subject to the license under the
path_to_url
Unless required by applicable law or agreed to in writing, software distributed
-->
<ScrollView xmlns:android="path_to_url"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@color/page_dark_bg"
android:paddingLeft="12dp"
android:paddingRight="12dp"
android:scrollbars="none" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal"
android:paddingBottom="12dp"
android:paddingTop="12dp" >
<TextView
android:id="@+id/title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/eula_title"
android:textColor="#333333"
android:textSize="@dimen/text_size_large" />
<TextView
android:id="@+id/info"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="false"
android:textColor="#666666"
android:textSize="16sp"
android:paddingTop="12dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
android:singleLine="false"
android:textColor="#666666"
android:textSize="16sp"
android:text="@string/company_name" />
</LinearLayout>
</ScrollView>
``` | /content/code_sandbox/android/GT_APP/app/src/main/res/layout/legalterm_body.xml | xml | 2016-01-13T10:29:55 | 2024-08-13T06:40:00 | GT | Tencent/GT | 4,384 | 427 |
```xml
import {Sequelize} from 'sequelize-typescript';
import {User} from '../users/User';
import {Post} from '../posts/Post';
export const sequelize = new Sequelize({
dialect: 'sqlite',
storage: ':memory:',
models: [User, Post],
});
``` | /content/code_sandbox/examples/simple/lib/database/sequelize.ts | xml | 2016-01-27T11:25:52 | 2024-08-13T16:56:45 | sequelize-typescript | sequelize/sequelize-typescript | 2,768 | 60 |
```xml
import { requireNativeModule } from 'expo-modules-core';
// TODO: Rename the package to 'ExpoTracking'
export default requireNativeModule('ExpoTrackingTransparency');
``` | /content/code_sandbox/packages/expo-tracking-transparency/src/ExpoTrackingTransparency.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 37 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.