text
stringlengths
9
39.2M
dir
stringlengths
26
295
lang
stringclasses
185 values
created_date
timestamp[us]
updated_date
timestamp[us]
repo_name
stringlengths
1
97
repo_full_name
stringlengths
7
106
star
int64
1k
183k
len_tokens
int64
1
13.8M
```xml import React from 'react'; import { Point } from './Common.types'; /** * Marker specific props. */ export type BaseMarkerOptions = { /** * Id of the marker or cluster, should be unique. * If no id is specified then marker-related events won't fire for that particular marker or cluster. */ id?: string; /** * Title of the marker, avaliable in annotation box. */ markerTitle?: string; /** * Short description of the marker, avaliable in annotation box. */ markerSnippet?: string; /** * Custom marker icon. */ icon?: string; /** * Color of a marker when icon is not provided. * * Accepted formats: * * `'#RRGGBB'` * * `'#RRGGBBAA'` * * `'#RGB'` * * `'#RGBA'` * * 'red' * * 'blue' * * 'green' * * 'black' * * 'white' * * 'gray' * * 'cyan' * * 'magenta' * * 'yellow' * * 'lightgray' * * 'darkgray' * * 'grey' * * 'aqua' * * 'fuchsia' * * 'lime' * * 'maroon' * * 'navy' * * 'olive' * * 'purple' * * 'silver' * * 'teal' * @default 'red' */ color?: string; /** * Opacity of a marker's icon, applied both to asset based icon * as well as to default marker's icon. */ opacity?: number; }; export type MarkerOptions = { /** * If 'true' marker is draggable, clustered markers can't be dragged. * * @default false */ draggable?: boolean; /** * Translation of latitude coordinate. */ anchorU?: number; /** * Translation of longitude coordinate. */ anchorV?: number; } & BaseMarkerOptions; /** * Props of Marker component of Expo Maps library. */ export type MarkerProps = MarkerOptions & Point; /** * Internal JSON object for representing markers in Expo Maps library. * * See {@link MarkerProps} for more details. */ export type MarkerObject = { type: 'marker'; } & MarkerOptions & Point; /** * Marker component of Expo Maps library. * * Draws customizable marker on ExpoMap. * This component should be ExpoMap component child to work properly. * * See {@link MarkerProps} for more details. */ export class Marker extends React.Component<MarkerProps> { render() { return null; } } ```
/content/code_sandbox/packages/expo-maps/src/Marker.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
596
```xml <project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <modelVersion>4.0.0</modelVersion> <name>Flowable - Process Validation</name> <artifactId>flowable-process-validation</artifactId> <packaging>jar</packaging> <parent> <groupId>org.flowable</groupId> <artifactId>flowable-root</artifactId> <relativePath>../..</relativePath> <version>7.1.0-SNAPSHOT</version> </parent> <properties> <flowable.artifact> org.flowable.validation </flowable.artifact> </properties> <build> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**/*.*</include> </includes> </resource> </resources> <plugins> <plugin> <artifactId>maven-jar-plugin</artifactId> <configuration> <archive> <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> </archive> </configuration> </plugin> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>cleanVersions</goal> </goals> </execution> <execution> <id>bundle-manifest</id> <phase>process-classes</phase> <goals> <goal>manifest</goal> </goals> </execution> </executions> </plugin> </plugins> <pluginManagement> <plugins> <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. --> <plugin> <groupId>org.eclipse.m2e</groupId> <artifactId>lifecycle-mapping</artifactId> <version>1.0.0</version> <configuration> <lifecycleMappingMetadata> <pluginExecutions> <pluginExecution> <pluginExecutionFilter> <groupId>org.apache.felix</groupId> <artifactId> maven-bundle-plugin </artifactId> <versionRange> [2.1.0,) </versionRange> <goals> <goal>cleanVersions</goal> <goal>manifest</goal> </goals> </pluginExecutionFilter> <action> <ignore></ignore> </action> </pluginExecution> </pluginExecutions> </lifecycleMappingMetadata> </configuration> </plugin> </plugins> </pluginManagement> </build> <dependencies> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-bpmn-model</artifactId> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> </dependency> </dependencies> </project> ```
/content/code_sandbox/modules/flowable-process-validation/pom.xml
xml
2016-10-13T07:21:43
2024-08-16T15:23:14
flowable-engine
flowable/flowable-engine
7,715
790
```xml import React from 'react'; import renderHydrogen from '@shopify/hydrogen/entry-server'; import {Router, FileRoutes, ShopifyProvider} from '@shopify/hydrogen'; import {Suspense} from 'react'; function App() { return ( <Suspense fallback={null}> <ShopifyProvider> <Router> <FileRoutes /> </Router> </ShopifyProvider> </Suspense> ); } export default renderHydrogen(App); ```
/content/code_sandbox/packages/hydrogen/test/fixtures/hello-world-ts/src/App.server.tsx
xml
2016-09-09T01:12:08
2024-08-16T17:39:45
vercel
vercel/vercel
12,545
106
```xml // // // Microsoft Bot Framework: path_to_url // // Bot Framework Emulator Github: // path_to_url // // All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // export * from './sharedConstants'; ```
/content/code_sandbox/packages/app/shared/src/constants/index.ts
xml
2016-11-11T23:15:09
2024-08-16T12:45:29
BotFramework-Emulator
microsoft/BotFramework-Emulator
1,803
261
```xml import React from 'dom-chef'; import {$, elementExists} from 'select-dom'; import * as pageDetect from 'github-url-detection'; import delegate, {DelegateEvent} from 'delegate-it'; import CheckIcon from 'octicons-plain-react/Check'; import features from '../feature-manager.js'; import observe from '../helpers/selector-observer.js'; import api from '../github-helpers/api.js'; import {getBranches} from '../github-helpers/pr-branches.js'; import getPrInfo from '../github-helpers/get-pr-info.js'; import showToast from '../github-helpers/toast.js'; import {getConversationNumber} from '../github-helpers/index.js'; import createMergeabilityRow from '../github-widgets/mergeability-row.js'; import {expectToken} from '../github-helpers/github-token.js'; const canNativelyUpdate = '.js-update-branch-form'; async function mergeBranches(): Promise<AnyObject> { return api.v3(`pulls/${getConversationNumber()!}/update-branch`, { method: 'PUT', ignoreHTTPStatus: true, }); } async function handler({delegateTarget: button}: DelegateEvent<MouseEvent, HTMLButtonElement>): Promise<void> { button.disabled = true; await showToast(async () => { // eslint-disable-next-line @typescript-eslint/use-unknown-in-catch-callback-variable -- TODO without assertions const response = await mergeBranches().catch(error => error); if (response instanceof Error || !response.ok) { features.log.error(import.meta.url, response); // Reads Error#message or GitHubs "message" response throw new Error(`Error updating the branch: ${response.message as string}`); } }, { message: 'Updating branch', doneMessage: 'Branch updated', }); button.remove(); } function createButton(): JSX.Element { return ( <button type="button" className="btn btn-sm rgh-update-pr-from-base-branch tooltipped tooltipped-sw" aria-label="Use Refined GitHub to update the PR from the base branch" > Update branch </button> ); } async function addButton(mergeBar: Element): Promise<void> { if (elementExists(canNativelyUpdate)) { return; } const {base} = getBranches(); const prInfo = await getPrInfo(base.relative); if (!prInfo.needsUpdate || !(prInfo.viewerCanUpdate || prInfo.viewerCanEditFiles) || prInfo.mergeable === 'CONFLICTING') { return; } const mergeabilityRow = $('.branch-action-item:has(.merging-body)')!; if (mergeabilityRow) { // The PR is not a draft mergeabilityRow.prepend( <div className="branch-action-btn float-right js-immediate-updates js-needs-timeline-marker-header" > {createButton()} </div>, ); return; } // The PR is still a draft mergeBar.before(createMergeabilityRow({ className: 'rgh-update-pr-from-base-branch-row', action: createButton(), icon: <CheckIcon/>, iconClass: 'completeness-indicator-success', heading: 'This branch has no conflicts with the base branch', meta: 'Merging can be performed automatically.', })); } async function init(signal: AbortSignal): Promise<false | void> { await expectToken(); delegate('.rgh-update-pr-from-base-branch', 'click', handler, {signal}); observe('.mergeability-details > *:last-child', addButton, {signal}); } void features.add(import.meta.url, { include: [ pageDetect.isPRConversation, ], exclude: [ pageDetect.isClosedPR, () => $('.head-ref')!.title === 'This repository has been deleted', ], awaitDomReady: true, // DOM-based exclusions init, }); /* Test URLs PR without conflicts path_to_url Draft PR without conflicts path_to_url Native "Update branch" button (pick a conflict-free PR from path_to_url Native "Resolve conflicts" button path_to_url Cross-repo PR with long branch names path_to_url PRs to repos without write access, find one among your own PRs here: path_to_url */ ```
/content/code_sandbox/source/features/update-pr-from-base-branch.tsx
xml
2016-02-15T16:45:02
2024-08-16T18:39:26
refined-github
refined-github/refined-github
24,013
927
```xml import "reflect-metadata" import { expect } from "chai" import { closeTestingConnections, createTestingConnections, reloadTestingDatabases, } from "../../utils/test-utils" import { DataSource } from "../../../src/data-source/DataSource" import { User } from "./entity/User" describe("github issues > #9910 Incorrect behaivor of 'alwaysEnabled: true' after change from issue #9023", () => { let connections: DataSource[] before( async () => (connections = await createTestingConnections({ entities: [__dirname + "/entity/*{.js,.ts}"], cache: { alwaysEnabled: true, }, })), ) beforeEach(() => reloadTestingDatabases(connections)) after(() => closeTestingConnections(connections)) it("should automatically cache if alwaysEnabled", () => Promise.all( connections.map(async (connection) => { if (connection.driver.options.type === "spanner") { return } const user1 = new User() user1.name = "Foo" await connection.manager.save(user1) const users1 = await connection .createQueryBuilder(User, "user") .getMany() expect(users1.length).to.be.equal(1) const user2 = new User() user2.name = "Bar" await connection.manager.save(user2) // result should be cached and second user should not be retrieved const users2 = await connection .createQueryBuilder(User, "user") .getMany() expect(users2.length).to.be.equal(1) // with cache explicitly disabled, the second user should be retrieved const users3 = await connection .createQueryBuilder(User, "user") .cache(false) .getMany() expect(users3.length).to.be.equal(2) }), )) }) ```
/content/code_sandbox/test/github-issues/9910/issue-9910.ts
xml
2016-02-29T07:41:14
2024-08-16T18:28:52
typeorm
typeorm/typeorm
33,875
394
```xml import {Adapters} from "@tsed/adapters"; import {IORedisTest, registerConnectionProvider} from "@tsed/ioredis"; import Redis from "ioredis"; // @ts-ignore import IORedisMock from "ioredis-mock"; import moment from "moment"; import {OIDCRedisAdapter} from "./OIDCRedisAdapter.js"; const REDIS_CONNECTION = Symbol.for("redis_connection"); registerConnectionProvider({ provide: REDIS_CONNECTION }); function createAdapterFixture(collectionName: string) { const adapter = IORedisTest.get<Adapters>(Adapters).invokeAdapter({ collectionName, model: Object, adapter: OIDCRedisAdapter }) as OIDCRedisAdapter<any>; const redis = IORedisTest.get<Redis>(REDIS_CONNECTION); return {adapter, redis}; } async function createInitialDBFixture() { const {adapter} = await createAdapterFixture("AccessToken"); const payload = { grantId: "grantId", userCode: "userCode", uid: "uid", _id: "id" }; await adapter.upsert("id", payload); return adapter; } describe("OIDCRedisAdapter", () => { beforeEach(() => IORedisTest.create()); afterEach(() => IORedisTest.reset()); describe("onInsert()", () => { it("should test if the table is grantable and add index for grantId and the current payload", async () => { const {adapter, redis} = await createAdapterFixture("AccessToken"); const payload = { grantId: "grantId", userCode: "userCode", uid: "uid", _id: "id" }; await adapter.upsert("id", payload); const keys = await redis.keys("$oidc:*"); expect(await redis.get("$oidc:grant:grantId")).toEqual(["AccessToken:id"]); expect(keys).toEqual(["$oidc:grant:grantId", "$oidc:userCode:userCode", "$oidc:uid:uid"]); }); it("should set the expiration ttl", async () => { const {adapter, redis} = await createAdapterFixture("AccessToken"); const payload = { grantId: "grantId", userCode: "userCode", uid: "uid", _id: "id" }; await adapter.upsert("id", payload, moment().add(2, "days").toDate()); const ttl = await redis.ttl("$oidc:grant:grantId"); expect(ttl).toBeGreaterThan(100000); }); it("should create grant indexes if the payload type isn't grantable", async () => { const {adapter, redis} = await createAdapterFixture("Other"); const payload = { grantId: "grantId", userCode: "userCode", uid: "uid", _id: "id" }; await adapter.upsert("id", payload); const keys = await redis.keys("$oidc:*"); expect(keys).toEqual(["$oidc:userCode:userCode", "$oidc:uid:uid"]); }); }); describe("findByUid()", () => { it("should retrieve the payload by his uid", async () => { const adapter = await createInitialDBFixture(); const result = await adapter.findByUid("uid"); expect(result).toEqual({ _id: "id", grantId: "grantId", uid: "uid", userCode: "userCode" }); }); it("should not retrieve the payload by his uid", async () => { const adapter = await createInitialDBFixture(); const result = await adapter.findByUid("wrong"); expect(result).toEqual(null); }); }); describe("findByUserCode()", () => { it("should retrieve the payload by his userCode", async () => { const adapter = await createInitialDBFixture(); const result = await adapter.findByUserCode("userCode"); expect(result).toEqual({ _id: "id", grantId: "grantId", uid: "uid", userCode: "userCode" }); }); it("should not retrieve the payload by his userCode", async () => { const adapter = await createInitialDBFixture(); const result = await adapter.findByUserCode("wrong"); expect(result).toEqual(null); }); }); describe("destroy()", () => { it("should retrieve the payload by his userCode", async () => { const adapter = await createInitialDBFixture(); await adapter.destroy("id"); const result = await adapter.findById("id"); expect(result).toEqual(undefined); }); }); describe("revokeGrantId()", () => { it("should retrieve the payload by his userCode", async () => { const adapter = await createInitialDBFixture(); const keys = await adapter.db.lrange("$oidc:grant:grantId", 0, -1); expect(keys).toEqual(["AccessToken:id"]); expect(await adapter.db.get("AccessToken:id")).toEqual('{"grantId":"grantId","userCode":"userCode","uid":"uid","_id":"id"}'); expect(await adapter.db.get("$oidc:grant:grantId")).toEqual(["AccessToken:id"]); await adapter.revokeByGrantId("grantId"); expect(await adapter.db.get("AccessToken:id")).toEqual(null); expect(await adapter.db.get("$oidc:grant:grantId")).toEqual(null); }); }); describe("consumes()", () => { it("should set a consume flag in redis", async () => { const {adapter} = await createAdapterFixture("AuthorizationCode"); await adapter.consume("codeId"); const result = await adapter.db.hget("AuthorizationCode:codeId", "consumed"); expect(!isNaN(Number(result))).toBe(true); }); }); }); ```
/content/code_sandbox/packages/orm/adapters-redis/src/adapters/OIDCRedisAdapter.spec.ts
xml
2016-02-21T18:38:47
2024-08-14T21:19:48
tsed
tsedio/tsed
2,817
1,257
```xml <vector xmlns:android="path_to_url" android:width="320dp" android:height="96dp" android:viewportWidth="320" android:viewportHeight="96"> <path android:pathData="m-3,52v48h92c-40,0 -56,-40 -88,-48h-4zM321,52c-32,8 -48,48 -88,48h92v-48h-4z" android:strokeWidth="6" android:fillColor="#bea288" android:strokeColor="#82a04e"/> <path android:pathData="M204,48h16v52h-16z" android:strokeWidth="2" android:fillColor="#E0D8D8" android:strokeColor="#916F6F"/> <path android:pathData="M100,48h16v52h-16z" android:strokeWidth="2" android:fillColor="#E0D8D8" android:strokeColor="#916F6F"/> <path android:pathData="m29.621,10.828 l-3.621,1.172v36h4v-29.814l22.379,30.986h3.242l22.379,-30.986v29.814h4v-36l-3.621,-1.172 -22.379,30.986v-29.814h-4v29.814l-22.379,-30.986zM135.621,10.828 L132,12v36h4v-29.814l22.379,30.986h3.242l22.379,-30.986v29.814h4v-36l-3.621,-1.172 -22.379,30.986v-29.814h-4v29.814l-22.379,-30.986zM241.621,10.828 L238,12v36h4v-29.814l22.379,30.986h3.242l22.379,-30.986v29.814h4v-36l-3.621,-1.172 -22.379,30.986v-29.814h-4v29.814l-22.379,-30.986z" android:strokeWidth="2" android:fillColor="#e44848" android:strokeColor="#a00"/> <path android:pathData="m26.572,9 l-26.9,33.107 -1.893,2.33 4.658,3.783 1.891,-2.328 25.1,-30.893h49.145l25.1,30.893h6.656l25.1,-30.893h49.145l25.1,30.893h6.656l25.1,-30.893h49.145l25.1,30.893 1.891,2.328 4.658,-3.783 -1.893,-2.33 -26.9,-33.107h-54.855l-25.572,31.473 -25.572,-31.473h-54.855l-25.572,31.473 -25.572,-31.473z" android:strokeWidth="2" android:fillColor="#e44848" android:strokeColor="#a00" android:strokeLineCap="square"/> <path android:pathData="M-4,44h328v8h-328z" android:strokeWidth="2" android:fillColor="#E0D8D8" android:strokeColor="#916F6F"/> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/ic_bridge_structure_truss.xml
xml
2016-07-02T10:44:04
2024-08-16T18:55:54
StreetComplete
streetcomplete/StreetComplete
3,781
835
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <resources> <string name="side_sheet_accessibility_pane_title">Feuille latrale</string> </resources> ```
/content/code_sandbox/lib/java/com/google/android/material/sidesheet/res/values-fr-rCA/strings.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
90
```xml <?xml version="1.0" encoding="UTF-8"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22505" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES"> <device id="retina4_7" orientation="portrait" appearance="light"/> <dependencies> <deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22504"/> <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/> </dependencies> <scenes> <!--Activities View Controller--> <scene sceneID="3xy-hf-S1V"> <objects> <tableViewController storyboardIdentifier="ActivitiesViewController" definesPresentationContext="YES" id="tvn-h8-peN" customClass="ActivitiesViewController" customModule="Kickstarter_Framework" customModuleProvider="target" sceneMemberID="viewController"> <tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="44" sectionHeaderHeight="28" sectionFooterHeight="28" id="2ep-oh-IdZ"> <rect key="frame" x="0.0" y="0.0" width="400" height="1900"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" red="0.94901960784313721" green="0.94901960784313721" blue="0.94901960784313721" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <prototypes> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ActivityProjectStatusCell" rowHeight="321" id="Hzx-aM-zE3" userLabel="Success" customClass="ActivityProjectStatusCell" customModule="Kickstarter_Framework" customModuleProvider="target"> <rect key="frame" x="0.0" y="50" width="400" height="321"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Hzx-aM-zE3" id="soh-SV-0mP"> <rect key="frame" x="0.0" y="0.0" width="400" height="321"/> <autoresizingMask key="autoresizingMask"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="H0b-7i-vhk"> <rect key="frame" x="19" y="11" width="362" height="299"/> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XOw-uw-7h5" userLabel="Card View"> <rect key="frame" x="20" y="12" width="360" height="197"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="197" id="IoR-Fk-p8l"/> </constraints> </view> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="a69-hw-39E" userLabel="Project image"> <rect key="frame" x="20" y="12" width="360" height="197"/> </imageView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AX7-E6-u6H"> <rect key="frame" x="28" y="-1" width="16.5" height="32.5"/> <color key="backgroundColor" red="0.1450980392" green="0.79607843140000001" blue="0.40784313729999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ENh-bG-4l9"> <rect key="frame" x="34" y="5" width="4.5" height="20.5"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95294117649999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <view alpha="0.95999999999999996" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xZe-M3-UVc" userLabel="Text Background View"> <rect key="frame" x="20" y="209" width="360" height="100"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="YhF-yP-wuS"> <rect key="frame" x="8" y="8" width="344" height="84"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalCompressionResistancePriority="1000" text="Bjork Swan Dress " lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2bd-l0-V3a" userLabel="Project name"> <rect key="frame" x="0.0" y="0.0" width="344" height="26.5"/> <fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="CGg-rb-rXg" userLabel="Funding Stack View"> <rect key="frame" x="0.0" y="38.5" width="344" height="45.5"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="OZd-cW-cLB"> <rect key="frame" x="0.0" y="21.5" width="50" height="3"/> <subviews> <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="FPQ-gl-gFU"> <rect key="frame" x="0.0" y="0.0" width="70.5" height="2"/> <color key="backgroundColor" red="0.1450980392" green="0.79607843140000001" blue="0.40784313729999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </view> </subviews> <color key="backgroundColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="bottom" secondItem="FPQ-gl-gFU" secondAttribute="bottom" id="1aY-rl-VDT"/> <constraint firstItem="FPQ-gl-gFU" firstAttribute="top" secondItem="OZd-cW-cLB" secondAttribute="top" id="RTt-Rs-DXl"/> <constraint firstAttribute="trailing" secondItem="FPQ-gl-gFU" secondAttribute="trailing" id="YkB-YB-AXK"/> <constraint firstItem="FPQ-gl-gFU" firstAttribute="leading" secondItem="OZd-cW-cLB" secondAttribute="leading" id="kuE-dl-t8f"/> <constraint firstAttribute="height" constant="3" id="u1X-fQ-arM"/> </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" horizontalCompressionResistancePriority="1000" text="120% funded" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jH5-2y-qF0"> <rect key="frame" x="68" y="12.5" width="276" height="20.5"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> </stackView> </subviews> </stackView> </subviews> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="bottomMargin" secondItem="YhF-yP-wuS" secondAttribute="bottom" id="5IZ-tC-bZw"/> <constraint firstAttribute="topMargin" secondItem="YhF-yP-wuS" secondAttribute="top" id="IBQ-p4-CpM"/> <constraint firstItem="YhF-yP-wuS" firstAttribute="leading" secondItem="xZe-M3-UVc" secondAttribute="leadingMargin" id="VF7-am-755"/> <constraint firstAttribute="trailingMargin" secondItem="YhF-yP-wuS" secondAttribute="trailing" id="Wvc-u7-vhO"/> </constraints> </view> </subviews> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstItem="H0b-7i-vhk" firstAttribute="leading" secondItem="XOw-uw-7h5" secondAttribute="leading" constant="-1" id="02Z-ao-rBi"/> <constraint firstItem="XOw-uw-7h5" firstAttribute="top" secondItem="soh-SV-0mP" secondAttribute="topMargin" constant="1" id="1DZ-Qw-V0p"/> <constraint firstAttribute="bottomMargin" secondItem="xZe-M3-UVc" secondAttribute="bottom" constant="1" id="4dJ-OS-5Y8"/> <constraint firstItem="XOw-uw-7h5" firstAttribute="leading" secondItem="soh-SV-0mP" secondAttribute="leadingMargin" id="8j9-DA-F5I"/> <constraint firstItem="AX7-E6-u6H" firstAttribute="width" secondItem="ENh-bG-4l9" secondAttribute="width" constant="12" id="DPQ-Fi-Beb"/> <constraint firstItem="xZe-M3-UVc" firstAttribute="top" secondItem="XOw-uw-7h5" secondAttribute="bottom" id="DzC-kk-R9c"/> <constraint firstItem="xZe-M3-UVc" firstAttribute="trailing" secondItem="XOw-uw-7h5" secondAttribute="trailing" id="ExH-an-uN7"/> <constraint firstAttribute="bottomMargin" relation="greaterThanOrEqual" secondItem="XOw-uw-7h5" secondAttribute="bottom" id="IKL-9O-ojC"/> <constraint firstItem="XOw-uw-7h5" firstAttribute="trailing" secondItem="soh-SV-0mP" secondAttribute="trailingMargin" id="Jlg-Xc-V91"/> <constraint firstItem="ENh-bG-4l9" firstAttribute="top" secondItem="AX7-E6-u6H" secondAttribute="top" constant="6" id="QFQ-6c-ZKW"/> <constraint firstItem="a69-hw-39E" firstAttribute="top" secondItem="XOw-uw-7h5" secondAttribute="top" id="WQa-OS-RX0"/> <constraint firstItem="AX7-E6-u6H" firstAttribute="height" secondItem="ENh-bG-4l9" secondAttribute="height" constant="12" id="ctq-2V-N8m"/> <constraint firstItem="AX7-E6-u6H" firstAttribute="leading" secondItem="YhF-yP-wuS" secondAttribute="leading" id="fkn-hZ-FbO"/> <constraint firstItem="H0b-7i-vhk" firstAttribute="trailing" secondItem="XOw-uw-7h5" secondAttribute="trailing" constant="1" id="hOd-G9-Hdb"/> <constraint firstItem="a69-hw-39E" firstAttribute="bottom" secondItem="XOw-uw-7h5" secondAttribute="bottom" id="hp1-Pm-UEg"/> <constraint firstItem="a69-hw-39E" firstAttribute="leading" secondItem="XOw-uw-7h5" secondAttribute="leading" id="idW-0Z-rJE"/> <constraint firstItem="AX7-E6-u6H" firstAttribute="top" secondItem="soh-SV-0mP" secondAttribute="topMargin" constant="-12" id="kff-2A-Oi8"/> <constraint firstItem="ENh-bG-4l9" firstAttribute="leading" secondItem="AX7-E6-u6H" secondAttribute="leading" constant="6" id="np9-up-eu2"/> <constraint firstItem="a69-hw-39E" firstAttribute="trailing" secondItem="XOw-uw-7h5" secondAttribute="trailing" id="rdT-Kg-uHP"/> <constraint firstAttribute="bottomMargin" secondItem="H0b-7i-vhk" secondAttribute="bottom" id="ugc-1O-mHQ"/> <constraint firstItem="xZe-M3-UVc" firstAttribute="leading" secondItem="XOw-uw-7h5" secondAttribute="leading" id="xWz-ct-H6k"/> <constraint firstItem="H0b-7i-vhk" firstAttribute="top" secondItem="soh-SV-0mP" secondAttribute="topMargin" id="zk4-RH-fI8"/> </constraints> </tableViewCellContentView> <color key="backgroundColor" red="0.89870691299438477" green="0.89870691299438477" blue="0.89870691299438477" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <connections> <outlet property="cardView" destination="XOw-uw-7h5" id="iHq-Ps-qJT"/> <outlet property="containerView" destination="H0b-7i-vhk" id="gHP-BZ-tn4"/> <outlet property="fundingProgressBarView" destination="FPQ-gl-gFU" id="w2c-CB-4z4"/> <outlet property="fundingProgressContainerView" destination="OZd-cW-cLB" id="bMA-Wl-OP3"/> <outlet property="fundingProgressLabel" destination="jH5-2y-qF0" id="9zl-I2-fR2"/> <outlet property="metadataBackgroundView" destination="AX7-E6-u6H" id="VLt-gC-agI"/> <outlet property="metadataLabel" destination="ENh-bG-4l9" id="3od-VN-IOb"/> <outlet property="projectImageView" destination="a69-hw-39E" id="1hQ-oI-oN3"/> <outlet property="projectNameLabel" destination="2bd-l0-V3a" id="eZj-rg-V4r"/> <outlet property="textBackgroundView" destination="xZe-M3-UVc" id="hcd-R8-kJW"/> </connections> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="Padding2" rowHeight="22" id="Ehm-aL-O7O" userLabel="---padding---"> <rect key="frame" x="0.0" y="371" width="400" height="22"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Ehm-aL-O7O" id="Q5L-WB-RRf"> <rect key="frame" x="0.0" y="0.0" width="400" height="22"/> <autoresizingMask key="autoresizingMask"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCellContentView> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ActivityFriendFollowCell" rowHeight="100" id="I3Q-Yo-ejp" userLabel="Friend Follow" customClass="ActivityFriendFollowCell" customModule="Kickstarter_Framework" customModuleProvider="target"> <rect key="frame" x="0.0" y="393" width="400" height="100"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="I3Q-Yo-ejp" id="XXL-GY-0wQ"> <rect key="frame" x="0.0" y="0.0" width="400" height="100"/> <autoresizingMask key="autoresizingMask"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Vz1-ta-ikE"> <rect key="frame" x="20" y="16" width="360" height="68"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4ZS-Uj-4La"> <rect key="frame" x="21" y="17" width="358" height="66"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="kly-4t-f6l"> <rect key="frame" x="8" y="8" width="342" height="50"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="O8h-S0-xe1" userLabel="Friend avatar" customClass="CircleAvatarImageView" customModule="Library"> <rect key="frame" x="0.0" y="12.5" width="25" height="25"/> <constraints> <constraint firstAttribute="width" constant="25" id="1lv-4r-paz"/> <constraint firstAttribute="width" secondItem="O8h-S0-xe1" secondAttribute="height" multiplier="1:1" id="gm8-5C-MEX"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.69999999999999996" translatesAutoresizingMaskIntoConstraints="NO" id="eef-El-PXt" userLabel="Friend label"> <rect key="frame" x="37" y="16" width="261" height="18"/> <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="1000" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="XtT-ao-aqM" userLabel="Follow button"> <rect key="frame" x="310" y="8" width="32" height="34"/> <inset key="contentEdgeInsets" minX="16" minY="8" maxX="16" maxY="8"/> </button> </subviews> </stackView> </subviews> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="bottomMargin" secondItem="kly-4t-f6l" secondAttribute="bottom" id="1YO-RO-wNC"/> <constraint firstItem="kly-4t-f6l" firstAttribute="leading" secondItem="4ZS-Uj-4La" secondAttribute="leadingMargin" id="27B-iT-ucX"/> <constraint firstItem="kly-4t-f6l" firstAttribute="top" secondItem="4ZS-Uj-4La" secondAttribute="topMargin" id="c4o-cZ-hIf"/> <constraint firstAttribute="trailingMargin" secondItem="kly-4t-f6l" secondAttribute="trailing" id="fvJ-BP-NN1"/> </constraints> </view> </subviews> <constraints> <constraint firstAttribute="bottomMargin" secondItem="4ZS-Uj-4La" secondAttribute="bottom" constant="1" id="8h0-qv-FNb"/> <constraint firstItem="4ZS-Uj-4La" firstAttribute="top" secondItem="XXL-GY-0wQ" secondAttribute="topMargin" constant="1" id="NuA-w4-9NL"/> <constraint firstItem="Vz1-ta-ikE" firstAttribute="top" secondItem="XXL-GY-0wQ" secondAttribute="topMargin" id="OAn-pc-UNd"/> <constraint firstAttribute="trailingMargin" secondItem="4ZS-Uj-4La" secondAttribute="trailing" constant="1" id="eny-Vh-gPv"/> <constraint firstItem="Vz1-ta-ikE" firstAttribute="leading" secondItem="XXL-GY-0wQ" secondAttribute="leadingMargin" id="iWM-gT-Z4b"/> <constraint firstAttribute="bottomMargin" secondItem="Vz1-ta-ikE" secondAttribute="bottom" id="wwL-nU-18z"/> <constraint firstItem="4ZS-Uj-4La" firstAttribute="leading" secondItem="XXL-GY-0wQ" secondAttribute="leadingMargin" constant="1" id="z9O-AY-iGW"/> <constraint firstAttribute="trailingMargin" secondItem="Vz1-ta-ikE" secondAttribute="trailing" id="zDv-s0-xK9"/> </constraints> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCellContentView> <connections> <outlet property="cardView" destination="Vz1-ta-ikE" id="gzW-gj-ClB"/> <outlet property="containerView" destination="4ZS-Uj-4La" id="1P7-KN-Fwg"/> <outlet property="followButton" destination="XtT-ao-aqM" id="yyH-IY-a66"/> <outlet property="friendImageView" destination="O8h-S0-xe1" id="ayS-qp-wmC"/> <outlet property="friendLabel" destination="eef-El-PXt" id="Sg6-Kj-Pn0"/> </connections> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="Padding3" rowHeight="32" id="Zeb-S9-kS4" userLabel="---padding---"> <rect key="frame" x="0.0" y="493" width="400" height="32"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Zeb-S9-kS4" id="4do-ov-xnh"> <rect key="frame" x="0.0" y="0.0" width="400" height="32"/> <autoresizingMask key="autoresizingMask"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCellContentView> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ActivityFriendBackingCell" rowHeight="326" id="Um1-5C-c6F" userLabel="Friend Backing" customClass="ActivityFriendBackingCell" customModule="Kickstarter_Framework" customModuleProvider="target"> <rect key="frame" x="0.0" y="525" width="400" height="326"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Um1-5C-c6F" id="3xw-ex-rgq"> <rect key="frame" x="0.0" y="0.0" width="400" height="326"/> <autoresizingMask key="autoresizingMask"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qws-CN-NWM"> <rect key="frame" x="20" y="11" width="360" height="304"/> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bR1-hI-egB"> <rect key="frame" x="21" y="10" width="358" height="304"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="L5c-1Y-4qI" customClass="CircleAvatarImageView" customModule="Library"> <rect key="frame" x="8" y="8" width="24" height="24"/> <constraints> <constraint firstAttribute="width" secondItem="L5c-1Y-4qI" secondAttribute="height" multiplier="1:1" id="0Zb-r8-ojR"/> <constraint firstAttribute="width" constant="24" id="gfe-M3-Wws"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text=" " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.69999999999999996" translatesAutoresizingMaskIntoConstraints="NO" id="n6p-7T-Lkg"> <rect key="frame" x="38" y="11" width="338" height="17"/> <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="nnG-dK-ciq"> <rect key="frame" x="0.0" y="45" width="358" height="197"/> <constraints> <constraint firstAttribute="height" constant="197" id="SIV-De-YBZ"/> </constraints> </imageView> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9kb-aJ-VGs"> <rect key="frame" x="0.0" y="242" width="358" height="62"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="aKf-SO-ukE"> <rect key="frame" x="8" y="8" width="342" height="46"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalCompressionResistancePriority="1000" text=" " lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Wbb-oQ-LmI" userLabel="Project name"> <rect key="frame" x="0.0" y="0.0" width="342" height="26.5"/> <fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="18" translatesAutoresizingMaskIntoConstraints="NO" id="FSZ-eM-Rwq" userLabel="Funding Stack View"> <rect key="frame" x="0.0" y="38.5" width="342" height="7.5"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="u08-la-LL2"> <rect key="frame" x="0.0" y="2.5" width="50" height="3"/> <subviews> <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8FT-hR-bC3"> <rect key="frame" x="0.0" y="0.0" width="256" height="2"/> <color key="backgroundColor" red="0.1450980392" green="0.79607843140000001" blue="0.40784313729999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </view> </subviews> <color key="backgroundColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstItem="8FT-hR-bC3" firstAttribute="top" secondItem="u08-la-LL2" secondAttribute="top" id="1PK-XQ-b8M"/> <constraint firstAttribute="trailing" secondItem="8FT-hR-bC3" secondAttribute="trailing" id="HkY-2z-Xzs"/> <constraint firstItem="8FT-hR-bC3" firstAttribute="leading" secondItem="u08-la-LL2" secondAttribute="leading" id="nRe-Sj-RGX"/> <constraint firstAttribute="height" constant="3" id="qin-9s-BHq"/> <constraint firstAttribute="bottom" secondItem="8FT-hR-bC3" secondAttribute="bottom" id="tLE-Qk-iub"/> </constraints> </view> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" horizontalCompressionResistancePriority="1000" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tad-xW-b6K"> <rect key="frame" x="68" y="0.0" width="274" height="7.5"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> </stackView> </subviews> </stackView> </subviews> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="trailingMargin" secondItem="aKf-SO-ukE" secondAttribute="trailing" id="8p7-qc-WvI"/> <constraint firstItem="aKf-SO-ukE" firstAttribute="leading" secondItem="9kb-aJ-VGs" secondAttribute="leadingMargin" id="IKw-q3-l30"/> <constraint firstAttribute="bottomMargin" secondItem="aKf-SO-ukE" secondAttribute="bottom" id="KX7-Jk-YrM"/> <constraint firstItem="aKf-SO-ukE" firstAttribute="top" secondItem="9kb-aJ-VGs" secondAttribute="topMargin" id="Unj-C7-OAv"/> </constraints> </view> </subviews> <constraints> <constraint firstItem="L5c-1Y-4qI" firstAttribute="centerY" secondItem="n6p-7T-Lkg" secondAttribute="centerY" id="EC0-xX-2Xa"/> <constraint firstItem="nnG-dK-ciq" firstAttribute="top" secondItem="n6p-7T-Lkg" secondAttribute="bottom" constant="16" id="Mul-pS-yNG"/> <constraint firstItem="nnG-dK-ciq" firstAttribute="leading" secondItem="bR1-hI-egB" secondAttribute="leading" id="PNt-yi-rXd"/> <constraint firstItem="9kb-aJ-VGs" firstAttribute="top" secondItem="nnG-dK-ciq" secondAttribute="bottom" id="Tgb-XM-1ge"/> <constraint firstItem="9kb-aJ-VGs" firstAttribute="trailing" secondItem="nnG-dK-ciq" secondAttribute="trailing" id="TkV-pf-M6t"/> <constraint firstItem="9kb-aJ-VGs" firstAttribute="leading" secondItem="nnG-dK-ciq" secondAttribute="leading" id="U4C-JE-78f"/> <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="nnG-dK-ciq" secondAttribute="bottom" id="cN9-eW-MAV"/> <constraint firstAttribute="trailingMargin" secondItem="n6p-7T-Lkg" secondAttribute="trailing" id="iKs-t7-jHB"/> <constraint firstItem="nnG-dK-ciq" firstAttribute="trailing" secondItem="bR1-hI-egB" secondAttribute="trailing" id="l7z-4k-jVE"/> <constraint firstItem="n6p-7T-Lkg" firstAttribute="leading" secondItem="L5c-1Y-4qI" secondAttribute="trailing" constant="6" id="rWL-aq-wMz"/> <constraint firstItem="L5c-1Y-4qI" firstAttribute="leading" secondItem="bR1-hI-egB" secondAttribute="leadingMargin" id="wT9-pi-vDn"/> <constraint firstAttribute="bottom" secondItem="9kb-aJ-VGs" secondAttribute="bottom" id="zy2-ho-MEo"/> <constraint firstItem="n6p-7T-Lkg" firstAttribute="top" secondItem="bR1-hI-egB" secondAttribute="topMargin" constant="3" id="zzF-4b-ULP"/> </constraints> </view> </subviews> <constraints> <constraint firstItem="bR1-hI-egB" firstAttribute="leading" secondItem="3xw-ex-rgq" secondAttribute="leadingMargin" constant="1" id="7V6-cU-Gkc"/> <constraint firstItem="qws-CN-NWM" firstAttribute="bottom" secondItem="3xw-ex-rgq" secondAttribute="bottomMargin" id="Jbp-8M-XI6"/> <constraint firstAttribute="bottomMargin" secondItem="bR1-hI-egB" secondAttribute="bottom" constant="1" id="TOZ-7O-XcX"/> <constraint firstItem="qws-CN-NWM" firstAttribute="top" secondItem="3xw-ex-rgq" secondAttribute="topMargin" id="dOG-Ae-TjE"/> <constraint firstItem="bR1-hI-egB" firstAttribute="trailing" secondItem="3xw-ex-rgq" secondAttribute="trailingMargin" constant="-1" id="gJ0-0D-TDS"/> <constraint firstItem="qws-CN-NWM" firstAttribute="leading" secondItem="3xw-ex-rgq" secondAttribute="leadingMargin" id="jHy-CH-01y"/> <constraint firstItem="bR1-hI-egB" firstAttribute="top" secondItem="3xw-ex-rgq" secondAttribute="topMargin" constant="-1" id="uJh-Tp-6LB"/> <constraint firstItem="qws-CN-NWM" firstAttribute="trailing" secondItem="3xw-ex-rgq" secondAttribute="trailingMargin" id="xQg-tt-tuw"/> </constraints> </tableViewCellContentView> <connections> <outlet property="cardView" destination="qws-CN-NWM" id="o54-io-6P6"/> <outlet property="containerView" destination="bR1-hI-egB" id="euF-9o-8Os"/> <outlet property="friendImageView" destination="L5c-1Y-4qI" id="yho-C4-DOZ"/> <outlet property="friendTitleLabel" destination="n6p-7T-Lkg" id="NOL-I1-OQo"/> <outlet property="fundingProgressBarView" destination="8FT-hR-bC3" id="djL-ox-qTn"/> <outlet property="fundingProgressContainerView" destination="u08-la-LL2" id="qlr-7s-b2l"/> <outlet property="fundingProgressLabel" destination="Tad-xW-b6K" id="AFi-wt-2xp"/> <outlet property="projectImageView" destination="nnG-dK-ciq" id="kkK-ob-FbP"/> <outlet property="projectNameLabel" destination="Wbb-oQ-LmI" id="Ld0-yu-syQ"/> <outlet property="projectTextContainerView" destination="9kb-aJ-VGs" id="qPg-hw-wH8"/> </connections> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="Padding4" rowHeight="32" id="34k-Qc-2B0" userLabel="---padding---"> <rect key="frame" x="0.0" y="851" width="400" height="32"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="34k-Qc-2B0" id="21o-i1-nfS"> <rect key="frame" x="0.0" y="0.0" width="400" height="32"/> <autoresizingMask key="autoresizingMask"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCellContentView> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ActivityUpdateCell" rowHeight="380" id="Wv6-wT-OF6" userLabel="Update" customClass="ActivityUpdateCell" customModule="Kickstarter_Framework" customModuleProvider="target"> <rect key="frame" x="0.0" y="883" width="400" height="380"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Wv6-wT-OF6" id="iJG-Og-j2a"> <rect key="frame" x="0.0" y="0.0" width="400" height="380"/> <autoresizingMask key="autoresizingMask"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x1V-JC-eSG"> <rect key="frame" x="20" y="11" width="360" height="358"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </view> <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="G9B-h5-vdo" userLabel="Container View"> <rect key="frame" x="8" y="8" width="384" height="351.5"/> <subviews> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="YEW-km-DyF"> <rect key="frame" x="270" y="8" width="80" height="45"/> <constraints> <constraint firstAttribute="width" secondItem="YEW-km-DyF" secondAttribute="height" multiplier="16:9" id="f67-Ou-Bas"/> <constraint firstAttribute="width" constant="80" id="vCB-Xb-z6f"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.69999999999999996" translatesAutoresizingMaskIntoConstraints="NO" id="peK-ts-qtm"> <rect key="frame" x="8" y="21.5" width="250" height="18"/> <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> <color key="textColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> <userDefinedRuntimeAttributes> <userDefinedRuntimeAttribute type="string" keyPath="_fontStyle" value="Subhead"/> <userDefinedRuntimeAttribute type="string" keyPath="_color" value="TextDarkGray"/> </userDefinedRuntimeAttributes> </label> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="S1L-AK-J7o" userLabel="Divider"> <rect key="frame" x="0.0" y="65" width="358" height="1"/> <color key="backgroundColor" red="0.93725490196078431" green="0.93725490196078431" blue="0.95294117647058818" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="1" id="JSO-6o-MU1"/> </constraints> </view> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kau-0I-djy" userLabel="Project image button"> <rect key="frame" x="-21" y="0.0" width="400" height="65"/> <connections> <action selector="tappedProjectImage" destination="Wv6-wT-OF6" eventType="touchUpInside" id="YQY-qk-5Bt"/> </connections> </button> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="16" translatesAutoresizingMaskIntoConstraints="NO" id="dQE-cC-7qh"> <rect key="frame" x="8" y="84" width="342" height="93.5"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="752" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qj0-jB-Zve"> <rect key="frame" x="0.0" y="0.0" width="342" height="14.5"/> <fontDescription key="fontDescription" style="UICTFontTextStyleCaption1"/> <color key="textColor" red="0.1450980392" green="0.79607843140000001" blue="0.40784313729999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalCompressionResistancePriority="751" text=" " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" minimumScaleFactor="0.90000000000000002" translatesAutoresizingMaskIntoConstraints="NO" id="fef-3c-G8d"> <rect key="frame" x="0.0" y="30.5" width="342" height="26.5"/> <fontDescription key="fontDescription" style="UICTFontTextStyleTitle2"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2pH-Zs-dun"> <rect key="frame" x="0.0" y="73" width="342" height="20.5"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> </stackView> </subviews> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="trailingMargin" secondItem="YEW-km-DyF" secondAttribute="trailing" id="255-wa-bCx"/> <constraint firstItem="S1L-AK-J7o" firstAttribute="leading" secondItem="G9B-h5-vdo" secondAttribute="leading" id="6gQ-ie-wnM"/> <constraint firstItem="dQE-cC-7qh" firstAttribute="top" secondItem="S1L-AK-J7o" secondAttribute="bottom" constant="18" id="9Ve-8B-HNP"/> <constraint firstAttribute="bottomMargin" secondItem="dQE-cC-7qh" secondAttribute="bottom" id="Dgt-Z9-uFk"/> <constraint firstItem="YEW-km-DyF" firstAttribute="top" secondItem="G9B-h5-vdo" secondAttribute="topMargin" id="Dqa-hA-LCm"/> <constraint firstItem="peK-ts-qtm" firstAttribute="centerY" secondItem="YEW-km-DyF" secondAttribute="centerY" id="GO7-0G-vLa"/> <constraint firstAttribute="trailingMargin" secondItem="dQE-cC-7qh" secondAttribute="trailing" id="ILD-9W-z6d"/> <constraint firstItem="peK-ts-qtm" firstAttribute="trailing" secondItem="YEW-km-DyF" secondAttribute="leading" constant="-12" id="PVZ-WC-Bhj"/> <constraint firstItem="S1L-AK-J7o" firstAttribute="top" secondItem="YEW-km-DyF" secondAttribute="bottom" constant="12" id="VCx-RE-beB"/> <constraint firstItem="kau-0I-djy" firstAttribute="bottom" secondItem="S1L-AK-J7o" secondAttribute="top" id="bka-T4-CJe"/> <constraint firstItem="peK-ts-qtm" firstAttribute="leading" secondItem="G9B-h5-vdo" secondAttribute="leadingMargin" id="hgd-M6-Udw"/> <constraint firstItem="dQE-cC-7qh" firstAttribute="leading" secondItem="G9B-h5-vdo" secondAttribute="leadingMargin" id="lJV-ui-qRq"/> <constraint firstAttribute="trailing" secondItem="S1L-AK-J7o" secondAttribute="trailing" id="xiL-Wl-cAg"/> <constraint firstItem="kau-0I-djy" firstAttribute="top" secondItem="G9B-h5-vdo" secondAttribute="top" id="yvg-Ir-4uf"/> </constraints> </view> </subviews> <constraints> <constraint firstItem="x1V-JC-eSG" firstAttribute="top" secondItem="iJG-Og-j2a" secondAttribute="topMargin" id="Awr-Ht-MEh"/> <constraint firstAttribute="trailingMargin" secondItem="G9B-h5-vdo" secondAttribute="trailing" constant="1" id="F3q-1J-TwN"/> <constraint firstAttribute="bottomMargin" secondItem="x1V-JC-eSG" secondAttribute="bottom" id="FTe-hA-1Ed"/> <constraint firstItem="x1V-JC-eSG" firstAttribute="leading" secondItem="iJG-Og-j2a" secondAttribute="leadingMargin" id="HhT-Pl-zJT"/> <constraint firstAttribute="trailing" secondItem="kau-0I-djy" secondAttribute="trailing" id="Ye2-3a-AKx"/> <constraint firstItem="G9B-h5-vdo" firstAttribute="top" secondItem="iJG-Og-j2a" secondAttribute="topMargin" constant="1" id="aKs-af-zo7"/> <constraint firstItem="kau-0I-djy" firstAttribute="leading" secondItem="iJG-Og-j2a" secondAttribute="leading" id="pVD-BB-msD"/> <constraint firstItem="G9B-h5-vdo" firstAttribute="leading" secondItem="iJG-Og-j2a" secondAttribute="leadingMargin" constant="1" id="tEc-Zi-E2m"/> <constraint firstAttribute="bottomMargin" relation="greaterThanOrEqual" secondItem="G9B-h5-vdo" secondAttribute="bottom" constant="6" id="unG-NV-Jlj"/> <constraint firstAttribute="trailingMargin" secondItem="x1V-JC-eSG" secondAttribute="trailing" id="z3X-zu-Zk8"/> </constraints> </tableViewCellContentView> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> <connections> <outlet property="bodyLabel" destination="2pH-Zs-dun" id="QEJ-kR-MSe"/> <outlet property="cardView" destination="x1V-JC-eSG" id="kWC-QA-vIi"/> <outlet property="containerView" destination="G9B-h5-vdo" id="2qW-cc-Y3a"/> <outlet property="projectImageButton" destination="kau-0I-djy" id="43f-o1-R60"/> <outlet property="projectImageView" destination="YEW-km-DyF" id="FLJ-pa-Xjs"/> <outlet property="projectNameLabel" destination="peK-ts-qtm" id="qd9-A1-jxR"/> <outlet property="titleLabel" destination="fef-3c-G8d" id="Q0V-sD-US8"/> <outlet property="updateSequenceLabel" destination="qj0-jB-Zve" id="aqY-tL-ur6"/> </connections> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="Padding5" rowHeight="32" id="aVT-Ep-YIk" userLabel="---padding---"> <rect key="frame" x="0.0" y="1263" width="400" height="32"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="aVT-Ep-YIk" id="Ii8-RX-pIW"> <rect key="frame" x="0.0" y="0.0" width="400" height="32"/> <autoresizingMask key="autoresizingMask"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCellContentView> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="FindFriendsFacebookConnectCell" rowHeight="150" id="lJH-K2-kWl" userLabel="Facebook Connect Cell" customClass="FindFriendsFacebookConnectCell" customModule="Kickstarter_Framework" customModuleProvider="target"> <rect key="frame" x="0.0" y="1295" width="400" height="150"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="lJH-K2-kWl" id="R6r-9U-xhE"> <rect key="frame" x="0.0" y="0.0" width="400" height="150"/> <autoresizingMask key="autoresizingMask"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ixh-Vp-gzP"> <rect key="frame" x="20" y="16" width="360" height="118"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </view> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Kgs-en-3FB"> <rect key="frame" x="21" y="17" width="358" height="116"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="Z0r-XM-y2x"> <rect key="frame" x="8" y="8" width="342" height="100"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillProportionally" alignment="center" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="hdi-fv-wM7"> <rect key="frame" x="0.0" y="0.0" width="342" height="47"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="H9b-Qe-5eB"> <rect key="frame" x="169" y="0.0" width="4.5" height="20.5"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" verticalCompressionResistancePriority="1000" text=" " textAlignment="center" lineBreakMode="wordWrap" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c9R-7T-nhY"> <rect key="frame" x="169" y="26.5" width="4.5" height="20.5"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> </stackView> <button opaque="NO" contentMode="scaleToFill" verticalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="tailTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="X9G-oS-Rvz"> <rect key="frame" x="0.0" y="59" width="342" height="41"/> <state key="normal" title=" "/> </button> </subviews> <constraints> <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="hdi-fv-wM7" secondAttribute="bottom" id="4o2-4i-oE3"/> <constraint firstAttribute="trailing" secondItem="hdi-fv-wM7" secondAttribute="trailing" id="9vX-19-F1z"/> <constraint firstItem="hdi-fv-wM7" firstAttribute="leading" secondItem="Z0r-XM-y2x" secondAttribute="leading" id="NJD-x0-m1i"/> <constraint firstItem="hdi-fv-wM7" firstAttribute="top" secondItem="Z0r-XM-y2x" secondAttribute="top" id="ln5-j4-pyc"/> </constraints> </stackView> <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="9xM-7l-cFl"> <rect key="frame" x="346" y="0.0" width="12" height="22"/> <state key="normal" image="close-icon"> <color key="titleColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> </button> </subviews> <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/> <constraints> <constraint firstItem="9xM-7l-cFl" firstAttribute="top" secondItem="Kgs-en-3FB" secondAttribute="top" id="9GO-wX-NsA"/> <constraint firstAttribute="topMargin" secondItem="Z0r-XM-y2x" secondAttribute="top" id="bLe-ZW-Rhm"/> <constraint firstItem="Z0r-XM-y2x" firstAttribute="leading" secondItem="Kgs-en-3FB" secondAttribute="leadingMargin" id="bc8-6f-6kr"/> <constraint firstAttribute="bottomMargin" secondItem="Z0r-XM-y2x" secondAttribute="bottom" id="ggG-pN-7a1"/> <constraint firstItem="Z0r-XM-y2x" firstAttribute="trailing" secondItem="Kgs-en-3FB" secondAttribute="trailingMargin" id="h9n-dU-GV7"/> <constraint firstAttribute="trailing" secondItem="9xM-7l-cFl" secondAttribute="trailing" id="oPI-jB-iqv"/> </constraints> </view> </subviews> <constraints> <constraint firstItem="Ixh-Vp-gzP" firstAttribute="top" secondItem="R6r-9U-xhE" secondAttribute="topMargin" id="8SA-zZ-28Y"/> <constraint firstAttribute="bottomMargin" secondItem="Ixh-Vp-gzP" secondAttribute="bottom" id="Ei5-9t-4nk"/> <constraint firstAttribute="bottomMargin" secondItem="Kgs-en-3FB" secondAttribute="bottom" constant="1" id="InA-2X-2wY"/> <constraint firstItem="Kgs-en-3FB" firstAttribute="top" secondItem="R6r-9U-xhE" secondAttribute="topMargin" constant="1" id="S5k-O2-w2f"/> <constraint firstItem="Kgs-en-3FB" firstAttribute="leading" secondItem="R6r-9U-xhE" secondAttribute="leadingMargin" constant="1" id="XQY-DZ-STp"/> <constraint firstAttribute="trailingMargin" secondItem="Kgs-en-3FB" secondAttribute="trailing" constant="1" id="dYR-cW-fCW"/> <constraint firstItem="Ixh-Vp-gzP" firstAttribute="leading" secondItem="R6r-9U-xhE" secondAttribute="leadingMargin" id="ixb-rW-Agw"/> <constraint firstAttribute="trailingMargin" secondItem="Ixh-Vp-gzP" secondAttribute="trailing" id="uE5-JU-Alq"/> </constraints> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCellContentView> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <connections> <outlet property="cardView" destination="Ixh-Vp-gzP" id="4ta-wz-cIx"/> <outlet property="closeButton" destination="9xM-7l-cFl" id="rSa-8D-LUI"/> <outlet property="containerView" destination="Kgs-en-3FB" id="JXf-6y-5QI"/> <outlet property="facebookConnectButton" destination="X9G-oS-Rvz" id="BLM-4n-jug"/> <outlet property="subtitleLabel" destination="c9R-7T-nhY" id="8zL-H8-3mw"/> <outlet property="titleLabel" destination="H9b-Qe-5eB" id="rGu-sY-mLM"/> </connections> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="Padding6" rowHeight="32" id="wiZ-Nf-CUq" userLabel="---padding---"> <rect key="frame" x="0.0" y="1445" width="400" height="32"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="wiZ-Nf-CUq" id="vxB-ko-orl"> <rect key="frame" x="0.0" y="0.0" width="400" height="32"/> <autoresizingMask key="autoresizingMask"/> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCellContentView> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> </tableViewCell> <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="ActivitySurveyResponseCell" rowHeight="190" id="jye-9W-L1r" customClass="ActivitySurveyResponseCell" customModule="Kickstarter_Framework" customModuleProvider="target"> <rect key="frame" x="0.0" y="1477" width="400" height="190"/> <autoresizingMask key="autoresizingMask"/> <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="jye-9W-L1r" id="lv4-G3-ls6"> <rect key="frame" x="0.0" y="0.0" width="400" height="190"/> <autoresizingMask key="autoresizingMask"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="L2R-8a-1BF"> <rect key="frame" x="19" y="24" width="362" height="156"/> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </view> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="W0i-HA-ufe" userLabel="Top Stack View"> <rect key="frame" x="20" y="11" width="360" height="168"/> <subviews> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="249" text="4 Reward Surveys" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fIe-L6-SOz"> <rect key="frame" x="0.0" y="0.0" width="360" height="0.0"/> <fontDescription key="fontDescription" type="system" pointSize="17"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <view contentMode="scaleToFill" verticalCompressionResistancePriority="751" translatesAutoresizingMaskIntoConstraints="NO" id="9FR-kr-r2X"> <rect key="frame" x="0.0" y="12" width="360" height="156"/> <subviews> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="U0K-GN-MuG" userLabel="Top Line"> <rect key="frame" x="0.0" y="0.0" width="360" height="2"/> <color key="backgroundColor" red="0.1450980392" green="0.79607843140000001" blue="0.40784313729999999" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="2" id="e8S-o5-1ey"/> </constraints> </view> <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="24" translatesAutoresizingMaskIntoConstraints="NO" id="Biw-Cv-poS"> <rect key="frame" x="8" y="20" width="344" height="124.5"/> <subviews> <stackView opaque="NO" contentMode="scaleToFill" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="08U-ar-dhC"> <rect key="frame" x="0.0" y="0.0" width="344" height="24"/> <subviews> <imageView userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ait-r7-lig" customClass="CircleAvatarImageView" customModule="Library"> <rect key="frame" x="0.0" y="0.0" width="24" height="24"/> <constraints> <constraint firstAttribute="width" secondItem="ait-r7-lig" secondAttribute="height" multiplier="1:1" id="4Tb-Ok-2y0"/> <constraint firstAttribute="width" constant="24" id="5QN-oe-2gH"/> </constraints> </imageView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" minimumScaleFactor="0.69999998807907104" translatesAutoresizingMaskIntoConstraints="NO" id="Yj4-xs-6Oi"> <rect key="frame" x="30" y="0.0" width="314" height="24"/> <fontDescription key="fontDescription" style="UICTFontTextStyleSubhead"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> </subviews> </stackView> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="249" verticalCompressionResistancePriority="751" text=" " lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="eM4-Bs-N5a"> <rect key="frame" x="0.0" y="48" width="344" height="20.5"/> <fontDescription key="fontDescription" style="UICTFontTextStyleBody"/> <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <nil key="highlightedColor"/> </label> <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="1000" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Op9-Hz-y39"> <rect key="frame" x="0.0" y="92.5" width="344" height="32"/> <fontDescription key="fontDescription" style="UICTFontTextStyleCallout"/> <state key="normal" title=" "> <color key="titleColor" red="0.031372549020000001" green="0.070588235289999995" blue="0.27058823529999998" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> </state> </button> </subviews> </stackView> <view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="7yF-Px-W1J" userLabel="Divider Line"> <rect key="frame" x="0.0" y="124" width="384" height="1"/> <color key="backgroundColor" red="0.93725490196078431" green="0.93725490196078431" blue="0.95294117647058818" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstAttribute="height" constant="1" id="K9d-Ur-0fv"/> </constraints> </view> </subviews> <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstItem="7yF-Px-W1J" firstAttribute="leading" secondItem="9FR-kr-r2X" secondAttribute="leading" id="57Z-3z-N2p"/> <constraint firstItem="U0K-GN-MuG" firstAttribute="leading" secondItem="9FR-kr-r2X" secondAttribute="leading" id="770-Zj-pE5"/> <constraint firstItem="U0K-GN-MuG" firstAttribute="trailing" secondItem="9FR-kr-r2X" secondAttribute="trailing" id="ASK-Dt-72b"/> <constraint firstItem="Biw-Cv-poS" firstAttribute="top" secondItem="U0K-GN-MuG" secondAttribute="bottom" constant="18" id="N7u-fo-BJK"/> <constraint firstAttribute="bottomMargin" relation="greaterThanOrEqual" secondItem="Biw-Cv-poS" secondAttribute="bottom" id="TA6-g2-j3P"/> <constraint firstItem="7yF-Px-W1J" firstAttribute="trailing" secondItem="9FR-kr-r2X" secondAttribute="trailing" id="W0y-1i-yki"/> <constraint firstItem="Biw-Cv-poS" firstAttribute="trailing" secondItem="9FR-kr-r2X" secondAttribute="trailingMargin" id="bPd-oD-k5d"/> <constraint firstItem="U0K-GN-MuG" firstAttribute="top" secondItem="9FR-kr-r2X" secondAttribute="top" id="dW2-rm-Zc8"/> <constraint firstItem="Biw-Cv-poS" firstAttribute="leading" secondItem="9FR-kr-r2X" secondAttribute="leadingMargin" id="i5Q-hX-2aU"/> <constraint firstItem="7yF-Px-W1J" firstAttribute="top" secondItem="Op9-Hz-y39" secondAttribute="top" id="y9P-e4-c6h"/> </constraints> </view> </subviews> <constraints> <constraint firstAttribute="bottom" relation="greaterThanOrEqual" secondItem="9FR-kr-r2X" secondAttribute="bottom" id="Coe-lt-t83"/> </constraints> <variation key="default"> <mask key="constraints"> <exclude reference="Coe-lt-t83"/> </mask> </variation> </stackView> </subviews> <color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/> <constraints> <constraint firstItem="W0i-HA-ufe" firstAttribute="leading" secondItem="lv4-G3-ls6" secondAttribute="leadingMargin" id="BJ5-hU-QyM"/> <constraint firstItem="W0i-HA-ufe" firstAttribute="trailing" secondItem="lv4-G3-ls6" secondAttribute="trailingMargin" id="BTd-fd-gCe"/> <constraint firstItem="L2R-8a-1BF" firstAttribute="top" secondItem="9FR-kr-r2X" secondAttribute="top" constant="1" id="Zlc-IJ-Tsc"/> <constraint firstItem="L2R-8a-1BF" firstAttribute="bottom" secondItem="9FR-kr-r2X" secondAttribute="bottom" constant="1" id="jM0-e9-uGP"/> <constraint firstItem="W0i-HA-ufe" firstAttribute="top" secondItem="lv4-G3-ls6" secondAttribute="topMargin" id="m7C-eb-Yl3"/> <constraint firstItem="L2R-8a-1BF" firstAttribute="leading" secondItem="lv4-G3-ls6" secondAttribute="leadingMargin" constant="-1" id="rGP-Ku-tXq"/> <constraint firstAttribute="trailingMargin" secondItem="L2R-8a-1BF" secondAttribute="trailing" constant="-1" id="z9D-Dq-3I8"/> <constraint firstAttribute="bottomMargin" relation="greaterThanOrEqual" secondItem="W0i-HA-ufe" secondAttribute="bottom" id="zAj-Ob-lio"/> </constraints> </tableViewCellContentView> <color key="backgroundColor" red="0.86111108319999996" green="0.97082921529999999" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/> <connections> <outlet property="cardView" destination="L2R-8a-1BF" id="k6E-y9-ORJ"/> <outlet property="containerView" destination="9FR-kr-r2X" id="8rU-Gs-CQa"/> <outlet property="creatorImageView" destination="ait-r7-lig" id="zej-uE-9ck"/> <outlet property="creatorNameLabel" destination="Yj4-xs-6Oi" id="5sH-pc-bD2"/> <outlet property="respondNowButton" destination="Op9-Hz-y39" id="aR9-NP-G0n"/> <outlet property="rewardSurveysCountLabel" destination="fIe-L6-SOz" id="XfV-bD-2o9"/> <outlet property="surveyLabel" destination="eM4-Bs-N5a" id="2Le-W3-fls"/> <outlet property="topLineView" destination="U0K-GN-MuG" id="h1q-6d-zBb"/> </connections> </tableViewCell> </prototypes> <connections> <outlet property="dataSource" destination="tvn-h8-peN" id="g2Q-5V-zpL"/> <outlet property="delegate" destination="tvn-h8-peN" id="N3S-fl-MVJ"/> </connections> </tableView> <navigationItem key="navigationItem" id="UYl-3m-Ykk"/> <simulatedTabBarMetrics key="simulatedBottomBarMetrics"/> <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/> <size key="freeformSize" width="400" height="1900"/> <refreshControl key="refreshControl" opaque="NO" multipleTouchEnabled="YES" contentMode="center" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" id="ifw-fv-O5y"> <rect key="frame" x="0.0" y="0.0" width="1000" height="1000"/> <autoresizingMask key="autoresizingMask"/> <connections> <action selector="refresh" destination="tvn-h8-peN" eventType="valueChanged" id="Y88-qG-zKz"/> </connections> </refreshControl> </tableViewController> <placeholder placeholderIdentifier="IBFirstResponder" id="fAh-u5-LDj" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="1056" y="372.41379310344831"/> </scene> </scenes> <resources> <image name="close-icon" width="12" height="12"/> </resources> </document> ```
/content/code_sandbox/Kickstarter-iOS/Features/Activities/Storyboard/Activity.storyboard
xml
2016-12-02T21:24:40
2024-08-15T23:13:30
ios-oss
kickstarter/ios-oss
8,432
19,379
```xml export { VPicker } from './VPicker' export { VPickerTitle } from './VPickerTitle' ```
/content/code_sandbox/packages/vuetify/src/labs/VPicker/index.ts
xml
2016-09-12T00:39:35
2024-08-16T20:06:39
vuetify
vuetifyjs/vuetify
39,539
23
```xml import * as AuthModels from 'src/types/auth' export interface Auth { auth: { isUsingAuth: boolean me: AuthModels.Me } } ```
/content/code_sandbox/ui/src/types/reducers/auth.ts
xml
2016-08-24T23:28:56
2024-08-13T19:50:03
chronograf
influxdata/chronograf
1,494
37
```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"/> /** * Evaluates a Lucas polynomial. * * @param x - value at which to evaluate a Lucas polynomial * @returns result */ type EvaluationFunction = ( x: number ) => number; /** * Interface for evaluating Lucas polynomials. */ interface Lucaspoly { /** * Evaluates a Lucas polynomial. * * @param n - Lucas polynomial to evaluate * @param x - value at which to evaluate a Lucas polynomial * @returns result * * @example * var v = lucaspoly( 5, 1.0 ); * // returns 11.0 */ ( n: number, x: number ): number; /** * Returns a function for evaluating a Lucas polynomial. * * @param n - Lucas polynomial to evaluate * @returns function for evaluating a Lucas polynomial * * @example * var polyval = lucaspoly.factory( 5 ); * * var v = polyval( 1.0 ); * // returns 11.0 * * v = polyval( 2.0 ); * // returns 82.0 */ factory( n: number ): EvaluationFunction; } /** * Evaluates a Lucas polynomial. * * @param n - Lucas polynomial to evaluate * @param x - value at which to evaluate a Lucas polynomial * @returns result * * @example * var v = lucaspoly( 5, 1.0 ); * // returns 11.0 * * @example * var polyval = lucaspoly.factory( 5 ); * * var v = polyval( 1.0 ); * // returns 11.0 * * v = polyval( 2.0 ); * // returns 82.0 */ declare var lucaspoly: Lucaspoly; // EXPORTS // export = lucaspoly; ```
/content/code_sandbox/lib/node_modules/@stdlib/math/base/tools/lucaspoly/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
479
```xml import * as React from 'react'; import { Text } from '@fluentui/react-components'; export const Italic = () => <Text italic>Italic text</Text>; ```
/content/code_sandbox/packages/react-components/react-text/stories/src/Text/TextItalic.stories.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
37
```xml import { generateModels } from './connectionResolver'; import { sendMessageBroker } from './messageBroker'; import { ISchedule } from './models/definitions/schedules'; const toMoney = (value) => { if (!value) { return '-'; } return new Intl.NumberFormat().format(value); }; //document attribute fields const fields = [ { value: 'number', name: 'Contract Number' }, { value: 'status', name: 'Status' }, { value: 'description', name: 'Description' }, { value: 'marginAmount', name: 'Margin Amount', isAmount: true }, { value: 'leaseAmount', name: 'Lease Amount', isAmount: true }, { value: 'feeAmount', name: 'Fee Amount', isAmount: true }, { value: 'tenor', name: 'Tenor' }, { value: 'interestRate', name: 'interestRate' }, { value: 'lossPercent', name: 'lossPercent' }, { value: 'repayment', name: 'repayment' }, { value: 'startDate', name: 'startDate' }, { value: 'scheduleDays', name: 'scheduleDays' }, { value: 'insuranceAmount', name: 'insuranceAmount', isAmount: true }, { value: 'salvageAmount', name: 'salvageAmount', isAmount: true }, { value: 'salvagePercent', name: 'salvagePercent' }, { value: 'salvageTenor', name: 'salvageTenor' }, { value: 'debt', name: 'Status' }, { value: 'debtTenor', name: 'debtTenor' }, { value: 'customerName', name: 'Customer name' }, { value: 'customerLastName', name: 'Customer last name' }, { value: 'closeDate', name: 'closeDate' }, { value: 'loanScheduleInfo', name: 'Loan Schedule Info' } ]; export default { types: [ { type: 'loans', label: 'Loans' } ], editorAttributes: async () => { return fields; }, replaceContent: async ({ subdomain, data: { contractId, content } }) => { const models = await generateModels(subdomain); const contractDocument = await models.Contracts.findOne({ _id: contractId }).lean(); if (!contractDocument) return content; let contract = contractDocument as any; if (contract.customerType === 'customer') { const customer = await sendMessageBroker( { subdomain, action: 'customers.findOne', data: { _id: contract.customerId }, isRPC: true }, 'contacts' ); contract.customerName = customer.firstName; contract.customerLastName = customer.lastName; } if (contract.customerType === 'company') { const company = await sendMessageBroker( { subdomain, action: 'companies.findOne', data: { _id: contract.customerId }, isRPC: true }, 'contacts' ); contract.customerName = company.primaryName; } const firstSchedules = await models.FirstSchedules.find({ contractId: contract._id }) .sort({ payDate: 1 }) .lean(); contract.loanScheduleInfo = ` <table> <tbody> <thead> <tr> <th></th> <th>DATE</th> <th>LOAN BALANCE</th> <th>LOAN PAYMENT</th> <th>INTEREST</th> <th>INSURANCE</th> <th>DEBT</th> <th>TOTAL</th> </tr> </thead> <tbody> ${firstSchedules .map( (row, index) => ` <tr> <td>${index + 1}</td> <td>${row.payDate.getFullYear()}-${ row.payDate.getMonth() + 1 }-${row.payDate.getDate()}</td> <td>${toMoney(row.balance)}</td> <td>${toMoney(row.payment)}</td> <td>${toMoney( (row.interestEve || 0) + (row.interestNonce || 0) )}</td> <td>${toMoney(row.insurance)}</td> <td>${toMoney(row.debt)}</td> <td>${toMoney(row.total)}</td> </tr> ` ) .join('')} </tbody> </tbody> </table> `; var printContent = content; for await (const row of fields) { printContent = printContent.replace( RegExp(`{{ ${row.value} }}`, 'g'), row.isAmount ? toMoney(contract[row.value] || '') : contract[row.value] || '' ); } return printContent; } }; ```
/content/code_sandbox/packages/plugin-loans-api/src/documents.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
1,090
```xml export const functions: string[] = [ // path_to_url // math 'ABS', 'ACOS', 'ASIN', 'ATAN', 'BIN', 'BROUND', 'CBRT', 'CEIL', 'CEILING', 'CONV', 'COS', 'DEGREES', // 'E', 'EXP', 'FACTORIAL', 'FLOOR', 'GREATEST', 'HEX', 'LEAST', 'LN', 'LOG', 'LOG10', 'LOG2', 'NEGATIVE', 'PI', 'PMOD', 'POSITIVE', 'POW', 'POWER', 'RADIANS', 'RAND', 'ROUND', 'SHIFTLEFT', 'SHIFTRIGHT', 'SHIFTRIGHTUNSIGNED', 'SIGN', 'SIN', 'SQRT', 'TAN', 'UNHEX', 'WIDTH_BUCKET', // array 'ARRAY_CONTAINS', 'MAP_KEYS', 'MAP_VALUES', 'SIZE', 'SORT_ARRAY', // conversion 'BINARY', 'CAST', // date 'ADD_MONTHS', 'DATE', 'DATE_ADD', 'DATE_FORMAT', 'DATE_SUB', 'DATEDIFF', 'DAY', 'DAYNAME', 'DAYOFMONTH', 'DAYOFYEAR', 'EXTRACT', 'FROM_UNIXTIME', 'FROM_UTC_TIMESTAMP', 'HOUR', 'LAST_DAY', 'MINUTE', 'MONTH', 'MONTHS_BETWEEN', 'NEXT_DAY', 'QUARTER', 'SECOND', 'TIMESTAMP', 'TO_DATE', 'TO_UTC_TIMESTAMP', 'TRUNC', 'UNIX_TIMESTAMP', 'WEEKOFYEAR', 'YEAR', // conditional 'ASSERT_TRUE', 'COALESCE', 'IF', 'ISNOTNULL', 'ISNULL', 'NULLIF', 'NVL', // string 'ASCII', 'BASE64', 'CHARACTER_LENGTH', 'CHR', 'CONCAT', 'CONCAT_WS', 'CONTEXT_NGRAMS', 'DECODE', 'ELT', 'ENCODE', 'FIELD', 'FIND_IN_SET', 'FORMAT_NUMBER', 'GET_JSON_OBJECT', 'IN_FILE', 'INITCAP', 'INSTR', 'LCASE', 'LENGTH', 'LEVENSHTEIN', 'LOCATE', 'LOWER', 'LPAD', 'LTRIM', 'NGRAMS', 'OCTET_LENGTH', 'PARSE_URL', 'PRINTF', 'QUOTE', 'REGEXP_EXTRACT', 'REGEXP_REPLACE', 'REPEAT', 'REVERSE', 'RPAD', 'RTRIM', 'SENTENCES', 'SOUNDEX', 'SPACE', 'SPLIT', 'STR_TO_MAP', 'SUBSTR', 'SUBSTRING', 'TRANSLATE', 'TRIM', 'UCASE', 'UNBASE64', 'UPPER', // masking 'MASK', 'MASK_FIRST_N', 'MASK_HASH', 'MASK_LAST_N', 'MASK_SHOW_FIRST_N', 'MASK_SHOW_LAST_N', // misc 'AES_DECRYPT', 'AES_ENCRYPT', 'CRC32', 'CURRENT_DATABASE', 'CURRENT_USER', 'HASH', 'JAVA_METHOD', 'LOGGED_IN_USER', 'MD5', 'REFLECT', 'SHA', 'SHA1', 'SHA2', 'SURROGATE_KEY', 'VERSION', // aggregate 'AVG', 'COLLECT_LIST', 'COLLECT_SET', 'CORR', 'COUNT', 'COVAR_POP', 'COVAR_SAMP', 'HISTOGRAM_NUMERIC', 'MAX', 'MIN', 'NTILE', 'PERCENTILE', 'PERCENTILE_APPROX', 'REGR_AVGX', 'REGR_AVGY', 'REGR_COUNT', 'REGR_INTERCEPT', 'REGR_R2', 'REGR_SLOPE', 'REGR_SXX', 'REGR_SXY', 'REGR_SYY', 'STDDEV_POP', 'STDDEV_SAMP', 'SUM', 'VAR_POP', 'VAR_SAMP', 'VARIANCE', // table 'EXPLODE', 'INLINE', 'JSON_TUPLE', 'PARSE_URL_TUPLE', 'POSEXPLODE', 'STACK', // path_to_url 'LEAD', 'LAG', 'FIRST_VALUE', 'LAST_VALUE', 'RANK', 'ROW_NUMBER', 'DENSE_RANK', 'CUME_DIST', 'PERCENT_RANK', 'NTILE', ]; ```
/content/code_sandbox/src/languages/hive/hive.functions.ts
xml
2016-09-12T13:09:04
2024-08-16T10:30:12
sql-formatter
sql-formatter-org/sql-formatter
2,272
1,106
```xml import React from 'react' import styled from 'styled-components' import { useSpring, animated, to, config } from '@react-spring/web' import media from '../../theming/mediaQueries' interface NavToggleButtonProps { isOpen: boolean onClick: () => void } const SIZE = 32 const HALF_LENGTH = 11 const SPACING = 7 export const NavToggleButton = ({ isOpen, onClick }: NavToggleButtonProps) => { const first = useSpring({ y: isOpen ? 0 : -SPACING, rotation: isOpen ? 45 : 0, config: config.wobbly, }) const second = useSpring({ x1: isOpen ? -HALF_LENGTH - 10 : -HALF_LENGTH, x2: isOpen ? 0 : HALF_LENGTH, opacity: isOpen ? 0 : 1, config: config.wobbly, }) const third = useSpring({ y: isOpen ? 0 : SPACING, rotation: isOpen ? -45 : 0, config: config.wobbly, }) return ( <Container onClick={onClick}> <svg width={SIZE} height={SIZE}> <g transform={`translate(${SIZE / 2}, ${SIZE / 2})`}> <animated.line x1={-HALF_LENGTH} x2={HALF_LENGTH} transform={to( [first.y, first.rotation], (y, rotation) => `translate(0, ${y}) rotate(${rotation})` )} /> <animated.line x1={second.x1} x2={second.x2} opacity={second.opacity} /> <animated.line x1={-HALF_LENGTH} x2={HALF_LENGTH} transform={to( [third.y, third.rotation], (y, rotation) => `translate(0, ${y}) rotate(${rotation})` )} /> </g> </svg> </Container> ) } const Container = styled.div` height: ${({ theme }) => theme.dimensions.headerHeight}px; width: ${({ theme }) => theme.dimensions.headerHeight}px; display: flex; align-items: center; justify-content: center; cursor: pointer; user-select: none; margin-left: 12px; & svg { stroke: #ffffff; stroke-width: 2; stroke-linecap: round; } ${media.tablet` & { margin-left: 0; } `} ${media.mobile` & { margin-left: 0; } `} ` ```
/content/code_sandbox/website/src/components/nav/NavToggleButton.tsx
xml
2016-04-16T03:27:56
2024-08-16T03:38:37
nivo
plouc/nivo
13,010
566
```xml // @ts-ignore try{self['workbox:core:7.1.0']&&_()}catch(e){} ```
/content/code_sandbox/packages/workbox-core/src/_version.ts
xml
2016-04-04T15:55:19
2024-08-16T08:33:26
workbox
GoogleChrome/workbox
12,245
28
```xml import { describe, expect, it } from "vitest"; import { Formatter } from "@export/formatter"; import { CustomProperties } from "./custom-properties"; describe("CustomProperties", () => { describe("#constructor()", () => { it("sets the appropriate attributes on the top-level", () => { const properties = new CustomProperties([]); const tree = new Formatter().format(properties); expect(tree).to.deep.equal({ Properties: { _attr: { xmlns: "path_to_url", "xmlns:vt": "path_to_url", }, }, }); }); it("should create custom properties with all the attributes given", () => { const properties = new CustomProperties([ { name: "Address", value: "123" }, { name: "Author", value: "456" }, ]); const tree = new Formatter().format(properties); expect(tree).to.deep.equal({ Properties: [ { _attr: { xmlns: "path_to_url", "xmlns:vt": "path_to_url", }, }, { property: [ { _attr: { fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}", pid: "2", name: "Address", }, }, { "vt:lpwstr": ["123"], }, ], }, { property: [ { _attr: { fmtid: "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}", pid: "3", name: "Author", }, }, { "vt:lpwstr": ["456"], }, ], }, ], }); }); }); }); ```
/content/code_sandbox/src/file/custom-properties/custom-properties.spec.ts
xml
2016-03-26T23:43:56
2024-08-16T13:02:47
docx
dolanmiu/docx
4,139
396
```xml import SafeAnchor from './SafeAnchor'; export type { SafeAnchorProps } from './SafeAnchor'; export default SafeAnchor; ```
/content/code_sandbox/src/SafeAnchor/index.tsx
xml
2016-06-06T02:27:46
2024-08-16T16:41:54
rsuite
rsuite/rsuite
8,263
26
```xml import * as React from 'react'; import * as toastr from 'toastr'; import { FieldValidationResult } from 'lc-form-validation'; import { memberAPI } from '../../api/member'; import { MemberEntity, MemberErrors } from '../../model'; import { memberFormValidation } from './memberFormValidation'; import { MemberPage } from './page'; interface Props { params: { id: string }; } interface State { member: MemberEntity; memberErrors: MemberErrors; } export class MemberPageContainer extends React.Component<any, State> { constructor(props) { super(props); this.state = { member: { id: -1, login: '', avatar_url: '', }, memberErrors: { login: new FieldValidationResult(), } }; this.onFieldValueChange = this.onFieldValueChange.bind(this); this.onSave = this.onSave.bind(this); } public componentDidMount() { const memberId = Number(this.props.match.params.id) || 0; memberAPI.fetchMemberById(memberId) .then((member) => { this.setState({ ...this.state, member, }); }); } private onFieldValueChange(fieldName: string, value: string) { memberFormValidation.validateField(this.state.member, fieldName, value) .then((fieldValidationResult) => { const nextState = { ...this.state, member: { ...this.state.member, [fieldName]: value, }, memberErrors: { ...this.state.memberErrors, [fieldName]: fieldValidationResult, } }; this.setState(nextState); }); } private onSave() { memberFormValidation.validateForm(this.state.member) .then((formValidationResult) => { if (formValidationResult.succeeded) { memberAPI.saveMember(this.state.member) .then(() => { toastr.success('Member saved.'); this.props.history.goBack(); }); } }); } render() { return ( <MemberPage member={this.state.member} memberErrors={this.state.memberErrors} onChange={this.onFieldValueChange} onSave={this.onSave} /> ); } } ```
/content/code_sandbox/old_class_components_samples/08 ParamNavigation/src/components/member/pageContainer.tsx
xml
2016-02-28T11:58:58
2024-07-21T08:53:34
react-typescript-samples
Lemoncode/react-typescript-samples
1,846
469
```xml <?xml version="1.0" encoding="utf-8"?> <Project> <PropertyGroup> <EnableDefaultItems>false</EnableDefaultItems> <OutDirName>Tests\$(MSBuildProjectName)</OutDirName> <StrongNameKeyId>MicrosoftAspNetCore</StrongNameKeyId> </PropertyGroup> <Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" /> <PropertyGroup> <OutputType>Exe</OutputType> <TargetFramework>$(SdkTargetFramework)</TargetFramework> </PropertyGroup> <PropertyGroup> <PackageId>testSdkRazorTool</PackageId> </PropertyGroup> <ItemGroup> <PackageReference Include="Microsoft.Css.Parser" /> <PackageReference Include="Newtonsoft.Json" /> <PackageReference Include="Moq" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\src\RazorSdk\Tool\Microsoft.NET.Sdk.Razor.Tool.csproj" /> </ItemGroup> <ItemGroup> <Reference Include="$(ArtifactsBinDir)\Microsoft.NET.Sdk.Razor.Tool\$(Configuration)\$(SdkTargetFramework)\rzc.dll" Targets="Publish" ReferenceOutputAssembly="false" SkipGetTargetFrameworkProperties="true" UndefineProperties="TargetFramework;TargetFrameworks;RuntimeIdentifier;PublishDir;SelfContained" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\Microsoft.NET.TestFramework\Microsoft.NET.TestFramework.csproj" /> </ItemGroup> <ItemGroup> <Compile Include="**\*.cs" Exclude="$(GlobalExclude)" /> </ItemGroup> <Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" /> </Project> ```
/content/code_sandbox/test/Microsoft.NET.Sdk.Razor.Tool.Tests/Microsoft.NET.Sdk.Razor.Tool.Tests.csproj
xml
2016-07-22T21:26:02
2024-08-16T17:23:58
sdk
dotnet/sdk
2,627
378
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import UINT8_NUM_BYTES = require( './index' ); // TESTS // // The export is a number... { // eslint-disable-next-line @typescript-eslint/no-unused-expressions UINT8_NUM_BYTES; // $ExpectType number } ```
/content/code_sandbox/lib/node_modules/@stdlib/constants/uint8/num-bytes/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
100
```xml <?xml version="1.0" encoding="utf-8"?> <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent"> <include layout="@layout/item_toolbar" /> <include android:id="@+id/include6" layout="@layout/content_chat" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_above="@+id/cardView" app:layout_behavior="@string/appbar_scrolling_view_behavior" app:layout_constraintBottom_toTopOf="@+id/cardView" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/appbar" /> <LinearLayout android:id="@+id/cardView" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:elevation="@dimen/dp_2" android:gravity="center_vertical" android:orientation="horizontal"> <EditText android:id="@+id/messageInputView" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_margin="@dimen/dp_8" android:layout_weight="1" android:background="@drawable/bg_edit" android:imeOptions="actionSend" android:inputType="textMultiLine" android:padding="@dimen/dp_8" android:textColor="#2fa881" android:textSize="16sp" /> <ImageView android:id="@+id/addIv" android:layout_width="@dimen/dp_24" android:layout_height="@dimen/dp_24" android:layout_marginEnd="@dimen/dp_8" android:background="?android:attr/selectableItemBackgroundBorderless" android:src="@drawable/ic_add_circle_outline" /> <TextView android:id="@+id/sendBtn" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginEnd="@dimen/dp_8" android:background="@drawable/btn_send" android:padding="@dimen/dp_8" android:text="@string/send" android:textColor="@color/white" app:layout_constraintEnd_toStartOf="@+id/importBtn" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/playlistInputView" /> </LinearLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout> ```
/content/code_sandbox/app/src/main/res/layout/activity_chat.xml
xml
2016-04-09T15:47:45
2024-08-14T04:30:04
MusicLake
caiyonglong/MusicLake
2,654
590
```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>CFBundleDisplayName</key> <string>UnifiedExample</string> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleIconFile</key> <string></string> <key>CFBundleIdentifier</key> <string>com.xamarin.UnifiedExample</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>UnifiedExample</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1</string> <key>LSMinimumSystemVersion</key> <string>10.15</string> <string>donblas</string> <key>NSPrincipalClass</key> <string>NSApplication</string> </dict> </plist> ```
/content/code_sandbox/tests/common/mac/Info-Unified.plist
xml
2016-04-20T18:24:26
2024-08-16T13:29:19
xamarin-macios
xamarin/xamarin-macios
2,436
287
```xml /** * All errors in ethers include properties to ensure they are both * human-readable (i.e. ``.message``) and machine-readable (i.e. ``.code``). * * The [[isError]] function can be used to check the error ``code`` and * provide a type guard for the properties present on that error interface. * * @_section: api/utils/errors:Errors [about-errors] */ import { version } from "../_version.js"; import { defineProperties } from "./properties.js"; import type { TransactionRequest, TransactionReceipt, TransactionResponse } from "../providers/index.js"; import type { FetchRequest, FetchResponse } from "./fetch.js"; /** * An error may contain additional properties, but those must not * conflict with any implicit properties. */ export type ErrorInfo<T> = Omit<T, "code" | "name" | "message" | "shortMessage"> & { shortMessage?: string }; function stringify(value: any): any { if (value == null) { return "null"; } if (Array.isArray(value)) { return "[ " + (value.map(stringify)).join(", ") + " ]"; } if (value instanceof Uint8Array) { const HEX = "0123456789abcdef"; let result = "0x"; for (let i = 0; i < value.length; i++) { result += HEX[value[i] >> 4]; result += HEX[value[i] & 0xf]; } return result; } if (typeof(value) === "object" && typeof(value.toJSON) === "function") { return stringify(value.toJSON()); } switch (typeof(value)) { case "boolean": case "symbol": return value.toString(); case "bigint": return BigInt(value).toString(); case "number": return (value).toString(); case "string": return JSON.stringify(value); case "object": { const keys = Object.keys(value); keys.sort(); return "{ " + keys.map((k) => `${ stringify(k) }: ${ stringify(value[k]) }`).join(", ") + " }"; } } return `[ COULD NOT SERIALIZE ]`; } /** * All errors emitted by ethers have an **ErrorCode** to help * identify and coalesce errors to simplify programmatic analysis. * * Each **ErrorCode** is the %%code%% proerty of a coresponding * [[EthersError]]. * * **Generic Errors** * * **``"UNKNOWN_ERROR"``** - see [[UnknownError]] * * **``"NOT_IMPLEMENTED"``** - see [[NotImplementedError]] * * **``"UNSUPPORTED_OPERATION"``** - see [[UnsupportedOperationError]] * * **``"NETWORK_ERROR"``** - see [[NetworkError]] * * **``"SERVER_ERROR"``** - see [[ServerError]] * * **``"TIMEOUT"``** - see [[TimeoutError]] * * **``"BAD_DATA"``** - see [[BadDataError]] * * **``"CANCELLED"``** - see [[CancelledError]] * * **Operational Errors** * * **``"BUFFER_OVERRUN"``** - see [[BufferOverrunError]] * * **``"NUMERIC_FAULT"``** - see [[NumericFaultError]] * * **Argument Errors** * * **``"INVALID_ARGUMENT"``** - see [[InvalidArgumentError]] * * **``"MISSING_ARGUMENT"``** - see [[MissingArgumentError]] * * **``"UNEXPECTED_ARGUMENT"``** - see [[UnexpectedArgumentError]] * * **``"VALUE_MISMATCH"``** - //unused// * * **Blockchain Errors** * * **``"CALL_EXCEPTION"``** - see [[CallExceptionError]] * * **``"INSUFFICIENT_FUNDS"``** - see [[InsufficientFundsError]] * * **``"NONCE_EXPIRED"``** - see [[NonceExpiredError]] * * **``"REPLACEMENT_UNDERPRICED"``** - see [[ReplacementUnderpricedError]] * * **``"TRANSACTION_REPLACED"``** - see [[TransactionReplacedError]] * * **``"UNCONFIGURED_NAME"``** - see [[UnconfiguredNameError]] * * **``"OFFCHAIN_FAULT"``** - see [[OffchainFaultError]] * * **User Interaction Errors** * * **``"ACTION_REJECTED"``** - see [[ActionRejectedError]] */ export type ErrorCode = // Generic Errors "UNKNOWN_ERROR" | "NOT_IMPLEMENTED" | "UNSUPPORTED_OPERATION" | "NETWORK_ERROR" | "SERVER_ERROR" | "TIMEOUT" | "BAD_DATA" | "CANCELLED" | // Operational Errors "BUFFER_OVERRUN" | "NUMERIC_FAULT" | // Argument Errors "INVALID_ARGUMENT" | "MISSING_ARGUMENT" | "UNEXPECTED_ARGUMENT" | "VALUE_MISMATCH" | // Blockchain Errors "CALL_EXCEPTION" | "INSUFFICIENT_FUNDS" | "NONCE_EXPIRED" | "REPLACEMENT_UNDERPRICED" | "TRANSACTION_REPLACED" | "UNCONFIGURED_NAME" | "OFFCHAIN_FAULT" | // User Interaction "ACTION_REJECTED" ; /** * All errors in Ethers include properties to assist in * machine-readable errors. */ export interface EthersError<T extends ErrorCode = ErrorCode> extends Error { /** * The string error code. */ code: ErrorCode; /** * A short message describing the error, with minimal additional * details. */ shortMessage: string; /** * Additional info regarding the error that may be useful. * * This is generally helpful mostly for human-based debugging. */ info?: Record<string, any>; /** * Any related error. */ error?: Error; } // Generic Errors /** * This Error is a catch-all for when there is no way for Ethers to * know what the underlying problem is. */ export interface UnknownError extends EthersError<"UNKNOWN_ERROR"> { [ key: string ]: any; } /** * This Error is mostly used as a stub for functionality that is * intended for the future, but is currently not implemented. */ export interface NotImplementedError extends EthersError<"NOT_IMPLEMENTED"> { /** * The attempted operation. */ operation: string; } /** * This Error indicates that the attempted operation is not supported. * * This could range from a specific JSON-RPC end-point not supporting * a feature to a specific configuration of an object prohibiting the * operation. * * For example, a [[Wallet]] with no connected [[Provider]] is unable * to send a transaction. */ export interface UnsupportedOperationError extends EthersError<"UNSUPPORTED_OPERATION"> { /** * The attempted operation. */ operation: string; } /** * This Error indicates a problem connecting to a network. */ export interface NetworkError extends EthersError<"NETWORK_ERROR"> { /** * The network event. */ event: string; } /** * This Error indicates there was a problem fetching a resource from * a server. */ export interface ServerError extends EthersError<"SERVER_ERROR"> { /** * The requested resource. */ request: FetchRequest | string; /** * The response received from the server, if available. */ response?: FetchResponse; } /** * This Error indicates that the timeout duration has expired and * that the operation has been implicitly cancelled. * * The side-effect of the operation may still occur, as this * generally means a request has been sent and there has simply * been no response to indicate whether it was processed or not. */ export interface TimeoutError extends EthersError<"TIMEOUT"> { /** * The attempted operation. */ operation: string; /** * The reason. */ reason: string; /** * The resource request, if available. */ request?: FetchRequest; } /** * This Error indicates that a provided set of data cannot * be correctly interpreted. */ export interface BadDataError extends EthersError<"BAD_DATA"> { /** * The data. */ value: any; } /** * This Error indicates that the operation was cancelled by a * programmatic call, for example to ``cancel()``. */ export interface CancelledError extends EthersError<"CANCELLED"> { } // Operational Errors /** * This Error indicates an attempt was made to read outside the bounds * of protected data. * * Most operations in Ethers are protected by bounds checks, to mitigate * exploits when parsing data. */ export interface BufferOverrunError extends EthersError<"BUFFER_OVERRUN"> { /** * The buffer that was overrun. */ buffer: Uint8Array; /** * The length of the buffer. */ length: number; /** * The offset that was requested. */ offset: number; } /** * This Error indicates an operation which would result in incorrect * arithmetic output has occurred. * * For example, trying to divide by zero or using a ``uint8`` to store * a negative value. */ export interface NumericFaultError extends EthersError<"NUMERIC_FAULT"> { /** * The attempted operation. */ operation: string; /** * The fault reported. */ fault: string; /** * The value the operation was attempted against. */ value: any; } // Argument Errors /** * This Error indicates an incorrect type or value was passed to * a function or method. */ export interface InvalidArgumentError extends EthersError<"INVALID_ARGUMENT"> { /** * The name of the argument. */ argument: string; /** * The value that was provided. */ value: any; info?: Record<string, any> } /** * This Error indicates there were too few arguments were provided. */ export interface MissingArgumentError extends EthersError<"MISSING_ARGUMENT"> { /** * The number of arguments received. */ count: number; /** * The number of arguments expected. */ expectedCount: number; } /** * This Error indicates too many arguments were provided. */ export interface UnexpectedArgumentError extends EthersError<"UNEXPECTED_ARGUMENT"> { /** * The number of arguments received. */ count: number; /** * The number of arguments expected. */ expectedCount: number; } // Blockchain Errors /** * The action that resulted in the call exception. */ export type CallExceptionAction = "call" | "estimateGas" | "getTransactionResult" | "sendTransaction" | "unknown"; /** * The related transaction that caused the error. */ export type CallExceptionTransaction = { to: null | string; from?: string; data: string; }; /** * This **Error** indicates a transaction reverted. */ export interface CallExceptionError extends EthersError<"CALL_EXCEPTION"> { /** * The action being performed when the revert was encountered. */ action: CallExceptionAction; /** * The revert data returned. */ data: null | string; /** * A human-readable representation of data, if possible. */ reason: null | string; /** * The transaction that triggered the exception. */ transaction: CallExceptionTransaction, /** * The contract invocation details, if available. */ invocation: null | { method: string; signature: string; args: Array<any>; } /** * The built-in or custom revert error, if available */ revert: null | { signature: string; name: string; args: Array<any>; } /** * If the error occurred in a transaction that was mined * (with a status of ``0``), this is the receipt. */ receipt?: TransactionReceipt; // @TODO: in v7, make this `null | TransactionReceipt` } /** * The sending account has insufficient funds to cover the * entire transaction cost. */ export interface InsufficientFundsError extends EthersError<"INSUFFICIENT_FUNDS"> { /** * The transaction. */ transaction: TransactionRequest; } /** * The sending account has already used this nonce in a * transaction that has been included. */ export interface NonceExpiredError extends EthersError<"NONCE_EXPIRED"> { /** * The transaction. */ transaction: TransactionRequest; } /** * A CCIP-read exception, which cannot be recovered from or * be further processed. */ export interface OffchainFaultError extends EthersError<"OFFCHAIN_FAULT"> { /** * The transaction. */ transaction?: TransactionRequest; /** * The reason the CCIP-read failed. */ reason: string; } /** * An attempt was made to replace a transaction, but with an * insufficient additional fee to afford evicting the old * transaction from the memory pool. */ export interface ReplacementUnderpricedError extends EthersError<"REPLACEMENT_UNDERPRICED"> { /** * The transaction. */ transaction: TransactionRequest; } /** * A pending transaction was replaced by another. */ export interface TransactionReplacedError extends EthersError<"TRANSACTION_REPLACED"> { /** * If the transaction was cancelled, such that the original * effects of the transaction cannot be assured. */ cancelled: boolean; /** * The reason the transaction was replaced. */ reason: "repriced" | "cancelled" | "replaced"; /** * The hash of the replaced transaction. */ hash: string; /** * The transaction that replaced the transaction. */ replacement: TransactionResponse; /** * The receipt of the transaction that replace the transaction. */ receipt: TransactionReceipt; } /** * This Error indicates an ENS name was used, but the name has not * been configured. * * This could indicate an ENS name is unowned or that the current * address being pointed to is the [[ZeroAddress]]. */ export interface UnconfiguredNameError extends EthersError<"UNCONFIGURED_NAME"> { /** * The ENS name that was requested */ value: string; } /** * This Error indicates a request was rejected by the user. * * In most clients (such as MetaMask), when an operation requires user * authorization (such as ``signer.sendTransaction``), the client * presents a dialog box to the user. If the user denies the request * this error is thrown. */ export interface ActionRejectedError extends EthersError<"ACTION_REJECTED"> { /** * The requested action. */ action: "requestAccess" | "sendTransaction" | "signMessage" | "signTransaction" | "signTypedData" | "unknown", /** * The reason the action was rejected. * * If there is already a pending request, some clients may indicate * there is already a ``"pending"`` action. This prevents an app * from spamming the user. */ reason: "expired" | "rejected" | "pending" } // Coding; converts an ErrorCode its Typed Error /** * A conditional type that transforms the [[ErrorCode]] T into * its EthersError type. * * @flatworm-skip-docs */ export type CodedEthersError<T> = T extends "UNKNOWN_ERROR" ? UnknownError: T extends "NOT_IMPLEMENTED" ? NotImplementedError: T extends "UNSUPPORTED_OPERATION" ? UnsupportedOperationError: T extends "NETWORK_ERROR" ? NetworkError: T extends "SERVER_ERROR" ? ServerError: T extends "TIMEOUT" ? TimeoutError: T extends "BAD_DATA" ? BadDataError: T extends "CANCELLED" ? CancelledError: T extends "BUFFER_OVERRUN" ? BufferOverrunError: T extends "NUMERIC_FAULT" ? NumericFaultError: T extends "INVALID_ARGUMENT" ? InvalidArgumentError: T extends "MISSING_ARGUMENT" ? MissingArgumentError: T extends "UNEXPECTED_ARGUMENT" ? UnexpectedArgumentError: T extends "CALL_EXCEPTION" ? CallExceptionError: T extends "INSUFFICIENT_FUNDS" ? InsufficientFundsError: T extends "NONCE_EXPIRED" ? NonceExpiredError: T extends "OFFCHAIN_FAULT" ? OffchainFaultError: T extends "REPLACEMENT_UNDERPRICED" ? ReplacementUnderpricedError: T extends "TRANSACTION_REPLACED" ? TransactionReplacedError: T extends "UNCONFIGURED_NAME" ? UnconfiguredNameError: T extends "ACTION_REJECTED" ? ActionRejectedError: never; /** * Returns true if the %%error%% matches an error thrown by ethers * that matches the error %%code%%. * * In TypeScript environments, this can be used to check that %%error%% * matches an EthersError type, which means the expected properties will * be set. * * @See [ErrorCodes](api:ErrorCode) * @example * try { * // code.... * } catch (e) { * if (isError(e, "CALL_EXCEPTION")) { * // The Type Guard has validated this object * console.log(e.data); * } * } */ export function isError<K extends ErrorCode, T extends CodedEthersError<K>>(error: any, code: K): error is T { return (error && (<EthersError>error).code === code); } /** * Returns true if %%error%% is a [[CallExceptionError]. */ export function isCallException(error: any): error is CallExceptionError { return isError(error, "CALL_EXCEPTION"); } /** * Returns a new Error configured to the format ethers emits errors, with * the %%message%%, [[api:ErrorCode]] %%code%% and additional properties * for the corresponding EthersError. * * Each error in ethers includes the version of ethers, a * machine-readable [[ErrorCode]], and depending on %%code%%, additional * required properties. The error message will also include the %%message%%, * ethers version, %%code%% and all additional properties, serialized. */ export function makeError<K extends ErrorCode, T extends CodedEthersError<K>>(message: string, code: K, info?: ErrorInfo<T>): T { let shortMessage = message; { const details: Array<string> = []; if (info) { if ("message" in info || "code" in info || "name" in info) { throw new Error(`value will overwrite populated values: ${ stringify(info) }`); } for (const key in info) { if (key === "shortMessage") { continue; } const value = <any>(info[<keyof ErrorInfo<T>>key]); // try { details.push(key + "=" + stringify(value)); // } catch (error: any) { // console.log("MMM", error.message); // details.push(key + "=[could not serialize object]"); // } } } details.push(`code=${ code }`); details.push(`version=${ version }`); if (details.length) { message += " (" + details.join(", ") + ")"; } } let error; switch (code) { case "INVALID_ARGUMENT": error = new TypeError(message); break; case "NUMERIC_FAULT": case "BUFFER_OVERRUN": error = new RangeError(message); break; default: error = new Error(message); } defineProperties<EthersError>(<EthersError>error, { code }); if (info) { Object.assign(error, info); } if ((<any>error).shortMessage == null) { defineProperties<EthersError>(<EthersError>error, { shortMessage }); } return <T>error; } /** * Throws an EthersError with %%message%%, %%code%% and additional error * %%info%% when %%check%% is falsish.. * * @see [[api:makeError]] */ export function assert<K extends ErrorCode, T extends CodedEthersError<K>>(check: unknown, message: string, code: K, info?: ErrorInfo<T>): asserts check { if (!check) { throw makeError(message, code, info); } } /** * A simple helper to simply ensuring provided arguments match expected * constraints, throwing if not. * * In TypeScript environments, the %%check%% has been asserted true, so * any further code does not need additional compile-time checks. */ export function assertArgument(check: unknown, message: string, name: string, value: unknown): asserts check { assert(check, message, "INVALID_ARGUMENT", { argument: name, value: value }); } export function assertArgumentCount(count: number, expectedCount: number, message?: string): void { if (message == null) { message = ""; } if (message) { message = ": " + message; } assert(count >= expectedCount, "missing arguemnt" + message, "MISSING_ARGUMENT", { count: count, expectedCount: expectedCount }); assert(count <= expectedCount, "too many arguments" + message, "UNEXPECTED_ARGUMENT", { count: count, expectedCount: expectedCount }); } const _normalizeForms = ["NFD", "NFC", "NFKD", "NFKC"].reduce((accum, form) => { try { // General test for normalize /* c8 ignore start */ if ("test".normalize(form) !== "test") { throw new Error("bad"); }; /* c8 ignore stop */ if (form === "NFD") { const check = String.fromCharCode(0xe9).normalize("NFD"); const expected = String.fromCharCode(0x65, 0x0301) /* c8 ignore start */ if (check !== expected) { throw new Error("broken") } /* c8 ignore stop */ } accum.push(form); } catch(error) { } return accum; }, <Array<string>>[]); /** * Throws if the normalization %%form%% is not supported. */ export function assertNormalize(form: string): void { assert(_normalizeForms.indexOf(form) >= 0, "platform missing String.prototype.normalize", "UNSUPPORTED_OPERATION", { operation: "String.prototype.normalize", info: { form } }); } /** * Many classes use file-scoped values to guard the constructor, * making it effectively private. This facilitates that pattern * by ensuring the %%givenGaurd%% matches the file-scoped %%guard%%, * throwing if not, indicating the %%className%% if provided. */ export function assertPrivate(givenGuard: any, guard: any, className?: string): void { if (className == null) { className = ""; } if (givenGuard !== guard) { let method = className, operation = "new"; if (className) { method += "."; operation += " " + className; } assert(false, `private constructor; use ${ method }from* methods`, "UNSUPPORTED_OPERATION", { operation }); } } ```
/content/code_sandbox/src.ts/utils/errors.ts
xml
2016-07-16T04:35:37
2024-08-16T13:37:46
ethers.js
ethers-io/ethers.js
7,843
5,162
```xml <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="path_to_url"> <item android:drawable="@drawable/AndroidPressed" android:state_pressed="true" /> <item android:drawable="@drawable/android_focused" android:state_focused="true" /> <item android:drawable="@drawable/android_normal" /> </selector> ```
/content/code_sandbox/tests/Mono.Android-Tests/Resources/drawable/android_button.xml
xml
2016-03-30T15:37:14
2024-08-16T19:22:13
android
dotnet/android
1,905
83
```xml import { AttributeType, Table } from "aws-cdk-lib/aws-dynamodb"; import { Construct } from "constructs"; export interface AppDatabaseProps {} export class AppDatabase extends Construct { static readonly KEY = "comment_key"; static readonly INDEX = "sentiment"; table: Table; constructor(scope: Construct, {}: AppDatabaseProps = {}) { super(scope, "ddb"); this.table = new Table(this, "Comments", { partitionKey: { name: AppDatabase.KEY, type: AttributeType.STRING }, sortKey: { name: AppDatabase.INDEX, type: AttributeType.STRING, }, }); } } ```
/content/code_sandbox/applications/feedback_sentiment_analyzer/cdk/lib/constructs/app-database.ts
xml
2016-08-18T19:06:57
2024-08-16T18:59:44
aws-doc-sdk-examples
awsdocs/aws-doc-sdk-examples
9,298
139
```xml import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; export const APP_ROUTES: Routes = [ { path: 'about', loadChildren: './about/about.module#AboutModule' }, { path: '', redirectTo: 'home', pathMatch: 'full' }, { path: '**', redirectTo: 'home', pathMatch: 'full' } ]; /** * Main module routing * * Link to about module with lazy-loading, and instead to home component */ @NgModule({ imports: [RouterModule.forRoot(APP_ROUTES)], exports: [RouterModule] }) export class AppRoutingModule {} ```
/content/code_sandbox/test/fixtures/todomvc-ng2-simple-routing-with-if/src/app/app-routing.module.ts
xml
2016-10-17T07:09:28
2024-08-14T16:30:10
compodoc
compodoc/compodoc
3,980
128
```xml /* * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ #include "modules/desktop_capture/window_finder_mac.h" #include <CoreFoundation/CoreFoundation.h> #include <memory> #include <utility> #include "modules/desktop_capture/mac/desktop_configuration.h" #include "modules/desktop_capture/mac/desktop_configuration_monitor.h" #include "modules/desktop_capture/mac/window_list_utils.h" namespace webrtc { WindowFinderMac::WindowFinderMac( rtc::scoped_refptr<DesktopConfigurationMonitor> configuration_monitor) : configuration_monitor_(std::move(configuration_monitor)) {} WindowFinderMac::~WindowFinderMac() = default; WindowId WindowFinderMac::GetWindowUnderPoint(DesktopVector point) { WindowId id = kNullWindowId; GetWindowList( [&id, point](CFDictionaryRef window) { DesktopRect bounds; bounds = GetWindowBounds(window); if (bounds.Contains(point)) { id = GetWindowId(window); return false; } return true; }, true, true); return id; } // static std::unique_ptr<WindowFinder> WindowFinder::Create( const WindowFinder::Options& options) { return std::make_unique<WindowFinderMac>(options.configuration_monitor); } } // namespace webrtc ```
/content/code_sandbox/ArLiveLite/include/webrtc/modules/desktop_capture/window_finder_mac.mm
xml
2016-08-26T06:35:48
2024-08-15T03:26:11
anyRTC-RTMP-OpenSource
anyrtcIO-Community/anyRTC-RTMP-OpenSource
4,672
331
```xml import { PropsWithChildren } from 'react'; import { ContextHelp } from '@@/PageHeader/ContextHelp'; import { useHeaderContext } from './HeaderContainer'; import { NotificationsMenu } from './NotificationsMenu'; import { UserMenu } from './UserMenu'; interface Props { title: string; } export function HeaderTitle({ title, children }: PropsWithChildren<Props>) { useHeaderContext(); return ( <div className="flex justify-between whitespace-normal pt-3"> <div className="flex items-center gap-2"> <h1 className="m-0 text-2xl font-medium text-gray-11 th-highcontrast:text-white th-dark:text-white" data-cy="page-title" > {title} </h1> {children && <>{children}</>} </div> <div className="flex items-end"> <NotificationsMenu /> <ContextHelp /> {!window.ddExtension && <UserMenu />} </div> </div> ); } ```
/content/code_sandbox/app/react/components/PageHeader/HeaderTitle.tsx
xml
2016-05-19T20:15:28
2024-08-16T19:15:14
portainer
portainer/portainer
30,083
218
```xml /** * Interface representing base build properties configuration. */ export interface PluginConfigType { /** * Interface representing available configuration for Android native build properties. * @platform android */ android?: PluginConfigTypeAndroid; /** * Interface representing available configuration for iOS native build properties. * @platform ios */ ios?: PluginConfigTypeIos; } /** * Interface representing available configuration for Android native build properties. * @platform android */ export interface PluginConfigTypeAndroid { /** * Enable React Native new architecture for Android platform. */ newArchEnabled?: boolean; /** * Override the default `minSdkVersion` version number in **build.gradle**. * */ minSdkVersion?: number; /** * Override the default `compileSdkVersion` version number in **build.gradle**. */ compileSdkVersion?: number; /** * Override the default `targetSdkVersion` version number in **build.gradle**. */ targetSdkVersion?: number; /** * Override the default `buildToolsVersion` version number in **build.gradle**. */ buildToolsVersion?: string; /** * Override the Kotlin version used when building the app. */ kotlinVersion?: string; /** * Enable [Proguard or R8](path_to_url in release builds to obfuscate Java code and reduce app size. */ enableProguardInReleaseBuilds?: boolean; /** * Enable [`shrinkResources`](path_to_url#shrink-resources) in release builds to remove unused resources from the app. * This property should be used in combination with `enableProguardInReleaseBuilds`. */ enableShrinkResourcesInReleaseBuilds?: boolean; /** * Enable [`crunchPngs`](path_to_url#crunch) in release builds to optimize PNG files. * This property is enabled by default, but "might inflate PNG files that are already compressed", so you may want to disable it if you do your own PNG optimization. * * @default true */ enablePngCrunchInReleaseBuilds?: boolean; /** * Append custom [Proguard rules](path_to_url to **android/app/proguard-rules.pro**. */ extraProguardRules?: string; /** * Interface representing available configuration for Android Gradle plugin [`PackagingOptions`](path_to_url */ packagingOptions?: PluginConfigTypeAndroidPackagingOptions; /** * Enable the Network Inspector. * * @default true */ networkInspector?: boolean; /** * Add extra maven repositories to all gradle projects. * * Takes an array of objects or strings. * Strings are passed as the `url` property of the object with no credentials or authentication scheme. * * This adds the following code to **android/build.gradle**: * ```groovy * allprojects { * repositories { * maven { * url "path_to_url" * } * } * ``` * * By using an `AndroidMavenRepository` object, you can specify credentials and an authentication scheme. * ```groovy * allprojects { * repositories { * maven { * url "path_to_url" * credentials { * username = "bar" * password = "baz" * } * authentication { * basic(BasicAuthentication) * } * } * } * } * ``` * * @see [Gradle documentation](path_to_url#sec:case-for-maven) * * @hide For the implementation details, * this property is actually handled by `expo-modules-autolinking` not the config-plugins inside `expo-build-properties` */ extraMavenRepos?: (AndroidMavenRepository | string)[]; /** * Indicates whether the app intends to use cleartext network traffic. * * @default false * * @see [Android documentation](path_to_url#usesCleartextTraffic) */ usesCleartextTraffic?: boolean; /** * Instructs the Android Gradle plugin to compress native libraries in the APK using the legacy packaging system. * * @default false * * @see [Android documentation](path_to_url#compress-native-libs-dsl) */ useLegacyPackaging?: boolean; /** * Specifies the set of other apps that an app intends to interact with. These other apps are specified by package name, * by intent signature, or by provider authority. * * @see [Android documentation](path_to_url */ manifestQueries?: PluginConfigTypeAndroidQueries; } /** * @platform android */ export interface AndroidMavenRepository { /** * The URL of the Maven repository. */ url: string; /** * The credentials to use when accessing the Maven repository. * May be of type PasswordCredentials, HttpHeaderCredentials, or AWSCredentials. * * @see The authentication schemes section of [Gradle documentation](path_to_url#sec:authentication_schemes) for more information. */ credentials?: AndroidMavenRepositoryCredentials; /** * The authentication scheme to use when accessing the Maven repository. */ authentication?: 'basic' | 'digest' | 'header'; } /** * @platform android */ export interface AndroidMavenRepositoryPasswordCredentials { username: string; password: string; } /** * @platform android */ export interface AndroidMavenRepositoryHttpHeaderCredentials { name: string; value: string; } /** * @platform android */ export interface AndroidMavenRepositoryAWSCredentials { accessKey: string; secretKey: string; sessionToken?: string; } /** * @platform android */ export type AndroidMavenRepositoryCredentials = AndroidMavenRepositoryPasswordCredentials | AndroidMavenRepositoryHttpHeaderCredentials | AndroidMavenRepositoryAWSCredentials; /** * Interface representing available configuration for iOS native build properties. * @platform ios */ export interface PluginConfigTypeIos { /** * Enable React Native new architecture for iOS platform. */ newArchEnabled?: boolean; /** * Override the default iOS "Deployment Target" version in the following projects: * - in CocoaPods projects, * - `PBXNativeTarget` with "com.apple.product-type.application" `productType` in the app project. */ deploymentTarget?: string; /** * Enable [`use_frameworks!`](path_to_url#use_frameworks_bang) * in `Podfile` to use frameworks instead of static libraries for Pods. */ useFrameworks?: 'static' | 'dynamic'; /** * Enable the Network Inspector. * * @default true */ networkInspector?: boolean; /** * Add extra CocoaPods dependencies for all targets. * * This configuration is responsible for adding the new Pod entries to **ios/Podfile**. * * @example * Creating entry in the configuration like below: * ```json * [ * { * name: "Protobuf", * version: "~> 3.14.0", * } * ] * ``` * Will produce the following entry in the generated **ios/Podfile**: * ```ruby * pod 'Protobuf', '~> 3.14.0' * ``` * * @hide For the implementation details, * this property is actually handled by `expo-modules-autolinking` but not the config-plugins inside `expo-build-properties`. */ extraPods?: ExtraIosPodDependency[]; /** * Enable C++ compiler cache for iOS builds. * * This speeds up compiling C++ code by caching the results of previous compilations. * * @see [React Native's documentation on local caches](path_to_url#local-caches) and * [Ccache documentation](path_to_url */ ccacheEnabled?: boolean; /** * Enable aggregation of Privacy Manifests (`PrivacyInfo.xcprivacy`) from * CocoaPods resource bundles. If enabled, the manifests will be merged into a * single file. If not enabled, developers will need to manually aggregate them. * * @see [Privacy manifests](path_to_url guide * and [Apple's documentation on Privacy manifest files](path_to_url */ privacyManifestAggregationEnabled?: boolean; } /** * Interface representing extra CocoaPods dependency. * @see [Podfile syntax reference](path_to_url#pod) * @platform ios */ export interface ExtraIosPodDependency { /** * Name of the pod. */ name: string; /** * Version of the pod. * CocoaPods supports various [versioning options](path_to_url#pod). * @example * ``` * ~> 0.1.2 * ``` */ version?: string; /** * Build configurations for which the pod should be installed. * @example * ``` * ['Debug', 'Release'] * ``` */ configurations?: string[]; /** * Whether this pod should use modular headers. */ modular_headers?: boolean; /** * Custom source to search for this dependency. * @example * ``` * path_to_url * ``` */ source?: string; /** * Custom local filesystem path to add the dependency. * @example * ``` * ~/Documents/AFNetworking * ``` */ path?: string; /** * Custom podspec path. * @example * ```path_to_url``` */ podspec?: string; /** * Test specs can be optionally included via the :testspecs option. By default, none of a Pod's test specs are included. * @example * ``` * ['UnitTests', 'SomeOtherTests'] * ``` */ testspecs?: string[]; /** * Use the bleeding edge version of a Pod. * * @example * ```json * { * "name": "AFNetworking", * "git": "path_to_url", * "tag": "0.7.0" * } * ``` * * This acts like to add this pod dependency statement: * * ```rb * pod 'AFNetworking', :git => 'path_to_url :tag => '0.7.0' * ``` */ git?: string; /** * The git branch to fetch. See the {@link git} property for more information. */ branch?: string; /** * The git tag to fetch. See the {@link git} property for more information. */ tag?: string; /** * The git commit to fetch. See the {@link git} property for more information. */ commit?: string; } /** * Interface representing available configuration for Android Gradle plugin [`PackagingOptions`](path_to_url * @platform android */ export interface PluginConfigTypeAndroidPackagingOptions { /** * Array of patterns for native libraries where only the first occurrence is packaged in the APK. */ pickFirst?: string[]; /** * Array of patterns for native libraries that should be excluded from being packaged in the APK. */ exclude?: string[]; /** * Array of patterns for native libraries where all occurrences are concatenated and packaged in the APK. */ merge?: string[]; /** * Array of patterns for native libraries that should not be stripped of debug symbols. */ doNotStrip?: string[]; } /** * @platform android */ export interface PluginConfigTypeAndroidQueries { /** * Specifies one or more apps that your app intends to access. These other apps might integrate with your app, or your app might use services that these other apps provide. */ package?: string[]; /** * Specifies an intent filter signature. Your app can discover other apps that have matching `<intent-filter>` elements. * These intents have restrictions compared to typical intent filter signatures. * * @see [Android documentation](path_to_url#intent-filter-signature) for details */ intent?: PluginConfigTypeAndroidQueriesIntent[]; /** * Specifies one or more content provider authorities. Your app can discover other apps whose content providers use the specified authorities. * There are some restrictions on the options that you can include in this `<provider>` element, compared to a typical `<provider>` manifest element. You may only specify the `android:authorities` attribute. */ provider?: string[]; } /** * @platform android */ export interface PluginConfigTypeAndroidQueriesIntent { /** * A string naming the action to perform. Usually one of the platform-defined values, such as `ACTION_SEND` or `ACTION_VIEW`. */ action?: string; /** * A description of the data associated with the intent. */ data?: PluginConfigTypeAndroidQueriesData; /** * Provides an additional way to characterize the activity handling the intent, * usually related to the user gesture or location from which it's started. */ category?: string | string[]; } /** * @platform android */ export interface PluginConfigTypeAndroidQueriesData { /** * Specify a URI scheme that is handled */ scheme?: string; /** * Specify a URI authority host that is handled */ host?: string; /** * Specify a MIME type that is handled */ mimeType?: string; } /** * @ignore */ export declare function validateConfig(config: any): PluginConfigType; ```
/content/code_sandbox/packages/expo-build-properties/build/pluginConfig.d.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
2,967
```xml import * as MicrosoftGroup from '@microsoft/microsoft-graph-types'; export interface IReactMyGroupsState { groups: MicrosoftGroup.Group[]; isLoading: boolean; } ```
/content/code_sandbox/samples/react-my-groups/src/webparts/reactMyGroups/components/reactMyGroups/IReactMyGroupsState.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
36
```xml import { createComponent, ComponentProps } from '@/internals/utils'; export type HeaderProps = ComponentProps; /** * The `<Header>` component is used to specify the header of the page. * @see path_to_url */ const Header = createComponent({ name: 'Header', componentAs: 'header' }); export default Header; ```
/content/code_sandbox/src/Header/Header.tsx
xml
2016-06-06T02:27:46
2024-08-16T16:41:54
rsuite
rsuite/rsuite
8,263
70
```xml import fs from 'fs' import path from 'path' import { docsUrl } from '@pnpm/cli-utils' import { fetchFromDir } from '@pnpm/directory-fetcher' import { createIndexedPkgImporter } from '@pnpm/fs.indexed-pkg-importer' import { isEmptyDirOrNothing } from '@pnpm/fs.is-empty-dir-or-nothing' import { install } from '@pnpm/plugin-commands-installation' import { FILTERING } from '@pnpm/common-cli-options-help' import { PnpmError } from '@pnpm/error' import rimraf from '@zkochan/rimraf' import renderHelp from 'render-help' import { deployHook } from './deployHook' import { logger } from '@pnpm/logger' import { deployCatalogHook } from './deployCatalogHook' export const shorthands = install.shorthands export function rcOptionsTypes (): Record<string, unknown> { return install.rcOptionsTypes() } export function cliOptionsTypes (): Record<string, unknown> { return install.cliOptionsTypes() } export const commandNames = ['deploy'] export function help (): string { return renderHelp({ description: 'Experimental! Deploy a package from a workspace', url: docsUrl('deploy'), usages: ['pnpm --filter=<deployed project name> deploy <target directory>'], descriptionLists: [ { title: 'Options', list: [ { description: "Packages in `devDependencies` won't be installed", name: '--prod', shortAlias: '-P', }, { description: 'Only `devDependencies` are installed regardless of the `NODE_ENV`', name: '--dev', shortAlias: '-D', }, { description: '`optionalDependencies` are not installed', name: '--no-optional', }, ], }, FILTERING, ], }) } export async function handler ( opts: install.InstallCommandOptions, params: string[] ): Promise<void> { if (!opts.workspaceDir) { throw new PnpmError('CANNOT_DEPLOY', 'A deploy is only possible from inside a workspace') } const selectedDirs = Object.keys(opts.selectedProjectsGraph ?? {}) if (selectedDirs.length === 0) { throw new PnpmError('NOTHING_TO_DEPLOY', 'No project was selected for deployment') } if (selectedDirs.length > 1) { throw new PnpmError('CANNOT_DEPLOY_MANY', 'Cannot deploy more than 1 project') } if (params.length !== 1) { throw new PnpmError('INVALID_DEPLOY_TARGET', 'This command requires one parameter') } const deployedDir = selectedDirs[0] const deployDirParam = params[0] const deployDir = path.isAbsolute(deployDirParam) ? deployDirParam : path.join(opts.dir, deployDirParam) if (!isEmptyDirOrNothing(deployDir)) { if (!opts.force) { throw new PnpmError('DEPLOY_DIR_NOT_EMPTY', `Deploy path ${deployDir} is not empty`) } logger.warn({ message: 'using --force, deleting deploy path', prefix: deployDir }) } await rimraf(deployDir) await fs.promises.mkdir(deployDir, { recursive: true }) const includeOnlyPackageFiles = !opts.deployAllFiles await copyProject(deployedDir, deployDir, { includeOnlyPackageFiles }) await install.handler({ ...opts, confirmModulesPurge: false, // Deploy doesn't work with dedupePeerDependents=true currently as for deploy // we need to select a single project for install, while dedupePeerDependents // doesn't work with filters right now. // Related issue: path_to_url dedupePeerDependents: false, depth: Infinity, hooks: { ...opts.hooks, readPackage: [ ...(opts.hooks?.readPackage ?? []), deployHook, deployCatalogHook.bind(null, opts.catalogs ?? {}), ], }, frozenLockfile: false, preferFrozenLockfile: false, saveLockfile: false, virtualStoreDir: path.join(deployDir, 'node_modules/.pnpm'), modulesDir: path.relative(deployedDir, path.join(deployDir, 'node_modules')), rawLocalConfig: { ...opts.rawLocalConfig, // This is a workaround to prevent frozen install in CI envs. 'frozen-lockfile': false, }, includeOnlyPackageFiles, }) } async function copyProject (src: string, dest: string, opts: { includeOnlyPackageFiles: boolean }): Promise<void> { const { filesIndex } = await fetchFromDir(src, opts) const importPkg = createIndexedPkgImporter('clone-or-copy') importPkg(dest, { filesMap: filesIndex, force: true, resolvedFrom: 'local-dir' }) } ```
/content/code_sandbox/releasing/plugin-commands-deploy/src/deploy.ts
xml
2016-01-28T07:40:43
2024-08-16T12:38:47
pnpm
pnpm/pnpm
28,869
1,070
```xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration type="org.lamport.tla.toolbox.tool.tlc.modelCheck"> <stringAttribute key="configurationName" value="Model_3a"/> <stringAttribute key="modelBehaviorFairness" value=""/> <stringAttribute key="modelBehaviorInit" value="Init"/> <stringAttribute key="modelBehaviorNext" value="(x'=x /\ y'=1-y)"/> <stringAttribute key="modelBehaviorSpec" value=""/> <intAttribute key="modelBehaviorSpecType" value="2"/> <stringAttribute key="modelBehaviorVars" value="x, y"/> <booleanAttribute key="modelCorrectnessCheckDeadlock" value="true"/> <listAttribute key="modelCorrectnessInvariants"/> <listAttribute key="modelCorrectnessProperties"> <listEntry value="1[]&lt;&gt;&lt;&lt;y = 1 =&gt; y'=&quot;a&quot;&gt;&gt;_y"/> </listAttribute> <listAttribute key="modelParameterConstants"/> <intAttribute key="numberOfWorkers" value="2"/> <stringAttribute key="specName" value="MTest5"/> <stringAttribute key="specRootFile" value="C:\users\lamport\tla\tla2\general\tests\MTest5.tla"/> </launchConfiguration> ```
/content/code_sandbox/general/tests/MTest5.toolbox/MTest5___Model_3a.launch
xml
2016-02-02T08:48:27
2024-08-16T16:50:00
tlaplus
tlaplus/tlaplus
2,271
276
```xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="path_to_url" xmlns:xsi="path_to_url" xsi:schemaLocation="path_to_url path_to_url"> <modelVersion>4.0.0</modelVersion> <artifactId>iBase4J-Biz-Service-Server</artifactId> <name>${project.artifactId}</name> <packaging>pom</packaging> <url>path_to_url <parent> <groupId>org.ibase4j</groupId> <artifactId>iBase4J</artifactId> <version>1.3.0</version> <relativePath>./</relativePath> </parent> <modules> <module>iBase4J-Biz-Facade</module> <module>iBase4J-Biz-Service</module> <module>iBase4J-SYS-Facade</module> </modules> <!-- clean package -P test -f pom.biz-service.xml --> </project> ```
/content/code_sandbox/pom.biz-service.xml
xml
2016-08-15T06:48:34
2024-07-23T12:49:30
iBase4J
iBase4J/iBase4J
1,584
235
```xml import { EditorState, Modifier, SelectionState } from 'draft-js'; import { findWithRegex } from '@draft-js-plugins/utils'; import emojiToolkit from 'emoji-toolkit'; const unicodeRegex = new RegExp(emojiToolkit.regAscii, 'g'); /* * Attaches Immutable DraftJS Entities to the Emoji text. * * This is necessary as emojis consist of 2 characters (unicode). By making them * immutable the whole Emoji is removed when hitting backspace. */ export default function attachImmutableEntitiesToEmojis( editorState: EditorState ): EditorState { const contentState = editorState.getCurrentContent(); const blocks = contentState.getBlockMap(); let newContentState = contentState; blocks.forEach((block) => { if (block) { const plainText = block.getText(); const addEntityToEmoji = (start: number, end: number): void => { const existingEntityKey = block.getEntityAt(start); if (existingEntityKey) { // avoid manipulation in case the emoji already has an entity const entity = newContentState.getEntity(existingEntityKey); if (entity && entity.getType() === 'emoji') { return; } } const selection: SelectionState = SelectionState.createEmpty( block.getKey() ) .set('anchorOffset', start) .set('focusOffset', end) as SelectionState; const emojiText = plainText.substring(start, end); const contentStateWithEntity = newContentState.createEntity( 'emoji', 'IMMUTABLE', { emojiUnicode: emojiText } ); const entityKey = contentStateWithEntity.getLastCreatedEntityKey(); newContentState = Modifier.replaceText( newContentState, selection, emojiText, undefined, entityKey ); }; findWithRegex(unicodeRegex, block, addEntityToEmoji); } }); if (!newContentState.equals(contentState)) { return EditorState.push(editorState, newContentState, 'change-block-data'); } return editorState; } ```
/content/code_sandbox/packages/emoji/src/modifiers/attachImmutableEntitiesToEmojis.ts
xml
2016-02-26T09:54:56
2024-08-16T18:16:31
draft-js-plugins
draft-js-plugins/draft-js-plugins
4,087
439
```xml import {getNodeName, isNode} from '@floating-ui/utils/dom'; import type {ComponentPublicInstance} from 'vue-demi'; import type {MaybeElement} from '../types'; function isComponentPublicInstance( target: unknown, ): target is ComponentPublicInstance { return target != null && typeof target === 'object' && '$el' in target; } export function unwrapElement<T>(target: MaybeElement<T>) { if (isComponentPublicInstance(target)) { const element = target.$el as Exclude< MaybeElement<T>, ComponentPublicInstance >; return isNode(element) && getNodeName(element) === '#comment' ? null : element; } return target as Exclude<MaybeElement<T>, ComponentPublicInstance>; } ```
/content/code_sandbox/packages/vue/src/utils/unwrapElement.ts
xml
2016-03-29T17:00:47
2024-08-16T16:29:40
floating-ui
floating-ui/floating-ui
29,450
163
```xml import { InterceptorEvents } from './events'; interface TypedInterceptor<T> { getPromises: () => Array<any>; on<K extends keyof T>(key: K, fn: (props: T[K]) => any); promise: (fn: () => Promise<any>) => void; resolve: () => Promise<any>; send<K extends keyof T>(key: K, props: T[K]): Promise<T[K]>; sync<K extends keyof T>(key: K, props: T[K]): T[K]; waitFor<K extends keyof T>(key: K, fn: (props: T[K]) => Promise<T[K]>); } export type MainInterceptor = TypedInterceptor<InterceptorEvents>; export function createInterceptor(): MainInterceptor { const subscriptions = new Map<string, Array<(props: any) => any>>(); let promises: Array<any> = []; // adds an interceptor function add(key: string, fn: any) { let fns: Array<any> = []; if (!subscriptions.has(key)) { subscriptions.set(key, fns); } else { fns = subscriptions.get(key); } fns.push(fn); } const on = function(key: any, fn: (props: any) => any) { add(key, fn); }; return { on, promise: function(fn: () => Promise<any>) { promises.push(fn()); }, resolve: async function(): Promise<any> { const res = await Promise.all(promises); promises = []; return res; }, send: async function(key: string, props: any) { if (subscriptions.has(key)) { const fns = subscriptions.get(key); const responses = []; for (let fn of fns) { responses.push(await fn(props)); } if (responses.length > 0) { // return the latest response return responses[responses.length - 1]; } } return props; }, // sync (emit an even which should return an according props sync: function(key: string, props: any) { if (subscriptions.has(key)) { const fns = subscriptions.get(key); const responses = fns.map(fn => fn(props)); if (responses.length > 0) { // return the latest response return responses[responses.length - 1]; } } return props; }, waitFor: on, getPromises: () => promises, }; } ```
/content/code_sandbox/src/interceptor/interceptor.ts
xml
2016-10-28T10:37:16
2024-07-27T15:17:43
fuse-box
fuse-box/fuse-box
4,003
533
```xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="path_to_url" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <EditText android:id="@+id/new_name" android:layout_width="match_parent" android:layout_height="wrap_content" /> <Button android:id="@+id/add_item" android:text="@string/add_new" android:background="@android:color/holo_green_light" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout> ```
/content/code_sandbox/toothpick-sample/src/main/res/layout/backpack_new.xml
xml
2016-03-28T00:23:34
2024-08-16T17:51:39
toothpick
stephanenicolas/toothpick
1,120
138
```xml <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="path_to_url"> <ItemGroup> <Filter Include="Source Files"> <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier> <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions> </Filter> <Filter Include="Header Files"> <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier> <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions> </Filter> <Filter Include="Resource Files"> <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier> <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions> </Filter> </ItemGroup> <ItemGroup> <ClCompile Include="openvpnserv.c"> <Filter>Source Files</Filter> </ClCompile> <ClCompile Include="service.c"> <Filter>Source Files</Filter> </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="service.h"> <Filter>Header Files</Filter> </ClInclude> </ItemGroup> <ItemGroup> <ResourceCompile Include="openvpnserv_resources.rc"> <Filter>Resource Files</Filter> </ResourceCompile> </ItemGroup> </Project> ```
/content/code_sandbox/components/openvpn/src/openvpnserv/openvpnserv.vcxproj.filters
xml
2016-10-14T12:31:42
2024-08-12T10:26:54
Lua-RTOS-ESP32
whitecatboard/Lua-RTOS-ESP32
1,185
396
```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 /** * Returns the mode for a raised cosine distribution with location `mu` and scale `s`. * * ## Notes * * - If provided `s <= 0`, the function returns `NaN`. * * @param mu - location parameter * @param s - scale parameter * @returns mode * * @example * var y = mode( 0.0, 1.0 ); * // returns 0.0 * * @example * var y = mode( 5.0, 2.0 ); * // returns 5.0 * * @example * var y = mode( NaN, 1.0 ); * // returns NaN * * @example * var y = mode( 0.0, NaN ); * // returns NaN * * @example * var y = mode( 0.0, 0.0 ); * // returns NaN */ declare function mode( mu: number, s: number ): number; // EXPORTS // export = mode; ```
/content/code_sandbox/lib/node_modules/@stdlib/stats/base/dists/cosine/mode/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
277
```xml import { useLayoutEffect } from 'react'; import { Platform } from 'react-native'; // Node environment may render in multiple processes causing the warning to log mutiple times // Hence we skip the warning in these environments. const canWarn = Platform.select({ native: process.env.NODE_ENV !== 'production', default: process.env.NODE_ENV !== 'production' && typeof window !== 'undefined', }); const warned = new Set<string>(); export function useWarnOnce(message: string, guard: unknown = true, key = message) { // useLayoutEffect typically doesn't run in node environments. // Combined with skipWarn, this should prevent unwanted warnings useLayoutEffect(() => { if (guard && canWarn && !warned.has(key)) { warned.add(key); console.warn(message); } }, [guard]); } export function useDeprecated(message: string, guard: unknown = true, key = message) { return useWarnOnce(key, guard, `Expo Router: ${message}`); } ```
/content/code_sandbox/packages/expo-router/src/useDeprecated.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
214
```xml <mxfile host="localhost" modified="2021-05-13T07:30:00.417Z" agent="5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36" etag="3mGs1p0h2--OdLO2dmgg" version="@DRAWIO-VERSION@" type="device"><diagram name="Page-1" id="ad52d381-51e7-2e0d-a935-2d0ddd2fd229">7Z1dc5s4FIZ/jS+7A+your_sha256_hash4z73rz8LmMt+svIuX5jDnpw8z7OGPM9Z25your_sha512_hash+ztFqrVNdxjid+49lqrW49D9SJZZx8X5ViX6j7FaLghzObWH+Nyrpbx6m4P0nyPs2861KI6vBp83DN87pYdYkdrrt55mzzk0teVJALWLJgvuc7y+UiXd6FyQf1DT/ifK+KYcbCXH7X1W4bF/Lzqv78TWyzRGarUR3OylucZlB/XfWoC/N+nVX8dhsn9fG9FIzMtK42uTxy5cen0uKpOmpKpT5IxEbey/voyM95vOT5VVO81yIXpTz1VMDysqoU3xtWsiyv7kRR3cSbLK8l+Bcv07iIVbLSm1tni/NsVciDRJYaL+uEMlHnA6f5a05LVRcTLyv+your_sha256_hashyour_sha256_hashmBD7FuI/your_sha256_hasho7a+UV/EISE+i9g3ur7+fEzEcxDiZoDj0gAHOMAxKnIz4BllhLPoRxncTybKRq+rq7kejLK+your_sha256_hashyour_sha256_hashvTRksON16ZDnRg97MSpkmO2lIXsEGQjZML5cb1TK/Zwv6nq9kjJzRqVsO1+Ny0XozEetY6AbtUPFeo6Bae3NK+eYglGtDmaPgT8VKUEzxzptZh7UaPbfhZk9oL0WRZpVmSgscuVabJZ7eXv4VJ+DgeGbNKgtaH5gQ5t3MHuXiT4GG59+LUXCd7s+/dp23TsD+WfAGgDaz64J3PBduNpD0iNDRrCYYQUGXVbgcLTssWXJ87iz4eTpit+qQ1WybXonpM4Bicvq13oNuJF2k9Uyour_sha512_hashlnacaHaeU4nO7EvE/4cjEMe+YevePVMHv2crWG8KLcDxh+your_sha256_hashkY5t/your_sha256_hashyour_sha256_hashDNF9MgYnph08Y3TfXvFI2kGtHTyusk+u8sS04+PRDtnKE9MOnkVfPvnKeLQTAbTDEPV3yFfGox0GMgcRdXjIWEYkHshkKMPT4wlsZ/kfviPdDK4b0IJB6Eyo2ozzwfklWuhVNjoMgAIOlpb69q8iK6qTLOLubid/qKm95ke8Uo62WX3cXmVvIb+your_sha256_hashyour_sha256_hashss0cNjxf0jCZPEaih0V8YIIjBcJh7hpOnRhvaaC/your_sha256_hashyour_sha256_hashTruGadIXZHfC1uD09UHrbD/QtfIZr4o0atjzs6YHS+your_sha256_hash7wxiIeMrKmJB080hMg2sv4QJBuUS+your_sha256_hashCCoXrf8rAUojp9xJXxdv1FpLzO8T8=</diagram></mxfile> ```
/content/code_sandbox/src/main/webapp/templates/maps/concept_map_2.xml
xml
2016-09-06T12:59:15
2024-08-16T13:28:41
drawio
jgraph/drawio
40,265
1,020
```xml import { makeStyles, mergeClasses, shorthands } from '@griffel/react'; import { ButtonSlots, useButtonStyles_unstable } from '@fluentui/react-button'; import type { SlotClassNames } from '@fluentui/react-utilities'; import type { HamburgerState } from './Hamburger.types'; import { navItemTokens } from '../sharedNavStyles.styles'; export const hamburgerClassNames: SlotClassNames<ButtonSlots> = { root: 'fui-Hamburger', icon: 'fui-Hamburger__icon', }; /** * Styles for the root slot */ const useStyles = makeStyles({ root: { textDecorationLine: 'none', backgroundColor: navItemTokens.backgroundColor, ...shorthands.border('none'), ':hover': { backgroundColor: navItemTokens.backgroundColorHover, }, ':active': { backgroundColor: navItemTokens.backgroundColorPressed, }, }, }); /** * Apply styling to the Hamburger slots based on the state */ export const useHamburgerStyles_unstable = (state: HamburgerState): HamburgerState => { 'use no memo'; useButtonStyles_unstable(state); const styles = useStyles(); state.root.className = mergeClasses(hamburgerClassNames.root, styles.root, state.root.className); if (state.icon) { state.icon.className = mergeClasses(hamburgerClassNames.icon, state.icon.className); } return state; }; ```
/content/code_sandbox/packages/react-components/react-nav-preview/library/src/components/Hamburger/useHamburgerStyles.styles.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
299
```xml import * as bodyParser from 'body-parser'; import { debugFacebook, debugRequest } from './debuggers'; import initFacebook from './controller'; import systemStatus from './systemStatus'; import userMiddleware from './middlewares/userMiddleware'; import app from '@erxes/api-utils/src/app'; const rawBodySaver = (req, _res, buf, encoding) => { if (buf && buf.length) { req.rawBody = buf.toString(encoding || 'utf8'); if (req.headers.fromcore === 'true') { req.rawBody = req.rawBody.replace(/\//g, '\\/'); } } }; const initApp = async () => { app.use( bodyParser.urlencoded({ limit: '10mb', verify: rawBodySaver, extended: true, }), ); app.use(bodyParser.json({ limit: '10mb', verify: rawBodySaver })); app.use(userMiddleware); app.use(bodyParser.raw({ limit: '10mb', verify: rawBodySaver, type: '*/*' })); app.use((req, _res, next) => { debugRequest(debugFacebook, req); next(); }); app.get('/system-status', async (_req, res) => { return res.json(await systemStatus()); }); // init bots initFacebook(app); // Error handling middleware app.use((error, _req, res, _next) => { console.error(error.stack); res.status(500).send(error.message); }); }; export default initApp; ```
/content/code_sandbox/packages/plugin-facebook-api/src/initApp.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
327
```xml import { ActivityHandler, TurnContext } from 'botbuilder'; export class EchoBot extends ActivityHandler { public conversationReferences1: any; constructor(conversationReferences) { super(); // Dependency injected dictionary for storing ConversationReference objects used in NotifyController to proactively message users this.conversationReferences1 = conversationReferences; this.onConversationUpdate(async (context, next) => { addConversationReference(context.activity); await next(); }); // See path_to_url to learn more about the message and other activity types. this.onMessage(async (context, next) => { addConversationReference(context.activity); // Echo back what the user said await context.sendActivity(`You sent '${ context.activity.text }'`); await next(); }); this.onMembersAdded(async (context, next) => { const membersAdded = context.activity.membersAdded; for (const member of membersAdded) { if (member.id !== context.activity.recipient.id) { const welcomeMessage = 'Welcome to the Proactive Bot sample. Navigate to path_to_url to proactively message everyone who has previously messaged this bot.'; await context.sendActivity(welcomeMessage); } } // By calling next() you ensure that the next BotHandler is run. await next(); }); function addConversationReference(activity): void { const conversationReference = TurnContext.getConversationReference(activity); conversationReferences[conversationReference.conversation.id] = conversationReference; } } } ```
/content/code_sandbox/samples/typescript_nodejs/16.proactive-messages/src/bot.ts
xml
2016-09-20T16:17:28
2024-08-16T02:44:00
BotBuilder-Samples
microsoft/BotBuilder-Samples
4,323
317
```xml <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="path_to_url"> <ItemGroup> <None Include="..\defs\plugin.def" /> </ItemGroup> <ItemGroup> <Filter Include="AUTH files"> <UniqueIdentifier>{7b6c8954-96af-468f-a901-f3c81597d183}</UniqueIdentifier> </Filter> <Filter Include="Resource files"> <UniqueIdentifier>{4c5e0fa9-7842-465d-9364-753bfb267c3d}</UniqueIdentifier> </Filter> </ItemGroup> <ItemGroup> <ResourceCompile Include="..\..\..\src\jrd\version.rc"> <Filter>Resource files</Filter> </ResourceCompile> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\..\src\auth\SecurityDatabase\LegacyServer.cpp"> <Filter>AUTH files</Filter> </ClCompile> <ClCompile Include="..\..\..\src\auth\SecDbCache.cpp"> <Filter>AUTH files</Filter> </ClCompile> </ItemGroup> </Project> ```
/content/code_sandbox/builds/win32/msvc15/legacy_auth.vcxproj.filters
xml
2016-03-16T06:10:37
2024-08-16T14:13:51
firebird
FirebirdSQL/firebird
1,223
267
```xml import { Middleware, orderedApply } from "graphile-config"; const $$middleware = Symbol("middleware"); export function getGrafastMiddleware( resolvedPreset: GraphileConfig.ResolvedPreset & { [$$middleware]?: Middleware<GraphileConfig.GrafastMiddleware> | null; }, ) { if (resolvedPreset[$$middleware] !== undefined) { return resolvedPreset[$$middleware]; } let middleware: Middleware<GraphileConfig.GrafastMiddleware> | null = null; orderedApply( resolvedPreset.plugins, (p) => p.grafast?.middleware, (name, fn, _plugin) => { if (!middleware) middleware = new Middleware(); middleware.register(name, fn as any); }, ); try { resolvedPreset[$$middleware] = middleware; } catch { // Ignore - preset must be readonly } return middleware; } ```
/content/code_sandbox/grafast/grafast/src/middleware.ts
xml
2016-04-14T21:29:19
2024-08-16T17:12:51
crystal
graphile/crystal
12,539
201
```xml /** * OniSnippet.ts * * Wrapper around `TextmateSnippet`. There are some differences in behavior * due to differences in editor behavior, for Oni/Neovim, we need to * get the snippet split by new lines, with placeholders per line/character * instead of by offset. */ import * as Snippets from "vscode-snippet-parser/lib" import { normalizeNewLines } from "./../../Utility" export type VariableResolver = Snippets.VariableResolver export type Variable = Snippets.Variable export interface OniSnippetPlaceholder { index: number // Zero-based line relative to the start of the snippet line: number // Zero-based start character character: number value: string isFinalTabstop: boolean } export const getLineCharacterFromOffset = ( offset: number, lines: string[], ): { line: number; character: number } => { let idx = 0 let currentOffset = 0 while (idx < lines.length) { if (offset >= currentOffset && offset <= currentOffset + lines[idx].length) { return { line: idx, character: offset - currentOffset } } currentOffset += lines[idx].length + 1 idx++ } return { line: -1, character: -1 } } export class OniSnippet { private _parser: Snippets.SnippetParser = new Snippets.SnippetParser() private _placeholderValues: { [index: number]: string } = {} private _snippetString: string constructor(snippet: string, private _variableResolver?: VariableResolver) { this._snippetString = normalizeNewLines(snippet) } public setPlaceholder(index: number, newValue: string): void { this._placeholderValues[index] = newValue } public getPlaceholderValue(index: number): string { return this._placeholderValues[index] || "" } public getPlaceholders(): OniSnippetPlaceholder[] { const snippet = this._getSnippetWithFilledPlaceholders() const placeholders = snippet.placeholders const lines = this.getLines() const oniPlaceholders = placeholders.map(p => { const offset = snippet.offset(p) const position = getLineCharacterFromOffset(offset, lines) return { ...position, index: p.index, value: p.toString(), isFinalTabstop: p.isFinalTabstop, } }) return oniPlaceholders } public getLines(): string[] { const normalizedSnippetString = this._getNormalizedSnippet() return normalizedSnippetString.split("\n") } private _getSnippetWithFilledPlaceholders(): Snippets.TextmateSnippet { const snippet = this._parser.parse(this._snippetString) if (this._variableResolver) { snippet.resolveVariables(this._variableResolver) } Object.keys(this._placeholderValues).forEach((key: string) => { const val = this._placeholderValues[key] const snip = this._parser.parse(val) const placeholderToReplace = snippet.placeholders.filter( p => p.index.toString() === key, ) placeholderToReplace.forEach(rep => { const placeHolder = new Snippets.Placeholder(rep.index) placeHolder.appendChild(snip) snippet.replace(rep, [placeHolder]) }) }) return snippet } private _getNormalizedSnippet(): string { const snippetString = this._getSnippetWithFilledPlaceholders().toString() const normalizedSnippetString = snippetString.replace("\r\n", "\n") return normalizedSnippetString } } ```
/content/code_sandbox/browser/src/Services/Snippets/OniSnippet.ts
xml
2016-11-16T14:42:55
2024-08-14T11:48:05
oni
onivim/oni
11,355
769
```xml <?xml version="1.0" encoding="UTF-8"?> <spirit:component xmlns:xilinx="path_to_url" xmlns:spirit="path_to_url" xmlns:xsi="path_to_url"> <spirit:vendor>xilinx.com</spirit:vendor> <spirit:library>user</spirit:library> <spirit:name>trace_generator_controller</spirit:name> <spirit:version>1.0</spirit:version> <spirit:model> <spirit:views> <spirit:view> <spirit:name>xilinx_anylanguagesynthesis</spirit:name> <spirit:displayName>Synthesis</spirit:displayName> <spirit:envIdentifier>:vivado.xilinx.com:synthesis</spirit:envIdentifier> <spirit:language>Verilog</spirit:language> <spirit:modelName>trace_generator_controller</spirit:modelName> <spirit:fileSetRef> <spirit:localName>xilinx_anylanguagesynthesis_view_fileset</spirit:localName> </spirit:fileSetRef> <spirit:parameters> <spirit:parameter> <spirit:name>viewChecksum</spirit:name> <spirit:value>2386d546</spirit:value> </spirit:parameter> </spirit:parameters> </spirit:view> <spirit:view> <spirit:name>xilinx_anylanguagebehavioralsimulation</spirit:name> <spirit:displayName>Simulation</spirit:displayName> <spirit:envIdentifier>:vivado.xilinx.com:simulation</spirit:envIdentifier> <spirit:language>Verilog</spirit:language> <spirit:modelName>trace_generator_controller</spirit:modelName> <spirit:fileSetRef> <spirit:localName>xilinx_anylanguagebehavioralsimulation_view_fileset</spirit:localName> </spirit:fileSetRef> <spirit:parameters> <spirit:parameter> <spirit:name>viewChecksum</spirit:name> <spirit:value>2386d546</spirit:value> </spirit:parameter> </spirit:parameters> </spirit:view> <spirit:view> <spirit:name>xilinx_xpgui</spirit:name> <spirit:displayName>UI Layout</spirit:displayName> <spirit:envIdentifier>:vivado.xilinx.com:xgui.ui</spirit:envIdentifier> <spirit:fileSetRef> <spirit:localName>xilinx_xpgui_view_fileset</spirit:localName> </spirit:fileSetRef> <spirit:parameters> <spirit:parameter> <spirit:name>viewChecksum</spirit:name> <spirit:value>3f726323</spirit:value> </spirit:parameter> </spirit:parameters> </spirit:view> </spirit:views> <spirit:ports> <spirit:port> <spirit:name>clk</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>controls_input</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:vector> <spirit:left spirit:format="long">5</spirit:left> <spirit:right spirit:format="long">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>numSample</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:vector> <spirit:left spirit:format="long" spirit:resolve="dependent" spirit:dependency="(spirit:decode(id(&apos;MODELPARAM_VALUE.ADDR_WIDTH&apos;)) - 1)">17</spirit:left> <spirit:right spirit:format="long">0</spirit:right> </spirit:vector> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic_vector</spirit:typeName> <spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>reset_n</spirit:name> <spirit:wire> <spirit:direction>in</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>std_logic</spirit:typeName> <spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> <spirit:port> <spirit:name>trace_enb_1d</spirit:name> <spirit:wire> <spirit:direction>out</spirit:direction> <spirit:wireTypeDefs> <spirit:wireTypeDef> <spirit:typeName>reg</spirit:typeName> <spirit:viewNameRef>xilinx_anylanguagesynthesis</spirit:viewNameRef> <spirit:viewNameRef>xilinx_anylanguagebehavioralsimulation</spirit:viewNameRef> </spirit:wireTypeDef> </spirit:wireTypeDefs> </spirit:wire> </spirit:port> </spirit:ports> <spirit:modelParameters> <spirit:modelParameter xsi:type="spirit:nameValueTypeType" spirit:dataType="integer"> <spirit:name>ADDR_WIDTH</spirit:name> <spirit:displayName>Addr Width</spirit:displayName> <spirit:value spirit:format="long" spirit:resolve="generated" spirit:id="MODELPARAM_VALUE.ADDR_WIDTH">18</spirit:value> </spirit:modelParameter> </spirit:modelParameters> </spirit:model> <spirit:fileSets> <spirit:fileSet> <spirit:name>xilinx_anylanguagesynthesis_view_fileset</spirit:name> <spirit:file> <spirit:name>pulse_gen.v</spirit:name> <spirit:fileType>verilogSource</spirit:fileType> </spirit:file> <spirit:file> <spirit:name>trace_generator_controller.v</spirit:name> <spirit:fileType>verilogSource</spirit:fileType> <spirit:userFileType>CHECKSUM_d61d55c3</spirit:userFileType> </spirit:file> </spirit:fileSet> <spirit:fileSet> <spirit:name>xilinx_anylanguagebehavioralsimulation_view_fileset</spirit:name> <spirit:file> <spirit:name>pulse_gen.v</spirit:name> <spirit:fileType>verilogSource</spirit:fileType> </spirit:file> <spirit:file> <spirit:name>trace_generator_controller.v</spirit:name> <spirit:fileType>verilogSource</spirit:fileType> </spirit:file> </spirit:fileSet> <spirit:fileSet> <spirit:name>xilinx_xpgui_view_fileset</spirit:name> <spirit:file> <spirit:name>xgui/trace_generator_controller_v1_0.tcl</spirit:name> <spirit:fileType>tclSource</spirit:fileType> <spirit:userFileType>CHECKSUM_3f726323</spirit:userFileType> <spirit:userFileType>XGUI_VERSION_2</spirit:userFileType> </spirit:file> </spirit:fileSet> </spirit:fileSets> <spirit:description>Controller to generate enable signal from start, stop, step, and Trace control inputs</spirit:description> <spirit:parameters> <spirit:parameter> <spirit:name>ADDR_WIDTH</spirit:name> <spirit:displayName>Addr Width</spirit:displayName> <spirit:value spirit:format="long" spirit:resolve="user" spirit:id="PARAM_VALUE.ADDR_WIDTH">18</spirit:value> </spirit:parameter> <spirit:parameter> <spirit:name>Component_Name</spirit:name> <spirit:value spirit:resolve="user" spirit:id="PARAM_VALUE.Component_Name" spirit:order="1">trace_generator_controller_v1_0</spirit:value> </spirit:parameter> </spirit:parameters> <spirit:vendorExtensions> <xilinx:coreExtensions> <xilinx:supportedFamilies> <xilinx:family xilinx:lifeCycle="Production">zynq</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">virtex7</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">qvirtex7</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">kintex7</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">kintex7l</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">qkintex7</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">qkintex7l</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">artix7</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">artix7l</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">aartix7</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">qartix7</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">qzynq</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">azynq</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">spartan7</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">aspartan7</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">virtexuplus</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">zynquplus</xilinx:family> <xilinx:family xilinx:lifeCycle="Production">kintexu</xilinx:family> </xilinx:supportedFamilies> <xilinx:taxonomies> <xilinx:taxonomy>/UserIP</xilinx:taxonomy> </xilinx:taxonomies> <xilinx:displayName>Trace Generation Controller</xilinx:displayName> <xilinx:definitionSource>package_project</xilinx:definitionSource> <xilinx:coreRevision>3</xilinx:coreRevision> <xilinx:coreCreationDateTime>2018-01-18T18:19:40Z</xilinx:coreCreationDateTime> <xilinx:tags> <xilinx:tag xilinx:name="nopcore"/> <xilinx:tag xilinx:name="xilinx.com:user:trace_generator_controller:1.0_ARCHIVE_LOCATION">c:/xup/PYNQ_2_1_2017_4/ip_update/trace_generator_controller_1.1</xilinx:tag> </xilinx:tags> </xilinx:coreExtensions> <xilinx:packagingInfo> <xilinx:xilinxVersion>2017.4</xilinx:xilinxVersion> <xilinx:checksum xilinx:scope="fileGroups" xilinx:value="37dbcf94"/> <xilinx:checksum xilinx:scope="ports" xilinx:value="ee8666aa"/> <xilinx:checksum xilinx:scope="hdlParameters" xilinx:value="dc81dc21"/> <xilinx:checksum xilinx:scope="parameters" xilinx:value="8465719f"/> </xilinx:packagingInfo> </spirit:vendorExtensions> </spirit:component> ```
/content/code_sandbox/boards/ip/trace_generator_controller_1.1/component.xml
xml
2016-01-20T01:16:27
2024-08-16T18:54:03
PYNQ
Xilinx/PYNQ
1,931
2,782
```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. --> <RelativeLayout xmlns:android="path_to_url" android:id="@+id/bottom_drawer_2" android:layout_width="match_parent" android:layout_height="600dp"> <com.google.android.material.bottomsheet.BottomSheetDragHandleView android:id="@+id/drag_handle" android:layout_width="match_parent" android:layout_height="wrap_content"/> <TextView android:id="@+id/bottomsheet_state" android:layout_width="match_parent" android:layout_height="100dp" android:gravity="center" android:textSize="20sp" android:text="@string/cat_bottomsheet_state_collapsed" android:layout_marginTop="16dp" android:layout_centerHorizontal="true"/> <com.google.android.material.textfield.TextInputLayout android:id="@+id/bottomsheet_textinputlayout" android:layout_width="@dimen/material_textinput_default_width" android:layout_height="wrap_content" android:layout_below="@id/bottomsheet_state" android:layout_centerHorizontal="true" android:layout_margin="16dp" android:layout_gravity="center_horizontal" android:hint="@string/cat_bottomsheet_textfield_label"> <com.google.android.material.textfield.TextInputEditText android:layout_width="match_parent" android:layout_height="wrap_content"/> </com.google.android.material.textfield.TextInputLayout> <Button android:id="@+id/cat_bottomsheet_modal_button" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/bottomsheet_textinputlayout" android:layout_centerHorizontal="true" android:text="@string/cat_bottomsheet_button_label_enabled"/> <com.google.android.material.materialswitch.MaterialSwitch android:id="@+id/cat_bottomsheet_modal_enabled_switch" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/cat_bottomsheet_modal_button" android:layout_centerHorizontal="true" android:layout_marginTop="16dp" android:text="@string/cat_bottomsheet_button_label_enabled" android:checked="true"/> </RelativeLayout> ```
/content/code_sandbox/catalog/java/io/material/catalog/bottomsheet/res/layout/cat_bottomsheet_content.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
519
```xml import PropTypes from 'prop-types'; import React, { FC } from 'react'; import useStyleSet from '../hooks/useStyleSet'; type HTMLVideoContentProps = { alt?: string; autoPlay?: boolean; loop?: boolean; poster?: string; src: string; }; const HTMLVideoContent: FC<HTMLVideoContentProps> = ({ alt, autoPlay, loop, poster, src }) => { const [{ videoContent: videoContentStyleSet }] = useStyleSet(); return ( <video aria-label={alt} autoPlay={autoPlay} className={videoContentStyleSet} controls={true} loop={loop} poster={poster} src={src} /> ); }; HTMLVideoContent.defaultProps = { alt: '', autoPlay: false, loop: false, poster: '' }; HTMLVideoContent.propTypes = { alt: PropTypes.string, autoPlay: PropTypes.bool, loop: PropTypes.bool, poster: PropTypes.string, src: PropTypes.string.isRequired }; export default HTMLVideoContent; ```
/content/code_sandbox/packages/component/src/Attachment/HTMLVideoContent.tsx
xml
2016-07-07T23:16:57
2024-08-16T00:12:37
BotFramework-WebChat
microsoft/BotFramework-WebChat
1,567
229
```xml <dict> <key>CommonPeripheralDSP</key> <array> <dict> <key>DeviceID</key> <integer>0</integer> <key>DeviceType</key> <string>Headphone</string> </dict> <dict> <key>DeviceID</key> <integer>0</integer> <key>DeviceType</key> <string>Microphone</string> </dict> </array> <key>PathMaps</key> <array> <dict> <key>Comment</key> <string>ALCS1200A for msi-MAG-Z490-TOMAHAWK by owen0o0</string> <key>PathMap</key> <array> <array> <array> <array> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>8</integer> </dict> <dict> <key>NodeID</key> <integer>35</integer> </dict> <dict> <key>NodeID</key> <integer>24</integer> </dict> </array> </array> <array> <array> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>9</integer> </dict> <dict> <key>NodeID</key> <integer>34</integer> </dict> <dict> <key>NodeID</key> <integer>25</integer> </dict> </array> </array> </array> <array> <array> <array> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <true/> </dict> <key>NodeID</key> <integer>8</integer> </dict> <dict> <key>NodeID</key> <integer>35</integer> </dict> <dict> <key>NodeID</key> <integer>26</integer> </dict> </array> </array> </array> <array> <array> <array> <dict> <key>NodeID</key> <integer>20</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>12</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>2</integer> </dict> </array> </array> <array> <array> <dict> <key>NodeID</key> <integer>27</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>15</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>5</integer> </dict> </array> </array> </array> <array> <array> <array> <dict> <key>NodeID</key> <integer>22</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>14</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>4</integer> </dict> </array> </array> </array> <array> <array> <array> <dict> <key>NodeID</key> <integer>21</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>13</integer> </dict> <dict> <key>Amp</key> <dict> <key>Channels</key> <array> <dict> <key>Bind</key> <integer>1</integer> <key>Channel</key> <integer>1</integer> </dict> <dict> <key>Bind</key> <integer>2</integer> <key>Channel</key> <integer>2</integer> </dict> </array> <key>MuteInputAmp</key> <true/> <key>PublishMute</key> <true/> <key>PublishVolume</key> <true/> <key>VolumeInputAmp</key> <false/> </dict> <key>NodeID</key> <integer>3</integer> </dict> </array> </array> </array> <array> <array> <array> <dict> <key>NodeID</key> <integer>30</integer> </dict> <dict> <key>NodeID</key> <integer>6</integer> </dict> </array> </array> </array> </array> <key>PathMapID</key> <integer>1</integer> </dict> </array> </dict> ```
/content/code_sandbox/Resources/ALCS1200A/Platforms11.xml
xml
2016-03-07T20:45:58
2024-08-14T08:57:03
AppleALC
acidanthera/AppleALC
3,420
3,259
```xml <vector xmlns:android="path_to_url" android:width="24dp" android:height="24dp" android:viewportWidth="24.0" android:viewportHeight="24.0"> <path android:pathData="M3.9,12c0,-1.71 1.39,-3.1 3.1,-3.1h4L11,7L7,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5h4v-1.9L7,15.1c-1.71,0 -3.1,-1.39 -3.1,-3.1zM8,13h8v-2L8,11v2zM17,7h-4v1.9h4c1.71,0 3.1,1.39 3.1,3.1s-1.39,3.1 -3.1,3.1h-4L13,17h4c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5z" android:fillColor="#000000"/> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/ic_link_black_24px.xml
xml
2016-08-13T08:08:39
2024-08-06T13:58:48
open-event-organizer-android
fossasia/open-event-organizer-android
1,783
273
```xml import { Component, OnInit, OnChanges, Input, Output, EventEmitter, ViewChild, SimpleChange } from "@angular/core"; @Component({ selector: 'simple_query_string-query', template: `<span class="col-xs-6 pd-10"> <div class="form-group form-element query-primary-input"> <span class="input_with_option"> <input type="text" class="form-control col-xs-12" [(ngModel)]="inputs.input.value" placeholder="{{inputs.input.placeholder}}" (keyup)="getFormat();" /> </span> </div> <button (click)="addOption();" class="btn btn-info btn-xs add-option"> <i class="fa fa-plus"></i> </button> </span> <div class="col-xs-12 option-container" *ngIf="optionRows.length"> <div class="col-xs-12 single-option" *ngFor="let singleOption of optionRows, let i=index"> <div class="col-xs-6 pd-l0"> <editable class = "additional-option-select-{{i}}" [editableField]="singleOption.name" [editPlaceholder]="'--choose option--'" [editableInput]="'select2'" [selectOption]="options" [passWithCallback]="i" [selector]="'additional-option-select'" [querySelector]="querySelector" [informationList]="informationList" [showInfoFlag]="true" [searchOff]="true" (callback)="selectOption($event)"> </editable> </div> <div class="col-xs-6 pd-0"> <div class="form-group form-element"> <input class="form-control col-xs-12 pd-0" type="text" [(ngModel)]="singleOption.value" placeholder="value" (keyup)="getFormat();"/> </div> </div> <button (click)="removeOption(i)" class="btn btn-grey delete-option btn-xs"> <i class="fa fa-times"></i> </button> </div> </div> `, inputs: [ 'getQueryFormat', 'querySelector'] }) export class SimpleQueryStringQuery implements OnInit, OnChanges { @Input() queryList: any; @Input() selectedField: string; @Input() appliedQuery: any; @Input() selectedQuery: string; @Output() getQueryFormat = new EventEmitter < any > (); public current_query: string = 'simple_query_string'; public queryName = '*'; public fieldName = '*'; public information: any = { title: 'Simple Query String', content: `<span class="description">Returns matches based on SimpleQueryParser to parse its context. Simple Query String discards invalid parts of the query and never throws an exception.</span> <a class="link" href="path_to_url">Read more</a>` }; public informationList: any = { 'fields': { title: 'fields', content: `<span class="description">Specify one or more fields separated by comma to run a multi-field query.</span>` }, 'default_operator': { title: 'default_operator', content: `<span class="description">he default operator used if no explicit operator is specified. Can be either 'AND' or 'OR'.</span>` }, 'analyzer': { title: 'analyzer', content: `<span class="description">The analyzer used to analyze each term of the query when creating composite queries.</span>` } }; public default_options: any = [ 'fields', 'default_operator', 'analyzer' ]; public options: any; public placeholders: any = { fields: 'Comma seprated values' }; public singleOption = { name: '', value: '' }; public optionRows: any = [] constructor() {} public inputs: any = { input: { placeholder: 'Input', value: '' } }; public queryFormat: any = {}; ngOnInit() { this.options = JSON.parse(JSON.stringify(this.default_options)); try { if (this.appliedQuery[this.current_query]) { var applied = this.appliedQuery[this.current_query]; this.inputs.input.value = applied.query; if(applied.fields.length > 1) { var other_fields = JSON.parse(JSON.stringify(applied.fields)); other_fields.splice(0, 1); other_fields = other_fields.join(','); var obj = { name: 'fields', value: other_fields }; this.optionRows.push(obj); } for (let option in applied) { if (option != 'fields' && option != 'query') { var obj = { name: option, value: applied[option] }; this.optionRows.push(obj); } } } } catch (e) {} this.getFormat(); this.filterOptions(); } ngOnChanges() { if (this.selectedField != '') { if (this.selectedField !== this.fieldName) { this.fieldName = this.selectedField; this.getFormat(); } } if (this.selectedQuery != '') { if (this.selectedQuery !== this.queryName) { this.queryName = this.selectedQuery; this.getFormat(); this.optionRows = []; } } } // QUERY FORMAT /* Query Format for this query is @queryName: { query: value, fields: [fieldname, other fields] } */ getFormat() { if (this.queryName === this.current_query) { this.queryFormat = this.setFormat(); this.getQueryFormat.emit(this.queryFormat); } } setFormat() { var queryFormat = {}; var fields = [this.fieldName]; queryFormat[this.queryName] = { query: this.inputs.input.value, fields: fields }; if(this.optionRows.length) { this.optionRows.forEach(function(singleRow: any) { if(singleRow.name != 'fields') { queryFormat[this.queryName][singleRow.name] = singleRow.value; } else { var field_split = singleRow.value.split(','); fields = fields.concat(field_split); queryFormat[this.queryName].fields = fields; } }.bind(this)) } return queryFormat; } selectOption(input: any) { input.selector.parents('.editable-pack').removeClass('on'); this.optionRows[input.external].name = input.val; this.filterOptions(); setTimeout(function() { this.getFormat(); }.bind(this), 300); } filterOptions() { this.options = this.default_options.filter(function(opt) { var flag = true; this.optionRows.forEach(function(row) { if(row.name === opt) { flag = false; } }); return flag; }.bind(this)); } addOption() { var singleOption = JSON.parse(JSON.stringify(this.singleOption)); this.filterOptions(); this.optionRows.push(singleOption); } removeOption(index: Number) { this.optionRows.splice(index, 1); this.filterOptions(); this.getFormat(); } } ```
/content/code_sandbox/app/queryBlocks/singlequery/queries/simple_query_string.query.ts
xml
2016-02-25T06:15:36
2024-08-02T10:28:20
mirage
appbaseio/mirage
2,213
1,596
```xml <androidx.recyclerview.widget.RecyclerView xmlns:android="path_to_url" android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingTop="15dp" android:clipToPadding="false" android:scrollbars="vertical" /> ```
/content/code_sandbox/src/main/res/layout/account_selection_list_fragment.xml
xml
2016-07-03T07:32:36
2024-08-16T16:51:15
deltachat-android
deltachat/deltachat-android
1,082
70
```xml /** @jest-environment jsdom */ import { parseDocumentFromString, serializeDocumentIntoString } from 'botframework-webchat-component/internal'; import MarkdownIt from 'markdown-it'; import betterLink from '../markdownItPlugins/betterLink'; import betterLinkDocumentMod, { type BetterLinkDocumentModDecoration } from './betterLinkDocumentMod'; const BASE_MARKDOWN = '[Example](path_to_url const BASE_HTML = new MarkdownIt().render(BASE_MARKDOWN); describe('When passing "className" option with "my-link"', () => { let actual: Document; const decoration: BetterLinkDocumentModDecoration = { className: 'my-link' }; beforeEach(() => { actual = betterLinkDocumentMod(parseDocumentFromString(BASE_HTML), () => decoration); }); test('should have "className" attribute set to "my-link"', () => expect(actual.querySelector('a').classList.contains('my-link')).toBe(true)); test('should match snapshot', () => expect(serializeDocumentIntoString(actual)).toBe( '<p xmlns="path_to_url"><a href="path_to_url" class="my-link">Example</a></p>\n' )); test('should match baseline', () => expect(serializeDocumentIntoString(actual)).toBe( serializeDocumentIntoString( parseDocumentFromString(new MarkdownIt().use(betterLink, () => decoration).render(BASE_MARKDOWN)) ) )); }); describe('When passing "className" option with false', () => { let actual: Document; const decoration: BetterLinkDocumentModDecoration = { className: false }; beforeEach(() => { actual = betterLinkDocumentMod( parseDocumentFromString('<a href="path_to_url" class="my-link">Example</a>'), () => decoration ); }); test('should have "class" attribute removed', () => expect(actual.querySelector('a').hasAttribute('class')).toBe(false)); test('should match snapshot', () => expect(serializeDocumentIntoString(actual)).toBe( '<a xmlns="path_to_url" href="path_to_url">Example</a>\n' )); }); ```
/content/code_sandbox/packages/bundle/src/markdown/private/betterLinkDocumentMod.className.spec.ts
xml
2016-07-07T23:16:57
2024-08-16T00:12:37
BotFramework-WebChat
microsoft/BotFramework-WebChat
1,567
447
```xml import { ChangeDetectionStrategy, ViewContainerRef, ChangeDetectorRef, Component, OnInit, Input, Inject } from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; 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 { RoleMembersService } from '../../../../service/role-members.service'; @Component({ selector: 'app-member-roles-editer', templateUrl: './member-roles-editer.component.html', styleUrls: ['./member-roles-editer.component.less'] }) export class MemberRolesEditerComponent implements OnInit { @Input() username?: String; query: { params: { roleName: String; username: String; protocol: 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: { roleName: '', username: '', protocol: '', startDate: '', endDate: '', startDatePicker: addDays(new Date(), -30), endDatePicker: new Date(), pageSize: 5, pageNumber: 1, pageSizeOptions: [5, 15, 50] }, results: { records: 0, rows: [] }, expandForm: false, submitLoading: false, tableLoading: false, tableCheckedId: new Set<String>(), indeterminate: false, checked: false }; constructor( private modalRef: NzModalRef, private roleMembersService: RoleMembersService, private viewContainerRef: ViewContainerRef, private fb: FormBuilder, private msg: NzMessageService, @Inject(ALAIN_I18N_TOKEN) private i18n: I18NService, private cdr: ChangeDetectorRef ) {} ngOnInit(): void { if (this.username) { this.query.params.username = this.username; } 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 {} fetch(): void { this.query.submitLoading = true; this.query.tableLoading = true; this.query.indeterminate = false; this.query.checked = true; 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.roleMembersService.rolesNoMember(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.onTableAllChecked(false); 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(); } onSubmit(e: MouseEvent): void { e.preventDefault(); const listOfEnabledData = this.query.results.rows.filter(({ disabled }) => !disabled); let selectedData = listOfEnabledData.filter(({ id, name }) => { return this.query.tableCheckedId.has(id); }); let roleIds = ''; let roleNames = ''; for (let i = 0; i < selectedData.length; i++) { roleIds = `${roleIds},${selectedData[i].id}`; roleNames = `${roleNames},${selectedData[i].name}`; } this.roleMembersService.addMember2Roles({ username: this.username, roleId: roleIds, roleName: roleNames }).subscribe(res => { this.query.results = res.data; this.query.submitLoading = false; this.query.tableLoading = false; if (res.code == 0) { this.msg.success(this.i18n.fanyi('mxk.alert.operate.success')); this.fetch(); } else { this.msg.error(this.i18n.fanyi('mxk.alert.operate.error')); } this.cdr.detectChanges(); }); } onClose(e: MouseEvent): void { e.preventDefault(); } } ```
/content/code_sandbox/maxkey-web-frontend/maxkey-web-mgt-app/src/app/routes/permissions/role-members/member-roles-editer/member-roles-editer.component.ts
xml
2016-11-16T03:06:50
2024-08-16T09:22:42
MaxKey
dromara/MaxKey
1,423
1,275
```xml import * as React from 'react'; import { mount, shallow } from 'enzyme'; import { CdsBreadcrumb } from './index'; describe('CdsBreadcrumb', () => { it('renders', () => { const wrapper = shallow( <div> <CdsBreadcrumb> <a href="#">link 1</a> <a href="#">link 2</a> </CdsBreadcrumb> </div> ); const renderedComponent = wrapper.find(CdsBreadcrumb); expect(renderedComponent.at(0).html()).toMatch(/link 1/); }); it('snapshot', () => { const wrapper = mount( <div> <CdsBreadcrumb> <a href="#">link 1</a> <a href="#">link 2</a> </CdsBreadcrumb> </div> ); expect(wrapper).toMatchSnapshot(); }); }); ```
/content/code_sandbox/packages/react/src/breadcrumb/index.test.tsx
xml
2016-09-29T17:24:17
2024-08-11T17:06:15
clarity
vmware-archive/clarity
6,431
194
```xml import { CodeEditor } from '@jupyterlab/codeeditor'; import { Text } from '@jupyterlab/coreutils'; import { IRenderMimeRegistry, MimeModel } from '@jupyterlab/rendermime'; import { IDataConnector } from '@jupyterlab/statedb'; import { JSONExt, ReadonlyJSONObject } from '@lumino/coreutils'; import { IDisposable } from '@lumino/disposable'; import { Debouncer } from '@lumino/polling'; import { ISignal, Signal } from '@lumino/signaling'; import { IInspector } from './tokens'; /** * An object that handles code inspection. */ export class InspectionHandler implements IDisposable, IInspector.IInspectable { /** * Construct a new inspection handler for a widget. */ constructor(options: InspectionHandler.IOptions) { this._connector = options.connector; this._rendermime = options.rendermime; this._debouncer = new Debouncer(this.onEditorChange.bind(this), 250); } /** * A signal emitted when the inspector should clear all items. */ get cleared(): ISignal<InspectionHandler, void> { return this._cleared; } /** * A signal emitted when the handler is disposed. */ get disposed(): ISignal<InspectionHandler, void> { return this._disposed; } /** * A signal emitted when an inspector value is generated. */ get inspected(): ISignal<InspectionHandler, IInspector.IInspectorUpdate> { return this._inspected; } /** * The editor widget used by the inspection handler. */ get editor(): CodeEditor.IEditor | null { return this._editor; } set editor(newValue: CodeEditor.IEditor | null) { if (newValue === this._editor) { return; } // Remove all of our listeners. Signal.disconnectReceiver(this); const editor = (this._editor = newValue); if (editor) { // Clear the inspector in preparation for a new editor. this._cleared.emit(void 0); // Call onEditorChange to cover the case where the user changes // the active cell this.onEditorChange(); editor.model.selections.changed.connect(this._onChange, this); editor.model.sharedModel.changed.connect(this._onChange, this); } } /** * Indicates whether the handler makes API inspection requests or stands by. * * #### Notes * The use case for this attribute is to limit the API traffic when no * inspector is visible. */ get standby(): boolean { return this._standby; } set standby(value: boolean) { this._standby = value; } /** * Get whether the inspection handler is disposed. * * #### Notes * This is a read-only property. */ get isDisposed(): boolean { return this._isDisposed; } /** * Dispose of the resources used by the handler. */ dispose(): void { if (this.isDisposed) { return; } this._isDisposed = true; this._debouncer.dispose(); this._disposed.emit(void 0); Signal.clearData(this); } /** * Handle a text changed signal from an editor. * * #### Notes * Update the hints inspector based on a text change. */ onEditorChange(customText?: string): void { // If the handler is in standby mode, bail. if (this._standby) { return; } const editor = this.editor; if (!editor) { return; } const text = customText ? customText : editor.model.sharedModel.getSource(); const position = editor.getCursorPosition(); const offset = Text.jsIndexToCharIndex(editor.getOffsetAt(position), text); const update: IInspector.IInspectorUpdate = { content: null }; const pending = ++this._pending; void this._connector .fetch({ offset, text }) .then(reply => { // If handler has been disposed or a newer request is pending, bail. if (!reply || this.isDisposed || pending !== this._pending) { this._lastInspectedReply = null; this._inspected.emit(update); return; } const { data } = reply; // Do not update if there would be no change. if ( this._lastInspectedReply && JSONExt.deepEqual(this._lastInspectedReply, data) ) { return; } const mimeType = this._rendermime.preferredMimeType(data); if (mimeType) { const widget = this._rendermime.createRenderer(mimeType); const model = new MimeModel({ data }); void widget.renderModel(model); update.content = widget; } this._lastInspectedReply = reply.data; this._inspected.emit(update); }) .catch(reason => { // Since almost all failures are benign, fail silently. this._lastInspectedReply = null; this._inspected.emit(update); }); } /** * Handle changes to the editor state, debouncing. */ private _onChange(): void { void this._debouncer.invoke(); } private _cleared = new Signal<InspectionHandler, void>(this); private _connector: IDataConnector< InspectionHandler.IReply, void, InspectionHandler.IRequest >; private _disposed = new Signal<this, void>(this); private _editor: CodeEditor.IEditor | null = null; private _inspected = new Signal<this, IInspector.IInspectorUpdate>(this); private _isDisposed = false; private _pending = 0; private _rendermime: IRenderMimeRegistry; private _standby = true; private _debouncer: Debouncer; private _lastInspectedReply: InspectionHandler.IReply['data'] | null = null; } /** * A namespace for inspection handler statics. */ export namespace InspectionHandler { /** * The instantiation options for an inspection handler. */ export interface IOptions { /** * The connector used to make inspection requests. * * #### Notes * The only method of this connector that will ever be called is `fetch`, so * it is acceptable for the other methods to be simple functions that return * rejected promises. */ connector: IDataConnector<IReply, void, IRequest>; /** * The mime renderer for the inspection handler. */ rendermime: IRenderMimeRegistry; } /** * A reply to an inspection request. */ export interface IReply { /** * The MIME bundle data returned from an inspection request. */ data: ReadonlyJSONObject; /** * Any metadata that accompanies the MIME bundle returning from a request. */ metadata: ReadonlyJSONObject; } /** * The details of an inspection request. */ export interface IRequest { /** * The cursor offset position within the text being inspected. */ offset: number; /** * The text being inspected. */ text: string; } } ```
/content/code_sandbox/packages/inspector/src/handler.ts
xml
2016-06-03T20:09:17
2024-08-16T19:12:44
jupyterlab
jupyterlab/jupyterlab
14,019
1,540
```xml import {Container} from "../domain/Container.js"; import {InjectorService} from "../services/InjectorService.js"; describe("DI Resolvers", () => { describe("create new injector", () => { it("should load all providers with the SINGLETON scope only", async () => { class ExternalService { constructor() {} } class MyService { constructor(public externalService: ExternalService) {} } const externalDi = new Map(); externalDi.set(ExternalService, "MyClass"); // GIVEN const injector = new InjectorService(); injector.settings.resolvers.push(externalDi); const container = new Container(); container.add(MyService, { deps: [ExternalService] }); // WHEN expect(injector.get(ExternalService)).toEqual("MyClass"); await injector.load(container); // THEN expect(injector.get(MyService)).toBeInstanceOf(MyService); expect(injector.get<MyService>(MyService)!.externalService).toEqual("MyClass"); }); }); }); ```
/content/code_sandbox/packages/di/src/common/integration/resolvers.spec.ts
xml
2016-02-21T18:38:47
2024-08-14T21:19:48
tsed
tsedio/tsed
2,817
224
```xml <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="path_to_url" xmlns:app="path_to_url"> <item android:title="@string/create" android:id="@+id/menu_create_contact" android:icon="?menu_accept_icon" app:showAsAction="always|withText"/> </menu> ```
/content/code_sandbox/src/main/res/menu/new_contact.xml
xml
2016-07-03T07:32:36
2024-08-16T16:51:15
deltachat-android
deltachat/deltachat-android
1,082
77
```xml <?xml version="1.0" encoding="UTF-8" standalone="no"?> <vector xmlns:android="path_to_url" android:width="@dimen/dp_24" android:height="@dimen/dp_24" android:viewportHeight="24.0" android:viewportWidth="24.0"> <path android:fillColor="@color/app_green" android:pathData="M3.24,6.15C2.51,6.43 2,7.17 2,8v12c0,1.1 0.89,2 2,2h16c1.11,0 2,-0.9 2,-2L22,8c0,-1.11 -0.89,-2 -2,-2L8.3,6l8.26,-3.34L15.88,1 3.24,6.15zM7,20c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM20,12h-2v-2h-2v2L4,12L4,8h16v4z" /> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/ic_radio.xml
xml
2016-04-09T15:47:45
2024-08-14T04:30:04
MusicLake
caiyonglong/MusicLake
2,654
285
```xml export { default as PayInvoiceModal } from './PayInvoiceModal'; export { default as InvoiceState } from './InvoiceState'; export { default as InvoiceType } from './InvoiceType'; export { default as InvoiceAmount } from './InvoiceAmount'; export { default as InvoiceTextModal } from './InvoiceTextModal'; export { default as InvoicesSection } from './InvoicesSection'; export { default as InvoiceActions } from './InvoiceActions'; ```
/content/code_sandbox/packages/components/containers/invoices/index.ts
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
91
```xml import * as React from 'react'; import ComponentPerfExample from '../../../../components/ComponentDoc/ComponentPerfExample'; import ExampleSection from '../../../../components/ComponentDoc/ExampleSection'; const Performance = () => ( <ExampleSection title="Performance"> <ComponentPerfExample title="Default" description="A default test." examplePath="components/Header/Performance/HeaderSlots.perf" /> <ComponentPerfExample title="Minimal" description="Header with no props." examplePath="components/Header/Performance/HeaderMinimal.perf" /> </ExampleSection> ); export default Performance; ```
/content/code_sandbox/packages/fluentui/docs/src/examples/components/Header/Performance/index.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
132
```xml <?xml version="1.0" encoding="UTF-8"?> <!-- ~ contributor license agreements. See the NOTICE file distributed with ~ this work for additional information regarding copyright ownership. ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <sql-parser-test-cases> <create-diskgroup sql-case-id="create_diskgroup_with_external_redundancy" /> <create-diskgroup sql-case-id="create_diskgroup_with_single_attribute" /> <create-diskgroup sql-case-id="create_diskgroup_with_multi_attribute" /> <create-diskgroup sql-case-id="create_diskgroup_with_multi_failgroup" /> <create-diskgroup sql-case-id="create_diskgroup_with_single_failgroup" /> </sql-parser-test-cases> ```
/content/code_sandbox/test/it/parser/src/main/resources/case/ddl/create-diskgroup.xml
xml
2016-01-18T12:49:26
2024-08-16T15:48:11
shardingsphere
apache/shardingsphere
19,707
195
```xml export interface IRequestEngineResult { result: boolean; message: string; errorMessage: string; errorCode: ErrorCode; requestId: number | undefined; } export enum ErrorCode { AlreadyRequested, EpisodesAlreadyRequested, NoPermissionsOnBehalf, NoPermissions, RequestDoesNotExist, ChildRequestDoesNotExist, NoPermissionsRequestMovie, NoPermissionsRequestTV, NoPermissionsRequestAlbum, MovieRequestQuotaExceeded, TvRequestQuotaExceeded, AlbumRequestQuotaExceeded, } ```
/content/code_sandbox/src/Ombi/ClientApp/src/app/interfaces/IRequestEngineResult.ts
xml
2016-02-25T12:14:54
2024-08-14T22:56:44
Ombi
Ombi-app/Ombi
3,674
113
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ Nextcloud - Android Client ~ --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:gravity="center_horizontal" android:orientation="vertical" android:showDividers="none"> <ProgressBar android:id="@+id/loadingProgressBar" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:visibility="gone" /> <TextView android:id="@+id/footerText" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center" android:layout_marginBottom="@dimen/min_list_item_size" android:gravity="center" android:padding="@dimen/standard_padding" android:textColor="@color/secondary_text_color" /> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/list_footer.xml
xml
2016-06-06T21:23:36
2024-08-16T18:22:36
android
nextcloud/android
4,122
226
```xml import { EncString } from "../../platform/models/domain/enc-string"; import { Collection as CollectionDomain } from "../../vault/models/domain/collection"; import { CollectionView } from "../../vault/models/view/collection.view"; import { safeGetString } from "./utils"; export class CollectionExport { static template(): CollectionExport { const req = new CollectionExport(); req.organizationId = "00000000-0000-0000-0000-000000000000"; req.name = "Collection name"; req.externalId = null; return req; } static toView(req: CollectionExport, view = new CollectionView()) { view.name = req.name; view.externalId = req.externalId; if (view.organizationId == null) { view.organizationId = req.organizationId; } return view; } static toDomain(req: CollectionExport, domain = new CollectionDomain()) { domain.name = req.name != null ? new EncString(req.name) : null; domain.externalId = req.externalId; if (domain.organizationId == null) { domain.organizationId = req.organizationId; } return domain; } organizationId: string; name: string; externalId: string; // Use build method instead of ctor so that we can control order of JSON stringify for pretty print build(o: CollectionView | CollectionDomain) { this.organizationId = o.organizationId; this.name = safeGetString(o.name); this.externalId = o.externalId; } } ```
/content/code_sandbox/libs/common/src/models/export/collection.export.ts
xml
2016-03-09T23:14:01
2024-08-16T15:07:51
clients
bitwarden/clients
8,877
326
```xml import * as mediaWallDesignAction from '../actions/media-wall-design'; export interface State { design: { displayHeader: boolean; headerTitle: string; columnCount: string; count: number; cardStyle: string; }; } export const initialState: State = { design: { displayHeader: true, headerTitle: '', columnCount: '', count: 1, cardStyle: 'Fluid' } }; export function reducer(state: State = initialState, action: mediaWallDesignAction.Actions): State { switch (action.type) { case mediaWallDesignAction.ActionTypes.WALL_DISPLAY_HEADER_ACTION: { const displayHeader = action.payload; return Object.assign({}, state, { design: { ...state.design, displayHeader } }); } case mediaWallDesignAction.ActionTypes.WALL_HEADER_TITLE_CHANGE: { const headerTitle = action.payload; return Object.assign({}, state, { design: { ...state.design, headerTitle } }); } case mediaWallDesignAction.ActionTypes.WALL_COLUMN_COUNT_CHANGE_ACTION: { const columnCount = action.payload; return Object.assign({}, state, { design: { ...state.design, columnCount } }); } case mediaWallDesignAction.ActionTypes.WALL_COUNT_CHANGE_ACTION: { const payload = action.payload; let count: number; if (typeof(payload) === 'string' ) { count = parseInt(payload, 10); } return Object.assign({}, state, { design: { ...state.design, count } }); } case mediaWallDesignAction.ActionTypes.WALL_CARD_STYLE_CHANGE_ACTION: { const cardStyle = action.payload; return Object.assign({}, state, { design: { ...state.design, cardStyle } }); } default: { return state; } } } export const getWallDisplayHeader = (state: State) => state.design.displayHeader; export const getWallHeaderTitle = (state: State) => state.design.headerTitle; export const getWallColumnCount = (state: State) => state.design.columnCount; export const getWallCount = (state: State) => state.design.count; export const getWallCardStyle = (state: State) => state.design.cardStyle; ```
/content/code_sandbox/src/app/reducers/media-wall-design.ts
xml
2016-09-20T13:50:42
2024-08-06T13:58:18
loklak_search
fossasia/loklak_search
1,829
529
```xml // Libraries import React, {PureComponent} from 'react' // Components import MeasurementList from 'src/flux/components/MeasurementList' import FieldList from 'src/flux/components/FieldList' import TagKeyList from 'src/flux/components/TagKeyList' import {ErrorHandling} from 'src/shared/decorators/errors' // Constants import {OpenState} from 'src/flux/constants/explorer' // Utils import { TimeMachineContainer, TimeMachineContextConsumer, } from 'src/shared/utils/TimeMachineContext' // Types import {Source, NotificationAction, TimeRange} from 'src/types' import {CategoryTree} from 'src/flux/components/SchemaExplorerTree' import TimeRangeLabel from 'src/shared/components/TimeRangeLabel' export enum CategoryType { Measurements = 'measurements', Fields = 'fields', Tags = 'tags', } interface ConnectedProps { onAddFilter?: (db: string, value: {[k: string]: string}) => void } interface PassedProps { source: Source timeRange: TimeRange notify: NotificationAction db: string categoryTree: CategoryTree type: CategoryType } interface State { opened: OpenState } class SchemaItemCategory extends PureComponent< PassedProps & ConnectedProps, State > { constructor(props) { super(props) this.state = { opened: OpenState.UNOPENED, } } public render() { const {opened} = this.state const isOpen = opened === OpenState.OPENED const isUnopened = opened === OpenState.UNOPENED return ( <div className={`flux-schema-tree flux-schema--child ${ isOpen ? 'expanded' : '' }`} > <div className="flux-schema--item" onClick={this.handleClick} data-test="schema-category-field" > <div className="flex-schema-item-group flux-schema-item--expandable"> <div className="flux-schema--expander" data-test="schema-category-item" /> {this.categoryName} <span className="flux-schema--type"> (<TimeRangeLabel timeRange={this.props.timeRange} />) </span> </div> </div> {!isUnopened && ( <div className={`flux-schema--children ${isOpen ? '' : 'hidden'}`}> {this.itemList} </div> )} </div> ) } private get categoryName(): string { switch (this.props.type) { case CategoryType.Measurements: return 'MEASUREMENTS' case CategoryType.Fields: return 'FIELDS' case CategoryType.Tags: return 'TAGS' } } private get itemList(): JSX.Element { const {type, db, timeRange, source, notify, categoryTree} = this.props switch (type) { case CategoryType.Measurements: return ( <MeasurementList db={db} source={source} notify={notify} measurements={categoryTree.measurements} loading={categoryTree.measurementsLoading} onAddFilter={this.handleAddFilter} /> ) case CategoryType.Fields: return ( <FieldList db={db} source={source} notify={notify} fields={categoryTree.fields} loading={categoryTree.fieldsLoading} onAddFilter={this.handleAddFilter} /> ) case CategoryType.Tags: return ( <TagKeyList db={db} source={source} timeRange={timeRange} notify={notify} tagKeys={categoryTree.tagKeys} loading={categoryTree.tagsLoading} onAddFilter={this.handleAddFilter} /> ) } } private handleClick = e => { e.stopPropagation() const opened = this.state.opened if (opened === OpenState.OPENED) { this.setState({opened: OpenState.ClOSED}) return } this.setState({opened: OpenState.OPENED}) } private handleAddFilter = (filter: {[key: string]: string}) => { this.props.onAddFilter(this.props.db, filter) } } const SchemaItemCategory2 = ErrorHandling(SchemaItemCategory) const ConnectedSchemaItemCategory = (props: PassedProps) => { return ( <TimeMachineContextConsumer> {(container: TimeMachineContainer) => { return ( <SchemaItemCategory2 {...props} onAddFilter={container.handleAddFilter} /> ) }} </TimeMachineContextConsumer> ) } export default ConnectedSchemaItemCategory ```
/content/code_sandbox/ui/src/flux/components/SchemaItemCategory.tsx
xml
2016-08-24T23:28:56
2024-08-13T19:50:03
chronograf
influxdata/chronograf
1,494
1,009
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ // TypeScript Version: 4.1 /// <reference types="@stdlib/types"/> import { Iterator as Iter, IterableIterator } from '@stdlib/types/iter'; // Define a union type representing both iterable and non-iterable iterators: type Iterator = Iter | IterableIterator; /** * Returns an iterator which iteratively computes the arccosine. * * ## Notes * * - The domain of arccosine is restricted to `[-1,1]`. If an iterated value is outside of the domain, the returned iterator returns `NaN`. * - If an environment supports `Symbol.iterator` **and** a provided iterator is iterable, the returned iterator is iterable. * * @param iterator - input iterator * @returns iterator * * @example * var uniform = require( '@stdlib/random/iter/uniform' ); * * var iter = iterAcos( uniform( -1.0, 1.0 ) ); * * var r = iter.next().value; * // returns <number> * * r = iter.next().value; * // returns <number> * * r = iter.next().value; * // returns <number> * * // ... */ declare function iterAcos( iterator: Iterator ): Iterator; // EXPORTS // export = iterAcos; ```
/content/code_sandbox/lib/node_modules/@stdlib/math/iter/special/acos/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
320
```xml // // // Microsoft Bot Framework: path_to_url // // Bot Framework Emulator Github: // path_to_url // // All rights reserved. // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // import { addSavedBotUrl, SharedConstants } from '@bfemulator/app-shared'; import { Command } from '@bfemulator/sdk-shared'; import { dispatch } from '../state/store'; const Commands = SharedConstants.Commands.Settings; /** Registers settings commands */ export class SettingsCommands { // your_sha256_hash----------- // Save a new bot url to disk @Command(Commands.SaveBotUrl) protected saveBotUrl(url: string) { if (!url) { return; // Nothing to save. } dispatch(addSavedBotUrl(url)); } } ```
/content/code_sandbox/packages/app/main/src/commands/settingsCommands.ts
xml
2016-11-11T23:15:09
2024-08-16T12:45:29
BotFramework-Emulator
microsoft/BotFramework-Emulator
1,803
374
```xml import {ComponentFixture, TestBed} from '@angular/core/testing'; import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed'; import {MatAccordionHarness, MatExpansionPanelHarness} from '@angular/material/expansion/testing'; import {HarnessLoader} from '@angular/cdk/testing'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; import {ExpansionHarnessExample} from './expansion-harness-example'; describe('ExpansionHarnessExample', () => { let fixture: ComponentFixture<ExpansionHarnessExample>; let loader: HarnessLoader; beforeEach(() => { TestBed.configureTestingModule({ imports: [NoopAnimationsModule], }); fixture = TestBed.createComponent(ExpansionHarnessExample); fixture.detectChanges(); loader = TestbedHarnessEnvironment.loader(fixture); }); it('should be able to load accordion', async () => { const accordions = await loader.getAllHarnesses(MatAccordionHarness); expect(accordions.length).toBe(1); }); it('should be able to load expansion panels', async () => { const panels = await loader.getAllHarnesses(MatExpansionPanelHarness); expect(panels.length).toBe(1); }); it('should be able to toggle expansion state of panel', async () => { const panel = await loader.getHarness(MatExpansionPanelHarness); expect(await panel.isExpanded()).toBe(false); await panel.toggle(); expect(await panel.isExpanded()).toBe(true); }); it('should be able to get text content of expansion panel', async () => { const panel = await loader.getHarness(MatExpansionPanelHarness); expect(await panel.getTextContent()).toBe('I am the content!'); }); it('should be able to get expansion panels of accordion', async () => { const accordion = await loader.getHarness(MatAccordionHarness); const panels = await accordion.getExpansionPanels(); expect(panels.length).toBe(1); expect(await panels[0].getTitle()).toBe('Welcome'); }); }); ```
/content/code_sandbox/src/components-examples/material/expansion/expansion-harness/expansion-harness-example.spec.ts
xml
2016-01-04T18:50:02
2024-08-16T11:21:13
components
angular/components
24,263
411
```xml import { addRegistry, initialSetup, prepareGenericEmptyProject } from '@verdaccio/test-cli-commons'; import { npm } from './utils'; describe('install a package', () => { jest.setTimeout(20000); let registry; beforeAll(async () => { const setup = await initialSetup(); registry = setup.registry; await registry.init(); }); test.each([['verdaccio-memory', 'verdaccio', '@verdaccio/foo', '@verdaccio/some-foo']])( 'should publish a package %s', async (pkgName) => { const { tempFolder } = await prepareGenericEmptyProject( pkgName, '1.0.0-patch', registry.port, registry.getToken(), registry.getRegistryUrl() ); const resp = await npm( { cwd: tempFolder }, 'publish', '--json', ...addRegistry(registry.getRegistryUrl()) ); const parsedBody = JSON.parse(resp.stdout as string); expect(parsedBody.name).toEqual(pkgName); expect(parsedBody.files).toBeDefined(); expect(parsedBody.files).toBeDefined(); } ); afterAll(async () => { registry.stop(); }); }); ```
/content/code_sandbox/e2e/cli/e2e-npm7/publish.spec.ts
xml
2016-04-15T16:21:12
2024-08-16T09:38:01
verdaccio
verdaccio/verdaccio
16,189
267
```xml import { convertToSecretAccessPoliciesView, convertToPeopleAccessPoliciesView, ApItemValueType, convertToProjectServiceAccountsAccessPoliciesView, convertToServiceAccountGrantedPoliciesView, } from "./ap-item-value.type"; import { ApItemEnum } from "./enums/ap-item.enum"; import { ApPermissionEnum } from "./enums/ap-permission.enum"; describe("convertToPeopleAccessPoliciesView", () => { it("should convert selected policy values to user and group access policies view", () => { const selectedPolicyValues = [...createUserApItems(), ...createGroupApItems()]; const result = convertToPeopleAccessPoliciesView(selectedPolicyValues); expect(result.userAccessPolicies).toEqual(expectedUserAccessPolicies); expect(result.groupAccessPolicies).toEqual(expectedGroupAccessPolicies); }); it("should return empty user array if no selected users are provided", () => { const selectedPolicyValues = createGroupApItems(); const result = convertToPeopleAccessPoliciesView(selectedPolicyValues); expect(result.userAccessPolicies).toEqual([]); expect(result.groupAccessPolicies).toEqual(expectedGroupAccessPolicies); }); it("should return empty group array if no selected groups are provided", () => { const selectedPolicyValues = createUserApItems(); const result = convertToPeopleAccessPoliciesView(selectedPolicyValues); expect(result.userAccessPolicies).toEqual(expectedUserAccessPolicies); expect(result.groupAccessPolicies).toEqual([]); }); it("should return empty arrays if no selected policy values are provided", () => { const selectedPolicyValues: ApItemValueType[] = []; const result = convertToPeopleAccessPoliciesView(selectedPolicyValues); expect(result.userAccessPolicies).toEqual([]); expect(result.groupAccessPolicies).toEqual([]); }); }); describe("convertToServiceAccountGrantedPoliciesView", () => { it("should convert selected policy values to ServiceAccountGrantedPoliciesView", () => { const selectedPolicyValues = createProjectApItems(); const result = convertToServiceAccountGrantedPoliciesView(selectedPolicyValues); expect(result.grantedProjectPolicies).toHaveLength(2); expect(result.grantedProjectPolicies[0].accessPolicy.grantedProjectId).toBe( selectedPolicyValues[0].id, ); expect(result.grantedProjectPolicies[0].accessPolicy.read).toBe(true); expect(result.grantedProjectPolicies[0].accessPolicy.write).toBe(false); expect(result.grantedProjectPolicies[1].accessPolicy.grantedProjectId).toBe( selectedPolicyValues[1].id, ); expect(result.grantedProjectPolicies[1].accessPolicy.read).toBe(true); expect(result.grantedProjectPolicies[1].accessPolicy.write).toBe(true); }); it("should return empty array if no selected project policies are provided", () => { const selectedPolicyValues: ApItemValueType[] = []; const result = convertToServiceAccountGrantedPoliciesView(selectedPolicyValues); expect(result.grantedProjectPolicies).toEqual([]); }); }); describe("convertToProjectServiceAccountsAccessPoliciesView", () => { it("should convert selected policy values to ProjectServiceAccountsAccessPoliciesView", () => { const selectedPolicyValues = createServiceAccountApItems(); const result = convertToProjectServiceAccountsAccessPoliciesView(selectedPolicyValues); expect(result.serviceAccountAccessPolicies).toEqual(expectedServiceAccountAccessPolicies); }); it("should return empty array if nothing is selected.", () => { const selectedPolicyValues: ApItemValueType[] = []; const result = convertToProjectServiceAccountsAccessPoliciesView(selectedPolicyValues); expect(result.serviceAccountAccessPolicies).toEqual([]); }); }); describe("convertToSecretAccessPoliciesView", () => { it("should convert selected policy values to SecretAccessPoliciesView", () => { const selectedPolicyValues = [ ...createUserApItems(), ...createGroupApItems(), ...createServiceAccountApItems(), ]; const result = convertToSecretAccessPoliciesView(selectedPolicyValues); expect(result.userAccessPolicies).toEqual(expectedUserAccessPolicies); expect(result.groupAccessPolicies).toEqual(expectedGroupAccessPolicies); expect(result.serviceAccountAccessPolicies).toEqual(expectedServiceAccountAccessPolicies); }); it("should return empty user array if no selected users are provided", () => { const selectedPolicyValues = [...createGroupApItems(), ...createServiceAccountApItems()]; const result = convertToSecretAccessPoliciesView(selectedPolicyValues); expect(result.userAccessPolicies).toEqual([]); expect(result.groupAccessPolicies).toEqual(expectedGroupAccessPolicies); expect(result.serviceAccountAccessPolicies).toEqual(expectedServiceAccountAccessPolicies); }); it("should return empty group array if no selected groups are provided", () => { const selectedPolicyValues = [...createUserApItems(), ...createServiceAccountApItems()]; const result = convertToSecretAccessPoliciesView(selectedPolicyValues); expect(result.userAccessPolicies).toEqual(expectedUserAccessPolicies); expect(result.groupAccessPolicies).toEqual([]); expect(result.serviceAccountAccessPolicies).toEqual(expectedServiceAccountAccessPolicies); }); it("should return empty service account array if no selected service accounts are provided", () => { const selectedPolicyValues = [...createUserApItems(), ...createGroupApItems()]; const result = convertToSecretAccessPoliciesView(selectedPolicyValues); expect(result.userAccessPolicies).toEqual(expectedUserAccessPolicies); expect(result.groupAccessPolicies).toEqual(expectedGroupAccessPolicies); expect(result.serviceAccountAccessPolicies).toEqual([]); }); it("should return empty arrays if nothing is selected.", () => { const selectedPolicyValues: ApItemValueType[] = []; const result = convertToSecretAccessPoliciesView(selectedPolicyValues); expect(result.userAccessPolicies).toEqual([]); expect(result.groupAccessPolicies).toEqual([]); expect(result.serviceAccountAccessPolicies).toEqual([]); }); }); function createUserApItems(): ApItemValueType[] { return [ { id: "1", type: ApItemEnum.User, permission: ApPermissionEnum.CanRead, }, { id: "3", type: ApItemEnum.User, permission: ApPermissionEnum.CanReadWrite, }, ]; } const expectedUserAccessPolicies = [ { organizationUserId: "1", read: true, write: false, }, { organizationUserId: "3", read: true, write: true, }, ]; function createServiceAccountApItems(): ApItemValueType[] { return [ { id: "1", type: ApItemEnum.ServiceAccount, permission: ApPermissionEnum.CanRead, }, { id: "2", type: ApItemEnum.ServiceAccount, permission: ApPermissionEnum.CanReadWrite, }, ]; } const expectedServiceAccountAccessPolicies = [ { serviceAccountId: "1", read: true, write: false, }, { serviceAccountId: "2", read: true, write: true, }, ]; function createGroupApItems(): ApItemValueType[] { return [ { id: "2", type: ApItemEnum.Group, permission: ApPermissionEnum.CanReadWrite, }, ]; } const expectedGroupAccessPolicies = [ { groupId: "2", read: true, write: true, }, ]; function createProjectApItems(): ApItemValueType[] { return [ { id: "1", type: ApItemEnum.Project, permission: ApPermissionEnum.CanRead, }, { id: "2", type: ApItemEnum.Project, permission: ApPermissionEnum.CanReadWrite, }, ]; } ```
/content/code_sandbox/bitwarden_license/bit-web/src/app/secrets-manager/shared/access-policies/access-policy-selector/models/ap-item-value.spec.ts
xml
2016-03-09T23:14:01
2024-08-16T15:07:51
clients
bitwarden/clients
8,877
1,683
```xml // @ts-ignore: TODO: remove when webpack 5 is stable import MiniCssExtractPlugin from 'next/dist/compiled/mini-css-extract-plugin' export default class NextMiniCssExtractPlugin extends MiniCssExtractPlugin { __next_css_remove = true } ```
/content/code_sandbox/packages/next/src/build/webpack/plugins/mini-css-extract-plugin.ts
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
57
```xml /*your_sha256_hash----------------------------- *your_sha256_hash----------------------------*/ import { testTokenization } from '../test/testRunner'; testTokenization('fsharp', [ // comments - single line [ { line: '// one line comment', tokens: [{ startIndex: 0, type: 'comment.fs' }] } ], [ { line: '//', tokens: [{ startIndex: 0, type: 'comment.fs' }] } ], [ { line: ' // a comment', tokens: [ { startIndex: 0, type: '' }, { startIndex: 4, type: 'comment.fs' } ] } ], [ { line: '// a comment', tokens: [{ startIndex: 0, type: 'comment.fs' }] } ], [ { line: '//sticky comment', tokens: [{ startIndex: 0, type: 'comment.fs' }] } ], [ { line: '/almost a comment', tokens: [ { startIndex: 0, type: 'delimiter.fs' }, { startIndex: 1, type: 'identifier.fs' }, { startIndex: 7, type: '' }, { startIndex: 8, type: 'identifier.fs' }, { startIndex: 9, type: '' }, { startIndex: 10, type: 'identifier.fs' } ] } ], [ { line: '(/*almost a comment', tokens: [ { startIndex: 0, type: 'delimiter.parenthesis.fs' }, { startIndex: 1, type: 'delimiter.fs' }, { startIndex: 3, type: 'identifier.fs' }, { startIndex: 9, type: '' }, { startIndex: 10, type: 'identifier.fs' }, { startIndex: 11, type: '' }, { startIndex: 12, type: 'identifier.fs' } ] } ], [ { line: '1 / 2; (* comment', tokens: [ { startIndex: 0, type: 'number.fs' }, { startIndex: 1, type: '' }, { startIndex: 2, type: 'delimiter.fs' }, { startIndex: 3, type: '' }, { startIndex: 4, type: 'number.fs' }, { startIndex: 5, type: 'delimiter.fs' }, { startIndex: 6, type: '' }, { startIndex: 7, type: 'comment.fs' } ] } ], [ { line: 'let x = 1; // my comment // is a nice one', tokens: [ { startIndex: 0, type: 'keyword.let.fs' }, { startIndex: 3, type: '' }, { startIndex: 4, type: 'identifier.fs' }, { startIndex: 5, type: '' }, { startIndex: 6, type: 'delimiter.fs' }, { startIndex: 7, type: '' }, { startIndex: 8, type: 'number.fs' }, { startIndex: 9, type: 'delimiter.fs' }, { startIndex: 10, type: '' }, { startIndex: 11, type: 'comment.fs' } ] } ], // Keywords [ { line: 'namespace Application1', tokens: [ { startIndex: 0, type: 'keyword.namespace.fs' }, { startIndex: 9, type: '' }, { startIndex: 10, type: 'identifier.fs' } ] } ], [ { line: 'type MyType', tokens: [ { startIndex: 0, type: 'keyword.type.fs' }, { startIndex: 4, type: '' }, { startIndex: 5, type: 'identifier.fs' } ] } ], [ { line: 'module App =', tokens: [ { startIndex: 0, type: 'keyword.module.fs' }, { startIndex: 6, type: '' }, { startIndex: 7, type: 'identifier.fs' }, { startIndex: 10, type: '' }, { startIndex: 11, type: 'delimiter.fs' } ] } ], [ { line: 'let AppName = "App1"', tokens: [ { startIndex: 0, type: 'keyword.let.fs' }, { startIndex: 3, type: '' }, { startIndex: 4, type: 'identifier.fs' }, { startIndex: 11, type: '' }, { startIndex: 12, type: 'delimiter.fs' }, { startIndex: 13, type: '' }, { startIndex: 14, type: 'string.fs' } ] } ], // Comments - range comment [ { line: '(* a simple comment *)', tokens: [{ startIndex: 0, type: 'comment.fs' }] } ], [ { line: 'let x = (* a simple comment *) 1', tokens: [ { startIndex: 0, type: 'keyword.let.fs' }, { startIndex: 3, type: '' }, { startIndex: 4, type: 'identifier.fs' }, { startIndex: 5, type: '' }, { startIndex: 6, type: 'delimiter.fs' }, { startIndex: 7, type: '' }, { startIndex: 8, type: 'comment.fs' }, { startIndex: 30, type: '' }, { startIndex: 31, type: 'number.fs' } ] } ], [ { line: 'x = (**)', tokens: [ { startIndex: 0, type: 'identifier.fs' }, { startIndex: 1, type: '' }, { startIndex: 2, type: 'delimiter.fs' }, { startIndex: 3, type: '' }, { startIndex: 4, type: 'comment.fs' } ] } ], [ { line: 'x = (*)', tokens: [ { startIndex: 0, type: 'identifier.fs' }, { startIndex: 1, type: '' }, { startIndex: 2, type: 'delimiter.fs' }, { startIndex: 3, type: '' }, { startIndex: 4, type: 'delimiter.parenthesis.fs' }, { startIndex: 5, type: 'delimiter.fs' }, { startIndex: 6, type: 'delimiter.parenthesis.fs' } ] } ], // Numbers [ { line: '0', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '0x123', tokens: [{ startIndex: 0, type: 'number.hex.fs' }] } ], [ { line: '23.5', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '23.5e3', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '23.5E3', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '23.5F', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '23.5f', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '1.72E3F', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '1.72E3f', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '1.72e3F', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '1.72e3f', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '23.5M', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '23.5m', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '1.72E3M', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '1.72E3m', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '1.72e3M', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '1.72e3m', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '0+0', tokens: [ { startIndex: 0, type: 'number.fs' }, { startIndex: 1, type: 'delimiter.fs' }, { startIndex: 2, type: 'number.fs' } ] } ], [ { line: '100+10', tokens: [ { startIndex: 0, type: 'number.fs' }, { startIndex: 3, type: 'delimiter.fs' }, { startIndex: 4, type: 'number.fs' } ] } ], [ { line: '0 + 0', tokens: [ { startIndex: 0, type: 'number.fs' }, { startIndex: 1, type: '' }, { startIndex: 2, type: 'delimiter.fs' }, { startIndex: 3, type: '' }, { startIndex: 4, type: 'number.fs' } ] } ], [ { line: '0b00000101', tokens: [{ startIndex: 0, type: 'number.bin.fs' }] } ], [ { line: '86y', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '0b00000101y', tokens: [{ startIndex: 0, type: 'number.bin.fs' }] } ], [ { line: '86s', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '86us', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '86', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '86l', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '86u', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '86ul', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '0x00002D3Fn', tokens: [{ startIndex: 0, type: 'number.hex.fs' }] } ], [ { line: '0x00002D3Fun', tokens: [{ startIndex: 0, type: 'number.hex.fs' }] } ], [ { line: '86L', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '86UL', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '9999999999999999999999999999I', tokens: [{ startIndex: 0, type: 'number.fs' }] } ], [ { line: '0x00002D3FLF', tokens: [{ startIndex: 0, type: 'number.float.fs' }] } ], [ { line: '(* This operator -> (*) should be ignored *) let i = 0', tokens: [ { startIndex: 0, type: 'comment.fs' }, { startIndex: 44, type: '' }, { startIndex: 45, type: 'keyword.let.fs' }, { startIndex: 48, type: '' }, { startIndex: 49, type: 'identifier.fs' }, { startIndex: 50, type: '' }, { startIndex: 51, type: 'delimiter.fs' }, { startIndex: 52, type: '' }, { startIndex: 53, type: 'number.fs' } ] } ] ]); ```
/content/code_sandbox/src/basic-languages/fsharp/fsharp.test.ts
xml
2016-06-07T16:56:31
2024-08-16T17:17:05
monaco-editor
microsoft/monaco-editor
39,508
3,174
```xml import type { Config } from '../../config'; import type { IpcScope, WebviewState } from '../protocol'; import { IpcCommand, IpcNotification } from '../protocol'; export const scope: IpcScope = 'welcome'; export interface State extends WebviewState { version: string; config: { codeLens: Config['codeLens']['enabled']; currentLine: Config['currentLine']['enabled']; }; repoFeaturesBlocked?: boolean; isTrialOrPaid: boolean; canShowPromo: boolean; orgSettings: { ai: boolean; drafts: boolean; }; } // COMMANDS export interface UpdateConfigurationParams { type: 'codeLens' | 'currentLine'; value: boolean; } export const UpdateConfigurationCommand = new IpcCommand<UpdateConfigurationParams>(scope, 'configuration/update'); // NOTIFICATIONS export interface DidChangeParams { state: State; } export const DidChangeNotification = new IpcNotification<DidChangeParams>(scope, 'didChange', true); export interface DidChangeOrgSettingsParams { orgSettings: State['orgSettings']; } export const DidChangeOrgSettings = new IpcNotification<DidChangeOrgSettingsParams>(scope, 'org/settings/didChange'); ```
/content/code_sandbox/src/webviews/welcome/protocol.ts
xml
2016-08-08T14:50:30
2024-08-15T21:25:09
vscode-gitlens
gitkraken/vscode-gitlens
8,889
257
```xml <run> <case> <desc>PeP - point to an empty point</desc> <a> POINT(10 10) </a> <b> POINT EMPTY </b> <test><op name="distance" arg1="A" arg2="B"> 0.0 </op></test> <test><op name="distance" arg1="B" arg2="A"> 0.0 </op></test> </case> <case> <desc>PP - point to point</desc> <a> POINT(10 10) </a> <b> POINT (10 0) </b> <test><op name="distance" arg1="A" arg2="B"> 10.0 </op></test> <test><op name="distance" arg1="B" arg2="A"> 10.0 </op></test> </case> <case> <desc>PP - point to multipoint</desc> <a> POINT(10 10) </a> <b> MULTIPOINT ((10 0), (30 30)) </b> <test><op name="distance" arg1="A" arg2="B"> 10.0 </op></test> <test><op name="distance" arg1="B" arg2="A"> 10.0 </op></test> </case> <case> <desc>PP - point to multipoint with empty element</desc> <a> POINT(10 10) </a> <b> MULTIPOINT ((10 0), EMPTY) </b> <test><op name="distance" arg1="A" arg2="B"> 10.0 </op></test> <test><op name="distance" arg1="B" arg2="A"> 10.0 </op></test> </case> <case> <desc>LL - line to empty line</desc> <a> LINESTRING (0 0, 0 10) </a> <b> LINESTRING EMPTY </b> <test><op name="distance" arg1="A" arg2="B"> 0.0 </op></test> <test><op name="distance" arg1="B" arg2="A"> 0.0 </op></test> </case> <case> <desc>LL - line to line</desc> <a> LINESTRING (0 0, 0 10) </a> <b> LINESTRING (10 0, 10 10) </b> <test><op name="distance" arg1="A" arg2="B"> 10.0 </op></test> <test><op name="distance" arg1="B" arg2="A"> 10.0 </op></test> </case> <case> <desc>LL - line to multiline</desc> <a> LINESTRING (0 0, 0 10) </a> <b> MULTILINESTRING ((10 0, 10 10), (50 50, 60 60)) </b> <test><op name="distance" arg1="A" arg2="B"> 10.0 </op></test> <test><op name="distance" arg1="B" arg2="A"> 10.0 </op></test> </case> <case> <desc>LL - line to multiline with empty element</desc> <a> LINESTRING (0 0, 0 10) </a> <b> MULTILINESTRING ((10 0, 10 10), EMPTY) </b> <test><op name="distance" arg1="A" arg2="B"> 10.0 </op></test> <test><op name="distance" arg1="B" arg2="A"> 10.0 </op></test> </case> <case> <desc>PA - point to empty polygon</desc> <a> POINT (240 160) </a> <b> POLYGON EMPTY </b> <test><op name="distance" arg1="A" arg2="B" > 0.0 </op></test> <test><op name="distance" arg1="B" arg2="A" > 0.0 </op></test> </case> <case> <desc>PA - point inside polygon</desc> <a> POINT (240 160) </a> <b> POLYGON ((100 260, 340 180, 100 60, 180 160, 100 260)) </b> <test><op name="distance" arg1="A" arg2="B" > 0.0 </op></test> <test><op name="distance" arg1="B" arg2="A" > 0.0 </op></test> </case> <case> <desc>LL - crossing linestrings</desc> <a> LINESTRING (40 300, 280 220, 60 160, 140 60) </a> <b> LINESTRING (140 360, 260 280, 240 120, 120 160) </b> <test><op name="distance" arg1="A" arg2="B" > 0.0 </op></test> <test><op name="distance" arg1="B" arg2="A" > 0.0 </op></test> </case> <case> <desc>AA - overlapping polygons</desc> <a> POLYGON ((60 260, 260 180, 100 60, 60 160, 60 260)) </a> <b> POLYGON ((220 280, 120 160, 300 60, 360 220, 220 280)) </b> <test><op name="distance" arg1="A" arg2="B" > 0.0 </op></test> <test><op name="distance" arg1="B" arg2="A" > 0.0 </op></test> </case> <case> <desc>AA - disjoint polygons</desc> <a> POLYGON ((100 320, 60 120, 240 180, 200 260, 100 320)) </a> <b> POLYGON ((420 320, 280 260, 400 100, 420 320)) </b> <test><op name="distance" arg1="A" arg2="B" > 71.55417527999327 </op></test> <test><op name="distance" arg1="B" arg2="A" > 71.55417527999327 </op></test> </case> <case> <desc>mAmA - overlapping multipolygons</desc> <a> MULTIPOLYGON (((40 240, 160 320, 40 380, 40 240)), ((100 240, 240 60, 40 40, 100 240))) </a> <b> MULTIPOLYGON (((220 280, 120 160, 300 60, 360 220, 220 280)), ((240 380, 280 300, 420 340, 240 380))) </b> <test><op name="distance" arg1="A" arg2="B" > 0.0 </op></test> <test><op name="distance" arg1="B" arg2="A" > 0.0 </op></test> </case> <case> <desc>mAmA - multipolygon with empty element</desc> <a> MULTIPOLYGON (EMPTY, ((98 200, 200 200, 200 99, 98 99, 98 200))) </a> <b> POLYGON ((300 200, 400 200, 400 100, 300 100, 300 200)) </b> <test><op name="distance" arg1="A" arg2="B" > 100.0 </op></test> <test><op name="distance" arg1="B" arg2="A" > 100.0 </op></test> </case> <case> <desc>GCGC - geometry collections with mixed dimensions</desc> <a> GEOMETRYCOLLECTION (LINESTRING (10 10, 50 10), POINT (90 10)) </a> <b> GEOMETRYCOLLECTION (POLYGON ((90 20, 60 20, 60 50, 90 50, 90 20)), LINESTRING (10 50, 30 70)) </b> <test><op name="distance" arg1="A" arg2="B" > 10.0 </op></test> <test><op name="distance" arg1="B" arg2="A" > 10.0 </op></test> </case> </run> ```
/content/code_sandbox/modules/tests/src/test/resources/testxml/general/TestDistance.xml
xml
2016-01-25T18:08:41
2024-08-15T17:34:53
jts
locationtech/jts
1,923
2,111
```xml <annotation> <folder/> <filename>2011_000006.jpg</filename> <database/> <annotation/> <image/> <size> <height>375</height> <width>500</width> <depth>3</depth> </size> <segmented/> <object> <name>person</name> <pose/> <truncated/> <difficult/> <bndbox> <xmin>91.0</xmin> <ymin>107.0</ymin> <xmax>240.0</xmax> <ymax>330.0</ymax> </bndbox> </object> <object> <name>person</name> <pose/> <truncated/> <difficult/> <bndbox> <xmin>178.0</xmin> <ymin>110.0</ymin> <xmax>298.0</xmax> <ymax>282.0</ymax> </bndbox> </object> <object> <name>person</name> <pose/> <truncated/> <difficult/> <bndbox> <xmin>254.38461538461536</xmin> <ymin>115.38461538461539</ymin> <xmax>369.38461538461536</xmax> <ymax>292.38461538461536</ymax> </bndbox> </object> <object> <name>person</name> <pose/> <truncated/> <difficult/> <bndbox> <xmin>395.0</xmin> <ymin>81.0</ymin> <xmax>447.0</xmax> <ymax>117.0</ymax> </bndbox> </object> </annotation> ```
/content/code_sandbox/examples/bbox_detection/data_dataset_voc/Annotations/2011_000006.xml
xml
2016-05-09T12:30:26
2024-08-16T15:31:48
labelme
labelmeai/labelme
12,988
425
```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 /** * Interface describing `ddeg2rad`. */ interface Routine { /** * Converts each element in a double-precision floating-point strided array `x` from degrees to radians and assigns the results to elements in a double-precision floating-point strided array `y`. * * @param N - number of indexed elements * @param x - input array * @param strideX - `x` stride length * @param y - destination array * @param strideY - `y` stride length * @returns `y` * * @example * var Float64Array = require( '@stdlib/array/float64' ); * * var x = new Float64Array( [ 0.0, 30.0, 45.0, 60.0, 90.0 ] ); * var y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * * ddeg2rad( x.length, x, 1, y, 1 ); * // y => <Float64Array>[ 0.0, ~0.524, ~0.785, ~1.047, ~1.571 ] */ ( N: number, x: Float64Array, strideX: number, y: Float64Array, strideY: number ): Float64Array; /** * Converts each element in a double-precision floating-point strided array `x` from degrees to radians and assigns the results to elements in a double-precision floating-point strided array `y` using alternative indexing semantics. * * @param N - number of indexed elements * @param x - input array * @param strideX - `x` stride length * @param offsetX - starting index for `x` * @param y - destination array * @param strideY - `y` stride length * @param offsetY - starting index for `y` * @returns `y` * * @example * var Float64Array = require( '@stdlib/array/float64' ); * * var x = new Float64Array( [ 0.0, 30.0, 45.0, 60.0, 90.0 ] ); * var y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * * ddeg2rad.ndarray( x.length, x, 1, 0, y, 1, 0 ); * // y => <Float64Array>[ 0.0, ~0.524, ~0.785, ~1.047, ~1.571 ] */ ndarray( N: number, x: Float64Array, strideX: number, offsetX: number, y: Float64Array, strideY: number, offsetY: number ): Float64Array; } /** * Converts each element in a double-precision floating-point strided array `x` from degrees to radians and assigns the results to elements in a double-precision floating-point strided array `y`. * * @param N - number of indexed elements * @param x - input array * @param strideX - `x` stride length * @param y - destination array * @param strideY - `y` stride length * @returns `y` * * @example * var Float64Array = require( '@stdlib/array/float64' ); * * var x = new Float64Array( [ 0.0, 30.0, 45.0, 60.0, 90.0 ] ); * var y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * * ddeg2rad( x.length, x, 1, y, 1 ); * // y => <Float64Array>[ 0.0, ~0.524, ~0.785, ~1.047, ~1.571 ] * * @example * var Float64Array = require( '@stdlib/array/float64' ); * * var x = new Float64Array( [ 0.0, 30.0, 45.0, 60.0, 90.0 ] ); * var y = new Float64Array( [ 0.0, 0.0, 0.0, 0.0, 0.0 ] ); * * ddeg2rad.ndarray( x.length, x, 1, 0, y, 1, 0 ); * // y => <Float64Array>[ 0.0, ~0.524, ~0.785, ~1.047, ~1.571 ] */ declare var ddeg2rad: Routine; // EXPORTS // export = ddeg2rad; ```
/content/code_sandbox/lib/node_modules/@stdlib/math/strided/special/ddeg2rad/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
1,138
```xml import { mode } from './../../theme/tools/colors'; describe('mode', () => { test('default', () => { expect(mode('light', 'dark')({})).toBe('light'); }); test('light', () => { expect(mode('light', 'dark')({ colorMode: 'light' })).toBe('light'); }); test('dark', () => { expect(mode('light', 'dark')({ colorMode: 'dark' })).toBe('dark'); }); }); ```
/content/code_sandbox/src/theme/tests/mode.test.tsx
xml
2016-04-15T11:37:23
2024-08-14T16:16:44
NativeBase
GeekyAnts/NativeBase
20,132
107
```xml import { useState } from 'react'; const usePaginationAsync = (initialPage = 1) => { const [page, setPage] = useState(initialPage); const onNext = () => setPage(page + 1); const onPrevious = () => setPage(page - 1); const onSelect = (p: number) => setPage(p); const reset = () => setPage(initialPage); return { page, onNext, onPrevious, onSelect, reset, }; }; export default usePaginationAsync; ```
/content/code_sandbox/packages/components/components/pagination/usePaginationAsync.ts
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
111
```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 /** * Returns the standard deviation of an arcsine distribution. * * ## Notes * * - If provided `a >= b`, the function returns `NaN`. * * @param a - minimum support * @param b - maximum support * @returns standard deviation * * @example * var v = stdev( 0.0, 1.0 ); * // returns ~0.354 * * @example * var v = stdev( 4.0, 12.0 ); * // returns ~2.828 * * @example * var v = stdev( -4.0, 4.0 ); * // returns ~2.828 * * @example * var v = stdev( 1.0, -0.1 ); * // returns NaN * * @example * var v = stdev( 2.0, NaN ); * // returns NaN * * @example * var v = stdev( NaN, 2.0 ); * // returns NaN */ declare function stdev( a: number, b: number ): number; // EXPORTS // export = stdev; ```
/content/code_sandbox/lib/node_modules/@stdlib/stats/base/dists/arcsine/stdev/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
306
```xml <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="path_to_url" package="com.github.florent37.sample.diagonallayout"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".DiagonalLayoutMainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> ```
/content/code_sandbox/app/src/main/AndroidManifest.xml
xml
2016-10-14T14:59:59
2024-07-10T06:26:01
DiagonalLayout
florent37/DiagonalLayout
2,564
148
```xml <controls:UserControlEx x:Class="Telegram.Controls.Gallery.GalleryCompactWindow" xmlns="path_to_url" xmlns:x="path_to_url" xmlns:local="using:Telegram.Controls.Gallery" xmlns:controls="using:Telegram.Controls" xmlns:vlc="using:LibVLCSharp.Platforms.Windows" xmlns:d="path_to_url" xmlns:mc="path_to_url" mc:Ignorable="d" d:DesignHeight="300" d:DesignWidth="400" RequestedTheme="Dark" Disconnected="OnUnloaded"> <Grid Background="Black"> <vlc:VideoView x:Name="Video" Initialized="OnInitialized" /> <Grid x:Name="ControlsRoot" Background="{ThemeResource SystemControlPageBackgroundAltMediumBrush}"> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Border x:Name="TitleBar" Background="Transparent" Grid.RowSpan="2" /> <local:GalleryTransportControls x:Name="Controls" CompactClick="Controls_CompactClick" Grid.Row="1" /> </Grid> </Grid> </controls:UserControlEx> ```
/content/code_sandbox/Telegram/Controls/Gallery/GalleryCompactWindow.xaml
xml
2016-05-23T09:03:33
2024-08-16T16:17:48
Unigram
UnigramDev/Unigram
3,744
271
```xml export const installChromeExtensions = async (isDev: boolean) => { if (isDev) { const { default: installExtension, REACT_DEVELOPER_TOOLS, } = require('electron-devtools-installer'); // eslint-disable-line global-require const { app } = require('electron'); const extensions = [REACT_DEVELOPER_TOOLS]; const options = { loadExtensionOptions: { allowFileAccess: true, }, }; try { await app.whenReady(); await installExtension(extensions, options); } catch (e) {} // eslint-disable-line } }; ```
/content/code_sandbox/source/main/utils/installChromeExtensions.ts
xml
2016-10-05T13:48:54
2024-08-13T22:03:19
daedalus
input-output-hk/daedalus
1,230
139
```xml import { DefaultNoComponentGlobalConfig, GlobalConfig, TOAST_CONFIG } from './toastr-config'; import { EnvironmentProviders, makeEnvironmentProviders, Provider } from '@angular/core'; import { Toast } from './toast.component'; export const DefaultGlobalConfig: GlobalConfig = { ...DefaultNoComponentGlobalConfig, toastComponent: Toast, }; /** * @description * Provides the `TOAST_CONFIG` token with the given config. * * @param config The config to configure toastr. * @returns The environment providers. * * @example * ```ts * import { provideToastr } from 'ngx-toastr'; * * bootstrap(AppComponent, { * providers: [ * provideToastr({ * timeOut: 2000, * positionClass: 'toast-top-right', * }), * ], * }) */ export const provideToastr = (config: Partial<GlobalConfig> = {}): EnvironmentProviders => { const providers: Provider[] = [ { provide: TOAST_CONFIG, useValue: { default: DefaultGlobalConfig, config, } } ]; return makeEnvironmentProviders(providers); }; ```
/content/code_sandbox/src/lib/toastr/toast.provider.ts
xml
2016-07-28T17:19:43
2024-08-12T13:14:04
ngx-toastr
scttcper/ngx-toastr
2,491
245
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.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>{015D69D0-8B42-438A-ADAE-052AC036E065}</ProjectGuid> <RootNamespace>glibcompileschemas</RootNamespace> <Keyword>Win32Proj</Keyword> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>MultiByte</CharacterSet> <WholeProgramOptimization>true</WholeProgramOptimization> <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>MultiByte</CharacterSet> <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>MultiByte</CharacterSet> <WholeProgramOptimization>true</WholeProgramOptimization> <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>MultiByte</CharacterSet> <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="glib-build-defines.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="glib-build-defines.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="glib-build-defines.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="glib-build-defines.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">false</LinkIncremental> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\..\..\gmodule;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <TargetMachine>MachineX86</TargetMachine> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>..\..\..\gmodule;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>CompileAsC</CompileAs> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention> </DataExecutionPrevention> <TargetMachine>MachineX64</TargetMachine> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <Optimization>MaxSpeed</Optimization> <IntrinsicFunctions>true</IntrinsicFunctions> <AdditionalIncludeDirectories>..\..\..\gmodule;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <FunctionLevelLinking>true</FunctionLevelLinking> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <TargetMachine>MachineX86</TargetMachine> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <ClCompile> <AdditionalIncludeDirectories>..\..\..\gmodule;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> <CompileAs>CompileAsC</CompileAs> </ClCompile> <Link> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention> </DataExecutionPrevention> <TargetMachine>MachineX64</TargetMachine> </Link> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="..\..\..\gio\gvdb\gvdb-builder.c" /> <ClCompile Include="..\..\..\gio\glib-compile-schemas.c" /> </ItemGroup> <ItemGroup> <ProjectReference Include="glib.vcxproj"> <Project>{12bca020-eabf-429e-876a-a476bc9c10c0}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> <ProjectReference Include="gobject.vcxproj"> <Project>{f172effc-e30f-4593-809e-db2024b1e753}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> <ProjectReference Include="gio.vcxproj"> <Project>{f3d1583c-5613-4809-bd98-7cc1c1276f92}</Project> <ReferenceOutputAssembly>false</ReferenceOutputAssembly> </ProjectReference> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project> ```
/content/code_sandbox/utilities/glib/build/win32/vs14/glib-compile-schemas.vcxproj
xml
2016-10-27T09:31:28
2024-08-16T19:00:35
nexmon
seemoo-lab/nexmon
2,381
2,172
```xml import { Version } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart, IPropertyPaneConfiguration, PropertyPaneTextField } from '@microsoft/sp-webpart-base'; import { difference, find } from '@microsoft/sp-lodash-subset'; import { MSGraphClient } from '@microsoft/sp-http'; import styles from './PublicUnjoinedTeamsWebPart.module.scss'; import * as strings from 'PublicUnjoinedTeamsWebPartStrings'; export interface IPublicUnjoinedTeamsWebPartProps { title: string; } export default class PublicUnjoinedTeamsWebPart extends BaseClientSideWebPart<IPublicUnjoinedTeamsWebPartProps> { public async render(): Promise<any> { var unjoinedTeams = await this.getUnjoinedTeams(); this.domElement.innerHTML = ` <div class="${ styles.publicUnjoinedTeams }"> <div class="${styles.title}"> ${this.properties.title} </div> <div id="container" class="${styles.container}"> <!-- content gets appended here --> </div> </div>`; await this.renderTeams(unjoinedTeams); } protected async getUnjoinedTeams(): Promise<any> { var joinedTeamIds:Array<string> = (await this.graphGet(`path_to_url`)).value.map(x => x.id); var allTeams= (await this.graphGet(`path_to_url eq 'Team')&$top=999`)).value; var publicTeamIds:Array<string> = allTeams.filter(team => team.visibility === 'Public').map(x => x.id); var missingTeamIds:Array<string> = difference(publicTeamIds, joinedTeamIds); let missingTeams = JSON.parse('{"value": []}'); missingTeamIds.forEach(teamId => { var team = find(allTeams, {'id': teamId}); missingTeams['value'].push(team); }); return missingTeams.value; } protected async renderTeams(teamsToShow) { const container: Element = this.domElement.querySelector('#container'); var userId:string = (await this.graphGet("me")).id; for (var team of teamsToShow) { var row:HTMLDivElement = document.createElement("div"); row.className = styles.row; container.appendChild(row); var button:HTMLButtonElement = document.createElement("button"); button.id = team.id; button.innerHTML = "Join"; button.onclick = (e:Event) => this.addMember(e.srcElement, userId); row.appendChild(button); var span:HTMLSpanElement = document.createElement("span"); span.innerHTML = ` ${team.displayName}`; row.appendChild(span); } } protected addMember(source:Element, userId:string) { var button:HTMLButtonElement = <HTMLButtonElement>source; button.disabled = true; button.innerText = "Joined!"; var body:string = `{"@odata.id": "path_to_url{userId}"}`; this.graphPost(`path_to_url{button.id}/members/$ref`, body); } protected async graphGet(url: string, value?:Array<string>) { return await this.callGraph(url, "GET"); } protected async graphPost(url: string, body:string) { return await this.callGraph(url, "POST", body); } protected async callGraph(url: string, method:string, body?:string): Promise<any> { const graphClient:MSGraphClient = await this.context.msGraphClientFactory.getClient(); var response; if (method.toUpperCase() == "GET") { response = await graphClient.api(url).get(); } if (method.toUpperCase() == "POST") { response = await graphClient.api(url).post(body); } return response; } protected get dataVersion(): Version { return Version.parse('1.0'); } protected getPropertyPaneConfiguration(): IPropertyPaneConfiguration { return { pages: [ { header: { description: strings.PropertyPaneDescription }, groups: [ { groupName: strings.BasicGroupName, groupFields: [ PropertyPaneTextField('title', { label: strings.TitleFieldLabel }) ] } ] } ] }; } } ```
/content/code_sandbox/samples/js-public-unjoined-teams/src/webparts/publicUnjoinedTeams/PublicUnjoinedTeamsWebPart.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
900
```xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <epp xmlns="urn:ietf:params:xml:ns:epp-1.0"> <command> <update> <domain:update xmlns:domain="urn:ietf:params:xml:ns:domain-1.0"> <domain:name>evil.tld</domain:name> <domain:add> <domain:ns> <domain:hostObj>urs1.example.com</domain:hostObj> </domain:ns> <domain:status s="serverDeleteProhibited" /> <domain:status s="serverTransferProhibited" /> <domain:status s="serverUpdateProhibited" /> </domain:add> <domain:rem> <domain:ns> <domain:hostObj>ns1.example.com</domain:hostObj> </domain:ns> </domain:rem> </domain:update> </update> <extension> <secDNS:update xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1"> <secDNS:rem> <secDNS:all>true</secDNS:all> </secDNS:rem> </secDNS:update> <superuser:domainUpdate xmlns:superuser="urn:google:params:xml:ns:superuser-1.0"> <superuser:autorenews>false</superuser:autorenews> </superuser:domainUpdate> <metadata:metadata xmlns:metadata="urn:google:params:xml:ns:metadata-1.0"> <metadata:reason>Uniform Rapid Suspension</metadata:reason> <metadata:requestedByRegistrar>false</metadata:requestedByRegistrar> </metadata:metadata> </extension> <clTRID>RegistryTool</clTRID> </command> </epp> ```
/content/code_sandbox/core/src/test/resources/google/registry/tools/server/uniform_rapid_suspension_existing_host.xml
xml
2016-02-29T20:16:48
2024-08-15T19:49:29
nomulus
google/nomulus
1,685
406
```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. --> <vector xmlns:android="path_to_url" xmlns:tools="path_to_url" android:width="32dp" android:height="32dp" android:viewportWidth="32" android:viewportHeight="32" tools:ignore="NewApi"> <group> <path android:fillColor="@android:color/black" android:pathData="@string/mtrl_checkbox_button_path_unchecked"/> </group> <group android:name="@string/mtrl_checkbox_button_path_group_name" android:pivotX="16" android:pivotY="16"> <path android:name="@string/mtrl_checkbox_button_path_name" android:fillColor="@android:color/black" android:pathData="@string/mtrl_checkbox_button_path_checked"/> </group> </vector> ```
/content/code_sandbox/lib/java/com/google/android/material/checkbox/res/drawable/mtrl_ic_checkbox_checked.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
238
```xml Updated = "updated", Cancelled = "cancelled", } ```
/content/code_sandbox/apps/web/src/app/billing/shared/update-license-types.ts
xml
2016-03-09T23:14:01
2024-08-16T15:07:51
clients
bitwarden/clients
8,877
15
```xml import React from 'react'; import AlipayImage from '@fiora/assets/images/alipay.png'; import WxpayImage from '@fiora/assets/images/wxpay.png'; import Dialog from '../../components/Dialog'; import Style from './Reward.less'; interface RewardProps { visible: boolean; onClose: () => void; } function Reward(props: RewardProps) { const { visible, onClose } = props; return ( <Dialog className={Style.reward} visible={visible} title="" onClose={onClose} > <div> <p className={Style.text}> , ~~ <br /> , , </p> <div className={Style.imageContainer}> <img className={Style.image} src={AlipayImage} alt="" /> <img className={Style.image} src={WxpayImage} alt="" /> </div> </div> </Dialog> ); } export default Reward; ```
/content/code_sandbox/packages/web/src/modules/Sidebar/Reward.tsx
xml
2016-02-15T14:47:58
2024-08-14T13:07:55
fiora
yinxin630/fiora
6,485
219
```xml import type { FC } from "react"; export const RuruFooter: FC = () => ( <div style={{ padding: 7 }}> Community-funded OSS {" "} <a title="All our projects are supported by the community, please sponsor ongoing development" href="path_to_url" target="new" > please sponsor </a>{" "} </div> ); ```
/content/code_sandbox/grafast/ruru-components/src/components/Footer.tsx
xml
2016-04-14T21:29:19
2024-08-16T17:12:51
crystal
graphile/crystal
12,539
87
```xml <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <OutputType>Library</OutputType> <IsPackable>false</IsPackable> <TargetFramework>netcoreapp3.1</TargetFramework> </PropertyGroup> <ItemGroup> <Compile Include="FunctionTest.fs" /> </ItemGroup> <ItemGroup> <PackageReference Include="Amazon.Lambda.Core" Version="2.1.0" /> <PackageReference Include="Amazon.Lambda.TestUtilities" Version="2.0.0" /> <PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.5.0" /> <PackageReference Include="xunit" Version="2.3.1" /> <PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" /> <DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" /> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\src\BlueprintBaseName.1\BlueprintBaseName.1.fsproj" /> </ItemGroup> </Project> ```
/content/code_sandbox/Blueprints/BlueprintDefinitions/vs2019/EmptyFunction-FSharp/template/test/BlueprintBaseName.1.Tests/BlueprintBaseName.1.Tests.fsproj
xml
2016-11-11T20:43:34
2024-08-15T16:57:53
aws-lambda-dotnet
aws/aws-lambda-dotnet
1,558
244
```xml import { createContext } from 'react'; export const NumberInputContext = createContext({}); ```
/content/code_sandbox/src/components/composites/NumberInput/Context.ts
xml
2016-04-15T11:37:23
2024-08-14T16:16:44
NativeBase
GeekyAnts/NativeBase
20,132
17