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 { Path } from 'slate' export const input = { path: [0, 1, 2], another: [1], } export const test = ({ path, another }) => { return Path.isBefore(path, another) } export const output = true ```
/content/code_sandbox/packages/slate/test/interfaces/Path/isBefore/before.tsx
xml
2016-06-18T01:52:42
2024-08-16T18:43:42
slate
ianstormtaylor/slate
29,492
61
```xml import { PipeTransform, Pipe } from '@angular/core'; @Pipe({ name: 'customPipe', }) export class CustomPipePipe implements PipeTransform { transform(value: any, args?: any): any { return `CustomPipe: ${value}`; } } ```
/content/code_sandbox/code/frameworks/angular/template/stories/core/moduleMetadata/angular-src/custom.pipe.ts
xml
2016-03-18T04:23:44
2024-08-16T19:22:08
storybook
storybookjs/storybook
83,755
57
```xml // Bangla (India) export default function(number: number, index: number): [string, string] { return [ ['', ' '], ['%s ', '%s '], ['1 ', '1 '], ['%s ', '%s '], ['1 ', '1 '], ['%s ', '%s '], ['1 ', '1 '], ['%s ', '%s '], ['1 ', '1 '], ['%s ', '%s '], ['1 ', '1 '], ['%s ', '%s '], ['1 ', '1 '], ['%s ', '%s '], ][index] as [string, string]; } ```
/content/code_sandbox/src/lang/bn_IN.ts
xml
2016-06-23T02:06:23
2024-08-16T02:07:26
timeago.js
hustcc/timeago.js
5,267
175
```xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="1px" android:background="#fff" android:gravity="center_vertical" android:orientation="horizontal" android:paddingBottom="10dp" android:paddingLeft="16dp" android:paddingRight="16dp" android:paddingTop="10dp" > <ImageView android:id="@+id/imageView" android:transitionName="pic" android:layout_width="70dp" android:layout_height="70dp" android:scaleType="centerCrop" android:src="@drawable/pizza" /> <LinearLayout android:gravity="center_vertical" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="10dp" android:orientation="horizontal" > <LinearLayout android:orientation="vertical" android:layout_width="wrap_content" android:layout_height="wrap_content" > <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="()" android:textColor="#000" android:textSize="16sp" /> <TextView android:gravity="right" android:layout_marginTop="5dp" android:text = " 2.1km" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:text="" /> </LinearLayout> </LinearLayout> </LinearLayout> ```
/content/code_sandbox/app/src/main/res/layout/item_home.xml
xml
2016-12-06T12:45:56
2024-08-15T20:35:53
ZoomHeader
githubwing/ZoomHeader
2,469
397
```xml import * as React from 'react'; import Svg, { SvgProps, Defs, G, Path, Ellipse } from 'react-native-svg'; const SvgComponent = (props: SvgProps) => ( <Svg id="ART" width={259.492} height={336.983} {...props}> <Defs /> <G id="_2_color" data-name="2 color"> <Path d="m68.745 246.964 31.195-18.801 42.254 21.966-.508 43.17-72.94-46.335z" fill="#fff" /> <Path d="m6.644 72.92 30.634 15.024.238 176.912L6.702 248.18 6.644 72.92zM130.83 207.417l32.889-18.628-.203 145.525L37.413 265.06l31.322-18 61.83 34.373.264-74.016zM67.415 106.497l63.192 34.264-30.661 18.924-32.333-17.73-.198-35.458z" fill="#b19cd1" /> <Path d="m37.516 87.704 30-16.373v106.17l-30 17.593V87.704zM163.5 334.269l31.134-18.362.535-176.392-157.552 89.647.102 35.593 125.593-72.712.187 142.226z" fill="#b19cd1" /> <Path d="m7.261 212.535 30.356 16.322 151.843-88.728L67.776 71.594l.25 35.333 63.117 33.659L7.26 212.534zM6.584 72.875l30.458-18.458 30.305 16.627-30.05 16.83-30.713-15z" fill="#fff" /> </G> <G id="Line_2" data-name="Line 2"> <Path d="M16.238 251.007a.5.5 0 0 1-.24-.061l-7.485-4.113a.501.501 0 0 1-.259-.439l.038-59.265a.5.5 0 0 1 1 0l-.038 58.97 7.226 3.97a.502.502 0 0 1-.242.939ZM102.99 298.681a.5.5 0 0 1-.24-.061l-80.404-44.186a.502.502 0 0 1 .482-.877l80.404 44.186a.502.502 0 0 1-.242.938ZM165.644 333.113a.504.504 0 0 1-.242-.062l-52.955-29.101a.502.502 0 0 1 .483-.877l52.703 28.964 13.763-8.228a.5.5 0 1 1 .514.857l-14.01 8.375a.495.495 0 0 1-.256.072ZM186.448 320.674a.5.5 0 0 1-.257-.929l9.862-5.895-.016-142.28a.5.5 0 1 1 1 0l.016 142.563a.5.5 0 0 1-.243.429l-10.105 6.041a.494.494 0 0 1-.257.071ZM196.536 162.764a.5.5 0 0 1-.5-.5l-.003-23.956-16.666-9.075a.5.5 0 0 1 .479-.878l16.927 9.217a.5.5 0 0 1 .26.439l.003 24.253a.5.5 0 0 1-.5.5ZM8.798 178.02a.5.5 0 0 1-.5-.5L8.365 70.58a.5.5 0 0 1 .243-.428l30.346-18.23a.5.5 0 0 1 .497-.01l129.832 70.69a.5.5 0 0 1-.479.878L39.224 52.927 9.365 70.865l-.067 106.654a.5.5 0 0 1-.5.5Z" fill="#2f1d4a" /> <Path d="M73.751 173.546a.5.5 0 0 1-.25-.932l58.33-33.923-60.275-32.282a.5.5 0 1 1 .473-.882l61.064 32.705a.501.501 0 0 1 .015.873L74.002 173.48a.497.497 0 0 1-.25.067ZM8.983 211.212a.5.5 0 0 1-.25-.933l57.03-33.167a.499.499 0 1 1 .503.865L9.234 211.144a.497.497 0 0 1-.25.068ZM165.644 332.95a.5.5 0 0 1-.5-.5v-86.898a.5.5 0 1 1 1 0v86.899a.5.5 0 0 1-.5.5ZM74.817 243.159a.5.5 0 0 1-.251-.933l90.827-52.617a.504.504 0 0 1 .5-.001c.155.09.25.255.25.433v45.9a.5.5 0 1 1-1 0V190.91L75.068 243.09a.497.497 0 0 1-.25.068ZM39.339 263.712a.5.5 0 0 1-.251-.933l23.93-13.863a.5.5 0 0 1 .502.865l-23.93 13.863a.497.497 0 0 1-.251.067ZM122.9 180.333a.5.5 0 0 1-.246-.935l73.023-41.35a.501.501 0 0 1 .492.87l-73.022 41.351a.496.496 0 0 1-.247.065ZM39.415 227.61a.5.5 0 0 1-.246-.936l74.837-42.378a.501.501 0 0 1 .492.87l-74.837 42.38a.496.496 0 0 1-.246.064ZM69.466 173.52a.5.5 0 0 1-.5-.5l.05-104.046a.5.5 0 1 1 1 0l-.05 104.045a.5.5 0 0 1-.5.5Z" fill="#2f1d4a" /> <Path d="M132.458 279.963a.497.497 0 0 1-.242-.062l-57.222-31.675a.5.5 0 0 1 .485-.875l56.48 31.264.007-69.505a.5.5 0 1 1 1 0l-.008 70.353a.5.5 0 0 1-.5.5ZM39.314 193.592a.5.5 0 0 1-.5-.5l.076-79.947a.5.5 0 0 1 1 .001l-.076 79.946a.5.5 0 0 1-.5.5ZM39.398 105.409a.5.5 0 0 1-.5-.5l.017-18.791L9.903 72.057a.5.5 0 1 1 .436-.9l29.294 14.198a.5.5 0 0 1 .282.45l-.017 19.104a.5.5 0 0 1-.5.5Z" fill="#2f1d4a" /> <Path d="M39.314 86.254a.5.5 0 0 1-.243-.938l30.254-16.729a.5.5 0 0 1 .485.875l-30.254 16.73a.5.5 0 0 1-.242.062ZM98.817 156.842a.498.498 0 0 1-.24-.061L84.444 149a.5.5 0 1 1 .483-.876l14.13 7.779a.5.5 0 0 1-.24.938ZM80.195 146.591a.499.499 0 0 1-.24-.062l-7.562-4.162a.5.5 0 1 1 .482-.876l7.562 4.162a.5.5 0 0 1-.242.938ZM131.186 243.296a.501.501 0 0 1-.237-.06l-26.258-14.11a.5.5 0 1 1 .472-.881l26.26 14.11a.5.5 0 0 1-.237.941ZM39.648 227.46a.497.497 0 0 1-.232-.058L8.675 211.23a.499.499 0 1 1 .465-.885l30.74 16.172a.499.499 0 0 1-.232.942Z" fill="#2f1d4a" /> <Path d="M39.314 263.584a.5.5 0 0 1-.5-.5v-36.33a.5.5 0 1 1 1 0v36.33a.5.5 0 0 1-.5.5Z" fill="#2f1d4a" /> </G> <Ellipse cx={32.707} cy={66.748} fill="#b19cd1" rx={5.978} ry={1.407} transform="rotate(-5.686 32.707 66.748)" /> <Ellipse cx={42.21} cy={72.055} fill="#b19cd1" rx={6.409} ry={1.567} transform="rotate(-6.494 42.21 72.055)" /> <Path d="m42.984 40.975.71 6.648 3.298 23.662s-9.18 1.693-9.684.766c-.728-1.34 5.607-4.381 5.607-4.381l-1.141-18.668-.259-7.111 1.47-.916Z" fill="#ffe4b7" /> <Path d="m43.234 44.127.709 6.648-1.92 1.379-.258-7.112 1.47-.915z" fill="#f6b969" /> <Path d="M38.586 72.979c-.838 0-1.433-.098-1.651-.334a1.105 1.105 0 0 1-.28-.996c.323-1.554 4.246-3.464 5.632-4.094l-1.61-25.71a.5.5 0 0 1 .468-.53.48.48 0 0 1 .53.468l1.632 26.056a.5.5 0 0 1-.298.49c-2.456 1.078-5.21 2.732-5.374 3.524-.01.048-.007.07.034.113.558.27 4.871-.304 8.704-1.033l-4.217-29.961a.5.5 0 0 1 .426-.565.505.505 0 0 1 .565.425l4.283 30.432a.5.5 0 0 1-.4.56c-2.966.58-6.417 1.155-8.444 1.155Z" fill="#2f1d4a" /> <Path d="m33.512 35.542.708 6.648 3.3 23.661s-9.182 1.694-9.685.767c-.728-1.341 5.607-4.382 5.607-4.382L32.301 43.57l-.259-7.111 1.47-.916Z" fill="#ffe4b7" /> <Path d="m33.584 38.948.708 6.648-1.92 1.38-.258-7.112 1.47-.916z" fill="#f6b969" /> <Path d="M29.113 67.546c-.838 0-1.432-.098-1.651-.334a1.102 1.102 0 0 1-.28-.996c.324-1.554 4.247-3.464 5.633-4.094l-1.61-25.71a.5.5 0 0 1 .468-.53c.299-.007.514.193.53.468l1.631 26.056a.5.5 0 0 1-.298.49c-2.457 1.078-5.21 2.732-5.374 3.523-.01.048-.007.07.034.114.556.27 4.872-.304 8.704-1.033L32.684 35.54a.5.5 0 0 1 .99-.14l4.283 30.432a.5.5 0 0 1-.4.56c-2.966.58-6.416 1.155-8.443 1.155Z" fill="#2f1d4a" /> <Path d="M62.925 37.654c-.234-.363-2.27-3.57-4.962-7.81L56.81 28.03c-5.595-8.813-13.096-20.63-13.8-21.726-1.113-1.73-2.2-1.52-3.22-.253-.376.466-3.168 3.852-6.568 7.982.286.971.6 2.123.9 3.408l-3.72.021a4537.91 4537.91 0 0 0-3.19 3.882l-1.35 1.648-1.692 2.067c.167.552.338 1.195.498 1.886l-2.154.08c-1.598 1.966-2.933 3.694-3.028 3.864-.414.74-.16 1.164.235 1.399.14.083 3.208 1.89 7.135 4.197l2.77-.133c-.089.525-.193 1.05-.313 1.575 2.337 1.371 4.812 2.82 7.066 4.136l2.884.876-.173.704c2.953 1.717 5.096 2.946 5.278 3.008.625.21 1.422.309 2.226.036.531-.18 6.653-2.724 11.123-4.603l2.805-1.185c.903-.383 1.55-.662 1.79-.772 1.324-.606 1.336-1.348.613-2.473Z" fill="#b29dd2" /> <Path d="M31.884 24.124c.601 3.322.5 9.744-.12 12.79l2.933 1.705c.4-2.443.827-8.806.908-11.856l-3.72-2.639ZM42.689 40.095 39.18 42.93l-2.65-.78c.382-2.188 1.141-9.219 1.358-13.419l3.854 2.923.947 8.442Z" fill="#8274a7" /> <Path d="m37.804 28.828-.022.293 4.02 2.972L39.33 9.11l-3.704 4.674c.848 2.991 1.862 7.398 2.112 12.118.052.97.072 1.95.066 2.927ZM42.496 38.64l.556 4.837-5.292-2.683 4.736-2.153zM30.401 17.461c.426 1.54 1.507 7.35 1.507 7.35l3.625 2.676a37.868 37.868 0 0 0-.032-.732c-.18-3.41-.754-6.65-1.378-9.315l-3.722.021ZM27.224 31.163a30.278 30.278 0 0 0-.806-5.755l1-1.255 1.672-2.136.677 3.879c.383 3.142.486 6.783-.14 10.455l-2.77.133c.23-1.128.347-2.298.38-3.459 0 0 .007-1.467-.013-1.862ZM22.514 27.024l.612 2.517-1.28 1.607 3.348 1.946c.113-1.022.132-2.016.027-2.964a27.477 27.477 0 0 0-.55-3.2l-2.157.094Z" fill="#8274a7" /> <Path d="M44.404 34.54a.5.5 0 0 1-.495-.44L41.92 17.376a.5.5 0 0 1 .438-.556.51.51 0 0 1 .554.438l1.99 16.722a.5.5 0 0 1-.498.56ZM42.142 15.522a.5.5 0 0 1-.495-.44l-.925-7.772a.5.5 0 1 1 .992-.118l.925 7.77a.5.5 0 0 1-.497.56ZM26.857 36.984a.495.495 0 0 1-.253-.069 3901.299 3901.299 0 0 1-7.138-4.199c-.74-.439-.896-1.214-.417-2.072.137-.245 1.632-2.157 3.078-3.935a.499.499 0 0 1 .874.197l.611 2.517a.503.503 0 0 1-.094.43l-.92 1.153 2.166 1.26c.045-.741.032-1.438-.04-2.081a27.609 27.609 0 0 0-1.033-4.98.5.5 0 0 1 .091-.462l1.693-2.07a.499.499 0 1 1 .773.635l-1.523 1.861c.481 1.635.815 3.284.994 4.906.103.936.094 1.97-.028 3.074a.501.501 0 0 1-.748.377l-3.347-1.946a.5.5 0 0 1-.14-.744l1.126-1.415-.314-1.296c-1.3 1.615-2.25 2.852-2.351 3.015-.285.512-.086.63.059.717.133.079 2.89 1.704 6.516 3.833.137-.845.219-1.744.245-2.68.01-.276.25-.476.515-.485a.5.5 0 0 1 .485.514 20.97 20.97 0 0 1-.39 3.545.5.5 0 0 1-.49.4Z" fill="#2f1d4a" /> <Path d="M27.225 31.663a.501.501 0 0 1-.5-.48 29.9 29.9 0 0 0-.792-5.657.5.5 0 0 1 .093-.43l1-1.255a.5.5 0 0 1 .783.623l-.848 1.065c.415 1.777.685 3.76.764 5.613a.501.501 0 0 1-.48.52h-.02Z" fill="#2f1d4a" /> <Path d="M29.776 26.464a.499.499 0 0 1-.497-.45 29.174 29.174 0 0 0-.412-2.879l-1.135 1.425a.5.5 0 1 1-.781-.623l1.783-2.238a.497.497 0 0 1 .88.21l.039.162c.12.491.403 1.641.62 3.844a.5.5 0 0 1-.497.55Z" fill="#2f1d4a" /> <Path d="M36.379 42.563a.497.497 0 0 1-.252-.069 3641.69 3641.69 0 0 1-7.067-4.137.5.5 0 0 1-.235-.543c.82-3.566.969-7.556.446-11.858a.5.5 0 0 1 .436-.557.505.505 0 0 1 .557.436c.52 4.275.39 8.257-.384 11.844 2.243 1.316 4.598 2.695 6.75 3.952a.5.5 0 0 1-.251.931Z" fill="#2f1d4a" /> <Path d="M36.573 42.502a.5.5 0 0 1-.493-.586c.418-2.394.96-6.102 1.17-10.162a.481.481 0 0 1 .525-.474.5.5 0 0 1 .473.526c-.212 4.11-.76 7.86-1.183 10.282a.499.499 0 0 1-.492.415ZM41.832 32.64a.5.5 0 0 1-.496-.446l-2.342-21.77-2.787 3.517c.82 2.938 1.815 7.325 2.06 11.98.05.938.073 1.933.067 2.957a.5.5 0 1 1-1-.005 49.33 49.33 0 0 0-.065-2.898c-.249-4.695-1.276-9.122-2.094-12.009a.503.503 0 0 1 .09-.447l3.704-4.673a.5.5 0 0 1 .888.257l2.473 22.984a.5.5 0 0 1-.498.554ZM34.697 39.12a.499.499 0 0 1-.25-.069l-2.934-1.705a.5.5 0 0 1-.246-.488c.866-7.831.12-12.173.112-12.216a56.49 56.49 0 0 0-1.21-6.11l-2.57 3.129a.5.5 0 0 1-.774-.635l3.19-3.882a.5.5 0 0 1 .868.184 57.028 57.028 0 0 1 1.483 7.157c.03.159.76 4.373-.07 12.16l2.022 1.175c.416-2.71.659-5.289.722-7.678.008-.276.212-.47.514-.487a.5.5 0 0 1 .486.513c-.07 2.645-.356 5.516-.85 8.532a.5.5 0 0 1-.493.42ZM22.515 27.524a.501.501 0 0 1-.019-1l2.16-.08a.489.489 0 0 1 .518.481.5.5 0 0 1-.481.518l-2.16.08-.018.001Z" fill="#2f1d4a" /> <Path d="M30.401 17.962a.5.5 0 0 1-.002-1l3.72-.021h.003a.5.5 0 0 1 .003 1l-3.72.02H30.4ZM45.685 45.307a.5.5 0 0 1-.495-.441l-.466-3.92a.5.5 0 0 1 .437-.556.512.512 0 0 1 .555.437l.466 3.92a.5.5 0 0 1-.497.56ZM45.036 39.855a.5.5 0 0 1-.495-.441l-.312-2.63a.5.5 0 0 1 .437-.556.509.509 0 0 1 .555.438l.312 2.63a.5.5 0 0 1-.497.559ZM43.026 43.707a.5.5 0 0 1-.497-.447L41.33 32.09a.5.5 0 1 1 .994-.107l1.2 11.17a.5.5 0 0 1-.498.553Z" fill="#2f1d4a" /> <Path d="M43.053 43.977a.495.495 0 0 1-.251-.068L40.81 42.75a.5.5 0 1 1 .502-.864l1.138.66-.086-.795a.5.5 0 1 1 .995-.107l.191 1.778a.5.5 0 0 1-.497.553Z" fill="#2f1d4a" /> <Path d="M45.57 47.353a4.301 4.301 0 0 1-1.361-.229c-.105-.036-.299-.102-5.37-3.05a.498.498 0 0 1-.234-.551l.173-.705a.5.5 0 1 1 .97.24l-.083.34c4.09 2.376 4.778 2.74 4.883 2.786.44.147 1.145.28 1.885.029.486-.164 6.36-2.603 11.09-4.59a.5.5 0 1 1 .387.922c-4.193 1.762-10.58 4.42-11.156 4.615-.412.14-.814.193-1.185.193ZM60.523 41.398a.5.5 0 0 1-.196-.96c.896-.38 1.54-.657 1.777-.766.455-.208.717-.424.782-.643.069-.236-.056-.598-.382-1.105-.234-.362-2.27-3.571-4.963-7.811a.5.5 0 1 1 .844-.536 5654.82 5654.82 0 0 0 4.96 7.806c.34.53.705 1.228.5 1.928-.152.516-.584.931-1.324 1.27-.243.11-.894.392-1.803.777a.493.493 0 0 1-.195.04ZM56.81 28.529a.499.499 0 0 1-.421-.232l-3.552-5.593c-4.795-7.554-9.685-15.256-10.248-16.13-.29-.452-.734-.996-1.2-1.02-.422-.016-.903.427-1.21.81-.26.323-1.682 2.05-3.662 4.454l-2.74 3.328c.886 3.057 1.961 7.643 2.223 12.582.013.247.024.494.033.741a.5.5 0 0 1-.482.518c-.269.023-.508-.206-.518-.482a45.989 45.989 0 0 0-.03-.725c-.266-4.98-1.376-9.604-2.26-12.607a.5.5 0 0 1 .094-.459l2.907-3.531c1.977-2.4 3.396-4.124 3.656-4.447.662-.82 1.335-1.225 2.043-1.181.712.038 1.381.535 1.988 1.478.562.874 5.454 8.578 10.25 16.135l3.552 5.593a.5.5 0 0 1-.422.768Z" fill="#2f1d4a" /> <Path d="m49.352 38.88 1.713 3.286 5.625-1.875-.77-3.061s9.098-2.985 9.902-3.412c.804-.426 1.062-.953-.431-1.714-.858-.447-6.243-3.035-10.539-5.104-.983-.475-1.91-.917-2.707-1.308l-2.783-1.325c-.431.357-1.094.547-2.062.46l7.57 4.548 5.505 3.303.125.075-9.965 3.392-1.183 2.735Z" fill="#ffe4b7" /> <Path d="M51.063 42.754a.59.59 0 0 1-.525-.318l-1.709-3.278a.587.587 0 0 1-.018-.508l1.183-2.742a.588.588 0 0 1 .353-.326l11.126-3.783a.59.59 0 1 1 .38 1.12l-10.876 3.699-.968 2.243 1.345 2.58 4.633-1.539-.635-2.525a.593.593 0 0 1 .39-.707c3.498-1.147 9.254-3.078 9.806-3.373.155-.083.243-.147.29-.19-.074-.083-.263-.245-.713-.477-1.168-.603-10.428-5.051-13.237-6.4a.591.591 0 0 1 .511-1.067c2.815 1.35 12.087 5.805 13.269 6.415.646.335 1.39.81 1.395 1.536.004.712-.72 1.099-.957 1.226-.737.395-7.401 2.601-9.471 3.283l.634 2.524a.592.592 0 0 1-.387.706l-5.633 1.87a.587.587 0 0 1-.187.03Zm14.825-9.582h.01-.01Z" fill="#2f1d4a" /> <Path d="M60.376 33.273a.59.59 0 0 1-.304-.084L46.99 25.338a.592.592 0 1 1 .61-1.015l13.082 7.851a.592.592 0 0 1-.306 1.1Z" fill="#2f1d4a" /> <Path d="m29.86 16.752-13.433-4.747 11.285-4.042 1.981 1.87 6.539 2.786.679-1.26 3.668.932-.494-3.617-10.854-4.901-18.35 7.914c-1.087.546-.724 2.182.492 2.217l17.159 4.538 1.33-1.69Z" fill="#ffe4b7" /> <Path d="M29.272 10.139c.14.076.313.085.466.008l2.887-1.453 1.798.674.277 1.61a.497.497 0 0 0 .365.398l1.523.404a.501.501 0 0 0 .256-.967l-1.213-.32-.272-1.578a.51.51 0 0 0-.317-.384l-2.27-.85a.5.5 0 0 0-.401.022l-3.082 1.552a.498.498 0 0 0-.017.883ZM37.648 12.045a.5.5 0 0 0 .739-.493l-.45-4.066a.502.502 0 0 0-.995.11l.45 4.066c.02.168.12.308.256.383Z" fill="#2f1d4a" /> <Path d="m21.915 16.625 6.445 1.983 1.38-1.716c-.983-.475-6.535-2.542-6.535-2.542-.263.388-1.074 1.824-1.29 2.275Z" fill="#f6b969" /> <Path d="M10.383 13.887c.223.123.478.196.75.207l15.396 4.575a.5.5 0 0 0 .07-.998l-15.41-4.576a.653.653 0 0 1-.646-.532.65.65 0 0 1 .361-.742l18.215-7.64 10.335 4.794.332 2.617-2.942-.78a.5.5 0 0 0-.566.243l-.47.854-6.094-2.667L27.79 7.36a.497.497 0 0 0-.426-.026L16.042 11.28a.5.5 0 0 0 .131.961l13.42 4.881a.499.499 0 1 0 .107-.994l-11.412-4.666 9.227-3.112 1.757 1.788 6.553 2.87a.5.5 0 0 0 .638-.217l.502-.912 3.282.869a.501.501 0 0 0 .624-.547l-.46-3.622a.475.475 0 0 0-.278-.386L29.335 3.176a.498.498 0 0 0-.438 0l-18.432 7.747a1.649 1.649 0 0 0-.9 1.847c.104.493.406.89.817 1.117Z" fill="#2f1d4a" /> <Path d="m60.066 176.074 2.545-1.115c.54-.236.816-.84.64-1.403l-6.412-20.637c-.326-1.046-1.787-1.096-2.184-.076L43.67 181.1c-.373.96.6 1.892 1.543 1.479l6.658-2.916" fill="#b19cd1" /> <Path d="m52.541 179.37 6.733-2.949" fill="#b19cd1" /> <Ellipse cx={55.576} cy={195.405} fill="#b19cd1" rx={1.767} ry={5.466} transform="rotate(-72.215 55.576 195.405)" /> <Ellipse cx={66.457} cy={190.117} fill="#b19cd1" rx={1.767} ry={5.466} transform="rotate(-72.215 66.457 190.117)" /> <Path d="m60.88 157.26 16.163 8.047-.196 2.591.854-.166.735-1.67 2.256.392.949-1.557-1.478-.85 1.611-.606-.196-.766-3.645.982-18.109-7.446 1.057 1.05z" fill="#ece8f0" /> <Path d="M77.035 167.949a.499.499 0 0 1-.499-.537l.171-2.256-15.861-7.898a.484.484 0 0 1-.13-.093l-1.057-1.048a.5.5 0 0 1 .543-.818l17.952 7.382 3.482-.937a.5.5 0 0 1 .614.358l.196.766a.5.5 0 0 1-.308.591l-.62.234.56.32a.499.499 0 0 1 .177.694l-.95 1.557a.485.485 0 0 1-.512.233l-1.869-.325-.577 1.31a.5.5 0 0 1-.362.29l-.854.167a.45.45 0 0 1-.096.01Zm-10.378-8.913 10.796 5.375a.5.5 0 0 1 .277.484l-.138 1.82.574-1.303a.49.49 0 0 1 .544-.291l1.919.333.505-.83-1.032-.592a.5.5 0 0 1-.066-.822l-1.786.48a.5.5 0 0 1-.32-.02l-11.273-4.634Z" fill="#2f1d4a" /> <Path d="M51.563 161.724 40.27 177.258l1.457 2.349-.887.262-1.514-1.214-1.936 1.478-1.66-1.003.976-1.527-1.817.22-.191-.82 3.921-.864 13.427-15.924-.482 1.509zM69.76 190.448c.295-.82-2.389-2.234-2.389-2.234s3.95-6.424 4.368-7.042c.412-.621.235-1.133-.09-1.48-.168-.173-7.384-8.018-7.384-8.018l-.4.805 6.162 8.095-6.396 8.758s1.15.875 2.325 1.299c1.242.448 3.64.25 3.803-.183ZM59.462 195.904c.353-.978-2.85-2.666-2.85-2.666s4.713-7.666 5.212-8.404c.493-.74.281-1.352-.108-1.767-.2-.205-2.06-2.266-3.866-4.263-1.772-1.973-3.498-3.877-3.498-3.877l-.478.96 3.138 4.373 2.77 3.862-6.283 9.91s.022 1.585 1.424 2.09c1.483.536 4.345.299 4.54-.217Z" fill="#ece8f0" /> <Path d="M68.215 191.335c-.766 0-1.575-.128-2.098-.316-1.195-.431-2.66-1.214-2.722-1.247a.502.502 0 0 1-.167-.735l6.174-8.456-5.934-7.8a.5.5 0 0 1-.051-.524l.4-.805a.5.5 0 0 1 .816-.117c2.481 2.698 7.215 7.843 7.374 8.007.57.609.622 1.394.147 2.107-.344.51-3.18 5.112-4.082 6.58 1.117.643 2.493 1.655 2.157 2.589l-.002.006c-.194.517-1.07.712-2.012.712Zm1.544-.887h.01-.01Zm-5.38-1.293c.526.263 1.367.667 2.078.923.974.352 2.325.28 2.784.137-.206-.353-1.13-1.047-2.103-1.56a.502.502 0 0 1-.193-.703c.162-.263 3.96-6.44 4.38-7.06.218-.329.206-.595-.042-.86-.12-.123-3.851-4.177-5.988-6.5l5.129 6.74a.498.498 0 0 1 .006.598l-6.051 8.285ZM57.918 196.803c-.912 0-1.93-.176-2.605-.42-1.457-.526-3.016-1.7-3.081-1.75a.5.5 0 0 1-.105-.69l7.04-9.821-5.7-7.942a.503.503 0 0 1-.041-.514l.477-.962a.502.502 0 0 1 .819-.114s1.727 1.907 3.5 3.88l.508.56c1.558 1.725 3.17 3.51 3.345 3.69.656.697.713 1.567.166 2.39-.42.622-3.913 6.294-4.927 7.943 1.187.678 3.013 1.927 2.619 3.022l-.003.007c-.198.523-1.046.721-2.012.721Zm1.544-.898h.01-.01Zm-6.23-1.786c.533.367 1.518.998 2.42 1.323 1.218.442 2.873.423 3.327.236-.128-.397-1.327-1.326-2.6-1.997a.502.502 0 0 1-.192-.704c.192-.313 4.724-7.684 5.223-8.423.286-.431.269-.796-.057-1.144-.182-.187-1.658-1.82-3.366-3.71l-.507-.562c-1.195-1.329-2.369-2.627-3.006-3.333l-.018.036 5.731 7.99a.499.499 0 0 1 0 .582l-6.956 9.706Z" fill="#2f1d4a" /> <Path d="m57.7 145.842 11.835 21.873c.181.334-.038.9-.4 1.038l-22.158 8.39c-.553.21-.996-.228-.802-.799l10.324-30.351c.213-.624.9-.707 1.2-.15Z" fill="#fff" /> <Path d="m58.802 146.73 11.836 21.872c.181.334-.038.9-.4 1.038l-22.158 8.39c-.553.21-.996-.228-.802-.799l10.324-30.35c.213-.625.9-.708 1.2-.152Z" fill="#ebb432" /> <Path d="M46.32 178.124a.94.94 0 0 1-.66-.26c-.268-.26-.352-.661-.22-1.049l10.609-31.256c.141-.42.478-.7.879-.736.385-.038.755.175.957.545l12.374 22.566c.135.244.148.557.037.856a1.065 1.065 0 0 1-.606.645l-22.981 8.616c-.13.05-.262.073-.39.073Zm10.688-32.361c-.006.001-.04.023-.067.099l-10.609 31.257 23.026-8.567c.034-.021.079-.131.069-.178L57.059 145.82c-.025-.044-.046-.057-.051-.058Z" fill="#2f1d4a" /> <Path d="m59.054 163.852-.61-9.105-1.94.436 1.38 8.965 1.17-.296z" fill="#2f1d4a" /> <Ellipse cx={59.172} cy={167.608} fill="#2f1d4a" rx={1.022} ry={1.387} transform="rotate(-3.371 59.174 167.61)" /> <Path d="M36.991 180.333a.53.53 0 0 1-.275-.077l-1.661-1.003a.531.531 0 0 1-.173-.742l.37-.577-.7.085a.53.53 0 0 1-.581-.408l-.19-.82a.533.533 0 0 1 .404-.64l3.745-.824 13.31-15.786a.53.53 0 0 1 .913.505l-.481 1.508a.547.547 0 0 1-.076.15L40.51 176.95l1.27 2.045a.535.535 0 0 1-.301.79l-.888.263a.535.535 0 0 1-.485-.095L38.92 179l-1.605 1.224a.535.535 0 0 1-.323.11Zm-.919-1.708.884.534 1.649-1.258a.532.532 0 0 1 .655.008l1.184.949-1.026-1.652a.531.531 0 0 1 .022-.592l7.544-10.375-8.358 9.91a.53.53 0 0 1-.292.178l-1.92.422a.535.535 0 0 1 .342.81l-.684 1.066Zm15.093-17.233h.01-.01Z" fill="#2f1d4a" /> <Path d="m219.126 173.572 7.678 37.023 10.758-2.263a.92.92 0 0 0 .682-1.008l-4.486-36.339a.917.917 0 0 0-1.12-.786l-13.512 3.373Z" fill="#fff" /> <Ellipse cx={171.171} cy={187.529} fill="#b19cd1" rx={2.689} ry={5.892} /> <Ellipse cx={174.374} cy={211.567} fill="#b19cd1" rx={2.689} ry={5.892} /> <Path d="m219.739 174.09-40.07-14.248-.475 1.884 5.611 2.48-1.536 5.665 5.066-.227 1.228-2.404 27.31 8.257" fill="#ece8f0" /> <Path d="M216.767 175.755a.504.504 0 0 1-.14-.02L189.86 167.9l-1.04 2.035a.499.499 0 0 1-.422.272l-5.066.227c-.157.023-.312-.061-.413-.186a.5.5 0 0 1-.092-.444l1.424-5.25-5.219-2.307a.5.5 0 0 1-.282-.58l.475-1.883a.499.499 0 0 1 .654-.348l40.223 14.577a.499.499 0 1 1-.34.94l-39.703-14.39-.236.94 5.225 2.31a.5.5 0 0 1 .28.588l-1.356 5.004 4.09-.184 1.097-2.144a.5.5 0 0 1 .585-.252l27.163 7.95a.499.499 0 0 1-.141.98Z" fill="#2f1d4a" /> <Path d="M187.509 168.498h-.015l-1.607-.048a.5.5 0 0 1-.472-.617l.61-2.518a.501.501 0 0 1 .351-.364l2.463-.689a.5.5 0 0 1 .27.963l-2.181.61-.396 1.633.678.02.477-.913a.503.503 0 0 1 .603-.243l1.475.498a.5.5 0 1 1-.32.948l-1.07-.362-.423.813a.5.5 0 0 1-.443.269Z" fill="#2f1d4a" /> <Path d="m205.687 188.802-31.12-1.492s-1.392-3.51-3.166-4.187c-.513-.195-1.158.439-1.158.439l.936 8.214 35.157-1.568M206.654 198.135l-33.213 9.45.3 8.646.855.122s2.824-.89 2.692-5.72c4.575-2.006 29.817-10.883 29.817-10.883M223.417 210.942l27.706 14.18 2.004 2.685.954-.487-1.365-2.94 4.892 1.837.327-1.078-4.36-2.413 4.493-.72-.212-1.172-5.854.015 1.354-3.42-1.091-.605-2.714 3.972-24.725-11.08-1.41 1.226z" fill="#ece8f0" /> <Path d="M253.127 228.307a.497.497 0 0 1-.4-.201l-1.935-2.59-27.602-14.128a.5.5 0 1 1 .455-.89l27.706 14.18a.501.501 0 0 1 .173.146l1.752 2.346.15-.077-1.163-2.503a.498.498 0 0 1 .629-.678l4.393 1.65.055-.182-4.006-2.216a.5.5 0 0 1 .163-.932l3.989-.639-.047-.257-5.436.013a.5.5 0 0 1-.466-.683l1.192-3.013-.308-.17-2.457 3.595c-.137.2-.4.274-.617.174l-24.725-11.08c-.252-.112-.365-.408-.252-.66.113-.252.41-.365.66-.252l24.344 10.908 2.478-3.627a.502.502 0 0 1 .655-.155l1.091.605a.5.5 0 0 1 .223.62l-1.082 2.736 5.117-.013a.5.5 0 0 1 .493.412l.212 1.171a.504.504 0 0 1-.413.583l-3.062.49 3.092 1.712a.5.5 0 0 1 .237.583l-.329 1.078a.499.499 0 0 1-.654.322l-3.748-1.408.85 1.832a.5.5 0 0 1-.225.656l-.954.487a.498.498 0 0 1-.227.055Z" fill="#2f1d4a" /> <Path d="m232.831 171.103 4.139 36.171-28.395 6.976-2.77-36.032 27.026-7.115z" fill="#fff" /> <Path d="M208.574 214.75a.497.497 0 0 1-.498-.462l-2.768-36.032a.5.5 0 0 1 .37-.521l27.026-7.115a.5.5 0 0 1 .624.427l4.139 36.17a.5.5 0 0 1-.378.542l-28.396 6.976a.49.49 0 0 1-.119.015Zm-2.238-36.155 2.691 35.029 27.396-6.731-4.023-35.16-26.064 6.862Z" fill="#2f1d4a" /> <Path d="M217.7 179.193a.398.398 0 0 1 .108-.104l6.123-2.904a.488.488 0 0 1 .665.232.498.498 0 0 1-.231.665l-6.103 2.925a.498.498 0 0 1-.665-.231.508.508 0 0 1 .103-.583ZM218.043 182.345a.488.488 0 0 1 .263-.129l6.618-1.154a.498.498 0 0 1 .575.406l.002.007a.488.488 0 0 1-.406.57l-6.625 1.147a.498.498 0 0 1-.427-.847ZM215.236 183.872c-.369 0-.75-.149-1.104-.44-.582-.478-1.065-1.345-.86-2.076.126-.453.5-.758 1.027-.834.981-.145 1.96.708 2.228 1.56.22.692-.043 1.323-.682 1.644a1.34 1.34 0 0 1-.609.145Zm-.725-2.365a.39.39 0 0 0-.069.005c-.183.027-.2.087-.208.112-.062.225.157.727.533 1.037.138.113.405.285.629.172.17-.085.26-.19.177-.452-.14-.444-.675-.874-1.062-.874ZM226.287 172.544l4.01 36.16 6.506-1.552-4.035-35.927-6.48 1.319zM171.179 192.276a.5.5 0 0 1-.497-.444l-.936-8.213a.5.5 0 0 1 .147-.413c.09-.088.897-.855 1.686-.55 1.666.635 2.923 3.236 3.328 4.169l30.805 1.477a.499.499 0 0 1 .475.524c-.013.275-.21.512-.524.474l-31.12-1.492a.498.498 0 0 1-.44-.315c-.366-.92-1.596-3.414-2.88-3.904-.075-.032-.272.056-.452.184l.852 7.482 34.69-1.546h.023a.499.499 0 0 1 .023.998l-35.158 1.568a.176.176 0 0 1-.022 0ZM174.596 216.853a.589.589 0 0 1-.072-.005l-.855-.123a.502.502 0 0 1-.429-.477l-.299-8.645a.499.499 0 0 1 .364-.498l33.212-9.451c.266-.08.54.078.617.344s-.078.542-.344.617l-32.835 9.345.27 7.835.312.045c.452-.2 2.359-1.276 2.251-5.192a.503.503 0 0 1 .299-.471c4.54-1.992 28.82-10.537 29.852-10.899a.5.5 0 1 1 .332.943c-.248.087-24.258 8.537-29.478 10.74-.001 4.851-2.92 5.829-3.047 5.869a.494.494 0 0 1-.15.023Z" fill="#2f1d4a" /> <Ellipse cx={230.41} cy={174.317} rx={1.504} ry={1.258} fill="#e0557a" transform="rotate(-7.162 230.411 174.317)" /> <Ellipse cx={230.909} cy={178.292} rx={1.504} ry={1.258} fill="#eab332" transform="rotate(-7.162 230.91 178.293)" /> <Ellipse cx={231.409} cy={182.267} rx={1.504} ry={1.258} fill="#f48352" transform="rotate(-7.162 231.41 182.268)" /> </Svg> ); export default SvgComponent; ```
/content/code_sandbox/samples/react-native/src/components/SvgGraphic.tsx
xml
2016-11-30T14:45:57
2024-08-16T13:21:38
sentry-react-native
getsentry/sentry-react-native
1,558
14,631
```xml import color from 'color'; import { MD3Colors, tokens } from './tokens'; import type { MD3Theme } from '../../../types'; import configureFonts from '../../fonts'; const { palette, opacity } = tokens.md.ref; export const MD3LightTheme: MD3Theme = { dark: false, roundness: 4, version: 3, isV3: true, colors: { primary: palette.primary40, primaryContainer: palette.primary90, secondary: palette.secondary40, secondaryContainer: palette.secondary90, tertiary: palette.tertiary40, tertiaryContainer: palette.tertiary90, surface: palette.neutral99, surfaceVariant: palette.neutralVariant90, surfaceDisabled: color(palette.neutral10) .alpha(opacity.level2) .rgb() .string(), background: palette.neutral99, error: palette.error40, errorContainer: palette.error90, onPrimary: palette.primary100, onPrimaryContainer: palette.primary10, onSecondary: palette.secondary100, onSecondaryContainer: palette.secondary10, onTertiary: palette.tertiary100, onTertiaryContainer: palette.tertiary10, onSurface: palette.neutral10, onSurfaceVariant: palette.neutralVariant30, onSurfaceDisabled: color(palette.neutral10) .alpha(opacity.level4) .rgb() .string(), onError: palette.error100, onErrorContainer: palette.error10, onBackground: palette.neutral10, outline: palette.neutralVariant50, outlineVariant: palette.neutralVariant80, inverseSurface: palette.neutral20, inverseOnSurface: palette.neutral95, inversePrimary: palette.primary80, shadow: palette.neutral0, scrim: palette.neutral0, backdrop: color(MD3Colors.neutralVariant20).alpha(0.4).rgb().string(), elevation: { level0: 'transparent', // Note: Color values with transparency cause RN to transfer shadows to children nodes // instead of View component in Surface. Providing solid background fixes the issue. // Opaque color values generated with `palette.primary99` used as background level1: 'rgb(247, 243, 249)', // palette.primary40, alpha 0.05 level2: 'rgb(243, 237, 246)', // palette.primary40, alpha 0.08 level3: 'rgb(238, 232, 244)', // palette.primary40, alpha 0.11 level4: 'rgb(236, 230, 243)', // palette.primary40, alpha 0.12 level5: 'rgb(233, 227, 241)', // palette.primary40, alpha 0.14 }, }, fonts: configureFonts(), animation: { scale: 1.0, }, }; ```
/content/code_sandbox/src/styles/themes/v3/LightTheme.tsx
xml
2016-10-19T05:56:53
2024-08-16T08:48:04
react-native-paper
callstack/react-native-paper
12,646
640
```xml import { ClassAttributes, ComponentProps, ComponentType } from 'react'; import { Pressable as NativePressable, StyleProp, ViewStyle, PressableStateCallbackType as NativePressableStateCallbackType } from 'react-native'; type NativePressableProps = ComponentProps<typeof NativePressable> & ClassAttributes<typeof NativePressable>; export type PressableStateCallbackType = NativePressableStateCallbackType & { readonly pressed: boolean; readonly hovered: boolean; /** @platform web */ readonly focused: boolean; }; export type WebPressableProps = { /** * Either children or a render prop that receives a boolean reflecting whether * the component is currently pressed. */ children?: React.ReactNode | ((state: PressableStateCallbackType) => React.ReactNode); /** * Either view styles or a function that receives a boolean reflecting whether * the component is currently pressed and returns view styles. */ style?: StyleProp<ViewStyle> | ((state: PressableStateCallbackType) => StyleProp<ViewStyle>); }; export type PressableProps = Omit<NativePressableProps, 'children' | 'style'> & WebPressableProps; export declare const Pressable: ComponentType<PressableProps>; export {}; //# sourceMappingURL=Pressable.d.ts.map ```
/content/code_sandbox/packages/expo-router/build/views/Pressable.d.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
271
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1</string> <key>LSRequiresIPhoneOS</key> <true/> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>arm64</string> </array> </dict> </plist> ```
/content/code_sandbox/Example tvOS/Info.plist
xml
2016-07-16T20:30:52
2024-08-11T11:30:01
FeedKit
nmdias/FeedKit
1,176
290
```xml <?xml version="1.0" encoding="utf-8"?> <!-- path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <LinearLayout xmlns:android="path_to_url" xmlns:tools="path_to_url" android:layout_width="match_parent" android:layout_height="match_parent" android:animateLayoutChanges="true" android:orientation="vertical"> <androidx.coordinatorlayout.widget.CoordinatorLayout android:id="@+id/cat_demo_fragment_container" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true"> <com.google.android.material.appbar.AppBarLayout android:id="@+id/cat_demo_fragment_appbar" android:layout_width="match_parent" android:layout_height="wrap_content" android:fitsSystemWindows="true"> <androidx.appcompat.widget.Toolbar android:id="@+id/toolbar" style="?attr/catalogToolbarWithCloseButtonStyle" android:layout_width="match_parent" android:layout_height="wrap_content"/> </com.google.android.material.appbar.AppBarLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout> </LinearLayout> ```
/content/code_sandbox/catalog/java/io/material/catalog/feature/res/layout/cat_demo_fragment.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
279
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url"> <plist version="1.0"> <dict> <key>BuildMachineOSBuild</key> <string>16F73</string> <key>CFBundleExecutable</key> <string>VoodooPS2Keyboard</string> <key>CFBundleGetInfoString</key> <key>CFBundleIdentifier</key> <string>org.rehabman.voodoo.driver.PS2Keyboard</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>Voodoo PS/2 Keyboard</string> <key>CFBundlePackageType</key> <string>KEXT</string> <key>CFBundleShortVersionString</key> <string>1.8.26</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleSupportedPlatforms</key> <array> <string>MacOSX</string> </array> <key>CFBundleVersion</key> <string>1.8.26</string> <key>DTCompiler</key> <string>com.apple.compilers.llvm.clang.1_0</string> <key>DTPlatformBuild</key> <string>8E2002</string> <key>DTPlatformVersion</key> <string>GM</string> <key>DTSDKBuild</key> <string>12D75</string> <key>DTSDKName</key> <string>macosx10.8</string> <key>DTXcode</key> <string>0832</string> <key>DTXcodeBuild</key> <string>8E2002</string> <key>IOKitPersonalities</key> <dict> <key>ApplePS2Keyboard</key> <dict> <key>CFBundleIdentifier</key> <string>org.rehabman.voodoo.driver.PS2Keyboard</string> <key>IOClass</key> <string>ApplePS2Keyboard</string> <key>IOProviderClass</key> <string>ApplePS2KeyboardDevice</string> <key>Platform Profile</key> <dict> <key>DELL</key> <dict> <key>Dell-Keys</key> <dict> <key>Breakless PS2</key> <array> <string>e005</string> <string>e006</string> </array> <key>Function Keys Special</key> <array> <string>;The following 12 items map Fn+fkeys to fkeys</string> <string>e020=3b</string> <string>e02e=3c</string> <string>e030=3d</string> <string>e022=3e</string> <string>;Fn+f5 macro</string> <string>;Fn+f6 macro</string> <string>;Fn+f7 macro</string> <string>;Fn+f8 macro</string> <string>;Fn+f9 macro</string> <string>;Fn+f10 no code</string> <string>e005=57</string> <string>e006=58</string> <string>;The following 12 items map fkeys to Fn+fkeys</string> <string>3b=e020</string> <string>3c=e02e</string> <string>3d=e030</string> <string>3e=e022</string> <string>;Fn+f5 macro</string> <string>;Fn+f6 macro</string> <string>;Fn+f7 macro</string> <string>;Fn+f8 macro</string> <string>;Fn+f9 macro</string> <string>;Fn+f10 no code</string> <string>57=e005</string> <string>58=e006</string> </array> <key>Function Keys Standard</key> <array> <string>;The following 12 items map Fn+fkeys to Fn+fkeys</string> <string>e020=e020</string> <string>e02e=e02e</string> <string>e030=e030</string> <string>e022=e022</string> <string>;Fn+f5 macro</string> <string>;Fn+f6 macro</string> <string>;Fn+f7 macro</string> <string>;Fn+f8 macro</string> <string>;Fn+f9 macro</string> <string>;Fn+f10 no code</string> <string>e005=e005</string> <string>e006=e006</string> <string>;The following 12 items map fkeys to fkeys</string> <string>3b=3b</string> <string>3c=3c</string> <string>3d=3d</string> <string>3e=3e</string> <string>3f=3f</string> <string>40=40</string> <string>41=41</string> <string>42=42</string> <string>43=43</string> <string>44=44</string> <string>57=57</string> <string>58=58</string> </array> </dict> <key>HSW-LPT</key> <string>Dell-Keys</string> <key>SNB-CPT</key> <dict> <key>ActionSwipeDown</key> <string>63 d, 63 u</string> <key>ActionSwipeUp</key> <string>61 d, 61 u</string> <key>Breakless PS2</key> <array> <string>e01e;Touchpad Fn+f3 is breakless</string> <string>e06e;REVIEW: temporary for case that macro inversion does not work...</string> </array> <key>Custom ADB Map</key> <array> <string>e009=83;Dell Support to Launchpad</string> <string>e0f1=71;Call brightens up w RKA1 for special mode (was =90)</string> <string>e0f2=6b;Call brightens down w RKA2 for special mode (was =91)</string> <string>e06e=70;Map vidmirror key for special mode default is adb90</string> </array> <key>Custom PS2 Map</key> <array> <string>e01e=e037;Map tp disable to Fn+f3</string> <string>e037=e01e;Prevent PrntScr from triggering tp disable</string> </array> <key>Function Keys Special</key> <array> <string>;The following 12 items map Fn+fkeys to fkeys</string> <string>e06e=3b</string> <string>e008=3c</string> <string>e01e=3d</string> <string>e005=3e</string> <string>e006=3f</string> <string>e00c=40</string> <string>;Fn+f7 no dedicated macro</string> <string>e010=42</string> <string>e022=43</string> <string>e019=44</string> <string>e02e=57</string> <string>e030=58</string> <string>;The following 12 items map fkeys to Fn+fkeys</string> <string>3b=e06e;Map vidmirror key to f1</string> <string>3c=e0f0;Map radio toggle action from EC query to f2</string> <string>3d=e037;Map touchpad toggle button to f3</string> <string>3e=e0f2;Map acpi RKA2 to f4 brightness down</string> <string>3f=e0f1;Map acpi RKA1 to f5 brightness up</string> <string>40=e0f3;Map acpi RKA3 to f6 keyboard backlight</string> <string>;Fn+f7 no macro</string> <string>42=e010</string> <string>43=e022</string> <string>44=e019</string> <string>57=e02e</string> <string>58=e030</string> </array> <key>Function Keys Standard</key> <array> <string>;The following 12 items map Fn+fkeys to Fn+fkeys</string> <string>e06e=e06e;Fn+f1 macro translated</string> <string>e008=e008;Fn+f2 regular scancode and EC query call q8c</string> <string>e01e=e037;Fn+f3 regular scancode and EC controls LED</string> <string>e005=e005;Fn+f4 no ps2scancode and EC query call q81</string> <string>e006=e006;Fn+f5 no ps2scancode and EC query call q80</string> <string>e00c=e00c;Fn+f6 no ps2scancode and EC query call q8a</string> <string>;Fn+f7 no macro just regular f key</string> <string>e010=e010; Fn+f8 regular scancode</string> <string>e022=e022; Fn+f9 regular scancode</string> <string>e019=e019;Fn+f10 regular scancode</string> <string>e02e=e02e;Fn+f11 regular scancode</string> <string>e030=e030;Fn+f12 regular scancode</string> <string>;Fn+f13 is mute dedicated button that always produces e020 regardless of Fn</string> <string>;The following 12 items map fkeys to fkeys</string> <string>3b=3b</string> <string>3c=3c</string> <string>3d=3d</string> <string>3e=3e</string> <string>3f=3f</string> <string>40=40</string> <string>41=41</string> <string>42=42</string> <string>43=43</string> <string>44=44</string> <string>57=57</string> <string>58=58</string> </array> <key>Macro Inversion</key> <array> <string>;This section maps ps2 codes (packet format) received quickly (macros) into fake ps2 codes (packet format)</string> <string>;Fn+F1</string> <data> //8CbgAAAAACWwEZ </data> <data> //8C7gAAAAAC2wGZ </data> <data> //8C7gAAAAABmQLb </data> </array> <key>MaximumMacroTime</key> <integer>35000000</integer> <key>Note-Author</key> <string>TimeWalker aka TimeWalker75a</string> <key>Note-Comment</key> <string>Keyboard Profile for DELL SandyBridge SecureCore Tiano based laptops (Vostro 3450 &amp; 3750, Inspiron N4110, XPS L502x &amp; L702x &amp; L511z)</string> </dict> <key>WN09</key> <dict> <key>Breakless PS2</key> <array> <string>e01b</string> <string>e008</string> <string>e01e</string> <string>e005</string> <string>e06e</string> <string>e006</string> </array> <key>Custom ADB Map</key> <array> <string>e01b=70</string> <string>e06e=83</string> </array> <key>Custom PS2 Map</key> <array> <string>56=2b</string> <string>29=56</string> <string>2b=29</string> <string>e01e=e037</string> <string>e037=e01e</string> </array> </dict> <key>WN09a</key> <dict> <key>Breakless PS2</key> <array> <string>e01b</string> <string>e008</string> <string>e01e</string> <string>e005</string> <string>e06e</string> <string>e006</string> </array> <key>Custom ADB Map</key> <array> <string>e01b=70</string> <string>e06e=83</string> </array> <key>Custom PS2 Map</key> <array> <string>e01e=e037</string> <string>e037=e01e</string> </array> </dict> </dict> <key>Default</key> <dict> <key>ActionSwipeDown</key> <string>3b d, 37 d, 7d d, 7d u, 37 u, 3b u</string> <key>ActionSwipeLeft</key> <string>3b d, 37 d, 7b d, 7b u, 37 u, 3b u</string> <key>ActionSwipeRight</key> <string>3b d, 37 d, 7c d, 7c u, 37 u, 3b u</string> <key>ActionSwipeUp</key> <string>3b d, 37 d, 7e d, 7e u, 37 u, 3b u</string> <key>Breakless PS2</key> <array> <string>;Items must be strings in the form of breaklessscan (in hex)</string> </array> <key>Custom ADB Map</key> <array> <string>;Items must be strings in the form of scanfrom=adbto (in hex)</string> </array> <key>Custom PS2 Map</key> <array> <string>;Items must be strings in the form of scanfrom=scanto (in hex)</string> <string>e027=0;disable discrete fnkeys toggle</string> <string>e028=0;disable discrete trackpad toggle</string> </array> <key>HIDF12EjectDelay</key> <integer>250</integer> <key>LogScanCodes</key> <integer>0</integer> <key>Make Application key into Apple Fn key</key> <false/> <key>Make Application key into right windows</key> <true/> <key>Make right modifier keys into Hangul and Hanja</key> <false/> <key>SleepPressTime</key> <integer>0</integer> <key>Swap capslock and left control</key> <false/> <key>Swap command and option</key> <true/> <key>Use ISO layout keyboard</key> <false/> <key>alt_handler_id</key> <integer>3</integer> </dict> <key>HPQOEM</key> <dict> <key>1411</key> <string>ProBook-102;ProBook 4520s</string> <key>1619</key> <string>ProBook-87;ProBook 6560b</string> <key>161C</key> <string>ProBook-87;ProBook 8460p</string> <key>164F</key> <string>ProBook-87;ProBook 5330m</string> <key>167C</key> <string>ProBook-102;ProBook 4530s</string> <key>167E</key> <string>ProBook-102;ProBook 4330s</string> <key>1680</key> <string>ProBook-102;ProBook 4230s</string> <key>179B</key> <string>ProBook-87;ProBook 6470b</string> <key>179C</key> <string>ProBook-87;ProBook 6470b</string> <key>17A9</key> <string>ProBook-87;ProBook 8570b</string> <key>17F0</key> <string>ProBook-102;ProBook 4340s</string> <key>17F3</key> <string>ProBook-102;ProBook 4440s</string> <key>17F6</key> <string>ProBook-102;ProBook 4540s</string> <key>1942</key> <string>ProBook-87;ProBook 450s G1</string> <key>1949</key> <string>ProBook-87;ProBook 450s G1</string> <key>1962</key> <string>Haswell-Envy;HP Envy 15-j063cl</string> <key>1963</key> <string>Haswell-Envy;HP Envy 15-j063cl</string> <key>1965</key> <string>Haswell-Envy;HP Envy 17t-j100</string> <key>1966</key> <string>Haswell-Envy;HP Envy 17t-j000</string> <key>198F</key> <string>ProBook-87;ProBook 450s G0</string> <key>Haswell-Envy</key> <dict> <key>Custom ADB Map</key> <array> <string>e019=42;next</string> <string>e010=4d;previous</string> </array> <key>Custom PS2 Map</key> <array> <string>e045=e037</string> <string>e0ab=0;bogus Fn+F2/F3</string> </array> </dict> <key>ProBook-102</key> <dict> <key>Function Keys Special</key> <array> <string>;The following 12 items map Fn+fkeys to fkeys</string> <string>e05f=3b</string> <string>e012=3c</string> <string>e017=3d</string> <string>e06e=3e</string> <string>e00a=3f</string> <string>e009=40</string> <string>e020=41</string> <string>e02e=42</string> <string>e030=43</string> <string>e010=44</string> <string>e022=57</string> <string>e019=58</string> <string>;The following 12 items map fkeys to Fn+fkeys</string> <string>3b=e05f</string> <string>3c=e012</string> <string>3d=e017</string> <string>3e=e06e</string> <string>3f=e00a</string> <string>40=e009</string> <string>41=e020</string> <string>42=e02e</string> <string>43=e030</string> <string>44=e010</string> <string>57=e022</string> <string>58=e019</string> </array> <key>Function Keys Standard</key> <array> <string>;The following 12 items map Fn+fkeys to Fn+fkeys</string> <string>e05f=e05f</string> <string>e012=e012</string> <string>e017=e017</string> <string>e06e=e06e</string> <string>e00a=e00a</string> <string>e009=e009</string> <string>e020=e020</string> <string>e02e=e02e</string> <string>e030=e030</string> <string>e010=e010</string> <string>e022=e022</string> <string>e019=e019</string> <string>;The following 12 items map fkeys to fkeys</string> <string>3b=3b</string> <string>3c=3c</string> <string>3d=3d</string> <string>3e=3e</string> <string>3f=3f</string> <string>40=40</string> <string>41=41</string> <string>42=42</string> <string>43=43</string> <string>44=44</string> <string>57=57</string> <string>58=58</string> </array> <key>SleepPressTime</key> <integer>3000</integer> </dict> <key>ProBook-87</key> <dict> <key>Custom ADB Map</key> <array> <string>46=4d;scroll =&gt; Previous-track</string> <string>e045=34;pause =&gt; Play-Pause</string> <string>e052=42;insert =&gt; Next-track</string> <string>e046=92;break =&gt; Eject</string> </array> <key>Function Keys Special</key> <array> <string>;The following 8 items map Fn+fkeys to fkeys</string> <string>e05f=3d</string> <string>e06e=3e</string> <string>e02e=40</string> <string>e030=41</string> <string>e009=42</string> <string>e012=43</string> <string>e017=44</string> <string>e033=57</string> <string>;The following 8 items map fkeys to Fn+fkeys</string> <string>3d=e05f</string> <string>3e=e06e</string> <string>40=e02e</string> <string>41=e030</string> <string>42=e037</string> <string>43=e012</string> <string>44=e017</string> </array> <key>Function Keys Standard</key> <array> <string>;The following 8 items map Fn+fkeys to Fn+fkeys</string> <string>e05f=e05f</string> <string>e06e=e06e</string> <string>e02e=e02e</string> <string>e030=e030</string> <string>e009=e009</string> <string>e012=e012</string> <string>e017=e017</string> <string>e033=e033</string> <string>;The following 8 items map fkeys to fkeys</string> <string>3d=3d</string> <string>3e=3e</string> <string>40=40</string> <string>41=41</string> <string>42=42</string> <string>43=43</string> <string>44=44</string> </array> <key>SleepPressTime</key> <integer>3000</integer> </dict> </dict> <key>Intel</key> <dict> <key>CALPELLA</key> <string>SamsungKeys</string> <key>SamsungKeys</key> <dict> <key>Breakless PS2</key> <array> <string>e003</string> <string>e002</string> <string>e004</string> <string>e020</string> <string>;e031</string> <string>e033</string> <string>e006</string> <string>e077</string> <string>e079</string> <string>e008</string> <string>e009</string> </array> <key>Custom ADB Map</key> <array> <string>e002=70</string> <string>e006=80</string> <string>e008=71 (was =90)</string> <string>e009=6b (was =91)</string> </array> <key>Function Keys Special</key> <array> <string>;The following 12 items map Fn+fkeys to fkeys</string> <string>;fn+f1 no code</string> <string>e003=3c</string> <string>;fn+f3 weird code</string> <string>e002=3e</string> <string>e004=3f</string> <string>e020=40</string> <string>e031=41</string> <string>e033=42</string> <string>e006=43</string> <string>;fn+f10 weird code</string> <string>;fn+f11 no code</string> <string>;fn+f12 scrolllock</string> <string>;The following 12 items map fkeys to Fn+fkeys</string> <string>;fn+f1 no code</string> <string>3c=e003</string> <string>;fn+f3 weird code</string> <string>3e=e002</string> <string>3f=e004</string> <string>40=e020</string> <string>41=e031</string> <string>42=e033</string> <string>43=e006</string> <string>;fn+f10 weird code</string> <string>;fn+f11 no code</string> <string>;fn+f12 scrolllock</string> </array> <key>Function Keys Standard</key> <array> <string>;The following 12 items map Fn+fkeys to Fn+fkeys</string> <string>;fn+f1 no code</string> <string>e003=e003</string> <string>;fn+f3 weird code</string> <string>e002=e002</string> <string>e004=e004</string> <string>e020=e020</string> <string>e031=e031</string> <string>e033=e033</string> <string>e006=e006</string> <string>;fn+f10 weird code</string> <string>;fn+f11 no code</string> <string>;fn+f12 scrolllock</string> <string>;The following 12 items map fkeys to fkeys</string> <string>3b=3b</string> <string>3c=3c</string> <string>3d=3d</string> <string>3e=3e</string> <string>3f=3f</string> <string>40=40</string> <string>41=41</string> <string>42=42</string> <string>43=43</string> <string>44=44</string> <string>57=57</string> <string>58=58</string> </array> </dict> </dict> <key>SECCSD</key> <dict> <key>LH43STAR</key> <string>SamsungKeys</string> <key>SamsungKeys</key> <dict> <key>Breakless PS2</key> <array> <string>e020</string> <string>e02e</string> <string>e030</string> </array> </dict> </dict> </dict> </dict> </dict> <key>OSBundleLibraries</key> <dict> <key>com.apple.iokit.IOHIDSystem</key> <string>1.1</string> <key>com.apple.kpi.bsd</key> <string>8.0.0</string> <key>com.apple.kpi.iokit</key> <string>8.0.0</string> <key>com.apple.kpi.libkern</key> <string>8.0.0</string> <key>com.apple.kpi.mach</key> <string>8.0.0</string> <key>com.apple.kpi.unsupported</key> <string>8.0.0</string> <key>org.rehabman.voodoo.driver.PS2Controller</key> <string>1.8.26</string> </dict> <key>OSBundleRequired</key> <string>Console</string> <key>Source Code</key> <string>path_to_url </dict> </plist> ```
/content/code_sandbox/Clover-Configs/Lenovo/Y470/CLOVER/kexts/10.12/VoodooPS2Controller.kext/Contents/PlugIns/VoodooPS2Keyboard.kext/Contents/Info.plist
xml
2016-11-05T04:22:54
2024-08-12T19:25:53
Hackintosh-Installer-University
huangyz0918/Hackintosh-Installer-University
3,937
6,855
```xml import { PreferencesMenuItem } from './PreferencesMenuItem' export interface SelectableMenuItem extends PreferencesMenuItem { selected: boolean } ```
/content/code_sandbox/packages/web/src/javascripts/Components/Preferences/Controller/SelectableMenuItem.ts
xml
2016-12-05T23:31:33
2024-08-16T06:51:19
app
standardnotes/app
5,180
26
```xml <!-- drawable/weather-lightning.xml --> <vector xmlns:android="path_to_url" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#000" android:pathData="M6,16A5,5 0 0,1 1,11A5,5 0 0,1 6,6C7,3.65 9.3,2 12,2C15.43,2 18.24,4.66 18.5,8.03L19,8A4,4 0 0,1 23,12A4,4 0 0,1 19,16H18A1,1 0 0,1 17,15A1,1 0 0,1 18,14H19A2,2 0 0,0 21,12A2,2 0 0,0 19,10H17V9A5,5 0 0,0 12,4C9.5,4 7.45,5.82 7.06,8.19C6.73,8.07 6.37,8 6,8A3,3 0 0,0 3,11A3,3 0 0,0 6,14H7A1,1 0 0,1 8,15A1,1 0 0,1 7,16H6M12,11H15L13,15H15L11.25,22L12,17H9.5L12,11Z" /> </vector> ```
/content/code_sandbox/app/src/main/res/drawable/weather_thunder_mini_xml.xml
xml
2016-02-21T04:39:19
2024-08-16T13:35:51
GeometricWeather
WangDaYeeeeee/GeometricWeather
2,420
379
```xml import { performance } from "perf_hooks"; import { Event, EventEmitter } from "vscode"; import { CancellationToken, LanguageClient, LanguageClientOptions, ProtocolRequestType, ProtocolRequestType0, RequestType, RequestType0, ServerOptions } from "vscode-languageclient/node"; import { TraceEvent } from "./extension.api"; const requestStartEventEmitter = new EventEmitter<TraceEvent>(); const requestEndEventEmitter = new EventEmitter<TraceEvent>(); export const onWillRequestStart: Event<TraceEvent> = requestStartEventEmitter.event; export const onDidRequestEnd: Event<TraceEvent> = requestEndEventEmitter.event; export class TracingLanguageClient extends LanguageClient { private isStarted: boolean = false; private isSyntaxServer: boolean = false; constructor(id: string, name: string, serverOptions: ServerOptions, clientOptions: LanguageClientOptions, forceDebug?: boolean) { super(id, name, serverOptions, clientOptions, forceDebug); this.isSyntaxServer = name?.includes("Syntax Server"); } start(): Promise<void> { const isFirstTimeStart: boolean = !this.isStarted; this.isStarted = true; const startAt: number = performance.now(); if (isFirstTimeStart) { this.fireRequestStartTraceEvent("initialize"); } return super.start().then(value => { if (isFirstTimeStart) { this.fireSuccessTraceEvent("initialize", startAt, undefined); } return value; }, reason => { if (isFirstTimeStart) { this.fireFailureTraceEvent("initialize", startAt, reason); } throw reason; }); } stop(timeout?: number): Promise<void> { this.isStarted = false; return super.stop(timeout); } sendRequest<R, PR, E, RO>(type: ProtocolRequestType0<R, PR, E, RO>, token?: CancellationToken): Promise<R>; sendRequest<P, R, PR, E, RO>(type: ProtocolRequestType<P, R, PR, E, RO>, params: P, token?: CancellationToken): Promise<R>; sendRequest<R, E>(type: RequestType0<R, E>, token?: CancellationToken): Promise<R>; sendRequest<P, R, E>(type: RequestType<P, R, E>, params: P, token?: CancellationToken): Promise<R>; sendRequest<R>(method: string, token?: CancellationToken): Promise<R>; sendRequest<R>(method: string, param: any, token?: CancellationToken): Promise<R>; sendRequest(method: any, ...args) { const startAt: number = performance.now(); const requestType: string = this.getRequestType(method, ...args); let data: any = undefined; if (args?.[0]?.context?.triggerKind !== undefined) { data = { triggerKind: args[0].context.triggerKind, triggerCharacter: args[0].context.triggerCharacter, }; } this.fireRequestStartTraceEvent(requestType); return this.sendRequest0(method, ...args).then((value: any) => { if (data && value?.itemDefaults?.data?.completionKinds) { // Include the completionKinds from the completion response. data.completionKinds = value.itemDefaults.data.completionKinds; } this.fireSuccessTraceEvent(requestType, startAt, this.getResultLength(value), data); return value; }, reason => { this.fireFailureTraceEvent(requestType, startAt, reason, data); throw reason; }); } private sendRequest0(method: any, ...args) { if (!args || !args.length) { return super.sendRequest(method); } const first = args[0]; const last = args[args.length - 1]; if (CancellationToken.is(last)) { if (first === last) { return super.sendRequest(method, last); } else { return super.sendRequest(method, first, last); } } return super.sendRequest(method, first); } private getRequestType(method: any, ...args): string { let requestType: string; if (typeof method === 'string' || method instanceof String) { requestType = String(method); } else { requestType = method?.method; } if (requestType === "workspace/executeCommand") { if (args?.[0]?.command) { requestType = `workspace/executeCommand/${args[0].command}`; } } return requestType; } private fireRequestStartTraceEvent(type: string): void { requestStartEventEmitter.fire({ type, fromSyntaxServer: !!this.isSyntaxServer, }); } private fireSuccessTraceEvent(type: string, startAt: number, resultLength: number | undefined, data?: any): void { const duration: number = performance.now() - startAt; requestEndEventEmitter.fire({ type, duration, resultLength, data, fromSyntaxServer: !!this.isSyntaxServer, }); } private fireFailureTraceEvent(type: string, startAt: number, error: any, data?: any): void { const duration: number = performance.now() - startAt; requestEndEventEmitter.fire({ type, duration, error, data, fromSyntaxServer: !!this.isSyntaxServer, }); } private getResultLength(value: any): number | undefined { if (!value) { return 0; } return value?.length ?? value?.items?.length; } } ```
/content/code_sandbox/src/TracingLanguageClient.ts
xml
2016-08-12T15:02:43
2024-08-15T03:36:05
vscode-java
redhat-developer/vscode-java
2,064
1,203
```xml <Project Sdk="Microsoft.NET.Sdk"> <Import Project="..\..\..\..\configureawait.props" /> <Import Project="..\..\..\..\common.props" /> <PropertyGroup> <TargetFrameworks>netstandard2.0;netstandard2.1;net8.0</TargetFrameworks> <AssemblyName>Volo.Docs.Admin.HttpApi.Client</AssemblyName> <PackageId>Volo.Docs.Admin.HttpApi.Client</PackageId> <RootNamespace /> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\Volo.Docs.Admin.Application.Contracts\Volo.Docs.Admin.Application.Contracts.csproj" /> <ProjectReference Include="..\..\..\..\framework\src\Volo.Abp.Http.Client\Volo.Abp.Http.Client.csproj" /> </ItemGroup> </Project> ```
/content/code_sandbox/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj
xml
2016-12-03T22:56:24
2024-08-16T16:24:05
abp
abpframework/abp
12,657
175
```xml import { UIRenderHtmlCardProps } from '../../toolkit/toolkit-types'; const html = `<a href="path_to_url" style="text-align:center;"> A link to MDN! </a>`; const anchorsMinimalConfig: UIRenderHtmlCardProps = { title: 'Minimal Anchor Example', props: { source: { html } }, preferHtmlSrc: true }; export default anchorsMinimalConfig; ```
/content/code_sandbox/doc-tools/doc-pages/src/pages/cards/anchorsMinimalConfig.tsx
xml
2016-11-29T10:50:53
2024-08-08T06:53:22
react-native-render-html
meliorence/react-native-render-html
3,445
99
```xml import * as React from 'react'; import { List, ListItem } from '@fluentui/react-list-preview'; export const Default = () => ( <List> <ListItem>Asia</ListItem> <ListItem>Africa</ListItem> <ListItem>Europe</ListItem> <ListItem>North America</ListItem> <ListItem>South America</ListItem> <ListItem>Australia/Oceania</ListItem> <ListItem>Antarctica</ListItem> </List> ); ```
/content/code_sandbox/packages/react-components/react-list-preview/stories/src/List/ListDefault.stories.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
103
```xml export * from './ChatGpt'; ```
/content/code_sandbox/samples/react-chatgpt-app/src/components/ChatGpt/index.ts
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
9
```xml // Image const sizes = { '2xs': '6', 'xs': '10', 'sm': '16', 'md': '20', 'lg': '24', 'xl': '32', '2xl': '64', 'full': '100%', }; export const Image = { baseStyle: { maxWidth: '100%', }, sizes, defaultProps: {}, }; ```
/content/code_sandbox/src/theme/components/image.ts
xml
2016-04-15T11:37:23
2024-08-14T16:16:44
NativeBase
GeekyAnts/NativeBase
20,132
93
```xml import cn from "classnames"; import React, { FunctionComponent } from "react"; import { withStyles } from "coral-ui/hocs"; import styles from "./Table.css"; interface Props extends React.HTMLAttributes<HTMLTableElement> { className?: string; /** * Override or extend the styles applied to the component. */ classes: typeof styles; fullWidth?: boolean; } const Table: FunctionComponent<Props> = ({ classes, className, fullWidth, children, ...rest }) => { const rootClassName = cn(classes.root, className, { [classes.fullWidth]: fullWidth, }); return ( <table className={rootClassName} {...rest}> {children} </table> ); }; const enhanced = withStyles(styles)(Table); export default enhanced; ```
/content/code_sandbox/client/src/core/client/ui/components/v2/Table/Table.tsx
xml
2016-10-31T16:14:05
2024-08-06T16:15:57
talk
coralproject/talk
1,881
168
```xml import { useEffect, useState } from 'react'; import { ArrowSmallRightIcon } from '@heroicons/react/24/outline'; import type { QuestionsQuestionType } from '@prisma/client'; import type { TypeaheadOption } from '~/ui'; import { Button, Select } from '~/ui'; import Container from '~/components/shared/Container'; import { companyOptionToSlug } from '~/utils/questions/companySlug'; import { QUESTION_TYPES } from '~/utils/questions/constants'; import { locationOptionToSlug } from '~/utils/questions/locationSlug'; import useDefaultCompany from '~/utils/questions/useDefaultCompany'; import useDefaultLocation from '~/utils/questions/useDefaultLocation'; import type { FilterChoice } from './filter/FilterSection'; import CompanyTypeahead from './typeahead/CompanyTypeahead'; import LocationTypeahead from './typeahead/LocationTypeahead'; import type { Location } from '~/types/questions'; export type LandingQueryData = { companySlug: string; location: string; questionType: QuestionsQuestionType; } | null; export type LandingComponentProps = { onLanded: (data: LandingQueryData) => void; }; export default function LandingComponent({ onLanded }: LandingComponentProps) { const defaultCompany = useDefaultCompany(); const defaultLocation = useDefaultLocation(); const [company, setCompany] = useState<FilterChoice | undefined>( defaultCompany, ); const [location, setLocation] = useState< (Location & TypeaheadOption) | undefined >(defaultLocation); const [questionType, setQuestionType] = useState<QuestionsQuestionType>('CODING'); const handleChangeCompany = (newCompany: FilterChoice) => { setCompany(newCompany); }; const handleChangeLocation = (newLocation: Location & TypeaheadOption) => { setLocation(newLocation); }; const handleChangeType = (newQuestionType: QuestionsQuestionType) => { setQuestionType(newQuestionType); }; useEffect(() => { if (company === undefined) { setCompany(defaultCompany); } }, [defaultCompany, company]); useEffect(() => { if (location === undefined) { setLocation(defaultLocation); } }, [defaultLocation, location]); return ( <div className="relative pt-6 pb-16 sm:pb-24"> <main className="mt-8 sm:mt-16"> <Container> <div className="lg:grid lg:grid-cols-12 lg:gap-8"> <div className="px-4 sm:px-6 sm:text-center md:mx-auto md:max-w-2xl lg:col-span-6 lg:flex lg:items-center lg:text-left"> <div> <h1 className="text-primary-600 mt-4 text-4xl font-bold tracking-tight sm:text-5xl md:text-6xl"> Tech Interview Question Bank </h1> <p className="mt-3 text-base text-slate-500 sm:mt-5 sm:text-xl lg:text-lg xl:text-xl"> Discover the latest tech interview questions asked by top companies. Learn from answers by others. </p> </div> </div> <div className="mt-16 sm:mt-24 lg:col-span-6 lg:mt-0"> <div className="bg-white shadow sm:mx-auto sm:w-full sm:max-w-md sm:rounded-lg"> <div className="px-4 py-8 sm:px-10"> <div> <Button display="block" href="/questions/browse" label="Explore All Questions" variant="primary" /> </div> <div className="relative mt-6"> <div aria-hidden="true" className="absolute inset-0 flex items-center"> <div className="w-full border-t border-gray-300" /> </div> <div className="relative flex justify-center text-sm"> <span className="bg-white px-2 text-gray-500">Or</span> </div> </div> <div className="mt-6"> <p className="text-lg">Find questions</p> <div className="mt-4 grid grid-cols-[auto_auto] items-baseline gap-x-4 gap-y-2"> <p className="text-slate-600">about</p> <Select isLabelHidden={true} label="Type" options={QUESTION_TYPES} value={questionType} onChange={(value) => { handleChangeType( value.toUpperCase() as QuestionsQuestionType, ); }} /> <p className="text-slate-600">from</p> <CompanyTypeahead isLabelHidden={true} value={company} onSelect={(value) => { handleChangeCompany(value); }} /> <p className="text-slate-600">in</p> <LocationTypeahead isLabelHidden={true} value={location} onSelect={(value) => { handleChangeLocation(value); }} /> </div> <div className="mt-4 flex items-center"> <Button addonPosition="end" display="block" icon={ArrowSmallRightIcon} label="Go" size="md" variant="secondary" onClick={() => { if (company !== undefined && location !== undefined) { onLanded({ companySlug: companyOptionToSlug(company), location: locationOptionToSlug(location), questionType, }); } }} /> </div> </div> </div> </div> </div> </div> </Container> </main> </div> ); } ```
/content/code_sandbox/apps/portal/src/components/questions/LandingComponent.tsx
xml
2016-07-05T05:00:48
2024-08-16T19:01:19
tech-interview-handbook
yangshun/tech-interview-handbook
115,302
1,232
```xml import { async, ComponentFixture, TestBed } from '@angular/core/testing'; import { MatIconModule, MatButtonModule } from '@angular/material'; import { ServiceBoxComponent } from './service-box.component'; describe('ServiceBoxComponent', () => { let component: ServiceBoxComponent; let fixture: ComponentFixture<ServiceBoxComponent>; beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ MatButtonModule, MatIconModule ], declarations: [ ServiceBoxComponent ] }) .compileComponents(); })); beforeEach(() => { fixture = TestBed.createComponent(ServiceBoxComponent); component = fixture.componentInstance; fixture.detectChanges(); }); it('should be created', () => { expect(component).toBeTruthy(); }); }); ```
/content/code_sandbox/src/app/service-box/service-box.component.spec.ts
xml
2016-09-20T13:50:42
2024-08-06T13:58:18
loklak_search
fossasia/loklak_search
1,829
156
```xml import { AsyncIterableX } from '../../asynciterable/asynciterablex.js'; import { EndWithAsyncIterable } from '../../asynciterable/operators/endwith.js'; /** * @ignore */ export function endWithProto<T>(this: AsyncIterableX<T>, ...args: T[]) { return new EndWithAsyncIterable<T>(this, args); } AsyncIterableX.prototype.endWith = endWithProto; declare module '../../asynciterable/asynciterablex' { interface AsyncIterableX<T> { endWith: typeof endWithProto; } } ```
/content/code_sandbox/src/add/asynciterable-operators/endwith.ts
xml
2016-02-22T20:04:19
2024-08-09T18:46:41
IxJS
ReactiveX/IxJS
1,319
120
```xml /// /// /// /// path_to_url /// /// Unless required by applicable law or agreed to in writing, software /// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. /// import { Component, ElementRef, EventEmitter, forwardRef, Input, OnInit, Output, SkipSelf, ViewChild } from '@angular/core'; import { AbstractControl, ControlValueAccessor, FormGroupDirective, NG_VALUE_ACCESSOR, NgForm, UntypedFormBuilder, UntypedFormControl, UntypedFormGroup, ValidationErrors } from '@angular/forms'; import { PageComponent } from '@shared/components/page.component'; import { Store } from '@ngrx/store'; import { AppState } from '@core/core.state'; import { ErrorStateMatcher } from '@angular/material/core'; import { MenuService } from '@core/services/menu.service'; import { Observable, of } from 'rxjs'; import { MenuSection } from '@core/services/menu.models'; import { TranslateService } from '@ngx-translate/core'; import { catchError, distinctUntilChanged, map, publishReplay, refCount, share, switchMap, tap } from 'rxjs/operators'; import { PageLink } from '@shared/models/page/page-link'; import { Direction } from '@shared/models/page/sort-order'; import { emptyPageData, PageData } from '@shared/models/page/page-data'; import { deepClone } from '@core/utils'; import { CustomTranslatePipe } from '@shared/pipe/custom-translate.pipe'; @Component({ selector: 'tb-quick-link', templateUrl: './quick-link.component.html', styleUrls: ['./link.component.scss'], providers: [ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => QuickLinkComponent), multi: true }, {provide: ErrorStateMatcher, useExisting: QuickLinkComponent} ] }) export class QuickLinkComponent extends PageComponent implements OnInit, ControlValueAccessor, ErrorStateMatcher { @Input() disabled: boolean; @Input() addOnly = false; @Input() disableEdit = false; @Output() quickLinkAdded = new EventEmitter<string>(); @Output() quickLinkAddCanceled = new EventEmitter<void>(); @Output() quickLinkUpdated = new EventEmitter<string>(); @Output() quickLinkDeleted = new EventEmitter<void>(); @Output() editModeChanged = new EventEmitter<boolean>(); @ViewChild('linkInput', {static: false}) linkInput: ElementRef; filteredLinks: Observable<Array<MenuSection>>; private allLinksObservable$: Observable<Array<MenuSection>> = null; searchText = ''; editMode = false; addMode = false; quickLink: MenuSection; private propagateChange = null; public editQuickLinkFormGroup: UntypedFormGroup; private submitted = false; private dirty = false; constructor(protected store: Store<AppState>, private fb: UntypedFormBuilder, private menuService: MenuService, public translate: TranslateService, private customTranslate: CustomTranslatePipe, @SkipSelf() private errorStateMatcher: ErrorStateMatcher) { super(store); } ngOnInit(): void { this.addMode = this.addOnly; this.editQuickLinkFormGroup = this.fb.group({ link: [null, [this.requiredLinkValidator]] }); this.filteredLinks = this.editQuickLinkFormGroup.get('link').valueChanges .pipe( tap(value => { let modelValue; if (typeof value === 'string' || !value) { modelValue = null; } else { modelValue = value; } this.updateView(modelValue); }), map(value => value ? (typeof value === 'string' ? value : ((value as any).translated ? value.name : value.customTranslate ? this.customTranslate.transform(value.name) : this.translate.instant(value.name))) : ''), distinctUntilChanged(), switchMap(name => this.fetchLinks(name) ), share() ); } requiredLinkValidator(control: AbstractControl): ValidationErrors | null { const value = control.value; if (!value || typeof value === 'string') { return {required: true}; } return null; } isErrorState(control: UntypedFormControl | null, form: FormGroupDirective | NgForm | null): boolean { const originalErrorState = this.errorStateMatcher.isErrorState(control, form); const customErrorState = !!(control && control.invalid && this.submitted); return originalErrorState || customErrorState; } registerOnChange(fn: any): void { this.propagateChange = fn; } registerOnTouched(fn: any): void { } setDisabledState(isDisabled: boolean): void { this.disabled = isDisabled; if (isDisabled) { this.editQuickLinkFormGroup.disable({emitEvent: false}); } else { this.editQuickLinkFormGroup.enable({emitEvent: false}); } } writeValue(value: string): void { if (value) { this.menuService.menuLinkById(value).subscribe( (link) => { this.quickLink = link; this.editQuickLinkFormGroup.get('link').patchValue( link, {emitEvent: false} ); } ); } else { this.quickLink = null; this.editQuickLinkFormGroup.get('link').patchValue( value, {emitEvent: false} ); if (!this.editQuickLinkFormGroup.valid) { this.addMode = true; this.editModeChanged.emit(true); } } this.dirty = true; } updateView(value: MenuSection | null) { if (this.quickLink !== value) { this.quickLink = value; } } displayLinkFn = (link?: MenuSection): string | undefined => link ? ((link as any).translated ? link.name : link.customTranslate ? this.customTranslate.transform(link.fullName || link.name) : this.translate.instant(link.fullName || link.name)) : undefined; fetchLinks(searchText?: string): Observable<Array<MenuSection>> { this.searchText = searchText; const pageLink = new PageLink(100, 0, searchText, { property: 'name', direction: Direction.ASC }); return this.getLinks(pageLink).pipe( catchError(() => of(emptyPageData<MenuSection>())), map(pageData => pageData.data) ); } getLinks(pageLink: PageLink): Observable<PageData<MenuSection>> { return this.allLinks().pipe( map((links) => pageLink.filterData(links)) ); } allLinks(): Observable<Array<MenuSection>> { if (this.allLinksObservable$ === null) { this.allLinksObservable$ = this.menuService.availableMenuLinks().pipe( map((links) => { const result = deepClone(links); for (const link of result) { link.name = link.customTranslate ? this.customTranslate.transform(link.fullName || link.name) : this.translate.instant(link.fullName || link.name); (link as any).translated = true; } return result; }), publishReplay(1), refCount() ); } return this.allLinksObservable$; } onFocus() { if (this.dirty) { this.editQuickLinkFormGroup.get('link').updateValueAndValidity({onlySelf: true}); this.dirty = false; } } clear() { this.editQuickLinkFormGroup.get('link').patchValue(''); setTimeout(() => { this.linkInput.nativeElement.blur(); this.linkInput.nativeElement.focus(); }, 0); } switchToEditMode() { if (!this.disableEdit && !this.editMode) { this.submitted = false; this.editQuickLinkFormGroup.get('link').patchValue( this.quickLink, {emitEvent: false} ); this.editMode = true; this.editModeChanged.emit(true); } } apply() { this.submitted = true; this.updateModel(); if (this.quickLink) { this.editMode = false; this.editModeChanged.emit(false); this.quickLinkUpdated.next(this.quickLink.id); } } cancelEdit() { this.submitted = false; this.editMode = false; this.editModeChanged.emit(false); } add() { this.submitted = true; this.updateModel(); if (this.quickLink) { if (!this.addOnly) { this.addMode = false; this.editModeChanged.emit(false); } this.quickLinkAdded.next(this.quickLink.id); } } cancelAdd() { this.editModeChanged.emit(false); this.quickLinkAddCanceled.emit(); } delete() { this.quickLinkDeleted.emit(); } isEditing() { return this.editMode || this.addMode; } private updateModel() { if (this.quickLink) { this.propagateChange(this.quickLink.id); } else { this.propagateChange(null); } } } ```
/content/code_sandbox/ui-ngx/src/app/modules/home/components/widget/lib/home-page/quick-link.component.ts
xml
2016-12-01T09:33:30
2024-08-16T19:58:25
thingsboard
thingsboard/thingsboard
16,820
1,941
```xml import { FontSizes, FontWeights } from '@fluentui/react/lib/Styling'; import { IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles } from '../../index'; export const getStyles = (props: IGroupedVerticalBarChartStyleProps): IGroupedVerticalBarChartStyles => { const { theme, href } = props; return { opacityChangeOnHover: { cursor: href ? 'pointer' : 'default', }, tooltip: { ...theme.fonts.medium, display: 'flex', flexDirection: 'column', padding: '8px', position: 'absolute', textAlign: 'center', top: '0px', background: theme.semanticColors.bodyBackground, borderRadius: '2px', pointerEvents: 'none', }, barLabel: { fontSize: FontSizes.small, fontWeight: FontWeights.semibold, fill: theme.palette.neutralPrimary, }, }; }; ```
/content/code_sandbox/packages/react-charting/src/components/GroupedVerticalBarChart/GroupedVerticalBarChart.styles.ts
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
210
```xml import * as React from 'react'; import { MicroFeedbackExample } from './MicroFeedback.Example'; import { MicroFeedbackCalloutExample } from './MicroFeedbackCallout.Example'; import { MicroFeedbackStackExample } from './MicroFeedbackStack.Example'; export const Basic = () => <MicroFeedbackExample />; export const Callout = () => <MicroFeedbackCalloutExample />; export const Stack = () => <MicroFeedbackStackExample />; export default { title: 'Components/MicroFeedback', }; ```
/content/code_sandbox/packages/react-examples/src/react-experiments/MicroFeedback/index.stories.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
107
```xml import { screen, waitFor } from '@testing-library/react'; import cloneDeep from 'lodash/cloneDeep'; import { getModelState } from '@proton/account/test'; import { PLANS } from '@proton/shared/lib/constants'; import { Audience, External } from '@proton/shared/lib/interfaces'; import format from '@proton/shared/lib/subscription/format'; import { getSubscriptionState } from '@proton/testing/lib/initialReduxState'; import { mockOrganizationApi, mockPlansApi, mockSubscriptionApi, subscriptionDefaultResponse, userDefault, } from '../../../hooks/helpers/test'; import { renderWithProviders } from '../../contacts/tests/render'; import SubscriptionContainer from './SubscriptionContainer'; import type { OpenSubscriptionModalCallback } from './SubscriptionModalProvider'; import SubscriptionModalProvider, { useSubscriptionModal } from './SubscriptionModalProvider'; jest.mock('@proton/components/hooks/useModals'); jest.mock('@proton/components/components/portal/Portal'); jest.mock('@proton/components/containers/payments/subscription/SubscriptionContainer'); jest.mock('@proton/components/hooks/useFeature', () => () => ({})); beforeEach(() => { mockSubscriptionApi(); mockOrganizationApi(); mockPlansApi(); }); it('should render', async () => { const { container } = renderWithProviders( <SubscriptionModalProvider app="proton-account">My content</SubscriptionModalProvider>, { preloadedState: { user: getModelState(userDefault), }, } ); await waitFor(() => { expect(container).toHaveTextContent('My content'); }); }); it('should render <SubscriptionContainer> if there is no legacy plans', async () => { let openSubscriptionModal!: OpenSubscriptionModalCallback; const ContextReaderComponent = () => { const modal = useSubscriptionModal(); openSubscriptionModal = modal[0]; return null; }; const { container } = renderWithProviders( <SubscriptionModalProvider app="proton-account"> <ContextReaderComponent /> </SubscriptionModalProvider> ); await waitFor(() => { expect(openSubscriptionModal).toBeDefined(); }); openSubscriptionModal({} as any); expect(container).toHaveTextContent('SubscriptionContainer'); }); it('should render <SubscriptionContainer> with B2B default audience if it was selected in the callback', async () => { let openSubscriptionModal!: OpenSubscriptionModalCallback; const ContextReaderComponent = () => { const modal = useSubscriptionModal(); openSubscriptionModal = modal[0]; return null; }; const { container } = renderWithProviders( <SubscriptionModalProvider app="proton-account"> <ContextReaderComponent /> </SubscriptionModalProvider> ); await waitFor(() => { expect(openSubscriptionModal).toBeDefined(); }); openSubscriptionModal({ defaultAudience: Audience.B2B } as any); expect(SubscriptionContainer).toHaveBeenCalledWith( expect.objectContaining({ defaultAudience: Audience.B2B, }), {} ); expect(container).toHaveTextContent('SubscriptionContainer'); }); it('should render <SubscriptionContainer> with B2B default audience if plan is a B2B plan', async () => { let openSubscriptionModal!: OpenSubscriptionModalCallback; const ContextReaderComponent = () => { const modal = useSubscriptionModal(); openSubscriptionModal = modal[0]; return null; }; const { container } = renderWithProviders( <SubscriptionModalProvider app="proton-account"> <ContextReaderComponent /> </SubscriptionModalProvider> ); await waitFor(() => { expect(openSubscriptionModal).toBeDefined(); }); openSubscriptionModal({ plan: PLANS.BUNDLE_PRO } as any); expect(SubscriptionContainer).toHaveBeenCalledWith( expect.objectContaining({ defaultAudience: Audience.B2B, }), {} ); expect(container).toHaveTextContent('SubscriptionContainer'); }); it('should render <SubscriptionContainer> with B2B default audience if subscription has a B2B plan', async () => { const subscription = cloneDeep(subscriptionDefaultResponse); subscription.Subscription.Plans = [ { Name: PLANS.BUNDLE_PRO, } as any, ]; mockSubscriptionApi(subscription); let openSubscriptionModal!: OpenSubscriptionModalCallback; const ContextReaderComponent = () => { const modal = useSubscriptionModal(); openSubscriptionModal = modal[0]; return null; }; const { container } = renderWithProviders( <SubscriptionModalProvider app="proton-account"> <ContextReaderComponent /> </SubscriptionModalProvider> ); await waitFor(() => { expect(openSubscriptionModal).toBeDefined(); }); openSubscriptionModal({} as any); expect(SubscriptionContainer).toHaveBeenCalledWith( expect.objectContaining({ defaultAudience: Audience.B2B, }), {} ); expect(container).toHaveTextContent('SubscriptionContainer'); }); it('should render <SubscriptionContainer> with FAMILY default audience if it is selected', async () => { let openSubscriptionModal!: OpenSubscriptionModalCallback; const ContextReaderComponent = () => { const modal = useSubscriptionModal(); openSubscriptionModal = modal[0]; return null; }; const { container } = renderWithProviders( <SubscriptionModalProvider app="proton-account"> <ContextReaderComponent /> </SubscriptionModalProvider> ); await waitFor(() => { expect(openSubscriptionModal).toBeDefined(); }); openSubscriptionModal({ defaultAudience: Audience.FAMILY } as any); expect(SubscriptionContainer).toHaveBeenCalledWith( expect.objectContaining({ defaultAudience: Audience.FAMILY, }), {} ); expect(container).toHaveTextContent('SubscriptionContainer'); }); it('should render <InAppPurchaseModal> if subscription is managed externally', async () => { const subscription = cloneDeep(subscriptionDefaultResponse); subscription.Subscription.External = External.Android; let openSubscriptionModal!: OpenSubscriptionModalCallback; const ContextReaderComponent = () => { const modal = useSubscriptionModal(); openSubscriptionModal = modal[0]; return null; }; renderWithProviders( <SubscriptionModalProvider app="proton-account"> <ContextReaderComponent /> </SubscriptionModalProvider>, { preloadedState: { subscription: getSubscriptionState( format(subscription.Subscription, subscription.UpcomingSubscription) ), }, } ); await waitFor(() => { expect(openSubscriptionModal).toBeDefined(); }); openSubscriptionModal({} as any); expect(await screen.findByTestId('InAppPurchaseModal/text')).not.toBeEmptyDOMElement(); }); ```
/content/code_sandbox/packages/components/containers/payments/subscription/SubscriptionModalProvider.test.tsx
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
1,398
```xml namespace pxt.skillmap { export type ScriptText = pxt.Map<string>; export interface Project { header?: pxt.workspace.Header; text?: ScriptText; deleted?: boolean; } export interface WorkspaceProvider<U> { initAsync(): Promise<void> getProjectAsync(headerId: string): Promise<Project>; saveProjectAsync(project: Project): Promise<void>; getUserStateAsync(): Promise<U | undefined>; saveUserStateAsync(user: U): Promise<void>; } export const USER_VERSION = "0.0.1" export class IndexedDBWorkspace<U> implements WorkspaceProvider<U> { static version = 6; static databaseName = "local-skill-map"; static projectTable = "projects"; static projectKey = "id"; static userTable = "users"; static userKey = "id"; db: BrowserUtils.IDBWrapper; constructor() { this.db = new BrowserUtils.IDBWrapper(IndexedDBWorkspace.databaseName, IndexedDBWorkspace.version, (ev, result) => { const db = result.result as IDBDatabase; if (ev.oldVersion < 1) { db.createObjectStore(IndexedDBWorkspace.projectTable, { keyPath: IndexedDBWorkspace.projectKey }); db.createObjectStore(IndexedDBWorkspace.userTable, { keyPath: IndexedDBWorkspace.userKey }); } }); } initAsync() { return this.db.openAsync(); } getAllProjectsAsync(): Promise<Project[]> { return this.db.getAllAsync<{id: string, project: Project}>(IndexedDBWorkspace.projectTable) .then(entries => entries.map(e => e.project).filter(e => !e.deleted)); } deleteProjectAsync(headerId: string) { return this.getProjectAsync(headerId) .then(project => { project.deleted = true; this.saveProjectAsync(project); }); } getProjectAsync(headerId: string): Promise<Project> { return this.db.getAsync(IndexedDBWorkspace.projectTable, headerId) .then(entry => (entry as any)?.project); } saveProjectAsync(project: Project): Promise<void> { return this.db.setAsync( IndexedDBWorkspace.projectTable, { id: project.header!.id, project } ); } getUserStateAsync(): Promise<U | undefined> { return this.db.getAsync(IndexedDBWorkspace.userTable, "local-user") .then(entry => (entry as any)?.user); } saveUserStateAsync(user: U): Promise<void> { return this.db.setAsync( IndexedDBWorkspace.userTable, { id: "local-user", user } ); } } } ```
/content/code_sandbox/pxtlib/skillmap.ts
xml
2016-01-24T19:35:52
2024-08-16T16:39:39
pxt
microsoft/pxt
2,069
580
```xml // // // path_to_url // // Unless required by applicable law or agreed to in writing, software // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. import * as pulumi from "../../../../../"; class MyResource extends pulumi.CustomResource { constructor(name: string) { super("test:index:MyResource", name); } } new MyResource("testResource1"); ```
/content/code_sandbox/sdk/nodejs/tests/runtime/langhost/cases/069.ambiguous_entrypoints/index.ts
xml
2016-10-31T21:02:47
2024-08-16T19:47:04
pulumi
pulumi/pulumi
20,743
83
```xml import fs from 'fs' import path from 'path' import { addDependenciesToPackage, install, mutateModules, mutateModulesInSingleProject } from '@pnpm/core' import { prepareEmpty, preparePackages } from '@pnpm/prepare' import { addDistTag } from '@pnpm/registry-mock' import { type ProjectRootDir } from '@pnpm/types' import { sync as rimraf } from '@zkochan/rimraf' import { sync as loadJsonFile } from 'load-json-file' import { sync as readYamlFile } from 'read-yaml-file' import symlinkDir from 'symlink-dir' import { testDefaults } from '../utils' test('installing with hoisted node-linker', async () => { prepareEmpty() const manifest = { dependencies: { send: '0.17.2', 'has-flag': '1.0.0', ms: '1.0.0', }, } await install(manifest, testDefaults({ nodeLinker: 'hoisted', })) expect(fs.realpathSync('node_modules/send')).toEqual(path.resolve('node_modules/send')) expect(fs.realpathSync('node_modules/has-flag')).toEqual(path.resolve('node_modules/has-flag')) expect(fs.realpathSync('node_modules/ms')).toEqual(path.resolve('node_modules/ms')) expect(fs.existsSync('node_modules/send/node_modules/ms')).toBeTruthy() expect(readYamlFile<{ nodeLinker: string }>('node_modules/.modules.yaml').nodeLinker).toBe('hoisted') // If a package from node_modules is removed, it should be re-added. rimraf('node_modules/send') await install(manifest, testDefaults({ nodeLinker: 'hoisted', })) expect(fs.realpathSync('node_modules/send')).toEqual(path.resolve('node_modules/send')) }) test('installing with hoisted node-linker and no lockfile', async () => { prepareEmpty() await install({ dependencies: { ms: '1.0.0', }, }, testDefaults({ useLockfile: false, nodeLinker: 'hoisted', })) expect(fs.realpathSync('node_modules/ms')).toEqual(path.resolve('node_modules/ms')) expect(fs.existsSync('pnpm-lock.yaml')).toBeFalsy() }) test('overwriting (is-positive@3.0.0 with is-positive@latest)', async () => { const project = prepareEmpty() const manifest = await addDependenciesToPackage( {}, ['is-positive@3.0.0'], testDefaults({ nodeLinker: 'hoisted', save: true }) ) project.storeHas('is-positive', '3.0.0') const updatedManifest = await addDependenciesToPackage( manifest, ['is-positive@latest'], testDefaults({ nodeLinker: 'hoisted', save: true }) ) project.storeHas('is-positive', '3.1.0') expect(updatedManifest.dependencies?.['is-positive']).toBe('3.1.0') expect(loadJsonFile<{ version: string }>('node_modules/is-positive/package.json').version).toBe('3.1.0') }) test('overwriting existing files in node_modules', async () => { prepareEmpty() await symlinkDir(__dirname, path.resolve('node_modules/is-positive')) const manifest = await addDependenciesToPackage( {}, ['is-positive@3.0.0'], testDefaults({ nodeLinker: 'hoisted', save: true }) ) expect(manifest.dependencies?.['is-positive']).toBe('3.0.0') expect(loadJsonFile<{ version: string }>('node_modules/is-positive/package.json').version).toBe('3.0.0') }) test('preserve subdeps on update', async () => { prepareEmpty() await addDistTag({ package: '@pnpm.e2e/foobarqar', version: '1.0.0', distTag: 'latest' }) const manifest = await addDependenciesToPackage( {}, ['@pnpm.e2e/foobarqar@1.0.0', '@pnpm.e2e/bar@100.1.0'], testDefaults({ nodeLinker: 'hoisted' }) ) await addDependenciesToPackage( manifest, ['@pnpm.e2e/foobarqar@1.0.1'], testDefaults({ nodeLinker: 'hoisted' }) ) expect(loadJsonFile<{ version: string }>('node_modules/@pnpm.e2e/bar/package.json').version).toBe('100.1.0') expect(loadJsonFile<{ version: string }>('node_modules/@pnpm.e2e/foobarqar/package.json').version).toBe('1.0.1') expect(loadJsonFile<{ version: string }>('node_modules/@pnpm.e2e/foobarqar/node_modules/@pnpm.e2e/bar/package.json').version).toBe('100.0.0') }) test('adding a new dependency to one of the workspace projects', async () => { prepareEmpty() let [{ manifest }] = (await mutateModules([ { mutation: 'install', rootDir: path.resolve('project-1') as ProjectRootDir, }, { mutation: 'install', rootDir: path.resolve('project-2') as ProjectRootDir, }, ], testDefaults({ allProjects: [ { buildIndex: 0, manifest: { name: 'project-1', version: '1.0.0', dependencies: { '@pnpm.e2e/bar': '100.0.0', }, }, rootDir: path.resolve('project-1') as ProjectRootDir, }, { buildIndex: 1, manifest: { name: 'project-2', version: '1.0.0', dependencies: { '@pnpm.e2e/foobarqar': '1.0.0', }, }, rootDir: path.resolve('project-2') as ProjectRootDir, }, ], nodeLinker: 'hoisted', }))).updatedProjects manifest = await addDependenciesToPackage( manifest, ['is-negative@1.0.0'], testDefaults({ nodeLinker: 'hoisted', prefix: path.resolve('project-1'), targetDependenciesField: 'devDependencies' }) ) expect(manifest.dependencies).toStrictEqual({ '@pnpm.e2e/bar': '100.0.0' }) expect(manifest.devDependencies).toStrictEqual({ 'is-negative': '1.0.0' }) expect(loadJsonFile<{ version: string }>('node_modules/@pnpm.e2e/bar/package.json').version).toBe('100.0.0') expect(loadJsonFile<{ version: string }>('node_modules/is-negative/package.json').version).toBe('1.0.0') }) test('installing the same package with alias and no alias', async () => { await addDistTag({ package: '@pnpm.e2e/dep-of-pkg-with-1-dep', version: '100.0.0', distTag: 'latest' }) prepareEmpty() await addDependenciesToPackage( {}, ['@pnpm.e2e/pkg-with-1-aliased-dep@100.0.0', '@pnpm.e2e/dep-of-pkg-with-1-dep@^100.0.0'], testDefaults({ nodeLinker: 'hoisted' }) ) expect(loadJsonFile<{ version: string }>('node_modules/@pnpm.e2e/pkg-with-1-aliased-dep/package.json').version).toBe('100.0.0') expect(loadJsonFile<{ version: string }>('node_modules/@pnpm.e2e/dep-of-pkg-with-1-dep/package.json').version).toBe('100.0.0') expect(loadJsonFile<{ version: string }>('node_modules/dep/package.json').version).toBe('100.0.0') }) test('run pre/postinstall scripts. bin files should be linked in a hoisted node_modules', async () => { const project = prepareEmpty() await addDependenciesToPackage({}, ['@pnpm.e2e/pre-and-postinstall-scripts-example'], testDefaults({ fastUnpack: false, nodeLinker: 'hoisted', targetDependenciesField: 'devDependencies' }) ) expect(fs.existsSync('node_modules/@pnpm.e2e/pre-and-postinstall-scripts-example/generated-by-prepare.js')).toBeFalsy() expect(fs.existsSync('node_modules/@pnpm.e2e/pre-and-postinstall-scripts-example/generated-by-preinstall.js')).toBeTruthy() const generatedByPreinstall = project.requireModule('@pnpm.e2e/pre-and-postinstall-scripts-example/generated-by-preinstall') expect(typeof generatedByPreinstall).toBe('function') const generatedByPostinstall = project.requireModule('@pnpm.e2e/pre-and-postinstall-scripts-example/generated-by-postinstall') expect(typeof generatedByPostinstall).toBe('function') }) // Covers path_to_url test('running install scripts in a workspace that has no root project', async () => { prepareEmpty() await mutateModulesInSingleProject({ manifest: { name: 'project-1', version: '1.0.0', dependencies: { '@pnpm.e2e/pre-and-postinstall-scripts-example': '1.0.0', }, }, mutation: 'install', rootDir: path.resolve('project-1') as ProjectRootDir, }, testDefaults({ fastUnpack: false, nodeLinker: 'hoisted' })) expect(fs.existsSync('node_modules/@pnpm.e2e/pre-and-postinstall-scripts-example/generated-by-preinstall.js')).toBeTruthy() }) test('hoistingLimits should prevent packages to be hoisted', async () => { prepareEmpty() const hoistingLimits = new Map() hoistingLimits.set('.@', new Set(['send'])) await install({ dependencies: { send: '0.17.2', }, }, testDefaults({ nodeLinker: 'hoisted', hoistingLimits, })) expect(fs.existsSync('node_modules/ms')).toBeFalsy() expect(fs.existsSync('node_modules/send/node_modules/ms')).toBeTruthy() }) test('externalDependencies should prevent package from being hoisted to the root', async () => { prepareEmpty() const externalDependencies = new Set(['ms']) await install({ dependencies: { send: '0.17.2', }, }, testDefaults({ nodeLinker: 'hoisted', externalDependencies, })) expect(fs.existsSync('node_modules/ms')).toBeFalsy() expect(fs.existsSync('node_modules/send/node_modules/ms')).toBeTruthy() }) test('linking bins of local projects when node-linker is set to hoisted', async () => { const project1Manifest = { name: 'project-1', version: '1.0.0', dependencies: { 'project-2': 'workspace:*', }, } const project2Manifest = { name: 'project-2', version: '1.0.0', bin: { 'project-2': 'index.js', }, } preparePackages([ project1Manifest, project2Manifest, ]) fs.writeFileSync('project-2/index.js', '#!/usr/bin/env node\nconsole.log("hello")', 'utf8') await mutateModules([ { mutation: 'install', rootDir: path.resolve('project-1') as ProjectRootDir, }, { mutation: 'install', rootDir: path.resolve('project-2') as ProjectRootDir, }, ], testDefaults({ allProjects: [ { buildIndex: 0, manifest: project1Manifest, rootDir: path.resolve('project-1') as ProjectRootDir, }, { buildIndex: 1, manifest: project2Manifest, rootDir: path.resolve('project-2') as ProjectRootDir, }, ], nodeLinker: 'hoisted', })) expect(fs.existsSync('project-1/node_modules/.bin/project-2')).toBeTruthy() }) test('peerDependencies should be installed when autoInstallPeers is set to true and nodeLinker is set to hoisted', async () => { prepareEmpty() await install({ dependencies: { 'react-dom': '18.2.0', }, }, testDefaults({ nodeLinker: 'hoisted', autoInstallPeers: true, })) expect(fs.existsSync('node_modules/react')).toBeTruthy() }) ```
/content/code_sandbox/pkg-manager/core/test/hoistedNodeLinker/install.ts
xml
2016-01-28T07:40:43
2024-08-16T12:38:47
pnpm
pnpm/pnpm
28,869
2,737
```xml <?xml version="1.0" encoding="utf-8"?> <!-- ~ ~ ~ path_to_url ~ ~ Unless required by applicable law or agreed to in writing, software ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <selector xmlns:android="path_to_url"> <!-- State Disabled, Unchecked --> <item android:alpha="@dimen/m3_comp_switch_disabled_unselected_handle_opacity" android:color="@macro/m3_comp_switch_disabled_unselected_handle_color" android:state_enabled="false" android:state_checked="false"/> <!-- State Disabled, Checked --> <item android:alpha="@dimen/m3_comp_switch_disabled_selected_handle_opacity" android:color="@macro/m3_comp_switch_disabled_selected_handle_color" android:state_enabled="false" android:state_checked="true"/> <!-- State Checked, Pressed --> <item android:color="@macro/m3_comp_switch_selected_pressed_handle_color" android:state_checked="true" android:state_pressed="true"/> <!-- State Checked --> <item android:color="@macro/m3_comp_switch_selected_handle_color" android:state_checked="true"/> <!-- State Unchecked, Pressed --> <item android:color="@macro/m3_comp_switch_unselected_pressed_handle_color" android:state_pressed="true"/> <!-- State Unchecked --> <item android:color="@macro/m3_comp_switch_unselected_handle_color"/> </selector> ```
/content/code_sandbox/lib/java/com/google/android/material/materialswitch/res/color/mtrl_switch_thumb_tint.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
317
```xml // See LICENSE.txt for license information. import React, {type Dispatch, type RefObject, type SetStateAction, useCallback} from 'react'; import {StyleSheet} from 'react-native'; import OptionItem from '@components/option_item'; import {preventDoubleTap} from '@utils/tap'; import type {SearchRef} from '@components/search'; const styles = StyleSheet.create({ container: { marginLeft: 20, }, }); export type ModifierItem = { cursorPosition?: number; description: string; testID: string; term: string; } type Props = { item: ModifierItem; setSearchValue: Dispatch<SetStateAction<string>>; searchValue?: string; searchRef: RefObject<SearchRef>; } const Modifier = ({item, searchRef, searchValue, setSearchValue}: Props) => { const handlePress = useCallback(() => { addModifierTerm(item.term); }, [item.term, searchValue]); const setNativeCursorPositionProp = (position: number) => { setTimeout(() => { searchRef.current?.setCaretPosition({start: position, end: position}); }, 50); }; const addModifierTerm = preventDoubleTap((modifierTerm) => { let newValue = ''; if (!searchValue) { newValue = modifierTerm; } else if (searchValue.endsWith(' ')) { newValue = `${searchValue}${modifierTerm}`; } else { newValue = `${searchValue} ${modifierTerm}`; } setSearchValue(newValue); if (item.cursorPosition) { const position = newValue.length + item.cursorPosition; setNativeCursorPositionProp(position); } }); return ( <OptionItem action={handlePress} icon={'plus-box-outline'} inline={true} label={item.term} testID={item.testID} description={' ' + item.description} type='default' containerStyle={styles.container} /> ); }; export default Modifier; ```
/content/code_sandbox/app/screens/home/search/initial/modifiers/modifier.tsx
xml
2016-10-07T16:52:32
2024-08-16T12:08:38
mattermost-mobile
mattermost/mattermost-mobile
2,155
423
```xml <vector xmlns:android="path_to_url" android:width="23dp" android:height="20dp" android:viewportWidth="23" android:viewportHeight="20"> <path android:pathData="M17.212,0H5.788C4.969,-0 4.294,-0 3.744,0.046C3.173,0.093 2.648,0.195 2.156,0.45C1.426,0.83 0.83,1.426 0.45,2.156C0.195,2.648 0.093,3.173 0.046,3.744C-0,4.294 -0,4.969 0,5.788V14.212C-0,15.031 -0,15.706 0.046,16.256C0.093,16.827 0.195,17.352 0.45,17.844C0.83,18.574 1.426,19.17 2.156,19.55C2.648,19.805 3.173,19.907 3.744,19.954C4.294,20 4.969,20 5.788,20H17.212C18.031,20 18.706,20 19.256,19.954C19.827,19.907 20.352,19.805 20.844,19.55C21.574,19.17 22.17,18.574 22.55,17.844C22.805,17.352 22.907,16.827 22.954,16.256C23,15.706 23,15.031 23,14.212V5.788C23,4.97 23,4.294 22.954,3.744C22.907,3.173 22.805,2.648 22.55,2.156C22.17,1.426 21.574,0.83 20.844,0.45C20.352,0.195 19.827,0.093 19.256,0.046C18.706,-0 18.031,-0 17.212,0ZM3.078,2.225C3.237,2.143 3.464,2.076 3.909,2.039C4.367,2.001 4.959,2 5.83,2H17.17C18.041,2 18.633,2.001 19.09,2.039C19.536,2.076 19.763,2.143 19.922,2.225C20.287,2.415 20.585,2.713 20.775,3.078C20.857,3.237 20.924,3.464 20.961,3.909C20.999,4.367 21,4.959 21,5.83V12H2V5.83C2,4.959 2.001,4.367 2.039,3.909C2.076,3.464 2.143,3.237 2.225,3.078C2.415,2.713 2.713,2.415 3.078,2.225ZM2,14V14.17C2,15.041 2.001,15.633 2.039,16.09C2.076,16.536 2.143,16.763 2.225,16.922C2.415,17.287 2.713,17.585 3.078,17.775C3.237,17.857 3.464,17.924 3.909,17.961C4.367,17.999 4.959,18 5.83,18H7V14H2ZM14,18H9V14H14V18ZM16,18H17.17C18.041,18 18.633,17.999 19.09,17.961C19.536,17.924 19.763,17.857 19.922,17.775C20.287,17.585 20.585,17.287 20.775,16.922C20.857,16.763 20.924,16.536 20.961,16.09C20.999,15.633 21,15.041 21,14.17V14H16V18Z" android:fillColor="#F3F4F4" android:fillType="evenOdd"/> </vector> ```
/content/code_sandbox/icon-pack/src/main/res/drawable/ic_grid_split.xml
xml
2016-05-04T11:46:20
2024-08-15T16:29:10
android
meganz/android
1,537
1,061
```xml /** * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ import plist from '@expo/plist'; import Debug from 'debug'; import { Socket } from 'net'; import type { ProtocolWriter } from './AbstractProtocol'; import { PlistProtocolReader, ProtocolClient, ProtocolReaderFactory } from './AbstractProtocol'; const debug = Debug('expo:apple-device:protocol:usbmux'); export const USBMUXD_HEADER_SIZE = 16; export interface UsbmuxMessage { messageType: string; extraFields?: { [key: string]: any }; } export class UsbmuxProtocolClient extends ProtocolClient<UsbmuxMessage> { constructor(socket: Socket) { super(socket, new ProtocolReaderFactory(UsbmuxProtocolReader), new UsbmuxProtocolWriter()); } } export class UsbmuxProtocolReader extends PlistProtocolReader { constructor(callback: (data: any) => any) { super(USBMUXD_HEADER_SIZE, callback); } parseHeader(data: Buffer) { return data.readUInt32LE(0) - USBMUXD_HEADER_SIZE; } parseBody(data: Buffer) { const resp = super.parseBody(data); debug(`Response: ${JSON.stringify(resp)}`); return resp; } } export class UsbmuxProtocolWriter implements ProtocolWriter { private useTag = 0; write(socket: Socket, msg: UsbmuxMessage) { // TODO Usbmux message type debug(`socket write: ${JSON.stringify(msg)}`); const { messageType, extraFields } = msg; const plistMessage = plist.build({ BundleID: 'dev.expo.native-run', // TODO ClientVersionString: 'usbmux.js', // TODO MessageType: messageType, ProgName: 'native-run', // TODO kLibUSBMuxVersion: 3, ...extraFields, }); const dataSize = plistMessage ? plistMessage.length : 0; const protocolVersion = 1; const messageCode = 8; const header = Buffer.alloc(USBMUXD_HEADER_SIZE); header.writeUInt32LE(USBMUXD_HEADER_SIZE + dataSize, 0); header.writeUInt32LE(protocolVersion, 4); header.writeUInt32LE(messageCode, 8); header.writeUInt32LE(this.useTag++, 12); // TODO socket.write(header); socket.write(plistMessage); } } ```
/content/code_sandbox/packages/@expo/cli/src/run/ios/appleDevice/protocol/UsbmuxProtocol.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
534
```xml import * as React from 'react'; import { ThemingSchemesCustomExample } from './Theming.Schemes.Custom.Example'; import { ThemingSchemesVariantExample } from './Theming.Schemes.Variant.Example'; export const SchemesCustom = () => <ThemingSchemesCustomExample />; export const SchemesVariant = () => <ThemingSchemesVariantExample />; export default { title: 'Components/Theming', }; ```
/content/code_sandbox/packages/react-examples/src/react-experiments/Theming/index.stories.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
95
```xml <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="path_to_url"> <PreferenceScreen xmlns:android="path_to_url" android:icon="@drawable/ic_watch_grey600_48dp" android:key="smart_watch_options" android:summary="@string/pebble_and_android_wear_options" android:title="@string/smart_watch_features"> <PreferenceScreen android:title="@string/android_wear_integration" android:key="android_wear_preferences"> <PreferenceCategory android:key="watch_integration" android:title="@string/wear_integration"> <SwitchPreference android:defaultValue="false" android:key="wear_sync" android:summary="@string/send_data_to_android_wear_watch" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/android_wear_integration" /> <CheckBoxPreference android:defaultValue="false" android:dependency="wear_sync" android:key="enable_wearG5" android:summary="@string/pref_summary_enable_wearG5" android:title="@string/pref_enable_wearG5" /> <CheckBoxPreference android:defaultValue="false" android:dependency="enable_wearG5" android:key="force_wearG5" android:summary="@string/pref_summary_force_wearG5" android:title="@string/pref_force_wearG5" /> <CheckBoxPreference android:defaultValue="false" android:dependency="force_wearG5" android:key="disable_wearG5_on_lowbattery" android:summary="@string/pref_summary_disable_wearG5_on_lowbattery" android:title="@string/pref_disable_wearG5_on_lowbattery" /> <SwitchPreference android:defaultValue="false" android:dependency="force_wearG5" android:key="disable_wearG5_on_missedreadings" android:summary="@string/pref_summary_disable_wearG5_on_missedreadings" android:title="@string/pref_disable_wearG5_on_missedreadings" /> <EditTextPreference android:defaultValue="30" android:dependency="disable_wearG5_on_missedreadings" android:digits="0123456789" android:inputType="number" android:key="disable_wearG5_on_missedreadings_level" android:summary="" android:title="@string/pref_disable_wearG5_on_missedreadings_level" /> <CheckBoxPreference android:defaultValue="false" android:dependency="force_wearG5" android:key="only_ever_use_wear_collector" android:summary="@string/your_sha256_hashphone" android:title="@string/title_Only_use_Wear" /> <EditTextPreference android:defaultValue="" android:dependency="force_wearG5" android:editable="false" android:inputType="none" android:key="node_wearG5" android:summary="@string/pref_summary_node_wearG5" android:textIsSelectable="true" android:title="@string/pref_node_wearG5" /> <CheckBoxPreference android:defaultValue="false" android:dependency="wear_sync" android:key="sync_wear_logs" android:summary="@string/pref_summary_sync_wear_logs" android:title="@string/pref_sync_wear_logs" /> <EditTextPreference android:defaultValue="wear" android:dependency="sync_wear_logs" android:editable="true" android:key="wear_logs_prefix" android:summary="@string/pref_summary_wear_logs_prefix" android:textIsSelectable="true" android:title="@string/pref_wear_logs_prefix" /> <CheckBoxPreference android:defaultValue="false" android:dependency="wear_sync" android:key="show_wear_treatments" android:summary="@string/pref_summary_show_treatments" android:title="@string/pref_show_treatments" /> </PreferenceCategory> </PreferenceScreen> <PreferenceScreen android:title="@string/pebble_integration" android:key="pebble_preferences"> <PreferenceCategory android:key="pebble_integration" android:title="@string/pebble_integration"> <SwitchPreference android:defaultValue="false" android:key="broadcast_to_pebble" android:summary="@string/send_data_to_pebble_watchface" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/pebble_watch_integration" /> <ListPreference android:defaultValue="2" android:dependency="broadcast_to_pebble" android:entries="@array/SendToPebbleChoice" android:entryValues="@array/SendToPebbleChoiceValues" android:key="broadcast_to_pebble_type" android:summary="@string/standard_or_trend_pebble_watchface" android:title="@string/choose_pebble_watchface" /> <CheckBoxPreference android:defaultValue="true" android:dependency="broadcast_to_pebble" android:key="pebble_display_trend" android:summary="@string/pref_summary_display_trend" android:title="@string/pref_pebble_display_trend" /> <CheckBoxPreference android:defaultValue="false" android:dependency="broadcast_to_pebble" android:key="pebble_filtered_line" android:summary="@string/summary_Also_show_the_filtered_data_on_the_trend" android:title="@string/display_filtered_line" /> <CheckBoxPreference android:defaultValue="false" android:dependency="broadcast_to_pebble" android:key="pebble_tiny_dots" android:summary="@string/show_tiny_dots_instead" android:title="@string/use_tiny_dots" /> <CheckBoxPreference android:defaultValue="false" android:dependency="broadcast_to_pebble" android:key="pebble_high_line" android:summary="@string/displays_the_high_line" android:title="@string/pref_pebble_display_high_line" /> <CheckBoxPreference android:defaultValue="false" android:dependency="broadcast_to_pebble" android:key="pebble_low_line" android:summary="@string/displays_the_low_line" android:title="@string/pref_pebble_display_low_line" /> <ListPreference android:defaultValue="3" android:dependency="broadcast_to_pebble" android:entries="@array/PebbleTrendPeriods" android:entryValues="@array/PebbleTrendPeriodValues" android:key="pebble_trend_period" android:summary="@string/set_the_trend_period_to_display" android:title="@string/trend_time_period" /> <CheckBoxPreference android:defaultValue="true" android:dependency="broadcast_to_pebble" android:key="pebble_show_delta" android:summary="@string/displays_the_delta_value" android:title="@string/display_delta" /> <CheckBoxPreference android:defaultValue="false" android:dependency="broadcast_to_pebble" android:key="pebble_show_delta_units" android:summary="@string/displays_the_delta_units" android:title="@string/display_delta_units" /> <CheckBoxPreference android:defaultValue="true" android:dependency="broadcast_to_pebble" android:key="pebble_show_arrows" android:summary="@string/displays_the_slope_arrows" android:title="@string/display_slope_arrows" /> <CheckBoxPreference android:defaultValue="false" android:key="pebble_vibe_alerts" android:summary="@string/watch_vibrate_active_alerts" android:title="@string/vibrate_alerts" /> <CheckBoxPreference android:defaultValue="false" android:dependency="broadcast_to_pebble" android:key="pebble_vibrate_no_signal" android:summary="@string/vibrate_watch_to_alert_no_data" android:title="@string/vibrate_when_missed_signal" /> <CheckBoxPreference android:defaultValue="true" android:dependency="broadcast_to_pebble" android:key="pebble_vibrate_no_bluetooth" android:summary="@string/vibrate_watch_to_alert_no_bluetooth" android:title="@string/vibrate_when_no_bluetooth" /> <CheckBoxPreference android:defaultValue="false" android:key="pebble_show_bwp" android:summary="@string/your_sha256_hashpropriate" android:title="@string/title_Display_BWP_Insulin" /> <EditTextPreference android:defaultValue="99" android:dependency="broadcast_to_pebble" android:key="pebble_special_value" android:summary="@string/special_glucose_value_to_display_message" android:title="@string/special_value" /> <EditTextPreference android:defaultValue="BAZINGA!" android:dependency="broadcast_to_pebble" android:key="pebble_special_text" android:summary="@string/message_to_display_when_bgl_hits" android:title="@string/text_to_display_when_hitting_special_value" /> </PreferenceCategory> <PreferenceCategory android:key="pebble_installers" android:title="@string/install_pebble_apps"> <Preference android:key="install_pebble_snooze_control" android:summary="@string/attach_to_button" android:title="@string/install_pebble_snooze_control_app"> <intent android:action="android.intent.action.MAIN" android:targetClass="com.eveningoutpost.dexdrip.utilitymodels.pebble.watchface.InstallPebbleSnoozeControlApp" android:targetPackage="@string/local_target_package" /> </Preference> </PreferenceCategory> </PreferenceScreen> <PreferenceScreen android:layout_width="wrap_content" android:layout_height="wrap_content" android:key="amazfit_sync_preferences" android:title="@string/amazfit_sync_service"> <CheckBoxPreference android:defaultValue="false" android:disableDependentsState="false" android:key="pref_amazfit_enable_key" android:summary="@string/pref_amazfit_enable_summary" android:title="@string/pref_amazfit_tile" /> <CheckBoxPreference android:layout_width="match_parent" android:layout_height="wrap_content" android:defaultValue="false" android:dependency="pref_amazfit_enable_key" android:key="pref_amazfit_BG_alert_enable_key" android:summary="@string/pref_amazfit_BG_alert_enable_summary" android:title="@string/pref_amazfit_BG_alert_title" /> <CheckBoxPreference android:layout_width="match_parent" android:layout_height="wrap_content" android:defaultValue="false" android:dependency="pref_amazfit_enable_key" android:key="pref_amazfit_other_alert_enable_key" android:summary="@string/pref_amazfit_other_alert_enable_summary" android:title="@string/pref_amazfit_other_alert_title" /> <PreferenceCategory android:key="Amazfit_Watchface" android:title="@string/pref_amazfit_watchface_settings"> <CheckBoxPreference android:layout_width="match_parent" android:layout_height="wrap_content" android:defaultValue="false" android:dependency="pref_amazfit_enable_key" android:key="pref_amazfit_watchface_graph" android:summary="@string/pref_amazfit_watchface_graph_enable_summary" android:title="@string/pref_amazfit_watchface_graph_title" /> <CheckBoxPreference android:layout_width="match_parent" android:layout_height="wrap_content" android:defaultValue="false" android:dependency="pref_amazfit_watchface_graph" android:key="pref_amazfit_watchface_graph_dots" android:summary="@string/pref_amazfit_watchface_graph_dots_summary" android:title="@string/pref_amazfit_watchface_graph_dots_title" /> <EditTextPreference android:defaultValue="4" android:dependency="pref_amazfit_watchface_graph" android:digits="0123456789" android:inputType="number" android:key="amazfit_watchface_graph_hours" android:summary="@string/pref_amazfit_widget_graph_hours_summary" android:title="@string/pref_amazfit_watchface_graph_hours_title" /> </PreferenceCategory> <PreferenceCategory android:key="Amazfit_Widget" android:title="@string/pref_amazfit_widget_settings"> <CheckBoxPreference android:layout_width="match_parent" android:layout_height="wrap_content" android:defaultValue="false" android:dependency="pref_amazfit_enable_key" android:key="pref_amazfit_widget_graph" android:summary="@string/pref_amazfit_widget_graph_enable_summary" android:title="@string/pref_amazfit_widget_graph_title" /> <CheckBoxPreference android:layout_width="match_parent" android:layout_height="wrap_content" android:defaultValue="false" android:dependency="pref_amazfit_widget_graph" android:key="pref_amazfit_widget_graph_dots" android:summary="@string/pref_amazfit_widget_graph_dots_summary" android:title="@string/pref_amazfit_widget_graph_dots_title" /> <EditTextPreference android:defaultValue="4" android:dependency="pref_amazfit_widget_graph" android:digits="0123456789" android:inputType="number" android:key="amazfit_widget_graph_hours" android:summary="@string/pref_amazfit_widget_graph_hours_summary" android:title="@string/pref_amazfit_widget_graph_hours_title" /> </PreferenceCategory> </PreferenceScreen> <PreferenceScreen android:key="bluejay_preference_screen" android:title="BlueJay Watch"> <SwitchPreference android:defaultValue="false" android:key="bluejay_enabled" android:summary="" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="BlueJay Watch" /> <SwitchPreference android:defaultValue="true" android:dependency="bluejay_enabled" android:key="bluejay_collector_enabled" android:summary="" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="Run Collector" /> <CheckBoxPreference android:defaultValue="true" android:dependency="bluejay_enabled" android:key="bluejay_local_alarms" android:summary="Watch can alarm for high/low when not connected to phone." android:title="Local Alarms" /> <SwitchPreference android:defaultValue="true" android:dependency="bluejay_enabled" android:key="bluejay_send_alarms" android:summary="Send xDrip generated alarms to the watch" android:title="Send Alarms" /> <CheckBoxPreference android:defaultValue="false" android:dependency="bluejay_enabled" android:key="bluejay_option_call_notifications" android:summary="Send call notifications to the band (Android 6+)" android:title="Send Calls" /> <CheckBoxPreference android:defaultValue="true" android:dependency="bluejay_enabled" android:key="bluejay_send_readings" android:summary="Send glucose values received on the Phone to the Watch" android:title="Send Readings" /> <CheckBoxPreference android:defaultValue="false" android:dependency="bluejay_enabled" android:key="bluejay_option_24_hour_clock" android:summary="Show 24 hour clock on display" android:title="24 Hour Clock" /> <SeekBarPreference android:defaultValue="6" android:dependency="bluejay_enabled" android:key="bluejay_screen_timeout" android:max="7" android:min="0" android:summary="" android:title="Screen Timeout" /> <SwitchPreference android:defaultValue="true" android:dependency="bluejay_enabled" android:key="bluejay_use_motion_wake" android:summary="Use a shake of the wrist to wake BlueJay. Adjust sensitivity below." android:title="Wake with motion" /> <SeekBarPreference android:defaultValue="6" android:dependency="bluejay_enabled" android:key="bluejay_wake_velocity" android:max="15" android:min="0" android:summary="" android:title="Wake up velocity" /> <Preference android:key="launch_bluejay_control" android:title="Launch BlueJay Panel"> <intent android:action="android.intent.action.MAIN" android:targetClass="com.eveningoutpost.dexdrip.ui.activities.ThinJamActivity" android:targetPackage="@string/local_target_package" /> </Preference> <PreferenceScreen android:key="bluejay_preference_screen" android:title="BlueJay Advanced Settings"> <EditTextPreference android:key="bluejay_mac" android:title="BlueJay Mac" /> <SwitchPreference android:defaultValue="true" android:dependency="bluejay_enabled" android:key="bluejay_run_phone_collector" android:summary="Also run the standard collector on this phone. Only turn this off if you don't want this phone itself to be connecting to the transmitter." android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="Run Phone Collector" /> <SwitchPreference android:defaultValue="false" android:dependency="bluejay_enabled" android:key="bluejay_run_as_phone_collector" android:summary="This allows the BlueJay to occupy the phone slot on the transmitter. Select this if you want another non-phone device to be able to connect to the transmitter and you are not using a phone to connect to the transmitter." android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="BlueJay uses Phone Slot" /> <SwitchPreference android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:defaultValue="false" android:dependency="bluejay_enabled" android:key="bluejay_use_broadcast_api" android:summary="Accept commands from other apps" android:title="Enable remote API" /> <CheckBoxPreference android:defaultValue="false" android:dependency="bluejay_enabled" android:key="bluejay_send_status_line" android:summary="Show xDrip extra status line on X2 display" android:title="Send Status Line" /> <CheckBoxPreference android:defaultValue="false" android:dependency="bluejay_enabled" android:key="bluejay_beep_on_connect" android:summary="Play a sound when the bluejay connects" android:title="Debug sound" /> <CheckBoxPreference android:defaultValue="false" android:dependency="bluejay_enabled" android:enabled="false" android:key="bluejay_delta_trend" android:summary="Try to calculate xDrip style delta trend arrow instead of using transmitter estimate arrow." android:title="Attempt Delta Trend" /> <SeekBarPreference android:key="bluejay_backfill_hours" android:dependency="bluejay_enabled" android:title="Backfill Hours" android:summary="Larger backfill scope can reduce battery life" android:max="12" android:min="0" android:defaultValue="3" /> <CheckBoxPreference android:defaultValue="false" android:dependency="bluejay_enabled" android:enabled="false" android:key="bluejay_timing_failsafe" android:summary="Scan for longer periods of time if readings are missed. Uses more battery but can recover if watch gets out of sync" android:title="Timing fail-safe" /> <CheckBoxPreference android:defaultValue="true" android:key="bluejay_button1_vibrate" android:summary="Vibrate watch when a button long press is sent to the phone" android:title="Vibrate button" /> <SwitchPreference android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:defaultValue="false" android:key="bluejay_send_to_another_xdrip" android:summary="If you have multiple xDrip instances on your phone you can send data to another one that has a BlueJay here" android:title="Send to another xDrip" /> </PreferenceScreen> </PreferenceScreen> <PreferenceScreen android:title="@string/title_lefun_band" android:key="lefun_preferences"> <SwitchPreference android:defaultValue="false" android:key="lefun_enabled" android:summary="@string/summary_lefun_enable" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/title_lefun_enable" /> <EditTextPreference android:key="lefun_mac" android:title="@string/title_lefun_mac" /> <SwitchPreference android:defaultValue="true" android:dependency="lefun_enabled" android:key="lefun_send_readings" android:summary="@string/summary_lefun_send_readings" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/title_lefun_send_readings" /> <SwitchPreference android:defaultValue="true" android:dependency="lefun_enabled" android:key="lefun_send_alarms" android:summary="@string/summary_lefun_send_alarms" android:title="@string/title_lefun_send_alarms" /> <CheckBoxPreference android:defaultValue="true" android:dependency="lefun_send_alarms" android:key="lefun_option_shake_snoozes" android:title="@string/title_lefun_option_shake_snoozes" /> <CheckBoxPreference android:defaultValue="false" android:dependency="lefun_enabled" android:key="lefun_option_call_notifications" android:summary="Send call notifications to the band (Android 6+)" android:title="Send Calls" /> <PreferenceScreen android:title="@string/title_lefun_screens_features" android:key="lefun_features"> <PreferenceCategory android:title="@string/title_features"> <CheckBoxPreference android:defaultValue="true" android:key="lefun_feature_lift_to_wake" android:title="@string/title_lefun_feature_lift_to_wak" /> <CheckBoxPreference android:key="lefun_feature_anti_lost" android:title="@string/title_lefun_feature_anti_lost" /> <CheckBoxPreference android:defaultValue="true" android:key="lefun_locale_12_hour" android:title="@string/title_lefun_locale_12_hour" /> </PreferenceCategory> <PreferenceCategory android:title="@string/title_screens"> <CheckBoxPreference android:key="lefun_screen_step_counter" android:title="@string/title_lefun_screen_step_counter" /> <CheckBoxPreference android:key="lefun_screen_step_distance" android:title="@string/title_lefun_screen_step_distance" /> <CheckBoxPreference android:key="lefun_screen_step_calories" android:title="@string/title_lefun_screen_step_calories" /> <CheckBoxPreference android:key="lefun_screen_heart_rate" android:title="@string/title_lefun_screen_heart_rate" /> <CheckBoxPreference android:key="lefun_screen_heart_pressure" android:title="@string/title_lefun_screen_heart_pressure" /> <CheckBoxPreference android:key="lefun_screen_find_phone" android:title="@string/title_lefun_screen_find_phone" /> <CheckBoxPreference android:key="lefun_screen_mac_address" android:title="@string/title_lefun_screen_mac_address" /> </PreferenceCategory> </PreferenceScreen> </PreferenceScreen> <PreferenceScreen android:key="miband_preferences" android:title="@string/title_miband"> <SwitchPreference android:defaultValue="false" android:key="miband_enabled" android:summary="@string/summary_miband_enable" android:title="@string/title_miband_enable" /> <EditTextPreference android:key="miband_data_mac" android:title="@string/title_lefun_mac" android:summary="@string/summary_miband_mac" /> <EditTextPreference android:icon="@drawable/ic_vpn_key" android:key="miband_data_authkey" android:maxLength="32" android:summary="@string/summary_miband_authkey" android:title="@string/title_miband_authkey" /> <SwitchPreference android:defaultValue="true" android:dependency="miband_enabled" android:key="miband_send_readings" android:summary="@string/summary_lefun_send_readings" android:title="@string/title_lefun_send_readings" /> <SwitchPreference android:defaultValue="true" android:dependency="miband_send_readings" android:key="miband_send_readings_as_notification" android:summary="@string/summary_miband_send_readings_as_notification" android:title="@string/title_miband_send_readings_as_notification" /> <SwitchPreference android:defaultValue="true" android:dependency="miband_send_readings" android:key="miband_vibrate_on_readings" android:title="@string/title_miband_vibrate_on_readings" /> <SwitchPreference android:defaultValue="true" android:dependency="miband_enabled" android:key="miband_send_alarms" android:summary="@string/summary_lefun_send_alarms" android:title="@string/title_lefun_send_alarms" /> <CheckBoxPreference android:defaultValue="false" android:dependency="miband_enabled" android:key="miband_option_call_notifications" android:summary="@string/summary_miband_send_calls" android:title="@string/title_miband_send_calls" /> <PreferenceCategory android:title="@string/title_miband_graph_category" android:dependency="miband_enabled" android:key="miband_graph_category"> <CheckBoxPreference android:defaultValue="true" android:dependency="miband_enabled" android:key="miband_graph_enable" android:title="@string/title_miband_graph_enable" /> <EditTextPreference android:defaultValue="4" android:dependency="miband_graph_enable" android:digits="0123456789" android:inputType="number" android:key="miband_graph_hours" android:summary="@string/pref_amazfit_widget_graph_hours_summary" android:title="@string/pref_amazfit_watchface_graph_hours_title" /> <CheckBoxPreference android:defaultValue="true" android:dependency="miband_graph_enable" android:key="miband_graph_treatment_enable" android:title="@string/title_miband_graph_treatment_enable" /> </PreferenceCategory> <Preference android:key="update_miband_bg" android:dependency="miband_enabled" android:title="@string/title_miband_update_bg"/> <PreferenceCategory android:title="@string/title_miband_general_settings_category" android:dependency="miband_enabled"> <PreferenceScreen android:key="miband_settings" android:title="@string/title_miband_screens_features"> <PreferenceCategory android:title="@string/title_features"> <SwitchPreference android:defaultValue="true" android:key="miband_feature_lift_to_wake" android:title="@string/title_lefun_feature_lift_to_wak" /> <SwitchPreference android:defaultValue="true" android:key="miband_feature_switch_display_on_wrist" android:title="@string/title_miband_switch_display_on_wrist" /> <SwitchPreference android:defaultValue="true" android:switchTextOff="miles" android:switchTextOn="km" android:key="miband_feature_units" android:summary="@string/summary_miband_units" android:title="@string/title_miband_units" /> <SwitchPreference android:defaultValue="true" android:key="miband_feature_goal_notification" android:summary="@string/summary_miband_goal_notification" android:title="@string/title_miband_goal_notification" /> <SwitchPreference android:key="miband_feature_anti_lost" android:title="@string/title_lefun_feature_anti_lost" /> <SwitchPreference android:defaultValue="true" android:key="miband_feature_locale_24_hour" android:summary="@string/summary_miband_locale_24_hour" android:title="@string/title_miband_locale_24_hour" /> <SwitchPreference android:defaultValue="true" android:key="miband_feature_show_date" android:title="@string/title_miband_show_date" /> <SwitchPreference android:defaultValue="true" android:key="miband_feature_visibility" android:summary="@string/summary_miband_visibility" android:title="@string/title_miband_visibility" /> </PreferenceCategory> <PreferenceCategory android:key="miband_nightmode_category" android:title="@string/title_miband_nightmode_category"> <SwitchPreference android:defaultValue="false" android:key="miband_nightmode_enabled" android:summary="@string/summary_miband_nightmode_enabled" android:title="@string/title_miband_nightmode_enabled" /> <com.eveningoutpost.dexdrip.utils.TimePreference android:key="miband_nightmode_start" android:dependency="miband_nightmode_enabled" android:title="@string/title_miband_nightmode_start"> </com.eveningoutpost.dexdrip.utils.TimePreference> <com.eveningoutpost.dexdrip.utils.TimePreference android:key="miband_nightmode_end" android:dependency="miband_nightmode_enabled" android:title="@string/title_miband_nightmode_end"> </com.eveningoutpost.dexdrip.utils.TimePreference> <SeekBarPreference android:defaultValue="6" android:dependency="miband_enabled" android:key="miband_nightmode_interval" android:max="23" android:summary="@string/summary_miband_interval_in_nightmode" android:title="@string/title_miband_interval_in_nightmode" /> </PreferenceCategory> <SwitchPreference android:defaultValue="true" android:key="miband_collect_heartrate" android:summary="@string/summary_miband_colect_heartrate" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/title_miband_colect_heartrate" /> <PreferenceCategory android:key="miband2_screen" android:title="@string/title_screens"> <CheckBoxPreference android:key="miband_screen_step_counter" android:defaultValue="true" android:title="@string/title_lefun_screen_step_counter" /> <CheckBoxPreference android:key="miband_screen_step_distance" android:defaultValue="true" android:title="@string/title_lefun_screen_step_distance" /> <CheckBoxPreference android:key="miband_screen_step_calories" android:defaultValue="true" android:title="@string/title_lefun_screen_step_calories" /> <CheckBoxPreference android:key="miband_screen_heart_rate" android:defaultValue="true" android:title="@string/title_lefun_screen_heart_rate" /> <CheckBoxPreference android:key="miband_screen_battery" android:defaultValue="true" android:title="@string/title_miband_screen_battery" /> </PreferenceCategory> <PreferenceCategory android:key="miband3_4_screen" android:title="@string/title_screens"> <CheckBoxPreference android:key="miband_screen_notifications" android:defaultValue="true" android:title="@string/title_miband_screen_notifications" /> <CheckBoxPreference android:key="miband_screen_weather" android:defaultValue="true" android:title="@string/title_miband_screen_weather" /> <CheckBoxPreference android:key="miband_screen_activity" android:defaultValue="true" android:title="@string/title_miband_screen_activity" /> <CheckBoxPreference android:key="miband_screen_more" android:defaultValue="true" android:title="@string/title_miband_screen_more" /> <CheckBoxPreference android:key="miband_screen_status" android:defaultValue="true" android:title="@string/title_miband_screen_status" /> <CheckBoxPreference android:key="miband_screen_heart_rate" android:defaultValue="true" android:title="@string/title_miband_screen_heart_rate" /> <CheckBoxPreference android:key="miband_screen_timer" android:defaultValue="true" android:title="@string/title_miband_screen_timer" /> <CheckBoxPreference android:key="miband_screen_nfc" android:defaultValue="false" android:title="@string/title_miband_screen_nfc" /> </PreferenceCategory> </PreferenceScreen> </PreferenceCategory> <PreferenceCategory android:title="Experimental" android:key="debug_miband4" > <SwitchPreference android:defaultValue="false" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:dependency="miband_enabled" android:key="debug_miband_use_custom_watchface" android:title="Allow to use custom watchface" android:summary="You should place 'my_watchface.bin' and 'my_image.png' file into 'xdrip' folder on your phone"/> <EditTextPreference android:defaultValue="0" android:dependency="debug_miband_use_custom_watchface" android:key="debug_miband_image_offset" android:digits="0123456789" android:inputType="number" android:summary="Offset for autogenerated data from the beginning of 'my_image.png' file" android:title="Image offset(px)"/> <SwitchPreference android:defaultValue="false" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:dependency="miband_enabled" android:key="debug_miband_disable_hight_mtu" android:summary="Enabling this option in some cases can fix watchface syncronization error" android:title="Disable hight MTU values" /> </PreferenceCategory> </PreferenceScreen> <PreferenceScreen icon="@drawable/ic_heart_pulse_grey600_24dp" android:key="smartwatch_sensors_screen" android:title="@string/title_Smartwatch_Sensors"> <SwitchPreference android:defaultValue="true" android:key="use_pebble_health" android:summary="@string/your_sha256_hashilable" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/title_Use_Health_Data" /> <SwitchPreference android:defaultValue="true" android:key="use_wear_heartrate" android:summary="@string/summary_Activate_heart_rate_sensor_if_available" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/title_Heart_Rate_Sensor" /> <CheckBoxPreference android:defaultValue="true" android:dependency="use_wear_heartrate" android:key="smooth_heartrate" android:summary="@string/summary_Smooth_heart_rate_graph" /> </PreferenceScreen> </PreferenceScreen> <PreferenceCategory android:key="other_category" android:title="@string/other_settings"> <PreferenceScreen xmlns:android="path_to_url" android:icon="@drawable/ic_speak_reading_grey600_48dp" android:key="xdrip_speak_readings_settings" android:summary="@string/if_the_phone_has_text_to_speech" android:title="@string/speak_readings"> <SwitchPreference android:defaultValue="false" android:key="bg_to_speech" android:summary="@string/if_the_phone_has_text_to_speech" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/speak_readings" /> <SeekBarPreference android:defaultValue="0" android:dependency="bg_to_speech" android:key="speak_readings_change_threshold" android:max="300" android:min="0" android:summary="@string/title_When_changes_by" android:title="" /> <SeekBarPreference android:defaultValue="0" android:dependency="bg_to_speech" android:key="speak_readings_change_time" android:max="300" android:min="0" android:summary="@string/title_Or_per_number_of_minutes" android:title="" /> <SwitchPreference android:defaultValue="false" android:key="speak_alerts" android:summary="@string/Speak_Alerts_Summary" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/Speak_Alerts" /> <CheckBoxPreference android:defaultValue="true" android:dependency="bg_to_speech" android:key="bg_to_speech_trend" android:summary="@string/Speak_trend_arrow_name" /> <CheckBoxPreference android:defaultValue="false" android:dependency="bg_to_speech" android:key="bg_to_speech_repeat_twice" android:summary="@string/speak_glucose_twice" /> <CheckBoxPreference android:defaultValue="false" android:key="speak_twice" android:summary="@string/Speak_everything_twice" /> <EditTextPreference android:defaultValue="" android:key="speak_readings_custom_language" android:summary="@string/spoken_readings_locale" /> <SeekBarPreference android:defaultValue="7" android:key="speech_speed" android:max="20" android:min="2" android:summary="" android:title="@string/Speech_speed" /> <SeekBarPreference android:defaultValue="12" android:key="speech_pitch" android:max="20" android:min="4" android:summary="" android:title="@string/Speech_pitch" /> <CheckBoxPreference android:defaultValue="false" android:key="bg_to_speech_shortcut" android:summary="@string/short_speak_readings_shortcut" android:title="@string/speak_readings_shortcut" /> </PreferenceScreen> <PreferenceScreen xmlns:android="path_to_url" android:icon="@drawable/ic_open_in_app_grey600_48dp" android:key="xdrip_intrer_app_settings" android:summary="@string/for_interacting_compatible_apps" android:title="@string/interapp_settings"> <SwitchPreference android:defaultValue="false" android:key="broadcast_data_through_intents" android:summary="@string/pref_summary_broadcast_enabled" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/pref_title_broadcast_enabled" /> <CheckBoxPreference android:defaultValue="false" android:dependency="broadcast_data_through_intents" android:key="broadcast_data_use_best_glucose" android:summary="@string/use_plugins_for_brodcast" android:title="@string/send_display_glucose" /> <ListPreference android:defaultValue="200" android:dependency="broadcast_data_through_intents" android:entries="@array/NoiseLevelBlock" android:entryValues="@array/NoiseLevelBlockValues" android:key="noise_block_level" android:shouldDisableView="true" android:summary="@string/level_at_which_noisy_data_should_not_be_broadcast" android:title="@string/noise_blocking" /> <CheckBoxPreference android:defaultValue="true" android:dependency="broadcast_data_through_intents" android:key="broadcast_data_through_intents_without_permission" android:summary="@string/send_broadcasts_old_permission_model" android:title="@string/compatible_broadcast" /> <EditTextPreference android:dependency="broadcast_data_through_intents" android:key="local_broadcast_specific_package_destination" android:summary="@string/summary_Only_send_to_named_package" android:title="@string/title_Identify_receiver" /> <SwitchPreference android:defaultValue="true" android:key="accept_nsclient_sgv" android:title="@string/accept_glucose" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:summary="@string/process_glucose_data_received" /> <SwitchPreference android:defaultValue="true" android:key="accept_nsclient_treatments" android:summary="@string/process_nsclient_treatments" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/accept_treatments" /> <CheckBoxPreference android:defaultValue="false" android:dependency="accept_nsclient_treatments" android:key="profile_import_sound" android:summary="@string/play_sounds_when_importing" android:title="@string/import_sounds" /> <SwitchPreference android:defaultValue="true" android:key="accept_broadcast_calibrations" android:summary="@string/process_broadcasted_calibrations" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/title_Accept_Calibrations" /> <SwitchPreference android:defaultValue="true" android:key="accept_external_status" android:summary="@string/external_status_strings_eg_tbr" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/accept_external_status" /> <SwitchPreference android:defaultValue="false" android:key="xdrip_webservice" android:summary="@string/your_sha256_hashonic_etc" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/title_xDrip_Web_Service" /> <CheckBoxPreference android:defaultValue="false" android:dependency="xdrip_webservice" android:key="xdrip_webservice_open" android:summary="@string/your_sha256_hashrnally" android:title="@string/title_Open_Web_Service" /> <EditTextPreference android:defaultValue="" android:dependency="xdrip_webservice" android:key="xdrip_webservice_secret" android:summary="@string/summary_Shared_Secret_for_open_web_service" android:title="@string/title_xDrip_Web_Service_Secret" /> <SwitchPreference android:defaultValue="false" android:key="broadcast_service_enabled" android:summary="@string/summary_broadcast_service_api" android:title="@string/title_broadcast_service_api" /> <SwitchPreference android:defaultValue="true" android:key="enable_iob_in_api_endpoint" android:summary="@string/summary_enable_iob_in_api_endpoint" android:title="@string/title_enable_iob_in_api_endpoint" /> <SwitchPreference android:defaultValue="false" android:key="fetch_iob_from_companion_app" android:summary="@string/summary_fetch_iob_from_companion_app" android:title="@string/title_fetch_iob_from_companion_app" /> <PreferenceScreen android:title="@string/google_health_connect" android:summary="@string/send_and_receive_data_from_google_health_connect_and_google_fit" android:key="health_connect_screen"> <SwitchPreference android:key="health_connect_enable" android:title="@string/use_health_connect" android:summary="@string/your_sha256_hash4" /> <SwitchPreference android:key="health_connect_receive" android:defaultValue="true" android:summary="@string/get_data_from_health_connect" android:dependency="health_connect_enable" /> <SwitchPreference android:key="health_connect_send" android:summary="@string/send_data_to_health_connect" android:dependency="health_connect_enable" /> <Preference android:key="health_connect_manage" android:title="@string/manage_permissions" android:summary="@string/open_health_connect_settings_to_manually_manage_permissions" android:dependency="health_connect_enable"/> </PreferenceScreen> </PreferenceScreen> <PreferenceScreen xmlns:android="path_to_url" android:key="xdrip_less_common_settings" android:summary="@string/debug_and_other_misc_options" android:title="@string/less_common_settings"> <PreferenceScreen xmlns:android="path_to_url" android:key="xdrip_extra_status_line" android:summary="@string/options_for_extra_line" android:title="@string/extra_status_line"> <SwitchPreference android:defaultValue="false" android:key="extra_status_line" android:summary="@string/additional_text_status" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/extra_status_line" /> <SwitchPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="extra_status_stats_24h" android:summary="@string/sliding_24_hour_window_summary" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/sliding_24_hour_window" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_avg" android:summary="@string/todays_average_value" android:title="@string/average" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_a1c_dcct" android:summary="@string/ac1_estimation_dcct" android:title="@string/a1c_dcct" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_a1c_ifcc" android:summary="@string/ac1_estimation_ifcc" android:title="@string/a1c_ifcc" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_in" android:summary="@string/percentage_in_range" android:title="@string/in_percentage" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_high" android:summary="@string/percentage_above_range" android:title="@string/high_percentage" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_low" android:summary="@string/percentage_below_range" android:title="@string/low_percentage" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_stdev" android:summary="@string/show_standard_deviation" android:title="@string/standard_deviation" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_carbs" android:summary="@string/show_total_carbs" android:title="@string/total_carbs" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_insulin" android:summary="@string/show_total_insulin" android:title="@string/total_insulin" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_external_status" android:summary="@string/summary_Display_status_from_other_apps_like_AndroidAPS" android:title="@string/title_External_Status" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_pump_reservoir" android:summary="@string/summary_Display_pump_status_information_if_available" android:title="@string/title_Pump_Status" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_royce_ratio" android:summary="@string/summary_Show_treatment_carb_insulin_ratio" android:title="@string/title_Carb_Insulin_Ratio" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_capture_percentage" android:summary="@string/received_readings_percentage" android:title="@string/capture_percentage" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_realtime_capture_percentage" android:summary="@string/received_realtime_readings_percentage" android:title="@string/realtime_capture_percentage" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_accuracy" android:summary="@string/show_calibration_accuracy" android:title="@string/accuracy_evaluation" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_time" android:summary="@string/the_current_time" android:title="@string/time" /> <SwitchPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="widget_status_line" android:summary="@string/show_extra_status_on_widget" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/show_on_widget" /> <CheckBoxPreference android:defaultValue="true" android:dependency="extra_status_line" android:key="status_line_calibration_long" android:summary="@string/show_long_calibration_data" android:title="@string/calibration_data_long" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="status_line_calibration_short" android:summary="@string/show_short_calibration_data" android:title="@string/calibration_data_short" /> <CheckBoxPreference android:defaultValue="false" android:dependency="extra_status_line" android:key="extra_status_calibration_plugin" android:summary="@string/show_plugin_data" android:title="@string/calibration_plugin" /> </PreferenceScreen> <PreferenceScreen xmlns:android="path_to_url" android:key="xdrip_plus_calibration_settings" android:summary="@string/extra_calibration_options" android:title="@string/advanced_calibration"> <ListPreference android:defaultValue="auto" android:entries="@array/TreatmentCalibrationChoiceDetail" android:entryValues="@array/TreatmentCalibrationChoice" android:key="treatment_fingerstick_calibration_usage" android:shouldDisableView="true" android:summary="@string/choose_use_treament_bg" android:title="@string/usw_treatment_bg" /> <CheckBoxPreference android:defaultValue="false" android:key="bluetooth_meter_for_calibrations_auto" android:summary="@string/auto_calibration_good_conditions" android:title="@string/automatic_calibration" /> <ListPreference android:defaultValue="None" android:key="current_calibration_plugin" android:shouldDisableView="true" android:summary="@string/experimental_calibration_plugin" android:title="@string/calibration_plugin" /> <SwitchPreference android:defaultValue="false" android:key="plugin_plot_on_graph" android:summary="@string/show_plugin_results_on_graph" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/plugin_plot_on_graph" /> <SwitchPreference android:defaultValue="false" android:key="display_glucose_from_plugin" android:summary="@string/main_glucose_plugin" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/use_plugin_glucose" /> <SwitchPreference android:defaultValue="false" android:dependency="engineering_mode" android:enabled="false" android:key="use_pluggable_alg_as_primary" android:summary="@string/all_new_glucose_data_plugin" android:switchTextOff="@string/short_off_text_for_switches" android:switchTextOn="@string/short_on_text_for_switches" android:title="@string/plugin_override_all" /> <CheckBoxPreference android:defaultValue="true" android:key="use_double_calibrations" android:summary="@string/your_sha256_hash android:title="@string/title_Double_Calibrations" /> <CheckBoxPreference android:defaultValue="false" android:dependency="engineering_mode" android:key="old_school_calibration_mode" android:summary="@string/old_school_calibrations" android:title="@string/old_school_calibration_mode" /> <CheckBoxPreference android:defaultValue="true" android:key="infrequent_calibration" android:summary="@string/use_infrequent_calibrations" android:title="@string/infrequent_calibrations" /> <CheckBoxPreference android:defaultValue="true" android:key="use_non_fixed_li_parameters" android:summary="@string/your_sha256_hashthods" android:title="@string/title_Non_fixed_Libre_slopes" /> <CheckBoxPreference android:defaultValue="true" android:key="detect_libre_sn_changes" android:summary="Automatically stop if Libre serial changes unexpectedly" android:title="Check Libre Serial" /> <CheckBoxPreference android:defaultValue="false" android:key="bypass_calibration_quality_check" android:summary="@string/summary_Allow_initial_calibration_no_good_enough_data" android:title="@string/title_Bypass_quality_check" /> </PreferenceScreen> <PreferenceScreen xmlns:android="path_to_url" android:icon="@drawable/ic_bluetooth_settings_grey600_48dp" android:key="xdrip_bluetooth_adv_settings" android:summary="@string/advanced_bluetooth_settings" android:title="@string/bluetooth_settings"> <CheckBoxPreference android:defaultValue="true" android:key="automatically_turn_bluetooth_on" android:summary="@string/auto_turn_on_bluetooth" android:title="@string/turn_bluetooth_on" /> <CheckBoxPreference android:defaultValue="true" android:key="bluetooth_watchdog" android:summary="@string/reset_bluetooth" android:title="@string/bluetooth_watchdog" /> <EditTextPreference android:defaultValue="20" android:dependency="bluetooth_watchdog" android:inputType="numberDecimal" android:key="bluetooth_watchdog_timer" android:summary="@string/bluetooth_watchdog_timer_sums" android:title="@string/bluetooth_watchdog_timers" /> <CheckBoxPreference android:defaultValue="true" android:key="g5_bluetooth_watchdog" android:summary="@string/reset_bluetooth_g5" android:title="@string/g5_bluetooth_watchdog" /> <CheckBoxPreference android:defaultValue="false" android:key="close_gatt_on_ble_disconnect" android:summary="@string/close_gatt" android:title="@string/close_gatt_on_ble_disconnect" /> <CheckBoxPreference android:defaultValue="false" android:key="bluetooth_use_scan" android:summary="@string/summary_Scan_before_connecting_on_xBridge_and_Libre_bluetooth" android:title="@string/title_Use_scanning" /> <CheckBoxPreference android:defaultValue="true" android:key="bluetooth_trust_autoconnect" android:summary="@string/summary_Use_and_trust_Android_bluetooth_auto_connect_feature" android:title="@string/title_Trust_Auto_Connect" /> <CheckBoxPreference android:defaultValue="true" android:key="bluetooth_allow_background_scans" android:summary="@string/android_8_background_scanning" android:title="@string/use_background_scans" /> <CheckBoxPreference android:defaultValue="false" android:key="bluetails_enabled" android:summary="Use Bluetooth with companion app data source" android:title="Companion Bluetooth" /> <CheckBoxPreference android:defaultValue="false" android:key="bluetooth_excessive_wakelocks" android:summary="@string/older_bluetooth_wakelocks" android:title="@string/bluetooth_wakelocks" /> <CheckBoxPreference android:defaultValue="false" android:key="bluetooth_frequent_reset" android:summary="@string/reset_bluetooth_on_off" android:title="@string/constantly_reset_bluetooth" /> <CheckBoxPreference android:defaultValue="false" android:key="use_transmiter_pl_bluetooth" android:summary="@string/experimental_transmitter_fpv_uav" android:title="@string/transmitter_pl_support" /> <CheckBoxPreference android:defaultValue="false" android:key="use_rfduino_bluetooth" android:summary="@string/experimental_rdfuino_support" android:title="@string/rfduino_support" /> <CheckBoxPreference android:defaultValue="false" android:key="pref_dex_collection_polling" android:summary="@string/summary_Experimental_support_for_xBridge_polling_feature" android:title="@string/title_xBridge_Polling_Mode" /> <CheckBoxPreference android:defaultValue="true" android:dependency="engineering_mode" android:key="always_discover_services" android:summary="@string/summary_Probe_Bluetooth_services_on_every_connect" android:title="@string/title_Always_discover_services" /> <CheckBoxPreference android:defaultValue="true" android:key="blukon_unbonding" android:summary="@string/your_sha256_hash android:title="@string/title_Allow_blucon_unbonding" /> </PreferenceScreen> <PreferenceScreen xmlns:android="path_to_url" android:key="xdrip_blueReader_advanced_settings" android:summary="@string/advanced_bluereader_settings_summary" android:title="@string/advanced_bluereader_settings"> <CheckBoxPreference android:defaultValue="true" android:key="blueReader_restdays_on_home" android:summary="@string/bluereader_restdays_onhome_sum" android:title="@string/bluereader_restdays_onhome" /> <SwitchPreference android:defaultValue="false" android:key="blueReader_turn_off" android:summary="@string/bluereader_turnoff_sum" android:title="@string/bluereader_turnoff" /> <SeekBarPreference android:defaultValue="5" android:dependency="blueReader_turn_off" android:key="blueReader_turn_off_value" android:max="20" android:min="1" android:summary="@string/blueReader_turnoffvalue_sum" android:title="@string/blueReader_turnoffvalue" /> <SwitchPreference android:defaultValue="false" android:key="blueReader_suppressuglystatemsg" android:summary="@string/summary_Suppress_the_ugly_state_message_if_Problem_appears" android:title="@string/title_supress_ugly_state_message" /> <SwitchPreference android:defaultValue="false" android:key="blueReader_writebatterylog" android:summary="@string/summary_write_Battery_Information_for_additional_analytic" android:title="@string/title_Batterylog" /> </PreferenceScreen> <PreferenceScreen xmlns:android="path_to_url" android:key="xdrip_libre2_advanced_settings" android:title="@string/title_advanced_settings_4_Lib2"> <SwitchPreference android:defaultValue="false" android:key="Libre2_showRawGraph" android:summary="@string/summary_Lib2_show_raw_values" android:title="@string/title_Lib2_show_raw_values" /> <SwitchPreference android:defaultValue="false" android:key="Libre2_showSensors" android:summary="@string/summary_Lib2_show_sense_on_status" android:title="@string/title_Lib2_show_sense_on_status" /> </PreferenceScreen> <CheckBoxPreference android:defaultValue="true" android:key="aggressive_service_restart" android:summary="@string/repeatedly_restart_collection_service" android:title="@string/aggressive_service_restarts" /> <CheckBoxPreference android:defaultValue="false" android:key="interpret_raw" android:summary="@string/interpret_share_raw" android:title="@string/interpret_raw" /> <PreferenceScreen xmlns:android="path_to_url" android:key="xdrip_logging_adv_settings" android:title="@string/extra_logging"> <CheckBoxPreference android:defaultValue="false" android:enabled="false" android:key="enable_bugfender" android:summary="@string/send_logs_to_developer" android:title="@string/enable_remote_logging" /> <EditTextPreference android:defaultValue="" android:key="bugfender_appid" android:title="@string/set_logging_appid" /> <CheckBoxPreference android:defaultValue="false" android:dependency="engineering_mode" android:key="store_logs" android:summary="@string/only_enable_on_trouble" android:title="@string/store_logs" /> <EditTextPreference android:defaultValue="" android:dialogMessage="@string/extra_tags_dialog_message" android:dialogTitle="@string/extra_tags_dialog_title" android:inputType="textUri" android:key="extra_tags_for_logging" android:title="@string/extra_tags_for_logging" /> </PreferenceScreen> <CheckBoxPreference android:defaultValue="false" android:key="show_data_tables" android:summary="@string/show_datatables_in_app_drawer" android:title="@string/show_datatables" /> <CheckBoxPreference android:defaultValue="true" android:key="display_bridge_battery" android:summary="@string/summary_Choose_to_display_the_bridge_battery_level" android:title="@string/display_bridge_battery" /> <CheckBoxPreference android:defaultValue="false" android:key="disable_battery_warning" android:summary="@string/disable_log_transmitter_battery_warning" android:title="@string/disable_battery_warning" /> <CheckBoxPreference android:defaultValue="false" android:key="save_db_ondemand" android:summary="@string/allow_daily_db_save" android:title="@string/daily_save_db" /> <EditTextPreference android:defaultValue="0" android:key="retention_days_bg_reading" android:max="366" android:numeric="integer" android:summary="@string/summary_Erase_data_older_than_this_many_days" android:title="@string/title_Glucose_Retention" /> <PreferenceScreen xmlns:android="path_to_url" android:key="xdrip_other_misc_extra_screen" android:summary="" android:title="@string/title_Other_misc_options"> <CheckBoxPreference android:defaultValue="true" android:key="run_service_in_foreground" android:summary="@string/shows_a_persistent_notification" android:title="@string/run_collector_in_foreground" /> <CheckBoxPreference android:defaultValue="false" android:dependency="engineering_mode" android:key="engineering_mode" android:summary="@string/allow_unsafe_settings" android:title="@string/engineering_mode" /> <CheckBoxPreference android:defaultValue="false" android:key="requested_ignore_battery_optimizations_new" android:summary="@string/battery_optimization_on" android:title="@string/battery_optimization_prompt" /> <CheckBoxPreference android:defaultValue="true" android:key="allow_samsung_workaround" android:summary="@string/summary_allow_samsung_workaround" android:title="@string/title_allow_samsung_workaround" /> <CheckBoxPreference android:defaultValue="false" android:key="excessive_wakelocks" android:summary="@string/older_gratuitous_wakelocks" android:title="@string/use_excessive_wakelocks" /> <CheckBoxPreference android:defaultValue="false" android:dependency="engineering_mode" android:key="predictive_bg" android:summary="@string/predictive_readings_old" android:title="@string/display_predictive_values" /> <CheckBoxPreference android:defaultValue="true" android:dependency="engineering_mode" android:key="use_proper_ongoing" android:summary="Use proper ongoing notification. Disabling this causes collector problems on Android 8+" android:title="Proper ongoing" /> <CheckBoxPreference android:defaultValue="false" android:key="external_blukon_algorithm" android:summary="@string/use_external_blukon_algorithm_summary" android:title="@string/use_external_blukon_algorithm" /> <ListPreference android:defaultValue="calibrate_raw" android:entries="@array/CalibrateExternalLibre2" android:entryValues="@array/CalibrateExternalLibre2Values" android:key="calibrate_external_libre_2_algorithm_type" android:summary="@string/calibrate_external_libre_2_algorithm_summary" android:title="@string/calibrate_external_libre_2_algorithm_title" /> <CheckBoxPreference android:defaultValue="false" android:enabled="true" android:key="libre_use_smoothed_data" android:summary="@string/libre_use_smoothed_data_summary" android:title="@string/libre_use_smoothed_data_title" /> <CheckBoxPreference android:defaultValue="false" android:enabled="true" android:key="retrieve_blukon_history" android:summary="@string/retrieve_blukon_history_summary" android:title="@string/retrieve_blukon_history_title" /> <CheckBoxPreference android:defaultValue="false" android:dependency="engineering_mode" android:enabled="true" android:key="libre_one_minute" android:summary="Accept data at one minute intervals from Libre source. WARNING: This feature is still under development and may break different things. Currently only for patched app data source. Please report anything you notice not working and to activate changes to this setting you need to reboot your phone. Requires engineering mode to be enabled to change setting." android:title="Libre one minute" /> <CheckBoxPreference android:defaultValue="false" android:dependency="allow_testing_with_dead_sensor" android:key="allow_testing_with_dead_sensor" android:summary="@string/summary_allow_testing_with_dead_sensor" android:title="@string/title_NOT_FOR_PRODUCTION_USE" /> </PreferenceScreen> <PreferenceCategory android:key="community_help_category" android:title="@string/help_the_community"> <CheckBoxPreference android:defaultValue="false" android:key="store_sensor_location" android:summary="@string/help_the_developers_improve_the_algorithm" android:title="@string/store_sensor_location_to_help" /> </PreferenceCategory> </PreferenceScreen> </PreferenceCategory> </PreferenceScreen> ```
/content/code_sandbox/app/src/main/res/xml/pref_advanced_settings.xml
xml
2016-09-23T13:33:17
2024-08-15T09:51:19
xDrip
NightscoutFoundation/xDrip
1,365
14,906
```xml <?xml version="1.0" encoding="UTF-8"?> <xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2"> <file source-language="en" target-language="ja" datatype="plaintext" original="reporting.en.xlf"> <body> </body> </file> </xliff> ```
/content/code_sandbox/translations/reporting.ja.xlf
xml
2016-10-20T17:06:34
2024-08-16T18:27:30
kimai
kimai/kimai
3,084
84
```xml import {getJsonSchema} from "../../utils/getJsonSchema.js"; import {DateFormat, DateTime, Email, Format, TimeFormat, Uri, Url} from "./format.js"; describe("@Format", () => { it("should declare prop", () => { // WHEN class Model { @Format("email") email: string; } // THEN expect(getJsonSchema(Model)).toEqual({ properties: { email: { format: "email", type: "string" } }, type: "object" }); }); }); describe("@Email", () => { it("should declare prop", () => { // WHEN class Model { @Email() email: string; } // THEN expect(getJsonSchema(Model)).toEqual({ properties: { email: { format: "email", type: "string" } }, type: "object" }); }); }); describe("@DateFormat", () => { it("should declare prop", () => { // WHEN class Model { @DateFormat() prop: string; } // THEN expect(getJsonSchema(Model)).toEqual({ properties: { prop: { format: "date", type: "string" } }, type: "object" }); }); }); describe("@TimeFormat", () => { it("should declare prop", () => { // WHEN class Model { @TimeFormat() prop: string; } // THEN expect(getJsonSchema(Model)).toEqual({ properties: { prop: { format: "time", type: "string" } }, type: "object" }); }); }); describe("@DateTime", () => { it("should declare prop", () => { // WHEN class Model { @DateTime() prop: string; } // THEN expect(getJsonSchema(Model)).toEqual({ properties: { prop: { format: "date-time", type: "string" } }, type: "object" }); }); }); describe("@Uri", () => { it("should declare prop", () => { // WHEN class Model { @Uri() prop: string; } // THEN expect(getJsonSchema(Model)).toEqual({ properties: { prop: { format: "uri", type: "string" } }, type: "object" }); }); }); describe("@Url", () => { it("should declare prop", () => { // WHEN class Model { @Url() prop: string; } // THEN expect(getJsonSchema(Model)).toEqual({ properties: { prop: { format: "url", type: "string" } }, type: "object" }); }); }); ```
/content/code_sandbox/packages/specs/schema/src/decorators/common/format.spec.ts
xml
2016-02-21T18:38:47
2024-08-14T21:19:48
tsed
tsedio/tsed
2,817
630
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import Complex128Array = require( '@stdlib/array/complex128' ); import Complex64Array = require( '@stdlib/array/complex64' ); import slice = require( './index' ); // TESTS // // The function returns an array... { slice( [ 1, 2, 3 ], 0, 3 ); // $ExpectType number[] slice( new Float64Array( [ 1, 2, 3 ] ), 0, 3 ); // $ExpectType Float64Array slice( new Float32Array( [ 1, 2, 3 ] ), 0, 3 ); // $ExpectType Float32Array slice( new Int32Array( [ 1, 2, 3 ] ), 0, 3 ); // $ExpectType Int32Array slice( new Int16Array( [ 1, 2, 3 ] ), 0, 3 ); // $ExpectType Int16Array slice( new Int8Array( [ 1, 2, 3 ] ), 0, 3 ); // $ExpectType Int8Array slice( new Uint32Array( [ 1, 2, 3 ] ), 0, 3 ); // $ExpectType Uint32Array slice( new Uint16Array( [ 1, 2, 3 ] ), 0, 3 ); // $ExpectType Uint16Array slice( new Uint8Array( [ 1, 2, 3 ] ), 0, 3 ); // $ExpectType Uint8Array slice( new Uint8ClampedArray( [ 1, 2, 3 ] ), 0, 3 ); // $ExpectType Uint8ClampedArray slice( new Complex128Array( [ 1, 2, 3, 4, 5, 6 ] ), 0, 3 ); // $ExpectType Complex128Array slice( new Complex64Array( [ 1, 2, 3, 4, 5, 6 ] ), 0, 3 ); // $ExpectType Complex64Array } // The compiler throws an error if the function is provided a first argument which is not a collection... { slice( 5, 0, 3 ); // $ExpectError slice( true, 0, 3 ); // $ExpectError slice( false, 0, 3 ); // $ExpectError slice( null, 0, 3 ); // $ExpectError slice( void 0, 0, 3 ); // $ExpectError slice( {}, 0, 3 ); // $ExpectError } // The compiler throws an error if the function is provided a second argument which is not a number... { const x = [ 1, 2, 3 ]; slice( x, '5', 3 ); // $ExpectError slice( x, true, 3 ); // $ExpectError slice( x, false, 3 ); // $ExpectError slice( x, null, 3 ); // $ExpectError slice( x, void 0, 3 ); // $ExpectError slice( x, {}, 3 ); // $ExpectError slice( x, ( x: number ): number => x, 3 ); // $ExpectError } // The compiler throws an error if the function is provided a third argument which is not a number... { const x = [ 1, 2, 3 ]; slice( x, 0, '5' ); // $ExpectError slice( x, 0, true ); // $ExpectError slice( x, 0, false ); // $ExpectError slice( x, 0, null ); // $ExpectError slice( x, 0, void 0 ); // $ExpectError slice( x, 0, {} ); // $ExpectError slice( x, 0, ( x: number ): number => x ); // $ExpectError } // The compiler throws an error if the function is provided an unsupported number of arguments... { slice(); // $ExpectError slice( [ 1, 2, 3 ] ); // $ExpectError slice( [ 1, 2, 3 ], 0 ); // $ExpectError slice( [ 1, 2, 3 ], 0, 3, {} ); // $ExpectError } ```
/content/code_sandbox/lib/node_modules/@stdlib/array/base/slice/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
1,025
```xml import StockData from '../StockData'; import CandlestickFinder from './CandlestickFinder'; export default class GraveStoneDoji extends CandlestickFinder { constructor() { super(); this.requiredCount = 1; this.name = 'GraveStoneDoji'; } logic (data:StockData) { let daysOpen = data.open[0]; let daysClose = data.close[0]; let daysHigh = data.high[0]; let daysLow = data.low[0]; let isOpenEqualsClose = this.approximateEqual(daysOpen, daysClose); let isHighEqualsOpen = isOpenEqualsClose && this.approximateEqual(daysOpen, daysHigh); let isLowEqualsClose = isOpenEqualsClose && this.approximateEqual(daysClose, daysLow); return (isOpenEqualsClose && isLowEqualsClose && !isHighEqualsOpen); } } export function gravestonedoji(data:StockData) { return new GraveStoneDoji().hasPattern(data); } ```
/content/code_sandbox/src/candlestick/GraveStoneDoji.ts
xml
2016-05-02T19:16:32
2024-08-15T14:25:09
technicalindicators
anandanand84/technicalindicators
2,137
219
```xml import { describe, expect, it } from 'vitest'; import { ArgsToTemplateOptions, argsToTemplate } from './argsToTemplate'; // adjust path describe('argsToTemplate', () => { it('should correctly convert args to template string and exclude undefined values', () => { const args: Record<string, any> = { prop1: 'value1', prop2: undefined, prop3: 'value3', }; const options: ArgsToTemplateOptions<keyof typeof args> = {}; const result = argsToTemplate(args, options); expect(result).toBe('[prop1]="prop1" [prop3]="prop3"'); }); it('should include properties from include option', () => { const args = { prop1: 'value1', prop2: 'value2', prop3: 'value3', }; const options: ArgsToTemplateOptions<keyof typeof args> = { include: ['prop1', 'prop3'], }; const result = argsToTemplate(args, options); expect(result).toBe('[prop1]="prop1" [prop3]="prop3"'); }); it('should include non-undefined properties from include option', () => { const args: Record<string, any> = { prop1: 'value1', prop2: 'value2', prop3: undefined, }; const options: ArgsToTemplateOptions<keyof typeof args> = { include: ['prop1', 'prop3'], }; const result = argsToTemplate(args, options); expect(result).toBe('[prop1]="prop1"'); }); it('should exclude properties from exclude option', () => { const args = { prop1: 'value1', prop2: 'value2', prop3: 'value3', }; const options: ArgsToTemplateOptions<keyof typeof args> = { exclude: ['prop2'], }; const result = argsToTemplate(args, options); expect(result).toBe('[prop1]="prop1" [prop3]="prop3"'); }); it('should exclude properties from exclude option and undefined properties', () => { const args: Record<string, any> = { prop1: 'value1', prop2: 'value2', prop3: undefined, }; const options: ArgsToTemplateOptions<keyof typeof args> = { exclude: ['prop2'], }; const result = argsToTemplate(args, options); expect(result).toBe('[prop1]="prop1"'); }); it('should prioritize include over exclude when both options are given', () => { const args = { prop1: 'value1', prop2: 'value2', prop3: 'value3', }; const options: ArgsToTemplateOptions<keyof typeof args> = { include: ['prop1', 'prop2'], exclude: ['prop2', 'prop3'], }; const result = argsToTemplate(args, options); expect(result).toBe('[prop1]="prop1" [prop2]="prop2"'); }); it('should work when neither include nor exclude options are given', () => { const args = { prop1: 'value1', prop2: 'value2', }; const options: ArgsToTemplateOptions<keyof typeof args> = {}; const result = argsToTemplate(args, options); expect(result).toBe('[prop1]="prop1" [prop2]="prop2"'); }); it('should bind events correctly when value is a function', () => { const args = { event1: () => {}, event2: () => {} }; const result = argsToTemplate(args, {}); expect(result).toEqual('(event1)="event1($event)" (event2)="event2($event)"'); }); it('should mix properties and events correctly', () => { const args = { input: 'Value1', event1: () => {} }; const result = argsToTemplate(args, {}); expect(result).toEqual('[input]="input" (event1)="event1($event)"'); }); it('should format for non dot notation', () => { const args = { 'non-dot': 'Value1', 'dash-out': () => {} }; const result = argsToTemplate(args, {}); expect(result).toEqual('[non-dot]="this[\'non-dot\']" (dash-out)="this[\'dash-out\']($event)"'); }); }); ```
/content/code_sandbox/code/frameworks/angular/src/client/argsToTemplate.test.ts
xml
2016-03-18T04:23:44
2024-08-16T19:22:08
storybook
storybookjs/storybook
83,755
984
```xml <vector xmlns:android="path_to_url" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24"> <path android:fillColor="#FF000000" android:pathData="M15.386,0.524c-4.764,0 -8.64,3.876 -8.64,8.64 0,4.75 3.876,8.613 8.64,8.613 4.75,0 8.614,-3.864 8.614,-8.613C24,4.4 20.136,0.524 15.386,0.524M0.003,23.537h4.22V0.524H0.003"/> </vector> ```
/content/code_sandbox/app/core/src/main/res/drawable/ic_patreon.xml
xml
2016-09-08T12:42:53
2024-08-16T19:41:25
Magisk
topjohnwu/Magisk
46,424
182
```xml import * as React from "react"; import type { DefaultOptions } from "../../core/index.js"; import { ApolloClient } from "../../core/index.js"; import { InMemoryCache as Cache } from "../../cache/index.js"; import { ApolloProvider } from "../../react/context/index.js"; import type { MockedResponse } from "../core/index.js"; import { MockLink } from "../core/index.js"; import type { ApolloLink } from "../../link/core/index.js"; import type { Resolvers } from "../../core/index.js"; import type { ApolloCache } from "../../cache/index.js"; export interface MockedProviderProps<TSerializedCache = {}> { mocks?: ReadonlyArray<MockedResponse<any, any>>; addTypename?: boolean; defaultOptions?: DefaultOptions; cache?: ApolloCache<TSerializedCache>; resolvers?: Resolvers; childProps?: object; children?: any; link?: ApolloLink; showWarnings?: boolean; /** * If set to true, the MockedProvider will try to connect to the Apollo DevTools. * Defaults to false. */ connectToDevTools?: boolean; } export interface MockedProviderState { client: ApolloClient<any>; } export class MockedProvider extends React.Component< MockedProviderProps, MockedProviderState > { public static defaultProps: MockedProviderProps = { addTypename: true, }; constructor(props: MockedProviderProps) { super(props); const { mocks, addTypename, defaultOptions, cache, resolvers, link, showWarnings, connectToDevTools = false, } = this.props; const client = new ApolloClient({ cache: cache || new Cache({ addTypename }), defaultOptions, connectToDevTools, link: link || new MockLink(mocks || [], addTypename, { showWarnings }), resolvers, }); this.state = { client, }; } public render() { const { children, childProps } = this.props; const { client } = this.state; return React.isValidElement(children) ? <ApolloProvider client={client}> {React.cloneElement(React.Children.only(children), { ...childProps })} </ApolloProvider> : null; } public componentWillUnmount() { // Since this.state.client was created in the constructor, it's this // MockedProvider's responsibility to terminate it. this.state.client.stop(); } } ```
/content/code_sandbox/src/testing/react/MockedProvider.tsx
xml
2016-02-26T20:25:00
2024-08-16T10:56:57
apollo-client
apollographql/apollo-client
19,304
531
```xml import React from "react"; import { GraphQLError } from "graphql"; import gql from "graphql-tag"; import { act, render, renderHook, waitFor } from "@testing-library/react"; import { ApolloClient, ApolloError, ApolloLink, ErrorPolicy, InMemoryCache, NetworkStatus, TypedDocumentNode, } from "../../../core"; import { Observable } from "../../../utilities"; import { ApolloProvider } from "../../../react"; import { MockedProvider, mockSingleLink, wait, tick, MockSubscriptionLink, MockLink, } from "../../../testing"; import { useLazyQuery } from "../useLazyQuery"; import { QueryResult } from "../../types/types"; import { profileHook } from "../../../testing/internal"; import { InvariantError } from "../../../utilities/globals"; describe("useLazyQuery Hook", () => { const helloQuery: TypedDocumentNode<{ hello: string; }> = gql` query { hello } `; it("should hold query execution until manually triggered", async () => { const mocks = [ { request: { query: helloQuery }, result: { data: { hello: "world" } }, delay: 50, }, ]; const { result } = renderHook(() => useLazyQuery(helloQuery), { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); expect(result.current[1].loading).toBe(false); expect(result.current[1].data).toBe(undefined); const execute = result.current[0]; setTimeout(() => execute()); await waitFor( () => { expect(result.current[1].loading).toBe(true); }, { interval: 1 } ); await waitFor( () => { expect(result.current[1].loading).toBe(false); }, { interval: 1 } ); expect(result.current[1].data).toEqual({ hello: "world" }); }); it("should set `called` to false by default", async () => { const mocks = [ { request: { query: helloQuery }, result: { data: { hello: "world" } }, delay: 20, }, ]; const { result } = renderHook(() => useLazyQuery(helloQuery), { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); expect(result.current[1].loading).toBe(false); expect(result.current[1].data).toBe(undefined); expect(result.current[1].called).toBe(false); }); it("should set `called` to true after calling the lazy execute function", async () => { const mocks = [ { request: { query: helloQuery }, result: { data: { hello: "world" } }, delay: 20, }, ]; const ProfiledHook = profileHook(() => useLazyQuery(helloQuery)); render(<ProfiledHook />, { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.called).toBe(false); } const execute = ProfiledHook.getCurrentSnapshot()[0]; setTimeout(() => execute()); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.called).toBe(true); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.called).toBe(true); } }); it("should override `skip` if lazy mode execution function is called", async () => { const mocks = [ { request: { query: helloQuery }, result: { data: { hello: "world" } }, delay: 20, }, ]; const ProfiledHook = profileHook( // skip isnt actually an option on the types () => useLazyQuery(helloQuery, { skip: true } as any) ); render(<ProfiledHook />, { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.called).toBe(false); } const execute = ProfiledHook.getCurrentSnapshot()[0]; setTimeout(() => execute()); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.called).toBe(true); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.called).toBe(true); } }); it("should use variables defined in hook options (if any), when running the lazy execution function", async () => { const query = gql` query ($id: number) { hello(id: $id) } `; const mocks = [ { request: { query, variables: { id: 1 } }, result: { data: { hello: "world 1" } }, delay: 20, }, ]; const ProfiledHook = profileHook(() => useLazyQuery(query, { variables: { id: 1 }, }) ); render(<ProfiledHook />, { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); } const execute = ProfiledHook.getCurrentSnapshot()[0]; setTimeout(() => execute()); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual({ hello: "world 1" }); } }); it("should use variables passed into lazy execution function, overriding similar variables defined in Hook options", async () => { const query = gql` query ($id: number) { hello(id: $id) } `; const mocks = [ { request: { query, variables: { id: 1 } }, result: { data: { hello: "world 1" } }, delay: 20, }, { request: { query, variables: { id: 2 } }, result: { data: { hello: "world 2" } }, delay: 20, }, ]; const { result } = renderHook( () => useLazyQuery(query, { variables: { id: 1 }, }), { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), } ); const execute = result.current[0]; setTimeout(() => execute({ variables: { id: 2 } })); await waitFor( () => { expect(result.current[1].loading).toBe(true); }, { interval: 1 } ); await waitFor( () => { expect(result.current[1].loading).toBe(false); }, { interval: 1 } ); expect(result.current[1].data).toEqual({ hello: "world 2" }); }); it("should merge variables from original hook and execution function", async () => { const counterQuery: TypedDocumentNode< { counter: number; }, { hookVar?: boolean; execVar?: boolean; localDefaultVar?: boolean; globalDefaultVar?: boolean; } > = gql` query GetCounter( $hookVar: Boolean $execVar: Boolean $localDefaultVar: Boolean $globalDefaultVar: Boolean ) { counter vars } `; let count = 0; const client = new ApolloClient({ defaultOptions: { watchQuery: { variables: { globalDefaultVar: true, }, }, }, cache: new InMemoryCache(), link: new ApolloLink( (request) => new Observable((observer) => { if (request.operationName === "GetCounter") { observer.next({ data: { counter: ++count, vars: request.variables, }, }); setTimeout(() => { observer.complete(); }, 10); } else { observer.error( new Error( `Unknown query: ${request.operationName || request.query}` ) ); } }) ), }); const { result } = renderHook( () => { const [exec, query] = useLazyQuery(counterQuery, { notifyOnNetworkStatusChange: true, variables: { hookVar: true, }, defaultOptions: { variables: { localDefaultVar: true, }, }, }); return { exec, query, }; }, { wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), } ); await waitFor( () => { expect(result.current.query.loading).toBe(false); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.called).toBe(false); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.data).toBeUndefined(); }, { interval: 1 } ); const expectedFinalData = { counter: 1, vars: { globalDefaultVar: true, localDefaultVar: true, hookVar: true, execVar: true, }, }; const execResult = await result.current.exec({ variables: { execVar: true, }, }); await waitFor( () => { expect(execResult.loading).toBe(false); }, { interval: 1 } ); await waitFor( () => { expect(execResult.called).toBe(true); }, { interval: 1 } ); await waitFor( () => { expect(execResult.networkStatus).toBe(NetworkStatus.ready); }, { interval: 1 } ); await waitFor( () => { expect(execResult.data).toEqual(expectedFinalData); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.called).toBe(true); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.loading).toBe(false); }, { interval: 10 } ); expect(result.current.query.called).toBe(true); expect(result.current.query.data).toEqual(expectedFinalData); const refetchResult = await result.current.query.reobserve({ fetchPolicy: "network-only", nextFetchPolicy: "cache-first", variables: { execVar: false, }, }); expect(refetchResult.loading).toBe(false); expect(refetchResult.data).toEqual({ counter: 2, vars: { execVar: false, }, }); await waitFor( () => { expect(result.current.query.loading).toBe(false); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.called).toBe(true); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.data).toEqual({ counter: 2, vars: { execVar: false, }, }); }, { interval: 1 } ); const execResult2 = await result.current.exec({ fetchPolicy: "cache-and-network", nextFetchPolicy: "cache-first", variables: { execVar: true, }, }); await waitFor( () => { expect(execResult2.loading).toBe(false); }, { interval: 1 } ); await waitFor( () => { expect(execResult2.called).toBe(true); }, { interval: 1 } ); await waitFor( () => { expect(execResult2.data).toEqual({ counter: 3, vars: { ...expectedFinalData.vars, execVar: true, }, }); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.called).toBe(true); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.loading).toBe(false); }, { interval: 10 } ); expect(result.current.query.called).toBe(true); expect(result.current.query.data).toEqual({ counter: 3, vars: { ...expectedFinalData.vars, execVar: true, }, }); }); it("changing queries", async () => { const query1 = gql` query { hello } `; const query2 = gql` query { name } `; const mocks = [ { request: { query: query1 }, result: { data: { hello: "world" } }, delay: 20, }, { request: { query: query2 }, result: { data: { name: "changed" } }, delay: 20, }, ]; const cache = new InMemoryCache(); const ProfiledHook = profileHook(() => useLazyQuery(query1)); render(<ProfiledHook />, { wrapper: ({ children }) => ( <MockedProvider mocks={mocks} cache={cache}> {children} </MockedProvider> ), }); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toBe(undefined); } const execute = ProfiledHook.getCurrentSnapshot()[0]; setTimeout(() => execute()); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual({ hello: "world" }); } setTimeout(() => execute({ query: query2 })); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual({ name: "changed" }); } }); it('should fetch data each time the execution function is called, when using a "network-only" fetch policy', async () => { const mocks = [ { request: { query: helloQuery }, result: { data: { hello: "world 1" } }, delay: 20, }, { request: { query: helloQuery }, result: { data: { hello: "world 2" } }, delay: 20, }, ]; const ProfiledHook = profileHook(() => useLazyQuery(helloQuery, { fetchPolicy: "network-only", }) ); render(<ProfiledHook />, { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); } const execute = ProfiledHook.getCurrentSnapshot()[0]; setTimeout(() => execute()); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual({ hello: "world 1" }); } setTimeout(() => execute()); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.data).toEqual({ hello: "world 1" }); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual({ hello: "world 2" }); } }); it("should persist previous data when a query is re-run", async () => { const mocks = [ { request: { query: helloQuery }, result: { data: { hello: "world 1" } }, delay: 20, }, { request: { query: helloQuery }, result: { data: { hello: "world 2" } }, delay: 20, }, ]; const ProfiledHook = profileHook(() => useLazyQuery(helloQuery, { notifyOnNetworkStatusChange: true, }) ); render(<ProfiledHook />, { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toBe(undefined); expect(result.previousData).toBe(undefined); } const execute = ProfiledHook.getCurrentSnapshot()[0]; setTimeout(() => execute()); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.data).toBe(undefined); expect(result.previousData).toBe(undefined); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual({ hello: "world 1" }); expect(result.previousData).toBe(undefined); } const refetch = ProfiledHook.getCurrentSnapshot()[1].refetch; setTimeout(() => refetch!()); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.data).toEqual({ hello: "world 1" }); expect(result.previousData).toEqual({ hello: "world 1" }); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual({ hello: "world 2" }); expect(result.previousData).toEqual({ hello: "world 1" }); } }); it("should allow for the query to start with polling", async () => { const mocks = [ { request: { query: helloQuery }, result: { data: { hello: "world 1" } }, delay: 10, }, { request: { query: helloQuery }, result: { data: { hello: "world 2" } }, }, { request: { query: helloQuery }, result: { data: { hello: "world 3" } }, }, ]; const wrapper = ({ children }: any) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ); const ProfiledHook = profileHook(() => useLazyQuery(helloQuery)); render(<ProfiledHook />, { wrapper }); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toBe(undefined); } await tick(); ProfiledHook.getCurrentSnapshot()[1].startPolling(10); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual({ hello: "world 1" }); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual({ hello: "world 2" }); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual({ hello: "world 3" }); } ProfiledHook.getCurrentSnapshot()[1].stopPolling(); expect(ProfiledHook).not.toRerender(); }); it("should persist previous data when a query is re-run and variable changes", async () => { const CAR_QUERY_BY_ID = gql` query ($id: Int) { car(id: $id) { make model } } `; const data1 = { car: { make: "Audi", model: "A4", __typename: "Car", }, }; const data2 = { car: { make: "Audi", model: "RS8", __typename: "Car", }, }; const mocks = [ { request: { query: CAR_QUERY_BY_ID, variables: { id: 1 } }, result: { data: data1 }, delay: 20, }, { request: { query: CAR_QUERY_BY_ID, variables: { id: 2 } }, result: { data: data2 }, delay: 20, }, ]; const ProfiledHook = profileHook(() => useLazyQuery(CAR_QUERY_BY_ID)); render(<ProfiledHook />, { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toBe(undefined); expect(result.previousData).toBe(undefined); } const execute = ProfiledHook.getCurrentSnapshot()[0]; setTimeout(() => execute({ variables: { id: 1 } })); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.data).toBe(undefined); expect(result.previousData).toBe(undefined); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual(data1); expect(result.previousData).toBe(undefined); } setTimeout(() => execute({ variables: { id: 2 } })); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.data).toBe(undefined); expect(result.previousData).toEqual(data1); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toEqual(data2); expect(result.previousData).toEqual(data1); } }); it("should work with cache-and-network fetch policy", async () => { const cache = new InMemoryCache(); const link = mockSingleLink({ request: { query: helloQuery }, result: { data: { hello: "from link" } }, delay: 20, }); const client = new ApolloClient({ link, cache, }); cache.writeQuery({ query: helloQuery, data: { hello: "from cache" } }); const { result } = renderHook( () => useLazyQuery(helloQuery, { fetchPolicy: "cache-and-network" }), { wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), } ); expect(result.current[1].loading).toBe(false); expect(result.current[1].data).toBe(undefined); const execute = result.current[0]; setTimeout(() => execute()); await waitFor( () => { expect(result.current[1].loading).toBe(true); }, { interval: 1 } ); // TODO: FIXME expect(result.current[1].data).toEqual({ hello: "from cache" }); await waitFor( () => { expect(result.current[1].loading).toBe(false); }, { interval: 1 } ); expect(result.current[1].data).toEqual({ hello: "from link" }); }); it("should return a promise from the execution function which resolves with the result", async () => { const mocks = [ { request: { query: helloQuery }, result: { data: { hello: "world" } }, delay: 20, }, ]; const { result } = renderHook(() => useLazyQuery(helloQuery), { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); expect(result.current[1].loading).toBe(false); expect(result.current[1].data).toBe(undefined); const execute = result.current[0]; const executeResult = new Promise<QueryResult<any, any>>((resolve) => { setTimeout(() => resolve(execute())); }); await waitFor( () => { expect(result.current[1].loading).toBe(true); }, { interval: 1 } ); let latestRenderResult: QueryResult; await waitFor(() => { latestRenderResult = result.current[1]; expect(latestRenderResult.loading).toBe(false); }); await waitFor(() => { latestRenderResult = result.current[1]; expect(latestRenderResult.data).toEqual({ hello: "world" }); }); return executeResult.then((finalResult) => { expect(finalResult).toEqual(latestRenderResult); }); }); it("should have matching results from execution function and hook", async () => { const query = gql` query GetCountries($filter: String) { countries(filter: $filter) { code name } } `; const mocks = [ { request: { query, variables: { filter: "PA", }, }, result: { data: { countries: { code: "PA", name: "Panama", }, }, }, delay: 20, }, { request: { query, variables: { filter: "BA", }, }, result: { data: { countries: { code: "BA", name: "Bahamas", }, }, }, delay: 20, }, ]; const { result } = renderHook(() => useLazyQuery(query), { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); expect(result.current[1].loading).toBe(false); expect(result.current[1].data).toBe(undefined); const execute = result.current[0]; let executeResult: any; setTimeout(() => { executeResult = execute({ variables: { filter: "PA" } }); }); await waitFor( () => { expect(result.current[1].loading).toBe(true); }, { interval: 1 } ); await waitFor( () => { expect(result.current[1].loading).toBe(false); }, { interval: 1 } ); expect(result.current[1].data).toEqual({ countries: { code: "PA", name: "Panama", }, }); expect(executeResult).toBeInstanceOf(Promise); expect((await executeResult).data).toEqual({ countries: { code: "PA", name: "Panama", }, }); setTimeout(() => { executeResult = execute({ variables: { filter: "BA" } }); }); await waitFor( () => { expect(result.current[1].loading).toBe(false); }, { interval: 1 } ); await waitFor( () => { expect(result.current[1].data).toEqual({ countries: { code: "BA", name: "Bahamas", }, }); }, { interval: 1 } ); expect(executeResult).toBeInstanceOf(Promise); expect((await executeResult).data).toEqual({ countries: { code: "BA", name: "Bahamas", }, }); }); it("the promise should reject with errors the way useMutation does", async () => { const mocks = [ { request: { query: helloQuery }, result: { errors: [{ message: "error 1" }], }, delay: 20, }, { request: { query: helloQuery }, result: { errors: [{ message: "error 2" }], }, delay: 20, }, ]; const ProfiledHook = profileHook(() => useLazyQuery(helloQuery)); render(<ProfiledHook />, { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); const [execute] = await ProfiledHook.peekSnapshot(); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toBeUndefined(); } const executePromise = Promise.resolve().then(() => execute()); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.data).toBeUndefined(); expect(result.error).toBe(undefined); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toBeUndefined(); expect(result.error).toEqual( new ApolloError({ graphQLErrors: [{ message: "error 1" }] }) ); } await executePromise.then((result) => { expect(result.loading).toBe(false); expect(result.data).toBeUndefined(); expect(result.error!.message).toBe("error 1"); }); execute(); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.data).toBeUndefined(); expect(result.error).toEqual( new ApolloError({ graphQLErrors: [{ message: "error 1" }] }) ); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toBeUndefined(); expect(result.error).toEqual( new ApolloError({ graphQLErrors: [{ message: "error 2" }] }) ); } }); it("the promise should not cause an unhandled rejection", async () => { const mocks = [ { request: { query: helloQuery }, result: { errors: [new GraphQLError("error 1")], }, }, ]; const { result } = renderHook(() => useLazyQuery(helloQuery), { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); const execute = result.current[0]; await waitFor( () => { expect(result.current[1].loading).toBe(false); execute(); }, { interval: 1 } ); await waitFor( () => { expect(result.current[1].data).toBe(undefined); execute(); }, { interval: 1 } ); // Making sure the rejection triggers a test failure. await wait(50); }); it("allows in-flight requests to resolve when component unmounts", async () => { const link = new MockSubscriptionLink(); const client = new ApolloClient({ link, cache: new InMemoryCache() }); const { result, unmount } = renderHook(() => useLazyQuery(helloQuery), { wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), }); const [execute] = result.current; let promise: Promise<QueryResult<{ hello: string }>>; act(() => { promise = execute(); }); unmount(); link.simulateResult({ result: { data: { hello: "Greetings" } } }, true); const queryResult = await promise!; expect(queryResult.data).toEqual({ hello: "Greetings" }); expect(queryResult.loading).toBe(false); expect(queryResult.networkStatus).toBe(NetworkStatus.ready); }); it("handles resolving multiple in-flight requests when component unmounts", async () => { const link = new MockSubscriptionLink(); const client = new ApolloClient({ link, cache: new InMemoryCache() }); const { result, unmount } = renderHook(() => useLazyQuery(helloQuery), { wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), }); const [execute] = result.current; let promise1: Promise<QueryResult<{ hello: string }>>; let promise2: Promise<QueryResult<{ hello: string }>>; act(() => { promise1 = execute(); promise2 = execute(); }); unmount(); link.simulateResult({ result: { data: { hello: "Greetings" } } }, true); const expectedResult = { data: { hello: "Greetings" }, loading: false, networkStatus: NetworkStatus.ready, }; await expect(promise1!).resolves.toMatchObject(expectedResult); await expect(promise2!).resolves.toMatchObject(expectedResult); }); // path_to_url it("resolves each execution of the query with the appropriate result and renders with the result from the latest execution", async () => { interface Data { user: { id: string; name: string }; } interface Variables { id: string; } const query: TypedDocumentNode<Data, Variables> = gql` query UserQuery($id: ID!) { user(id: $id) { id name } } `; const mocks = [ { request: { query, variables: { id: "1" } }, result: { data: { user: { id: "1", name: "John Doe" } } }, delay: 20, }, { request: { query, variables: { id: "2" } }, result: { data: { user: { id: "2", name: "Jane Doe" } } }, delay: 20, }, ]; const { result } = renderHook(() => useLazyQuery(query), { wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), }); const [execute] = result.current; await act(async () => { const promise1 = execute({ variables: { id: "1" } }); const promise2 = execute({ variables: { id: "2" } }); await expect(promise1).resolves.toMatchObject({ ...mocks[0].result, loading: false, called: true, }); await expect(promise2).resolves.toMatchObject({ ...mocks[1].result, loading: false, called: true, }); }); expect(result.current[1]).toMatchObject({ ...mocks[1].result, loading: false, called: true, }); }); it("uses the most recent options when the hook rerenders before execution", async () => { interface Data { user: { id: string; name: string }; } interface Variables { id: string; } const query: TypedDocumentNode<Data, Variables> = gql` query UserQuery($id: ID!) { user(id: $id) { id name } } `; const mocks = [ { request: { query, variables: { id: "1" } }, result: { data: { user: { id: "1", name: "John Doe" } } }, delay: 30, }, { request: { query, variables: { id: "2" } }, result: { data: { user: { id: "2", name: "Jane Doe" } } }, delay: 20, }, ]; const { result, rerender } = renderHook( ({ id }) => useLazyQuery(query, { variables: { id } }), { initialProps: { id: "1" }, wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), } ); rerender({ id: "2" }); const [execute] = result.current; let promise: Promise<QueryResult<Data, Variables>>; act(() => { promise = execute(); }); await waitFor(() => { expect(result.current[1].data).toEqual(mocks[1].result.data); }); await expect(promise!).resolves.toMatchObject({ data: mocks[1].result.data, }); }); // path_to_url it("uses the most recent query document when the hook rerenders before execution", async () => { const query = gql` query DummyQuery { shouldNotBeUsed } `; const mocks = [ { request: { query: helloQuery }, result: { data: { hello: "Greetings" } }, delay: 20, }, ]; const { result, rerender } = renderHook( ({ query }) => useLazyQuery(query), { initialProps: { query }, wrapper: ({ children }) => ( <MockedProvider mocks={mocks}>{children}</MockedProvider> ), } ); rerender({ query: helloQuery }); const [execute] = result.current; let promise: Promise<QueryResult<{ hello: string }>>; act(() => { promise = execute(); }); await waitFor(() => { expect(result.current[1].data).toEqual({ hello: "Greetings" }); }); await expect(promise!).resolves.toMatchObject({ data: { hello: "Greetings" }, }); }); it("does not refetch when rerendering after executing query", async () => { interface Data { user: { id: string; name: string }; } interface Variables { id: string; } const query: TypedDocumentNode<Data, Variables> = gql` query UserQuery($id: ID!) { user(id: $id) { id name } } `; let fetchCount = 0; const link = new ApolloLink((operation) => { fetchCount++; return new Observable((observer) => { setTimeout(() => { observer.next({ data: { user: { id: operation.variables.id, name: "John Doe" } }, }); observer.complete(); }, 20); }); }); const client = new ApolloClient({ link, cache: new InMemoryCache() }); const { result, rerender } = renderHook( () => useLazyQuery(query, { variables: { id: "1" } }), { initialProps: { id: "1" }, wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), } ); const [execute] = result.current; await act(() => execute({ variables: { id: "2" } })); expect(fetchCount).toBe(1); rerender(); await wait(10); expect(fetchCount).toBe(1); }); // path_to_url it.each(["network-only", "no-cache", "cache-and-network"] as const)( "does not issue multiple network calls when calling execute again without variables with a %s fetch policy", async (fetchPolicy) => { interface Data { user: { id: string; name: string }; } interface Variables { id?: string; } const query: TypedDocumentNode<Data, Variables> = gql` query UserQuery($id: ID) { user(id: $id) { id name } } `; let fetchCount = 0; const link = new ApolloLink((operation) => { fetchCount++; return new Observable((observer) => { const { id } = operation.variables; setTimeout(() => { observer.next({ data: { user: id ? { id, name: "John Doe" } : { id: null, name: "John Default" }, }, }); observer.complete(); }, 20); }); }); const client = new ApolloClient({ link, cache: new InMemoryCache(), }); const { result } = renderHook( () => useLazyQuery(query, { fetchPolicy }), { wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), } ); await act(() => result.current[0]({ variables: { id: "2" } })); expect(fetchCount).toBe(1); await waitFor(() => { expect(result.current[1].data).toEqual({ user: { id: "2", name: "John Doe" }, }); }); expect(fetchCount).toBe(1); await act(() => result.current[0]()); await waitFor(() => { expect(result.current[1].data).toEqual({ user: { id: null, name: "John Default" }, }); }); expect(fetchCount).toBe(2); } ); it("maintains stable execute function when passing in dynamic function options", async () => { interface Data { user: { id: string; name: string }; } interface Variables { id: string; } const query: TypedDocumentNode<Data, Variables> = gql` query UserQuery($id: ID!) { user(id: $id) { id name } } `; const link = new MockLink([ { request: { query, variables: { id: "1" } }, result: { data: { user: { id: "1", name: "John Doe" } } }, delay: 20, }, { request: { query, variables: { id: "2" } }, result: { errors: [new GraphQLError("Oops")] }, delay: 20, }, { request: { query, variables: { id: "3" } }, result: { data: { user: { id: "3", name: "Johnny Three" } } }, delay: 20, maxUsageCount: Number.POSITIVE_INFINITY, }, ]); const client = new ApolloClient({ link, cache: new InMemoryCache() }); let countRef = { current: 0 }; const trackClosureValue = jest.fn(); const { result, rerender } = renderHook( () => { let count = countRef.current; return useLazyQuery(query, { fetchPolicy: "cache-first", variables: { id: "1" }, onCompleted: () => { trackClosureValue("onCompleted", count); }, onError: () => { trackClosureValue("onError", count); }, skipPollAttempt: () => { trackClosureValue("skipPollAttempt", count); return false; }, nextFetchPolicy: (currentFetchPolicy) => { trackClosureValue("nextFetchPolicy", count); return currentFetchPolicy; }, }); }, { wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), } ); const [originalExecute] = result.current; countRef.current++; rerender(); expect(result.current[0]).toBe(originalExecute); // Check for stale closures with onCompleted await act(() => result.current[0]()); await waitFor(() => { expect(result.current[1].data).toEqual({ user: { id: "1", name: "John Doe" }, }); }); // after fetch expect(trackClosureValue).toHaveBeenNthCalledWith(1, "nextFetchPolicy", 1); expect(trackClosureValue).toHaveBeenNthCalledWith(2, "onCompleted", 1); trackClosureValue.mockClear(); countRef.current++; rerender(); expect(result.current[0]).toBe(originalExecute); // Check for stale closures with onError await act(() => result.current[0]({ variables: { id: "2" } })); await waitFor(() => { expect(result.current[1].error).toEqual( new ApolloError({ graphQLErrors: [new GraphQLError("Oops")] }) ); }); // variables changed expect(trackClosureValue).toHaveBeenNthCalledWith(1, "nextFetchPolicy", 2); // after fetch expect(trackClosureValue).toHaveBeenNthCalledWith(2, "nextFetchPolicy", 2); expect(trackClosureValue).toHaveBeenNthCalledWith(3, "onError", 2); trackClosureValue.mockClear(); countRef.current++; rerender(); expect(result.current[0]).toBe(originalExecute); await act(() => result.current[0]({ variables: { id: "3" } })); await waitFor(() => { expect(result.current[1].data).toEqual({ user: { id: "3", name: "Johnny Three" }, }); }); // variables changed expect(trackClosureValue).toHaveBeenNthCalledWith(1, "nextFetchPolicy", 3); // after fetch expect(trackClosureValue).toHaveBeenNthCalledWith(2, "nextFetchPolicy", 3); expect(trackClosureValue).toHaveBeenNthCalledWith(3, "onCompleted", 3); trackClosureValue.mockClear(); // Test for stale closures for skipPollAttempt result.current[1].startPolling(20); await wait(50); result.current[1].stopPolling(); expect(trackClosureValue).toHaveBeenCalledWith("skipPollAttempt", 3); }); it("maintains stable execute function identity when changing non-callback options", async () => { interface Data { user: { id: string; name: string }; } interface Variables { id: string; } const query: TypedDocumentNode<Data, Variables> = gql` query UserQuery($id: ID!) { user(id: $id) { id name } } `; const link = new ApolloLink((operation) => { return new Observable((observer) => { setTimeout(() => { observer.next({ data: { user: { id: operation.variables.id, name: "John Doe" } }, }); observer.complete(); }, 20); }); }); const client = new ApolloClient({ link, cache: new InMemoryCache() }); const { result, rerender } = renderHook( ({ id }) => useLazyQuery(query, { variables: { id } }), { initialProps: { id: "1" }, wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), } ); const [execute] = result.current; rerender({ id: "2" }); expect(result.current[0]).toBe(execute); }); describe("network errors", () => { async function check(errorPolicy: ErrorPolicy) { const networkError = new Error("from the network"); const client = new ApolloClient({ cache: new InMemoryCache(), link: new ApolloLink( (request) => new Observable((observer) => { setTimeout(() => { observer.error(networkError); }, 20); }) ), }); const ProfiledHook = profileHook(() => useLazyQuery(helloQuery, { errorPolicy, }) ); render(<ProfiledHook />, { wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), }); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.networkStatus).toBe(NetworkStatus.ready); expect(result.data).toBeUndefined(); } const execute = ProfiledHook.getCurrentSnapshot()[0]; setTimeout(execute); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.networkStatus).toBe(NetworkStatus.loading); expect(result.data).toBeUndefined(); } { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.networkStatus).toBe(NetworkStatus.error); expect(result.data).toBeUndefined(); expect(result.error!.message).toBe("from the network"); } } // For errorPolicy:"none", we expect result.error to be defined and // result.data to be undefined, which is what we test above. it('handles errorPolicy:"none" appropriately', () => check("none")); // If there was any data to report, errorPolicy:"all" would report both // result.data and result.error, but there is no GraphQL data when we // encounter a network error, so the test again captures desired behavior. it('handles errorPolicy:"all" appropriately', () => check("all")); // Technically errorPolicy:"ignore" is supposed to throw away result.error, // but in the case of network errors, since there's no actual data to // report, it's useful/important that we report result.error anyway. it('handles errorPolicy:"ignore" appropriately', () => check("ignore")); }); describe("options.defaultOptions", () => { it("defaultOptions do not confuse useLazyQuery", async () => { const counterQuery: TypedDocumentNode<{ counter: number; }> = gql` query GetCounter { counter } `; let count = 0; const client = new ApolloClient({ cache: new InMemoryCache(), link: new ApolloLink( (request) => new Observable((observer) => { if (request.operationName === "GetCounter") { observer.next({ data: { counter: ++count, }, }); setTimeout(() => { observer.complete(); }, 10); } else { observer.error( new Error( `Unknown query: ${request.operationName || request.query}` ) ); } }) ), }); const defaultFetchPolicy = "network-only"; const { result } = renderHook( () => { const [exec, query] = useLazyQuery(counterQuery, { defaultOptions: { fetchPolicy: defaultFetchPolicy, notifyOnNetworkStatusChange: true, }, }); return { exec, query, }; }, { wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), } ); await waitFor( () => { expect(result.current.query.loading).toBe(false); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.called).toBe(false); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.data).toBeUndefined(); }, { interval: 1 } ); const execResult = await result.current.exec(); expect(execResult.loading).toBe(false); expect(execResult.called).toBe(true); expect(execResult.data).toEqual({ counter: 1 }); await waitFor( () => { expect(result.current.query.loading).toBe(false); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.data).toMatchObject({ counter: 1 }); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.called).toBe(true); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.loading).toBe(false); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.called).toBe(true); }, { interval: 1 } ); await waitFor( () => { expect(result.current.query.data).toEqual({ counter: 1 }); }, { interval: 1 } ); const { options } = result.current.query.observable; expect(options.fetchPolicy).toBe(defaultFetchPolicy); }); }); // regression for path_to_url test("calling `clearStore` while a lazy query is running puts the hook into an error state and resolves the promise with an error result", async () => { const link = new MockSubscriptionLink(); let requests = 0; link.onSetup(() => requests++); const client = new ApolloClient({ link, cache: new InMemoryCache(), }); const ProfiledHook = profileHook(() => useLazyQuery(helloQuery)); render(<ProfiledHook />, { wrapper: ({ children }) => ( <ApolloProvider client={client}>{children}</ApolloProvider> ), }); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toBeUndefined(); } const execute = ProfiledHook.getCurrentSnapshot()[0]; const promise = execute(); expect(requests).toBe(1); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(true); expect(result.data).toBeUndefined(); } client.clearStore(); const executionResult = await promise; expect(executionResult.data).toBeUndefined(); expect(executionResult.loading).toBe(true); expect(executionResult.error).toEqual( new ApolloError({ networkError: new InvariantError( "Store reset while query was in flight (not completed in link chain)" ), }) ); { const [, result] = await ProfiledHook.takeSnapshot(); expect(result.loading).toBe(false); expect(result.data).toBeUndefined(); expect(result.error).toEqual( new ApolloError({ networkError: new InvariantError( "Store reset while query was in flight (not completed in link chain)" ), }) ); } link.simulateResult({ result: { data: { hello: "Greetings" } } }, true); await expect(ProfiledHook).not.toRerender({ timeout: 50 }); expect(requests).toBe(1); }); }); describe.skip("Type Tests", () => { test("NoInfer prevents adding arbitrary additional variables", () => { const typedNode = {} as TypedDocumentNode<{ foo: string }, { bar: number }>; const [_, { variables }] = useLazyQuery(typedNode, { variables: { bar: 4, // @ts-expect-error nonExistingVariable: "string", }, }); variables?.bar; // @ts-expect-error variables?.nonExistingVariable; }); }); ```
/content/code_sandbox/src/react/hooks/__tests__/useLazyQuery.test.tsx
xml
2016-02-26T20:25:00
2024-08-16T10:56:57
apollo-client
apollographql/apollo-client
19,304
12,007
```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. --> <menu xmlns:android="path_to_url" xmlns:app="path_to_url" > <item android:id="@+id/m_search" android:icon="@drawable/action_search" app:showAsAction="ifRoom" android:title="@string/find_repositories"/> </menu> ```
/content/code_sandbox/app/src/main/res/menu/home.xml
xml
2016-04-09T16:05:02
2024-08-08T06:37:18
trugithub
kba7/trugithub
2,055
115
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE suite SYSTEM "path_to_url"> <suite name="TestNG Packages Test Suite" guice-stage="DEVELOPMENT"> <test thread-count="5" name="TestNG Packages Test" verbose="2"> <packages> <package name="com.journaldev.xml"></package> </packages> </test> </suite> ```
/content/code_sandbox/TestNG-Examples/src/test/resources/testng_package.xml
xml
2016-05-02T05:43:21
2024-08-16T06:51:39
journaldev
WebJournal/journaldev
1,314
93
```xml import { html, nothing } from 'lit'; import { customElement, property, state } from 'lit/decorators.js'; import { classMap } from 'lit/directives/class-map.js'; import { createRef, ref } from 'lit/directives/ref.js'; import cc from 'classcat'; import { MduiElement } from '@mdui/shared/base/mdui-element.js'; import { HasSlotController } from '@mdui/shared/controllers/has-slot.js'; import { booleanConverter } from '@mdui/shared/helpers/decorator.js'; import { nothingTemplate } from '@mdui/shared/helpers/template.js'; import { uniqueId } from '@mdui/shared/helpers/uniqueId.js'; import { componentStyle } from '@mdui/shared/lit-styles/component-style.js'; import { AnchorMixin } from '@mdui/shared/mixins/anchor.js'; import { FocusableMixin } from '@mdui/shared/mixins/focusable.js'; import '../icon.js'; import { RippleMixin } from '../ripple/ripple-mixin.js'; import { navigationRailItemStyle } from './navigation-rail-item-style.js'; import type { Ripple } from '../ripple/index.js'; import type { CSSResultGroup, TemplateResult } from 'lit'; import type { Ref } from 'lit/directives/ref.js'; /** * @summary `<mdui-navigation-rail>` * * ```html * <mdui-navigation-rail> * ..<mdui-navigation-rail-item icon="watch_later">Recent</mdui-navigation-rail-item> * ..<mdui-navigation-rail-item icon="image">Images</mdui-navigation-rail-item> * ..<mdui-navigation-rail-item icon="library_music">Library</mdui-navigation-rail-item> * </mdui-navigation-rail> * ``` * * @slot - * @slot icon - * @slot active-icon - * @slot badge - * * @event focus - * @event blur - * * @csspart container - * @csspart indicator - * @csspart badge - * @csspart icon - * @csspart active-icon - * @csspart label - * * @cssprop --shape-corner-indicator - [](/docs/2/styles/design-tokens#shape-corner) */ @customElement('mdui-navigation-rail-item') export class NavigationRailItem extends AnchorMixin( RippleMixin(FocusableMixin(MduiElement)), )<NavigationRailItemEventMap> { public static override styles: CSSResultGroup = [ componentStyle, navigationRailItemStyle, ]; /** * Material Icons `slot="icon"` */ @property({ reflect: true }) public icon?: string; /** * Material Icons `slot="active-icon"` */ @property({ reflect: true, attribute: 'active-icon' }) public activeIcon?: string; /** * */ @property({ reflect: true }) public value?: string; /** * `<mdui-navigation-rail>` */ @property({ type: Boolean, reflect: true, converter: booleanConverter, }) protected active = false; /** * `<mdui-navigation-rail>` */ @state() protected isInitial = true; /** * `<mdui-navigation-rail>` */ @state() protected placement: 'left' | 'right' = 'left'; // @state() private disabled = false; // `<mdui-navigation-rail-item>` key protected readonly key = uniqueId(); private readonly rippleRef: Ref<Ripple> = createRef(); private readonly hasSlotController = new HasSlotController( this, '[default]', 'active-icon', ); protected override get rippleElement() { return this.rippleRef.value!; } protected override get rippleDisabled(): boolean { return this.disabled; } protected override get focusElement(): HTMLElement | null { return this.href ? this.renderRoot?.querySelector('._a') : this; } protected override get focusDisabled(): boolean { return this.disabled; } protected override render(): TemplateResult { const hasDefaultSlot = this.hasSlotController.test('[default]'); const className = cc({ container: true, 'has-label': hasDefaultSlot, 'has-active-icon': this.activeIcon || this.hasSlotController.test('active-icon'), initial: this.isInitial, }); return html`${this.href ? this.renderAnchor({ part: 'container', className, content: this.renderInner(hasDefaultSlot), }) : html`<div part="container" class=${className}> ${this.renderInner(hasDefaultSlot)} </div>`} <mdui-ripple .noRipple=${!this.active || this.noRipple} ${ref(this.rippleRef)} ></mdui-ripple>`; } private renderInner(hasDefaultSlot: boolean): TemplateResult { return html`<div part="indicator" class="indicator"> <slot name="badge" part="badge" class=${classMap({ badge: true, 'placement-right': this.placement === 'right', })} ></slot> <slot name="active-icon" part="active-icon" class="active-icon"> ${this.activeIcon ? html`<mdui-icon name=${this.activeIcon}></mdui-icon>` : nothingTemplate} </slot> <slot name="icon" part="icon" class="icon"> ${this.icon ? html`<mdui-icon name=${this.icon}></mdui-icon>` : nothingTemplate} </slot> </div> ${hasDefaultSlot ? html`<slot part="label" class="label"></slot>` : nothing}`; } } export interface NavigationRailItemEventMap { focus: FocusEvent; blur: FocusEvent; } declare global { interface HTMLElementTagNameMap { 'mdui-navigation-rail-item': NavigationRailItem; } } ```
/content/code_sandbox/packages/mdui/src/components/navigation-rail/navigation-rail-item.ts
xml
2016-07-11T17:39:02
2024-08-16T07:12:34
mdui
zdhxiong/mdui
4,077
1,346
```xml import Link from 'next/link' export default function Home() { return ( <main> <Link href="/asdfasdfasdf">Hello, world!</Link> </main> ) } ```
/content/code_sandbox/test/production/app-dir/typed-routes-with-webpack-worker/bad-routes/app/page.tsx
xml
2016-10-05T23:32:51
2024-08-16T19:44:30
next.js
vercel/next.js
124,056
43
```xml /* * @license Apache-2.0 * * * * path_to_url * * Unless required by applicable law or agreed to in writing, software * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */ import bessely0By = require( './index' ); /** * Accessor callback. * * @returns accessed value */ function accessor(): number { return 0.0; } // TESTS // // The function returns a collection... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By( x.length, x, 1, y, 1, accessor ); // $ExpectType Collection<number> bessely0By( x.length, x, 1, y, 1, accessor, {} ); // $ExpectType Collection<number> } // The compiler throws an error if the function is provided a first argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By( '10', x, 1, y, 1, accessor ); // $ExpectError bessely0By( true, x, 1, y, 1, accessor ); // $ExpectError bessely0By( false, x, 1, y, 1, accessor ); // $ExpectError bessely0By( null, x, 1, y, 1, accessor ); // $ExpectError bessely0By( undefined, x, 1, y, 1, accessor ); // $ExpectError bessely0By( [], x, 1, y, 1, accessor ); // $ExpectError bessely0By( {}, x, 1, y, 1, accessor ); // $ExpectError bessely0By( ( x: number ): number => x, x, 1, y, 1, accessor ); // $ExpectError } // The compiler throws an error if the function is provided a second argument which is not a collection... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By( x.length, 10, 1, y, 1, accessor ); // $ExpectError bessely0By( x.length, true, 1, y, 1, accessor ); // $ExpectError bessely0By( x.length, false, 1, y, 1, accessor ); // $ExpectError bessely0By( x.length, null, 1, y, 1, accessor ); // $ExpectError bessely0By( x.length, undefined, 1, y, 1, accessor ); // $ExpectError bessely0By( x.length, {}, 1, y, 1, accessor ); // $ExpectError } // The compiler throws an error if the function is provided a third argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By( x.length, x, '10', y, 1, accessor ); // $ExpectError bessely0By( x.length, x, true, y, 1, accessor ); // $ExpectError bessely0By( x.length, x, false, y, 1, accessor ); // $ExpectError bessely0By( x.length, x, null, y, 1, accessor ); // $ExpectError bessely0By( x.length, x, undefined, y, 1, accessor ); // $ExpectError bessely0By( x.length, x, [], y, 1, accessor ); // $ExpectError bessely0By( x.length, x, {}, y, 1, accessor ); // $ExpectError bessely0By( x.length, x, ( x: number ): number => x, y, 1, accessor ); // $ExpectError } // The compiler throws an error if the function is provided a fourth argument which is not a collection... { const x = new Float64Array( 10 ); bessely0By( x.length, x, 1, 10, 1, accessor ); // $ExpectError bessely0By( x.length, x, 1, true, 1, accessor ); // $ExpectError bessely0By( x.length, x, 1, false, 1, accessor ); // $ExpectError bessely0By( x.length, x, 1, null, 1, accessor ); // $ExpectError bessely0By( x.length, x, 1, undefined, 1, accessor ); // $ExpectError bessely0By( x.length, x, 1, {}, 1, accessor ); // $ExpectError } // The compiler throws an error if the function is provided a fifth argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By( x.length, x, 1, y, '10', accessor ); // $ExpectError bessely0By( x.length, x, 1, y, true, accessor ); // $ExpectError bessely0By( x.length, x, 1, y, false, accessor ); // $ExpectError bessely0By( x.length, x, 1, y, null, accessor ); // $ExpectError bessely0By( x.length, x, 1, y, undefined, accessor ); // $ExpectError bessely0By( x.length, x, 1, y, [], accessor ); // $ExpectError bessely0By( x.length, x, 1, y, {}, accessor ); // $ExpectError bessely0By( x.length, x, 1, y, ( x: number ): number => x, accessor ); // $ExpectError } // The compiler throws an error if the function is provided a sixth argument which is not a function... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By( x.length, x, 1, y, 1, '10' ); // $ExpectError bessely0By( x.length, x, 1, y, 1, 0 ); // $ExpectError bessely0By( x.length, x, 1, y, 1, true ); // $ExpectError bessely0By( x.length, x, 1, y, 1, false ); // $ExpectError bessely0By( x.length, x, 1, y, 1, null ); // $ExpectError bessely0By( x.length, x, 1, y, 1, undefined ); // $ExpectError bessely0By( x.length, x, 1, y, 1, [] ); // $ExpectError bessely0By( x.length, x, 1, y, 1, {} ); // $ExpectError } // The compiler throws an error if the function is provided an unsupported number of arguments... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By(); // $ExpectError bessely0By( x.length ); // $ExpectError bessely0By( x.length, x ); // $ExpectError bessely0By( x.length, x, 1 ); // $ExpectError bessely0By( x.length, x, 1, y ); // $ExpectError bessely0By( x.length, x, 1, y, 1 ); // $ExpectError bessely0By( x.length, x, 1, y, 1, accessor, 10, 10 ); // $ExpectError } // Attached to main export is an `ndarray` method which returns a collection... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, accessor ); // $ExpectType Collection<number> bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, accessor, {} ); // $ExpectType Collection<number> } // The compiler throws an error if the `ndarray` method is provided a first argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By.ndarray( '10', x, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( true, x, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( false, x, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( null, x, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( undefined, x, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( [], x, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( {}, x, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( ( x: number ): number => x, x, 1, 0, y, 1, 0, accessor ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a second argument which is not a collection... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By.ndarray( x.length, 10, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, true, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, false, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, null, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, undefined, 1, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, {}, 1, 0, y, 1, 0, accessor ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a third argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By.ndarray( x.length, x, '10', 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, true, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, false, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, null, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, undefined, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, [], 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, {}, 0, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, ( x: number ): number => x, 0, y, 1, 0, accessor ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fourth argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By.ndarray( x.length, x, 1, '10', y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, true, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, false, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, null, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, undefined, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, [], y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, {}, y, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, ( x: number ): number => x, y, 1, 0, accessor ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a fifth argument which is not a collection... { const x = new Float64Array( 10 ); bessely0By.ndarray( x.length, x, 1, 0, 10, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, true, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, false, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, null, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, undefined, 1, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, {}, 1, 0, accessor ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a sixth argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By.ndarray( x.length, x, 1, 0, y, '10', 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, true, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, false, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, null, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, undefined, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, [], 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, {}, 0, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, ( x: number ): number => x, 0, accessor ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided a seventh argument which is not a number... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By.ndarray( x.length, x, 1, 0, y, 1, '10', accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, true, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, false, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, null, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, undefined, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, [], accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, {}, accessor ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, ( x: number ): number => x, accessor ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an eighth argument which is not a function... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, '10' ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, 0 ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, true ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, false ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, null ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, undefined ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, [] ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, {} ); // $ExpectError } // The compiler throws an error if the `ndarray` method is provided an unsupported number of arguments... { const x = new Float64Array( 10 ); const y = new Float64Array( 10 ); bessely0By.ndarray(); // $ExpectError bessely0By.ndarray( x.length ); // $ExpectError bessely0By.ndarray( x.length, x ); // $ExpectError bessely0By.ndarray( x.length, x, 1 ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0 ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1 ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0 ); // $ExpectError bessely0By.ndarray( x.length, x, 1, 0, y, 1, 0, accessor, 10, 10 ); // $ExpectError } ```
/content/code_sandbox/lib/node_modules/@stdlib/math/strided/special/bessely0-by/docs/types/test.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
4,468
```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. --> <authority> <sqlset db-types="Oracle,SQLServer,PostgreSQL,openGauss"> <user-create> <sql>CREATE USER default_user</sql> <sql>CREATE ROLE default_role</sql> <sql>CREATE ROLE role2</sql> <sql>CREATE ROLE role3</sql> <sql>CREATE ROLE role4</sql> </user-create> <user-drop> <sql>DROP ROLE IF EXISTS default_role</sql> <sql>DROP ROLE IF EXISTS role_dev</sql> <sql>DROP ROLE IF EXISTS role_dev_new</sql> <sql>DROP ROLE IF EXISTS role2</sql> <sql>DROP ROLE IF EXISTS role3</sql> <sql>DROP ROLE IF EXISTS role4</sql> <sql>DROP USER IF EXISTS user_dev</sql> <sql>DROP USER IF EXISTS user_dev_new</sql> <sql>DROP USER IF EXISTS default_user</sql> </user-drop> </sqlset> <sqlset db-types="SQLServer"> <user-create> <sql>CREATE LOGIN login_dev</sql> <sql>CREATE USER user_dev FOR LOGIN login_dev</sql> </user-create> <user-drop> <sql>DROP LOGIN IF EXISTS login_dev</sql> <sql>DROP LOGIN IF EXISTS login_dev_new</sql> </user-drop> </sqlset> <sqlset db-types="MySQL"> <user-create> <sql>CREATE ROLE default_role</sql> <sql>CREATE USER user_dev@localhost</sql> <sql>GRANT select,update,insert,delete on write_db.* to user_dev@localhost</sql> <sql>GRANT select,update,insert,delete on write_db_shadow.* to user_dev@localhost</sql> </user-create> <user-drop> <sql>DROP USER IF EXISTS user_dev@localhost</sql> <sql>DROP USER IF EXISTS user_dev_new@localhost</sql> <sql>DROP USER IF EXISTS user_dev@127.0.0.1</sql> <sql>DROP ROLE IF EXISTS default_role</sql> <sql>DROP ROLE IF EXISTS role_dev</sql> <sql>DROP ROLE IF EXISTS role_dev_new</sql> <sql>FLUSH PRIVILEGES</sql> </user-drop> </sqlset> <sqlset db-types="Oracle"> <user-create> <sql>CREATE USER user_dev identified by passwd_dev</sql> </user-create> </sqlset> </authority> ```
/content/code_sandbox/test/e2e/sql/src/test/resources/env/scenario/readwrite_splitting_and_shadow/authority.xml
xml
2016-01-18T12:49:26
2024-08-16T15:48:11
shardingsphere
apache/shardingsphere
19,707
636
```xml /// <reference types="react"/> declare module 'to-style' { interface ToStyle { string(style: CSSProperties): string; object(style: string | Record<string, unknown>): CSSProperties; } const toStyle: ToStyle; export default toStyle; } ```
/content/code_sandbox/packages/emoji/src/@types/to-style.d.ts
xml
2016-02-26T09:54:56
2024-08-16T18:16:31
draft-js-plugins
draft-js-plugins/draft-js-plugins
4,087
60
```xml import { React } from "@xarc/react"; export const Demo2 = props => { return ( <div style={{ padding: "5px", border: "solid", marginLeft: "15%", marginRight: "15%" }}> <p>abc subapp demo2</p> props: {JSON.stringify(props)} <p> <a href="path_to_url">Electrode Docs</a> </p> </div> ); }; ```
/content/code_sandbox/samples/subapp2-poc/src/demo2.tsx
xml
2016-09-06T19:02:39
2024-08-11T11:43:11
electrode
electrode-io/electrode
2,103
100
```xml export enum RTSConfig { /** In bytes */ MAX_DU_SIZE = 2_000_000, } ```
/content/code_sandbox/packages/docs-proto/lib/RTSConfig.ts
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
24
```xml import { IBreadCrumbItem } from '../../types'; import React from 'react'; import styled from 'styled-components'; import { dimensions } from '../../styles'; import BreadCrumbItem from './BreadCrumbItem'; const Items = styled.ul` display: inline-block; padding: 0; margin: 0 ${dimensions.coreSpacing}px 0 0; list-style: none; font-size: 14px; @media (max-width: 560px) { display: none; } `; class BreadCrumb extends React.Component<{ breadcrumbs: IBreadCrumbItem[]; }> { render() { const { breadcrumbs } = this.props; return ( <Items role="navigation" aria-label="breadcrumbs"> {breadcrumbs.map(b => ( <BreadCrumbItem to={b.link || ''} active={!b.link} key={b.title}> {b.title} </BreadCrumbItem> ))} </Items> ); } } export default BreadCrumb; ```
/content/code_sandbox/packages/erxes-ui/src/components/breadcrumb/BreadCrumb.tsx
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
222
```xml import { optionalRequire } from '../../navigation/routeBuilder'; import ComponentListScreen, { ListElement } from '../ComponentListScreen'; export const AudioScreens = [ { name: 'Expo Audio Player', route: 'audio/expo-audio', options: {}, getComponent() { return optionalRequire(() => require('./expo-audio/AudioScreen')); }, }, { name: 'Expo Audio Recording', route: 'audio/expo-audio-recording', options: {}, getComponent() { return optionalRequire(() => require('./expo-audio/RecordingScreen')); }, }, { name: 'Expo AV Player', route: 'audio/expo-av', options: {}, getComponent() { return optionalRequire(() => require('./AV/AudioScreen')); }, }, { name: 'Expo AV Recording', route: 'audio/expo-av-recording', options: {}, getComponent() { return optionalRequire(() => require('./AV/RecordingScreen')); }, }, ]; export default function AudioScreen() { const apis: ListElement[] = AudioScreens.map((screen) => { return { name: screen.name, isAvailable: true, route: `/apis/${screen.route}`, }; }); return <ComponentListScreen apis={apis} sort={false} />; } ```
/content/code_sandbox/apps/native-component-list/src/screens/Audio/AudioScreen.tsx
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
298
```xml "use client" import { useState } from "react" import RightSideBar from "@/modules/chat/component/RightSideBar" import Messages from "@/modules/chat/component/messages/Messages" export default function Detail() { const [showSidebar, setShowSidebar] = useState(false) const handleToggle = () => { setShowSidebar(!showSidebar) } return ( <> <div className={`${ showSidebar ? "w-[calc(60%-230px)]" : "w-[calc(80%-230px)]" } border-r shrink-0`} > <Messages setShowSidebar={handleToggle} /> </div> {showSidebar && ( <div className="flex w-1/5 flex-col"> <RightSideBar setShowSidebar={handleToggle} showSidebar={showSidebar} /> </div> )} </> ) } ```
/content/code_sandbox/exm-web/app/(main)/chats/detail/page.tsx
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
191
```xml <Project Sdk="Microsoft.NET.Sdk"> <Import Project="..\..\..\buildtools\common.props" /> <PropertyGroup> <Description>Amazon Lambda .NET Core support - SQSEvents package.</Description> <TargetFrameworks>netstandard2.0;netcoreapp3.1;net8.0</TargetFrameworks> <AssemblyTitle>Amazon.Lambda.SQSEvents</AssemblyTitle> <VersionPrefix>2.2.0</VersionPrefix> <AssemblyName>Amazon.Lambda.SQSEvents</AssemblyName> <PackageId>Amazon.Lambda.SQSEvents</PackageId> <PackageTags>AWS;Amazon;Lambda</PackageTags> </PropertyGroup> <PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'"> <WarningsAsErrors>IL2026,IL2067,IL2075</WarningsAsErrors> <IsTrimmable>true</IsTrimmable> <EnableTrimAnalyzer>true</EnableTrimAnalyzer> </PropertyGroup> </Project> ```
/content/code_sandbox/Libraries/src/Amazon.Lambda.SQSEvents/Amazon.Lambda.SQSEvents.csproj
xml
2016-11-11T20:43:34
2024-08-15T16:57:53
aws-lambda-dotnet
aws/aws-lambda-dotnet
1,558
227
```xml <dict> <key>LayoutID</key> <integer>27</integer> <key>PathMapRef</key> <array> <dict> <key>CodecID</key> <array> <integer>283902576</integer> </array> <key>Headphone</key> <dict> <key>AmpPostDelay</key> <integer>50</integer> <key>AmpPreDelay</key> <integer>100</integer> <key>DefaultVolume</key> <integer>4292870144</integer> <key>Headset_dBV</key> <integer>-1055916032</integer> </dict> <key>Inputs</key> <array> <string>Mic</string> <string>LineIn</string> </array> <key>IntSpeaker</key> <dict> <key>DefaultVolume</key> <integer>4293722112</integer> <key>MaximumBootBeepValue</key> <integer>48</integer> <key>MuteGPIO</key> <integer>0</integer> </dict> <key>LineIn</key> <dict> <key>MuteGPIO</key> <integer>1342242840</integer> <key>SignalProcessing</key> <dict> <key>SoftwareDSP</key> <dict> <key>DspFunction0</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>0</integer> <key>DspFuncName</key> <string>DspNoiseReduction</string> <key>DspFuncProcessingIndex</key> <integer>0</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>2</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>-1063256063</integer> <key>5</key> <data>O7qJwvAsd8IxFYLCNC+Iwgh8h8JYT3zCTGxtwjCQbMLsb3/C58KIwmIAjcKqEZTCM22Xwr5/k8L6Q5DCUXiPwhlqksKOQ5TCQS2XwkCYnMLSmqPCbK+your_sha256_hashqwvxyqcLWr6XCdkajwulQpMJs1afCbmCqwqbpqcIaSKrCSrmpwjv+p8KjIqjCVkOowh9WqMLun6nCudimwvISp8K686rC+your_sha256_hash8GswgJLr8Ku2a/your_sha256_hashCQGK1woYFtcIw7LHCOMuxwiKZs8K8YrXC6nO4ws5cu8KCa73CJjG+wqekvMK9RLnC4/a2wuKBt8Jyyour_sha512_hash/Rwhmf0cImvtPClErXwmrF18JUfdvCNi7fwty43cL+WdvCuqrawiIL3cKCR+HCYPDnwqQ67MLYserCshHowl7L6MK2guzCsvrvwu4o8cJyfv7C</data> </dict> <key>PatchbayInfo</key> <dict/> </dict> <key>DspFunction1</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>1</integer> <key>DspFuncName</key> <string>DspEqualization32</string> <key>DspFuncProcessingIndex</key> <integer>1</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>9</key> <integer>0</integer> <key>Filter</key> <array> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1120623594</integer> <key>7</key> <integer>1060439283</integer> <key>8</key> <integer>-1069504319</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>3</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1134130816</integer> <key>7</key> <integer>1068239080</integer> <key>8</key> <integer>-1073964333</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>4</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1143149396</integer> <key>7</key> <integer>1069838081</integer> <key>8</key> <integer>-1072785033</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>5</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1161109679</integer> <key>7</key> <integer>1093706804</integer> <key>8</key> <integer>-1069580896</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>7</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1138536183</integer> <key>7</key> <integer>1094714319</integer> <key>8</key> <integer>-1069046873</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>9</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1134823262</integer> <key>7</key> <integer>1088568216</integer> <key>8</key> <integer>-1073319056</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>10</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1140763936</integer> <key>7</key> <integer>1095878445</integer> <key>8</key> <integer>-1066910782</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>11</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1150711009</integer> <key>7</key> <integer>1082220668</integer> <key>8</key> <integer>-1072251010</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>22</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1169045837</integer> <key>7</key> <integer>1080998247</integer> <key>8</key> <integer>-1076100424</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>23</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>6</integer> <key>6</key> <integer>1174718752</integer> <key>7</key> <integer>1074226939</integer> <key>8</key> <integer>-1065842737</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>24</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1174256827</integer> <key>7</key> <integer>1091118565</integer> <key>8</key> <integer>-1065842737</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1120623594</integer> <key>7</key> <integer>1060439283</integer> <key>8</key> <integer>-1069504319</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>3</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1134130816</integer> <key>7</key> <integer>1068239080</integer> <key>8</key> <integer>-1073964333</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>4</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1143149396</integer> <key>7</key> <integer>1069838081</integer> <key>8</key> <integer>-1072785033</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>5</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1161109679</integer> <key>7</key> <integer>1093706804</integer> <key>8</key> <integer>-1069580896</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>7</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1138536183</integer> <key>7</key> <integer>1094714319</integer> <key>8</key> <integer>-1069046873</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>9</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1134823262</integer> <key>7</key> <integer>1088568216</integer> <key>8</key> <integer>-1073319056</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>10</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1140763936</integer> <key>7</key> <integer>1095878445</integer> <key>8</key> <integer>-1066910782</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>11</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1150711009</integer> <key>7</key> <integer>1082220668</integer> <key>8</key> <integer>-1072251010</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>22</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1169045837</integer> <key>7</key> <integer>1080998247</integer> <key>8</key> <integer>-1076100424</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>23</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>6</integer> <key>6</key> <integer>1174718752</integer> <key>7</key> <integer>1074226939</integer> <key>8</key> <integer>-1065842737</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>24</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1174256827</integer> <key>7</key> <integer>1091118565</integer> <key>8</key> <integer>-1065842737</integer> </dict> </array> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> <key>DspFunction2</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>2</integer> <key>DspFuncName</key> <string>DspGainStage</string> <key>DspFuncProcessingIndex</key> <integer>2</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>2</key> <integer>1065353216</integer> <key>3</key> <integer>1065353216</integer> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>1</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>1</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> <key>DspFunction3</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>3</integer> <key>DspFuncName</key> <string>DspClientGainAdjustStage</string> <key>DspFuncProcessingIndex</key> <integer>3</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>1</integer> <key>2</key> <integer>0</integer> <key>3</key> <integer>1082130432</integer> <key>4</key> <integer>1103626240</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1082130432</integer> <key>7</key> <integer>3</integer> <key>8</key> <integer>0</integer> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>2</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>2</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> </dict> </dict> </dict> <key>Mic</key> <dict> <key>MuteGPIO</key> <integer>1342242841</integer> <key>SignalProcessing</key> <dict> <key>SoftwareDSP</key> <dict> <key>DspFunction0</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>0</integer> <key>DspFuncName</key> <string>DspNoiseReduction</string> <key>DspFuncProcessingIndex</key> <integer>0</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>2</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>-1063256063</integer> <key>5</key> <data>O7qJwvAsd8IxFYLCNC+Iwgh8h8JYT3zCTGxtwjCQbMLsb3/C58KIwmIAjcKqEZTCM22Xwr5/k8L6Q5DCUXiPwhlqksKOQ5TCQS2XwkCYnMLSmqPCbK+your_sha256_hashqwvxyqcLWr6XCdkajwulQpMJs1afCbmCqwqbpqcIaSKrCSrmpwjv+p8KjIqjCVkOowh9WqMLun6nCudimwvISp8K686rC+your_sha256_hash8GswgJLr8Ku2a/your_sha256_hashCQGK1woYFtcIw7LHCOMuxwiKZs8K8YrXC6nO4ws5cu8KCa73CJjG+wqekvMK9RLnC4/a2wuKBt8Jyyour_sha512_hash/Rwhmf0cImvtPClErXwmrF18JUfdvCNi7fwty43cL+WdvCuqrawiIL3cKCR+HCYPDnwqQ67MLYserCshHowl7L6MK2guzCsvrvwu4o8cJyfv7C</data> </dict> <key>PatchbayInfo</key> <dict/> </dict> <key>DspFunction1</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>1</integer> <key>DspFuncName</key> <string>DspEqualization32</string> <key>DspFuncProcessingIndex</key> <integer>1</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>9</key> <integer>0</integer> <key>Filter</key> <array> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1120623594</integer> <key>7</key> <integer>1060439283</integer> <key>8</key> <integer>-1069504319</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>3</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1134130816</integer> <key>7</key> <integer>1068239080</integer> <key>8</key> <integer>-1073964333</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>4</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1143149396</integer> <key>7</key> <integer>1069838081</integer> <key>8</key> <integer>-1072785033</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>5</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1161109679</integer> <key>7</key> <integer>1093706804</integer> <key>8</key> <integer>-1069580896</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>7</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1138536183</integer> <key>7</key> <integer>1094714319</integer> <key>8</key> <integer>-1069046873</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>9</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1134823262</integer> <key>7</key> <integer>1088568216</integer> <key>8</key> <integer>-1073319056</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>10</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1140763936</integer> <key>7</key> <integer>1095878445</integer> <key>8</key> <integer>-1066910782</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>11</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1150711009</integer> <key>7</key> <integer>1082220668</integer> <key>8</key> <integer>-1072251010</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>22</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1169045837</integer> <key>7</key> <integer>1080998247</integer> <key>8</key> <integer>-1076100424</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>23</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>6</integer> <key>6</key> <integer>1174718752</integer> <key>7</key> <integer>1074226939</integer> <key>8</key> <integer>-1065842737</integer> </dict> <dict> <key>2</key> <integer>0</integer> <key>3</key> <integer>24</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1174256827</integer> <key>7</key> <integer>1091118565</integer> <key>8</key> <integer>-1065842737</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>0</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1120623594</integer> <key>7</key> <integer>1060439283</integer> <key>8</key> <integer>-1069504319</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>3</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1134130816</integer> <key>7</key> <integer>1068239080</integer> <key>8</key> <integer>-1073964333</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>4</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1143149396</integer> <key>7</key> <integer>1069838081</integer> <key>8</key> <integer>-1072785033</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>5</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1161109679</integer> <key>7</key> <integer>1093706804</integer> <key>8</key> <integer>-1069580896</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>7</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1138536183</integer> <key>7</key> <integer>1094714319</integer> <key>8</key> <integer>-1069046873</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>9</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1134823262</integer> <key>7</key> <integer>1088568216</integer> <key>8</key> <integer>-1073319056</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>10</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1140763936</integer> <key>7</key> <integer>1095878445</integer> <key>8</key> <integer>-1066910782</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>11</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1150711009</integer> <key>7</key> <integer>1082220668</integer> <key>8</key> <integer>-1072251010</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>22</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1169045837</integer> <key>7</key> <integer>1080998247</integer> <key>8</key> <integer>-1076100424</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>23</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>6</integer> <key>6</key> <integer>1174718752</integer> <key>7</key> <integer>1074226939</integer> <key>8</key> <integer>-1065842737</integer> </dict> <dict> <key>2</key> <integer>1</integer> <key>3</key> <integer>24</integer> <key>4</key> <integer>0</integer> <key>5</key> <integer>4</integer> <key>6</key> <integer>1174256827</integer> <key>7</key> <integer>1091118565</integer> <key>8</key> <integer>-1065842737</integer> </dict> </array> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>0</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> <key>DspFunction2</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>2</integer> <key>DspFuncName</key> <string>DspGainStage</string> <key>DspFuncProcessingIndex</key> <integer>2</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>0</integer> <key>2</key> <integer>1065353216</integer> <key>3</key> <integer>1065353216</integer> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>1</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>1</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> <key>DspFunction3</key> <dict> <key>FunctionInfo</key> <dict> <key>DspFuncInstance</key> <integer>3</integer> <key>DspFuncName</key> <string>DspClientGainAdjustStage</string> <key>DspFuncProcessingIndex</key> <integer>3</integer> </dict> <key>ParameterInfo</key> <dict> <key>1</key> <integer>1</integer> <key>2</key> <integer>0</integer> <key>3</key> <integer>1082130432</integer> <key>4</key> <integer>1103626240</integer> <key>5</key> <integer>1</integer> <key>6</key> <integer>1082130432</integer> <key>7</key> <integer>3</integer> <key>8</key> <integer>0</integer> </dict> <key>PatchbayInfo</key> <dict> <key>InputPort0</key> <dict> <key>PortInstance</key> <integer>0</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>2</integer> <key>SourcePortIndex</key> <integer>0</integer> </dict> <key>InputPort1</key> <dict> <key>PortInstance</key> <integer>1</integer> <key>PortWidth</key> <integer>1</integer> <key>SourceFuncInstance</key> <integer>2</integer> <key>SourcePortIndex</key> <integer>1</integer> </dict> </dict> </dict> </dict> </dict> </dict> <key>Outputs</key> <array> <string>Headphone</string> <string>IntSpeaker</string> </array> <key>PathMapID</key> <integer>270</integer> </dict> </array> </dict> ```
/content/code_sandbox/Resources/ALC270/layout27.xml
xml
2016-03-07T20:45:58
2024-08-14T08:57:03
AppleALC
acidanthera/AppleALC
3,420
10,574
```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. */ --> <Keyboard xmlns:android="path_to_url" android:keyWidth="10%p" android:horizontalGap="0px" android:verticalGap="0px" android:keyHeight="@dimen/popup_key_height" > <Row android:rowEdgeFlags="top" > <Key android:keyLabel=":" android:keyEdgeFlags="left" /> <Key android:keyLabel="/" /> <Key android:keyLabel="&amp;" /> <Key android:keyLabel="(" /> <Key android:keyLabel=")" /> <Key android:keyLabel="-" /> <Key android:keyLabel="+" android:keyEdgeFlags="right" /> </Row> <Row android:rowEdgeFlags="bottom" > <Key android:keyLabel=";" android:keyEdgeFlags="left" /> <Key android:keyLabel="\@" /> <Key android:keyLabel="\'" /> <Key android:keyLabel="&quot;" /> <Key android:keyLabel="\?" /> <Key android:keyLabel="!" /> <Key android:keyLabel="," android:keyEdgeFlags="right" /> </Row> </Keyboard> ```
/content/code_sandbox/app/src/main/res/xml/popup_punctuation.xml
xml
2016-01-22T21:40:54
2024-08-16T11:54:30
hackerskeyboard
klausw/hackerskeyboard
1,807
341
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="path_to_url"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{EE61B7EF-EC45-4165-8B59-FD5B7D4A9F9D}</ProjectGuid> <RootNamespace>Test_split_interval_map_infix</RootNamespace> <Keyword>Win32Proj</Keyword> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> <WholeProgramOptimization>true</WholeProgramOptimization> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <CharacterSet>Unicode</CharacterSet> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </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> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.30319.1</_ProjectFileVersion> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/debug/\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">../../../../bin/obj/$(ProjectName)/debug/\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/release/\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">../../../../bin/obj/$(ProjectName)/release/\</IntDir> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <ClCompile> <Optimization>Disabled</Optimization> <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MinimalRebuild>true</MinimalRebuild> <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks> <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>EditAndContinue</DebugInformationFormat> </ClCompile> <Link> <OutputFile>../../../../bin/debug/$(ProjectName).exe</OutputFile> <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention> </DataExecutionPrevention> <TargetMachine>MachineX86</TargetMachine> </Link> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <AdditionalIncludeDirectories>../../../../;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <PrecompiledHeader> </PrecompiledHeader> <WarningLevel>Level4</WarningLevel> <DebugInformationFormat>ProgramDatabase</DebugInformationFormat> </ClCompile> <Link> <OutputFile>../../../../bin/release/$(ProjectName).exe</OutputFile> <AdditionalLibraryDirectories>../../../../lib; ../../../../stage/lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Console</SubSystem> <OptimizeReferences>true</OptimizeReferences> <EnableCOMDATFolding>true</EnableCOMDATFolding> <RandomizedBaseAddress>false</RandomizedBaseAddress> <DataExecutionPrevention> </DataExecutionPrevention> <TargetMachine>MachineX86</TargetMachine> </Link> </ItemDefinitionGroup> <ItemGroup> <ClCompile Include="test_split_interval_map_infix.cpp" /> </ItemGroup> <ItemGroup> <ClInclude Include="..\test_interval_map_shared.hpp" /> <ClInclude Include="..\test_type_lists.hpp" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project> ```
/content/code_sandbox/deps/boost_1_66_0/libs/icl/test/test_split_interval_map_infix_/vc10_test_split_interval_map_infix.vcxproj
xml
2016-09-05T10:18:44
2024-08-11T13:21:40
LiquidCore
LiquidPlayer/LiquidCore
1,010
1,335
```xml import './Ix.js'; import { Observer, PartialObserver } from '../src/observer.js'; import { AsyncIterableX } from 'ix/asynciterable/asynciterablex.js'; export async function hasNext<T>(source: AsyncIterator<T>, expected: T) { await expect(source.next()).resolves.toEqual({ done: false, value: expected }); } export async function hasErr(source: AsyncIterator<any>, expected: any) { await expect(source.next()).rejects.toThrow(expected); } export async function noNext<T>(source: AsyncIterator<T>) { await expect(source.next()).resolves.toEqual({ done: true, value: undefined }); } export function delayValue<T>(item: T, delay: number): Promise<T> { return new Promise<T>((res) => { setTimeout(() => { res(item); }, delay); }); } export function delayError<T>(item: T, delay: number): Promise<void> { return new Promise<void>((_, reject) => { setTimeout(() => { reject(item); }, delay); }); } const noop = (_?: any) => { /**/ }; // eslint-disable-next-line complexity export function toObserver<T>( next?: PartialObserver<T> | ((value: T) => void) | null, error?: ((err: any) => void) | null, complete?: (() => void) | null ): Observer<T> { if (next && typeof next === 'object') { const observer = <any>next; return { next: (observer.next || noop).bind(observer), error: (observer.error || noop).bind(observer), complete: (observer.complete || noop).bind(observer), }; } else { return { next: typeof next === 'function' ? next : noop, error: typeof error === 'function' ? error : noop, complete: typeof complete === 'function' ? complete : noop, }; } } declare global { namespace jest { interface Matchers<R> { toEqualStream<T>( expected: Iterable<T> | AsyncIterable<T>, comparer?: (first: T, second: T) => boolean | Promise<boolean> ): Promise<CustomMatcherResult>; } } } const defaultAsyncCompare = <T>(x: T, y: T) => { // poor man's deep-equals try { expect(x).toEqual(y); } catch (e) { return false; } return true; }; expect.extend({ // eslint-disable-next-line complexity async toEqualStream<T>( this: jest.MatcherUtils, actual: Iterable<T> | AsyncIterable<T>, expected: Iterable<T> | AsyncIterable<T>, comparer: (first: T, second: T) => boolean | Promise<boolean> = defaultAsyncCompare ) { let actualCount = 0; let expectedCount = 0; let next1: IteratorResult<T>; let next2: IteratorResult<T>; const results: string[] = []; const it1 = AsyncIterableX.as(expected)[Symbol.asyncIterator](); const it2 = typeof (<any>actual)[Symbol.asyncIterator] === 'function' ? (<any>actual)[Symbol.asyncIterator]() : (<any>actual)[Symbol.iterator](); while (!(next1 = await it1.next()).done) { expectedCount++; if (!(next2 = await it2.next(getValueByteLength(next1.value))).done) { actualCount++; if (!(await comparer(next1.value, next2.value))) { results.push( `expected ${this.utils.printExpected(next2.value)} to equal ${this.utils.printReceived( next1.value )}` ); break; } } } while (!(await it1.next()).done) { expectedCount++; } if ((!(await it2.next()).done && ++actualCount) || expectedCount !== actualCount) { results.push(`expected length ${expectedCount}, instead received ${++actualCount}`); } return { pass: results.length === 0, message: () => results.join('\n') }; }, }); function getValueByteLength(value: any) { if (value && value.buffer instanceof ArrayBuffer) { return value.byteLength; } return undefined; } ```
/content/code_sandbox/spec/asynciterablehelpers.ts
xml
2016-02-22T20:04:19
2024-08-09T18:46:41
IxJS
ReactiveX/IxJS
1,319
924
```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>NSExtension</key> <dict> <key>NSExtensionAttributes</key> <dict> <key>IntentsSupported</key> <array/> </dict> <key>NSExtensionPointIdentifier</key> <string>com.apple.intents-service</string> <key>NSExtensionPrincipalClass</key> <string>$(PRODUCT_MODULE_NAME).IntentHandler</string> </dict> </dict> </plist> ```
/content/code_sandbox/tests/dotnet/AdditionalAppExtensionConsumer/nativeextension/tvOS/NativeIntentsExtension/Info.plist
xml
2016-04-20T18:24:26
2024-08-16T13:29:19
xamarin-macios
xamarin/xamarin-macios
2,436
158
```xml import { useState, useCallback, useEffect } from 'react' import { createStoreContext } from '../../utils/context' import { SearchContext } from './types' import { HistoryItem } from '../../../api/search' import { localLiteStorage } from 'ltstrg' import { searchKey, searchHistoryKey } from '../../localStorageKeys' import { SerializedDoc } from '../../../interfaces/db/doc' import { SerializedFolder } from '../../../interfaces/db/folder' import { usePage } from '../pageStore' const recentPagesLimit = 5 const historySearchLimit = 3 type LocallyStoredHistoryProps = { [teamId: string]: HistoryItem[] } type LocallyStoredSearchHistoryProps = { [teamId: string]: string[] } function useSearchStore(): SearchContext { const [showSearchScreen, setShowSearchScreen] = useState(false) const [history, setHistory] = useState<HistoryItem[]>([]) const [searchHistory, setSearchHistory] = useState<string[]>([]) const { team, pageFolder, pageDoc } = usePage() const addToSearchHistory = useCallback((newSearch: string) => { if (newSearch.trim() === '') { return } return setSearchHistory((prev) => { const old = prev != null ? prev.filter((prevItem) => prevItem.trim() !== newSearch.trim()) : [] return [newSearch, ...old].slice(0, historySearchLimit) }) }, []) const addVisitedToHistory = useCallback( (item: SerializedDoc | SerializedFolder) => { let historyItem: HistoryItem if ('head' in item) { historyItem = { type: 'doc', item: item.id, } } else { historyItem = { type: 'folder', item: item.id } } setHistory((prevHistory = []) => { const newHistory = [...prevHistory] .filter((val) => val.item !== historyItem.item) .slice(0, recentPagesLimit - 1) newHistory.unshift(historyItem) return newHistory }) }, [] ) // LOAD FROM LOCAL STORAGE useEffect(() => { if (team == null) { return } try { const stringifiedData = localLiteStorage.getItem(searchKey) if (stringifiedData == null) { return } const locallyStoredDatas = JSON.parse( stringifiedData ) as LocallyStoredHistoryProps const locallyStoredIds = locallyStoredDatas[team.id] if (Array.isArray(locallyStoredIds)) { setHistory(locallyStoredIds) } } catch (error) { // eslint-disable-next-line no-console console.warn(error.message) } try { const stringifiedSearchData = localLiteStorage.getItem(searchHistoryKey) if (stringifiedSearchData == null) { return } const locallyStoredSearchData = JSON.parse( stringifiedSearchData ) as LocallyStoredSearchHistoryProps const locallyStoredResults = locallyStoredSearchData[team.id] if (Array.isArray(locallyStoredResults)) { setSearchHistory(locallyStoredResults) } } catch (error) { // eslint-disable-next-line no-console console.warn(error.message) } }, [team]) // SAVE CHANGES TO LOCALSTORAGE useEffect(() => { if (team == null) { return } let baseData = localLiteStorage.getItem(searchKey) if (baseData == null) { baseData = '{}' } const data = JSON.parse(baseData) data[team!.id] = history localLiteStorage.setItem(searchKey, JSON.stringify(data)) }, [history, team]) useEffect(() => { if (team == null) { return } let baseData = localLiteStorage.getItem(searchHistoryKey) if (baseData == null) { baseData = '{}' } const data = JSON.parse(baseData) data[team!.id] = searchHistory localLiteStorage.setItem(searchHistoryKey, JSON.stringify(data)) }, [searchHistory, team]) // RECORD HISTORY useEffect(() => { if (pageDoc != null) { addVisitedToHistory(pageDoc as SerializedDoc) } if (pageFolder != null) { addVisitedToHistory(pageFolder as SerializedFolder) } }, [pageDoc, pageFolder, addVisitedToHistory]) return { history, searchHistory, addToSearchHistory, showSearchScreen, setShowSearchScreen, } } export const { StoreProvider: SearchProvider, useStore: useSearch } = createStoreContext(useSearchStore, 'search') ```
/content/code_sandbox/src/cloud/lib/stores/search/store.ts
xml
2016-11-19T14:30:34
2024-08-16T03:13:45
BoostNote-App
BoostIO/BoostNote-App
3,745
1,024
```xml // See LICENSE.txt for license information. import React, {useCallback, useEffect} from 'react'; import {useIntl} from 'react-intl'; import {Keyboard, type StyleProp, TouchableHighlight, View, type ViewStyle} from 'react-native'; import {fetchMissingProfilesByIds, fetchMissingProfilesByUsernames} from '@actions/remote/user'; import Markdown from '@components/markdown'; import SystemAvatar from '@components/system_avatar'; import SystemHeader from '@components/system_header'; import {Post as PostConstants, Screens} from '@constants'; import {useServerUrl} from '@context/server'; import {useIsTablet} from '@hooks/device'; import {bottomSheetModalOptions, showModal, showModalOverCurrentContext} from '@screens/navigation'; import {emptyFunction} from '@utils/general'; import {getMarkdownTextStyles} from '@utils/markdown'; import {changeOpacity, makeStyleSheetFromTheme} from '@utils/theme'; import LastUsers from './last_users'; import {postTypeMessages} from './messages'; type Props = { canDelete: boolean; currentUserId?: string; currentUsername?: string; location: string; post: Post | null; showJoinLeave: boolean; testID?: string; theme: Theme; usernamesById: Record<string, string>; style?: StyleProp<ViewStyle>; } const getStyleSheet = makeStyleSheetFromTheme((theme: Theme) => { return { baseText: { color: changeOpacity(theme.centerChannelColor, 0.6), fontSize: 16, lineHeight: 20, }, body: { flex: 1, paddingBottom: 2, paddingTop: 2, }, container: { flexDirection: 'row', paddingHorizontal: 20, marginTop: 10, }, content: { flex: 1, flexDirection: 'column', marginLeft: 12, }, }; }); const CombinedUserActivity = ({ canDelete, currentUserId, currentUsername, location, post, showJoinLeave, testID, theme, usernamesById = {}, style, }: Props) => { const intl = useIntl(); const isTablet = useIsTablet(); const serverUrl = useServerUrl(); const textStyles = getMarkdownTextStyles(theme); const styles = getStyleSheet(theme); const content = []; const removedUserIds: string[] = []; const getUsernames = (userIds: string[]) => { const someone = intl.formatMessage({id: 'channel_loader.someone', defaultMessage: 'Someone'}); const you = intl.formatMessage({id: 'combined_system_message.you', defaultMessage: 'You'}); const usernamesValues = Object.values(usernamesById); const usernames = userIds.reduce((acc: string[], id: string) => { if (id !== currentUserId && id !== currentUsername) { const name = usernamesById[id] ?? usernamesValues.find((n) => n === id); acc.push(name ? `@${name}` : someone); } return acc; }, []); if (currentUserId && userIds.includes(currentUserId)) { usernames.unshift(you); } else if (currentUsername && userIds.includes(currentUsername)) { usernames.unshift(you); } return usernames; }; const onLongPress = useCallback(() => { if (!canDelete || !post) { return; } const passProps = {post, sourceScreen: location}; Keyboard.dismiss(); const title = isTablet ? intl.formatMessage({id: 'post.options.title', defaultMessage: 'Options'}) : ''; if (isTablet) { showModal(Screens.POST_OPTIONS, title, passProps, bottomSheetModalOptions(theme, 'close-post-options')); } else { showModalOverCurrentContext(Screens.POST_OPTIONS, passProps, bottomSheetModalOptions(theme)); } }, [post, canDelete, isTablet, intl, location]); const renderMessage = (postType: string, userIds: string[], actorId: string) => { if (!post) { return null; } let actor = ''; if (usernamesById[actorId]) { actor = `@${usernamesById[actorId]}`; } if (actor && (actorId === currentUserId || actorId === currentUsername)) { actor = intl.formatMessage({id: 'combined_system_message.you', defaultMessage: 'You'}).toLowerCase(); } const usernames = getUsernames(userIds); const numOthers = usernames.length - 1; if (numOthers > 1) { return ( <LastUsers key={postType + actorId} channelId={post.channel_id} actor={actor} location={location} postType={postType} theme={theme} usernames={usernames} /> ); } const firstUser = usernames[0]; const secondUser = usernames[1]; let localeHolder; if (numOthers === 0) { localeHolder = postTypeMessages[postType].one; if ( (userIds[0] === currentUserId || userIds[0] === currentUsername) && postTypeMessages[postType].one_you ) { localeHolder = postTypeMessages[postType].one_you; } } else { localeHolder = postTypeMessages[postType].two; } const formattedMessage = intl.formatMessage(localeHolder, {firstUser, secondUser, actor}); return ( <Markdown channelId={post.channel_id} key={postType + actorId} baseTextStyle={styles.baseText} location={location} textStyles={textStyles} value={formattedMessage} theme={theme} /> ); }; useEffect(() => { if (!post) { return; } const {allUserIds, allUsernames} = post.props.user_activity; if (allUserIds.length) { fetchMissingProfilesByIds(serverUrl, allUserIds); } if (allUsernames.length) { fetchMissingProfilesByUsernames(serverUrl, allUsernames); } }, [post?.props.user_activity.allUserIds, post?.props.user_activity.allUsernames]); if (!post) { return null; } const itemTestID = `${testID}.${post.id}`; const {messageData} = post.props.user_activity; for (const message of messageData) { const {postType, actorId} = message; const userIds = new Set<string>(message.userIds); if (!showJoinLeave && currentUserId && actorId !== currentUserId) { const affectsCurrentUser = userIds.has(currentUserId); if (affectsCurrentUser) { // Only show the message that the current user was added, etc userIds.add(currentUserId); } else { // Not something the current user did or was affected by continue; } } if (postType === PostConstants.POST_TYPES.REMOVE_FROM_CHANNEL) { removedUserIds.push(...Array.from(userIds)); continue; } content.push(renderMessage(postType, Array.from(userIds), actorId)); } if (removedUserIds.length > 0) { const uniqueRemovedUserIds = [...new Set(removedUserIds)]; content.push(renderMessage(PostConstants.POST_TYPES.REMOVE_FROM_CHANNEL, uniqueRemovedUserIds, currentUserId || '')); } return ( <View style={style} testID={testID} > <TouchableHighlight testID={itemTestID} onPress={emptyFunction} onLongPress={onLongPress} underlayColor={changeOpacity(theme.centerChannelColor, 0.1)} > <View style={styles.container}> <SystemAvatar theme={theme}/> <View style={styles.content}> <SystemHeader createAt={post.create_at} theme={theme} /> <View style={styles.body}> {content} </View> </View> </View> </TouchableHighlight> </View> ); }; export default CombinedUserActivity; ```
/content/code_sandbox/app/components/post_list/combined_user_activity/combined_user_activity.tsx
xml
2016-10-07T16:52:32
2024-08-16T12:08:38
mattermost-mobile
mattermost/mattermost-mobile
2,155
1,755
```xml // See LICENSE in the project root for license information. // This is a workaround for path_to_url // // To correct how ESLint searches for plugin packages, add this line to the top of your project's .eslintrc.js file: // // require("@rushstack/eslint-patch/modern-module-resolution"); // import path from 'path'; const isModuleResolutionError: (ex: unknown) => boolean = (ex) => typeof ex === 'object' && !!ex && 'code' in ex && (ex as { code: unknown }).code === 'MODULE_NOT_FOUND'; // Module path for eslintrc.cjs // Example: ".../@eslint/eslintrc/dist/eslintrc.cjs" let eslintrcBundlePath: string | undefined = undefined; // Module path for config-array-factory.js // Example: ".../@eslint/eslintrc/lib/config-array-factory" let configArrayFactoryPath: string | undefined = undefined; // Module path for relative-module-resolver.js // Example: ".../@eslint/eslintrc/lib/shared/relative-module-resolver" let moduleResolverPath: string | undefined = undefined; // Module path for naming.js // Example: ".../@eslint/eslintrc/lib/shared/naming" let namingPath: string | undefined = undefined; // Folder path where ESLint's package.json can be found // Example: ".../node_modules/eslint" let eslintFolder: string | undefined = undefined; // Probe for the ESLint >=8.0.0 layout: for (let currentModule: NodeModule = module; ; ) { if (!eslintrcBundlePath) { if (currentModule.filename.endsWith('eslintrc.cjs')) { // For ESLint >=8.0.0, all @eslint/eslintrc code is bundled at this path: // .../@eslint/eslintrc/dist/eslintrc.cjs try { const eslintrcFolderPath: string = path.dirname( require.resolve('@eslint/eslintrc/package.json', { paths: [currentModule.path] }) ); // Make sure we actually resolved the module in our call path // and not some other spurious dependency. const resolvedEslintrcBundlePath: string = path.join(eslintrcFolderPath, 'dist/eslintrc.cjs'); if (resolvedEslintrcBundlePath === currentModule.filename) { eslintrcBundlePath = resolvedEslintrcBundlePath; } } catch (ex: unknown) { // Module resolution failures are expected, as we're walking // up our require stack to look for eslint. All other errors // are re-thrown. if (!isModuleResolutionError(ex)) { throw ex; } } } } else { // Next look for a file in ESLint's folder // .../eslint/lib/cli-engine/cli-engine.js try { const eslintCandidateFolder: string = path.dirname( require.resolve('eslint/package.json', { paths: [currentModule.path] }) ); // Make sure we actually resolved the module in our call path // and not some other spurious dependency. if (currentModule.filename.startsWith(eslintCandidateFolder + path.sep)) { eslintFolder = eslintCandidateFolder; break; } } catch (ex: unknown) { // Module resolution failures are expected, as we're walking // up our require stack to look for eslint. All other errors // are re-thrown. if (!isModuleResolutionError(ex)) { throw ex; } } } if (!currentModule.parent) { break; } currentModule = currentModule.parent; } if (!eslintFolder) { // Probe for the ESLint >=7.12.0 layout: for (let currentModule: NodeModule = module; ; ) { if (!configArrayFactoryPath) { // For ESLint >=7.12.0, config-array-factory.js is at this path: // .../@eslint/eslintrc/lib/config-array-factory.js try { const eslintrcFolder: string = path.dirname( require.resolve('@eslint/eslintrc/package.json', { paths: [currentModule.path] }) ); const resolvedConfigArrayFactoryPath: string = path.join( eslintrcFolder, '/lib/config-array-factory.js' ); if (resolvedConfigArrayFactoryPath === currentModule.filename) { configArrayFactoryPath = resolvedConfigArrayFactoryPath; moduleResolverPath = `${eslintrcFolder}/lib/shared/relative-module-resolver`; namingPath = `${eslintrcFolder}/lib/shared/naming`; } } catch (ex: unknown) { // Module resolution failures are expected, as we're walking // up our require stack to look for eslint. All other errors // are re-thrown. if (!isModuleResolutionError(ex)) { throw ex; } } } else if (currentModule.filename.endsWith('cli-engine.js')) { // Next look for a file in ESLint's folder // .../eslint/lib/cli-engine/cli-engine.js try { const eslintCandidateFolder: string = path.dirname( require.resolve('eslint/package.json', { paths: [currentModule.path] }) ); if (path.join(eslintCandidateFolder, 'lib/cli-engine/cli-engine.js') === currentModule.filename) { eslintFolder = eslintCandidateFolder; break; } } catch (ex: unknown) { // Module resolution failures are expected, as we're walking // up our require stack to look for eslint. All other errors // are rethrown. if (!isModuleResolutionError(ex)) { throw ex; } } } if (!currentModule.parent) { break; } currentModule = currentModule.parent; } } if (!eslintFolder) { // Probe for the <7.12.0 layout: for (let currentModule: NodeModule = module; ; ) { // For ESLint <7.12.0, config-array-factory.js was at this path: // .../eslint/lib/cli-engine/config-array-factory.js if (/[\\/]eslint[\\/]lib[\\/]cli-engine[\\/]config-array-factory\.js$/i.test(currentModule.filename)) { eslintFolder = path.join(path.dirname(currentModule.filename), '../..'); configArrayFactoryPath = `${eslintFolder}/lib/cli-engine/config-array-factory`; moduleResolverPath = `${eslintFolder}/lib/shared/relative-module-resolver`; // The naming module was moved to @eslint/eslintrc in ESLint 7.8.0, which is also when the @eslint/eslintrc // package was created and added to ESLint, so we need to probe for whether it's in the old or new location. let eslintrcFolder: string | undefined; try { eslintrcFolder = path.dirname( require.resolve('@eslint/eslintrc/package.json', { paths: [currentModule.path] }) ); } catch (ex: unknown) { if (!isModuleResolutionError(ex)) { throw ex; } } namingPath = `${eslintrcFolder ?? eslintFolder}/lib/shared/naming`; break; } if (!currentModule.parent) { // This was tested with ESLint 6.1.0 .. 7.12.1. throw new Error( 'Failed to patch ESLint because the calling module was not recognized.\n' + 'If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:\n' + 'path_to_url ); } currentModule = currentModule.parent; } } // Detect the ESLint package version const eslintPackageJsonPath: string = `${eslintFolder}/package.json`; const eslintPackageObject: { version: string } = require(eslintPackageJsonPath); export const eslintPackageVersion: string = eslintPackageObject.version; const ESLINT_MAJOR_VERSION: number = parseInt(eslintPackageVersion, 10); if (isNaN(ESLINT_MAJOR_VERSION)) { throw new Error( `Unable to parse ESLint version "${eslintPackageVersion}" in file "${eslintPackageJsonPath}"` ); } if (!(ESLINT_MAJOR_VERSION >= 6 && ESLINT_MAJOR_VERSION <= 9)) { throw new Error( 'The ESLint patch script has only been tested with ESLint version 6.x, 7.x, 8.x, and 9.x.' + ` (Your version: ${eslintPackageVersion})\n` + 'Consider reporting a GitHub issue:\n' + 'path_to_url ); } // eslint-disable-next-line @typescript-eslint/no-explicit-any let configArrayFactory: any; if (ESLINT_MAJOR_VERSION >= 8) { configArrayFactory = require(eslintrcBundlePath!).Legacy.ConfigArrayFactory; } else { configArrayFactory = require(configArrayFactoryPath!).ConfigArrayFactory; } // eslint-disable-next-line @typescript-eslint/no-explicit-any let ModuleResolver: { resolve: any }; // eslint-disable-next-line @typescript-eslint/no-explicit-any let Naming: { normalizePackageName: any }; if (ESLINT_MAJOR_VERSION >= 8) { ModuleResolver = require(eslintrcBundlePath!).Legacy.ModuleResolver; Naming = require(eslintrcBundlePath!).Legacy.naming; } else { ModuleResolver = require(moduleResolverPath!); Naming = require(namingPath!); } export { eslintFolder, configArrayFactory, ModuleResolver, Naming, ESLINT_MAJOR_VERSION, isModuleResolutionError }; ```
/content/code_sandbox/eslint/eslint-patch/src/_patch-base.ts
xml
2016-09-30T00:28:20
2024-08-16T18:54:35
rushstack
microsoft/rushstack
5,790
2,117
```xml <?xml version="1.0" encoding="utf-8"?> <!-- path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <resources> <string-array name="roboguice_modules"> <item>com.github.mobile.GitHubModule</item> </string-array> </resources> ```
/content/code_sandbox/app/src/main/res/values/roboguice.xml
xml
2016-04-09T16:05:02
2024-08-08T06:37:18
trugithub
kba7/trugithub
2,055
88
```xml import { memo, useMemo } from 'react'; import { motion, AnimatePresence, MotionStyle } from 'framer-motion'; import { FaTrashAlt } from 'react-icons/fa'; import { mySpring } from './animations'; import useUserSettings from './hooks/useUserSettings'; import { useSegColors } from './contexts'; import { ApparentCutSegment, FormatTimecode } from './types'; function TimelineSeg({ seg, duration, isActive, segNum, onSegClick, invertCutSegments, formatTimecode, selected, } : { seg: ApparentCutSegment, duration: number, isActive: boolean, segNum: number, onSegClick: (a: number) => void, invertCutSegments: boolean, formatTimecode: FormatTimecode, selected: boolean, }) { const { darkMode } = useUserSettings(); const { getSegColor } = useSegColors(); const segColor = useMemo(() => getSegColor(seg), [getSegColor, seg]); const { name, start: cutStart, end: cutEnd } = seg; const cutSectionWidth = `${((cutEnd - cutStart) / duration) * 100}%`; const startTimePos = `${(cutStart / duration) * 100}%`; const markerBorder = useMemo(() => { if (!isActive) return '2px solid transparent'; return `1.5px solid ${darkMode ? segColor.desaturate(0.1).lightness(70).string() : segColor.desaturate(0.2).lightness(40).string()}`; }, [darkMode, isActive, segColor]); const backgroundColor = useMemo(() => { // we use both transparency and lightness, so that segments can be visible when overlapping if (invertCutSegments || !selected) return darkMode ? segColor.desaturate(0.3).lightness(30).alpha(0.5).string() : segColor.desaturate(0.3).lightness(70).alpha(0.5).string(); if (isActive) return darkMode ? segColor.saturate(0.2).lightness(60).alpha(0.7).string() : segColor.saturate(0.2).lightness(40).alpha(0.8).string(); return darkMode ? segColor.desaturate(0.2).lightness(50).alpha(0.7).string() : segColor.lightness(35).alpha(0.6).string(); }, [darkMode, invertCutSegments, isActive, segColor, selected]); const markerBorderRadius = 5; const wrapperStyle: MotionStyle = { position: 'absolute', top: 0, bottom: 0, left: startTimePos, width: cutSectionWidth, display: 'flex', alignItems: 'center', justifyContent: 'space-between', originX: 0, boxSizing: 'border-box', color: 'white', overflow: 'hidden', borderLeft: markerBorder, borderTopLeftRadius: markerBorderRadius, borderBottomLeftRadius: markerBorderRadius, borderRight: markerBorder, borderTopRightRadius: markerBorderRadius, borderBottomRightRadius: markerBorderRadius, }; const onThisSegClick = () => onSegClick(segNum); const title: string[] = []; if (cutEnd > cutStart) title.push(`${formatTimecode({ seconds: cutEnd - cutStart, shorten: true })}`); if (name) title.push(name); return ( <motion.div style={wrapperStyle} layout transition={mySpring} initial={{ opacity: 0, scaleX: 0 }} animate={{ opacity: 1, scaleX: 1, backgroundColor }} exit={{ opacity: 0, scaleX: 0 }} role="button" onClick={onThisSegClick} title={title.join(' ')} > <div style={{ alignSelf: 'flex-start', flexShrink: 0, fontSize: 10, minWidth: 0, letterSpacing: '-.1em' }}>{segNum + 1}</div> <AnimatePresence> {invertCutSegments && ( <motion.div initial={{ scale: 0 }} animate={{ scale: 1 }} exit={{ scale: 0 }} style={{ width: 16, height: 16, flexShrink: 1 }} > <FaTrashAlt style={{ width: '100%', color: 'var(--gray12)' }} size={16} /> </motion.div> )} </AnimatePresence> {name && <div style={{ flexBasis: 4, flexShrink: 1 }} />} {name && <div style={{ flexShrink: 1, fontSize: 11, minWidth: 0, overflow: 'hidden', whiteSpace: 'nowrap' }}>{name}</div>} <div style={{ flexGrow: 1 }} /> </motion.div> ); } export default memo(TimelineSeg); ```
/content/code_sandbox/src/renderer/src/TimelineSeg.tsx
xml
2016-10-30T10:49:56
2024-08-16T19:12:59
lossless-cut
mifi/lossless-cut
25,459
1,091
```xml import { type FC } from 'react'; import { useSelector } from 'react-redux'; import { c, msgid } from 'ttag'; import { Button } from '@proton/atoms/Button'; import { CircleLoader } from '@proton/atoms/CircleLoader'; import { ModalTwoContent, ModalTwoFooter, ModalTwoHeader, Progress } from '@proton/components/components'; import { Card } from '@proton/pass/components/Layout/Card/Card'; import { PassModal } from '@proton/pass/components/Layout/Modal/PassModal'; import { getItemsText } from '@proton/pass/components/Settings/helper'; import { VaultIcon } from '@proton/pass/components/Vault/VaultIcon'; import { useActionRequest } from '@proton/pass/hooks/useActionRequest'; import { inviteAcceptIntent, inviteRejectIntent } from '@proton/pass/store/actions'; import { selectUserVerified, selectVaultLimits } from '@proton/pass/store/selectors'; import type { Invite } from '@proton/pass/types/data/invites'; import { useInviteContext } from './InviteProvider'; import { UserVerificationMessage } from './UserVerificationMessage'; export const VaultInviteRespond: FC<Invite> = (invite) => { const { inviterEmail, invitedAddressId, token, vault, fromNewUser } = invite; const { itemCount, memberCount } = vault; const { vaultLimitReached } = useSelector(selectVaultLimits); const { onInviteResponse } = useInviteContext(); const acceptInvite = useActionRequest(inviteAcceptIntent, { onSuccess: onInviteResponse }); const rejectInvite = useActionRequest(inviteRejectIntent, { onSuccess: onInviteResponse }); const handleRejectInvite = () => rejectInvite.dispatch({ inviteToken: invite.token }); const handleAcceptInvite = () => acceptInvite.dispatch({ inviteToken: token, inviterEmail, invitedAddressId }); const loading = acceptInvite.loading || rejectInvite.loading; const userVerified = useSelector(selectUserVerified); return ( <PassModal size="small" open onClose={onInviteResponse} enableCloseWhenClickOutside> <ModalTwoHeader className="text-center text-break-all" hasClose={false} {...(fromNewUser ? { title: c('Info').t`Congratulations, your access has been confirmed` } : { title: inviterEmail, // translator: full sentence is split into 3 components in our design. Example: {eric.norbert@proton.me} invites you to access items in {name of the vault}" subline: c('Info').t`invites you to access items in`, })} /> <ModalTwoContent className="flex flex-column items-center"> <VaultIcon color={vault.content.display.color} icon={vault.content.display.icon} size={8} background className="mb-2" /> <div className="text-xl text-bold text-ellipsis max-w-full">{vault.content.name}</div> <div className="color-weak"> <span>{getItemsText(itemCount)}</span> <span> </span> <span> {c('Info').ngettext(msgid`${memberCount} member`, `${memberCount} members`, memberCount)} </span> </div> </ModalTwoContent> <ModalTwoFooter className="flex flex-column items-stretch text-center"> {!userVerified && <UserVerificationMessage />} {userVerified && vaultLimitReached && ( <Card className="mb-2 text-sm" type="primary"> {c('Warning').t`You have reached the limit of vaults you can have in your plan.`} </Card> )} <Button pill size="large" shape="solid" color="norm" disabled={loading || !userVerified || vaultLimitReached} loading={acceptInvite.loading} onClick={handleAcceptInvite} > {fromNewUser ? c('Action').t`Continue` : c('Action').t`Join shared vault`} </Button> <Button pill size="large" shape="solid" color="weak" disabled={loading || !userVerified} loading={rejectInvite.loading} onClick={handleRejectInvite} > {fromNewUser ? c('Action').t`Reject` : c('Action').t`Reject invitation`} </Button> {acceptInvite.loading && ( <div className="ui-purple flex gap-x-2 items-center"> <Progress value={ invite.vault.itemCount > 0 ? Math.round(100 * (acceptInvite.progress / invite.vault.itemCount)) : 0 } className="flex-1 progress-bar--norm" /> <small className="block"> {acceptInvite.progress} / {invite.vault.itemCount} </small> <CircleLoader size="small" /> </div> )} </ModalTwoFooter> </PassModal> ); }; ```
/content/code_sandbox/packages/pass/components/Invite/VaultInviteRespond.tsx
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
1,072
```xml import {Injectable} from '@angular/core'; import {CanActivate, ActivatedRouteSnapshot, Router, RouterStateSnapshot} from '@angular/router'; import { AuthService } from './auth/auth.service'; @Injectable({ providedIn: 'root', }) export class RedirectGuard implements CanActivate { constructor(private router: Router, private authService: AuthService) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise<boolean> { try { if (route.data['logout']) await this.authService.logout(); } catch(e) { console.log(e) } window.location.href = route.data['externalUrl']; return false; } } ```
/content/code_sandbox/api/client/src/app/redirect.guard.ts
xml
2016-06-08T16:34:46
2024-08-16T18:12:30
WALKOFF
nsacyber/WALKOFF
1,198
135
```xml <?xml version="1.0" encoding="utf-8"?> <!-- path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <selector xmlns:android="path_to_url"> <!-- Selected. --> <!-- Pressing on a selected display will remain selected. --> <item android:alpha="@dimen/m3_comp_time_picker_time_selector_pressed_state_layer_opacity" android:color="@macro/your_sha256_hasholor" android:state_pressed="true" android:state_selected="true"/> <item android:alpha="@dimen/m3_comp_time_picker_time_selector_focus_state_layer_opacity" android:color="@macro/your_sha256_hashor" android:state_focused="true" android:state_selected="true"/> <item android:alpha="@dimen/m3_comp_time_picker_time_selector_hover_state_layer_opacity" android:color="@macro/your_sha256_hashor" android:state_hovered="true" android:state_selected="true"/> <item android:alpha="@dimen/m3_ripple_default_alpha" android:color="?attr/colorOnPrimaryContainer" android:state_selected="true"/> <!-- Unselected. --> <!-- Pressing on an unselected display will select it. So we use values for selected (checked) container color here. --> <item android:alpha="@dimen/m3_comp_time_picker_time_selector_pressed_state_layer_opacity" android:color="?attr/colorOnPrimaryContainer" android:state_pressed="true"/> <!-- TODO(b/247609386) Use token when value is updated as is. --> <item android:alpha="@dimen/m3_comp_time_picker_time_selector_focus_state_layer_opacity" android:color="@macro/your_sha256_hasholor" android:state_focused="true"/> <item android:alpha="@dimen/m3_comp_time_picker_time_selector_hover_state_layer_opacity" android:color="@macro/your_sha256_hasholor" android:state_hovered="true"/> <item android:alpha="@dimen/m3_ripple_default_alpha" android:color="?attr/colorOnSurface"/> </selector> ```
/content/code_sandbox/lib/java/com/google/android/material/timepicker/res/color/m3_timepicker_display_ripple_color.xml
xml
2016-12-05T16:11:29
2024-08-16T17:51:42
material-components-android
material-components/material-components-android
16,176
468
```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>QuickSightV2</groupId> <artifactId>QuickSightV2</artifactId> <version>1.0-SNAPSHOT</version> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>17</java.version> <maven.compiler.target>17</maven.compiler.target> <maven.compiler.source>17</maven.compiler.source> </properties> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.22.1</version> <configuration> <groups>IntegrationTest</groups> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>${java.version}</source> <target>${java.version}</target> </configuration> </plugin> </plugins> </build> <dependencyManagement> <dependencies> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>bom</artifactId> <version>2.21.20</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-api</artifactId> <version>5.9.0</version> <scope>test</scope> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>secretsmanager</artifactId> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.10.1</version> </dependency> <dependency> <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter-engine</artifactId> <version>5.9.0</version> <scope>test</scope> </dependency> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-commons</artifactId> <version>1.9.0</version> </dependency> <dependency> <groupId>org.junit.platform</groupId> <artifactId>junit-platform-launcher</artifactId> <version>1.9.0</version> <scope>test</scope> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>quicksight</artifactId> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>s3</artifactId> </dependency> </dependencies> </project> ```
/content/code_sandbox/javav2/example_code/quicksight/pom.xml
xml
2016-08-18T19:06:57
2024-08-16T18:59:44
aws-doc-sdk-examples
awsdocs/aws-doc-sdk-examples
9,298
725
```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. --> <com.google.android.flexbox.FlexboxLayout xmlns:android="path_to_url" xmlns:app="path_to_url" android:id="@+id/flexbox_layout" android:layout_width="match_parent" android:layout_height="match_parent" app:flexDirection="row" app:flexWrap="wrap"> <TextView android:id="@+id/text1" android:layout_width="0dp" android:layout_height="0dp" app:layout_flexBasisPercent="50%" android:text="1" /> <TextView android:id="@+id/text2" android:layout_width="0dp" android:layout_height="0dp" app:layout_flexBasisPercent="60%" android:text="2" /> <TextView android:id="@+id/text3" android:layout_width="60dp" android:layout_height="60dp" android:text="3" /> </com.google.android.flexbox.FlexboxLayout> ```
/content/code_sandbox/flexbox/src/androidTest/res/layout/activity_flex_basis_percent_test.xml
xml
2016-05-04T08:11:22
2024-08-15T12:27:34
flexbox-layout
google/flexbox-layout
18,226
271
```xml <?xml version="1.0" encoding="UTF-8"?><!-- Published by JAX-WS RI at path_to_url RI's version is JAX-WS RI 2.1.6 in JDK 6. --> <xs:schema xmlns:tns="path_to_url" xmlns:xs="path_to_url" version="1.0" targetNamespace="path_to_url"> <xs:element name="getCount" type="tns:getCount"></xs:element> <xs:element name="getCountResponse" type="tns:getCountResponse"></xs:element> <xs:element name="inc" type="tns:inc"></xs:element> <xs:element name="incResponse" type="tns:incResponse"></xs:element> <xs:element name="prettyPrintCount" type="tns:prettyPrintCount"></xs:element> <xs:element name="prettyPrintCountResponse" type="tns:prettyPrintCountResponse"></xs:element> <xs:element name="noNameResult" type="tns:noNameResult"></xs:element> <xs:element name="noNameResultResponse" type="tns:noNameResultResponse"></xs:element> <xs:element name="reservedWordAsName" type="tns:reservedWordAsName"></xs:element> <xs:element name="reservedWordAsNameResponse" type="tns:reservedWordAsNameResponse"></xs:element> <xs:element name="reset" type="tns:reset"></xs:element> <xs:element name="resetResponse" type="tns:resetResponse"></xs:element> <xs:element name="setTo" type="tns:setTo"></xs:element> <xs:element name="setToResponse" type="tns:setToResponse"></xs:element> <xs:complexType name="prettyPrintCount"> <xs:sequence> <xs:element name="prefix" type="xs:string" minOccurs="0"></xs:element> <xs:element name="suffix" type="xs:string" minOccurs="0"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="prettyPrintCountResponse"> <xs:sequence> <xs:element name="prettyPrint" type="xs:string" minOccurs="0"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="reservedWordAsName"> <xs:sequence> <xs:element name="prefix" type="xs:string" minOccurs="0"></xs:element> <xs:element name="suffix" type="xs:string" minOccurs="0"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="reservedWordAsNameResponse"> <xs:sequence> <xs:element name="static" type="xs:string" minOccurs="0"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="noNameResult"> <xs:sequence> <xs:element name="prefix" type="xs:string" minOccurs="0"></xs:element> <xs:element name="suffix" type="xs:string" minOccurs="0"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="noNameResultResponse"> <xs:sequence> <xs:element name="return" type="xs:string" minOccurs="0"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="inc"> <xs:sequence></xs:sequence> </xs:complexType> <xs:complexType name="incResponse"> <xs:sequence></xs:sequence> </xs:complexType> <xs:complexType name="getCount"> <xs:sequence></xs:sequence> </xs:complexType> <xs:complexType name="getCountResponse"> <xs:sequence> <xs:element name="count" type="xs:int"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="setTo"> <xs:sequence> <xs:element name="value" type="xs:int"></xs:element> </xs:sequence> </xs:complexType> <xs:complexType name="setToResponse"> <xs:sequence></xs:sequence> </xs:complexType> <xs:complexType name="reset"> <xs:sequence></xs:sequence> </xs:complexType> <xs:complexType name="resetResponse"> <xs:sequence></xs:sequence> </xs:complexType> </xs:schema> ```
/content/code_sandbox/modules/flowable-cxf/src/test/resources/org/flowable/engine/impl/webservice/counterSchema.xsd
xml
2016-10-13T07:21:43
2024-08-16T15:23:14
flowable-engine
flowable/flowable-engine
7,715
1,038
```xml import { DocumentNode, GraphQLResolveInfo } from 'graphql'; import { merge } from 'lodash'; import { gql, createHttpLink, execute, from, toPromise, GraphQLRequest, FetchResult, ApolloLink, } from '@apollo/client/core'; import { onError } from '@apollo/client/link/error'; import { setContext } from '@apollo/client/link/context'; import { FieldsByTypeName, parseResolveInfo, ResolveTree, } from 'graphql-parse-resolve-info'; import fetch from 'node-fetch'; function fieldPathsAsStrings(obj: { [key: string]: any }) { const paths = (obj = {}, head = ''): string[] => { return Object.entries(obj).reduce( (acc: string[], [key, value]: [string, any]) => { let fullPath = addDelimiter(head, key); return isObject(value) ? acc.concat(key, paths(value, fullPath)) : acc.concat(fullPath); }, [], ); }; return paths(obj); } function isObject(val: any) { return typeof val === 'object' && !Array.isArray(val) && val !== null; } function addDelimiter(a: string, b: string) { return a ? `${a}.${b}` : b; } function isFieldObject(obj: any) { return ( isObject(obj) && obj.hasOwnProperty('args') && obj.hasOwnProperty('alias') && obj.hasOwnProperty('name') ); } function fieldPathsAsMapFromResolveInfo( resolveInfo: FieldsByTypeName | ResolveTree, ) { // Construct entries-like array of field paths their corresponding name, alias, and args const paths = (obj = {}, head = ''): [string, any][] => { return Object.entries(obj).reduce( (acc: [string, any][], [key, value]: [string, any]) => { let fullPath = addDelimiter(head, key); if ( isFieldObject(value) && Object.keys(value.fieldsByTypeName).length === 0 ) { const { alias, args, name } = value; return acc.concat([[fullPath, { alias, args, name }]]); } else if (isFieldObject(value)) { const { alias, args, name } = value; return acc.concat( [[fullPath, { alias, args, name }]], paths(value, fullPath), ); } else if (isObject(value)) { return acc.concat(paths(value, fullPath)); } return acc.concat([[fullPath, null]]); }, [], ); }; const resolveInfoFields = paths(resolveInfo); // Filter field paths and construct an object from entries return Object.fromEntries( resolveInfoFields .filter(([_, options]) => options) .map(([path, { alias, args, name }]) => { const pathParts = path.split('.'); pathParts.forEach((_part, i) => { if (pathParts[i - 1] === 'fieldsByTypeName') { pathParts.splice(i - 1, 2); } }); let keptOptions = { ...(name !== alias && { alias }), ...(Object.keys(args).length && { args }), }; return [ pathParts.join('.'), Object.keys(keptOptions).length ? keptOptions : null, ]; }), ); } function buildSelection(selection, pathString, pathParts, fieldPathMap, index) { let formattedSelection = selection; let options; let parentOptions; if (pathParts.length > 1 && index < pathParts.length - 1) { const parentPathString = pathParts.slice(0, index + 1).join('.'); parentOptions = fieldPathMap[parentPathString]; } else { options = fieldPathMap[pathString]; } if (parentOptions) { if (parentOptions.alias) { formattedSelection = `${parentOptions.alias}: ${formattedSelection}`; } if (parentOptions.args) { // Stringify object, remove outer brackets, then remove double quotes before colon const formattedArgs = JSON.stringify(parentOptions.args) .slice(1, -1) .replace(/"([^"]+)":/g, '$1:'); formattedSelection = `${formattedSelection}(${formattedArgs})`; } } else if (options) { if (options.alias) { formattedSelection = `${options.alias}: ${formattedSelection}`; } if (options.args) { const formattedArgs = JSON.stringify(options.args) .slice(1, -1) .replace(/"([^"]+)":/g, '$1:'); formattedSelection = `${formattedSelection}(${formattedArgs})`; } } return formattedSelection; } function buildNonPayloadSelections( payload, info, ): { selections: string; resolveInfo: ResolveTree | FieldsByTypeName } { const resolveInfo = parseResolveInfo(info); if (!resolveInfo) { throw new Error('Cannot parse graphql resolve info'); } const payloadFieldPaths = fieldPathsAsStrings( payload[resolveInfo?.name as string], ); const operationFields = resolveInfo ? fieldPathsAsMapFromResolveInfo(resolveInfo) : {}; const operationFieldPaths = Object.keys(operationFields); const selections = operationFieldPaths .filter((path) => !payloadFieldPaths.includes(path)) .reduce((acc, curr, i, arr) => { const pathParts = curr.split('.'); let selections = ''; pathParts.forEach((part, j) => { // Is this a top-level field that will be accounted for when nested // children are added to the selection? const hasSubFields = !!arr.slice(i + 1).find((item) => { const itemParts = item.split('.'); itemParts.pop(); const rejoinedItem = itemParts.join('.'); return rejoinedItem === curr; }); if (hasSubFields) { return; } const sel = buildSelection(part, curr, pathParts, operationFields, j); if (j === 0) { selections = `${sel} `; } else if (j === 1) { selections = `${selections}{ ${sel} } `; } else { const char = -(j - 2) - j; selections = `${selections.slice( 0, char, )}{ ${sel} } ${selections.slice(char)}`; } }); return acc + selections; }, ''); return { selections, resolveInfo }; } const errorLink = onError(({ graphQLErrors, networkError }) => { if (graphQLErrors) { graphQLErrors.map((graphqlError) => console.error(`[GraphQL error]: ${graphqlError.message}`), ); } if (networkError) { console.log(`[Network Error]: ${networkError}`); } }); export default class SubscriptionResolver { private apolloLink!: ApolloLink; constructor(gatewayURL: string, context: any) { const contextLink = setContext((_request, previousContext) => { const cookie = context.extra?.request?.headers?.cookie; if (cookie) { if (!previousContext) { previousContext = {}; } if (!previousContext.headers) { previousContext.headers = {}; } previousContext.headers.cookie = context.extra.request.headers.cookie; } return previousContext; }); const httpLink = createHttpLink({ fetch: fetch as any, uri: gatewayURL }); this.apolloLink = from([errorLink, contextLink, httpLink]); } public async queryAndMergeMissingData({ payload, queryVariables, info, buildQueryUsingSelections, }: { payload: any; queryVariables: object; info: GraphQLResolveInfo; buildQueryUsingSelections: (selections: any) => string; }): Promise<any> { const { selections, resolveInfo } = buildNonPayloadSelections( payload, info, ); const payloadData = typeof resolveInfo?.name === 'string' ? payload[resolveInfo.name] : Object.values(payload)[0]; if (!selections) { return payloadData; } const query = buildQueryUsingSelections(selections); const documentNode: DocumentNode = gql(query); try { const response = await this.query({ query: documentNode, variables: queryVariables, }); if (response.data) { return merge(payloadData, Object.values(response.data)[0]); } } catch (error) { console.error( '----------------- subscription resolver request error ---------------------------', ); console.error('query', query); console.error('payload', payload); console.error('queryVariables', queryVariables); console.error('resolveInfo?.name', resolveInfo?.name); console.error('error', error); console.error( your_sha256_hash-----------------', ); } } private async query(graphqlRequest: GraphQLRequest): Promise<FetchResult> { const response = await toPromise(execute(this.apolloLink, graphqlRequest)); return response; } } ```
/content/code_sandbox/packages/gateway/src/subscription/SubscriptionResolver.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
1,984
```xml import type { ChangeEvent } from 'react'; import { useEffect, useState } from 'react'; import { c } from 'ttag'; import type { ModalOwnProps } from '@proton/components/components'; import { Prompt, Tooltip } from '@proton/components/components'; import { useNotifications } from '@proton/components/hooks'; import { useLoading } from '@proton/hooks/index'; import { WALLET_APP_NAME } from '@proton/shared/lib/constants'; import { validateEmailAddress } from '@proton/shared/lib/helpers/email'; import walletExclusiveInvites from '@proton/styles/assets/img/wallet/wallet-user.jpg'; import { useWalletApiClients } from '@proton/wallet'; import { Button, Input } from '../../atoms'; import { ModalParagraph } from '../../atoms/ModalParagraph'; import { EmailSelect } from '../EmailSelect'; interface InviteModalOwnProps { onInviteSent: (email: string) => void; defaultInviterAddressID?: string; } type Props = ModalOwnProps & InviteModalOwnProps; export const InviteModal = ({ defaultInviterAddressID, onInviteSent, ...modalProps }: Props) => { const [selectedInviterId, setSelectedInviterId] = useState<string>(); useEffect(() => { if (!selectedInviterId && defaultInviterAddressID) { setSelectedInviterId(defaultInviterAddressID); } }, [defaultInviterAddressID, selectedInviterId]); const [email, setEmail] = useState(''); const walletApi = useWalletApiClients(); const { createNotification } = useNotifications(); const [loadingInvite, withLoadingInvite] = useLoading(); const errorMessage = (() => { if (!selectedInviterId) { return c('Wallet invite').t`You need to select an email to send from`; } if (!email) { return c('Wallet invite').t`Email address is required`; } if (!validateEmailAddress(email)) { return c('Wallet invite').t`Email address is not valid`; } return null; })(); const handleSend = async () => { if (!selectedInviterId || !validateEmailAddress(email)) { return; } try { await walletApi.invite.sendNewcomerInvite(email, selectedInviterId); onInviteSent(email); createNotification({ text: c('Bitcoin send').t`Invitation sent` }); } catch (error: any) { createNotification({ text: error?.error ?? c('Bitcoin send').t`Could not send invitation` }); } }; return ( <Prompt {...modalProps} buttons={[ <Tooltip title={errorMessage}> <Button fullWidth color="norm" shape="solid" size="large" disabled={!!errorMessage} onClick={() => { void withLoadingInvite(handleSend()); }} loading={loadingInvite} >{c('Wallet invite').t`Send invite email now`}</Button> </Tooltip>, <Button fullWidth color="weak" shape="solid" size="large" onClick={() => { modalProps.onClose?.(); }} >{c('Wallet invite').t`Not now`}</Button>, ]} > <div className="flex flex-column"> <div className="flex items-center flex-column"> <img src={walletExclusiveInvites} alt="" className="w-custom h-custom" style={{ '--w-custom': '15rem', '--h-custom': '10.438rem' }} /> <h1 className="block text-semibold text-4xl text-center mb-2">{c('Wallet invite') .t`Exclusive Invites`}</h1> </div> <ModalParagraph> <p>{c('Wallet invite') .t`${WALLET_APP_NAME} Early Access is limited to Visionary supporters and invited users.`}</p> <p>{c('Wallet invite') .t`Invite your friends and family so you can all send Bitcoin via Email. You will get more invites as we add more servers.`}</p> </ModalParagraph> <div className="flex flex-row mt-2 w-full"> <EmailSelect value={selectedInviterId} onChange={(addressID) => { setSelectedInviterId(addressID); }} /> </div> <div className="flex flex-row mt-2 w-full"> <Input id="invitee-email-input" label={c('Wallet invite').t`Email address`} placeholder={c('Wallet invite').t`Your friend's email`} value={email} onChange={(event: ChangeEvent<HTMLInputElement>): void => { setEmail(event.target.value); }} /> </div> </div> </Prompt> ); }; ```
/content/code_sandbox/applications/wallet/src/app/components/InviteModal/index.tsx
xml
2016-06-08T11:16:51
2024-08-16T14:14:27
WebClients
ProtonMail/WebClients
4,300
1,036
```xml import Head from "next/head"; import Image from "next/image"; import { Inter } from "next/font/google"; import styles from "@/styles/Home.module.css"; const inter = Inter({ subsets: ["latin"] }); export default function Home() { return ( <> <Head> <title>Create Next App</title> <meta name="description" content="Generated by create next app" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link rel="icon" href="/favicon.ico" /> </Head> <main className={`${styles.main} ${inter.className}`}> <div className={styles.description}> <p> Get started by editing&nbsp; <code className={styles.code}>pages/index.tsx</code> </p> <div> <a href="path_to_url" target="_blank" rel="noopener noreferrer" > By{" "} <Image src="/vercel.svg" alt="Vercel Logo" className={styles.vercelLogo} width={100} height={24} priority /> </a> </div> </div> <div className={styles.center}> <Image className={styles.logo} src="/next.svg" alt="Next.js Logo" width={180} height={37} priority /> </div> <div className={styles.grid}> <a href="path_to_url" className={styles.card} target="_blank" rel="noopener noreferrer" > <h2> Docs <span>-&gt;</span> </h2> <p> Find in-depth information about Next.js features and&nbsp;API. </p> </a> <a href="path_to_url" className={styles.card} target="_blank" rel="noopener noreferrer" > <h2> Learn <span>-&gt;</span> </h2> <p> Learn about Next.js in an interactive course with&nbsp;quizzes! </p> </a> <a href="path_to_url" className={styles.card} target="_blank" rel="noopener noreferrer" > <h2> Templates <span>-&gt;</span> </h2> <p> Discover and deploy boilerplate example Next.js&nbsp;projects. </p> </a> <a href="path_to_url" className={styles.card} target="_blank" rel="noopener noreferrer" > <h2> Deploy <span>-&gt;</span> </h2> <p> Instantly deploy your Next.js site to a shareable URL with&nbsp;Vercel. </p> </a> </div> </main> </> ); } ```
/content/code_sandbox/test-storybooks/portable-stories-kitchen-sink/nextjs/pages/index.tsx
xml
2016-03-18T04:23:44
2024-08-16T19:22:08
storybook
storybookjs/storybook
83,755
640
```xml // See LICENSE in the project root for license information. import type * as fs from 'fs'; import * as path from 'path'; import type { FileSystemAdapter } from 'fast-glob'; import { Path } from '@rushstack/node-core-library'; interface IVirtualFileSystemEntry { name: string; children?: Set<IVirtualFileSystemEntry>; } interface IReaddirOptions { withFileTypes: true; } /* eslint-disable @rushstack/no-new-null */ type StatCallback = (error: NodeJS.ErrnoException | null, stats: fs.Stats) => void; type ReaddirStringCallback = (error: NodeJS.ErrnoException | null, files: string[]) => void; type ReaddirDirentCallback = (error: NodeJS.ErrnoException | null, files: fs.Dirent[]) => void; /* eslint-enable @rushstack/no-new-null */ const IS_WINDOWS: boolean = process.platform === 'win32'; /** * A filesystem adapter for use with the "fast-glob" package. This adapter uses a static set of paths * to provide a virtual filesystem. * * @remarks This adapter only implements methods required to allow for globbing. This means that it * does not support returning true-to-disk file stats or dirent objects. Instead, the returned file * stats and dirent objects only implement the `isDirectory` and `isFile` methods, which are * required for filesystem traversal performed by the globber. */ export class StaticFileSystemAdapter implements FileSystemAdapter { private _directoryMap: Map<string, IVirtualFileSystemEntry> = new Map<string, IVirtualFileSystemEntry>(); /** { @inheritdoc fs.lstat } */ public lstat: FileSystemAdapter['lstat'] = ((filePath: string, callback: StatCallback) => { process.nextTick(() => { let result: fs.Stats; try { result = this.lstatSync(filePath); } catch (e) { callback(e, {} as fs.Stats); return; } // eslint-disable-next-line @rushstack/no-new-null callback(null, result); }); }) as FileSystemAdapter['lstat']; /** { @inheritdoc fs.lstatSync } */ public lstatSync: FileSystemAdapter['lstatSync'] = ((filePath: string) => { filePath = this._normalizePath(filePath); const entry: IVirtualFileSystemEntry | undefined = this._directoryMap.get(filePath); if (!entry) { const error: NodeJS.ErrnoException = new Error(`ENOENT: no such file or directory, stat '${filePath}'`); error.code = 'ENOENT'; error.syscall = 'stat'; error.errno = -4058; error.path = filePath; throw error; } // We should only need to implement these methods for the purposes of fast-glob return { isFile: () => !entry.children, isDirectory: () => !!entry.children, isBlockDevice: () => false, isCharacterDevice: () => false, isSymbolicLink: () => false, isFIFO: () => false, isSocket: () => false }; }) as FileSystemAdapter['lstatSync']; /** { @inheritdoc fs.stat } */ public stat: FileSystemAdapter['stat'] = ((filePath: string, callback: StatCallback) => { this.lstat(filePath, callback); }) as FileSystemAdapter['stat']; /** { @inheritdoc fs.statSync } */ public statSync: FileSystemAdapter['statSync'] = ((filePath: string) => { return this.lstatSync(filePath); }) as FileSystemAdapter['statSync']; /** { @inheritdoc fs.readdir } */ public readdir: FileSystemAdapter['readdir'] = (( filePath: string, optionsOrCallback: IReaddirOptions | ReaddirStringCallback, callback?: ReaddirDirentCallback | ReaddirStringCallback ) => { // Default to no options, which will return a string callback let options: IReaddirOptions | undefined; if (typeof optionsOrCallback === 'object') { options = optionsOrCallback; } else if (typeof optionsOrCallback === 'function') { callback = optionsOrCallback; } // Perform the readdir on the next tick to avoid blocking the event loop process.nextTick(() => { let result: fs.Dirent[] | string[]; try { if (options?.withFileTypes) { result = this.readdirSync(filePath, options) as fs.Dirent[]; } else { result = this.readdirSync(filePath); } } catch (e) { callback!(e, []); return; } // When "withFileTypes" is false or undefined, the callback is expected to return a string array. // Otherwise, we return a fs.Dirent array. if (options?.withFileTypes) { // eslint-disable-next-line @rushstack/no-new-null (callback as ReaddirDirentCallback)(null, result as fs.Dirent[]); } else { // eslint-disable-next-line @rushstack/no-new-null (callback as ReaddirStringCallback)(null, result as string[]); } }); }) as FileSystemAdapter['readdir']; /** { @inheritdoc fs.readdirSync } */ public readdirSync: FileSystemAdapter['readdirSync'] = ((filePath: string, options?: IReaddirOptions) => { filePath = this._normalizePath(filePath); const virtualDirectory: IVirtualFileSystemEntry | undefined = this._directoryMap.get(filePath); if (!virtualDirectory) { // Immitate a missing directory read from fs.readdir const error: NodeJS.ErrnoException = new Error( `ENOENT: no such file or directory, scandir '${filePath}'` ); error.code = 'ENOENT'; error.syscall = 'scandir'; error.errno = -4058; error.path = filePath; throw error; } else if (!virtualDirectory.children) { // Immitate a directory read of a file from fs.readdir const error: NodeJS.ErrnoException = new Error(`ENOTDIR: not a directory, scandir '${filePath}'`); error.code = 'ENOTDIR'; error.syscall = 'scandir'; error.errno = -4052; error.path = filePath; throw error; } // When "withFileTypes" is false or undefined, the method is expected to return a string array. // Otherwise, we return a fs.Dirent array. const result: IVirtualFileSystemEntry[] = Array.from(virtualDirectory.children); if (options?.withFileTypes) { return result.map((entry: IVirtualFileSystemEntry) => { // Partially implement the fs.Dirent interface, only including the properties used by fast-glob return { name: entry.name, isFile: () => !entry.children, isDirectory: () => !!entry.children, isBlockDevice: () => false, isCharacterDevice: () => false, isSymbolicLink: () => false, isFIFO: () => false, isSocket: () => false }; }); } else { return result.map((entry: IVirtualFileSystemEntry) => entry.name); } }) as FileSystemAdapter['readdirSync']; /** * Create a new StaticFileSystemAdapter instance with the provided file paths. */ public constructor(filePaths?: Iterable<string>) { for (const filePath of filePaths || []) { this.addFile(filePath); } } /** * Add a file and it's parent directories to the static virtual filesystem. */ public addFile(filePath: string): void { filePath = this._normalizePath(filePath); const existingPath: IVirtualFileSystemEntry | undefined = this._directoryMap.get(filePath); if (!existingPath) { // Set an entry without children for the file. Entries with undefined children are assumed to be files. let childPath: string = filePath; let childEntry: IVirtualFileSystemEntry = { name: path.basename(childPath) }; this._directoryMap.set(childPath, childEntry); // Loop through the path segments and create entries for each directory, if they don't already exist. // If they do, append to the existing children set and continue. let parentPath: string | undefined; while ((parentPath = path.dirname(childPath)) !== childPath) { const existingParentEntry: IVirtualFileSystemEntry | undefined = this._directoryMap.get(parentPath); if (existingParentEntry) { // If there is already an existing parent entry, add the child entry to the existing children set // and exit early, since the parent entries already exist. existingParentEntry.children!.add(childEntry); break; } else { // If there is no existing parent entry, create a new entry with the child entry as the only child. const parentEntry: IVirtualFileSystemEntry = { name: path.basename(parentPath), children: new Set([childEntry]) }; this._directoryMap.set(parentPath, parentEntry); childEntry = parentEntry; childPath = parentPath; } } } } /** * Remove a file from the static virtual filesystem. */ public removeFile(filePath: string): void { filePath = this._normalizePath(filePath); const existingEntry: IVirtualFileSystemEntry | undefined = this._directoryMap.get(filePath); if (existingEntry) { // Remove the entry from the map and the parent's children set this._directoryMap.delete(filePath); this._directoryMap.get(path.dirname(filePath))!.children!.delete(existingEntry); } } /** * Remove all files from the static virtual filesystem. */ public removeAllFiles(): void { this._directoryMap.clear(); } private _normalizePath(filePath: string): string { // On Windows, normalize to backslashes so that errors have the correct path format return IS_WINDOWS ? Path.convertToBackslashes(filePath) : filePath; } } ```
/content/code_sandbox/apps/heft/src/pluginFramework/StaticFileSystemAdapter.ts
xml
2016-09-30T00:28:20
2024-08-16T18:54:35
rushstack
microsoft/rushstack
5,790
2,159
```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 `dmediansorted`. */ interface Routine { /** * Computes the median value of a sorted double-precision floating-point strided array. * * @param N - number of indexed elements * @param x - sorted input array * @param stride - stride length * @returns median value * * @example * var Float64Array = require( '@stdlib/array/float64' ); * * var x = new Float64Array( [ 1.0, 2.0, 3.0 ] ); * * var v = dmediansorted( x.length, x, 1 ); * // returns 2.0 */ ( N: number, x: Float64Array, stride: number ): number; /** * Computes the median value of a sorted double-precision floating-point strided array using alternative indexing semantics. * * @param N - number of indexed elements * @param x - sorted input array * @param stride - stride length * @param offset - starting index * @returns median value * * @example * var Float64Array = require( '@stdlib/array/float64' ); * * var x = new Float64Array( [ 1.0, 2.0, 3.0 ] ); * * var v = dmediansorted.ndarray( x.length, x, 1, 0 ); * // returns 2.0 */ ndarray( N: number, x: Float64Array, stride: number, offset: number ): number; } /** * Computes the median value of a sorted double-precision floating-point strided array. * * @param N - number of indexed elements * @param x - sorted input array * @param stride - stride length * @returns median value * * @example * var Float64Array = require( '@stdlib/array/float64' ); * * var x = new Float64Array( [ 1.0, 2.0, 3.0 ] ); * * var v = dmediansorted( x.length, x, 1 ); * // returns 2.0 * * @example * var Float64Array = require( '@stdlib/array/float64' ); * * var x = new Float64Array( [ 1.0, 2.0, 3.0 ] ); * * var v = dmediansorted.ndarray( x.length, x, 1, 0 ); * // returns 2.0 */ declare var dmediansorted: Routine; // EXPORTS // export = dmediansorted; ```
/content/code_sandbox/lib/node_modules/@stdlib/stats/base/dmediansorted/docs/types/index.d.ts
xml
2016-03-24T04:19:52
2024-08-16T09:03:19
stdlib
stdlib-js/stdlib
4,266
644
```xml <clickhouse> </clickhouse> ```
/content/code_sandbox/tests/integration/test_dictionaries_config_reload/config/dictionaries_config.xml
xml
2016-06-02T08:28:18
2024-08-16T18:39:33
ClickHouse
ClickHouse/ClickHouse
36,234
9
```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "path_to_url"> <plist version="1.0"> <dict> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleGetInfoString</key> <key>CFBundleIdentifier</key> <string>as.vit9696.PinConfigs</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>PinConfigs</string> <key>CFBundlePackageType</key> <string>KEXT</string> <key>CFBundleShortVersionString</key> <string>1.0.0</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleVersion</key> <string>1.0.0</string> <key>IOKitPersonalities</key> <dict> <key>HDA Hardware Config Resource</key> <dict> <key>CFBundleIdentifier</key> <string>com.apple.driver.AppleHDAHardwareConfigDriver</string> <key>HDAConfigDefault</key> <array> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Creative CA0132 by Andres ZeroCross</string> <key>CodecID</key> <integer>285343761</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashARcfAQEnHFABJx2QAScepwEnH5A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>9</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Creative CA0132 by Andres ZeroCross</string> <key>CodecID</key> <integer>285343761</integer> <key>ConfigData</key> <data>AVcKAQAXFRQBJwiBAWcIgAFXFw0BVxgkIQceAQEnH5A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>10</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom Creative CA0132 5.1 channel</string> <key>CodecID</key> <integer>285343761</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashIQccMCEHHUAhBx4hIQcfASEXHEAhFx0QIRceASEXHwEhJxwQIScdkSEnHqEhJx+QITcc8CE3HQAhNx4AITcfQCGHHFAhhx1gIYceASGHHwE=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>11</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom Creative CA0132</string> <key>CodecID</key> <integer>285343761</integer> <key>ConfigData</key> <data>AVcKAQAXFx8AFxUQAScIgQFnCIABVxcNAVcYJAEnH5A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>InsanelyDeepak - Cirrus Logic -CS4213</string> <key>CodecID</key> <integer>269697555</integer> <key>ConfigData</key> <data>your_sha256_hashAHccQAB3HQAAdx6gAHcfkABXDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>28</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - ADI-1988B</string> <key>CodecID</key> <integer>299112843</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>5</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - ADI-1988B</string> <key>CodecID</key> <integer>299112843</integer> <key>ConfigData</key> <data>ARccEAEXHUABFx4hARcfAQEnHCABJx1AASceEQEnHwEBRxwwAUcdkAFHHqABRx+your_sha256_hashyour_sha256_hashBAlcckAJXHSACVx4BAlcfAQ==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>0x11d4198b</string> <key>CodecID</key> <integer>299112843</integer> <key>Comment</key> <string>Custom AD1988B by Rodion</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAYcc8AGHHQABhx4AAYcfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - ADI-2000B</string> <key>CodecID</key> <integer>299145371</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>5</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - ADI-2000B</string> <key>CodecID</key> <integer>299145371</integer> <key>ConfigData</key> <data>ARccMAEXHUABFx4hARcfAQEnHBABJx1AASceEQEnHwEBRxxAAUcdkAFHHqABRx+your_sha256_hashyour_sha256_hashBAlccgAJXHSACVx4BAlcfAQ==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC233</string> <key>CodecID</key> <integer>283902515</integer> <key>ConfigData</key> <data>AUccEAFHHQABRx4XAUcfkAGXHCABlx0QAZceqwGXHwMBpxwwAacdAAGnHqABpx+QAhccQAIXHRACFx4rAhcfAwFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom Realtek ALC233 (3236)</string> <key>CodecID</key> <integer>283902515</integer> <key>ConfigData</key> <data>your_sha256_hashAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>4</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC235</string> <key>CodecID</key> <integer>283902517</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashAUcMAgIXDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC255</string> <key>CodecID</key> <integer>283902549</integer> <key>ConfigData</key> <data>your_sha256_hashAhccUAIXHRACFx4rAhcfAgFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom ALC260</string> <key>CodecID</key> <integer>283902560</integer> <key>ConfigData</key> <data>your_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC268</string> <key>CodecID</key> <integer>283902568</integer> <key>ConfigData</key> <data>AUccEAFHHRABRx4hAUcfAQGHHEABhx2QAYcegQGHHwEBVxxQAVcdAAFXHhMBVx+QAZccYAGXHQABlx6jAZcfkAFXDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Miron Laptop patch ALC269 Asus N53J</string> <key>CodecID</key> <integer>283902569</integer> <key>ConfigData</key> <data>AYccIAGHHRABhx6BAYcfBAGXHBABlx0BAZceoAGXH5kBtxxAAbcdAQG3HhMBtx+ZAhccUAIXHRACFx4hAhcfBAFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>1</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC269-VB v1</string> <key>CodecID</key> <integer>283902569</integer> <key>ConfigData</key> <data>AUccQAFHHQEBRx4TAUcfmQGHHCABhx0QAYcegQGHHwMBlxwQAZcdAQGXHqABlx+ZAhccUAIXHRACFx4hAhcfAwFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>2</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>ALC269</string> <key>CodecID</key> <integer>283902569</integer> <key>Comment</key> <string>Mirone - Realtek ALC269 for Asus K53SJ, Asus G73s</string> <key>ConfigData</key> <data>AScc8AEnHQABJx4AAScfQAFHHBABRx0BAUceEwFHH5ABdxxQAXcdAQF3HhMBdx+your_sha256_hashyour_sha256_hashAAhccQAIXHRACFx4hAhcfAwFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC269-VB v2</string> <key>CodecID</key> <integer>283902569</integer> <key>ConfigData</key> <data>AUccEAFHHQABRx4TAUcfkAGHHCABhx2QAYcegQGHHwIBtxwwAbcdEAG3HqABtx+QAhccQAIXHRACFx4hAhcfAgFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>4</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC269-VB v3</string> <key>CodecID</key> <integer>283902569</integer> <key>ConfigData</key> <data>your_sha256_hashAhccUAIXHRACFx4hAhcfAAFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>5</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC269-VC v1</string> <key>CodecID</key> <integer>283902569</integer> <key>ConfigData</key> <data>AUccEAFHHQABRx4TAUcfkAGHHDABhx0QAYcegQGHHwABJxxAAScdAAEnHqABJx+QAVccUAFXHRABVx4hAVcfAAFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>6</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC269-VC v2</string> <key>CodecID</key> <integer>283902569</integer> <key>ConfigData</key> <data>your_sha256_hashAbccQAG3HQABtx4XAbcfkAG3DAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC269VC-v3</string> <key>CodecID</key> <integer>283902569</integer> <key>ConfigData</key> <data>your_sha256_hashAYccQAGHHZABhx6BAYcfAgFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>8</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC269VB v4</string> <key>CodecID</key> <integer>283902569</integer> <key>ConfigData</key> <data>your_sha256_hashAhccUAIXHRACFx4hAhcfAAFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>9</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>InsanelyDeepak - Realtek ALC269VC for Samsung NP350V5C-S08IT</string> <key>CodecID</key> <integer>283902569</integer> <key>ConfigData</key> <data>your_sha256_hashAUccQAFHHQABRx4XAUcfmQFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>13</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>ALC269</string> <key>CodecID</key> <integer>283902569</integer> <key>Comment</key> <string>Custom ALC269 Sony Vaio VPCEB3M1R by Rodion</string> <key>ConfigData</key> <data>AVccQAFXHRABVx4hAVcfAwGHHCABhx0QAYcegQGHHwMBlxwwAZcdAQGXHqABlx+QAbccEAG3HQEBtx4XAbcfkAFXDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>20</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>ALC269</string> <key>CodecID</key> <integer>283902569</integer> <key>Comment</key> <string>Custom ALC269 for Acer Aspire by Andrey1970</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAecfQAIXHDACFx0QAhceIQIXHwMBhxwgAYcdkAGHHoEBhx8D</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>27</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>ALC269VC</string> <key>CodecID</key> <integer>283902569</integer> <key>Comment</key> <string>ALC269VC for Lenovo Z580, John</string> <key>ConfigData</key> <data>AVccQAFXHRABVx4hAVcfAwGHHCABhx0QAYcegQGHHwMBlxwwAZcdAQGXHqABlx+QAbccEAG3HQEBtx4XAbcfkAFXDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>28</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283902569</integer> <key>Comment</key> <string>ALC269VC for Lenovo V580, ar4er</string> <key>ConfigData</key> <data>your_sha256_hashAYccQAGHHZABhx6BAYcfAgFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>29</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283902569</integer> <key>Comment</key> <string>Custom ALC269 Samsung np880z5e-x01ru by Constanta</string> <key>ConfigData</key> <data>your_sha256_hashAYccQAGHHZABhx6BAYcfAgG3DAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>32</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC270 v1</string> <key>CodecID</key> <integer>283902576</integer> <key>ConfigData</key> <data>your_sha256_hashAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC270 v2</string> <key>CodecID</key> <integer>283902576</integer> <key>ConfigData</key> <data>your_sha256_hashAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>4</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>ALC270</string> <key>CodecID</key> <integer>283902576</integer> <key>Comment</key> <string>ALC270 for Asus Laptop with alternative microphone</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAhccQAIXHRACFx4hAhcfAgFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>27</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>ALC270</string> <key>CodecID</key> <integer>283902576</integer> <key>Comment</key> <string>ALC270 for Asus Laptop</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAhccIAIXHRACFx4hAhcfBAFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>28</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283902569</integer> <key>Comment</key> <string>Custom ALC271x Acer Aspire s3-951</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>31</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC272</string> <key>CodecID</key> <integer>283902578</integer> <key>ConfigData</key> <data>AYccMAGHHZABhx6BAYcfAAGXHCABlx0AAZceowGXH5ABRxwQAUcdAAFHHhMBRx+QAhccUAIXHUACFx4hAhcfAAFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC275</string> <key>CodecID</key> <integer>283902581</integer> <key>ConfigData</key> <data>your_sha256_hashAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC280</string> <key>CodecID</key> <integer>283902592</integer> <key>ConfigData</key> <data>AUccEAFHHQABRx4TAUcfkAFXHCABVx0QAVceIQFXHwEBJxwwAScdAAEnHqABJx+QAaccQAGnHRABpx6BAacfAgFHDAIBVwwC</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC280 - ComboJack</string> <key>CodecID</key> <integer>283902592</integer> <key>ConfigData</key> <data>your_sha256_hashAaccQAGnHRABpx6BAacfAgFHDAIBVwwC</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>4</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC282_v1</string> <key>CodecID</key> <integer>283902594</integer> <key>ConfigData</key> <data>ASccEAEnHQABJx6gAScfmQFHHCABRx0AAUceEwGXHDABlx0QAZceiwGXHwABRx+ZAhccUAIXHRACFx4rAhcfAQFHDAICFwwC</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC282_v2</string> <key>CodecID</key> <integer>283902594</integer> <key>ConfigData</key> <data>your_sha256_hashAeccIAHnHRAB5x5EAecfAAIXHFACFx0QAhceIQIXHwABRwwC</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>4</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283902594</integer> <key>Comment</key> <string>Skvo ALC282 Acer Aspire on IvyBridge by Andrey1970</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>27</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283902594</integer> <key>Comment</key> <string>Custom ALC282 Acer Aspire E1-572G</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>28</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283902594</integer> <key>Comment</key> <string>Custom ALC282 for Asus x200la</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAhccUAIXHUACFx4rAhcfAAFHDAICFwwC</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>86</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC283</string> <key>CodecID</key> <integer>283902595</integer> <key>ConfigData</key> <data>your_sha256_hashAhccQAIXHRACFx4rAhcfAQFHDAICFwwC</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom by Slbomber ALC283 (V3-371)</string> <key>CodecID</key> <integer>283902595</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAhccUAIXHRACFx4hAhcfAwFHDAICFwwC</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>11</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC284</string> <key>CodecID</key> <integer>283902596</integer> <key>ConfigData</key> <data>ASccEAEnHQABJx6gAScfkAE3HCABNx0AATceAAE3H0ABRxwwAUcdAAFHHhcBRx+your_sha256_hashAAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AQAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC288</string> <key>CodecID</key> <integer>283902600</integer> <key>ConfigData</key> <data>ASccEAEnHQABJx6gAScfkAE3HCABNx0AATceAAE3H0ABRxwwAUcdAAFHHhcBRx+your_sha256_hashBAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC290</string> <key>CodecID</key> <integer>283902608</integer> <key>ConfigData</key> <data>AUccEAFHHQABRx4XAUcfkAFXHCABVx0QAVceKwFXHwIBlxwwAZcdAAGXHqABlx+QAaccQAGnHRABpx6LAacfAAFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283902608</integer> <key>Comment</key> <string>macpeetALC ALC290 aka ALC3241</string> <key>ConfigData</key> <data>AaccIAGnHRABpx6BAacfAAEnHDABJx0AASceowEnH5ABRxxAAUcdAAFHHhcBRx+QAVccUAFXHRABVx4hAVcfAAFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>4</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom ALC292</string> <key>CodecID</key> <integer>283902610</integer> <key>ConfigData</key> <data>your_sha256_hashAZccUAGXHZABlx6BAZcfAQFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC662</string> <key>CodecID</key> <integer>283903586</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>5</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC662</string> <key>CodecID</key> <integer>283903586</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC663</string> <key>CodecID</key> <integer>283903587</integer> <key>ConfigData</key> <data>your_sha256_hashAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC663_V2</string> <key>CodecID</key> <integer>283903587</integer> <key>ConfigData</key> <data>AUccEAFHHQABRx4TAUcfkAGHHCABhx0QAYcegQGHHwIBlxwwAZcdAAGXHqABlx+your_sha256_hashBAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>4</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>ALC663</string> <key>CodecID</key> <integer>283903587</integer> <key>Comment</key> <string>Custom ALC663 for Asus N56/76 by m-dudarev</string> <key>ConfigData</key> <data>AZccEAGXHQABlx6gAZcfkAGHHCABhx0QAYcegQGHHwIBRxwwAUcdAAFHHhABRx+your_sha256_hashAAecfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>28</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>InsanelyDeepak - Realtek ALC665</string> <key>CodecID</key> <integer>283903589</integer> <key>ConfigData</key> <data>ASccEAEnHQEBJx6gAScfmQGnHCABpx0QAacegQGnH5MBVxxAAVcdAQFXHhMBVx+your_sha256_hashD</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>InsanelyDeepak - Realtek ALC665</string> <key>CodecID</key> <integer>283903589</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashAdcfUA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>13</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283903592</integer> <key>Comment</key> <string>ALC668 Mirone Laptop Patch</string> <key>ConfigData</key> <data>ABJxwQAScdAAEnHqABJx+your_sha256_hashAAbccUAG3HRABtx6BAbcfAgHXHGAB1x0AAdcewAHXH0ABRwwA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283903592</integer> <key>Comment</key> <string>Custom ALC668 by lazzy for laptop ASUS G551JM</string> <key>ConfigData</key> <data>your_sha256_hashAbccQAG3HRABtx6BAbcfAAFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>20</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283903592</integer> <key>Comment</key> <string>ALC668 Mirone Laptop Patch (DELL Precision M3800)</string> <key>ConfigData</key> <data>AUccAAFHHQEBRx4XAUcfmQFXHBABVx0QAVceIQFXHwMBJxwgAScdAQEnHqYBJx+ZAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>27</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283903592</integer> <key>Comment</key> <string>ALC668 Mirone Laptop Patch (Asus N750Jk)</string> <key>ConfigData</key> <data>ABJxwQAScdAAEnHqABJx+your_sha256_hashAAbccUAG3HRABtx6BAbcfAgHXHGAB1x0AAdcewAHXH0ABRwwA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>28</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283903592</integer> <key>Comment</key> <string>ALC668 Custom (Asus N750JV)</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAecc8AHnHQAB5x4AAecfQAH3HPAB9x0AAfceAAH3H0ABRwwCAVcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>29</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283903600</integer> <key>Comment</key> <string>Custom ALC670 by Alex Auditore</string> <key>ConfigData</key> <data>AbccQAG3HRABtx4rAbcfAQFXHDABVx0BAVceEwFXH5ABJxwQAScdAQEnHqABJx+your_sha256_hashyour_sha256_hashyour_sha256_hashAAdcc8AHXHQAB1x4AAdcfQAIXHPACFx0AAhceAAIXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC882</string> <key>CodecID</key> <integer>283904130</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>5</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC882</string> <key>CodecID</key> <integer>283904130</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>ALC883</string> <key>CodecID</key> <integer>283904131</integer> <key>Comment</key> <string>Mirone - Realtek ALC883 by Andrey1970</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283904133</integer> <key>Comment</key> <string>toleda ALC885</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIfccoCH3HQEh9x7LIfcfASEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>1</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>ALC885</string> <key>CodecID</key> <integer>283904133</integer> <key>Comment</key> <string>Custom ALC885 by alex1960</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIfccoCH3HQEh9x7LIfcfASEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283904135</integer> <key>Comment</key> <string>Toleda ALC887</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIfcc8CH3HQAh9x4AIfcfQCEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>1</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283904135</integer> <key>Comment</key> <string>Toleda ALC887</string> <key>ConfigData</key> <data>your_sha256_hashIXcc8CF3HQAhdx4AIXcfQCGHHEAhhx1gIYceASGHHwEhlxxgIZcdkCGXHqAhlx+your_sha256_hashBIfcc8CH3HQAh9x4AIfcfQCEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>2</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>CodecID</key> <integer>283904135</integer> <key>Comment</key> <string>Toleda ALC887</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIfcc8CH3HQAh9x4AIfcfQCEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC887-VD</string> <key>CodecID</key> <integer>283904135</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>5</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC887-VD</string> <key>CodecID</key> <integer>283904135</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>InsanelyDeepak - Realtek ALC887-VD</string> <key>CodecID</key> <integer>283904135</integer> <key>ConfigData</key> <data>your_sha256_hashAYceoQGHH5EBlxxAAZcdkQGXHoEBlx+S</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>11</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>InsanelyDeepak - Realtek ALC887-VD</string> <key>CodecID</key> <integer>283904135</integer> <key>ConfigData</key> <data>AbccAAG3HUABtx4hAbcfAQG3DAIBhxwQAYcdkAGHHqEBhx+your_sha256_hashBAacfAQ==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>InsanelyDeepak - Realtek ALC887-VD</string> <key>CodecID</key> <integer>283904135</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashIecfAQ==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>13</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>InsanelyDeepak - Realtek ALC887-VD</string> <key>CodecID</key> <integer>283904135</integer> <key>ConfigData</key> <data>IUccECFHHUAhRx4RIUcfkCFXHCAhVx0QIVceASFXHwEhhxxAIYcdkCGHHqAhhx+your_sha256_hashCIecckCHnHWEh5x5LIecfAQ==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>17</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom Realtek ALC887-VD by Constanta</string> <key>CodecID</key> <integer>283904135</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>99</integer> </dict> <dict> <key>CodecID</key> <integer>283904136</integer> <key>Comment</key> <string>toleda ALC888</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIfcc8CH3HQAh9x4AIfcfQCEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>1</integer> </dict> <dict> <key>CodecID</key> <integer>283904136</integer> <key>Comment</key> <string>toleda ALC888</string> <key>ConfigData</key> <data>your_sha256_hashIXcc8CF3HQAhdx4AIXcfQCGHHEAhhx1gIYceASGHHwEhlxxgIZcdkCGXHqAhlx+your_sha256_hashBIfcc8CH3HQAh9x4AIfcfQCEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>2</integer> </dict> <dict> <key>CodecID</key> <integer>283904136</integer> <key>Comment</key> <string>toleda ALC888</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIfcc8CH3HQAh9x4AIfcfQCEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC888 for Laptop</string> <key>CodecID</key> <integer>283904136</integer> <key>ConfigData</key> <data>ASccEAEnHQABJx6gAScfmQFHHCABRx1AAUceIQFHHwEBtxwwAbcdAQG3HhMBtx+your_sha256_hashBAecccAHnHUAB5x5FAecfAQFHDAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>4</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC888 3 ports (Pink, Green, Blue)</string> <key>CodecID</key> <integer>283904136</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>5</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC888 5/6 ports (Gray, Black, Orange, Pink, Green, Blue)</string> <key>CodecID</key> <integer>283904136</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> <dict> <key>CodecID</key> <integer>283904137</integer> <key>Comment</key> <string>ALC889, Toleda</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIfcc8CH3HQAh9x4AIfcfQCEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>1</integer> </dict> <dict> <key>CodecID</key> <integer>283904137</integer> <key>Comment</key> <string>alc889, Custom by Sergey_Galan</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hashIecckCHnHSEh5x5LIecfASH3HPAh9x0AIfceACH3H0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>CodecID</key> <integer>283904146</integer> <key>Comment</key> <string>ALC892, Toleda</string> <key>ConfigData</key> <data>your_sha256_hashIWcfASF3HPAhdx0AIXceACF3H0AhhxxAIYcdkCGHHqAhhx+your_sha256_hashyour_sha256_hashAIRcfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>1</integer> </dict> <dict> <key>CodecID</key> <integer>283904146</integer> <key>Comment</key> <string>ALC892, Toleda</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIeceSyHnHwEh9xzwIfcdACH3HgAh9x9AIRcc8CEXHQAhFx4AIRcfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>2</integer> </dict> <dict> <key>CodecID</key> <integer>283904146</integer> <key>Comment</key> <string>ALC892, Toleda</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIfcc8CH3HQAh9x4AIfcfQCEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC892 for Laptop</string> <key>CodecID</key> <integer>283904146</integer> <key>ConfigData</key> <data>your_sha256_hashAYccQAGHHZABhx6BAYcfAQGnHFABpx0wAacegQGnHwEBtxxgAbcdQAG3HhMBtx+ZAecccAHnHWAB5x5FAecfAQG3DAI=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>4</integer> </dict> <dict> <key>CodecID</key> <integer>283904146</integer> <key>Comment</key> <string>ALC892, Mirone</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>5</integer> </dict> <dict> <key>CodecID</key> <integer>283904146</integer> <key>Comment</key> <string>ALC892, Mirone</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> <dict> <key>CodecID</key> <integer>283904153</integer> <key>Comment</key> <string>ALC898, Toleda</string> <key>ConfigData</key> <data>your_sha256_hashIWcfASF3HPAhdx0AIXceACF3H0AhhxxAIYcdkCGHHqAhhx+your_sha256_hashyour_sha256_hashAIRcfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>1</integer> </dict> <dict> <key>CodecID</key> <integer>283904153</integer> <key>Comment</key> <string>ALC898, Toleda</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIeceSyHnHwEh9xzwIfcdACH3HgAh9x9AIRcc8CEXHQAhFx4AIRcfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>2</integer> </dict> <dict> <key>CodecID</key> <integer>283904153</integer> <key>Comment</key> <string>ALC898, Toleda</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashIfcc8CH3HQAh9x4AIfcfQCEXHPAhFx0AIRceACEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>CodecID</key> <integer>283904256</integer> <key>Comment</key> <string>ALC1150, Toleda</string> <key>ConfigData</key> <data>your_sha256_hashAWcfAQF3HPABdx0AAXceAAF3H0ABhxxAAYcdkAGHHqABhx+your_sha256_hashyour_sha256_hashAARcfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>1</integer> </dict> <dict> <key>CodecID</key> <integer>283904256</integer> <key>Comment</key> <string>ALC1150, Toleda</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAeceSwHnHwEB9xzwAfcdAAH3HgAB9x9AARcc8AEXHQABFx4AARcfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>2</integer> </dict> <dict> <key>CodecID</key> <integer>283904256</integer> <key>Comment</key> <string>ALC1150, Toleda</string> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAfcc8AH3HQAB9x4AAfcfQAEXHPABFx0AARceAAEXH0A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC1150</string> <key>CodecID</key> <integer>283904256</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>5</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Realtek ALC1150</string> <key>CodecID</key> <integer>283904256</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAUcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> <dict> <key>Codec</key> <string>Conexant CX20561</string> <key>CodecID</key> <integer>351359057</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashAccc8AHHHQABxx4AAccfQAHXHCAB1x0BAdceoAHXH5A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>11</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Conexant CX20583</string> <key>CodecID</key> <integer>351359079</integer> <key>ConfigData</key> <data>your_sha256_hashAccc8AHHHQEBxx4AAccfQAHXHPAB1x0BAdceAAHXH0AB5xzwAecdAQHnHqcB5x+your_sha256_hashAAjcc8AI3HQECNx4AAjcfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Conexant CX20585</string> <key>CodecID</key> <integer>351359081</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashAjcckAI3HQACNx6gAjcfkA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Conexant CX20588</string> <key>CodecID</key> <integer>351359084</integer> <key>ConfigData</key> <data>your_sha512_hash==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Conexant CX20590</string> <key>CodecID</key> <integer>351359086</integer> <key>ConfigData</key> <data>your_sha512_hash==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AQAAAA==</data> <key>CodecID</key> <integer>351359086</integer> <key>Comment</key> <string>CX20590 Custom for Lenovo Yoga 13 by usr-sse2</string> <key>ConfigData</key> <data>AZccMAGXHUABlx4rAZcfDgH3HCAB9x0BAfceEAH3H5ACNxwQAjcdAQI3HqACNx+your_sha256_hashyour_sha256_hashAAicc8AInHQACJx4AAicfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Conexant CX20724</string> <key>CodecID</key> <integer>351359220</integer> <key>ConfigData</key> <data>your_sha512_hash==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - Conexant CX20752</string> <key>CodecID</key> <integer>351359247</integer> <key>ConfigData</key> <data>your_sha512_hash==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>Codec</key> <string>Conexant - CX20751/2 by RehabMan</string> <key>CodecID</key> <integer>351359247</integer> <key>ConfigData</key> <data>your_sha512_hash==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>28</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AQAAAA==</data> <key>Codec</key> <string>Mirone - Conexant CX20756</string> <key>CodecID</key> <integer>351359252</integer> <key>ConfigData</key> <data>your_sha512_hash==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AQAAAA==</data> <key>Codec</key> <string>Mirone - Realtek CX20757</string> <key>CodecID</key> <integer>351359253</integer> <key>ConfigData</key> <data>your_sha512_hash==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom IDT 92HD87B1/3 by RehabMan</string> <key>CodecID</key> <integer>287143633</integer> <key>ConfigData</key> <data>AMcegQDHHwM=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom IDT92HD87B2/4 by RehabMan</string> <key>CodecID</key> <integer>287143641</integer> <key>ConfigData</key> <data>AMcegQDHHwMBFx6gARcfkA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom IDT92HD95 by RehabMan</string> <key>CodecID</key> <integer>287143573</integer> <key>ConfigData</key> <data>your_sha256_hashANceFwDXH5AA1wwCAOccQADnHQEA5x6gAOcfkA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - IDT 92HD66C3/65</string> <key>CodecID</key> <integer>287143667</integer> <key>ConfigData</key> <data>your_sha512_hash==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - IDT 92HD71B7X</string> <key>CodecID</key> <integer>287143602</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - IDT 92HD81B1X5</string> <key>CodecID</key> <integer>287143429</integer> <key>ConfigData</key> <data>AKccIACnHRAApx6hAKcfAQC3HBAAtx0QALceIQC3HwEA1xwwANcdAADXHhcA1x+your_sha256_hashyour_sha256_hashA</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - IDT 92HD75B2X5</string> <key>CodecID</key> <integer>287143432</integer> <key>ConfigData</key> <data>AKccEACnHRAApx4hAKcfAQC3HCAAtx0QALcegQC3HwEAxxwwAMcdEADHHqAAxx+your_sha256_hashyour_sha256_hashAAgccoAIHHQACBx7wAgcfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - IDT 92HD75B3X5</string> <key>CodecID</key> <integer>287143427</integer> <key>ConfigData</key> <data>your_sha512_hash==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - IDT 92HD75B3X5</string> <key>CodecID</key> <integer>287143427</integer> <key>ConfigData</key> <data>your_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>11</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - IDT 92HD90BXX</string> <key>CodecID</key> <integer>287143655</integer> <key>ConfigData</key> <data>ALccEAC3HRAAtx4hALcfAACnHCAApx0QAKcegQCnHwABFxwwARcdkAEXHqABFx+your_sha256_hashgAQcc8AEHHQABBx4AAQcfQA==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - IDT 92HD91BXX </string> <key>CodecID</key> <integer>287143648</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>RehabMan - IDT 92HD91BXX for HP Envy</string> <key>CodecID</key> <integer>287143648</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Custom - IDT 92HD93BXX Dell Latitude E6430</string> <key>CodecID</key> <integer>287143647</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashAQcc8AEHHQABBx4AAQcfQAEXHDABFx0BARceoAEXH5A=</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>12</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - IDT 92HD99BXX </string> <key>CodecID</key> <integer>287143653</integer> <key>ConfigData</key> <data>your_sha256_hashANccQADXHQAA1x4TANcf0AD3HFAA9x0AAPce8AD3H0ABFxxgARcdAAEXHqABFx+QANcMAg==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - IDT 92HD87B1</string> <key>CodecID</key> <integer>287143429</integer> <key>ConfigData</key> <data>AKccIACnHRAApx6hAKcfAQC3HBAAtx0QALceIQC3HwEA1xwwANcdAADXHhcA1x+your_sha256_hashyour_sha256_hashA</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - VIA VT1802</string> <key>CodecID</key> <integer>285639750</integer> <key>ConfigData</key> <data>AkccEAJHHQACRx4TAkcfkAJXHCACVx1AAlceIQJXHwEClxxAApcdAAKXHqAClx+QArccYAK3HZACtx6BArcfAgLXHHAC1x0QAtceRALXHwACRwwCAlcMAw==</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>3</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - VIA VT2021</string> <key>CodecID</key> <integer>285606977</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>5</integer> </dict> <dict> <key>AFGLowPowerState</key> <data>AwAAAA==</data> <key>Codec</key> <string>Mirone - VIA VT2021</string> <key>CodecID</key> <integer>285606977</integer> <key>ConfigData</key> <data>your_sha256_hashyour_sha256_hashyour_sha256_hash</data> <key>FuncGroup</key> <integer>1</integer> <key>LayoutID</key> <integer>7</integer> </dict> </array> <key>IOClass</key> <string>AppleHDAHardwareConfigDriver</string> <key>IOMatchCategory</key> <string>AppleHDAHardwareConfigDriver</string> <key>IOProviderClass</key> <string>AppleHDAHardwareConfigDriverLoader</string> </dict> </dict> <key>OSBundleCompatibleVersion</key> <string>1.0.0</string> <key>OSBundleLibraries</key> <dict> <key>com.apple.kpi.libkern</key> <string>11.0.0</string> </dict> <key>OSBundleRequired</key> <string>Root</string> </dict> </plist> ```
/content/code_sandbox/Clover-Configs/Lenovo/Y480/CLOVER/kexts/10.11/AppleALC.kext/Contents/PlugIns/PinConfigs.kext/Contents/Info.plist
xml
2016-11-05T04:22:54
2024-08-12T19:25:53
Hackintosh-Installer-University
huangyz0918/Hackintosh-Installer-University
3,937
22,231
```xml <?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>SyncStallModeSelector</class> <widget class="QWidget" name="SyncStallModeSelector"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>434</width> <height>149</height> </rect> </property> <property name="windowTitle"> <string/> </property> <property name="styleSheet"> <string notr="true">#Title { color: #242424; font-size: 14px; } #SmartSelector, #AdvanceSelector { color: #3D3D3D; font-size: 13px; } #SmartDescription, #AdvanceDescription { color: #7B7876; font-size: 12px; } #wSeparator { background-color: rgba(0,0,0,0.1); }</string> </property> <layout class="QVBoxLayout" name="verticalLayout"> <property name="spacing"> <number>0</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QWidget" name="wSeparator" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> <width>0</width> <height>1</height> </size> </property> <property name="maximumSize"> <size> <width>16777215</width> <height>1</height> </size> </property> <property name="focusPolicy"> <enum>Qt::NoFocus</enum> </property> <property name="styleSheet"> <string notr="true">margin-left: 8px; margin-right: 8px; </string> </property> <property name="text" stdset="0"> <string/> </property> <property name="iconSize" stdset="0"> <size> <width>576</width> <height>1</height> </size> </property> <property name="checkable" stdset="0"> <bool>false</bool> </property> </widget> </item> <item> <widget class="QWidget" name="SyncStallContainer" native="true"> <layout class="QHBoxLayout" name="horizontalLayout"> <property name="spacing"> <number>0</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>10</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>12</number> </property> <item> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> <item> <layout class="QGridLayout" name="layout"> <property name="topMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <property name="horizontalSpacing"> <number>0</number> </property> <property name="verticalSpacing"> <number>7</number> </property> <item row="1" column="1"> <widget class="QWidget" name="Advanced" native="true"> <layout class="QVBoxLayout" name="verticalLayout_3"> <property name="spacing"> <number>3</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QRadioButton" name="AdvanceSelector"> <property name="text"> <string>Advanced</string> </property> <attribute name="buttonGroup"> <string notr="true">buttonGroup</string> </attribute> </widget> </item> <item> <widget class="QLabel" name="AdvanceDescription"> <property name="text"> <string>Get full control of the sync issues</string> </property> <property name="indent"> <number>25</number> </property> </widget> </item> </layout> </widget> </item> <item row="2" column="1"> <widget class="QWidget" name="LearnMoreContainer" native="true"> <property name="minimumSize"> <size> <width>0</width> <height>0</height> </size> </property> <layout class="QHBoxLayout" name="horizontalLayout_2"> <property name="spacing"> <number>0</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QPushButton" name="LearnMoreButton"> <property name="cursor"> <cursorShape>PointingHandCursor</cursorShape> </property> <property name="text"> <string>Learn more</string> </property> </widget> </item> <item> <spacer name="horizontalSpacer_3"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </widget> </item> <item row="0" column="1"> <widget class="QWidget" name="Smart" native="true"> <layout class="QVBoxLayout" name="verticalLayout_2"> <property name="spacing"> <number>3</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QRadioButton" name="SmartSelector"> <property name="text"> <string>Smart</string> </property> <attribute name="buttonGroup"> <string notr="true">buttonGroup</string> </attribute> </widget> </item> <item> <widget class="QLabel" name="SmartDescription"> <property name="text"> <string>Let MEGA solve sync issues automatically</string> </property> <property name="indent"> <number>25</number> </property> </widget> </item> </layout> </widget> </item> <item row="0" column="0" rowspan="2" alignment="Qt::AlignTop"> <widget class="QWidget" name="TitleContainer" native="true"> <layout class="QVBoxLayout" name="verticalLayout_4"> <property name="topMargin"> <number>1</number> </property> <item> <widget class="QLabel" name="Title"> <property name="styleSheet"> <string notr="true"/> </property> <property name="text"> <string>Sync stall mode</string> </property> <property name="alignment"> <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> </property> </widget> </item> </layout> </widget> </item> </layout> </item> <item> <spacer name="horizontalSpacer_2"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>20</height> </size> </property> </spacer> </item> </layout> </widget> </item> </layout> </widget> <resources/> <connections/> <buttongroups> <buttongroup name="buttonGroup"/> </buttongroups> </ui> ```
/content/code_sandbox/src/MEGASync/syncs/gui/Twoways/macx/SyncStallModeSelector.ui
xml
2016-02-10T18:28:05
2024-08-16T19:36:44
MEGAsync
meganz/MEGAsync
1,593
2,197
```xml export const Messages = { buttons: { reset: 'Reset All', showSelected: 'Show Selected', showAll: 'Show all', }, }; ```
/content/code_sandbox/pmm-app/src/pmm-qan/panel/components/Filters/Filters.messages.ts
xml
2016-01-22T07:14:23
2024-08-13T13:01:59
grafana-dashboards
percona/grafana-dashboards
2,661
36
```xml import { ActivityIcon, ActivityRow } from "../styles"; import { formatText, getIconAndColor } from "../utils"; import ErrorBoundary from "@erxes/ui/src/components/ErrorBoundary"; import { IActivityLog } from "../types"; import { IIntegration } from "@erxes/ui-inbox/src/settings/integrations/types"; import { IUser } from "@erxes/ui/src/auth/types"; import Icon from "@erxes/ui/src/components/Icon"; import InternalNote from "../containers/items/InternalNote"; import React from "react"; import { RenderDynamicComponent } from "@erxes/ui/src/utils/core"; import Tip from "@erxes/ui/src/components/Tip"; type Props = { activity: IActivityLog; currentUser: IUser; activityRenderItem?: ( activity: IActivityLog, currentUser?: IUser ) => React.ReactNode; }; class ActivityItem extends React.Component<Props> { render() { const { activity, currentUser } = this.props; const { contentType, _id, contentTypeDetail } = activity; const type = contentType.split(":")[1]; const plugins: any[] = (window as any).plugins || []; if (type === "internalNote") { const iconAndColor = getIconAndColor(type); return ( <ActivityRow key={Math.random()}> <Tip text={formatText(type || contentType)} placement="top"> <ActivityIcon color={iconAndColor.color}> <Icon icon={iconAndColor.icon} /> </ActivityIcon> </Tip> <InternalNote noteId={_id} activity={activity} currentUser={currentUser} /> </ActivityRow> ); } const pluginName = contentType.split(":")[0]; for (const plugin of plugins) { const hasIntegration = contentType.includes("conversation") && contentTypeDetail && contentTypeDetail.integration; let kind = ""; let scope = plugin.scope; let component = plugin.activityLog; if (hasIntegration) { const integration = (contentTypeDetail.integration || {}) as IIntegration; kind = integration.kind.split("-")[0]; } if (kind) { const p = plugins.find(pl => pl.name === kind); if (p) { scope = p.scope; component = p.activityLog; } } if ((kind === plugin.name || pluginName === plugin.name) && component) { return ( <ErrorBoundary> <RenderDynamicComponent scope={scope} component={component} injectedProps={{ contentType, activity, currentUser, conversationId: _id }} /> </ErrorBoundary> ); } } return null; } } export default ActivityItem; ```
/content/code_sandbox/packages/ui-log/src/activityLogs/components/ActivityItem.tsx
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
580
```xml import type { DefaultCombinatorName, DefaultOperatorName } from '../../types/index.noReact'; import type { SpELBaseNode, SpELBetweenFields, SpELBetweenValues, SpELBooleanLiteral, SpELCompoundNode, SpELExpressionNode, SpELIdentifier, SpELListNode, SpELNodeType, SpELNullLiteral, SpELNumericLiteral, SpELOpAnd, SpELOpMatches, SpELOpOr, SpELPrimitive, SpELProcessedExpression, SpELPropertyNode, SpELRelOpType, SpELRelation as SpELRelationOp, SpELStringLiteral, } from './types'; export const isSpELPropertyNode = (expr: SpELBaseNode<SpELNodeType>): expr is SpELPropertyNode => { return expr.getType() === 'property' || expr.getType() === 'variable'; }; export const isSpELCompoundNode = (expr: SpELBaseNode<SpELNodeType>): expr is SpELCompoundNode => { return expr.getType() === 'compound' && expr.getChildren().every(isSpELPropertyNode); }; export const isSpELListNode = (expr: SpELBaseNode<SpELNodeType>): expr is SpELListNode => { return expr.getType() === 'list'; }; export const isSpELOpAnd = (expr: SpELProcessedExpression): expr is SpELOpAnd => expr.type === 'op-and'; export const isSpELOpOr = (expr: SpELProcessedExpression): expr is SpELOpOr => expr.type === 'op-or'; export const isSpELOpMatches = (expr: SpELProcessedExpression): expr is SpELOpMatches => expr.type === 'matches' && ((isSpELIdentifier(expr.children[0]) && isSpELStringLiteral(expr.children[1])) || (isSpELIdentifier(expr.children[1]) && isSpELStringLiteral(expr.children[0])) || (isSpELIdentifier(expr.children[0]) && isSpELIdentifier(expr.children[1]))); export const isSpELIdentifier = (expr: SpELProcessedExpression): expr is SpELIdentifier => expr.type === 'property' || expr.type === 'variable' || expr.type === 'compound'; export const isSpELStringLiteral = (expr: SpELProcessedExpression): expr is SpELStringLiteral => expr.type === 'string'; export const isSpELNumericLiteral = (expr: SpELProcessedExpression): expr is SpELNumericLiteral => expr.type === 'number'; export const isSpELBooleanLiteral = (expr: SpELProcessedExpression): expr is SpELBooleanLiteral => expr.type === 'boolean'; export const isSpELNullLiteral = (expr: SpELProcessedExpression): expr is SpELNullLiteral => expr.type === 'null'; export const isSpELRelationOp = (expr: SpELProcessedExpression): expr is SpELRelationOp => expr.type === 'op-eq' || expr.type === 'op-ne' || expr.type === 'op-gt' || expr.type === 'op-ge' || expr.type === 'op-lt' || expr.type === 'op-le'; export const isSpELPrimitive = (expr: SpELProcessedExpression): expr is SpELPrimitive => isSpELNumericLiteral(expr) || isSpELStringLiteral(expr) || isSpELBooleanLiteral(expr) || isSpELNullLiteral(expr); export const isSpELBetweenValues = (expr: SpELProcessedExpression): expr is SpELBetweenValues => expr.type === 'between' && isSpELIdentifier(expr.children[0]) && expr.children[1].type === 'list' && expr.children[1].children.length >= 2 && expr.children[1].children.every(isSpELPrimitive); export const isSpELBetweenFields = (expr: SpELProcessedExpression): expr is SpELBetweenFields => expr.type === 'between' && isSpELIdentifier(expr.children[0]) && expr.children[1].type === 'list' && expr.children[1].children.length >= 2 && expr.children[1].children.every(isSpELIdentifier); export const processCompiledExpression = ( ce: SpELPropertyNode | SpELExpressionNode ): SpELProcessedExpression => { const type = ce.getType(); const identifier = isSpELCompoundNode(ce) ? ce .getChildren() .map(p => (isSpELPropertyNode(p) ? p.getRaw() : /* istanbul ignore next */ '')) .join('.') : isSpELPropertyNode(ce) ? ce.getRaw() : null; const children = type === 'compound' ? [] : (isSpELListNode(ce) ? ce.getRaw : ce.getChildren)().map(processCompiledExpression); const startPosition = ce.getStartPosition(); const endPosition = ce.getEndPosition(); const value = ce.getValue.length === 0 ? ce.getValue() : 'N/A'; return { type: type === 'compound' && !identifier ? 'invalid' : type, children, startPosition, endPosition, value, identifier, }; }; export const normalizeOperator = (opType: SpELRelOpType, flip?: boolean): DefaultOperatorName => { if (flip) { if (opType === 'op-lt') return '>'; if (opType === 'op-le') return '>='; if (opType === 'op-gt') return '<'; if (opType === 'op-ge') return '<='; } return ( { 'op-eq': '=', 'op-ge': '>=', 'op-gt': '>', 'op-le': '<=', 'op-lt': '<', 'op-ne': '!=', } as const )[opType]; }; export const generateFlatAndOrList = ( expr: SpELProcessedExpression ): (DefaultCombinatorName | SpELProcessedExpression)[] => { const combinator = expr.type.substring(3) as DefaultCombinatorName; const [left, right] = expr.children; if (left.type === 'op-and' || left.type === 'op-or') { return [...generateFlatAndOrList(left), combinator, right]; } return [left, combinator, right]; }; export const generateMixedAndOrList = (expr: SpELOpAnd | SpELOpOr) => { const arr = generateFlatAndOrList(expr); const returnArray: ( | DefaultCombinatorName | SpELProcessedExpression | ('and' | SpELProcessedExpression)[] )[] = []; let startIndex = 0; for (let i = 0; i < arr.length; i += 2) { if (arr[i + 1] === 'and') { startIndex = i; let j = 1; while (arr[startIndex + j] === 'and') { i += 2; j += 2; } const tempAndArray = arr.slice(startIndex, i + 1) as ('and' | SpELProcessedExpression)[]; returnArray.push(tempAndArray); i -= 2; } else if (arr[i + 1] === 'or') { if (i === 0 || i === arr.length - 3) { if (i === 0 || arr[i - 1] === 'or') { returnArray.push(arr[i]); } returnArray.push(arr[i + 1]); if (i === arr.length - 3) { returnArray.push(arr[i + 2]); } } else { if (arr[i - 1] === 'and') { returnArray.push(arr[i + 1]); } else { returnArray.push(arr[i]); returnArray.push(arr[i + 1]); } } } } if (returnArray.length === 1 && Array.isArray(returnArray[0])) { // If length is 1, then the only element is an AND array so just return that return returnArray[0]; } return returnArray; }; ```
/content/code_sandbox/packages/react-querybuilder/src/utils/parseSpEL/utils.ts
xml
2016-06-17T22:03:19
2024-08-16T10:28:42
react-querybuilder
react-querybuilder/react-querybuilder
1,131
1,788
```xml import { IsUrl, ValidateIf } from 'class-validator'; import { TInputOptions } from '../../types/options/TInputOptions'; import { IOptions } from '../../interfaces/options/IOptions'; import { ObfuscationTarget } from '../../enums/ObfuscationTarget'; import { DEFAULT_PRESET } from '../presets/Default'; import { IsAllowedForObfuscationTargets } from './IsAllowedForObfuscationTargets'; /** * @returns {PropertyDecorator} */ export const IsDomainLockRedirectUrl = (): PropertyDecorator => { return (target: any, key: string | symbol): void => { ValidateIf(({domainLockRedirectUrl}: TInputOptions) => { return domainLockRedirectUrl !== DEFAULT_PRESET.domainLockRedirectUrl; })(target, key); IsUrl({ require_protocol: false, require_host: false })(target, key); IsAllowedForObfuscationTargets([ ObfuscationTarget.Browser, ObfuscationTarget.BrowserNoEval, ])(target, <keyof IOptions>key); }; }; ```
/content/code_sandbox/src/options/validators/IsDomainLockRedirectUrl.ts
xml
2016-05-09T08:16:53
2024-08-16T19:43:07
javascript-obfuscator
javascript-obfuscator/javascript-obfuscator
13,358
228
```xml import { isEnabled } from "@erxes/ui/src/utils/core"; const callsIntegrationDetail: string = ` query callsIntegrationDetail($integrationId: String!) { callsIntegrationDetail(integrationId: $integrationId) { _id phone wsServer inboxId operators token } } `; const callUserIntegrations: any = ` query callUserIntegrations { callUserIntegrations { _id inboxId operators phone wsServer token } } `; const callCustomerDetail: string = ` query callsCustomerDetail($customerPhone: String) { callsCustomerDetail(customerPhone: $customerPhone){ _id firstName primaryPhone avatar phones phone tagIds getTags { _id name colorCode type } } } `; const listParamsDef = ` $page: Int, $perPage: Int, $tag: String, $type: String, $ids: [String], $excludeIds: Boolean, $searchValue: String, $brand: String, $integration: String, $startDate: String, $endDate: String, $leadStatus: String, $sortField: String, $sortDirection: Int, $dateFilters: String, `; const listParamsValue = ` page: $page, perPage: $perPage, tag: $tag, type: $type, ids: $ids, excludeIds: $excludeIds, searchValue: $searchValue, brand: $brand, integration: $integration startDate: $startDate, endDate: $endDate, leadStatus: $leadStatus, sortField: $sortField, sortDirection: $sortDirection, dateFilters: $dateFilters, `; const customers = ` query customers(${listParamsDef}) { customers(${listParamsValue}) { _id firstName primaryPhone phones phone tagIds avatar } } `; const activeSession = ` query callsActiveSession { callsActiveSession{ _id userId lastLoginDeviceId } }`; const callHistories = ` query CallHistories($limit: Int, $callStatus: String, $callType: String, $startDate: String, $endDate: String, $skip: Int, $integrationId: String, $searchValue: String) { callHistories(limit: $limit, callStatus: $callStatus, callType: $callType, startDate: $startDate, endDate: $endDate, skip: $skip, integrationId: $integrationId, searchValue: $searchValue) { _id operatorPhone customerPhone callDuration callStartTime callEndTime callType callStatus timeStamp modifiedAt createdAt createdBy modifiedBy extentionNumber conversationId customer { _id avatar email firstName getTags { _id name colorCode type } phone primaryEmail primaryPhone tagIds } } }`; const callHistoriesTotalCount = ` query callHistoriesTotalCount($limit: Int, $callStatus: String, $callType: String, $startDate: String, $endDate: String, $integrationId: String, $searchValue: String, $skip: Int) { callHistoriesTotalCount(limit: $limit, callStatus: $callStatus, callType: $callType, startDate: $startDate, endDate: $endDate, integrationId: $integrationId, searchValue: $searchValue, skip: $skip) } `; const callsGetConfigs = ` query callsGetConfigs { callsGetConfigs } `; const callGetAgentStatus = ` query callGetAgentStatus { callGetAgentStatus } `; const callExtensionList = ` query callExtensionList($integrationId: String!) { callExtensionList(integrationId: $integrationId) } `; export default { callsIntegrationDetail, callUserIntegrations, callCustomerDetail, callHistoriesTotalCount, customers, activeSession, callHistories, callsGetConfigs, callGetAgentStatus, callExtensionList }; ```
/content/code_sandbox/packages/plugin-calls-ui/src/graphql/queries.ts
xml
2016-11-11T06:54:50
2024-08-16T10:26:06
erxes
erxes/erxes
3,479
970
```xml /** * This return value is to let iOS know what the result of your background fetch was, so the * platform can better schedule future background fetches. Also, your app has up to 30 seconds * to perform the task, otherwise your app will be terminated and future background fetches * may be delayed. */ export declare enum BackgroundFetchResult { /** * There was no new data to download. */ NoData = 1, /** * New data was successfully downloaded. */ NewData = 2, /** * An attempt to download data was made but that attempt failed. */ Failed = 3 } export declare enum BackgroundFetchStatus { /** * The user explicitly disabled background behavior for this app or for the whole system. */ Denied = 1, /** * Background updates are unavailable and the user cannot enable them again. This status can occur * when, for example, parental controls are in effect for the current user. */ Restricted = 2, /** * Background updates are available for the app. */ Available = 3 } export interface BackgroundFetchOptions { /** * Inexact interval in seconds between subsequent repeats of the background fetch alarm. The final * interval may differ from the specified one to minimize wakeups and battery usage. * - On Android it defaults to __10 minutes__, * - On iOS it calls [`BackgroundFetch.setMinimumIntervalAsync`](#backgroundfetchsetminimumintervalasyncminimuminterval) * behind the scenes and the default value is the smallest fetch interval supported by the system __(10-15 minutes)__. * Background fetch task receives no data, but your task should return a value that best describes * the results of your background fetch work. * @return Returns a promise that fulfils once the task is registered and rejects in case of any errors. */ minimumInterval?: number; /** * Whether to stop receiving background fetch events after user terminates the app. * @default true * @platform android */ stopOnTerminate?: boolean; /** * Whether to restart background fetch events when the device has finished booting. * @default false * @platform android */ startOnBoot?: boolean; } //# sourceMappingURL=BackgroundFetch.types.d.ts.map ```
/content/code_sandbox/packages/expo-background-fetch/build/BackgroundFetch.types.d.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
496
```xml import { RadioGroup } from '@fluentui/react-northstar'; import * as React from 'react'; const RadioGroupMinimalPerf = () => <RadioGroup />; RadioGroupMinimalPerf.iterations = 5000; RadioGroupMinimalPerf.filename = 'RadioGroupMinimal.perf.tsx'; export default RadioGroupMinimalPerf; ```
/content/code_sandbox/packages/fluentui/docs/src/examples/components/RadioGroup/Performance/RadioGroupMinimal.perf.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
74
```xml <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="path_to_url"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Debug|x64"> <Configuration>Debug</Configuration> <Platform>x64</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> <ProjectConfiguration Include="Release|x64"> <Configuration>Release</Configuration> <Platform>x64</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGuid>{7B1F60CD-2A09-4514-937C-D9DD044428FB}</ProjectGuid> <RootNamespace>showfont</RootNamespace> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> <ConfigurationType>Application</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" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" /> </ImportGroup> <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> <Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC60.props" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir> <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)\$(Platform)\$(Configuration)\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir> <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" /> <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" /> <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" /> <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" /> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <Midl> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MkTypLibCompatible>true</MkTypLibCompatible> <SuppressStartupBanner>true</SuppressStartupBanner> <TargetEnvironment>Win32</TargetEnvironment> <TypeLibraryName>.\Release/showfont.tlb</TypeLibraryName> <HeaderFileName> </HeaderFileName> </Midl> <ClCompile> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level3</WarningLevel> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Culture>0x0409</Culture> </ResourceCompile> <Link> <AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies> <SubSystem>Windows</SubSystem> </Link> <PostBuildEvent> <Message> </Message> <Command> </Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> <Midl> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MkTypLibCompatible>true</MkTypLibCompatible> <SuppressStartupBanner>true</SuppressStartupBanner> <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>.\Release/showfont.tlb</TypeLibraryName> <HeaderFileName> </HeaderFileName> </Midl> <ClCompile> <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level3</WarningLevel> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Culture>0x0409</Culture> </ResourceCompile> <Link> <AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies> <SubSystem>Windows</SubSystem> </Link> <PostBuildEvent> <Message> </Message> <Command> </Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> <Midl> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MkTypLibCompatible>true</MkTypLibCompatible> <SuppressStartupBanner>true</SuppressStartupBanner> <TargetEnvironment>Win32</TargetEnvironment> <TypeLibraryName>.\Debug/showfont.tlb</TypeLibraryName> <HeaderFileName> </HeaderFileName> </Midl> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>OldStyle</DebugInformationFormat> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Culture>0x0409</Culture> </ResourceCompile> <Link> <AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Windows</SubSystem> </Link> <PostBuildEvent> <Message> </Message> <Command> </Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> <Midl> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <MkTypLibCompatible>true</MkTypLibCompatible> <SuppressStartupBanner>true</SuppressStartupBanner> <TargetEnvironment>X64</TargetEnvironment> <TypeLibraryName>.\Debug/showfont.tlb</TypeLibraryName> <HeaderFileName> </HeaderFileName> </Midl> <ClCompile> <Optimization>Disabled</Optimization> <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions> <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> <WarningLevel>Level3</WarningLevel> <DebugInformationFormat>OldStyle</DebugInformationFormat> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions> <Culture>0x0409</Culture> </ResourceCompile> <Link> <AdditionalDependencies>SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies> <GenerateDebugInformation>true</GenerateDebugInformation> <SubSystem>Windows</SubSystem> </Link> <PostBuildEvent> <Message> </Message> <Command> </Command> </PostBuildEvent> </ItemDefinitionGroup> <ItemGroup> <ProjectReference Include="..\SDL_ttf.vcxproj"> <Project>{dddbd07d-dc76-4af6-8d02-3e2deb6ee255}</Project> <Private>false</Private> <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies> <ReferenceOutputAssembly>true</ReferenceOutputAssembly> </ProjectReference> </ItemGroup> <ItemGroup> <ClCompile Include="..\..\showfont.c"> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions> <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> </Project> ```
/content/code_sandbox/extensions/android/ringlibsdl/project/jni/SDL2_ttf/VisualC/showfont/showfont.vcxproj
xml
2016-03-24T10:29:27
2024-08-16T12:53:07
ring
ring-lang/ring
1,262
2,837
```xml // @ts-nocheck /* eslint-disable */ // import Row from '../Row' import { mount, Wrapper, MountOptions, } from '@vue/test-utils' // import Vue from 'vue' describe.skip('Table Row', () => { type Instance = InstanceType<typeof Row> let mountFunction: (options?: MountOptions<Instance>) => Wrapper<Instance> beforeEach(() => { mountFunction = (options?: MountOptions<Instance>) => { return mount(Row, options) } }) it('should render without slots', () => { const wrapper = mountFunction({ context: { props: { headers: [ { text: 'Petrol', value: 'petrol' }, { text: 'Diesel', value: 'diesel' }, ], item: { petrol: 0.68, diesel: 0.65, }, }, }, }) expect(wrapper.findAll('tr')).toHaveLength(1) expect(wrapper.findAll('td')).toHaveLength(2) expect(wrapper.html()).toMatchSnapshot() }) it('should render non-string values', () => { const wrapper = mountFunction({ context: { props: { headers: [ { value: 'string' }, { value: 'number' }, { value: 'array' }, { value: 'boolean' }, { value: 'object' }, { value: 'undefined' }, { value: 'null' }, ], item: { string: 'string', number: 12.34, array: [1, 2], boolean: false, object: { foo: 'bar' }, null: null, }, }, }, }) expect(wrapper.html()).toMatchSnapshot() }) it('should render with cellClass', () => { const wrapper = mountFunction({ context: { props: { headers: [ { text: 'Petrol', value: 'petrol', cellClass: 'a' }, { text: 'Diesel', value: 'diesel', cellClass: ['b', 'c'] }, ], item: { petrol: 0.68, diesel: 0.65, }, }, }, }) const tds = wrapper.findAll('td') expect(tds.at(0).classes()).toContain('a') expect(tds.at(1).classes()).toContain('b') expect(tds.at(1).classes()).toContain('c') expect(wrapper.html()).toMatchSnapshot() }) it.skip('should render with regular slots', () => { const wrapper = mountFunction({ context: { props: { headers: [ { text: 'Petrol', value: 'petrol' }, { text: 'Diesel', value: 'diesel' }, ], }, }, slots: { 'column.petrol': '<p class="test">$0.68</p>', 'column.diesel': '<p class="test">$0.65</p>', }, }) expect(wrapper.findAll('tr')).toHaveLength(1) expect(wrapper.findAll('td')).toHaveLength(2) expect(wrapper.findAll('p.test')).toHaveLength(2) expect(wrapper.html()).toMatchSnapshot() }) it.skip('should render with scoped slots', () => { const vm = new Vue() const wrapper = mountFunction({ context: { props: { headers: [ { text: 'Petrol', value: 'petrol' }, { text: 'Diesel', value: 'diesel' }, ], item: { petrol: 0.68, diesel: 0.65, }, }, }, scopedSlots: { 'column.petrol': props => vm.$createElement('p', { staticClass: `test ${props.header.value}` }, [props.value]), 'column.diesel': props => vm.$createElement('p', { staticClass: `test ${props.header.value}` }, [props.value]), }, }) expect(wrapper.findAll('tr')).toHaveLength(1) expect(wrapper.findAll('td')).toHaveLength(2) expect(wrapper.findAll('p.test')).toHaveLength(2) expect(wrapper.html()).toMatchSnapshot() }) }) ```
/content/code_sandbox/packages/vuetify/src/components/VDataTable/__tests__/Row.spec.ts
xml
2016-09-12T00:39:35
2024-08-16T20:06:39
vuetify
vuetifyjs/vuetify
39,539
917
```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>AppGroupIdentifier</key> <string>$(APP_GROUP_IDENTIFIER)</string> <key>AppStoreURL</key> <string>$(APP_STORE_URL)</string> <key>BGTaskSchedulerPermittedIdentifiers</key> <array> <string>com.loopkit.background-task.critical-event-log.historical-export</string> </array> <key>CFBundleDevelopmentRegion</key> <string>en</string> <key>CFBundleDisplayName</key> <string>$(MAIN_APP_DISPLAY_NAME)</string> <key>CFBundleExecutable</key> <string>$(EXECUTABLE_NAME)</string> <key>CFBundleIdentifier</key> <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> <string>$(PRODUCT_NAME)</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> <string>$(LOOP_MARKETING_VERSION)</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleURLTypes</key> <array> <dict> <key>CFBundleTypeRole</key> <string>Editor</string> <key>CFBundleURLName</key> <string>$(MAIN_APP_BUNDLE_IDENTIFIER)</string> <key>CFBundleURLSchemes</key> <array> <string>$(URL_SCHEME_NAME)</string> </array> </dict> </array> <key>CFBundleVersion</key> <string>$(CURRENT_PROJECT_VERSION)</string> <key>ITSAppUsesNonExemptEncryption</key> <false/> <key>LSApplicationQueriesSchemes</key> <array> <string>dexcomg6</string> <string>dexcomcgm</string> <string>dexcomshare</string> </array> <key>LSRequiresIPhoneOS</key> <true/> <key>LoopLocalCacheDurationDays</key> <string>$(LOOP_LOCAL_CACHE_DURATION_DAYS)</string> <key>NFCReaderUsageDescription</key> <string>The app uses NFC to pair with diabetes devices.</string> <key>NSBluetoothAlwaysUsageDescription</key> <string>The app needs to use Bluetooth to send and receive data from your diabetes devices.</string> <key>NSBluetoothPeripheralUsageDescription</key> <string>The app needs to use Bluetooth to send and receive data from your diabetes devices.</string> <key>NSCameraUsageDescription</key> <string>Camera is used to scan barcodes of devices.</string> <key>NSFaceIDUsageDescription</key> <string>Face ID is used to authenticate insulin bolus and to save changes to therapy settings.</string> <key>NSHealthShareUsageDescription</key> <string>Meal data from the Health database is used to determine glucose effects. Glucose data from the Health database is used for graphing and momentum calculation. Sleep data from the Health database is used to optimize delivery of Apple Watch complication updates during the time you are awake.</string> <key>NSHealthUpdateUsageDescription</key> <string>Carbohydrate meal data entered in the app and on the watch is stored in the Health database. Glucose data retrieved from the CGM is stored securely in HealthKit.</string> <key>NSSiriUsageDescription</key> <string>Loop uses Siri to allow you to enact presets with your voice.</string> <key>NSUserActivityTypes</key> <array> <string>EnableOverridePresetIntent</string> <string>NewCarbEntry</string> <string>NewCarbEntryIntent</string> <string>ViewLoopStatus</string> </array> <key>UIBackgroundModes</key> <array> <string>bluetooth-central</string> <string>processing</string> <string>remote-notification</string> </array> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>UIMainStoryboardFile</key> <string>Main</string> <key>UIRequiredDeviceCapabilities</key> <array> <string>armv7</string> <string>healthkit</string> <string>bluetooth-le</string> </array> <key>UIStatusBarTintParameters</key> <dict> <key>UINavigationBar</key> <dict> <key>Style</key> <string>UIBarStyleDefault</string> <key>Translucent</key> <false/> </dict> </dict> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> </array> <key>UISupportedInterfaceOrientations~ipad</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationPortraitUpsideDown</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> </dict> </plist> ```
/content/code_sandbox/Loop/Info.plist
xml
2016-05-24T03:26:56
2024-08-12T13:34:08
Loop
LoopKit/Loop
1,467
1,260
```xml <?xml version="1.0" encoding="utf-8"?> <!-- path_to_url Unless required by applicable law or agreed to in writing, software WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <LinearLayout xmlns:android="path_to_url" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:padding="5dp"> <TextView android:id="@+id/title" android:layout_width="match_parent" android:layout_height="wrap_content" android:textColor="#000" android:textSize="18sp"/> <TextView android:id="@+id/des" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="5dp" android:textColor="#888" android:textSize="14sp"/> </LinearLayout> ```
/content/code_sandbox/demo/src/main/res/layout/item_main_list.xml
xml
2016-01-15T10:35:24
2024-08-15T13:08:04
okhttp-OkGo
jeasonlzy/okhttp-OkGo
10,594
201
```xml import * as React from 'react'; import type { IHelloTailwindProps } from './IHelloTailwindProps'; import { escape } from '@microsoft/sp-lodash-subset'; export default class HelloTailwind extends React.Component<IHelloTailwindProps, {}> { public render(): React.ReactElement<IHelloTailwindProps> { const { description, isDarkTheme, environmentMessage, userDisplayName } = this.props; return ( <section className='tw-overflow-hidden tw-p-4 tw-text-black'> <div className='tw-text-center'> <img alt="" src={isDarkTheme ? require('../assets/welcome-dark.png') : require('../assets/welcome-light.png')} className='tw-m-auto tw-w-full tw-max-w-[420px]' /> <h2 className='tw-text-2xl'>Well done, {escape(userDisplayName)}!</h2> <div>{environmentMessage}</div> <div>Web part property value: <strong>{escape(description)}</strong></div> </div> <div> <h3 className='tw-text-xl tw-text-red-600 tw-mb-2'>Welcome to SharePoint Framework!</h3> <p> The SharePoint Framework (SPFx) is a extensibility model for Microsoft Viva, Microsoft Teams and SharePoint. It&#39;s the easiest way to extend Microsoft 365 with automatic Single Sign On, automatic hosting and industry standard tooling. </p> <h4 className='tw-text-lg tw-mt-2'>Learn more about SPFx development:</h4> <ul className='[&_a]:tw-underline [&_a]:tw-text-blue-600'> <li><a href="path_to_url" target="_blank" rel="noreferrer">SharePoint Framework Overview</a></li> <li><a href="path_to_url" target="_blank" rel="noreferrer">Use Microsoft Graph in your solution</a></li> <li><a href="path_to_url" target="_blank" rel="noreferrer">Build for Microsoft Teams using SharePoint Framework</a></li> <li><a href="path_to_url" target="_blank" rel="noreferrer">Build for Microsoft Viva Connections using SharePoint Framework</a></li> <li><a href="path_to_url" target="_blank" rel="noreferrer">Publish SharePoint Framework applications to the marketplace</a></li> <li><a href="path_to_url" target="_blank" rel="noreferrer">SharePoint Framework API reference</a></li> <li><a href="path_to_url" target="_blank" rel="noreferrer">Microsoft 365 Developer Community</a></li> </ul> </div> </section> ); } } ```
/content/code_sandbox/samples/react-tailwindcss3/src/webparts/helloTailwind/components/HelloTailwind.tsx
xml
2016-08-30T17:21:43
2024-08-16T18:41:32
sp-dev-fx-webparts
pnp/sp-dev-fx-webparts
2,027
596
```xml import { StatusBar as ReactNativeStatusBar } from 'react-native'; import { mockProperty } from './Helpers'; import { setStatusBarTranslucent } from '../StatusBar'; describe('setStatusBarTranslucent', () => { it('delegates to the React Native StatusBar equivalent', () => { const mock = jest.fn(); mockProperty(ReactNativeStatusBar, 'setTranslucent', mock, () => { setStatusBarTranslucent(false); expect(mock).toHaveBeenCalledWith(false); }); }); }); ```
/content/code_sandbox/packages/expo-status-bar/src/__tests__/setStatusBarTranslucent-test.ts
xml
2016-08-15T17:14:25
2024-08-16T19:54:44
expo
expo/expo
32,004
103
```xml <?xml version="1.0" encoding="utf-8"?> <android.support.design.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:id="@+id/map_real_time" android:fitsSystemWindows="true"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.AppBarOverlay"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?android:attr/actionBarSize" android:background="?android:attr/colorPrimary" app:popupTheme="@style/AppTheme.PopupOverlay" /> </android.support.design.widget.AppBarLayout> <com.airbnb.lottie.LottieAnimationView android:id="@+id/animation" android:layout_width="300dp" android:layout_height="300dp" android:layout_gravity="center" app:lottie_autoPlay="true" app:lottie_loop="true" /> <LinearLayout xmlns:android="path_to_url" xmlns:app="path_to_url" xmlns:tools="path_to_url" android:id="@+id/layout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context="io.github.project_travel_mate.MapActivity"> <org.osmdroid.views.MapView android:id="@+id/map" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="0.4"/> <LinearLayout android:layout_width="fill_parent" android:layout_height="5dp" android:background="@color/colorAccent"> </LinearLayout> <ScrollView android:id="@+id/data" android:layout_width="fill_parent" android:layout_height="wrap_content"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@drawable/shadow_1" android:gravity="center_horizontal"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/white" android:orientation="vertical" android:padding="10dp"> <TextView android:id="@+id/item_title" android:layout_width="182dp" android:layout_height="wrap_content" android:layout_gravity="top" android:layout_marginStart="5dp" android:layout_marginTop="0dp" android:gravity="start" android:text="@string/text_title" android:textColor="#ff4a4a4a" android:textSize="15sp" android:textStyle="bold" /> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="2dp" android:layout_marginTop="10dp" android:background="#c7cfcecf" android:orientation="horizontal" /> <TextView android:id="@+id/item_description" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginStart="5dp" android:layout_marginTop="10dp" android:maxLines="10" android:text="@string/empty_description" android:textAppearance="?android:attr/textAppearanceSmall" android:textSize="15sp" /> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:orientation="horizontal"> <Button android:id="@+id/call" style="?android:attr/buttonBarButtonStyle" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="4dp" android:layout_weight="1.0" android:background="@drawable/round_shape" android:text="@string/text_call" android:textColor="#ffffff" /> <Button android:id="@+id/book" style="?android:attr/buttonBarButtonStyle" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_margin="4dp" android:layout_weight="1.0" android:background="@drawable/round_shape" android:text="@string/text_book" android:textColor="@color/white" /> </LinearLayout> </LinearLayout> </LinearLayout> </LinearLayout> </ScrollView> </LinearLayout> </android.support.design.widget.CoordinatorLayout> ```
/content/code_sandbox/Android/app/src/main/res/layout/activity_map_realtime.xml
xml
2016-01-30T13:42:30
2024-08-12T19:21:10
Travel-Mate
project-travel-mate/Travel-Mate
1,292
1,072
```xml import * as React from 'react'; import { ActionButton, IButtonStyles } from '@fluentui/react/lib/Button'; import { Stack } from '@fluentui/react/lib/Stack'; import { Text } from '@fluentui/react/lib/Text'; import { ApiReferencesTable, gapTokens } from './ApiReferencesTable'; import { IApiReferencesTableProps, IApiInterfaceProperty, IMethod, IApiReferencesTableSetProps, } from './ApiReferencesTableSet.types'; import { ITableRowJson, IPageJson } from '@fluentui/react/lib/common/DocPage.types'; import { extractAnchorLink } from '../../utilities/extractAnchorLink'; import { jumpToAnchor } from '../../utilities/index2'; import { getTokenResolver } from './tokenResolver'; export interface IApiReferencesTableSetState { showSeeMore: boolean; } const TITLE_LINE_HEIGHT = 31.5; const seeMoreButtonStyles: Partial<IButtonStyles> = { root: { paddingLeft: '0px' }, textContainer: { paddingLeft: '4px' }, }; export class ApiReferencesTableSet extends React.Component<IApiReferencesTableSetProps, IApiReferencesTableSetState> { public static defaultProps: Partial<IApiReferencesTableSetProps> = { jumpToAnchors: true, }; private _tableProps: IApiReferencesTableProps[]; constructor(props: IApiReferencesTableSetProps) { super(props); this.state = { showSeeMore: false }; this._tableProps = _generateTableProps(props.jsonDocs); } public render(): JSX.Element { const { className } = this.props; return ( <Stack tokens={gapTokens.large} className={className}> {this._renderFirst()} {this._renderEach()} </Stack> ); } public componentDidMount(): void { window.addEventListener('hashchange', this._onHashChange); const anchor = extractAnchorLink(window.location.hash); if (anchor && !this._allVisible) { const section = this._tableProps.filter(x => x.name === anchor)[0]; if (section) { this.setState({ showSeeMore: true }); } } } public componentWillUnmount(): void { window.removeEventListener('hashchange', this._onHashChange); } public componentDidUpdate(prevProps: IApiReferencesTableSetProps, prevState: IApiReferencesTableSetState): void { if (prevState.showSeeMore === false && this.state.showSeeMore === true && this.props.jumpToAnchors) { jumpToAnchor(undefined, TITLE_LINE_HEIGHT); } } private get _allVisible(): boolean { return this.props.showAll || this.state.showSeeMore; } private _renderFirst(): JSX.Element | undefined { if (this._tableProps.length >= 1) { const item = this._tableProps[0]; return <ApiReferencesTable {...item} />; } return undefined; } private _renderEach(): JSX.Element | undefined { if (this._tableProps.length > 1) { return ( <Stack tokens={gapTokens.medium}> {!this.props.showAll && ( <ActionButton iconProps={{ iconName: this.state.showSeeMore ? 'SkypeCircleMinus' : 'CirclePlus' }} onClick={this._onClickSeeMore} onRenderText={this._onRenderText} styles={seeMoreButtonStyles} > See more </ActionButton> )} {this._allVisible && ( <Stack tokens={gapTokens.large}> {this._tableProps.map((item: IApiReferencesTableProps, index: number) => index !== 0 ? <ApiReferencesTable key={item.name} {...item} /> : undefined, )} </Stack> )} </Stack> ); } return undefined; } private _onHashChange = (): void => { const anchor = extractAnchorLink(window.location.hash); if (anchor) { this.props.jumpToAnchors && jumpToAnchor(anchor, TITLE_LINE_HEIGHT); if (!this._allVisible) { const section = this._tableProps.filter(x => x.name === anchor)[0]; if (section) { this.setState({ showSeeMore: true }); } } } }; private _onRenderText(): JSX.Element { return <Text variant="xLarge">See more</Text>; } private _onClickSeeMore = (): void => { this.setState({ showSeeMore: !this.state.showSeeMore, }); }; } function _generateTableProps(jsonDocs: IPageJson | undefined): IApiReferencesTableProps[] { if (!jsonDocs) { return []; } const tokenResolver = getTokenResolver(); const propsName: string = `I${jsonDocs.name}Props`; const results: IApiReferencesTableProps[] = []; for (const table of jsonDocs.tables) { const { kind, members, name, ...rest } = table; const tableProps: IApiReferencesTableProps = { ...rest, name, title: kind !== 'typeAlias' ? name + ' ' + kind : name, renderAs: kind, properties: members || [], tokenResolver: tokenResolver, }; if (kind === 'class') { // class members are a mix of IApiInterfaceProperty and IMethod const classMembers: IApiInterfaceProperty[] = (tableProps.properties = []); const classMethods: IMethod[] = (tableProps.methods = []); (members as ITableRowJson[]).forEach(member => { if (member.kind === 'method') { classMethods.push(member); } else { classMembers.push(member); } }); } if (jsonDocs.group === 'references' && jsonDocs.name === name) { results.unshift(tableProps); } else if (kind === 'interface' && propsName === name) { // to ensure that I{componentName}Props comes first results.unshift(tableProps); } else { results.push(tableProps); } } return results; } ```
/content/code_sandbox/packages/react-docsite-components/src/components/ApiReferencesTable/ApiReferencesTableSet.tsx
xml
2016-06-06T15:03:44
2024-08-16T18:49:29
fluentui
microsoft/fluentui
18,221
1,320
```xml import { Subscriber } from '../Subscriber'; /** * Subscribes to an object that implements Symbol.observable with the given * Subscriber. * @param obj An object that implements Symbol.observable */ export declare const subscribeToObservable: <T>(obj: any) => (subscriber: Subscriber<T>) => any; ```
/content/code_sandbox/deps/node-10.15.3/tools/node_modules/eslint/node_modules/rxjs/internal/util/subscribeToObservable.d.ts
xml
2016-09-05T10:18:44
2024-08-11T13:21:40
LiquidCore
LiquidPlayer/LiquidCore
1,010
64
```xml import { useSpacing } from '@mobily/stacks'; import React, { useCallback } from 'react'; import Highlighter, { HighlighterProps } from '../highlight/Highlighter'; import { useColorRoles } from '../theme/colorSystem'; import useTextRoleNucleon, { TextRoleNucleonProps } from './nucleons/useTextRoleNucleon'; export interface SourceRenderer { htmlSource: string; } export type UISourceDisplayMoleculeProps = { content: string; style?: HighlighterProps['style']; language?: HighlighterProps['language']; paddingVertical?: number; clipLines?: boolean; textRole?: TextRoleNucleonProps['role']; } & Omit< HighlighterProps, | 'paddingTop' | 'paddingBottom' | 'lineStyle' | 'lineNumberStyle' | 'highlightJsStyle' | 'fontSize' | 'lineFontSize' | 'fontFamily' >; export default function UISourceDisplayMolecule({ paddingVertical, textRole = 'source', showLineNumbers = true, ...otherProps }: UISourceDisplayMoleculeProps) { const spacing = useSpacing(2); const { codeBackground } = useColorRoles(); const { fontFamily, fontSize } = useTextRoleNucleon({ role: textRole }); const syntheticPaddingVertical = useSpacing(paddingVertical ?? 0); const lineNumberDisplayWidthComputer: HighlighterProps['lineNumberDisplayWidthComputer'] = useCallback( (fs, maxLineNumberCharLength) => spacing + fs * maxLineNumberCharLength, [spacing] ); return ( <Highlighter {...otherProps} style={{ backgroundColor: codeBackground }} highlightJsStyle={'atelierPlateauDark'} fontSize={fontSize} fontFamily={fontFamily} lineStyle={{ paddingHorizontal: spacing }} paddingBottom={syntheticPaddingVertical} paddingTop={syntheticPaddingVertical} lineNumberDisplayWidthComputer={lineNumberDisplayWidthComputer} showLineNumbers={showLineNumbers} /> ); } ```
/content/code_sandbox/apps/discovery/src/components/UISourceDisplayMolecule.tsx
xml
2016-11-29T10:50:53
2024-08-08T06:53:22
react-native-render-html
meliorence/react-native-render-html
3,445
452
```xml import { TevStage, IndTexStage, TexGen, ColorChannelControl, GXMaterial, LightChannelControl, AlphaTest, RopInfo, SwapTable } from "./gx_material.js"; import * as GX from "./gx_enum.js"; import { autoOptimizeMaterial } from "./gx_render.js"; function copyColorChannelControl(colorChannel: ColorChannelControl): ColorChannelControl { return { lightingEnabled: colorChannel.lightingEnabled, matColorSource: colorChannel.matColorSource, ambColorSource: colorChannel.ambColorSource, litMask: colorChannel.litMask, diffuseFunction: colorChannel.diffuseFunction, attenuationFunction: colorChannel.attenuationFunction, }; } function copyLightChannelControl(lightChannel: LightChannelControl): LightChannelControl { return { alphaChannel: copyColorChannelControl(lightChannel.alphaChannel), colorChannel: copyColorChannelControl(lightChannel.colorChannel), }; } function copyTexGen(texGen: TexGen): TexGen { return { type: texGen.type, source: texGen.source, matrix: texGen.matrix, normalize: texGen.normalize, postMatrix: texGen.postMatrix, }; } function copyTevStage(tevStage: TevStage): TevStage { return { colorInA: tevStage.colorInA, colorInB: tevStage.colorInB, colorInC: tevStage.colorInC, colorInD: tevStage.colorInD, colorOp: tevStage.colorOp, colorBias: tevStage.colorBias, colorScale: tevStage.colorScale, colorClamp: tevStage.colorClamp, colorRegId: tevStage.colorRegId, alphaInA: tevStage.alphaInA, alphaInB: tevStage.alphaInB, alphaInC: tevStage.alphaInC, alphaInD: tevStage.alphaInD, alphaOp: tevStage.alphaOp, alphaBias: tevStage.alphaBias, alphaScale: tevStage.alphaScale, alphaClamp: tevStage.alphaClamp, alphaRegId: tevStage.alphaRegId, texCoordId: tevStage.texCoordId, texMap: tevStage.texMap, channelId: tevStage.channelId, konstColorSel: tevStage.konstColorSel, konstAlphaSel: tevStage.konstAlphaSel, indTexStage: tevStage.indTexStage, indTexFormat: tevStage.indTexFormat, indTexBiasSel: tevStage.indTexBiasSel, indTexAlphaSel: tevStage.indTexAlphaSel, indTexMatrix: tevStage.indTexMatrix, indTexWrapS: tevStage.indTexWrapS, indTexWrapT: tevStage.indTexWrapT, indTexAddPrev: tevStage.indTexAddPrev, indTexUseOrigLOD: tevStage.indTexUseOrigLOD, texSwapTable: tevStage.texSwapTable, rasSwapTable: tevStage.rasSwapTable, }; } function copyIndTexStage(indStage: IndTexStage): IndTexStage { return { texture: indStage.texture, texCoordId: indStage.texCoordId, scaleS: indStage.scaleS, scaleT: indStage.scaleT, }; } function copyRopInfo(ropInfo: RopInfo): RopInfo { return { fogType: ropInfo.fogType, fogAdjEnabled: ropInfo.fogAdjEnabled, blendMode: ropInfo.blendMode, blendSrcFactor: ropInfo.blendSrcFactor, blendDstFactor: ropInfo.blendDstFactor, blendLogicOp: ropInfo.blendLogicOp, depthTest: ropInfo.depthTest, depthFunc: ropInfo.depthFunc, depthWrite: ropInfo.depthWrite, dstAlpha: ropInfo.dstAlpha, colorUpdate: ropInfo.colorUpdate, alphaUpdate: ropInfo.alphaUpdate, } } function copyAlphaTest(alphaTest: AlphaTest): AlphaTest { return { compareA: alphaTest.compareA, referenceA: alphaTest.referenceA, op: alphaTest.op, compareB: alphaTest.compareB, referenceB: alphaTest.referenceB, } } export class GXMaterialBuilder { private cullMode: GX.CullMode; private lightChannels: LightChannelControl[] = []; private texGens: TexGen[] = []; private tevStages: TevStage[] = []; private indTexStages: IndTexStage[] = []; private alphaTest: AlphaTest; private ropInfo: RopInfo; private usePnMtxIdx: boolean; constructor(private name: string | null = null) { this.reset(); } public reset(): void { this.cullMode = GX.CullMode.NONE; this.lightChannels.length = 0; this.texGens.length = 0; this.tevStages.length = 0; this.indTexStages.length = 0; this.alphaTest = {} as AlphaTest; this.setAlphaCompare(GX.CompareType.ALWAYS, 0, GX.AlphaOp.AND, GX.CompareType.ALWAYS, 0); this.ropInfo = {} as RopInfo; this.setFog(GX.FogType.NONE, false); this.setBlendMode(GX.BlendMode.NONE, GX.BlendFactor.SRCALPHA, GX.BlendFactor.INVSRCALPHA, GX.LogicOp.CLEAR); this.setZMode(true, GX.CompareType.LEQUAL, true); this.setColorUpdate(true); this.setAlphaUpdate(false); this.usePnMtxIdx = true; } public setCullMode(cullMode: GX.CullMode): void { this.cullMode = cullMode; } private ensureTexCoordGen(idx: GX.TexCoordID): TexGen { if (this.texGens[idx] === undefined) this.texGens[idx] = {} as TexGen; return this.texGens[idx]; } public setTexCoordGen(idx: GX.TexCoordID, type: GX.TexGenType, source: GX.TexGenSrc, matrix: GX.TexGenMatrix, normalize: boolean = false, postMatrix: GX.PostTexGenMatrix = GX.PostTexGenMatrix.PTIDENTITY): void { const texGen = this.ensureTexCoordGen(idx); texGen.type = type; texGen.source = source; texGen.matrix = matrix; texGen.normalize = normalize; texGen.postMatrix = postMatrix; } private ensureLightChannel(idx: number): LightChannelControl { if (this.lightChannels[idx] === undefined) { this.lightChannels[idx] = { colorChannel: {} as ColorChannelControl, alphaChannel: {} as ColorChannelControl, }; this.setChanCtrlInternal(this.lightChannels[idx].colorChannel, false, GX.ColorSrc.REG, GX.ColorSrc.REG, 0, GX.DiffuseFunction.NONE, GX.AttenuationFunction.NONE); this.setChanCtrlInternal(this.lightChannels[idx].alphaChannel, false, GX.ColorSrc.REG, GX.ColorSrc.REG, 0, GX.DiffuseFunction.NONE, GX.AttenuationFunction.NONE); } return this.lightChannels[idx]; } private setChanCtrlInternal(chanCtrl: ColorChannelControl, enable: boolean, ambSrc: GX.ColorSrc, matSrc: GX.ColorSrc, lightMask: number, diffFn: GX.DiffuseFunction, attnFn: GX.AttenuationFunction): void { chanCtrl.lightingEnabled = enable; chanCtrl.ambColorSource = ambSrc; chanCtrl.matColorSource = matSrc; chanCtrl.litMask = lightMask; chanCtrl.diffuseFunction = diffFn; chanCtrl.attenuationFunction = attnFn; } public setChanCtrl(idx: GX.ColorChannelID, enable: boolean, ambSrc: GX.ColorSrc, matSrc: GX.ColorSrc, lightMask: number, diffFn: GX.DiffuseFunction, attnFn: GX.AttenuationFunction): void { const lightChannel = this.ensureLightChannel(idx & 0x01); const set = (idx >>> 1) + 1; if (!!(set & 0x01)) this.setChanCtrlInternal(lightChannel.colorChannel, enable, ambSrc, matSrc, lightMask, diffFn, attnFn); if (!!(set & 0x02)) this.setChanCtrlInternal(lightChannel.alphaChannel, enable, ambSrc, matSrc, lightMask, diffFn, attnFn); } private ensureTevStage(idx: number): TevStage { if (this.tevStages[idx] === undefined) { this.tevStages[idx] = {} as TevStage; if (idx <= 7) this.setTevOrder(idx, GX.TexCoordID.TEXCOORD0 + idx, GX.TexMapID.TEXMAP0 + idx, GX.RasColorChannelID.COLOR0A0); else this.setTevOrder(idx, GX.TexCoordID.TEXCOORD_NULL, GX.TexMapID.TEXMAP_NULL, GX.RasColorChannelID.COLOR0A0); this.setTevColorOp(idx, GX.TevOp.ADD, GX.TevBias.ZERO, GX.TevScale.SCALE_1, true, GX.Register.PREV), this.setTevAlphaOp(idx, GX.TevOp.ADD, GX.TevBias.ZERO, GX.TevScale.SCALE_1, true, GX.Register.PREV), this.setTevColorIn(idx, GX.CC.ZERO, GX.CC.ZERO, GX.CC.ZERO, GX.CC.TEXC), this.setTevAlphaIn(idx, GX.CA.ZERO, GX.CA.ZERO, GX.CA.ZERO, GX.CA.TEXA), this.setTevKColorSel(idx, GX.KonstColorSel.KCSEL_2_8); this.setTevKAlphaSel(idx, GX.KonstAlphaSel.KASEL_1); this.setTevDirect(idx); } return this.tevStages[idx]; } public setTevOrder(idx: number, texCoordID: GX.TexCoordID, texMap: GX.TexMapID, channelId: GX.RasColorChannelID): void { const tevStage = this.ensureTevStage(idx); tevStage.texCoordId = texCoordID; tevStage.texMap = texMap; tevStage.channelId = channelId; } public setTevColorOp(idx: number, colorOp: GX.TevOp, colorBias: GX.TevBias, colorScale: GX.TevScale, colorClamp: boolean, colorRegId: GX.Register): void { const tevStage = this.ensureTevStage(idx); tevStage.colorOp = colorOp; tevStage.colorBias = colorBias; tevStage.colorScale = colorScale; tevStage.colorClamp = colorClamp; tevStage.colorRegId = colorRegId; } public setTevAlphaOp(idx: number, alphaOp: GX.TevOp, alphaBias: GX.TevBias, alphaScale: GX.TevScale, alphaClamp: boolean, alphaRegId: GX.Register): void { const tevStage = this.ensureTevStage(idx); tevStage.alphaOp = alphaOp; tevStage.alphaBias = alphaBias; tevStage.alphaScale = alphaScale; tevStage.alphaClamp = alphaClamp; tevStage.alphaRegId = alphaRegId; } public setTevColorIn(idx: number, colorInA: GX.CC, colorInB: GX.CC, colorInC: GX.CC, colorInD: GX.CC): void { const tevStage = this.ensureTevStage(idx); tevStage.colorInA = colorInA; tevStage.colorInB = colorInB; tevStage.colorInC = colorInC; tevStage.colorInD = colorInD; } public setTevAlphaIn(idx: number, alphaInA: GX.CA, alphaInB: GX.CA, alphaInC: GX.CA, alphaInD: GX.CA): void { const tevStage = this.ensureTevStage(idx); tevStage.alphaInA = alphaInA; tevStage.alphaInB = alphaInB; tevStage.alphaInC = alphaInC; tevStage.alphaInD = alphaInD; } public setTevKColorSel(idx: number, sel: GX.KonstColorSel): void { const tevStage = this.ensureTevStage(idx); tevStage.konstColorSel = sel; } public setTevKAlphaSel(idx: number, sel: GX.KonstAlphaSel): void { const tevStage = this.ensureTevStage(idx); tevStage.konstAlphaSel = sel; } public setTevSwapMode(idx: number, rasSwapTable: SwapTable | undefined, texSwapTable: SwapTable | undefined): void { const tevStage = this.ensureTevStage(idx); tevStage.rasSwapTable = rasSwapTable; tevStage.texSwapTable = texSwapTable; } public setTevIndirect(tevStageIdx: number, indTexStage: GX.IndTexStageID, format: GX.IndTexFormat, biasSel: GX.IndTexBiasSel, matrixSel: GX.IndTexMtxID, wrapS: GX.IndTexWrap, wrapT: GX.IndTexWrap, addPrev: boolean, utcLod: boolean, alphaSel: GX.IndTexAlphaSel): void { const tevStage = this.ensureTevStage(tevStageIdx); tevStage.indTexStage = indTexStage; tevStage.indTexFormat = format; tevStage.indTexBiasSel = biasSel; tevStage.indTexAlphaSel = alphaSel; tevStage.indTexMatrix = matrixSel; tevStage.indTexWrapS = wrapS; tevStage.indTexWrapT = wrapT; tevStage.indTexAddPrev = addPrev; tevStage.indTexUseOrigLOD = utcLod; } public setTevIndWarp(tevStageIdx: number, indTexStage: GX.IndTexStageID, signedOffsets: boolean, replaceMode: boolean, matrixSel: GX.IndTexMtxID): void { const biasSel = signedOffsets ? GX.IndTexBiasSel.ST : GX.IndTexBiasSel.NONE; const wrap = replaceMode ? GX.IndTexWrap._0 : GX.IndTexWrap.OFF; this.setTevIndirect(tevStageIdx, indTexStage, GX.IndTexFormat._8, biasSel, matrixSel, wrap, wrap, false, false, GX.IndTexAlphaSel.OFF); } public setTevDirect(tevStageIdx: number): void { this.setTevIndirect(tevStageIdx, GX.IndTexStageID.STAGE0, GX.IndTexFormat._8, GX.IndTexBiasSel.NONE, GX.IndTexMtxID.OFF, GX.IndTexWrap.OFF, GX.IndTexWrap.OFF, false, false, GX.IndTexAlphaSel.OFF); } private ensureIndTexStage(idx: GX.IndTexStageID): IndTexStage { if (this.indTexStages[idx] === undefined) { this.indTexStages[idx] = {} as IndTexStage; // Don't set IndTexOrder -- the user should set it. this.setIndTexScale(idx, GX.IndTexScale._1, GX.IndTexScale._1); } return this.indTexStages[idx]; } public setIndTexOrder(idx: GX.IndTexStageID, texcoord: GX.TexCoordID, texmap: GX.TexMapID): void { const indStage = this.ensureIndTexStage(idx); indStage.texCoordId = texcoord; indStage.texture = texmap; } public setIndTexScale(idx: GX.IndTexStageID, scaleS: GX.IndTexScale, scaleT: GX.IndTexScale): void { const indStage = this.ensureIndTexStage(idx); indStage.scaleS = scaleS; indStage.scaleT = scaleT; } public setAlphaCompare(compareA: GX.CompareType, referenceA: number, op: GX.AlphaOp, compareB: GX.CompareType, referenceB: number): void { this.alphaTest.compareA = compareA; this.alphaTest.referenceA = referenceA / 0xFF; this.alphaTest.op = op; this.alphaTest.compareB = compareB; this.alphaTest.referenceB = referenceB / 0xFF; } public setFog(fogType: GX.FogType, fogAdjEnabled: boolean): void { this.ropInfo.fogType = fogType; this.ropInfo.fogAdjEnabled = fogAdjEnabled; } public setBlendMode(blendMode: GX.BlendMode, srcFactor: GX.BlendFactor, dstFactor: GX.BlendFactor, logicOp: GX.LogicOp = GX.LogicOp.CLEAR): void { this.ropInfo.blendMode = blendMode; this.ropInfo.blendSrcFactor = srcFactor; this.ropInfo.blendDstFactor = dstFactor; this.ropInfo.blendLogicOp = logicOp; } public setZMode(depthTest: boolean, depthFunc: GX.CompareType, depthWrite: boolean): void { this.ropInfo.depthTest = depthTest; this.ropInfo.depthFunc = depthFunc; this.ropInfo.depthWrite = depthWrite; } public setDstAlpha(v?: number): void { this.ropInfo.dstAlpha = v; } public setColorUpdate(v: boolean): void { this.ropInfo.colorUpdate = v; } public setAlphaUpdate(v: boolean): void { this.ropInfo.alphaUpdate = v; } public setUsePnMtxIdx(v: boolean): void { this.usePnMtxIdx = v; } public finish(name: string | null = null): GXMaterial { if (name === null) name = this.name; if (name === null) name = ''; const material = { name: name, cullMode: this.cullMode, lightChannels: this.lightChannels.map(copyLightChannelControl), texGens: this.texGens.map(copyTexGen), tevStages: this.tevStages.map(copyTevStage), indTexStages: this.indTexStages.map(copyIndTexStage), alphaTest: copyAlphaTest(this.alphaTest), ropInfo: copyRopInfo(this.ropInfo), usePnMtxIdx: this.usePnMtxIdx, }; autoOptimizeMaterial(material); return material; } } ```
/content/code_sandbox/src/gx/GXMaterialBuilder.ts
xml
2016-10-06T21:43:45
2024-08-16T17:03:52
noclip.website
magcius/noclip.website
3,206
4,213
```xml <?xml version="1.0" encoding="UTF-8"?> <definitions xmlns="path_to_url" xmlns:flowable="path_to_url" xmlns:bpmndi="path_to_url" xmlns:omgdc="path_to_url" xmlns:omgdi="path_to_url" typeLanguage="path_to_url" expressionLanguage="path_to_url" targetNamespace="path_to_url"> <process id="testSimpleErrorEventSubProcess" name="Test Simple Error Event Sub Process" isExecutable="true"> <startEvent id="start" flowable:formFieldValidation="true"/> <endEvent id="end"/> <subProcess id="errorEventSubProcess" name="subProcess" triggeredByEvent="true"> <userTask id="eventSubProcessTask1" name="Sub Process Task" flowable:formFieldValidation="true"/> <endEvent id="eventSubProcessEnd"/> <startEvent id="eventSubProcessStart" isInterrupting="true"> <errorEventDefinition/> </startEvent> <sequenceFlow id="eventSubProcessFlow2" sourceRef="eventSubProcessTask1" targetRef="eventSubProcessEnd"/> <sequenceFlow id="eventSubProcessFlow1" sourceRef="eventSubProcessStart" targetRef="eventSubProcessTask1"/> </subProcess> <subProcess id="subProcess" name="subProcess"> <startEvent id="subProcessStart" flowable:formFieldValidation="true"/> <endEvent id="subProcessEnd"> <errorEventDefinition errorRef="testError"/> </endEvent> <sequenceFlow id="subProcessFlow1" sourceRef="subProcessStart" targetRef="subProcessEnd"/> </subProcess> <sequenceFlow id="flow2" sourceRef="subProcess" targetRef="end"/> <sequenceFlow id="flow1" sourceRef="start" targetRef="subProcess"/> </process> <bpmndi:BPMNDiagram id="BPMNDiagram_testSimpleErrorEventSubProcess"> <bpmndi:BPMNPlane bpmnElement="testSimpleErrorEventSubProcess" id="BPMNPlane_testSimpleErrorEventSubProcess"> <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start"> <omgdc:Bounds height="30.0" width="30.0" x="90.0" y="150.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end"> <omgdc:Bounds height="28.0" width="28.0" x="510.0" y="151.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="errorEventSubProcess" id="BPMNShape_errorEventSubProcess"> <omgdc:Bounds height="224.0" width="404.0" x="102.0" y="330.0"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="eventSubProcessTask1" id="BPMNShape_eventSubProcessTask1"> <omgdc:Bounds height="80.0" width="100.0" x="207.0" y="403.5"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="eventSubProcessEnd" id="BPMNShape_eventSubProcessEnd"> <omgdc:Bounds height="28.0" width="28.0" x="382.5" y="429.5"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="eventSubProcessStart" id="BPMNShape_eventSubProcessStart"> <omgdc:Bounds height="30.0" width="30.0" x="117.0" y="428.5"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="subProcess" id="BPMNShape_subProcess"> <omgdc:Bounds height="151.0" width="188.0" x="210.0" y="89.5"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="subProcessStart" id="BPMNShape_subProcessStart"> <omgdc:Bounds height="30.0" width="30.0" x="240.5" y="151.5"/> </bpmndi:BPMNShape> <bpmndi:BPMNShape bpmnElement="subProcessEnd" id="BPMNShape_subProcessEnd"> <omgdc:Bounds height="28.0" width="28.0" x="315.0" y="152.5"/> </bpmndi:BPMNShape> <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1"> <omgdi:waypoint x="119.94999837205718" y="165.0"/> <omgdi:waypoint x="209.99999999999807" y="165.0"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2"> <omgdi:waypoint x="397.95000000000005" y="165.0"/> <omgdi:waypoint x="510.0" y="165.0"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="subProcessFlow1" id="BPMNEdge_subProcessFlow1"> <omgdi:waypoint x="270.449996642631" y="166.5"/> <omgdi:waypoint x="315.0" y="166.5"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="eventSubProcessFlow2" id="BPMNEdge_eventSubProcessFlow2"> <omgdi:waypoint x="306.94999999998237" y="443.5"/> <omgdi:waypoint x="382.5" y="443.5"/> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge bpmnElement="eventSubProcessFlow1" id="BPMNEdge_eventSubProcessFlow1"> <omgdi:waypoint x="146.94999883049306" y="443.5"/> <omgdi:waypoint x="207.0" y="443.5"/> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions> ```
/content/code_sandbox/modules/flowable-engine/src/test/resources/org/flowable/engine/test/bpmn/event/error/ErrorEventSubProcessTest.testInterruptingSimpleActivities.bpmn20.xml
xml
2016-10-13T07:21:43
2024-08-16T15:23:14
flowable-engine
flowable/flowable-engine
7,715
1,560
```xml <vector xmlns:android="path_to_url" android:width="23dp" android:height="22dp" android:viewportWidth="23" android:viewportHeight="22"> <path android:pathData="M11.2,12.414V18.069C11.2,18.604 11.184,18.951 11.133,19.172C11.071,19.433 10.965,19.621 10.841,19.767C10.529,20.132 10.061,20.326 9.582,20.288C9.391,20.273 9.183,20.215 8.955,20.074C8.762,19.954 8.506,19.72 8.127,19.341L4.961,16.176C4.873,16.087 4.838,16.032 4.786,16C4.727,15.986 4.663,16 4.537,16H2.8C1.995,16 1.6,15.939 1.292,15.782C0.916,15.59 0.61,15.284 0.418,14.908C0.261,14.6 0.2,14.205 0.2,13.4V8.6C0.2,7.795 0.261,7.4 0.418,7.092C0.61,6.716 0.916,6.41 1.292,6.218C1.6,6.061 1.995,6 2.8,6H4.537C4.663,6 4.727,6.014 4.786,6L0.493,1.707C0.103,1.317 0.103,0.683 0.493,0.293C0.883,-0.097 1.517,-0.097 1.907,0.293L6.907,5.293L21.907,20.293C22.297,20.683 22.297,21.317 21.907,21.707C21.517,22.097 20.883,22.097 20.493,21.707L11.2,12.414ZM6.198,7.412C6.046,7.555 5.942,7.637 5.831,7.705C5.652,7.815 5.457,7.896 5.253,7.945C5.082,7.986 4.901,8 4.537,8H2.8C2.567,8 2.326,8.01 2.216,8.015C2.21,8.126 2.2,8.367 2.2,8.6V13.4C2.2,13.633 2.21,13.874 2.216,13.984C2.326,13.99 2.567,14 2.8,14H4.537C4.901,14 5.082,14.014 5.253,14.055C5.457,14.104 5.652,14.185 5.831,14.295C5.981,14.386 6.119,14.504 6.376,14.761L9.2,17.586V10.414L6.198,7.412ZM18.136,4.584C17.814,4.136 17.916,3.51 18.364,3.188C18.812,2.866 19.437,2.968 19.76,3.416C21.295,5.551 22.2,8.17 22.2,11C22.2,12.616 21.905,14.163 21.366,15.59C21.171,16.106 20.594,16.367 20.077,16.172C19.561,15.977 19.3,15.4 19.495,14.884C19.951,13.676 20.2,12.367 20.2,11C20.2,8.606 19.435,6.39 18.136,4.584ZM14.125,7.572C13.809,7.119 13.921,6.496 14.373,6.18C14.826,5.864 15.45,5.975 15.765,6.428C16.67,7.724 17.2,9.3 17.2,11C17.2,11.552 16.752,12 16.2,12C15.648,12 15.2,11.552 15.2,11C15.2,9.725 14.803,8.544 14.125,7.572ZM7.7,3.466C7.7,3.21 7.798,2.954 7.993,2.759L8.493,2.259C8.536,2.216 8.582,2.177 8.63,2.144C8.757,2.032 8.863,1.949 8.955,1.892C9.183,1.751 9.391,1.692 9.582,1.677C10.061,1.64 10.529,1.833 10.841,2.199C10.965,2.345 11.071,2.533 11.133,2.794C11.184,3.015 11.2,3.362 11.2,3.897V4.966C11.2,5.518 10.752,5.966 10.2,5.966C9.648,5.966 9.2,5.518 9.2,4.966V4.336C8.929,4.501 8.7,4.466 8.7,4.466C8.434,4.466 8.181,4.361 7.993,4.173C7.805,3.985 7.7,3.732 7.7,3.466Z" android:fillColor="#303233" android:fillType="evenOdd"/> </vector> ```
/content/code_sandbox/icon-pack/src/main/res/drawable/ic_volume_off.xml
xml
2016-05-04T11:46:20
2024-08-15T16:29:10
android
meganz/android
1,537
1,475