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, { Component } from 'react';
import { connect } from 'react-redux';
import { Trans } from 'react-i18next';
import * as actionCreators from '../../actions/install';
interface ControlsProps {
install: {
step: number;
processingSubmit: boolean;
dns: {
status: string;
};
web: {
status: string;
};
};
nextStep?: (...args: unknown[]) => unknown;
prevStep?: (...args: unknown[]) => unknown;
openDashboard?: (...args: unknown[]) => unknown;
submitting?: boolean;
invalid?: boolean;
pristine?: boolean;
ip?: string;
port?: number;
}
class Controls extends Component<ControlsProps> {
renderPrevButton(step: any) {
switch (step) {
case 2:
case 3:
return (
<button
type="button"
className="btn btn-secondary btn-lg setup__button"
onClick={this.props.prevStep}>
<Trans>back</Trans>
</button>
);
default:
return false;
}
}
renderNextButton(step: any) {
const {
nextStep,
invalid,
pristine,
install,
ip,
port,
} = this.props;
switch (step) {
case 1:
return (
<button type="button" className="btn btn-success btn-lg setup__button" onClick={nextStep}>
<Trans>get_started</Trans>
</button>
);
case 2:
case 3:
return (
<button
type="submit"
className="btn btn-success btn-lg setup__button"
disabled={invalid || pristine || install.processingSubmit}>
<Trans>next</Trans>
</button>
);
case 4:
return (
<button type="button" className="btn btn-success btn-lg setup__button" onClick={nextStep}>
<Trans>next</Trans>
</button>
);
case 5:
return (
<button
type="button"
className="btn btn-success btn-lg setup__button"
onClick={() => this.props.openDashboard(ip, port)}>
<Trans>open_dashboard</Trans>
</button>
);
default:
return false;
}
}
render() {
const { install } = this.props;
return (
<div className="setup__nav">
<div className="btn-list">
{this.renderPrevButton(install.step)}
{this.renderNextButton(install.step)}
</div>
</div>
);
}
}
const mapStateToProps = (state: any) => {
const { install } = state;
return { install };
};
export default connect(mapStateToProps, actionCreators)(Controls);
``` | /content/code_sandbox/client/src/install/Setup/Controls.tsx | xml | 2016-07-06T10:31:47 | 2024-08-16T18:17:06 | AdGuardHome | AdguardTeam/AdGuardHome | 24,082 | 598 |
```xml
// Imports
import { createPinia } from 'pinia'
import { one } from '@vuetify/one'
import { markRaw } from 'vue'
// Types
import type { App } from 'vue'
import type { Router } from 'vue-router'
export const pinia = createPinia()
export function installPinia (app: App, router: Router) {
pinia.use(({ store }) => {
store.router = markRaw(router)
})
pinia.use(
one(
['docs', 'home'],
import.meta.env.VITE_API_SERVER_URL,
)
)
app.use(pinia)
}
``` | /content/code_sandbox/packages/docs/src/plugins/pinia.ts | xml | 2016-09-12T00:39:35 | 2024-08-16T20:06:39 | vuetify | vuetifyjs/vuetify | 39,539 | 137 |
```xml
import { List, Image } from '@fluentui/react-northstar';
import * as React from 'react';
const avatars = {
robert:
'/9j/4AAQSkZJRgABAQAAAQABAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAHZpZXcAAAAAABOk/gAUXy4AEM8UAAPtzAAEEwsAA1yeAAAAAVhZWiAAAAAAAEwJVgBQAAAAVx/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+your_sha256_hashyour_sha256_hash8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+your_sha256_hashgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/your_sha256_hashLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/your_sha256_hashjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+your_sha256_hashJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/your_sha256_hash3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/your_sha256_hashyour_sha256_hashX2hfgF+Yn7CfyNyour_sha512_hash/yMY4zKjTGNmI3/your_sha256_hashmEyYuJkkmZCZyour_sha512_hashCoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFqyour_sha512_hashhL7/v3q/9cBwwOzBZ8Hjwlyour_sha512_hashyour_sha512_hashNj4+vkc+T85YTmDeaW5xyour_sha512_hash+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t////your_sha256_hashDAwMDAwODg4ODhAQEBAQEBAQEBD/your_sha256_hashEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAyADIDAREAAhEBAxEB/8QAHQAAAgICAwEAAAAAAAAAAAAABwgABgEDBAUJAv/your_sha256_hashxgRUXJENFY3JzkcHy/8QAHAEAAgIDAQEAAAAAAAAAAAAAAAcGCAIDBAEF/your_sha256_hashcEVI0NygrLR8DQ2kqGz4fLC/your_sha256_hashtDt3rI1VodqdT5Y+tZNmuT82iXbNCrM9VIxJ+your_sha256_hashS0SsmWQByIWes5zifkO4CFg9a826qt8juwp842WL0uOkHl/your_sha256_hashyour_sha256_hashDe04koV+GuK2T8i7JzK5d3aQad/your_sha256_hash44Zur0D6TXXMNq80xEtJSfRR94eRhZ+j/your_sha256_hash3jgpQ/your_sha256_hash05IdbiJGvbnOqSpLa0p4uJUQVJ72moOMdKpKWLpdaUkODbRXE+your_sha512_hash+sSXCZ1p0euih70GnkYtToy6SypHA+your_sha256_hashyour_sha256_hashbFHbCW0lxHbErlJcUdUA7BwxcTRlt1NoBVcCk17s/OKwaaLYcskpAxC0lNetvI/your_sha256_hashH0PLfW4o5qJPjEsljLtSrbSU0CUpA4ZfswGOh9Trfo2ZmfNEtVttul06tQYjSY+vUl9hL7UhTYPJCnkrKR5A6cMV21mAB5int/8An5w49ESS0sn2fnDPYS8T+JggiYIIVP2js9hrJi3aM8oD9JV1CynXQ7IsN5ajr9m8ccNLV20VWg4rg3+ZQiHaTOUYSnioeRglZa3XmpmH0c8uTVbnp1sXnPhhxT1YgsyEVWCx7mK8pUoLQ2+pkoWvh39QQRh8SNpzlomYas/your_sha256_hashyour_sha256_hashNhSDDkym+p5dy9S6kU5y1cTROWHOPARxSbdm2xaj6JEck02Lyour_sha512_hash/qooeNDDB0YcAU4g5mh8Kgw8mEhDAiYIImCCAfm7kZ+u3MKlV/MxaYeX1iMPvw6I25ulVuUsB6Q7IKeDEcJbS2BqXFgK8IVic2NbJkJYsyuMy+oJveq2K3UgdZVTU+qMM6RG5yQVNPhTmDaMhx/1/your_sha256_hashnUzC0qUso2a+rfqanOtYrBrnnuVXKN3SkpDh+BuYjwj4jZoVjKVk12iUyPVXZSkxnIsqSuKEND3i3kFtC1KUjaBt4eLniVaxtFUW/JMMFzkyh29epewKSlWFR2GPjanJiYRazwbTVBaN9Xqp5ybtcDnilI3+your_sha256_hashq31olHLLnUFaUEoSsHnoKFEJzwUBTDI3TSsW2XZVHxMMm6TmDka/uu/your_sha256_hash3k8I8JAFTlA+your_sha256_hashyz5wtvA15qsD+vwheaaWFL2/ZKy107ILjfWwFVtn2VgYbrwB4xmr0+sXfdT9IozPahA/ZisHRhsA99a1ngAVfn6YztSYvzBxwTgPn/eObV5ZzNl6PtuuYLmPrVdYg4Np+Cce9Rhl7CvBu27Wo1sVxK5DtLjNxHKiwNyXOr4BXVnRQ0HDFXdJtWk1Nzj03Juo+your_sha256_hash6HCBn5CZknyxMtltxOaVeY3EHcoVETFh9t5AW2oKSd4jfjgjfFdzB+iknx+Jr5rl4v3v3PXDP1afzEzsbK9rPZyour_sha512_hashhP6j8R/your_sha512_hash+7/ANfKL/8A4xW+GBH/2Q==',
celeste:
'/9j/4AAQSkZJRgABAQAAAQABAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAHZpZXcAAAAAABOk/gAUXy4AEM8UAAPtzAAEEwsAA1yeAAAAAVhZWiAAAAAAAEwJVgBQAAAAVx/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+your_sha256_hashyour_sha256_hash8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+your_sha256_hashgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/your_sha256_hashLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/your_sha256_hashjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+your_sha256_hashJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/your_sha256_hash3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/your_sha256_hashyour_sha256_hashX2hfgF+Yn7CfyNyour_sha512_hash/yMY4zKjTGNmI3/your_sha256_hashmEyYuJkkmZCZyour_sha512_hashCoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFqyour_sha512_hashhL7/v3q/9cBwwOzBZ8Hjwlyour_sha512_hashyour_sha512_hashNj4+vkc+T85YTmDeaW5xyour_sha512_hash+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t////your_sha256_hashDAwMDAwODg4ODhAQEBAQEBAQEBD/your_sha256_hashEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAyADIDAREAAhEBAxEB/8QAHAAAAgMAAwEAAAAAAAAAAAAAAAgGBwkBAwUE/your_sha256_hashxglNThUV2FiY3Wi/8QAHAEBAAEFAQEAAAAAAAAAAAAAAAcBAgQGCAUD/your_sha256_hashpLC8P/your_sha256_hashtAqWtQSo+gABJIGCqBdKtmfxVNJoCnGsmZDvbwpJDcqdIh1jSx6Hp/your_sha256_hasha6hZZ1a0/your_sha256_hashsm3GauGcXVQ0X05PuYdxZtJBKkwXG3Ibr2w9G1OoKvgDv6YqF9Yzqqc4VPDhpc+your_sha256_hashzdQbF7hzzlG2h5N7+ll7UFKHi5KcPM/Cfw0XOm7umkzJNVTUZSRFmQWWos+G+QeWSzMVu71knvutSgryUFJ3GI+pccxTvQkY973/wAurrj0yjj/AIWWZNHBHH4yGj1JA/KpzgPoMy6Rv6p8NebJabB7JtpFvqCxaPzEupumigSGdiQEuLZQpSQTyLKk+your_sha256_hashyour_sha256_hashWFWyzxU0kkADpGtLmg6gka7c6XsOSlo0n9pTd6fTaizk/QH0xberYbaQJ7bbCWIyWnSSW1IcTzPBQKVN/JTse+JD6wpHHCqiOUxiFsTszntJIs3RwtoNbWt/EufemaqkZXsfklNQ6UZAx4DBc3IdfV3N77t+Vc3E7URb/LTNe8t5hKkvxxcV0ptqZWPuraLbzbK+YObhCkbLTygH47Y56+jcr+1qY2Suikkawt8BIcGZi/xEZQRcaXuRtdTH9RpIYxBLLAJ42FwIL8uUvyhpyjU7HggcqB6dsV354a/MWVKUUpmMop5qWHX5X6rbUqSWHXntyU9UdTv5KPye2OjcZpY+5PkmIfK1tg82Dt/QKKOmsSqHYrHFTNMUD33fE27o/your_sha256_hashyour_sha256_hash4VDFVQVNuzid4JDG0ZmkG+YN8N3Ft7ai5Ch1jRZBg1qpVJcKm2C9gzGRHWhW58y6t1KeVIHnsd8a107jHXs+your_sha256_hash82U0irzBTPWcWK6ic2uKxJksx1vtKZ5VLbS6pJWApPfbfbtj3+roC2eJ5G7D+D+62/6eTA0U0YOoeHfLbf6q5lQ5QZEnpKLJ8nwN2z+your_sha256_hashyour_sha256_hashyUp5Ef0x7OEVoo6tsrhduocP6Tv8brxcfwc4hh8lO0gPNiwnbO3a/oDqL8XupRM4kNOlV63nc4pfaUk7xmWXjJUPu9MNpO5+BOJaOPYS1ucSA+wDr/your_sha512_hash+W/m+5PH2H63U39L9LNwhjnOfnleAHW0YAOGjnyour_sha512_hash/OFlZ2bVqfrRqQnR7SDOeqYQhx/LNY/your_sha256_hashddWo9yVKJOL1mr58FVGCIwRGCIwRa+eIH+5/nvz+tp/d/wBiz739vxxaN1hx+ZZB4uWYjBEYIjBEYIjBF//Z',
cecil:
'/9j/4AAQSkZJRgABAQAAAQABAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAHZpZXcAAAAAABOk/gAUXy4AEM8UAAPtzAAEEwsAA1yeAAAAAVhZWiAAAAAAAEwJVgBQAAAAVx/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+your_sha256_hashyour_sha256_hash8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+your_sha256_hashgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/your_sha256_hashLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/your_sha256_hashjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+your_sha256_hashJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/your_sha256_hash3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/your_sha256_hashyour_sha256_hashX2hfgF+Yn7CfyNyour_sha512_hash/yMY4zKjTGNmI3/your_sha256_hashmEyYuJkkmZCZyour_sha512_hashCoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFqyour_sha512_hashhL7/v3q/9cBwwOzBZ8Hjwlyour_sha512_hashyour_sha512_hashNj4+vkc+T85YTmDeaW5xyour_sha512_hash+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t////your_sha256_hashDAwMDAwODg4ODhAQEBAQEBAQEBD/your_sha256_hashEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAyADIDAREAAhEBAxEB/8QAHQAAAQUAAwEAAAAAAAAAAAAAAAUGBwgJAQIDBP/your_sha256_hashjFSM4Q1NxgYORscHw/8QAHAEAAgIDAQEAAAAAAAAAAAAAAAYFBwIECAED/your_sha256_hashlKxwWKCkdEk4eL/2gAMAwEAAhEDEQA/your_sha512_hash/ekBKTdUtWl5zyO/your_sha256_hashkjiBIQR0JpO027x9r5Pzgz9Rdwz9Jek9VMzWmyCaVlSt22fVopCdZSDLu+your_sha256_hash9YwMMYGG4N+your_sha256_hash9/UGTmPe1UqM2oSnKgy89T6YL5tQqfGcTkgjHbDdsXU+Q80FMa+kbjFYopcu3Dz1d3IDqmS1fMtXfadAK0mWZcIMG5TrLUnXPEU4ec+your_sha256_hashTpyqYqFDVlMWkqcqHcWnX2KweqQpQrkfyLst+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashzZ1uVaO+your_sha256_hash+MUlPXEqJVLVMvpNCDW3NrB8E+your_sha256_hashyour_sha256_hashacGDTzrzDLcavuyabUSMUBmRuYV1EeUdFUjQFFC7+your_sha256_hash7jmRacLiKrrrUZyS2khV3qqiO1dNPtKvwxpKxSOxVQTFPVLQkgyNp5UayR62/SvpKIdpUqgCZnVOra5nXg12ZPnufIlRP5IuiJhwXtFuek2DeeMWzYwMMYGGZ+ZGbeX+your_sha256_hashyour_sha256_hashyour_sha256_hashiqhM7RG6lhXiWRMmOFrMG5L2B68IL1s0q35TLk153Yr8l+OYugzG2qQqKqiKTnh0X2dV7q8w3RyIfPT0wKEpvvPZ387N0Hj+mMC4hCIdYereJIAFkg0JXmD+m870vKkPi1yzarUyj366tqGzPdpwVSUW+your_sha256_hashyour_sha256_hashyour_sha256_hashPEu0NUUtcOOi2jq8XjOjnqukVeK3JyA/Uqw7zk0bHRgcO55mzZT0+your_sha256_hashEJskeak5k1LVDj8Ukwynj5HSCYobAmxPLhya/HAQwdVum/bbamP08qlQ22wnxDEJLC9qTXbNEQkKOB2m4VUVRF+rC9pb1XTpUpyVny/00XoKZvXqbTT+R/your_sha256_hashSPiuFcyRLWrxTSifHwayMOTJ6uZ8your_sha512_hashzPX0enERcVqZjU3I+4qg5KtK50cYoEeSZH+iqoIE62LClqosvoJCrfhQ9pDpqWtI+kDR5zEQao52kB67kVkfOixn+pN53lMHJuisJjVB50ajMFtNMc0s6tmd6UD6c7V6v3dTzui61zpfx/x/7eOlfRj8Me29rltbI2uH0/uZJxz2ovbuz8Wq3Y/vlR/F5/2O/wABd/y+PyxcTrbDIOMe4PbbOfMeO5tAuBD6Qry6j3bkdF1PUs+T+Z9z54WtLPd3fbFyour_sha512_hashvfwfH56YcXyour_sha512_hashms1v//Z',
alexandro:
'/9j/4AAQSkZJRgABAQAAAQABAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAHZpZXcAAAAAABOk/gAUXy4AEM8UAAPtzAAEEwsAA1yeAAAAAVhZWiAAAAAAAEwJVgBQAAAAVx/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+your_sha256_hashyour_sha256_hash8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+your_sha256_hashgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/your_sha256_hashLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/your_sha256_hashjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+your_sha256_hashJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/your_sha256_hash3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/your_sha256_hashyour_sha256_hashX2hfgF+Yn7CfyNyour_sha512_hash/yMY4zKjTGNmI3/your_sha256_hashmEyYuJkkmZCZyour_sha512_hashCoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFqyour_sha512_hashhL7/v3q/9cBwwOzBZ8Hjwlyour_sha512_hashyour_sha512_hashNj4+vkc+T85YTmDeaW5xyour_sha512_hash+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t////your_sha256_hashDAwMDAwODg4ODhAQEBAQEBAQEBD/your_sha256_hashEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAyADIDAREAAhEBAxEB/8QAHQAAAgICAwEAAAAAAAAAAAAAAAcGCAEDAgQFCf/your_sha256_hashTVGJxcoH/xAAcAQACAgMBAQAAAAAAAAAAAAAABgUHAQIDBAj/your_sha256_hashscHRFSMkQpKywvD/2gAMAwEAAhEDEQA/ALNzJkOnRHp9RkNxIscVckSnzFppoE8kZmqCKe66+AkRnYKoJY7Aak+Qi5URmYKoJJ2A1JhI/your_sha256_hashyour_sha256_hashyour_sha256_hashDHWcIU7T1aU+your_sha512_hash/your_sha256_hashKlpBOU+30kfNW+your_sha256_hashyour_sha256_hasheUZDsnaUkEa3Gh9Yyour_sha512_hashgqaY9LQB575yBq23l+1+e8Ok7RZotBOVRpkd2JAXpPMQl5NtKK4IVMVVOY59SF6tVuuIvOn5ZqMC2xbmfI/ppC9IxOXUTLDW/your_sha256_hashs+Nuh9BHRsalUz5b3+IHpeJB8LG4wUOW5sJWaGUKqxpM99Kkwil1X2/your_sha256_hash8hyy+tyPjFltVNFbwaIIz47p2VPC/fWIIQt6WnTbG3/o25NtLIok6og647IjqLcd2c+your_sha256_hashzqthlOpyixF+your_sha256_hashJm7GzjipkAFlc90zrhMx3EKNjJp57LLBJAU6drU/mb2jy4jg1DNqWmPLVidb736X8okGzjYS70vy5W44vHVX2lmVs8m+9IFfW0ji/oXjzJE/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash6rSK48Twi662IcEwKZ5Z7rhPOeIqfB5GmGu8zLq7N3BfQBeypJvvyjagqcT+QeZVIq2GgG9zpc6kW/GLKiLTYo2y2LLaZUW2xQBTPsKImdVwSTqTeIUknUm5jOsRiDRBBogjg++xGYdlSnAYYYAnX33SQG22wRSIzIsIiIiZVV1sqliAouToANyegjIHSK+3nvTZ181qNO2quJiuxqSycOrPRwcKKj7jnVAUV0QQyour_sha512_hash/lq2Kh3REQlL0/t3XU9SYJJrP6QEojHtMozEW1ub+mvWGfFaOY9BMlU63c2sL7m43J6DWHtsTunL3ish245tNCm1CBJ+your_sha256_hashZbsGYqDptfY2vyvsekMHSrEVBogjBEDbZvOkjbbaKbrpkggAp5UiLCIn/your_sha256_hashnfCMIqJM+XUOQpRgwXcm3I8hf1h2wvAahZiTppyZSCF3b48h+your_sha256_hashp1ZmVApY3bKAMx6m25je1tlcFXlJMuqropffgRSHcL5QVLAD/5rm2PU8lMtPL/your_sha256_hashhoNB0EeKdJlzT/MUN5gGJzRN4r7o7oLMlpWI6Y5xpopzIf2F0UQhX376W6jA6SaOyMh6r+2xiCqcAo5oOVch6r+2xhj/your_sha512_hash/Z766cOfSj3dufe+5+sdeGPpZ7vd5977n6+EIzVhRZMGiCDRBBogg0QQaII/9k=',
adelia:
'/9j/4AAQSkZJRgABAQAAAQABAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAHZpZXcAAAAAABOk/gAUXy4AEM8UAAPtzAAEEwsAA1yeAAAAAVhZWiAAAAAAAEwJVgBQAAAAVx/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+your_sha256_hashyour_sha256_hash8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+your_sha256_hashgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/your_sha256_hashLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/your_sha256_hashjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+your_sha256_hashJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/your_sha256_hash3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/your_sha256_hashyour_sha256_hashX2hfgF+Yn7CfyNyour_sha512_hash/yMY4zKjTGNmI3/your_sha256_hashmEyYuJkkmZCZyour_sha512_hashCoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFqyour_sha512_hashhL7/v3q/9cBwwOzBZ8Hjwlyour_sha512_hashyour_sha512_hashNj4+vkc+T85YTmDeaW5xyour_sha512_hash+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t////your_sha256_hashDAwMDAwODg4ODhAQEBAQEBAQEBD/your_sha256_hashEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAyADIDAREAAhEBAxEB/8QAHgAAAgEEAwEAAAAAAAAAAAAAAAcIAgQGCQEFCgP/your_sha256_hashFyMzOGGBobGz0dT/xAAcAQABBAMBAAAAAAAAAAAAAAAAAQIGBwMFCAT/your_sha256_hashcrLB0+H/2gAMAwEAAhEDEQA/AExVkLldBIAJJ0ABJPwAoSxKX984uRGbozYcRgPXy4SFKYTGbjyA+Xh2DLQQVO/xTtBrSXG1GMMME9wrC2ZudXrtx1zgBgtgtdiHnBy65q1f4tZBYF+z5tiE20ORJKYl3U7HkRwypxvehO2QhO10jxBCj4k/your_sha256_hashSVDUfcevUeVSFrg4SDIKq6rSfTeWPBa5pgg8CvpTliRQhFCFUjotJPbUa/nShIdFKX1fHCrHMVxO+your_sha512_hash+your_sha256_hashjcROELUhcqBjF622Z9wkrVAnR0yo5UfNXKUncR3PWp1sZ+KifIrn/fuiGXtN0ZuZ/U5feFcVvlW6KEIoQggkbQdpPQKPYa+ZoThqpryuD+A2TBH3WX7TCsUSClu53K4yFp9icWsPvTYcoPobadkLVuVzCE7whaeo2mo6lw+pUc5wOIldj21hQtrelSpuHhsaBMzwzMzzM/8AF39+wnBJ+X2+your_sha256_hashyour_sha256_hashYuFRvAEHvKpv0k2bWOt6s+sQ5vbD+your_sha256_hash+YOhHUVFd4bcOoB8kEZZZZHz+yt70cbSfRvzSgFrhizAdDm6GDII1BHH5LPcBhTLHi+your_sha256_hashyour_sha256_hashJUdyjqde5JJq4gANFxO+o55lxlU05YkUIXKUqUdEAknsBQgkDVWdyvFnsrfMvE+PBT5891KVdPs67v6ViqVWM9ogL2W1ncXBijTc/your_sha256_hashtDAzMyFbm5mw7uzvfGuAGDCRrnJ6ad1NTLMRn8QsQv+GWt1DMi7W+your_sha512_hash/aqy6V/QqZB0HkclzBe7t7RtpJp4mj4mesO3tDssrKVBIUfkq6pUOoI+IPY1sFF5zVNCVK3jNervDEWJb5r0RlbhQ8hhwt7/ANVu6lOh7mo/your_sha512_hash/3TSmLbS/your_sha256_hashyour_sha256_hash2yrW7pONRgLwMnaO7jX5ypD7kfD6nN7/V+FTWVzrgd9cPzSe42+8Rfx1f4RUZ2tqOv+Fdu6H7MdD/AGKWNaBTtTl9Txyour_sha512_hashAI6nn4XNn+1f/9k=',
joel: '/9j/4AAQSkZJRgABAQAAAQABAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAHZpZXcAAAAAABOk/gAUXy4AEM8UAAPtzAAEEwsAA1yeAAAAAVhZWiAAAAAAAEwJVgBQAAAAVx/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+your_sha256_hashyour_sha256_hash8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+your_sha256_hashgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/your_sha256_hashLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/your_sha256_hashjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+your_sha256_hashJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/your_sha256_hash3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/your_sha256_hashyour_sha256_hashX2hfgF+Yn7CfyNyour_sha512_hash/yMY4zKjTGNmI3/your_sha256_hashmEyYuJkkmZCZyour_sha512_hashCoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFqyour_sha512_hashhL7/v3q/9cBwwOzBZ8Hjwlyour_sha512_hashyour_sha512_hashNj4+vkc+T85YTmDeaW5xyour_sha512_hash+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t////your_sha256_hashDAwMDAwODg4ODhAQEBAQEBAQEBD/your_sha256_hashEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAyADIDAREAAhEBAxEB/8QAGwAAAwEBAQEBAAAAAAAAAAAAAAcIBgUDAQn/your_sha256_hashFjZRUmJ0kcH/xAAbAQABBQEBAAAAAAAAAAAAAAAAAQMEBQYCB//your_sha256_hash/2gAMAwEAAhEDEQA/AKl1LVOgAkhIGSTgAdSSfYDQhLy+eIPZyour_sha512_hash/C2mUvnYCj7Ba06SUppuCb60LaWULGFDBx+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashcrRJJDauX7ow6FX1mxmql10mEaEI0IS83N4cXeJa8bBoLtx/u5AtWVOrksoY8y/Oz5Vjy7SCttISUlXiqOcJPwnOm3mFKtxmU75W01St/ei26fa9IZpFjyW5Dr0K37coDNLjogIbKGak/JbXLK5KnCG/your_sha256_hashyour_sha256_hash78ou9e1Ptz9mbcXrTZdNoE6IhpMBuUKOh56KG2MBg+NGWtKVJSFkqUnJzpGHNQ6/In9p9VyNCEaEJGcZVQu61NnGd1LCluwrgsCqw6rDfYJSpMaVmFJ5iPu/OIznppynWdSPE2JgjMTqIOvodkoptqfK6YkHIxymRmqmqW+your_sha256_hashiPRbjBLawuLj4d5VNJp0cBIn+WpA7we+Wa8tlNyt3Ylq168OIG16PtladDYdkeIX3m3gG/your_sha256_hashyour_sha256_hashgNhwmXTzDYRtHrK8/qseC5xdLSBDY5SNTO/FlltCqDSqIjQhGhC5V32lDv2zLhsmptrXAr9PlU2YpCc+GmQ2Upc/QvlX+your_sha256_hashyour_sha256_hashIKSCffXAGaUkxlqo34euDVrYrcxjc+your_sha256_hashmvz6TFhQaY+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashbtsPpURkJPU+your_sha256_hashgH7rzuvTDSI3Ws1WKMlnut9s03v9VX37fTHtrQYZ+W7z7Kfbcp8qed6vtCi/48j8/pU6v6WhW1wTkf5H2S508tIjQhbXaH+MFdvqcnv37o7f8AdNVNFSYz+n/sPdU1tR9q1Tv9Wa7dvpvfWfxPkb59lgLnQeUyP96z6gr/2Q==',
jenny:
'/9j/4AAQSkZJRgABAQAAAQABAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAHZpZXcAAAAAABOk/gAUXy4AEM8UAAPtzAAEEwsAA1yeAAAAAVhZWiAAAAAAAEwJVgBQAAAAVx/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+your_sha256_hashyour_sha256_hash8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+your_sha256_hashgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/your_sha256_hashLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/your_sha256_hashjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+your_sha256_hashJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/your_sha256_hash3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/your_sha256_hashyour_sha256_hashX2hfgF+Yn7CfyNyour_sha512_hash/yMY4zKjTGNmI3/your_sha256_hashmEyYuJkkmZCZyour_sha512_hashCoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFqyour_sha512_hashhL7/v3q/9cBwwOzBZ8Hjwlyour_sha512_hashyour_sha512_hashNj4+vkc+T85YTmDeaW5xyour_sha512_hash+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t////your_sha256_hashDAwMDAwODg4ODhAQEBAQEBAQEBD/your_sha256_hashEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAyADIDAREAAhEBAxEB/8QAHAAAAgEFAQAAAAAAAAAAAAAAAAcFAQMEBggJ/your_sha256_hashnSh/8QAHAEAAQQDAQAAAAAAAAAAAAAAAAQFBgcBAwgC/your_sha256_hashnLwFMHR/your_sha256_hashOhDegKlgf5dB8VDKzieGJ5bC3vLeK9m/DmfXZdIcO9iOI1tOJ6+b/FzC7YsueUA7F+your_sha256_hashyour_sha256_hashe3rU27cG1PXN5Gv8uGDtCCoenmK76/your_sha256_hash7PdfwpRNWa8OsxXWLe+tExZaghLKtz6k9w0gDcoD3UBtHzVbBjrDTfZdlOqoQ5wc9t26u12/keRPQ6+your_sha256_hashBQuZJIH+zjsCyour_sha512_hashnY49fwuc1t/PLb5LdalioVFCEUIUffbY5c7c6iDDhTbi2krtjF05n5JUgDyc/khS9vtqAop7gUkqmxd2XyNDg3XUX+nP/your_sha256_hashJiGbckblqYCFcxR267G9nVXRQHUiFGniIzAm66GbX1LSIntBAOuvPbN6+dlIZtY/FVJucKdwJsWK3jH57baXZl8muxZ0eQ2opcS+jmISpsHqjl7umuo1rxBBG5t3XW6vrZ45MjALDrc7rGwnF8qxS0SYucXKDdL/cJsq4XR20RnI8Bl19fVljnKU44hO3oteh+tKkmCta2FwYLDMdTzJ3+WyqTtDnlmr4XzPBeIWNytFgxrb5fi65cVP0/qr0UIRQhV7dQdCOxrBAIsdl6a5zXBzSQQbgjcEbELcYN5zm+cP7pi/your_sha256_hashhashZQ8xJ00FNtGyVzw2SwuQBZTfiuqwuGB0uHCQ92wl5k0uR7uh1v+46DYALT9y1nc6res+your_sha512_hash+your_sha256_hashD+your_sha256_hash58mHzRMYBnYRpe/VddvsOxnVMvoKFD2UNNR8j6NSxUCCCNFboWUUIWDf77bcXx+your_sha512_hash+VJfkleqgO6tg6+1NBqpDtYKyouG6Nls2Zx8zYfIJIZJk+S5nensky+your_sha256_hashyour_sha256_hashwuknN3xi/UaH6LqTwweKzLuLGbO8POIkaD+ckw35lnulvYMUrciALdZea3KQdzZKklOnVOnvS+Coc92VyhuMYLHTRd7ETYEAgm+/your_sha512_hashaU035gTBj36CT4fdekNPSqZf/Z',
joe: '/9j/4AAQSkZJRgABAQAAAQABAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAHZpZXcAAAAAABOk/gAUXy4AEM8UAAPtzAAEEwsAA1yeAAAAAVhZWiAAAAAAAEwJVgBQAAAAVx/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+your_sha256_hashyour_sha256_hash8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+your_sha256_hashgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/your_sha256_hashLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/your_sha256_hashjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+your_sha256_hashJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/your_sha256_hash3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/your_sha256_hashyour_sha256_hashX2hfgF+Yn7CfyNyour_sha512_hash/yMY4zKjTGNmI3/your_sha256_hashmEyYuJkkmZCZyour_sha512_hashCoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFqyour_sha512_hashhL7/v3q/9cBwwOzBZ8Hjwlyour_sha512_hashyour_sha512_hashNj4+vkc+T85YTmDeaW5xyour_sha512_hash+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t////your_sha256_hashDAwMDAwODg4ODhAQEBAQEBAQEBD/your_sha256_hashEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAyADIDAREAAhEBAxEB/8QAGwAAAwEAAwEAAAAAAAAAAAAABgcIAAEEBQL/your_sha256_hashFzU3Q1ZjkaH/xAAcAQACAwEBAQEAAAAAAAAAAAAABwUGCAMEAQL/your_sha256_hashwdFSUxQVFiM1cqL/2gAMAwEAAhEDEQA/AG7rBS0wvJu67LfsS2KheN1yTDpFLSlcySlCnFDjWG0JQhPNSlKUAke+your_sha256_hashhqQVwpgaS9U5EdHJAkF7jaRxeZSUJ/Tnlz0dY/your_sha512_hash+your_sha256_hashNhe11T9yqwxZV/QmaLcdRfSxRHYCHVQJhUknulFxSlNO5T4c+your_sha256_hashBIIwR1Hy0ole1xoQtoQol7dV9TqlflJ25bS/your_sha512_hash/in1X1snsJt1cNgUe8LrgPVOoVZDjyour_sha512_hashor1dBD/SFOnaM2ip22lUpldtAOwaTWC423H41qVAnsAODuVk8YQpPiTk5SQQDqWlI/SAh+NPmOajZiF0ZBbh9irX2GvmVuPtBbV2T2nWpbscw5i3194p9+your_sha256_hashRgT76I81VVNLaEKCe1RaDsrtOqpzipERi6W6YtmfJT3jeVtdy4Y/MZbbUgDhz4VZ1q70fzQfYTBgTDc9pAzzqNrvGueookteSARaJrXrAZ/your_sha256_hashyour_sha256_hashyour_sha256_hashF5o0EuZicsUfdjWkP0rs/UV+your_sha256_hashyour_sha256_hashyour_sha256_hashSZyEHQ/WM3eeVQfguj2Z72u+your_sha256_hasha4ZEefhqlpDc+rmxBsuacQh6feN9U27za1d3Ri06otr4nU97ETEQFp4sKWhtTfDj/GTkHl11924XBSjLNnHw+your_sha256_hashLXvDL2TLuiHGMR/your_sha256_hashMdAbQCo8yQlIyffWW48Z8aK6I81c4lx8XGp+your_sha256_hashyour_sha256_hashpeF1mcuPnPw6WmEEj5cYB/7xp+your_sha256_hashqzeKx4VoyvRudsuadprs6aEHUhw+dFysibnpm0WhjTFiROrs5YZ14Na3Mnx1K4pnaO22nkiaJtMPsXmEvJP7sqJ/8ANJiPcu0Wbmw/wND/AND7p5xbrT7N3Zd4Gn1C9z+c21n+xNeXj9GR0+Xp+b6aiv6YtT9kyour_sha512_hash+your_sha256_hashYbB6d4k8snJWke51oKxrNlrPb0cJtK5uO8483fbJcr/3WEKQhzEuCeir0mpLXds/6HPg0nQI0bt+PR3JtQut5MKj0o5kS3spQ77pSPc590jmT4RqzueAKpCSstFmYzYMFpe9261uZ/A4uOA1SE3b3Tl7iVREeGlUWhQCRToRwCo+UvOgcuMjkB0SnkPcmLc8vNdNPyVrm5904djwC59HTDx13aAfoZ3Rqe0cToAAa+your_sha256_hashH6HlPp/r+f010i5tz9/nPglXcr18x7JmfZt7Ptdz7pVaE1ltCFtCF/9k=',
justen:
'/9j/4AAQSkZJRgABAQAAAQABAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAHZpZXcAAAAAABOk/gAUXy4AEM8UAAPtzAAEEwsAA1yeAAAAAVhZWiAAAAAAAEwJVgBQAAAAVx/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+your_sha256_hashyour_sha256_hash8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+your_sha256_hashgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/your_sha256_hashLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/your_sha256_hashjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+your_sha256_hashJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/your_sha256_hash3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/your_sha256_hashyour_sha256_hashX2hfgF+Yn7CfyNyour_sha512_hash/yMY4zKjTGNmI3/your_sha256_hashmEyYuJkkmZCZyour_sha512_hashCoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFqyour_sha512_hashhL7/v3q/9cBwwOzBZ8Hjwlyour_sha512_hashyour_sha512_hashNj4+vkc+T85YTmDeaW5xyour_sha512_hash+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t////your_sha256_hashDAwMDAwODg4ODhAQEBAQEBAQEBD/your_sha256_hashEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAyADIDAREAAhEBAxEB/8QAHQAAAgICAwEAAAAAAAAAAAAAAAgGCQQHAgMFCv/your_sha256_hash0NTY3gYKEkZSh8P/EABsBAQACAwEBAAAAAAAAAAAAAAAEBQIDBgEH/your_sha256_hashvyour_sha512_hash/anY+KZRf/QHvz9lXo/11Z+kaqM6gVkE8wNWuT6zKmdsuzgIG7CQ1GP2t8Uiofa/eXTJskHyBKiom/your_sha256_hash7ONlGXKt9skRXGSEeKEq7o37noibbjhRkurk4cv5+/your_sha256_hashhlORMbRCWHJYknLJR5eENxhw1D+ILi+4dM1rHNPr+30XQYOaMfFlNWW24Dvt9F6uSOpPpPyVqNV9N2lTosT3JCVUWRTwEegFO+EW3rBF7j7hF4N3YwQvzbem0ZbC/TdlfPshuTPcspJPPc/IcgPC6NS+o/o5zbne00D1gmsPzoj510+your_sha256_hashL6txike3V2XauDCqbNeO8uPeupMjuKoe6pdhjYlTwq+U8Y18Rl1RtHc37LvMriH+Vhxvqi47jy3Y/your_sha256_hashkJKH44uuFRsfI4Em69+4KtuHwNm/MYTuWn4+your_sha256_hashyour_sha256_hashf3UFA9cZFsmoFobp63zW2EgxtrsFN+your_sha256_hashyour_sha256_hashOMSG0LxyacFCT6+U/HG+CZ0Lw8cwpGPO6GQPHRKJTRc11N/NgUjxR7WtJ2NJ7ewG4jDnbNEEt90JRRVH6Yn8f/your_sha256_hashN4ocl1wkI9uPjlt+KIn+your_sha512_hash+5jMogoqAiFzXkqqpL/hiBn5Jlfp/your_sha256_hash12_hash+RmOheAB070Vh5c0nyVS2sW1zTOKbEjOg/LcsTbjQgEV3U3yVURRRfXkW31xLnlLYjpptDatq9Og+your_sha256_hashgiXfrW6sI/Sxp/Ak00Nm0zrmk3o+Vq6VusZkI4ir86SIqhE21zERBFTmZInpyXBFT9qdq7qlrTcOXuq+aZ+ZZLhKYsy3lGGzv54sRG+LDQp+CCGMgF6pJor1MawdPsSZUaaWMVmosH/your_sha512_hash+your_sha256_hashlLpPh0VfaG5/i54ptJOoG4LMdFfvNVtNmyag/tGsmPKgMDKeFE70dw14KR++Cki8lHdMYkLxWgyour_sha512_hashn+OBXhX0h/8v+hf+/1WNa8X/9k=',
laura:
'/9j/4AAQSkZJRgABAQAAAQABAAD/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAAAGKZAAC3hQAAGNpYWVogAAAAAAAAJKAAAA+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAAAAAHZpZXcAAAAAABOk/gAUXy4AEM8UAAPtzAAEEwsAA1yeAAAAAVhZWiAAAAAAAEwJVgBQAAAAVx/your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashAAwsDFgMhAy0DOANDA08DWgNmA3IDfgOKA5YDogOuA7oDxwPTA+your_sha256_hashyour_sha256_hash8GwAbRBuMG9QcHBxkHKwc9B08HYQd0B4YHmQesB78H0gflB/gICwgfCDIIRghaCG4IggiWCKoIvgjSCOcI+wkQCSUJOglPCWQJeQmPCaQJugnPCeUJ+your_sha256_hashgxDDFwMdQyODKcMwAzZDPMNDQ0mDUANWg10DY4NqQ3DDd4N+A4TDi4OSQ5kDn8Omw62DtIO7g8JDyUPQQ9eD3oPlg+your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashjHMwc9R0eHUcdcB2ZHcMd7B4WHkAeah6UHr4e6R8THz4faR+UH78f6iAVIEEgbCCYIMQg8CEcIUghdSGhIc4h+yInIlUigiKvIt0jCiM4I2YjlCPCI/AkHyRNJHwkqyTaJQklOCVoJZclxyX3JicmVyaHJrcm6CcYJ0kneierJ9woDSg/your_sha256_hashLUEtdi2rLeEuFi5MLoIuty7uLyQvWi+RL8cv/jA1MGwwpDDbMRIxSjGCMbox8jIqMmMymzLUMw0zRjN/M7gz8TQrNGU0njTYNRM1TTWHNcI1/your_sha256_hashjvoPCc8ZTykPOM9Ij1hPaE94D4gPmA+oD7gPyE/YT+iP+your_sha256_hashJGZ0arRvBHNUd7R8BIBUhLSJFI10kdSWNJqUnwSjdKfUrESwxLU0uaS+JMKkxyTLpNAk1KTZNN3E4lTm5Ot08AT0lPk0/your_sha256_hash3V0RXklfgWC9YfVjLWRpZaVm4WgdaVlqmWvVbRVuVW+VcNVyGXNZdJ114XcleGl5sXr1fD19hX7NgBWBXYKpg/GFPYaJh9WJJYpxi8GNDY5dj62RAZJRk6WU9ZZJl52Y9ZpJm6Gc9Z5Nn6Wg/aJZo7GlDaZpp8WpIap9q92tPa6dr/your_sha256_hashyour_sha256_hashX2hfgF+Yn7CfyNyour_sha512_hash/yMY4zKjTGNmI3/your_sha256_hashmEyYuJkkmZCZyour_sha512_hashCoUqjEqTepqaocqo+rAqt1q+msXKzQrUStuK4trqGvFqyour_sha512_hashhL7/v3q/9cBwwOzBZ8Hjwlyour_sha512_hashyour_sha512_hashNj4+vkc+T85YTmDeaW5xyour_sha512_hash+Tj5x/pX+uf7d/wH/Jj9Kf26/kv+3P9t////your_sha256_hashDAwMDAwODg4ODhAQEBAQEBAQEBD/your_sha256_hashEBAQEBAQEBAQEBAQEBAQEBAQEBD/wAARCAAyADIDAREAAhEBAxEB/8QAHAAAAgIDAQEAAAAAAAAAAAAAAAcFBgEDBAgC/8QALhAAAQMEAQMCBAYDAAAAAAAAAQIDBAAFBhESByExE0EUIlFxCDVhc4GxMlJy/8QAHAEAAgIDAQEAAAAAAAAAAAAAAAgGBwEDBAUC/your_sha256_hashzVicnPwU4HR/your_sha256_hashoXc2UC5Mdyour_sha512_hashsO/w76B4RTS1bFJjVE3dUJlyVPgW63HzYi/wiO+2dTL7DwJOTTZYuE8Xf4F2K+your_sha256_hash6crp5bE2mZv4hz5s3T05D0210bWGPjeQ2/KbOzeLcSEObQ8yogqZdToqQrX3BB9wasqjq0qZImJv3G4I7j/your_sha256_hashfD8lhDn/IStf9pFRziBiKOw3ZfvF/8AoXTpM4sV27pImsv1OVb/AJMYo3R3p3i2Y5darVn17Nii3JxDdtt6WJBm3VazpKIxS0ptCCRpTyjxT+pqk8dxWfS0zvTS+YyjqN1yyx5bW5PhRqYd/HMe/CKUkjNM38L/AHfPwo/SPU/UOz9CE2hn8P1yZRj8qawiVj5jWyW+your_sha512_hash+m3Yx586TQLzimR5PguQNKjTbcvjJjHwh+M76SyPqCF7B9xqmx4SrpdQrNLN0dVmKf0+0V56/0smoosPxGXY9Tyr/0OvMH5Mp+your_sha256_hashsVxOjky0p7CVMBu2W5E0HpF/d6dV8m/eL69JWkyamfUo1qpFKLrpypgGdgu7Bh3Ps6aQ+fSS1LMplKkBMNm3MW9kkRWW461LSqOwPlbeXy4KUnXJGk60KVM1+an5PLl62JfL+8JvfM0wkn6/LaL01tYyour_sha512_hashmugzjT/AK7+dI2zUVMyq4cMLXF/N9Li4Nx3G0KjqljWHpy2ZmLS/SyFyIxClMtuJCHRySUKcb1vmG0gct/your_sha256_hashWsy/BlZm2sdb7RSaaOFagoggogjBSFDR9xo/your_sha512_hash+HTQMHwDxZPqJqYfOGZlUmXM3sljlcbkDs2/your_sha256_hashyqedlky0RieWtjkFiwUfExOl+lbkxa3GvFUyjoRVGUt1tLRV6VzNu29ha5A+g73hcSpMmbKenTHC7IkKLj7qvKlK8/b6AU5lLTSqaQkiSuWWgCqo2A+53J3NzCW1E+ZPnNOmnM7klm8k/7oNhpGuumNMFEEFEEapcuNAYVKmOBppPYqPufYADuT+lfSqSbCO6hoaisniRToXc7Dx5J7Ko3Jjd04yZi5ZcoKDcOFHjPLU/your_sha256_hashyour_sha256_hashyour_sha256_hashdb+HWe6tf6Hwr+6aiZKK67QsuP8J1uFDmNaZJ/5F2/vXuv11U+Yk60xDYKIIKIIomWy3JF6cYUoluKEobR7BRG1HX1O69GQtk+your_sha256_hashyour_sha256_hashlyTyd2pDita5FB1v+RXmTVCtYQp/your_sha512_hash/IUfvPf2K8+o9uFp9QP503+OX9jE1XPFdR/9k=',
};
const items = [
{
key: 'robert',
media: <Image src={`data:image/jpeg;base64,${avatars.robert}`} avatar />,
header: 'Robert Tolbert',
headerMedia: '7:26:56 AM',
content: 'Program the sensor to the SAS alarm through the haptic SQL card!',
},
{
key: 'celeste',
media: <Image src={`data:image/jpeg;base64,${avatars.celeste}`} avatar />,
header: 'Celeste Burton',
headerMedia: '11:30:17 PM',
content: 'Use the online FTP application to input the multi-byte application!',
},
{
key: 'cecil',
media: <Image src={`data:image/jpeg;base64,${avatars.cecil}`} avatar />,
header: 'Cecil Folk',
headerMedia: '5:22:40 PM',
content: 'The GB pixel is down, navigate the virtual interface!',
},
{
key: 'nomedia',
content: 'No media, just text here',
},
{
key: 'alexandro',
media: <Image src={`data:image/jpeg;base64,${avatars.alexandro}`} avatar />,
header: 'Alexandro Gorczany',
headerMedia: '10:00:07 AM',
content: 'If we compress the alarm, we can get to the CSS card through the solid state CSS transmitter!',
},
{
key: 'adelia',
media: <Image src={`data:image/jpeg;base64,${avatars.adelia}`} avatar />,
header: 'Adelia Kirlin',
headerMedia: '5:20:30 PM',
content: 'Use the 1080p SDD sensor, then you can synthesize the primary port!',
},
{
key: 'joel',
media: <Image src={`data:image/jpeg;base64,${avatars.joel}`} avatar />,
header: 'Joel Gutmann',
headerMedia: '11:00:55 PM',
content: "synthesizing the driver won't do anything, we need to parse the bluetooth THX monitor!",
},
{
key: 'vallie',
media: <Image src={`data:image/jpeg;base64,${avatars.jenny}`} avatar />,
header: 'Vallie Cartwright',
headerMedia: '2:22:40 AM',
content:
"I'll reboot the cross-platform SQL port, that should panel the CSS hard drive!! Try to hack the SAS microchip, maybe it will index the virtual firewall!",
},
{
key: 'joe',
media: <Image src={`data:image/jpeg;base64,${avatars.joe}`} avatar />,
header: 'Jude Hermiston',
headerMedia: '1:40:37 PM',
content: 'Use the virtual CSS panel, then you can copy the open-source transmitter!',
},
{
key: 'justen',
media: <Image src={`data:image/jpeg;base64,${avatars.justen}`} avatar />,
header: 'Estefania Emmerich',
headerMedia: '7:12:40 PM',
content: '+1',
},
{
key: 'laura',
media: <Image src={`data:image/jpeg;base64,${avatars.laura}`} avatar />,
header: 'Virgie Beer',
headerMedia: '1:20:17 PM',
content: 'The SDD bandwidth is down, connect the bluetooth alarm so we can compress the EXE port!',
},
];
const ListCommonPerf = () => <List items={items} />;
ListCommonPerf.iterations = 100;
ListCommonPerf.filename = 'ListCommon.perf.tsx';
export default ListCommonPerf;
``` | /content/code_sandbox/packages/fluentui/docs/src/examples/components/List/Performance/ListCommon.perf.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 20,498 |
```xml
import {ParamTypes, UseParam} from "@tsed/platform-params";
/**
* @returns {Function}
* @decorator
* @operation
* @input
*/
export function Err(): Function {
return UseParam({
paramType: ParamTypes.ERR,
dataPath: "$ctx.error",
useValidation: false,
useMapper: false
});
}
``` | /content/code_sandbox/packages/platform/common/src/decorators/params/error.ts | xml | 2016-02-21T18:38:47 | 2024-08-14T21:19:48 | tsed | tsedio/tsed | 2,817 | 80 |
```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>
<parent>
<groupId>io.camunda</groupId>
<artifactId>operate-parent</artifactId>
<version>8.6.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>operate-importer-8_5</artifactId>
<name>Operate Importer 8.5</name>
<dependencies>
<dependency>
<groupId>io.camunda</groupId>
<artifactId>operate-importer-common</artifactId>
</dependency>
<dependency>
<groupId>io.camunda</groupId>
<artifactId>operate-common</artifactId>
</dependency>
<dependency>
<groupId>io.camunda</groupId>
<artifactId>operate-schema</artifactId>
</dependency>
<!-- ZEEBE Record classes and interfaces -->
<dependency>
<groupId>io.camunda</groupId>
<artifactId>zeebe-protocol</artifactId>
</dependency>
<dependency>
<groupId>io.camunda</groupId>
<artifactId>zeebe-protocol-jackson</artifactId>
</dependency>
<!-- SPRING -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<artifactSet>
<includes>
<include>io.camunda:zeebe-protocol</include>
<include>io.camunda:zeebe-protocol-jackson</include>
</includes>
</artifactSet>
<relocations>
<relocation>
<pattern>io.camunda.zeebe.protocol</pattern>
<shadedPattern>io.camunda.zeebe.protocol.v850</shadedPattern>
</relocation>
</relocations>
</configuration>
<executions>
<execution>
<goals>
<goal>shade</goal>
</goals>
<phase>package</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
``` | /content/code_sandbox/operate/importer-8_5/pom.xml | xml | 2016-03-20T03:38:04 | 2024-08-16T19:59:58 | camunda | camunda/camunda | 3,172 | 920 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="path_to_url" xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>frontend</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>frontend</name>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.4.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<spring-cloud.version>Hoxton.RELEASE</spring-cloud.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-trace</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-pubsub</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-logging</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.integration</groupId>
<artifactId>spring-integration-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
``` | /content/code_sandbox/courses/java-microservices/spring-cloud-gcp-guestbook/5b-pubsub/guestbook-frontend/pom.xml | xml | 2016-04-17T21:39:27 | 2024-08-16T17:22:27 | training-data-analyst | GoogleCloudPlatform/training-data-analyst | 7,726 | 804 |
```xml
export type SearchResults = {
[moduleName: string]: object;
};
export type SearchOptions = {
searchPaths: string[];
platform: 'ios' | 'android' | 'web';
silent?: boolean;
};
type AutolinkingModule = typeof import('expo-modules-autolinking/exports');
/**
* Imports the `expo-modules-autolinking` package installed in the project at the given path.
*/
export function importExpoModulesAutolinking(projectRoot: string): AutolinkingModule {
const autolinking = tryRequireExpoModulesAutolinking(projectRoot);
assertAutolinkingCompatibility(autolinking);
return autolinking;
}
function tryRequireExpoModulesAutolinking(projectRoot: string): AutolinkingModule {
let resolvedAutolinkingPath;
const resolveOptions = { paths: [projectRoot] };
try {
resolvedAutolinkingPath = require.resolve('expo-modules-autolinking/exports', resolveOptions);
} catch {}
// Fallback to the older version of expo-modules-autolinking
try {
resolvedAutolinkingPath = require.resolve(
'expo-modules-autolinking/build/autolinking',
resolveOptions
);
} catch {}
if (!resolvedAutolinkingPath) {
throw new Error(
"Cannot find 'expo-modules-autolinking' package in your project, make sure that you have 'expo' package installed"
);
}
return require(resolvedAutolinkingPath);
}
function assertAutolinkingCompatibility(autolinking: AutolinkingModule): void {
if ('resolveSearchPathsAsync' in autolinking && 'findModulesAsync' in autolinking) {
return;
}
throw new Error(
"The 'expo-modules-autolinking' package has been found, but it seems to be incompatible with '@expo/prebuild-config'"
);
}
``` | /content/code_sandbox/packages/@expo/prebuild-config/src/importExpoModulesAutolinking.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 400 |
```xml
import { WebApplication } from '@/Application/WebApplication'
import { ContentType } from '@standardnotes/domain-core'
import {
ComponentManager,
ComponentItem,
SNTag,
SNNote,
Deferred,
SyncServiceInterface,
ItemManagerInterface,
MutatorClientInterface,
PreferenceServiceInterface,
} from '@standardnotes/snjs'
import { NativeFeatureIdentifier, NoteType } from '@standardnotes/features'
import { NoteViewController } from './NoteViewController'
describe('note view controller', () => {
let application: WebApplication
let componentManager: ComponentManager
beforeEach(() => {
application = {
preferences: {
getValue: jest.fn().mockReturnValue(true),
} as unknown as jest.Mocked<PreferenceServiceInterface>,
items: {
streamItems: jest.fn().mockReturnValue(() => {}),
createTemplateItem: jest.fn().mockReturnValue({} as SNNote),
} as unknown as jest.Mocked<ItemManagerInterface>,
mutator: {} as jest.Mocked<MutatorClientInterface>,
sessions: {
isSignedIn: jest.fn().mockReturnValue(true),
},
} as unknown as jest.Mocked<WebApplication>
application.isNativeMobileWeb = jest.fn().mockReturnValue(false)
Object.defineProperty(application, 'sync', { value: {} as jest.Mocked<SyncServiceInterface> })
application.sync.sync = jest.fn().mockReturnValue(Promise.resolve())
componentManager = {} as jest.Mocked<ComponentManager>
Object.defineProperty(application, 'componentManager', { value: componentManager })
})
it('should create notes with plaintext note type', async () => {
application.componentManager.getDefaultEditorIdentifier = jest
.fn()
.mockReturnValue(NativeFeatureIdentifier.TYPES.PlainEditor)
const controller = new NoteViewController(
undefined,
application.items,
application.mutator,
application.sync,
application.sessions,
application.preferences,
application.componentManager,
application.alerts,
application.isNativeMobileWebUseCase,
)
await controller.initialize()
expect(application.items.createTemplateItem).toHaveBeenCalledWith(
ContentType.TYPES.Note,
expect.objectContaining({ noteType: NoteType.Plain }),
expect.anything(),
)
})
it('should create notes with markdown note type', async () => {
application.items.getDisplayableComponents = jest.fn().mockReturnValue([
{
identifier: NativeFeatureIdentifier.TYPES.DeprecatedMarkdownProEditor,
} as ComponentItem,
])
application.componentManager.getDefaultEditorIdentifier = jest
.fn()
.mockReturnValue(NativeFeatureIdentifier.TYPES.DeprecatedMarkdownProEditor)
const controller = new NoteViewController(
undefined,
application.items,
application.mutator,
application.sync,
application.sessions,
application.preferences,
application.componentManager,
application.alerts,
application.isNativeMobileWebUseCase,
)
await controller.initialize()
expect(application.items.createTemplateItem).toHaveBeenCalledWith(
ContentType.TYPES.Note,
expect.objectContaining({ noteType: NoteType.Markdown }),
expect.anything(),
)
})
it('should add tag to note if default tag is set', async () => {
application.componentManager.getDefaultEditorIdentifier = jest
.fn()
.mockReturnValue(NativeFeatureIdentifier.TYPES.PlainEditor)
const tag = {
uuid: 'tag-uuid',
} as jest.Mocked<SNTag>
application.items.findItem = jest.fn().mockReturnValue(tag)
application.mutator.addTagToNote = jest.fn()
const controller = new NoteViewController(
undefined,
application.items,
application.mutator,
application.sync,
application.sessions,
application.preferences,
application.componentManager,
application.alerts,
application.isNativeMobileWebUseCase,
{ tag: tag.uuid },
)
await controller.initialize()
expect(controller['defaultTag']).toEqual(tag)
expect(application.mutator.addTagToNote).toHaveBeenCalledWith(expect.anything(), tag, expect.anything())
})
it('should wait until item finishes saving locally before deiniting', async () => {
const note = {
uuid: 'note-uuid',
} as jest.Mocked<SNNote>
application.items.findItem = jest.fn().mockReturnValue(note)
const controller = new NoteViewController(
note,
application.items,
application.mutator,
application.sync,
application.sessions,
application.preferences,
application.componentManager,
application.alerts,
application.isNativeMobileWebUseCase,
)
await controller.initialize()
const changePromise = Deferred()
application.mutator.changeItem = jest.fn().mockReturnValue(changePromise.promise)
const savePromise = controller.saveAndAwaitLocalPropagation({ isUserModified: true, bypassDebouncer: true })
controller.deinit()
expect(controller.dealloced).toEqual(false)
changePromise.resolve(true)
await changePromise.promise
await savePromise
expect(controller.dealloced).toEqual(true)
})
})
``` | /content/code_sandbox/packages/web/src/javascripts/Components/NoteView/Controller/NoteViewController.spec.ts | xml | 2016-12-05T23:31:33 | 2024-08-16T06:51:19 | app | standardnotes/app | 5,180 | 1,047 |
```xml
import { ThunkAction } from 'redux-thunk';
import { ActionType, PayloadAction } from 'typesafe-actions';
import makeResetableAsyncAction from './makeResetableAsyncAction';
import { IResetableAsyncAction, GetActionCreatorPayload } from './types';
export type IThunkActionWithResetableAsyncAction<
State,
Deps,
T extends IResetableAsyncAction<any, any, any, any>
> = ((
payload: GetActionCreatorPayload<T['request']>
) => ThunkAction<void, State, Deps, ActionType<T>>) &
T;
export default function makeCommunicationThunk<
State,
Deps,
RequestT extends string,
SuccessT extends string,
FailureT extends string,
ResetT extends string
>(
requestType: RequestT,
successType: SuccessT,
failureType: FailureT,
resetType: ResetT
) {
return <
RequestPayload,
SuccessPayload,
FailurePayload,
ResetPayload = undefined
>(
f: (
communicationActionCreators: IResetableAsyncAction<
PayloadAction<RequestT, RequestPayload>,
PayloadAction<SuccessT, SuccessPayload>,
PayloadAction<FailureT, FailurePayload>,
PayloadAction<ResetT, undefined>
>
) => (payload: RequestPayload) => ThunkAction<void, State, Deps, any>
): IThunkActionWithResetableAsyncAction<
State,
Deps,
IResetableAsyncAction<
PayloadAction<RequestT, RequestPayload>,
PayloadAction<SuccessT, SuccessPayload>,
PayloadAction<FailureT, FailurePayload>,
PayloadAction<ResetT, ResetPayload>
>
> => {
const resetableAsyncAction = makeResetableAsyncAction(
requestType,
successType,
failureType,
resetType
)<RequestPayload, SuccessPayload, FailurePayload>();
const res: IThunkActionWithResetableAsyncAction<
State,
Deps,
IResetableAsyncAction<
PayloadAction<RequestT, RequestPayload>,
PayloadAction<SuccessT, SuccessPayload>,
PayloadAction<FailureT, FailurePayload>,
PayloadAction<ResetT, ResetPayload>
>
> = f(resetableAsyncAction as any) as any;
res.request = resetableAsyncAction.request;
res.success = resetableAsyncAction.success;
res.failure = resetableAsyncAction.failure;
res.reset = resetableAsyncAction.reset as any;
return res as any;
};
}
``` | /content/code_sandbox/webapp/client/src/shared/utils/redux/actions/makeCommunicationThunk.ts | xml | 2016-10-19T01:07:26 | 2024-08-14T03:53:55 | modeldb | VertaAI/modeldb | 1,689 | 542 |
```xml
import { Repository } from '../core/repository';
import Chance = require('chance');
import Bluebird = require('bluebird');
export class ConsentRepository extends Repository {
public async auto() {
const response = await this.existingUserFlow();
if (response.screen_key === 'already_finished') {
return response;
}
const dob = new Chance().birthday();
await Bluebird.try(() => this.existingUserFlowIntro()).catch(() => {});
await Bluebird.try(() => this.existingUserFlowTosAndTwoAgeButton()).catch(() => {});
await Bluebird.try(() => this.existingUserFlowDob(dob.getFullYear(), dob.getMonth(), dob.getDay())).catch(() => {});
return true;
}
public existingUserFlowIntro() {
return this.existingUserFlow({
current_screen_key: 'qp_intro',
updates: JSON.stringify({ existing_user_intro_state: '2' }),
});
}
public existingUserFlowDob(year: string | number, month: string | number, day: string | number) {
return this.existingUserFlow({
current_screen_key: 'dob',
day: String(day),
month: String(month),
year: String(year),
});
}
public existingUserFlowTosAndTwoAgeButton() {
return this.existingUserFlow({
current_screen_key: 'tos_and_two_age_button',
updates: JSON.stringify({ age_consent_state: '2', tos_data_policy_consent_state: '2' }),
});
}
public async existingUserFlow(data?: { [x: string]: any }) {
const { body } = await this.client.request.send({
url: '/api/v1/consent/existing_user_flow/',
method: 'POST',
form: this.client.request.sign({
_csrftoken: this.client.state.cookieCsrfToken,
_uid: this.client.state.cookieUserId,
_uuid: this.client.state.uuid,
...data,
}),
});
return body;
}
}
``` | /content/code_sandbox/src/repositories/consent.repository.ts | xml | 2016-06-09T12:14:48 | 2024-08-16T10:07:22 | instagram-private-api | dilame/instagram-private-api | 5,877 | 430 |
```xml
<dict>
<key>CommonPeripheralDSP</key>
<array>
<dict>
<key>DeviceID</key>
<integer>0</integer>
<key>DeviceType</key>
<string>Headphone</string>
</dict>
<dict>
<key>DeviceID</key>
<integer>0</integer>
<key>DeviceType</key>
<string>Microphone</string>
</dict>
</array>
<key>PathMaps</key>
<array>
<dict>
<key>PathMap</key>
<array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<true/>
</dict>
<key>NodeID</key>
<integer>8</integer>
</dict>
<dict>
<key>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>35</integer>
</dict>
<dict>
<key>Boost</key>
<integer>3</integer>
<key>NodeID</key>
<integer>18</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>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>34</integer>
</dict>
<dict>
<key>Boost</key>
<integer>3</integer>
<key>NodeID</key>
<integer>25</integer>
</dict>
</array>
</array>
</array>
<array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>20</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>2</integer>
</dict>
</array>
</array>
<array>
<array>
<dict>
<key>Amp</key>
<dict>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>33</integer>
</dict>
<dict>
<key>Amp</key>
<dict>
<key>Channels</key>
<array>
<dict>
<key>Bind</key>
<integer>1</integer>
<key>Channel</key>
<integer>1</integer>
</dict>
<dict>
<key>Bind</key>
<integer>2</integer>
<key>Channel</key>
<integer>2</integer>
</dict>
</array>
<key>MuteInputAmp</key>
<true/>
<key>PublishMute</key>
<true/>
<key>PublishVolume</key>
<true/>
<key>VolumeInputAmp</key>
<false/>
</dict>
<key>NodeID</key>
<integer>3</integer>
</dict>
</array>
</array>
</array>
</array>
<key>PathMapID</key>
<integer>15</integer>
</dict>
</array>
</dict>
``` | /content/code_sandbox/Resources/ALC289/Platforms15.xml | xml | 2016-03-07T20:45:58 | 2024-08-14T08:57:03 | AppleALC | acidanthera/AppleALC | 3,420 | 1,952 |
```xml
import { useContext, useState } from "react";
import { AppStateContext } from "../state/appStateContext";
import { Modal } from "react-common/components/controls/Modal";
import { hideModal } from "../transforms/hideModal";
import { getChecklistFromFileAsync } from "../transforms/getChecklistFromFileAsync";
import { DragAndDropFileSurface } from "./DragAndDropFileSurface";
import { Strings } from "../constants";
import css from "./styling/ImportChecklistModal.module.scss";
import { replaceActiveChecklistAsync } from "../transforms/replaceActiveChecklistAsync";
export interface IProps {}
export const ImportChecklistModal: React.FC<IProps> = () => {
const { state: teacherTool } = useContext(AppStateContext);
const [errorMessage, setErrorMessage] = useState<string | undefined>(undefined);
function closeModal() {
setErrorMessage(undefined);
hideModal();
}
async function handleFileDroppedAsync(file: File) {
const parsedChecklist = await getChecklistFromFileAsync(file, false /* allow partial */);
if (!parsedChecklist) {
setErrorMessage(Strings.InvalidChecklistFile);
} else {
setErrorMessage(undefined);
closeModal();
replaceActiveChecklistAsync(parsedChecklist);
}
}
return teacherTool.modalOptions?.modal === "import-checklist" ? (
<Modal title={Strings.ImportChecklist} onClose={closeModal} className={css["import-checklist-modal"]}>
<div className={css["import-checklist"]}>
<DragAndDropFileSurface onFileDroppedAsync={handleFileDroppedAsync} errorMessage={errorMessage} />
</div>
</Modal>
) : null;
};
``` | /content/code_sandbox/teachertool/src/components/ImportChecklistModal.tsx | xml | 2016-01-24T19:35:52 | 2024-08-16T16:39:39 | pxt | microsoft/pxt | 2,069 | 357 |
```xml
<!--
~ contributor license agreements. See the NOTICE file distributed with
~ this work for additional information regarding copyright ownership.
~
~ path_to_url
~
~ Unless required by applicable law or agreed to in writing, software
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-->
<dataset update-count="2">
<metadata data-nodes="write_ds.t_order,read_${0..1}.t_order">
<column name="order_id" type="numeric" />
<column name="user_id" type="numeric" />
<column name="status" type="varchar" />
<column name="merchant_id" type="numeric" />
<column name="remark" type="varchar" />
<column name="creation_date" type="datetime" />
</metadata>
<row data-node="write_ds.t_order" values="1, 1, insert, 1, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2, 2, insert2, 2, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1000, 10, init, 1, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1001, 10, init, 2, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1100, 11, init, 3, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1101, 11, init, 4, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1200, 12, init, 5, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1201, 12, init, 6, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1300, 13, init, 7, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1301, 13, init, 8, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1400, 14, init, 9, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1401, 14, init, 10, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1500, 15, init, 11, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1501, 15, init, 12, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1600, 16, init, 13, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1601, 16, init, 14, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1700, 17, init, 15, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1701, 17, init, 16, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1800, 18, init, 17, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1801, 18, init, 18, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1900, 19, init, 19, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="1901, 19, init, 20, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2000, 20, init, 21, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2001, 20, init, 22, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2100, 21, init, 23, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2101, 21, init, 24, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2200, 22, init, 25, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2201, 22, init, 26, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2300, 23, init, 27, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2301, 23, init, 28, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2400, 24, init, 29, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2401, 24, init, 30, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2500, 25, init, 31, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2501, 25, init, 32, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2600, 26, init, 33, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2601, 26, init, 34, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2700, 27, init, 35, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2701, 27, init, 36, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2800, 28, init, 37, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2801, 28, init, 38, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2900, 29, init, 39, test, 2017-08-08" />
<row data-node="write_ds.t_order" values="2901, 29, init, 40, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1000, 10, init_read, 1, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1001, 10, init_read, 2, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1100, 11, init_read, 3, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1101, 11, init_read, 4, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1200, 12, init_read, 5, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1201, 12, init_read, 6, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1300, 13, init_read, 7, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1301, 13, init_read, 8, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1400, 14, init_read, 9, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1401, 14, init_read, 10, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1500, 15, init_read, 11, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1501, 15, init_read, 12, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1600, 16, init_read, 13, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1601, 16, init_read, 14, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1700, 17, init_read, 15, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1701, 17, init_read, 16, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1800, 18, init_read, 17, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1801, 18, init_read, 18, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1900, 19, init_read, 19, test, 2017-08-08" />
<row data-node="read_0.t_order" values="1901, 19, init_read, 20, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2000, 20, init_read, 21, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2001, 20, init_read, 22, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2100, 21, init_read, 23, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2101, 21, init_read, 24, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2200, 22, init_read, 25, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2201, 22, init_read, 26, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2300, 23, init_read, 27, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2301, 23, init_read, 28, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2400, 24, init_read, 29, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2401, 24, init_read, 30, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2500, 25, init_read, 31, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2501, 25, init_read, 32, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2600, 26, init_read, 33, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2601, 26, init_read, 34, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2700, 27, init_read, 35, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2701, 27, init_read, 36, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2800, 28, init_read, 37, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2801, 28, init_read, 38, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2900, 29, init_read, 39, test, 2017-08-08" />
<row data-node="read_0.t_order" values="2901, 29, init_read, 40, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1000, 10, init_read, 1, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1001, 10, init_read, 2, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1100, 11, init_read, 3, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1101, 11, init_read, 4, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1200, 12, init_read, 5, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1201, 12, init_read, 6, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1300, 13, init_read, 7, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1301, 13, init_read, 8, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1400, 14, init_read, 9, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1401, 14, init_read, 10, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1500, 15, init_read, 11, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1501, 15, init_read, 12, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1600, 16, init_read, 13, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1601, 16, init_read, 14, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1700, 17, init_read, 15, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1701, 17, init_read, 16, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1800, 18, init_read, 17, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1801, 18, init_read, 18, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1900, 19, init_read, 19, test, 2017-08-08" />
<row data-node="read_1.t_order" values="1901, 19, init_read, 20, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2000, 20, init_read, 21, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2001, 20, init_read, 22, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2100, 21, init_read, 23, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2101, 21, init_read, 24, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2200, 22, init_read, 25, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2201, 22, init_read, 26, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2300, 23, init_read, 27, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2301, 23, init_read, 28, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2400, 24, init_read, 29, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2401, 24, init_read, 30, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2500, 25, init_read, 31, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2501, 25, init_read, 32, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2600, 26, init_read, 33, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2601, 26, init_read, 34, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2700, 27, init_read, 35, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2701, 27, init_read, 36, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2800, 28, init_read, 37, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2801, 28, init_read, 38, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2900, 29, init_read, 39, test, 2017-08-08" />
<row data-node="read_1.t_order" values="2901, 29, init_read, 40, test, 2017-08-08" />
</dataset>
``` | /content/code_sandbox/test/e2e/sql/src/test/resources/cases/dml/dataset/readwrite_splitting/insert_multiple_values_for_order_1_2.xml | xml | 2016-01-18T12:49:26 | 2024-08-16T15:48:11 | shardingsphere | apache/shardingsphere | 19,707 | 4,612 |
```xml
<vector android:height="24dp" android:tint="@android:color/white"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="path_to_url">
<path android:fillColor="@android:color/white" android:pathData="M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"/>
</vector>
``` | /content/code_sandbox/app/src/main/res/drawable-night/ic_photo_24.xml | xml | 2016-02-01T23:48:36 | 2024-08-15T03:35:42 | TagMo | HiddenRamblings/TagMo | 2,976 | 188 |
```xml
import { Component } from '@angular/core';
import { FieldBaseComponent } from '../field-base';
@Component({
selector: 'app-form-file',
styleUrls: ['form-file.component.scss'],
templateUrl: 'form-file.component.html',
})
export class FormFileComponent extends FieldBaseComponent {}
``` | /content/code_sandbox/src/Presentation/Web/ClientApp/src/app/shared/components/forms/components/form-file/form-file.component.ts | xml | 2016-06-03T17:49:56 | 2024-08-14T02:53:24 | AspNetCoreSpa | fullstackproltd/AspNetCoreSpa | 1,472 | 60 |
```xml
export * from './components/MicroFeedback/index';
``` | /content/code_sandbox/packages/react-experiments/src/MicroFeedback.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 11 |
```xml
import clsx from 'clsx';
import { ReactNode } from 'react';
import { Link } from '@@/Link';
import { TooltipWithChildren } from '@@/Tip/TooltipWithChildren';
import { EdgeStack, StatusType } from '../../types';
export function DeploymentCounterLink({
count,
total,
type,
stackId,
}: {
count: number;
total: number;
type: StatusType;
stackId: EdgeStack['Id'];
}) {
return (
<div className="w-full text-center">
<Link
className="hover:no-underline"
to="edge.stacks.edit"
params={{ stackId, tab: 1, status: type }}
data-cy="deployment-counter-link"
>
<DeploymentCounter count={count} type={type} total={total} />
</Link>
</div>
);
}
export function DeploymentCounter({
count,
total,
type,
}: {
count: number;
total: number;
type: StatusType;
}) {
return (
<TooltipWithChildren message={getTooltip(count, total, type)}>
<div className="h-2 w-full overflow-hidden rounded-lg">
<progress
aria-label={`${getLabel(type)}`}
className={clsx('bg-gray-4 w-full', {
'progress-filled:bg-success-7': type === StatusType.Running,
'progress-filled:bg-error-7': type === StatusType.Error,
'progress-filled:bg-blue-9': type === StatusType.Acknowledged,
'progress-filled:bg-yellow-7': type === StatusType.ImagesPulled,
})}
max={total}
value={total ? count : 0}
/>
</div>
</TooltipWithChildren>
);
}
function getTooltip(count: number, total: number, type: StatusType) {
const label = getLabel(type);
return `${count} of ${total} ${label}`;
}
function getLabel(type: StatusType): ReactNode {
switch (type) {
case StatusType.Running:
return 'deployments running';
case StatusType.Completed:
return 'deployments completed';
case StatusType.DeploymentReceived:
return 'deployments received';
case StatusType.Error:
return 'deployments failed';
case StatusType.Acknowledged:
return 'deployments acknowledged';
case StatusType.ImagesPulled:
return 'images pre-pulled';
default:
return '';
}
}
``` | /content/code_sandbox/app/react/edge/edge-stacks/ListView/EdgeStacksDatatable/DeploymentCounter.tsx | xml | 2016-05-19T20:15:28 | 2024-08-16T19:15:14 | portainer | portainer/portainer | 30,083 | 534 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "path_to_url">
<mapper namespace="org.dromara.maxkey.persistence.mapper.AppsFormBasedDetailsMapper">
<select id="getAppDetails" parameterType="string" resultType="AppsFormBasedDetails">
select
*
from
mxk_apps_form_based_details fbd,
mxk_apps app
where app.instId = fbd.instId
and app.id = #{value}
and fbd.id = #{value}
and fbd.id = app.id
</select>
</mapper>
``` | /content/code_sandbox/maxkey-persistence/src/main/resources/org/dromara/maxkey/persistence/mapper/xml/mysql/AppsFormBasedDetailsMapper.xml | xml | 2016-11-16T03:06:50 | 2024-08-16T09:22:42 | MaxKey | dromara/MaxKey | 1,423 | 155 |
```xml
import * as Path from 'path'
import * as FSE from 'fs-extra'
import { mkdirSync } from './temp'
import klawSync, { Item } from 'klaw-sync'
import { Repository } from '../../src/models/repository'
import { GitProcess } from 'dugite'
import { makeCommit, switchTo } from './repository-scaffolding'
import { writeFile } from 'fs-extra'
import { git } from '../../src/lib/git'
/**
* Set up the named fixture repository to be used in a test.
*
* @returns The path to the set up fixture repository.
*/
export async function setupFixtureRepository(
repositoryName: string
): Promise<string> {
const testRepoFixturePath = Path.join(
__dirname,
'..',
'fixtures',
repositoryName
)
const testRepoPath = mkdirSync('desktop-git-test-')
await FSE.copy(testRepoFixturePath, testRepoPath)
await FSE.rename(
Path.join(testRepoPath, '_git'),
Path.join(testRepoPath, '.git')
)
const ignoreHiddenFiles = function (item: Item) {
const basename = Path.basename(item.path)
return basename === '.' || basename[0] !== '.'
}
const entries = klawSync(testRepoPath)
const visiblePaths = entries.filter(ignoreHiddenFiles)
const submodules = visiblePaths.filter(
entry => Path.basename(entry.path) === '_git'
)
for (const submodule of submodules) {
const directory = Path.dirname(submodule.path)
const newPath = Path.join(directory, '.git')
await FSE.rename(submodule.path, newPath)
}
return testRepoPath
}
/**
* Initializes a new, empty, git repository at in a temporary location.
*
* @returns the new local repository
*/
export async function setupEmptyRepository(): Promise<Repository> {
const repoPath = mkdirSync('desktop-empty-repo-')
await GitProcess.exec(['init'], repoPath)
return new Repository(repoPath, -1, null, false)
}
/**
* Initializes a new, empty, git repository at in a temporary location with
* default branch of main.
*
* @returns the new local repository
*/
export async function setupEmptyRepositoryDefaultMain(): Promise<Repository> {
const repoPath = mkdirSync('desktop-empty-repo-')
await GitProcess.exec(['init', '-b', 'main'], repoPath)
return new Repository(repoPath, -1, null, false)
}
/**
* Initialize a new, empty folder that is incorrectly associated with a Git
* repository. This should only be used to test error handling of the Git
* interactions.
*/
export function setupEmptyDirectory(): Repository {
const repoPath = mkdirSync('no-repository-here')
return new Repository(repoPath, -1, null, false)
}
/**
* Setup a repository and create a merge conflict
*
* @returns the new local repository
*
* The current branch will be 'other-branch' and the merged branch will be
* 'master' in your test harness.
*
* The conflicted file will be 'foo'.
*/
export async function setupConflictedRepo(): Promise<Repository> {
const repo = await setupEmptyRepository()
const firstCommit = {
entries: [{ path: 'foo', contents: '' }],
}
await makeCommit(repo, firstCommit)
// create this branch starting from the first commit, but don't checkout it
// because we want to create a divergent history
await GitProcess.exec(['branch', 'other-branch'], repo.path)
const secondCommit = {
entries: [{ path: 'foo', contents: 'b1' }],
}
await makeCommit(repo, secondCommit)
await switchTo(repo, 'other-branch')
const thirdCommit = {
entries: [{ path: 'foo', contents: 'b2' }],
}
await makeCommit(repo, thirdCommit)
await GitProcess.exec(['merge', 'master'], repo.path)
return repo
}
/**
* Setup a repository and create a merge conflict
*
* @returns the new local repository
*
* The current branch will be 'other-branch' and the merged branch will be
* 'master' in your test harness.
*
* The conflicted file will be 'foo'. There will also be uncommitted changes unrelated to the merge in 'perlin'.
*/
export async function setupConflictedRepoWithUnrelatedCommittedChange(): Promise<Repository> {
const repo = await setupEmptyRepository()
const firstCommit = {
entries: [
{ path: 'foo', contents: '' },
{ path: 'perlin', contents: 'perlin' },
],
}
await makeCommit(repo, firstCommit)
// create this branch starting from the first commit, but don't checkout it
// because we want to create a divergent history
await GitProcess.exec(['branch', 'other-branch'], repo.path)
const secondCommit = {
entries: [{ path: 'foo', contents: 'b1' }],
}
await makeCommit(repo, secondCommit)
await switchTo(repo, 'other-branch')
const thirdCommit = {
entries: [{ path: 'foo', contents: 'b2' }],
}
await makeCommit(repo, thirdCommit)
await writeFile(Path.join(repo.path, 'perlin'), 'noise')
await GitProcess.exec(['merge', 'master'], repo.path)
return repo
}
/**
* Setup a repository and create a merge conflict with multiple files
*
* @returns the new local repository
*
* The current branch will be 'other-branch' and the merged branch will be
* 'master' in your test harness.
*
* The conflicted files will be 'foo', 'bar', and 'baz'.
*/
export async function setupConflictedRepoWithMultipleFiles(): Promise<Repository> {
const repo = await setupEmptyRepository()
const firstCommit = {
entries: [
{ path: 'foo', contents: 'b0' },
{ path: 'bar', contents: 'b0' },
],
}
await makeCommit(repo, firstCommit)
// create this branch starting from the first commit, but don't checkout it
// because we want to create a divergent history
await GitProcess.exec(['branch', 'other-branch'], repo.path)
const secondCommit = {
entries: [
{ path: 'foo', contents: 'b1' },
{ path: 'bar', contents: null },
{ path: 'baz', contents: 'b1' },
{ path: 'cat', contents: 'b1' },
],
}
await makeCommit(repo, secondCommit)
await switchTo(repo, 'other-branch')
const thirdCommit = {
entries: [
{ path: 'foo', contents: 'b2' },
{ path: 'bar', contents: 'b2' },
{ path: 'baz', contents: 'b2' },
{ path: 'cat', contents: 'b2' },
],
}
await makeCommit(repo, thirdCommit)
await FSE.writeFile(Path.join(repo.path, 'dog'), 'touch')
await GitProcess.exec(['merge', 'master'], repo.path)
return repo
}
/**
* Setup a repo with a single commit
*
* files are `great-file` and `good-file`, which are both added in the one commit
*/
export async function setupTwoCommitRepo(): Promise<Repository> {
const repo = await setupEmptyRepository()
const firstCommit = {
entries: [
{ path: 'good-file', contents: 'wishes it was great' },
{ path: 'great-file', contents: 'wishes it was good' },
],
}
const secondCommit = {
entries: [
{ path: 'good-file', contents: 'is great' },
{ path: 'great-file', contents: 'is good' },
],
}
await makeCommit(repo, firstCommit)
await makeCommit(repo, secondCommit)
return repo
}
/**
* Sets up a local fork of the provided repository
* and configures the origin remote to point to the
* local "upstream" repository.
*/
export async function setupLocalForkOfRepository(
upstream: Repository
): Promise<Repository> {
const path = mkdirSync('desktop-fork-repo-')
await git(['clone', '--local', `${upstream.path}`, path], path, 'clone')
return new Repository(path, -1, null, false)
}
``` | /content/code_sandbox/app/test/helpers/repositories.ts | xml | 2016-05-11T15:59:00 | 2024-08-16T17:00:41 | desktop | desktop/desktop | 19,544 | 1,833 |
```xml
import * as React from 'react';
import createSvgIcon from '../utils/createSvgIcon';
const LockIcon = createSvgIcon({
svg: ({ classes }) => (
<svg xmlns="path_to_url" viewBox="0 0 2048 2048" className={classes.svg} focusable="false">
<path d="M1792 896v1152H256V896h256V522q0-108 39-203t108-166T821 41t203-41q109 0 202 41t163 112 108 166 39 203v374h256zm-1152 0h768V522q0-81-29-152t-80-126-122-85-153-31q-82 0-152 31t-122 85-81 125-29 153v374zm1024 128H384v896h1280v-896z" />
</svg>
),
displayName: 'LockIcon',
});
export default LockIcon;
``` | /content/code_sandbox/packages/react-icons-mdl2/src/components/LockIcon.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 224 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="path_to_url">
<item>
<shape>
<solid android:color="#E6333333"/>
<corners android:radius="3dp"/>
</shape>
</item>
</layer-list>
``` | /content/code_sandbox/app/src/main/res/drawable/jz_toast_bg.xml | xml | 2016-10-15T19:48:00 | 2024-08-13T15:14:45 | AndroidHttpCapture | JZ-Darkal/AndroidHttpCapture | 4,410 | 69 |
```xml
import type { SearchResultItem } from "@common/Core";
import type { SearchOptions } from "./SearchOptions";
export type SearchFilter = (options: SearchOptions) => SearchResultItem[];
``` | /content/code_sandbox/src/renderer/Core/Search/Helpers/SearchFilter.ts | xml | 2016-10-11T04:59:52 | 2024-08-16T11:53:31 | ueli | oliverschwendener/ueli | 3,543 | 38 |
```xml
import {Component} from '@angular/core';
@Component({
selector: 'particles-page',
templateUrl: './particles.page.html'
})
export class ParticlesPage {}
``` | /content/code_sandbox/source/page/src/page/learn/basics/particles/particles.page.ts | xml | 2016-02-27T20:54:38 | 2024-08-15T07:19:21 | nunuStudio | tentone/nunuStudio | 2,097 | 34 |
```xml
/* your_sha256_hash----------------------------
* See 'LICENSE' in the project root for license information.
* your_sha256_hash-------------------------- */
import * as jsonc from 'comment-json';
import * as fs from 'fs';
import * as glob from 'glob';
import * as os from 'os';
import * as path from 'path';
import { promisify } from 'util';
import * as vscode from 'vscode';
import * as nls from 'vscode-nls';
import * as util from '../common';
import { isWindows } from '../constants';
import { expandAllStrings, ExpansionOptions, ExpansionVars } from '../expand';
import { CppBuildTask, CppBuildTaskDefinition, cppBuildTaskProvider } from '../LanguageServer/cppBuildTaskProvider';
import { configPrefix } from '../LanguageServer/extension';
import { CppSettings, OtherSettings } from '../LanguageServer/settings';
import * as logger from '../logger';
import { PlatformInformation } from '../platform';
import { rsync, scp, ssh } from '../SSH/commands';
import * as Telemetry from '../telemetry';
import { AttachItemsProvider, AttachPicker, RemoteAttachPicker } from './attachToProcess';
import { ConfigMenu, ConfigMode, ConfigSource, CppDebugConfiguration, DebuggerEvent, DebuggerType, DebugType, IConfiguration, IConfigurationSnippet, isDebugLaunchStr, MIConfigurations, PipeTransportConfigurations, TaskStatus, WindowsConfigurations, WSLConfigurations } from './configurations';
import { NativeAttachItemsProviderFactory } from './nativeAttach';
import { Environment, ParsedEnvironmentFile } from './ParsedEnvironmentFile';
import * as debugUtils from './utils';
nls.config({ messageFormat: nls.MessageFormat.bundle, bundleFormat: nls.BundleFormat.standalone })();
const localize: nls.LocalizeFunc = nls.loadMessageBundle();
enum StepType {
scp = 'scp',
rsync = 'rsync',
ssh = 'ssh',
shell = 'shell',
remoteShell = 'remoteShell',
command = 'command'
}
const globAsync: (pattern: string, options?: glob.IOptions | undefined) => Promise<string[]> = promisify(glob);
/*
* Retrieves configurations from a provider and displays them in a quickpick menu to be selected.
* Ensures that the selected configuration's preLaunchTask (if existent) is populated in the user's task.json.
* Automatically starts debugging for "Build and Debug" configurations.
*/
export class DebugConfigurationProvider implements vscode.DebugConfigurationProvider {
private type: DebuggerType;
private assetProvider: IConfigurationAssetProvider;
// Keep a list of tasks detected by cppBuildTaskProvider.
private static detectedBuildTasks: CppBuildTask[] = [];
private static detectedCppBuildTasks: CppBuildTask[] = [];
private static detectedCBuildTasks: CppBuildTask[] = [];
protected static recentBuildTaskLabel: string;
public constructor(assetProvider: IConfigurationAssetProvider, type: DebuggerType) {
this.assetProvider = assetProvider;
this.type = type;
}
public static ClearDetectedBuildTasks(): void {
DebugConfigurationProvider.detectedCppBuildTasks = [];
DebugConfigurationProvider.detectedCBuildTasks = [];
}
/**
* Returns a list of initial debug configurations based on contextual information, e.g. package.json or folder.
* resolveDebugConfiguration will be automatically called after this function.
*/
async provideDebugConfigurations(folder?: vscode.WorkspaceFolder, token?: vscode.CancellationToken): Promise<CppDebugConfiguration[]> {
let configs: CppDebugConfiguration[] | null | undefined = await this.provideDebugConfigurationsForType(this.type, folder, token);
if (!configs) {
configs = [];
}
const defaultTemplateConfig: CppDebugConfiguration | undefined = configs.find(config => isDebugLaunchStr(config.name) && config.request === "launch");
if (!defaultTemplateConfig) {
throw new Error("Default config not found in provideDebugConfigurations()");
}
const editor: vscode.TextEditor | undefined = vscode.window.activeTextEditor;
if (!editor || !util.isCppOrCFile(editor.document.uri) || configs.length <= 1) {
return [defaultTemplateConfig];
}
const defaultConfig: CppDebugConfiguration[] = this.findDefaultConfig(configs);
// If there was only one config defined for the default task, choose that config, otherwise ask the user to choose.
if (defaultConfig.length === 1) {
return defaultConfig;
}
// Find the recently used task and place it at the top of quickpick list.
let recentlyUsedConfig: CppDebugConfiguration | undefined;
configs = configs.filter(config => {
if (config.taskStatus !== TaskStatus.recentlyUsed) {
return true;
} else {
recentlyUsedConfig = config;
return false;
}
});
if (recentlyUsedConfig) {
configs.unshift(recentlyUsedConfig);
}
const items: ConfigMenu[] = configs.map<ConfigMenu>(config => {
const quickPickConfig: CppDebugConfiguration = { ...config };
const menuItem: ConfigMenu = { label: config.name, configuration: quickPickConfig, description: config.detail, detail: config.taskStatus };
// Rename the menu item for the default configuration as its name is non-descriptive.
if (isDebugLaunchStr(menuItem.label)) {
menuItem.label = localize("default.configuration.menuitem", "Default Configuration");
}
return menuItem;
});
const selection: ConfigMenu | undefined = await vscode.window.showQuickPick(this.localizeConfigDetail(items), { placeHolder: localize("select.configuration", "Select a configuration") });
if (!selection) {
Telemetry.logDebuggerEvent(DebuggerEvent.debugPanel, { "debugType": "debug", "configSource": ConfigSource.unknown, "configMode": ConfigMode.unknown, "cancelled": "true", "succeeded": "true" });
return []; // User canceled it.
}
if (this.isClConfiguration(selection.label)) {
this.showErrorIfClNotAvailable(selection.label);
}
return [selection.configuration];
}
/**
* Error checks the provided 'config' without any variables substituted.
* If return "undefined", the debugging will be aborted silently.
* If return "null", the debugging will be aborted and launch.json will be opened.
* resolveDebugConfigurationWithSubstitutedVariables will be automatically called after this function.
*/
async resolveDebugConfiguration(folder: vscode.WorkspaceFolder | undefined, config: CppDebugConfiguration, _token?: vscode.CancellationToken): Promise<CppDebugConfiguration | null | undefined> {
if (!config || !config.type) {
// When DebugConfigurationProviderTriggerKind is Dynamic, this function will be called with an empty config.
// Hence, providing debug configs, and start debugging should be done manually.
// resolveDebugConfiguration will be automatically called after calling provideDebugConfigurations.
const configs: CppDebugConfiguration[] = await this.provideDebugConfigurations(folder);
if (!configs || configs.length === 0) {
Telemetry.logDebuggerEvent(DebuggerEvent.debugPanel, { "debugType": DebugType.debug, "configSource": folder ? ConfigSource.workspaceFolder : ConfigSource.singleFile, "configMode": ConfigMode.noLaunchConfig, "cancelled": "true", "succeeded": "true" });
return undefined; // aborts debugging silently
} else {
// Currently, we expect only one debug config to be selected.
console.assert(configs.length === 1, "More than one debug config is selected.");
config = configs[0];
// Keep track of the entry point where the debug config has been selected, for telemetry purposes.
config.debuggerEvent = DebuggerEvent.debugPanel;
config.configSource = folder ? ConfigSource.workspaceFolder : ConfigSource.singleFile;
}
}
/** If the config is coming from the "Run and Debug" debugPanel, there are three cases where the folder is undefined:
* 1. when debugging is done on a single file where there is no folder open,
* 2. when the debug configuration is defined at the User level (global).
* 3. when the debug configuration is defined at the workspace level.
* If the config is coming from the "Run and Debug" playButton, there is one case where the folder is undefined:
* 1. when debugging is done on a single file where there is no folder open.
*/
/** Do not resolve PreLaunchTask for these three cases, and let the Vs Code resolve it:
* 1: The existing configs that are found for a single file.
* 2: The existing configs that come from the playButton (the PreLaunchTask should already be defined for these configs).
* 3: The existing configs that come from the debugPanel where the folder is undefined and the PreLaunchTask cannot be found.
*/
if (config.preLaunchTask) {
config.configSource = this.getDebugConfigSource(config, folder);
const isIntelliSenseDisabled: boolean = new CppSettings((vscode.workspace.workspaceFolders && vscode.workspace.workspaceFolders.length > 0) ? vscode.workspace.workspaceFolders[0]?.uri : undefined).intelliSenseEngine === "disabled";
// Run the build task if IntelliSense is disabled.
if (isIntelliSenseDisabled) {
try {
await cppBuildTaskProvider.runBuildTask(config.preLaunchTask);
config.preLaunchTask = undefined;
Telemetry.logDebuggerEvent(DebuggerEvent.debugPanel, { "debugType": DebugType.debug, "configSource": config.configSource || ConfigSource.unknown, "configMode": ConfigMode.launchConfig, "cancelled": "false", "succeeded": "true" });
} catch (err) {
Telemetry.logDebuggerEvent(DebuggerEvent.debugPanel, { "debugType": DebugType.debug, "configSource": config.configSource || ConfigSource.unknown, "configMode": ConfigMode.launchConfig, "cancelled": "false", "succeeded": "false" });
}
return config;
}
let resolveByVsCode: boolean = false;
const isDebugPanel: boolean = !config.debuggerEvent || (config.debuggerEvent && config.debuggerEvent === DebuggerEvent.debugPanel);
const singleFile: boolean = config.configSource === ConfigSource.singleFile;
const isExistingConfig: boolean = this.isExistingConfig(config, folder);
const isExistingTask: boolean = await this.isExistingTask(config, folder);
if (singleFile) {
if (isExistingConfig) {
resolveByVsCode = true;
}
} else {
if (!isDebugPanel && (isExistingConfig || isExistingTask)) {
resolveByVsCode = true;
} else if (isDebugPanel && !folder && isExistingConfig && !isExistingTask) {
resolveByVsCode = true;
}
}
// Send the telemetry before writing into files
config.debugType = config.debugType ? config.debugType : DebugType.debug;
const configMode: ConfigMode = isExistingConfig ? ConfigMode.launchConfig : ConfigMode.noLaunchConfig;
// if configuration.debuggerEvent === undefined, it means this configuration is already defined in launch.json and is shown in debugPanel.
Telemetry.logDebuggerEvent(config.debuggerEvent || DebuggerEvent.debugPanel, { "debugType": config.debugType || DebugType.debug, "configSource": config.configSource || ConfigSource.unknown, "configMode": configMode, "cancelled": "false", "succeeded": "true" });
if (!resolveByVsCode) {
if (singleFile || (isDebugPanel && !folder && isExistingTask)) {
await this.resolvePreLaunchTask(config, configMode);
config.preLaunchTask = undefined;
} else {
await this.resolvePreLaunchTask(config, configMode, folder);
DebugConfigurationProvider.recentBuildTaskLabelStr = config.preLaunchTask;
}
} else {
DebugConfigurationProvider.recentBuildTaskLabelStr = config.preLaunchTask;
}
}
// resolveDebugConfigurationWithSubstitutedVariables will be automatically called after this return.
return config;
}
/**
* This hook is directly called after 'resolveDebugConfiguration' but with all variables substituted.
* This is also ran after the tasks.json has completed.
*
* Try to add all missing attributes to the debug configuration being launched.
* If return "undefined", the debugging will be aborted silently.
* If return "null", the debugging will be aborted and launch.json will be opened.
*/
async resolveDebugConfigurationWithSubstitutedVariables(folder: vscode.WorkspaceFolder | undefined, config: CppDebugConfiguration, token?: vscode.CancellationToken): Promise<CppDebugConfiguration | null | undefined> {
if (!config || !config.type) {
return undefined; // Abort debugging silently.
}
if (config.type === DebuggerType.cppvsdbg) {
// Fail if cppvsdbg type is running on non-Windows
if (os.platform() !== 'win32') {
void logger.getOutputChannelLogger().showWarningMessage(localize("debugger.not.available", "Debugger of type: '{0}' is only available on Windows. Use type: '{1}' on the current OS platform.", "cppvsdbg", "cppdbg"));
return undefined; // Abort debugging silently.
}
// Handle legacy 'externalConsole' bool and convert to console: "externalTerminal"
// eslint-disable-next-line no-prototype-builtins
if (config.hasOwnProperty("externalConsole")) {
void logger.getOutputChannelLogger().showWarningMessage(localize("debugger.deprecated.config", "The key '{0}' is deprecated. Please use '{1}' instead.", "externalConsole", "console"));
if (config.externalConsole && !config.console) {
config.console = "externalTerminal";
}
delete config.externalConsole;
}
// Disable debug heap by default, enable if 'enableDebugHeap' is set.
if (!config.enableDebugHeap) {
const disableDebugHeapEnvSetting: Environment = { "name": "_NO_DEBUG_HEAP", "value": "1" };
if (config.environment && util.isArray(config.environment)) {
config.environment.push(disableDebugHeapEnvSetting);
} else {
config.environment = [disableDebugHeapEnvSetting];
}
}
}
// Add environment variables from .env file
this.resolveEnvFile(config, folder);
await this.expand(config, folder);
this.resolveSourceFileMapVariables(config);
// Modify WSL config for OpenDebugAD7
if (os.platform() === 'win32' &&
config.pipeTransport &&
config.pipeTransport.pipeProgram) {
let replacedPipeProgram: string | undefined;
const pipeProgramStr: string = config.pipeTransport.pipeProgram.toLowerCase().trim();
// OpenDebugAD7 is a 32-bit process. Make sure the WSL pipe transport is using the correct program.
replacedPipeProgram = debugUtils.ArchitectureReplacer.checkAndReplaceWSLPipeProgram(pipeProgramStr, debugUtils.ArchType.ia32);
// If pipeProgram does not get replaced and there is a pipeCwd, concatenate with pipeProgramStr and attempt to replace.
if (!replacedPipeProgram && !path.isAbsolute(pipeProgramStr) && config.pipeTransport.pipeCwd) {
const pipeCwdStr: string = config.pipeTransport.pipeCwd.toLowerCase().trim();
const newPipeProgramStr: string = path.join(pipeCwdStr, pipeProgramStr);
replacedPipeProgram = debugUtils.ArchitectureReplacer.checkAndReplaceWSLPipeProgram(newPipeProgramStr, debugUtils.ArchType.ia32);
}
if (replacedPipeProgram) {
config.pipeTransport.pipeProgram = replacedPipeProgram;
}
}
const macOSMIMode: string = config.osx?.MIMode ?? config.MIMode;
const macOSMIDebuggerPath: string = config.osx?.miDebuggerPath ?? config.miDebuggerPath;
const lldb_mi_10_x_path: string = path.join(util.extensionPath, "debugAdapters", "lldb-mi", "bin", "lldb-mi");
// Validate LLDB-MI
if (os.platform() === 'darwin' && // Check for macOS
fs.existsSync(lldb_mi_10_x_path) && // lldb-mi 10.x exists
(!macOSMIMode || macOSMIMode === 'lldb') &&
!macOSMIDebuggerPath // User did not provide custom lldb-mi
) {
const frameworkPath: string | undefined = this.getLLDBFrameworkPath();
if (!frameworkPath) {
const moreInfoButton: string = localize("lldb.framework.install.xcode", "More Info");
const LLDBFrameworkMissingMessage: string = localize("lldb.framework.not.found", "Unable to locate 'LLDB.framework' for lldb-mi. Please install XCode or XCode Command Line Tools.");
void vscode.window.showErrorMessage(LLDBFrameworkMissingMessage, moreInfoButton)
.then(value => {
if (value === moreInfoButton) {
const helpURL: string = "path_to_url";
void vscode.env.openExternal(vscode.Uri.parse(helpURL));
}
});
return undefined;
}
}
if (config.logging?.engineLogging) {
const outputChannel: logger.Logger = logger.getOutputChannelLogger();
outputChannel.appendLine(localize("debugger.launchConfig", "Launch configuration:"));
outputChannel.appendLine(JSON.stringify(config, undefined, 2));
// TODO: Enable when path_to_url is resolved.
// logger.showOutputChannel();
}
// Run deploy steps
if (config.deploySteps && config.deploySteps.length !== 0) {
const codeVersion: number[] = vscode.version.split('.').map(num => parseInt(num, undefined));
if ((util.isNumber(codeVersion[0]) && codeVersion[0] < 1) || (util.isNumber(codeVersion[0]) && codeVersion[0] === 1 && util.isNumber(codeVersion[1]) && codeVersion[1] < 69)) {
void logger.getOutputChannelLogger().showErrorMessage(localize("vs.code.1.69+.required", "'deploySteps' require VS Code 1.69+."));
return undefined;
}
const deploySucceeded: boolean = await vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
title: localize("running.deploy.steps", "Running deploy steps...")
}, async () => this.deploySteps(config, token));
if (!deploySucceeded || token?.isCancellationRequested) {
return undefined;
}
}
// Pick process if process id is empty
if (config.request === "attach" && !config.processId) {
let processId: string | undefined;
if (config.pipeTransport || config.useExtendedRemote) {
const remoteAttachPicker: RemoteAttachPicker = new RemoteAttachPicker();
processId = await remoteAttachPicker.ShowAttachEntries(config);
} else {
const attachItemsProvider: AttachItemsProvider = NativeAttachItemsProviderFactory.Get();
const attacher: AttachPicker = new AttachPicker(attachItemsProvider);
processId = await attacher.ShowAttachEntries(token);
}
if (processId) {
config.processId = processId;
} else {
void logger.getOutputChannelLogger().showErrorMessage("No process was selected.");
return undefined;
}
}
return config;
}
async provideDebugConfigurationsForType(type: DebuggerType, folder?: vscode.WorkspaceFolder, _token?: vscode.CancellationToken): Promise<CppDebugConfiguration[]> {
const defaultTemplateConfig: CppDebugConfiguration = this.assetProvider.getInitialConfigurations(type).find((config: any) =>
isDebugLaunchStr(config.name) && config.request === "launch");
console.assert(defaultTemplateConfig, "Could not find default debug configuration.");
const platformInfo: PlatformInformation = await PlatformInformation.GetPlatformInformation();
// Import the existing configured tasks from tasks.json file.
const configuredBuildTasks: CppBuildTask[] = await cppBuildTaskProvider.getJsonTasks();
let buildTasks: CppBuildTask[] = [];
await this.loadDetectedTasks();
// Remove the tasks that are already configured once in tasks.json.
const dedupDetectedBuildTasks: CppBuildTask[] = DebugConfigurationProvider.detectedBuildTasks.filter(taskDetected =>
!configuredBuildTasks.some(taskJson => taskJson.definition.label === taskDetected.definition.label));
buildTasks = buildTasks.concat(configuredBuildTasks, dedupDetectedBuildTasks);
// Filter out build tasks that don't match the currently selected debug configuration type.
if (buildTasks.length !== 0) {
buildTasks = buildTasks.filter((task: CppBuildTask) => {
const command: string = task.definition.command as string;
if (!command) {
return false;
}
if (defaultTemplateConfig.name.startsWith("(Windows) ")) {
if (command.startsWith("cl.exe")) {
return true;
}
} else {
if (!command.startsWith("cl.exe")) {
return true;
}
}
return false;
});
}
// Generate new configurations for each build task.
// Generating a task is async, therefore we must *await* *all* map(task => config) Promises to resolve.
let configs: CppDebugConfiguration[] = [];
if (buildTasks.length !== 0) {
configs = (await Promise.all(buildTasks.map<Promise<CppDebugConfiguration | undefined>>(async task => {
const definition: CppBuildTaskDefinition = task.definition as CppBuildTaskDefinition;
const compilerPath: string = util.isString(definition.command) ? definition.command : definition.command.value;
// Filter out the tasks that has an invalid compiler path.
const compilerPathExists: boolean = path.isAbsolute(compilerPath) ?
// Absolute path, just check if it exists
await util.checkFileExists(compilerPath) :
// Non-absolute. Check on $PATH
(await util.whichAsync(compilerPath) !== undefined);
if (!compilerPathExists) {
logger.getOutputChannelLogger().appendLine(localize('compiler.path.not.exists', "Unable to find {0}. {1} task is ignored.", compilerPath, definition.label));
}
const compilerName: string = path.basename(compilerPath);
const newConfig: CppDebugConfiguration = { ...defaultTemplateConfig }; // Copy enumerables and properties
newConfig.existing = false;
newConfig.name = configPrefix + compilerName + " " + this.buildAndDebugActiveFileStr();
newConfig.preLaunchTask = task.name;
if (newConfig.type === DebuggerType.cppdbg) {
newConfig.externalConsole = false;
} else {
newConfig.console = "integratedTerminal";
}
// Extract the .exe path from the defined task.
const definedExePath: string | undefined = util.findExePathInArgs(task.definition.args);
newConfig.program = definedExePath ? definedExePath : util.defaultExePath();
// Add the "detail" property to show the compiler path in QuickPickItem.
// This property will be removed before writing the DebugConfiguration in launch.json.
newConfig.detail = localize("pre.Launch.Task", "preLaunchTask: {0}", task.name);
newConfig.taskDetail = task.detail;
newConfig.taskStatus = task.existing ?
(task.name === DebugConfigurationProvider.recentBuildTaskLabelStr) ? TaskStatus.recentlyUsed : TaskStatus.configured :
TaskStatus.detected;
if (task.isDefault) {
newConfig.isDefault = true;
}
const isCl: boolean = compilerName === "cl.exe";
newConfig.cwd = isWindows && !isCl && !process.env.PATH?.includes(path.dirname(compilerPath)) ? path.dirname(compilerPath) : "${fileDirname}";
if (platformInfo.platform !== "darwin") {
let debuggerName: string;
if (compilerName.startsWith("clang")) {
newConfig.MIMode = "lldb";
if (isWindows) {
debuggerName = "lldb";
} else {
debuggerName = "lldb-mi";
// Search for clang-8, clang-10, etc.
if ((compilerName !== "clang-cl.exe") && (compilerName !== "clang-cpp.exe")) {
const suffixIndex: number = compilerName.indexOf("-");
if (suffixIndex !== -1) {
const suffix: string = compilerName.substring(suffixIndex);
debuggerName += suffix;
}
}
}
newConfig.type = DebuggerType.cppdbg;
} else if (compilerName === "cl.exe") {
newConfig.miDebuggerPath = undefined;
newConfig.type = DebuggerType.cppvsdbg;
return newConfig;
} else {
debuggerName = "gdb";
}
if (isWindows) {
debuggerName = debuggerName.endsWith(".exe") ? debuggerName : (debuggerName + ".exe");
}
const compilerDirname: string = path.dirname(compilerPath);
const debuggerPath: string = path.join(compilerDirname, debuggerName);
// Check if debuggerPath exists.
if (await util.checkFileExists(debuggerPath)) {
newConfig.miDebuggerPath = debuggerPath;
} else if (await util.whichAsync(debuggerName) !== undefined) {
// Check if debuggerName exists on $PATH
newConfig.miDebuggerPath = debuggerName;
} else {
// Try the usr path for non-Windows platforms.
const usrDebuggerPath: string = path.join("/usr", "bin", debuggerName);
if (!isWindows && await util.checkFileExists(usrDebuggerPath)) {
newConfig.miDebuggerPath = usrDebuggerPath;
} else {
logger.getOutputChannelLogger().appendLine(localize('debugger.path.not.exists', "Unable to find the {0} debugger. The debug configuration for {1} is ignored.", `\"${debuggerName}\"`, compilerName));
return undefined;
}
}
}
return newConfig;
}))).filter((item): item is CppDebugConfiguration => !!item);
}
configs.push(defaultTemplateConfig);
const existingConfigs: CppDebugConfiguration[] | undefined = this.getLaunchConfigs(folder, type)?.map(config => {
if (!config.detail && config.preLaunchTask) {
config.detail = localize("pre.Launch.Task", "preLaunchTask: {0}", config.preLaunchTask);
}
config.existing = true;
return config;
});
if (existingConfigs) {
// Remove the detected configs that are already configured once in launch.json.
const dedupExistingConfigs: CppDebugConfiguration[] = configs.filter(detectedConfig => !existingConfigs.some(config => {
if (config.preLaunchTask === detectedConfig.preLaunchTask && config.type === detectedConfig.type && config.request === detectedConfig.request) {
// Carry the default task information.
config.isDefault = detectedConfig.isDefault ? detectedConfig.isDefault : undefined;
return true;
}
return false;
}));
configs = existingConfigs.concat(dedupExistingConfigs);
}
return configs;
}
private async loadDetectedTasks(): Promise<void> {
const editor: vscode.TextEditor | undefined = vscode.window.activeTextEditor;
const emptyTasks: CppBuildTask[] = [];
if (!editor) {
DebugConfigurationProvider.detectedBuildTasks = emptyTasks;
return;
}
const fileExt: string = path.extname(editor.document.fileName);
if (!fileExt) {
DebugConfigurationProvider.detectedBuildTasks = emptyTasks;
return;
}
// Don't offer tasks for header files.
const isHeader: boolean = util.isHeaderFile(editor.document.uri);
if (isHeader) {
DebugConfigurationProvider.detectedBuildTasks = emptyTasks;
return;
}
// Don't offer tasks if the active file's extension is not a recognized C/C++ extension.
const fileIsCpp: boolean = util.isCppFile(editor.document.uri);
const fileIsC: boolean = util.isCFile(editor.document.uri);
if (!(fileIsCpp || fileIsC)) {
DebugConfigurationProvider.detectedBuildTasks = emptyTasks;
return;
}
if (fileIsCpp) {
if (!DebugConfigurationProvider.detectedCppBuildTasks || DebugConfigurationProvider.detectedCppBuildTasks.length === 0) {
DebugConfigurationProvider.detectedCppBuildTasks = await cppBuildTaskProvider.getTasks(true);
}
DebugConfigurationProvider.detectedBuildTasks = DebugConfigurationProvider.detectedCppBuildTasks;
} else {
if (!DebugConfigurationProvider.detectedCBuildTasks || DebugConfigurationProvider.detectedCBuildTasks.length === 0) {
DebugConfigurationProvider.detectedCBuildTasks = await cppBuildTaskProvider.getTasks(true);
}
DebugConfigurationProvider.detectedBuildTasks = DebugConfigurationProvider.detectedCBuildTasks;
}
}
public static get recentBuildTaskLabelStr(): string {
return DebugConfigurationProvider.recentBuildTaskLabel;
}
public static set recentBuildTaskLabelStr(recentTask: string) {
DebugConfigurationProvider.recentBuildTaskLabel = recentTask;
}
private buildAndDebugActiveFileStr(): string {
return `${localize("build.and.debug.active.file", 'build and debug active file')}`;
}
private isClConfiguration(configurationLabel: string): boolean {
return configurationLabel.startsWith("C/C++: cl.exe");
}
private showErrorIfClNotAvailable(_configurationLabel: string): boolean {
if (!process.env.DevEnvDir || process.env.DevEnvDir.length === 0) {
void vscode.window.showErrorMessage(localize("cl.exe.not.available", "{0} build and debug is only usable when VS Code is run from the Developer Command Prompt for VS.", "cl.exe"));
return true;
}
return false;
}
private getLLDBFrameworkPath(): string | undefined {
const LLDBFramework: string = "LLDB.framework";
// Note: When adding more search paths, make sure the shipped lldb-mi also has it. See Build/lldb-mi.yml and 'install_name_tool' commands.
const searchPaths: string[] = [
"/Library/Developer/CommandLineTools/Library/PrivateFrameworks", // XCode CLI
"/Applications/Xcode.app/Contents/SharedFrameworks" // App Store XCode
];
for (const searchPath of searchPaths) {
if (fs.existsSync(path.join(searchPath, LLDBFramework))) {
// Found a framework that 'lldb-mi' can use.
return searchPath;
}
}
const outputChannel: logger.Logger = logger.getOutputChannelLogger();
outputChannel.appendLine(localize("lldb.find.failed", "Missing dependency '{0}' for lldb-mi executable.", LLDBFramework));
outputChannel.appendLine(localize("lldb.search.paths", "Searched in:"));
searchPaths.forEach(searchPath => {
outputChannel.appendLine(`\t${searchPath}`);
});
const xcodeCLIInstallCmd: string = "xcode-select --install";
outputChannel.appendLine(localize("lldb.install.help", "To resolve this issue, either install XCode through the Apple App Store or install the XCode Command Line Tools by running '{0}' in a Terminal window.", xcodeCLIInstallCmd));
logger.showOutputChannel();
return undefined;
}
private resolveEnvFile(config: CppDebugConfiguration, folder?: vscode.WorkspaceFolder): void {
if (config.envFile) {
// replace ${env:???} variables
let envFilePath: string = util.resolveVariables(config.envFile, undefined);
try {
if (folder && folder.uri && folder.uri.fsPath) {
// Try to replace ${workspaceFolder} or ${workspaceRoot}
envFilePath = envFilePath.replace(/(\${workspaceFolder}|\${workspaceRoot})/g, folder.uri.fsPath);
}
const parsedFile: ParsedEnvironmentFile = ParsedEnvironmentFile.CreateFromFile(envFilePath, config["environment"]);
// show error message if single lines cannot get parsed
if (parsedFile.Warning) {
void DebugConfigurationProvider.showFileWarningAsync(parsedFile.Warning, config.envFile);
}
config.environment = parsedFile.Env;
delete config.envFile;
} catch (errJS) {
const e: Error = errJS as Error;
throw new Error(localize("envfile.failed", "Failed to use {0}. Reason: {1}", "envFile", e.message));
}
}
}
private resolveSourceFileMapVariables(config: CppDebugConfiguration): void {
const messages: string[] = [];
if (config.sourceFileMap) {
for (const sourceFileMapSource of Object.keys(config.sourceFileMap)) {
let message: string = "";
const sourceFileMapTarget: string = config.sourceFileMap[sourceFileMapSource];
let source: string = sourceFileMapSource;
let target: string | object = sourceFileMapTarget;
// TODO: pass config.environment as 'additionalEnvironment' to resolveVariables when it is { key: value } instead of { "key": key, "value": value }
const newSourceFileMapSource: string = util.resolveVariables(sourceFileMapSource, undefined);
if (sourceFileMapSource !== newSourceFileMapSource) {
message = "\t" + localize("replacing.sourcepath", "Replacing {0} '{1}' with '{2}'.", "sourcePath", sourceFileMapSource, newSourceFileMapSource);
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
delete config.sourceFileMap[sourceFileMapSource];
source = newSourceFileMapSource;
}
if (util.isString(sourceFileMapTarget)) {
const newSourceFileMapTarget: string = util.resolveVariables(sourceFileMapTarget, undefined);
if (sourceFileMapTarget !== newSourceFileMapTarget) {
// Add a space if source was changed, else just tab the target message.
message += message ? ' ' : '\t';
message += localize("replacing.targetpath", "Replacing {0} '{1}' with '{2}'.", "targetPath", sourceFileMapTarget, newSourceFileMapTarget);
target = newSourceFileMapTarget;
}
} else if (util.isObject(sourceFileMapTarget)) {
const newSourceFileMapTarget: { "editorPath": string; "useForBreakpoints": boolean } = sourceFileMapTarget;
newSourceFileMapTarget["editorPath"] = util.resolveVariables(sourceFileMapTarget["editorPath"], undefined);
if (sourceFileMapTarget !== newSourceFileMapTarget) {
// Add a space if source was changed, else just tab the target message.
message += message ? ' ' : '\t';
message += localize("replacing.editorPath", "Replacing {0} '{1}' with '{2}'.", "editorPath", sourceFileMapTarget, newSourceFileMapTarget["editorPath"]);
target = newSourceFileMapTarget;
}
}
if (message) {
config.sourceFileMap[source] = target;
messages.push(message);
}
}
if (messages.length > 0) {
logger.getOutputChannel().appendLine(localize("resolving.variables.in.sourcefilemap", "Resolving variables in {0}...", "sourceFileMap"));
messages.forEach((message) => {
logger.getOutputChannel().appendLine(message);
});
logger.showOutputChannel();
}
}
}
private static async showFileWarningAsync(message: string, fileName: string): Promise<void> {
const openItem: vscode.MessageItem = { title: localize("open.envfile", "Open {0}", "envFile") };
const result: vscode.MessageItem | undefined = await vscode.window.showWarningMessage(message, openItem);
if (result && result.title === openItem.title) {
const doc: vscode.TextDocument = await vscode.workspace.openTextDocument(fileName);
if (doc) {
void vscode.window.showTextDocument(doc);
}
}
}
private localizeConfigDetail(items: ConfigMenu[]): ConfigMenu[] {
items.map((item: ConfigMenu) => {
switch (item.detail) {
case TaskStatus.recentlyUsed: {
item.detail = localize("recently.used.task", "Recently Used Task");
break;
}
case TaskStatus.configured: {
item.detail = localize("configured.task", "Configured Task");
break;
}
case TaskStatus.detected: {
item.detail = localize("detected.task", "Detected Task");
break;
}
default: {
break;
}
}
if (item.configuration.taskDetail) {
// Add the compiler path of the preLaunchTask to the description of the debug configuration.
item.detail = (item.detail ?? "") + " (" + item.configuration.taskDetail + ")";
}
});
return items;
}
private findDefaultConfig(configs: CppDebugConfiguration[]): CppDebugConfiguration[] {
// eslint-disable-next-line no-prototype-builtins
return configs.filter((config: CppDebugConfiguration) => config.hasOwnProperty("isDefault") && config.isDefault);
}
private async isExistingTask(config: CppDebugConfiguration, folder?: vscode.WorkspaceFolder): Promise<boolean> {
if (config.taskStatus && (config.taskStatus !== TaskStatus.detected)) {
return true;
} else if (config.taskStatus && (config.taskStatus === TaskStatus.detected)) {
return false;
}
return cppBuildTaskProvider.isExistingTask(config.preLaunchTask, folder);
}
private isExistingConfig(config: CppDebugConfiguration, folder?: vscode.WorkspaceFolder): boolean {
if (config.existing) {
return config.existing;
}
const configs: CppDebugConfiguration[] | undefined = this.getLaunchConfigs(folder, config.type);
if (configs && configs.length > 0) {
const selectedConfig: any | undefined = configs.find((item: any) => item.name && item.name === config.name);
if (selectedConfig) {
return true;
}
}
return false;
}
private getDebugConfigSource(config: CppDebugConfiguration, folder?: vscode.WorkspaceFolder): ConfigSource | undefined {
if (config.configSource) {
return config.configSource;
}
const isExistingConfig: boolean = this.isExistingConfig(config, folder);
if (!isExistingConfig && !folder) {
return ConfigSource.singleFile;
} else if (!isExistingConfig) {
return ConfigSource.workspaceFolder;
}
const configs: CppDebugConfiguration[] | undefined = this.getLaunchConfigs(folder, config.type);
const matchingConfig: CppDebugConfiguration | undefined = configs?.find((item: any) => item.name && item.name === config.name);
if (matchingConfig?.configSource) {
return matchingConfig.configSource;
}
return ConfigSource.unknown;
}
public getLaunchConfigs(folder?: vscode.WorkspaceFolder, type?: DebuggerType | string): CppDebugConfiguration[] | undefined {
// Get existing debug configurations from launch.json or user/workspace "launch" settings.
const WorkspaceConfigs: vscode.WorkspaceConfiguration = vscode.workspace.getConfiguration('launch', folder);
const configs: any = WorkspaceConfigs.inspect<vscode.DebugConfiguration>('configurations');
if (!configs) {
return undefined;
}
let detailedConfigs: CppDebugConfiguration[] = [];
if (configs.workspaceFolderValue !== undefined) {
detailedConfigs = detailedConfigs.concat(configs.workspaceFolderValue.map((item: CppDebugConfiguration) => {
item.configSource = ConfigSource.workspaceFolder;
return item;
}));
}
if (configs.workspaceValue !== undefined) {
detailedConfigs = detailedConfigs.concat(configs.workspaceValue.map((item: CppDebugConfiguration) => {
item.configSource = ConfigSource.workspace;
return item;
}));
}
if (configs.globalValue !== undefined) {
detailedConfigs = detailedConfigs.concat(configs.globalValue.map((item: CppDebugConfiguration) => {
item.configSource = ConfigSource.global;
return item;
}));
}
detailedConfigs = detailedConfigs.filter((config: any) => config.name && config.request === "launch" && type ? (config.type === type) : true);
return detailedConfigs;
}
private getLaunchJsonPath(): string | undefined {
return util.getJsonPath("launch.json");
}
private getRawLaunchJson(): Promise<any> {
const path: string | undefined = this.getLaunchJsonPath();
return util.getRawJson(path);
}
public async writeDebugConfig(config: vscode.DebugConfiguration, isExistingConfig: boolean, _folder?: vscode.WorkspaceFolder): Promise<void> {
const launchJsonPath: string | undefined = this.getLaunchJsonPath();
if (isExistingConfig) {
if (launchJsonPath) {
const doc: vscode.TextDocument = await vscode.workspace.openTextDocument(launchJsonPath);
if (doc) {
void vscode.window.showTextDocument(doc);
}
}
return;
}
const rawLaunchJson: any = await this.getRawLaunchJson();
if (!rawLaunchJson.configurations) {
rawLaunchJson.configurations = [];
}
if (!rawLaunchJson.version) {
rawLaunchJson.version = "2.0.0";
}
// Remove the extra properties that are not a part of the vsCode.DebugConfiguration.
config.detail = undefined;
config.taskStatus = undefined;
config.isDefault = undefined;
config.source = undefined;
config.debuggerEvent = undefined;
config.debugType = undefined;
config.existing = undefined;
config.taskDetail = undefined;
rawLaunchJson.configurations.push(config);
if (!launchJsonPath) {
throw new Error("Failed to get tasksJsonPath in checkBuildTaskExists()");
}
const settings: OtherSettings = new OtherSettings();
await util.writeFileText(launchJsonPath, jsonc.stringify(rawLaunchJson, null, settings.editorTabSize));
await vscode.workspace.openTextDocument(launchJsonPath);
const doc: vscode.TextDocument = await vscode.workspace.openTextDocument(launchJsonPath);
if (doc) {
void vscode.window.showTextDocument(doc);
}
}
public async addDebugConfiguration(textEditor: vscode.TextEditor): Promise<void> {
const folder: vscode.WorkspaceFolder | undefined = vscode.workspace.getWorkspaceFolder(textEditor.document.uri);
if (!folder) {
return;
}
const selectedConfig: vscode.DebugConfiguration | undefined = await this.selectConfiguration(textEditor, false, true);
if (!selectedConfig) {
Telemetry.logDebuggerEvent(DebuggerEvent.addConfigGear, { "configSource": ConfigSource.workspaceFolder, "configMode": ConfigMode.launchConfig, "cancelled": "true", "succeeded": "true" });
return; // User canceled it.
}
const isExistingConfig: boolean = this.isExistingConfig(selectedConfig, folder);
// Write preLaunchTask into tasks.json file.
if (!isExistingConfig && selectedConfig.preLaunchTask && (selectedConfig.taskStatus && selectedConfig.taskStatus === TaskStatus.detected)) {
await cppBuildTaskProvider.writeBuildTask(selectedConfig.preLaunchTask);
}
// Remove the extra properties that are not a part of the DebugConfiguration, as these properties will be written in launch.json.
selectedConfig.detail = undefined;
selectedConfig.taskStatus = undefined;
selectedConfig.isDefault = undefined;
selectedConfig.source = undefined;
selectedConfig.debuggerEvent = undefined;
// Write debug configuration in launch.json file.
await this.writeDebugConfig(selectedConfig, isExistingConfig, folder);
Telemetry.logDebuggerEvent(DebuggerEvent.addConfigGear, { "configSource": ConfigSource.workspaceFolder, "configMode": ConfigMode.launchConfig, "cancelled": "false", "succeeded": "true" });
}
public async buildAndRun(textEditor: vscode.TextEditor): Promise<void> {
// Turn off the debug mode.
return this.buildAndDebug(textEditor, false);
}
public async buildAndDebug(textEditor: vscode.TextEditor, debugModeOn: boolean = true): Promise<void> {
let folder: vscode.WorkspaceFolder | undefined = vscode.workspace.getWorkspaceFolder(textEditor.document.uri);
const selectedConfig: CppDebugConfiguration | undefined = await this.selectConfiguration(textEditor);
if (!selectedConfig) {
Telemetry.logDebuggerEvent(DebuggerEvent.playButton, { "debugType": debugModeOn ? DebugType.debug : DebugType.run, "configSource": ConfigSource.unknown, "cancelled": "true", "succeeded": "true" });
return; // User canceled it.
}
// Keep track of the entry point where the debug has been selected, for telemetry purposes.
selectedConfig.debuggerEvent = DebuggerEvent.playButton;
// If the configs are coming from workspace or global settings and the task is not found in tasks.json, let that to be resolved by VsCode.
if (selectedConfig.preLaunchTask && selectedConfig.configSource &&
(selectedConfig.configSource === ConfigSource.global || selectedConfig.configSource === ConfigSource.workspace) &&
!await this.isExistingTask(selectedConfig)) {
folder = undefined;
}
selectedConfig.debugType = debugModeOn ? DebugType.debug : DebugType.run;
// startDebugging will trigger a call to resolveDebugConfiguration.
await vscode.debug.startDebugging(folder, selectedConfig, { noDebug: !debugModeOn });
}
private async selectConfiguration(textEditor: vscode.TextEditor, pickDefault: boolean = true, onlyWorkspaceFolder: boolean = false): Promise<CppDebugConfiguration | undefined> {
const folder: vscode.WorkspaceFolder | undefined = vscode.workspace.getWorkspaceFolder(textEditor.document.uri);
if (!util.isCppOrCFile(textEditor.document.uri)) {
void vscode.window.showErrorMessage(localize("cannot.build.non.cpp", 'Cannot build and debug because the active file is not a C or C++ source file.'));
return;
}
// Get debug configurations for all debugger types.
let configs: CppDebugConfiguration[] = await this.provideDebugConfigurationsForType(DebuggerType.cppdbg, folder);
if (os.platform() === 'win32') {
configs = configs.concat(await this.provideDebugConfigurationsForType(DebuggerType.cppvsdbg, folder));
}
if (onlyWorkspaceFolder) {
configs = configs.filter(item => !item.configSource || item.configSource === ConfigSource.workspaceFolder);
}
const defaultConfig: CppDebugConfiguration[] | undefined = pickDefault ? this.findDefaultConfig(configs) : undefined;
const items: ConfigMenu[] = configs.map<ConfigMenu>(config => ({ label: config.name, configuration: config, description: config.detail, detail: config.taskStatus }));
let selection: ConfigMenu | undefined;
// if there was only one config for the default task, choose that config, otherwise ask the user to choose.
if (defaultConfig && defaultConfig.length === 1) {
selection = { label: defaultConfig[0].name, configuration: defaultConfig[0], description: defaultConfig[0].detail, detail: defaultConfig[0].taskStatus };
} else {
let sortedItems: ConfigMenu[] = [];
// Find the recently used task and place it at the top of quickpick list.
const recentTask: ConfigMenu[] = items.filter(item => item.configuration.preLaunchTask && item.configuration.preLaunchTask === DebugConfigurationProvider.recentBuildTaskLabelStr);
if (recentTask.length !== 0 && recentTask[0].detail !== TaskStatus.detected) {
recentTask[0].detail = TaskStatus.recentlyUsed;
sortedItems.push(recentTask[0]);
}
sortedItems = sortedItems.concat(items.filter(item => item.detail === TaskStatus.configured));
sortedItems = sortedItems.concat(items.filter(item => item.detail === TaskStatus.detected));
sortedItems = sortedItems.concat(items.filter(item => item.detail === undefined));
selection = await vscode.window.showQuickPick(this.localizeConfigDetail(sortedItems), {
placeHolder: items.length === 0 ? localize("no.compiler.found", "No compiler found") : localize("select.debug.configuration", "Select a debug configuration")
});
}
if (selection && this.isClConfiguration(selection.configuration.name) && this.showErrorIfClNotAvailable(selection.configuration.name)) {
return;
}
return selection?.configuration;
}
private async resolvePreLaunchTask(config: CppDebugConfiguration, configMode: ConfigMode, folder?: vscode.WorkspaceFolder | undefined): Promise<void> {
if (config.preLaunchTask) {
try {
if (config.configSource === ConfigSource.singleFile) {
// In case of singleFile, remove the preLaunch task from the debug configuration and run it here instead.
await cppBuildTaskProvider.runBuildTask(config.preLaunchTask);
} else {
await cppBuildTaskProvider.writeDefaultBuildTask(config.preLaunchTask, folder);
}
} catch (errJS) {
const e: Error = errJS as Error;
if (e && e.message === util.failedToParseJson) {
void vscode.window.showErrorMessage(util.failedToParseJson);
}
Telemetry.logDebuggerEvent(config.debuggerEvent || DebuggerEvent.debugPanel, { "debugType": config.debugType || DebugType.debug, "configSource": config.configSource || ConfigSource.unknown, "configMode": configMode, "cancelled": "false", "succeeded": "false" });
}
}
}
private async expand(config: vscode.DebugConfiguration, folder: vscode.WorkspaceFolder | undefined): Promise<void> {
const folderPath: string | undefined = folder?.uri.fsPath || vscode.workspace.workspaceFolders?.[0].uri.fsPath;
const vars: ExpansionVars = config.variables ? config.variables : {};
vars.workspaceFolder = folderPath || '{workspaceFolder}';
vars.workspaceFolderBasename = folderPath ? path.basename(folderPath) : '{workspaceFolderBasename}';
const expansionOptions: ExpansionOptions = { vars, recursive: true };
return expandAllStrings(config, expansionOptions);
}
// Returns true when ALL steps succeed; stop all subsequent steps if one fails
private async deploySteps(config: vscode.DebugConfiguration, cancellationToken?: vscode.CancellationToken): Promise<boolean> {
let succeeded: boolean = true;
const deployStart: number = new Date().getTime();
for (const step of config.deploySteps) {
succeeded = await this.singleDeployStep(config, step, cancellationToken);
if (!succeeded) {
break;
}
}
const deployEnd: number = new Date().getTime();
const telemetryProperties: { [key: string]: string } = {
Succeeded: `${succeeded}`,
IsDebugging: `${!config.noDebug || false}`
};
const telemetryMetrics: { [key: string]: number } = {
NumSteps: config.deploySteps.length,
Duration: deployEnd - deployStart
};
Telemetry.logDebuggerEvent('deploy', telemetryProperties, telemetryMetrics);
return succeeded;
}
private async singleDeployStep(config: vscode.DebugConfiguration, step: any, cancellationToken?: vscode.CancellationToken): Promise<boolean> {
if ((config.noDebug && step.debug === true) || (!config.noDebug && step.debug === false)) {
// Skip steps that doesn't match current launch mode. Explicit true/false check, since a step is always run when debug is undefined.
return true;
}
const stepType: StepType = step.type;
switch (stepType) {
case StepType.command: {
// VS Code commands are the same regardless of which extension invokes them, so just invoke them here.
if (step.args && !Array.isArray(step.args)) {
void logger.getOutputChannelLogger().showErrorMessage(localize('command.args.must.be.array', '"args" in command deploy step must be an array.'));
return false;
}
const returnCode: unknown = await vscode.commands.executeCommand(step.command, ...step.args);
return !returnCode;
}
case StepType.scp:
case StepType.rsync: {
const isScp: boolean = stepType === StepType.scp;
if (!step.files || !step.targetDir || !step.host) {
void logger.getOutputChannelLogger().showErrorMessage(localize('missing.properties.copyFile', '"host", "files", and "targetDir" are required in {0} steps.', isScp ? 'SCP' : 'rsync'));
return false;
}
const host: util.ISshHostInfo = util.isString(step.host) ? { hostName: step.host } : { hostName: step.host.hostName, user: step.host.user, port: step.host.port };
const jumpHosts: util.ISshHostInfo[] = step.host.jumpHosts;
let files: vscode.Uri[] = [];
if (util.isString(step.files)) {
files = files.concat((await globAsync(step.files)).map(file => vscode.Uri.file(file)));
} else if (util.isArrayOfString(step.files)) {
for (const fileGlob of (step.files as string[])) {
files = files.concat((await globAsync(fileGlob)).map(file => vscode.Uri.file(file)));
}
} else {
void logger.getOutputChannelLogger().showErrorMessage(localize('incorrect.files.type.copyFile', '"files" must be a string or an array of strings in {0} steps.', isScp ? 'SCP' : 'rsync'));
return false;
}
let scpResult: util.ProcessReturnType;
if (isScp) {
scpResult = await scp(files, host, step.targetDir, config.scpPath, config.recursive, jumpHosts, cancellationToken);
} else {
scpResult = await rsync(files, host, step.targetDir, config.scpPath, config.recursive, jumpHosts, cancellationToken);
}
if (!scpResult.succeeded || cancellationToken?.isCancellationRequested) {
return false;
}
break;
}
case StepType.ssh: {
if (!step.host || !step.command) {
void logger.getOutputChannelLogger().showErrorMessage(localize('missing.properties.ssh', '"host" and "command" are required for ssh steps.'));
return false;
}
const host: util.ISshHostInfo = util.isString(step.host) ? { hostName: step.host } : { hostName: step.host.hostName, user: step.host.user, port: step.host.port };
const jumpHosts: util.ISshHostInfo[] = step.host.jumpHosts;
const localForwards: util.ISshLocalForwardInfo[] = step.host.localForwards;
const continueOn: string = step.continueOn;
const sshResult: util.ProcessReturnType = await ssh(host, step.command, config.sshPath, jumpHosts, localForwards, continueOn, cancellationToken);
if (!sshResult.succeeded || cancellationToken?.isCancellationRequested) {
return false;
}
break;
}
case StepType.shell: {
if (!step.command) {
void logger.getOutputChannelLogger().showErrorMessage(localize('missing.properties.shell', '"command" is required for shell steps.'));
return false;
}
const taskResult: util.ProcessReturnType = await util.spawnChildProcess(step.command, undefined, step.continueOn);
if (!taskResult.succeeded || cancellationToken?.isCancellationRequested) {
void logger.getOutputChannelLogger().showErrorMessage(taskResult.output);
return false;
}
break;
}
default: {
logger.getOutputChannelLogger().appendLine(localize('deploy.step.type.not.supported', 'Deploy step type {0} is not supported.', step.type));
return false;
}
}
return true;
}
}
export interface IConfigurationAssetProvider {
getInitialConfigurations(debuggerType: DebuggerType): any;
getConfigurationSnippets(): vscode.CompletionItem[];
}
export class ConfigurationAssetProviderFactory {
public static getConfigurationProvider(): IConfigurationAssetProvider {
switch (os.platform()) {
case 'win32':
return new WindowsConfigurationProvider();
case 'darwin':
return new OSXConfigurationProvider();
case 'linux':
return new LinuxConfigurationProvider();
default:
throw new Error(localize("unexpected.os", "Unexpected OS type"));
}
}
}
abstract class DefaultConfigurationProvider implements IConfigurationAssetProvider {
configurations: IConfiguration[] = [];
public getInitialConfigurations(debuggerType: DebuggerType): any {
const configurationSnippet: IConfigurationSnippet[] = [];
// Only launch configurations are initial configurations
this.configurations.forEach(configuration => {
configurationSnippet.push(configuration.GetLaunchConfiguration());
});
const initialConfigurations: any = configurationSnippet.filter(snippet => snippet.debuggerType === debuggerType && snippet.isInitialConfiguration)
.map(snippet => JSON.parse(snippet.bodyText));
// If configurations is empty, then it will only have an empty configurations array in launch.json. Users can still add snippets.
return initialConfigurations;
}
public getConfigurationSnippets(): vscode.CompletionItem[] {
const completionItems: vscode.CompletionItem[] = [];
this.configurations.forEach(configuration => {
completionItems.push(convertConfigurationSnippetToCompletionItem(configuration.GetLaunchConfiguration()));
completionItems.push(convertConfigurationSnippetToCompletionItem(configuration.GetAttachConfiguration()));
});
return completionItems;
}
}
class WindowsConfigurationProvider extends DefaultConfigurationProvider {
private executable: string = "a.exe";
private pipeProgram: string = "<" + localize("path.to.pipe.program", "full path to pipe program such as {0}", "plink.exe").replace(/"/g, '') + ">";
private MIMode: string = 'gdb';
private setupCommandsBlock: string = `"setupCommands": [
{
"description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/"/g, '')}",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "${localize("enable.intel.disassembly.flavor", "Set Disassembly Flavor to {0}", "Intel").replace(/"/g, '')}",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]`;
constructor() {
super();
this.configurations = [
new MIConfigurations(this.MIMode, this.executable, this.pipeProgram, this.setupCommandsBlock),
new PipeTransportConfigurations(this.MIMode, this.executable, this.pipeProgram, this.setupCommandsBlock),
new WindowsConfigurations(this.MIMode, this.executable, this.pipeProgram, this.setupCommandsBlock),
new WSLConfigurations(this.MIMode, this.executable, this.pipeProgram, this.setupCommandsBlock)
];
}
}
class OSXConfigurationProvider extends DefaultConfigurationProvider {
private MIMode: string = 'lldb';
private executable: string = "a.out";
private pipeProgram: string = "/usr/bin/ssh";
constructor() {
super();
this.configurations = [
new MIConfigurations(this.MIMode, this.executable, this.pipeProgram)
];
}
}
class LinuxConfigurationProvider extends DefaultConfigurationProvider {
private MIMode: string = 'gdb';
private setupCommandsBlock: string = `"setupCommands": [
{
"description": "${localize("enable.pretty.printing", "Enable pretty-printing for {0}", "gdb").replace(/"/g, '')}",
"text": "-enable-pretty-printing",
"ignoreFailures": true
},
{
"description": "${localize("enable.intel.disassembly.flavor", "Set Disassembly Flavor to {0}", "Intel").replace(/"/g, '')}",
"text": "-gdb-set disassembly-flavor intel",
"ignoreFailures": true
}
]`;
private executable: string = "a.out";
private pipeProgram: string = "/usr/bin/ssh";
constructor() {
super();
this.configurations = [
new MIConfigurations(this.MIMode, this.executable, this.pipeProgram, this.setupCommandsBlock),
new PipeTransportConfigurations(this.MIMode, this.executable, this.pipeProgram, this.setupCommandsBlock)
];
}
}
function convertConfigurationSnippetToCompletionItem(snippet: IConfigurationSnippet): vscode.CompletionItem {
const item: vscode.CompletionItem = new vscode.CompletionItem(snippet.label, vscode.CompletionItemKind.Module);
item.insertText = snippet.bodyText;
return item;
}
export class ConfigurationSnippetProvider implements vscode.CompletionItemProvider {
private provider: IConfigurationAssetProvider;
private snippets: vscode.CompletionItem[];
constructor(provider: IConfigurationAssetProvider) {
this.provider = provider;
this.snippets = this.provider.getConfigurationSnippets();
}
public resolveCompletionItem(item: vscode.CompletionItem, _token: vscode.CancellationToken): Thenable<vscode.CompletionItem> {
return Promise.resolve(item);
}
// This function will only provide completion items via the Add Configuration Button
// There are two cases where the configuration array has nothing or has some items.
// 1. If it has nothing, insert a snippet the user selected.
// 2. If there are items, the Add Configuration button will append it to the start of the configuration array. This function inserts a comma at the end of the snippet.
public provideCompletionItems(document: vscode.TextDocument, _position: vscode.Position, _token: vscode.CancellationToken, _context: vscode.CompletionContext): Thenable<vscode.CompletionList> {
let items: vscode.CompletionItem[] = this.snippets;
let hasLaunchConfigs: boolean = false;
try {
const launch: any = jsonc.parse(document.getText());
hasLaunchConfigs = launch.configurations.length !== 0;
} catch {
// ignore
}
// Check to see if the array is empty, so any additional inserted snippets will need commas.
if (hasLaunchConfigs) {
items = [];
// Make a copy of each snippet since we are adding a comma to the end of the insertText.
this.snippets.forEach((item) => items.push({ ...item }));
items.map((item) => {
item.insertText = item.insertText + ','; // Add comma
});
}
return Promise.resolve(new vscode.CompletionList(items, true));
}
}
``` | /content/code_sandbox/Extension/src/Debugger/configurationProvider.ts | xml | 2016-03-26T21:26:30 | 2024-08-16T15:16:40 | vscode-cpptools | microsoft/vscode-cpptools | 5,438 | 13,375 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="debug|x64">
<Configuration>debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="release|x64">
<Configuration>release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="checked|x64">
<Configuration>checked</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="profile|x64">
<Configuration>profile</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{DEB7F8C6-4512-D660-4816-212EF0806A58}</ProjectGuid>
<RootNamespace>SampleFramework-MT</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='checked|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='profile|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='checked|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='profile|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'">
<OutDir>./../../lib/vc14win64\</OutDir>
<IntDir>./x64/SampleFramework-MT/debug\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>$(ProjectName)DEBUG</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='debug|x64'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<BasicRuntimeChecks>UninitializedLocalUsageCheck</BasicRuntimeChecks>
<AdditionalOptions>/EHsc /MP /Wall /wd4514 /wd4820 /wd4062 /wd4100 /wd4130 /wd4201 /wd4242 /wd4244 /wd4245 /wd4265 /wd4266 /wd4324 /wd4389 /wd4365 /wd4371 /wd4447 /wd4189 /wd4191 /wd4350 /wd4505 /wd4512 /wd4548 /wd4571 /wd4625 /wd4626 /wd4668 /wd4619 /wd4701 /wd4702 /wd4706 /wd4710 /wd4711 /wd4640 /wd4061 /wd4826 /wd4946 /wd4917 /wd4986 /wd4987 /wd4456 /wd4457 /wd4458 /wd4459 /wd4774 /wd4777 /wd5027 /wd5029 /wd4464 /d2Zi+</AdditionalOptions>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>./../../include;./../../../renderer/include;./../../../platform/include;./../../../../PxToolkit/include;./../../../../../../Externals/targa/1;./../../../../../Include;./../../../../../Source/Common/include;./../../../../../../PxShared/include;./../../../../../../PxShared/src/foundation/include;./../../../../../../PxShared/src/fastxml/include;./../../../../../../PxShared/src/pvd/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>PHYSX_PROFILE_SDK;WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;_DEBUG;PX_DEBUG=1;PX_CHECKED=1;PX_NVTX=1;PX_SUPPORT_PVD=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)DEBUG.lib</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<TargetMachine>MachineX64</TargetMachine>
</Lib>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'">
<OutDir>./../../lib/vc14win64\</OutDir>
<IntDir>./x64/SampleFramework-MT/release\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>$(ProjectName)</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='release|x64'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions>/EHsc /MP /Wall /wd4514 /wd4820 /wd4062 /wd4100 /wd4130 /wd4201 /wd4242 /wd4244 /wd4245 /wd4265 /wd4266 /wd4324 /wd4389 /wd4365 /wd4371 /wd4447 /wd4189 /wd4191 /wd4350 /wd4505 /wd4512 /wd4548 /wd4571 /wd4625 /wd4626 /wd4668 /wd4619 /wd4701 /wd4702 /wd4706 /wd4710 /wd4711 /wd4640 /wd4061 /wd4826 /wd4946 /wd4917 /wd4986 /wd4987 /wd4456 /wd4457 /wd4458 /wd4459 /wd4774 /wd4777 /wd5027 /wd5029 /wd4464 /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>./../../include;./../../../renderer/include;./../../../platform/include;./../../../../PxToolkit/include;./../../../../../../Externals/targa/1;./../../../../../Include;./../../../../../Source/Common/include;./../../../../../../PxShared/include;./../../../../../../PxShared/src/foundation/include;./../../../../../../PxShared/src/fastxml/include;./../../../../../../PxShared/src/pvd/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>PHYSX_PROFILE_SDK;WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;NDEBUG;PX_SUPPORT_PVD=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalOptions>/INCREMENTAL:NO</AdditionalOptions>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName).lib</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<TargetMachine>MachineX64</TargetMachine>
</Lib>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='checked|x64'">
<OutDir>./../../lib/vc14win64\</OutDir>
<IntDir>./x64/SampleFramework-MT/checked\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>$(ProjectName)CHECKED</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='checked|x64'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions>/EHsc /MP /Wall /wd4514 /wd4820 /wd4062 /wd4100 /wd4130 /wd4201 /wd4242 /wd4244 /wd4245 /wd4265 /wd4266 /wd4324 /wd4389 /wd4365 /wd4371 /wd4447 /wd4189 /wd4191 /wd4350 /wd4505 /wd4512 /wd4548 /wd4571 /wd4625 /wd4626 /wd4668 /wd4619 /wd4701 /wd4702 /wd4706 /wd4710 /wd4711 /wd4640 /wd4061 /wd4826 /wd4946 /wd4917 /wd4986 /wd4987 /wd4456 /wd4457 /wd4458 /wd4459 /wd4774 /wd4777 /wd5027 /wd5029 /wd4464 /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>./../../include;./../../../renderer/include;./../../../platform/include;./../../../../PxToolkit/include;./../../../../../../Externals/targa/1;./../../../../../Include;./../../../../../Source/Common/include;./../../../../../../PxShared/include;./../../../../../../PxShared/src/foundation/include;./../../../../../../PxShared/src/fastxml/include;./../../../../../../PxShared/src/pvd/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>PHYSX_PROFILE_SDK;WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;NDEBUG;PX_CHECKED=1;PX_NVTX=1;PX_SUPPORT_PVD=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)CHECKED.lib</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<TargetMachine>MachineX64</TargetMachine>
</Lib>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='profile|x64'">
<OutDir>./../../lib/vc14win64\</OutDir>
<IntDir>./x64/SampleFramework-MT/profile\</IntDir>
<TargetExt>.lib</TargetExt>
<TargetName>$(ProjectName)PROFILE</TargetName>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules />
<CodeAnalysisRuleAssemblies />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='profile|x64'">
<ClCompile>
<TreatWarningAsError>true</TreatWarningAsError>
<StringPooling>true</StringPooling>
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<BufferSecurityCheck>false</BufferSecurityCheck>
<FloatingPointModel>Fast</FloatingPointModel>
<AdditionalOptions>/EHsc /MP /Wall /wd4514 /wd4820 /wd4062 /wd4100 /wd4130 /wd4201 /wd4242 /wd4244 /wd4245 /wd4265 /wd4266 /wd4324 /wd4389 /wd4365 /wd4371 /wd4447 /wd4189 /wd4191 /wd4350 /wd4505 /wd4512 /wd4548 /wd4571 /wd4625 /wd4626 /wd4668 /wd4619 /wd4701 /wd4702 /wd4706 /wd4710 /wd4711 /wd4640 /wd4061 /wd4826 /wd4946 /wd4917 /wd4986 /wd4987 /wd4456 /wd4457 /wd4458 /wd4459 /wd4774 /wd4777 /wd5027 /wd5029 /wd4464 /d2Zi+</AdditionalOptions>
<Optimization>Full</Optimization>
<AdditionalIncludeDirectories>./../../include;./../../../renderer/include;./../../../platform/include;./../../../../PxToolkit/include;./../../../../../../Externals/targa/1;./../../../../../Include;./../../../../../Source/Common/include;./../../../../../../PxShared/include;./../../../../../../PxShared/src/foundation/include;./../../../../../../PxShared/src/fastxml/include;./../../../../../../PxShared/src/pvd/include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>PHYSX_PROFILE_SDK;WIN32;WIN64;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;NDEBUG;PX_PROFILE=1;PX_NVTX=1;PX_SUPPORT_PVD=1;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>false</ExceptionHandling>
<WarningLevel>Level4</WarningLevel>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile></PrecompiledHeaderFile>
<ProgramDataBaseFileName>$(TargetDir)\$(TargetName).pdb</ProgramDataBaseFileName>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Lib>
<AdditionalOptions>/INCREMENTAL:NO</AdditionalOptions>
<AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>
<OutputFile>$(OutDir)$(ProjectName)PROFILE.lib</OutputFile>
<AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ProgramDatabaseFile>$(TargetDir)\$(TargetName).pdb</ProgramDatabaseFile>
<TargetMachine>MachineX64</TargetMachine>
</Lib>
<ResourceCompile>
</ResourceCompile>
<ProjectReference>
<LinkLibraryDependencies>true</LinkLibraryDependencies>
</ProjectReference>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="..\..\include\AgPerfMonEventDefs.h">
</ClInclude>
<ClInclude Include="..\..\include\FrameworkFoundation.h">
</ClInclude>
<ClInclude Include="..\..\include\ODBlock.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleActor.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleApplication.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleArray.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleAsset.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleAssetManager.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleCommandLine.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleDirManager.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleFilesystem.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleFrameworkInputEventIds.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleInputAsset.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleLineDebugRender.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleMaterialAsset.h">
</ClInclude>
<ClInclude Include="..\..\include\SamplePointDebugRender.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleTextureAsset.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleTree.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleTriangleDebugRender.h">
</ClInclude>
<ClInclude Include="..\..\include\SampleXml.h">
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\windows\WindowsSampleAssetManager.cpp">
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\src\nv_dds.h">
</ClInclude>
<ClCompile Include="..\..\src\nv_dds.cpp">
</ClCompile>
<ClCompile Include="..\..\src\ODBlock.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleApplication.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleAsset.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleAssetManager.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleCommandLine.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleDirManager.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleInputAsset.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleLineDebugRender.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleMaterialAsset.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SamplePointDebugRender.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleTextureAsset.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleTree.cpp">
</ClCompile>
<ClCompile Include="..\..\src\SampleTriangleDebugRender.cpp">
</ClCompile>
<ClInclude Include="..\..\..\..\..\..\Externals\targa\1\targa.h">
</ClInclude>
<ClCompile Include="..\..\..\..\..\..\Externals\targa\1\targa.cpp">
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets"></ImportGroup>
</Project>
``` | /content/code_sandbox/PhysX_3.4/Samples/SampleFramework/framework/compiler/vc14win64/SampleFramework-MT.vcxproj | xml | 2016-10-12T16:34:31 | 2024-08-16T09:40:38 | PhysX-3.4 | NVIDIAGameWorks/PhysX-3.4 | 2,343 | 5,078 |
```xml
import { trim } from "./String.js";
import { FSharpRef } from "./Types.js";
// RFC 4122 compliant. From path_to_url
// const guidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;
// Relax GUID parsing, see #1637
const guidRegex = /^[\(\{]{0,2}[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}[\)\}]{0,2}$/;
const guidRegexNoHyphen = /^([0-9a-f]{8})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{4})([0-9a-f]{12})$/;
const guidRegexHex = /^\{0x[0-9a-f]{8},(0x[0-9a-f]{4},){2}\{(0x[0-9a-f]{2},){7}0x[0-9a-f]{2}\}\}$/;
const guidHexCaptures = /^([0-9a-f]{8})-(([0-9a-f]{4})-)(([0-9a-f]{4})-)([0-9a-f]{2})([0-9a-f]{2})-([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/;
export function toString(str: string, format?: string, _provider?: any) {
if (format && format?.length > 0) {
switch (format) {
case "N":
return str.replace(/-/g, '');
case "D":
return str;
case "B":
return "{" + str + "}";
case "P":
return "(" + str + ")";
case "X":
return str.replace(guidHexCaptures, "{0x$1,0x$3,0x$5,{0x$6,0x$7,0x$8,0x$9,0x$10,0x$11,0x$12,0x$13}}");
default:
throw new Error("Unrecognized Guid print format");
}
}
else {
return str;
}
}
/** Validates UUID as specified in RFC4122 (versions 1-5). */
export function parse(str: string): string {
function hyphenateGuid(str: string) {
return str.replace(guidRegexNoHyphen, "$1-$2-$3-$4-$5");
}
const wsTrimAndLowered = str.trim().toLowerCase();
if (guidRegex.test(wsTrimAndLowered)) {
return trim(wsTrimAndLowered, "{", "}", "(", ")");
}
else if (guidRegexNoHyphen.test(wsTrimAndLowered)) {
return hyphenateGuid(wsTrimAndLowered);
}
else if (guidRegexHex.test(wsTrimAndLowered)) {
return hyphenateGuid(wsTrimAndLowered.replace(/[\{\},]|0x/g, ''));
}
else {
throw new Error("Guid should contain 32 digits with 4 dashes: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx");
}
}
export function tryParse(str: string, defValue: FSharpRef<string>): boolean {
try {
defValue.contents = parse(str);
return true;
} catch {
return false;
}
}
// From path_to_url
export function newGuid() {
let b = "";
for (let a = 0; a++ < 36;) {
b += a * 51 & 52
? (a ^ 15 ? 8 ^ Math.random() * (a ^ 20 ? 16 : 4) : 4).toString(16)
: "-";
}
return b;
}
// Maps for number <-> hex string conversion
let _convertMapsInitialized = false;
let _byteToHex: string[];
let _hexToByte: { [k: string]: number };
function initConvertMaps() {
_byteToHex = new Array(256);
_hexToByte = {};
for (let i = 0; i < 256; i++) {
_byteToHex[i] = (i + 0x100).toString(16).substr(1);
_hexToByte[_byteToHex[i]] = i;
}
_convertMapsInitialized = true;
}
/** Parse a UUID into it's component bytes */
// Adapted from path_to_url
export function guidToArray(s: string): number[] {
if (!_convertMapsInitialized) {
initConvertMaps();
}
let i = 0;
const buf = new Uint8Array(16);
s.toLowerCase().replace(/[0-9a-f]{2}/g, ((oct: number) => {
switch (i) {
// .NET saves first three byte groups with different endianness
// See path_to_url
case 0: case 1: case 2: case 3:
buf[3 - i++] = _hexToByte[oct];
break;
case 4: case 5:
buf[9 - i++] = _hexToByte[oct];
break;
case 6: case 7:
buf[13 - i++] = _hexToByte[oct];
break;
case 8: case 9: case 10: case 11:
case 12: case 13: case 14: case 15:
buf[i++] = _hexToByte[oct];
break;
}
}) as any);
// Zero out remaining bytes if string was short
while (i < 16) {
buf[i++] = 0;
}
return buf as any as number[];
}
/** Convert UUID byte array into a string */
export function arrayToGuid(buf: ArrayLike<number>) {
if (buf.length !== 16) {
throw new Error("Byte array for GUID must be exactly 16 bytes long");
}
if (!_convertMapsInitialized) {
initConvertMaps();
}
const guid =
_byteToHex[buf[3]] + _byteToHex[buf[2]] +
_byteToHex[buf[1]] + _byteToHex[buf[0]] + "-" +
_byteToHex[buf[5]] + _byteToHex[buf[4]] + "-" +
_byteToHex[buf[7]] + _byteToHex[buf[6]] + "-" +
_byteToHex[buf[8]] + _byteToHex[buf[9]] + "-" +
_byteToHex[buf[10]] + _byteToHex[buf[11]] +
_byteToHex[buf[12]] + _byteToHex[buf[13]] +
_byteToHex[buf[14]] + _byteToHex[buf[15]];
return guid;
}
``` | /content/code_sandbox/src/fable-library-ts/Guid.ts | xml | 2016-01-11T10:10:13 | 2024-08-15T11:42:55 | Fable | fable-compiler/Fable | 2,874 | 1,598 |
```xml
export const testTransformer = {
to(data: any) {
if ("secretProperty" in data) {
data.secretProperty = `secret-${data.secretProperty}`
}
return data
},
from(data: any) {
if ("secretProperty" in data) {
data.secretProperty = data.secretProperty.split("-")[1]
}
return data
},
}
``` | /content/code_sandbox/test/other-issues/transformed-json-column-update-compute/test-transformer.ts | xml | 2016-02-29T07:41:14 | 2024-08-16T18:28:52 | typeorm | typeorm/typeorm | 33,875 | 83 |
```xml
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="22154" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="yFB-aB-OIQ">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="22130"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
<!--Message Threads View Controller-->
<scene sceneID="P55-8N-qhm">
<objects>
<tableViewController storyboardIdentifier="MessageThreadsViewController" id="yFB-aB-OIQ" customClass="MessageThreadsViewController" customModule="Kickstarter_Framework" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="263" sectionHeaderHeight="28" sectionFooterHeight="28" id="JPs-5R-KLR">
<rect key="frame" x="0.0" y="0.0" width="600" height="700"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="0.89916485548019409" green="0.89916485548019409" blue="0.89916485548019409" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<view key="tableFooterView" contentMode="scaleToFill" id="deu-qY-IHG">
<rect key="frame" x="0.0" y="462" width="600" height="128"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" animating="YES" style="white" translatesAutoresizingMaskIntoConstraints="NO" id="EgG-hc-Wh2">
<rect key="frame" x="290" y="54" width="20" height="20"/>
<color key="color" red="0.33333333333333331" green="0.33333333333333331" blue="0.33333333333333331" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="EgG-hc-Wh2" firstAttribute="centerY" secondItem="deu-qY-IHG" secondAttribute="centerY" id="0jq-dR-Rim"/>
<constraint firstItem="EgG-hc-Wh2" firstAttribute="centerX" secondItem="deu-qY-IHG" secondAttribute="centerX" id="40A-Ur-gGG"/>
</constraints>
</view>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="MessageThreadCell" rowHeight="144" id="l2W-ka-UdQ" customClass="MessageThreadCell" customModule="Kickstarter_Framework" customModuleProvider="target">
<rect key="frame" x="0.0" y="50" width="600" height="144"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="l2W-ka-UdQ" id="wYZ-iD-HLA">
<rect key="frame" x="0.0" y="0.0" width="600" height="144"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="gPK-Yn-d2r" userLabel="Columns">
<rect key="frame" x="20" y="20" width="560" height="41"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jbD-P7-pYZ" customClass="CircleAvatarImageView" customModule="Library">
<rect key="frame" x="0.0" y="5.5" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="a0Y-p1-kW5"/>
<constraint firstAttribute="width" secondItem="jbD-P7-pYZ" secondAttribute="height" multiplier="1:1" id="hef-zx-XsP"/>
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="8cg-r9-Iid" userLabel="Right column">
<rect key="frame" x="42" y="0.0" width="518" height="41"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="YNt-Wr-N1U" userLabel="Title">
<rect key="frame" x="0.0" y="0.0" width="518" height="41"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="dGG-pU-r3O" userLabel="Creator/project">
<rect key="frame" x="0.0" y="0.0" width="485.5" height="41"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="D5S-b0-Pzg" userLabel="Creator">
<rect key="frame" x="0.0" y="0.0" width="485.5" height="20.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text="<" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PGN-kk-HxE">
<rect key="frame" x="0.0" y="0.0" width="10.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="1000" verticalCompressionResistancePriority="1000" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hgR-mz-tiu" userLabel="Participant">
<rect key="frame" x="14.5" y="0.0" width="471" 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>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9d8-NG-RaR" userLabel="Project">
<rect key="frame" x="0.0" y="20.5" width="485.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>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="1000" horizontalCompressionResistancePriority="1000" verticalCompressionResistancePriority="1000" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s5h-ra-INx" userLabel="Date">
<rect key="frame" x="491.5" y="10.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>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3ZH-YI-NS3" userLabel="Read indicator">
<rect key="frame" x="502" y="12.5" width="16" height="16"/>
<color key="backgroundColor" red="0.011764705882352941" green="0.45098039215686275" blue="0.38431372549019605" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="width" secondItem="3ZH-YI-NS3" secondAttribute="height" multiplier="1:1" id="Rgg-V1-eGK"/>
<constraint firstAttribute="width" constant="16" id="gdx-gv-snu"/>
</constraints>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="8"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
</view>
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
</stackView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="1000" verticalCompressionResistancePriority="1000" text=" " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="5" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b3x-3Q-dJO">
<rect key="frame" x="20" y="73" width="560" 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>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="v05-To-rtd" userLabel="Divider">
<rect key="frame" x="0.0" y="143" width="600" height="1"/>
<color key="backgroundColor" red="0.66666666666666663" green="0.66666666666666663" blue="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="Fuh-Uo-ZFr"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="b3x-3Q-dJO" firstAttribute="leading" secondItem="YNt-Wr-N1U" secondAttribute="leading" id="BW2-gQ-sc0"/>
<constraint firstItem="b3x-3Q-dJO" firstAttribute="top" secondItem="gPK-Yn-d2r" secondAttribute="bottom" constant="12" id="Hfc-M3-ppQ"/>
<constraint firstItem="v05-To-rtd" firstAttribute="leading" secondItem="wYZ-iD-HLA" secondAttribute="leading" id="TE9-et-qSJ"/>
<constraint firstAttribute="trailing" secondItem="v05-To-rtd" secondAttribute="trailing" id="Ucn-rK-nZy"/>
<constraint firstAttribute="leadingMargin" secondItem="gPK-Yn-d2r" secondAttribute="leading" id="Uid-9d-ZFV"/>
<constraint firstAttribute="topMargin" secondItem="gPK-Yn-d2r" secondAttribute="top" id="Vck-eG-4ce"/>
<constraint firstAttribute="trailingMargin" secondItem="gPK-Yn-d2r" secondAttribute="trailing" id="cyn-gh-NyO"/>
<constraint firstAttribute="bottom" secondItem="v05-To-rtd" secondAttribute="bottom" id="fv4-uj-yqe"/>
<constraint firstAttribute="trailingMargin" secondItem="b3x-3Q-dJO" secondAttribute="trailing" id="lVU-BW-u6o"/>
<constraint firstAttribute="bottomMargin" relation="greaterThanOrEqual" secondItem="b3x-3Q-dJO" secondAttribute="bottom" id="qaU-VH-HnA"/>
<constraint firstItem="b3x-3Q-dJO" firstAttribute="leading" secondItem="wYZ-iD-HLA" secondAttribute="leadingMargin" id="v2G-Me-zQf"/>
</constraints>
<edgeInsets key="layoutMargins" top="20" left="16" bottom="20" right="16"/>
<variation key="default">
<mask key="constraints">
<exclude reference="BW2-gQ-sc0"/>
</mask>
</variation>
</tableViewCellContentView>
<connections>
<outlet property="avatarImageView" destination="jbD-P7-pYZ" id="lCo-fn-Ar7"/>
<outlet property="bodyLabel" destination="b3x-3Q-dJO" id="cxX-jd-0PS"/>
<outlet property="dateLabel" destination="s5h-ra-INx" id="LaR-MZ-c3c"/>
<outlet property="dividerView" destination="v05-To-rtd" id="wy7-Rt-5m5"/>
<outlet property="nameLabel" destination="hgR-mz-tiu" id="Jal-Jf-CZV"/>
<outlet property="projectNameLabel" destination="9d8-NG-RaR" id="9B9-UD-XH7"/>
<outlet property="replyIndicator" destination="PGN-kk-HxE" id="dCz-hH-nQH"/>
<outlet property="unreadIndicatorView" destination="3ZH-YI-NS3" id="eAU-vM-yeL"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="MessageThreadEmptyStateCell" rowHeight="240" id="vqA-cz-Nls" customClass="MessageThreadEmptyStateCell" customModule="Kickstarter_Framework" customModuleProvider="target">
<rect key="frame" x="0.0" y="194" width="600" height="240"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="vqA-cz-Nls" id="IB1-HW-4CI">
<rect key="frame" x="0.0" y="0.0" width="600" height="240"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PxH-QE-tWd">
<rect key="frame" x="298" y="20" width="4.5" height="200"/>
<constraints>
<constraint firstAttribute="height" constant="200" id="j6G-z7-22P"/>
</constraints>
<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"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedKey" value="messages.empty_state.title"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<constraints>
<constraint firstAttribute="bottomMargin" secondItem="PxH-QE-tWd" secondAttribute="bottom" id="9eb-Sf-abN"/>
<constraint firstItem="PxH-QE-tWd" firstAttribute="top" secondItem="IB1-HW-4CI" secondAttribute="topMargin" id="P30-OU-ixb"/>
<constraint firstItem="PxH-QE-tWd" firstAttribute="centerX" secondItem="IB1-HW-4CI" secondAttribute="centerX" id="QSA-fb-pvh"/>
</constraints>
<edgeInsets key="layoutMargins" top="20" left="16" bottom="20" right="16"/>
</tableViewCellContentView>
<connections>
<outlet property="titleLabel" destination="PxH-QE-tWd" id="Wsi-RZ-lAD"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="yFB-aB-OIQ" id="9Xj-pG-NnI"/>
<outlet property="delegate" destination="yFB-aB-OIQ" id="cMp-vH-X4F"/>
</connections>
</tableView>
<navigationItem key="navigationItem" id="a3v-ch-wXy">
<nil key="title"/>
<view key="titleView" contentMode="scaleToFill" id="hXL-pP-icR">
<rect key="frame" x="59" y="5.5" width="478" height="33"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="djz-c8-ji0">
<rect key="frame" x="224" y="0.0" width="30" height="33"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Znl-pP-aP1" userLabel="Inbox">
<rect key="frame" x="0.0" y="6.5" width="15" 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>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" image="arrow-down" translatesAutoresizingMaskIntoConstraints="NO" id="EW3-b0-MFq">
<rect key="frame" x="19" y="13.5" width="11" height="6"/>
</imageView>
</subviews>
</stackView>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4DR-RI-47z" userLabel="Button overlay">
<rect key="frame" x="224" y="0.0" width="30" height="33"/>
<connections>
<action selector="mailboxButtonPressed" destination="yFB-aB-OIQ" eventType="touchUpInside" id="ORI-4T-IEv"/>
</connections>
</button>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="djz-c8-ji0" firstAttribute="centerX" secondItem="hXL-pP-icR" secondAttribute="centerX" id="7FA-KG-gXF"/>
<constraint firstItem="4DR-RI-47z" firstAttribute="top" secondItem="djz-c8-ji0" secondAttribute="top" id="8gH-Xx-ysN"/>
<constraint firstItem="4DR-RI-47z" firstAttribute="trailing" secondItem="djz-c8-ji0" secondAttribute="trailing" id="C3m-Qf-LbQ"/>
<constraint firstItem="djz-c8-ji0" firstAttribute="top" secondItem="hXL-pP-icR" secondAttribute="top" id="Igo-Ux-kbr"/>
<constraint firstItem="4DR-RI-47z" firstAttribute="leading" secondItem="djz-c8-ji0" secondAttribute="leading" id="JMS-T1-Ncg"/>
<constraint firstItem="djz-c8-ji0" firstAttribute="leading" relation="greaterThanOrEqual" secondItem="hXL-pP-icR" secondAttribute="leading" id="M2L-mV-abY"/>
<constraint firstAttribute="bottom" secondItem="djz-c8-ji0" secondAttribute="bottom" id="bZ4-CF-aQQ"/>
<constraint firstItem="4DR-RI-47z" firstAttribute="bottom" secondItem="djz-c8-ji0" secondAttribute="bottom" id="pur-zB-7jo"/>
<constraint firstAttribute="trailing" relation="greaterThanOrEqual" secondItem="djz-c8-ji0" secondAttribute="trailing" id="t5g-dD-Ufs"/>
</constraints>
</view>
<barButtonItem key="rightBarButtonItem" systemItem="search" id="zNP-Qy-ejr">
<connections>
<action selector="searchButtonPressed" destination="yFB-aB-OIQ" id="M8H-e8-jhu"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
<size key="freeformSize" width="600" height="700"/>
<refreshControl key="refreshControl" opaque="NO" multipleTouchEnabled="YES" contentMode="center" enabled="NO" contentHorizontalAlignment="center" contentVerticalAlignment="center" id="mxh-Le-zmc">
<rect key="frame" x="0.0" y="0.0" width="1000" height="1000"/>
<autoresizingMask key="autoresizingMask"/>
<connections>
<action selector="refresh" destination="yFB-aB-OIQ" eventType="valueChanged" id="fJ2-6C-eDb"/>
</connections>
</refreshControl>
<connections>
<outlet property="footerView" destination="deu-qY-IHG" id="ahc-Xt-8oT"/>
<outlet property="mailboxLabel" destination="Znl-pP-aP1" id="REF-Wk-PA7"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="90D-8r-bFu" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="0.0" y="600"/>
</scene>
<!--Messages View Controller-->
<scene sceneID="RSV-1C-aw1">
<objects>
<tableViewController storyboardIdentifier="MessagesViewController" id="KOm-AI-SFW" customClass="MessagesViewController" customModule="Kickstarter_Framework" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="276" sectionHeaderHeight="28" sectionFooterHeight="28" id="Edz-55-n26">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="ProjectBannerCell" rowHeight="100" id="SBu-uT-MDM" customClass="ProjectBannerCell" customModule="Kickstarter_Framework" customModuleProvider="target">
<rect key="frame" x="0.0" y="50" width="375" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="SBu-uT-MDM" id="bqP-Xq-XZd">
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="GVL-Pw-yP3" userLabel="Project image">
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
<constraints>
<constraint firstAttribute="height" constant="100" id="elb-Ir-lqs"/>
</constraints>
</imageView>
<view userInteractionEnabled="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1kj-f5-IW7" userLabel="Overlay">
<rect key="frame" x="0.0" y="0.0" width="375" height="100"/>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.59999999999999998" colorSpace="custom" customColorSpace="sRGB"/>
</view>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="g2Q-TP-sni">
<rect key="frame" x="32" y="27.5" width="311" height="45"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="za2-w2-tfM">
<rect key="frame" x="153.5" y="0.0" width="4.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TPK-l8-Xlt">
<rect key="frame" x="153.5" y="24.5" width="4.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstItem="1kj-f5-IW7" firstAttribute="top" secondItem="GVL-Pw-yP3" secondAttribute="top" id="3gb-mB-vLU"/>
<constraint firstAttribute="trailing" secondItem="GVL-Pw-yP3" secondAttribute="trailing" id="5Nu-we-r2Z"/>
<constraint firstItem="1kj-f5-IW7" firstAttribute="bottom" secondItem="GVL-Pw-yP3" secondAttribute="bottom" id="6nU-76-Zda"/>
<constraint firstItem="g2Q-TP-sni" firstAttribute="centerY" secondItem="bqP-Xq-XZd" secondAttribute="centerY" id="9Hf-hI-o19"/>
<constraint firstAttribute="leadingMargin" secondItem="g2Q-TP-sni" secondAttribute="leading" id="HBo-Xp-HX0"/>
<constraint firstItem="GVL-Pw-yP3" firstAttribute="leading" secondItem="bqP-Xq-XZd" secondAttribute="leading" id="RE9-jN-ke2"/>
<constraint firstAttribute="bottom" secondItem="GVL-Pw-yP3" secondAttribute="bottom" id="ZVU-Gg-Jyp"/>
<constraint firstItem="1kj-f5-IW7" firstAttribute="trailing" secondItem="GVL-Pw-yP3" secondAttribute="trailing" id="dgU-6m-Khg"/>
<constraint firstItem="1kj-f5-IW7" firstAttribute="leading" secondItem="GVL-Pw-yP3" secondAttribute="leading" id="eYI-Mc-afB"/>
<constraint firstItem="GVL-Pw-yP3" firstAttribute="top" secondItem="bqP-Xq-XZd" secondAttribute="top" id="pyv-4d-hXm"/>
<constraint firstAttribute="trailingMargin" secondItem="g2Q-TP-sni" secondAttribute="trailing" id="vdr-ci-Dtp"/>
</constraints>
<edgeInsets key="layoutMargins" top="16" left="32" bottom="16" right="32"/>
</tableViewCellContentView>
<connections>
<outlet property="creatorNameLabel" destination="TPK-l8-Xlt" id="yRg-iI-mCS"/>
<outlet property="projectImageView" destination="GVL-Pw-yP3" id="3o3-gY-XeN"/>
<outlet property="projectNameLabel" destination="za2-w2-tfM" id="D87-gi-aKf"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="BackingCell" rowHeight="151" id="QBO-Pf-T8b" customClass="BackingCell" customModule="Kickstarter_Framework" customModuleProvider="target">
<rect key="frame" x="0.0" y="150" width="375" height="151"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="QBO-Pf-T8b" id="JCs-BM-aRW">
<rect key="frame" x="0.0" y="0.0" width="375" height="151"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="top" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="B3F-ed-Vcy">
<rect key="frame" x="16" y="16" width="343" height="119"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hiD-lc-kis">
<rect key="frame" x="0.0" y="0.0" width="4.5" height="16"/>
<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="751" text=" " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="PSG-vO-xho">
<rect key="frame" x="0.0" y="28" 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" verticalCompressionResistancePriority="752" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mu8-4u-cQG">
<rect key="frame" x="0.0" y="60.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>
<button opaque="NO" contentMode="scaleToFill" verticalCompressionResistancePriority="751" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LMM-Dq-icR">
<rect key="frame" x="0.0" y="93" width="12" height="26"/>
<inset key="contentEdgeInsets" minX="6" minY="4" maxX="6" maxY="4"/>
</button>
</subviews>
</stackView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zmT-ss-9s7" userLabel="Divider">
<rect key="frame" x="0.0" y="150" width="375" height="1"/>
<color key="backgroundColor" red="0.89870691299438477" green="0.89870691299438477" blue="0.89870691299438477" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="5ug-wE-GoS"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="bottom" secondItem="zmT-ss-9s7" secondAttribute="bottom" id="8BV-00-h3j"/>
<constraint firstAttribute="topMargin" secondItem="B3F-ed-Vcy" secondAttribute="top" id="8Zj-zh-6wM"/>
<constraint firstAttribute="leadingMargin" secondItem="B3F-ed-Vcy" secondAttribute="leading" id="9FE-gT-3nO"/>
<constraint firstItem="zmT-ss-9s7" firstAttribute="leading" secondItem="JCs-BM-aRW" secondAttribute="leading" id="F1d-VY-Esh"/>
<constraint firstAttribute="bottomMargin" relation="greaterThanOrEqual" secondItem="B3F-ed-Vcy" secondAttribute="bottom" id="Tzl-fj-4lr"/>
<constraint firstAttribute="trailingMargin" secondItem="B3F-ed-Vcy" secondAttribute="trailing" id="XyT-34-E7j"/>
<constraint firstAttribute="trailing" secondItem="zmT-ss-9s7" secondAttribute="trailing" id="eIW-Ed-U54"/>
</constraints>
<edgeInsets key="layoutMargins" top="16" left="16" bottom="16" right="16"/>
</tableViewCellContentView>
<connections>
<outlet property="backingInfoButton" destination="LMM-Dq-icR" id="K0F-jf-fXK"/>
<outlet property="deliveryLabel" destination="Mu8-4u-cQG" id="aiz-yX-N2f"/>
<outlet property="dividerView" destination="zmT-ss-9s7" id="NQJ-pg-7sw"/>
<outlet property="pledgedLabel" destination="hiD-lc-kis" id="OsV-yR-BpX"/>
<outlet property="rewardLabel" destination="PSG-vO-xho" id="6h9-FB-QSj"/>
<outlet property="rootStackView" destination="B3F-ed-Vcy" id="VQa-Hi-Fod"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" reuseIdentifier="MessageCell" rowHeight="224" id="1CQ-oa-tT0" customClass="MessageCell" customModule="Kickstarter_Framework" customModuleProvider="target">
<rect key="frame" x="0.0" y="301" width="375" height="224"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="1CQ-oa-tT0" id="pbd-8D-E59">
<rect key="frame" x="0.0" y="0.0" width="375" height="224"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="MSI-sr-pEx">
<rect key="frame" x="16" y="24" width="343" height="126"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="7yZ-zi-40N" userLabel="Participant columns">
<rect key="frame" x="0.0" y="0.0" width="343" height="126"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="VSK-GU-slE" customClass="CircleAvatarImageView" customModule="Library">
<rect key="frame" x="0.0" y="48" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" secondItem="VSK-GU-slE" secondAttribute="height" multiplier="1:1" id="O2l-cX-l3M"/>
<constraint firstAttribute="width" constant="30" id="Y0M-de-4CQ"/>
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="36b-UU-RXR">
<rect key="frame" x="38" y="40.5" width="305" height="45"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="VYT-5C-ilX">
<rect key="frame" x="0.0" y="0.0" width="305" 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="749" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zy4-NP-7pr">
<rect key="frame" x="0.0" y="24.5" width="305" 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>
</stackView>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" scrollEnabled="NO" editable="NO" text=" " textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="kdj-gb-c9F" userLabel="Body text view">
<rect key="frame" x="16" y="162" width="343" height="38"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<edgeInsets key="layoutMargins" top="0.0" left="0.0" bottom="0.0" right="0.0"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<dataDetectorType key="dataDetectorTypes" phoneNumber="YES" link="YES" address="YES"/>
</textView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6eM-fG-YW9" userLabel="Divider">
<rect key="frame" x="0.0" y="223" width="375" height="1"/>
<color key="backgroundColor" red="0.89870691299438477" green="0.89870691299438477" blue="0.89870691299438477" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="rKw-M9-ENJ"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstAttribute="topMargin" secondItem="MSI-sr-pEx" secondAttribute="top" id="HSd-Ve-Wx5"/>
<constraint firstAttribute="leadingMargin" secondItem="MSI-sr-pEx" secondAttribute="leading" id="L4K-5l-IVd"/>
<constraint firstItem="6eM-fG-YW9" firstAttribute="leading" secondItem="pbd-8D-E59" secondAttribute="leading" id="Uok-yG-VmH"/>
<constraint firstAttribute="trailing" secondItem="6eM-fG-YW9" secondAttribute="trailing" id="VHY-Wt-iHm"/>
<constraint firstItem="kdj-gb-c9F" firstAttribute="top" secondItem="MSI-sr-pEx" secondAttribute="bottom" constant="12" id="XWc-1v-OeG"/>
<constraint firstItem="kdj-gb-c9F" firstAttribute="leading" secondItem="pbd-8D-E59" secondAttribute="leadingMargin" id="Xk2-Aa-eTd"/>
<constraint firstAttribute="bottomMargin" secondItem="kdj-gb-c9F" secondAttribute="bottom" id="cWl-5T-Dqx"/>
<constraint firstAttribute="bottom" secondItem="6eM-fG-YW9" secondAttribute="bottom" id="ciB-AY-ZxO"/>
<constraint firstAttribute="trailingMargin" secondItem="kdj-gb-c9F" secondAttribute="trailing" id="d5n-Ua-hxj"/>
<constraint firstAttribute="trailingMargin" secondItem="MSI-sr-pEx" secondAttribute="trailing" id="hYS-Hj-SrG"/>
</constraints>
<edgeInsets key="layoutMargins" top="24" left="16" bottom="24" right="16"/>
</tableViewCellContentView>
<connections>
<outlet property="avatarImageView" destination="VSK-GU-slE" id="DFW-5f-eCs"/>
<outlet property="bodyTextView" destination="kdj-gb-c9F" id="abF-8U-jbn"/>
<outlet property="dividerView" destination="6eM-fG-YW9" id="ERI-Rg-Beg"/>
<outlet property="nameLabel" destination="VYT-5C-ilX" id="Zhr-BM-VS7"/>
<outlet property="participantStackView" destination="7yZ-zi-40N" id="s13-Ef-2Ho"/>
<outlet property="timestampLabel" destination="Zy4-NP-7pr" id="PKh-Qx-jfT"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MessagesEmptyStateCell" id="Owp-Ro-40y" customClass="MessagesEmptyStateCell" customModule="Kickstarter_Framework" customModuleProvider="target">
<rect key="frame" x="0.0" y="525" width="375" height="276"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Owp-Ro-40y" id="g7V-Av-1UN">
<rect key="frame" x="0.0" y="0.0" width="375" height="276"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" alignment="center" spacing="6" translatesAutoresizingMaskIntoConstraints="NO" id="PEl-WY-5MM">
<rect key="frame" x="16" y="11" width="343" height="47"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="noU-XM-ZIV">
<rect key="frame" x="169.5" y="0.0" width="4.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="JW9-94-YoX">
<rect key="frame" x="169.5" y="26.5" width="4.5" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="bottomMargin" relation="greaterThanOrEqual" secondItem="PEl-WY-5MM" secondAttribute="bottom" id="C6a-Iu-U33"/>
<constraint firstItem="PEl-WY-5MM" firstAttribute="leading" secondItem="g7V-Av-1UN" secondAttribute="leadingMargin" id="UBs-mz-w3k"/>
<constraint firstAttribute="trailingMargin" secondItem="PEl-WY-5MM" secondAttribute="trailing" id="sx9-MP-Ehc"/>
<constraint firstItem="PEl-WY-5MM" firstAttribute="top" secondItem="g7V-Av-1UN" secondAttribute="topMargin" id="xOM-n8-RyM"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="subTitleLabel" destination="JW9-94-YoX" id="PJy-8t-wTb"/>
<outlet property="titleLabel" destination="noU-XM-ZIV" id="e8p-8R-Eys"/>
</connections>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="KOm-AI-SFW" id="Hjy-oc-GE3"/>
<outlet property="delegate" destination="KOm-AI-SFW" id="kDG-iU-XaR"/>
</connections>
</tableView>
<navigationItem key="navigationItem" id="pUe-X9-gXs">
<barButtonItem key="rightBarButtonItem" enabled="NO" id="mFf-pV-0Nc">
<connections>
<action selector="replyButtonPressed" destination="KOm-AI-SFW" id="Cxt-yR-ytl"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<connections>
<outlet property="replyBarButtonItem" destination="mFf-pV-0Nc" id="RFW-bW-5PO"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="K56-Hq-aZ4" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="983" y="245"/>
</scene>
<!--Search Messages View Controller-->
<scene sceneID="nFO-hW-oyb">
<objects>
<tableViewController storyboardIdentifier="SearchMessagesViewController" id="ycB-Uw-jvw" customClass="SearchMessagesViewController" customModule="Kickstarter_Framework" customModuleProvider="target" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="120" sectionHeaderHeight="28" sectionFooterHeight="28" id="Wgk-WN-l7W">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="MessageThreadCell" rowHeight="232" id="Zy0-qU-Q0n" customClass="MessageThreadCell" customModule="Kickstarter_Framework" customModuleProvider="target">
<rect key="frame" x="0.0" y="50" width="375" height="232"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="Zy0-qU-Q0n" id="f4a-bV-TWc">
<rect key="frame" x="0.0" y="0.0" width="375" height="232"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="12" translatesAutoresizingMaskIntoConstraints="NO" id="3w4-fk-EQY">
<rect key="frame" x="16" y="20" width="339" height="41"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="ucU-Uw-YzA" customClass="CircleAvatarImageView" customModule="Library">
<rect key="frame" x="0.0" y="5.5" width="30" height="30"/>
<constraints>
<constraint firstAttribute="width" constant="30" id="2w0-8h-KjQ"/>
<constraint firstAttribute="width" secondItem="ucU-Uw-YzA" secondAttribute="height" multiplier="1:1" id="j3x-vZ-GzS"/>
</constraints>
</imageView>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Vfj-hT-uWm">
<rect key="frame" x="42" y="0.0" width="280.5" height="41"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="SoJ-cd-iop">
<rect key="frame" x="0.0" y="0.0" width="280.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" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v7h-H9-QHo">
<rect key="frame" x="0.0" y="20.5" width="280.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>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="1000" verticalHuggingPriority="251" horizontalCompressionResistancePriority="1000" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ZDP-QP-pKb">
<rect key="frame" x="334.5" y="10.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>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" misplaced="YES" text=" " textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="4" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qID-4n-SSH">
<rect key="frame" x="16" y="78" width="564" height="82"/>
<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" translatesAutoresizingMaskIntoConstraints="NO" id="gAa-cM-dtE" userLabel="Divider">
<rect key="frame" x="0.0" y="231" width="375" height="1"/>
<color key="backgroundColor" red="0.89870691299438477" green="0.89870691299438477" blue="0.89870691299438477" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="height" constant="1" id="dJl-kW-19v"/>
</constraints>
</view>
</subviews>
<constraints>
<constraint firstItem="gAa-cM-dtE" firstAttribute="leading" secondItem="f4a-bV-TWc" secondAttribute="leading" id="05t-bd-plN"/>
<constraint firstAttribute="trailingMargin" secondItem="qID-4n-SSH" secondAttribute="trailing" id="2w2-X6-zeQ"/>
<constraint firstAttribute="bottomMargin" relation="greaterThanOrEqual" secondItem="qID-4n-SSH" secondAttribute="bottom" id="3SI-vz-Cor"/>
<constraint firstAttribute="bottom" secondItem="gAa-cM-dtE" secondAttribute="bottom" id="5VI-Xt-qX7"/>
<constraint firstAttribute="trailing" secondItem="gAa-cM-dtE" secondAttribute="trailing" id="9hw-X1-r3Q"/>
<constraint firstAttribute="topMargin" secondItem="3w4-fk-EQY" secondAttribute="top" id="QeJ-Ra-uQY"/>
<constraint firstAttribute="leadingMargin" secondItem="3w4-fk-EQY" secondAttribute="leading" id="TDJ-fu-rps"/>
<constraint firstItem="qID-4n-SSH" firstAttribute="top" secondItem="3w4-fk-EQY" secondAttribute="bottom" constant="16" id="XSp-nT-O4b"/>
<constraint firstItem="qID-4n-SSH" firstAttribute="leading" secondItem="v7h-H9-QHo" secondAttribute="leading" id="mhm-jD-Mle"/>
<constraint firstItem="qID-4n-SSH" firstAttribute="leading" secondItem="f4a-bV-TWc" secondAttribute="leadingMargin" id="six-fx-sJf"/>
<constraint firstAttribute="trailingMargin" secondItem="3w4-fk-EQY" secondAttribute="trailing" id="tyd-4F-Rir"/>
</constraints>
<edgeInsets key="layoutMargins" top="20" left="16" bottom="16" right="20"/>
<variation key="default">
<mask key="constraints">
<exclude reference="mhm-jD-Mle"/>
</mask>
</variation>
</tableViewCellContentView>
<connections>
<outlet property="avatarImageView" destination="ucU-Uw-YzA" id="seI-2b-gTe"/>
<outlet property="bodyLabel" destination="qID-4n-SSH" id="Gai-Bq-Sk3"/>
<outlet property="dateLabel" destination="ZDP-QP-pKb" id="cSW-xI-qj7"/>
<outlet property="dividerView" destination="gAa-cM-dtE" id="bca-6V-kiz"/>
<outlet property="nameLabel" destination="SoJ-cd-iop" id="6mG-xS-C7S"/>
<outlet property="projectNameLabel" destination="v7h-H9-QHo" id="igg-A6-enF"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="SearchMessagesEmptyState" rowHeight="212" id="hJq-Jh-U9f" customClass="StaticTableViewCell" customModule="Library">
<rect key="frame" x="0.0" y="282" width="375" height="212"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="hJq-Jh-U9f" id="fi5-Kg-yLw">
<rect key="frame" x="0.0" y="0.0" width="375" height="212"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="NTZ-oD-SDd">
<rect key="frame" x="185.5" y="96" 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"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedKey" value="messages.empty_state.title"/>
</userDefinedRuntimeAttributes>
</label>
</subviews>
<constraints>
<constraint firstItem="NTZ-oD-SDd" firstAttribute="centerX" secondItem="fi5-Kg-yLw" secondAttribute="centerX" id="Yab-nN-AUW"/>
<constraint firstItem="NTZ-oD-SDd" firstAttribute="centerY" secondItem="fi5-Kg-yLw" secondAttribute="centerY" id="uF6-3N-RGR"/>
</constraints>
<edgeInsets key="layoutMargins" top="20" left="16" bottom="16" right="20"/>
</tableViewCellContentView>
</tableViewCell>
</prototypes>
<connections>
<outlet property="dataSource" destination="ycB-Uw-jvw" id="xhu-lE-af6"/>
<outlet property="delegate" destination="ycB-Uw-jvw" id="bY4-5q-Cug"/>
</connections>
</tableView>
<navigationItem key="navigationItem" id="OMa-kG-hIb">
<nil key="title"/>
<view key="titleView" contentMode="scaleToFill" id="3ac-Dg-U5u" userLabel="Title view">
<rect key="frame" x="16" y="5.5" width="343" height="33"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" alignment="center" spacing="8" translatesAutoresizingMaskIntoConstraints="NO" id="DrS-Lz-KGw">
<rect key="frame" x="12" y="0.0" width="319" height="33"/>
<subviews>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" clearButtonMode="always" translatesAutoresizingMaskIntoConstraints="NO" id="E9A-bD-5Mg" userLabel="Search">
<rect key="frame" x="0.0" y="5.5" width="291" height="22"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<textInputTraits key="textInputTraits"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="string" keyPath="localizedPlaceholderKey" value="messages.search.placeholder_search_messages"/>
</userDefinedRuntimeAttributes>
<connections>
<action selector="searchTextChanged:" destination="ycB-Uw-jvw" eventType="editingChanged" id="OKr-En-Wo9"/>
<outlet property="delegate" destination="ycB-Uw-jvw" id="PVY-td-eGa"/>
</connections>
</textField>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" hidesWhenStopped="YES" animating="YES" style="gray" translatesAutoresizingMaskIntoConstraints="NO" id="Kwa-lS-ZfK" userLabel="Loading">
<rect key="frame" x="299" y="6.5" width="20" height="20"/>
</activityIndicatorView>
</subviews>
</stackView>
</subviews>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="trailingMargin" secondItem="DrS-Lz-KGw" secondAttribute="trailing" id="4OQ-6J-vB5"/>
<constraint firstItem="DrS-Lz-KGw" firstAttribute="top" secondItem="3ac-Dg-U5u" secondAttribute="topMargin" id="PnB-HX-HJY"/>
<constraint firstAttribute="bottomMargin" secondItem="DrS-Lz-KGw" secondAttribute="bottom" id="mHA-tp-anj"/>
<constraint firstItem="DrS-Lz-KGw" firstAttribute="leading" secondItem="3ac-Dg-U5u" secondAttribute="leadingMargin" id="zjL-eC-67X"/>
</constraints>
<edgeInsets key="layoutMargins" top="0.0" left="12" bottom="0.0" right="12"/>
</view>
</navigationItem>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<connections>
<outlet property="loadingView" destination="Kwa-lS-ZfK" id="sxX-CW-B2z"/>
<outlet property="searchTextField" destination="E9A-bD-5Mg" id="dHp-8x-dv8"/>
</connections>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="9JH-2n-5uC" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="983" y="944"/>
</scene>
<!--Message Dialog View Controller-->
<scene sceneID="Yun-Ch-3hw">
<objects>
<viewController storyboardIdentifier="MessageDialogViewController" id="jog-Ml-2Gw" customClass="MessageDialogViewController" customModule="Kickstarter_Framework" customModuleProvider="target" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="8Fd-CO-jPw"/>
<viewControllerLayoutGuide type="bottom" id="mgQ-Tg-TJO"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="sep-Kz-bhW">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<textView clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="scaleToFill" misplaced="YES" textAlignment="natural" translatesAutoresizingMaskIntoConstraints="NO" id="vtp-r8-Uzf" userLabel="Message text view">
<rect key="frame" x="20" y="72" width="560" height="508"/>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<fontDescription key="fontDescription" style="UICTFontTextStyleBody"/>
<textInputTraits key="textInputTraits" autocapitalizationType="sentences"/>
<connections>
<outlet property="delegate" destination="jog-Ml-2Gw" id="baf-lR-pmS"/>
</connections>
</textView>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Lyc-i3-lJV" userLabel="Loading overlay">
<rect key="frame" x="20" y="72" width="560" height="508"/>
<subviews>
<activityIndicatorView opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" misplaced="YES" animating="YES" style="whiteLarge" translatesAutoresizingMaskIntoConstraints="NO" id="vaI-4k-D4N">
<rect key="frame" x="262" y="235" width="37" height="37"/>
<color key="color" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</activityIndicatorView>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="0.80000000000000004" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="vaI-4k-D4N" firstAttribute="centerY" secondItem="Lyc-i3-lJV" secondAttribute="centerY" id="5E6-QI-jZQ"/>
<constraint firstItem="vaI-4k-D4N" firstAttribute="centerX" secondItem="Lyc-i3-lJV" secondAttribute="centerX" id="KUg-U7-hrT"/>
</constraints>
</view>
</subviews>
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstItem="Lyc-i3-lJV" firstAttribute="top" secondItem="vtp-r8-Uzf" secondAttribute="top" id="3ai-2O-pNA"/>
<constraint firstItem="Lyc-i3-lJV" firstAttribute="trailing" secondItem="vtp-r8-Uzf" secondAttribute="trailing" id="3tZ-oM-v9k"/>
<constraint firstItem="Lyc-i3-lJV" firstAttribute="bottom" secondItem="vtp-r8-Uzf" secondAttribute="bottom" id="JqW-Tk-gb8"/>
<constraint firstItem="vtp-r8-Uzf" firstAttribute="top" secondItem="sep-Kz-bhW" secondAttribute="top" id="Qa1-8h-1Gt"/>
<constraint firstItem="vtp-r8-Uzf" firstAttribute="leading" secondItem="sep-Kz-bhW" secondAttribute="leadingMargin" id="bYY-Ql-7oq"/>
<constraint firstItem="mgQ-Tg-TJO" firstAttribute="top" secondItem="vtp-r8-Uzf" secondAttribute="bottom" id="boJ-cf-Xi5"/>
<constraint firstItem="Lyc-i3-lJV" firstAttribute="leading" secondItem="vtp-r8-Uzf" secondAttribute="leading" id="oBp-G8-4Uy"/>
<constraint firstAttribute="trailingMargin" secondItem="vtp-r8-Uzf" secondAttribute="trailing" id="yxX-6G-la1"/>
</constraints>
</view>
<navigationItem key="navigationItem" id="Py1-Ke-h2x">
<nil key="title"/>
<barButtonItem key="leftBarButtonItem" id="3hH-GL-W2n">
<connections>
<action selector="cancelButtonPressed" destination="jog-Ml-2Gw" id="omm-1Y-0q1"/>
</connections>
</barButtonItem>
<view key="titleView" contentMode="scaleToFill" id="W5r-p4-1V6">
<rect key="frame" x="68.5" y="5.5" width="238" height="33"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="fillEqually" alignment="center" translatesAutoresizingMaskIntoConstraints="NO" id="YX8-K6-gvD">
<rect key="frame" x="0.0" y="0.0" width="238" height="33"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text=" " textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="mxd-lZ-Kbx">
<rect key="frame" x="117" y="0.0" width="4.5" height="33"/>
<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>
<color key="backgroundColor" red="0.0" green="0.0" blue="0.0" alpha="0.0" colorSpace="custom" customColorSpace="sRGB"/>
<constraints>
<constraint firstAttribute="bottom" secondItem="YX8-K6-gvD" secondAttribute="bottom" id="48W-Om-aZ1"/>
<constraint firstItem="YX8-K6-gvD" firstAttribute="leading" secondItem="W5r-p4-1V6" secondAttribute="leading" id="BcY-Gd-OnB"/>
<constraint firstAttribute="trailing" secondItem="YX8-K6-gvD" secondAttribute="trailing" id="OeQ-mF-ODF"/>
<constraint firstItem="YX8-K6-gvD" firstAttribute="top" secondItem="W5r-p4-1V6" secondAttribute="top" id="giX-fh-5Xm"/>
</constraints>
</view>
<barButtonItem key="rightBarButtonItem" enabled="NO" id="9ac-Ox-Glu">
<connections>
<action selector="postButtonPressed" destination="jog-Ml-2Gw" id="cQb-6U-Jxl"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics" prompted="NO"/>
<connections>
<outlet property="bodyTextView" destination="vtp-r8-Uzf" id="Td2-ei-nNr"/>
<outlet property="bottomConstraint" destination="boJ-cf-Xi5" id="3a8-ro-1rH"/>
<outlet property="cancelButton" destination="3hH-GL-W2n" id="L76-2v-2jc"/>
<outlet property="loadingView" destination="Lyc-i3-lJV" id="Q1P-Sw-nvn"/>
<outlet property="nameLabel" destination="mxd-lZ-Kbx" id="1vA-5n-SZw"/>
<outlet property="postButton" destination="9ac-Ox-Glu" id="PXV-cT-NC8"/>
</connections>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="WPG-8y-6ZY" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="1663" y="245"/>
</scene>
</scenes>
<resources>
<image name="arrow-down" width="11" height="6"/>
</resources>
</document>
``` | /content/code_sandbox/Kickstarter-iOS/Features/Messages/Storyboard/Messages.storyboard | xml | 2016-12-02T21:24:40 | 2024-08-15T23:13:30 | ios-oss | kickstarter/ios-oss | 8,432 | 18,209 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black">
<FrameLayout
android:id="@+id/surface_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center">
</FrameLayout>
<moe.codeest.enviews.ENPlayView
android:id="@+id/start"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_gravity="center_vertical" />
</RelativeLayout>
``` | /content/code_sandbox/app/src/main/res/layout/layout_floating_video.xml | xml | 2016-11-13T12:34:31 | 2024-08-16T15:39:12 | GSYVideoPlayer | CarGuo/GSYVideoPlayer | 19,994 | 169 |
```xml
import { hasNext, hasErr } from '../asynciterablehelpers.js';
import { of, range, throwError, toArray } from 'ix/asynciterable/index.js';
import { flatMap } from 'ix/asynciterable/operators/index.js';
test('AsyncIterable#flatMap with range', async () => {
const xs = of(1, 2, 3);
const ys = xs.pipe(flatMap(async (x) => range(0, x)));
expect(await toArray(ys)).toEqual([0, 0, 0, 1, 1, 2]);
});
test(`AsyncIterable#flatMap with fewer inputs than max concurrent doesn't throw`, async () => {
const xs = of(1, 2);
const ys = xs.pipe(flatMap(async (x) => range(0, x), 3));
expect(await toArray(ys)).toEqual([0, 0, 1]);
});
test('AsyncIterable#flatMap selector returns throw', async () => {
const err = new Error();
const xs = of(1, 2, 3);
const ys = xs.pipe(flatMap((x) => (x < 3 ? range(0, x) : throwError(err))));
const it = ys[Symbol.asyncIterator]();
await hasNext(it, 0);
await hasNext(it, 0);
await hasErr(it, err);
});
test('AsyncIterable#flatMap async selector returns throw', async () => {
const err = new Error();
const xs = of(1, 2, 3);
const ys = xs.pipe(flatMap(async (x) => (x < 3 ? range(0, x) : throwError(err))));
const it = ys[Symbol.asyncIterator]();
await hasNext(it, 0);
await hasNext(it, 0);
await hasErr(it, err);
});
test('AsyncIterable#flatMap with error throws', async () => {
const err = new Error();
const xs = throwError(err);
const ys = xs.pipe(flatMap((x) => range(0, x)));
const it = ys[Symbol.asyncIterator]();
await hasErr(it, err);
});
test('AsyncIterable#flatMap selector throws error', async () => {
const err = new Error();
const xs = of(1, 2, 3);
const ys = xs.pipe(
flatMap((x) => {
if (x < 3) {
return range(0, x);
}
throw err;
})
);
const it = ys[Symbol.asyncIterator]();
await hasNext(it, 0);
await hasErr(it, err);
});
test('AsyncIterable#flatMap async selector throws error', async () => {
const err = new Error();
const xs = of(1, 2, 3);
const ys = xs.pipe(
flatMap(async (x) => {
if (x < 3) {
return range(0, x);
}
throw err;
})
);
const it = ys[Symbol.asyncIterator]();
await hasNext(it, 0);
await hasNext(it, 0);
await hasErr(it, err);
});
``` | /content/code_sandbox/spec/asynciterable-operators/flatmap-spec.ts | xml | 2016-02-22T20:04:19 | 2024-08-09T18:46:41 | IxJS | ReactiveX/IxJS | 1,319 | 689 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="path_to_url"
android:layout_width="match_parent" android:layout_height="wrap_content"
android:background="@android:color/holo_red_dark"
android:padding="8dp">
<TextView
android:id="@+id/textViewItemSection"
android:text="Title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp"
android:textColor="@android:color/white"/>
</RelativeLayout>
``` | /content/code_sandbox/app/src/main/res/layout/layout_list_section_animal.xml | xml | 2016-05-19T10:12:08 | 2024-08-02T07:42:36 | LRecyclerView | jdsjlzx/LRecyclerView | 2,470 | 124 |
```xml
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="path_to_url"
xmlns:tools="path_to_url" android:id="@+id/drawer_layout"
android:layout_width="match_parent" android:layout_height="match_parent"
tools:context="com.eveningoutpost.dexdrip.Home">
<RelativeLayout xmlns:android="path_to_url"
xmlns:tools="path_to_url" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.eveningoutpost.dexdrip.CalibrationOverride">
<EditText
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:inputType="numberDecimal"
android:ems="10"
android:id="@+id/bg_value"
android:autoText="false"
android:text=""
android:singleLine="true"
android:textAlignment="center"
android:textSize="24dp"
android:hint="@string/enter_blood_glucose_value"
android:layout_marginTop="51dp"
android:layout_below="@+id/textView5"
android:layout_centerHorizontal="true" />
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/done"
android:id="@+id/save_calibration_button"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:text="@string/your_sha256_hash_calibration"
android:id="@+id/textView5"
android:textSize="20dp"
android:layout_alignParentTop="true"
android:layout_alignParentStart="true" />
</RelativeLayout>
<fragment android:id="@+id/navigation_drawer"
android:layout_width="@dimen/navigation_drawer_width" android:layout_height="match_parent"
android:layout_gravity="start"
android:name="com.eveningoutpost.dexdrip.NavigationDrawerFragment"
tools:layout="@layout/fragment_navigation_drawer" />
</androidx.drawerlayout.widget.DrawerLayout>
``` | /content/code_sandbox/app/src/main/res/layout/activity_calibration_override.xml | xml | 2016-09-23T13:33:17 | 2024-08-15T09:51:19 | xDrip | NightscoutFoundation/xDrip | 1,365 | 526 |
```xml
import {BodyParams, QueryParams} from "@tsed/platform-params";
import {Deprecated, Description, Get, Post, Returns, Security, Summary} from "@tsed/schema";
import {Controller} from "@tsed/di";
import {CalendarModel} from "./models/Calendar";
@Controller("/calendars")
export class CalendarCtrl {
@Get("/:id")
@Summary("Summary of this route")
@Description("Return a calendar from the given id")
@Returns(200, CalendarModel)
@Returns(404).Description("Not found")
async getCalendar(
@Description("A calendar Id")
@QueryParams()
id: string
): Promise<CalendarModel> {
return {};
}
@Get("/")
@Description("Return a list of Calendar")
@Returns(200, CalendarModel)
async getCalendars(): Promise<CalendarModel[]> {
return [];
}
@Get("/v0/:id")
@Deprecated()
@Description("Deprecated route, use /rest/calendars/:id instead of.")
@Returns(CalendarModel)
@Returns(404, {description: "Not found"})
async getCalendarDeprecated(@QueryParams("id") id: string): Promise<CalendarModel> {
return {};
}
@Post("/")
@Security("calendar_auth", "write:calendar", "read:calendar")
@Returns(CalendarModel)
async createCalendar(@BodyParams() body: any): Promise<CalendarModel> {
return {};
}
}
``` | /content/code_sandbox/docs/tutorials/snippets/swagger/endpoint-documentation.ts | xml | 2016-02-21T18:38:47 | 2024-08-14T21:19:48 | tsed | tsedio/tsed | 2,817 | 320 |
```xml
import cn from "classnames";
import React, { FunctionComponent } from "react";
import styles from "./FormFieldDescription.css";
interface Props {
className?: string;
children?: React.ReactNode;
}
const FormFieldDescription: FunctionComponent<Props> = ({
children,
className,
}) => {
return <p className={cn(className, styles.root)}>{children}</p>;
};
export default FormFieldDescription;
``` | /content/code_sandbox/client/src/core/client/ui/components/v2/FormFieldDescription/FormFieldDescription.tsx | xml | 2016-10-31T16:14:05 | 2024-08-06T16:15:57 | talk | coralproject/talk | 1,881 | 85 |
```xml
import { Operator } from '../Operator';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
import { OuterSubscriber } from '../OuterSubscriber';
import { InnerSubscriber } from '../InnerSubscriber';
import { ObservableInput, OperatorFunction } from '../types';
/**
* Applies an accumulator function over the source Observable where the
* accumulator function itself returns an Observable, then each intermediate
* Observable returned is merged into the output Observable.
*
* <span class="informal">It's like {@link scan}, but the Observables returned
* by the accumulator are merged into the outer Observable.</span>
*
* ## Example
* Count the number of click events
* ```javascript
* const click$ = fromEvent(document, 'click');
* const one$ = click$.pipe(mapTo(1));
* const seed = 0;
* const count$ = one$.pipe(
* mergeScan((acc, one) => of(acc + one), seed),
* );
* count$.subscribe(x => console.log(x));
*
* // Results:
* 1
* 2
* 3
* 4
* // ...and so on for each click
* ```
*
* @param {function(acc: R, value: T): Observable<R>} accumulator
* The accumulator function called on each source value.
* @param seed The initial accumulation value.
* @param {number} [concurrent=Number.POSITIVE_INFINITY] Maximum number of
* input Observables being subscribed to concurrently.
* @return {Observable<R>} An observable of the accumulated values.
* @method mergeScan
* @owner Observable
*/
export declare function mergeScan<T, R>(accumulator: (acc: R, value: T) => ObservableInput<R>, seed: R, concurrent?: number): OperatorFunction<T, R>;
export declare class MergeScanOperator<T, R> implements Operator<T, R> {
private accumulator;
private seed;
private concurrent;
constructor(accumulator: (acc: R, value: T) => ObservableInput<R>, seed: R, concurrent: number);
call(subscriber: Subscriber<R>, source: any): any;
}
/**
* We need this JSDoc comment for affecting ESDoc.
* @ignore
* @extends {Ignored}
*/
export declare class MergeScanSubscriber<T, R> extends OuterSubscriber<T, R> {
private accumulator;
private acc;
private concurrent;
private hasValue;
private hasCompleted;
private buffer;
private active;
protected index: number;
constructor(destination: Subscriber<R>, accumulator: (acc: R, value: T) => ObservableInput<R>, acc: R, concurrent: number);
protected _next(value: any): void;
private _innerSub;
protected _complete(): void;
notifyNext(outerValue: T, innerValue: R, outerIndex: number, innerIndex: number, innerSub: InnerSubscriber<T, R>): void;
notifyComplete(innerSub: Subscription): void;
}
``` | /content/code_sandbox/deps/node-10.15.3/tools/node_modules/eslint/node_modules/rxjs/internal/operators/mergeScan.d.ts | xml | 2016-09-05T10:18:44 | 2024-08-11T13:21:40 | LiquidCore | LiquidPlayer/LiquidCore | 1,010 | 630 |
```xml
// import lazyload from "utils/lazyload";
// export default lazyload(() => import(/* webpackChunkName: "MyFilesView" */ "./myFilesView"));
export { default } from "./myFilesView";
``` | /content/code_sandbox/app/src/components/features/filesLibrary/FilesLibraryTableContainer/MyFilesView/index.ts | xml | 2016-12-01T04:36:06 | 2024-08-16T19:12:19 | requestly | requestly/requestly | 2,121 | 46 |
```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 } from '@stdlib/types/iter';
/**
* Advances an iterator.
*
* ## Notes
*
* - The function **eagerly** advances an input iterator `n` iterations or until the input iterator finishes, whichever comes first.
*
* @param iterator - input iterator
* @param n - number of iterations (default: 1e308)
* @throws `n` must be a nonnegative integer
* @returns input iterator
*
* @example
* var array2iterator = require( '@stdlib/array/to-iterator' );
*
* var it1 = array2iterator( [ 0, 0, 0, 0, 1 ] );
*
* var it2 = iterAdvance( it1, 4 );
*
* var v = it2.next().value;
* // returns 1
*
* var bool = it2.next().done;
* // returns true
*/
declare function iterAdvance( iterator: Iterator, n?: number ): Iterator;
// EXPORTS //
export = iterAdvance;
``` | /content/code_sandbox/lib/node_modules/@stdlib/iter/advance/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 284 |
```xml
import { $ } from '../$.js';
import './on.js';
import type { JQ } from '../shared/core.js';
import type { EventCallback } from '../shared/event.js';
import type { PlainObject } from '../shared/helper.js';
declare module '../shared/core.js' {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
interface JQ<T = HTMLElement> {
/**
*
* @param events
*
*
*
*
*
* @param selector CSS
* @param data
*
*
* `data` `string` `selector` `selector` `null`
*/
one<TData = unknown>(
events: PlainObject<EventCallback<TData, T> | false>,
selector: string | null | undefined,
data?: TData,
): this;
/**
*
* @param events
*
*
*
*
*
* @param data
*
*
* `data` `string` `selector` `selector` `null`
*/
one<TData = unknown>(
events: PlainObject<EventCallback<TData, T> | false>,
data?: TData,
): this;
/**
*
* @param eventName
*
*
* `click.myPlugin`
* @param selector CSS
* @param data
*
*
* `data` `string` `selector` `selector` `null`
* @param callback
*/
one<TData = unknown>(
eventName: string,
selector: string | null | undefined,
data: TData,
callback: EventCallback<TData, T> | false,
): this;
/**
*
* @param eventName
*
*
* `click.myPlugin`
* @param selector CSS
* @param callback
*/
one(
eventName: string,
selector: string,
callback: EventCallback<unknown, T> | false,
): this;
/**
*
* @param eventName
*
*
* `click.myPlugin`
* @param data
* @param callback
*/
one<TData = unknown>(
eventName: string,
data: TData,
callback: EventCallback<TData, T> | false,
): this;
/**
*
* @param eventName
*
*
* `click.myPlugin`
* @param callback
*/
one(eventName: string, callback: EventCallback<unknown, T> | false): this;
}
}
$.fn.one = function (
this: JQ,
types: PlainObject<EventCallback | false> | string,
// eslint-disable-next-line
selector?: any,
// eslint-disable-next-line
data?: any,
// eslint-disable-next-line
callback?: any,
): JQ {
// @ts-ignore
return this.on(types, selector, data, callback, true);
};
``` | /content/code_sandbox/packages/jq/src/methods/one.ts | xml | 2016-07-11T17:39:02 | 2024-08-16T07:12:34 | mdui | zdhxiong/mdui | 4,077 | 675 |
```xml
/**
* This file includes polyfills needed by Angular and is loaded before the app.
* You can add your own extra polyfills to this file.
*
* This file is divided into 2 sections:
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main
* file.
*
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
* Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile.
*
* Learn more in path_to_url
*/
/***************************************************************************************************
* BROWSER POLYFILLS
*/
/** IE10 and IE11 requires the following for NgClass support on SVG elements */
// import 'classlist.js'; // Run `npm install --save classlist.js`.
/**
* Web Animations `@angular/platform-browser/animations`
* Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
* Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
*/
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
/**
* By default, zone.js will patch all possible macroTask and DomEvents
* user can disable parts of macroTask/DomEvents patch by setting following flags
* because those flags need to be set before `zone.js` being loaded, and webpack
* will put import in the top of bundle, so user need to create a separate file
* in this directory (for example: zone-flags.ts), and put the following flags
* into that file, and then add the following code before importing zone.js.
* import './zone-flags.ts';
*
* The flags allowed in zone-flags.ts are listed here.
*
* The following flags will work for all browsers.
*
* (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
* (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
* (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
*
* in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
* with the following flag, it will bypass `zone.js` patch for IE/Edge
*
* (window as any).__Zone_enable_cross_context_check = true;
*
*/
/***************************************************************************************************
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
/***************************************************************************************************
* APPLICATION IMPORTS
*/
``` | /content/code_sandbox/projects/demo/src/polyfills.ts | xml | 2016-08-10T10:25:51 | 2024-08-05T21:57:53 | ng2-smart-table | akveo/ng2-smart-table | 1,631 | 585 |
```xml
import { IServiceManager } from '../../ioc/types';
import { EnvironmentVariablesService } from './environment';
import { EnvironmentVariablesProvider } from './environmentVariablesProvider';
import { IEnvironmentVariablesProvider, IEnvironmentVariablesService } from './types';
export function registerTypes(serviceManager: IServiceManager) {
serviceManager.addSingleton<IEnvironmentVariablesService>(
IEnvironmentVariablesService,
EnvironmentVariablesService,
);
serviceManager.addSingleton<IEnvironmentVariablesProvider>(
IEnvironmentVariablesProvider,
EnvironmentVariablesProvider,
);
}
``` | /content/code_sandbox/src/client/common/variables/serviceRegistry.ts | xml | 2016-01-19T10:50:01 | 2024-08-12T21:05:24 | pythonVSCode | DonJayamanne/pythonVSCode | 2,078 | 108 |
```xml
import { spawn } from 'child_process';
import path from 'path';
import fs, { WriteStream } from 'fs';
import which from 'which';
import tcpPortUsed from 'tcp-port-used';
import type { ChildProcess } from 'child_process';
import type { Process } from '../utils/processes';
import type { CardanoNodeProcessNames } from '../../common/types/cardano-node.types';
import { environment } from '../environment';
import { logger } from '../utils/logging';
import { wrappedFind } from '../utils/processes';
export type SelfnodeOptions = {
selfnodeBin: string;
walletLogFile: WriteStream;
mockTokenMetadataServerBin: string;
mockTokenMetadataServerLogFile: WriteStream;
processName: CardanoNodeProcessNames;
onStop: (...args: Array<any>) => any;
};
export type Selfnode = {
pid: number;
wpid: number;
stop: (...args: Array<any>) => any;
connected: boolean;
};
let mockTokenMetadataServer = null;
const CARDANO_WALLET_PORT = 8088;
const CARDANO_WALLET_START_TIMEOUT = 60 * 1000; // 60 seconds | unit: milliseconds
const CARDANO_WALLET_START_CHECK_INTERVAL = 500; // 500 ms | unit: milliseconds
const TOKEN_METADATA_SERVER_PORT = 65432;
// localhost breaks under new electron, which prefers ::1 (IPv6)
const TOKEN_METADATA_SERVER = `path_to_url{TOKEN_METADATA_SERVER_PORT}/`;
const TOKEN_METADATA_SERVER_PROCESS_NAME = environment.isWindows
? 'mock-token-metadata-server.exe'
: 'mock-token-metadata-server';
export async function CardanoSelfnodeLauncher(
selfnodeOptions: SelfnodeOptions
): Promise<{
node: Selfnode;
replyPort: number;
}> {
return new Promise(async (resolve, reject) => {
const {
selfnodeBin,
walletLogFile,
mockTokenMetadataServerBin,
mockTokenMetadataServerLogFile,
processName,
onStop,
} = selfnodeOptions;
const SHELLEY_TEST_DATA = (() => {
const binDir = path.dirname(which.sync(selfnodeBin));
return firstExisting('SHELLEY_TEST_DATA', [
path.resolve(path.join(binDir, 'data', 'cardano-node-shelley')), // Windows installer
path.resolve(
path.join(binDir, '..', 'Resources', 'data', 'cardano-node-shelley')
), // Darwin installer
// Linux installer substitutes SHELLEY_TEST_DATA in the local-cluster Bash wrapper
'../../utils/cardano/selfnode', // nix-shell? but nix-shell has the substitute as well Some other scenario?
]);
})();
setupMockTokenMetadataServer(
mockTokenMetadataServerBin,
mockTokenMetadataServerLogFile
);
// @ts-ignore ts-migrate(2322) FIXME: Type '{ pid: number; ppid?: number; uid?: number; ... Remove this comment to see the full error message
const processList: Array<Process> = await wrappedFind(
'port',
CARDANO_WALLET_PORT
);
const isSelfnodeRunning =
processList.length && processList[0].name === processName;
if (isSelfnodeRunning) {
logger.info('Cardano-node is already running...', {
selfnodeBin,
CARDANO_WALLET_PORT,
SHELLEY_TEST_DATA,
TOKEN_METADATA_SERVER,
});
const nodeProcess: Process = processList[0];
const node: Selfnode = setupSelfnode({
processName,
nodeProcess,
onStop,
connected: true,
});
resolve({
node,
replyPort: CARDANO_WALLET_PORT,
});
} else {
logger.info('Starting cardano-node now...', {
selfnodeBin,
CARDANO_WALLET_PORT,
SHELLEY_TEST_DATA,
TOKEN_METADATA_SERVER,
});
const nodeProcess: ChildProcess = spawn(selfnodeBin, [], {
env: {
...process.env,
// @ts-ignore ts-migrate(2769) FIXME: No overload matches this call.
CARDANO_WALLET_PORT,
SHELLEY_TEST_DATA,
TOKEN_METADATA_SERVER,
},
detached: environment.isDev, // XXX: detaching breaks Windows launching the local-cluster.exe + cardano-launcher
// will not allow you to start another Daedalus when previous local-cluster.exe is running, especially awkward
// on macOS without stdout/stderr logging; Im not sure if this is ever needed in `nix-shell`, but leaving as-is
// for now @michalrus
// allows Daedalus to exit independently of selfnode (1/3)
stdio: environment.isDev ? 'ignore' : 'pipe', // 'ignore' allows Daedalus to exit independently of selfnode, 'pipe' kills it on exit (2/3)
});
if (environment.isDev) {
nodeProcess.unref(); // allows Daedalus to exit independently of selfnode (3/3)
}
if (
!environment.isDev &&
nodeProcess.stdout &&
nodeProcess.stderr &&
walletLogFile
) {
nodeProcess.stdout.on('data', (data) => {
walletLogFile.write(data);
});
nodeProcess.stderr.on('data', (data) => {
walletLogFile.write(data);
});
}
const node: Selfnode = setupSelfnode({
processName,
nodeProcess,
onStop,
connected: false, // selfnode is kept in disconnected state until it starts responding
});
tcpPortUsed
.waitUntilUsed(
CARDANO_WALLET_PORT,
CARDANO_WALLET_START_CHECK_INTERVAL,
CARDANO_WALLET_START_TIMEOUT
)
.then(() => {
node.connected = true;
resolve({
node,
replyPort: CARDANO_WALLET_PORT,
});
})
.catch((exitStatus) => {
reject(exitStatus);
});
}
});
}
/**
* Return the first existing file path among candidates. If none exist, return the last one, and log a warning an identifier.
*/
const firstExisting = (
identifier: string,
candidates: Array<string>
): string => {
const existing = candidates.filter(fs.existsSync);
if (existing.length > 0) return existing[0];
const fallback = candidates[candidates.length - 1];
logger.warn(`${identifier} candidates dont exist, will use fallback`, {
identifier,
candidates,
fallback,
});
return fallback;
};
const setupSelfnode = ({
processName,
nodeProcess,
onStop,
connected,
}: {
processName: CardanoNodeProcessNames;
nodeProcess: ChildProcess | Process;
onStop: (...args: Array<any>) => any;
connected: boolean;
}): Selfnode =>
// @ts-ignore ts-migrate(2322) FIXME: Type '(ChildProcess | Process) & { wpid: number; s... Remove this comment to see the full error message
Object.assign({}, nodeProcess, {
wpid: nodeProcess.pid,
stop: async () => {
if (mockTokenMetadataServer !== null) {
await onStop(
mockTokenMetadataServer.pid,
TOKEN_METADATA_SERVER_PROCESS_NAME
);
}
await onStop(nodeProcess.pid, processName);
},
connected,
});
const setupMockTokenMetadataServer = async (
mockTokenMetadataServerBin: string,
mockTokenMetadataServerLogFile: WriteStream
) => {
const TOKEN_METADATA_REGISTRY = (() => {
const binDir = path.dirname(which.sync(mockTokenMetadataServerBin));
return firstExisting('TOKEN_METADATA_REGISTRY', [
path.resolve(path.join(binDir, 'token-metadata.json')), // Windows and Linux installers
path.resolve(path.join(binDir, '..', 'Resources', 'token-metadata.json')), // Darwin installer
'./utils/cardano/selfnode/token-metadata.json', // nix-shell
]);
})();
// @ts-ignore ts-migrate(2322) FIXME: Type '{ pid: number; ppid?: number; uid?: number; ... Remove this comment to see the full error message
const processList: Array<Process> = await wrappedFind(
'port',
TOKEN_METADATA_SERVER_PORT
);
const isMockTokenMetadataServerRunning =
processList.length &&
processList[0].name === TOKEN_METADATA_SERVER_PROCESS_NAME;
if (isMockTokenMetadataServerRunning) {
logger.info('Mock-token-metadata-server is already running...', {
mockTokenMetadataServerBin,
TOKEN_METADATA_SERVER_PORT,
TOKEN_METADATA_REGISTRY,
TOKEN_METADATA_SERVER,
});
mockTokenMetadataServer = Object.assign({}, processList[0]);
} else {
logger.info('Starting mock-token-metadata-server now...', {
mockTokenMetadataServerBin,
TOKEN_METADATA_SERVER_PORT,
TOKEN_METADATA_REGISTRY,
TOKEN_METADATA_SERVER,
});
const mockTokenMetadataServerProcess = spawn(
mockTokenMetadataServerBin,
[
'--port',
TOKEN_METADATA_SERVER_PORT.toString(),
TOKEN_METADATA_REGISTRY,
],
{
env: { ...process.env },
detached: environment.isDev,
stdio: environment.isDev ? 'ignore' : 'pipe',
}
);
if (environment.isDev) {
mockTokenMetadataServerProcess.unref();
}
if (
!environment.isDev &&
mockTokenMetadataServerProcess.stdout &&
mockTokenMetadataServerProcess.stderr &&
mockTokenMetadataServerLogFile
) {
mockTokenMetadataServerProcess.stdout.on('data', (data) => {
mockTokenMetadataServerLogFile.write(data);
});
mockTokenMetadataServerProcess.stderr.on('data', (data) => {
mockTokenMetadataServerLogFile.write(data);
});
}
mockTokenMetadataServer = mockTokenMetadataServerProcess;
}
};
``` | /content/code_sandbox/source/main/cardano/CardanoSelfnodeLauncher.ts | xml | 2016-10-05T13:48:54 | 2024-08-13T22:03:19 | daedalus | input-output-hk/daedalus | 1,230 | 2,099 |
```xml
import { Component } from '@angular/core';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { FormControl, ReactiveFormsModule } from '@angular/forms';
import { provideNgxMask } from '../lib/ngx-mask.providers';
import { NgxMaskDirective } from '../lib/ngx-mask.directive';
@Component({
selector: 'jsdaddy-open-source-test',
template: ` <input (maskFilled)="maskFilled()" mask="0000" [formControl]="form" /> `,
})
class TestMaskComponent {
public form: FormControl = new FormControl('');
public isMaskFilled = false;
public maskFilled(): void {
this.isMaskFilled = true;
}
}
describe('Directive: Mask (Function maskFilled)', () => {
let fixture: ComponentFixture<TestMaskComponent>;
let component: TestMaskComponent;
let maskFilledSpy: jasmine.Spy<jasmine.Func>;
beforeEach(() => {
TestBed.configureTestingModule({
declarations: [TestMaskComponent],
imports: [ReactiveFormsModule, NgxMaskDirective],
providers: [provideNgxMask()],
});
fixture = TestBed.createComponent(TestMaskComponent);
component = fixture.componentInstance;
fixture.detectChanges();
maskFilledSpy = spyOn(component, 'maskFilled').and.callThrough();
});
it('should call function maskFilled and isMaskFilled should be true', () => {
component.form.setValue('9999');
expect(component.isMaskFilled).toBeTrue();
expect(maskFilledSpy).toHaveBeenCalledOnceWith();
});
it('isMaskFilled should be false', () => {
component.form.setValue('999');
expect(component.isMaskFilled).toBeFalse();
});
});
``` | /content/code_sandbox/projects/ngx-mask-lib/src/test/complete-mask.spec.ts | xml | 2016-09-23T20:44:28 | 2024-08-15T12:52:51 | ngx-mask | JsDaddy/ngx-mask | 1,150 | 347 |
```xml
import { JupyterFrontEnd } from '@jupyterlab/application';
import { ISessionContext, SessionContext } from '@jupyterlab/apputils';
import { ConsolePanel } from '@jupyterlab/console';
import { IChangedArgs } from '@jupyterlab/coreutils';
import { DocumentWidget } from '@jupyterlab/docregistry';
import { FileEditor } from '@jupyterlab/fileeditor';
import { NotebookPanel } from '@jupyterlab/notebook';
import { Kernel, KernelMessage, Session } from '@jupyterlab/services';
import { ITranslator, nullTranslator } from '@jupyterlab/translation';
import { bugDotIcon, bugIcon, ToolbarButton } from '@jupyterlab/ui-components';
import { Debugger } from './debugger';
import { ConsoleHandler } from './handlers/console';
import { FileHandler } from './handlers/file';
import { NotebookHandler } from './handlers/notebook';
import { IDebugger } from './tokens';
const TOOLBAR_DEBUGGER_ITEM = 'debugger-icon';
/**
* Add a bug icon to the widget toolbar to enable and disable debugging.
*
* @param widget The widget to add the debug toolbar button to.
* @param onClick The callback when the toolbar button is clicked.
*/
function updateIconButton(
widget: DebuggerHandler.SessionWidget[DebuggerHandler.SessionType],
onClick: () => void,
enabled?: boolean,
pressed?: boolean,
translator: ITranslator = nullTranslator
): ToolbarButton {
const trans = translator.load('jupyterlab');
const icon = new ToolbarButton({
className: 'jp-DebuggerBugButton',
icon: bugIcon,
tooltip: trans.__('Enable Debugger'),
pressedIcon: bugDotIcon,
pressedTooltip: trans.__('Disable Debugger'),
disabledTooltip: trans.__(
'Select a kernel that supports debugging to enable debugger'
),
enabled,
pressed,
onClick
});
if (!widget.toolbar.insertBefore('kernelName', TOOLBAR_DEBUGGER_ITEM, icon)) {
widget.toolbar.addItem(TOOLBAR_DEBUGGER_ITEM, icon);
}
return icon;
}
/**
* Updates button state to on/off,
* adds/removes css class to update styling
*
* @param widget the debug button widget
* @param pressed true if pressed, false otherwise
* @param enabled true if widget enabled, false otherwise
* @param onClick click handler
*/
function updateIconButtonState(
widget: ToolbarButton,
pressed: boolean,
enabled: boolean = true,
onClick?: () => void
) {
if (widget) {
widget.enabled = enabled;
widget.pressed = pressed;
if (onClick) {
widget.onClick = onClick;
}
}
}
/**
* A handler for debugging a widget.
*/
export class DebuggerHandler implements DebuggerHandler.IHandler {
/**
* Instantiate a new DebuggerHandler.
*
* @param options The instantiation options for a DebuggerHandler.
*/
constructor(options: DebuggerHandler.IOptions) {
this._type = options.type;
this._shell = options.shell;
this._service = options.service;
}
/**
* Get the active widget.
*/
get activeWidget():
| DebuggerHandler.SessionWidget[DebuggerHandler.SessionType]
| null {
return this._activeWidget;
}
/**
* Update a debug handler for the given widget, and
* handle kernel changed events.
*
* @param widget The widget to update.
* @param connection The session connection.
*/
async update(
widget: DebuggerHandler.SessionWidget[DebuggerHandler.SessionType],
connection: Session.ISessionConnection | null
): Promise<void> {
if (!connection) {
delete this._kernelChangedHandlers[widget.id];
delete this._statusChangedHandlers[widget.id];
delete this._iopubMessageHandlers[widget.id];
return this.updateWidget(widget, connection);
}
const kernelChanged = (): void => {
void this.updateWidget(widget, connection);
};
const kernelChangedHandler = this._kernelChangedHandlers[widget.id];
if (kernelChangedHandler) {
connection.kernelChanged.disconnect(kernelChangedHandler);
}
this._kernelChangedHandlers[widget.id] = kernelChanged;
connection.kernelChanged.connect(kernelChanged);
const statusChanged = (
_: Session.ISessionConnection,
status: Kernel.Status
): void => {
if (status.endsWith('restarting')) {
void this.updateWidget(widget, connection);
}
};
const statusChangedHandler = this._statusChangedHandlers[widget.id];
if (statusChangedHandler) {
connection.statusChanged.disconnect(statusChangedHandler);
}
connection.statusChanged.connect(statusChanged);
this._statusChangedHandlers[widget.id] = statusChanged;
const iopubMessage = (
_: Session.ISessionConnection,
msg: KernelMessage.IIOPubMessage
): void => {
if (
this._service.isStarted &&
!this._service.hasStoppedThreads() &&
(msg.parent_header as KernelMessage.IHeader).msg_type ===
'execute_request'
) {
void this._service.displayDefinedVariables();
}
};
const iopubMessageHandler = this._iopubMessageHandlers[widget.id];
if (iopubMessageHandler) {
connection.iopubMessage.disconnect(iopubMessageHandler);
}
connection.iopubMessage.connect(iopubMessage);
this._iopubMessageHandlers[widget.id] = iopubMessage;
this._activeWidget = widget;
return this.updateWidget(widget, connection);
}
/**
* Update a debug handler for the given widget, and
* handle connection kernel changed events.
*
* @param widget The widget to update.
* @param sessionContext The session context.
*/
async updateContext(
widget: DebuggerHandler.SessionWidget[DebuggerHandler.SessionType],
sessionContext: ISessionContext
): Promise<void> {
const connectionChanged = (): void => {
const { session: connection } = sessionContext;
void this.update(widget, connection);
};
const contextKernelChangedHandlers =
this._contextKernelChangedHandlers[widget.id];
if (contextKernelChangedHandlers) {
sessionContext.kernelChanged.disconnect(contextKernelChangedHandlers);
}
this._contextKernelChangedHandlers[widget.id] = connectionChanged;
sessionContext.kernelChanged.connect(connectionChanged);
return this.update(widget, sessionContext.session);
}
/**
* Update a debug handler for the given widget.
*
* @param widget The widget to update.
* @param connection The session connection.
*/
async updateWidget(
widget: DebuggerHandler.SessionWidget[DebuggerHandler.SessionType],
connection: Session.ISessionConnection | null
): Promise<void> {
if (!this._service.model || !connection) {
return;
}
const hasFocus = (): boolean => {
return this._shell.currentWidget === widget;
};
const updateAttribute = (): void => {
if (!this._handlers[widget.id]) {
widget.node.removeAttribute('data-jp-debugger');
return;
}
widget.node.setAttribute('data-jp-debugger', 'true');
};
const createHandler = (): void => {
if (this._handlers[widget.id]) {
return;
}
switch (this._type) {
case 'notebook':
this._handlers[widget.id] = new NotebookHandler({
debuggerService: this._service,
widget: widget as NotebookPanel
});
break;
case 'console':
this._handlers[widget.id] = new ConsoleHandler({
debuggerService: this._service,
widget: widget as ConsolePanel
});
break;
case 'file':
this._handlers[widget.id] = new FileHandler({
debuggerService: this._service,
widget: widget as DocumentWidget<FileEditor>
});
break;
default:
throw Error(`No handler for the type ${this._type}`);
}
updateAttribute();
};
const removeHandlers = (): void => {
const handler = this._handlers[widget.id];
if (!handler) {
return;
}
handler.dispose();
delete this._handlers[widget.id];
delete this._kernelChangedHandlers[widget.id];
delete this._statusChangedHandlers[widget.id];
delete this._iopubMessageHandlers[widget.id];
delete this._contextKernelChangedHandlers[widget.id];
// Clear the model if the handler being removed corresponds
// to the current active debug session, or if the connection
// does not have a kernel.
if (
this._service.session?.connection?.path === connection?.path ||
!this._service.session?.connection?.kernel
) {
const model = this._service.model;
model.clear();
}
updateAttribute();
};
const addToolbarButton = (enabled: boolean = true): void => {
const debugButton = this._iconButtons[widget.id];
if (!debugButton) {
this._iconButtons[widget.id] = updateIconButton(
widget,
toggleDebugging,
this._service.isStarted,
enabled
);
} else {
updateIconButtonState(
debugButton,
this._service.isStarted,
enabled,
toggleDebugging
);
}
};
const isDebuggerOn = (): boolean => {
return (
this._service.isStarted &&
this._previousConnection?.id === connection?.id
);
};
const stopDebugger = async (): Promise<void> => {
this._service.session!.connection = connection;
await this._service.stop();
};
const startDebugger = async (): Promise<void> => {
this._service.session!.connection = connection;
this._previousConnection = connection;
await this._service.restoreState(true);
await this._service.displayDefinedVariables();
if (this._service.session?.capabilities?.supportsModulesRequest) {
await this._service.displayModules();
}
};
const toggleDebugging = async (): Promise<void> => {
// bail if the widget doesn't have focus
if (!hasFocus()) {
return;
}
const debugButton = this._iconButtons[widget.id]!;
if (isDebuggerOn()) {
await stopDebugger();
removeHandlers();
updateIconButtonState(debugButton, false);
} else {
await startDebugger();
createHandler();
updateIconButtonState(debugButton, true);
}
};
addToolbarButton(false);
// listen to the disposed signals
widget.disposed.connect(async () => {
if (isDebuggerOn()) {
await stopDebugger();
}
removeHandlers();
delete this._iconButtons[widget.id];
delete this._contextKernelChangedHandlers[widget.id];
});
const debuggingEnabled = await this._service.isAvailable(connection);
if (!debuggingEnabled) {
removeHandlers();
updateIconButtonState(this._iconButtons[widget.id]!, false, false);
return;
}
// update the active debug session
if (!this._service.session) {
this._service.session = new Debugger.Session({
connection,
config: this._service.config
});
} else {
this._previousConnection = this._service.session!.connection?.kernel
? this._service.session.connection
: null;
this._service.session.connection = connection;
}
await this._service.restoreState(false);
if (this._service.isStarted && !this._service.hasStoppedThreads()) {
await this._service.displayDefinedVariables();
if (this._service.session?.capabilities?.supportsModulesRequest) {
await this._service.displayModules();
}
}
updateIconButtonState(
this._iconButtons[widget.id]!,
this._service.isStarted,
true
);
// check the state of the debug session
if (!this._service.isStarted) {
removeHandlers();
this._service.session.connection = this._previousConnection ?? connection;
await this._service.restoreState(false);
return;
}
// if the debugger is started but there is no handler, create a new one
createHandler();
this._previousConnection = connection;
}
private _type: DebuggerHandler.SessionType;
private _shell: JupyterFrontEnd.IShell;
private _service: IDebugger;
private _previousConnection: Session.ISessionConnection | null;
private _activeWidget:
| DebuggerHandler.SessionWidget[DebuggerHandler.SessionType]
| null;
private _handlers: {
[id: string]: DebuggerHandler.SessionHandler[DebuggerHandler.SessionType];
} = {};
private _contextKernelChangedHandlers: {
[id: string]: (
sender: SessionContext,
args: IChangedArgs<
Kernel.IKernelConnection,
Kernel.IKernelConnection,
'kernel'
>
) => void;
} = {};
private _kernelChangedHandlers: {
[id: string]: (
sender: Session.ISessionConnection,
args: IChangedArgs<
Kernel.IKernelConnection,
Kernel.IKernelConnection,
'kernel'
>
) => void;
} = {};
private _statusChangedHandlers: {
[id: string]: (
sender: Session.ISessionConnection,
status: Kernel.Status
) => void;
} = {};
private _iopubMessageHandlers: {
[id: string]: (
sender: Session.ISessionConnection,
msg: KernelMessage.IIOPubMessage
) => void;
} = {};
private _iconButtons: {
[id: string]: ToolbarButton | undefined;
} = {};
}
/**
* A namespace for DebuggerHandler `statics`
*/
export namespace DebuggerHandler {
/**
* Instantiation options for a DebuggerHandler.
*/
export interface IOptions {
/**
* The type of session.
*/
type: SessionType;
/**
* The application shell.
*/
shell: JupyterFrontEnd.IShell;
/**
* The debugger service.
*/
service: IDebugger;
}
/**
* An interface for debugger handler.
*/
export interface IHandler {
/**
* Get the active widget.
*/
activeWidget:
| DebuggerHandler.SessionWidget[DebuggerHandler.SessionType]
| null;
/**
* Update a debug handler for the given widget, and
* handle kernel changed events.
*
* @param widget The widget to update.
* @param connection The session connection.
*/
update(
widget: DebuggerHandler.SessionWidget[DebuggerHandler.SessionType],
connection: Session.ISessionConnection | null
): Promise<void>;
/**
* Update a debug handler for the given widget, and
* handle connection kernel changed events.
*
* @param widget The widget to update.
* @param sessionContext The session context.
*/
updateContext(
widget: DebuggerHandler.SessionWidget[DebuggerHandler.SessionType],
sessionContext: ISessionContext
): Promise<void>;
}
/**
* The types of sessions that can be debugged.
*/
export type SessionType = keyof SessionHandler;
/**
* The types of handlers.
*/
export type SessionHandler = {
notebook: NotebookHandler;
console: ConsoleHandler;
file: FileHandler;
};
/**
* The types of widgets that can be debugged.
*/
export type SessionWidget = {
notebook: NotebookPanel;
console: ConsolePanel;
file: DocumentWidget;
};
}
``` | /content/code_sandbox/packages/debugger/src/handler.ts | xml | 2016-06-03T20:09:17 | 2024-08-16T19:12:44 | jupyterlab | jupyterlab/jupyterlab | 14,019 | 3,311 |
```xml
/*
*
* See the LICENSE file at the top-level directory of this distribution
* for licensing information.
*
* Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,
* no part of this software, including this file, may be copied, modified,
* propagated, or distributed except according to the terms contained in the
* LICENSE file.
*
* Removal or modification of this copyright notice is prohibited.
*/
import { BlockHeader } from '@liskhq/lisk-chain';
import { BFTHeader } from '../types';
export enum ForkStatus {
IDENTICAL_BLOCK = 1,
VALID_BLOCK = 2,
DOUBLE_FORGING = 3,
TIE_BREAK = 4,
DIFFERENT_CHAIN = 5,
DISCARD = 6,
}
interface Slots {
getSlotTime(slot: number): number;
getSlotNumber(timeStamp: number): number;
isWithinTimeslot(slot: number, time: number): boolean;
}
export const forgingSlot = (slots: Slots, block: BFTHeader): number =>
slots.getSlotNumber(block.timestamp);
export const isBlockReceivedWithinForgingSlot = (
slots: Slots,
{ timestamp, receivedAt }: BFTHeader,
): boolean =>
slots.isWithinTimeslot(
slots.getSlotNumber(timestamp),
receivedAt ?? Math.floor(Date.now() / 1000),
);
export const isLastAppliedBlockReceivedWithinForgingSlot = (
slots: Slots,
lastAppliedBlock: BFTHeader,
): boolean => {
/* If the block doesn't have the property `receivedAt` it means it was forged
or synced, therefore we assume it was "received in the correct slot" */
if (!lastAppliedBlock.receivedAt) {
return true;
}
return isBlockReceivedWithinForgingSlot(slots, lastAppliedBlock);
};
export const isValidBlock = (lastBlock: BFTHeader, currentBlock: BFTHeader): boolean =>
lastBlock.height + 1 === currentBlock.height && lastBlock.id.equals(currentBlock.previousBlockID);
export const isIdenticalBlock = (lastBlock: BFTHeader, currentBlock: BFTHeader): boolean =>
lastBlock.id.equals(currentBlock.id);
export const isDuplicateBlock = (lastBlock: BFTHeader, currentBlock: BFTHeader): boolean =>
lastBlock.height === currentBlock.height &&
lastBlock.maxHeightPrevoted === currentBlock.maxHeightPrevoted &&
lastBlock.previousBlockID.equals(currentBlock.previousBlockID);
export const isDoubleForging = (lastBlock: BFTHeader, currentBlock: BFTHeader): boolean =>
isDuplicateBlock(lastBlock, currentBlock) &&
lastBlock.generatorAddress.equals(currentBlock.generatorAddress);
export const isTieBreak = ({
slots,
lastAppliedBlock,
receivedBlock,
}: {
readonly slots: Slots;
readonly lastAppliedBlock: BFTHeader;
readonly receivedBlock: BFTHeader;
}): boolean =>
isDuplicateBlock(lastAppliedBlock, receivedBlock) &&
forgingSlot(slots, lastAppliedBlock) < forgingSlot(slots, receivedBlock) &&
!isLastAppliedBlockReceivedWithinForgingSlot(slots, lastAppliedBlock) &&
isBlockReceivedWithinForgingSlot(slots, receivedBlock);
interface DifferentChainCheckHeader {
height: number;
maxHeightPrevoted: number;
}
export const isDifferentChain = (
lastBlock: DifferentChainCheckHeader,
currentBlock: DifferentChainCheckHeader,
): boolean => {
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
const maxHeightPrevoted = lastBlock.maxHeightPrevoted || 0;
return (
maxHeightPrevoted < currentBlock.maxHeightPrevoted ||
(lastBlock.height < currentBlock.height && maxHeightPrevoted === currentBlock.maxHeightPrevoted)
);
};
export const forkChoice = (
blockHeader: BlockHeader,
lastBlockHeader: BlockHeader,
slots: Slots,
): ForkStatus => {
// Current time since Lisk Epoch
const receivedBFTHeader = {
...blockHeader.toObject(),
receivedAt: Math.floor(Date.now() / 1000),
};
/* Cases are numbered following LIP-0014 Fork choice rule.
See: path_to_url#applying-blocks-according-to-fork-choice-rule
Case 2 and 1 have flipped execution order for better readability. Behavior is still the same */
if (isValidBlock(lastBlockHeader, blockHeader)) {
// Case 2: correct block received
return ForkStatus.VALID_BLOCK;
}
if (isIdenticalBlock(lastBlockHeader, blockHeader)) {
// Case 1: same block received twice
return ForkStatus.IDENTICAL_BLOCK;
}
if (isDoubleForging(lastBlockHeader, blockHeader)) {
// Validators are the same
// Case 3: double forging different blocks in the same slot.
// Last Block stands.
return ForkStatus.DOUBLE_FORGING;
}
if (
isTieBreak({
slots,
lastAppliedBlock: lastBlockHeader,
receivedBlock: receivedBFTHeader,
})
) {
// Two competing blocks by different validators at the same height.
// Case 4: Tie break
return ForkStatus.TIE_BREAK;
}
if (isDifferentChain(lastBlockHeader, blockHeader)) {
// Case 5: received block has priority. Move to a different chain.
return ForkStatus.DIFFERENT_CHAIN;
}
// Discard newly received block
return ForkStatus.DISCARD;
};
``` | /content/code_sandbox/framework/src/engine/consensus/fork_choice/fork_choice_rule.ts | xml | 2016-02-01T21:45:35 | 2024-08-15T19:16:48 | lisk-sdk | LiskArchive/lisk-sdk | 2,721 | 1,169 |
```xml
import { AsyncIterableInput, AsyncIterableX } from '../asynciterablex.js';
import { OperatorAsyncFunction } from '../../interfaces.js';
import { wrapWithAbort } from './withabort.js';
import { throwIfAborted } from '../../aborterror.js';
import { FlattenConcurrentSelector } from './_flatten.js';
import { isPromise } from '../../util/isiterable.js';
class ConcatMapAsyncIterable<TSource, TResult> extends AsyncIterableX<TResult> {
constructor(
private _source: AsyncIterable<TSource>,
private _selector: FlattenConcurrentSelector<TSource, TResult>,
private _thisArg?: any
) {
super();
}
async *[Symbol.asyncIterator](signal?: AbortSignal) {
throwIfAborted(signal);
let outerIndex = 0;
const { _thisArg: thisArg, _selector: selector } = this;
for await (const outer of wrapWithAbort(this._source, signal)) {
const result = selector.call(thisArg, outer, outerIndex++, signal);
const values = (isPromise(result) ? await result : result) as AsyncIterableInput<TResult>;
for await (const inner of wrapWithAbort(AsyncIterableX.as(values), signal)) {
yield inner;
}
}
}
}
/**
* Projects each element of an async-iterable sequence to an async-iterable sequence and merges
* the resulting async-iterable sequences into one async-iterable sequence.
*
* @template TSource The type of the elements in the source sequence.
* @template TResult The type of the elements in the projected inner sequences and the elements in the merged result sequence.
* @param {((
* value: TSource,
* index: number,
* signal?: AbortSignal
* ) => AsyncIterable<TResult> | Promise<AsyncIterable<TResult>>)} selector A transform function to apply to each element.
* @param {*} [thisArg] Option this for binding to the selector.
* @returns {OperatorAsyncFunction<TSource, TResult>} An operator that creates an async-iterable sequence whose
* elements are the result of invoking the one-to-many transform function on each element of the input sequence.
*/
export function concatMap<TSource, TResult>(
selector: FlattenConcurrentSelector<TSource, TResult>,
thisArg?: any
): OperatorAsyncFunction<TSource, TResult> {
return function concatMapOperatorFunction(source) {
return new ConcatMapAsyncIterable(source, selector, thisArg);
};
}
``` | /content/code_sandbox/src/asynciterable/operators/concatmap.ts | xml | 2016-02-22T20:04:19 | 2024-08-09T18:46:41 | IxJS | ReactiveX/IxJS | 1,319 | 519 |
```xml
import type { ITextProps } from '../../primitives/Text/types';
import type { IIconProps } from '../../primitives/Icon';
import type { CustomProps, VariantType } from '../../types';
import type { InterfaceBoxProps } from '../../primitives/Box';
import type { ColorSchemeType } from '../../../components/types';
export interface InterfaceBadgeProps extends InterfaceBoxProps<IBadgeProps> {
/**
* The style variant of the badge.
* @default subtle
*/
variant?: VariantType<'Badge'>;
/**
* The color scheme to use for the badge. Must be a key in theme.colors.
*/
colorScheme?: ColorSchemeType;
/**
* The right icon element to use in the button.
*/
rightIcon?: JSX.Element | Array<JSX.Element>;
/**
* The left icon element to use in the button.
*/
leftIcon?: JSX.Element | Array<JSX.Element>;
/**
* The start icon element to use in the button.
*/
startIcon?: JSX.Element | Array<JSX.Element>;
/**
* The end icon element to use in the button.
*/
endIcon?: JSX.Element | Array<JSX.Element>;
/**
* Props to style the child text
*/
_text?: ITextProps;
/**
* Props to be passed to the Icon used inside of Button.
*/
_icon?: IIconProps;
}
export type IBadgeProps = InterfaceBadgeProps & CustomProps<'Badge'>;
``` | /content/code_sandbox/src/components/composites/Badge/types.tsx | xml | 2016-04-15T11:37:23 | 2024-08-14T16:16:44 | NativeBase | GeekyAnts/NativeBase | 20,132 | 323 |
```xml
import { RowTitle } from '@erxes/ui-engage/src/styles';
import ActionButtons from '@erxes/ui/src/components/ActionButtons';
import Button from '@erxes/ui/src/components/Button';
import ModalTrigger from '@erxes/ui/src/components/ModalTrigger';
import Tip from '@erxes/ui/src/components/Tip';
import { __ } from '@erxes/ui/src/utils/core';
import React from 'react';
import Form from '../containers/Form';
import { IGolomtBankConfigsItem } from '../../types/IConfigs';
type Props = {
config: IGolomtBankConfigsItem;
remove: (id: string) => void;
};
const Row = (props: Props) => {
const { config, remove } = props;
const renderRemoveAction = () => {
const onClick = () => {
remove(config._id);
};
return (
<Tip text={__('Delete')} placement="top">
<Button
id="configDelete"
btnStyle="link"
onClick={onClick}
icon="times-circle"
/>
</Tip>
);
};
const formContent = props => <Form {...props} config={config} />;
return (
<tr>
<td key={config._id}>
<RowTitle>{config.accountId || '-'}</RowTitle>
</td>
<td>
<ActionButtons>
<ModalTrigger
title={'Corporate Gateway'}
trigger={<Button btnStyle="link" icon="edit-3" />}
content={formContent}
size={'sm'}
/>
{renderRemoveAction()}
</ActionButtons>
</td>
</tr>
);
};
export default Row;
``` | /content/code_sandbox/packages/plugin-golomtbank-ui/src/configs/components/Row.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 359 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="path_to_url">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{A0AACB2A-E803-4B54-9D50-C9EC84E158F1}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Permissions</RootNamespace>
<AssemblyName>Permissions</AssemblyName>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>4.0</OldToolsVersion>
<UpgradeBackupLocation>
</UpgradeBackupLocation>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Permissions\</OutputPath>
<IntermediateOutputPath>bin\Permissions\obj\</IntermediateOutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Permissions\</OutputPath>
<IntermediateOutputPath>bin\Permissions\obj\</IntermediateOutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.Deployment.WindowsInstaller, Version=3.0.0.0, Culture=neutral, PublicKeyToken=ce35f76fcda82bad, processorArchitecture=MSIL">
<Private>True</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\WixSharp\WixSharp.csproj">
<Project>{8860B29B-749F-4925-86C8-F9C4B93C9DA5}</Project>
<Name>WixSharp</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="..\Wix# Samples\Permissions\setup.cs">
<Link>setup.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>
``` | /content/code_sandbox/Source/src/WixSharp.Samples/VSProjects/Permissions.csproj | xml | 2016-01-16T05:51:01 | 2024-08-16T12:26:25 | wixsharp | oleg-shilo/wixsharp | 1,077 | 1,263 |
```xml
import ChangeDetails from '../core/change-details';
import IMask from '../core/holder';
import { type TailDetails } from '../core/tail-details';
import { DIRECTION, type Direction } from '../core/utils';
import Masked, { type AppendFlags, type ExtractFlags, type MaskedOptions, type MaskedState } from './base';
import createMask, { type FactoryArg, normalizeOpts, type ExtendFactoryArgOptions, NormalizedOpts } from './factory';
import type PatternBlock from './pattern/block';
import ChunksTailDetails from './pattern/chunk-tail-details';
import PatternCursor from './pattern/cursor';
import PatternFixedDefinition from './pattern/fixed-definition';
import PatternInputDefinition from './pattern/input-definition';
import './regexp'; // support for default definitions which are regexp's
export
type MaskedPatternOptions<
Value=string,
M extends MaskedPattern<Value>=MaskedPattern<Value>,
Props extends keyof M=never,
> = MaskedOptions<M,
| 'definitions'
| 'blocks'
| 'placeholderChar'
| 'displayChar'
| 'lazy'
| Props
>;
export
type Definitions = {
[k: string]: FactoryArg,
};
export
type MaskedPatternState = MaskedState & {
_blocks: Array<MaskedState>,
};
export
type BlockPosData = {
index: number,
offset: number,
};
export
type BlockExtraOptions = {
expose?: boolean,
repeat?: number | [number, number],
};
/** Pattern mask */
export default
class MaskedPattern<Value=string> extends Masked<Value> {
static DEFAULTS = {
...Masked.DEFAULTS,
lazy: true,
placeholderChar: '_'
};
static STOP_CHAR = '`';
static ESCAPE_CHAR = '\\';
static InputDefinition = PatternInputDefinition;
static FixedDefinition = PatternFixedDefinition;
declare mask: string;
/** */
declare blocks: { [key: string]: ExtendFactoryArgOptions<BlockExtraOptions> };
/** */
declare definitions: Definitions;
/** Single char for empty input */
declare placeholderChar: string;
/** Single char for filled input */
declare displayChar: string;
/** Show placeholder only when needed */
declare lazy: boolean;
/** Enable characters overwriting */
declare overwrite?: boolean | 'shift' | undefined;
/** */
declare eager?: boolean | 'remove' | 'append' | undefined;
/** */
declare skipInvalid?: boolean | undefined;
/** */
declare autofix?: boolean | 'pad' | undefined;
declare _blocks: Array<PatternBlock>;
declare _maskedBlocks: {[key: string]: Array<number>};
declare _stops: Array<number>;
declare exposeBlock?: Masked;
constructor (opts: MaskedPatternOptions<Value>) {
super({
...MaskedPattern.DEFAULTS,
...opts,
definitions: Object.assign({}, PatternInputDefinition.DEFAULT_DEFINITIONS, opts?.definitions),
} as MaskedOptions);
}
override updateOptions (opts: Partial<MaskedPatternOptions<Value>>) {
super.updateOptions(opts);
}
override _update (opts: Partial<MaskedPatternOptions<Value>>) {
opts.definitions = Object.assign({}, this.definitions, opts.definitions);
super._update(opts);
this._rebuildMask();
}
_rebuildMask () {
const defs = this.definitions;
this._blocks = []; this.exposeBlock = undefined;
this._stops = [];
this._maskedBlocks = {};
const pattern = this.mask;
if (!pattern || !defs) return;
let unmaskingBlock = false;
let optionalBlock = false;
for (let i=0; i<pattern.length; ++i) {
if (this.blocks) {
const p = pattern.slice(i);
const bNames = Object.keys(this.blocks).filter(bName => p.indexOf(bName) === 0);
// order by key length
bNames.sort((a, b) => b.length - a.length);
// use block name with max length
const bName = bNames[0];
if (bName) {
const { expose, repeat, ...bOpts } = normalizeOpts(this.blocks[bName]) as NormalizedOpts<FactoryArg> & BlockExtraOptions; // TODO type Opts<Arg & Extra>
const blockOpts = {
lazy: this.lazy,
eager: this.eager,
placeholderChar: this.placeholderChar,
displayChar: this.displayChar,
overwrite: this.overwrite,
autofix: this.autofix,
...bOpts,
repeat,
parent: this,
};
const maskedBlock = repeat != null ? new IMask.RepeatBlock(blockOpts as any /* TODO */) : createMask(blockOpts);
if (maskedBlock) {
this._blocks.push(maskedBlock);
if (expose) this.exposeBlock = maskedBlock;
// store block index
if (!this._maskedBlocks[bName]) this._maskedBlocks[bName] = [];
this._maskedBlocks[bName].push(this._blocks.length - 1);
}
i += bName.length - 1;
continue;
}
}
let char = pattern[i];
let isInput = char in defs;
if (char === MaskedPattern.STOP_CHAR) {
this._stops.push(this._blocks.length);
continue;
}
if (char === '{' || char === '}') {
unmaskingBlock = !unmaskingBlock;
continue;
}
if (char === '[' || char === ']') {
optionalBlock = !optionalBlock;
continue;
}
if (char === MaskedPattern.ESCAPE_CHAR) {
++i;
char = pattern[i];
if (!char) break;
isInput = false;
}
const def = isInput ?
new PatternInputDefinition({
isOptional: optionalBlock,
lazy: this.lazy,
eager: this.eager,
placeholderChar: this.placeholderChar,
displayChar: this.displayChar,
...normalizeOpts(defs[char]),
parent: this,
}) as PatternBlock :
new PatternFixedDefinition({
char,
eager: this.eager,
isUnmasking: unmaskingBlock,
});
this._blocks.push(def);
}
}
override get state (): MaskedPatternState {
return {
...super.state,
_blocks: this._blocks.map(b => b.state),
};
}
override set state (state: MaskedPatternState) {
if (!state) { this.reset(); return; }
const { _blocks, ...maskedState } = state;
this._blocks.forEach((b, bi) => b.state = _blocks[bi]);
super.state = maskedState;
}
override reset () {
super.reset();
this._blocks.forEach(b => b.reset());
}
override get isComplete (): boolean {
return this.exposeBlock ? this.exposeBlock.isComplete :
this._blocks.every(b => b.isComplete);
}
override get isFilled (): boolean {
return this._blocks.every(b => b.isFilled);
}
get isFixed (): boolean {
return this._blocks.every(b => b.isFixed);
}
get isOptional (): boolean {
return this._blocks.every(b => b.isOptional);
}
override doCommit () {
this._blocks.forEach(b => b.doCommit());
super.doCommit();
}
override get unmaskedValue (): string {
return this.exposeBlock ? this.exposeBlock.unmaskedValue :
this._blocks.reduce((str, b) => str += b.unmaskedValue, '');
}
override set unmaskedValue (unmaskedValue: string) {
if (this.exposeBlock) {
const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);
this.exposeBlock.unmaskedValue = unmaskedValue;
this.appendTail(tail);
this.doCommit();
}
else super.unmaskedValue = unmaskedValue;
}
override get value (): string {
return this.exposeBlock ? this.exposeBlock.value :
// TODO return _value when not in change?
this._blocks.reduce((str, b) => str += b.value, '');
}
override set value (value: string) {
if (this.exposeBlock) {
const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);
this.exposeBlock.value = value;
this.appendTail(tail);
this.doCommit();
}
else super.value = value;
}
override get typedValue (): Value {
return this.exposeBlock ? this.exposeBlock.typedValue :
super.typedValue;
}
override set typedValue (value: Value) {
if (this.exposeBlock) {
const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);
this.exposeBlock.typedValue = value;
this.appendTail(tail);
this.doCommit();
}
else super.typedValue = value;
}
override get displayValue (): string {
return this._blocks.reduce((str, b) => str += b.displayValue, '');
}
override appendTail (tail: string | String | TailDetails): ChangeDetails {
return super.appendTail(tail).aggregate(this._appendPlaceholder());
}
override _appendEager (): ChangeDetails {
const details = new ChangeDetails();
let startBlockIndex = this._mapPosToBlock(this.displayValue.length)?.index;
if (startBlockIndex == null) return details;
// TODO test if it works for nested pattern masks
if (this._blocks[startBlockIndex].isFilled) ++startBlockIndex;
for (let bi=startBlockIndex; bi<this._blocks.length; ++bi) {
const d = this._blocks[bi]._appendEager();
if (!d.inserted) break;
details.aggregate(d);
}
return details;
}
override _appendCharRaw (ch: string, flags: AppendFlags<MaskedPatternState>={}): ChangeDetails {
const blockIter = this._mapPosToBlock(this.displayValue.length);
const details = new ChangeDetails();
if (!blockIter) return details;
for (let bi=blockIter.index, block; (block = this._blocks[bi]); ++bi) {
const blockDetails = block._appendChar(ch, { ...flags, _beforeTailState: flags._beforeTailState?._blocks?.[bi] });
details.aggregate(blockDetails);
if (blockDetails.consumed) break; // go next char
}
return details;
}
override extractTail (fromPos: number=0, toPos: number=this.displayValue.length): TailDetails {
const chunkTail = new ChunksTailDetails();
if (fromPos === toPos) return chunkTail;
this._forEachBlocksInRange(fromPos, toPos, (b, bi, bFromPos, bToPos) => {
const blockChunk = b.extractTail(bFromPos, bToPos);
blockChunk.stop = this._findStopBefore(bi);
blockChunk.from = this._blockStartPos(bi);
if (blockChunk instanceof ChunksTailDetails) blockChunk.blockIndex = bi;
chunkTail.extend(blockChunk);
});
return chunkTail;
}
override extractInput (fromPos: number=0, toPos: number=this.displayValue.length, flags: ExtractFlags={}): string {
if (fromPos === toPos) return '';
let input = '';
this._forEachBlocksInRange(fromPos, toPos, (b, _, fromPos, toPos) => {
input += b.extractInput(fromPos, toPos, flags);
});
return input;
}
_findStopBefore (blockIndex: number): number | undefined {
let stopBefore;
for (let si=0; si<this._stops.length; ++si) {
const stop = this._stops[si];
if (stop <= blockIndex) stopBefore = stop;
else break;
}
return stopBefore;
}
/** Appends placeholder depending on laziness */
override _appendPlaceholder (toBlockIndex?: number): ChangeDetails {
const details = new ChangeDetails();
if (this.lazy && toBlockIndex == null) return details;
const startBlockIter = this._mapPosToBlock(this.displayValue.length);
if (!startBlockIter) return details;
const startBlockIndex = startBlockIter.index;
const endBlockIndex = toBlockIndex != null ? toBlockIndex : this._blocks.length;
this._blocks.slice(startBlockIndex, endBlockIndex)
.forEach(b => {
if (!b.lazy || toBlockIndex != null) {
details.aggregate(b._appendPlaceholder((b as MaskedPattern)._blocks?.length));
}
});
return details;
}
/** Finds block in pos */
_mapPosToBlock (pos: number): BlockPosData | undefined {
let accVal = '';
for (let bi=0; bi<this._blocks.length; ++bi) {
const block = this._blocks[bi];
const blockStartPos = accVal.length;
accVal += block.displayValue;
if (pos <= accVal.length) {
return {
index: bi,
offset: pos - blockStartPos,
};
}
}
}
_blockStartPos (blockIndex: number): number {
return this._blocks
.slice(0, blockIndex)
.reduce((pos, b) => pos += b.displayValue.length, 0);
}
_forEachBlocksInRange (fromPos: number, toPos: number=this.displayValue.length, fn: (block: PatternBlock, blockIndex: number, fromPos: number, toPos: number) => void) {
const fromBlockIter = this._mapPosToBlock(fromPos);
if (fromBlockIter) {
const toBlockIter = this._mapPosToBlock(toPos);
// process first block
const isSameBlock = toBlockIter && fromBlockIter.index === toBlockIter.index;
const fromBlockStartPos = fromBlockIter.offset;
const fromBlockEndPos = toBlockIter && isSameBlock ?
toBlockIter.offset :
this._blocks[fromBlockIter.index].displayValue.length;
fn(this._blocks[fromBlockIter.index], fromBlockIter.index, fromBlockStartPos, fromBlockEndPos);
if (toBlockIter && !isSameBlock) {
// process intermediate blocks
for (let bi=fromBlockIter.index+1; bi<toBlockIter.index; ++bi) {
fn(this._blocks[bi], bi, 0, this._blocks[bi].displayValue.length);
}
// process last block
fn(this._blocks[toBlockIter.index], toBlockIter.index, 0, toBlockIter.offset);
}
}
}
override remove (fromPos: number=0, toPos: number=this.displayValue.length): ChangeDetails {
const removeDetails = super.remove(fromPos, toPos);
this._forEachBlocksInRange(fromPos, toPos, (b, _, bFromPos, bToPos) => {
removeDetails.aggregate(b.remove(bFromPos, bToPos));
});
return removeDetails;
}
override nearestInputPos (cursorPos: number, direction: Direction=DIRECTION.NONE): number {
if (!this._blocks.length) return 0;
const cursor = new PatternCursor(this, cursorPos);
if (direction === DIRECTION.NONE) {
// -------------------------------------------------
// NONE should only go out from fixed to the right!
// -------------------------------------------------
if (cursor.pushRightBeforeInput()) return cursor.pos;
cursor.popState();
if (cursor.pushLeftBeforeInput()) return cursor.pos;
return this.displayValue.length;
}
// FORCE is only about a|* otherwise is 0
if (direction === DIRECTION.LEFT || direction === DIRECTION.FORCE_LEFT) {
// try to break fast when *|a
if (direction === DIRECTION.LEFT) {
cursor.pushRightBeforeFilled();
if (cursor.ok && cursor.pos === cursorPos) return cursorPos;
cursor.popState();
}
// forward flow
cursor.pushLeftBeforeInput();
cursor.pushLeftBeforeRequired();
cursor.pushLeftBeforeFilled();
// backward flow
if (direction === DIRECTION.LEFT) {
cursor.pushRightBeforeInput();
cursor.pushRightBeforeRequired();
if (cursor.ok && cursor.pos <= cursorPos) return cursor.pos;
cursor.popState();
if (cursor.ok && cursor.pos <= cursorPos) return cursor.pos;
cursor.popState();
}
if (cursor.ok) return cursor.pos;
if (direction === DIRECTION.FORCE_LEFT) return 0;
cursor.popState();
if (cursor.ok) return cursor.pos;
cursor.popState();
if (cursor.ok) return cursor.pos;
return 0;
}
if (direction === DIRECTION.RIGHT || direction === DIRECTION.FORCE_RIGHT) {
// forward flow
cursor.pushRightBeforeInput();
cursor.pushRightBeforeRequired();
if (cursor.pushRightBeforeFilled()) return cursor.pos;
if (direction === DIRECTION.FORCE_RIGHT) return this.displayValue.length;
// backward flow
cursor.popState();
if (cursor.ok) return cursor.pos;
cursor.popState();
if (cursor.ok) return cursor.pos;
return this.nearestInputPos(cursorPos, DIRECTION.LEFT);
}
return cursorPos;
}
override totalInputPositions (fromPos: number=0, toPos: number=this.displayValue.length): number {
let total = 0;
this._forEachBlocksInRange(fromPos, toPos, (b, _, bFromPos, bToPos) => {
total += b.totalInputPositions(bFromPos, bToPos);
});
return total;
}
/** Get block by name */
maskedBlock (name: string): PatternBlock | undefined {
return this.maskedBlocks(name)[0];
}
/** Get all blocks by name */
maskedBlocks (name: string): Array<PatternBlock> {
const indices = this._maskedBlocks[name];
if (!indices) return [];
return indices.map(gi => this._blocks[gi]);
}
override pad (flags?: AppendFlags): ChangeDetails {
const details = new ChangeDetails();
this._forEachBlocksInRange(0, this.displayValue.length, b => details.aggregate(b.pad(flags)))
return details;
}
}
IMask.MaskedPattern = MaskedPattern;
``` | /content/code_sandbox/packages/imask/src/masked/pattern.ts | xml | 2016-11-10T13:04:29 | 2024-08-16T15:16:18 | imaskjs | uNmAnNeR/imaskjs | 4,881 | 4,062 |
```xml
export type { JestTestAdapter } from './jest-test-adapter.js';
export { jestTestAdapterFactory } from './jest-test-adapter-factory.js';
``` | /content/code_sandbox/packages/jest-runner/src/jest-test-adapters/index.ts | xml | 2016-02-12T13:14:28 | 2024-08-15T18:38:25 | stryker-js | stryker-mutator/stryker-js | 2,561 | 32 |
```xml
import { NavigationComponent, Options } from 'react-native-navigation';
class MyScreen extends NavigationComponent {
static options: Options = {
topBar: {
title: {
text: 'My Screen',
},
},
};
}
``` | /content/code_sandbox/website/docs/docs/style-screens/static-options-class.tsx | xml | 2016-03-11T11:22:54 | 2024-08-15T09:05:44 | react-native-navigation | wix/react-native-navigation | 13,021 | 51 |
```xml
<project xmlns="path_to_url"
xmlns:xsi="path_to_url"
xsi:schemaLocation="path_to_url path_to_url">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>foo.bar</groupId>
<artifactId>batch1</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>batchchild</artifactId>
</project>
``` | /content/code_sandbox/org.eclipse.jdt.ls.tests/projects/maven/batch/batch1/batchchild/pom.xml | xml | 2016-06-27T13:06:53 | 2024-08-16T00:38:32 | eclipse.jdt.ls | eclipse-jdtls/eclipse.jdt.ls | 1,726 | 105 |
```xml
<!--
Description: item guid
-->
<rss version="2.0">
<channel>
<item>
<guid isPermaLink="false">abc123</guid>
</item>
</channel>
</rss>
``` | /content/code_sandbox/testdata/translator/rss/feed_item_guid_-_rss_channel_item_guid.xml | xml | 2016-01-23T02:44:34 | 2024-08-16T15:16:03 | gofeed | mmcdole/gofeed | 2,547 | 50 |
```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
/* eslint-disable max-lines */
import cdf = require( '@stdlib/stats/base/dists/uniform/cdf' );
import Uniform = require( '@stdlib/stats/base/dists/uniform/ctor' );
import entropy = require( '@stdlib/stats/base/dists/uniform/entropy' );
import kurtosis = require( '@stdlib/stats/base/dists/uniform/kurtosis' );
import logcdf = require( '@stdlib/stats/base/dists/uniform/logcdf' );
import logpdf = require( '@stdlib/stats/base/dists/uniform/logpdf' );
import mean = require( '@stdlib/stats/base/dists/uniform/mean' );
import median = require( '@stdlib/stats/base/dists/uniform/median' );
import mgf = require( '@stdlib/stats/base/dists/uniform/mgf' );
import pdf = require( '@stdlib/stats/base/dists/uniform/pdf' );
import quantile = require( '@stdlib/stats/base/dists/uniform/quantile' );
import skewness = require( '@stdlib/stats/base/dists/uniform/skewness' );
import stdev = require( '@stdlib/stats/base/dists/uniform/stdev' );
import variance = require( '@stdlib/stats/base/dists/uniform/variance' );
/**
* Interface describing the `uniform` namespace.
*/
interface Namespace {
/**
* Uniform distribution cumulative distribution function (CDF).
*
* @param x - input value
* @param a - minimum support
* @param b - maximum support
* @returns evaluated CDF
*
* @example
* var y = ns.cdf( 5.0, 0.0, 4.0 );
* // returns 1.0
*
* var mycdf = ns.cdf.factory( 0.0, 10.0 );
* y = mycdf( 0.5 );
* // returns 0.05
*
* y = mycdf( 8.0 );
* // returns 0.8
*/
cdf: typeof cdf;
/**
* Uniform Distribution.
*/
Uniform: typeof Uniform;
/**
* Returns the differential entropy of a uniform distribution.
*
* ## Notes
*
* - If provided `a >= b`, the function returns `NaN`.
*
* @param a - minimum support
* @param b - maximum support
* @returns differential entropy
*
* @example
* var v = ns.entropy( 0.0, 1.0 );
* // returns 0.0
*
* @example
* var v = ns.entropy( 4.0, 12.0 );
* // returns ~2.079
*
* @example
* var v = ns.entropy( -4.0, 4.0 );
* // returns ~2.079
*
* @example
* var v = ns.entropy( 1.0, -0.1 );
* // returns NaN
*
* @example
* var v = ns.entropy( 2.0, NaN );
* // returns NaN
*
* @example
* var v = ns.entropy( NaN, 2.0 );
* // returns NaN
*/
entropy: typeof entropy;
/**
* Returns the excess kurtosis of a uniform distribution.
*
* ## Notes
*
* - If provided `a >= b`, the function returns `NaN`.
*
* @param a - minimum support
* @param b - maximum support
* @returns excess kurtosis
*
* @example
* var v = ns.kurtosis( 0.0, 1.0 );
* // returns -1.2
*
* @example
* var v = ns.kurtosis( 4.0, 12.0 );
* // returns -1.2
*
* @example
* var v = ns.kurtosis( -4.0, 4.0 );
* // returns -1.2
*
* @example
* var v = ns.kurtosis( 1.0, -0.1 );
* // returns NaN
*
* @example
* var v = ns.kurtosis( 2.0, NaN );
* // returns NaN
*
* @example
* var v = ns.kurtosis( NaN, 2.0 );
* // returns NaN
*/
kurtosis: typeof kurtosis;
/**
* Uniform distribution logarithm of cumulative distribution function (CDF).
*
* @param x - input value
* @param a - minimum support
* @param b - maximum support
* @returns evaluated logCDF
*
* @example
* var y = ns.logcdf( 5.0, 0.0, 4.0 );
* // returns 0.0
*
* var mylogcdf = ns.logcdf.factory( 0.0, 10.0 );
* y = mylogcdf( 0.5 );
* // returns ~-2.996
*
* y = mylogcdf( 8.0 );
* // returns ~-0.223
*/
logcdf: typeof logcdf;
/**
* Uniform distribution natural logarithm of the probability density function (logPDF).
*
* @param x - input value
* @param a - minimum support
* @param b - maximum support
* @returns evaluated logPDF
*
* @example
* var y = ns.logpdf( 3.0, 2.0, 6.0 );
* // returns ~-1.386
*
* var mylogpdf = ns.logpdf.factory( 6.0, 7.0 );
* y = mylogpdf( 7.0 );
* // returns 0.0
*
* y = mylogpdf( 5.0 );
* // returns -Infinity
*/
logpdf: typeof logpdf;
/**
* Returns the expected value of a uniform distribution.
*
* ## Notes
*
* - If provided `a >= b`, the function returns `NaN`.
*
* @param a - minimum support
* @param b - maximum support
* @returns expected value
*
* @example
* var v = ns.mean( 0.0, 1.0 );
* // returns 0.5
*
* @example
* var v = ns.mean( 4.0, 12.0 );
* // returns 8.0
*
* @example
* var v = ns.mean( -4.0, 4.0 );
* // returns 0.0
*
* @example
* var v = ns.mean( 1.0, -0.1 );
* // returns NaN
*
* @example
* var v = ns.mean( 2.0, NaN );
* // returns NaN
*
* @example
* var v = ns.mean( NaN, 2.0 );
* // returns NaN
*/
mean: typeof mean;
/**
* Returns the median of a uniform distribution.
*
* ## Notes
*
* - If provided `a >= b`, the function returns `NaN`.
*
* @param a - minimum support
* @param b - maximum support
* @returns median
*
* @example
* var v = ns.median( 0.0, 1.0 );
* // returns 0.5
*
* @example
* var v = ns.median( 4.0, 12.0 );
* // returns 8.0
*
* @example
* var v = ns.median( -4.0, 4.0 );
* // returns 0.0
*
* @example
* var v = ns.median( 1.0, -0.1 );
* // returns NaN
*
* @example
* var v = ns.median( 2.0, NaN );
* // returns NaN
*
* @example
* var v = ns.median( NaN, 2.0 );
* // returns NaN
*/
median: typeof median;
/**
* Uniform distribution moment-generating function (MGF).
*
* @param t - input value
* @param a - minimum support
* @param b - maximum support
* @returns evaluated MGF
*
* @example
* var y = ns.mgf( 2.0, 0.0, 4.0 );
* // returns ~372.495
*
* y = ns.mgf( -0.2, 0.0, 4.0 );
* // returns ~0.688
*
* y = ns.mgf( 2.0, 0.0, 1.0 );
* // returns ~3.195
*
* var mymgf = ns.mgf.factory( 6.0, 7.0 );
* y = mymgf( 0.1 );
* // returns ~1.916
*
* y = mymgf( 1.1 );
* // returns ~1339.321
*/
mgf: typeof mgf;
/**
* Uniform distribution probability density function (PDF).
*
* @param x - input value
* @param a - minimum support
* @param b - maximum support
* @returns evaluated PDF
*
* @example
* var y = ns.pdf( 3.0, 2.0, 6.0 );
* // returns 0.25
*
* var myPDF = ns.pdf.factory( 6.0, 7.0 );
* y = myPDF( 7.0 );
* // returns 1.0
*
* y = myPDF( 5.0 );
* // returns 0.0
*/
pdf: typeof pdf;
/**
* Uniform distribution quantile function.
*
* @param p - input value
* @param a - minimum support
* @param b - maximum support
* @returns evaluated quantile function
*
* @example
* var y = ns.quantile( 0.5, 0.0, 10.0 );
* // returns 5.0
*
* y = ns.quantile( 0.8, 0.0, 1.0 );
* // returns 0.8
*
* var myQuantile = ns.quantile.factory( 0.0, 4.0 );
* y = myQuantile( 0.8 );
* // returns 3.2
*/
quantile: typeof quantile;
/**
* Returns the skewness of a uniform distribution.
*
* ## Notes
*
* - If provided `a >= b`, the function returns `NaN`.
*
* @param a - minimum support
* @param b - maximum support
* @returns skewness
*
* @example
* var v = ns.skewness( 0.0, 1.0 );
* // returns 0.0
*
* @example
* var v = ns.skewness( 4.0, 12.0 );
* // returns 0.0
*
* @example
* var v = ns.skewness( -4.0, 4.0 );
* // returns 0.0
*
* @example
* var v = ns.skewness( 1.0, -0.1 );
* // returns NaN
*
* @example
* var v = ns.skewness( 2.0, NaN );
* // returns NaN
*
* @example
* var v = ns.skewness( NaN, 2.0 );
* // returns NaN
*/
skewness: typeof skewness;
/**
* Returns the standard deviation of a uniform distribution.
*
* ## Notes
*
* - If provided `a >= b`, the function returns `NaN`.
*
* @param a - minimum support
* @param b - maximum support
* @returns standard deviation
*
* @example
* var v = ns.stdev( 0.0, 1.0 );
* // returns ~0.289
*
* @example
* var v = ns.stdev( 4.0, 12.0 );
* // returns ~2.309
*
* @example
* var v = ns.stdev( -4.0, 4.0 );
* // returns ~2.309
*
* @example
* var v = ns.stdev( 1.0, -0.1 );
* // returns NaN
*
* @example
* var v = ns.stdev( 2.0, NaN );
* // returns NaN
*
* @example
* var v = ns.stdev( NaN, 2.0 );
* // returns NaN
*/
stdev: typeof stdev;
/**
* Returns the variance of a uniform distribution.
*
* ## Notes
*
* - If provided `a >= b`, the function returns `NaN`.
*
* @param a - minimum support
* @param b - maximum support
* @returns variance
*
* @example
* var v = ns.variance( 0.0, 1.0 );
* // returns ~0.083
*
* @example
* var v = ns.variance( 4.0, 12.0 );
* // returns ~5.333
*
* @example
* var v = ns.variance( -4.0, 4.0 );
* // returns ~5.333
*
* @example
* var v = ns.variance( 1.0, -0.1 );
* // returns NaN
*
* @example
* var v = ns.variance( 2.0, NaN );
* // returns NaN
*
* @example
* var v = ns.variance( NaN, 2.0 );
* // returns NaN
*/
variance: typeof variance;
}
/**
* Uniform distribution.
*/
declare var ns: Namespace;
// EXPORTS //
export = ns;
``` | /content/code_sandbox/lib/node_modules/@stdlib/stats/base/dists/uniform/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 3,344 |
```xml
import * as React from 'react';
import { Button, Tooltip } from '@fluentui/react-components';
import { ArrowRoutingRegular } from '@fluentui/react-icons';
export const Target = () => {
const [iconRef, setIconRef] = React.useState<HTMLSpanElement | null>(null);
return (
<Tooltip
positioning={{ target: iconRef }}
withArrow
content="This tooltip points to the icon"
relationship="description"
>
<Button icon={{ ref: setIconRef, children: <ArrowRoutingRegular /> }}>Button with icon</Button>
</Tooltip>
);
};
Target.parameters = {
docs: {
description: {
story: `The tooltip can be placed relative to a custom element using \`positioning.target\`. In this example, the
tooltip points to the icon inside the button, but it could point to any element.`,
},
},
};
``` | /content/code_sandbox/packages/react-components/react-tooltip/stories/src/Tooltip/TooltipTarget.stories.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 195 |
```xml
<controls:ContentPopup x:Class="Telegram.Views.Popups.ComposeInfoPopup"
xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:local="using:Telegram.Views.Popups"
xmlns:controls="using:Telegram.Controls"
xmlns:chats="using:Telegram.Controls.Chats"
xmlns:messages="using:Telegram.Controls.Messages"
xmlns:common="using:Telegram.Common"
xmlns:d="path_to_url"
xmlns:mc="path_to_url"
mc:Ignorable="d"
ContentMaxWidth="394"
HorizontalContentAlignment="Stretch"
Title="TITLE"
DefaultButton="None"
PrimaryButtonText="Button1"
SecondaryButtonText="Button2"
PrimaryButtonClick="ContentDialog_PrimaryButtonClick"
SecondaryButtonClick="ContentDialog_SecondaryButtonClick"
Padding="0,24">
<StackPanel>
<Grid x:Name="Preview">
<chats:ChatBackgroundControl x:Name="BackgroundControl" />
<StackPanel Padding="12,6,0,10">
<messages:MessageBubble x:Name="Message1"
HorizontalAlignment="Left" />
<messages:MessageBubble x:Name="Message2"
HorizontalAlignment="Right">
<FrameworkElement.Resources>
<common:ThemeOutgoing />
</FrameworkElement.Resources>
</messages:MessageBubble>
</StackPanel>
</Grid>
<controls:BadgeButton Content="{CustomResource ReplyToAnotherChat}"
Style="{StaticResource GlyphBadgeButtonStyle}"
Glyph="" />
<controls:BadgeButton Content="{CustomResource ShowInChat2}"
Style="{StaticResource GlyphBadgeButtonStyle}"
Glyph="" />
<controls:BadgeButton Content="{CustomResource DoNotReply}"
Style="{StaticResource GlyphBadgeButtonStyle}"
Foreground="{ThemeResource DangerButtonBackground}"
BorderThickness="0,0,0,1"
Glyph="" />
<TextBlock Text="{CustomResource MessageOptionsReplySubtitle}"
Style="{StaticResource InfoCaptionTextBlockStyle}"
Margin="24,8,24,0" />
</StackPanel>
</controls:ContentPopup>
``` | /content/code_sandbox/Telegram/Views/Popups/ComposeInfoPopup.xaml | xml | 2016-05-23T09:03:33 | 2024-08-16T16:17:48 | Unigram | UnigramDev/Unigram | 3,744 | 469 |
```xml
import * as React from 'react';
import { useFieldControlProps_unstable } from '@fluentui/react-field';
import { getIntrinsicElementProps, isHTMLElement, useEventCallback, useId, slot } from '@fluentui/react-utilities';
import { RadioGroupProps, RadioGroupState } from './RadioGroup.types';
/**
* Create the state required to render RadioGroup.
*
* The returned state can be modified with hooks such as useRadioGroupStyles_unstable,
* before being passed to renderRadioGroup_unstable.
*
* @param props - props from this instance of RadioGroup
* @param ref - reference to root HTMLElement of RadioGroup
*/
export const useRadioGroup_unstable = (props: RadioGroupProps, ref: React.Ref<HTMLDivElement>): RadioGroupState => {
// Merge props from surrounding <Field>, if any
props = useFieldControlProps_unstable(props);
const generatedName = useId('radiogroup-');
const { name = generatedName, value, defaultValue, disabled, layout = 'vertical', onChange, required } = props;
return {
layout,
name,
value,
defaultValue,
disabled,
required,
components: {
root: 'div',
},
root: {
ref,
role: 'radiogroup',
...slot.always(getIntrinsicElementProps('div', props, /*excludedPropNames:*/ ['onChange', 'name']), {
elementType: 'div',
}),
onChange: useEventCallback(ev => {
if (
onChange &&
isHTMLElement(ev.target, { constructorName: 'HTMLInputElement' }) &&
ev.target.type === 'radio'
) {
onChange(ev, { value: ev.target.value });
}
}),
},
};
};
``` | /content/code_sandbox/packages/react-components/react-radio/library/src/components/RadioGroup/useRadioGroup.ts | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 376 |
```xml
import React from 'react';
const renderNode = (Component: any, content: any, defaultProps: any = {}) => {
if (content == null || content === false) {
return null;
}
if (React.isValidElement(content)) {
return content;
}
if (typeof content === 'function') {
return content();
}
// Just in case
if (content === true) {
return <Component {...defaultProps} />;
}
if (typeof content === 'string') {
if (content.length === 0) {
return null;
}
return <Component {...defaultProps}>{content}</Component>;
}
if (typeof content === 'number') {
return <Component {...defaultProps}>{content}</Component>;
}
return <Component {...defaultProps} {...content} />;
};
export default renderNode;
``` | /content/code_sandbox/packages/base/src/helpers/renderNode.tsx | xml | 2016-09-08T14:21:41 | 2024-08-16T10:11:29 | react-native-elements | react-native-elements/react-native-elements | 24,875 | 183 |
```xml
=== Empty sequence
--- yaml
\--- []
--- perl
[ [] ]
# Simple lists
=== one_list1
--- yaml
---
- foo
--- perl
[ [ 'foo' ] ]
# Implicit document start
=== implicit_array
--- yaml
- foo
--- perl
[ [ 'foo' ] ]
=== one_list2
--- yaml
---
- foo
- bar
--- perl
[ [ 'foo', 'bar' ] ]
=== one_listundef
--- yaml
---
- ~
- bar
--- perl
[ [ undef, 'bar' ] ]
=== one_listundefs
--- noyamlpm
--- yaml
---
- ~
-
-
--- perl
[ [ undef, undef, undef ] ]
#####################################################################
# Empty Values and Premature EOF
=== empty array keys
--- yaml
---
- foo
-
-
--- perl
[ [ 'foo', undef, undef ] ]
--- noyamlpm
#####################################################################
# Empty Quote Line
=== empty quote line
--- yaml
---
- foo
\#
- bar
--- perl
[ [ "foo", "bar" ] ]
#####################################################################
# Trailing Whitespace
#
=== trailing whitespace
--- yaml
---
abstract: Generate fractal curves
foo: ~
arr:
# THESE LINES HAVE INTENTIONAL TRAILING WHITESPACE
- foo
- ~
- 'bar'
--- perl
[ {
abstract => 'Generate fractal curves',
foo => undef,
arr => [ 'foo', undef, 'bar' ],
} ]
``` | /content/code_sandbox/gnu/usr.bin/perl/cpan/CPAN-Meta-YAML/t/tml-local/yaml-roundtrip/sequence.tml | xml | 2016-08-30T18:18:25 | 2024-08-16T17:21:09 | src | openbsd/src | 3,139 | 333 |
```xml
<ResourceDictionary xmlns="path_to_url"
xmlns:x="path_to_url"
xmlns:local="clr-namespace:MahApps.Metro.IconPacks">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro.IconPacks.FeatherIcons;component/Themes/PackIconFeatherIcons.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type local:PackIconFeatherIcons}" BasedOn="{StaticResource MahApps.Styles.PackIconFeatherIcons}" />
</ResourceDictionary>
``` | /content/code_sandbox/src/MahApps.Metro.IconPacks.FeatherIcons/Themes/WPF/Generic.xaml | xml | 2016-07-17T00:10:12 | 2024-08-16T16:16:36 | MahApps.Metro.IconPacks | MahApps/MahApps.Metro.IconPacks | 1,748 | 124 |
```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 `dswap`.
*/
interface Routine {
/**
* Interchanges two double-precision floating-point vectors.
*
* @param N - number of indexed elements
* @param x - first input array
* @param strideX - `x` stride length
* @param y - second input array
* @param strideY - `y` stride length
* @returns `y`
*
* @example
* var Float64Array = require( '@stdlib/array/float64' );
*
* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
*
* dswap( x.length, x, 1, y, 1 );
* // x => <Float64Array>[ 6.0, 7.0, 8.0, 9.0, 10.0 ]
* // y => <Float64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0 ]
*/
( N: number, x: Float64Array, strideX: number, y: Float64Array, strideY: number ): Float64Array;
/**
* Interchanges two double-precision floating-point vectors using alternative indexing semantics.
*
* @param N - number of indexed elements
* @param x - first input array
* @param strideX - `x` stride length
* @param offsetX - starting index for `x`
* @param y - second input 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( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
*
* dswap.ndarray( x.length, x, 1, 0, y, 1, 0 );
* // x => <Float64Array>[ 6.0, 7.0, 8.0, 9.0, 10.0 ]
* // y => <Float64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0 ]
*/
ndarray( N: number, x: Float64Array, strideX: number, offsetX: number, y: Float64Array, strideY: number, offsetY: number ): Float64Array;
}
/**
* Interchanges two double-precision floating-point vectors.
*
* @param N - number of indexed elements
* @param x - first input array
* @param strideX - `x` stride length
* @param y - second input array
* @param strideY - `y` stride length
* @returns `y`
*
* @example
* var Float64Array = require( '@stdlib/array/float64' );
*
* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
*
* dswap( x.length, x, 1, y, 1 );
* // x => <Float64Array>[ 6.0, 7.0, 8.0, 9.0, 10.0 ]
* // y => <Float64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0 ]
*
* @example
* var Float64Array = require( '@stdlib/array/float64' );
*
* var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0 ] );
* var y = new Float64Array( [ 6.0, 7.0, 8.0, 9.0, 10.0 ] );
*
* dswap.ndarray( x.length, x, 1, 0, y, 1, 0 );
* // x => <Float64Array>[ 6.0, 7.0, 8.0, 9.0, 10.0 ]
* // y => <Float64Array>[ 1.0, 2.0, 3.0, 4.0, 5.0 ]
*/
declare var dswap: Routine;
// EXPORTS //
export = dswap;
``` | /content/code_sandbox/lib/node_modules/@stdlib/blas/base/dswap/docs/types/index.d.ts | xml | 2016-03-24T04:19:52 | 2024-08-16T09:03:19 | stdlib | stdlib-js/stdlib | 4,266 | 1,180 |
```xml
function whatever() {
function hello() {
}
}
``` | /content/code_sandbox/tests/pyconverter-test/baselines/function_enclosed.ts | xml | 2016-01-24T19:35:52 | 2024-08-16T16:39:39 | pxt | microsoft/pxt | 2,069 | 15 |
```xml
import subPathImport from "#mies/index.js";
console.log(subPathImport);
``` | /content/code_sandbox/test/cli/__fixtures__/workspaces-mono-repo-aliases/apps/admin/from-subpath-import.ts | xml | 2016-11-20T20:05:37 | 2024-08-16T08:58:52 | dependency-cruiser | sverweij/dependency-cruiser | 5,116 | 18 |
```xml
import { docsUrl } from '@pnpm/cli-utils'
import { FILTERING, OPTIONS, UNIVERSAL_OPTIONS } from '@pnpm/common-cli-options-help'
import { type Config, types as allTypes } from '@pnpm/config'
import { list, listForPackages } from '@pnpm/list'
import { type IncludedDependencies } from '@pnpm/types'
import pick from 'ramda/src/pick'
import renderHelp from 'render-help'
import { listRecursive } from './recursive'
export function rcOptionsTypes (): Record<string, unknown> {
return pick([
'depth',
'dev',
'global-dir',
'global',
'json',
'long',
'only',
'optional',
'parseable',
'production',
], allTypes)
}
export const cliOptionsTypes = (): Record<string, unknown> => ({
...rcOptionsTypes(),
'only-projects': Boolean,
recursive: Boolean,
})
export const shorthands: Record<string, string> = {
D: '--dev',
P: '--production',
}
export const commandNames = ['list', 'ls']
export function help (): string {
return renderHelp({
aliases: ['list', 'ls', 'la', 'll'],
description: 'When run as ll or la, it shows extended information by default. \
All dependencies are printed by default. Search by patterns is supported. \
For example: pnpm ls babel-* eslint-*',
descriptionLists: [
{
title: 'Options',
list: [
{
description: 'Perform command on every package in subdirectories \
or on every workspace package, when executed inside a workspace. \
For options that may be used with `-r`, see "pnpm help recursive"',
name: '--recursive',
shortAlias: '-r',
},
{
description: 'Show extended information',
name: '--long',
},
{
description: 'Show parseable output instead of tree view',
name: '--parseable',
},
{
description: 'Show information in JSON format',
name: '--json',
},
{
description: 'List packages in the global install prefix instead of in the current project',
name: '--global',
shortAlias: '-g',
},
{
description: 'Max display depth of the dependency tree',
name: '--depth <number>',
},
{
description: 'Display only direct dependencies',
name: '--depth 0',
},
{
description: 'Display only projects. Useful in a monorepo. `pnpm ls -r --depth -1` lists all projects in a monorepo',
name: '--depth -1',
},
{
description: 'Display only the dependency graph for packages in `dependencies` and `optionalDependencies`',
name: '--prod',
shortAlias: '-P',
},
{
description: 'Display only the dependency graph for packages in `devDependencies`',
name: '--dev',
shortAlias: '-D',
},
{
description: 'Display only dependencies that are also projects within the workspace',
name: '--only-projects',
},
{
description: "Don't display packages from `optionalDependencies`",
name: '--no-optional',
},
OPTIONS.globalDir,
...UNIVERSAL_OPTIONS,
],
},
FILTERING,
],
url: docsUrl('list'),
usages: [
'pnpm ls [<pkg> ...]',
],
})
}
export type ListCommandOptions = Pick<Config,
| 'allProjects'
| 'dev'
| 'dir'
| 'optional'
| 'production'
| 'selectedProjectsGraph'
| 'modulesDir'
| 'virtualStoreDirMaxLength'
> & Partial<Pick<Config, 'cliOptions'>> & {
alwaysPrintRootPackage?: boolean
depth?: number
lockfileDir?: string
long?: boolean
parseable?: boolean
onlyProjects?: boolean
recursive?: boolean
}
export async function handler (
opts: ListCommandOptions,
params: string[]
): Promise<string> {
const include = {
dependencies: opts.production !== false,
devDependencies: opts.dev !== false,
optionalDependencies: opts.optional !== false,
}
const depth = opts.cliOptions?.['depth'] ?? 0
if (opts.recursive && (opts.selectedProjectsGraph != null)) {
const pkgs = Object.values(opts.selectedProjectsGraph).map((wsPkg) => wsPkg.package)
return listRecursive(pkgs, params, { ...opts, depth, include })
}
return render([opts.dir], params, {
...opts,
depth,
include,
lockfileDir: opts.lockfileDir ?? opts.dir,
})
}
export async function render (
prefixes: string[],
params: string[],
opts: {
alwaysPrintRootPackage?: boolean
depth?: number
include: IncludedDependencies
lockfileDir: string
long?: boolean
json?: boolean
onlyProjects?: boolean
parseable?: boolean
modulesDir?: string
virtualStoreDirMaxLength: number
}
): Promise<string> {
const listOpts = {
alwaysPrintRootPackage: opts.alwaysPrintRootPackage,
depth: opts.depth ?? 0,
include: opts.include,
lockfileDir: opts.lockfileDir,
long: opts.long,
onlyProjects: opts.onlyProjects,
reportAs: (opts.parseable ? 'parseable' : (opts.json ? 'json' : 'tree')) as ('parseable' | 'json' | 'tree'),
showExtraneous: false,
modulesDir: opts.modulesDir,
virtualStoreDirMaxLength: opts.virtualStoreDirMaxLength,
}
return (params.length > 0)
? listForPackages(params, prefixes, listOpts)
: list(prefixes, listOpts)
}
``` | /content/code_sandbox/reviewing/plugin-commands-listing/src/list.ts | xml | 2016-01-28T07:40:43 | 2024-08-16T12:38:47 | pnpm | pnpm/pnpm | 28,869 | 1,265 |
```xml
import React, { useState } from 'react';
import { gql, useMutation, useQuery } from '@apollo/client';
import { mutations, queries } from '../graphql';
import { Alert } from '@erxes/ui/src/utils';
import KeyPad from '../components/Keypad';
type IProps = {
callUserIntegrations: any;
setConfig: any;
phoneNumber: any;
currentCallConversationId: string;
};
const KeyPadContainer = (props: IProps) => {
const {
callUserIntegrations,
setConfig,
phoneNumber,
currentCallConversationId,
} = props;
const defaultCallIntegration = localStorage.getItem(
'config:call_integrations',
);
const inboxId =
JSON.parse(defaultCallIntegration || '{}')?.inboxId ||
callUserIntegrations?.[0]?.inboxId;
const [customer, setCustomer] = useState<any>(undefined);
const [createCustomerMutation] = useMutation(gql(mutations.customersAdd));
const [updatePauseAgent] = useMutation(gql(mutations.callPauseAgent));
const [disconnectCall] = useMutation(gql(mutations.callDisconnect));
const {
data: agentStatusData,
loading,
refetch,
} = useQuery(gql(queries.callGetAgentStatus), {
fetchPolicy: 'network-only',
});
const createCustomer = (inboxIntegrationId: string, primaryPhone: string) => {
createCustomerMutation({
variables: {
inboxIntegrationId,
primaryPhone,
},
})
.then(({ data }: any) => {
setCustomer(data.callAddCustomer.customer);
})
.catch((e) => {
Alert.error(e.message);
});
};
const pauseExtention = (integrationId: string, status: string) => {
updatePauseAgent({
variables: {
status,
integrationId,
},
})
.then(() => {
const isPaused = agentStatus === 'yes' ? 'paused' : 'unpaused';
Alert.success(`Successfully ${isPaused}`);
refetch();
})
.catch((e) => {
Alert.error(e.message);
});
};
const agentStatus = agentStatusData?.callGetAgentStatus || '';
return (
<KeyPad
addCustomer={createCustomer}
key={1}
callUserIntegrations={callUserIntegrations}
setConfig={setConfig}
customer={customer}
disconnectCall={disconnectCall}
phoneNumber={phoneNumber || ''}
pauseExtention={pauseExtention}
agentStatus={agentStatus}
loading={loading}
currentCallConversationId={currentCallConversationId}
/>
);
};
export default KeyPadContainer;
``` | /content/code_sandbox/packages/plugin-calls-ui/src/containers/KeyPad.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 585 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<doc>
<assembly>
<name>System.Web.WebPages.Deployment</name>
</assembly>
<members>
<member name="T:System.Web.WebPages.Deployment.PreApplicationStartCode">
<summary> Web Pages </summary>
</member>
<member name="M:System.Web.WebPages.Deployment.PreApplicationStartCode.Start">
<summary> Web Pages </summary>
</member>
<member name="T:System.Web.WebPages.Deployment.WebPagesDeployment">
<summary>/ .NET Framework </summary>
</member>
<member name="M:System.Web.WebPages.Deployment.WebPagesDeployment.GetAssemblyPath(System.Version)">
<summary>/ .NET Framework </summary>
</member>
<member name="M:System.Web.WebPages.Deployment.WebPagesDeployment.GetExplicitWebPagesVersion(System.String)"></member>
<member name="M:System.Web.WebPages.Deployment.WebPagesDeployment.GetIncompatibleDependencies(System.String)">
<summary>/ .NET Framework </summary>
</member>
<member name="M:System.Web.WebPages.Deployment.WebPagesDeployment.GetMaxVersion">
<summary>/ .NET Framework </summary>
</member>
<member name="M:System.Web.WebPages.Deployment.WebPagesDeployment.GetVersion(System.String)">
<param name="path"></param>
</member>
<member name="M:System.Web.WebPages.Deployment.WebPagesDeployment.GetVersionWithoutEnabledCheck(System.String)">
<summary>/ .NET Framework </summary>
</member>
<member name="M:System.Web.WebPages.Deployment.WebPagesDeployment.GetWebPagesAssemblies">
<summary>/ .NET Framework </summary>
</member>
<member name="M:System.Web.WebPages.Deployment.WebPagesDeployment.IsEnabled(System.String)">
<summary>/ .NET Framework </summary>
</member>
<member name="M:System.Web.WebPages.Deployment.WebPagesDeployment.IsExplicitlyDisabled(System.String)">
<summary>/ .NET Framework </summary>
</member>
</members>
</doc>
``` | /content/code_sandbox/packages/Microsoft.AspNet.WebPages.2.0.20710.0/lib/net40/zh-Hans/system.web.webpages.deployment.xml | xml | 2016-05-19T00:34:01 | 2024-07-23T18:45:11 | gitwms | hechenqingyuan/gitwms | 1,000 | 445 |
```xml
<clickhouse>
<storage_configuration>
<disks>
<disk_s3>
<type>s3</type>
<endpoint>path_to_url
<access_key_id>minio</access_key_id>
<secret_access_key>minio123</secret_access_key>
</disk_s3>
<disk_s3_encrypted>
<type>encrypted</type>
<disk>disk_s3</disk>
<key>1234567812345678</key>
<path>encrypted/</path>
</disk_s3_encrypted>
<disk_s3_encrypted_with_diff_keys>
<type>encrypted</type>
<disk>disk_s3</disk>
<path>encrypted_with_diff_keys/</path>
</disk_s3_encrypted_with_diff_keys>
</disks>
<policies>
<s3_policy>
<volumes>
<main>
<disk>disk_s3</disk>
</main>
<external>
<disk>disk_s3_encrypted</disk>
</external>
</volumes>
</s3_policy>
<s3_encrypted_policy>
<volumes>
<main>
<disk>disk_s3_encrypted</disk>
</main>
</volumes>
</s3_encrypted_policy>
<s3_encrypted_policy_with_diff_keys>
<volumes>
<main>
<disk>disk_s3_encrypted_with_diff_keys</disk>
</main>
</volumes>
</s3_encrypted_policy_with_diff_keys>
</policies>
</storage_configuration>
</clickhouse>
``` | /content/code_sandbox/tests/integration/test_encrypted_disk_replication/configs/disk_s3_encrypted.xml | xml | 2016-06-02T08:28:18 | 2024-08-16T18:39:33 | ClickHouse | ClickHouse/ClickHouse | 36,234 | 363 |
```xml
import type { Options } from '@storybook/core/types';
import { dedent } from 'ts-dedent';
import { frameworkPackages } from './get-storybook-info';
import { normalizePath } from './normalize-path';
/** Framework can be a string or an object. This utility always returns the string name. */
export async function getFrameworkName(options: Options) {
const framework = await options.presets.apply('framework', '', options);
if (!framework) {
throw new Error(dedent`
You must specify a framework in '.storybook/main.js' config.
path_to_url#framework-field-mandatory
`);
}
return typeof framework === 'object' ? framework.name : framework;
}
/**
* Extracts the proper framework name from the given framework field. The framework field can be the
* framework package name or a path to the framework package.
*
* @example
*
* ```ts
* ExtractProperFrameworkName('/path/to/@storybook/angular'); // => '@storybook/angular'
* extractProperFrameworkName('@third-party/framework'); // => '@third-party/framework'
* ```
*/
export const extractProperFrameworkName = (framework: string) => {
const normalizedPath = normalizePath(framework);
const frameworkName = Object.keys(frameworkPackages).find((pkg) => normalizedPath.endsWith(pkg));
return frameworkName ?? framework;
};
``` | /content/code_sandbox/code/core/src/common/utils/get-framework-name.ts | xml | 2016-03-18T04:23:44 | 2024-08-16T19:22:08 | storybook | storybookjs/storybook | 83,755 | 286 |
```xml
import { ExpoConfig, getConfig } from '@expo/config';
import {
closeDevelopmentSessionAsync,
updateDevelopmentSessionAsync,
} from '../../api/updateDevelopmentSession';
import { getUserAsync } from '../../api/user/user';
import { env } from '../../utils/env';
import * as ProjectDevices from '../project/devices';
const debug = require('debug')('expo:start:server:developmentSession') as typeof console.log;
const UPDATE_FREQUENCY = 20 * 1000; // 20 seconds
async function isAuthenticatedAsync(): Promise<boolean> {
return !!(await getUserAsync().catch(() => null));
}
export class DevelopmentSession {
protected timeout: NodeJS.Timeout | null = null;
constructor(
/** Project root directory. */
private projectRoot: string,
/** Development Server URL. */
public url: string | null,
/** Catch any errors that may occur during the `startAsync` method. */
private onError: (error: Error) => void
) {}
/**
* Notify the Expo servers that a project is running, this enables the Expo Go app
* and Dev Clients to offer a "recently in development" section for quick access.
*
* This method starts an interval that will continue to ping the servers until we stop it.
*
* @param projectRoot Project root folder, used for retrieving device installation IDs.
* @param props.exp Partial Expo config with values that will be used in the Expo Go app.
* @param props.runtime which runtime the app should be opened in. `native` for dev clients, `web` for web browsers.
*/
public async startAsync({
exp = getConfig(this.projectRoot).exp,
runtime,
}: {
exp?: Pick<ExpoConfig, 'name' | 'description' | 'slug' | 'primaryColor'>;
runtime: 'native' | 'web';
}): Promise<void> {
try {
if (env.CI || env.EXPO_OFFLINE) {
debug(
env.CI
? 'This project will not be suggested in Expo Go or Dev Clients because Expo CLI is running in CI.'
: 'This project will not be suggested in Expo Go or Dev Clients because Expo CLI is running in offline-mode.'
);
this.stopNotifying();
return;
}
const deviceIds = await this.getDeviceInstallationIdsAsync();
if (!(await isAuthenticatedAsync()) && !deviceIds?.length) {
debug(
'Development session will not ping because the user is not authenticated and there are no devices.'
);
this.stopNotifying();
return;
}
if (this.url) {
// debug(`Development session ping (runtime: ${runtime}, url: ${this.url})`);
await updateDevelopmentSessionAsync({
url: this.url,
runtime,
exp,
deviceIds,
});
}
this.stopNotifying();
this.timeout = setTimeout(() => this.startAsync({ exp, runtime }), UPDATE_FREQUENCY);
} catch (error: any) {
debug(`Error updating development session API: ${error}`);
this.stopNotifying();
this.onError(error);
}
}
/** Get all recent devices for the project. */
private async getDeviceInstallationIdsAsync(): Promise<string[]> {
const { devices } = await ProjectDevices.getDevicesInfoAsync(this.projectRoot);
return devices.map(({ installationId }) => installationId);
}
/** Stop notifying the Expo servers that the development session is running. */
public stopNotifying() {
if (this.timeout) {
clearTimeout(this.timeout);
}
this.timeout = null;
}
/** Try to close any pending development sessions, but always resolve */
public async closeAsync(): Promise<boolean> {
this.stopNotifying();
if (env.CI || env.EXPO_OFFLINE) {
return false;
}
try {
const deviceIds = await this.getDeviceInstallationIdsAsync();
if (!(await isAuthenticatedAsync()) && !deviceIds?.length) {
return false;
}
if (this.url) {
await closeDevelopmentSessionAsync({
url: this.url,
deviceIds,
});
}
return true;
} catch (error: any) {
debug(`Error closing development session API: ${error}`);
this.onError(error);
return false;
}
}
}
``` | /content/code_sandbox/packages/@expo/cli/src/start/server/DevelopmentSession.ts | xml | 2016-08-15T17:14:25 | 2024-08-16T19:54:44 | expo | expo/expo | 32,004 | 917 |
```xml
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
</Project>
``` | /content/code_sandbox/test/dotnet-new.Tests/Approvals/DotnetCSharpClassTemplatesTest.struct.langVersion=9.0.targetFramework=netstandard2.0.verified/ClassLib.csproj | xml | 2016-07-22T21:26:02 | 2024-08-16T17:23:58 | sdk | dotnet/sdk | 2,627 | 56 |
```xml
'use client'
import axios from 'axios'
import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query'
import {
confirmResetPassword,
confirmSignUp,
getCurrentUser,
resetPassword,
signIn,
signOut,
signUp,
} from 'aws-amplify/auth'
import { useRouter } from 'next/router'
import { notification } from 'antd'
const api = {
getMe: () => axios.get('/me'),
updateMe: ({ data }) => axios.put('/me', { me: data }),
}
export function useCurrentUserQuery({ redirectOnNotAuth = true } = {}) {
const router = useRouter()
const currentUserQuery = useQuery(['currentUser'], async () => {
try {
const currentAuthenticatedUser = await getCurrentUser()
return currentAuthenticatedUser
} catch (error) {
if (redirectOnNotAuth) {
router.push('/')
}
return null
}
}, {
retry: false,
})
return currentUserQuery
}
export function useSignInMutation() {
const currentUserQuery = useCurrentUserQuery({ redirectOnNotAuth: false })
const signInMutation = useMutation(async ({ email, password }: any) => {
await signIn({ username: email, password })
await currentUserQuery.refetch()
},
{
onError: (err: Error) => {
notification.error({
message: 'Login failed',
description: err.message,
placement: 'topRight',
})
},
})
return signInMutation
}
export function useSignUpMutation() {
const signInMutation = useSignInMutation()
const router = useRouter()
const signUpMutation = useMutation(async ({ name, password, email }: any) => {
await signUp({
username: email,
password,
options: {
userAttributes: { email, name },
},
})
if (process.env.NEXT_PUBLIC_AUTO_VERIFY_USERS) {
await signInMutation.mutateAsync({ email, password })
router.push('/todo-lists')
return
}
router.push(`/verify?email=${encodeURIComponent(email)}`)
},
{
onError: async (err: Error) => notification.error({
message: 'Error',
description: err.message,
placement: 'topRight',
}),
})
return signUpMutation
}
export function useSignOutMutation({ includeEmailQueryStringParam = false } = {}) {
const queryClient = useQueryClient()
const currentUserQuery = useCurrentUserQuery({ redirectOnNotAuth: false })
const signOutMutation = useMutation(async () => {
try {
await signOut({ global: true })
} catch (error: any) {
notification.error({
message: 'Error trying to logout',
description: error.message,
placement: 'topRight',
})
} finally {
queryClient.cancelQueries()
queryClient.clear()
queryClient.invalidateQueries()
queryClient.removeQueries()
window.localStorage.clear()
const signInRoute = includeEmailQueryStringParam ? `/?${currentUserQuery.data?.username}` : '/'
global.window.location.href = signInRoute
}
})
return signOutMutation
}
export function useMeQuery({ isAuthenticated = true } = {}) {
const meQuery = useQuery(['me'], async () => {
const apiResponse = await api.getMe()
return apiResponse.data
}, { retry: false, enabled: isAuthenticated })
return meQuery
}
export function useUpdateMeMutation() {
const queryClient = useQueryClient()
const updateMeMutation = useMutation<any, any, any>(async ({ userId, data }) => {
try {
const response = await api.updateMe({ data })
await Promise.all([
queryClient.invalidateQueries(['me']),
])
return response
} catch (error: any) {
notification.error({
message: 'Update failed',
description: error?.response?.data?.message || error?.message || 'Unknown error',
placement: 'topRight',
})
}
})
return updateMeMutation
}
export function useForgotPasswordMutation() {
const router = useRouter()
const forgotPasswordMutation = useMutation(
async ({ email }: { email: string }) => {
await resetPassword({ username: email })
notification.success({
message: 'Password reset link sent',
description: 'Instructions have been sent to your email.',
placement: 'topRight',
})
await router.push(`/reset-password?email=${email}`)
},
{
onError: async (err: Error) => {
notification.error({
message: 'Forgot password failed',
description: err.message,
placement: 'topRight',
})
},
},
)
return forgotPasswordMutation
}
export function useResetPasswordMutation() {
const signInMutation = useSignInMutation()
const router = useRouter()
const resetPasswordMutation = useMutation(async ({ email, code, password }: { email: string, code: string, password: string }) => {
await confirmResetPassword({
username: email.trim(),
confirmationCode: code.trim(),
newPassword: password.trim(),
})
await signInMutation.mutateAsync({ email, password })
router.push('/')
},
{
onError: async (err: Error) => notification.error({
message: 'Error resetting password',
description: err.message,
placement: 'topRight',
}),
})
return resetPasswordMutation
}
export function useVerifyAccountMutation() {
const router = useRouter()
const verifyAccountMutation = useMutation(async ({ email, code }: { email: string, code: string }) => {
await confirmSignUp({
username: email.trim(),
confirmationCode: code.trim(),
})
notification.success({
message: 'Account confirmed! ',
description: 'You may now sign in.',
placement: 'topRight',
}),
router.push(`/?email=${encodeURIComponent(email)}`)
},
{
onError: async (err: Error) => notification.error({
message: 'Error confirming account',
description: err.message,
placement: 'topRight',
}),
})
return verifyAccountMutation
}
``` | /content/code_sandbox/examples/lambda-function-url/packages/ui/components/Me/meHooks.ts | xml | 2016-09-13T23:29:07 | 2024-08-15T09:52:47 | serverless-express | CodeGenieApp/serverless-express | 5,117 | 1,300 |
```xml
import angular from 'angular';
import { StateRegistry, StateService } from '@uirouter/angularjs';
import { Environment } from '@/react/portainer/environments/types';
import { notifyError } from '@/portainer/services/notifications';
import { StateManager } from '@/portainer/services/types';
import { reactModule } from './react';
export const azureModule = angular
.module('portainer.azure', [reactModule])
.config(config).name;
/* @ngInject */
function config($stateRegistryProvider: StateRegistry) {
const azure = {
name: 'azure',
url: '/azure',
parent: 'endpoint',
abstract: true,
onEnter: /* @ngInject */ function onEnter(
$async: (fn: () => Promise<void>) => Promise<void>,
$state: StateService,
endpoint: Environment,
StateManager: StateManager
) {
return $async(async () => {
if (endpoint.Type !== 3) {
$state.go('portainer.home');
return;
}
try {
await StateManager.updateEndpointState(endpoint);
} catch (e) {
notifyError('Failed loading environment', e as Error);
$state.go('portainer.home', {}, { reload: true });
}
});
},
};
const containerInstances = {
name: 'azure.containerinstances',
url: '/containerinstances',
views: {
'content@': {
component: 'containerInstancesView',
},
},
data: {
docs: '/user/aci/containers',
},
};
const containerInstance = {
name: 'azure.containerinstances.container',
url: '/:id',
views: {
'content@': {
component: 'containerInstanceView',
},
},
};
const containerInstanceCreation = {
name: 'azure.containerinstances.new',
url: '/new/',
views: {
'content@': {
component: 'createContainerInstanceView',
},
},
};
const dashboard = {
name: 'azure.dashboard',
url: '/dashboard',
views: {
'content@': {
component: 'dashboardView',
},
},
data: {
docs: '/user/aci/dashboard',
},
};
$stateRegistryProvider.register(azure);
$stateRegistryProvider.register(containerInstances);
$stateRegistryProvider.register(containerInstance);
$stateRegistryProvider.register(containerInstanceCreation);
$stateRegistryProvider.register(dashboard);
}
``` | /content/code_sandbox/app/azure/index.ts | xml | 2016-05-19T20:15:28 | 2024-08-16T19:15:14 | portainer | portainer/portainer | 30,083 | 533 |
```xml
import { ReactRenderer } from '@tiptap/react';
import { SuggestionOptions } from '@tiptap/suggestion';
import tippy, { GetReferenceClientRect } from 'tippy.js';
import { MentionList } from '../nodes/Mention.tsx';
import { IMentionUser } from '../../../types';
export type MentionSuggestionParams = {
fetchMentions: (args: any) => Promise<any>;
getVariables: (query: string) => Record<string, any>;
extractFunction: (queryResult: any) => IMentionUser[];
};
export function getMentionSuggestions({
getVariables,
fetchMentions,
extractFunction,
}: MentionSuggestionParams): Omit<SuggestionOptions, 'editor'> {
return {
items: async ({ query }) => {
try {
const { data } = await fetchMentions({
variables: getVariables(query),
});
// Extract the mentions from the query data or filter or process the fetched data as needed
const mentionData = extractFunction(data);
return mentionData;
} catch (error) {
return [];
}
},
render: () => {
let component: ReactRenderer<any>;
let popup: InstanceType<any> | null = null;
return {
onStart: (props) => {
component = new ReactRenderer(MentionList, {
props,
editor: props.editor,
});
if (!props.clientRect) {
return;
}
popup = tippy('body', {
getReferenceClientRect: props.clientRect as GetReferenceClientRect,
appendTo: () => document.body,
maxWidth: '100%',
content: component.element,
showOnCreate: true,
interactive: true,
trigger: 'manual',
placement: 'top-start',
onShow: () => {
// If a user deletes the @ symbol quickly after
// typing it, the node we want to append the popup
// to won't exist so we check to ensure it is there
// prior to mounting the popup to the DOM
try {
props.clientRect?.();
} catch {
return false;
}
},
});
},
onUpdate(props) {
component.updateProps(props);
if (!props.clientRect) {
return;
}
popup?.[0]?.setProps({
getReferenceClientRect: props.clientRect as GetReferenceClientRect,
});
},
onKeyDown(props) {
if (props.event.key === 'Escape') {
popup?.[0].hide();
return true;
}
return component.ref?.onKeyDown(props);
},
onExit() {
if (!popup || !popup?.[0] || !component) {
return;
}
setTimeout(() => {
popup?.[0].destroy();
component.destroy();
});
},
};
},
};
}
``` | /content/code_sandbox/packages/erxes-ui/src/components/richTextEditor/utils/getMentionSuggestions.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 606 |
```xml
"use client"
import { useEffect } from "react"
import { queries as orderQueries } from "@/modules/orders/graphql"
import useFullOrders from "@/modules/orders/hooks/useFullOrders"
import { waitingScreenAtom } from "@/store/config.store"
import { useAtomValue } from "jotai"
import { ORDER_ITEM_STATUSES, ORDER_STATUSES } from "@/lib/constants"
import Loader from "@/components/ui/loader"
import { ScrollArea } from "@/components/ui/scroll-area"
import Order from "../components/OrderAtWaiting"
const { DONE, DOING, REDOING, COMPLETE } = ORDER_STATUSES
const Waiting = () => {
const { fullOrders, loading, subToOrderStatuses, subToItems } = useFullOrders(
{
query: orderQueries.ordersAtWaiting,
variables: {
statuses: [DONE, DOING, REDOING],
sortDirection: -1,
sortField: "modifiedAt",
perPage: 30,
},
}
)
const waitingScreen = useAtomValue(waitingScreenAtom)
useEffect(() => {
subToOrderStatuses([DOING, DONE, COMPLETE, REDOING])
subToItems([ORDER_ITEM_STATUSES.CONFIRM, DONE])
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [])
if (loading) return <Loader />
if (!waitingScreen) {
return null
}
return (
<ScrollArea>
<div className="grid m-5 flex-wrap 2xl:grid-cols-8 gap-8 xl:grid-cols-6 grid-cols-5">
{fullOrders.map((order) => (
<Order {...order} key={order._id} />
))}
</div>
</ScrollArea>
)
}
export default Waiting
``` | /content/code_sandbox/pos/app/(main)/(orders)/waiting/page.tsx | xml | 2016-11-11T06:54:50 | 2024-08-16T10:26:06 | erxes | erxes/erxes | 3,479 | 384 |
```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.
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout
xmlns:android="path_to_url"
xmlns:app="path_to_url"
xmlns:tools="path_to_url"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="im.ene.toro.youtube.SinglePlayerActivity"
>
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/app_bar"
android:layout_width="match_parent"
android:layout_height="@dimen/app_bar_height"
android:fitsSystemWindows="true"
android:theme="@style/AppTheme.AppBarOverlay"
>
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/toolbar_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
app:contentScrim="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:toolbarId="@+id/toolbar"
>
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:layout_collapseMode="pin"
app:popupTheme="@style/AppTheme.PopupOverlay"
/>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_single_player"/>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
``` | /content/code_sandbox/app-youtube/src/main/res/layout/activity_single_player.xml | xml | 2016-01-31T15:45:41 | 2024-08-14T02:52:55 | toro | eneim/toro | 1,414 | 409 |
```xml
import {
TestBed,
inject,
waitForAsync,
ComponentFixture,
} from '@angular/core/testing';
import { Component } from '@angular/core';
import { OverlayContainer } from '@angular/cdk/overlay';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { By } from '@angular/platform-browser';
import { CovalentLoadingModule } from '../loading.module';
import { TdLoadingService } from '../services/loading.service';
import { LoadingType } from '../loading.component';
describe('Service: Loading', () => {
let overlayContainerElement: HTMLElement;
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [TdLoadingWrapperTestComponent],
imports: [NoopAnimationsModule, CovalentLoadingModule],
providers: [
{
provide: OverlayContainer,
useFactory: () => {
overlayContainerElement = document.createElement('div');
return { getContainerElement: () => overlayContainerElement };
},
},
],
});
TestBed.compileComponents();
})
);
afterEach(() => {
overlayContainerElement.innerHTML = '';
});
it('should render default fullscreen loading component', (done) => {
inject([TdLoadingService], (loadingService: TdLoadingService) => {
const fixture: ComponentFixture<any> = TestBed.createComponent(
TdLoadingWrapperTestComponent
);
fixture.detectChanges();
expect(fixture.debugElement.query(By.css('.content'))).toBeTruthy();
loadingService.register();
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(
overlayContainerElement.querySelector('td-loading')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('mat-progress-spinner')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.mat-primary')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.td-overlay')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.td-fullscreen')
).toBeTruthy();
loadingService.resolve();
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(
overlayContainerElement.querySelector('td-loading')
).toBeFalsy();
done();
});
});
})();
});
it('should render configured progress bar, accent fullscreen loading component', (done) => {
inject([TdLoadingService], (loadingService: TdLoadingService) => {
const fixture: ComponentFixture<any> = TestBed.createComponent(
TdLoadingWrapperTestComponent
);
loadingService.create({
name: 'name',
type: LoadingType.Linear,
color: 'accent',
});
fixture.detectChanges();
expect(fixture.debugElement.query(By.css('.content'))).toBeTruthy();
loadingService.register('name');
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(
overlayContainerElement.querySelector('td-loading')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('mat-progress-bar')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.mat-accent')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.td-overlay')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.td-fullscreen')
).toBeTruthy();
loadingService.resolve('name');
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(
overlayContainerElement.querySelector('td-loading')
).toBeFalsy();
done();
});
});
})();
});
it('should render configured progress bar, accent fullscreen loading component', (done) => {
inject([TdLoadingService], (loadingService: TdLoadingService) => {
const fixture: ComponentFixture<any> = TestBed.createComponent(
TdLoadingWrapperTestComponent
);
loadingService.create({
name: 'name',
type: LoadingType.Linear,
color: 'accent',
});
fixture.detectChanges();
expect(fixture.debugElement.query(By.css('.content'))).toBeTruthy();
loadingService.register('name');
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(
overlayContainerElement.querySelector('td-loading')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('mat-progress-bar')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.mat-accent')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.td-overlay')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.td-fullscreen')
).toBeTruthy();
loadingService.resolve('name');
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(
overlayContainerElement.querySelector('td-loading')
).toBeFalsy();
done();
});
});
})();
});
it('should throw error when trying to create loading component', (done) => {
inject([TdLoadingService], (loadingService: TdLoadingService) => {
expect(function (): void {
loadingService.create({
name: '',
type: LoadingType.Linear,
color: 'accent',
});
}).toThrowError();
done();
})();
});
it('should remove overriding loading component with the same name if fullscreen', (done) => {
inject([TdLoadingService], (loadingService: TdLoadingService) => {
const fixture: ComponentFixture<any> = TestBed.createComponent(
TdLoadingWrapperTestComponent
);
expect(function (): void {
loadingService.create({
name: 'name',
type: LoadingType.Linear,
color: 'accent',
});
}).not.toThrowError();
fixture.detectChanges();
expect(function (): void {
loadingService.create({
name: 'name',
type: LoadingType.Linear,
color: 'accent',
});
}).not.toThrowError();
done();
})();
});
it('should fail to resolve/setValue/register unknown names', (done) => {
inject([TdLoadingService], (loadingService: TdLoadingService) => {
expect(loadingService.register('unknown')).toBeFalsy();
expect(loadingService.setValue('unknown', 50)).toBeFalsy();
expect(loadingService.resolve('unknown')).toBeFalsy();
done();
})();
});
it('should render default fullscreen by registering 3 times and then resolve by calling resolveAll', (done) => {
inject([TdLoadingService], (loadingService: TdLoadingService) => {
const fixture: ComponentFixture<any> = TestBed.createComponent(
TdLoadingWrapperTestComponent
);
fixture.detectChanges();
expect(fixture.debugElement.query(By.css('.content'))).toBeTruthy();
loadingService.register();
loadingService.register();
loadingService.register();
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(
overlayContainerElement.querySelector('td-loading')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('mat-progress-spinner')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.mat-primary')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.td-overlay')
).toBeTruthy();
expect(
overlayContainerElement.querySelector('.td-fullscreen')
).toBeTruthy();
loadingService.resolveAll();
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(
overlayContainerElement.querySelector('td-loading')
).toBeFalsy();
done();
});
});
})();
});
});
@Component({
selector: 'td-loading-wrapper-test',
template: ` <div class="content"></div> `,
})
class TdLoadingWrapperTestComponent {}
``` | /content/code_sandbox/libs/angular/loading/src/services/loading.service.spec.ts | xml | 2016-07-11T23:30:52 | 2024-08-15T15:20:45 | covalent | Teradata/covalent | 2,228 | 1,537 |
```xml
import vscode from 'vscode';
import { testDiagnostics, testNoDiagnostics } from '../../../diagnosticHelper';
import { getDocUri } from '../../path';
import { sameLineRange } from '../../../util';
describe('Should find common diagnostics for all regions', () => {
const parentUri = getDocUri('diagnostics/propsValidation/parent.vue');
const passParentUri = getDocUri('diagnostics/propsValidation/pass-parent.vue');
it('shows warnings for passing wrong props to child component when using array props', async () => {
const expectedDiagnostics: vscode.Diagnostic[] = [
{
message: '<array-child> misses props: foo, bar, b-az',
severity: vscode.DiagnosticSeverity.Warning,
range: sameLineRange(2, 4, 31)
},
{
message: '<array-child> misses props: bar, b-az',
severity: vscode.DiagnosticSeverity.Warning,
range: sameLineRange(3, 4, 41)
},
{
message: '<array-child> misses props: bar, b-az',
severity: vscode.DiagnosticSeverity.Warning,
range: sameLineRange(4, 4, 42)
},
{
message: '<array-child> misses props: b-az',
severity: vscode.DiagnosticSeverity.Warning,
range: sameLineRange(5, 4, 70)
},
{
message: '<array-child> misses props: b-az',
severity: vscode.DiagnosticSeverity.Warning,
range: sameLineRange(8, 4, 64)
},
{
message: '<ArrayChild> misses props: foo, bar, b-az',
severity: vscode.DiagnosticSeverity.Warning,
range: sameLineRange(9, 4, 18)
},
{
message: '<ArrayChild> misses props: foo, bar, b-az',
severity: vscode.DiagnosticSeverity.Warning,
range: sameLineRange(10, 4, 29)
}
];
await testDiagnostics(parentUri, expectedDiagnostics);
});
it('shows warnings for passing wrong props to child component when using simple validators', async () => {
const expectedDiagnostics: vscode.Diagnostic[] = [
{
message: '<simple-validator-child> misses props: foo, bar',
severity: vscode.DiagnosticSeverity.Warning,
range: sameLineRange(11, 4, 30)
}
];
await testDiagnostics(parentUri, expectedDiagnostics);
});
it('shows errors for passing wrong props to child component when using object validators', async () => {
const expectedDiagnostics: vscode.Diagnostic[] = [
{
message: '<object-validator-child> misses props: foo, bar, with-required, no-default-required',
severity: vscode.DiagnosticSeverity.Error,
range: sameLineRange(12, 4, 30)
},
{
message: '<object-validator-child> misses props: bar, with-required, no-default-required',
severity: vscode.DiagnosticSeverity.Error,
range: sameLineRange(13, 4, 41)
},
{
message: '<object-validator-child> misses props: foo, with-required, no-default-required',
severity: vscode.DiagnosticSeverity.Error,
range: sameLineRange(14, 4, 40)
}
];
await testDiagnostics(parentUri, expectedDiagnostics);
});
it('shows errors or warnings for passing wrong props to child component when using class component', async () => {
const expectedDiagnostics: vscode.Diagnostic[] = [
{
message: '<class-child> misses props: foo, bar, ear, far, name, checked',
severity: vscode.DiagnosticSeverity.Error,
range: sameLineRange(15, 4, 19)
},
{
message: '<class-child> misses props: foo, bar, far, name, checked',
severity: vscode.DiagnosticSeverity.Error,
range: sameLineRange(16, 4, 29)
},
{
message: '<class-child> misses props: foo, bar, far, name',
severity: vscode.DiagnosticSeverity.Warning,
range: sameLineRange(17, 4, 45)
},
{
message: '<class-child> misses props: foo, bar, far, name',
severity: vscode.DiagnosticSeverity.Warning,
range: sameLineRange(18, 4, 51)
}
];
await testDiagnostics(parentUri, expectedDiagnostics);
});
it('shows no diagnostics error for prop validator', async () => {
await testNoDiagnostics(passParentUri);
});
});
``` | /content/code_sandbox/test/interpolation/features/diagnostics/propsValidation.test.ts | xml | 2016-10-29T23:20:43 | 2024-08-16T03:59:58 | vetur | vuejs/vetur | 5,739 | 1,010 |
```xml
import { VariableSizeList as VariableSizeListWithoutVirtualization } from '@brunolemos/react-window-without-virtualization'
import React, {
Fragment,
useCallback,
useContext,
useEffect,
useLayoutEffect,
useMemo,
useRef,
useState,
} from 'react'
import { AppState, Dimensions, InteractionManager, View } from 'react-native'
import {
ListChildComponentProps,
VariableSizeList,
VariableSizeListProps,
} from 'react-window'
import { useDynamicRef } from '../../../hooks/use-dynamic-ref'
import { sharedStyles } from '../../../styles/shared'
import { AutoSizer } from '../../auto-sizer'
import { bugsnag } from '../../bugsnag'
import { OneListInstance, OneListProps } from '../index.shared'
export { OneListProps }
const defaultSafeAreaInsets: OneListProps<any>['safeAreaInsets'] = {
top: 0,
bottom: 0,
left: 0,
right: 0,
}
export const OneListSafeAreaContext = React.createContext(defaultSafeAreaInsets)
const ItemRow = React.memo(
(props: {
index: number
item: any
itemKey: string
renderItem: OneListProps<any>['renderItem']
}) => {
const { index, item, itemKey, renderItem } = props
return <Fragment key={itemKey}>{renderItem({ index, item })}</Fragment>
},
)
interface ItemData {
data: any[]
footer?: OneListProps<any>['footer']
getItemKey?: OneListProps<any>['getItemKey']
header?: OneListProps<any>['header']
innerFooterSize: number
innerHeaderSize: number
itemCount: number
itemSeparator?: OneListProps<any>['itemSeparator']
pagingEnabled: OneListProps<any>['pagingEnabled']
renderItem: OneListProps<any>['renderItem']
snapToAlignment: OneListProps<any>['snapToAlignment']
}
const Row = React.memo(
React.forwardRef<any, ListChildComponentProps>((props, rowRef) => {
const { index, style: _style } = props
const {
data,
footer,
getItemKey,
header,
innerFooterSize,
innerHeaderSize,
itemCount,
itemSeparator,
pagingEnabled,
renderItem,
snapToAlignment,
} = props.data as ItemData
const safeAreaInsets = useContext(OneListSafeAreaContext)
const style = {
..._style,
...(pagingEnabled
? { scrollSnapAlign: snapToAlignment || 'start' }
: undefined),
top:
typeof safeAreaInsets.top === 'number'
? `${parseFloat(`${_style.top || 0}`) + safeAreaInsets.top}px`
: _style.top,
left:
typeof safeAreaInsets.left === 'number'
? `${parseFloat(`${_style.left || 0}`) + safeAreaInsets.left}px`
: _style.left,
}
if (innerHeaderSize && index === 0 && header) {
return (
<div
ref={rowRef}
key={`react-window-header-${header.Component.displayName}`}
style={style}
>
<header.Component />
</div>
)
}
if (innerFooterSize && index === itemCount - 1 && footer) {
return (
<div ref={rowRef} style={style}>
<footer.Component />
</div>
)
}
const dataIndex = innerHeaderSize ? index - 1 : index
if (!(dataIndex >= 0 && dataIndex <= data.length - 1)) return null
return (
<div ref={rowRef} style={style}>
<View style={[sharedStyles.fullWidth, sharedStyles.fullHeight]}>
<ItemRow
index={dataIndex}
item={data[dataIndex]}
itemKey={
getItemKey
? getItemKey(data[dataIndex], dataIndex)
: `react-window-item-row-${dataIndex}`
}
renderItem={renderItem}
/>
{!!(
dataIndex >= 0 &&
dataIndex < data.length - 1 &&
itemSeparator &&
itemSeparator.size > 0 &&
itemSeparator.Component
) && (
<itemSeparator.Component
leading={{ index, item: data[dataIndex] }}
trailing={
dataIndex + 1 < data.length - 1
? { index: dataIndex + 1, item: data[dataIndex + 1] }
: undefined
}
/>
)}
</View>
</div>
)
}),
)
const InnerElementType = React.forwardRef<
any,
{
[key: string]: any
style: { width?: string | number; height?: string | number }
}
>((props, ref) => {
const { style: _style, ...restProps } = props
const safeAreaInsets = useContext(OneListSafeAreaContext)
const style = {
..._style,
width:
(typeof safeAreaInsets.left === 'number' && safeAreaInsets.left !== 0) ||
(typeof safeAreaInsets.right === 'number' &&
safeAreaInsets.right !== 0 &&
(!_style.width || typeof _style.width !== 'string'))
? `${
parseFloat(`${_style.width || 0}`) +
(safeAreaInsets.left || 0) +
(safeAreaInsets.right || 0)
}px`
: _style.width,
height:
(typeof safeAreaInsets.top === 'number' && safeAreaInsets.top !== 0) ||
(typeof safeAreaInsets.bottom === 'number' &&
safeAreaInsets.bottom !== 0 &&
(!_style.height || typeof _style.height !== 'string'))
? `${
parseFloat(`${_style.height || 0}`) +
(safeAreaInsets.top || 0) +
(safeAreaInsets.bottom || 0)
}px`
: _style.height,
}
return <div ref={ref} style={style} {...restProps} />
})
// eslint-disable-next-line react/display-name
export const OneList = React.memo(
React.forwardRef<OneListInstance, OneListProps<any>>((props, ref) => {
const {
ListEmptyComponent,
containerStyle,
data,
disableVirtualization,
estimatedItemSize,
footer,
forceRerenderOnRefChange,
getItemKey,
getItemSize,
header,
horizontal,
itemSeparator,
listStyle,
onVisibleItemsChanged,
overscanCount,
pagingEnabled,
pointerEvents,
refreshControl: _refreshControl, // TODO
renderItem,
safeAreaInsets,
snapToAlignment,
...restProps
} = props
const List = disableVirtualization
? VariableSizeListWithoutVirtualization
: VariableSizeList
const itemSeparatorSize =
itemSeparator && itemSeparator.Component && itemSeparator.size > 0
? itemSeparator.size
: 0
const innerHeaderSize =
header && header.Component && !header.sticky && header.size > 0
? header.size
: 0
const innerFooterSize =
footer && footer.Component && !footer.sticky && footer.size > 0
? footer.size
: 0
React.useImperativeHandle(
ref,
() => ({
scrollToStart: () => {
try {
if (!variableSizeListRef.current) return
variableSizeListRef.current.scrollTo(0)
} catch (error) {
console.error(error)
bugsnag.notify(error)
}
},
scrollToEnd: () => {
try {
if (!variableSizeListRef.current) return
variableSizeListRef.current.scrollToItem(data.length - 1, 'start')
} catch (error) {
console.error(error)
bugsnag.notify(error)
}
},
scrollToIndex: (dataIndex, params) => {
try {
const alignment = params ? params.alignment : 'smart'
if (!variableSizeListRef.current) return
const index = innerHeaderSize ? dataIndex + 1 : dataIndex
variableSizeListRef.current.scrollToItem(index, alignment)
} catch (error) {
console.error(error)
bugsnag.notify(error)
}
},
}),
[data.length, innerHeaderSize],
)
const variableSizeListRef = useRef<VariableSizeList>(null)
const variableSizeListInnerRef =
useRef<React.HTMLAttributes<React.ReactHTMLElement<HTMLDivElement>>>(null)
const [isInitialRender, setIsInitialRender] = useState(true)
useEffect(() => {
if (AppState.currentState === 'active') {
void InteractionManager.runAfterInteractions(() => {
setIsInitialRender(false)
})
} else {
setIsInitialRender(false)
}
}, [])
const _itemCount =
data.length + (innerHeaderSize ? 1 : 0) + (innerFooterSize ? 1 : 0)
let itemCount = _itemCount
if (isInitialRender) {
const totalScreenSize = horizontal
? Dimensions.get('window').width
: Dimensions.get('window').height
let initialNumToRender = 0
let totalRenderedSize = 0
data.every((item, index) => {
const size = getItemSize(item, index)
totalRenderedSize = totalRenderedSize + size
initialNumToRender = initialNumToRender + 1
return totalRenderedSize < totalScreenSize
})
itemCount = Math.min(
initialNumToRender +
(innerHeaderSize ? 1 : 0) +
(innerFooterSize ? 1 : 0),
_itemCount,
)
}
const itemCountRef = useDynamicRef(itemCount)
const itemKey = useCallback<NonNullable<VariableSizeListProps['itemKey']>>(
(index, _itemData: ItemData) => {
if (innerHeaderSize && index === 0) return 'header'
if (innerFooterSize && index === itemCountRef.current - 1)
return 'footer'
const dataIndex = innerHeaderSize ? index - 1 : index
return getItemKey(_itemData.data[dataIndex], dataIndex)
},
[getItemKey, innerHeaderSize, innerFooterSize],
)
const itemSize = useMemo<VariableSizeListProps['itemSize']>(() => {
return (index) => {
if (innerHeaderSize && index === 0) return innerHeaderSize
if (innerFooterSize && index === itemCount - 1) return innerFooterSize
const dataIndex = innerHeaderSize ? index - 1 : index
if (!(dataIndex >= 0 && dataIndex <= data.length - 1)) return 0
return (
getItemSize(data[dataIndex], dataIndex) +
(dataIndex >= 0 && dataIndex < data.length - 1
? itemSeparatorSize
: 0)
)
}
}, [
data,
getItemSize,
innerFooterSize,
innerHeaderSize,
itemCount,
itemSeparatorSize,
])
const onItemsRendered = useMemo<
VariableSizeListProps['onItemsRendered']
>(() => {
if (!onVisibleItemsChanged) return undefined
return ({ visibleStartIndex, visibleStopIndex }) => {
const dataIndexFix = innerHeaderSize ? -1 : 0
return onVisibleItemsChanged(
Math.max(0, visibleStartIndex + dataIndexFix),
visibleStopIndex + dataIndexFix,
)
}
}, [onVisibleItemsChanged, !!innerHeaderSize])
/*
const previousItemCount = usePrevious(itemCount)
const previousItemSize = usePrevious(itemSize)
useLayoutEffect(() => {
if (!variableSizeListRef.current) return
if (!(itemSize && previousItemSize)) return
const previousSizes = new Array(previousItemCount)
.fill(true)
.map((_, index) => previousItemSize(index))
const newSizes = new Array(itemCount)
.fill(true)
.map((_, index) => itemSize(index))
let firstDifferentIndex = newSizes.findIndex(
(size, index) => size !== previousSizes[index],
)
if (
!(firstDifferentIndex >= 0) &&
previousSizes.length !== newSizes.length
) {
firstDifferentIndex = Math.min(
previousSizes.length - 1,
newSizes.length - 1,
)
}
if (firstDifferentIndex >= 0) {
variableSizeListRef.current.resetAfterIndex(firstDifferentIndex, true)
}
}, [itemCount, itemSize, previousItemCount, previousItemSize])
*/
useLayoutEffect(() => {
if (variableSizeListRef.current) {
variableSizeListRef.current.resetAfterIndex(0, true)
} else {
setTimeout(() => {
if (variableSizeListRef.current) {
variableSizeListRef.current.resetAfterIndex(0, true)
}
}, 200)
}
}, [data, forceRerenderOnRefChange, itemCount, itemSize])
const style = useMemo<VariableSizeListProps['style']>(
() => ({
...(pagingEnabled
? { scrollSnapType: horizontal ? 'x mandatory' : 'y mandatory' }
: {}),
...(horizontal
? {
overscrollBehaviorX: 'contain',
}
: {
overscrollBehaviorY: 'contain',
}),
}),
[horizontal, listStyle, pagingEnabled],
)
const itemData = useMemo<ItemData>(
() => ({
data,
footer,
getItemKey,
header,
innerFooterSize,
innerHeaderSize,
itemCount,
itemSeparator,
pagingEnabled,
renderItem,
snapToAlignment,
}),
[
data,
footer,
forceRerenderOnRefChange,
getItemKey,
header,
innerFooterSize,
innerHeaderSize,
itemCount,
itemSeparator,
pagingEnabled,
renderItem,
snapToAlignment,
],
)
const OuterElementType = useCallback(
React.forwardRef<any, any>((_props, _ref) => (
<div ref={_ref} {..._props} {...restProps} />
)),
[],
)
return (
<View
pointerEvents={pointerEvents}
style={[
sharedStyles.flex,
sharedStyles.fullWidth,
sharedStyles.fullHeight,
containerStyle,
]}
>
{header &&
header.size > 0 &&
header.Component &&
(header.sticky || !data.length) ? (
<header.Component />
) : null}
<View
style={[
sharedStyles.flex,
sharedStyles.fullWidth,
sharedStyles.fullHeight,
listStyle,
]}
>
{data.length > 0 ? (
<AutoSizer
defaultWidth={0}
defaultHeight={0}
disableWidth={!horizontal}
disableHeight={horizontal}
>
{({ width, height }) => (
<OneListSafeAreaContext.Provider
value={safeAreaInsets || defaultSafeAreaInsets}
>
<List
ref={variableSizeListRef}
innerRef={variableSizeListInnerRef}
key="variable-size-list"
estimatedItemSize={estimatedItemSize}
height={!horizontal ? height || 0 : '100%'}
innerElementType={InnerElementType}
outerElementType={OuterElementType}
itemCount={itemCount}
itemData={itemData}
itemKey={itemKey}
itemSize={itemSize}
layout={horizontal ? 'horizontal' : 'vertical'}
onItemsRendered={onItemsRendered}
overscanCount={overscanCount}
width={horizontal ? width || 0 : '100%'}
style={style}
>
{Row}
</List>
</OneListSafeAreaContext.Provider>
)}
</AutoSizer>
) : ListEmptyComponent ? (
<ListEmptyComponent />
) : null}
</View>
{footer &&
footer.size > 0 &&
footer.Component &&
(footer.sticky || !data.length) ? (
<footer.Component />
) : null}
</View>
)
}),
) as any as (<ItemT>(
props: OneListProps<ItemT> & React.RefAttributes<OneListInstance>,
) => React.ReactElement) & {
displayName: string
} & OneListInstance
OneList.displayName = 'OneList'
``` | /content/code_sandbox/packages/components/src/libs/one-list/implementations/react-window.web.tsx | xml | 2016-11-30T23:24:21 | 2024-08-16T00:24:59 | devhub | devhubapp/devhub | 9,652 | 3,562 |
```xml
set SHIFTS; # shifts
param Nsched; # number of schedules;
set SCHEDS = 1..Nsched; # set of schedules
set SHIFT_LIST {SCHEDS} within SHIFTS;
param rate {SCHEDS} >= 0;
param required {SHIFTS} >= 0;
minimize Total_Cost;
subject to Shift_Needs {i in SHIFTS}: to_come >= required[i];
var Work {j in SCHEDS} >= 0,
obj Total_Cost rate[j],
coeff {i in SHIFT_LIST[j]} Shift_Needs[i] 1;
``` | /content/code_sandbox/examples/pyomo/amplbook2/sched.mod | xml | 2016-05-27T19:33:45 | 2024-08-16T08:09:25 | pyomo | Pyomo/pyomo | 1,945 | 138 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="path_to_url">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{157AD8A8-E8BD-41C1-9139-F4687A8E3668}</ProjectGuid>
<WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141_xp</PlatformToolset>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141_xp</PlatformToolset>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>.\output\</OutDir>
<IntDir>.\build\$(ProjectName)_$(Configuration)_$(PlatformTarget)\</IntDir>
<TargetName>renderer</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<OutDir>.\output\</OutDir>
<IntDir>.\build\$(ProjectName)_$(Configuration)_$(PlatformTarget)\</IntDir>
<TargetName>renderer</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>.\output\</OutDir>
<IntDir>.\build\$(ProjectName)_$(Configuration)_$(PlatformTarget)\</IntDir>
<TargetName>renderer</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>.\output\</OutDir>
<IntDir>.\build\$(ProjectName)_$(Configuration)_$(PlatformTarget)\</IntDir>
<TargetName>renderer</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>.\output\</OutDir>
<IntDir>.\build\$(ProjectName)_$(Configuration)_$(PlatformTarget)\</IntDir>
<TargetName>renderer</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<OutDir>.\output\</OutDir>
<IntDir>.\build\$(ProjectName)_$(Configuration)_$(PlatformTarget)\</IntDir>
<TargetName>renderer</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FloatingPointExceptions>true</FloatingPointExceptions>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)$(ConfigurationName)-$(PlatformName)-$(TargetName).lib</OutputFile>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FloatingPointExceptions>true</FloatingPointExceptions>
<BrowseInformation>true</BrowseInformation>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)$(ConfigurationName)-$(PlatformName)-$(TargetName).lib</OutputFile>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>_DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FloatingPointExceptions>true</FloatingPointExceptions>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Lib>
<OutputFile>$(OutDir)$(ConfigurationName)-$(PlatformName)-$(TargetName).lib</OutputFile>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FloatingPointModel>Fast</FloatingPointModel>
<EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Lib>
<OutputFile>$(OutDir)$(ConfigurationName)-$(PlatformName)-$(TargetName).lib</OutputFile>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FloatingPointModel>Fast</FloatingPointModel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Lib>
<OutputFile>$(OutDir)$(ConfigurationName)-$(PlatformName)-$(TargetName).lib</OutputFile>
</Lib>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FloatingPointModel>Fast</FloatingPointModel>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Lib>
<OutputFile>$(OutDir)$(ConfigurationName)-$(PlatformName)-$(TargetName).lib</OutputFile>
</Lib>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\..\renderercommon\tr_noise.c" />
<ClCompile Include="..\..\renderervk\tr_animation.c" />
<ClCompile Include="..\..\renderervk\tr_backend.c" />
<ClCompile Include="..\..\renderervk\tr_bsp.c" />
<ClCompile Include="..\..\renderervk\tr_cmds.c" />
<ClCompile Include="..\..\renderervk\tr_curve.c" />
<ClCompile Include="..\..\renderervk\tr_image.c" />
<ClCompile Include="..\..\renderercommon\tr_font.c" />
<ClCompile Include="..\..\renderercommon\tr_image_bmp.c" />
<ClCompile Include="..\..\renderercommon\tr_image_jpg.c" />
<ClCompile Include="..\..\renderercommon\tr_image_pcx.c" />
<ClCompile Include="..\..\renderercommon\tr_image_png.c" />
<ClCompile Include="..\..\renderercommon\tr_image_tga.c" />
<ClCompile Include="..\..\renderervk\tr_init.c" />
<ClCompile Include="..\..\renderervk\tr_light.c" />
<ClCompile Include="..\..\renderervk\tr_main.c" />
<ClCompile Include="..\..\renderervk\tr_marks.c" />
<ClCompile Include="..\..\renderervk\tr_mesh.c" />
<ClCompile Include="..\..\renderervk\tr_model.c" />
<ClCompile Include="..\..\renderervk\tr_model_iqm.c" />
<ClCompile Include="..\..\renderervk\tr_scene.c" />
<ClCompile Include="..\..\renderervk\tr_shade.c" />
<ClCompile Include="..\..\renderervk\tr_shader.c" />
<ClCompile Include="..\..\renderervk\tr_shade_calc.c" />
<ClCompile Include="..\..\renderervk\tr_shadows.c" />
<ClCompile Include="..\..\renderervk\tr_sky.c" />
<ClCompile Include="..\..\renderervk\tr_surface.c" />
<ClCompile Include="..\..\renderervk\tr_world.c" />
<ClCompile Include="..\..\renderervk\vk.c" />
<ClCompile Include="..\..\renderervk\vk_flares.c" />
<ClCompile Include="..\..\renderervk\vk_vbo.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\renderervk\iqm.h" />
<ClInclude Include="..\..\renderervk\tr_common.h" />
<ClInclude Include="..\..\renderervk\tr_local.h" />
<ClInclude Include="..\..\renderercommon\tr_public.h" />
<ClInclude Include="..\..\renderercommon\tr_types.h" />
<ClInclude Include="..\..\renderervk\vk.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
``` | /content/code_sandbox/code/win32/msvc2017/renderervk.vcxproj | xml | 2016-11-30T14:34:48 | 2024-08-15T18:58:26 | Quake3e | ec-/Quake3e | 1,166 | 3,372 |
```xml
import { ElementAst, ASTWithSource, LiteralPrimitive } from '@angular/compiler';
import { PROPERTY } from './isHiddenFromScreenReader';
export const getAttributeValue = (element: ElementAst, property: string) => {
const attr = element.attrs.find((attr) => attr.name === property);
const input = element.inputs.find((input) => input.name === property);
if (attr) {
return attr.value;
}
if (!input || !(input.value instanceof ASTWithSource)) {
return undefined;
}
if (input.value.ast instanceof LiteralPrimitive) {
return input.value.ast.value;
}
return PROPERTY;
};
``` | /content/code_sandbox/src/util/getAttributeValue.ts | xml | 2016-02-10T17:22:40 | 2024-08-14T16:41:28 | codelyzer | mgechev/codelyzer | 2,446 | 137 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="path_to_url"
android:ordering="sequentially" >
<set android:ordering="together" >
<objectAnimator
android:propertyName="translationY"
android:duration="900"
android:valueFrom="-50"
android:valueTo="-50" />
<objectAnimator
android:propertyName="scaleX"
android:duration="1"
android:valueFrom="0.0"
android:valueTo="0.0" />
<objectAnimator
android:propertyName="scaleY"
android:duration="1"
android:valueFrom="0.0"
android:valueTo="0.0" />
</set>
<set android:ordering="together" >
<objectAnimator
android:propertyName="translationY"
android:duration="450"
android:valueFrom="-50"
android:valueTo="0" />
<objectAnimator
android:propertyName="scaleX"
android:duration="450"
android:valueFrom="0.0"
android:valueTo="1.0" />
<objectAnimator
android:propertyName="scaleY"
android:duration="450"
android:valueFrom="0.0"
android:valueTo="1.0" />
</set>
</set>
``` | /content/code_sandbox/app/src/main/res/animator/weather_thunderstorm_2.xml | xml | 2016-02-21T04:39:19 | 2024-08-16T13:35:51 | GeometricWeather | WangDaYeeeeee/GeometricWeather | 2,420 | 293 |
```xml
import {ValueOf} from "@tsed/core";
import {JsonFormatTypes} from "../../domain/JsonFormatTypes.js";
import {withErrorMsg} from "../../utils/withErrorMsg.js";
import {JsonEntityFn} from "./jsonEntityFn.js";
/**
* The following formats are supported for string validation with `format` keyword:
*
* - **date**: full-date according to [RFC3339](path_to_url#RFC3339).
* - **time**: time with optional time-zone.
* - **date-time**: date-time from the same source (time-zone is mandatory).
* - **uri**: full uri with optional protocol.
* - **email**: email address.
* - **hostname**: host name according to [RFC1034](path_to_url#section-3.1).
* - **ipv4**: IP address v4.
* - **ipv6**: IP address v6.
* - **regex**: tests whether a string is a valid regular expression by passing it to RegExp constructor.
*
* ::: warning
* For v6 user, use @@Format@@ from @tsed/schema instead of @tsed/common.
* :::
*
* ## Example
* ### With primitive type
*
* ```typescript
* class Model {
* @Format("email")
* property: string;
* }
* ```
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "string",
* "format": "email"
* }
* }
* }
* ```
*
* ### With array type
*
* ```typescript
* class Model {
* @Format("email")
* @CollectionOf(String)
* property: string[];
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "array",
* "items": {
* "type": "string",
* "format": "email"
* }
* }
* }
* }
* ```
*
* @param {string} format
* @decorator
* @validation
* @swagger
* @schema
* @input
* @ajv-errors
*/
export const Format = withErrorMsg("format", (format: JsonFormatTypes | ValueOf<JsonFormatTypes>) => {
return JsonEntityFn((store) => {
store.itemSchema.format(format);
});
});
/**
* Apply an email validation on property.
*
* ::: warning
* For v6 user, use @@Email@@ from @tsed/schema instead of @tsed/common.
* :::
*
* ## Example
* ### With primitive type
*
* ```typescript
* class Model {
* @Email()
* property: string;
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "string",
* "format": "email"
* }
* }
* }
* ```
*
* ### With array type
*
* ```typescript
* class Model {
* @Email()
* @CollectionOf(String)
* property: string[];
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "array",
* "items": {
* "type": "string",
* "format": "email"
* }
* }
* }
* }
* ```
*
* > See [Format](api/common/jsonschema/schema) decorator.
* @returns {Function}
* @decorator
* @validation
* @schema
* @swagger
* @input
* @ajv-errors
*/
export const Email = withErrorMsg("format", () => {
return Format(JsonFormatTypes.EMAIL);
});
/**
* Apply a date-time validation on property.
*
* ## Example
* ### With primitive type
*
* ```typescript
* class Model {
* @DateTime()
* property: string;
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "string",
* "format": "date-time"
* }
* }
* }
* ```
*
* ### With array type
*
* ```typescript
* class Model {
* @DateTime()
* @CollectionOf(String)
* property: string[];
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "array",
* "items": {
* "type": "string",
* "format": "date-time"
* }
* }
* }
* }
* ```
*
* > See [Format](api/common/jsonschema/schema) decorator.
* @returns {Function}
* @decorator
* @validation
* @property
* @parameter
* @schema
* @auto-map The data will be stored on the right place according to the type and collectionType (primitive or collection).
* @ajv-errors
*/
export const DateTime = withErrorMsg("format", () => {
return Format(JsonFormatTypes.DATE_TIME);
});
/**
* Apply a time validation on property.
*
* ## Example
* ### With primitive type
*
* ```typescript
* class Model {
* @Time()
* property: string;
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "string",
* "format": "time"
* }
* }
* }
* ```
*
* ### With array type
*
* ```typescript
* class Model {
* @Time()
* @CollectionOf(String)
* property: string[];
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "array",
* "items": {
* "type": "string",
* "format": "time"
* }
* }
* }
* }
* ```
*
* > See [Format](api/common/jsonschema/schema) decorator.
* @returns {Function}
* @decorator
* @validation
* @property
* @parameter
* @schema
* @ajv-errors
*/
export const DateFormat = withErrorMsg("format", () => {
return Format(JsonFormatTypes.DATE);
});
/**
* Apply a time validation on property.
*
* ## Example
* ### With primitive type
*
* ```typescript
* class Model {
* @TimeFormat()
* property: string;
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "string",
* "format": "time"
* }
* }
* }
* ```
*
* ### With array type
*
* ```typescript
* class Model {
* @TimeFormat()
* @CollectionOf(String)
* property: string[];
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "array",
* "items": {
* "type": "string",
* "format": "time"
* }
* }
* }
* }
* ```
*
* > See [Format](api/common/jsonschema/schema) decorator.
* @returns {Function}
* @decorator
* @validation
* @property
* @parameter
* @schema
* @ajv-errors
*/
export const TimeFormat = withErrorMsg("format", () => {
return Format(JsonFormatTypes.TIME);
});
/**
* Apply a uri validation on property.
*
* ## Example
* ### With primitive type
*
* ```typescript
* class Model {
* @Uri()
* property: string;
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "string",
* "format": "uri"
* }
* }
* }
* ```
*
* ### With array type
*
* ```typescript
* class Model {
* @Uri()
* @CollectionOf(String)
* property: string[];
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "array",
* "items": {
* "type": "string",
* "format": "uri"
* }
* }
* }
* }
* ```
*
* > See [Format](api/common/jsonschema/schema) decorator.
* @returns {Function}
* @decorator
* @validation
* @property
* @parameter
* @schema
* @ajv-errors
*/
export const Uri = withErrorMsg("format", () => {
return Format(JsonFormatTypes.URI);
});
/**
* Apply a url validation on property.
*
* ## Example
* ### With primitive type
*
* ```typescript
* class Model {
* @Url()
* property: string;
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "string",
* "format": "url"
* }
* }
* }
* ```
*
* ### With array type
*
* ```typescript
* class Model {
* @Url()
* @CollectionOf(String)
* property: string[];
* }
* ```
*
* Will produce:
*
* ```json
* {
* "type": "object",
* "properties": {
* "property": {
* "type": "array",
* "items": {
* "type": "string",
* "format": "url"
* }
* }
* }
* }
* ```
*
* > See [Format](api/common/jsonschema/schema) decorator.
* @returns {Function}
* @decorator
* @validation
* @property
* @parameter
* @schema
* @ajv-errors
*/
export const Url = withErrorMsg("format", () => {
return Format(JsonFormatTypes.URL);
});
``` | /content/code_sandbox/packages/specs/schema/src/decorators/common/format.ts | xml | 2016-02-21T18:38:47 | 2024-08-14T21:19:48 | tsed | tsedio/tsed | 2,817 | 2,296 |
```xml
///
///
///
/// path_to_url
///
/// Unless required by applicable law or agreed to in writing, software
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
///
import {
AfterViewInit,
ChangeDetectorRef,
Component,
ElementRef,
EventEmitter,
Input,
OnDestroy,
OnInit,
Output,
Renderer2,
ViewChild,
ViewContainerRef
} from '@angular/core';
import { PageComponent } from '@shared/components/page.component';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
import { EntityId, entityIdEquals } from '@shared/models/id/entity-id';
import { CollectionViewer, DataSource } from '@angular/cdk/collections';
import { BehaviorSubject, merge, Observable, of, ReplaySubject, Subject } from 'rxjs';
import { emptyPageData, PageData } from '@shared/models/page/page-data';
import { PageLink } from '@shared/models/page/page-link';
import { catchError, debounceTime, distinctUntilChanged, map, takeUntil } from 'rxjs/operators';
import { EntityVersion, VersionCreationResult, VersionLoadResult } from '@shared/models/vc.models';
import { EntitiesVersionControlService } from '@core/http/entities-version-control.service';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort } from '@angular/material/sort';
import { ResizeObserver } from '@juggle/resize-observer';
import { hidePageSizePixelValue } from '@shared/models/constants';
import { Direction, SortOrder } from '@shared/models/page/sort-order';
import { BranchAutocompleteComponent } from '@shared/components/vc/branch-autocomplete.component';
import { isNotEmptyStr } from '@core/utils';
import { TbPopoverService } from '@shared/components/popover.service';
import { EntityVersionCreateComponent } from '@home/components/vc/entity-version-create.component';
import { MatButton } from '@angular/material/button';
import { EntityVersionRestoreComponent } from '@home/components/vc/entity-version-restore.component';
import { EntityVersionDiffComponent } from '@home/components/vc/entity-version-diff.component';
import { ComplexVersionCreateComponent } from '@home/components/vc/complex-version-create.component';
import { ComplexVersionLoadComponent } from '@home/components/vc/complex-version-load.component';
import { TbPopoverComponent } from '@shared/components/popover.component';
import { AdminService } from '@core/http/admin.service';
import { FormBuilder } from '@angular/forms';
@Component({
selector: 'tb-entity-versions-table',
templateUrl: './entity-versions-table.component.html',
styleUrls: ['./entity-versions-table.component.scss']
})
export class EntityVersionsTableComponent extends PageComponent implements OnInit, AfterViewInit, OnDestroy {
@ViewChild('branchAutocompleteComponent') branchAutocompleteComponent: BranchAutocompleteComponent;
@Input()
singleEntityMode = false;
@Input()
popoverComponent: TbPopoverComponent;
@Input()
onBeforeCreateVersion: () => Observable<any>;
displayedColumns = ['timestamp', 'id', 'name', 'author', 'actions'];
pageLink: PageLink;
textSearchMode = false;
dataSource: EntityVersionsDatasource;
hidePageSize = false;
branch: string = null;
activeValue = false;
dirtyValue = false;
externalEntityIdValue: EntityId;
viewsInited = false;
isReadOnly: Observable<boolean>;
textSearch = this.fb.control('', {nonNullable: true});
private componentResize$: ResizeObserver;
private destroy$ = new Subject<void>();
@Input()
set active(active: boolean) {
if (this.activeValue !== active) {
this.activeValue = active;
if (this.activeValue && this.dirtyValue) {
this.dirtyValue = false;
if (this.viewsInited) {
this.initFromDefaultBranch();
}
}
}
}
@Input()
set externalEntityId(externalEntityId: EntityId) {
if (!entityIdEquals(this.externalEntityIdValue, externalEntityId)) {
this.externalEntityIdValue = externalEntityId;
this.resetSortAndFilter(this.activeValue);
if (!this.activeValue) {
this.dirtyValue = true;
}
}
}
@Input()
entityId: EntityId;
@Input()
entityName: string;
@Output()
versionRestored = new EventEmitter<void>();
@ViewChild('searchInput') searchInputField: ElementRef;
@ViewChild(MatPaginator) paginator: MatPaginator;
@ViewChild(MatSort) sort: MatSort;
constructor(protected store: Store<AppState>,
private entitiesVersionControlService: EntitiesVersionControlService,
private adminService: AdminService,
private popoverService: TbPopoverService,
private renderer: Renderer2,
private cd: ChangeDetectorRef,
private viewContainerRef: ViewContainerRef,
private elementRef: ElementRef,
private fb: FormBuilder) {
super(store);
this.dirtyValue = !this.activeValue;
const sortOrder: SortOrder = { property: 'timestamp', direction: Direction.DESC };
this.pageLink = new PageLink(10, 0, null, sortOrder);
this.dataSource = new EntityVersionsDatasource(this.entitiesVersionControlService);
}
ngOnInit() {
this.componentResize$ = new ResizeObserver(() => {
const showHidePageSize = this.elementRef.nativeElement.offsetWidth < hidePageSizePixelValue;
if (showHidePageSize !== this.hidePageSize) {
this.hidePageSize = showHidePageSize;
this.cd.markForCheck();
}
});
this.componentResize$.observe(this.elementRef.nativeElement);
this.isReadOnly = this.adminService.getRepositorySettingsInfo().pipe(map(settings => settings.readOnly));
}
ngOnDestroy() {
if (this.componentResize$) {
this.componentResize$.disconnect();
}
this.destroy$.next();
this.destroy$.complete();
}
branchChanged(newBranch: string) {
if (isNotEmptyStr(newBranch) && this.branch !== newBranch) {
this.branch = newBranch;
this.paginator.pageIndex = 0;
if (this.activeValue) {
this.updateData();
}
}
}
ngAfterViewInit() {
this.textSearch.valueChanges.pipe(
debounceTime(400),
distinctUntilChanged((prev, current) => (this.pageLink.textSearch ?? '') === current.trim()),
takeUntil(this.destroy$)
).subscribe((value) => {
this.paginator.pageIndex = 0;
this.pageLink.textSearch = value.trim();
this.updateData();
});
this.sort.sortChange.subscribe(() => this.paginator.pageIndex = 0);
merge(this.sort.sortChange, this.paginator.page).pipe(
takeUntil(this.destroy$)
).subscribe(() => this.updateData());
this.viewsInited = true;
if (!this.singleEntityMode || (this.activeValue && this.externalEntityIdValue)) {
this.initFromDefaultBranch();
}
}
toggleCreateVersion($event: Event, createVersionButton: MatButton) {
if ($event) {
$event.stopPropagation();
}
const trigger = createVersionButton._elementRef.nativeElement;
if (this.popoverService.hasPopover(trigger)) {
this.popoverService.hidePopover(trigger);
} else {
const createVersionPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, EntityVersionCreateComponent, 'leftTop', true, null,
{
branch: this.branch,
entityId: this.entityId,
entityName: this.entityName,
onBeforeCreateVersion: this.onBeforeCreateVersion,
onClose: (result: VersionCreationResult | null, branch: string | null) => {
createVersionPopover.hide();
if (result) {
if (this.branch !== branch) {
this.branchChanged(branch);
} else {
this.updateData();
}
}
}
},
{maxHeight: '100vh', height: '100%', padding: '10px'},
{width: '400px', minWidth: '100%', maxWidth: '100%'}, {}, false);
createVersionPopover.tbComponentRef.instance.popoverComponent = createVersionPopover;
}
}
toggleComplexCreateVersion($event: Event, complexCreateVersionButton: MatButton) {
if ($event) {
$event.stopPropagation();
}
const trigger = complexCreateVersionButton._elementRef.nativeElement;
if (this.popoverService.hasPopover(trigger)) {
this.popoverService.hidePopover(trigger);
} else {
const complexCreateVersionPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, ComplexVersionCreateComponent, 'leftTop', true, null,
{
branch: this.branch,
onClose: (result: VersionCreationResult | null, branch: string | null) => {
complexCreateVersionPopover.hide();
if (result) {
if (this.branch !== branch) {
this.branchChanged(branch);
} else {
this.updateData();
}
}
}
},
{maxHeight: '90vh', height: '100%', padding: '10px'},
{}, {}, false);
complexCreateVersionPopover.tbComponentRef.instance.popoverComponent = complexCreateVersionPopover;
}
}
toggleShowVersionDiff($event: Event, diffVersionButton: MatButton, entityVersion: EntityVersion) {
if ($event) {
$event.stopPropagation();
}
const trigger = diffVersionButton._elementRef.nativeElement;
if (this.popoverService.hasPopover(trigger)) {
this.popoverService.hidePopover(trigger);
} else {
const diffVersionPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, EntityVersionDiffComponent, 'leftTop', true, null,
{
versionName: entityVersion.name,
versionId: entityVersion.id,
entityId: this.entityId,
externalEntityId: this.externalEntityIdValue
}, {}, {}, {}, false);
diffVersionPopover.tbComponentRef.instance.popoverComponent = diffVersionPopover;
diffVersionPopover.tbComponentRef.instance.versionRestored.subscribe(() => {
this.versionRestored.emit();
});
}
}
toggleRestoreEntityVersion($event: Event, restoreVersionButton: MatButton, entityVersion: EntityVersion) {
if ($event) {
$event.stopPropagation();
}
const trigger = restoreVersionButton._elementRef.nativeElement;
if (this.popoverService.hasPopover(trigger)) {
this.popoverService.hidePopover(trigger);
} else {
const restoreVersionPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, EntityVersionRestoreComponent, 'leftTop', true, null,
{
versionName: entityVersion.name,
versionId: entityVersion.id,
externalEntityId: this.externalEntityIdValue,
onClose: (result: VersionLoadResult | null) => {
restoreVersionPopover.hide();
if (result && !result.error && result.result.length) {
this.versionRestored.emit();
}
}
},
{maxHeight: '100vh', height: '100%', padding: '10px'},
{width: '400px', minWidth: '100%', maxWidth: '100%'}, {}, false);
restoreVersionPopover.tbComponentRef.instance.popoverComponent = restoreVersionPopover;
}
}
toggleRestoreEntitiesVersion($event: Event, restoreEntitiesVersionButton: MatButton, entityVersion: EntityVersion) {
if ($event) {
$event.stopPropagation();
}
const trigger = restoreEntitiesVersionButton._elementRef.nativeElement;
if (this.popoverService.hasPopover(trigger)) {
this.popoverService.hidePopover(trigger);
} else {
const restoreEntitiesVersionPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, ComplexVersionLoadComponent, 'leftTop', true, null,
{
versionName: entityVersion.name,
versionId: entityVersion.id,
onClose: (result: VersionLoadResult | null) => {
restoreEntitiesVersionPopover.hide();
}
},
{maxHeight: '80vh', height: '100%', padding: '10px'},
{}, {}, false);
restoreEntitiesVersionPopover.tbComponentRef.instance.popoverComponent = restoreEntitiesVersionPopover;
}
}
versionIdContent(entityVersion: EntityVersion): string {
let versionId = entityVersion.id;
if (versionId.length > 7) {
versionId = versionId.slice(0, 7);
}
return versionId;
}
enterFilterMode() {
this.textSearchMode = true;
setTimeout(() => {
this.searchInputField.nativeElement.focus();
this.searchInputField.nativeElement.setSelectionRange(0, 0);
}, 10);
}
exitFilterMode() {
this.textSearchMode = false;
this.textSearch.reset();
}
private initFromDefaultBranch() {
if (this.branchAutocompleteComponent.isDefaultBranchSelected()) {
this.paginator.pageIndex = 0;
if (this.activeValue) {
this.updateData();
}
} else {
this.branchAutocompleteComponent.selectDefaultBranchIfNeeded(true);
}
}
updateData() {
this.pageLink.page = this.paginator.pageIndex;
this.pageLink.pageSize = this.paginator.pageSize;
this.pageLink.sortOrder.property = this.sort.active;
this.pageLink.sortOrder.direction = Direction[this.sort.direction.toUpperCase()];
this.dataSource.loadEntityVersions(this.singleEntityMode, this.branch, this.externalEntityIdValue, this.pageLink);
}
private resetSortAndFilter(update: boolean) {
this.textSearchMode = false;
this.pageLink.textSearch = null;
this.textSearch.reset('', {emitEvent: false});
if (this.viewsInited) {
this.paginator.pageIndex = 0;
const sortable = this.sort.sortables.get('timestamp');
this.sort.active = sortable.id;
this.sort.direction = 'desc';
if (update) {
this.initFromDefaultBranch();
}
}
}
}
class EntityVersionsDatasource implements DataSource<EntityVersion> {
private entityVersionsSubject = new BehaviorSubject<EntityVersion[]>([]);
private pageDataSubject = new BehaviorSubject<PageData<EntityVersion>>(emptyPageData<EntityVersion>());
public pageData$ = this.pageDataSubject.asObservable();
public dataLoading = true;
constructor(private entitiesVersionControlService: EntitiesVersionControlService) {}
connect(collectionViewer: CollectionViewer): Observable<EntityVersion[] | ReadonlyArray<EntityVersion>> {
return this.entityVersionsSubject.asObservable();
}
disconnect(collectionViewer: CollectionViewer): void {
this.entityVersionsSubject.complete();
this.pageDataSubject.complete();
}
loadEntityVersions(singleEntityMode: boolean,
branch: string, externalEntityId: EntityId,
pageLink: PageLink): Observable<PageData<EntityVersion>> {
this.dataLoading = true;
const result = new ReplaySubject<PageData<EntityVersion>>();
this.fetchEntityVersions(singleEntityMode, branch, externalEntityId, pageLink).pipe(
catchError(() => of(emptyPageData<EntityVersion>())),
).subscribe(
(pageData) => {
this.entityVersionsSubject.next(pageData.data);
this.pageDataSubject.next(pageData);
result.next(pageData);
this.dataLoading = false;
}
);
return result;
}
fetchEntityVersions(singleEntityMode: boolean,
branch: string, externalEntityId: EntityId,
pageLink: PageLink): Observable<PageData<EntityVersion>> {
if (!branch) {
return of(emptyPageData<EntityVersion>());
} else {
if (singleEntityMode) {
if (externalEntityId) {
return this.entitiesVersionControlService.listEntityVersions(pageLink, branch, externalEntityId, {ignoreErrors: true});
} else {
return of(emptyPageData<EntityVersion>());
}
} else {
return this.entitiesVersionControlService.listVersions(pageLink, branch, {ignoreErrors: true});
}
}
}
isEmpty(): Observable<boolean> {
return this.entityVersionsSubject.pipe(
map((entityVersions) => !entityVersions.length)
);
}
total(): Observable<number> {
return this.pageDataSubject.pipe(
map((pageData) => pageData.totalElements)
);
}
}
``` | /content/code_sandbox/ui-ngx/src/app/modules/home/components/vc/entity-versions-table.component.ts | xml | 2016-12-01T09:33:30 | 2024-08-16T19:58:25 | thingsboard | thingsboard/thingsboard | 16,820 | 3,457 |
```xml
import fs from 'fs';
import path from 'path';
import { Readable, Writable } from 'stream';
import Writer from './';
const injectablePath = path.resolve(
__dirname,
'../../../test/fixtures/report-writer/injectable.js',
);
const sourcePath = path.resolve(
__dirname,
'../../../test/fixtures/report-writer/source.json',
);
function finishedPromise(stream: Readable | Writable): Promise<void> {
return new Promise((resolve, reject) => {
stream.once('end', resolve);
stream.once('finish', resolve);
stream.once('error', reject);
});
}
const rootPath = path.resolve(__dirname, '../../..');
const outputDir = path.join(rootPath, 'test/temp', path.relative(rootPath, __filename));
fs.mkdirSync(outputDir, { recursive: true });
test('should work', async () => {
const outputFile = path.join(outputDir, `${Date.now()}.html`);
const outputStream = fs.createWriteStream(outputFile);
const writer = new Writer({
/* istanbul ignore next */
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
init: function (foo) {
console.log(foo);
},
scripts: [
injectablePath,
{
type: 'path',
path: injectablePath,
},
{
type: 'raw',
content: `console.log('hello from raw!');`,
},
],
});
writer.addChunkWriter(fs.createReadStream(sourcePath), 'foo');
writer.addChunkWriter(fs.createReadStream(sourcePath), 'foo');
writer.addChunkWriter(fs.createReadStream(sourcePath), 'foo');
writer.getStream().pipe(outputStream);
await writer.write();
await finishedPromise(outputStream);
expect(fs.readFileSync(outputFile, 'utf8')).toMatchSnapshot();
});
``` | /content/code_sandbox/packages/report-writer/src/index.spec.ts | xml | 2016-11-30T14:09:21 | 2024-08-15T18:52:57 | statoscope | statoscope/statoscope | 1,423 | 385 |
```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>ascender</key>
<integer>1446</integer>
<key>capHeight</key>
<integer>1446</integer>
<key>copyright</key>
<key>descender</key>
<integer>-322</integer>
<key>familyName</key>
<string>Public Sans</string>
<key>italicAngle</key>
<integer>-8</integer>
<key>openTypeHeadCreated</key>
<string>2020/07/15 15:46:30</string>
<key>openTypeHheaAscender</key>
<integer>1900</integer>
<key>openTypeHheaDescender</key>
<integer>-450</integer>
<key>openTypeHheaLineGap</key>
<integer>0</integer>
<key>openTypeNameDescription</key>
<string>Public Sans is based on Libre Franklin, which is a reinterpretation and expansion of the 1912 Morris Fuller Bentons classic.</string>
<key>openTypeNameDesigner</key>
<string>The Public Sans project authors (U.S. Web Design System). Libre Franklin designed by Pablo Impallari and Rodrigo Fuenzalida.</string>
<key>openTypeNameDesignerURL</key>
<string>path_to_url and path_to_url
<key>openTypeOS2Selection</key>
<array>
<integer>7</integer>
</array>
<key>openTypeOS2Type</key>
<array/>
<key>openTypeOS2TypoAscender</key>
<integer>1900</integer>
<key>openTypeOS2TypoDescender</key>
<integer>-450</integer>
<key>openTypeOS2TypoLineGap</key>
<integer>0</integer>
<key>openTypeOS2WinAscent</key>
<integer>2315</integer>
<key>openTypeOS2WinDescent</key>
<integer>495</integer>
<key>postscriptBlueValues</key>
<array>
<integer>-22</integer>
<integer>0</integer>
<integer>1034</integer>
<integer>1056</integer>
<integer>1155</integer>
<integer>1165</integer>
<integer>1446</integer>
<integer>1486</integer>
<integer>1446</integer>
<integer>1486</integer>
</array>
<key>postscriptOtherBlues</key>
<array>
<integer>-339</integer>
<integer>-322</integer>
</array>
<key>postscriptStemSnapH</key>
<array>
<integer>78</integer>
<integer>82</integer>
<integer>86</integer>
</array>
<key>postscriptStemSnapV</key>
<array>
<integer>72</integer>
<integer>80</integer>
</array>
<key>postscriptUnderlinePosition</key>
<integer>-370</integer>
<key>postscriptUnderlineThickness</key>
<integer>140</integer>
<key>styleMapFamilyName</key>
<string>Public Sans Thin</string>
<key>styleMapStyleName</key>
<string>italic</string>
<key>styleName</key>
<string>Thin Italic</string>
<key>unitsPerEm</key>
<integer>2000</integer>
<key>versionMajor</key>
<integer>2</integer>
<key>versionMinor</key>
<integer>1</integer>
<key>xHeight</key>
<integer>1034</integer>
</dict>
</plist>
``` | /content/code_sandbox/sources/ufo/PublicSans-ThinItalic.ufo/fontinfo.plist | xml | 2016-11-04T13:51:35 | 2024-08-16T16:28:40 | public-sans | uswds/public-sans | 4,449 | 909 |
```xml
import App from '../apps/examples';
export default App;
``` | /content/code_sandbox/fabric-windows-example/App.tsx | xml | 2016-01-17T14:29:21 | 2024-08-16T13:35:44 | react-native-svg | software-mansion/react-native-svg | 7,397 | 12 |
```xml
/* TypeScript file generated from TypeNameSanitize.res by genType. */
/* eslint-disable */
/* tslint:disable */
export type t_ = number;
export type M_t__ = number;
export type pair = [t_, M_t__];
``` | /content/code_sandbox/jscomp/gentype_tests/typescript-react-example/src/TypeNameSanitize.gen.tsx | xml | 2016-01-06T20:34:59 | 2024-08-16T05:38:07 | rescript-compiler | rescript-lang/rescript-compiler | 6,636 | 49 |
```xml
import * as React from 'react';
import createSvgIcon from '../utils/createSvgIcon';
const PinSolidOff12Icon = createSvgIcon({
svg: ({ classes }) => (
<svg xmlns="path_to_url" viewBox="0 0 2048 2048" className={classes.svg} focusable="false">
<path d="M2048 512v853h-85q-38 0-75-8t-73-21L825 345q78 8 150 35t134 71 113 103 84 129h317q60-81 150-126t190-45h85zM25 146L146 25l1877 1877-121 121-689-689q-42 48-93 85t-108 64-118 39-126 14h-85v-512H171L0 939l171-86h512v-50L25 146z" />
</svg>
),
displayName: 'PinSolidOff12Icon',
});
export default PinSolidOff12Icon;
``` | /content/code_sandbox/packages/react-icons-mdl2/src/components/PinSolidOff12Icon.tsx | xml | 2016-06-06T15:03:44 | 2024-08-16T18:49:29 | fluentui | microsoft/fluentui | 18,221 | 236 |
```xml
<clickhouse>
<concurrent_threads_soft_limit_ratio_to_cores>0</concurrent_threads_soft_limit_ratio_to_cores>
<query_log>
<database>system</database>
<table>query_log</table>
</query_log>
</clickhouse>
``` | /content/code_sandbox/tests/integration/test_concurrent_threads_soft_limit/configs/config_default.xml | xml | 2016-06-02T08:28:18 | 2024-08-16T18:39:33 | ClickHouse | ClickHouse/ClickHouse | 36,234 | 58 |
```xml
export const tzDatabase: Record<string, string> = {
"Africa/Abidjan": "+00:00",
"Africa/Accra": "+00:00",
"Africa/Addis_Ababa": "+03:00",
"Africa/Algiers": "+01:00",
"Africa/Asmara": "+03:00",
"Africa/Asmera": "+03:00",
"Africa/Bamako": "+00:00",
"Africa/Bangui": "+01:00",
"Africa/Banjul": "+00:00",
"Africa/Blantyre": "+02:00",
"Africa/Brazzaville": "+01:00",
"Africa/Bujumbura": "+02:00",
"Africa/Cairo": "+02:00",
"Africa/Casablanca": "+00:00",
"Africa/Ceuta": "+01:00",
"Africa/Conakry": "+00:00",
"Africa/Dakar": "+00:00",
"Africa/Dar_es_Salaam": "+03:00",
"Africa/Djibouti": "+03:00",
"Africa/Douala": "+01:00",
"Africa/El_Aaiun": "+00:00",
"Africa/Freetown": "+00:00",
"Africa/Gaborone": "+02:00",
"Africa/Harare": "+02:00",
"Africa/Johannesburg": "+02:00",
"Africa/Juba": "+03:00",
"Africa/Kampala": "+03:00",
"Africa/Khartoum": "+03:00",
"Africa/Kigali": "+02:00",
"Africa/Kinshasa": "+01:00",
"Africa/Lagos": "+01:00",
"Africa/Libreville": "+01:00",
"Africa/Lome": "+00:00",
"Africa/Luanda": "+01:00",
"Africa/Lubumbashi": "+02:00",
"Africa/Lusaka": "+02:00",
"Africa/Malabo": "+01:00",
"Africa/Maputo": "+02:00",
"Africa/Maseru": "+02:00",
"Africa/Mbabane": "+02:00",
"Africa/Mogadishu": "+03:00",
"Africa/Monrovia": "+00:00",
"Africa/Nairobi": "+03:00",
"Africa/Ndjamena": "+01:00",
"Africa/Niamey": "+01:00",
"Africa/Nouakchott": "+00:00",
"Africa/Ouagadougou": "+00:00",
"Africa/Porto-Novo": "+01:00",
"Africa/Sao_Tome": "+00:00",
"Africa/Timbuktu": "+00:00",
"Africa/Tripoli": "+02:00",
"Africa/Tunis": "+01:00",
"Africa/Windhoek": "+01:00",
"America/Adak": "-10:00",
"America/Anchorage": "-09:00",
"America/Anguilla": "-04:00",
"America/Antigua": "-04:00",
"America/Araguaina": "-03:00",
"America/Argentina/Buenos_Aires": "-03:00",
"America/Argentina/Catamarca": "-03:00",
"America/Argentina/ComodRivadavia": "-03:00",
"America/Argentina/Cordoba": "-03:00",
"America/Argentina/Jujuy": "-03:00",
"America/Argentina/La_Rioja": "-03:00",
"America/Argentina/Mendoza": "-03:00",
"America/Argentina/Rio_Gallegos": "-03:00",
"America/Argentina/Salta": "-03:00",
"America/Argentina/San_Juan": "-03:00",
"America/Argentina/San_Luis": "-03:00",
"America/Argentina/Tucuman": "-03:00",
"America/Argentina/Ushuaia": "-03:00",
"America/Aruba": "-04:00",
"America/Asuncion": "-04:00",
"America/Atikokan": "-05:00",
"America/Atka": "-10:00",
"America/Bahia": "-03:00",
"America/Bahia_Banderas": "-06:00",
"America/Barbados": "-04:00",
"America/Belem": "-03:00",
"America/Belize": "-06:00",
"America/Blanc-Sablon": "-04:00",
"America/Boa_Vista": "-04:00",
"America/Bogota": "-05:00",
"America/Boise": "-07:00",
"America/Buenos_Aires": "-03:00",
"America/Cambridge_Bay": "-07:00",
"America/Campo_Grande": "-04:00",
"America/Cancun": "-06:00",
"America/Caracas": "-04:30",
"America/Catamarca": "-03:00",
"America/Cayenne": "-03:00",
"America/Cayman": "-05:00",
"America/Chicago": "-06:00",
"America/Chihuahua": "-07:00",
"America/Coral_Harbour": "-05:00",
"America/Cordoba": "-03:00",
"America/Costa_Rica": "-06:00",
"America/Creston": "-07:00",
"America/Cuiaba": "-04:00",
"America/Curacao": "-04:00",
"America/Danmarkshavn": "+00:00",
"America/Dawson": "-08:00",
"America/Dawson_Creek": "-07:00",
"America/Denver": "-07:00",
"America/Detroit": "-05:00",
"America/Dominica": "-04:00",
"America/Edmonton": "-07:00",
"America/Eirunepe": "-05:00",
"America/El_Salvador": "-06:00",
"America/Ensenada": "-08:00",
"America/Fort_Wayne": "-05:00",
"America/Fortaleza": "-03:00",
"America/Glace_Bay": "-04:00",
"America/Godthab": "-03:00",
"America/Goose_Bay": "-04:00",
"America/Grand_Turk": "-05:00",
"America/Grenada": "-04:00",
"America/Guadeloupe": "-04:00",
"America/Guatemala": "-06:00",
"America/Guayaquil": "-05:00",
"America/Guyana": "-04:00",
"America/Halifax": "-04:00",
"America/Havana": "-05:00",
"America/Hermosillo": "-07:00",
"America/Indiana/Indianapolis": "-05:00",
"America/Indiana/Knox": "-06:00",
"America/Indiana/Marengo": "-05:00",
"America/Indiana/Petersburg": "-05:00",
"America/Indiana/Tell_City": "-06:00",
"America/Indiana/Valparaiso": "-06:00",
"America/Indiana/Vevay": "-05:00",
"America/Indiana/Vincennes": "-05:00",
"America/Indiana/Winamac": "-05:00",
"America/Indianapolis": "-05:00",
"America/Inuvik": "-07:00",
"America/Iqaluit": "-05:00",
"America/Jamaica": "-05:00",
"America/Jujuy": "-03:00",
"America/Juneau": "-09:00",
"America/Kentucky/Louisville": "-05:00",
"America/Kentucky/Monticello": "-05:00",
"America/Knox_IN": "-06:00",
"America/Kralendijk": "-04:00",
"America/La_Paz": "-04:00",
"America/Lima": "-05:00",
"America/Los_Angeles": "-08:00",
"America/Louisville": "-05:00",
"America/Lower_Princes": "-04:00",
"America/Maceio": "-03:00",
"America/Managua": "-06:00",
"America/Manaus": "-04:00",
"America/Marigot": "-04:00",
"America/Martinique": "-04:00",
"America/Matamoros": "-06:00",
"America/Mazatlan": "-07:00",
"America/Mendoza": "-03:00",
"America/Menominee": "-06:00",
"America/Merida": "-06:00",
"America/Metlakatla": "-08:00",
"America/Mexico_City": "-06:00",
"America/Miquelon": "-03:00",
"America/Moncton": "-04:00",
"America/Monterrey": "-06:00",
"America/Montevideo": "-03:00",
"America/Montreal": "-05:00",
"America/Montserrat": "-04:00",
"America/Nassau": "-05:00",
"America/New_York": "-05:00",
"America/Nipigon": "-05:00",
"America/Nome": "-09:00",
"America/Noronha": "-02:00",
"America/North_Dakota/Beulah": "-06:00",
"America/North_Dakota/Center": "-06:00",
"America/North_Dakota/New_Salem": "-06:00",
"America/Ojinaga": "-07:00",
"America/Panama": "-05:00",
"America/Pangnirtung": "-05:00",
"America/Paramaribo": "-03:00",
"America/Phoenix": "-07:00",
"America/Port_of_Spain": "-04:00",
"America/Port-au-Prince": "-05:00",
"America/Porto_Acre": "-05:00",
"America/Porto_Velho": "-04:00",
"America/Puerto_Rico": "-04:00",
"America/Rainy_River": "-06:00",
"America/Rankin_Inlet": "-06:00",
"America/Recife": "-03:00",
"America/Regina": "-06:00",
"America/Resolute": "-06:00",
"America/Rio_Branco": "-05:00",
"America/Rosario": "-03:00",
"America/Santa_Isabel": "-08:00",
"America/Santarem": "-03:00",
"America/Santiago": "-03:00",
"America/Santo_Domingo": "-04:00",
"America/Sao_Paulo": "-03:00",
"America/Scoresbysund": "-01:00",
"America/Shiprock": "-07:00",
"America/Sitka": "-09:00",
"America/St_Barthelemy": "-04:00",
"America/St_Johns": "-03:30",
"America/St_Kitts": "-04:00",
"America/St_Lucia": "-04:00",
"America/St_Thomas": "-04:00",
"America/St_Vincent": "-04:00",
"America/Swift_Current": "-06:00",
"America/Tegucigalpa": "-06:00",
"America/Thule": "-04:00",
"America/Thunder_Bay": "-05:00",
"America/Tijuana": "-08:00",
"America/Toronto": "-05:00",
"America/Tortola": "-04:00",
"America/Vancouver": "-08:00",
"America/Virgin": "-04:00",
"America/Whitehorse": "-08:00",
"America/Winnipeg": "-06:00",
"America/Yakutat": "-09:00",
"America/Yellowknife": "-07:00",
"Antarctica/Casey": "+11:00",
"Antarctica/Davis": "+05:00",
"Antarctica/DumontDUrville": "+10:00",
"Antarctica/Macquarie": "+11:00",
"Antarctica/Mawson": "+05:00",
"Antarctica/McMurdo": "+12:00",
"Antarctica/Palmer": "-04:00",
"Antarctica/Rothera": "-03:00",
"Antarctica/South_Pole": "+12:00",
"Antarctica/Syowa": "+03:00",
"Antarctica/Troll": "+00:00",
"Antarctica/Vostok": "+06:00",
"Arctic/Longyearbyen": "+01:00",
"Asia/Aden": "+03:00",
"Asia/Almaty": "+06:00",
"Asia/Amman": "+02:00",
"Asia/Anadyr": "+12:00",
"Asia/Aqtau": "+05:00",
"Asia/Aqtobe": "+05:00",
"Asia/Ashgabat": "+05:00",
"Asia/Ashkhabad": "+05:00",
"Asia/Baghdad": "+03:00",
"Asia/Bahrain": "+03:00",
"Asia/Baku": "+04:00",
"Asia/Bangkok": "+07:00",
"Asia/Beirut": "+02:00",
"Asia/Bishkek": "+06:00",
"Asia/Brunei": "+08:00",
"Asia/Calcutta": "+05:30",
"Asia/Choibalsan": "+08:00",
"Asia/Chongqing": "+08:00",
"Asia/Chungking": "+08:00",
"Asia/Colombo": "+05:30",
"Asia/Dacca": "+06:00",
"Asia/Damascus": "+02:00",
"Asia/Dhaka": "+06:00",
"Asia/Dili": "+09:00",
"Asia/Dubai": "+04:00",
"Asia/Dushanbe": "+05:00",
"Asia/Gaza": "+02:00",
"Asia/Harbin": "+08:00",
"Asia/Hebron": "+02:00",
"Asia/Ho_Chi_Minh": "+07:00",
"Asia/Hong_Kong": "+08:00",
"Asia/Hovd": "+07:00",
"Asia/Irkutsk": "+08:00",
"Asia/Istanbul": "+02:00",
"Asia/Jakarta": "+07:00",
"Asia/Jayapura": "+09:00",
"Asia/Jerusalem": "+02:00",
"Asia/Kabul": "+04:30",
"Asia/Kamchatka": "+12:00",
"Asia/Karachi": "+05:00",
"Asia/Kashgar": "+08:00",
"Asia/Kathmandu": "+05:45",
"Asia/Katmandu": "+05:45",
"Asia/Khandyga": "+09:00",
"Asia/Kolkata": "+05:30",
"Asia/Krasnoyarsk": "+07:00",
"Asia/Kuala_Lumpur": "+08:00",
"Asia/Kuching": "+08:00",
"Asia/Kuwait": "+03:00",
"Asia/Macao": "+08:00",
"Asia/Macau": "+08:00",
"Asia/Magadan": "+10:00",
"Asia/Makassar": "+08:00",
"Asia/Manila": "+08:00",
"Asia/Muscat": "+04:00",
"Asia/Nicosia": "+02:00",
"Asia/Novokuznetsk": "+07:00",
"Asia/Novosibirsk": "+06:00",
"Asia/Omsk": "+06:00",
"Asia/Oral": "+05:00",
"Asia/Phnom_Penh": "+07:00",
"Asia/Pontianak": "+07:00",
"Asia/Pyongyang": "+09:00",
"Asia/Qatar": "+03:00",
"Asia/Qyzylorda": "+06:00",
"Asia/Rangoon": "+06:30",
"Asia/Riyadh": "+03:00",
"Asia/Saigon": "+07:00",
"Asia/Sakhalin": "+11:00",
"Asia/Samarkand": "+05:00",
"Asia/Seoul": "+09:00",
"Asia/Shanghai": "+08:00",
"Asia/Singapore": "+08:00",
"Asia/Taipei": "+08:00",
"Asia/Tashkent": "+05:00",
"Asia/Tbilisi": "+04:00",
"Asia/Tehran": "+03:30",
"Asia/Tel_Aviv": "+02:00",
"Asia/Thimbu": "+06:00",
"Asia/Thimphu": "+06:00",
"Asia/Tokyo": "+09:00",
"Asia/Ujung_Pandang": "+08:00",
"Asia/Ulaanbaatar": "+08:00",
"Asia/Ulan_Bator": "+08:00",
"Asia/Urumqi": "+08:00",
"Asia/Ust-Nera": "+10:00",
"Asia/Vientiane": "+07:00",
"Asia/Vladivostok": "+10:00",
"Asia/Yakutsk": "+09:00",
"Asia/Yekaterinburg": "+05:00",
"Asia/Yerevan": "+04:00",
"Atlantic/Azores": "-01:00",
"Atlantic/Bermuda": "-04:00",
"Atlantic/Canary": "+00:00",
"Atlantic/Cape_Verde": "-01:00",
"Atlantic/Faeroe": "+00:00",
"Atlantic/Faroe": "+00:00",
"Atlantic/Jan_Mayen": "+01:00",
"Atlantic/Madeira": "+00:00",
"Atlantic/Reykjavik": "+00:00",
"Atlantic/South_Georgia": "-02:00",
"Atlantic/St_Helena": "+00:00",
"Atlantic/Stanley": "-03:00",
"Australia/ACT": "+10:00",
"Australia/Adelaide": "+09:30",
"Australia/Brisbane": "+10:00",
"Australia/Broken_Hill": "+09:30",
"Australia/Canberra": "+10:00",
"Australia/Currie": "+10:00",
"Australia/Darwin": "+09:30",
"Australia/Eucla": "+08:45",
"Australia/Hobart": "+10:00",
"Australia/LHI": "+10:30",
"Australia/Lindeman": "+10:00",
"Australia/Lord_Howe": "+10:30",
"Australia/Melbourne": "+10:00",
"Australia/North": "+09:30",
"Australia/NSW": "+10:00",
"Australia/Perth": "+08:00",
"Australia/Queensland": "+10:00",
"Australia/South": "+09:30",
"Australia/Sydney": "+10:00",
"Australia/Tasmania": "+10:00",
"Australia/Victoria": "+10:00",
"Australia/West": "+08:00",
"Australia/Yancowinna": "+09:30",
"Brazil/Acre": "-05:00",
"Brazil/DeNoronha": "-02:00",
"Brazil/East": "-03:00",
"Brazil/West": "-04:00",
"Canada/Atlantic": "-04:00",
"Canada/Central": "-06:00",
"Canada/Eastern": "-05:00",
"Canada/East-Saskatchewan": "-06:00",
"Canada/Mountain": "-07:00",
"Canada/Newfoundland": "-03:30",
"Canada/Pacific": "-08:00",
"Canada/Saskatchewan": "-06:00",
"Canada/Yukon": "-08:00",
"Chile/Continental": "-03:00",
"Chile/EasterIsland": "-05:00",
Cuba: "-05:00",
Egypt: "+02:00",
Eire: "+00:00",
"Etc/GMT": "+00:00",
"Etc/GMT+0": "+00:00",
"Etc/UCT": "+00:00",
"Etc/Universal": "+00:00",
"Etc/UTC": "+00:00",
"Etc/Zulu": "+00:00",
"Europe/Amsterdam": "+01:00",
"Europe/Andorra": "+01:00",
"Europe/Athens": "+02:00",
"Europe/Belfast": "+00:00",
"Europe/Belgrade": "+01:00",
"Europe/Berlin": "+01:00",
"Europe/Bratislava": "+01:00",
"Europe/Brussels": "+01:00",
"Europe/Bucharest": "+02:00",
"Europe/Budapest": "+01:00",
"Europe/Busingen": "+01:00",
"Europe/Chisinau": "+02:00",
"Europe/Copenhagen": "+01:00",
"Europe/Dublin": "+00:00",
"Europe/Gibraltar": "+01:00",
"Europe/Guernsey": "+00:00",
"Europe/Helsinki": "+02:00",
"Europe/Isle_of_Man": "+00:00",
"Europe/Istanbul": "+02:00",
"Europe/Jersey": "+00:00",
"Europe/Kaliningrad": "+02:00",
"Europe/Kiev": "+02:00",
"Europe/Lisbon": "+00:00",
"Europe/Ljubljana": "+01:00",
"Europe/London": "+00:00",
"Europe/Luxembourg": "+01:00",
"Europe/Madrid": "+01:00",
"Europe/Malta": "+01:00",
"Europe/Mariehamn": "+02:00",
"Europe/Minsk": "+03:00",
"Europe/Monaco": "+01:00",
"Europe/Moscow": "+03:00",
"Europe/Nicosia": "+02:00",
"Europe/Oslo": "+01:00",
"Europe/Paris": "+01:00",
"Europe/Podgorica": "+01:00",
"Europe/Prague": "+01:00",
"Europe/Riga": "+02:00",
"Europe/Rome": "+01:00",
"Europe/Samara": "+04:00",
"Europe/San_Marino": "+01:00",
"Europe/Sarajevo": "+01:00",
"Europe/Simferopol": "+03:00",
"Europe/Skopje": "+01:00",
"Europe/Sofia": "+02:00",
"Europe/Stockholm": "+01:00",
"Europe/Tallinn": "+02:00",
"Europe/Tirane": "+01:00",
"Europe/Tiraspol": "+02:00",
"Europe/Uzhgorod": "+02:00",
"Europe/Vaduz": "+01:00",
"Europe/Vatican": "+01:00",
"Europe/Vienna": "+01:00",
"Europe/Vilnius": "+02:00",
"Europe/Volgograd": "+03:00",
"Europe/Warsaw": "+01:00",
"Europe/Zagreb": "+01:00",
"Europe/Zaporozhye": "+02:00",
"Europe/Zurich": "+01:00",
GB: "+00:00",
"GB-Eire": "+00:00",
GMT: "+00:00",
"GMT+0": "+00:00",
GMT0: "+00:00",
"GMT-0": "+00:00",
Greenwich: "+00:00",
Hongkong: "+08:00",
Iceland: "+00:00",
"Indian/Antananarivo": "+03:00",
"Indian/Chagos": "+06:00",
"Indian/Christmas": "+07:00",
"Indian/Cocos": "+06:30",
"Indian/Comoro": "+03:00",
"Indian/Kerguelen": "+05:00",
"Indian/Mahe": "+04:00",
"Indian/Maldives": "+05:00",
"Indian/Mauritius": "+04:00",
"Indian/Mayotte": "+03:00",
"Indian/Reunion": "+04:00",
Iran: "+03:30",
Israel: "+02:00",
Jamaica: "-05:00",
Japan: "+09:00",
Kwajalein: "+12:00",
Libya: "+02:00",
"Mexico/BajaNorte": "-08:00",
"Mexico/BajaSur": "-07:00",
"Mexico/General": "-06:00",
Navajo: "-07:00",
NZ: "+12:00",
"NZ-CHAT": "+12:45",
"Pacific/Apia": "+13:00",
"Pacific/Auckland": "+12:00",
"Pacific/Chatham": "+12:45",
"Pacific/Chuuk": "+10:00",
"Pacific/Easter": "-06:00",
"Pacific/Efate": "+11:00",
"Pacific/Enderbury": "+13:00",
"Pacific/Fakaofo": "+13:00",
"Pacific/Fiji": "+12:00",
"Pacific/Funafuti": "+12:00",
"Pacific/Galapagos": "-06:00",
"Pacific/Gambier": "-09:00",
"Pacific/Guadalcanal": "+11:00",
"Pacific/Guam": "+10:00",
"Pacific/Honolulu": "-10:00",
"Pacific/Johnston": "-10:00",
"Pacific/Kiritimati": "+14:00",
"Pacific/Kosrae": "+11:00",
"Pacific/Kwajalein": "+12:00",
"Pacific/Majuro": "+12:00",
"Pacific/Marquesas": "-09:30",
"Pacific/Midway": "-11:00",
"Pacific/Nauru": "+12:00",
"Pacific/Niue": "-11:00",
"Pacific/Norfolk": "+11:30",
"Pacific/Noumea": "+11:00",
"Pacific/Pago_Pago": "-11:00",
"Pacific/Palau": "+09:00",
"Pacific/Pitcairn": "-08:00",
"Pacific/Pohnpei": "+11:00",
"Pacific/Ponape": "+11:00",
"Pacific/Port_Moresby": "+10:00",
"Pacific/Rarotonga": "-10:00",
"Pacific/Saipan": "+10:00",
"Pacific/Samoa": "-11:00",
"Pacific/Tahiti": "-10:00",
"Pacific/Tarawa": "+12:00",
"Pacific/Tongatapu": "+13:00",
"Pacific/Truk": "+10:00",
"Pacific/Wake": "+12:00",
"Pacific/Wallis": "+12:00",
"Pacific/Yap": "+10:00",
Poland: "+01:00",
Portugal: "+00:00",
PRC: "+08:00",
ROC: "+08:00",
ROK: "+09:00",
Singapore: "+08:00",
Turkey: "+02:00",
UCT: "+00:00",
Universal: "+00:00",
"US/Alaska": "-09:00",
"US/Aleutian": "-10:00",
"US/Arizona": "-07:00",
"US/Central": "-06:00",
"US/Eastern": "-05:00",
"US/East-Indiana": "-05:00",
"US/Hawaii": "-10:00",
"US/Indiana-Starke": "-06:00",
"US/Michigan": "-05:00",
"US/Mountain": "-07:00",
"US/Pacific": "-08:00",
"US/Samoa": "-11:00",
UTC: "+00:00",
"W-SU": "+03:00",
Zulu: "+00:00",
};
export type timezone = keyof typeof tzDatabase;
``` | /content/code_sandbox/src/common/timezone.ts | xml | 2016-09-22T23:13:54 | 2024-08-16T17:59:09 | firebase-functions | firebase/firebase-functions | 1,015 | 6,694 |
```xml
import { Component } from '@angular/core';
import { Code } from '@domain/code';
import { NodeService } from '@service/nodeservice';
@Component({
selector: 'filter-doc',
template: `
<app-docsectiontext>
<p>
Filtering is enabled by adding the <i>filter</i> property, by default label property of a node is used to compare against the value in the text field, in order to customize which field(s) should be used during search define
<i>filterBy</i> property. In addition <i>filterMode</i> specifies the filtering strategy. In <i>lenient</i> mode when the query matches a node, children of the node are not searched further as all descendants of the node are included.
On the other hand, in <i>strict</i> mode when the query matches a node, filtering continues on all descendants.
</p>
</app-docsectiontext>
<div class="card flex justify-content-center">
<p-treeSelect class="md:w-20rem w-full" containerStyleClass="w-full" [(ngModel)]="selectedNodes" [options]="nodes" placeholder="Select Item" [filter]="true" [filterInputAutoFocus]="true" />
</div>
<app-code [code]="code" selector="tree-select-filter-demo"></app-code>
`
})
export class FilterDoc {
nodes!: any[];
selectedNodes: any;
constructor(private nodeService: NodeService) {
this.nodeService.getFiles().then((files) => (this.nodes = files));
}
code: Code = {
basic: `<p-treeSelect
class="md:w-20rem w-full"
containerStyleClass="w-full"
[(ngModel)]="selectedNodes"
[options]="nodes"
placeholder="Select Item"
[filter]="true"
[filterInputAutoFocus]="true" />`,
html: `<div class="card flex justify-content-center">
<p-treeSelect
class="md:w-20rem w-full"
containerStyleClass="w-full"
[(ngModel)]="selectedNodes"
[options]="nodes"
placeholder="Select Item"
[filter]="true"
[filterInputAutoFocus]="true" />
</div>`,
typescript: `import { Component } from '@angular/core';
import { NodeService } from '@service/nodeservice';
import { FormsModule } from '@angular/forms';
import { TreeSelectModule } from 'primeng/treeselect';
@Component({
selector: 'tree-select-filter-demo',
templateUrl: './tree-select-filter-demo.html',
standalone: true,
imports: [FormsModule, TreeSelectModule],
providers: [NodeService]
})
export class TreeSelectFilterDemo {
nodes!: any[];
selectedNodes: any;
constructor(private nodeService: NodeService) {
this.nodeService.getFiles().then((files) => (this.nodes = files));
}
}`,
service: ['NodeService'],
data: `
/* NodeService */
{
key: '0',
label: 'Documents',
data: 'Documents Folder',
icon: 'pi pi-fw pi-inbox',
children: [
{
key: '0-0',
label: 'Work',
data: 'Work Folder',
icon: 'pi pi-fw pi-cog',
children: [
{ key: '0-0-0', label: 'Expenses.doc', icon: 'pi pi-fw pi-file', data: 'Expenses Document' },
{ key: '0-0-1', label: 'Resume.doc', icon: 'pi pi-fw pi-file', data: 'Resume Document' }
]
},
{
key: '0-1',
label: 'Home',
data: 'Home Folder',
icon: 'pi pi-fw pi-home',
children: [{ key: '0-1-0', label: 'Invoices.txt', icon: 'pi pi-fw pi-file', data: 'Invoices for this month' }]
}
]
},
...`
};
}
``` | /content/code_sandbox/src/app/showcase/doc/treeselect/filterdoc.ts | xml | 2016-01-16T09:23:28 | 2024-08-16T19:58:20 | primeng | primefaces/primeng | 9,969 | 889 |
```xml
import { Task } from './task';
import * as Attributes from '../attributes';
import { Contact } from '../models/contact';
import { ContactGroup } from '../models/contact-group';
import { AttributeValues } from '../models/model';
import { localized } from 'mailspring-exports';
export class ChangeContactGroupMembershipTask extends Task {
static attributes = {
...Task.attributes,
group: Attributes.Obj({
modelKey: 'group',
itemClass: ContactGroup,
}),
contacts: Attributes.Collection({
modelKey: 'contacts',
itemClass: Contact,
}),
direction: Attributes.String({
modelKey: 'direction',
}),
};
contacts: Contact[];
group: ContactGroup;
direction: 'add' | 'remove';
static forMoving({
contacts,
group,
direction,
}: {
contacts: Contact[];
group: ContactGroup;
direction: 'add' | 'remove';
}) {
const accountId = contacts ? contacts[0].accountId : undefined;
if (contacts.some(c => c.accountId !== accountId)) {
throw new Error('ChangeContactGroupMembershipTask: all contacts must be in the same account');
}
if (group.accountId !== accountId) {
throw new Error('ChangeContactGroupMembershipTask: group must be in the same account');
}
return new ChangeContactGroupMembershipTask({
accountId,
contacts,
group,
direction,
});
}
constructor(data: AttributeValues<typeof ChangeContactGroupMembershipTask.attributes> = {}) {
super(data);
}
description() {
return this.direction === 'add'
? localized(`Added %@ to %@`, this.contacts.length, this.group.name)
: localized(`Removed %@ from %@`, this.contacts.length, this.group.name);
}
createUndoTask() {
return ChangeContactGroupMembershipTask.forMoving({
direction: this.direction === 'remove' ? 'add' : 'remove',
contacts: this.contacts,
group: this.group,
});
}
}
``` | /content/code_sandbox/app/src/flux/tasks/change-contactgroup-membership-task.ts | xml | 2016-10-13T06:45:50 | 2024-08-16T18:14:37 | Mailspring | Foundry376/Mailspring | 15,331 | 427 |
```xml
export default defineEventHandler(() => ({
foo: 'bar',
baz: 'qux',
}))
``` | /content/code_sandbox/test/fixtures/basic-types/server/api/hey/index.get.ts | xml | 2016-10-26T11:18:47 | 2024-08-16T19:32:46 | nuxt | nuxt/nuxt | 53,705 | 22 |
```xml
import { ABIFunc, ABIFuncParamless } from './abiFunc';
type uint256 = any;
type address = any;
export interface IERC20 {
decimals: ABIFuncParamless<{ decimals: string }>;
symbol: ABIFuncParamless<{ symbol: string }>;
approve: ABIFunc<{ _spender: address; _value: uint256 }, { approved: boolean }>;
balanceOf: ABIFunc<{ _owner: address }, { balance: uint256 }>;
transfer: ABIFunc<{ _to: address; _value: uint256 }>;
transferFrom: ABIFunc<{ _from: address; _to: address; _value: uint256 }>;
allowance: ABIFunc<{ _owner: address; _spender: address }, { allowance: uint256 }>;
}
export interface TokenInformation {
readonly symbol?: string;
readonly decimals?: number;
}
``` | /content/code_sandbox/src/types/erc20.ts | xml | 2016-12-04T01:35:27 | 2024-08-14T21:41:58 | MyCrypto | MyCryptoHQ/MyCrypto | 1,347 | 194 |
```xml
export * from "graphql";
``` | /content/code_sandbox/grafast/grafast/fwd/graphql/index.d.ts | xml | 2016-04-14T21:29:19 | 2024-08-16T17:12:51 | crystal | graphile/crystal | 12,539 | 7 |
```xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="path_to_url"
android:padding="5dp"
android:layout_width="75dp"
android:layout_height="wrap_content"
android:clickable="true"
android:focusable="true"
android:background="?android:attr/selectableItemBackground"
android:orientation="vertical">
<ImageView
android:id="@+id/icon"
android:layout_height="75dp"
android:layout_width="match_parent"/>
<TextView
android:id="@+id/icon_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" />
</LinearLayout>
``` | /content/code_sandbox/app/src/main/res/layout/card_icon.xml | xml | 2016-08-15T19:10:31 | 2024-08-16T19:34:19 | Aegis | beemdevelopment/Aegis | 8,651 | 158 |
```xml
import { IDropdownOption } from '@fluentui/react/lib/Dropdown';
/**
* Properties for the chart palette select
*/
export interface IChartPaletteSelectorProps {
disabled: boolean;
label: string;
options: IDropdownOption[];
selectedKey: string | number;
stateKey: string;
onChanged: (option: IDropdownOption, index?: number) => void;
}
export interface IChartPaletteSelectorState {
selectedKey: string | number;
}
``` | /content/code_sandbox/samples/react-chartcontrol/src/webparts/chartinator/controls/PropertyPaneChartPaletteSelector/components/ChartPaletteSelector.types.ts | xml | 2016-08-30T17:21:43 | 2024-08-16T18:41:32 | sp-dev-fx-webparts | pnp/sp-dev-fx-webparts | 2,027 | 101 |
```xml
/*
* Wire
*
* This program is free software: you can redistribute it and/or modify
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
*
* along with this program. If not, see path_to_url
*
*/
import * as path from 'path';
import {URL} from 'url';
import {getLogger} from '../logging/getLogger';
const logger = getLogger(path.basename(__filename));
interface AuthInfo {
host: string;
port: number;
}
interface ProxyOptions {
password?: string;
protocol?: string;
username?: string;
}
export function generateProxyURL(authInfo: AuthInfo, options: ProxyOptions): URL {
let protocol = options.protocol;
const {username, password} = options;
if (!protocol) {
logger.log('Defaulting to HTTP proxy');
protocol = 'http';
}
const proxySettings = new URL(`${protocol}://${authInfo.host}`);
if (authInfo.port) {
proxySettings.port = authInfo.port.toString();
logger.log(`Port set to "${authInfo.port}".`);
}
logger.log(`Proxy URL: (credentials hidden) ${proxySettings.toString()}`);
if (username) {
proxySettings.username = username;
logger.log('Username set');
}
if (password) {
proxySettings.password = password;
logger.log('Password set');
}
return proxySettings;
}
``` | /content/code_sandbox/electron/src/auth/ProxyAuth.ts | xml | 2016-07-26T13:55:48 | 2024-08-16T03:45:51 | wire-desktop | wireapp/wire-desktop | 1,075 | 333 |
```xml
/*
* This software is released under MIT license.
* The full license information can be found in LICENSE in the root directory of this project.
*/
import { renderIcon } from '../icon.renderer.js';
import { IconShapeTuple } from '../interfaces/icon.interfaces.js';
const icon = {
outline:
'<path d="M20.87,11.14h-13l5.56-5.49A1,1,0,0,0,12,4.22L4,12.13,12,20a1,1,0,0,0,1.41-1.42L7.86,13.14h13a9.08,9.08,0,0,1,9.13,9,9,9,0,0,1-5,8A1,1,0,0,0,25.93,32a11,11,0,0,0-5.06-20.82Z"/>',
};
export const undoIconName = 'undo';
export const undoIcon: IconShapeTuple = [undoIconName, renderIcon(icon)];
``` | /content/code_sandbox/packages/core/src/icon/shapes/undo.ts | xml | 2016-09-29T17:24:17 | 2024-08-11T17:06:15 | clarity | vmware-archive/clarity | 6,431 | 238 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.