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
<?xml version="1.0" encoding="utf-8" ?>
<controls:TestContentPage xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:controls="clr-namespace:Xamarin.Forms.Controls"
xmlns:system="clr-namespace:System;assembly=mscorlib"
x:Name="This"
x:Class="Xamarin.Forms.Controls.Issues.Issue4143">
<ScrollView>
<StackLayout>
<Label
Text="This test is passed if all tappable spans (blue and underlined texts) react to touches by changing its background color. Only the touched span should react and not others."/>
<Label
Margin="10"
HorizontalOptions="Center"
TextColor="Black"
BackgroundColor="CadetBlue">
<Label.FormattedText>
<FormattedString>
<Span Text="Two clickable spans in one line: " />
<Span
x:Name="Link1"
TextDecorations="Underline"
Text="Link1"
TextColor="Blue">
<Span.GestureRecognizers>
<TapGestureRecognizer Tapped="OnLink1Tapped"/>
</Span.GestureRecognizers>
</Span>
<Span Text=" " />
<Span
x:Name="Link2"
Text="Link2 "
TextDecorations="Underline"
TextColor="Blue">
<Span.GestureRecognizers>
<TapGestureRecognizer Tapped="OnLink2Tapped" />
</Span.GestureRecognizers>
</Span>
<Span Text="Multiline tappable span: " />
<Span
x:Name="Link3"
TextDecorations="Underline"
Text="Link3_1 Link3_2"
TextColor="Blue">
<Span.GestureRecognizers>
<TapGestureRecognizer Tapped="OnLink3Tapped" />
</Span.GestureRecognizers>
</Span>
</FormattedString>
</Label.FormattedText>
</Label>
<Label
Margin="10"
HorizontalOptions="Center"
VerticalOptions="CenterAndExpand"
Padding="10,20"
BackgroundColor="CadetBlue">
<Label.FormattedText>
<FormattedString>
<Span Text="Clickable Span in a Label with padding: " />
<Span
x:Name="Link4"
Text="Link4"
TextDecorations="Underline"
TextColor="Blue">
<Span.GestureRecognizers>
<TapGestureRecognizer Tapped="OnLink4Tapped"/>
</Span.GestureRecognizers>
</Span>
</FormattedString>
</Label.FormattedText>
</Label>
<Label
Margin = "10"
FlowDirection="RightToLeft"
TextColor="Black"
BackgroundColor="CadetBlue">
<Label.FormattedText>
<FormattedString>
<Span Text=" ." />
<Span Text="{x:Static system:Environment.NewLine}"/>
<Span
x:Name="Link5"
Text=" "
TextDecorations="Underline"
TextColor="Blue">
<Span.GestureRecognizers>
<TapGestureRecognizer Tapped="OnLink5Tapped" />
</Span.GestureRecognizers>
</Span>
<Span Text=" ." />
</FormattedString>
</Label.FormattedText>
</Label>
</StackLayout>
</ScrollView>
</controls:TestContentPage>
``` | /content/code_sandbox/Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Issue4143.xaml | xml | 2016-03-18T15:52:03 | 2024-08-16T16:25:43 | Xamarin.Forms | xamarin/Xamarin.Forms | 5,637 | 762 |
```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>
<groupId>com.neo</groupId>
<artifactId>spring-boot-mybatis-xml</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>spring-boot-mybatis-xml</name>
<description>Demo project for Spring Boot and mybatis</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
``` | /content/code_sandbox/2.x/spring-boot-mybatis/spring-boot-mybatis-xml/pom.xml | xml | 2016-11-05T05:32:33 | 2024-08-16T13:11:30 | spring-boot-examples | ityouknow/spring-boot-examples | 30,137 | 457 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>LteRlcGraphDialog</class>
<widget class="QDialog" name="LteRlcGraphDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>660</width>
<height>447</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout" stretch="1,0,0,0">
<item>
<widget class="QCustomPlot" name="rlcPlot" native="true"/>
</item>
<item>
<widget class="QLabel" name="hintLabel">
<property name="toolTip">
<string><html><head/><body>
<h3>Valuable and amazing time-saving keyboard shortcuts</h3>
<table><tbody>
<tr><th>+</th><td>Zoom in</td></th>
<tr><th>-</th><td>Zoom out</td></th>
<tr><th>0</th><td>Reset graph to its initial state</td></th>
<tr><th></th><td>Move right 10 pixels</td></th>
<tr><th></th><td>Move left 10 pixels</td></th>
<tr><th></th><td>Move up 10 pixels</td></th>
<tr><th></th><td>Move down 10 pixels</td></th>
<tr><th><i>Shift+</i></th><td>Move right 1 pixel</td></th>
<tr><th><i>Shift+</i></th><td>Move left 1 pixel</td></th>
<tr><th><i>Shift+</i></th><td>Move up 1 pixel</td></th>
<tr><th><i>Shift+</i></th><td>Move down 1 pixel</td></th>
<tr><th>g</th><td>Go to packet under cursor</td></th>
<tr><th>z</th><td>Toggle mouse drag / zoom</td></th>
<tr><th>t</th><td>Toggle capture / session time origin</td></th>
<tr><th>Space</th><td>Toggle crosshairs</td></th>
</tbody></table>
</body></html></string>
</property>
<property name="text">
<string/>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="mouseLabel">
<property name="text">
<string>Mouse</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="dragRadioButton">
<property name="toolTip">
<string>Drag using the mouse button.</string>
</property>
<property name="text">
<string>drags</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="zoomRadioButton">
<property name="toolTip">
<string>Select using the mouse button.</string>
</property>
<property name="text">
<string>zooms</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="resetButton">
<property name="toolTip">
<string><html><head/><body><p>Reset the graph to its initial state.</p></body></html></string>
</property>
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Close|QDialogButtonBox::Help|QDialogButtonBox::Save</set>
</property>
</widget>
</item>
</layout>
<action name="actionReset">
<property name="text">
<string>Reset Graph</string>
</property>
<property name="toolTip">
<string>Reset the graph to its initial state.</string>
</property>
<property name="shortcut">
<string>0</string>
</property>
</action>
<action name="actionZoomIn">
<property name="text">
<string>Zoom In</string>
</property>
<property name="toolTip">
<string>Zoom In</string>
</property>
<property name="shortcut">
<string>+</string>
</property>
</action>
<action name="actionZoomOut">
<property name="text">
<string>Zoom Out</string>
</property>
<property name="toolTip">
<string>Zoom Out</string>
</property>
<property name="shortcut">
<string>-</string>
</property>
</action>
<action name="actionMoveUp10">
<property name="text">
<string>Move Up 10 Pixels</string>
</property>
<property name="toolTip">
<string>Move Up 10 Pixels</string>
</property>
<property name="shortcut">
<string>Up</string>
</property>
</action>
<action name="actionMoveLeft10">
<property name="text">
<string>Move Left 10 Pixels</string>
</property>
<property name="toolTip">
<string>Move Left 10 Pixels</string>
</property>
<property name="shortcut">
<string>Left</string>
</property>
</action>
<action name="actionMoveRight10">
<property name="text">
<string>Move Right 10 Pixels</string>
</property>
<property name="toolTip">
<string>Move Right 10 Pixels</string>
</property>
<property name="shortcut">
<string>Right</string>
</property>
</action>
<action name="actionMoveDown10">
<property name="text">
<string>Move Down 10 Pixels</string>
</property>
<property name="toolTip">
<string>Move Down 10 Pixels</string>
</property>
<property name="shortcut">
<string>Down</string>
</property>
</action>
<action name="actionMoveUp1">
<property name="text">
<string>Move Up 1 Pixel</string>
</property>
<property name="toolTip">
<string>Move Up 1 Pixel</string>
</property>
<property name="shortcut">
<string>Shift+Up</string>
</property>
</action>
<action name="actionMoveLeft1">
<property name="text">
<string>Move Left 1 Pixel</string>
</property>
<property name="toolTip">
<string>Move Left 1 Pixel</string>
</property>
<property name="shortcut">
<string>Shift+Left</string>
</property>
</action>
<action name="actionMoveRight1">
<property name="text">
<string>Move Right 1 Pixel</string>
</property>
<property name="toolTip">
<string>Move Right 1 Pixel</string>
</property>
<property name="shortcut">
<string>Shift+Right</string>
</property>
</action>
<action name="actionMoveDown1">
<property name="text">
<string>Move Down 1 Pixel</string>
</property>
<property name="toolTip">
<string>Move down 1 Pixel</string>
</property>
<property name="shortcut">
<string>Shift+Down</string>
</property>
</action>
<action name="actionDragZoom">
<property name="text">
<string>Drag / Zoom</string>
</property>
<property name="toolTip">
<string>Toggle mouse drag / zoom behavior</string>
</property>
<property name="shortcut">
<string>Z</string>
</property>
</action>
<action name="actionCrosshairs">
<property name="text">
<string>Crosshairs</string>
</property>
<property name="toolTip">
<string>Toggle crosshairs</string>
</property>
<property name="shortcut">
<string>Space</string>
</property>
</action>
<action name="actionMoveUp100">
<property name="text">
<string>Move Up 100 Pixels</string>
</property>
<property name="toolTip">
<string>Move Up 100 Pixels</string>
</property>
<property name="shortcut">
<string>PgUp</string>
</property>
</action>
<action name="actionMoveDown100">
<property name="text">
<string>Move Up 100 Pixels</string>
</property>
<property name="toolTip">
<string>Move Up 100 Pixels</string>
</property>
<property name="shortcut">
<string>PgDown</string>
</property>
</action>
<action name="actionGoToPacket">
<property name="text">
<string>Go To Packet Under Cursor</string>
</property>
<property name="toolTip">
<string>Go to packet currently under the cursor</string>
</property>
<property name="shortcut">
<string>G</string>
</property>
</action>
<action name="actionZoomInX">
<property name="text">
<string>Zoom In X Axis</string>
</property>
<property name="toolTip">
<string>Zoom In X Axis</string>
</property>
<property name="shortcut">
<string>X</string>
</property>
</action>
<action name="actionZoomOutY">
<property name="text">
<string>Zoom Out Y Axis</string>
</property>
<property name="toolTip">
<string>Zoom Out Y Axis</string>
</property>
<property name="shortcut">
<string>Shift+Y</string>
</property>
</action>
<action name="actionZoomInY">
<property name="text">
<string>Zoom In Y Axis</string>
</property>
<property name="toolTip">
<string>Zoom In Y Axis</string>
</property>
<property name="shortcut">
<string>Y</string>
</property>
</action>
<action name="actionZoomOutX">
<property name="text">
<string>Zoom Out X Axis</string>
</property>
<property name="toolTip">
<string>Zoom Out X Axis</string>
</property>
<property name="shortcut">
<string>Shift+X</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
<class>QCustomPlot</class>
<extends>QWidget</extends>
<header>qcustomplot.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>LteRlcGraphDialog</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>LteRlcGraphDialog</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/utilities/wireshark/ui/qt/lte_rlc_graph_dialog.ui | xml | 2016-10-27T09:31:28 | 2024-08-16T19:00:35 | nexmon | seemoo-lab/nexmon | 2,381 | 3,286 |
```xml
import { logger } from '@sentry/utils';
import { ReactNativeLibraries } from '../utils/rnlibraries';
import { RN_GLOBAL_OBJ } from '../utils/worldwide';
/**
* Polyfill the global promise instance with one we can be sure that we can attach the tracking to.
*
* In newer RN versions >=0.63, the global promise is not the same reference as the one imported from the promise library.
* This is due to a version mismatch between promise versions.
* Originally we tried a solution where we would have you put a package resolution to ensure the promise instances match. However,
* - Using a package resolution requires the you to manually troubleshoot.
* - The package resolution fix no longer works with 0.67 on iOS Hermes.
*/
export function polyfillPromise(): void {
if (!ReactNativeLibraries.Utilities) {
logger.warn('Could not polyfill Promise. React Native Libraries Utilities not found.');
return;
}
const Promise = getPromisePolyfill();
// As of RN 0.67 only done and finally are used
// eslint-disable-next-line import/no-extraneous-dependencies
require('promise/setimmediate/done');
// eslint-disable-next-line import/no-extraneous-dependencies
require('promise/setimmediate/finally');
ReactNativeLibraries.Utilities.polyfillGlobal('Promise', () => Promise);
}
/**
* Single source of truth for the Promise implementation we want to use.
* This is important for verifying that the rejected promise tracing will work as expected.
*/
export function getPromisePolyfill(): unknown {
/* eslint-disable import/no-extraneous-dependencies,@typescript-eslint/no-var-requires */
// Below, we follow the exact way React Native initializes its promise library, and we globally replace it.
return require('promise/setimmediate/es6-extensions');
}
/**
* Lazy require the rejection tracking module
*/
export function requireRejectionTracking(): {
disable: () => void;
enable: (arg: unknown) => void;
} {
// eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-extraneous-dependencies
return require('promise/setimmediate/rejection-tracking');
}
/**
* Checks if the promise is the same one or not, if not it will warn the user
*/
export function checkPromiseAndWarn(): void {
try {
// `promise` package is a dependency of react-native, therefore it is always available.
// but it is possible that the user has installed a different version of promise
// or dependency that uses a different version.
// We have to check if the React Native Promise and the `promise` package Promise are using the same reference.
// If they are not, likely there are multiple versions of the `promise` package installed.
const ReactNativePromise = ReactNativeLibraries.Promise;
// eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-extraneous-dependencies
const PromisePackagePromise = require('promise/setimmediate/es6-extensions');
const UsedPromisePolyfill = getPromisePolyfill();
if (ReactNativePromise !== PromisePackagePromise) {
logger.warn(
'You appear to have multiple versions of the "promise" package installed. ' +
'This may cause unexpected behavior like undefined `Promise.allSettled`. ' +
'Please install the `promise` package manually using the exact version as the React Native package. ' +
'See path_to_url for more details.',
);
}
// This only make sense if the user disabled the integration Polyfill
if (UsedPromisePolyfill !== RN_GLOBAL_OBJ.Promise) {
logger.warn(
'Unhandled promise rejections will not be caught by Sentry. ' +
'See path_to_url for more details.',
);
} else {
logger.log('Unhandled promise rejections will be caught by Sentry.');
}
} catch (e) {
// Do Nothing
logger.warn(
'Unhandled promise rejections will not be caught by Sentry. ' +
'See path_to_url for more details.',
);
}
}
``` | /content/code_sandbox/src/js/integrations/reactnativeerrorhandlersutils.ts | xml | 2016-11-30T14:45:57 | 2024-08-16T13:21:38 | sentry-react-native | getsentry/sentry-react-native | 1,558 | 856 |
```xml
<resources>
<string name="app_name">CatLoadingLibrary</string>
<string name="loading">L O A D I N G ...</string>
</resources>
``` | /content/code_sandbox/catloadinglibrary/src/main/res/values/strings.xml | xml | 2016-04-01T09:02:26 | 2024-08-02T07:37:09 | CatLoadingView | Rogero0o/CatLoadingView | 1,066 | 39 |
```xml
<!--
Description: feed title - xhtml w/ escaped markup
-->
<feed version="0.3" xmlns="path_to_url#">
<title type="application/xhtml+xml"><div xmlns="path_to_url"><p>Feed Title</p></div></title>
</feed>
``` | /content/code_sandbox/testdata/parser/atom/atom03_feed_title_xhtml_escaped_markup.xml | xml | 2016-01-23T02:44:34 | 2024-08-16T15:16:03 | gofeed | mmcdole/gofeed | 2,547 | 64 |
```xml
import { HEADERS } from '@verdaccio/core';
import { $NextFunctionVer, $RequestExtend, $ResponseExtend } from '../types';
// TODO: remove, was relocated to web package
// @ts-deprecated
export function setSecurityWebHeaders(
req: $RequestExtend,
res: $ResponseExtend,
next: $NextFunctionVer
): void {
// disable loading in frames (clickjacking, etc.)
res.header(HEADERS.FRAMES_OPTIONS, 'deny');
// avoid stablish connections outside of domain
res.header(HEADERS.CSP, "connect-src 'self'");
// path_to_url
res.header(HEADERS.CTO, 'nosniff');
// path_to_url
res.header(HEADERS.XSS, '1; mode=block');
next();
}
``` | /content/code_sandbox/packages/middleware/src/middlewares/security-headers.ts | xml | 2016-04-15T16:21:12 | 2024-08-16T09:38:01 | verdaccio | verdaccio/verdaccio | 16,189 | 179 |
```xml
import _ from "underscore"
import { Torrent } from "../bittorrent"
export let serverService = ['$rootScope', '$q', 'electron', 'notificationService', '$bittorrent', '$btclients',
function($rootScope, $q, electron, $notify, $bittorrent, $btclients) {
/*
* Well known error values used for error handling
*/
const ERR_SELF_SIGNED_CERT = "DEPTH_ZERO_SELF_SIGNED_CERT"
/**
* Constructor, with class name
*/
function Server(ip, proto, port, user, password, client, path) {
if(arguments.length === 1) {
this.fromJson(arguments[0])
} else {
this.id = generateGUID()
this.ip = ip || ''
this.proto = proto
this.port = port
this.user = user || ''
this.password = password || ''
this.client = client
this.path = path
this.lastused = -1
this.columns = this.defaultColumns()
}
this.isConnected = false
}
Server.prototype.fromJson = function(data) {
this.name = data.name
this.id = data.id
this.ip = data.ip || ''
this.proto = data.proto || "http"
this.port = data.port
this.user = data.user || ''
this.password = data.password || ''
this.client = data.client
this.path = data.path || ''
this.default = data.default
this.lastused = data.lastused
this.certificate = data.certificate
this.columns = this.parseColumns(data.columns)
};
Server.prototype.json = function() {
return {
name: this.name,
id: this.id,
ip: this.ip,
proto: this.proto,
port: this.port,
user: this.user,
password: this.password,
client: this.client,
path: this.path,
default: this.default,
lastused: this.lastused || -1,
certificate: this.certificate,
columns: this.columns.filter((column) => column.enabled).map((column) => column.name),
}
};
Server.prototype.getName = function() {
return $btclients[this.client].name
};
Server.prototype.getIcon = function() {
return $btclients[this.client].icon
};
Server.prototype.getNameAtAddress = function() {
return this.getName() + " @ " + this.ip
};
Server.prototype.getDisplayName = function () {
return this.name || this.getNameAtAddress()
};
Server.prototype.updateLastUsed = function() {
this.lastused = new Date().getTime()
};
Server.prototype.cleanPath = function () {
let path = trim(this.path, "/")
if (path) {
return "/" + path
} else {
return ""
}
};
Server.prototype.url = function() {
return `${this.proto}://${this.ip}:${this.port}${this.cleanPath()}`
};
Server.prototype.isHTTPS = function() {
return this.proto === 'https'
}
function trim(s, mask) {
/*jshint bitwise: false*/
while(~mask.indexOf(s[0])) {
s = s.slice(1);
}
while(~mask.indexOf(s[s.length - 1])) {
s = s.slice(0, -1);
}
return s;
}
Server.prototype.setPath = function() {
let client = $bittorrent.getClient(this.client)
if(client && client.defaultPath) {
this.path = client.defaultPath()
} else {
this.path = "/"
}
};
const promiseWithTimeout = (promise: Promise<any>, timeout: number) => {
const timeoutPromise = new Promise((_, reject) => {
setTimeout(() => reject(new Error('Request timed out')), timeout);
})
return Promise.race([promise, timeoutPromise])
};
Server.prototype.connect = function() {
let self = this
if(!this.client) {
$notify.alert("Opps!", "Please select a client to connect to!")
return $q.reject()
}
let service = $bittorrent.getClient(this.client);
let connectOrTimeout = promiseWithTimeout(service.connect(this), 3000)
return connectOrTimeout.catch(function(err) {
self.isConnected = false
$notify.alertAuth(err)
if (err.code === ERR_SELF_SIGNED_CERT) {
return self.askForCertificate().then(function() {
return self.connect()
})
}
return $q.reject(err, this)
}).then(function() {
self.isConnected = true
//$bittorrent.setClient(self.service);
$bittorrent.setServer(self)
return $q.resolve()
})
};
Server.prototype.askForCertificate = function() {
let self = this
let defer = $q.defer()
electron.ca.get(self.json(), function(err, cert) {
if (err) {
defer.reject(err)
} else {
let unsubscribe = $rootScope.$on('certificate-modal', function(e, id, fingerprint) {
unsubscribe()
if (id) {
self.certificate = fingerprint
defer.resolve()
} else {
defer.reject()
}
})
}
})
return defer.promise
}
Server.prototype.getCertificate = function() {
if (this.certificate) {
return electron.ca.loadCertificate(this.certificate)
}
}
Server.prototype.equals = function(other) {
return (
this.ip === other.ip &&
this.proto === other.proto &&
this.port === other.port &&
this.user === other.user &&
this.password === other.password &&
this.client === other.client &&
this.path === other.path &&
this.certificate === this.certificate
)
}
function zipsort(obj, sor) {
return function(a, b) {
let i = sor.indexOf(a.name)
let j = sor.indexOf(b.name)
if(i === j) {
return 0
} else if(i === -1) {
return 1
} else if(j === -1) {
return -1
} else {
return i - j
}
}
}
Server.prototype.parseColumns = function(data) {
let columns = this.defaultColumns()
if(!data || data.length === 0) return columns
columns.sort(zipsort(columns, data))
columns.forEach((column) => {
column.enabled = data.some((entry) => (entry === column.name))
})
return columns
}
Server.prototype.defaultColumns = function() {
let columns = []
angular.copy(Torrent.COLUMNS, columns)
columns = this.addCustomColumns(columns)
return columns
}
Server.prototype.addCustomColumns = function (columns) {
if (this.client) {
let client = $bittorrent.getClient(this.client)
columns = _.union(columns, client.extraColumns)
}
return columns
};
Server.prototype.bootstrap = function () {
this.columns = this.addCustomColumns(this.columns)
};
function generateGUID() {
return s4() + s4() + '-' + s4() + '-' + s4() + '-' +
s4() + '-' + s4() + s4() + s4();
}
function s4() {
return Math.floor((1 + Math.random()) * 0x10000)
.toString(16)
.substring(1);
}
/**
* Return the constructor function
*/
return Server;
}
];
``` | /content/code_sandbox/src/scripts/services/server.ts | xml | 2016-06-18T15:04:41 | 2024-08-16T07:12:27 | Electorrent | tympanix/Electorrent | 1,016 | 1,617 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="FlexmarkExt.ModuleBuildProperties">
<option name="extensionName" value="FlexmarkHtmlConverter" />
<option name="extensionPackage" value="com.vladsch.flexmark.html.converter" />
<option name="extensionPackagePrefix" value="com.vladsch" />
<option name="delimiterProcessor" value="false" />
<option name="blockParser" value="false" />
<option name="blockPreProcessor" value="false" />
<option name="linkRefProcessor" value="false" />
<option name="paragraphPreProcessor" value="false" />
<option name="nodePostProcessor" value="false" />
<option name="documentPostProcessor" value="false" />
<option name="jiraRenderer" value="false" />
<option name="customBlockNode" value="false" />
<option name="customNode" value="false" />
<option name="customNodeRepository" value="false" />
<option name="customProperties" value="false" />
</component>
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="flexmark" />
<orderEntry type="module" module-name="flexmark-util-ast" />
<orderEntry type="module" module-name="flexmark-util-builder" />
<orderEntry type="module" module-name="flexmark-util-data" />
<orderEntry type="module" module-name="flexmark-util-dependency" />
<orderEntry type="module" module-name="flexmark-util-format" />
<orderEntry type="module" module-name="flexmark-util-html" />
<orderEntry type="module" module-name="flexmark-util-misc" />
<orderEntry type="module" module-name="flexmark-util-sequence" />
<orderEntry type="module" module-name="flexmark-util-visitor" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.13" level="project" />
<orderEntry type="module" module-name="flexmark-test-util" scope="TEST" />
<orderEntry type="module" module-name="flexmark-ext-tables" />
<orderEntry type="module" module-name="flexmark-ext-emoji" />
<orderEntry type="library" name="org.jetbrains:annotations" level="project" />
<orderEntry type="library" name="org.jsoup:jsoup:1.15.4" level="project" />
</component>
</module>
``` | /content/code_sandbox/flexmark-html2md-converter/flexmark-html2md-converter.iml | xml | 2016-01-23T15:29:29 | 2024-08-15T04:04:18 | flexmark-java | vsch/flexmark-java | 2,239 | 757 |
```xml
import styled from 'styled-components';
import { Button, LinkApp } from '@components';
import translate from '@translations';
const ImportSuccessContainer = styled.div`
display: flex;
flex-direction: column;
align-items: center;
`;
export default function ImportSuccess() {
return (
<ImportSuccessContainer>
{translate('SETTINGS_IMPORT_SUCCESS')}
<LinkApp href="/settings">
<Button fullwidth={true} secondary={true}>
{translate('SETTINGS_IMPORT_COMPLETE')}
</Button>
</LinkApp>
</ImportSuccessContainer>
);
}
``` | /content/code_sandbox/src/features/Settings/Import/components/ImportSuccess.tsx | xml | 2016-12-04T01:35:27 | 2024-08-14T21:41:58 | MyCrypto | MyCryptoHQ/MyCrypto | 1,347 | 121 |
```xml
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { FooterComponent } from './footer.component';
describe('FooterComponent', () => {
let component: FooterComponent;
let fixture: ComponentFixture<FooterComponent>;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ FooterComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FooterComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});
``` | /content/code_sandbox/projects/docs-app/src/app/layout/footer/footer.component.spec.ts | xml | 2016-03-10T21:29:15 | 2024-08-15T07:07:30 | angular-tree-component | CirclonGroup/angular-tree-component | 1,093 | 121 |
```xml
import { c } from 'ttag';
import { Button } from '@proton/atoms/Button';
import type { ModalProps } from '@proton/components/components';
import { ModalTwo, ModalTwoContent, ModalTwoFooter } from '@proton/components/components';
import { useLoading } from '@proton/hooks';
import type { APP_NAMES } from '@proton/shared/lib/constants';
import {
APPS,
DRIVE_APP_NAME,
DRIVE_SHORT_APP_NAME,
MAIL_APP_NAME,
MAIL_SHORT_APP_NAME,
PASS_APP_NAME,
PASS_SHORT_APP_NAME,
} from '@proton/shared/lib/constants';
import driveAccess from '../drive/access.svg';
import mailAccess from '../mail/access.svg';
import passAccess from '../pass/access.svg';
interface Props extends ModalProps {
onContinue: () => void;
onSignOut: () => Promise<void>;
app: APP_NAMES;
}
const AccessModal = ({ app, onClose, onContinue, onSignOut, ...rest }: Props) => {
const [loading, withLoading] = useLoading();
const { svg, appName, shortName } = (() => {
if (app === APPS.PROTONPASS) {
return { svg: passAccess, appName: PASS_APP_NAME, shortName: PASS_SHORT_APP_NAME };
}
if (app === APPS.PROTONMAIL || app === APPS.PROTONCALENDAR) {
return { svg: mailAccess, appName: MAIL_APP_NAME, shortName: MAIL_SHORT_APP_NAME };
}
if (app === APPS.PROTONDRIVE) {
return { svg: driveAccess, appName: DRIVE_APP_NAME, shortName: DRIVE_SHORT_APP_NAME };
}
throw new Error('unknown app');
})();
return (
<ModalTwo {...rest} disableCloseOnEscape={true} size="small">
<ModalTwoContent>
<div className="text-center">
<img src={svg} alt="" className="mb-4 mt-4" />
<div className="mb-4 text-bold h3">{c('pass_signup_2023: Info')
.t`Welcome to ${shortName} Plus`}</div>
<div className="mb-6 color-weak">
{c('pass_signup_2023: Info')
.t`You already have access to premium ${appName} features no need to purchase again.`}
</div>
</div>
</ModalTwoContent>
<ModalTwoFooter>
<Button
shape="ghost"
color="norm"
loading={loading}
onClick={async () => {
await withLoading(onSignOut().then(() => onClose?.()));
}}
fullWidth
>
{c('pass_signup_2023: Action').t`Create another account instead`}
</Button>
<Button
color="norm"
onClick={() => {
onContinue();
onClose?.();
}}
fullWidth
>
{c('pass_signup_2023: Action').t`Start using ${appName}`}
</Button>
</ModalTwoFooter>
</ModalTwo>
);
};
export default AccessModal;
``` | /content/code_sandbox/applications/account/src/app/single-signup-v2/modals/AccessModal.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 662 |
```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.
-->
<ripple xmlns:android="path_to_url"
android:color="?attr/colorPrimary"/>
``` | /content/code_sandbox/lib/java/com/google/android/material/navigation/res/drawable-v21/mtrl_navigation_bar_item_background.xml | xml | 2016-12-05T16:11:29 | 2024-08-16T17:51:42 | material-components-android | material-components/material-components-android | 16,176 | 83 |
```xml
import * as compose from "lodash.flowright";
import {
DEFAULT_BACKGROUND_COLORS,
DEFAULT_BORDER_COLORS,
} from "../../components/chart/utils";
import ChartRenderer from "../../components/chart/ChartRenderer";
import NumberRenderer from "../../components/chart/NumberRenderer";
import React from "react";
import Spinner from "@erxes/ui/src/components/Spinner";
import TableRenderer from "../../components/chart/TableRenderer";
import { gql } from "@apollo/client";
import { graphql } from "@apollo/client/react/hoc";
import { queries } from "../../graphql";
import { withProps } from "@erxes/ui/src/utils/core";
const getRandomNumbers = (num?: number) => {
const getRandomNumber: number = Math.floor(Math.random() * (DEFAULT_BACKGROUND_COLORS.length - (num || 0) - 1));
if (!num) {
return getRandomNumber;
}
const numbers: number[] = [];
for (let i = 0; i < num; i++) {
numbers.push(getRandomNumber + i);
}
return numbers;
};
type Props = {
queryParams: any;
chartType: string;
chartVariables: any;
filter?: any;
dimension?: any;
chartHeight?: number;
};
type FinalProps = {
chartGetResultQuery: any;
} & Props;
const ChartRendererList = (props: FinalProps) => {
const { chartGetResultQuery, chartVariables, filter, chartType } = props;
if (chartGetResultQuery && chartGetResultQuery.loading) {
return <Spinner />;
}
const getResult = chartGetResultQuery?.chartGetResult || {};
let finalProps: any = {
...props,
loading: chartGetResultQuery.loading,
};
if (getResult && Array.isArray(getResult)) {
const randomNums = getRandomNumbers(getResult.length);
const datasets = (getResult || []).map((d, index) => ({
...d,
backgroundColor: DEFAULT_BACKGROUND_COLORS[randomNums[index]],
borderColor: DEFAULT_BORDER_COLORS[randomNums[index]],
borderWidth: 1,
}));
finalProps = { ...finalProps, datasets };
return <ChartRenderer {...finalProps} />;
}
const { data, labels, title, options } =
chartGetResultQuery?.chartGetResult || {};
const dataset = { data, labels, title };
if (chartType === "table") {
return (
<TableRenderer
dataset={dataset}
/>
);
}
if (chartType === "number") {
return (
<NumberRenderer
dataset={dataset}
serviceName={chartVariables.serviceName}
/>
);
}
const datasets =
!data && !labels && !title && chartGetResultQuery.chartGetResult;
finalProps = {
...props,
options,
datasets,
data,
labels,
title,
loading: chartGetResultQuery.loading,
};
return <ChartRenderer {...finalProps} />;
};
export default withProps<Props>(
compose(
graphql<any>(gql(queries.chartGetResult), {
name: "chartGetResultQuery",
options: ({ chartVariables, filter, dimension, chartType }) => ({
variables: {
serviceName: chartVariables.serviceName,
templateType: chartVariables.templateType,
filter: { ...filter },
dimension: { ...dimension },
chartType,
},
fetchPolicy: "network-only",
}),
})
)(ChartRendererList)
);
``` | /content/code_sandbox/packages/plugin-insight-ui/src/containers/chart/ChartRenderer.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 733 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns:xsi="path_to_url"
xmlns="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<groupId>function.example</groupId>
<artifactId>simplestjar</artifactId>
<version>1.0.0.RELEASE</version>
<packaging>jar</packaging>
<name>simplestjar</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>io.cloudevents</groupId>
<artifactId>cloudevents-api</artifactId>
<version>2.2.0</version>
<optional>true</optional>
</dependency>
</dependencies>
</project>
``` | /content/code_sandbox/spring-cloud-function-deployer/src/it/simplestjar/pom.xml | xml | 2016-09-22T02:34:34 | 2024-08-16T08:19:07 | spring-cloud-function | spring-cloud/spring-cloud-function | 1,032 | 378 |
```xml
import {Store, Type} from "@tsed/core";
import {JsonEntityStore} from "@tsed/schema";
export function isEndpoint(target: Type<any>, propertyKey: string | symbol) {
return Store.fromMethod(target, propertyKey).has(JsonEntityStore);
}
``` | /content/code_sandbox/packages/platform/platform-cache/src/utils/isEndpoint.ts | xml | 2016-02-21T18:38:47 | 2024-08-14T21:19:48 | tsed | tsedio/tsed | 2,817 | 58 |
```xml
import { readdirSync, type Stats } from 'fs'
import fs from 'fs/promises'
import path from 'path'
import util from 'util'
export async function cleanExpiredDlxCache ({
cacheDir,
dlxCacheMaxAge,
now,
}: {
cacheDir: string
dlxCacheMaxAge: number
now: Date
}): Promise<void> {
if (dlxCacheMaxAge === Infinity) return
const dlxCacheDir = path.join(cacheDir, 'dlx')
const dlxCacheNames = readOptDir(dlxCacheDir)
if (!dlxCacheNames) return
await Promise.all(dlxCacheNames.map(async (dlxCacheName) => {
const dlxCachePath = path.join(dlxCacheDir, dlxCacheName)
const dlxCacheLink = path.join(dlxCachePath, 'pkg')
let shouldClean: boolean
if (dlxCacheMaxAge <= 0) {
shouldClean = true
} else {
const dlxCacheLinkStats = await getStats(dlxCacheLink)
shouldClean = dlxCacheLinkStats !== 'ENOENT' && isOutdated(dlxCacheLinkStats, dlxCacheMaxAge, now)
}
if (shouldClean) {
// delete the symlink, the symlink's target, and orphans (if any)
await fs.rm(dlxCachePath, { recursive: true })
}
}))
await cleanOrphans(dlxCacheDir)
}
export async function cleanOrphans (dlxCacheDir: string): Promise<void> {
const dlxCacheNames = readOptDir(dlxCacheDir)
if (!dlxCacheNames) return
await Promise.all(dlxCacheNames.map(async dlxCacheName => {
const dlxCachePath = path.join(dlxCacheDir, dlxCacheName)
const dlxCacheLink = path.join(dlxCachePath, 'pkg')
const dlxCacheLinkStats = await getStats(dlxCacheLink)
if (dlxCacheLinkStats === 'ENOENT') {
return fs.rm(dlxCachePath, { recursive: true })
}
const dlxCacheLinkTarget = await getRealPath(dlxCacheLink)
const children = await fs.readdir(dlxCachePath)
await Promise.all(children.map(async name => {
if (name === 'pkg') return
const fullPath = path.join(dlxCachePath, name)
if (fullPath === dlxCacheLinkTarget) return
await fs.rm(fullPath, { recursive: true })
}))
}))
}
function isOutdated (stats: Stats, dlxCacheMaxAge: number, now: Date): boolean {
return stats.mtime.getTime() + dlxCacheMaxAge * 60_000 < now.getTime()
}
async function getStats (path: string): Promise<Stats | 'ENOENT'> {
try {
return await fs.lstat(path)
} catch (err) {
if (util.types.isNativeError(err) && 'code' in err && err.code === 'ENOENT') {
return 'ENOENT'
}
throw err
}
}
function readOptDir (dirPath: string): string[] | null {
try {
return readdirSync(dirPath, 'utf-8')
} catch (err) {
if (util.types.isNativeError(err) && 'code' in err && err.code === 'ENOENT') {
return null
}
throw err
}
}
async function getRealPath (linkPath: string): Promise<string | null> {
try {
return await fs.realpath(linkPath)
} catch (err) {
if (util.types.isNativeError(err) && 'code' in err && err.code === 'ENOENT') {
return null
}
throw err
}
}
``` | /content/code_sandbox/store/plugin-commands-store/src/cleanExpiredDlxCache.ts | xml | 2016-01-28T07:40:43 | 2024-08-16T12:38:47 | pnpm | pnpm/pnpm | 28,869 | 830 |
```xml
import {getComputedStyle} from '@floating-ui/utils/dom';
import * as React from 'react';
import {useId} from '../hooks/useId';
import type {Alignment, FloatingContext, Side} from '../types';
import {warn} from '../utils/log';
import useModernLayoutEffect from 'use-isomorphic-layout-effect';
export interface FloatingArrowProps extends React.ComponentPropsWithRef<'svg'> {
// Omit the original `refs` property from the context to avoid issues with
// generics: path_to_url
/**
* The floating context.
*/
context: Omit<FloatingContext, 'refs'> & {refs: any};
/**
* Width of the arrow.
* @default 14
*/
width?: number;
/**
* Height of the arrow.
* @default 7
*/
height?: number;
/**
* The corner radius (rounding) of the arrow tip.
* @default 0 (sharp)
*/
tipRadius?: number;
/**
* Forces a static offset over dynamic positioning under a certain condition.
*/
staticOffset?: string | number | null;
/**
* Custom path string.
*/
d?: string;
/**
* Stroke (border) color of the arrow.
*/
stroke?: string;
/**
* Stroke (border) width of the arrow.
*/
strokeWidth?: number;
}
/**
* Renders a pointing arrow triangle.
* @see path_to_url
*/
export const FloatingArrow = React.forwardRef(function FloatingArrow(
props: FloatingArrowProps,
ref: React.ForwardedRef<SVGSVGElement>,
): JSX.Element | null {
const {
context: {
placement,
elements: {floating},
middlewareData: {arrow},
},
width = 14,
height = 7,
tipRadius = 0,
strokeWidth = 0,
staticOffset,
stroke,
d,
style: {transform, ...restStyle} = {},
...rest
} = props;
if (__DEV__) {
if (!ref) {
warn('The `ref` prop is required for `FloatingArrow`.');
}
}
const clipPathId = useId();
const [isRTL, setIsRTL] = React.useState(false);
// path_to_url
useModernLayoutEffect(() => {
if (!floating) return;
const isRTL = getComputedStyle(floating).direction === 'rtl';
if (isRTL) {
setIsRTL(true);
}
}, [floating]);
if (!floating) {
return null;
}
// Strokes must be double the border width, this ensures the stroke's width
// works as you'd expect.
const computedStrokeWidth = strokeWidth * 2;
const halfStrokeWidth = computedStrokeWidth / 2;
const svgX = (width / 2) * (tipRadius / -8 + 1);
const svgY = ((height / 2) * tipRadius) / 4;
const [side, alignment] = placement.split('-') as [Side, Alignment];
const isCustomShape = !!d;
const isVerticalSide = side === 'top' || side === 'bottom';
const yOffsetProp = staticOffset && alignment === 'end' ? 'bottom' : 'top';
let xOffsetProp = staticOffset && alignment === 'end' ? 'right' : 'left';
if (staticOffset && isRTL) {
xOffsetProp = alignment === 'end' ? 'left' : 'right';
}
const arrowX = arrow?.x != null ? staticOffset || arrow.x : '';
const arrowY = arrow?.y != null ? staticOffset || arrow.y : '';
const dValue =
d ||
'M0,0' +
` H${width}` +
` L${width - svgX},${height - svgY}` +
` Q${width / 2},${height} ${svgX},${height - svgY}` +
' Z';
const rotation = {
top: isCustomShape ? 'rotate(180deg)' : '',
left: isCustomShape ? 'rotate(90deg)' : 'rotate(-90deg)',
bottom: isCustomShape ? '' : 'rotate(180deg)',
right: isCustomShape ? 'rotate(-90deg)' : 'rotate(90deg)',
}[side];
return (
<svg
{...rest}
aria-hidden
ref={ref}
width={isCustomShape ? width : width + computedStrokeWidth}
height={width}
viewBox={`0 0 ${width} ${height > width ? height : width}`}
style={{
position: 'absolute',
pointerEvents: 'none',
[xOffsetProp]: arrowX,
[yOffsetProp]: arrowY,
[side]:
isVerticalSide || isCustomShape
? '100%'
: `calc(100% - ${computedStrokeWidth / 2}px)`,
transform: `${rotation}${transform ?? ''}`,
...restStyle,
}}
>
{computedStrokeWidth > 0 && (
<path
clipPath={`url(#${clipPathId})`}
fill="none"
stroke={stroke}
// Account for the stroke on the fill path rendered below.
strokeWidth={computedStrokeWidth + (d ? 0 : 1)}
d={dValue}
/>
)}
{/* In Firefox, for left/right placements there's a ~0.5px gap where the
border can show through. Adding a stroke on the fill removes it. */}
<path
stroke={computedStrokeWidth && !d ? rest.fill : 'none'}
d={dValue}
/>
{/* Assumes the border-width of the floating element matches the
stroke. */}
<clipPath id={clipPathId}>
<rect
x={-halfStrokeWidth}
y={halfStrokeWidth * (isCustomShape ? -1 : 1)}
width={width + computedStrokeWidth}
height={width}
/>
</clipPath>
</svg>
);
});
``` | /content/code_sandbox/packages/react/src/components/FloatingArrow.tsx | xml | 2016-03-29T17:00:47 | 2024-08-16T16:29:40 | floating-ui | floating-ui/floating-ui | 29,450 | 1,315 |
```xml
import Icon from '@proton/components/components/icon/Icon';
import useFolderColor from '@proton/components/hooks/useFolderColor';
import type { Folder } from '@proton/shared/lib/interfaces/Folder';
import type { FolderInfo } from '../../helpers/labels';
interface Props {
folderInfo: FolderInfo;
}
const ItemIcon = ({ folderInfo }: Props) => {
const folder = { Name: folderInfo.name, Color: folderInfo.color, ParentID: folderInfo.parentID } as Folder;
const color = useFolderColor(folder);
if (folderInfo.icon !== 'folder') {
return <Icon name={folderInfo.icon} alt={folderInfo.name} />;
}
return <Icon name={color ? 'folder-filled' : 'folder'} color={color} alt={folderInfo.name} />;
};
export default ItemIcon;
``` | /content/code_sandbox/applications/mail/src/app/components/list/ItemIcon.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 177 |
```xml
import React, {useEffect, useRef, DependencyList} from 'react';
/**
* This hook avoid calling useEffect on the initial value of his dependency array
*/
export const useDidUpdate = (callback: () => void, dep: DependencyList) => {
const isMounted = useRef<boolean>(false);
useEffect(() => {
if (isMounted.current) {
callback();
} else {
isMounted.current = true;
}
}, dep);
};
export const useCombinedRefs = (...refs: React.Ref<any>[]) => {
const targetRef = React.useRef();
React.useEffect(() => {
refs.forEach(ref => {
if (!ref) {
return;
}
if (typeof ref === 'function') {
ref(targetRef.current);
} else {
// @ts-expect-error
ref.current = targetRef.current;
}
});
}, [refs]);
return targetRef;
};
``` | /content/code_sandbox/src/hooks.ts | xml | 2016-11-11T12:17:27 | 2024-08-16T16:43:58 | react-native-calendars | wix/react-native-calendars | 9,403 | 198 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="path_to_url" tools:ignore="MissingTranslation">
<!-- common strings without special context -->
<string name="app_name">Delta Chat</string>
<string name="ok">OK</string>
<string name="cancel">Annuler</string>
<string name="clear_search">Effacer la recherche</string>
<string name="yes">Oui</string>
<string name="no">Non</string>
<string name="select">Slectionner</string>
<string name="on">Activ</string>
<string name="off">Dsactiv</string>
<string name="def">Par dfaut</string>
<string name="default_value">Par dfaut (%1$s)</string>
<string name="default_value_as_above">Par dfaut (comme ci-dessus)</string>
<string name="custom">Personalis</string>
<string name="none">Aucun</string>
<string name="automatic">Automatique</string>
<string name="strict">Stricte</string>
<string name="open">Ouvert</string>
<string name="download">Tlcharger</string>
<string name="downloading">Tlchargement en cours...</string>
<string name="open_attachment">Ouvrir la pice jointe</string>
<string name="join">Rejoindre</string>
<string name="rejoin">Rintgrer</string>
<string name="delete">Supprimer</string>
<string name="info">Info</string>
<string name="update">Mise jour</string>
<string name="emoji">moji</string>
<string name="attachment">Pice jointe</string>
<string name="back">Retour</string>
<string name="close">Fermer</string>
<string name="close_window">Fermer la fentre</string>
<string name="forward">Faire suivre</string>
<string name="create">Crer</string>
<string name="later">Plus tard</string>
<!-- "Resend" means "Sending the selected message(s) again to the same chat". The string is used in a menu and should be as short as possible. Resending may be needed after failures or to repost old messages to new members. -->
<string name="resend">Renvoyer</string>
<!-- Verb "to archive", as in "put a chat in the archive", not a noun "The Archive". -->
<string name="archive">Archiver</string>
<!-- Verb "to unarchive", as in "remove a chat from the archive", opposite of the previous string -->
<string name="unarchive">Dsarchiver</string>
<string name="mute">Sourdine</string>
<string name="ephemeral_messages">Messages phmres</string>
<string name="ephemeral_messages_hint">Ces paramtres s\'appliquent tous les participants utilisant Delta Chat; ils peuvent copier, enregistrer et faire suivre des messages ou utiliser un autre client de e-mail.</string>
<string name="save">Sauvegarder</string>
<string name="chat">Discussion</string>
<string name="media">Mdia</string>
<string name="profile">Profil</string>
<string name="main_menu">Menu principal</string>
<string name="start_chat">Commencer la discussion</string>
<string name="show_full_message">Montrer le message complet...</string>
<!-- Stay short here, say ~16 characters. The source string could also be "All Read", maybe that hint can make translations easier :) -->
<string name="mark_all_as_read">Marquer tout comme lu</string>
<!-- Shortest text for "Mark as being read". In english, this could be "Read" (past tense of "to read"), in german, this could be "Gelesen". -->
<string name="mark_as_read_short">Lu</string>
<!-- Placeholder text when something is loading -->
<string name="loading">Chargement...</string>
<string name="hide">Cacher</string>
<string name="activate">Activer</string>
<string name="load_remote_content">Charger les images distantes</string>
<!-- Possible answers to the question are: Never, Always, Once -->
<string name="load_remote_content_ask">Les images distantes peuvent tre utilises pour vous pister. Ce paramtre autorise galement le chargement de police d\'criture ou d\'autres contenus. S\'il est dsactiv, vous pouvez tout de mme voir les images ancres ou en cache. Souhaitez-vous charger les images distantes ?</string>
<string name="always">Toujours</string>
<string name="always_load_remote_images">Toujours charger les images distantes</string>
<string name="once">Une fois</string>
<string name="show_warning">Montrer l\'avertissement</string>
<string name="show_password">Afficher le mot de passe</string>
<string name="hide_password">Masquer le mot de passe</string>
<string name="not_now">Pas maintenant</string>
<string name="never">Jamais</string>
<string name="one_moment">Un instant </string>
<string name="done">Fait</string>
<string name="undo">Annuler</string>
<string name="offline">Hors ligne</string>
<!-- For the next view or as "continue". Should be as short as possible. -->
<string name="next">Suivant</string>
<string name="error">Erreur</string>
<string name="error_x">Erreur : %1$s</string>
<string name="no_app_to_handle_data">Aucune application trouve pour traiter ce type de donnes.</string>
<string name="no_browser_installed">Aucun navigateur install.</string>
<string name="file_not_found">Impossible de trouver %1$s.</string>
<string name="copied_to_clipboard">Copi dans le presse-papier.</string>
<string name="contacts_headline">Contacts</string>
<string name="email_address">Adresse de courriel</string>
<string name="bad_email_address">Adresse de courriel incorrecte</string>
<string name="password">Mot de passe</string>
<string name="existing_password">Mot de passe existant</string>
<string name="now">Maintenant</string>
<!-- Headline for destructive actions with no undo. Could also be "Caution" or "Warning". -->
<string name="danger">Attention</string>
<string name="today">Aujourd\'hui</string>
<string name="yesterday">Hier</string>
<string name="this_week">Cette semaine</string>
<string name="this_month">Ce mois-ci</string>
<string name="last_week">La semaine dernire</string>
<string name="last_month">Le mois dernier</string>
<!-- Refers to the time a contact was last seen. Shown below contact name in the profile. The placeholder will be replaced by date or time, resulting in "Last seen at 12:13 AM" or "Last seen Nov 12" -->
<string name="last_seen_at">Vue pour la dernire fois %1$s</string>
<!-- Refers to the time a contact was last seen. Shown below contact name in the profile. The placeholder will be replaced by a relative point in time as "3 minutes ago" (see path_to_url for more examples and languages)-->
<string name="last_seen_relative">Dernire activit %1$s</string>
<string name="last_seen_unknown">Vue pour la dernire fois: inconnu</string>
<!-- Shown beside messages that are "N minutes old". Prefer short strings, or well-known abbreviations. -->
<plurals name="n_minutes">
<item quantity="one">%d min</item>
<item quantity="many">%d mins</item>
<item quantity="other">%d mins</item>
</plurals>
<!-- Shown beside messages that are "N hours old". Prefer short strings, or well-known abbreviations. -->
<plurals name="n_hours">
<item quantity="one">%d heure</item>
<item quantity="many">%d heures</item>
<item quantity="other">%d heures</item>
</plurals>
<plurals name="n_chats">
<item quantity="one">%d discussion</item>
<item quantity="many">%d discussions</item>
<item quantity="other">%d discussions</item>
</plurals>
<plurals name="n_contacts">
<item quantity="one">%d contact</item>
<item quantity="many">%d contacts</item>
<item quantity="other">%d contacts</item>
</plurals>
<plurals name="n_messages">
<item quantity="one">%d message</item>
<item quantity="many">%d messages</item>
<item quantity="other">%d messages</item>
</plurals>
<plurals name="n_members">
<item quantity="one">%d membre</item>
<item quantity="many">%d membres</item>
<item quantity="other">%d membres</item>
</plurals>
<plurals name="n_recipients">
<item quantity="one">%d destinataire</item>
<item quantity="many">%d destinataires</item>
<item quantity="other">%d destinataires</item>
</plurals>
<!-- Short form for "N Items Selected" -->
<plurals name="n_selected">
<item quantity="one">%d Slectionn</item>
<item quantity="many">%d Slectionns</item>
<item quantity="other">%d Slectionns</item>
</plurals>
<string name="self">Moi</string>
<string name="draft">Brouillon</string>
<string name="image">Image</string>
<!-- Used in summaries as "Draft: Reply", similar as "Draft: Image". Use a noun here, not a verb (not: "to reply") -->
<string name="reply_noun">Rponse</string>
<string name="gif">Gif</string>
<!-- "Stickers" as known from other messengers; in some languages, the English "Sticker" is fine. -->
<string name="sticker">Vignette</string>
<string name="add_to_sticker_collection">Ajouter la collection de vignettes</string>
<string name="add_stickers_instructions">Pour ajouter des vignettes, appuyez sur \"Ouvrir le dossier Vignettes\", crez un sous-dossier pour votre paquet de vignettes et faites-y glisser vos fichiers image ou vignette </string>
<string name="open_sticker_folder">Ouvrir le dossier Vignettes</string>
<string name="images">Images</string>
<string name="audio">Son</string>
<string name="voice_message">Message vocal</string>
<string name="forwarded">Transfr</string>
<string name="forwarded_message">Message transfr</string>
<!-- %1$s will be replaced by the name or the e-mail address of the person who forwards the message -->
<string name="forwarded_by">Transfr par %1$s</string>
<string name="video">Vido</string>
<string name="documents">Documents</string>
<string name="contact">Contact</string>
<string name="camera">Camra</string>
<!-- As in "start a video recording" or "take a photo"; eg. the description of the "shutter button" in cameras -->
<string name="capture">Enregistrer</string>
<string name="switch_camera">Changer de camra</string>
<string name="toggle_fullscreen">Activer le plein cran</string>
<string name="location">Position</string>
<string name="locations">Positions</string>
<string name="gallery">Galerie</string>
<string name="images_and_videos">Images et vidos</string>
<string name="file">Fichier</string>
<string name="files">Fichiers</string>
<!-- "App" is used to present "Webxdc App" (path_to_url in a user friendly way. Please stay close to the original term and keep it short (it is used in menus with few screen space). -->
<string name="webxdc_app">Appli</string>
<!-- plural of "App"; used to present "Webxdc App" (path_to_url in a user friendly way. Please stay close to the original term and keep it short (it is used in menus with few screen space). -->
<string name="webxdc_apps">Applis</string>
<string name="unknown">Inconnu</string>
<string name="green">Vert</string>
<string name="red">Rouge</string>
<string name="blue">Bleu</string>
<string name="orange">Orange</string>
<string name="cyan">Cyan</string>
<string name="purple">Pourpre</string>
<string name="magenta">Magenta</string>
<string name="white">Blanc</string>
<string name="zoom">Zoom</string>
<string name="extra_small">Trs petit</string>
<string name="small">Petit</string>
<string name="normal">Normal</string>
<string name="large">Grand</string>
<string name="extra_large">Trs grand</string>
<string name="fast">Rapide</string>
<string name="slow">Lent</string>
<!-- menu labels (or icon, buttons...) -->
<string name="menu_new_contact">Nouveau contact</string>
<string name="menu_new_chat">Nouvelle discussion</string>
<string name="menu_new_group">Nouveau groupe</string>
<string name="clone_chat">Cloner la discussion</string>
<!-- consider keeping the term "broadcast" as in WhatsApp or Telegram -->
<string name="broadcast_list">Liste de diffusion</string>
<string name="broadcast_lists">Listes de diffusion</string>
<string name="new_broadcast_list">Nouvelle liste de diffusion</string>
<string name="add_recipients">Ajouter des destinataires</string>
<string name="edit_broadcast_list">Modifier la liste de diffusion</string>
<string name="broadcast_list_name">Nom de la liste de diffusion</string>
<string name="please_enter_broadcast_list_name">Entrez un nom pour la liste de diffusion.</string>
<string name="menu_send">Envoyer</string>
<string name="menu_toggle_keyboard">Basculer le clavier emoji</string>
<string name="menu_edit_group">Modifier le groupe</string>
<string name="menu_group_name_and_image">Nom du groupe et photo</string>
<string name="menu_show_global_map">Toutes les positions</string>
<string name="menu_archive_chat">Archiver la discussion</string>
<string name="menu_unarchive_chat">Dsarchiver la discussion</string>
<string name="menu_add_attachment">Ajouter une pice jointe</string>
<string name="menu_leave_group">Quitter le groupe</string>
<string name="menu_delete_chat">Supprimer la discussion</string>
<!-- Command to delete all messages in a chat. The chat itself will not be deleted but will be empty afterwards, so make sure to be different from "Delete Chat" here. "Clear" is a verb here, "Empty Chat" would also be fine (eg. in German "Chat leeren") -->
<string name="clear_chat">Vider la discussion</string>
<string name="menu_delete_messages">Supprimer les messages</string>
<string name="delete_contact">Supprimer le contact</string>
<string name="menu_delete_location">Supprimer cette position ?</string>
<string name="menu_message_details">Dtails du message</string>
<string name="menu_copy_to_clipboard">Copier vers presse-papiers</string>
<string name="menu_copy_selection_to_clipboard">Copier la slection</string>
<string name="menu_copy_link_to_clipboard">Copier le lien</string>
<string name="menu_copy_text_to_clipboard">Copier le texte</string>
<string name="menu_copy_image_to_clipboard">Copier l\'image</string>
<string name="menu_copy_email_to_clipboard">Copier l\'adresse de courriel</string>
<string name="paste_from_clipboard">Coller depuis le presse-papiers</string>
<string name="ask_copy_unopenable_link_to_clipboard">Le lien \"%1$d\" ne peut pas tre ouvert dans le navigateur, souhaitez-vous le copier dans le presse-papier la place ?</string>
<string name="menu_forward">Faire suivre le message</string>
<string name="menu_reply">Rpondre au message</string>
<string name="menu_mute">Dsactiver les notifications</string>
<string name="menu_unmute">Ractiver</string>
<string name="menu_export_attachment">Exporter le fichier joint</string>
<string name="menu_export_attachments">Exporter les pices-jointes</string>
<string name="menu_all_media">Tous les mdias</string>
<!-- Command to jump to the original message corresponding to a gallery image or document -->
<string name="show_in_chat">Montrer dans la discussion</string>
<string name="show_app_in_chat">Montrer l\'appli dans la discussion</string>
<string name="menu_share">Partager</string>
<!-- Verb "to block sth." usually a mailing list or a contact, not a noun -->
<string name="block">Bloquer</string>
<string name="menu_block_contact">Bloquer ce contact</string>
<string name="menu_unblock_contact">Dbloquer ce contact</string>
<string name="accept">Accepter</string>
<string name="menu_play">Jouer</string>
<string name="menu_pause">Pause</string>
<string name="menu_scroll_to_bottom">Faire dfiler jusqu\'en bas</string>
<string name="menu_scroll_to_top">Faire dfiler jusqu\'en haut</string>
<string name="menu_help">Aide</string>
<string name="what_is_webxdc">Qu\'est-ce qu\'une appli Webxdc ?</string>
<string name="privacy_policy">Politique de confidentialit</string>
<string name="menu_select_all">Tout slectionner</string>
<string name="select_chat">Slectionnez une discussion</string>
<string name="select_more">Slectionner plus</string>
<string name="menu_edit_name">Modifier le nom</string>
<string name="menu_settings">Paramtres</string>
<string name="menu_advanced">Avanc</string>
<string name="menu_view_profile">Voir le profil</string>
<string name="menu_zoom_in">Zoom avant</string>
<string name="menu_zoom_out">Zoom arrire</string>
<string name="menu_save_log">Sauvegarder le journal</string>
<string name="menu_more_options">Plus d\'options</string>
<string name="menu_learn_spelling">Ajouter au dictionnaire</string>
<string name="menu_chat_audit_log">Journal d\'audit de la discussion</string>
<string name="jump_to_message">Aller au message</string>
<string name="copy_json">Copier le JSON</string>
<string name="replace_draft">Remplacer le brouillon</string>
<string name="title_share_location">Partager la position avec tous les membres du groupe</string>
<string name="device_talk">Messages de l\'appareil</string>
<string name="device_talk_subtitle">Messages gnrs localement</string>
<string name="device_talk_explain">Les messages dans cette discussion sont gnrs localement par votre application Delta Chat. Cela vous permet de recevoir des informations concernant les mises jour et problmes rencontrs l\'utilisation.</string>
<string name="edit_contact">Mettre jour le contact</string>
<!-- Verb "to pin", making something sticky, not a noun or abbreviation for "pin number". -->
<string name="pin_chat">pingler la discussion</string>
<!-- Opposite of "Pin chat", removing the sticky-state from a chat. -->
<string name="unpin_chat">Dspingler la discussion</string>
<!-- Verb "to pin", making something sticky, not a noun or abbreviation for "pin number". -->
<string name="pin">pingler</string>
<!-- Opposite of "Pin chat", removing the sticky-state from a chat. -->
<string name="unpin">Dspingler</string>
<string name="ConversationFragment_quoted_message_not_found">Le message original n\'a pas t trouv</string>
<string name="reply_privately">Rpondre en priv</string>
<string name="source_code">Code source</string>
<!-- Menu item beside an app/chat that adds an icon to the system's home screen. If the user taps that icon, the app/chat is opened directly. -->
<string name="add_to_home_screen">Ajouter l\'cran d\'accueil</string>
<string name="donate">Faire un don</string>
<string name="mute_for_one_hour">Dsactiver pour 1 heure</string>
<string name="mute_for_two_hours">Dsactiver pour 2 heures</string>
<string name="mute_for_one_day">Dsactiver pour 1 jour</string>
<string name="mute_for_seven_days">Dsactiver pour 7 jours</string>
<string name="mute_forever">Dsactiver pour toujours</string>
<string name="share_location_for_5_minutes">pour 5 minutes</string>
<string name="share_location_for_30_minutes">pour 30 minutes</string>
<string name="share_location_for_one_hour">pour 1 heure</string>
<string name="share_location_for_two_hours">pour 2 heures</string>
<string name="share_location_for_six_hours">pour 6 heures</string>
<plurals name="ask_send_following_n_files_to">
<item quantity="one">Envoyer le fichier suivant %s?</item>
<item quantity="many">Envoyer les %d fichiers suivants %s?</item>
<item quantity="other">Envoyer les %d fichiers suivants %s?</item>
</plurals>
<string name="file_saved_to">Fichier enregistr dans \"%1$s\".</string>
<string name="videochat">Discussion vido</string>
<string name="videochat_invite_user_to_videochat">Inviter %1$s une discussion vido?</string>
<string name="videochat_invite_user_hint">Cela requiert une application compatible ou un navigateur compatible des deux cts.</string>
<string name="videochat_contact_invited_hint">%1$s est invit une discussion vido.</string>
<string name="videochat_you_invited_hint">Vous avez envoy une invitation pour une discussion vido.</string>
<string name="videochat_tap_to_join">Appuyer pour rejoindre</string>
<string name="videochat_tap_to_open">Appuyer pour ouvrir</string>
<string name="videochat_instance">Instance de discussion vido</string>
<string name="videochat_instance_placeholder">Votre instance de discussion vido</string>
<string name="videochat_instance_example">Par exemple : path_to_url
<string name="videochat_instance_explain_2">Si vous avez activ les discussions vido, vous pouvez dmarrer une conversation vido dans chacune de vos discussions. Il faut que chaque participant-e ait une application ou un navigateur compatibles pour pouvoir utiliser cette option.</string>
<string name="videochat_instance_from_qr">Utiliser %1$s pour inviter d\'autres personnes des discussions vido?\n\nUne fois configur, vous pouvez discuter en vido dans chaque discussion prive. Remplace vos prfrences de configurations prcdentes pour les discussions vidos.</string>
<string name="videochat_invitation">Invitation une discussion vido</string>
<string name="videochat_invitation_body">Vous tes invit une discussion vido, cliquez sur %1$s pour la rejoindre.</string>
<!-- get confirmations -->
<string name="ask_leave_group">Voulez-vous vraiment quitter ce groupe ?</string>
<plurals name="ask_delete_chat">
<item quantity="one">Supprimer %d discussion ? Elle n\'apparatra plus dans la liste des discussions, mais les messages changs resteront sur le serveur.</item>
<item quantity="many">Supprimer %d discussions ? Elles n\'apparatront plus dans la liste des discussions, mais les messages qu\'elles contiennent resteront sur le serveur.</item>
<item quantity="other">Supprimer %d discussions ? Elles n\'apparatront plus dans la liste des discussions, mais les messages qu\'elles contiennent resteront sur le serveur.</item>
</plurals>
<string name="ask_delete_named_chat">Voulez-vous vraiment supprimer %1$s?</string>
<string name="ask_delete_message">Voulez-vous vraiment supprimer ce message ?</string>
<plurals name="ask_delete_messages">
<item quantity="one">Supprimer %d message ici et sur le serveur ?</item>
<item quantity="many">Supprimer %dmessages ici et sur le serveur ?</item>
<item quantity="other">Supprimer %dmessages ici et sur le serveur ?</item>
</plurals>
<plurals name="ask_delete_messages_simple">
<item quantity="one">Supprimer %d message ?</item>
<item quantity="many">Supprimer %d messages ?</item>
<item quantity="other">Supprimer %d messages ?</item>
</plurals>
<string name="ask_forward">Faire suivre les messages %1$s ?</string>
<string name="ask_forward_multiple">Faire suivre les messages %1$d discussions?</string>
<string name="ask_export_attachment">Exporter une pice jointe ? L\'exportation des pices jointes permettra toute autre application sur votre appareil d\'y accder. Continuer ?</string>
<string name="ask_block_contact">Bloquer ce contact ? Vous ne recevrez plus ses messages.</string>
<string name="ask_unblock_contact">Dbloquer ce contact ? Vous recevrez nouveau ses messages.</string>
<string name="ask_delete_contacts">Supprimer les contacts ?\n\nLes contacts avec qui vous avez des discussions en cours et ceux issus du carnet d\'adresses du systme ne peuvent pas tre supprims dfinitivement.</string>
<string name="ask_delete_contact">Supprimer le contact %1$s ?\n\nLes contacts avec qui vous avez des discussions en cours et ceux issus du carnet d\'adresses du systme ne peuvent pas tre supprims dfinitivement.</string>
<string name="cannot_delete_contacts_in_use">Impossible de supprimer les contacts avec qui vous avez une discussion en cours.</string>
<string name="ask_start_chat_with">Discuter avec %1$s ?</string>
<string name="ask_delete_value">Supprimer %s?</string>
<!-- %1$s is replaced by a comma-separated list of names -->
<string name="ask_remove_members">Retirer %1$s du groupe ?</string>
<!-- %1$s is replaced by a comma-separated list of names -->
<string name="ask_remove_from_broadcast">Retirer %1$s de la liste de diffusion ?</string>
<string name="open_url_confirmation">Voulez-vous ouvrir ce lien?</string>
<!-- contact list -->
<string name="contacts_title">Contacts</string>
<string name="contacts_enter_name_or_email">Entrer le nom ou l\'adresse de courriel</string>
<string name="contacts_type_email_above">Saisir l\'adresse de courriel au-dessus</string>
<string name="contacts_empty_hint">Aucun contact.</string>
<!-- chatlist and chat view -->
<plurals name="chat_archived">
<item quantity="one"> %d discussion archive</item>
<item quantity="many">%d discussions archives</item>
<item quantity="other">%d discussions archives</item>
</plurals>
<plurals name="chat_unarchived">
<item quantity="one">%d discussion dsarchive</item>
<item quantity="many">%d discussions dsarchives</item>
<item quantity="other">%d discussions dsarchives</item>
</plurals>
<string name="chat_archived_chats_title">Discussions archives</string>
<string name="chat_please_enter_message">Veuillez saisir un message.</string>
<string name="chat_camera_unavailable">Camra indisponible.</string>
<string name="chat_unable_to_record_audio">Impossible d\'enregistrer le son.</string>
<plurals name="chat_n_new_messages">
<item quantity="one">%dnouveaux messages</item>
<item quantity="many">%d nouveaux messages</item>
<item quantity="other">%d nouveaux messages</item>
</plurals>
<!-- The placeholder will be replaced by the name of the recipient in a one-to-one chat. -->
<string name="chat_new_one_to_one_hint">Envoyez un message. Il n\'y a pas de problme si %1$s n\'utilise pas Delta Chat.</string>
<string name="chat_new_broadcast_hint">Dans une liste de diffusion, les destinataires reoivent les messages dans une discussion avec vous en lecture seule.</string>
<string name="chat_new_group_hint">Les autres participants ne verront ce groupe qu\'aprs que vous avez envoy un premier message.</string>
<string name="chat_record_slide_to_cancel">Glisser pour annuler</string>
<string name="chat_record_explain">Appuyer et maintenir pour enregistrer un message vocal, relcher pour lenvoyer</string>
<string name="chat_no_chats_yet_title">Bote de rception vide. Appuyer sur \"+\" pour commencer une nouvelle discussion.</string>
<string name="chat_all_archived">Toutes les discussions sont archives.\nAppuyer sur \"+\" pour commencer une nouvelle discussion.</string>
<string name="chat_share_with_title">Partager avec</string>
<string name="chat_input_placeholder">Message</string>
<string name="chat_archived_label">Archiv</string>
<string name="chat_request_label">Invitation</string>
<string name="chat_no_messages">Aucun message.</string>
<string name="chat_self_talk_subtitle">Messages envoys moi-mme</string>
<string name="archive_empty_hint">Les discussions archives apparatront ici.</string>
<string name="saved_messages">Messages sauvegards</string>
<string name="saved_messages_explain"> Transfrez les messages ici pour un accs facile\n\n Prenez des notes, des mmos vocaux\n\n Joignez des fichiers pour les sauvegarder</string>
<!-- Should match "Saved" from "Saved messages" -->
<string name="saved">Sauvegards</string>
<string name="save_as">Sauvegarder</string>
<string name="retry_send">Ressayer d\'envoyer le message</string>
<!-- reasons for a disabled message composer -->
<string name="messaging_disabled_not_in_group">Vous ne pouvez pas crire car vous ne faites pas partie de ce groupe. Pour le rejoindre, demandez un membre.</string>
<string name="messaging_disabled_mailing_list">Envoyer des messages dans des listes de diffusion n\'est pas encore possible</string>
<string name="cannot_display_unsuported_file_type">Impossible d\'afficher ce type de fichier: %s</string>
<string name="attachment_failed_to_load">chec du chargement de la pice jointe</string>
<!-- For recording Voice messages: Description for the "Lock" button allowing to lift the thumb from the record button while recording continues -->
<string name="lock_recording">Maintenir l\'enregistrement</string>
<!-- mailing lists -->
<string name="mailing_list">Liste de diffusion</string>
<string name="mailing_list_profile_info">Les changements du nom et de l\'avatar de la liste de diffusion s\'appliquent uniquement sur cet appareil.</string>
<!-- webxdc -->
<!-- "Start..." button for an app -->
<string name="start_app">Dmarrer...</string>
<!-- this is a warning that is shown when one tries to send something to a chat that is not yet accepted. -->
<string name="accept_request_first">Veuillez d\'abord accepter l\'invitation.</string>
<!-- title shown above a list of chats where one should be selected (eg. when sharing files from a webxdc). the placeholder will be replaced by a file name -->
<string name="send_file_to">Envoyer \"%1$s\" </string>
<!-- title shown above a list contacts where one should be selected (eg. when a webxdc attempts to send a message to a chat) -->
<string name="send_message_to">Envoyer un message </string>
<!-- map -->
<string name="filter_map_on_time">Afficher les positions pour une priode</string>
<string name="show_location_traces">Afficher les traces</string>
<string name="add_poi">Afficher les points d\'intrt</string>
<!-- chat audit log -->
<string name="chat_audit_log_empty_message">Les messages systmes de cette discussion apparaissent ici</string>
<string name="chat_audit_log_title">Journal d\'audit de la discussion pour %1$s</string>
<string name="chat_audit_log_description">Cette vue montre seulement les messages systme et d\'information. Utile pour trouver les dernires actions dans la discussion sans dfiler travers beaucoup de messages normaux.</string>
<!-- punycode warning / labeled links -->
<!-- placeholder is domain/hostname that should be trusted -->
<string name="open_external_url_trust_domain">Ne pas demander nouveau pour %1$s</string>
<string name="puny_code_warning_header">Lien suspect dtect</string>
<!-- placeholder contains the hostname converted to ascii -->
<string name="puny_code_warning_question">Voulez-vous vraiment visiter %1$s ?</string>
<!-- this message is shown whenever a link with non-latin characters is clicked. first placeholder is original hostname with special chars, second placeholder is hostname encoded in ascii -->
<string name="puny_code_warning_description">Ce lien pourait avoir des caractres mal reprsents d l\'utilisation de caractres similaires des alphabets diffrents. Suivre le lien marqu %1$s amnera %2$s qui est normale avec des caractres non-latins. Si vous ne vous attendez pas de tel caractres ce lien est potentiellement dangereux</string>
<!-- search -->
<string name="search">Chercher</string>
<string name="search_in_chat">Chercher dans la discussion</string>
<string name="search_files">Chercher dans les fichiers</string>
<string name="search_explain">Rechercher des discussions, des contacts ou des messages</string>
<string name="search_no_result_for_x">Aucun rsultat trouv pour \"%s\"</string>
<!-- create/edit groups, contact/group profile -->
<string name="group_name">Nom du groupe</string>
<string name="group_avatar">Image du groupe</string>
<string name="remove_group_image">Retirer l\'image du groupe</string>
<string name="change_group_image">Changer l\'image du groupe</string>
<string name="group_create_button">Crer un groupe</string>
<string name="group_please_enter_group_name">Entrez un nom pour le groupe.</string>
<string name="group_add_members">Ajouter des participants</string>
<string name="group_self_not_in_group">Vous devez tre membre du groupe pour effectuer cette action.</string>
<string name="profile_encryption">Chiffrement</string>
<string name="profile_shared_chats">Discussions partages</string>
<string name="related_chats">Discussions connexes</string>
<string name="tab_contact">Contact</string>
<string name="tab_group">Groupe</string>
<string name="tab_gallery">Gallerie</string>
<string name="tab_docs">Documents</string>
<string name="tab_links">Liens</string>
<string name="tab_map">Carte</string>
<string name="tab_gallery_empty_hint">Les images et vidos partages dans cette discussion seront affiches ici.</string>
<string name="tab_docs_empty_hint">Les documents, musiques et autres fichiers partags dans ce chat seront affichs ici.</string>
<string name="tab_image_empty_hint">Les images partages dans cette discussion seront affiches ici.</string>
<string name="tab_video_empty_hint">Les vidos partages dans cette discussion seront affiches ici.</string>
<string name="tab_audio_empty_hint">Les fichiers audio et messages vocaux partags dans cette discussion seront affichs ici.</string>
<string name="tab_webxdc_empty_hint">Les applis partages dans cette discussion seront affiches ici.</string>
<string name="tab_all_media_empty_hint">Les fichiers multimdias partags dans une discussion apparaissent ici.</string>
<string name="media_preview">Prvisualiser le fichier multimdia</string>
<!-- option to show images in the gallery with the correct width/height aspect (instead of square); other gallery apps may be a source of inspiration for translation :) -->
<string name="aspect_ratio_grid">Grille de proportions</string>
<!-- option to show images in the gallery as square (instead of using correct width/height) -->
<string name="square_grid">Grille de photos carres</string>
<string name="send_message">Envoyer message</string>
<!-- Placeholder %1$s will be replaced by the name of the contact changing their address. Placeholders %2$s and %3$s will be replaced by old/new email addresses. -->
<string name="aeap_addr_changed">%1$s a chang son adresse de %2$s %3$s</string>
<!-- the explanation is shown (1) as a modal dialog with the buttons "Cancel" and "Continue" as well as (2) as a device message -->
<string name="aeap_explanation">Vous avez chang votre adresse courriel de %1$s %2$s.\n\nSi vous envoyez maintenant un message un groupe connu, votre ancienne adresse sera automatiquement remplace par la nouvelle chez tous vos contacts dans ce groupe.\n\nIl est fortement conseill de configurer votre ancien fournisseur de courriel de sorte transfrer tous vos courriels votre nouvelle adresse. Sinon, vous risquez de manquer des messages de contacts qui n\'ont pas encore reu votre nouvelle adresse.</string>
<!-- Multi Device -->
<!-- "Second Device" can also be translated as "Another Device", if that is catchier in the destination language. However, make sure to use the term consistently. -->
<string name="multidevice_title">Ajouter un deuxime appareil</string>
<string name="multidevice_same_network_hint">Vrifiez que les deux appareils sont bien connects au mme Wi-Fi ou rseau.</string>
<string name="multidevice_this_creates_a_qr_code">Cre un code QR que vous pouvez scanner avec le deuxime appareil pour copier le compte.</string>
<string name="multidevice_install_dc_on_other_device">Installer Delta Chat sur votre autre appareil (path_to_url
<!-- "I Already Have a Profile / Add as Second Device should be the same text as defined by the keys onboarding_alternative_logins and multidevice_receiver_title -->
<string name="multidevice_tap_scan_on_other_device">Lancez Delta Chat, appuyez sur \"Ajouter comme deuxime appareil\" et scannez le code affich ici.</string>
<!-- Shown inside a "QR code card" with very limited space; please formulate the text as short as possible therefore. The placeholder will be replaced by name and/or address eg. "Scan to set up second device for Alice (alice@example.org)" -->
<string name="multidevice_qr_subtitle">Scanner pour configurer un deuxime appareil pour %1$s</string>
<string name="multidevice_receiver_title">Ajouter comme deuxime appareil</string>
<string name="multidevice_open_settings_on_other_device">Sur le premier appareil, allez dans \"Paramtres / Ajouter un deuxime appareil\" et scannez le code qui s\'affiche</string>
<string name="multidevice_receiver_scanning_ask">Copier le compte de l\'autre appareil sur celui-ci ?</string>
<string name="multidevice_abort">Abandonner la configuration du deuxime appareil ?</string>
<string name="multidevice_abort_will_invalidate_copied_qr">Rvoque le code QR copi dans le presse-papiers.</string>
<string name="multidevice_experimental_hint">(exprimental, version 1.36 requise)</string>
<string name="multidevice_transfer_done_devicemsg"> Compte transfr sur votre deuxime appareil.</string>
<!-- Shown beside progress bar, stay short -->
<string name="preparing_account">Prparation du compte...</string>
<!-- Shown beside progress bar, stay short -->
<string name="waiting_for_receiver">En attente de l\'appareil...</string>
<!-- Shown beside progress bar, stay short -->
<string name="receiver_connected">Appareil connect...</string>
<!-- Shown beside progress bar, stay short -->
<string name="transferring">Transfert...</string>
<string name="troubleshooting">Dpannage</string>
<!-- Connectivity -->
<!-- Headline for the "Inbox" eg. in the "Connectivity" view -->
<string name="incoming_messages">Messages entrants</string>
<!-- Headline for the "Outbox" eg. in the "Connectivity" view -->
<string name="outgoing_messages">Messages sortants</string>
<!-- Headline in the "Connectivity" view. Placeholder will be replaced by the domain of the configured email-address. -->
<string name="storage_on_domain">Espace de stockage sur %1$s</string>
<string name="connectivity">Connectivit</string>
<!-- Shown in the title bar if the app is "Not connected"; prefer short strings. -->
<string name="connectivity_not_connected">Non connect</string>
<!-- Shown in the title bar if the app is "Connecting"; prefer short strings. The ellipsis is a single character (), not three (...) -->
<string name="connectivity_connecting">Connexion...</string>
<!-- Shown in the title bar if the app is "Updating" (eg. getting new/old message, sync things); prefer short strings. The ellipsis is a single character (), not three (...) -->
<string name="connectivity_updating">Mise jour...</string>
<!-- Shown in the setting if the app is "Connected" -->
<string name="connectivity_connected">Connect</string>
<string name="sending">Envoi...</string>
<string name="last_msg_sent_successfully">Dernier message envoy avec succs.</string>
<string name="not_supported_by_provider">Non pris en charge par votre fournisseur de mail.</string>
<!-- Subtitle in quota context of "Connetivity" view. Should be be plural always, no number is prefixed. -->
<string name="messages">Messages</string>
<!-- Used for describing resource usage, resulting string will be eg. "1.2 GiB of 3 GiB used" -->
<string name="part_of_total_used">%1$s sur %2$s utilis</string>
<string name="scan_invitation_code">Scanner le code d\'invitation</string>
<string name="login_title">Connexion</string>
<!-- for classic email, we use the classical term "Account" -->
<string name="login_header">Se connecter au compte courriel</string>
<!-- for classic email, we use the classical term "Account" -->
<string name="login_explain">Se connecter avec un compte de courriel existant.</string>
<string name="login_subheader">Pour les fournisseurs de courriel connus, des paramtres supplmentaires sont automatiquement configurs. Parfois, IMAP doit tre activ dans l\'interface Web. Consultez votre fournisseur de courriel ou vos amis pour obtenir de l\'aide.</string>
<string name="login_no_servers_hint">Il n\'y a pas de serveur Delta Chat, vos donnes restent sur votre appareil !</string>
<string name="login_inbox">Bote de rception</string>
<string name="login_imap_login">Utilisateur IMAP</string>
<string name="login_imap_server">Serveur IMAP</string>
<string name="login_imap_port">Port IMAP</string>
<string name="login_imap_security">Scurit IMAP</string>
<string name="login_outbox">Bote d\'envoi</string>
<string name="login_smtp_login">Utilisateur SMTP</string>
<string name="login_smtp_password">Mot de passe SMTP</string>
<string name="login_smtp_server">Serveur SMTP</string>
<string name="login_smtp_port">Port SMTP</string>
<string name="login_smtp_security">Scurit SMTP</string>
<string name="login_auth_method">Mthode d\'autorisation</string>
<!-- the word "SOCKS5" here and in the following strings should not be translated in most cases -->
<string name="login_socks5">SOCKS5</string>
<string name="login_socks5_use_socks5">Utiliser SOCKS5</string>
<string name="login_socks5_host">Hte SOCKS5</string>
<string name="login_socks5_port">Port SOCKS5</string>
<string name="login_socks5_user">Utilisateur SOCKS5</string>
<string name="login_socks5_password">Mot de passe SOCKS5</string>
<string name="login_info_oauth2_title">Continuer avec une configuration simplifie ?</string>
<string name="login_info_oauth2_text">L\'adresse de courriel saisie prend en charge une configuration simplifie (OAuth2.0). \n\nDans l\'tape suivante, autorisez Delta Chat agir comme votre application de Chat avec courriel . Il n\'y a pas de serveur Delta Chat, vos donnes restent sur votre appareil !</string>
<string name="login_certificate_checks">Vrification du certificat</string>
<string name="login_error_mail">Entrez une adresse email valide</string>
<string name="login_error_server">Entre un serveur / adresse IP valide</string>
<string name="login_error_port">Entrez un port valide (1-65535)</string>
<string name="login_error_required_fields">Entrez une adresse email et un mot de passe valides</string>
<string name="import_backup_title">Rtablir une sauvegarde</string>
<string name="import_backup_ask">Sauvegarde trouve sur \"%1$s\".\n\nVoulez-vous importer et en utiliser toutes les donnes et paramtres ?</string>
<string name="import_backup_no_backup_found">Aucune sauvegarde trouve.\n\nCopiez le fichier de sauvegarde vers \"%1$s\" et essayez nouveau. Ou bien, appuyez sur \"Dmarrage communication\" pour suivre le processus normal de configuration.</string>
<!-- Translators: %1$s will be replaced by the e-mail address -->
<string name="login_error_cannot_login">Connexion en tant que \"%1$s\" choue. Vrifiez que votre adresse courriel et votre mot de passe sont corrects.</string>
<!-- TLS certificate checks -->
<string name="accept_invalid_certificates">Accepter les certificats non valides</string>
<string name="switch_account">Changer de compte</string>
<string name="add_account">Ajouter un compte</string>
<string name="delete_account">Supprimer le compte</string>
<string name="delete_account_ask">Voulez-vous vraiment supprimer les donnes de votre compte ?</string>
<string name="delete_account_explain_with_name">Toutes les donnes de compte de %s sur cet appareil seront effaces, y compris votre configuration de chiffrement de bout en bout, vos contacts, discussions, messages et mdias. Cette action est irrvocable.</string>
<string name="unconfigured_account">Compte non configur</string>
<string name="unconfigured_account_hint">Ouvrir le compte pour le configurer</string>
<string name="try_connect_now">Essayer de se connecter maintenant</string>
<string name="sync_all">Tout synchroniser</string>
<!-- Translations: %1$s will be replaced by a more detailed error message -->
<string name="configuration_failed_with_error">chec de la configuration. Erreur: %1$s</string>
<!-- share and forward messages -->
<!-- Translators: shown above a chat/contact list when selecting recipients to forward messages -->
<string name="forward_to">Transfrer </string>
<string name="share_multiple_attachments">Envoyer %1$d fichiers la discussion slectionne?\n\nLes fichiers sont envoys sans modification, leur taille originale (ie. les images et les vidos ne sont pas rencodes).</string>
<string name="share_multiple_attachments_multiple_chats">Envoyer %1$d fichier(s) %2$d discussions?\n\nLes fichiers sont envoys sans modification, leur taille originale (ie. les images et les vidos ne sont pas rencodes).</string>
<string name="share_text_multiple_chats">Envoyer ce texte %1$d discussions?\n\n%2$s</string>
<string name="share_abort">Partage annul en raison de permissions manquantes.</string>
<!-- preferences -->
<string name="pref_using_custom">Usage de la personnalisation : %s</string>
<string name="pref_using_default">Utilisation par dfaut : %s</string>
<string name="pref_profile_info_headline">Informations de votre profil</string>
<string name="pref_profile_photo">Photo de profil</string>
<string name="pref_blocked_contacts">Contacts bloqus</string>
<string name="blocked_empty_hint">Si vous bloquez des contacts, ils seront affichs ici.</string>
<!-- for classic email, we use the classical term "Account" -->
<string name="pref_password_and_account_settings">Mot de passe et compte</string>
<string name="pref_who_can_see_profile_explain">Votre image de profil, votre nom et votre signature seront envoys avec vos messages lorsque vous communiquerez avec d\'autres utilisateurs.</string>
<string name="pref_your_name">Votre nom</string>
<!-- Translators: Visible only to recipients who DO NOT use Delta Chat, so it's the last line in an E-mail and not a "Status". -->
<string name="pref_default_status_label">Signature</string>
<string name="pref_enter_sends">Entrer les envois de cls</string>
<string name="pref_enter_sends_explain">Appuyez sur la touche Entre pour envoyer des messages texte</string>
<string name="pref_outgoing_media_quality">Qualit du mdia en sortie</string>
<string name="pref_outgoing_balanced">quilibr</string>
<string name="pref_outgoing_worse">Pire qualit, taille rduite</string>
<string name="pref_vibrate">Vibrer</string>
<string name="pref_screen_security">cran de scurit</string>
<!-- Translators: Must indicate that there is no guarantee as the system may not honor our request. -->
<string name="pref_screen_security_explain">Demander de bloquer les captures d\'cran dans la liste des captures rcentes et dans l\'application</string>
<string name="pref_screen_security_please_restart_hint">Pour appliquer les paramtres de scurit de l\'cran, veuillez redmarrer l\'application.</string>
<string name="pref_notifications">Notifications</string>
<string name="pref_notifications_show">Afficher</string>
<string name="pref_notifications_priority">Priorit</string>
<string name="pref_notifications_explain">Activer les notifications systme pour les nouveaux messages</string>
<string name="pref_show_notification_content">Montrer le contenu du message dans la notification</string>
<string name="pref_show_notification_content_explain">Montre l\'expditeur et les premiers mots du message dans les notifications</string>
<string name="pref_led_color">Couleur de LED</string>
<string name="pref_sound">Son</string>
<string name="pref_silent">Silencieux</string>
<string name="pref_privacy">Vie prive</string>
<string name="pref_chats_and_media">Discussions et fichiers multimdia</string>
<string name="pref_system_default">Valeur par dfaut du systme</string>
<!-- Translators: as in "opposite of dark" -->
<string name="pref_light_theme">Clair</string>
<string name="pref_dark_theme">Fonc</string>
<string name="pref_appearance">Apparence</string>
<string name="pref_theme">Thme</string>
<string name="pref_language">Langue</string>
<string name="pref_incognito_keyboard">Clavier anonyme</string>
<!-- Translators: Must indicate that there is no guarantee as the system may not honor our request. -->
<string name="pref_incognito_keyboard_explain">Demander que le clavier dsactive l\'apprentissage personnalis</string>
<string name="pref_read_receipts">Accuss de lecture</string>
<string name="pref_read_receipts_explain">Si les accuss de lecture sont dsactivs, vous ne pourrez pas voir les accuss de lecture des autres.</string>
<string name="pref_manage_keys">Grer les cls</string>
<string name="pref_use_system_emoji">Utiliser les mojis systme</string>
<string name="pref_use_system_emoji_explain">Dsactiver la prise en charge des mojis intgrs de Delta Chat</string>
<string name="pref_use_inapp_camera">Utiliser l\'appareil photo de l\'appli</string>
<string name="pref_use_inapp_camera_explain">L\'appareil photo de l\'appli possde gnralement moins de fonctionnalits que celui du systme</string>
<string name="pref_app_access">Accs l\'application</string>
<string name="pref_chats">Discussions</string>
<string name="pref_in_chat_sounds">Sons de messages entrants</string>
<string name="pref_message_text_size">Taille de police des messages</string>
<string name="pref_view_log">Voir le journal</string>
<string name="pref_saved_log">Journal enregistr dans le dossier \"Tlchargements\"</string>
<string name="pref_save_log_failed">Enregistrement du journal chou</string>
<string name="pref_log_header">Journal</string>
<string name="pref_other">Autre</string>
<string name="pref_backup">Sauvegarde</string>
<string name="pref_backup_explain">Sauvegarder les discussions sur un stockage externe</string>
<string name="pref_backup_export_explain">Une sauvegarde vous aide configurer une nouvelle installation sur cet appareil ou sur un autre.\n\nLa sauvegarde contiendra tous vos messages, tous vos contacts et toutes vos discussions, ainsi que vos paramtres de chiffrement de bout en bout Autocrypt. Conservez le fichier de sauvegarde dans un endroit sr, ou supprimez-le aussitt utilis.</string>
<!-- the placeholder will be replaced by the name of the profile's email address -->
<string name="pref_backup_export_x">Exporter %1$s</string>
<!-- the placeholder will be replaced by the number of profiles to export; the number is always larger than 1 -->
<string name="pref_backup_export_all">Exporter les %1$d comptes</string>
<string name="pref_backup_export_start_button">Dmarrer la sauvegarde</string>
<string name="pref_backup_written_to_x">Sauvegarde effectue avec succs sur %1$s</string>
<string name="pref_managekeys_menu_title">Grer les cls</string>
<string name="pref_managekeys_export_secret_keys">Exporter les cls secrtes</string>
<string name="pref_managekeys_export_explain">Exporter les cls secrtes vers \"%1$s\"?</string>
<string name="pref_managekeys_import_secret_keys">Importer des cls secrtes</string>
<string name="pref_managekeys_import_explain">Importer les cls secrtes depuis \"%1$s\" ?\n\n Les cls secrtes existantes ne seront pas dtruites\n\n La dernire cl importe sera utilise comme nouvelle cl par dfaut moins qu\'il y ait le mot \"legacy\" dans son nom de fichier.</string>
<string name="pref_managekeys_secret_keys_exported_to_x">Les cls secrtes ont t crites avec succs vers \"%1$s\".</string>
<string name="pref_managekeys_secret_keys_imported_from_x">Les cls secrtes ont t importes depuis \"%1$s\".</string>
<!-- No need to translate "Wallpaper" literally. Chose what is common in your language for a "Wallpaper" or a "Background". Avoid adding the term "image" here, as the "Wallpaper" may also be just a single color. -->
<string name="pref_background">Arrire-plan</string>
<string name="pref_background_btn_default">Utilisez l\'image par dfaut</string>
<string name="pref_background_btn_gallery">Slectionner depuis la galerie</string>
<string name="pref_imap_folder_handling">Gestion de dossier IMAP</string>
<string name="pref_imap_folder_warn_disable_defaults">Si vous dsactivez cette option, assurez-vous que votre serveur et vos autres clients sont configurs en consquence.\n\nSinon des choses pourraient ne pas fonctionner du tout.</string>
<string name="pref_watch_sent_folder">Regarder le dossier Messages envoys</string>
<string name="pref_send_copy_to_self">M\'envoyer une copie</string>
<!-- for classic email, we use the classical term "Account" -->
<string name="pref_send_copy_to_self_explain">Obligatoire pour utiliser ce compte sur plusieurs appareils.</string>
<string name="pref_auto_folder_moves">Dplacer automatiquement vers le dossier DeltaChat</string>
<string name="pref_auto_folder_moves_explain">Les discussions sont dplaces pour viter d\'encombrer le dossier Bote de rception</string>
<string name="pref_only_fetch_mvbox_title">Ne consulter que le dossier DeltaChat</string>
<string name="pref_only_fetch_mvbox_explain">Ignorer les autres rpertoires. Cela requiert que votre serveur dplace tous les messages de discussion instantane dans le dossier DeltaChat.</string>
<string name="pref_show_emails">Voir les courriels classiques</string>
<string name="pref_show_emails_no">Non, seulement les discussions</string>
<string name="pref_show_emails_accepted_contacts">Pour les contacts accepts</string>
<string name="pref_show_emails_all">Tout</string>
<string name="pref_experimental_features">Fonctionnalits exprimentales</string>
<string name="pref_on_demand_location_streaming">Envoi de la golocalisation la demande</string>
<string name="pref_developer_mode">Mode dveloppeur</string>
<string name="pref_developer_mode_explain">Active les options de dbogage et peut rendre l\'application moins stable. Seulement pour les dveloppeurs.</string>
<string name="pref_background_default">Image par dfaut</string>
<string name="pref_background_default_color">Couleur par dfaut</string>
<string name="pref_background_custom_image">Image personnalise</string>
<string name="pref_background_custom_color">Couleur personnalise</string>
<string name="export_aborted">Exportation annule.</string>
<string name="auto_download_messages">Tlcharger les messages automatiquement</string>
<!-- %1$s will be replaced by a human-readable number of bytes, eg. 32 KiB, 1 MiB -->
<string name="up_to_x">Jusqu\' %1$s</string>
<string name="up_to_x_most_worse_quality_images">Jusqu\' %1$s, plus mauvaise qualit d\'image</string>
<string name="up_to_x_most_balanced_quality_images">Jusqu\' %1$s, qualit d\'image raisonnable </string>
<string name="download_failed">chec du tlchargement</string>
<!-- %1$s will be replaced by a human-readable number of bytes, eg. 32 KiB, 1 MiB. Resulting string eg. "1 MiB message" -->
<string name="n_bytes_message">%1$s message</string>
<!-- %1$s will be replaced by human-readable date and time -->
<string name="download_max_available_until">Tlcharger le plus possible jusqu\' %1$s</string>
<string name="profile_image_select">Slectionnez l\'image de profil</string>
<string name="select_your_new_profile_image">Slectionnez votre nouvelle image de profil</string>
<string name="profile_image_delete">Supprimer l\'image de profil</string>
<string name="pref_show_tray_icon">Afficher l\'icne dans la zone de notifications</string>
<string name="pref_edit_profile">dition du profil</string>
<string name="disable_imap_idle">Dsactiver IMAP IDLE</string>
<string name="disable_imap_idle_explain">N\'utilisez pas d\'extension IMAP IDLE, mme si elle est prise en charge par votre serveur, car elle provoque des retards dans la rcupration des messages. Activez cette option uniquement pour effectuer des tests.</string>
<!-- Emoji picker and categories -->
<string name="emoji_search_results">Rsultats de la recherche</string>
<string name="emoji_not_found">Pas d\'emoji trouv</string>
<string name="emoji_recent">Rcemment utiliss</string>
<string name="emoji_people">Personnes & corps</string>
<string name="emoji_nature">Animaux & nature</string>
<string name="emoji_foods">Nourriture & boisson</string>
<string name="emoji_activity">Activits</string>
<string name="emoji_places">Voyage & lieux</string>
<string name="emoji_objects">Objets</string>
<string name="emoji_symbols">Symboles</string>
<string name="emoji_flags">Drapeaux</string>
<!-- Reactions -->
<string name="reactions">Ractions</string>
<!-- automatically delete message -->
<string name="delete_old_messages">Supprimer les anciens messages</string>
<string name="autodel_device_title">Supprimer les messages de l\'appareil</string>
<string name="autodel_server_title">Supprimer les messages du serveur</string>
<!-- %1$d will be replaced by the number of messages, you can assume plural/lots here. %2$s will be replaced by a timespan option. -->
<string name="autodel_device_ask">Voulez-vous supprimer %1$d messages maintenant ainsi que tous les nouveaux futurs messages reus %2$s?\n\n Cela inclut tous les fichiers multimdia\n\n Les messages seront effacs qu\'ils aient t vus ou non\n\n Les Messages sauvegards seront prservs de la suppression locale</string>
<!-- %1$d will be replaced by the number of messages, you can assume plural/lots here. %2$s will be replaced by a timespan option. -->
<string name="autodel_server_ask">Voulez-vous supprimer %1$d messages maintenant ainsi que tous les futurs nouveaux messages reus %2$s?\n\n Cela inclut les courriels, les fichiers multimdia et les Messages sauvegards dans tous les rpertoires du serveur\n\n N\'utilisez pas cette fonction si vous utilisez d\'autres clients de messagerie lectronique en plus de Delta Chat</string>
<!-- shown below enabled autodel_server-option, should be a summary of autodel_server_ask and remind about the impact -->
<string name="autodel_server_enabled_hint">Cela inclus les courriels, mdias et les Messages sauvegards dans tous les rpertoires du serveur. N\'utilisez pas cette fonction si vous voulez garder les donnes sur le serveur ou si vous utilisez d\'autres clients de messagerie lectronique en plus de Delta Chat.</string>
<string name="autodel_confirm">J\'ai compris, supprimer tous ces messages</string>
<!-- "At once" in the meaning of "Immediately", without any intervening time. -->
<string name="autodel_at_once">Immdiatement</string>
<string name="after_30_seconds">Aprs 30 secondes</string>
<string name="after_1_minute">Aprs 1 minute</string>
<string name="after_5_minutes">Aprs 5 minutes</string>
<string name="after_30_minutes">Aprs 30 minutes</string>
<string name="autodel_after_1_hour">Aprs 1 heure</string>
<string name="autodel_after_1_day">Aprs 1 jour</string>
<string name="autodel_after_1_week">Aprs 1 semaine</string>
<string name="after_5_weeks">Aprs 5 semaines</string>
<string name="autodel_after_1_year">Aprs 1 anne</string>
<!-- autocrypt -->
<string name="autocrypt_send_asm_title">Envoyer le message de configuration Autocrypt</string>
<string name="autocrypt_send_asm_explain_before">Un \"Message de configuration d\'Autocrypt\" partages en toute scurit vos paramtres de bout-en-bout avec les autres applications conformes Autocrypt.\n\nLa configuration sera chiffre par un code d\'installation affich ici et doit tre saisi sur l\'autre appareil.</string>
<string name="autocrypt_send_asm_button">Envoyer le message de configuration Autocrypt</string>
<string name="autocrypt_send_asm_explain_after">Votre configuration vous a t envoye. Passez l\'autre appareil et ouvrez le message de configuration. Un code de configuration devrait vous tre demand. Tapez les chiffres suivants :</string>
<string name="autocrypt_prefer_e2ee">Prfrez le chiffrement de bout en bout</string>
<string name="autocrypt_asm_subject">Message de configuration Autocrypt</string>
<string name="autocrypt_asm_general_body">Ceci est le message de configuration Autocrypt utilis pour transfrer votre configuration de bout en bout entre clients. Pour dchiffrer et utiliser votre configuration, ouvrez le message dans un client compatible Autocrypt et entrez le code de configuration prsent sur le priphrique de gnration.</string>
<string name="autocrypt_asm_click_body">Ceci est le message de configuration Autocrypt utilis pour transfrer votre configuration de bout-en-bout entre clients. Pour dchiffrer et utiliser votre configuration, tapez ou cliquez sur ce message.</string>
<string name="autocrypt_continue_transfer_title">Message de configuration Autocrypt</string>
<string name="autocrypt_continue_transfer_please_enter_code">Veuillez entrer le code de configuration affich sur l\'autre appareil.</string>
<string name="autocrypt_continue_transfer_succeeded">Configuration de bout en bout transfre. Cet appareil est maintenant prt utiliser Autocrypt avec la mme configuration que l\'autre appareil.</string>
<string name="autocrypt_continue_transfer_retry">R-essayer</string>
<string name="autocrypt_bad_setup_code">Mauvais code d\'installation. Veuillez ressayer. Si vous ne vous souvenez pas du code d\'installation, envoyez simplement un autre message d\'installation Autocrypt depuis l\'autre appareil.</string>
<!-- system messages -->
<!-- deprecated -->
<string name="systemmsg_read_receipt_subject">Accus de lecture</string>
<!-- deprecated -->
<string name="systemmsg_read_receipt_body">Ceci est un accus de lecture pour le message \"%1$s\".\n\nCela signifie que le message a t affich sur l\'appareil du destinataire, pas forcment que le contenu ait t lu.</string>
<string name="systemmsg_unknown_sender_for_chat">Expditeur inconnu de cette discussion. Voir Info pour plus de dtails.</string>
<string name="systemmsg_subject_for_new_contact">Message de %1$s</string>
<string name="systemmsg_failed_sending_to">chec de l\'envoi du message %1$s.</string>
<!-- %1$s will be replaced by the old group name, %2$s will be replaced by the new group name -->
<string name="group_name_changed_by_you">Nom du groupe modifi de %1$s en %2$s par vous.</string>
<!-- %1$s will be replaced by the old group name, %2$s will be replaced by the new group name, %3$s will be replaced by name and address of the contact who did the action. -->
<string name="group_name_changed_by_other">Nom de groupe modifi de %1$s en %2$s par %3$s.</string>
<string name="group_image_changed_by_you">Image du groupe modifi par vous.</string>
<!-- %1$s will be replaced by name and address of the contact who did the action -->
<string name="group_image_changed_by_other">Image de groupe modifie par %1$s.</string>
<!-- %1$s will be replaced by name and address of the contact added to the group -->
<string name="add_member_by_you">Membre %1$s ajout par vous.</string>
<!-- %1$s will be replaced by name and address of the contact added to the group, %2$s will be replaced by name and address of the contact who did the action -->
<string name="add_member_by_other">Membre %1$s ajout par %2$s.</string>
<!-- %1$s will be replaced by name and address of the contact removed from the group -->
<string name="remove_member_by_you">Membre %1$s retir par vous.</string>
<!-- %1$s will be replaced by name and address of the contact removed from the group, %2$s will be replaced by name and address of the contact who did the action -->
<string name="remove_member_by_other">Membre %1$s retir par %2$s.</string>
<!-- "left" in the meaning of "exited" -->
<string name="group_left_by_you">Vous avez quitt le groupe.</string>
<!-- "left" in the meaning of "exited"; %1$s will be replaced by name and address of the contact leaving the group -->
<string name="group_left_by_other">%1$s a quitt le groupe.</string>
<string name="group_image_deleted_by_you">Vous avez supprim l\'image du groupe.</string>
<!-- %1$s will be replaced by name and address of the contact -->
<string name="group_image_deleted_by_other">Image du groupe supprime par %1$s.</string>
<string name="location_enabled_by_you">Vous avez activ l\'envoi de votre position.</string>
<!-- %1$s will be replaced by name and address of the contact -->
<string name="location_enabled_by_other">%1$sa activ l\'envoi de sa position.</string>
<string name="ephemeral_timer_disabled_by_you">Vous avez dsactiv la minuterie des messages phmres.</string>
<!-- %1$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_disabled_by_other">Minuterie des messages phmres dsactive par %1$s.</string>
<!-- %1$s will be replaced by the number of seconds (always >1) the timer is set to -->
<string name="ephemeral_timer_seconds_by_you">Vous avez rgl le temps d\'affichage des messages phmres %1$s seconde(s).</string>
<!-- %1$s will be replaced by the number of seconds (always >1) the timer is set to, %2$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_seconds_by_other">Minuterie des messages phmres rgle %1$s secondes par %2$s.</string>
<string name="ephemeral_timer_1_minute_by_you">Vous avez rgl le temps d\'affichage des messages phmres 1 minute.</string>
<!-- %1$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_1_minute_by_other">Minuterie des messages phmres rgle 1 minute par %1$s.</string>
<string name="ephemeral_timer_1_hour_by_you">Vous avez rgl le temps d\'affichage des messages phmres 1 heure.</string>
<!-- %1$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_1_hour_by_other">Minuterie des messages phmres rgle 1 heure par %1$s.</string>
<string name="ephemeral_timer_1_day_by_you">Vous avez rgl le temps d\'affichage des messages phmres 1 jour.</string>
<!-- %1$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_1_day_by_other">Minuterie des messages phmres rgle 1 jour par %1$s.</string>
<string name="ephemeral_timer_1_week_by_you">Vous avez rgl le temps d\'affichage des messages phmres 1 semaine.</string>
<!-- %1$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_1_week_by_other">Minuterie des messages phmres rgle 1 semaine par %1$s.</string>
<!-- %1$s will be replaced by the number of minutes (always >1) the timer is set to -->
<string name="ephemeral_timer_minutes_by_you">Vous avez rgl le temps d\'affichage des messages phmres %1$s minutes.</string>
<!-- %1$s will be replaced by the number of minutes (always >1) the timer is set to, %2$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_minutes_by_other">Minuterie des messages phmres rgle %1$s minutes par %2$s.</string>
<!-- %1$s will be replaced by the number of hours (always >1) the timer is set to -->
<string name="ephemeral_timer_hours_by_you">Vous avez rgl le temps d\'affichage des messages phmres %1$s heures.</string>
<!-- %1$s will be replaced by the number of hours (always >1) the timer is set to, %2$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_hours_by_other">Minuterie des messages phmres rgle %1$s heures par %2$s.</string>
<!-- %1$s will be replaced by the number of days (always >1) the timer is set to -->
<string name="ephemeral_timer_days_by_you">Vous avez rgl le temps d\'affichage des messages phmres %1$s jours.</string>
<!-- %1$s will be replaced by the number of days (always >1) the timer is set to, %2$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_days_by_other">Minuterie des messages phmres rgle %1$s jours par %2$s.</string>
<!-- %1$s will be replaced by the number of weeks (always >1) the timer is set to -->
<string name="ephemeral_timer_weeks_by_you">Vous avez rgl le temps d\'affichage des messages phmres %1$s semaines.</string>
<!-- %1$s will be replaced by the number of weeks (always >1) the timer is set to, %2$s will be replaced by name and address of the contact -->
<string name="ephemeral_timer_weeks_by_other">Minuterie des messages phmres rgle %1$s semaines par %2$s.</string>
<!-- this may be shown instead of the chat's input field, with buttons "More Info" and "OK" -->
<string name="chat_protection_broken">%1$s a envoy un message depuis un nouvel appareil.</string>
<string name="chat_protection_enabled_tap_to_learn_more">Les messages sont dsormais garantis chiffrs de bout en bout. Appuyer pour en savoir plus.</string>
<string name="chat_protection_enabled_explanation">Il n\'est pas garanti que tous les messages de cette discussion sont chiffrs de bout en bout.\n\nLe chiffrement de bout en bout assure la confidentialit des messages changs par les membres d\'une discussion. Mme votre fournisseur de courriel ne peut pas les lire. </string>
<string name="chat_protection_broken_tap_to_learn_more">%1$s a envoy un message depuis un nouvel appareil. Appuyez pour en savoir plus.</string>
<string name="chat_protection_broken_explanation">Le chiffrement de bout en bout ne peut plus tre garanti, probablement parce que %1$s a rinstall Delta Chat ou envoy un message depuis un nouvel appareil.\n\nVous pouvez convenir d\'une rencontre physique afin de scanner nouveau son code QR pour r-instaurer la garantie du chiffrement de bout en bout.</string>
<string name="learn_more">En savoir plus</string>
<string name="devicemsg_self_deleted">Vous avez supprim la discussion \"Messages sauvegards\".\n\n Pour utiliser la fonctionnalit \"Message enregistrs\" nouveau, commencez une nouvelle discussion avec vous-mme.</string>
<!-- %1$s will be replaced by the amount of storage already used, sth. as '500 MB'. If you want to use a percentage sign, type in two of them, eg. %1$s %% -->
<string name="devicemsg_storage_exceeding"> Bientt plus d\'espace de stockage chez votre fournisseur, %1$s%% utiliss.\n\nVous ne serez peut-tre plus en mesure de recevoir des messages quand votre espace de stockage sera plein.\n\n Veuillez vrifier si vous avez d\'anciens lments supprimer directement sur l\'interface web de votre fournisseur et envisagez d\'activer \"Paramtres / Supprimer les anciens messages\". Vous pouvez vrifier tout moment le volume d\'espace de stockage en cours d\'utilisation depuis \"Paramtres / Connectivit\".</string>
<!-- %1%s will be replaced by date and time in some human-readable format -->
<string name="devicemsg_bad_time"> L\'heure ou la date de votre appareil semble errone (%1$s).\n\nRglez votre horloge pour que vos messages soient bien reus.</string>
<string name="devicemsg_update_reminder"> Votre version de Delta Chat semble obsolte.\n\nCela risque de crer des dysfonctionnements parce que vos contacts utilisent des versions plus rcentes - en plus, vous ratez les nouvelles fonctionnalits \n Rendez-vous sur path_to_url ou sur votre magasin d\'applications pour effectuer la mise jour !</string>
<!-- Some options as "Add Second Device" or "Backup" may require the system PIN/Fingerprint/Gesture/Etc. to be entered in a system dialog. This hint is added to the system dialog, below a title as "Add Second Device" or "Backup". -->
<string name="enter_system_secret_to_continue">Dverrouillez votre appareil pour continuer</string>
<!-- qr code stuff -->
<string name="qr_code">Code QR</string>
<string name="load_qr_code_as_image">Charger le code QR comme une image</string>
<string name="qrscan_title">Numriser le QR code</string>
<string name="qrscan_hint">Placez votre camra au dessus du QR code</string>
<string name="qrscan_failed">Le code QR n\'a pas pu tre dcod</string>
<string name="qrscan_ask_join_group">Voulez-vous rejoindre le groupe \"%1$s\" ?</string>
<string name="qrscan_fingerprint_mismatch">L\'empreinte digitale numrise ne correspond pas la dernire empreinte digitale vue depuis %1$s</string>
<string name="qrscan_no_addr_found">Ce QR code contient une empreinte digitale mais pas d\'adresse de courriel.\n\nPour une vrification externe, veuillez d\'abord tablir une connexion crypte avec le destinataire.</string>
<string name="qrscan_contains_text">Texte du QR code numris:\n\n%1$s</string>
<string name="qrscan_contains_url">Url du QR code numris :\n\n%1$s</string>
<string name="qrscan_fingerprint_label">Empreinte digitale</string>
<string name="withdraw_verifycontact_explain">Ce code QR pourrait tre scann par d\'autre personnes pour vous contacter.\n\nVous pouvez dsactiver le QR code ici et le ractiver en le scannant ici de nouveau.</string>
<string name="withdraw_verifygroup_explain">Le code QR peut tre scann par d\'autres personnes pour rejoindre le groupe \"%1$s\".\n\nVous pouvez dsactiver le QR code ici et le ractiver en le scannant ici de nouveau.</string>
<string name="withdraw_qr_code">Dsactiver le QR Code</string>
<!-- "could" in the meaning of "possible at some point in the past, but no longer possible today" -->
<string name="revive_verifycontact_explain">Ce code QR pourrait tre scann par d\'autre personnes pour vous contacter.\n\nCe code QR n\'est pas actif sur cet appareil.</string>
<!-- "could" in the meaning of "possible at some point in the past, but no longer possible today" -->
<string name="revive_verifygroup_explain">Ce code QR pourrait tre scann par d\'autre personnes pour rejoindre le groupe \"%1$s\".\n\nLe code QR n\'est pas actif sur cet appareil.</string>
<string name="revive_qr_code">Activer le QR Code</string>
<string name="qrshow_title">QR Code d\'Invitation</string>
<string name="qrshow_x_joining">%1$s rejoints.</string>
<string name="qrshow_x_verified">%1$s connus.</string>
<string name="qrshow_x_has_joined_group">%1$s a rejoint le groupe.</string>
<string name="qrshow_join_group_title">QR code d\'invitation</string>
<!-- This text is shown inside the "QR code card" with very limited space; please formulate the text as short as possible therefore. The placeholder will be replaced by the group name, eg. "Scan to join group \"Testing group\"" -->
<string name="qrshow_join_group_hint">Scannez ceci pour rejoindre le groupe \"%1$s\".</string>
<string name="qrshow_join_contact_title">QR code d\'invitation</string>
<!-- This text is shown inside the "QR code card" with very limited space; please formulate the text as short as possible therefore. The placeholder will be replaced by name and address eg. "Scan to chat with Alice (alice@example.org)" -->
<string name="qrshow_join_contact_hint">Scanner pour discuter avec %1$s</string>
<string name="qrshow_join_contact_no_connection_toast">Pas de connexion Internet, ne peut pas effectuer la configuration du QR code.</string>
<string name="qraccount_ask_create_and_login">Crer une nouvelle adresse de courriel sur %1$s et se connecter ici?</string>
<string name="qraccount_ask_create_and_login_another">Crer une nouvelle adresse de courriel sur %1$s et s\'y connecter?\n\nVotre compte existant ne sera pas supprim. Utilisez l\'lment de menu Changer de compte pour passer d\'un compte l\'autre.</string>
<string name="qraccount_qr_code_cannot_be_used">Le code QR scann ne peut pas tre utilis pour ouvrir un nouveau compte.</string>
<!-- the placeholder will be replaced by the e-mail address of the profile -->
<string name="qrlogin_ask_login">Se connecter au compte %1$s ?</string>
<!-- the placeholder will be replaced by the e-mail address of the profile -->
<string name="qrlogin_ask_login_another">Se connecter %1$s ?\n\nVotre compte existant ne sera pas supprim. Utiliser l\'lment de menu Changer de compte pour passer d\'un compte l\'autre.</string>
<!-- first placeholder will be replaced by name and address of the inviter, second placeholder will be replaced by the name of the inviter. -->
<string name="secure_join_started">%1$s vous a invit rejoindre ce groupe.\n\nEn attente de la rponse de lappareil de %2$s</string>
<!-- placeholder will be replaced by the name of the inviter. -->
<string name="secure_join_replies">%1$s a rpondu, en attente dtre ajout au groupe</string>
<string name="contact_verified">%1$s connu.</string>
<string name="contact_not_verified">Impossible de garantir le chiffrement de bout en bout avec %1$s.</string>
<!-- Shown in contact profile. The placeholder will be replaced by the name of the contact that introduced the contact. -->
<string name="verified_by">Connu par %1$s</string>
<string name="verified_by_you">Connu par vous</string>
<!-- translators: "setup" is the "encryption setup" here, as in "Autocrypt Setup Message" -->
<string name="contact_setup_changed">Configuration modifie pour %1$s</string>
<string name="verified_contact_required_explain">Pour garantir le chiffrement de bout en bout, vous pouvez ajouter ce groupe uniquement les contacts avec un badge vert.\n\nVous pouvez rencontrer ces contacts en personne pour scanner leur code QR et les ajouter votre liste de contacts connus.</string>
<string name="copy_qr_data_success">L\'URL du code QR a t copi dans le presse-papiers</string>
<string name="mailto_dialog_header_select_chat">Slectionnez une discussion qui envoyer le message</string>
<!-- first placeholder is the name of the chat -->
<string name="confirm_replace_draft">%1$sa dj un message en brouillon, voulez-vous le remplacer?</string>
<string name="mailto_link_could_not_be_decoded">Le lien mailto n\'a pas pu tre dcod: %1$s</string>
<!-- notifications -->
<string name="notify_dismiss">Rejeter</string>
<string name="notify_reply_button">Rpondre</string>
<string name="notify_new_message">Nouveau message</string>
<string name="notify_background_connection_enabled">Connexion en arrire-plan active</string>
<string name="notify_priority_high">Haut</string>
<string name="notify_priority_max">Maximum</string>
<string name="notify_name_and_message">Nom et message</string>
<string name="notify_name_only">Nom seulement</string>
<string name="notify_no_name_or_message">Pas de nom ou de message</string>
<string name="notifications_disabled">Notifications dsactives</string>
<string name="new_messages">Nouveaux messages</string>
<string name="n_messages_in_m_chats">%1$d messages dans %2$d discussions</string>
<!-- permissions -->
<string name="perm_required_title">Autorisation requise</string>
<string name="perm_continue">Continuez</string>
<string name="perm_explain_access_to_camera_denied">Pour prendre des photos ou filmer des vidos, aller au menu Paramtres de l\'application, slectionnez \"Autorisations\" et autorisez \"Appareil photo\".</string>
<string name="perm_explain_access_to_mic_denied">Pour envoyer des messages audio, aller dans les paramtres de l\'application, slectionner \"Autorisations\" et autoriser \"Microphone\".</string>
<string name="perm_explain_access_to_storage_denied">Pour recevoir ou envoyer des fichiers, aller dans les Paramtres de l\'application, slectionner \"Autorisations\" et autoriser \"Stockage\".</string>
<string name="perm_explain_access_to_location_denied">Pour joindre une position, aller au menu paramtres de l\'application, slectionnez \"Autorisations\" et activez \"Position\".</string>
<string name="perm_explain_access_to_notifications_denied">Pour recevoir les notifications, accdez \"Paramtres systme / Applications / Delta Chat\" et activez les \"Notifications\".</string>
<!-- ImageEditorHud -->
<string name="ImageEditorHud_draw_anywhere_to_blur">Dessinez n\'importe o pour flouter</string>
<string name="ImageEditorHud_add_text">Ajouter du texte</string>
<string name="ImageEditorHud_blur">Flouter</string>
<string name="ImageEditorHud_brush_marker">Marqueur</string>
<string name="ImageEditorHud_brush_highlight">Surbrillance</string>
<string name="ImageEditorHud_crop">Rogner</string>
<string name="ImageEditorHud_flip">Tourner</string>
<string name="ImageEditorHud_rotate">Pivoter</string>
<!-- dc_str_* resources -->
<string name="encrypted_message">Message chiffr</string>
<!-- strings introduced on desktop. we want to share strings between the os, in general, please do not add generic strings here -->
<string name="about_offical_app_desktop">Ceci est l\'application de bureau Delta Chat officielle.</string>
<string name="about_licensed_under_desktop">Ce logiciel est sous licence GNU GPL version 3 et le code source est disponible sur GitHub.</string>
<string name="welcome_desktop">Bienvenue sur Delta Chat</string>
<string name="global_menu_preferences_language_desktop">Choisissez la langue...</string>
<string name="global_menu_file_desktop">Fichier</string>
<string name="global_menu_file_quit_desktop">Quitter</string>
<string name="global_menu_edit_desktop">Modifier</string>
<string name="global_menu_edit_undo_desktop">Annuler</string>
<string name="global_menu_edit_redo_desktop">Refaire</string>
<string name="global_menu_edit_cut_desktop">Couper</string>
<string name="global_menu_edit_copy_desktop">Copier</string>
<string name="global_menu_edit_paste_desktop">Coller</string>
<string name="global_menu_view_desktop">Voir</string>
<string name="global_menu_view_floatontop_desktop">Flotter au dessus</string>
<string name="global_menu_view_developer_desktop">Dveloppeur</string>
<string name="global_menu_view_developer_tools_desktop">Outils de dveloppement</string>
<string name="global_menu_help_desktop">Aide</string>
<string name="global_menu_help_learn_desktop">En savoir plus sur Delta Chat</string>
<string name="global_menu_help_contribute_desktop">Contribuer sur Github</string>
<string name="global_menu_help_report_desktop">Signaler un problme</string>
<string name="global_menu_help_about_desktop"> propos de Delta Chat</string>
<string name="global_menu_file_open_desktop">Ouvrir Delta Chat</string>
<string name="global_menu_minimize_to_tray">Minimiser</string>
<string name="no_chat_selected_suggestion_desktop">Slectionner une discussion ou en crer une nouvelle</string>
<string name="write_message_desktop">crire un message</string>
<string name="encryption_info_title_desktop">Information de chiffrement</string>
<string name="delete_message_desktop">Supprimer le message</string>
<string name="more_info_desktop">En savoir plus</string>
<string name="timestamp_format_m_desktop">MMM D</string>
<string name="remove_desktop">Retirer</string>
<string name="save_desktop">Sauvegardez</string>
<string name="name_desktop">Nom</string>
<string name="select_group_image_desktop">Choisir l\'image de groupe</string>
<string name="export_backup_desktop">Exporter la sauvegarde</string>
<string name="autocrypt_correct_desktop">Configuration Autocrypt transfre.</string>
<string name="forget_login_confirmation_desktop">Supprimer cette connexion ? Tout sera effac, y compris vos paramtres de chiffrement de bout en bout, vos contacts, discussions, messages et fichiers multimdia. Cette action est irrvocable.</string>
<string name="message_detail_sent_desktop">envoy</string>
<string name="message_detail_received_desktop">reu</string>
<string name="menu.view.developer.open.log.folder">Ouvrir le dossier Journal</string>
<string name="menu.view.developer.open.current.log.file">Ouvrir le fichier Journal courant</string>
<string name="explain_desktop_minimized_disabled_tray_pref" tools:ignore="TypographyDashes">L\'icne systme ne peut pas tre enlev car Delta Chat a t dmarr avec l\'option --minimized.</string>
<string name="no_spellcheck_suggestions_found">Aucune propositions de correction trouves.</string>
<string name="show_window">Afficher la fentre</string>
<string name="login_socks5_experimental_warning">Le support de SOCK5 est actuellement exprimental. Utilisez le vos risques et prils. Si vous saisissez une adresse de courriel, une requte DNS sera effectue sans passer par SOCK5.</string>
<!-- title of the "keybindings" dialog (for the keybindings names as such, where possible the normal command strings are used) -->
<string name="keybindings">Raccourcis clavier</string>
<string name="switch_between_chats">Naviguer entre les discussions</string>
<string name="scroll_messages">Faire dfiler les messages</string>
<!-- command to put the cursor to the search input field -->
<string name="focus_search_input">Focaliser la recherche</string>
<!-- command to put the cursor to the message input field -->
<string name="focus_message_input">Focaliser la saisie de message</string>
<string name="force_refresh_network">Forcer la recharge du rseau</string>
<string name="insert_newline">Insrer nouvelle ligne</string>
<!-- accessibility, the general idea is to use the normal strings for accessibility hints wherever possible -->
<string name="a11y_delivery_status_error">tat de la livraison : Erreur</string>
<string name="a11y_encryption_padlock">Cadenas de chiffrement</string>
<string name="a11y_delivery_status_sending">tat de la livraison : envoi en cours</string>
<string name="a11y_delivery_status_draft">tat de la livraison : Brouillon</string>
<string name="a11y_delivery_status_delivered">tat de la livraison : Livr</string>
<string name="a11y_delivery_status_read">tat de la livraison : Lu</string>
<string name="a11y_delivery_status_invalid">Statut de livraison non valide</string>
<string name="a11y_message_context_menu_btn_label">Actions sur le message</string>
<string name="a11y_background_preview_label">Aperu de l\'arrire-plan</string>
<string name="a11y_disappearing_messages_activated">Messages phmres activs</string>
<!-- iOS specific strings, developers: please take care to remove strings that are no longer used! -->
<string name="stop_sharing_location">Arrter de partager la position</string>
<string name="a11y_voice_message_hint_ios">Aprs l\'enregistrement, poussez deux fois pour envoyer. Pour le supprimer, balayez l\'cran avec deux doigts.</string>
<string name="a11y_connectivity_hint">Double-cliquez pour afficher les dtails de la connectivit.</string>
<string name="login_error_no_internet_connection">Pas de connexion Internet, connexion choue.</string>
<string name="share_account_not_configured">Le compte n\'est pas configur.</string>
<string name="cannot_play_audio_file">Le fichier audio ne peut pas tre jou.</string>
<!-- iOS camera permission alert -->
<string name="perm_ios_explain_access_to_camera_denied">Pour prendre des photos, des vidos ou utiliser le scanneur de QR-Code, ouvrez les paramtres du systme et activez \"Appareil photo\".</string>
<string name="open_settings">Ouvrir les paramtres</string>
<!-- iOS device contact alert -->
<string name="import_device_contacts">Importer les contacts de l\'appareil</string>
<string name="import_device_contacts_hint">Pour discuter avec des contacts de votre appareils, ouvrez les paramtre et activez \"Contacts\".</string>
<!-- iOS notification settings -->
<string name="disabled_in_dc">Dsactiv dans Delta Chat</string>
<string name="disabled_in_system_settings">Dsactiv dans les paramtres systme</string>
<string name="bg_app_refresh_disabled">Le \"rafrachissement des applications en arrire-plan\" est dsactiv dans les paramtres du systme.</string>
<!-- iOS connectivity view, Adjective, used eg. as "Notifications: Delayed" -->
<string name="delayed">Retard</string>
<string name="notifications_avg_minutes">Toutes les %1$d minutes en moyenne</string>
<string name="notifications_avg_hours">Toutes les %1$d heures en moyenne</string>
<string name="last_check_at">Dernirement vu %1$s</string>
<!-- iOS webxdc selector -->
<string name="webxdc_selector_empty_hint">Les applications envoyes ou reues dans une discussion apparaissent ici. Fichiers affiche les applis que vous venez de tlcharger.</string>
<!-- iOS webxdc shortcut page -->
<string name="shortcut_step1_tap_share_btn">Cliquer sur le bouton Partager .</string>
<string name="shortcut_step2_tap_add_to_home_screen">Slectionner Ajouter l\'cran d\'accueil pour ajouter l\'appli votre cran d\'accueil.</string>
<!-- iOS permissions, copy from "deltachat-ios/Info.plist", which is used on missing translations in "deltachat-ios/LANG.lproj/InfoPlist.strings" -->
<string name="InfoPlist_NSCameraUsageDescription">Delta Chat utilise votre appareil photo pour prendre des photos et des vidos et les envoyer, ainsi que pour scanner des QR codes.</string>
<string name="InfoPlist_NSContactsUsageDescription">Delta Chat utilise vos contacts pour montrer une liste d\'adresses de courriel auxquels vous pouvez crire. Delta Chat n\'a pas de serveur, vos contacts ne sont envoys nulle part.</string>
<string name="InfoPlist_NSLocationAlwaysAndWhenInUseUsageDescription">Delta Chat a besoin de votre autorisation pour partager votre position pour la dure d\'activation du partage de position.</string>
<string name="InfoPlist_NSLocationWhenInUseUsageDescription">Delta Chat a besoin de votre autorisation pour partager votre position pour la dure d\'activation du partage de position.</string>
<string name="InfoPlist_NSMicrophoneUsageDescription">Delta Chat utilise votre micro pour enregistrer et envoyer des messages vocaux et des vidos avec bande son.</string>
<string name="InfoPlist_NSPhotoLibraryUsageDescription">Delta Chat vous laisse choisir quelles photos envoyer de votre photothque. </string>
<string name="InfoPlist_NSPhotoLibraryAddUsageDescription">Delta Chat veut enregistrer les images dans votre bibliothque photo.</string>
<string name="pref_background_notifications_rationale">Pour maintenir une connexion votre serveur de courriel et recevoir les messages en arrire-plan, ignorez l\'optimisation de la batterie l\'tape suivante.\n\nDelta Chat utilise peu de ressources et prend garde ne pas vider votre batterie.</string>
<!-- disabling "Reliable service" will hide a the maybe annoying permanent-notification with the drawback that new-message-notifications get potentially unreliable -->
<string name="perm_enable_bg_reminder_title">Touchez ici pour recevoir des messages pendant que DeltaChat est en arrire-plan.</string>
<string name="perm_enable_bg_already_done">Vous avez dj autoris Delta Chat recevoir des messages en arrire plan.\n\nSi vous ne les recevez toujours pas en arrire plan, vrifiez les paramtres de votre systme.</string>
</resources>
``` | /content/code_sandbox/src/main/res/values-fr/strings.xml | xml | 2016-07-03T07:32:36 | 2024-08-16T16:51:15 | deltachat-android | deltachat/deltachat-android | 1,082 | 23,302 |
```xml
import type { SupportedPlatform } from '../types';
/**
* Options for 'react-native-config' command.
*/
export interface RNConfigCommandOptions {
platform: SupportedPlatform;
projectRoot: string;
searchPaths: string[];
}
/**
* Dependency configuration for Android platform.
*/
export interface RNConfigDependencyAndroid {
sourceDir: string;
packageImportPath: string;
packageInstance: string;
dependencyConfiguration?: string;
buildTypes: string[];
libraryName?: string | null;
componentDescriptors?: string[] | null;
cmakeListsPath?: string | null;
cxxModuleCMakeListsModuleName?: string | null;
cxxModuleCMakeListsPath?: string | null;
cxxModuleHeaderName?: string | null;
}
/**
* Dependency configuration for iOS platform.
*/
export interface RNConfigDependencyIos {
podspecPath: string;
version: string;
configurations: string[];
scriptPhases: any[];
}
/**
* Dependency configuration.
*/
export interface RNConfigDependency {
root: string;
name: string;
platforms: {
android?: RNConfigDependencyAndroid;
ios?: RNConfigDependencyIos;
};
}
/**
* Result of 'react-native-config' command.
*/
export interface RNConfigResult {
root: string;
reactNativePath: string;
dependencies: Record<string, RNConfigDependency>;
project: {
ios?: {
sourceDir: string;
};
};
}
export type RNConfigReactNativePlatformsConfigAndroid = any;
export type RNConfigReactNativePlatformsConfigIos = any;
interface RNConfigReactNativePlatformsConfig {
platforms?: {
android?: RNConfigReactNativePlatformsConfigAndroid;
ios?: RNConfigReactNativePlatformsConfigIos;
};
}
/**
* The `react-native.config.js` config from projectRoot.
*/
export interface RNConfigReactNativeProjectConfig {
dependencies: Record<string, RNConfigReactNativePlatformsConfig>;
}
/**
* The `react-native.config.js` config from library packageRoot.
*/
export interface RNConfigReactNativeLibraryConfig {
dependency?: RNConfigReactNativePlatformsConfig;
platforms?: any;
}
export type RNConfigReactNativeConfig = RNConfigReactNativeProjectConfig | RNConfigReactNativeLibraryConfig;
/**
* The `project` config represents the app project configuration.
*/
export interface RNConfigReactNativeAppProjectConfig {
android?: {
sourceDir: string;
packageName: string;
};
ios?: {
sourceDir: string;
};
}
export {};
``` | /content/code_sandbox/packages/expo-modules-autolinking/build/reactNativeConfig/reactNativeConfig.types.d.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 527 |
```xml
<vector xmlns:android="path_to_url"
android:width="240dp"
android:height="160dp"
android:viewportWidth="3"
android:viewportHeight="2">
<path
android:pathData="M0,0h1v2h-1z"
android:fillColor="#002B7F"/>
<path
android:pathData="M1,0h1v2h-1z"
android:fillColor="#FCD116"/>
<path
android:pathData="M2,0h1v2h-1z"
android:fillColor="#CE1126"/>
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable/ic_flag_ro.xml | xml | 2016-07-02T10:44:04 | 2024-08-16T18:55:54 | StreetComplete | streetcomplete/StreetComplete | 3,781 | 142 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name"> </string>
<string name="app_launcher_name"> </string>
<string name="playlist_empty"> </string>
<string name="rename_song"> </string>
<string name="rename_song_error"> </string>
<string name="rename_song_empty">, </string>
<string name="repeat_off"> </string>
<string name="repeat_song"> </string>
<string name="repeat_playlist"> </string>
<string name="stop_playback_after_current_song"> </string>
<string name="enable_shuffle"> </string>
<string name="disable_shuffle"> </string>
<string name="shuffle_enabled"> </string>
<string name="shuffle_disabled"> </string>
<string name="volume"> </string>
<string name="playback_speed"> </string>
<string name="loading_files"> </string>
<!-- Playlists -->
<string name="add_file_to_playlist"> </string>
<string name="add_folder_to_playlist"> </string>
<string name="manage_playlists"> </string>
<string name="playlists"></string>
<string name="create_new_playlist"> </string>
<string name="rename_playlist"> </string>
<string name="playlist_name_exists"> </string>
<string name="remove_playlist"> </string>
<string name="remove_playlist_description"> . .</string>
<string name="remove_playlist_description_placeholder"> \"%s\". .</string>
<string name="remove_from_playlist"> </string>
<string name="remove_from_playlist_description"> %s. .</string>
<string name="delete_the_files_too"> </string>
<string name="open_playlist"> </string>
<string name="all_songs_cannot_be_deleted"> </string>
<string name="empty_playlist"> </string>
<string name="fetching_songs"> </string>
<string name="all_songs"> </string>
<string name="create_playlist_from_folder"> </string>
<string name="folder_contains_no_audio"> </string>
<string name="delete_current_song"> </string>
<string name="delete_song_warning">WARNING: This will delete the selected files themselves from the device, all playlists included.</string>
<string name="remove_current_song"> </string>
<string name="show_filename"> </string>
<string name="title_is_not_available"> </string>
<string name="show_album_cover"> </string>
<string name="all_tracks"> </string>
<string name="add_to_playlist"> </string>
<string name="create_playlist_label"> , , -> .</string>
<string name="export_playlist"> </string>
<string name="import_playlist"> </string>
<string name="filename_without_m3u"> ( .m3u)</string>
<!-- Sorting -->
<string name="track_count"> </string>
<string name="album_count"> </string>
<string name="artist_name"> </string>
<string name="year"></string>
<string name="track_number">Track number</string>
<string name="use_for_this_playlist">Use for this playlist only</string>
<string name="use_for_this_album">Use for this album only</string>
<!-- Artists -->
<string name="artists"></string>
<string name="folders"></string>
<string name="genres">Genres</string>
<string name="albums"></string>
<plurals name="albums_plural">
<item quantity="one">%d </item>
<item quantity="other">%d </item>
</plurals>
<string name="tracks"></string>
<plurals name="tracks_plural">
<item quantity="one">%d </item>
<item quantity="other">%d </item>
</plurals>
<!-- Queue -->
<string name="next_track">:</string>
<string name="track_queue"> </string>
<string name="add_to_queue"> </string>
<string name="play_next">Play next</string>
<string name="remove_from_queue"> </string>
<string name="create_playlist_from_queue"> </string>
<!-- Settings -->
<string name="equalizer"></string>
<string name="swap_prev_next"> / </string>
<string name="exclude_folder_description">Excluding a folder will prevent the displaying of all audio files within. Files manually added to playlists will not be affected.</string>
<string name="gapless_playback">Gapless playback</string>
<string name="rescan_media">Rescan media</string>
<!-- FAQ -->
<string name="faq_1_title"> \?</string>
<string name="faq_1_text"> , .</string>
<!--
Haven't found some strings? There's more at
path_to_url
-->
</resources>
``` | /content/code_sandbox/app/src/main/res/values-bg/strings.xml | xml | 2016-01-10T12:21:23 | 2024-08-16T13:03:46 | Simple-Music-Player | SimpleMobileTools/Simple-Music-Player | 1,277 | 1,155 |
```xml
<resources>
<string name="app_name">Banner kotlin Example</string>
</resources>
``` | /content/code_sandbox/usekotlin/src/main/res/values/strings.xml | xml | 2016-04-22T05:50:25 | 2024-08-15T03:35:23 | banner | youth5201314/banner | 12,833 | 21 |
```xml
import * as React from 'react';
import { useTabList_unstable } from './useTabList';
import { renderTabList_unstable } from './renderTabList';
import { useTabListStyles_unstable } from './useTabListStyles.styles';
import type { TabListProps } from './TabList.types';
import type { ForwardRefComponent } from '@fluentui/react-utilities';
import { useTabListContextValues_unstable } from './useTabListContextValues';
import { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';
/**
* A tab list provides single selection from a set of tabs.
*/
export const TabList: ForwardRefComponent<TabListProps> = React.forwardRef((props, ref) => {
const state = useTabList_unstable(props, ref);
const contextValues = useTabListContextValues_unstable(state);
useTabListStyles_unstable(state);
useCustomStyleHook_unstable('useTabListStyles_unstable')(state);
return renderTabList_unstable(state, contextValues);
});
TabList.displayName = 'TabList';
``` | /content/code_sandbox/packages/react-components/react-tabs/library/src/components/TabList/TabList.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 233 |
```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
-->
<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.pulsar</groupId>
<artifactId>pulsar-io</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<artifactId>pulsar-io-cassandra</artifactId>
<name>Pulsar IO :: Cassandra</name>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>pulsar-io-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
<artifactId>cassandra-driver-core</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.nifi</groupId>
<artifactId>nifi-nar-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
``` | /content/code_sandbox/pulsar-io/cassandra/pom.xml | xml | 2016-06-28T07:00:03 | 2024-08-16T17:12:43 | pulsar | apache/pulsar | 14,047 | 393 |
```xml
<?xml version='1.0' encoding='UTF-8'?>
<?xml-stylesheet type="text/xsl" href="manpage.xsl"?>
<refentry xml:id="libmosquitto" xmlns:xlink="path_to_url">
<refmeta>
<refentrytitle>libmosquitto</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo class="source">Mosquitto Project</refmiscinfo>
<refmiscinfo class="manual">Library calls</refmiscinfo>
</refmeta>
<refnamediv>
<refname>libmosquitto</refname>
<refpurpose>MQTT version 5.0/3.1.1 client library</refpurpose>
</refnamediv>
<refsect1>
<title>Documentation</title>
<para>See <ulink url="path_to_url"/></para>
</refsect1>
<refsect1>
<title>Author</title>
<para>Roger Light <email>roger@atchoo.org</email></para>
</refsect1>
</refentry>
``` | /content/code_sandbox/man/libmosquitto.3.xml | xml | 2016-03-10T20:19:09 | 2024-08-16T07:21:58 | mosquitto | eclipse/mosquitto | 8,797 | 261 |
```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>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
<packaging>jar</packaging>
<properties>
<beam.version>@project.version@</beam.version>
<bigquery.version>@bigquery.version@</bigquery.version>
<google-api-client.version>@google-api-client.version@</google-api-client.version>
<guava.version>@guava.version@</guava.version>
<hamcrest.version>@hamcrest.version@</hamcrest.version>
<jackson.version>@jackson.version@</jackson.version>
<joda.version>@joda.version@</joda.version>
<junit.version>@junit.version@</junit.version>
<kafka.version>@kafka.version@</kafka.version>
<libraries-bom.version>@libraries-bom.version@</libraries-bom.version>
<maven-compiler-plugin.version>@maven-compiler-plugin.version@</maven-compiler-plugin.version>
<maven-exec-plugin.version>@maven-exec-plugin.version@</maven-exec-plugin.version>
<maven-jar-plugin.version>@maven-jar-plugin.version@</maven-jar-plugin.version>
<maven-shade-plugin.version>@maven-shade-plugin.version@</maven-shade-plugin.version>
<mockito.version>@mockito.version@</mockito.version>
<pubsub.version>@pubsub.version@</pubsub.version>
<slf4j.version>@slf4j.version@</slf4j.version>
<spark.version>@spark.version@</spark.version>
<hadoop.version>@hadoop.version@</hadoop.version>
<maven-surefire-plugin.version>@maven-surefire-plugin.version@</maven-surefire-plugin.version>
<nemo.version>@nemo.version@</nemo.version>
<flink.artifact.name>@flink.artifact.name@</flink.artifact.name>
</properties>
<repositories>
<repository>
<id>apache.snapshots</id>
<name>Apache Development Snapshot Repository</name>
<url>path_to_url
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${targetPlatform}</source>
<target>${targetPlatform}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<parallel>all</parallel>
<threadCount>4</threadCount>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
</configuration>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>${maven-surefire-plugin.version}</version>
</dependency>
</dependencies>
</plugin>
<!-- Ensure that the Maven jar plugin runs before the Maven
shade plugin by listing the plugin higher within the file. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
</plugin>
<!--
Configures `mvn package` to produce a bundled jar ("fat jar") for runners
that require this for job submission to a cluster.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${project.artifactId}-bundled-${project.version}</finalName>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/LICENSE</exclude>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>reference.conf</resource>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${maven-exec-plugin.version}</version>
<configuration>
<cleanupDaemonThreads>false</cleanupDaemonThreads>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>direct-runner</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!-- Makes the DirectRunner available when running a pipeline. -->
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-direct-java</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>portable-runner</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<!-- Makes the PortableRunner available when running a pipeline. -->
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-portability-java</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>dataflow-runner</id>
<!-- Makes the DataflowRunner available when running a pipeline. -->
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-google-cloud-dataflow-java</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>flink-runner</id>
<!-- Makes the FlinkRunner available when running a pipeline. -->
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<!-- Please see the Flink Runner page for an up-to-date list
of supported Flink versions and their artifact names:
path_to_url -->
<artifactId>${flink.artifact.name}</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>spark-runner</id>
<!-- Makes the SparkRunner available when running a pipeline. -->
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-spark-3</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-hadoop-file-system</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-streaming_2.12</artifactId>
<version>${spark.version}</version>
<scope>runtime</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-scala_2.12</artifactId>
<version>${jackson.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>samza-runner</id>
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-samza</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>twister2-runner</id>
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-twister2</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
<profile>
<id>nemo-runner</id>
<dependencies>
<dependency>
<groupId>org.apache.nemo</groupId>
<artifactId>nemo-compiler-frontend-beam</artifactId>
<version>${nemo.version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-common</artifactId>
<version>${hadoop.version}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</profile>
<profile>
<id>jet-runner</id>
<dependencies>
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-jet</artifactId>
<version>${beam.version}</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
</profiles>
<dependencies>
<!-- Adds a dependency on the Beam SDK. -->
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-core</artifactId>
<version>${beam.version}</version>
</dependency>
<!-- Adds a dependency on the Beam Google Cloud Platform IO module. -->
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-google-cloud-platform</artifactId>
<version>${beam.version}</version>
</dependency>
<!-- Adds a dependency on the Python Multi-language pipelines API module. -->
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-extensions-python</artifactId>
<version>${beam.version}</version>
</dependency>
<!-- Adds a dependency on the Beam Kafka IO module. -->
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-sdks-java-io-kafka</artifactId>
<version>${beam.version}</version>
</dependency>
<!-- Dependencies below this line are specific dependencies needed by the examples code. -->
<dependency>
<groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId>
<version>${google-api-client.version}</version>
<exclusions>
<!-- Exclude an old version of guava that is being pulled
in by a transitive dependency of google-api-client -->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava-jdk5</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-bigquery</artifactId>
<version>${bigquery.version}</version>
<exclusions>
<!-- Exclude an old version of guava that is being pulled
in by a transitive dependency of google-api-client -->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava-jdk5</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client</artifactId>
<exclusions>
<!-- Exclude an old version of guava that is being pulled
in by a transitive dependency of google-api-client -->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava-jdk5</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-pubsub</artifactId>
<version>${pubsub.version}</version>
<exclusions>
<!-- Exclude an old version of guava that is being pulled
in by a transitive dependency of google-api-client -->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava-jdk5</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda.version}</version>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka-clients</artifactId>
<version>${kafka.version}</version>
</dependency>
<!-- Add slf4j API frontend binding with JUL backend -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jdk14</artifactId>
<version>${slf4j.version}</version>
<!-- When loaded at runtime this will wire up slf4j to the JUL backend -->
<scope>runtime</scope>
</dependency>
<!-- Hamcrest and JUnit are required dependencies of PAssert,
which is used in the main code of DebuggingWordCount example. -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>${hamcrest.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<!-- The DirectRunner is needed for unit tests. -->
<dependency>
<groupId>org.apache.beam</groupId>
<artifactId>beam-runners-direct-java</artifactId>
<version>${beam.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${guava.version}</version> <!-- "-jre" for Java 8 or higher -->
</dependency>
<!-- GCP libraries BOM sets the version for google http client -->
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>libraries-bom</artifactId>
<version>${libraries-bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
</project>
``` | /content/code_sandbox/sdks/java/maven-archetypes/examples/src/main/resources/archetype-resources/pom.xml | xml | 2016-02-02T08:00:06 | 2024-08-16T18:58:11 | beam | apache/beam | 7,730 | 3,816 |
```xml
import '../manual-mocks';
jest.unmock('../../src/test-provider/test-provider');
jest.unmock('../../src/test-provider/test-provider-context');
jest.unmock('../../src/JestExt/run-mode');
jest.unmock('./test-helper');
jest.unmock('../../src/appGlobals');
import * as vscode from 'vscode';
import { JestTestProvider } from '../../src/test-provider/test-provider';
import { WorkspaceRoot } from '../../src/test-provider/test-item-data';
import { JestTestProviderContext } from '../../src/test-provider/test-provider-context';
import { extensionId } from '../../src/appGlobals';
import { mockController, mockExtExplorerContext } from './test-helper';
import { tiContextManager } from '../../src/test-provider/test-item-context-manager';
import { ItemCommand } from '../../src/test-provider/types';
import { RunMode } from '../../src/JestExt/run-mode';
import { JestTestRun } from '../../src/test-provider/jest-test-run';
import { JestTestCoverageProvider } from '../../src/test-provider/test-coverage';
const throwError = () => {
throw new Error('debug error');
};
describe('JestTestProvider', () => {
const makeItemData = (debuggable = true) => {
const data: any = {
discoverTest: jest.fn(),
scheduleTest: jest.fn(),
runItemCommand: jest.fn(),
dispose: jest.fn(),
};
if (debuggable) {
data.getDebugInfo = jest.fn();
}
return data;
};
const setupTestItemData = (
id: string,
debuggable = true,
context?: JestTestProviderContext
): any => {
const data = makeItemData(debuggable);
data.item = context?.createTestItem(id, id, {} as any, data) ?? { id };
return data;
};
const setupItemData = (context, items = [1, 2, 3]) => {
const itemDataList = items.map((n) => setupTestItemData(`item-${n}`, true, context));
itemDataList.forEach((d) => {
d.context = { workspace: { name: 'whatever' } };
d.getDebugInfo = jest.fn().mockReturnValueOnce({});
});
return itemDataList;
};
let controllerMock;
let extExplorerContextMock;
let workspaceRootMock;
let mockTestTag;
const mockedJestTestRun = JestTestRun as jest.MockedClass<any>;
let mockCoverageProvider: any;
beforeEach(() => {
jest.clearAllMocks();
extExplorerContextMock = mockExtExplorerContext();
controllerMock = mockController();
(vscode.tests.createTestController as jest.Mocked<any>).mockImplementation((id, label) => {
controllerMock.id = id;
controllerMock.label = label;
return controllerMock;
});
mockTestTag = jest.fn((id) => ({ id }));
(vscode.TestTag as jest.Mocked<any>) = mockTestTag;
(vscode.workspace.getWorkspaceFolder as jest.Mocked<any>).mockImplementation((uri) => ({
name: uri,
}));
(WorkspaceRoot as jest.Mocked<any>).mockImplementation((context) => {
workspaceRootMock = setupTestItemData('workspace-root', false, context);
workspaceRootMock.context = context;
return workspaceRootMock;
});
mockCoverageProvider = { loadDetailedCoverage: jest.fn(), dispose: jest.fn() };
(JestTestCoverageProvider as jest.MockedClass<any>).mockReturnValue(mockCoverageProvider);
});
describe('upon creation', () => {
it('will setup controller and WorkspaceRoot', () => {
new JestTestProvider(extExplorerContextMock);
expect(controllerMock.resolveHandler).not.toBeUndefined();
expect(vscode.tests.createTestController).toHaveBeenCalledWith(
`${extensionId}:TestProvider:ws-1`,
expect.stringContaining('ws-1')
);
expect(controllerMock.createRunProfile).toHaveBeenCalledTimes(3);
expect(WorkspaceRoot).toHaveBeenCalled();
});
describe('profiles', () => {
it('the default run profile', () => {
new JestTestProvider(extExplorerContextMock);
expect(controllerMock.createRunProfile).toHaveBeenCalledWith(
'run tests',
vscode.TestRunProfileKind.Run,
expect.any(Function),
true,
{ id: 'run' }
);
const profile = controllerMock.createRunProfile.mock.results.find(
(r) => r.value.kind === vscode.TestRunProfileKind.Run
)?.value;
expect(profile.configureHandler).toBeDefined();
expect(profile.runHandler).toBeDefined();
profile.configureHandler();
expect(vscode.commands.executeCommand).toHaveBeenCalledWith(
expect.stringContaining(`with-workspace.change-run-mode`),
extExplorerContextMock.workspace
);
expect(profile.loadDetailedCoverage).not.toBeDefined();
});
it('the default debug profile', () => {
new JestTestProvider(extExplorerContextMock);
expect(controllerMock.createRunProfile).toHaveBeenCalledWith(
'debug tests',
vscode.TestRunProfileKind.Debug,
expect.any(Function),
true,
{ id: 'debug' }
);
const profile = controllerMock.createRunProfile.mock.results.find(
(r) => r.value.kind === vscode.TestRunProfileKind.Debug
)?.value;
expect(profile.runHandler).toBeDefined();
expect(profile.configureHandler).not.toBeDefined();
expect(profile.loadDetailedCoverage).not.toBeDefined();
});
it('the coverage profile', () => {
new JestTestProvider(extExplorerContextMock);
expect(controllerMock.createRunProfile).toHaveBeenCalledWith(
'run tests with coverage',
vscode.TestRunProfileKind.Coverage,
expect.any(Function),
false,
{ id: 'run' }
);
const profile = controllerMock.createRunProfile.mock.results.find(
(r) => r.value.kind === vscode.TestRunProfileKind.Coverage
)?.value;
expect(profile.runHandler).toBeDefined();
expect(profile.configureHandler).not.toBeDefined();
expect(profile.loadDetailedCoverage).toBeDefined();
});
});
});
describe('can discover tests', () => {
it('test mockedJestTestRun', () => {
const jestRun = new JestTestRun('jest-run', {} as any, {} as any, (() => {}) as any);
expect(jestRun.name).toBe('jest-run');
});
it('should only discover items with canResolveChildren = true', () => {
new JestTestProvider(extExplorerContextMock);
const data = setupTestItemData('whatever', true, workspaceRootMock.context);
data.item.canResolveChildren = true;
controllerMock.resolveHandler(data.item);
expect(JestTestRun).toHaveBeenCalled();
mockedJestTestRun.mockClear();
data.item.canResolveChildren = false;
controllerMock.resolveHandler(data.item);
expect(mockedJestTestRun).not.toHaveBeenCalled();
});
describe('when no test item is requested', () => {
it('will resolve the whole workspace via workspaceRoot', () => {
new JestTestProvider(extExplorerContextMock);
workspaceRootMock.item.canResolveChildren = true;
controllerMock.resolveHandler();
expect(workspaceRootMock.discoverTest).toHaveBeenCalledTimes(1);
// run will be created with the controller's id
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
expect(jestRun.name).toEqual(expect.stringContaining(controllerMock.id));
// run will be closed
expect(jestRun.end).toHaveBeenCalled();
});
});
describe('when specific item is requested', () => {
it('will forward the request to the item', () => {
new JestTestProvider(extExplorerContextMock);
const data = setupTestItemData('whatever', true, workspaceRootMock.context);
data.item.canResolveChildren = true;
controllerMock.resolveHandler(data.item);
// run will be created with the controller's id
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
expect(jestRun.name).toEqual(expect.stringContaining(controllerMock.id));
// run will be closed
expect(jestRun.end).toHaveBeenCalled();
});
it('should not crash if item not found in the item-data map', () => {
new JestTestProvider(extExplorerContextMock);
const data = makeItemData(true);
controllerMock.resolveHandler({ canResolveChildren: true });
expect(data.discoverTest).not.toHaveBeenCalled();
expect(workspaceRootMock.discoverTest).not.toHaveBeenCalled();
// run will be created with the controller's id
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
expect(jestRun.name).toEqual(expect.stringContaining(controllerMock.id));
// run will be closed
expect(jestRun.end).toHaveBeenCalled();
});
});
describe('if discover failed', () => {
it('error will be reported', () => {
new JestTestProvider(extExplorerContextMock);
workspaceRootMock.discoverTest.mockImplementation(() => {
throw new Error('forced crash');
});
workspaceRootMock.item.canResolveChildren = true;
controllerMock.resolveHandler();
expect(workspaceRootMock.item.error).toEqual(expect.stringContaining('discoverTest error'));
// run will be created with the controller's id
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
expect(jestRun.name).toEqual(expect.stringContaining(controllerMock.id));
// run will be closed
expect(jestRun.end).toHaveBeenCalled();
});
});
});
describe('can provide test coverage', () => {
it('use coverageProvider to manage coverage', () => {
new JestTestProvider(extExplorerContextMock);
expect(JestTestCoverageProvider).toHaveBeenCalledWith(extExplorerContextMock.sessionEvents);
});
it('can load detailed coverage', async () => {
new JestTestProvider(extExplorerContextMock);
const coverageProfile = controllerMock.createRunProfile.mock.results.find(
(r) => r.value.kind === vscode.TestRunProfileKind.Coverage
)?.value;
const fileCoverage = { path: 'file' };
await coverageProfile.loadDetailedCoverage({}, fileCoverage);
expect(mockCoverageProvider.loadDetailedCoverage).toHaveBeenCalledWith(fileCoverage);
});
});
describe('upon dispose', () => {
it('vscode.TestController will be disposed', () => {
const testProvider = new JestTestProvider(extExplorerContextMock);
testProvider.dispose();
expect(controllerMock.dispose).toHaveBeenCalled();
expect(workspaceRootMock.dispose).toHaveBeenCalled();
expect(mockCoverageProvider.dispose).toHaveBeenCalled();
});
});
describe('supports explorer UI run and debug request', () => {
let cancelToken;
beforeEach(() => {
cancelToken = { onCancellationRequested: jest.fn(), isCancellationRequested: false };
});
describe('debug tests', () => {
let debugDone;
const finishDebug = async () => {
debugDone();
// flush system promise job queue
await Promise.resolve();
};
const controlled = () =>
new Promise<void>((resolve) => {
debugDone = () => resolve();
});
it.each`
case | debugInfo | testNamePattern | debugTests | hasError
${1} | ${undefined} | ${undefined} | ${() => Promise.resolve()} | ${true}
${2} | ${{ fileName: 'file' }} | ${'a test'} | ${() => Promise.resolve()} | ${false}
${3} | ${{ fileName: 'file' }} | ${'a test'} | ${() => Promise.reject('error')} | ${true}
${4} | ${{ fileName: 'file' }} | ${'a test'} | ${throwError} | ${true}
${5} | ${{ fileName: 'file' }} | ${undefined} | ${() => Promise.resolve()} | ${false}
`(
'invoke debug test async case $case => error? $hasError',
async ({ debugInfo, testNamePattern, debugTests, hasError }) => {
expect.hasAssertions();
extExplorerContextMock.debugTests = jest.fn().mockImplementation(() => {
if (debugTests) {
return debugTests();
}
});
const testProvider = new JestTestProvider(extExplorerContextMock);
const itemDataList = setupItemData(workspaceRootMock.context, [1]);
itemDataList.forEach((d) => {
if (debugInfo) {
d.getDebugInfo = jest
.fn()
.mockImplementation(() =>
testNamePattern ? { ...debugInfo, testNamePattern } : debugInfo
);
} else {
d.getDebugInfo = undefined;
}
});
const request: any = {
include: itemDataList.map((d) => d.item),
profile: { kind: vscode.TestRunProfileKind.Debug },
};
await expect(testProvider.runTests(request, cancelToken)).resolves.toBe(undefined);
// run will be created
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
if (hasError) {
expect(jestRun.errored).toHaveBeenCalledWith(itemDataList[0].item, expect.anything());
expect(vscode.TestMessage).toHaveBeenCalledTimes(1);
} else {
if (testNamePattern) {
expect(extExplorerContextMock.debugTests).toHaveBeenCalledWith(
'file',
testNamePattern
);
} else {
expect(extExplorerContextMock.debugTests).toHaveBeenCalledWith('file');
}
}
}
);
it('debug tests are done in serial', async () => {
expect.hasAssertions();
extExplorerContextMock.debugTests.mockImplementation(controlled);
const testProvider = new JestTestProvider(extExplorerContextMock);
const itemDataList = setupItemData(workspaceRootMock.context);
const request: any = {
include: itemDataList.map((d) => d.item),
profile: { kind: vscode.TestRunProfileKind.Debug },
};
const p = testProvider.runTests(request, cancelToken);
// a run is created
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
// verify serial execution
expect(extExplorerContextMock.debugTests).toHaveBeenCalledTimes(1);
await finishDebug();
expect(extExplorerContextMock.debugTests).toHaveBeenCalledTimes(2);
await finishDebug();
expect(extExplorerContextMock.debugTests).toHaveBeenCalledTimes(3);
await finishDebug();
await p;
expect(extExplorerContextMock.debugTests).toHaveBeenCalledTimes(3);
// the run will be closed
expect(jestRun.end).toHaveBeenCalled();
});
it('cancellation means stop the run and skip the rest of tests', async () => {
expect.hasAssertions();
extExplorerContextMock.debugTests.mockImplementation(controlled);
const testProvider = new JestTestProvider(extExplorerContextMock);
const itemDataList = setupItemData(workspaceRootMock.context);
const request: any = {
include: itemDataList.map((d) => d.item),
profile: { kind: vscode.TestRunProfileKind.Debug },
};
const p = testProvider.runTests(request, cancelToken);
// a run is created
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
const onCancel = cancelToken.onCancellationRequested.mock.calls[0][0];
expect(extExplorerContextMock.debugTests).toHaveBeenCalledTimes(1);
await finishDebug();
expect(extExplorerContextMock.debugTests).toHaveBeenCalledTimes(2);
// cancel the run during 2nd debug, the 3rd one should be skipped
cancelToken.isCancellationRequested = true;
onCancel();
expect(jestRun.cancel).toHaveBeenCalled();
await finishDebug();
expect(extExplorerContextMock.debugTests).toHaveBeenCalledTimes(2);
await p;
expect(extExplorerContextMock.debugTests).toHaveBeenCalledTimes(2);
expect(jestRun.skipped).toHaveBeenCalledWith(request.include[2]);
// the run will be closed
expect(jestRun.end).toHaveBeenCalledTimes(1);
});
it('can handle exception', async () => {
expect.hasAssertions();
extExplorerContextMock.debugTests
.mockImplementationOnce(() => Promise.resolve())
.mockImplementationOnce(() => Promise.reject())
.mockImplementationOnce(throwError);
const testProvider = new JestTestProvider(extExplorerContextMock);
const itemDataList = setupItemData(workspaceRootMock.context);
const request: any = {
include: itemDataList.map((d) => d.item),
profile: { kind: vscode.TestRunProfileKind.Debug },
};
await testProvider.runTests(request, cancelToken);
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
expect(extExplorerContextMock.debugTests).toHaveBeenCalledTimes(3);
expect(jestRun.errored).toHaveBeenCalledTimes(2);
expect(jestRun.errored).toHaveBeenCalledWith(request.include[1], expect.anything());
expect(jestRun.errored).toHaveBeenCalledWith(request.include[2], expect.anything());
expect(jestRun.end).toHaveBeenCalled();
});
});
describe('run tests', () => {
const resolveSchedule = (_r, resolve) => {
resolve();
};
describe('run test should update test item status', () => {
it.each`
case | scheduleTest | isCancelled | state
${1} | ${resolveSchedule} | ${false} | ${undefined}
${2} | ${resolveSchedule} | ${true} | ${'skipped'}
${3} | ${throwError} | ${false} | ${'errored'}
`('case $case', async ({ scheduleTest, isCancelled, state }) => {
expect.hasAssertions();
const testProvider = new JestTestProvider(extExplorerContextMock);
const itemDataList = setupItemData(workspaceRootMock.context, [1]);
itemDataList.forEach((d) => d.scheduleTest.mockImplementation(scheduleTest));
const tData = itemDataList[0];
const request: any = {
include: itemDataList.map((d) => d.item),
profile: { kind: vscode.TestRunProfileKind.Run },
};
cancelToken.isCancellationRequested = isCancelled;
const p = testProvider.runTests(request, cancelToken);
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
if (isCancelled) {
expect(tData.scheduleTest).not.toHaveBeenCalled();
} else {
expect(tData.scheduleTest).toHaveBeenCalled();
}
await expect(p).resolves.toBe(undefined);
expect(jestRun.end).toHaveBeenCalled();
switch (state) {
case 'errored':
expect(jestRun.errored).toHaveBeenCalledWith(tData.item, expect.anything());
expect(vscode.TestMessage).toHaveBeenCalledTimes(1);
break;
case 'skipped':
expect(jestRun.skipped).toHaveBeenCalledWith(tData.item);
expect(vscode.TestMessage).not.toHaveBeenCalled();
break;
case undefined:
break;
default:
expect('unhandled state type').toBeUndefined();
break;
}
});
});
it('running tests in parallel', async () => {
expect.hasAssertions();
const testProvider = new JestTestProvider(extExplorerContextMock);
const itemDataList = setupItemData(workspaceRootMock.context);
const request: any = {
include: itemDataList.map((d) => d.item),
profile: { kind: vscode.TestRunProfileKind.Run },
};
const p = testProvider.runTests(request, cancelToken);
// a run is created
expect(JestTestRun).toHaveBeenCalled();
const jestRun = mockedJestTestRun.mock.results[0].value;
itemDataList.forEach((d) => {
expect(d.scheduleTest).toHaveBeenCalled();
const [run] = d.scheduleTest.mock.calls[0];
expect(run).toEqual(jestRun);
// simulate each item is done the run
run.end();
});
await p;
expect(jestRun.end).toHaveBeenCalledTimes(itemDataList.length + 1);
});
it('cancellation will cancel all testRun and items', async () => {
expect.hasAssertions();
const testProvider = new JestTestProvider(extExplorerContextMock);
const itemDataList = setupItemData(workspaceRootMock.context);
itemDataList.forEach((d, idx) => d.scheduleTest.mockReturnValueOnce(`pid-${idx}`));
const request: any = {
include: itemDataList.map((d) => d.item),
profile: { kind: vscode.TestRunProfileKind.Run },
};
const p = testProvider.runTests(request, cancelToken);
const onCancel = cancelToken.onCancellationRequested.mock.calls[0][0];
// cancel the run
cancelToken.isCancellationRequested = true;
onCancel();
// a run is already created
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
expect(jestRun.cancel).toHaveBeenCalled();
itemDataList.forEach((d) => {
expect(d.scheduleTest).toHaveBeenCalled();
const [run] = d.scheduleTest.mock.calls[0];
expect(run).toBe(jestRun);
// close the schedule
run.end();
});
await p;
expect(jestRun.end).toHaveBeenCalledTimes(itemDataList.length + 1);
});
describe('can handle exception', () => {
it('when schedule test failed', async () => {
expect.hasAssertions();
const testProvider = new JestTestProvider(extExplorerContextMock);
const itemDataList = setupItemData(workspaceRootMock.context);
itemDataList.forEach((d, idx) => {
if (idx === 1) {
d.scheduleTest.mockImplementation(() => {
throw new Error('error scheduling test');
});
} else {
d.scheduleTest.mockReturnValueOnce(`pid-${idx}`);
}
});
const request: any = {
include: itemDataList.map((d) => d.item),
profile: { kind: vscode.TestRunProfileKind.Run },
};
const p = testProvider.runTests(request, cancelToken);
// cancel after run
cancelToken.isCancellationRequested = true;
// a run is already created
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
itemDataList.forEach((d, idx) => {
expect(d.scheduleTest).toHaveBeenCalled();
const [run] = d.scheduleTest.mock.calls[0];
expect(run).toEqual(jestRun);
if (idx === 1) {
expect(run.errored).toHaveBeenCalledWith(d.item, expect.anything());
} else {
expect(run.errored).not.toHaveBeenCalledWith(d.item, expect.anything());
}
// close the schedule
run.end();
});
await p;
expect(jestRun.end).toHaveBeenCalledTimes(itemDataList.length + 1);
});
});
it('if no item in request, will run test for the whole workplace', async () => {
expect.hasAssertions();
const testProvider = new JestTestProvider(extExplorerContextMock);
const request: any = {
profile: { kind: vscode.TestRunProfileKind.Run },
};
const p = testProvider.runTests(request, cancelToken);
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
expect(workspaceRootMock.scheduleTest).toHaveBeenCalledTimes(1);
const [run] = workspaceRootMock.scheduleTest.mock.calls[0];
expect(run).toBe(jestRun);
await p;
expect(jestRun.end).toHaveBeenCalledTimes(1);
});
it('if request has exclude, will run test for the whole workplace except the exclude', async () => {
expect.hasAssertions();
const testProvider = new JestTestProvider(extExplorerContextMock);
const request: any = {
exclude: [workspaceRootMock.item],
profile: { kind: vscode.TestRunProfileKind.Run },
};
const p = testProvider.runTests(request, cancelToken);
expect(JestTestRun).toHaveBeenCalledTimes(1);
const jestRun = mockedJestTestRun.mock.results[0].value;
expect(workspaceRootMock.scheduleTest).not.toHaveBeenCalled();
await p;
expect(jestRun.end).toHaveBeenCalledTimes(1);
});
it('will reject run request without profile', async () => {
expect.hasAssertions();
const testProvider = new JestTestProvider(extExplorerContextMock);
const request: any = {};
await expect(testProvider.runTests(request, cancelToken)).rejects.not.toThrow();
expect(workspaceRootMock.scheduleTest).toHaveBeenCalledTimes(0);
expect(JestTestRun).not.toHaveBeenCalled();
});
});
});
describe('supports test-explorer item-menu', () => {
it('updates item-menu context', () => {
new JestTestProvider(extExplorerContextMock);
expect(tiContextManager.setItemContext).toHaveBeenCalledWith(
expect.objectContaining({
workspace: extExplorerContextMock.workspace,
key: 'jest.runMode',
itemIds: [workspaceRootMock.item.id],
})
);
expect(tiContextManager.setItemContext).toHaveBeenCalledWith(
expect.objectContaining({
workspace: extExplorerContextMock.workspace,
key: 'jest.workspaceRoot',
itemIds: [workspaceRootMock.item.id],
})
);
});
});
describe('support direct invocation of runTests', () => {
it('use runTests after exiting defer mode', async () => {
expect.hasAssertions();
const testProvider = new JestTestProvider(extExplorerContextMock);
const itemDataList = setupItemData(workspaceRootMock.context);
const requestFromSpy = jest.spyOn(workspaceRootMock.context, 'requestFrom');
requestFromSpy.mockImplementation((r) => r);
const createTestRunSpy = jest.spyOn(workspaceRootMock.context, 'createTestRun');
const request: any = {
include: [itemDataList[0].item],
profile: { kind: vscode.TestRunProfileKind.Run },
};
await testProvider.runTests(request, undefined, true);
expect(requestFromSpy).toHaveBeenCalledWith(request);
expect(createTestRunSpy).toHaveBeenCalled();
});
});
describe('runItemCommand', () => {
it('supports runItemCommand', () => {
const provider = new JestTestProvider(extExplorerContextMock);
provider.runItemCommand(workspaceRootMock.item, ItemCommand.updateSnapshot);
expect(workspaceRootMock.runItemCommand).toHaveBeenCalled();
});
it('if no itemData found, will not crash', () => {
const provider = new JestTestProvider(extExplorerContextMock);
provider.runItemCommand({ id: 'not-found' } as any, ItemCommand.updateSnapshot);
expect(workspaceRootMock.runItemCommand).not.toHaveBeenCalled();
});
});
it('will exit defer mode upon any run request', async () => {
expect.hasAssertions();
const runMode = new RunMode({ type: 'on-demand', deferred: true });
extExplorerContextMock.settings.runMode = runMode;
const provider = new JestTestProvider(extExplorerContextMock);
const request: any = {
include: {},
profile: { kind: vscode.TestRunProfileKind.Debug },
};
await provider.runTests(request, {} as any);
expect(vscode.commands.executeCommand).toHaveBeenCalledWith(
expect.stringContaining('with-workspace.exit-defer-mode'),
extExplorerContextMock.workspace,
expect.objectContaining({ request })
);
expect(JestTestRun).not.toHaveBeenCalled();
});
});
``` | /content/code_sandbox/tests/test-provider/test-provider.test.ts | xml | 2016-10-09T13:06:02 | 2024-08-13T18:32:04 | vscode-jest | jest-community/vscode-jest | 2,819 | 5,956 |
```xml
<vector xmlns:android="path_to_url"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96.0"
android:viewportHeight="96.0">
<path
android:pathData="M25.53,90.69C15.8,87.21 8.74,78.56 5.94,66.7 4.67,61.31 4.31,52.42 5.36,52.42c0.35,0 1.28,2.44 2.07,5.42 1.73,6.53 4.69,12.67 7.54,15.67 4.74,4.98 16.48,6.94 23.25,3.87 5.27,-2.39 7.41,-8.08 5.12,-13.61 -1.77,-4.28 -5.79,-5.71 -13.27,-4.72 0,0 -4.59,-4.94 -6.05,-13.7l4.7,0.43c5.66,0.51 9.94,-0.74 12.16,-3.56 2.09,-2.65 2.04,-3.68 -0.28,-6.37 -3.35,-3.89 -9.36,-2.91 -21.53,3.53l-6.14,-10.3 2.57,-1.96c6.45,-4.92 17.66,-7.38 24.03,-5.28 5.81,1.92 10.07,9.52 8.93,15.94 -0.77,4.34 -4.25,10.41 -6.93,12.11l-2.32,1.47 3.2,1.44c5.44,2.45 8.76,0.58 12.72,-7.18 5.49,-10.74 9.05,-13.52 17.33,-13.53 3.85,-0.01 5.23,0.4 8.04,2.37 7.02,4.92 10.84,15.1 10,26.64 -1.06,14.62 -7.99,23.49 -18.34,23.49 -5.68,0 -9.35,-1.99 -12.26,-6.67 -2.56,-4.11 -3.72,-12.25 -2.24,-15.83 0.71,-1.72 0.83,-1.78 0.88,-0.4 0.08,2.53 2.96,6.63 5.6,8 6.47,3.35 15.77,-0.86 19.45,-8.8 2.79,-6.03 1.29,-17.66 -2.54,-19.71 -0.8,-0.43 -2.78,-0.78 -4.4,-0.78 -3.44,0 -6.15,2.48 -9.94,9.1 -1.31,2.29 -3.52,5.25 -4.9,6.57 -2.25,2.15 -3.05,2.41 -7.56,2.41h-5.04l1.63,3.62C53.16,67.24 53.05,75.65 50.58,80.77 48.41,85.29 43.37,89.87 39.34,90.99 35.42,92.08 29.04,91.94 25.53,90.69ZM44.5,20.72C42.27,16.92 40.9,9.82 42.39,9.82c1.75,3.81 5.35,7.2 9.2,9.57 6.92,3.35 13.93,2 21.59,-4.16 1.69,-1.36 3.18,-2.31 3.32,-2.13 1.87,2.9 5.11,5.28 6.18,8.65 0,1.42 -6.13,5.52 -10.96,7.33 -11.99,3.45 -20.14,2.09 -27.22,-8.36zM50.54,11.93 L58.34,3.28 67.02,11.31c-2.97,2.44 -5.11,6.23 -8.5,8.16 -2.68,-1.97 -6.67,-4.3 -7.98,-7.53z"
android:fillColor="#e02"/>
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable/ic_religion_hindu.xml | xml | 2016-07-02T10:44:04 | 2024-08-16T18:55:54 | StreetComplete | streetcomplete/StreetComplete | 3,781 | 1,132 |
```xml
import { Observable } from '../Observable';
import { OperatorFunction } from '../types';
/**
* Branch out the source Observable values as a nested Observable starting from
* an emission from `openings` and ending when the output of `closingSelector`
* emits.
*
* <span class="informal">It's like {@link bufferToggle}, but emits a nested
* Observable instead of an array.</span>
*
* 
*
* Returns an Observable that emits windows of items it collects from the source
* Observable. The output Observable emits windows that contain those items
* emitted by the source Observable between the time when the `openings`
* Observable emits an item and when the Observable returned by
* `closingSelector` emits an item.
*
* ## Example
* Every other second, emit the click events from the next 500ms
* ```javascript
* const clicks = fromEvent(document, 'click');
* const openings = interval(1000);
* const result = clicks.pipe(
* windowToggle(openings, i => i % 2 ? interval(500) : empty()),
* mergeAll(),
* );
* result.subscribe(x => console.log(x));
* ```
*
* @see {@link window}
* @see {@link windowCount}
* @see {@link windowTime}
* @see {@link windowWhen}
* @see {@link bufferToggle}
*
* @param {Observable<O>} openings An observable of notifications to start new
* windows.
* @param {function(value: O): Observable} closingSelector A function that takes
* the value emitted by the `openings` observable and returns an Observable,
* which, when it emits (either `next` or `complete`), signals that the
* associated window should complete.
* @return {Observable<Observable<T>>} An observable of windows, which in turn
* are Observables.
* @method windowToggle
* @owner Observable
*/
export declare function windowToggle<T, O>(openings: Observable<O>, closingSelector: (openValue: O) => Observable<any>): OperatorFunction<T, Observable<T>>;
``` | /content/code_sandbox/deps/node-10.15.3/tools/node_modules/eslint/node_modules/rxjs/internal/operators/windowToggle.d.ts | xml | 2016-09-05T10:18:44 | 2024-08-11T13:21:40 | LiquidCore | LiquidPlayer/LiquidCore | 1,010 | 440 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="path_to_url">
<ItemGroup>
<Filter Include="src">
<UniqueIdentifier>{650cd08c-12e7-4f30-8948-a01d1b1b7c7d}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<Text Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-buffer-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-cache-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-common.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-deprecated.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-face.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-face-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-font.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-font-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-icu.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-mutex-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-object-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-open-file-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-open-type-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-cmap-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-font.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-glyf-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-head-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-hhea-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-hmtx-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-layout.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-layout-common-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-layout-gdef-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-layout-gpos-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-layout-gsubgpos-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-layout-gsub-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-layout-jstf-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-layout-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-map-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-maxp-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-arabic-fallback.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-arabic-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-arabic-table.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-arabic-win1256.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-indic-machine.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-indic-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-myanmar-machine.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-use-machine.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-use-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-fallback-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-normalize-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-ot-tag.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-set.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-set-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-shape.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-shape-plan.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-shape-plan-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-shaper-impl-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-shaper-list.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-shaper-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-unicode.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-unicode-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-utf-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-version.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-atomic-private.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-blob.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-buffer.h">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-buffer-deserialize-json.hh">
<Filter>src</Filter>
</ClInclude>
<ClInclude Include="..\..\third_party\harfbuzz-ng\src\hb-buffer-deserialize-text.hh">
<Filter>src</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-buffer-serialize.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-common.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-face.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-fallback-shape.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-font.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-font.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-layout.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-map.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-arabic.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-default.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-hangul.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-hebrew.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-indic.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-indic-table.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-myanmar.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-thai.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-tibetan.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-use.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-complex-use-table.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-fallback.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-shape-normalize.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-ot-tag.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-set.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-shape.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-shape-plan.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-shaper.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-warning.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-blob.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-buffer.cc">
<Filter>src</Filter>
</ClCompile>
<ClCompile Include="..\..\third_party\harfbuzz-ng\src\hb-unicode.cc">
<Filter>src</Filter>
</ClCompile>
</ItemGroup>
</Project>
``` | /content/code_sandbox/build/harfbuzz/harfbuzz.vcxproj.filters | xml | 2016-09-27T03:41:10 | 2024-08-16T10:42:57 | miniblink49 | weolar/miniblink49 | 7,069 | 3,775 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN"
"path_to_url">
<library name="Array" dirname="array" id="array" last-revision="$Date$">
<libraryinfo>
<author>
<firstname>Nicolai</firstname>
<surname>Josuttis</surname>
</author>
<maintainer>
<firstname>Marshall</firstname>
<surname>Clow</surname>
</maintainer>
<copyright>
<year>2001</year>
<year>2002</year>
<year>2003</year>
<year>2004</year>
<holder>Nicolai M. Josuttis</holder>
</copyright>
<copyright>
<year>2012</year>
<holder>Marshall Clow</holder>
</copyright>
<legalnotice>
(See accompanying file <filename>LICENSE_1_0.txt</filename> or copy at
<ulink
url="path_to_url">path_to_url
</para>
</legalnotice>
<librarypurpose>STL compliant container wrapper for arrays of constant size</librarypurpose>
<librarycategory name="category:containers"/>
</libraryinfo>
<title>Boost.Array</title>
<section id="array.intro">
<title>Introduction</title>
<using-namespace name="boost"/>
<using-class name="array"/>
<para>The C++ Standard Template Library STL as part of the C++
Standard Library provides a framework for processing algorithms on
different kind of containers. However, ordinary arrays don't
provide the interface of STL containers (although, they provide
the iterator interface of STL containers).</para>
<para>As replacement for ordinary arrays, the STL provides class
<code><classname>std::vector</classname></code>. However,
<code><classname>std::vector<></classname></code> provides
the semantics of dynamic arrays. Thus, it manages data to be able
to change the number of elements. This results in some overhead in
case only arrays with static size are needed.</para>
<para>In his book, <emphasis>Generic Programming and the
STL</emphasis>, Matthew H. Austern introduces a useful wrapper
class for ordinary arrays with static size, called
<code>block</code>. It is safer and has no worse performance than
ordinary arrays. In <emphasis>The C++ Programming
Language</emphasis>, 3rd edition, Bjarne Stroustrup introduces a
similar class, called <code>c_array</code>, which I (<ulink
url="path_to_url">Nicolai Josuttis</ulink>) present
slightly modified in my book <emphasis>The C++ Standard Library -
A Tutorial and Reference</emphasis>, called
<code>carray</code>. This is the essence of these approaches
spiced with many feedback from <ulink
url="path_to_url">boost</ulink>.</para>
<para>After considering different names, we decided to name this
class simply <code><classname>array</classname></code>.</para>
<para>Note that this class is suggested to be part of the next
Technical Report, which will extend the C++ Standard (see
<ulink url="path_to_url">path_to_url
<para>Update: <code>std::array</code> is (as of C++11) part of the C++ standard.
The differences between <code>boost::array</code> and <code>std::array</code> are minimal.
If you are using C++11, you should consider using <code>std::array</code> instead of <code>boost::array</code>.
</para>
<para>Class <code><classname>array</classname></code> fulfills most
but not all of the requirements of "reversible containers" (see
Section 23.1, [lib.container.requirements] of the C++
Standard). The reasons array is not an reversible STL container is
because:
<itemizedlist spacing="compact">
<listitem><simpara>No constructors are provided.</simpara></listitem>
<listitem><simpara>Elements may have an undetermined initial value (see <xref linkend="array.rationale"/>).</simpara></listitem>
<listitem><simpara><functionname>swap</functionname>() has no constant complexity.</simpara></listitem>
<listitem><simpara><methodname>size</methodname>() is always constant, based on the second template argument of the type.</simpara></listitem>
<listitem><simpara>The container provides no allocator support.</simpara></listitem>
</itemizedlist>
</para>
<para>It doesn't fulfill the requirements of a "sequence" (see Section 23.1.1, [lib.sequence.reqmts] of the C++ Standard), except that:
<itemizedlist spacing="compact">
<listitem><simpara><methodname>front</methodname>() and <methodname>back</methodname>() are provided.</simpara></listitem>
<listitem><simpara><methodname>operator[]</methodname> and <methodname>at</methodname>() are provided.</simpara></listitem>
</itemizedlist>
</para>
</section>
<library-reference>
<header name="boost/array.hpp">
<namespace name="boost">
<class name="array">
<template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="N">
<type>std::size_t</type>
</template-nontype-parameter>
</template>
<purpose><para>STL compliant container wrapper for arrays of constant size</para></purpose>
<typedef name="value_type">
<type>T</type>
</typedef>
<typedef name="iterator">
<type>T*</type>
</typedef>
<typedef name="const_iterator">
<type>const T*</type>
</typedef>
<typedef name="reverse_iterator">
<type><classname>std::reverse_iterator</classname><iterator></type>
</typedef>
<typedef name="const_reverse_iterator">
<type><classname>std::reverse_iterator</classname><const_iterator></type>
</typedef>
<typedef name="reference">
<type>T&</type>
</typedef>
<typedef name="const_reference">
<type>const T&</type>
</typedef>
<typedef name="size_type">
<type>std::size_t</type>
</typedef>
<typedef name="difference_type">
<type>std::ptrdiff_t</type>
</typedef>
<static-constant name="static_size">
<type>size_type</type>
<default>N</default>
</static-constant>
<copy-assignment>
<template>
<template-type-parameter name="U"/>
</template>
<parameter name="other">
<paramtype>const <classname>array</classname><U, N>&</paramtype>
</parameter>
<effects><simpara><code>std::copy(rhs.<methodname>begin</methodname>(),rhs.<methodname>end</methodname>(), <methodname>begin</methodname>())</code></simpara></effects>
</copy-assignment>
<method-group name="iterator support">
<overloaded-method name="begin">
<signature>
<type>iterator</type>
</signature>
<signature cv="const">
<type>const_iterator</type>
</signature>
<returns><simpara>iterator for the first element</simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</overloaded-method>
<overloaded-method name="end">
<signature>
<type>iterator</type>
</signature>
<signature cv="const">
<type>const_iterator</type>
</signature>
<returns><simpara>iterator for position after the last element</simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</overloaded-method>
<overloaded-method name="cbegin" cv="const">
<signature>
<type>const_iterator</type>
</signature>
<returns><simpara>constant iterator for the first element</simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</overloaded-method>
<overloaded-method name="cend" cv="const">
<signature>
<type>const_iterator</type>
</signature>
<returns><simpara>constant iterator for position after the last element</simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</overloaded-method>
</method-group>
<method-group name="reverse iterator support">
<overloaded-method name="rbegin">
<signature>
<type>reverse_iterator</type>
</signature>
<signature cv="const">
<type>const_reverse_iterator</type>
</signature>
<returns><simpara>reverse iterator for the first element of reverse iteration</simpara></returns>
</overloaded-method>
<overloaded-method name="rend">
<signature>
<type>reverse_iterator</type>
</signature>
<signature cv="const">
<type>const_reverse_iterator</type>
</signature>
<returns><simpara>reverse iterator for position after the last element in reverse iteration</simpara></returns>
</overloaded-method>
<overloaded-method name="crbegin" cv="const">
<signature>
<type>const_reverse_iterator</type>
</signature>
<returns><simpara>constant reverse iterator for the first element of reverse iteration</simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</overloaded-method>
<overloaded-method name="crend" cv="const">
<signature>
<type>const_reverse_iterator</type>
</signature>
<returns><simpara>constant reverse iterator for position after the last element in reverse iteration</simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</overloaded-method>
</method-group>
<method-group name="capacity">
<method name="size">
<type>size_type</type>
<returns><simpara><code>N</code></simpara></returns>
</method>
<method name="empty">
<type>bool</type>
<returns><simpara><code>N==0</code></simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</method>
<method name="max_size">
<type>size_type</type>
<returns><simpara><code>N</code></simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</method>
</method-group>
<method-group name="element access">
<overloaded-method name="operator[]">
<signature>
<type>reference</type>
<parameter name="i">
<paramtype>size_type</paramtype>
</parameter>
</signature>
<signature cv="const">
<type>const_reference</type>
<parameter name="i">
<paramtype>size_type</paramtype>
</parameter>
</signature>
<requires><simpara><code>i < N</code></simpara></requires>
<returns><simpara>element with index <code>i</code></simpara></returns>
<throws><simpara>will not throw.</simpara></throws>
</overloaded-method>
<overloaded-method name="at">
<signature>
<type>reference</type>
<parameter name="i">
<paramtype>size_type</paramtype>
</parameter>
</signature>
<signature cv="const">
<type>const_reference</type>
<parameter name="i">
<paramtype>size_type</paramtype>
</parameter>
</signature>
<returns><simpara>element with index <code>i</code></simpara></returns>
<throws><simpara><code><classname>std::range_error</classname></code> if <code>i >= N</code></simpara></throws>
</overloaded-method>
<overloaded-method name="front">
<signature>
<type>reference</type>
</signature>
<signature cv="const">
<type>const_reference</type>
</signature>
<requires><simpara><code>N > 0</code></simpara></requires>
<returns><simpara>the first element</simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</overloaded-method>
<overloaded-method name="back">
<signature>
<type>reference</type>
</signature>
<signature cv="const">
<type>const_reference</type>
</signature>
<requires><simpara><code>N > 0</code></simpara></requires>
<returns><simpara>the last element</simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</overloaded-method>
<method name="data" cv="const">
<type>const T*</type>
<returns><simpara><code>elems</code></simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</method>
<method name="c_array">
<type>T*</type>
<returns><simpara><code>elems</code></simpara></returns>
<throws><simpara>will not throw</simpara></throws>
</method>
</method-group>
<method-group name="modifiers">
<method name="swap">
<type>void</type>
<parameter name="other">
<paramtype><classname>array</classname><T, N>&</paramtype>
</parameter>
<effects><simpara><code>std::swap_ranges(<methodname>begin</methodname>(), <methodname>end</methodname>(), other.<methodname>begin</methodname>())</code></simpara></effects>
<complexity><simpara>linear in <code>N</code></simpara></complexity>
</method>
<method name="assign">
<type>void</type>
<parameter name="value">
<paramtype>const T&</paramtype>
</parameter>
<effects><simpara><code>std::fill_n(<methodname>begin</methodname>(), N, value)</code></simpara></effects>
</method>
</method-group>
<data-member name="elems[N]"> <!-- HACK -->
<type>T</type>
</data-member>
<free-function-group name="specialized algorithms">
<function name="swap">
<template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="N">
<type>std::size_t</type>
</template-nontype-parameter>
</template>
<type>void</type>
<parameter name="x">
<paramtype><classname>array</classname><T, N>&</paramtype>
</parameter>
<parameter name="y">
<paramtype><classname>array</classname><T, N>&</paramtype>
</parameter>
<effects><simpara><code>x.<methodname>swap</methodname>(y)</code></simpara></effects>
<throws><simpara>will not throw.</simpara></throws>
</function>
</free-function-group>
<free-function-group name="comparisons">
<function name="operator==">
<template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="N">
<type>std::size_t</type>
</template-nontype-parameter>
</template>
<type>bool</type>
<parameter name="x">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<parameter name="y">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<returns><simpara><code>std::equal(x.<methodname>begin</methodname>(), x.<methodname>end</methodname>(), y.<methodname>begin</methodname>())</code></simpara>
</returns>
</function>
<function name="operator!=">
<template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="N">
<type>std::size_t</type>
</template-nontype-parameter>
</template>
<type>bool</type>
<parameter name="x">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<parameter name="y">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<returns><simpara><code>!(x == y)</code></simpara>
</returns>
</function>
<function name="operator<">
<template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="N">
<type>std::size_t</type>
</template-nontype-parameter>
</template>
<type>bool</type>
<parameter name="x">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<parameter name="y">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<returns><simpara><code>std::lexicographical_compare(x.<methodname>begin</methodname>(), x.<methodname>end</methodname>(), y.<methodname>begin</methodname>(), y.<methodname>end</methodname>())</code></simpara>
</returns>
</function>
<function name="operator>">
<template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="N">
<type>std::size_t</type>
</template-nontype-parameter>
</template>
<type>bool</type>
<parameter name="x">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<parameter name="y">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<returns><simpara><code>y < x</code></simpara></returns>
</function>
<function name="operator<=">
<template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="N">
<type>std::size_t</type>
</template-nontype-parameter>
</template>
<type>bool</type>
<parameter name="x">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<parameter name="y">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<returns><simpara><code>!(y < x)</code></simpara></returns>
</function>
<function name="operator>=">
<template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="N">
<type>std::size_t</type>
</template-nontype-parameter>
</template>
<type>bool</type>
<parameter name="x">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<parameter name="y">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<returns><simpara><code>!(x < y)</code></simpara></returns>
</function>
</free-function-group>
<free-function-group name="specializations">
<function name="boost::get">
<template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="N">
<type>std::size_t</type>
</template-nontype-parameter>
<template-nontype-parameter name="Idx">
<type>std::size_t</type>
</template-nontype-parameter>
</template>
<type>T</type>
<parameter name="arr">
<paramtype><classname>array</classname><T, N>&</paramtype>
</parameter>
<returns><simpara>element of array with index <code>Idx</code></simpara></returns>
<effects><simpara>Will <code>static_assert</code> if <code>Idx >= N</code></simpara></effects>
</function>
<function name="boost::get">
<template>
<template-type-parameter name="T"/>
<template-nontype-parameter name="N">
<type>std::size_t</type>
</template-nontype-parameter>
<template-nontype-parameter name="Idx">
<type>std::size_t</type>
</template-nontype-parameter>
</template>
<type>T</type>
<parameter name="arr">
<paramtype>const <classname>array</classname><T, N>&</paramtype>
</parameter>
<returns><simpara>const element of array with index <code>Idx</code></simpara></returns>
<effects><simpara>Will <code>static_assert</code> if <code>Idx >= N</code></simpara></effects>
</function>
</free-function-group>
</class>
</namespace>
</header>
</library-reference>
<section id="array.rationale">
<title>Design Rationale</title>
<para>There was an important design tradeoff regarding the
constructors: We could implement array as an "aggregate" (see
Section 8.5.1, [dcl.init.aggr], of the C++ Standard). This would
mean:
<itemizedlist>
<listitem><simpara>An array can be initialized with a
brace-enclosing, comma-separated list of initializers for the
elements of the container, written in increasing subscript
order:</simpara>
<programlisting><classname>boost::array</classname><int,4> a = { { 1, 2, 3 } };</programlisting>
<simpara>Note that if there are fewer elements in the
initializer list, then each remaining element gets
default-initialized (thus, it has a defined value).</simpara>
</listitem></itemizedlist></para>
<para>However, this approach has its drawbacks: <emphasis
role="bold"> passing no initializer list means that the elements
have an indetermined initial value</emphasis>, because the rule says
that aggregates may have:
<itemizedlist>
<listitem><simpara>No user-declared constructors.</simpara></listitem>
<listitem><simpara>No private or protected non-static data members.</simpara></listitem>
<listitem><simpara>No base classes.</simpara></listitem>
<listitem><simpara>No virtual functions.</simpara></listitem>
</itemizedlist>
</para>
<para>Nevertheless, The current implementation uses this approach.</para>
<para>Note that for standard conforming compilers it is possible to
use fewer braces (according to 8.5.1 (11) of the Standard). That is,
you can initialize an array as follows:</para>
<programlisting>
<classname>boost::array</classname><int,4> a = { 1, 2, 3 };
</programlisting>
<para>I'd appreciate any constructive feedback. <emphasis
role="bold">Please note: I don't have time to read all boost
mails. Thus, to make sure that feedback arrives to me, please send
me a copy of each mail regarding this class.</emphasis></para>
<para>The code is provided "as is" without expressed or implied
warranty.</para>
</section>
<section id="array.more.info">
<title>For more information...</title>
<para>To find more details about using ordinary arrays in C++ and
the framework of the STL, see e.g.
<literallayout>The C++ Standard Library - A Tutorial and Reference
by Nicolai M. Josuttis
Addison Wesley Longman, 1999
ISBN 0-201-37926-0</literallayout>
</para>
<para><ulink url="path_to_url">Home Page of Nicolai
Josuttis</ulink></para>
</section>
<section id="array.ack">
<title>Acknowledgements</title>
<para>Doug Gregor ported the documentation to the BoostBook format.</para>
</section>
<!-- Notes:
empty() should return N != 0
size(), empty(), max_size() should be const
-->
</library>
``` | /content/code_sandbox/deps/boost_1_66_0/libs/array/doc/array.xml | xml | 2016-09-05T10:18:44 | 2024-08-11T13:21:40 | LiquidCore | LiquidPlayer/LiquidCore | 1,010 | 5,779 |
```xml
import { Username } from '@standardnotes/snjs'
import { ChallengePrompt } from '@standardnotes/services'
import { RefObject, useState } from 'react'
import { WebApplication } from '@/Application/WebApplication'
import Button from '../Button/Button'
import Icon from '../Icon/Icon'
import { InputValue } from './InputValue'
import U2FPromptIframeContainer from './U2FPromptIframeContainer'
import { isAndroid } from '@standardnotes/ui-services'
type Props = {
application: WebApplication
onValueChange: (value: InputValue['value'], prompt: ChallengePrompt) => void
prompt: ChallengePrompt
buttonRef: RefObject<HTMLButtonElement>
contextData?: Record<string, unknown>
}
const U2FPrompt = ({ application, onValueChange, prompt, buttonRef, contextData }: Props) => {
const [authenticatorResponse, setAuthenticatorResponse] = useState<Record<string, unknown> | null>(null)
const [error, setError] = useState('')
if (!application.isFullU2FClient && !isAndroid()) {
return (
<U2FPromptIframeContainer
contextData={contextData}
apiHost={application.getHost.execute().getValue() || window.defaultSyncServer}
onResponse={(response) => {
onValueChange(response, prompt)
}}
/>
)
} else {
return (
<div className="min-w-76">
{error && <div className="text-red-500">{error}</div>}
<Button
primary
fullWidth
colorStyle={authenticatorResponse ? 'success' : 'info'}
onClick={async () => {
const usernameOrError = Username.create((contextData as { username: string }).username)
if (usernameOrError.isFailed()) {
setError(usernameOrError.getError())
return
}
const username = usernameOrError.getValue()
let authenticatorResponse: Record<string, unknown> | null = null
if (isAndroid()) {
const authenticatorOptionsOrError = await application.getAuthenticatorAuthenticationOptions.execute({
username: username.value,
})
if (authenticatorOptionsOrError.isFailed()) {
setError(authenticatorOptionsOrError.getError())
return
}
const authenticatorOptions = authenticatorOptionsOrError.getValue()
authenticatorResponse = await application.mobileDevice.authenticateWithU2F(
JSON.stringify(authenticatorOptions),
)
} else {
const authenticatorResponseOrError = await application.getAuthenticatorAuthenticationResponse.execute({
username: username.value,
})
if (authenticatorResponseOrError.isFailed()) {
setError(authenticatorResponseOrError.getError())
return
}
authenticatorResponse = authenticatorResponseOrError.getValue()
}
if (authenticatorResponse === null) {
setError('Failed to obtain device response')
return
}
setAuthenticatorResponse(authenticatorResponse)
onValueChange(authenticatorResponse, prompt)
}}
ref={buttonRef}
>
{authenticatorResponse ? (
<span className="flex items-center justify-center gap-3">
<Icon type="check-circle" />
Obtained Device Response
</span>
) : (
'Authenticate Device'
)}
</Button>
</div>
)
}
}
export default U2FPrompt
``` | /content/code_sandbox/packages/web/src/javascripts/Components/ChallengeModal/U2FPrompt.tsx | xml | 2016-12-05T23:31:33 | 2024-08-16T06:51:19 | app | standardnotes/app | 5,180 | 711 |
```xml
import { Column, Entity } from "../../../../src/index"
import { AbstractEntity } from "./AbstractEntity"
@Entity()
export class ConcreteEntity extends AbstractEntity {
@Column() position: string
}
``` | /content/code_sandbox/test/github-issues/1369/entity/ConcreteEntity.ts | xml | 2016-02-29T07:41:14 | 2024-08-16T18:28:52 | typeorm | typeorm/typeorm | 33,875 | 41 |
```xml
import { UserService } from '~modules/user/shared/user.service';
import { ApolloTestingController, ApolloTestingModule } from 'apollo-angular/testing';
import { TestBed } from '@angular/core/testing';
import { getMeQuery } from '~modules/user/shared/user-queries.graphql';
import { User } from '~modules/user/shared/user.model';
// eslint-disable-next-line max-lines-per-function
describe('UserService', () => {
let controller: ApolloTestingController;
let userService: UserService;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [ApolloTestingModule],
providers: [UserService],
});
});
beforeEach(() => {
controller = TestBed.inject(ApolloTestingController);
userService = TestBed.inject(UserService);
});
it('should get my own user', () => {
userService.getMe().subscribe();
const op = controller.expectOne(getMeQuery);
expect(op.operation.clientName).toEqual('default');
op.flush({
data: {
me: new User({
id: 'userId',
email: 'user@email.com',
language: 'es',
firstname: 'Isma',
heroes: [],
}),
},
});
});
afterEach(() => {
controller.verify();
});
});
``` | /content/code_sandbox/src/app/modules/user/shared/user.service.spec.ts | xml | 2016-11-22T17:10:18 | 2024-08-14T21:36:59 | angular-example-app | Ismaestro/angular-example-app | 2,150 | 255 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="cs-cz" xmlns="path_to_url">
<String Id="Locale" Overridable="yes">cs</String>
<String Id="ProductName" Overridable="yes">Aspia Host</String>
<String Id="DowngradeErrorMessage" Overridable="yes">A newer version of the application is already installed.</String>
<String Id="CreateDesktopShortcut" Overridable="yes">Create desktop shortcut</String>
<String Id="CreateProgramMenuShortcut" Overridable="yes">Create shortcut in the Start menu</String>
</WixLocalization>
``` | /content/code_sandbox/installer/translations/host.cs-cz.wxl | xml | 2016-10-26T16:17:31 | 2024-08-16T13:37:42 | aspia | dchapyshev/aspia | 1,579 | 145 |
```xml
import type { Image } from "@common/Core/Image";
export interface FileIconExtractor {
matchesFilePath: (filePath: string) => boolean;
extractFileIcon: (filePath: string) => Promise<Image>;
extractFileIcons: (filePaths: string[]) => Promise<Record<string, Image>>;
}
``` | /content/code_sandbox/src/main/Core/ImageGenerator/FileIconExtractor.ts | xml | 2016-10-11T04:59:52 | 2024-08-16T11:53:31 | ueli | oliverschwendener/ueli | 3,543 | 64 |
```xml
import React, { Component } from 'react';
import {
Platform,
StyleSheet,
Text,
Animated,
View,
TextInput,
} from 'react-native';
import { RectButton } from 'react-native-gesture-handler';
import { DrawerLayout, DrawerType } from 'react-native-gesture-handler';
const TYPES: DrawerType[] = ['front', 'back', 'back', 'slide'];
const PARALLAX = [false, false, true, false];
type PageProps = {
fromLeft: boolean;
type: DrawerType;
parallaxOn: boolean;
flipSide: () => void;
nextType: () => void;
openDrawer: () => void;
};
const Page = ({
fromLeft,
type,
parallaxOn,
flipSide,
nextType,
openDrawer,
}: PageProps) => (
<View style={styles.page}>
<Text style={styles.pageText}>Hi </Text>
<RectButton style={styles.rectButton} onPress={flipSide}>
<Text style={styles.rectButtonText}>
Drawer to the {fromLeft ? 'left' : 'right'}! {'->'} Flip
</Text>
</RectButton>
<RectButton style={styles.rectButton} onPress={nextType}>
<Text style={styles.rectButtonText}>
Type {type} {parallaxOn && 'with parallax!'} -> Next
</Text>
</RectButton>
<RectButton style={styles.rectButton} onPress={openDrawer}>
<Text style={styles.rectButtonText}>Open drawer</Text>
</RectButton>
<TextInput
style={styles.pageInput}
placeholder="Just an input field to test kb dismiss mode"
/>
</View>
);
export default class Example extends Component<
Record<string, unknown>,
{ fromLeft: boolean; type: number }
> {
state = { fromLeft: true, type: 0 };
private renderParallaxDrawer = (progressValue: Animated.Value) => {
const parallax = progressValue.interpolate({
inputRange: [0, 1],
outputRange: [this.state.fromLeft ? -50 : 50, 0],
});
const animatedStyles = {
transform: [{ translateX: parallax }],
};
return (
<Animated.View style={[styles.drawerContainer, animatedStyles]}>
<Text style={styles.drawerText}>I am in the drawer!</Text>
<Text style={styles.drawerText}>
Watch parallax animation while you pull the drawer!
</Text>
</Animated.View>
);
};
private renderDrawer = () => {
return (
<View style={styles.drawerContainer}>
<Text style={styles.drawerText}>I am in the drawer!</Text>
</View>
);
};
private drawer?: DrawerLayout | null;
render() {
const drawerType: DrawerType = TYPES[this.state.type];
const parallax = PARALLAX[this.state.type];
return (
<View style={styles.container}>
<DrawerLayout
ref={(drawer) => {
this.drawer = drawer;
}}
enableTrackpadTwoFingerGesture
drawerWidth={200}
keyboardDismissMode="on-drag"
drawerPosition={this.state.fromLeft ? 'left' : 'right'}
drawerType={drawerType}
drawerBackgroundColor="#ddd"
overlayColor={drawerType === 'front' ? 'black' : '#00000000'}
renderNavigationView={
parallax ? this.renderParallaxDrawer : this.renderDrawer
}
contentContainerStyle={
// careful; don't elevate the child container
// over top of the drawer when the drawer is supposed
// to be in front - you won't be able to see/open it.
drawerType === 'front'
? {}
: Platform.select({
ios: {
shadowColor: '#000',
shadowOpacity: 0.5,
shadowOffset: { width: 0, height: 2 },
shadowRadius: 60,
},
android: {
elevation: 100,
backgroundColor: '#000',
},
})
}>
<Page
type={drawerType}
fromLeft={this.state.fromLeft}
parallaxOn={parallax}
flipSide={() =>
this.setState((prevState) => ({
fromLeft: !prevState.fromLeft,
}))
}
nextType={() =>
this.setState((prevState) => ({
type: (prevState.type + 1) % TYPES.length,
}))
}
openDrawer={() => this.drawer?.openDrawer({ speed: 14 })}
/>
</DrawerLayout>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
page: {
...StyleSheet.absoluteFillObject,
alignItems: 'center',
paddingTop: 40,
backgroundColor: 'gray',
},
pageText: {
fontSize: 21,
color: 'white',
},
rectButton: {
height: 60,
padding: 10,
alignSelf: 'stretch',
alignItems: 'center',
justifyContent: 'center',
marginTop: 20,
backgroundColor: 'white',
},
rectButtonText: {
backgroundColor: 'transparent',
},
drawerContainer: {
flex: 1,
paddingTop: 10,
},
pageInput: {
height: 60,
padding: 10,
alignSelf: 'stretch',
alignItems: 'center',
justifyContent: 'center',
marginTop: 20,
backgroundColor: '#eee',
},
drawerText: {
margin: 10,
fontSize: 15,
textAlign: 'left',
},
});
``` | /content/code_sandbox/example/src/basic/horizontalDrawer/index.tsx | xml | 2016-10-27T08:31:38 | 2024-08-16T12:03:40 | react-native-gesture-handler | software-mansion/react-native-gesture-handler | 5,989 | 1,231 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout android:id="@+id/item_view"
xmlns:android="path_to_url"
android:layout_width="match_parent"
android:layout_height="@dimen/video_item_layout_height"
android:layout_margin="@dimen/default_general_margin"
android:clickable="true"
android:foreground="?attr/selectableItemBackground">
<ImageView
android:id="@+id/item_img"
android:layout_width="@dimen/video_item_image_width"
android:layout_height="@dimen/video_item_layout_height"
android:layout_alignParentStart="true"
android:layout_centerInParent="true"
android:layout_marginStart="@dimen/default_tiny_padding"
android:scaleType="center" />
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="@dimen/video_item_layout_height"
android:layout_marginStart="@dimen/default_general_margin"
android:layout_toEndOf="@+id/item_img"
android:orientation="vertical">
<TextView
android:id="@+id/item_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_marginEnd="@dimen/default_tiny_padding"
android:layout_marginStart="@dimen/default_tiny_padding"
android:ellipsize="end"
android:maxLines="2"
android:textColor="@color/font_normal"
android:textSize="@dimen/default_small_text_size" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_above="@+id/layout_play"
android:layout_marginStart="@dimen/default_tiny_padding"
android:gravity="center"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/video_info_mini_icons_size"
android:layout_height="@dimen/video_info_mini_icons_size"
android:src="@drawable/icon_up" />
<TextView
android:id="@+id/item_user_name"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/video_info_count_text_margin_start"
android:textColor="@color/black_alpha_45"
android:textSize="@dimen/default_tiny_text_size" />
</LinearLayout>
<LinearLayout
android:id="@+id/layout_play"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginStart="@dimen/default_tiny_padding"
android:layout_marginTop="@dimen/default_tiny_padding"
android:gravity="center_vertical"
android:orientation="horizontal">
<ImageView
android:layout_width="@dimen/video_info_mini_icons_size"
android:layout_height="@dimen/video_info_mini_icons_size"
android:src="@drawable/ic_play_circle_outline_black_24dp" />
<TextView
android:id="@+id/item_play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/video_info_count_text_margin_start"
android:textColor="@color/black_alpha_45"
android:textSize="@dimen/default_tiny_text_size" />
<Space
android:layout_width="@dimen/activity_vertical_margin"
android:layout_height="match_parent" />
<ImageView
android:layout_width="@dimen/video_info_mini_icons_size"
android:layout_height="@dimen/video_info_mini_icons_size"
android:src="@drawable/ic_subtitles_black_24dp" />
<TextView
android:id="@+id/item_review"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/video_info_count_text_margin_start"
android:maxLines="1"
android:textColor="@color/black_alpha_45"
android:textSize="@dimen/default_tiny_text_size" />
</LinearLayout>
</RelativeLayout>
</RelativeLayout>
``` | /content/code_sandbox/app/src/main/res/layout/item_video_strip.xml | xml | 2016-06-01T04:36:01 | 2024-08-14T06:51:22 | bilibili-android-client | HotBitmapGG/bilibili-android-client | 4,487 | 882 |
```xml
import { EventEmitter } from 'events';
import { PubSubEngine } from './pubsub-engine';
export interface PubSubOptions {
eventEmitter?: EventEmitter;
}
export class PubSub extends PubSubEngine {
protected ee: EventEmitter;
private subscriptions: { [key: string]: [string, (...args: any[]) => void] };
private subIdCounter: number;
constructor(options: PubSubOptions = {}) {
super();
this.ee = options.eventEmitter || new EventEmitter();
this.subscriptions = {};
this.subIdCounter = 0;
}
public publish(triggerName: string, payload: any): Promise<void> {
this.ee.emit(triggerName, payload);
return Promise.resolve();
}
public subscribe(triggerName: string, onMessage: (...args: any[]) => void): Promise<number> {
this.ee.addListener(triggerName, onMessage);
this.subIdCounter = this.subIdCounter + 1;
this.subscriptions[this.subIdCounter] = [triggerName, onMessage];
return Promise.resolve(this.subIdCounter);
}
public unsubscribe(subId: number) {
const [triggerName, onMessage] = this.subscriptions[subId];
delete this.subscriptions[subId];
this.ee.removeListener(triggerName, onMessage);
}
}
``` | /content/code_sandbox/src/pubsub.ts | xml | 2016-08-19T19:08:00 | 2024-07-04T19:27:14 | graphql-subscriptions | apollographql/graphql-subscriptions | 1,584 | 273 |
```xml
import {Value} from '../model/value.js';
import {View} from '../view/view.js';
import {Controller} from './controller.js';
export interface ValueController<
T,
Vw extends View = View,
Va extends Value<T> = Value<T>,
> extends Controller<Vw> {
readonly value: Va;
}
``` | /content/code_sandbox/packages/core/src/common/controller/value.ts | xml | 2016-05-10T15:45:13 | 2024-08-16T19:57:27 | tweakpane | cocopon/tweakpane | 3,480 | 68 |
```xml
import { c } from 'ttag';
import { APPS } from '@proton/shared/lib/constants';
import envelopSvg from '@proton/styles/assets/img/illustrations/welcome-pane.svg';
import { Bordered } from '../../components';
import { useConfig } from '../../hooks';
const Cash = () => {
const { APP_NAME } = useConfig();
const email = (
<b key="email-contact">
{APP_NAME === APPS.PROTONVPN_SETTINGS ? 'contact@protonvpn.com' : 'contact@proton.me'}
</b>
);
return (
<Bordered className="bg-weak rounded">
<div className="mb-4">{c('Info for cash payment method')
.jt`Please contact us at ${email} for instructions on how to pay us with cash.`}</div>
<div className="text-center">
<img src={envelopSvg} alt="" />
</div>
</Bordered>
);
};
export default Cash;
``` | /content/code_sandbox/packages/components/containers/payments/Cash.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 212 |
```xml
import { WalkoffEvent } from "./walkoffEvent";
export class EventQueue {
items: WalkoffEvent[] = [];
constructor(private maxSize = 500) {}
add(item: WalkoffEvent) {
this.items.push(item);
if (this.items.length > this.maxSize)
this.items = this.items.slice(this.maxSize * -1)
}
filter(channel: string) {
return this.items.filter(item => item.channels.some(c => c == channel));
}
get all(): WalkoffEvent[] {
return this.items;
}
get length(): number {
return this.items.length
}
}
``` | /content/code_sandbox/socketio/src/models/eventQueue.ts | xml | 2016-06-08T16:34:46 | 2024-08-16T18:12:30 | WALKOFF | nsacyber/WALKOFF | 1,198 | 134 |
```xml
import { EditorState } from 'draft-js';
import { ButtonHTMLAttributes, ComponentType } from 'react';
import AlignBlockCenterButton from './components/AlignBlockCenterButton';
import AlignBlockDefaultButton from './components/AlignBlockDefaultButton';
import AlignBlockLeftButton from './components/AlignBlockLeftButton';
import AlignBlockRightButton from './components/AlignBlockRightButton';
import AlignTextCenterButton from './components/AlignTextCenterButton';
import AlignTextLeftButton from './components/AlignTextLeftButton';
import AlignTextRightButton from './components/AlignTextRightButton';
import BlockquoteButton from './components/BlockquoteButton';
import BoldButton from './components/BoldButton';
import CodeBlockButton from './components/CodeBlockButton';
import CodeButton from './components/CodeButton';
import HeadlineOneButton from './components/HeadlineOneButton';
import HeadlineThreeButton from './components/HeadlineThreeButton';
import HeadlineTwoButton from './components/HeadlineTwoButton';
import ItalicButton from './components/ItalicButton';
import OrderedListButton from './components/OrderedListButton';
import SubButton from './components/SubButton';
import SupButton from './components/SupButton';
import UnderlineButton from './components/UnderlineButton';
import UnorderedListButton from './components/UnorderedListButton';
import createBlockAlignmentButton from './utils/createBlockAlignmentButton';
import createBlockStyleButton from './utils/createBlockStyleButton';
import createInlineStyleButton from './utils/createInlineStyleButton';
import createTextAlignmentButton from './utils/createTextAlignmentButton';
export interface DraftJsButtonTheme {
// CSS classes to apply
active?: string;
button?: string;
buttonWrapper?: string;
}
export interface DraftJsButtonProps {
theme: DraftJsButtonTheme;
buttonProps?: ButtonHTMLAttributes<HTMLButtonElement>;
}
export interface DraftJsBlockAlignmentButtonProps extends DraftJsButtonProps {
alignment: string | null;
setAlignment(val: { alignment: string }): void;
}
export interface DraftJsStyleButtonProps extends DraftJsButtonProps {
setEditorState(editorState: EditorState): void;
getEditorState(): EditorState;
}
export type DraftJsBlockAlignmentButtonType =
ComponentType<DraftJsBlockAlignmentButtonProps>;
export type DraftJsStyleButtonType = ComponentType<DraftJsStyleButtonProps>;
export {
createBlockAlignmentButton,
createBlockStyleButton,
createInlineStyleButton,
createTextAlignmentButton,
ItalicButton,
BoldButton,
SupButton,
SubButton,
CodeButton,
UnderlineButton,
HeadlineOneButton,
HeadlineTwoButton,
HeadlineThreeButton,
UnorderedListButton,
OrderedListButton,
BlockquoteButton,
CodeBlockButton,
AlignBlockDefaultButton,
AlignBlockCenterButton,
AlignBlockLeftButton,
AlignBlockRightButton,
AlignTextLeftButton,
AlignTextCenterButton,
AlignTextRightButton,
};
``` | /content/code_sandbox/packages/buttons/src/index.ts | xml | 2016-02-26T09:54:56 | 2024-08-16T18:16:31 | draft-js-plugins | draft-js-plugins/draft-js-plugins | 4,087 | 623 |
```xml
export { default as IMask } from 'imask';
export * from './imask.directive';
export * from './imask.pipe';
export * from './imask.module';
export * from './imask-factory';
export * from './default-imask-factory';
export * from './imask-factory-token';
``` | /content/code_sandbox/packages/angular-imask/src/index.ts | xml | 2016-11-10T13:04:29 | 2024-08-16T15:16:18 | imaskjs | uNmAnNeR/imaskjs | 4,881 | 66 |
```xml
<resources>
<string name="path_pathmorph_expandcollapse">M 1,-4 L 1,4 L -1,4 L -1,-4 Z</string>
</resources>
``` | /content/code_sandbox/app/src/main/res/values/checkable_expandcollapse.xml | xml | 2016-11-04T14:23:35 | 2024-08-12T07:50:44 | adp-delightful-details | alexjlockwood/adp-delightful-details | 1,070 | 42 |
```xml
import {fakeAsync, flush} from '@angular/core/testing';
import {dispatchMouseEvent} from '@angular/cdk/testing/private';
import {_supportsShadowDom} from '@angular/cdk/platform';
import {createComponent, startDraggingViaMouse} from './test-utils.spec';
import {
ConnectedDropZones,
DraggableInDropZone,
DraggableInScrollableVerticalDropZone,
ITEM_HEIGHT,
ITEM_WIDTH,
defineCommonDropListTests,
getHorizontalFixtures,
} from './drop-list-shared.spec';
describe('Single-axis drop list', () => {
const {DraggableInHorizontalDropZone} = getHorizontalFixtures('horizontal');
defineCommonDropListTests({
verticalListOrientation: 'vertical',
horizontalListOrientation: 'horizontal',
getSortedSiblings: (element, direction) => {
return element.parentElement
? Array.from(element.parentElement.children).sort((a, b) => {
return a.getBoundingClientRect()[direction] - b.getBoundingClientRect()[direction];
})
: [];
},
});
it('should lay out the elements correctly, when swapping down with a taller element', fakeAsync(() => {
const fixture = createComponent(DraggableInDropZone);
fixture.detectChanges();
const items = fixture.componentInstance.dragItems.map(i => i.element.nativeElement);
const {top, left} = items[0].getBoundingClientRect();
fixture.componentInstance.items[0].height = ITEM_HEIGHT * 2;
fixture.changeDetectorRef.markForCheck();
fixture.detectChanges();
startDraggingViaMouse(fixture, items[0], left, top);
const placeholder = document.querySelector('.cdk-drag-placeholder')! as HTMLElement;
const target = items[1];
const targetRect = target.getBoundingClientRect();
// Add a few pixels to the top offset so we get some overlap.
dispatchMouseEvent(document, 'mousemove', targetRect.left, targetRect.top + 5);
fixture.detectChanges();
expect(placeholder.style.transform).toBe(`translate3d(0px, ${ITEM_HEIGHT}px, 0px)`);
expect(target.style.transform).toBe(`translate3d(0px, ${-ITEM_HEIGHT * 2}px, 0px)`);
dispatchMouseEvent(document, 'mouseup');
fixture.detectChanges();
flush();
}));
it('should lay out the elements correctly, when swapping up with a taller element', fakeAsync(() => {
const fixture = createComponent(DraggableInDropZone);
fixture.detectChanges();
const items = fixture.componentInstance.dragItems.map(i => i.element.nativeElement);
const {top, left} = items[1].getBoundingClientRect();
fixture.componentInstance.items[1].height = ITEM_HEIGHT * 2;
fixture.changeDetectorRef.markForCheck();
fixture.detectChanges();
startDraggingViaMouse(fixture, items[1], left, top);
const placeholder = document.querySelector('.cdk-drag-placeholder')! as HTMLElement;
const target = items[0];
const targetRect = target.getBoundingClientRect();
// Add a few pixels to the top offset so we get some overlap.
dispatchMouseEvent(document, 'mousemove', targetRect.left, targetRect.bottom - 5);
fixture.detectChanges();
expect(placeholder.style.transform).toBe(`translate3d(0px, ${-ITEM_HEIGHT}px, 0px)`);
expect(target.style.transform).toBe(`translate3d(0px, ${ITEM_HEIGHT * 2}px, 0px)`);
dispatchMouseEvent(document, 'mouseup');
fixture.detectChanges();
flush();
}));
it('should lay out elements correctly, when swapping an item with margin', fakeAsync(() => {
const fixture = createComponent(DraggableInDropZone);
fixture.detectChanges();
const items = fixture.componentInstance.dragItems.map(i => i.element.nativeElement);
const {top, left} = items[0].getBoundingClientRect();
fixture.componentInstance.items[0].margin = 12;
fixture.changeDetectorRef.markForCheck();
fixture.detectChanges();
startDraggingViaMouse(fixture, items[0], left, top);
const placeholder = document.querySelector('.cdk-drag-placeholder')! as HTMLElement;
const target = items[1];
const targetRect = target.getBoundingClientRect();
// Add a few pixels to the top offset so we get some overlap.
dispatchMouseEvent(document, 'mousemove', targetRect.left, targetRect.top + 5);
fixture.detectChanges();
expect(placeholder.style.transform).toBe(`translate3d(0px, ${ITEM_HEIGHT + 12}px, 0px)`);
expect(target.style.transform).toBe(`translate3d(0px, ${-ITEM_HEIGHT - 12}px, 0px)`);
dispatchMouseEvent(document, 'mouseup');
fixture.detectChanges();
flush();
}));
it('should lay out the elements correctly, when swapping to the right with a wider element', fakeAsync(() => {
const fixture = createComponent(DraggableInHorizontalDropZone);
fixture.detectChanges();
const items = fixture.componentInstance.dragItems.map(i => i.element.nativeElement);
fixture.componentInstance.items[0].width = ITEM_WIDTH * 2;
fixture.changeDetectorRef.markForCheck();
fixture.detectChanges();
const {top, left} = items[0].getBoundingClientRect();
startDraggingViaMouse(fixture, items[0], left, top);
const placeholder = document.querySelector('.cdk-drag-placeholder')! as HTMLElement;
const target = items[1];
const targetRect = target.getBoundingClientRect();
dispatchMouseEvent(document, 'mousemove', targetRect.right - 5, targetRect.top);
fixture.detectChanges();
expect(placeholder.style.transform).toBe(`translate3d(${ITEM_WIDTH}px, 0px, 0px)`);
expect(target.style.transform).toBe(`translate3d(${-ITEM_WIDTH * 2}px, 0px, 0px)`);
dispatchMouseEvent(document, 'mouseup');
fixture.detectChanges();
flush();
}));
it('should lay out the elements correctly, when swapping left with a wider element', fakeAsync(() => {
const fixture = createComponent(DraggableInHorizontalDropZone);
fixture.detectChanges();
const items = fixture.componentInstance.dragItems.map(i => i.element.nativeElement);
const {top, left} = items[1].getBoundingClientRect();
fixture.componentInstance.items[1].width = ITEM_WIDTH * 2;
fixture.changeDetectorRef.markForCheck();
fixture.detectChanges();
startDraggingViaMouse(fixture, items[1], left, top);
const placeholder = document.querySelector('.cdk-drag-placeholder')! as HTMLElement;
const target = items[0];
const targetRect = target.getBoundingClientRect();
dispatchMouseEvent(document, 'mousemove', targetRect.right - 5, targetRect.top);
fixture.detectChanges();
expect(placeholder.style.transform).toBe(`translate3d(${-ITEM_WIDTH}px, 0px, 0px)`);
expect(target.style.transform).toBe(`translate3d(${ITEM_WIDTH * 2}px, 0px, 0px)`);
dispatchMouseEvent(document, 'mouseup');
fixture.detectChanges();
flush();
}));
it('should clear the `transform` value from siblings when item is dropped', fakeAsync(() => {
const fixture = createComponent(DraggableInDropZone);
fixture.detectChanges();
const dragItems = fixture.componentInstance.dragItems;
const firstItem = dragItems.first;
const thirdItem = dragItems.toArray()[2].element.nativeElement;
const thirdItemRect = thirdItem.getBoundingClientRect();
startDraggingViaMouse(fixture, firstItem.element.nativeElement);
dispatchMouseEvent(document, 'mousemove', thirdItemRect.left + 1, thirdItemRect.top + 1);
fixture.detectChanges();
expect(thirdItem.style.transform).toBeTruthy();
dispatchMouseEvent(document, 'mouseup');
fixture.detectChanges();
flush();
fixture.detectChanges();
expect(thirdItem.style.transform).toBeFalsy();
}));
it('should lay out elements correctly, when horizontally swapping an item with margin', fakeAsync(() => {
const fixture = createComponent(DraggableInHorizontalDropZone);
fixture.detectChanges();
const items = fixture.componentInstance.dragItems.map(i => i.element.nativeElement);
const {top, left} = items[0].getBoundingClientRect();
fixture.componentInstance.items[0].margin = 12;
fixture.changeDetectorRef.markForCheck();
fixture.detectChanges();
startDraggingViaMouse(fixture, items[0], left, top);
const placeholder = document.querySelector('.cdk-drag-placeholder')! as HTMLElement;
const target = items[1];
const targetRect = target.getBoundingClientRect();
dispatchMouseEvent(document, 'mousemove', targetRect.right - 5, targetRect.top);
fixture.detectChanges();
expect(placeholder.style.transform).toBe(`translate3d(${ITEM_WIDTH + 12}px, 0px, 0px)`);
expect(target.style.transform).toBe(`translate3d(${-ITEM_WIDTH - 12}px, 0px, 0px)`);
dispatchMouseEvent(document, 'mouseup');
fixture.detectChanges();
flush();
}));
it('should preserve the original `transform` of items in the list', fakeAsync(() => {
const fixture = createComponent(DraggableInScrollableVerticalDropZone);
fixture.detectChanges();
const items = fixture.componentInstance.dragItems.map(item => item.element.nativeElement);
items.forEach(element => (element.style.transform = 'rotate(180deg)'));
const thirdItemRect = items[2].getBoundingClientRect();
const hasInitialTransform = (element: HTMLElement) =>
element.style.transform.indexOf('rotate(180deg)') > -1;
startDraggingViaMouse(fixture, items[0]);
fixture.detectChanges();
const preview = document.querySelector('.cdk-drag-preview') as HTMLElement;
const placeholder = fixture.nativeElement.querySelector('.cdk-drag-placeholder');
expect(items.every(hasInitialTransform))
.withContext('Expected items to preserve transform when dragging starts.')
.toBe(true);
expect(hasInitialTransform(preview))
.withContext('Expected preview to preserve transform when dragging starts.')
.toBe(true);
expect(hasInitialTransform(placeholder))
.withContext('Expected placeholder to preserve transform when dragging starts.')
.toBe(true);
dispatchMouseEvent(document, 'mousemove', thirdItemRect.left + 1, thirdItemRect.top + 1);
fixture.detectChanges();
expect(items.every(hasInitialTransform))
.withContext('Expected items to preserve transform while dragging.')
.toBe(true);
expect(hasInitialTransform(preview))
.withContext('Expected preview to preserve transform while dragging.')
.toBe(true);
expect(hasInitialTransform(placeholder))
.withContext('Expected placeholder to preserve transform while dragging.')
.toBe(true);
dispatchMouseEvent(document, 'mouseup');
fixture.detectChanges();
flush();
fixture.detectChanges();
expect(items.every(hasInitialTransform))
.withContext('Expected items to preserve transform when dragging stops.')
.toBe(true);
expect(hasInitialTransform(preview))
.withContext('Expected preview to preserve transform when dragging stops.')
.toBe(true);
expect(hasInitialTransform(placeholder))
.withContext('Expected placeholder to preserve transform when dragging stops.')
.toBe(true);
}));
it('should enter as last child if entering from top in reversed container', fakeAsync(() => {
const fixture = createComponent(ConnectedDropZones);
// Make sure there's only one item in the first list.
fixture.componentInstance.todo = ['things'];
fixture.detectChanges();
const groups = fixture.componentInstance.groupedDragItems;
const dropZones = fixture.componentInstance.dropInstances.map(d => d.element.nativeElement);
const item = groups[0][0];
// Add some initial padding as the target drop zone
const targetDropZoneStyle = dropZones[1].style;
targetDropZoneStyle.paddingTop = '10px';
targetDropZoneStyle.display = 'flex';
targetDropZoneStyle.flexDirection = 'column-reverse';
const targetRect = dropZones[1].getBoundingClientRect();
startDraggingViaMouse(fixture, item.element.nativeElement);
const placeholder = dropZones[0].querySelector('.cdk-drag-placeholder')!;
expect(placeholder).toBeTruthy();
expect(dropZones[0].contains(placeholder))
.withContext('Expected placeholder to be inside the first container.')
.toBe(true);
dispatchMouseEvent(document, 'mousemove', targetRect.left, targetRect.top);
fixture.detectChanges();
expect(dropZones[1].lastChild === placeholder)
.withContext('Expected placeholder to be last child inside second container.')
.toBe(true);
dispatchMouseEvent(document, 'mouseup');
}));
it('should lay out the elements correctly when scaled', fakeAsync(() => {
const fixture = createComponent(DraggableInDropZone);
fixture.componentInstance.scale = 0.5;
fixture.detectChanges();
const items = fixture.componentInstance.dragItems.map(i => i.element.nativeElement);
const {top, left} = items[0].getBoundingClientRect();
startDraggingViaMouse(fixture, items[0], left, top);
const placeholder = document.querySelector('.cdk-drag-placeholder')! as HTMLElement;
const target = items[1];
const targetRect = target.getBoundingClientRect();
dispatchMouseEvent(document, 'mousemove', targetRect.left, targetRect.top + 5);
fixture.detectChanges();
expect(placeholder.style.transform).toBe(`translate3d(0px, ${ITEM_HEIGHT * 2}px, 0px)`);
expect(target.style.transform).toBe(`translate3d(0px, ${-ITEM_HEIGHT * 2}px, 0px)`);
dispatchMouseEvent(document, 'mouseup');
fixture.detectChanges();
flush();
}));
});
``` | /content/code_sandbox/src/cdk/drag-drop/directives/single-axis-drop-list.spec.ts | xml | 2016-01-04T18:50:02 | 2024-08-16T11:21:13 | components | angular/components | 24,263 | 2,850 |
```xml
<!--
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<dataset>
<metadata>
<column name="session_id"/>
<column name="user_id"/>
<column name="statement_id"/>
<column name="plan_id"/>
<column name="id"/>
<column name="operation"/>
<column name="options"/>
<column name="object_name"/>
<column name="object_type"/>
<column name="object_owner"/>
<column name="projection"/>
<column name="cost"/>
<column name="cardinality"/>
</metadata>
</dataset>
``` | /content/code_sandbox/test/e2e/sql/src/test/resources/cases/dql/dataset/empty_storage_units/opengauss/select_opengauss_pg_catalog_plan_table_data.xml | xml | 2016-01-18T12:49:26 | 2024-08-16T15:48:11 | shardingsphere | apache/shardingsphere | 19,707 | 185 |
```xml
import { CdsCheckbox as Checkbox, CdsCheckboxGroup as CheckboxGroup } from '@cds/core/checkbox';
import '@cds/core/checkbox/register';
import { createComponent } from '@lit-labs/react';
import * as React from 'react';
import { logReactVersion } from '../utils/index.js';
export const CdsCheckbox = createComponent(React, 'cds-checkbox', Checkbox, {}, 'CdsCheckbox');
export const CdsCheckboxGroup = createComponent(React, 'cds-checkbox-group', CheckboxGroup, {}, 'CdsCheckboxGroup');
logReactVersion(React);
``` | /content/code_sandbox/packages/react/src/checkbox/index.tsx | xml | 2016-09-29T17:24:17 | 2024-08-11T17:06:15 | clarity | vmware-archive/clarity | 6,431 | 124 |
```xml
<ehcache xmlns:xsi="path_to_url"
xsi:noNamespaceSchemaLocation="ehcache.xsd"
updateCheck="false">
<diskStore path="java.io.tmpdir"/>
<!-- objects are evicted from the cache every 60 seconds -->
<cache name="vets"
timeToLiveSeconds="60"
maxElementsInMemory="100"
eternal="false"
overflowToDisk="false"
maxElementsOnDisk="10000000"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="1"
memoryStoreEvictionPolicy="LRU"/>
</ehcache>
``` | /content/code_sandbox/docs/examples/example_osv_java_servlet/src/main/resources/cache/ehcache.xml | xml | 2016-04-06T18:46:17 | 2024-08-11T17:18:28 | unik | solo-io/unik | 2,702 | 131 |
```xml
/* eslint-disable verdaccio/jsx-spread */
import React, { Suspense, lazy } from 'react';
/**
* With the combination of a bundler, enable to code split a package.
*
* @example
```jsx
const VersionPage = loadable(() => import(/'../pages/Version'));
```
@category HOC
*/
export default (importCallback: any) => {
const TargetComponent = lazy(importCallback);
return (props: any) => (
<Suspense fallback={null}>
<TargetComponent {...props} />
</Suspense>
);
};
``` | /content/code_sandbox/packages/ui-components/src/utils/loadable.tsx | xml | 2016-04-15T16:21:12 | 2024-08-16T09:38:01 | verdaccio | verdaccio/verdaccio | 16,189 | 132 |
```xml
import {
attachmentInput,
attachmentType
} from "@erxes/api-utils/src/commonTypeDefs";
export const types = (isContactsEnabled: boolean) => `
${attachmentType}
${attachmentInput}
${
isContactsEnabled
? `
extend type Customer @key(fields: "_id") {
_id: String! @external
}
extend type Company @key(fields: "_id") {
_id: String! @external
}
`
: ""
}
type VerificationRequest {
status: String
attachments: [Attachment]
description: String
verifiedBy: String
}
type TwoFactorDevice {
key: String
device: String
date: Date
}
input ClientPortalUserUpdate {
firstName: String
lastName: String
phone: String
email: String
username: String
companyName: String
companyRegistrationNumber: String
code: String,
links: JSON,
customFieldsData: JSON,
isEmailVerified: Boolean
isPhoneVerified: Boolean
isOnline: Boolean
avatar: String
}
input TwoFactor {
key: String
device: String
}
type ClientPortalUser @key(fields: "_id") {
_id: String!
createdAt: Date
modifiedAt: Date
fullName: String
firstName: String
lastName: String
phone: String
email: String
username: String
type: String
companyName: String
companyRegistrationNumber: String
erxesCustomerId: String
erxesCompanyId: String
clientPortalId: String
code: String,
ownerId: String,
links: JSON,
customFieldsData: JSON,
customFieldsDataByFieldCode: JSON,
password: String
isEmailVerified: Boolean
isPhoneVerified: Boolean
isOnline: Boolean
lastSeenAt: Date
sessionCount: Int
clientPortal: ClientPortal
notificationSettings: UserNotificationSettings
avatar: String
verificationRequest: VerificationRequest
${
isContactsEnabled
? `
customer: Customer
company: Company
`
: ""
}
twoFactorDevices:[TwoFactorDevice]
}
type clientPortalUsersListResponse {
list: [ClientPortalUser],
totalCount: Float,
}
type ClientPortalCompany {
_id: String!
erxesCompanyId: String
productCategoryIds: [String]
clientPortalId: String
createdAt: Date
${
isContactsEnabled
? `
company: Company
`
: ""
}
}
enum ClientPortalUserVerificationStatus {
verified
notVerified
pending
}
type CPAuthPayload {
token: String
refreshToken: String
}
`;
export const conformityQueryFields = `
conformityMainType: String
conformityMainTypeId: String
conformityRelType: String
conformityIsRelated: Boolean
conformityIsSaved: Boolean
`;
const queryParams = `
page: Int
perPage: Int
type: String
ids: [String]
excludeIds: Boolean
searchValue: String
sortField: String
sortDirection: Int
cpId: String
dateFilters: String
${conformityQueryFields}
`;
export const queries = () => `
clientPortalCurrentUser: ClientPortalUser
clientPortalUserDetail(_id: String!): ClientPortalUser
clientPortalUsers(${queryParams}): [ClientPortalUser]
clientPortalUsersMain(${queryParams}): clientPortalUsersListResponse
clientPortalUserCounts(type: String): Int
clientPortalCompanies(clientPortalId: String!): [ClientPortalCompany]
`;
const userParams = `
clientPortalId: String
phone: String,
email: String,
username: String,
password: String,
secondaryPassword: String,
companyName: String
companyRegistrationNumber: String
erxesCompanyId: String
firstName: String,
lastName: String,
code: String,
ownerId: String,
links: JSON,
customFieldsData: JSON,
type: String,
avatar: String
`;
export const mutations = () => `
clientPortalUsersInvite(${userParams}, disableVerificationMail: Boolean): ClientPortalUser
clientPortalUsersEdit(_id: String!, ${userParams}): ClientPortalUser
clientPortalUsersRemove(clientPortalUserIds: [String!]): JSON
clientPortalRegister(${userParams}): String
clientPortalVerifyOTP(userId: String!, phoneOtp: String, emailOtp: String, password: String): JSON
clientPortalUsersVerify(userIds: [String]!, type: String): JSON
clientPortalLogin(login: String!, password: String!, clientPortalId: String!, deviceToken: String,twoFactor: TwoFactor): JSON
clientPortalLoginWithPhone(phone: String!, clientPortalId: String!, deviceToken: String): JSON
clientPortal2FAGetCode(byPhone: Boolean,byEmail:Boolean): JSON
clientPortal2FADeleteKey(key:String!): JSON
clientPortalVerify2FA(phoneOtp: String, emailOtp: String,twoFactor:TwoFactor): JSON
clientPortalLoginWithMailOTP(email: String!, clientPortalId: String!, deviceToken: String): JSON
clientPortalLoginWithSocialPay(clientPortalId: String!, token: String!) : JSON
clientPortalRefreshToken: String
clientPortalGoogleAuthentication(clientPortalId: String!, code: String!): JSON
clientPortalFacebookAuthentication(accessToken: String!, clientPortalId: String!): JSON
clientPortalLogout: String
clientPortalUsersReplacePhone(clientPortalId: String!, phone: String!): String!
clientPortalUsersVerifyPhone(code: String!): String!
clientPortalUserAssignCompany(userId: String!, erxesCompanyId: String!, erxesCustomerId: String!): JSON
clientPortalConfirmInvitation(token: String, password: String, passwordConfirmation: String, username: String): ClientPortalUser
clientPortalForgotPassword(clientPortalId: String!, email: String, phone: String): String!
clientPortalResetPasswordWithCode(phone: String!, code: String!, password: String!,isSecondary:Boolean): String
clientPortalResetPassword(token: String!, newPassword: String!): JSON
clientPortalUserChangePassword(currentPassword: String!, newPassword: String!): ClientPortalUser
clientPortalUsersSendVerificationRequest(login: String!, password: String!, clientPortalId: String!, attachments: [AttachmentInput]!, description: String): String
clientPortalUsersChangeVerificationStatus(userId: String!, status: ClientPortalUserVerificationStatus!): String
clientPortalUpdateUser(_id: String!, doc: ClientPortalUserUpdate!): JSON
clientPortalUserSetSecondaryPassword(newPassword: String!, oldPassword:String): String
`;
``` | /content/code_sandbox/packages/plugin-clientportal-api/src/graphql/schema/clientPortalUser.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 1,504 |
```xml
export * from './policy-names';
export * from './route-names';
``` | /content/code_sandbox/npm/ng-packs/packages/identity/config/src/enums/index.ts | xml | 2016-12-03T22:56:24 | 2024-08-16T16:24:05 | abp | abpframework/abp | 12,657 | 15 |
```xml
import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Inject } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { I18NService } from '@core';
import { _HttpClient, ALAIN_I18N_TOKEN, SettingsService } from '@delon/theme';
import { format, addDays } from 'date-fns';
import { NzSafeAny } from 'ng-zorro-antd/core/types';
import { NzMessageService } from 'ng-zorro-antd/message';
import { NzModalRef, NzModalService } from 'ng-zorro-antd/modal';
import { NzTableQueryParams } from 'ng-zorro-antd/table';
import { RolesService } from '../../../service/roles.service';
import { set2String } from '../../../shared/index';
import { PermissionRoleComponent } from './permission-role/permission-role.component';
import { RoleEditerComponent } from './role-editer/role-editer.component';
@Component({
selector: 'app-roles',
templateUrl: './roles.component.html',
styleUrls: ['./roles.component.less']
})
export class RolesComponent implements OnInit {
query: {
params: {
appId: String;
appName: String;
roleName: String;
displayName: String;
employeeNumber: String;
startDate: String;
endDate: String;
startDatePicker: Date;
endDatePicker: Date;
pageSize: number;
pageNumber: number;
pageSizeOptions: number[];
};
results: {
records: number;
rows: NzSafeAny[];
};
expandForm: Boolean;
submitLoading: boolean;
tableLoading: boolean;
tableCheckedId: Set<String>;
indeterminate: boolean;
checked: boolean;
} = {
params: {
appId: '',
appName: '',
roleName: '',
displayName: '',
employeeNumber: '',
startDate: '',
endDate: '',
startDatePicker: addDays(new Date(), -30),
endDatePicker: new Date(),
pageSize: 10,
pageNumber: 1,
pageSizeOptions: [10, 20, 50]
},
results: {
records: 0,
rows: []
},
expandForm: false,
submitLoading: false,
tableLoading: false,
tableCheckedId: new Set<String>(),
indeterminate: false,
checked: false
};
constructor(
private modalService: NzModalService,
private viewContainerRef: ViewContainerRef,
private rolesService: RolesService,
private fb: FormBuilder,
private msg: NzMessageService,
@Inject(ALAIN_I18N_TOKEN) private i18n: I18NService,
private router: Router,
private route: ActivatedRoute,
private cdr: ChangeDetectorRef
) {}
ngOnInit(): void {
if (this.route.snapshot.queryParams['appId']) {
this.query.params.appId = this.route.snapshot.queryParams['appId'];
this.query.params.appName = this.route.snapshot.queryParams['appName'];
this.fetch();
}
}
onQueryParamsChange(tableQueryParams: NzTableQueryParams): void {
this.query.params.pageNumber = tableQueryParams.pageIndex;
this.query.params.pageSize = tableQueryParams.pageSize;
this.fetch();
}
onSearch(): void {
this.fetch();
}
onReset(): void {}
onBatchDelete(): void {
this.rolesService.delete(set2String(this.query.tableCheckedId)).subscribe(res => {
if (res.code == 0) {
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
this.fetch();
} else {
this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
}
this.cdr.detectChanges();
});
}
onAdd(e: MouseEvent): void {
e.preventDefault();
const modal = this.modalService.create({
nzContent: RoleEditerComponent,
nzViewContainerRef: this.viewContainerRef,
nzComponentParams: {
isEdit: false,
id: '',
appId: this.query.params.appId,
appName: this.query.params.appName
},
nzOnOk: () => new Promise(resolve => setTimeout(resolve, 1000))
});
// Return a result when closed
modal.afterClose.subscribe(result => {
if (result.refresh) {
this.fetch();
}
});
}
onMembers(e: MouseEvent, roleId: String, roleName: String): void {
this.router.navigateByUrl(`/permissions/apps/rolemembers?appId=${this.query.params.appId}&roleId=${roleId}&roleName=${roleName}`);
}
onEdit(e: MouseEvent, editiId: String): void {
e.preventDefault();
const modal = this.modalService.create({
nzContent: RoleEditerComponent,
nzViewContainerRef: this.viewContainerRef,
nzComponentParams: {
isEdit: true,
id: editiId
},
nzOnOk: () => new Promise(resolve => setTimeout(resolve, 1000))
});
// Return a result when closed
modal.afterClose.subscribe(result => {
if (result.refresh) {
this.fetch();
}
});
}
onPermissions(e: MouseEvent, roleId: String, roleName: String): void {
e.preventDefault();
const modal = this.modalService.create({
nzContent: PermissionRoleComponent,
nzViewContainerRef: this.viewContainerRef,
nzComponentParams: {
roleId: roleId,
roleName: roleName,
appId: this.query.params.appId,
appName: this.query.params.appName
},
nzOnOk: () => new Promise(resolve => setTimeout(resolve, 1000))
});
// Return a result when closed
modal.afterClose.subscribe(result => {
if (result.refresh) {
}
});
}
onDelete(deleteId: String): void {
this.rolesService.delete(deleteId).subscribe(res => {
if (res.code == 0) {
this.msg.success(this.i18n.fanyi('mxk.alert.delete.success'));
this.fetch();
} else {
this.msg.error(this.i18n.fanyi('mxk.alert.delete.error'));
}
this.cdr.detectChanges();
});
}
fetch(): void {
this.query.submitLoading = true;
this.query.tableLoading = true;
this.query.indeterminate = false;
this.query.checked = false;
this.query.tableCheckedId.clear();
if (this.query.expandForm) {
this.query.params.endDate = format(this.query.params.endDatePicker, 'yyyy-MM-dd HH:mm:ss');
this.query.params.startDate = format(this.query.params.startDatePicker, 'yyyy-MM-dd HH:mm:ss');
} else {
this.query.params.endDate = '';
this.query.params.startDate = '';
}
this.rolesService.fetch(this.query.params).subscribe(res => {
this.query.results = res.data;
this.query.submitLoading = false;
this.query.tableLoading = false;
this.cdr.detectChanges();
});
}
updateTableCheckedSet(id: String, checked: boolean): void {
if (checked) {
this.query.tableCheckedId.add(id);
} else {
this.query.tableCheckedId.delete(id);
}
}
refreshTableCheckedStatus(): void {
const listOfEnabledData = this.query.results.rows.filter(({ disabled }) => !disabled);
this.query.checked = listOfEnabledData.every(({ id }) => this.query.tableCheckedId.has(id));
this.query.indeterminate = listOfEnabledData.some(({ id }) => this.query.tableCheckedId.has(id)) && !this.query.checked;
}
onTableItemChecked(id: String, checked: boolean): void {
this.updateTableCheckedSet(id, checked);
this.refreshTableCheckedStatus();
}
onTableAllChecked(checked: boolean): void {
this.query.results.rows.filter(({ disabled }) => !disabled).forEach(({ id }) => this.updateTableCheckedSet(id, checked));
this.refreshTableCheckedStatus();
}
}
``` | /content/code_sandbox/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/roles/roles.component.ts | xml | 2016-11-16T03:06:50 | 2024-08-16T09:22:42 | MaxKey | dromara/MaxKey | 1,423 | 1,708 |
```xml
import * as fabricAsyncLoader from './fabricAsyncLoader';
export { fabricAsyncLoader };
``` | /content/code_sandbox/packages/webpack-utilities/src/index.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 19 |
```xml
import comment from './comments';
import emojis from './emojis';
export default { ...comment, ...emojis };
``` | /content/code_sandbox/packages/plugin-reactions-api/src/graphql/resolvers/mutations/index.ts | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 24 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!--
path_to_url
Unless required by applicable law or agreed to in writing, software
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<selector xmlns:android="path_to_url">
<item android:alpha="0.24" android:color="?attr/colorPrimary" android:state_enabled="true"/>
<item android:color="@android:color/transparent"/>
</selector>
``` | /content/code_sandbox/lib/java/com/google/android/material/slider/res/color/material_slider_halo_color.xml | xml | 2016-12-05T16:11:29 | 2024-08-16T17:51:42 | material-components-android | material-components/material-components-android | 16,176 | 104 |
```xml
import type { KeyboardEvent, MutableRefObject } from 'react';
import { useEffect, useMemo, useRef, useState } from 'react';
import { normalize } from '@proton/shared/lib/helpers/string';
import clsx from '@proton/utils/clsx';
import type { DropdownProps } from '../dropdown/Dropdown';
import Dropdown from '../dropdown/Dropdown';
import { DropdownSizeUnit } from '../dropdown/utils';
import Option from '../option/Option';
import type { PopperPlacement } from '../popper';
import SelectButton from './SelectButton';
import { SelectDisplayValue } from './SelectDisplayValue';
import SelectOptions from './SelectOptions';
import type { SelectProps } from './select';
import useSelect, { SelectProvider } from './useSelect';
export interface Props<V> extends SelectProps<V> {
/**
* Optionally allows to remove the border around the select. Use for example in inputs
*/
unstyled?: boolean;
/**
* Milliseconds after which to clear the current user input
* (the input is used for highlighting match based on keyboard input)
*/
clearSearchAfter?: number;
/**
* In case you're providing complex values to your options, you can
* provide a function to return a string given one of your complex
* value items. This is optional however if you do not provide it and
* your values are complex, the search feature will be disabled for
* that instance of the Select.
*/
size?: DropdownProps['size'];
originalPlacement?: PopperPlacement;
anchorRef?: MutableRefObject<HTMLButtonElement | null>;
getSearchableValue?: (value: V) => string;
placeholder?: string;
/**
* Hides caret at the right of the input
* suggesting user to click on the input to display the dropdown
* example of usage: when there's only one option
*/
noDropdownCaret?: boolean;
dropdownClassName?: string;
}
const defaultSize = { width: DropdownSizeUnit.Anchor, maxWidth: DropdownSizeUnit.Viewport } as const;
const SelectTwo = <V extends any>({
multiple = false,
unstyled,
children,
value,
placeholder,
isOpen: controlledOpen,
clearSearchAfter = 500,
size = defaultSize,
originalPlacement,
loading,
anchorRef: maybeAnchorRef,
onClose,
onOpen,
onChange,
onValue,
getSearchableValue,
renderSelected,
noDropdownCaret,
caretIconName,
caretClassName,
dropdownClassName,
...rest
}: Props<V>) => {
const anchorRef = useRef<HTMLButtonElement | null>(null);
const [search, setSearch] = useState('');
const searchClearTimeout = useRef<number | undefined>(undefined);
const optionChildren = children.filter((child) => child.type === Option);
const optionValues = optionChildren.map((child) => child.props.value);
const select = useSelect({
isOpen: controlledOpen,
multiple,
value,
options: optionValues,
onChange,
onValue,
onOpen,
onClose,
});
const { isOpen, selectedIndexes, autoclose, open, close, setFocusedIndex, handleChange } = select;
/*
* Natural search-ability determined by whether or not all option values
* from the passed children are strings, there's also "unnatural" search-
* ability if the prop "getSearchableValue" is passed
*
* Another valid condition for the natural search-ability of the options
* is whether or not they all have a "title" attribute
*/
const [allOptionChildrenAreStrings, allOptionsHaveTitles] = useMemo(
() => [
optionChildren.every((child) => typeof child.props.children === 'string'),
optionChildren.every((child) => Boolean(child.props.title)),
],
[optionChildren]
);
const isNaturallySearchable = allOptionChildrenAreStrings || allOptionsHaveTitles;
const isSearchable = isNaturallySearchable || Boolean(getSearchableValue);
const searchableItems = useMemo(() => {
if (isNaturallySearchable) {
return allOptionChildrenAreStrings
? (optionChildren.map((child) => child.props.children) as string[])
: optionChildren.map((child) => child.props.title);
}
if (getSearchableValue) {
return optionValues.map(getSearchableValue);
}
return [];
}, [allOptionChildrenAreStrings, children]);
useEffect(() => {
if (!search || !isSearchable) {
return;
}
window.clearTimeout(searchClearTimeout.current);
searchClearTimeout.current = window.setTimeout(() => {
setSearch('');
}, clearSearchAfter);
const normalizedSearch = normalize(search);
const indexOfMatchedOption = searchableItems.findIndex((v) => normalize(v).startsWith(normalizedSearch));
if (indexOfMatchedOption !== -1) {
if (isOpen) {
setFocusedIndex(indexOfMatchedOption);
} else {
const matchedValue = optionValues[indexOfMatchedOption];
onChange?.({
value: matchedValue,
selectedIndex: indexOfMatchedOption,
});
onValue?.(matchedValue);
}
}
}, [search]);
const handleAnchorClick = () => {
if (isOpen) {
close();
} else {
open();
}
};
const handleKeydown = (e: KeyboardEvent<HTMLElement>) => {
const { key } = e;
if (key === 'Escape') {
close();
anchorRef.current?.focus();
return;
}
if (key === ' ') {
open();
return;
}
const isAlphanumeric = /^[A-Za-z0-9]$/.test(key);
if (isAlphanumeric && isSearchable) {
setSearch((s) => s + key);
}
};
const selectedChildren = (selectedIndexes ?? []).map((i) => optionChildren[i]);
const ariaLabel = selectedChildren?.map((child) => child.props.title).join(', ');
const allowOptionToggling = multiple && optionChildren.length > 1;
return (
<SelectProvider {...select}>
<SelectButton
unstyled={unstyled}
isOpen={isOpen}
onOpen={open}
onClick={handleAnchorClick}
onKeyDown={handleKeydown}
noCaret={noDropdownCaret}
caretIconName={caretIconName}
caretClassName={caretClassName}
aria-label={ariaLabel}
ref={anchorRef}
{...rest}
>
{renderSelected?.(value) ?? (
<SelectDisplayValue selectedChildren={selectedChildren} placeholder={placeholder} />
)}
</SelectButton>
<Dropdown
isOpen={isOpen}
anchorRef={maybeAnchorRef || anchorRef}
onClose={close}
autoClose={autoclose}
offset={4}
noCaret
size={size}
originalPlacement={originalPlacement}
disableDefaultArrowNavigation
className={clsx([
'select-dropdown',
dropdownClassName,
allowOptionToggling && 'select-dropdown--togglable',
])}
>
<SelectOptions selected={selectedIndexes} onKeyDown={handleKeydown} onChange={handleChange}>
{children}
</SelectOptions>
</Dropdown>
</SelectProvider>
);
};
export default SelectTwo;
``` | /content/code_sandbox/packages/components/components/selectTwo/SelectTwo.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 1,582 |
```xml
<?xml version="1.0"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{7FD42DF7-442E-479A-BA76-D0022F99702A}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Zooid_Keyframe</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\libs\openFrameworksCompiled\project\vs\openFrameworksRelease.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\libs\openFrameworksCompiled\project\vs\openFrameworksRelease.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\libs\openFrameworksCompiled\project\vs\openFrameworksDebug.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\..\..\libs\openFrameworksCompiled\project\vs\openFrameworksDebug.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>bin\</OutDir>
<IntDir>obj\$(Configuration)\</IntDir>
<TargetName>$(ProjectName)_debug</TargetName>
<LinkIncremental>true</LinkIncremental>
<GenerateManifest>true</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>bin\</OutDir>
<IntDir>obj\$(Configuration)\</IntDir>
<TargetName>$(ProjectName)_debug</TargetName>
<LinkIncremental>true</LinkIncremental>
<GenerateManifest>true</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>bin\</OutDir>
<IntDir>obj\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>bin\</OutDir>
<IntDir>obj\$(Configuration)\</IntDir>
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);src;..\..\..\addons\ofxNetwork\src</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<Optimization>Disabled</Optimization>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);src;..\..\..\addons\ofxNetwork\src</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);src;..\..\..\addons\ofxNetwork\src</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WholeProgramOptimization>false</WholeProgramOptimization>
<PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);src;..\..\..\addons\ofxNetwork\src</AdditionalIncludeDirectories>
<CompileAs>CompileAsCpp</CompileAs>
</ClCompile>
<Link>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateDebugInformation>false</GenerateDebugInformation>
<SubSystem>Console</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<RandomizedBaseAddress>false</RandomizedBaseAddress>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
<PostBuildEvent />
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\main.cpp" />
<ClCompile Include="src\ofApp.cpp" />
<ClCompile Include="src\.DS_Store" />
<ClCompile Include="src\ZooidManager.cpp" />
<ClCompile Include="..\..\..\addons\ofxNetwork\src\ofxTCPClient.cpp" />
<ClCompile Include="..\..\..\addons\ofxNetwork\src\ofxTCPManager.cpp" />
<ClCompile Include="..\..\..\addons\ofxNetwork\src\ofxTCPServer.cpp" />
<ClCompile Include="..\..\..\addons\ofxNetwork\src\ofxUDPManager.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\ofApp.h" />
<ClInclude Include="src\ZooidManager.h" />
<ClInclude Include="..\..\..\addons\ofxNetwork\src\ofxNetwork.h" />
<ClInclude Include="..\..\..\addons\ofxNetwork\src\ofxNetworkUtils.h" />
<ClInclude Include="..\..\..\addons\ofxNetwork\src\ofxTCPClient.h" />
<ClInclude Include="..\..\..\addons\ofxNetwork\src\ofxTCPManager.h" />
<ClInclude Include="..\..\..\addons\ofxNetwork\src\ofxTCPServer.h" />
<ClInclude Include="..\..\..\addons\ofxNetwork\src\ofxUDPManager.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="$(OF_ROOT)\libs\openFrameworksCompiled\project\vs\openframeworksLib.vcxproj">
<Project>{5837595d-aca9-485c-8e76-729040ce4b0b}</Project>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="icon.rc">
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">/D_DEBUG %(AdditionalOptions)</AdditionalOptions>
<AdditionalIncludeDirectories>$(OF_ROOT)\libs\openFrameworksCompiled\project\vs</AdditionalIncludeDirectories>
</ResourceCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ProjectExtensions>
<VisualStudio>
<UserProperties RESOURCE_FILE="icon.rc" />
</VisualStudio>
</ProjectExtensions>
</Project>
``` | /content/code_sandbox/Software/Applications/Examples/Zooid_Keyframe/Zooid_Keyframe.vcxproj | xml | 2016-07-20T23:21:47 | 2024-08-12T19:58:09 | SwarmUI | ShapeLab/SwarmUI | 1,525 | 2,842 |
```xml
import * as React from 'react';
import * as _ from 'lodash';
import {
createComponent,
ComponentSlotStylesInput,
ThemePrepared,
Grid,
Header,
HeaderProps,
ShorthandCollection,
} from '@fluentui/react-northstar';
import ColorBox from './ColorBox';
type ColorVariantsProps = {
name?: string;
themes?: ThemePrepared[];
headers?: ShorthandCollection<HeaderProps>;
};
export const colorVariantsStyles: ComponentSlotStylesInput<ColorVariantsProps> = {
root: {
border: '1px solid transparent',
borderRadius: '.25rem',
overflow: 'hidden',
},
};
const ColorSchemes = createComponent<ColorVariantsProps>({
displayName: 'ColorVariants',
render: ({ name, themes, headers, config: { classes } }) => {
if (themes.length === 0) return <></>;
const colorSchemes = _.map(themes, theme => theme.siteVariables.colorScheme[name]);
const elements = _.flatMap(_.head(colorSchemes), (i, token) => [
<ColorBox
copyToClipboardIcon={false}
showColorValue={false}
name={token}
key={`${token}schema`}
size="small"
value={undefined}
styles={{ backgroundColor: '#f2f2f2' }}
/>,
..._.map(colorSchemes, (colorScheme, i) => (
<ColorBox key={`${token}${i}`} size="small" value={colorScheme[token]} copyToClipboardIcon={false} />
)),
]);
const columns = `auto ${_.times(themes.length, () => '180px').join(' ')}`;
return (
<div className={classes.root}>
<Grid columns={columns}>
{headers && headers.map(header => Header.create(header))}
{elements}
</Grid>
</div>
);
},
});
export default ColorSchemes;
``` | /content/code_sandbox/packages/fluentui/docs/src/components/ColorSchemes.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 417 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorPrimary"
android:orientation="vertical"
android:weightSum="1">
<TextView
android:id="@+id/textView5"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_marginTop="@dimen/toolbar_logo_height"
android:layout_weight=".1"
android:gravity="center"
android:text="@string/slide_1_title"
android:textColor="@android:color/white"
android:textSize="@dimen/text_size_moderate"
android:textStyle="normal" />
<ImageView
android:id="@+id/connect_jmi"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".7"
android:src="@drawable/intro1" />
<TextView
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight=".2"
android:gravity="center_horizontal"
android:paddingLeft="@dimen/padding_moderate"
android:paddingRight="@dimen/padding_moderate"
android:text="@string/slide_1_desc"
android:textColor="@android:color/white"
android:textSize="@dimen/text_size_normal"
android:textStyle="normal" />
</LinearLayout>
``` | /content/code_sandbox/app/src/main/res/layout/welcome_slide1.xml | xml | 2016-09-21T08:56:16 | 2024-08-06T13:58:15 | susi_android | fossasia/susi_android | 2,419 | 332 |
```xml
import { Column, Entity, PrimaryGeneratedColumn } from "../../../../src"
export enum EnumStatus {
DRAFT = "draft",
PUBLISHED = "published",
}
@Entity("module-foo_table_x")
export class Foo {
@PrimaryGeneratedColumn({ name: "id" })
id: number
@Column({ type: "enum", enum: EnumStatus, default: EnumStatus.DRAFT })
enumStatus: Date
}
``` | /content/code_sandbox/test/github-issues/9684/entity/Foo.ts | xml | 2016-02-29T07:41:14 | 2024-08-16T18:28:52 | typeorm | typeorm/typeorm | 33,875 | 93 |
```xml
import { CommonModule } from '@angular/common';
import { NgModule } from '@angular/core';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { InputTextModule } from 'primeng/inputtext';
import { KeyFilterModule } from 'primeng/keyfilter';
import { AppDocModule } from '@layout/doc/app.doc.module';
import { AppCodeModule } from '@layout/doc/app.code.component';
import { AccessibilityDoc } from './accessibilitydoc';
import { BasicDoc } from './basicdoc';
import { DisabledDoc } from './disableddoc';
import { FloatLabelDoc } from './floatlabeldoc';
import { HelpTextDoc } from './helptextdoc';
import { IconsDoc } from './iconsdoc';
import { ImportDoc } from './importdoc';
import { InvalidDoc } from './invaliddoc';
import { KeyFilterDoc } from './keyfilterdoc';
import { ReactiveFormsDoc } from './reactiveformsdoc';
import { SizesDoc } from './sizesdoc';
import { StyleDoc } from './styledoc';
import { FloatLabelModule } from 'primeng/floatlabel';
import { FilledDoc } from './filleddoc';
@NgModule({
imports: [CommonModule, AppCodeModule, InputTextModule, FormsModule, ReactiveFormsModule, AppDocModule, KeyFilterModule, FloatLabelModule],
declarations: [BasicDoc, DisabledDoc, FloatLabelDoc, HelpTextDoc, IconsDoc, InvalidDoc, KeyFilterDoc, SizesDoc, ImportDoc, StyleDoc, AccessibilityDoc, ReactiveFormsDoc, FilledDoc],
exports: [AppDocModule]
})
export class InputtextDocModule {}
``` | /content/code_sandbox/src/app/showcase/doc/inputtext/inputtextdoc.module.ts | xml | 2016-01-16T09:23:28 | 2024-08-16T19:58:20 | primeng | primefaces/primeng | 9,969 | 342 |
```xml
import * as _ from 'lodash';
import * as moment from 'moment';
import { date } from 'faker';
const getNowDate = (): Date => new Date();
const areMomentsSameDay = (m: moment.Moment, d: Date = getNowDate()) => m.isSame(d, 'day');
export const getRandomDates = (count, daysAgo: number): Date[] => {
const now = getNowDate();
const midnight = new Date(now);
midnight.setHours(0);
const yesterdayMidnight = new Date(midnight);
yesterdayMidnight.setDate(yesterdayMidnight.getDate() - 1);
return [
date.between(now, midnight),
date.between(midnight, yesterdayMidnight),
date.between(midnight, yesterdayMidnight),
..._.times(count - 3).map(() => date.recent(daysAgo)),
].slice(0, count);
};
export const getTimestamp = (inputDate: Date): { short: string; long: string } => {
const dateMoment = moment(inputDate);
const timeString = dateMoment.format('LT');
return {
short: `${areMomentsSameDay(dateMoment) ? '' : `${dateMoment.format('M/D')} `}${timeString}`,
long: `${dateMoment.format('ll')} ${timeString}`,
};
};
export const getFriendlyDateString = (inputDate: Date): string => {
const momentNow = moment();
if (areMomentsSameDay(momentNow, inputDate)) {
return 'Today';
}
if (areMomentsSameDay(momentNow.subtract(1, 'd'), inputDate)) {
return 'Yesterday';
}
return moment(inputDate).format('LL');
};
export const areSameDay = (d1: Date, d2: Date): boolean => areMomentsSameDay(moment(d1), d2);
``` | /content/code_sandbox/packages/fluentui/react-northstar-prototypes/src/prototypes/chatPane/services/dateUtils.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 396 |
```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
-->
<!DOCTYPE suite SYSTEM "path_to_url" >
<suite name="Pulsar Auth Integration Tests" verbose="2" annotations="JDK">
<test name="pulsar-auth-test-suite" preserve-order="true" >
<classes>
</classes>
</test>
</suite>
``` | /content/code_sandbox/tests/integration/src/test/resources/pulsar-auth.xml | xml | 2016-06-28T07:00:03 | 2024-08-16T17:12:43 | pulsar | apache/pulsar | 14,047 | 140 |
```xml
import { Node, Schema } from "prosemirror-model";
import headingToSlug from "../editor/lib/headingToSlug";
import textBetween from "../editor/lib/textBetween";
import { ProsemirrorData } from "../types";
export type Heading = {
/* The heading in plain text */
title: string;
/* The level of the heading */
level: number;
/* The unique id of the heading */
id: string;
};
export type CommentMark = {
/* The unique id of the comment */
id: string;
/* The id of the user who created the comment */
userId: string;
/* The text of the comment */
text: string;
};
export type Task = {
/* The text of the task */
text: string;
/* Whether the task is completed or not */
completed: boolean;
};
export const attachmentRedirectRegex =
/\/api\/attachments\.redirect\?id=(?<id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/gi;
export const attachmentPublicRegex =
/public\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\/(?<id>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/gi;
export class ProsemirrorHelper {
/**
* Get a new empty document.
*
* @returns A new empty document as JSON.
*/
static getEmptyDocument(): ProsemirrorData {
return {
type: "doc",
content: [
{
content: [],
type: "paragraph",
},
],
};
}
/**
* Returns true if the data looks like an empty document.
*
* @param data The ProsemirrorData to check.
* @returns True if the document is empty.
*/
static isEmptyData(data: ProsemirrorData): boolean {
if (data.type !== "doc") {
return false;
}
if (data.content.length === 1) {
const node = data.content[0];
return (
node.type === "paragraph" &&
(node.content === null ||
node.content === undefined ||
node.content.length === 0)
);
}
return data.content.length === 0;
}
/**
* Returns the node as plain text.
*
* @param node The node to convert.
* @param schema The schema to use.
* @returns The document content as plain text without formatting.
*/
static toPlainText(root: Node, schema: Schema) {
const textSerializers = Object.fromEntries(
Object.entries(schema.nodes)
.filter(([, node]) => node.spec.toPlainText)
.map(([name, node]) => [name, node.spec.toPlainText])
);
return textBetween(root, 0, root.content.size, textSerializers);
}
/**
* Removes any empty paragraphs from the beginning and end of the document.
*
* @returns True if the editor is empty
*/
static trim(doc: Node) {
const { schema } = doc.type;
let index = 0,
start = 0,
end = doc.nodeSize - 2,
isEmpty;
if (doc.childCount <= 1) {
return doc;
}
isEmpty = true;
while (isEmpty) {
const node = doc.maybeChild(index++);
if (!node) {
break;
}
isEmpty = ProsemirrorHelper.toPlainText(node, schema).trim() === "";
if (isEmpty) {
start += node.nodeSize;
}
}
index = doc.childCount - 1;
isEmpty = true;
while (isEmpty) {
const node = doc.maybeChild(index--);
if (!node) {
break;
}
isEmpty = ProsemirrorHelper.toPlainText(node, schema).trim() === "";
if (isEmpty) {
end -= node.nodeSize;
}
}
return doc.cut(start, end);
}
/**
* Returns true if the trimmed content of the passed document is an empty string.
*
* @returns True if the editor is empty
*/
static isEmpty(doc: Node, schema?: Schema) {
if (!schema) {
return !doc || doc.textContent.trim() === "";
}
const textSerializers = Object.fromEntries(
Object.entries(schema.nodes)
.filter(([, node]) => node.spec.toPlainText)
.map(([name, node]) => [name, node.spec.toPlainText])
);
let empty = true;
doc.descendants((child: Node) => {
// If we've already found non-empty data, we can stop descending further
if (!empty) {
return false;
}
const toPlainText = textSerializers[child.type.name];
if (toPlainText) {
empty = !toPlainText(child).trim();
} else if (child.isText) {
empty = !child.text?.trim();
}
return empty;
});
return empty;
}
/**
* Iterates through the document to find all of the comments that exist as marks.
*
* @param doc Prosemirror document node
* @returns Array<CommentMark>
*/
static getComments(doc: Node): CommentMark[] {
const comments: CommentMark[] = [];
doc.descendants((node) => {
node.marks.forEach((mark) => {
if (mark.type.name === "comment") {
comments.push({
...mark.attrs,
text: node.textContent,
} as CommentMark);
}
});
return true;
});
return comments;
}
/**
* Iterates through the document to find all of the images.
*
* @param doc Prosemirror document node
* @returns Array<Node> of images
*/
static getImages(doc: Node): Node[] {
const images: Node[] = [];
doc.descendants((node) => {
if (node.type.name === "image") {
images.push(node);
}
return true;
});
return images;
}
/**
* Iterates through the document to find all of the tasks and their completion state.
*
* @param doc Prosemirror document node
* @returns Array<Task>
*/
static getTasks(doc: Node): Task[] {
const tasks: Task[] = [];
doc.descendants((node) => {
if (!node.isBlock) {
return false;
}
if (node.type.name === "checkbox_list") {
node.content.forEach((listItem) => {
let text = "";
listItem.forEach((contentNode) => {
if (contentNode.type.name === "paragraph") {
text += contentNode.textContent;
}
});
tasks.push({
text,
completed: listItem.attrs.checked,
});
});
}
return true;
});
return tasks;
}
/**
* Returns a summary of total and completed tasks in the node.
*
* @param doc Prosemirror document node
* @returns Object with completed and total keys
*/
static getTasksSummary(doc: Node): { completed: number; total: number } {
const tasks = ProsemirrorHelper.getTasks(doc);
return {
completed: tasks.filter((t) => t.completed).length,
total: tasks.length,
};
}
/**
* Iterates through the document to find all of the headings and their level.
*
* @param doc Prosemirror document node
* @returns Array<Heading>
*/
static getHeadings(doc: Node) {
const headings: Heading[] = [];
const previouslySeen = {};
doc.forEach((node) => {
if (node.type.name === "heading") {
// calculate the optimal id
const id = headingToSlug(node);
let name = id;
// check if we've already used it, and if so how many times?
// Make the new id based on that number ensuring that we have
// unique ID's even when headings are identical
if (previouslySeen[id] > 0) {
name = headingToSlug(node, previouslySeen[id]);
}
// record that we've seen this id for the next loop
previouslySeen[id] =
previouslySeen[id] !== undefined ? previouslySeen[id] + 1 : 1;
headings.push({
title: node.textContent,
level: node.attrs.level,
id: name,
});
}
});
return headings;
}
}
``` | /content/code_sandbox/shared/utils/ProsemirrorHelper.ts | xml | 2016-05-22T21:31:47 | 2024-08-16T19:57:22 | outline | outline/outline | 26,751 | 1,919 |
```xml
export * from './BleDevice/BleDevice'
``` | /content/code_sandbox/example/src/components/molecules/index.ts | xml | 2016-07-27T10:57:27 | 2024-08-14T16:51:53 | react-native-ble-plx | dotintent/react-native-ble-plx | 3,006 | 12 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<!--
~
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<selector xmlns:android="path_to_url">
<item android:color="@android:color/system_neutral2_600" android:lStar="22"/>
</selector>
``` | /content/code_sandbox/lib/java/com/google/android/material/color/res/color-v31/m3_ref_palette_dynamic_neutral_variant22.xml | xml | 2016-12-05T16:11:29 | 2024-08-16T17:51:42 | material-components-android | material-components/material-components-android | 16,176 | 99 |
```xml
import clsx from '@proton/utils/clsx';
import './InputFieldStackedGroup.scss';
const InputFieldStackedGroup = ({ children, classname }: { children: React.ReactNode; classname?: string }) => (
<div className={clsx('stacked-field-group', classname)}>{children}</div>
);
export default InputFieldStackedGroup;
``` | /content/code_sandbox/packages/components/components/inputFieldStacked/InputFieldStackedGroup.tsx | xml | 2016-06-08T11:16:51 | 2024-08-16T14:14:27 | WebClients | ProtonMail/WebClients | 4,300 | 75 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Application-->
<scene sceneID="JPo-4y-FX3">
<objects>
<application id="hnw-xV-0zn" sceneMemberID="viewController">
<menu key="mainMenu" title="Main Menu" systemMenu="main" id="AYu-sK-qS6">
<items>
<menuItem title="MyCocoaApp" id="1Xt-HY-uBw">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="MyCocoaApp" systemMenu="apple" id="uQy-DD-JDr">
<items>
<menuItem title="About MyCocoaApp" id="5kV-Vb-QxS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="Ady-hI-5gd" id="Exp-CZ-Vem"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="VOq-y0-SEH"/>
<menuItem title="Preferences" keyEquivalent="," id="BOF-NM-1cW"/>
<menuItem isSeparatorItem="YES" id="wFC-TO-SCJ"/>
<menuItem title="Services" id="NMo-om-nkz">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Services" systemMenu="services" id="hz9-B4-Xy5"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="4je-JR-u6R"/>
<menuItem title="Hide MyCocoaApp" keyEquivalent="h" id="Olw-nP-bQN">
<connections>
<action selector="hide:" target="Ady-hI-5gd" id="PnN-Uc-m68"/>
</connections>
</menuItem>
<menuItem title="Hide Others" keyEquivalent="h" id="Vdr-fp-XzO">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="hideOtherApplications:" target="Ady-hI-5gd" id="VT4-aY-XCT"/>
</connections>
</menuItem>
<menuItem title="Show All" id="Kd2-mp-pUS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unhideAllApplications:" target="Ady-hI-5gd" id="Dhg-Le-xox"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kCx-OE-vgT"/>
<menuItem title="Quit MyCocoaApp" keyEquivalent="q" id="4sb-4s-VLi">
<connections>
<action selector="terminate:" target="Ady-hI-5gd" id="Te7-pn-YzF"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="File" id="dMs-cI-mzQ">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="File" id="bib-Uj-vzu">
<items>
<menuItem title="New" keyEquivalent="n" id="Was-JA-tGl">
<connections>
<action selector="newDocument:" target="Ady-hI-5gd" id="4Si-XN-c54"/>
</connections>
</menuItem>
<menuItem title="Open" keyEquivalent="o" id="IAo-SY-fd9">
<connections>
<action selector="openDocument:" target="Ady-hI-5gd" id="bVn-NM-KNZ"/>
</connections>
</menuItem>
<menuItem title="Open Recent" id="tXI-mr-wws">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="oas-Oc-fiZ">
<items>
<menuItem title="Clear Menu" id="vNY-rz-j42">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="clearRecentDocuments:" target="Ady-hI-5gd" id="Daa-9d-B3U"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="m54-Is-iLE"/>
<menuItem title="Close" keyEquivalent="w" id="DVo-aG-piG">
<connections>
<action selector="performClose:" target="Ady-hI-5gd" id="HmO-Ls-i7Q"/>
</connections>
</menuItem>
<menuItem title="Save" keyEquivalent="s" id="pxx-59-PXV">
<connections>
<action selector="saveDocument:" target="Ady-hI-5gd" id="teZ-XB-qJY"/>
</connections>
</menuItem>
<menuItem title="Save As" keyEquivalent="S" id="Bw7-FT-i3A">
<connections>
<action selector="saveDocumentAs:" target="Ady-hI-5gd" id="mDf-zr-I0C"/>
</connections>
</menuItem>
<menuItem title="Revert to Saved" keyEquivalent="r" id="KaW-ft-85H">
<connections>
<action selector="revertDocumentToSaved:" target="Ady-hI-5gd" id="iJ3-Pv-kwq"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="aJh-i4-bef"/>
<menuItem title="Page Setup" keyEquivalent="P" id="qIS-W8-SiK">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="runPageLayout:" target="Ady-hI-5gd" id="Din-rz-gC5"/>
</connections>
</menuItem>
<menuItem title="Print" keyEquivalent="p" id="aTl-1u-JFS">
<connections>
<action selector="print:" target="Ady-hI-5gd" id="qaZ-4w-aoO"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Edit" id="5QF-Oa-p0T">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Edit" id="W48-6f-4Dl">
<items>
<menuItem title="Undo" keyEquivalent="z" id="dRJ-4n-Yzg">
<connections>
<action selector="undo:" target="Ady-hI-5gd" id="M6e-cu-g7V"/>
</connections>
</menuItem>
<menuItem title="Redo" keyEquivalent="Z" id="6dh-zS-Vam">
<connections>
<action selector="redo:" target="Ady-hI-5gd" id="oIA-Rs-6OD"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="WRV-NI-Exz"/>
<menuItem title="Cut" keyEquivalent="x" id="uRl-iY-unG">
<connections>
<action selector="cut:" target="Ady-hI-5gd" id="YJe-68-I9s"/>
</connections>
</menuItem>
<menuItem title="Copy" keyEquivalent="c" id="x3v-GG-iWU">
<connections>
<action selector="copy:" target="Ady-hI-5gd" id="G1f-GL-Joy"/>
</connections>
</menuItem>
<menuItem title="Paste" keyEquivalent="v" id="gVA-U4-sdL">
<connections>
<action selector="paste:" target="Ady-hI-5gd" id="UvS-8e-Qdg"/>
</connections>
</menuItem>
<menuItem title="Paste and Match Style" keyEquivalent="V" id="WeT-3V-zwk">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteAsPlainText:" target="Ady-hI-5gd" id="cEh-KX-wJQ"/>
</connections>
</menuItem>
<menuItem title="Delete" id="pa3-QI-u2k">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="delete:" target="Ady-hI-5gd" id="0Mk-Ml-PaM"/>
</connections>
</menuItem>
<menuItem title="Select All" keyEquivalent="a" id="Ruw-6m-B2m">
<connections>
<action selector="selectAll:" target="Ady-hI-5gd" id="VNm-Mi-diN"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="uyl-h8-XO2"/>
<menuItem title="Find" id="4EN-yA-p0u">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Find" id="1b7-l0-nxx">
<items>
<menuItem title="Find" tag="1" keyEquivalent="f" id="Xz5-n4-O0W">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="cD7-Qs-BN4"/>
</connections>
</menuItem>
<menuItem title="Find and Replace" tag="12" keyEquivalent="f" id="YEy-JH-Tfz">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="WD3-Gg-5AJ"/>
</connections>
</menuItem>
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="q09-fT-Sye">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="NDo-RZ-v9R"/>
</connections>
</menuItem>
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="OwM-mh-QMV">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="HOh-sY-3ay"/>
</connections>
</menuItem>
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="buJ-ug-pKt">
<connections>
<action selector="performFindPanelAction:" target="Ady-hI-5gd" id="U76-nv-p5D"/>
</connections>
</menuItem>
<menuItem title="Jump to Selection" keyEquivalent="j" id="S0p-oC-mLd">
<connections>
<action selector="centerSelectionInVisibleArea:" target="Ady-hI-5gd" id="IOG-6D-g5B"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Spelling and Grammar" id="Dv1-io-Yv7">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Spelling" id="3IN-sU-3Bg">
<items>
<menuItem title="Show Spelling and Grammar" keyEquivalent=":" id="HFo-cy-zxI">
<connections>
<action selector="showGuessPanel:" target="Ady-hI-5gd" id="vFj-Ks-hy3"/>
</connections>
</menuItem>
<menuItem title="Check Document Now" keyEquivalent=";" id="hz2-CU-CR7">
<connections>
<action selector="checkSpelling:" target="Ady-hI-5gd" id="fz7-VC-reM"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="bNw-od-mp5"/>
<menuItem title="Check Spelling While Typing" id="rbD-Rh-wIN">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleContinuousSpellChecking:" target="Ady-hI-5gd" id="7w6-Qz-0kB"/>
</connections>
</menuItem>
<menuItem title="Check Grammar With Spelling" id="mK6-2p-4JG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleGrammarChecking:" target="Ady-hI-5gd" id="muD-Qn-j4w"/>
</connections>
</menuItem>
<menuItem title="Correct Spelling Automatically" id="78Y-hA-62v">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticSpellingCorrection:" target="Ady-hI-5gd" id="2lM-Qi-WAP"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Substitutions" id="9ic-FL-obx">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Substitutions" id="FeM-D8-WVr">
<items>
<menuItem title="Show Substitutions" id="z6F-FW-3nz">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontSubstitutionsPanel:" target="Ady-hI-5gd" id="oku-mr-iSq"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="gPx-C9-uUO"/>
<menuItem title="Smart Copy/Paste" id="9yt-4B-nSM">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleSmartInsertDelete:" target="Ady-hI-5gd" id="3IJ-Se-DZD"/>
</connections>
</menuItem>
<menuItem title="Smart Quotes" id="hQb-2v-fYv">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticQuoteSubstitution:" target="Ady-hI-5gd" id="ptq-xd-QOA"/>
</connections>
</menuItem>
<menuItem title="Smart Dashes" id="rgM-f4-ycn">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticDashSubstitution:" target="Ady-hI-5gd" id="oCt-pO-9gS"/>
</connections>
</menuItem>
<menuItem title="Smart Links" id="cwL-P1-jid">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticLinkDetection:" target="Ady-hI-5gd" id="Gip-E3-Fov"/>
</connections>
</menuItem>
<menuItem title="Data Detectors" id="tRr-pd-1PS">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticDataDetection:" target="Ady-hI-5gd" id="R1I-Nq-Kbl"/>
</connections>
</menuItem>
<menuItem title="Text Replacement" id="HFQ-gK-NFA">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleAutomaticTextReplacement:" target="Ady-hI-5gd" id="DvP-Fe-Py6"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Transformations" id="2oI-Rn-ZJC">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Transformations" id="c8a-y6-VQd">
<items>
<menuItem title="Make Upper Case" id="vmV-6d-7jI">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="uppercaseWord:" target="Ady-hI-5gd" id="sPh-Tk-edu"/>
</connections>
</menuItem>
<menuItem title="Make Lower Case" id="d9M-CD-aMd">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowercaseWord:" target="Ady-hI-5gd" id="iUZ-b5-hil"/>
</connections>
</menuItem>
<menuItem title="Capitalize" id="UEZ-Bs-lqG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="capitalizeWord:" target="Ady-hI-5gd" id="26H-TL-nsh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Speech" id="xrE-MZ-jX0">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Speech" id="3rS-ZA-NoH">
<items>
<menuItem title="Start Speaking" id="Ynk-f8-cLZ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="startSpeaking:" target="Ady-hI-5gd" id="654-Ng-kyl"/>
</connections>
</menuItem>
<menuItem title="Stop Speaking" id="Oyz-dy-DGm">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="stopSpeaking:" target="Ady-hI-5gd" id="dX8-6p-jy9"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Format" id="jxT-CU-nIS">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Format" id="GEO-Iw-cKr">
<items>
<menuItem title="Font" id="Gi5-1S-RQB">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Font" systemMenu="font" id="aXa-aM-Jaq">
<items>
<menuItem title="Show Fonts" keyEquivalent="t" id="Q5e-8K-NDq">
<connections>
<action selector="orderFrontFontPanel:" target="YLy-65-1bz" id="WHr-nq-2xA"/>
</connections>
</menuItem>
<menuItem title="Bold" tag="2" keyEquivalent="b" id="GB9-OM-e27">
<connections>
<action selector="addFontTrait:" target="YLy-65-1bz" id="hqk-hr-sYV"/>
</connections>
</menuItem>
<menuItem title="Italic" tag="1" keyEquivalent="i" id="Vjx-xi-njq">
<connections>
<action selector="addFontTrait:" target="YLy-65-1bz" id="IHV-OB-c03"/>
</connections>
</menuItem>
<menuItem title="Underline" keyEquivalent="u" id="WRG-CD-K1S">
<connections>
<action selector="underline:" target="Ady-hI-5gd" id="FYS-2b-JAY"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="5gT-KC-WSO"/>
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="Ptp-SP-VEL">
<connections>
<action selector="modifyFont:" target="YLy-65-1bz" id="Uc7-di-UnL"/>
</connections>
</menuItem>
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="i1d-Er-qST">
<connections>
<action selector="modifyFont:" target="YLy-65-1bz" id="HcX-Lf-eNd"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="kx3-Dk-x3B"/>
<menuItem title="Kern" id="jBQ-r6-VK2">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Kern" id="tlD-Oa-oAM">
<items>
<menuItem title="Use Default" id="GUa-eO-cwY">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardKerning:" target="Ady-hI-5gd" id="6dk-9l-Ckg"/>
</connections>
</menuItem>
<menuItem title="Use None" id="cDB-IK-hbR">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffKerning:" target="Ady-hI-5gd" id="U8a-gz-Maa"/>
</connections>
</menuItem>
<menuItem title="Tighten" id="46P-cB-AYj">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="tightenKerning:" target="Ady-hI-5gd" id="hr7-Nz-8ro"/>
</connections>
</menuItem>
<menuItem title="Loosen" id="ogc-rX-tC1">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="loosenKerning:" target="Ady-hI-5gd" id="8i4-f9-FKE"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Ligatures" id="o6e-r0-MWq">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Ligatures" id="w0m-vy-SC9">
<items>
<menuItem title="Use Default" id="agt-UL-0e3">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardLigatures:" target="Ady-hI-5gd" id="7uR-wd-Dx6"/>
</connections>
</menuItem>
<menuItem title="Use None" id="J7y-lM-qPV">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffLigatures:" target="Ady-hI-5gd" id="iX2-gA-Ilz"/>
</connections>
</menuItem>
<menuItem title="Use All" id="xQD-1f-W4t">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useAllLigatures:" target="Ady-hI-5gd" id="KcB-kA-TuK"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Baseline" id="OaQ-X3-Vso">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Baseline" id="ijk-EB-dga">
<items>
<menuItem title="Use Default" id="3Om-Ey-2VK">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unscript:" target="Ady-hI-5gd" id="0vZ-95-Ywn"/>
</connections>
</menuItem>
<menuItem title="Superscript" id="Rqc-34-cIF">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="superscript:" target="Ady-hI-5gd" id="3qV-fo-wpU"/>
</connections>
</menuItem>
<menuItem title="Subscript" id="I0S-gh-46l">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="subscript:" target="Ady-hI-5gd" id="Q6W-4W-IGz"/>
</connections>
</menuItem>
<menuItem title="Raise" id="2h7-ER-AoG">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="raiseBaseline:" target="Ady-hI-5gd" id="4sk-31-7Q9"/>
</connections>
</menuItem>
<menuItem title="Lower" id="1tx-W0-xDw">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowerBaseline:" target="Ady-hI-5gd" id="OF1-bc-KW4"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="Ndw-q3-faq"/>
<menuItem title="Show Colors" keyEquivalent="C" id="bgn-CT-cEk">
<connections>
<action selector="orderFrontColorPanel:" target="Ady-hI-5gd" id="mSX-Xz-DV3"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="iMs-zA-UFJ"/>
<menuItem title="Copy Style" keyEquivalent="c" id="5Vv-lz-BsD">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="copyFont:" target="Ady-hI-5gd" id="GJO-xA-L4q"/>
</connections>
</menuItem>
<menuItem title="Paste Style" keyEquivalent="v" id="vKC-jM-MkH">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteFont:" target="Ady-hI-5gd" id="JfD-CL-leO"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Text" id="Fal-I4-PZk">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Text" id="d9c-me-L2H">
<items>
<menuItem title="Align Left" keyEquivalent="{" id="ZM1-6Q-yy1">
<connections>
<action selector="alignLeft:" target="Ady-hI-5gd" id="zUv-R1-uAa"/>
</connections>
</menuItem>
<menuItem title="Center" keyEquivalent="|" id="VIY-Ag-zcb">
<connections>
<action selector="alignCenter:" target="Ady-hI-5gd" id="spX-mk-kcS"/>
</connections>
</menuItem>
<menuItem title="Justify" id="J5U-5w-g23">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="alignJustified:" target="Ady-hI-5gd" id="ljL-7U-jND"/>
</connections>
</menuItem>
<menuItem title="Align Right" keyEquivalent="}" id="wb2-vD-lq4">
<connections>
<action selector="alignRight:" target="Ady-hI-5gd" id="r48-bG-YeY"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="4s2-GY-VfK"/>
<menuItem title="Writing Direction" id="H1b-Si-o9J">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Writing Direction" id="8mr-sm-Yjd">
<items>
<menuItem title="Paragraph" enabled="NO" id="ZvO-Gk-QUH">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem id="YGs-j5-SAR">
<string key="title"> Default</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionNatural:" target="Ady-hI-5gd" id="qtV-5e-UBP"/>
</connections>
</menuItem>
<menuItem id="Lbh-J2-qVU">
<string key="title"> Left to Right</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="S0X-9S-QSf"/>
</connections>
</menuItem>
<menuItem id="jFq-tB-4Kx">
<string key="title"> Right to Left</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeBaseWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="5fk-qB-AqJ"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="swp-gr-a21"/>
<menuItem title="Selection" enabled="NO" id="cqv-fj-IhA">
<modifierMask key="keyEquivalentModifierMask"/>
</menuItem>
<menuItem id="Nop-cj-93Q">
<string key="title"> Default</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionNatural:" target="Ady-hI-5gd" id="lPI-Se-ZHp"/>
</connections>
</menuItem>
<menuItem id="BgM-ve-c93">
<string key="title"> Left to Right</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionLeftToRight:" target="Ady-hI-5gd" id="caW-Bv-w94"/>
</connections>
</menuItem>
<menuItem id="RB4-Sm-HuC">
<string key="title"> Right to Left</string>
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="makeTextWritingDirectionRightToLeft:" target="Ady-hI-5gd" id="EXD-6r-ZUu"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="fKy-g9-1gm"/>
<menuItem title="Show Ruler" id="vLm-3I-IUL">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleRuler:" target="Ady-hI-5gd" id="FOx-HJ-KwY"/>
</connections>
</menuItem>
<menuItem title="Copy Ruler" keyEquivalent="c" id="MkV-Pr-PK5">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="copyRuler:" target="Ady-hI-5gd" id="71i-fW-3W2"/>
</connections>
</menuItem>
<menuItem title="Paste Ruler" keyEquivalent="v" id="LVM-kO-fVI">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="pasteRuler:" target="Ady-hI-5gd" id="cSh-wd-qM2"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="View" id="H8h-7b-M4v">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="View" id="HyV-fh-RgO">
<items>
<menuItem title="Show Toolbar" keyEquivalent="t" id="snW-S8-Cw5">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="toggleToolbarShown:" target="Ady-hI-5gd" id="BXY-wc-z0C"/>
</connections>
</menuItem>
<menuItem title="Customize Toolbar" id="1UK-8n-QPP">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="runToolbarCustomizationPalette:" target="Ady-hI-5gd" id="pQI-g3-MTW"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="hB3-LF-h0Y"/>
<menuItem title="Show Sidebar" keyEquivalent="s" id="kIP-vf-haE">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="toggleSidebar:" target="Ady-hI-5gd" id="iwa-gc-5KM"/>
</connections>
</menuItem>
<menuItem title="Enter Full Screen" keyEquivalent="f" id="4J7-dP-txa">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="toggleFullScreen:" target="Ady-hI-5gd" id="dU3-MA-1Rq"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Window" id="aUF-d1-5bR">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Window" systemMenu="window" id="Td7-aD-5lo">
<items>
<menuItem title="Minimize" keyEquivalent="m" id="OY7-WF-poV">
<connections>
<action selector="performMiniaturize:" target="Ady-hI-5gd" id="VwT-WD-YPe"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="R4o-n2-Eq4">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="performZoom:" target="Ady-hI-5gd" id="DIl-cC-cCs"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="eu3-7i-yIM"/>
<menuItem title="Bring All to Front" id="LE2-aR-0XJ">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="arrangeInFront:" target="Ady-hI-5gd" id="DRN-fu-gQh"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Help" id="wpr-3q-Mcd">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Help" systemMenu="help" id="F2S-fz-NVQ">
<items>
<menuItem title="MyCocoaApp Help" keyEquivalent="?" id="FKE-Sm-Kum">
<connections>
<action selector="showHelp:" target="Ady-hI-5gd" id="y7X-2Q-9no"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
<connections>
<outlet property="delegate" destination="Voe-Tx-rLC" id="PrD-fu-P6m"/>
</connections>
</application>
<customObject id="Voe-Tx-rLC" customClass="AppDelegate"/>
<customObject id="YLy-65-1bz" customClass="NSFontManager"/>
<customObject id="Ady-hI-5gd" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="0.0"/>
</scene>
<!--Window Controller-->
<scene sceneID="R2V-B0-nI4">
<objects>
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
<window key="window" title="Hello PerfTest" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="480" height="270"/>
<rect key="screenRect" x="0.0" y="0.0" width="1680" height="1027"/>
<connections>
<outlet property="delegate" destination="B8D-0N-5wS" id="98r-iN-zZc"/>
</connections>
</window>
<connections>
<segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="cq2-FE-JQM"/>
</connections>
</windowController>
<customObject id="Oky-zY-oP4" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="250"/>
</scene>
<!--View Controller-->
<scene sceneID="hIz-AP-VOD">
<objects>
<viewController id="XfG-lQ-9wD" customClass="ViewController" sceneMemberID="viewController">
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
<rect key="frame" x="0.0" y="0.0" width="480" height="270"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="eTU-97-WGf">
<rect key="frame" x="0.0" y="69" width="480" height="110"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="clipping" alignment="center" title="Hello World from PerfTest" id="kpP-Cn-Gka">
<font key="font" usesAppearanceFont="YES"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</view>
</viewController>
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75" y="655"/>
</scene>
</scenes>
</document>
``` | /content/code_sandbox/tests/perftest/Main.storyboard | xml | 2016-04-20T18:24:26 | 2024-08-16T13:29:19 | xamarin-macios | xamarin/xamarin-macios | 2,436 | 9,087 |
```xml
export default function isLowQualityComment(text: string): boolean {
// Note: the unicode range targets skin color modifiers for the hand emojis
return text.replaceAll(/[\s,.!?]+|[\u{1F3FB}-\u{1F3FF}]|[+-]\d+||ditt?o|me|too|t?here|on|same|this|issues?|please|pl[sz]|any|updates?|bump|question|solution|following/gui, '') === '';
}
``` | /content/code_sandbox/source/helpers/is-low-quality-comment.ts | xml | 2016-02-15T16:45:02 | 2024-08-16T18:39:26 | refined-github | refined-github/refined-github | 24,013 | 109 |
```xml
import { XmlParser } from "../parser/xml-parser";
export interface CorePropsDeclaration {
title: string,
description: string,
subject: string,
creator: string,
keywords: string,
language: string,
lastModifiedBy: string,
revision: number,
}
export function parseCoreProps(root: Element, xmlParser: XmlParser): CorePropsDeclaration {
const result = <CorePropsDeclaration>{};
for (let el of xmlParser.elements(root)) {
switch (el.localName) {
case "title": result.title = el.textContent; break;
case "description": result.description = el.textContent; break;
case "subject": result.subject = el.textContent; break;
case "creator": result.creator = el.textContent; break;
case "keywords": result.keywords = el.textContent; break;
case "language": result.language = el.textContent; break;
case "lastModifiedBy": result.lastModifiedBy = el.textContent; break;
case "revision": el.textContent && (result.revision = parseInt(el.textContent)); break;
}
}
return result;
}
``` | /content/code_sandbox/src/document-props/core-props.ts | xml | 2016-10-24T16:57:56 | 2024-08-16T17:39:34 | docxjs | VolodymyrBaydalka/docxjs | 1,168 | 233 |
```xml
<Project>
<PropertyGroup>
<ManagePackageVersionsCentrally>false</ManagePackageVersionsCentrally>
</PropertyGroup>
</Project>
``` | /content/code_sandbox/templates/Directory.Packages.props | xml | 2016-12-03T22:56:24 | 2024-08-16T16:24:05 | abp | abpframework/abp | 12,657 | 33 |
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Build">
<TargetFrameworks>net48;netstandard2.0;netcoreapp3.1;net5.0-windows;net6.0-windows</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
</PropertyGroup>
<PropertyGroup Label="Package">
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<PackageOutputPath>..\..\artifacts</PackageOutputPath>
<Version>4.0.0</Version>
<Product>FlaUI</Product>
<Authors>Roemer</Authors>
<Description>Library to use FlaUI with UIA3.</Description>
<PackageProjectUrl>path_to_url
<PackageIcon>FlaUI.png</PackageIcon>
<RepositoryUrl>path_to_url
<PackageTags>UI Automation UIA2 UIA3 UIA System.Windows.Automation</PackageTags>
<IncludeSource>True</IncludeSource>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
</PropertyGroup>
<PropertyGroup Label="Signing" Condition="'$(EnableSigning)'=='true'">
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../../FlaUI.snk</AssemblyOriginatorKeyFile>
<PublicSign Condition="'$(OS)'!='Windows_NT'">true</PublicSign>
<PackageId>FlaUI.UIA3.Signed</PackageId>
<OutputPath>bin\$(Configuration)\Signed</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\Signed</IntermediateOutputPath>
</PropertyGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\FlaUI.Core\FlaUI.Core.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<Reference Include="Accessibility" />
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup Label="Additional nuget files">
<None Include="..\..\LICENSE.txt" Pack="true" PackagePath="" />
<None Include="..\..\CHANGELOG.md" Pack="true" PackagePath="" />
<None Include="..\..\FlaUI.png" Pack="true" PackagePath="" />
</ItemGroup>
<!-- Interop References -->
<Choose>
<When Condition="'$(EnableSigning)'=='true'">
<ItemGroup>
<PackageReference Include="Interop.UIAutomationClient.Signed" Version="10.19041.0" />
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<PackageReference Include="Interop.UIAutomationClient" Version="10.19041.0" />
</ItemGroup>
</Otherwise>
</Choose>
</Project>
``` | /content/code_sandbox/src/FlaUI.UIA3/FlaUI.UIA3.csproj | xml | 2016-04-13T06:25:32 | 2024-08-16T09:08:40 | FlaUI | FlaUI/FlaUI | 2,193 | 618 |
```xml
import React, { useMemo } from 'react'
import { getColumnHeaderDetails } from '@devhub/core'
import {
NotificationCardsContainer,
NotificationCardsContainerProps,
} from '../../containers/NotificationCardsContainer'
import { IconProp } from '../../libs/vector-icons'
import { ColumnRenderer, ColumnRendererProps } from './ColumnRenderer'
export interface NotificationColumnProps
extends Omit<
NotificationCardsContainerProps,
'ownerIsKnown' | 'repoIsKnown'
> {
columnIndex: number
headerDetails: ReturnType<typeof getColumnHeaderDetails>
pagingEnabled?: boolean
}
export const NotificationColumn = React.memo(
(props: NotificationColumnProps) => {
const {
columnId,
columnIndex,
headerDetails,
pagingEnabled,
pointerEvents,
swipeable,
} = props
const Children = useMemo<ColumnRendererProps['children']>(
() => (
<NotificationCardsContainer
key={`notification-cards-container-${columnId}`}
columnId={columnId}
pointerEvents={pointerEvents}
swipeable={swipeable}
/>
),
[columnId, columnIndex, pointerEvents, swipeable],
)
if (!headerDetails) return null
return (
<ColumnRenderer
key={`notification-column-${columnId}-inner`}
avatarImageURL={
headerDetails.avatarProps && headerDetails.avatarProps.imageURL
}
avatarLinkURL={
headerDetails.avatarProps && headerDetails.avatarProps.linkURL
}
columnId={columnId}
columnIndex={columnIndex}
columnType="notifications"
icon={headerDetails.icon as IconProp}
owner={headerDetails.owner}
pagingEnabled={pagingEnabled}
repo={headerDetails.repo}
repoIsKnown={headerDetails.repoIsKnown}
subtitle={headerDetails.subtitle}
title={headerDetails.title}
>
{Children}
</ColumnRenderer>
)
},
)
NotificationColumn.displayName = 'NotificationColumn'
``` | /content/code_sandbox/packages/components/src/components/columns/NotificationColumn.tsx | xml | 2016-11-30T23:24:21 | 2024-08-16T00:24:59 | devhub | devhubapp/devhub | 9,652 | 415 |
```xml
import {Materializer, Type, Types} from "cad/craft/schema/types/index";
import {ApplicationContext} from "cad/context";
import {BaseSchemaField, OperationParamsErrorReporter, OperationSchema} from "cad/craft/schema/schema";
export interface ObjectTypeSchema extends BaseSchemaField {
type: Types.object;
schema: OperationSchema;
resolver: (input: any) => any;
}
export const ObjectType: Type<any, any, ObjectTypeSchema> = {
resolve(ctx: ApplicationContext,
value: any,
md: ObjectTypeSchema,
reportError: OperationParamsErrorReporter,
materializer: Materializer): any {
const result = {};
materializer(ctx, value, md.schema, result, reportError);
return result;
}
}
``` | /content/code_sandbox/web/app/cad/craft/schema/types/objectType.ts | xml | 2016-08-26T21:55:19 | 2024-08-15T01:02:53 | jsketcher | xibyte/jsketcher | 1,461 | 159 |
```xml
/*your_sha256_hash-----------------------------
*your_sha256_hash----------------------------*/
import type { languages } from '../../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = {
// the default separators except `@$`
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: {
lineComment: '//',
blockComment: ['/*', '*/']
},
brackets: [
['{', '}'],
['[', ']'],
['(', ')']
],
autoClosingPairs: [
{ open: '{', close: '}' },
{ open: '[', close: ']' },
{ open: '(', close: ')' },
{ open: '"', close: '"' },
{ open: "'", close: "'" }
],
surroundingPairs: [
{ open: '{', close: '}' },
{ open: '[', close: ']' },
{ open: '(', close: ')' },
{ open: '"', close: '"' },
{ open: "'", close: "'" },
{ open: '<', close: '>' }
],
folding: {
markers: {
start: new RegExp('^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))'),
end: new RegExp('^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))')
}
}
};
const keywords = [
'abstract',
'activate',
'and',
'any',
'array',
'as',
'asc',
'assert',
'autonomous',
'begin',
'bigdecimal',
'blob',
'boolean',
'break',
'bulk',
'by',
'case',
'cast',
'catch',
'char',
'class',
'collect',
'commit',
'const',
'continue',
'convertcurrency',
'decimal',
'default',
'delete',
'desc',
'do',
'double',
'else',
'end',
'enum',
'exception',
'exit',
'export',
'extends',
'false',
'final',
'finally',
'float',
'for',
'from',
'future',
'get',
'global',
'goto',
'group',
'having',
'hint',
'if',
'implements',
'import',
'in',
'inner',
'insert',
'instanceof',
'int',
'interface',
'into',
'join',
'last_90_days',
'last_month',
'last_n_days',
'last_week',
'like',
'limit',
'list',
'long',
'loop',
'map',
'merge',
'native',
'new',
'next_90_days',
'next_month',
'next_n_days',
'next_week',
'not',
'null',
'nulls',
'number',
'object',
'of',
'on',
'or',
'outer',
'override',
'package',
'parallel',
'pragma',
'private',
'protected',
'public',
'retrieve',
'return',
'returning',
'rollback',
'savepoint',
'search',
'select',
'set',
'short',
'sort',
'stat',
'static',
'strictfp',
'super',
'switch',
'synchronized',
'system',
'testmethod',
'then',
'this',
'this_month',
'this_week',
'throw',
'throws',
'today',
'tolabel',
'tomorrow',
'transaction',
'transient',
'trigger',
'true',
'try',
'type',
'undelete',
'update',
'upsert',
'using',
'virtual',
'void',
'volatile',
'webservice',
'when',
'where',
'while',
'yesterday'
];
// create case variations of the keywords - apex is case insensitive, but we can't make the highlighter case insensitive
// because we use a heuristic to assume that identifiers starting with an upper case letter are types.
const uppercaseFirstLetter = (lowercase: string) =>
lowercase.charAt(0).toUpperCase() + lowercase.substr(1);
let keywordsWithCaseVariations: string[] = [];
keywords.forEach((lowercase) => {
keywordsWithCaseVariations.push(lowercase);
keywordsWithCaseVariations.push(lowercase.toUpperCase());
keywordsWithCaseVariations.push(uppercaseFirstLetter(lowercase));
});
export const language = <languages.IMonarchLanguage>{
defaultToken: '',
tokenPostfix: '.apex',
keywords: keywordsWithCaseVariations,
operators: [
'=',
'>',
'<',
'!',
'~',
'?',
':',
'==',
'<=',
'>=',
'!=',
'&&',
'||',
'++',
'--',
'+',
'-',
'*',
'/',
'&',
'|',
'^',
'%',
'<<',
'>>',
'>>>',
'+=',
'-=',
'*=',
'/=',
'&=',
'|=',
'^=',
'%=',
'<<=',
'>>=',
'>>>='
],
// we include these common regular expressions
symbols: /[=><!~?:&|+\-*\/\^%]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
digits: /\d+(_+\d+)*/,
octaldigits: /[0-7]+(_+[0-7]+)*/,
binarydigits: /[0-1]+(_+[0-1]+)*/,
hexdigits: /[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,
// The main tokenizer for our languages
tokenizer: {
root: [
// identifiers and keywords
[
/[a-z_$][\w$]*/,
{
cases: {
'@keywords': { token: 'keyword.$0' },
'@default': 'identifier'
}
}
],
// assume that identifiers starting with an uppercase letter are types
[
/[A-Z][\w\$]*/,
{
cases: {
'@keywords': { token: 'keyword.$0' },
'@default': 'type.identifier'
}
}
],
// whitespace
{ include: '@whitespace' },
// delimiters and operators
[/[{}()\[\]]/, '@brackets'],
[/[<>](?!@symbols)/, '@brackets'],
[
/@symbols/,
{
cases: {
'@operators': 'delimiter',
'@default': ''
}
}
],
// @ annotations.
[/@\s*[a-zA-Z_\$][\w\$]*/, 'annotation'],
// numbers
[/(@digits)[eE]([\-+]?(@digits))?[fFdD]?/, 'number.float'],
[/(@digits)\.(@digits)([eE][\-+]?(@digits))?[fFdD]?/, 'number.float'],
[/(@digits)[fFdD]/, 'number.float'],
[/(@digits)[lL]?/, 'number'],
// delimiter: after number because of .\d floats
[/[;,.]/, 'delimiter'],
// strings
[/"([^"\\]|\\.)*$/, 'string.invalid'], // non-teminated string
[/'([^'\\]|\\.)*$/, 'string.invalid'], // non-teminated string
[/"/, 'string', '@string."'],
[/'/, 'string', "@string.'"],
// characters
[/'[^\\']'/, 'string'],
[/(')(@escapes)(')/, ['string', 'string.escape', 'string']],
[/'/, 'string.invalid']
],
whitespace: [
[/[ \t\r\n]+/, ''],
[/\/\*\*(?!\/)/, 'comment.doc', '@apexdoc'],
[/\/\*/, 'comment', '@comment'],
[/\/\/.*$/, 'comment']
],
comment: [
[/[^\/*]+/, 'comment'],
// [/\/\*/, 'comment', '@push' ], // nested comment not allowed :-(
// [/\/\*/, 'comment.invalid' ], // this breaks block comments in the shape of /* //*/
[/\*\//, 'comment', '@pop'],
[/[\/*]/, 'comment']
],
//Identical copy of comment above, except for the addition of .doc
apexdoc: [
[/[^\/*]+/, 'comment.doc'],
[/\*\//, 'comment.doc', '@pop'],
[/[\/*]/, 'comment.doc']
],
string: [
[/[^\\"']+/, 'string'],
[/@escapes/, 'string.escape'],
[/\\./, 'string.escape.invalid'],
[
/["']/,
{
cases: {
'$#==$S2': { token: 'string', next: '@pop' },
'@default': 'string'
}
}
]
]
}
};
``` | /content/code_sandbox/src/basic-languages/apex/apex.ts | xml | 2016-06-07T16:56:31 | 2024-08-16T17:17:05 | monaco-editor | microsoft/monaco-editor | 39,508 | 2,276 |
```xml
import { SerializedTeam } from '../../../../interfaces/db/team'
import { generateMockId, getCurrentTime, MockDbMap } from '../utils'
type MockTeam = Omit<SerializedTeam, 'permissions'>
const teamMap = new MockDbMap<MockTeam>('mock:teamMap')
const teamDomainMap = new MockDbMap<string>('mock:teamDomainMap')
export function resetMockTeams() {
teamMap.reset()
teamDomainMap.reset()
}
interface CreateMockTeamParams {
name?: string
domain?: string
}
export function createMockTeam({
name,
domain,
}: CreateMockTeamParams): MockTeam {
const id = generateMockId()
if (name == null) {
name = id
}
if (domain == null) {
domain = id
}
const now = getCurrentTime()
const newTeam = {
id,
domain,
name,
version: 1,
trial: false,
creationsCounter: 0,
state: {},
createdAt: now,
updatedAt: now,
}
teamMap.set(id, newTeam)
teamDomainMap.set(domain, id)
return newTeam
}
export function getMockTeamById(id: string) {
return teamMap.get(id)
}
export function getMockTeamByDomain(domain: string) {
const teamId = teamDomainMap.get(domain)
if (teamId == null) {
return undefined
}
return teamMap.get(teamId)
}
``` | /content/code_sandbox/src/cloud/api/mock/db/mockEntities/teams.ts | xml | 2016-11-19T14:30:34 | 2024-08-16T03:13:45 | BoostNote-App | BoostIO/BoostNote-App | 3,745 | 317 |
```xml
import * as core from "./core";
import * as cmds from "./cmds";
export function init(updated: () => void) {
if ("serviceWorker" in navigator
&& !pxt.webConfig.isStatic
&& !pxt.BrowserUtils.isLocalHost(true)) {
window.addEventListener("load", function () {
const ref = pxt.webConfig.relprefix.replace("---", "").replace(/^\//, "");
if (navigator.serviceWorker.controller) {
navigator.serviceWorker.addEventListener("message", ev => {
const message = ev.data as pxt.ServiceWorkerEvent;
// We need to check the ref of the activated service worker so that we don't reload if you have
// index.html and beta open at the same time. Otherwise we'd end up in an infinite reload loop as
// both tabs continually overwrite the service worker and refresh
if (message?.type === "serviceworker" && message.state === "activated" && message.ref === ref) {
scheduleUpdate();
}
if (message) {
cmds.handleServiceWorkerMessageAsync(message as any);
}
});
}
navigator.serviceWorker.register(pxt.webConfig.serviceworkerjs).then(function (registration) {
// Registration was successful
pxt.debug("ServiceWorker registration successful with scope: " + registration.scope);
}, function (err) {
// registration failed :(
pxt.debug("ServiceWorker registration failed: " + err);
});
});
}
function scheduleUpdate() {
if (pxt.appTarget.appTheme && pxt.appTarget.appTheme.noReloadOnUpdate)
return;
core.infoNotification(lf("Update download complete. Reloading... "));
setTimeout(() => {
pxt.tickEvent('appcache.updated')
updated();
}, 3000);
}
}
``` | /content/code_sandbox/webapp/src/appcache.ts | xml | 2016-01-24T19:35:52 | 2024-08-16T16:39:39 | pxt | microsoft/pxt | 2,069 | 386 |
```xml
/*
* @license Apache-2.0
*
*
*
* path_to_url
*
* Unless required by applicable law or agreed to in writing, software
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
// TypeScript Version: 4.1
/// <reference types="@stdlib/types"/>
import { ArrayLike } from '@stdlib/types/array';
/**
* If provided a value, the accumulator function returns updated minimum and maximum absolute values. If not provided a value, the accumulator function returns the current minimum and maximum absolute values.
*
* ## Notes
*
* - If provided `NaN`, the minimum and maximum absolute values are equal to `NaN` for all future invocations.
*
* @param x - input value
* @returns output array or null
*/
type accumulator = ( x?: number ) => ArrayLike<number> | null;
/**
* Returns an accumulator function which incrementally computes moving minimum and maximum absolute values.
*
* ## Notes
*
* - The `W` parameter defines the number of values over which to compute moving minimum and maximum absolute values.
* - As `W` values are needed to fill the window buffer, the first `W-1` returned minimum and maximum values are calculated from smaller sample sizes. Until the window is full, each returned minimum and maximum is calculated from all provided values.
*
* @param out - output array
* @param window - window size
* @throws window size must be a positive integer
* @returns accumulator function
*
* @example
* var accumulator = incrmminmaxabs( 3 );
*
* var mm = accumulator();
* // returns null
*
* mm = accumulator( 2.0 );
* // returns [ 2.0, 2.0 ]
*
* mm = accumulator( -5.0 );
* // returns [ 2.0, 5.0 ]
*
* mm = accumulator( 3.0 );
* // returns [ 2.0, 5.0 ]
*
* mm = accumulator( 5.0 );
* // returns [ 3.0, 5.0 ]
*
* mm = accumulator();
* // returns [ 3.0, 5.0 ]
*/
declare function incrmminmaxabs( out: ArrayLike<number>, window: number ): accumulator;
/**
* Returns an accumulator function which incrementally computes moving minimum and maximum absolute values.
*
* ## Notes
*
* - The `W` parameter defines the number of values over which to compute moving minimum and maximum absolute values.
* - As `W` values are needed to fill the window buffer, the first `W-1` returned minimum and maximum values are calculated from smaller sample sizes. Until the window is full, each returned minimum and maximum is calculated from all provided values.
*
* @param window - window size
* @throws window size must be a positive integer
* @returns accumulator function
*
* @example
* var accumulator = incrmminmaxabs( 3 );
*
* var mm = accumulator();
* // returns null
*
* mm = accumulator( 2.0 );
* // returns [ 2.0, 2.0 ]
*
* mm = accumulator( -5.0 );
* // returns [ 2.0, 5.0 ]
*
* mm = accumulator( 3.0 );
* // returns [ 2.0, 5.0 ]
*
* mm = accumulator( 5.0 );
* // returns [ 3.0, 5.0 ]
*
* mm = accumulator();
* // returns [ 3.0, 5.0 ]
*/
declare function incrmminmaxabs( window: number ): accumulator;
// EXPORTS //
export = incrmminmaxabs;
``` | /content/code_sandbox/lib/node_modules/@stdlib/stats/incr/mminmaxabs/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 788 |
```xml
import React from 'react';
import styled from 'styled-components';
import {View} from '../../Library/View/View';
import {appTheme} from '../../Library/Style/appTheme';
import {border} from '../../Library/Style/layout';
import {HorizontalResizer} from '../../Library/View/HorizontalResizer';
import {UserPrefRepo} from '../../Repository/UserPrefRepo';
import {SideHeaderFragment} from './SideHeaderFragment';
import {VersionUpdateFragment} from './VersionUpdateFragment';
import {SideFooterFragment} from './SideFooterFragment';
type Props = {
className?: string;
}
type State = {
width: number;
}
const MIN_WIDTH = 220;
export class SideFragment extends React.Component<Props, State> {
state: State = {
width: UserPrefRepo.getPref().general.style.streamsWidth || MIN_WIDTH,
}
private handleResize(diff: number) {
const width = Math.max(this.state.width + diff, MIN_WIDTH);
this.setState({width});
}
private handleWriteWidth() {
const pref = UserPrefRepo.getPref();
pref.general.style.streamsWidth = this.state.width;
UserPrefRepo.updatePref(pref);
}
render() {
return (
<Root className={this.props.className} style={{width: this.state.width}}>
<SideHeaderFragment/>
<SideScroll>
{this.props.children}
</SideScroll>
<VersionUpdateFragment/>
<SideFooterFragment/>
<HorizontalResizer onResize={diff => this.handleResize(diff)} onEnd={() => this.handleWriteWidth()}/>
</Root>
);
}
}
const Root = styled(View)`
position: relative;
height: 100%;
background: ${() => appTheme().bg.secondary};
border-right: solid ${border.medium}px ${() => appTheme().border.normal};
`;
const SideScroll = styled(View)`
overflow-y: auto;
flex: 1;
display: block;
`;
``` | /content/code_sandbox/src/Renderer/Fragment/Side/SideFragment.tsx | xml | 2016-05-10T12:55:31 | 2024-08-11T04:32:50 | jasper | jasperapp/jasper | 1,318 | 416 |
```xml
/* tslint:disable */
require('./FileUpload.module.css');
const styles = {
fileUpload: 'fileUpload_207465a2',
container: 'container_207465a2',
row: 'row_207465a2',
column: 'column_207465a2',
'ms-Grid': 'ms-Grid_207465a2',
title: 'title_207465a2',
subTitle: 'subTitle_207465a2',
description: 'description_207465a2',
button: 'button_207465a2',
label: 'label_207465a2',
};
export default styles;
/* tslint:enable */
``` | /content/code_sandbox/samples/react-file-upload/src/webparts/fileUpload/components/FileUpload.module.scss.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 144 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
path_to_url
Unless required by applicable law or agreed to in writing,
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
specific language governing permissions and limitations
-->
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="delete" rev="kudu">
<title>DELETE Statement (<keyword keyref="impala28"/> or higher only)</title>
<titlealts audience="PDF"><navtitle>DELETE</navtitle></titlealts>
<prolog>
<metadata>
<data name="Category" value="Impala"/>
<data name="Category" value="SQL"/>
<data name="Category" value="Kudu"/>
<data name="Category" value="Iceberg"/>
<data name="Category" value="ETL"/>
<data name="Category" value="Ingest"/>
<data name="Category" value="DML"/>
<data name="Category" value="Developers"/>
<data name="Category" value="Data Analysts"/>
</metadata>
</prolog>
<conbody>
<p>
<indexterm audience="hidden">DELETE statement</indexterm>
Deletes an arbitrary number of rows from a table.
This statement only works for Kudu (from <keyword keyref="impala28"/>) and Iceberg tables (from <keyword keyref="impala43"/>).
</p>
<p conref="../shared/impala_common.xml#common/syntax_blurb"/>
<codeblock>
DELETE [FROM] [<varname>database_name</varname>.]<varname>table_name</varname> [ WHERE <varname>where_conditions</varname> ]
DELETE <varname>table_ref</varname> FROM [<varname>joined_table_refs</varname>] [ WHERE <varname>where_conditions</varname> ]
</codeblock>
<p>
The first form evaluates rows from one table against an optional
<codeph>WHERE</codeph> clause, and deletes all the rows that
match the <codeph>WHERE</codeph> conditions, or all rows if
<codeph>WHERE</codeph> is omitted.
</p>
<p>
The second form evaluates one or more join clauses, and deletes
all matching rows from one of the tables. The join clauses can
include tables of any kind, but the table from which the rows
are deleted must be a Kudu or Iceberg table. The <codeph>FROM</codeph>
keyword is required in this case, to separate the name of
the table whose rows are being deleted from the table names
of the join clauses.
</p>
<p conref="../shared/impala_common.xml#common/usage_notes_blurb"/>
<p>
The conditions in the <codeph>WHERE</codeph> clause are the same ones allowed
for the <codeph>SELECT</codeph> statement. See <xref href="impala_select.xml#select"/>
for details.
</p>
<p>
The conditions in the <codeph>WHERE</codeph> clause can refer to
any combination of primary key columns or other columns. Referring to
primary key columns in the <codeph>WHERE</codeph> clause is more efficient
than referring to non-primary key columns (in case of Kudu tables).
</p>
<p>
If the <codeph>WHERE</codeph> clause is omitted, all rows are removed from the table.
</p>
<p>
Because Kudu currently does not enforce strong consistency during concurrent DML operations,
be aware that the results after this statement finishes might be different than you
intuitively expect:
</p>
<ul>
<li>
<p>
If some rows cannot be deleted because their
some primary key columns are not found, due to their being deleted
by a concurrent <codeph>DELETE</codeph> operation,
the statement succeeds but returns a warning.
</p>
</li>
<li>
<p>
A <codeph>DELETE</codeph> statement might also overlap with
<codeph>INSERT</codeph>, <codeph>UPDATE</codeph>,
or <codeph>UPSERT</codeph> statements running concurrently on the same table.
After the statement finishes, there might be more or fewer rows than expected in the table
because it is undefined whether the <codeph>DELETE</codeph> applies to rows that are
inserted or updated while the <codeph>DELETE</codeph> is in progress.
</p>
</li>
</ul>
<p>
Iceberg also allows concurrent DELETE operations, in which case the concurrent DELETEs might
remove the same rows. This won't corrupt the table as Iceberg allows such behavior.
</p>
<p>
The number of affected rows is reported in an <cmdname>impala-shell</cmdname> message
and in the query profile.
</p>
<p conref="../shared/impala_common.xml#common/dml_blurb_kudu"/>
<note conref="../shared/impala_common.xml#common/compute_stats_next"/>
<p conref="../shared/impala_common.xml#common/example_blurb"/>
<p>
The following examples show how to delete rows from a specified
table, either all rows or rows that match a <codeph>WHERE</codeph>
clause:
</p>
<codeblock>
-- Deletes all rows. The FROM keyword is optional.
DELETE FROM table;
DELETE table;
-- Deletes 0, 1, or more rows.
-- (If c1 is a single-column primary key, the statement could only
-- delete 0 or 1 rows.)
DELETE FROM table WHERE c1 = 100;
-- Deletes all rows that match all the WHERE conditions.
DELETE FROM table WHERE
(c1 > c2 OR c3 IN ('hello','world')) AND c4 IS NOT NULL;
DELETE FROM t1 WHERE
(c1 IN (1,2,3) AND c2 > c3) OR c4 IS NOT NULL;
DELETE FROM time_series WHERE
year = 2016 AND month IN (11,12) AND day > 15;
-- WHERE condition with a subquery.
DELETE FROM t1 WHERE
c5 IN (SELECT DISTINCT other_col FROM other_table);
-- Does not delete any rows, because the WHERE condition is always false.
DELETE FROM table WHERE 1 = 0;
</codeblock>
<p>
The following examples show how to delete rows that are part
of the result set from a join:
</p>
<codeblock>
-- Remove _all_ rows from t1 that have a matching X value in t2.
DELETE t1 FROM t1 JOIN t2 ON t1.x = t2.x;
-- Remove _some_ rows from t1 that have a matching X value in t2.
DELETE t1 FROM t1 JOIN t2 ON t1.x = t2.x
WHERE t1.y = FALSE and t2.z > 100;
-- Delete from a table based on a join with another table.
DELETE t1 FROM table t1 JOIN other_table t2 ON t1.x = t2.x;
-- The tables can be joined in any order as long as the Kudu or Iceberg table
-- is specified as the deletion target.
DELETE t2 FROM non_kudu_non_ice_table t1 JOIN kudu_or_ice_table t2 ON t1.x = t2.x;
</codeblock>
<p conref="../shared/impala_common.xml#common/related_info"/>
<p>
<xref href="impala_iceberg.xml#impala_iceberg"/>,
<xref href="impala_kudu.xml#impala_kudu"/>, <xref href="impala_insert.xml#insert"/>,
<xref href="impala_update.xml#update"/>, <xref href="impala_upsert.xml#upsert"/>
</p>
</conbody>
</concept>
``` | /content/code_sandbox/docs/topics/impala_delete.xml | xml | 2016-04-13T07:00:08 | 2024-08-16T10:10:44 | impala | apache/impala | 1,115 | 1,821 |
```xml
import { mergeClasses } from '@fluentui/react-components';
import * as React from 'react';
import { useGridStyles } from './Grid.styles';
export interface GridShimProps {
/**
* The columns of the grid with a space-separated list of values.
* The values represent the track size, and the space between them represents the grid line.
*/
columns?: 1 | 2 | 3;
/**
* The rows of the grid with a space-separated list of values.
* The values represent the track size, and the space between them represents the grid line.
*/
rows?: 1 | 2 | 3;
}
export const gridShimClassName = 'fui-Grid';
export const GridShim = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLElement> & GridShimProps>(
(props, ref) => {
const { rows, columns, className, ...rest } = props;
const classes = useGridStyles();
const classMaps = React.useMemo(
() => ({
rowsClasses: {
1: classes.rows1,
2: classes.rows2,
3: classes.rows3,
},
columnsClasses: {
1: classes.columns1,
2: classes.columns2,
3: classes.columns3,
},
}),
[classes],
);
const gridClasses = mergeClasses(
gridShimClassName,
classes.grid,
!rows && !columns && classes.columnsDefault,
rows && !columns && classes.onlyRows,
rows && classMaps.rowsClasses[rows],
columns && classMaps.columnsClasses[columns],
className,
);
return <div ref={ref} className={gridClasses} {...rest} />;
},
);
GridShim.displayName = 'GridShim';
``` | /content/code_sandbox/packages/react-components/react-migration-v0-v9/library/src/components/Grid/GridShim.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 386 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
/*
**
**
**
** path_to_url
**
** Unless required by applicable law or agreed to in writing, software
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
-->
<resources xmlns:android="path_to_url"
xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- <string name="english_ime_name" msgid="7252517407088836577">"Teclado de Android"</string> -->
<!-- <string name="english_ime_settings" msgid="6661589557206947774">"Ajustes del teclado de Android"</string> -->
<string name="english_ime_input_options" msgid="3909945612939668554">"Opciones introduccin texto"</string>
<string name="vibrate_on_keypress" msgid="5258079494276955460">"Vibrar al pulsar tecla"</string>
<string name="sound_on_keypress" msgid="6093592297198243644">"Sonido al pulsar tecla"</string>
<string name="popup_on_keypress" msgid="123894815723512944">"Popup al pulsar tecla"</string>
<string name="hit_correction" msgid="4855351009261318389">"Corregir errores de escritura"</string>
<string name="hit_correction_summary" msgid="8761701873008070796">"Habilitar la introduccin de correccin de errores"</string>
<string name="hit_correction_land" msgid="2567691684825205448">"Errores de introduccin de datos en vista horizontal"</string>
<string name="hit_correction_land_summary" msgid="4076803842198368328">"Habilitar la introduccin de correccin de errores"</string>
<string name="auto_correction" msgid="7911639788808958255">"Sugerencias de palabras"</string>
<string name="auto_correction_summary" msgid="6881047311475758267">"Corregir automticamente la palabra anterior"</string>
<string name="prediction" msgid="466220283138359837">"Sugerencias de palabras"</string>
<string name="prediction_category" msgid="7027100625580696660">"Ajustes de sugerencia de palabras"</string>
<string name="prediction_summary" msgid="459788228830873110">"Habilitar Autocompletar al escribir"</string>
<string name="auto_complete_dialog_title" msgid="2172048590607201920">"Autocompletar"</string>
<string name="prediction_landscape" msgid="4874601565593216183">"Aumentar el tamao del campo de texto"</string>
<string name="prediction_landscape_summary" msgid="6736551095997839472">"Ocultar sugerencias de palabras en la vista horizontal"</string>
<string name="auto_cap" msgid="1719746674854628252">"Maysculas automticas"</string>
<string name="auto_cap_summary" msgid="3260681697600786825">"Escribir en mayscula el principio de la frase"</string>
<string name="auto_punctuate" msgid="7276672334264521751">"Puntuacin automtica"</string>
<string name="auto_punctuate_summary" msgid="6589441565817502132"></string>
<string name="quick_fixes" msgid="5353213327680897927">"Correcciones rpidas"</string>
<string name="quick_fixes_summary" msgid="3405028402510332373">"Corrige los errores tipogrficos que se cometen con ms frecuencia."</string>
<string name="show_suggestions" msgid="507074425254289133">"Mostrar sugerencias"</string>
<string name="show_suggestions_summary" msgid="1989672863935759654">"Muestra las palabras sugeridas mientras se escribe."</string>
<string name="auto_complete" msgid="1103196318775486023">"Autocompletar"</string>
<string name="auto_complete_summary" msgid="6113149638718274624">"La barra espaciadora y los signos de puntuacin insertan automticamente la palabra resaltada."</string>
<string name="prefs_settings_key" msgid="4623341240804046498">"Mostrar tecla de ajustes"</string>
<string name="settings_key_mode_auto_name" msgid="2993460277873684680">"Automticamente"</string>
<string name="settings_key_mode_always_show_name" msgid="3047567041784760575">"Mostrar siempre"</string>
<string name="settings_key_mode_always_hide_name" msgid="7833948046716923994">"Ocultar siempre"</string>
<!-- no translation found for settings_key_modes:0 (8549888726962891527) -->
<!-- no translation found for settings_key_modes:1 (881280041213210923) -->
<!-- no translation found for settings_key_modes:2 (7317310620171067848) -->
<string name="bigram_suggestion" msgid="1323347224043514969">"Sugerencias de bigramas"</string>
<string name="bigram_suggestion_summary" msgid="4383845146070101531">"Usar palabra anterior para mejorar sugerencias"</string>
<string-array name="prediction_modes">
<item msgid="4870266572388153286">"Ninguno"</item>
<item msgid="1669461741568287396">"Bsico"</item>
<item msgid="4894328801530136615">"Avanzado"</item>
</string-array>
<string name="added_word" msgid="8993883354622484372">"<xliff:g id="WORD">%s</xliff:g>: guardada"</string>
<string name="tip_long_press" msgid="6101270866284343344">"Mantn pulsada una tecla para ver los caracteres acentuados (, , etc.)."</string>
<string name="tip_dismiss" msgid="7585579046862204381">"Pulsa la tecla \"Atrs\" para cerrar el teclado en cualquier momento."</string>
<string name="tip_access_symbols" msgid="6344098517525531652">"Acceso a nmeros y smbolos"</string>
<string name="tip_add_to_dictionary" msgid="1487293888469227817">"Mantn pulsada la palabra situada ms a la izquierda para aadirla al diccionario."</string>
<string name="touch_to_continue" msgid="7869803257948414531">"Toca esta sugerencia para continuar "</string>
<string name="touch_to_finish" msgid="7990196086480585789">"Toca aqu para cerrar la sugerencia y comenzar a escribir."</string>
<string name="tip_to_open_keyboard" msgid="6821200275486950452"><b>"El teclado se abre cada vez que tocas un campo de texto"</b>"."</string>
<string name="tip_to_view_accents" msgid="5433158573693308501"><b>"Mantn pulsada una tecla para ver los caracteres acentuados"\n"(, , , , etc.)."</b></string>
<string name="tip_to_open_symbols" msgid="7345139325622444880"><b>"Cambiar a nmeros y a smbolos tocando esta tecla"</b></string>
<string name="tip_to_close_symbols" msgid="5227724217206927185"><b>"Volver a las letras tocando esta tecla de nuevo"</b></string>
<string name="tip_to_launch_settings" msgid="8402961128983196128"><b>"Mantn pulsada esta tecla para cambiar la configuracin de teclado a, por ejemplo, autocompletar"</b>"."</string>
<string name="tip_to_start_typing" msgid="7213843601369174313"><b>"Prubalo!"</b></string>
<string name="label_go_key" msgid="1635148082137219148">"Ir"</string>
<string name="label_next_key" msgid="362972844525672568">"Sig."</string>
<string name="label_done_key" msgid="2441578748772529288">"Listo"</string>
<string name="label_send_key" msgid="2815056534433717444">"Enviar"</string>
<string name="label_symbol_key" msgid="6175820506864489453">"?123"</string>
<string name="label_phone_key" msgid="4275497665515080551">"123"</string>
<string name="label_alpha_key" msgid="8864943487292437456">"ABC"</string>
<string name="label_alt_key" msgid="2846315350346694811">"ALT"</string>
<string name="voice_warning_title" msgid="4419354150908395008">"Introduccin de voz"</string>
<string name="voice_warning_locale_not_supported" msgid="637923019716442333">"Actualmente la introduccin de voz no est disponible en tu idioma, pero se puede utilizar en ingls."</string>
<string name="voice_warning_may_not_understand" msgid="4611518823070986445">"La introduccin de voz es una funcin en fase experimental que utiliza la tecnologa de reconocimiento de voz en red de Google."</string>
<string name="voice_warning_how_to_turn_off" msgid="5652369578498701761">"Para desactivar la funcin de introduccin de voz, accede a la configuracin del teclado."</string>
<string name="voice_hint_dialog_message" msgid="6892342981545727994">"Para utilizar la funcin de introduccin de voz, pulsa el botn de micrfono o desliza el dedo por el teclado en pantalla."</string>
<string name="voice_listening" msgid="467518160751321844">"Habla ahora"</string>
<string name="voice_working" msgid="6666937792815731889">"En curso"</string>
<string name="voice_initializing" msgid="661962047129906646"></string>
<string name="voice_error" msgid="5140896300312186162">"Se ha producido un error. Intntalo de nuevo."</string>
<string name="voice_network_error" msgid="6649556447401862563">"No se ha podido establecer conexin."</string>
<string name="voice_too_much_speech" msgid="5746973620134227376">"Se ha producido un error debido a un exceso de introduccin de datos de voz."</string>
<string name="voice_audio_error" msgid="5072707727016414454">"Problema de audio"</string>
<string name="voice_server_error" msgid="7807129913977261644">"Error del servidor"</string>
<string name="voice_speech_timeout" msgid="8461817525075498795">"Ninguna conversacin escuchada"</string>
<string name="voice_no_match" msgid="4285117547030179174">"No se ha encontrado ninguna coincidencia."</string>
<string name="voice_not_installed" msgid="5552450909753842415">"La bsqueda por voz no est instalada."</string>
<string name="voice_swipe_hint" msgid="6943546180310682021"><b>"Sugerencia:"</b>" muvete por el teclado para hablar."</string>
<string name="voice_punctuation_hint" msgid="1611389463237317754"><b>"Sugerencia:"</b>" la prxima vez, prueba a indicar signos de puntuacin como, por ejemplo, \"punto\", \"coma\" o \"signo de interrogacin\"."</string>
<string name="cancel" msgid="6830980399865683324">"Cancelar"</string>
<string name="ok" msgid="7898366843681727667">"Aceptar"</string>
<string name="voice_input" msgid="2466640768843347841">"Introduccin de voz"</string>
<string-array name="voice_input_modes">
<item msgid="1349082139076086774">"En teclado principal"</item>
<item msgid="8529385602829095903">"En teclado de smbolos"</item>
<item msgid="7283103513488381103">"Desactivado"</item>
</string-array>
<string-array name="voice_input_modes_summary">
<item msgid="554248625705084903">"Micrfono en teclado principal"</item>
<item msgid="6907837061058876770">"Micrfono en teclado de smbolos"</item>
<item msgid="3664304608587798036">"La funcin de introduccin de voz no est habilitada."</item>
</string-array>
<string name="auto_submit" msgid="9151008027068358518">"Enviar automticamente despus de la introduccin de voz"</string>
<string name="auto_submit_summary" msgid="4961875269610384226">"Pulsar Intro automticamente al buscar o al pasar al siguiente campo"</string>
<string name="open_the_keyboard" msgid="2215920976029260466"><font size="17"><b>"Abrir el teclado"\n</b></font><font size="3">\n</font>"Toca cualquier campo de texto."</string>
<string name="close_the_keyboard" msgid="6251022259044940103"><font size="17"><b>"Cerrar el teclado"\n</b></font><font size="3">\n</font>"Pulsa la tecla \"Atrs\"."</string>
<string name="touch_and_hold" msgid="6154166367273010534"><font size="17"><b>"Mantn pulsada una tecla para acceder a las opciones."\n</b></font><font size="3">\n</font>"Accede a los signos de puntuacin y a los acentos."</string>
<string name="keyboard_settings" msgid="4585753477617374032"><font size="17"><b>"Ajustes del teclado"\n</b></font><font size="3">\n</font>"Mantn pulsada la tecla "<b>"?123"</b>"."</string>
<string name="popular_domain_0" msgid="3745279225122472969">".com"</string>
<string name="popular_domain_1" msgid="1370572248164278467">".net"</string>
<string name="popular_domain_2" msgid="3036812463748402878">".org"</string>
<string name="popular_domain_3" msgid="8718639560809452028">".gov"</string>
<string name="popular_domain_4" msgid="35359437471311470">".edu"</string>
<string name="selectInputMethod" msgid="315076553378705821">"Seleccionar mtodo de introduccin de texto"</string>
<string name="language_selection_title" msgid="1651299598555326750">"Idiomas"</string>
<string name="language_selection_summary" msgid="187110938289512256">"Deslizar el dedo por la barra espaciadora para cambiar el idioma"</string>
<string name="hint_add_to_dictionary" msgid="9006292060636342317">" Volver a tocar para guardar"</string>
<string name="has_dictionary" msgid="6071847973466625007">"Hay un diccionario disponible."</string>
<string name="prefs_enable_log" msgid="6620424505072963557">"Habilitar comentarios de usuarios"</string>
<string name="prefs_description_log" msgid="5827825607258246003">"Ayuda a mejorar este editor de mtodo de introduccin de texto enviando estadsticas de uso e informes de error a Google."</string>
<string name="prefs_enable_recorrection" msgid="4588408906649533582">"Tocar para corregir palabras"</string>
<string name="prefs_enable_recorrection_summary" msgid="1056068922330206170">"Tocar palabras introducidas para corregirlas"</string>
<string name="keyboard_layout" msgid="437433231038683666">"Tema de teclado"</string>
<string name="subtype_mode_keyboard" msgid="2242090416595003881">"teclado"</string>
<string name="subtype_mode_voice" msgid="4394113125441627771">"voz"</string>
</resources>
``` | /content/code_sandbox/app/src/main/res/values-es/strings.xml | xml | 2016-01-22T21:40:54 | 2024-08-16T11:54:30 | hackerskeyboard | klausw/hackerskeyboard | 1,807 | 3,789 |
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0;net6.0-windows</TargetFrameworks>
<Description>Unofficial port of the Windows Workflow Foundation (WF) to .NET 6</Description>
<TargetsForTfmSpecificBuildOutput>$(TargetsForTfmSpecificBuildOutput);CopyProjectReferencesToPackage</TargetsForTfmSpecificBuildOutput>
<GeneratePackageOnBuild Condition="$(Configuration)=='Release'">true</GeneratePackageOnBuild>
<RepositoryType>git</RepositoryType>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<PackageProjectUrl>path_to_url
<PackageReadmeFile>README.md</PackageReadmeFile>
<NoWarn>$(NoWarn);NU5105</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\UiPath.Workflow.Runtime\UiPath.Workflow.Runtime.csproj"/>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All"/>
<PackageReference Include="ReflectionMagic" Version="4.1.0"/>
<ProjectReference Include="..\VisualBasic\Microsoft.CodeAnalysis.VisualBasic.Scripting.vbproj" PrivateAssets="All"/>
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="$(RoslynPackageVersion)"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Scripting" Version="$(RoslynPackageVersion)"/>
<PackageReference Include="System.CodeDom" Version="6.0.0"/>
<PackageReference Include="Nito.AsyncEx.Tasks" Version="5.1.2"/>
<None Include="..\..\README.md" Pack="true" PackagePath=""/>
</ItemGroup>
<Target Name="CopyProjectReferencesToPackage" DependsOnTargets="BuildOnlySettings;ResolveReferences">
<ItemGroup>
<BuildOutputInPackage Include="$(OutputPath)Microsoft.CodeAnalysis.VisualBasic.Scripting.*"/>
</ItemGroup>
</Target>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="$(Configuration)=='Release'">
<Exec Command="rd /S /Q %25UserProfile%25\.nuget\packages\$(TargetName)"/>
</Target>
</Project>
``` | /content/code_sandbox/src/UiPath.Workflow/UiPath.Workflow.csproj | xml | 2016-08-25T20:07:20 | 2024-08-13T22:23:35 | CoreWF | UiPath/CoreWF | 1,126 | 511 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.10">
<data>
<int key="IBDocument.SystemTarget">1080</int>
<string key="IBDocument.SystemVersion">12E55</string>
<string key="IBDocument.InterfaceBuilderVersion">3084</string>
<string key="IBDocument.AppKitVersion">1187.39</string>
<string key="IBDocument.HIToolboxVersion">626.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="NS.object.0">3084</string>
</object>
<object class="NSArray" key="IBDocument.IntegratedClassDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>NSButton</string>
<string>NSButtonCell</string>
<string>NSCustomObject</string>
<string>NSTextField</string>
<string>NSTextFieldCell</string>
<string>NSView</string>
<string>NSWindowTemplate</string>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
<object class="NSMutableDictionary" key="IBDocument.Metadata">
<string key="NS.key.0">PluginDependencyRecalculationVersion</string>
<integer value="1" key="NS.object.0"/>
</object>
<object class="NSMutableArray" key="IBDocument.RootObjects" id="1000">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomObject" id="1001">
<string key="NSClassName">MainSheetController</string>
</object>
<object class="NSCustomObject" id="1003">
<string key="NSClassName">FirstResponder</string>
</object>
<object class="NSCustomObject" id="1004">
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSWindowTemplate" id="748157544">
<int key="NSWindowStyleMask">7</int>
<int key="NSWindowBacking">2</int>
<string key="NSWindowRect">{{131, 74}, {272, 141}}</string>
<int key="NSWTFlags">611844096</int>
<string key="NSWindowTitle">Sheet</string>
<string key="NSWindowClass">MainSheet</string>
<nil key="NSViewClass"/>
<nil key="NSUserInterfaceItemIdentifier"/>
<object class="NSView" key="NSWindowView" id="312036702">
<reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSButton" id="787727696">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{72, 13}, {128, 32}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="320072264">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">134217728</int>
<string key="NSContents">Dismiss Sheet</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">13</double>
<int key="NSfFlags">1044</int>
</object>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="787727696"/>
<int key="NSButtonFlags">-2038284288</int>
<int key="NSButtonFlags2">129</int>
<string key="NSAlternateContents"/>
<string key="NSKeyEquivalent"/>
<int key="NSPeriodicDelay">200</int>
<int key="NSPeriodicInterval">25</int>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
</object>
<object class="NSTextField" id="104948967">
<reference key="NSNextResponder" ref="312036702"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 73}, {238, 48}}</string>
<reference key="NSSuperview" ref="312036702"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="787727696"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<string key="NSAntiCompressionPriority">{250, 750}</string>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="786549054">
<int key="NSCellFlags">67108864</int>
<int key="NSCellFlags2">272629760</int>
<string key="NSContents">Dismiss the sheet and run it a few more times.</string>
<object class="NSFont" key="NSSupport">
<string key="NSName">LucidaGrande</string>
<double key="NSSize">20</double>
<int key="NSfFlags">16</int>
</object>
<string key="NSCellIdentifier">_NS:9</string>
<reference key="NSControlView" ref="104948967"/>
<object class="NSColor" key="NSBackgroundColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MC42NjY2NjY2NjY3AA</bytes>
</object>
</object>
<object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">controlTextColor</string>
<object class="NSColor" key="NSColor">
<int key="NSColorSpace">3</int>
<bytes key="NSWhite">MAA</bytes>
</object>
</object>
</object>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
<bool key="NSControlAutosetMaxLayoutWidth">YES</bool>
</object>
</object>
<string key="NSFrameSize">{272, 141}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView"/>
</object>
<string key="NSScreenRect">{{0, 0}, {2560, 1418}}</string>
<string key="NSMaxSize">{10000000000000, 10000000000000}</string>
<bool key="NSWindowIsRestorable">YES</bool>
</object>
</object>
<object class="IBObjectContainer" key="IBDocument.Objects">
<object class="NSMutableArray" key="connectionRecords">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">window</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="748157544"/>
</object>
<int key="connectionID">6</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">dismissSheetButton</string>
<reference key="source" ref="1001"/>
<reference key="destination" ref="787727696"/>
</object>
<int key="connectionID">15</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBObjectRecord">
<int key="objectID">0</int>
<object class="NSArray" key="object" id="0">
<bool key="EncodedWithXMLCoder">YES</bool>
</object>
<reference key="children" ref="1000"/>
<nil key="parent"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">-2</int>
<reference key="object" ref="1001"/>
<reference key="parent" ref="0"/>
<string key="objectName">File's Owner</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-1</int>
<reference key="object" ref="1003"/>
<reference key="parent" ref="0"/>
<string key="objectName">First Responder</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">-3</int>
<reference key="object" ref="1004"/>
<reference key="parent" ref="0"/>
<string key="objectName">Application</string>
</object>
<object class="IBObjectRecord">
<int key="objectID">2</int>
<reference key="object" ref="748157544"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="312036702"/>
</object>
<reference key="parent" ref="0"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">3</int>
<reference key="object" ref="312036702"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="104948967"/>
<reference ref="787727696"/>
</object>
<reference key="parent" ref="748157544"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">7</int>
<reference key="object" ref="787727696"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="320072264"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">8</int>
<reference key="object" ref="320072264"/>
<reference key="parent" ref="787727696"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">11</int>
<reference key="object" ref="104948967"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="786549054"/>
</object>
<reference key="parent" ref="312036702"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">12</int>
<reference key="object" ref="786549054"/>
<reference key="parent" ref="104948967"/>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="flattenedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>-1.IBPluginDependency</string>
<string>-2.IBPluginDependency</string>
<string>-3.IBPluginDependency</string>
<string>11.IBPluginDependency</string>
<string>12.IBPluginDependency</string>
<string>2.IBPluginDependency</string>
<string>2.IBWindowTemplateEditedContentRect</string>
<string>2.NSWindowTemplate.visibleAtLaunch</string>
<string>3.IBPluginDependency</string>
<string>7.IBPluginDependency</string>
<string>8.IBPluginDependency</string>
</object>
<object class="NSArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{319, 371}, {606, 354}}</string>
<boolean value="NO"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="activeLocalization"/>
<object class="NSMutableDictionary" key="localizations">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference key="dict.sortedKeys" ref="0"/>
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">15</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">MainSheet</string>
<string key="superclassName">NSWindow</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/MainSheet.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">MainSheetController</string>
<string key="superclassName">NSWindowController</string>
<object class="NSMutableDictionary" key="outlets">
<string key="NS.key.0">dismissSheetButton</string>
<string key="NS.object.0">NSButton</string>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<string key="NS.key.0">dismissSheetButton</string>
<object class="IBToOneOutletInfo" key="NS.object.0">
<string key="name">dismissSheetButton</string>
<string key="candidateClassName">NSButton</string>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/MainSheetController.h</string>
</object>
</object>
</object>
</object>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3</string>
<integer value="3000" key="NS.object.0"/>
</object>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
<int key="IBDocument.defaultPropertyAccessControl">3</int>
</data>
</archive>
``` | /content/code_sandbox/tests/qa-regression/EndSheet/MainSheet.xib | xml | 2016-04-20T18:24:26 | 2024-08-16T13:29:19 | xamarin-macios | xamarin/xamarin-macios | 2,436 | 3,853 |
```xml
/**
* String related filters
*
* * prefer stringify() to String() since `undefined`, `null` should eval ''
*/
// Han (Chinese) characters: \u4E00-\u9FFF
// Additional Han characters: \uF900-\uFAFF (CJK Compatibility Ideographs)
// Additional Han characters: \u3400-\u4DBF (CJK Unified Ideographs Extension A)
// Katakana (Japanese): \u30A0-\u30FF
// Hiragana (Japanese): \u3040-\u309F
// Hangul (Korean): \uAC00-\uD7AF
import { FilterImpl } from '../template'
import { assert, escapeRegExp, stringify } from '../util'
const rCJKWord = /[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu
// Word boundary followed by word characters (for detecting words)
const rNonCJKWord = /[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu
export function append (this: FilterImpl, v: string, arg: string) {
assert(arguments.length === 2, 'append expect 2 arguments')
const lhs = stringify(v)
const rhs = stringify(arg)
this.context.memoryLimit.use(lhs.length + rhs.length)
return lhs + rhs
}
export function prepend (this: FilterImpl, v: string, arg: string) {
assert(arguments.length === 2, 'prepend expect 2 arguments')
const lhs = stringify(v)
const rhs = stringify(arg)
this.context.memoryLimit.use(lhs.length + rhs.length)
return rhs + lhs
}
export function lstrip (this: FilterImpl, v: string, chars?: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
if (chars) {
chars = escapeRegExp(stringify(chars))
return str.replace(new RegExp(`^[${chars}]+`, 'g'), '')
}
return str.replace(/^\s+/, '')
}
export function downcase (this: FilterImpl, v: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
return str.toLowerCase()
}
export function upcase (this: FilterImpl, v: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
return stringify(str).toUpperCase()
}
export function remove (this: FilterImpl, v: string, arg: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
return str.split(stringify(arg)).join('')
}
export function remove_first (this: FilterImpl, v: string, l: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
return str.replace(stringify(l), '')
}
export function remove_last (this: FilterImpl, v: string, l: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
const pattern = stringify(l)
const index = str.lastIndexOf(pattern)
if (index === -1) return str
return str.substring(0, index) + str.substring(index + pattern.length)
}
export function rstrip (this: FilterImpl, str: string, chars?: string) {
str = stringify(str)
this.context.memoryLimit.use(str.length)
if (chars) {
chars = escapeRegExp(stringify(chars))
return str.replace(new RegExp(`[${chars}]+$`, 'g'), '')
}
return str.replace(/\s+$/, '')
}
export function split (this: FilterImpl, v: string, arg: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
const arr = str.split(stringify(arg))
// align to ruby split, which is the behavior of shopify/liquid
// see: path_to_url#method-i-split
while (arr.length && arr[arr.length - 1] === '') arr.pop()
return arr
}
export function strip (this: FilterImpl, v: string, chars?: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
if (chars) {
chars = escapeRegExp(stringify(chars))
return str
.replace(new RegExp(`^[${chars}]+`, 'g'), '')
.replace(new RegExp(`[${chars}]+$`, 'g'), '')
}
return str.trim()
}
export function strip_newlines (this: FilterImpl, v: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
return str.replace(/\r?\n/gm, '')
}
export function capitalize (this: FilterImpl, str: string) {
str = stringify(str)
this.context.memoryLimit.use(str.length)
return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()
}
export function replace (this: FilterImpl, v: string, pattern: string, replacement: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
return str.split(stringify(pattern)).join(replacement)
}
export function replace_first (this: FilterImpl, v: string, arg1: string, arg2: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
return str.replace(stringify(arg1), arg2)
}
export function replace_last (this: FilterImpl, v: string, arg1: string, arg2: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
const pattern = stringify(arg1)
const index = str.lastIndexOf(pattern)
if (index === -1) return str
const replacement = stringify(arg2)
return str.substring(0, index) + replacement + str.substring(index + pattern.length)
}
export function truncate (this: FilterImpl, v: string, l = 50, o = '...') {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
if (str.length <= l) return v
return str.substring(0, l - o.length) + o
}
export function truncatewords (this: FilterImpl, v: string, words = 15, o = '...') {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
const arr = str.split(/\s+/)
if (words <= 0) words = 1
let ret = arr.slice(0, words).join(' ')
if (arr.length >= words) ret += o
return ret
}
export function normalize_whitespace (this: FilterImpl, v: string) {
const str = stringify(v)
this.context.memoryLimit.use(str.length)
return str.replace(/\s+/g, ' ')
}
export function number_of_words (this: FilterImpl, input: string, mode?: 'cjk' | 'auto') {
const str = stringify(input)
this.context.memoryLimit.use(str.length)
input = str.trim()
if (!input) return 0
switch (mode) {
case 'cjk':
// Count CJK characters and words
return (input.match(rCJKWord) || []).length + (input.match(rNonCJKWord) || []).length
case 'auto':
// Count CJK characters, if none, count words
return rCJKWord.test(input)
? input.match(rCJKWord)!.length + (input.match(rNonCJKWord) || []).length
: input.split(/\s+/).length
default:
// Count words only
return input.split(/\s+/).length
}
}
export function array_to_sentence_string (this: FilterImpl, array: unknown[], connector = 'and') {
this.context.memoryLimit.use(array.length)
switch (array.length) {
case 0:
return ''
case 1:
return array[0]
case 2:
return `${array[0]} ${connector} ${array[1]}`
default:
return `${array.slice(0, -1).join(', ')}, ${connector} ${array[array.length - 1]}`
}
}
``` | /content/code_sandbox/src/filters/string.ts | xml | 2016-06-13T07:39:30 | 2024-08-16T16:56:50 | liquidjs | harttle/liquidjs | 1,485 | 1,795 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="path_to_url">
<ItemGroup>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
<Filter Include="surfaces">
<UniqueIdentifier>{11868456-7D97-D44D-C42F-3C3707EFE842}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="surfaces\display.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\display.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClInclude Include="surfaces\display_client.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClCompile Include="surfaces\display_scheduler.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\display_scheduler.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClCompile Include="surfaces\onscreen_display_client.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\onscreen_display_client.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClCompile Include="surfaces\surface.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\surface.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClCompile Include="surfaces\surface_aggregator.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\surface_aggregator.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClCompile Include="surfaces\surface_display_output_surface.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\surface_display_output_surface.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClCompile Include="surfaces\surface_factory.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\surface_factory.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClInclude Include="surfaces\surface_factory_client.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClCompile Include="surfaces\surface_hittest.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\surface_hittest.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClInclude Include="surfaces\surface_id.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClCompile Include="surfaces\surface_id_allocator.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\surface_id_allocator.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClCompile Include="surfaces\surface_manager.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\surface_manager.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClCompile Include="surfaces\surface_resource_holder.cc">
<Filter>surfaces</Filter>
</ClCompile>
<ClInclude Include="surfaces\surface_resource_holder.h">
<Filter>surfaces</Filter>
</ClInclude>
<ClInclude Include="surfaces\surfaces_export.h">
<Filter>surfaces</Filter>
</ClInclude>
<None Include="cc.gyp"/>
</ItemGroup>
</Project>
``` | /content/code_sandbox/orig_chrome/cc/cc_surfaces.vcxproj.filters | xml | 2016-09-27T03:41:10 | 2024-08-16T10:42:57 | miniblink49 | weolar/miniblink49 | 7,069 | 1,869 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>16G29</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>AtherosE2200Ethernet</string>
<key>CFBundleIdentifier</key>
<string>com.insanelymac.AtherosE2200Ethernet</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>AtherosE2200Ethernet</string>
<key>CFBundlePackageType</key>
<string>KEXT</string>
<key>CFBundleShortVersionString</key>
<string>2.2.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>2.2.2</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>9A1004</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>17A360</string>
<key>DTSDKName</key>
<string>macosx10.13</string>
<key>DTXcode</key>
<string>0901</string>
<key>DTXcodeBuild</key>
<string>9A1004</string>
<key>IOKitPersonalities</key>
<dict>
<key>AtherosE2200</key>
<dict>
<key>CFBundleIdentifier</key>
<string>com.insanelymac.AtherosE2200Ethernet</string>
<key>Driver_Version</key>
<string>2.2.2</string>
<key>IOClass</key>
<string>AtherosE2200</string>
<key>IOPCIMatch</key>
<string>0x10901969 0x10911969 0x10A01969 0x10A11969 0xE0911969 0xE0A11969 0xE0B11969</string>
<key>IOProbeScore</key>
<integer>1000</integer>
<key>IOProviderClass</key>
<string>IOPCIDevice</string>
<key>enableCSO6</key>
<true/>
<key>enableTSO4</key>
<true/>
<key>enableTSO6</key>
<true/>
<key>maxIntrRate</key>
<integer>6500</integer>
<key>rxPolling</key>
<true/>
</dict>
</dict>
<key>OSBundleLibraries</key>
<dict>
<key>com.apple.iokit.IONetworkingFamily</key>
<string>1.5.0</string>
<key>com.apple.iokit.IOPCIFamily</key>
<string>1.7</string>
<key>com.apple.kpi.bsd</key>
<string>8.10.0</string>
<key>com.apple.kpi.iokit</key>
<string>8.10.0</string>
<key>com.apple.kpi.libkern</key>
<string>8.10.0</string>
<key>com.apple.kpi.mach</key>
<string>8.10.0</string>
</dict>
<key>OSBundleRequired</key>
<string>Network-Root</string>
</dict>
</plist>
``` | /content/code_sandbox/Clover-Configs/XiaoMi/i5-with-fingerprint/CLOVER/kexts/Other/AtherosE2200Ethernet.kext/Contents/Info.plist | xml | 2016-11-05T04:22:54 | 2024-08-12T19:25:53 | Hackintosh-Installer-University | huangyz0918/Hackintosh-Installer-University | 3,937 | 941 |
```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="fo" datatype="plaintext" original="actions.en.xlf">
<body>
<trans-unit id="bEXLcqN" resname="stop">
<source>stop</source>
<target state="translated">Stega</target>
</trans-unit>
<trans-unit id="PEgjRvN" resname="back">
<source>back</source>
<target state="translated">Aftur</target>
</trans-unit>
<trans-unit id="JiEhxTc" resname="edit">
<source>Edit</source>
<target state="translated">Broyt</target>
</trans-unit>
<trans-unit id="4G2jBDS" resname="trash">
<source>trash</source>
<target state="translated">Strika</target>
</trans-unit>
<trans-unit id="hF6RgxM" resname="report">
<source>report</source>
<target state="translated">Melda</target>
</trans-unit>
<trans-unit id="JeK2sQZ" resname="repeat">
<source>repeat</source>
<target state="translated">Byrja umaftur</target>
</trans-unit>
<trans-unit id="J0sRBY_" resname="profile-stats">
<source>profile-stats</source>
<target state="translated">Vangi</target>
</trans-unit>
<trans-unit id="b1pgNOd" resname="copy">
<source>copy</source>
<target state="translated">Stovna avrit</target>
</trans-unit>
<trans-unit id="PBlIO2x" resname="create-project">
<source>create-project</source>
<target state="translated">Stovna verktlan</target>
</trans-unit>
<trans-unit id="Qf.Yt2r" resname="details">
<source>details</source>
<target state="translated">Vs</target>
</trans-unit>
<trans-unit id="aP9j_4L" resname="download">
<source>download</source>
<target state="translated">Heinta</target>
</trans-unit>
<trans-unit id="hHIeqOW" resname="invoice.pending">
<source>invoice.pending</source>
<target state="translated">Bar eftir gjalding</target>
</trans-unit>
<trans-unit id="9M4b2ZN" resname="invoice.paid">
<source>invoice.paid</source>
<target state="translated">Goldi</target>
</trans-unit>
</body>
</file>
</xliff>
``` | /content/code_sandbox/translations/actions.fo.xlf | xml | 2016-10-20T17:06:34 | 2024-08-16T18:27:30 | kimai | kimai/kimai | 3,084 | 661 |
```xml
import assert from 'assert';
import fs from 'fs';
import { globSync } from 'glob';
import * as path from 'path';
import { ResourceKind } from './Resources';
import { UnexpectedError } from '../utils/errors';
import { directoryExistsAsync } from '../utils/modules';
export interface ProjectFile<L extends string = string> {
path: string;
language: L;
contents: string;
}
export type ApplicationProjectFile = ProjectFile<'java' | 'kt'>;
export type GradleProjectFile = ProjectFile<'groovy' | 'kt'>;
export function getProjectFilePath(projectRoot: string, name: string): string {
const filePath = globSync(
path.join(projectRoot, `android/app/src/main/java/**/${name}.@(java|kt)`)
)[0];
assert(
filePath,
`Project file "${name}" does not exist in android project for root "${projectRoot}"`
);
return filePath;
}
function getLanguage(filePath: string): 'java' | 'groovy' | 'kt' {
const extension = path.extname(filePath);
switch (extension) {
case '.java':
return 'java';
case '.kts':
case '.kt':
return 'kt';
case '.groovy':
case '.gradle':
return 'groovy';
default:
throw new UnexpectedError(`Unexpected Android file extension: ${extension}`);
}
}
export function getFileInfo(filePath: string) {
return {
path: path.normalize(filePath),
contents: fs.readFileSync(filePath, 'utf8'),
language: getLanguage(filePath) as any,
};
}
export async function getMainApplicationAsync(
projectRoot: string
): Promise<ApplicationProjectFile> {
const filePath = getProjectFilePath(projectRoot, 'MainApplication');
return getFileInfo(filePath);
}
export async function getMainActivityAsync(projectRoot: string): Promise<ApplicationProjectFile> {
const filePath = getProjectFilePath(projectRoot, 'MainActivity');
return getFileInfo(filePath);
}
export function getGradleFilePath(projectRoot: string, gradleName: string): string {
const groovyPath = path.resolve(projectRoot, `${gradleName}.gradle`);
const ktPath = path.resolve(projectRoot, `${gradleName}.gradle.kts`);
const isGroovy = fs.existsSync(groovyPath);
const isKotlin = !isGroovy && fs.existsSync(ktPath);
if (!isGroovy && !isKotlin) {
throw new Error(`Failed to find '${gradleName}.gradle' file for project: ${projectRoot}.`);
}
const filePath = isGroovy ? groovyPath : ktPath;
return filePath;
}
export function getProjectBuildGradleFilePath(projectRoot: string): string {
return getGradleFilePath(path.join(projectRoot, 'android'), 'build');
}
export async function getProjectBuildGradleAsync(projectRoot: string): Promise<GradleProjectFile> {
return getFileInfo(getProjectBuildGradleFilePath(projectRoot));
}
export function getSettingsGradleFilePath(projectRoot: string): string {
return getGradleFilePath(path.join(projectRoot, 'android'), 'settings');
}
export async function getSettingsGradleAsync(projectRoot: string): Promise<GradleProjectFile> {
return getFileInfo(getSettingsGradleFilePath(projectRoot));
}
export function getAppBuildGradleFilePath(projectRoot: string): string {
return getGradleFilePath(path.join(projectRoot, 'android', 'app'), 'build');
}
export async function getAppBuildGradleAsync(projectRoot: string): Promise<GradleProjectFile> {
return getFileInfo(getAppBuildGradleFilePath(projectRoot));
}
export async function getProjectPathOrThrowAsync(projectRoot: string): Promise<string> {
const projectPath = path.join(projectRoot, 'android');
if (await directoryExistsAsync(projectPath)) {
return projectPath;
}
throw new Error(`Android project folder is missing in project: ${projectRoot}`);
}
export async function getAndroidManifestAsync(projectRoot: string): Promise<string> {
const projectPath = await getProjectPathOrThrowAsync(projectRoot);
const filePath = path.join(projectPath, 'app/src/main/AndroidManifest.xml');
return filePath;
}
export async function getResourceFolderAsync(projectRoot: string): Promise<string> {
const projectPath = await getProjectPathOrThrowAsync(projectRoot);
return path.join(projectPath, `app/src/main/res`);
}
export async function getResourceXMLPathAsync(
projectRoot: string,
{ kind = 'values', name }: { kind?: ResourceKind; name: 'colors' | 'strings' | 'styles' | string }
): Promise<string> {
const resourcePath = await getResourceFolderAsync(projectRoot);
const filePath = path.join(resourcePath, `${kind}/${name}.xml`);
return filePath;
}
``` | /content/code_sandbox/packages/@expo/config-plugins/src/android/Paths.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 1,025 |
```xml
import {PlatformTest} from "@tsed/common";
import {Logger} from "@tsed/logger";
import {TestMongooseContext} from "@tsed/testing-mongoose";
import {User} from "./helpers/entity/User.js";
import {Server} from "./helpers/Server.js";
import {UserService} from "./helpers/services/UserService.js";
import {EntityManager, MikroORM} from "@mikro-orm/core";
import {anyOfClass, anything, reset, spy, verify} from "ts-mockito";
import {UnmanagedEventSubscriber1} from "./helpers/services/UnmanagedEventSubscriber1.js";
import {UnmanagedEventSubscriber2} from "./helpers/services/UnmanagedEventSubscriber2.js";
import {MikroOrmModule, TransactionalInterceptor} from "../src/index.js";
import {Hooks} from "./helpers/services/Hooks.js";
import {defineConfig} from "@mikro-orm/mongodb";
describe("MikroOrm integration", () => {
let spiedLogger!: Logger;
let spiedTransactionalInterceptor!: TransactionalInterceptor;
let spiedHooks!: Hooks;
beforeEach(async () => {
await TestMongooseContext.install({replicaSet: true});
const {url: clientUrl} = await TestMongooseContext.getMongooseOptions();
const bstrp = PlatformTest.bootstrap(Server, {
disableComponentScan: true,
imports: [MikroOrmModule],
mikroOrm: [
defineConfig({
clientUrl,
entities: [User],
subscribers: [UnmanagedEventSubscriber1, new UnmanagedEventSubscriber2()]
}),
defineConfig({
clientUrl,
contextName: "db1",
entities: [User]
}),
defineConfig({
clientUrl,
contextName: "db2",
entities: [User]
})
]
});
await bstrp();
spiedLogger = spy(PlatformTest.get(Logger));
spiedTransactionalInterceptor = spy(PlatformTest.get(TransactionalInterceptor));
spiedHooks = spy(PlatformTest.get(Hooks));
});
afterEach(async () => {
reset<Hooks | TransactionalInterceptor | Logger>(spiedLogger, spiedTransactionalInterceptor, spiedHooks);
await TestMongooseContext.reset();
});
it("should return repository", () => {
const service = PlatformTest.get<UserService>(UserService)!;
expect(service).toBeInstanceOf(UserService);
expect(service.orm).toBeInstanceOf(MikroORM);
expect(service.orm.em.name).toBe("default");
expect(service.em.name).toBe("default");
expect(service.orm1).toBeInstanceOf(MikroORM);
expect(service.orm1.em.name).toBe("db1");
expect(service.em1.name).toBe("db1");
expect(service.orm2).toBeInstanceOf(MikroORM);
expect(service.orm2.em.name).toBe("db2");
expect(service.em2.name).toBe("db2");
expect(service.em3).toEqual(undefined);
});
it("should create a request context", async () => {
const service = PlatformTest.get<UserService>(UserService)!;
await service.create({email: "test@example.com"});
verify(spiedTransactionalInterceptor.intercept(anything(), anything())).once();
});
it("should resolve the configured subscribers", async () => {
const service = PlatformTest.get<UserService>(UserService)!;
await service.create({email: "test@example.com"});
verify(spiedLogger.info("Changes has been flushed.")).thrice();
});
it("should emit the $afterTransactionCommit event", async () => {
const service = PlatformTest.get<UserService>(UserService)!;
await service.create({email: "test@example.com"});
verify(spiedHooks.$afterTransactionCommit(anyOfClass(EntityManager))).calledAfter(
spiedHooks.$beforeTransactionCommit(anyOfClass(EntityManager))
);
});
});
``` | /content/code_sandbox/packages/orm/mikro-orm/test/integration.spec.ts | xml | 2016-02-21T18:38:47 | 2024-08-14T21:19:48 | tsed | tsedio/tsed | 2,817 | 819 |
```xml
import {DecoratorTypes, UnsupportedDecoratorType} from "@tsed/core";
import {JsonEntityFn} from "@tsed/schema";
/**
* Mounts the specified middleware function or functions at the specified path: the middleware function is executed when
* the base of the requested path matches `path.
*
* ```typescript
* @Controller('/')
* @UseAfter(Middleware1)
* export class Ctrl {
*
* @Get('/')
* @UseAfter(Middleware2)
* get() { }
* }
* ```
*
* @returns {function(any, any, any): *}
* @param args
* @decorator
* @operation
*/
export function UseAfter(...args: any[]): Function {
return JsonEntityFn((entity, parameters) => {
switch (entity.decoratorType) {
case DecoratorTypes.METHOD:
const endpoint = entity;
endpoint.afterMiddlewares = args.concat(endpoint.afterMiddlewares);
break;
case DecoratorTypes.CLASS:
const middlewares = entity.store.get("middlewares") || {};
entity.store.set("middlewares", {
...middlewares,
useAfter: [...args, ...(middlewares.useAfter || [])]
});
break;
default:
throw new UnsupportedDecoratorType(UseAfter, parameters);
}
});
}
``` | /content/code_sandbox/packages/platform/platform-middlewares/src/decorators/useAfter.ts | xml | 2016-02-21T18:38:47 | 2024-08-14T21:19:48 | tsed | tsedio/tsed | 2,817 | 270 |
```xml
export default {
cancelText: '',
};
``` | /content/code_sandbox/packages/zarm/src/action-sheet/locale/zh_CN.tsx | xml | 2016-07-13T11:45:37 | 2024-08-12T19:23:48 | zarm | ZhongAnTech/zarm | 1,707 | 10 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<OutputType>Exe</OutputType>
<ApplicationTitle>MySimpleApp</ApplicationTitle>
<ApplicationId>com.xamarin.mysimpleapp</ApplicationId>
<ApplicationVersion>3.14</ApplicationVersion>
</PropertyGroup>
<Import Project="../../common/shared-dotnet.csproj" />
<ItemGroup>
<Compile Include="../*.cs" />
</ItemGroup>
</Project>
``` | /content/code_sandbox/tests/dotnet/MySimpleApp/shared.csproj | xml | 2016-04-20T18:24:26 | 2024-08-16T13:29:19 | xamarin-macios | xamarin/xamarin-macios | 2,436 | 115 |
```xml
import { stateAndDispatch } from "../state";
import { setEvalResult } from "./setEvalResult";
// This will set the notes for a given criteria instance id. If notes is undefined, it will clear them.
export function setEvalResultNotes(criteriaId: string, notes: string) {
const { state: teacherTool, dispatch } = stateAndDispatch();
const newCriteriaEvalResult = {
...teacherTool.evalResults[criteriaId],
notes,
};
setEvalResult(criteriaId, newCriteriaEvalResult);
}
``` | /content/code_sandbox/teachertool/src/transforms/setEvalResultNotes.ts | xml | 2016-01-24T19:35:52 | 2024-08-16T16:39:39 | pxt | microsoft/pxt | 2,069 | 113 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="path_to_url">
<item android:color="@color/button_green_text_disabled" android:state_enabled="false"/>
<item android:color="@color/button_green_text" android:state_window_focused="false"/>
<item android:color="@color/button_green_text_pressed" android:state_pressed="true"/>
<item android:color="@color/button_green_text" android:state_selected="true"/>
<item android:color="@color/button_green_text" android:state_activated="true"/>
<item android:color="@color/button_green_text"/>
<!-- not selected -->
</selector>
``` | /content/code_sandbox/app/src/main/res/drawable/selector_btn_green_text.xml | xml | 2016-08-08T10:52:58 | 2024-07-13T02:47:52 | Onboarding | eoinfogarty/Onboarding | 1,491 | 145 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.