text
stringlengths
2
100k
meta
dict
import { matrixTransform, transformEllipse } from './geom' let Path = (init) => { let instructions = init || [] let push = (arr, el) => { let copy = arr.slice(0, arr.length) copy.push(el) return copy } let areEqualPoints = ([a1, b1], [a2, b2]) => (a1 === a2) && (b1 === b2) let trimZeros = (string, char) => { let l = string.length while (string.charAt(l - 1) === '0') { l = l - 1 } if(string.charAt(l - 1) === '.') { l = l - 1 } return string.substr(0, l) } let round = (number, digits) => { const str = number.toFixed(digits) return trimZeros(str) } let printInstrunction = ({ command, params }) => { let numbers = params.map((param) => round(param, 6)) return `${ command } ${ numbers.join(' ') }` } let point = ({ command, params }, prev) => { switch(command) { case 'M': return [params[0], params[1]] case 'L': return [params[0], params[1]] case 'H': return [params[0], prev[1]] case 'V': return [prev[0], params[0]] case 'Z': return null case 'C': return [params[4], params[5]] case 'S': return [params[2], params[3]] case 'Q': return [params[2], params[3]] case 'T': return [params[0], params[1]] case 'A': return [params[5], params[6]] } } let transformParams = (instruction, matrix, prev) => { let p = instruction.params let transformer = { 'V': function (instruction, matrix, prev) { let pts = [{x: prev[0], y: p[0]}] let newPts = matrixTransform(pts, matrix) if (newPts[0].x === matrixTransform([{x: prev[0], y: prev[1]}], matrix)[0].x) { return { command: 'V', params: [newPts[0].y] } } else { return { command: 'L', params: [newPts[0].x, newPts[0].y] } } }, 'H': function (instruction, matrix, prev) { let pts = [{x: p[0], y: prev[1]}] let newPts = matrixTransform(pts, matrix) if (newPts[0].y === matrixTransform([{ x: prev[0], y: prev[1] }], matrix)[0].y) { return { command: 'H', params: [newPts[0].x] } } else { return { command: 'L', params: [newPts[0].x, newPts[0].y] } } }, 'A': function (instruction, matrix, prev) { // transform rx, ry, and x-axis rotation let r = transformEllipse(p[0], p[1], p[2], matrix) let sweepFlag = p[4] if (matrix[0] * matrix[3] - matrix[1] * matrix[2] < 0) { sweepFlag = sweepFlag ? '0' : '1' } // transform endpoint let pts = [{x: p[5], y: p[6]}] let newPts = matrixTransform(pts, matrix) if (r.isDegenerate) { return { command: 'L', params: [newPts[0].x, newPts[0].y] } } else { return { command: 'A', params: [r.rx, r.ry, r.ax, p[3], sweepFlag, newPts[0].x, newPts[0].y] } } }, 'C': function (instruction, matrix, prev) { let pts = [ {x: p[0], y: p[1]}, {x: p[2], y: p[3]}, {x: p[4], y: p[5]} ] let newPts = matrixTransform(pts, matrix) return { command: 'C', params: [newPts[0].x, newPts[0].y, newPts[1].x, newPts[1].y, newPts[2].x, newPts[2].y] } }, 'Z': function (instruction, matrix, prev) { return { command: 'Z', params: [] } }, 'default': function (instruction, matrix, prev) { let pts = [{x: p[0], y: p[1]}] let newPts = matrixTransform(pts, matrix) let newParams = instruction.params.slice(0, instruction.params.length) newParams.splice(0, 2, newPts[0].x, newPts[0].y) return { command: instruction.command, params: newParams } } } if (transformer[instruction.command]) { return transformer[instruction.command](instruction, matrix, prev) } else { return transformer['default'](instruction, matrix, prev) } } let verbosify = (keys, f) => function(a) { let args = (typeof a === 'object') ? keys.map((k) => a[k]) : arguments return f.apply(null, args) } let plus = (instruction) => Path(push(instructions, instruction)) return ({ moveto: verbosify(['x', 'y'], (x, y) => plus({ command: 'M', params: [x, y] }) ), lineto: verbosify(['x', 'y'], (x, y) => plus({ command: 'L', params: [x, y] }) ), hlineto: verbosify(['x'], (x) => plus({ command: 'H', params: [x] }) ), vlineto: verbosify(['y'], (y) => plus({ command: 'V', params: [y] }) ), closepath: () => plus({ command: 'Z', params: [] }), curveto: verbosify(['x1', 'y1', 'x2', 'y2','x', 'y'], (x1, y1, x2, y2, x, y) => plus({ command: 'C', params: [x1, y1, x2, y2, x, y] }) ), smoothcurveto: verbosify(['x2', 'y2','x', 'y'], (x2, y2, x, y) => plus({ command: 'S', params: [x2, y2,x, y] }) ), qcurveto: verbosify(['x1', 'y1', 'x', 'y'], (x1, y1, x, y) => plus({ command: 'Q', params: [x1, y1, x, y] }) ), smoothqcurveto: verbosify(['x', 'y'], (x, y) => plus({ command: 'T', params: [x, y] }) ), arc: verbosify(['rx', 'ry', 'xrot', 'largeArcFlag', 'sweepFlag', 'x', 'y'], (rx, ry, xrot, largeArcFlag, sweepFlag, x, y) => plus({ command: 'A', params: [rx, ry, xrot, largeArcFlag, sweepFlag, x, y] }) ), translate: verbosify(['dx', 'dy'], (dx = 0, dy = 0) => { if (dx !== 0 || dy !== 0) { let prev = [0, 0] let matrix = [1, 0, 0, 1, dx, dy] let newInstructions = instructions.map(instruction => { let p = transformParams(instruction, matrix, prev) prev = point(instruction, prev) return p }) return Path(newInstructions) } else { return Path(instructions) } }), rotate: verbosify(['angle', 'rx', 'ry'], (angle, rx = 0, ry = 0) => { if (angle !== 0) { let prev let matrix let newInstructions = instructions if (rx !== 0 && ry !== 0) { prev = [0, 0] matrix = [1, 0, 0, 1, -rx, -ry] newInstructions = newInstructions.map(instruction => { let p = transformParams(instruction, matrix, prev) prev = point(instruction, prev) return p }) } let rad = angle * Math.PI / 180 let cos = Math.cos(rad) let sin = Math.sin(rad) prev = [0, 0] matrix = [cos, sin, -sin, cos, 0, 0] newInstructions = newInstructions.map(instruction => { let p = transformParams(instruction, matrix, prev) prev = point(instruction, prev) return p }) if (rx !== 0 && ry !== 0) { prev = [0, 0] matrix = [1, 0, 0, 1, rx, ry] newInstructions = newInstructions.map(instruction => { let p = transformParams(instruction, matrix, prev) prev = point(instruction, prev) return p }) } return Path(newInstructions) } else { return Path(instructions) } }), scale: verbosify(['sx', 'sy'], (sx = 1, sy = sx) => { if (sx !== 1 || sy !== 1) { let prev = [0, 0] let matrix = [sx, 0, 0, sy, 0, 0] let newInstructions = instructions.map(instruction => { let p = transformParams(instruction, matrix, prev) prev = point(instruction, prev) return p }) return Path(newInstructions) } else { return Path(instructions) } }), shearX: verbosify(['angle'], (angle = 0) => { if (angle !== 0) { let prev = [0, 0] let matrix = [1, 0, Math.tan(angle * Math.PI / 180), 1, 0, 0] let newInstructions = instructions.map(instruction => { let p = transformParams(instruction, matrix, prev) prev = point(instruction, prev) return p }) return Path(newInstructions) } else { return Path(instructions) } }), shearY: verbosify(['angle'], (angle = 0) => { if (angle !== 0) { let prev = [0, 0] let matrix = [1, Math.tan(angle * Math.PI / 180), 0, 1, 0, 0] let newInstructions = instructions.map(instruction => { let p = transformParams(instruction, matrix, prev) prev = point(instruction, prev) return p }) return Path(newInstructions) } else { return Path(instructions) } }), print: () => instructions.map(printInstrunction).join(' '), toString: () => this.print(), points: () => { let ps = [] let prev = [0, 0] for(let instruction of instructions) { let p = point(instruction, prev) prev = p if(p) { ps.push(p) } } return ps }, instructions: () => instructions.slice(0, instructions.length), connect: function(path) { let ps = this.points() let last = ps[ps.length - 1] let first = path.points()[0] let newInstructions if (instructions[instructions.length - 1].command !== 'Z') { newInstructions = path.instructions().slice(1) if (!areEqualPoints(last, first)) { newInstructions.unshift({ command: "L", params: first }) } } else { newInstructions = path.instructions() } return Path(this.instructions().concat(newInstructions)) } }) } export default function() { return Path() }
{ "pile_set_name": "Github" }
<?php /** * My Sites dashboard. * * @package WordPress * @subpackage Multisite * @since 3.0.0 */ require_once __DIR__ . '/admin.php'; if ( ! is_multisite() ) { wp_die( __( 'Multisite support is not enabled.' ) ); } if ( ! current_user_can( 'read' ) ) { wp_die( __( 'Sorry, you are not allowed to access this page.' ) ); } $action = isset( $_POST['action'] ) ? $_POST['action'] : 'splash'; $blogs = get_blogs_of_user( $current_user->ID ); $updated = false; if ( 'updateblogsettings' === $action && isset( $_POST['primary_blog'] ) ) { check_admin_referer( 'update-my-sites' ); $blog = get_site( (int) $_POST['primary_blog'] ); if ( $blog && isset( $blog->domain ) ) { update_user_option( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'], true ); $updated = true; } else { wp_die( __( 'The primary site you chose does not exist.' ) ); } } $title = __( 'My Sites' ); $parent_file = 'index.php'; get_current_screen()->add_help_tab( array( 'id' => 'overview', 'title' => __( 'Overview' ), 'content' => '<p>' . __( 'This screen shows an individual user all of their sites in this network, and also allows that user to set a primary site. They can use the links under each site to visit either the front end or the dashboard for that site.' ) . '</p>', ) ); get_current_screen()->set_help_sidebar( '<p><strong>' . __( 'For more information:' ) . '</strong></p>' . '<p>' . __( '<a href="https://codex.wordpress.org/Dashboard_My_Sites_Screen">Documentation on My Sites</a>' ) . '</p>' . '<p>' . __( '<a href="https://wordpress.org/support/">Support</a>' ) . '</p>' ); require_once ABSPATH . 'wp-admin/admin-header.php'; if ( $updated ) { ?> <div id="message" class="updated notice is-dismissible"><p><strong><?php _e( 'Settings saved.' ); ?></strong></p></div> <?php } ?> <div class="wrap"> <h1 class="wp-heading-inline"> <?php echo esc_html( $title ); ?> </h1> <?php if ( in_array( get_site_option( 'registration' ), array( 'all', 'blog' ), true ) ) { /** This filter is documented in wp-login.php */ $sign_up_url = apply_filters( 'wp_signup_location', network_site_url( 'wp-signup.php' ) ); printf( ' <a href="%s" class="page-title-action">%s</a>', esc_url( $sign_up_url ), esc_html_x( 'Add New', 'site' ) ); } if ( empty( $blogs ) ) : echo '<p>'; _e( 'You must be a member of at least one site to use this page.' ); echo '</p>'; else : ?> <hr class="wp-header-end"> <form id="myblogs" method="post"> <?php choose_primary_blog(); /** * Fires before the sites list on the My Sites screen. * * @since 3.0.0 */ do_action( 'myblogs_allblogs_options' ); ?> <br clear="all" /> <ul class="my-sites striped"> <?php /** * Enable the Global Settings section on the My Sites screen. * * By default, the Global Settings section is hidden. Passing a non-empty * string to this filter will enable the section, and allow new settings * to be added, either globally or for specific sites. * * @since MU (3.0.0) * * @param string $settings_html The settings HTML markup. Default empty. * @param string $context Context of the setting (global or site-specific). Default 'global'. */ $settings_html = apply_filters( 'myblogs_options', '', 'global' ); if ( $settings_html ) { echo '<h3>' . __( 'Global Settings' ) . '</h3>'; echo $settings_html; } reset( $blogs ); foreach ( $blogs as $user_blog ) { switch_to_blog( $user_blog->userblog_id ); echo '<li>'; echo "<h3>{$user_blog->blogname}</h3>"; $actions = "<a href='" . esc_url( home_url() ) . "'>" . __( 'Visit' ) . '</a>'; if ( current_user_can( 'read' ) ) { $actions .= " | <a href='" . esc_url( admin_url() ) . "'>" . __( 'Dashboard' ) . '</a>'; } /** * Filters the row links displayed for each site on the My Sites screen. * * @since MU (3.0.0) * * @param string $actions The HTML site link markup. * @param object $user_blog An object containing the site data. */ $actions = apply_filters( 'myblogs_blog_actions', $actions, $user_blog ); echo "<p class='my-sites-actions'>" . $actions . '</p>'; /** This filter is documented in wp-admin/my-sites.php */ echo apply_filters( 'myblogs_options', '', $user_blog ); echo '</li>'; restore_current_blog(); } ?> </ul> <?php if ( count( $blogs ) > 1 || has_action( 'myblogs_allblogs_options' ) || has_filter( 'myblogs_options' ) ) { ?> <input type="hidden" name="action" value="updateblogsettings" /> <?php wp_nonce_field( 'update-my-sites' ); submit_button(); } ?> </form> <?php endif; ?> </div> <?php require_once ABSPATH . 'wp-admin/admin-footer.php';
{ "pile_set_name": "Github" }
// @flow import React, { Component, Fragment } from 'react'; import Select, { components } from 'react-select'; import md from '../../markdown/renderer'; const Code = ({ children }) => <code>{children}</code>; const propChangeData = [ ['aria-describedby', 'unchanged'], ['aria-label', 'unchanged'], ['aria-labelledby', 'unchanged'], ['arrowRenderer', 'components'], ['autoBlur', 'renamed', 'blurInputOnSelect'], ['autoFocus', 'unchanged'], ['autoLoad', 'removed', 'see the Async component (defaultOptions)'], ['autosize', 'components'], ['backspaceRemoves', 'renamed', 'backspaceRemovesValue'], [ 'backspaceToRemoveMessage', 'removed', 'may be implemented in a later version', ], ['className', 'unchanged'], ['clearable', 'renamed', 'isClearable'], ['clearAllText', 'removed'], ['clearRenderer', 'components'], ['clearValueText', 'removed'], ['closeOnSelect', 'renamed', 'closeMenuOnSelect'], ['deleteRemoves', 'removed'], ['delimiter', 'unchanged'], ['disabled', 'renamed', 'isDisabled'], ['escapeClearsValue', 'unchanged'], [ 'filterOptions', 'removed', md` use \`filterOption\` instead `, ], ['id', 'unchanged'], [ 'ignoreAccents', 'removed', md` see \`createFilter()\` `, ], [ 'ignoreCase', 'removed', md` see \`createFilter()\` `, ], ['inputProps', 'components'], ['inputRenderer', 'components'], ['instanceId', 'unchanged'], ['isLoading', 'unchanged'], [ 'joinValues', 'removed', md` now inferred from \`delimiter\` `, ], ['labelKey', 'removed'], ['loadOptions', 'unchanged'], [ 'matchPos', 'removed', md` see \`createFilter()\` `, ], [ 'matchProp', 'removed', md` see \`createFilter()\` `, ], ['menuBuffer', 'styles'], ['menuContainerStyle', 'styles'], ['menuRenderer', 'components'], ['menuStyle', 'styles'], ['multi', 'renamed', 'isMulti'], ['name', 'unchanged'], ['noResultsText', 'renamed', 'noOptionsMessage'], ['onBlur', 'unchanged'], ['onBlurResetsInput', 'removed'], ['onClose', 'renamed', 'onMenuClose'], ['onCloseResetsInput', 'removed'], ['onFocus', 'unchanged'], ['onInputChange', 'unchanged'], ['onInputKeyDown', 'renamed', 'onKeyDown'], ['onMenuScrollToBottom', 'unchanged'], ['onOpen', 'renamed', 'onMenuOpen'], ['onSelectResetsInput', 'removed'], ['onValueClick', 'removed'], ['openOnClick', 'renamed', 'openMenuOnClick'], ['openOnFocus', 'renamed', 'openMenuOnFocus'], ['optionClassName', 'components'], ['optionComponent', 'components'], ['optionRenderer', 'components'], ['options', 'unchanged'], ['pageSize', 'unchanged'], ['placeholder', 'changed', 'now only accepts a string'], ['removeSelected', 'renamed', 'hideSelectedOptions'], ['required', 'removed', 'may be implemented in a later version'], [ 'resetValue', 'removed', md` control the \`value\` prop `, ], ['rtl', 'renamed', 'isRtl'], ['scrollMenuIntoView', 'renamed', 'menuShouldScrollIntoView'], ['searchable', 'renamed', 'isSearchable'], ['searchPromptText', 'removed'], ['simpleValue', 'removed'], ['style', 'styles'], ['tabIndex', 'unchanged'], ['tabSelectsValue', 'unchanged'], [ 'trimFilter', 'removed', md` see \`createFilter()\` `, ], ['value', 'unchanged'], ['valueComponent', 'components'], ['valueKey', 'removed'], ['valueRenderer', 'components'], ['wrapperStyle', 'styles'], ]; const Table = ({ children }) => ( <table css={{ width: '100%', marginTop: '30px', borderCollapse: 'collapse', }} > {children} </table> ); const Header = ({ children }) => ( <td css={{ fontWeight: 'bold', padding: '4px 8px 4px 0', borderBottom: '3px solid #eee', }} > {children} </td> ); const Cell = ({ children }) => ( <td css={{ fontSize: '90%', padding: '4px 8px 4px 0', borderBottom: '1px solid #eee', verticalAlign: 'top', }} > {children} </td> ); class PropStatus extends Component<*> { renderStatus() { const { status, note } = this.props; switch (status) { case 'components': return ( <Fragment> <Cell>removed</Cell> <Cell>use the new Components API</Cell> </Fragment> ); case 'styles': return ( <Fragment> <Cell>removed</Cell> <Cell>use the new Styles API</Cell> </Fragment> ); case 'renamed': return ( <Fragment> <Cell>renamed</Cell> <Cell> use <Code>{note}</Code> </Cell> </Fragment> ); default: return ( <Fragment> <Cell>{status}</Cell> <Cell>{note}</Cell> </Fragment> ); } } render() { const { prop } = this.props; return ( <tr> <Cell> <Code>{prop}</Code> </Cell> {this.renderStatus()} </tr> ); } } class InputOption extends Component<*, *> { state = { isActive: false }; onMouseDown = () => this.setState({ isActive: true }); onMouseUp = () => this.setState({ isActive: false }); onMouseLeave = () => this.setState({ isActive: false }); render() { const { getStyles, Icon, isDisabled, isFocused, isSelected, children, innerProps, ...rest } = this.props; const { isActive } = this.state; // styles let bg = 'transparent'; if (isFocused) bg = '#eee'; if (isActive) bg = '#B2D4FF'; const style = { alignItems: 'center', backgroundColor: bg, color: 'inherit', display: 'flex ', }; // prop assignment const props = { ...innerProps, onMouseDown: this.onMouseDown, onMouseUp: this.onMouseUp, onMouseLeave: this.onMouseLeave, style, }; return ( <components.Option {...rest} isDisabled={isDisabled} isFocused={isFocused} isSelected={isSelected} getStyles={getStyles} innerProps={props} > <input type="checkbox" checked={isSelected} /> {children} </components.Option> ); } } const allOptions = [ { value: 'removed', label: 'removed' }, { value: 'unchanged', label: 'unchanged' }, { value: 'renamed', label: 'renamed' }, ]; const filterOptions = [ { value: 'propName', label: 'propName' }, { value: 'status', label: 'status' }, ]; const getDisplayedStatus = status => { if (status === 'components' || status === 'styles') return 'removed'; else return status; }; class PropChanges extends Component< *, { selectedOptions: Array<string>, filterValue: string } > { state = { selectedOptions: (allOptions.map(opt => opt.value): Array<string>), filterValue: filterOptions[0].value, }; render() { let { selectedOptions, filterValue } = this.state; return ( <Fragment> {/* filter */} <h4>Filter Props</h4> <Select defaultValue={allOptions} isMulti closeMenuOnSelect={false} hideSelectedOptions={false} onChange={options => { if (Array.isArray(options)) { this.setState({ selectedOptions: options.map(opt => opt.value) }); } }} options={allOptions} components={{ Option: InputOption, }} /> {/* sort */} <h4>Sort Props</h4> <Select defaultValue={filterOptions[0]} onChange={option => { if (!Array.isArray(option)) { this.setState({ filterValue: option ? option.value : '' }); } }} options={filterOptions} /> <Table> <thead> <tr> <Header>Prop</Header> <Header>Status</Header> <Header>Notes</Header> </tr> </thead> <tbody> {propChangeData .sort((a, b) => { if (filterValue === 'propName') { return a[0].localeCompare(b[0]); } else { return getDisplayedStatus(a[1]).localeCompare( getDisplayedStatus(b[1]) ); } }) .map(data => { const [prop, status, note] = data; return selectedOptions.includes(getDisplayedStatus(status)) ? ( <PropStatus key={prop} prop={prop} status={status} note={note} /> ) : null; })} </tbody> </Table> </Fragment> ); } } export default PropChanges;
{ "pile_set_name": "Github" }
from solc import get_solc_version import semantic_version def test_get_solc_version(): version = get_solc_version() assert isinstance(version, semantic_version.Version)
{ "pile_set_name": "Github" }
# The bumblebee package allows a program to be rendered on an # dedicated video card by spawning an additional X11 server and # streaming the results via VirtualGL or primus to the primary server. # The package is rather chaotic; it's also quite recent. # As it may change a lot, some of the hacks in this nix expression # will hopefully not be needed in the future anymore. # To test: # 1. make sure that the 'bbswitch' kernel module is installed, # 2. then run 'bumblebeed' as root # 3. Then either 'optirun glxinfo' or 'primusrun glxinfo' as user. # # The glxinfo output should indicate the NVidia driver is being used # and all expected extensions are supported. # # To use at startup, see hardware.bumblebee options. { stdenv, lib, fetchurl, fetchpatch, pkgconfig, help2man, makeWrapper , glib, libbsd , libX11, xorgserver, kmod, xf86videonouveau , nvidia_x11, virtualgl, libglvnd , automake111x, autoconf # The below should only be non-null in a x86_64 system. On a i686 # system the above nvidia_x11 and virtualgl will be the i686 packages. # TODO: Confusing. Perhaps use "SubArch" instead of i686? , nvidia_x11_i686 ? null , libglvnd_i686 ? null , useDisplayDevice ? false , extraNvidiaDeviceOptions ? "" , extraNouveauDeviceOptions ? "" , useNvidia ? true }: let version = "3.2.1"; nvidia_x11s = [ nvidia_x11 ] ++ lib.optional nvidia_x11.useGLVND libglvnd ++ lib.optionals (nvidia_x11_i686 != null) ([ nvidia_x11_i686 ] ++ lib.optional nvidia_x11_i686.useGLVND libglvnd_i686); nvidiaLibs = lib.makeLibraryPath nvidia_x11s; bbdPath = lib.makeBinPath [ kmod xorgserver ]; xmodules = lib.concatStringsSep "," (map (x: "${x.out or x}/lib/xorg/modules") ([ xorgserver ] ++ lib.optional (!useNvidia) xf86videonouveau)); modprobePatch = fetchpatch { url = "https://github.com/Bumblebee-Project/Bumblebee/commit/1ada79fe5916961fc4e4917f8c63bb184908d986.patch"; sha256 = "02vq3vba6nx7gglpjdfchws9vjhs1x02a543yvqrxqpvvdfim2x2"; }; libkmodPatch = fetchpatch { url = "https://github.com/Bumblebee-Project/Bumblebee/commit/deceb14cdf2c90ff64ebd1010a674305464587da.patch"; sha256 = "00c05i5lxz7vdbv445ncxac490vbl5g9w3vy3gd71qw1f0si8vwh"; }; in stdenv.mkDerivation rec { pname = "bumblebee"; inherit version; src = fetchurl { url = "https://bumblebee-project.org/${pname}-${version}.tar.gz"; sha256 = "03p3gvx99lwlavznrpg9l7jnl1yfg2adcj8jcjj0gxp20wxp060h"; }; patches = [ ./nixos.patch modprobePatch libkmodPatch ]; # By default we don't want to use a display device nvidiaDeviceOptions = lib.optionalString (!useDisplayDevice) '' # Disable display device Option "UseEDID" "false" Option "UseDisplayDevice" "none" '' + extraNvidiaDeviceOptions; nouveauDeviceOptions = extraNouveauDeviceOptions; # the have() function is deprecated and not available to bash completions the # way they are currently loaded in NixOS, so use _have. See #10936 postPatch = '' substituteInPlace scripts/bash_completion/bumblebee \ --replace "have optirun" "_have optirun" ''; preConfigure = '' # Don't use a special group, just reuse wheel. substituteInPlace configure \ --replace 'CONF_GID="bumblebee"' 'CONF_GID="wheel"' # Apply configuration options substituteInPlace conf/xorg.conf.nvidia \ --subst-var nvidiaDeviceOptions substituteInPlace conf/xorg.conf.nouveau \ --subst-var nouveauDeviceOptions ''; # Build-time dependencies of bumblebeed and optirun. # Note that it has several runtime dependencies. buildInputs = [ libX11 glib libbsd kmod ]; nativeBuildInputs = [ makeWrapper pkgconfig help2man automake111x autoconf ]; # The order of LDPATH is very specific: First X11 then the host # environment then the optional sub architecture paths. # # The order for MODPATH is the opposite: First the environment that # includes the acceleration driver. As this is used for the X11 # server, which runs under the host architecture, this does not # include the sub architecture components. configureFlags = [ "--with-udev-rules=$out/lib/udev/rules.d" # see #10282 #"CONF_PRIMUS_LD_PATH=${primusLibs}" ] ++ lib.optionals useNvidia [ "CONF_LDPATH_NVIDIA=${nvidiaLibs}" "CONF_MODPATH_NVIDIA=${nvidia_x11.bin}/lib/xorg/modules" ]; CFLAGS = [ "-DX_MODULE_APPENDS=\\\"${xmodules}\\\"" ]; postInstall = '' wrapProgram "$out/sbin/bumblebeed" \ --prefix PATH : "${bbdPath}" wrapProgram "$out/bin/optirun" \ --prefix PATH : "${virtualgl}/bin" ''; meta = with stdenv.lib; { homepage = "https://github.com/Bumblebee-Project/Bumblebee"; description = "Daemon for managing Optimus videocards (power-on/off, spawns xservers)"; platforms = platforms.linux; license = licenses.gpl3; maintainers = with maintainers; [ abbradar ]; }; }
{ "pile_set_name": "Github" }
NA NA 152 112 88 77 72 64 NA NA 180 160 141 110 102 103 NA NA 230 201 162 142 134 130 132 125 125 126 126 140 134 114 115 118 NA NA 244 212 179 158 143 139 136 134 132 142 144 157 155 155 155 140 NA NA 264 223 187 182 183 182 185 185 196 176 176 175 177 175 175 190 175 158 145 135 137 135 136 139 143 152 172 174 162 168 NA NA NA NA NA 178 165 158 175 175 NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA NA
{ "pile_set_name": "Github" }
/**************************************************************************** ** @license ** This demo file is part of yFiles for HTML 2.3. ** Copyright (c) 2000-2020 by yWorks GmbH, Vor dem Kreuzberg 28, ** 72070 Tuebingen, Germany. All rights reserved. ** ** yFiles demo files exhibit yFiles for HTML functionalities. Any redistribution ** of demo files in source code or binary form, with or without ** modification, is not permitted. ** ** Owners of a valid software license for a yFiles for HTML version that this ** demo is shipped with are allowed to use the demo source code as basis ** for their own yFiles for HTML powered applications. Use of such programs is ** governed by the rights and conditions as set out in the yFiles for HTML ** license agreement. ** ** THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESS OR IMPLIED ** WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF ** MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN ** NO EVENT SHALL yWorks BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED ** TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR ** PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF ** LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING ** NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS ** SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ** ***************************************************************************/ import { Class, CollapsibleNodeStyleDecoratorRenderer, ILookup, ImageNodeStyle, INodeInsetsProvider, IRenderContext, Rect, SimpleNode, Size, SvgVisual, Visual } from 'yfiles' /** * Provides a customized visualization of the collapse/expand button of a * group node. This implementation delegates the actual rendering of each * state to a node style. */ export default class MyCollapsibleNodeStyleDecoratorRenderer extends CollapsibleNodeStyleDecoratorRenderer { /** * @param {!Size} size */ constructor(size) { super() // The size of the button. this.size = size // The node style used for the rendering of the expanded state. this.expandedButtonStyle = new ImageNodeStyle('resources/collapse.svg') // The node style used for the rendering of the collapsed state. this.collapsedButtonStyle = new ImageNodeStyle('resources/expand.svg') // A dummy node that is used internally for the rendering of the button. This is a class field // since we want to reuse the same instance for each call to // {@link MyCollapsibleNodeStyleDecoratorRenderer#createButton} and // {@link MyCollapsibleNodeStyleDecoratorRenderer#updateButton} (for performance reasons). this.dummyNode = new SimpleNode() } /** * @param {!IRenderContext} context * @param {boolean} expanded * @param {!Size} size * @returns {!SvgVisual} */ createButton(context, expanded, size) { // Set the dummy node to the desired size this.dummyNode.layout = new Rect(0, 0, size.width, size.height) // Delegate the creation of the button visualization to the node styles const nodeStyle = expanded ? this.expandedButtonStyle : this.collapsedButtonStyle const visual = nodeStyle.renderer .getVisualCreator(this.dummyNode, nodeStyle) .createVisual(context) // Add the commands for user interaction CollapsibleNodeStyleDecoratorRenderer.addToggleExpansionStateCommand(visual, this.node, context) return visual } /** * @param {!IRenderContext} context * @param {boolean} expanded * @param {!Size} size * @param {!Visual} oldVisual * @returns {!SvgVisual} */ updateButton(context, expanded, size, oldVisual) { // Set the dummy node to the desired size this.dummyNode.layout = new Rect(0, 0, size.width, size.height) // Delegate the updating of the button visualization to the node styles const nodeStyle = expanded ? this.expandedButtonStyle : this.collapsedButtonStyle const visual = nodeStyle.renderer .getVisualCreator(this.dummyNode, nodeStyle) .updateVisual(context, oldVisual) if (visual !== oldVisual) { // Add the commands for user interaction is a new visual was created CollapsibleNodeStyleDecoratorRenderer.addToggleExpansionStateCommand( visual, this.node, context ) } return visual } /** * @returns {!Size} */ getButtonSize() { return this.size } /** * This is implemented to override the base insets provider, which would add insets for the label. * @see Overrides {@link CollapsibleNodeStyleDecoratorRenderer#lookup} * @see Specified by {@link ILookup#lookup}. * @param {!Class} type * @returns {?object} */ lookup(type) { if (type === INodeInsetsProvider.$class) { // Return the implementation of the wrapped style directly const wrappedStyle = this.getWrappedStyle() return wrappedStyle.renderer.getContext(this.node, wrappedStyle).lookup(type) } return super.lookup(type) } }
{ "pile_set_name": "Github" }
/* * Copyright 2016 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * * Authors: AMD * */ #include "dc.h" #include "reg_helper.h" #include "dcn10_dpp.h" #include "dcn10_cm_common.h" #include "custom_float.h" #define REG(reg) reg #define CTX \ ctx #undef FN #define FN(reg_name, field_name) \ reg->shifts.field_name, reg->masks.field_name void cm_helper_program_color_matrices( struct dc_context *ctx, const uint16_t *regval, const struct color_matrices_reg *reg) { uint32_t cur_csc_reg; unsigned int i = 0; for (cur_csc_reg = reg->csc_c11_c12; cur_csc_reg <= reg->csc_c33_c34; cur_csc_reg++) { const uint16_t *regval0 = &(regval[2 * i]); const uint16_t *regval1 = &(regval[(2 * i) + 1]); REG_SET_2(cur_csc_reg, 0, csc_c11, *regval0, csc_c12, *regval1); i++; } } void cm_helper_program_xfer_func( struct dc_context *ctx, const struct pwl_params *params, const struct xfer_func_reg *reg) { uint32_t reg_region_cur; unsigned int i = 0; REG_SET_2(reg->start_cntl_b, 0, exp_region_start, params->arr_points[0].custom_float_x, exp_resion_start_segment, 0); REG_SET_2(reg->start_cntl_g, 0, exp_region_start, params->arr_points[0].custom_float_x, exp_resion_start_segment, 0); REG_SET_2(reg->start_cntl_r, 0, exp_region_start, params->arr_points[0].custom_float_x, exp_resion_start_segment, 0); REG_SET(reg->start_slope_cntl_b, 0, field_region_linear_slope, params->arr_points[0].custom_float_slope); REG_SET(reg->start_slope_cntl_g, 0, field_region_linear_slope, params->arr_points[0].custom_float_slope); REG_SET(reg->start_slope_cntl_r, 0, field_region_linear_slope, params->arr_points[0].custom_float_slope); REG_SET(reg->start_end_cntl1_b, 0, field_region_end, params->arr_points[1].custom_float_x); REG_SET_2(reg->start_end_cntl2_b, 0, field_region_end_slope, params->arr_points[1].custom_float_slope, field_region_end_base, params->arr_points[1].custom_float_y); REG_SET(reg->start_end_cntl1_g, 0, field_region_end, params->arr_points[1].custom_float_x); REG_SET_2(reg->start_end_cntl2_g, 0, field_region_end_slope, params->arr_points[1].custom_float_slope, field_region_end_base, params->arr_points[1].custom_float_y); REG_SET(reg->start_end_cntl1_r, 0, field_region_end, params->arr_points[1].custom_float_x); REG_SET_2(reg->start_end_cntl2_r, 0, field_region_end_slope, params->arr_points[1].custom_float_slope, field_region_end_base, params->arr_points[1].custom_float_y); for (reg_region_cur = reg->region_start; reg_region_cur <= reg->region_end; reg_region_cur++) { const struct gamma_curve *curve0 = &(params->arr_curve_points[2 * i]); const struct gamma_curve *curve1 = &(params->arr_curve_points[(2 * i) + 1]); REG_SET_4(reg_region_cur, 0, exp_region0_lut_offset, curve0->offset, exp_region0_num_segments, curve0->segments_num, exp_region1_lut_offset, curve1->offset, exp_region1_num_segments, curve1->segments_num); i++; } } bool cm_helper_convert_to_custom_float( struct pwl_result_data *rgb_resulted, struct curve_points *arr_points, uint32_t hw_points_num, bool fixpoint) { struct custom_float_format fmt; struct pwl_result_data *rgb = rgb_resulted; uint32_t i = 0; fmt.exponenta_bits = 6; fmt.mantissa_bits = 12; fmt.sign = false; if (!convert_to_custom_float_format(arr_points[0].x, &fmt, &arr_points[0].custom_float_x)) { BREAK_TO_DEBUGGER(); return false; } if (!convert_to_custom_float_format(arr_points[0].offset, &fmt, &arr_points[0].custom_float_offset)) { BREAK_TO_DEBUGGER(); return false; } if (!convert_to_custom_float_format(arr_points[0].slope, &fmt, &arr_points[0].custom_float_slope)) { BREAK_TO_DEBUGGER(); return false; } fmt.mantissa_bits = 10; fmt.sign = false; if (!convert_to_custom_float_format(arr_points[1].x, &fmt, &arr_points[1].custom_float_x)) { BREAK_TO_DEBUGGER(); return false; } if (fixpoint == true) arr_points[1].custom_float_y = dc_fixpt_clamp_u0d14(arr_points[1].y); else if (!convert_to_custom_float_format(arr_points[1].y, &fmt, &arr_points[1].custom_float_y)) { BREAK_TO_DEBUGGER(); return false; } if (!convert_to_custom_float_format(arr_points[1].slope, &fmt, &arr_points[1].custom_float_slope)) { BREAK_TO_DEBUGGER(); return false; } if (hw_points_num == 0 || rgb_resulted == NULL || fixpoint == true) return true; fmt.mantissa_bits = 12; fmt.sign = true; while (i != hw_points_num) { if (!convert_to_custom_float_format(rgb->red, &fmt, &rgb->red_reg)) { BREAK_TO_DEBUGGER(); return false; } if (!convert_to_custom_float_format(rgb->green, &fmt, &rgb->green_reg)) { BREAK_TO_DEBUGGER(); return false; } if (!convert_to_custom_float_format(rgb->blue, &fmt, &rgb->blue_reg)) { BREAK_TO_DEBUGGER(); return false; } if (!convert_to_custom_float_format(rgb->delta_red, &fmt, &rgb->delta_red_reg)) { BREAK_TO_DEBUGGER(); return false; } if (!convert_to_custom_float_format(rgb->delta_green, &fmt, &rgb->delta_green_reg)) { BREAK_TO_DEBUGGER(); return false; } if (!convert_to_custom_float_format(rgb->delta_blue, &fmt, &rgb->delta_blue_reg)) { BREAK_TO_DEBUGGER(); return false; } ++rgb; ++i; } return true; } /* driver uses 32 regions or less, but DCN HW has 34, extra 2 are set to 0 */ #define MAX_REGIONS_NUMBER 34 #define MAX_LOW_POINT 25 #define NUMBER_REGIONS 32 #define NUMBER_SW_SEGMENTS 16 bool cm_helper_translate_curve_to_hw_format( const struct dc_transfer_func *output_tf, struct pwl_params *lut_params, bool fixpoint) { struct curve_points *arr_points; struct pwl_result_data *rgb_resulted; struct pwl_result_data *rgb; struct pwl_result_data *rgb_plus_1; struct fixed31_32 y_r; struct fixed31_32 y_g; struct fixed31_32 y_b; struct fixed31_32 y1_min; struct fixed31_32 y3_max; int32_t region_start, region_end; int32_t i; uint32_t j, k, seg_distr[MAX_REGIONS_NUMBER], increment, start_index, hw_points; if (output_tf == NULL || lut_params == NULL || output_tf->type == TF_TYPE_BYPASS) return false; PERF_TRACE(); arr_points = lut_params->arr_points; rgb_resulted = lut_params->rgb_resulted; hw_points = 0; memset(lut_params, 0, sizeof(struct pwl_params)); memset(seg_distr, 0, sizeof(seg_distr)); if (output_tf->tf == TRANSFER_FUNCTION_PQ) { /* 32 segments * segments are from 2^-25 to 2^7 */ for (i = 0; i < NUMBER_REGIONS ; i++) seg_distr[i] = 3; region_start = -MAX_LOW_POINT; region_end = NUMBER_REGIONS - MAX_LOW_POINT; } else { /* 10 segments * segment is from 2^-10 to 2^0 * There are less than 256 points, for optimization */ seg_distr[0] = 3; seg_distr[1] = 4; seg_distr[2] = 4; seg_distr[3] = 4; seg_distr[4] = 4; seg_distr[5] = 4; seg_distr[6] = 4; seg_distr[7] = 4; seg_distr[8] = 4; seg_distr[9] = 4; region_start = -10; region_end = 0; } for (i = region_end - region_start; i < MAX_REGIONS_NUMBER ; i++) seg_distr[i] = -1; for (k = 0; k < MAX_REGIONS_NUMBER; k++) { if (seg_distr[k] != -1) hw_points += (1 << seg_distr[k]); } j = 0; for (k = 0; k < (region_end - region_start); k++) { increment = NUMBER_SW_SEGMENTS / (1 << seg_distr[k]); start_index = (region_start + k + MAX_LOW_POINT) * NUMBER_SW_SEGMENTS; for (i = start_index; i < start_index + NUMBER_SW_SEGMENTS; i += increment) { if (j == hw_points - 1) break; rgb_resulted[j].red = output_tf->tf_pts.red[i]; rgb_resulted[j].green = output_tf->tf_pts.green[i]; rgb_resulted[j].blue = output_tf->tf_pts.blue[i]; j++; } } /* last point */ start_index = (region_end + MAX_LOW_POINT) * NUMBER_SW_SEGMENTS; rgb_resulted[hw_points - 1].red = output_tf->tf_pts.red[start_index]; rgb_resulted[hw_points - 1].green = output_tf->tf_pts.green[start_index]; rgb_resulted[hw_points - 1].blue = output_tf->tf_pts.blue[start_index]; arr_points[0].x = dc_fixpt_pow(dc_fixpt_from_int(2), dc_fixpt_from_int(region_start)); arr_points[1].x = dc_fixpt_pow(dc_fixpt_from_int(2), dc_fixpt_from_int(region_end)); y_r = rgb_resulted[0].red; y_g = rgb_resulted[0].green; y_b = rgb_resulted[0].blue; y1_min = dc_fixpt_min(y_r, dc_fixpt_min(y_g, y_b)); arr_points[0].y = y1_min; arr_points[0].slope = dc_fixpt_div(arr_points[0].y, arr_points[0].x); y_r = rgb_resulted[hw_points - 1].red; y_g = rgb_resulted[hw_points - 1].green; y_b = rgb_resulted[hw_points - 1].blue; /* see comment above, m_arrPoints[1].y should be the Y value for the * region end (m_numOfHwPoints), not last HW point(m_numOfHwPoints - 1) */ y3_max = dc_fixpt_max(y_r, dc_fixpt_max(y_g, y_b)); arr_points[1].y = y3_max; arr_points[1].slope = dc_fixpt_zero; if (output_tf->tf == TRANSFER_FUNCTION_PQ) { /* for PQ, we want to have a straight line from last HW X point, * and the slope to be such that we hit 1.0 at 10000 nits. */ const struct fixed31_32 end_value = dc_fixpt_from_int(125); arr_points[1].slope = dc_fixpt_div( dc_fixpt_sub(dc_fixpt_one, arr_points[1].y), dc_fixpt_sub(end_value, arr_points[1].x)); } lut_params->hw_points_num = hw_points; k = 0; for (i = 1; i < MAX_REGIONS_NUMBER; i++) { if (seg_distr[k] != -1) { lut_params->arr_curve_points[k].segments_num = seg_distr[k]; lut_params->arr_curve_points[i].offset = lut_params->arr_curve_points[k].offset + (1 << seg_distr[k]); } k++; } if (seg_distr[k] != -1) lut_params->arr_curve_points[k].segments_num = seg_distr[k]; rgb = rgb_resulted; rgb_plus_1 = rgb_resulted + 1; i = 1; while (i != hw_points + 1) { if (dc_fixpt_lt(rgb_plus_1->red, rgb->red)) rgb_plus_1->red = rgb->red; if (dc_fixpt_lt(rgb_plus_1->green, rgb->green)) rgb_plus_1->green = rgb->green; if (dc_fixpt_lt(rgb_plus_1->blue, rgb->blue)) rgb_plus_1->blue = rgb->blue; rgb->delta_red = dc_fixpt_sub(rgb_plus_1->red, rgb->red); rgb->delta_green = dc_fixpt_sub(rgb_plus_1->green, rgb->green); rgb->delta_blue = dc_fixpt_sub(rgb_plus_1->blue, rgb->blue); if (fixpoint == true) { rgb->delta_red_reg = dc_fixpt_clamp_u0d10(rgb->delta_red); rgb->delta_green_reg = dc_fixpt_clamp_u0d10(rgb->delta_green); rgb->delta_blue_reg = dc_fixpt_clamp_u0d10(rgb->delta_blue); rgb->red_reg = dc_fixpt_clamp_u0d14(rgb->red); rgb->green_reg = dc_fixpt_clamp_u0d14(rgb->green); rgb->blue_reg = dc_fixpt_clamp_u0d14(rgb->blue); } ++rgb_plus_1; ++rgb; ++i; } cm_helper_convert_to_custom_float(rgb_resulted, lut_params->arr_points, hw_points, fixpoint); return true; } #define NUM_DEGAMMA_REGIONS 12 bool cm_helper_translate_curve_to_degamma_hw_format( const struct dc_transfer_func *output_tf, struct pwl_params *lut_params) { struct curve_points *arr_points; struct pwl_result_data *rgb_resulted; struct pwl_result_data *rgb; struct pwl_result_data *rgb_plus_1; struct fixed31_32 y_r; struct fixed31_32 y_g; struct fixed31_32 y_b; struct fixed31_32 y1_min; struct fixed31_32 y3_max; int32_t region_start, region_end; int32_t i; uint32_t j, k, seg_distr[MAX_REGIONS_NUMBER], increment, start_index, hw_points; if (output_tf == NULL || lut_params == NULL || output_tf->type == TF_TYPE_BYPASS) return false; PERF_TRACE(); arr_points = lut_params->arr_points; rgb_resulted = lut_params->rgb_resulted; hw_points = 0; memset(lut_params, 0, sizeof(struct pwl_params)); memset(seg_distr, 0, sizeof(seg_distr)); region_start = -NUM_DEGAMMA_REGIONS; region_end = 0; for (i = region_end - region_start; i < MAX_REGIONS_NUMBER ; i++) seg_distr[i] = -1; /* 12 segments * segments are from 2^-12 to 0 */ for (i = 0; i < NUM_DEGAMMA_REGIONS ; i++) seg_distr[i] = 4; for (k = 0; k < MAX_REGIONS_NUMBER; k++) { if (seg_distr[k] != -1) hw_points += (1 << seg_distr[k]); } j = 0; for (k = 0; k < (region_end - region_start); k++) { increment = NUMBER_SW_SEGMENTS / (1 << seg_distr[k]); start_index = (region_start + k + MAX_LOW_POINT) * NUMBER_SW_SEGMENTS; for (i = start_index; i < start_index + NUMBER_SW_SEGMENTS; i += increment) { if (j == hw_points - 1) break; rgb_resulted[j].red = output_tf->tf_pts.red[i]; rgb_resulted[j].green = output_tf->tf_pts.green[i]; rgb_resulted[j].blue = output_tf->tf_pts.blue[i]; j++; } } /* last point */ start_index = (region_end + MAX_LOW_POINT) * NUMBER_SW_SEGMENTS; rgb_resulted[hw_points - 1].red = output_tf->tf_pts.red[start_index]; rgb_resulted[hw_points - 1].green = output_tf->tf_pts.green[start_index]; rgb_resulted[hw_points - 1].blue = output_tf->tf_pts.blue[start_index]; arr_points[0].x = dc_fixpt_pow(dc_fixpt_from_int(2), dc_fixpt_from_int(region_start)); arr_points[1].x = dc_fixpt_pow(dc_fixpt_from_int(2), dc_fixpt_from_int(region_end)); y_r = rgb_resulted[0].red; y_g = rgb_resulted[0].green; y_b = rgb_resulted[0].blue; y1_min = dc_fixpt_min(y_r, dc_fixpt_min(y_g, y_b)); arr_points[0].y = y1_min; arr_points[0].slope = dc_fixpt_div(arr_points[0].y, arr_points[0].x); y_r = rgb_resulted[hw_points - 1].red; y_g = rgb_resulted[hw_points - 1].green; y_b = rgb_resulted[hw_points - 1].blue; /* see comment above, m_arrPoints[1].y should be the Y value for the * region end (m_numOfHwPoints), not last HW point(m_numOfHwPoints - 1) */ y3_max = dc_fixpt_max(y_r, dc_fixpt_max(y_g, y_b)); arr_points[1].y = y3_max; arr_points[1].slope = dc_fixpt_zero; if (output_tf->tf == TRANSFER_FUNCTION_PQ) { /* for PQ, we want to have a straight line from last HW X point, * and the slope to be such that we hit 1.0 at 10000 nits. */ const struct fixed31_32 end_value = dc_fixpt_from_int(125); arr_points[1].slope = dc_fixpt_div( dc_fixpt_sub(dc_fixpt_one, arr_points[1].y), dc_fixpt_sub(end_value, arr_points[1].x)); } lut_params->hw_points_num = hw_points; k = 0; for (i = 1; i < MAX_REGIONS_NUMBER; i++) { if (seg_distr[k] != -1) { lut_params->arr_curve_points[k].segments_num = seg_distr[k]; lut_params->arr_curve_points[i].offset = lut_params->arr_curve_points[k].offset + (1 << seg_distr[k]); } k++; } if (seg_distr[k] != -1) lut_params->arr_curve_points[k].segments_num = seg_distr[k]; rgb = rgb_resulted; rgb_plus_1 = rgb_resulted + 1; i = 1; while (i != hw_points + 1) { if (dc_fixpt_lt(rgb_plus_1->red, rgb->red)) rgb_plus_1->red = rgb->red; if (dc_fixpt_lt(rgb_plus_1->green, rgb->green)) rgb_plus_1->green = rgb->green; if (dc_fixpt_lt(rgb_plus_1->blue, rgb->blue)) rgb_plus_1->blue = rgb->blue; rgb->delta_red = dc_fixpt_sub(rgb_plus_1->red, rgb->red); rgb->delta_green = dc_fixpt_sub(rgb_plus_1->green, rgb->green); rgb->delta_blue = dc_fixpt_sub(rgb_plus_1->blue, rgb->blue); ++rgb_plus_1; ++rgb; ++i; } cm_helper_convert_to_custom_float(rgb_resulted, lut_params->arr_points, hw_points, false); return true; }
{ "pile_set_name": "Github" }
.com { color: #93a1a1; } .lit { color: #195f91; } .pun, .opn, .clo { color: #93a1a1; } .fun { color: #dc322f; } .str, .atv { color: #D14; } .kwd, .prettyprint .tag { color: #1e347b; } .typ, .atn, .dec, .var { color: teal; } .pln { color: #48484c; } .prettyprint { padding: 8px; background-color: #f7f7f9; border: 1px solid #e1e1e8; } .prettyprint.linenums { -webkit-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; -moz-box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; box-shadow: inset 40px 0 0 #fbfbfc, inset 41px 0 0 #ececf0; } /* Specify class=linenums on a pre to get line numbering */ ol.linenums { margin: 0 0 0 33px; /* IE indents via margin-left */ } ol.linenums li { padding-left: 12px; color: #bebec5; line-height: 20px; text-shadow: 0 1px 0 #fff; }
{ "pile_set_name": "Github" }
// // _ _ ______ _ _ _ _ _ _ _ // | \ | | | ____| | (_) | (_) | | | | // | \| | ___ | |__ __| |_| |_ _ _ __ __ _| | | | // | . ` |/ _ \ | __| / _` | | __| | '_ \ / _` | | | | // | |\ | (_) | | |___| (_| | | |_| | | | | (_| |_|_|_| // |_| \_|\___/ |______\__,_|_|\__|_|_| |_|\__, (_|_|_) // __/ | // |___/ // // This file is auto-generated. Do not edit manually // // Copyright 2013 Automatak LLC // // Automatak LLC (www.automatak.com) licenses this file // to you under the the Apache License Version 2.0 (the "License"): // // http://www.apache.org/licenses/LICENSE-2.0.html // package com.automatak.dnp3.enums; /** */ public enum StaticDoubleBinaryVariation { Group3Var2(0); private final int id; public int toType() { return id; } StaticDoubleBinaryVariation(int id) { this.id = id; } public static StaticDoubleBinaryVariation fromType(int arg) { switch(arg) { case(0): return Group3Var2; default: return Group3Var2; } } }
{ "pile_set_name": "Github" }
# Event 4 - task_0 ###### Version: 0 ## Description None ## Data Dictionary |Standard Name|Field Name|Type|Description|Sample Value| |---|---|---|---|---| |TBD|Message|UnicodeString|None|`None`| ## Tags * etw_level_Always * etw_keywords_critical * etw_task_task_0
{ "pile_set_name": "Github" }
/* * not type checking this file because flow doesn't play well with * dynamically accessing methods on Array prototype */ import { def } from '../util/index' const arrayProto = Array.prototype export const arrayMethods = Object.create(arrayProto) const methodsToPatch = [ 'push', 'pop', 'shift', 'unshift', 'splice', 'sort', 'reverse' ] /** * Intercept mutating methods and emit events */ methodsToPatch.forEach(function (method) { // cache original method const original = arrayProto[method] def(arrayMethods, method, function mutator (...args) { const result = original.apply(this, args) const ob = this.__ob__ let inserted switch (method) { case 'push': case 'unshift': inserted = args break case 'splice': inserted = args.slice(2) break } if (inserted) ob.observeArray(inserted) // notify change ob.dep.notify() return result }) })
{ "pile_set_name": "Github" }
<?xml version="1.0" ?> <pvx> <Process Type="server"> <!-- Two screen configuration Left and right (YAY) --> <Machine Name="Right" LowerLeft="-2 -1 -2" LowerRight="0 -1 -2" UpperRight="0 1 -2" /> <Machine Name="Left" LowerLeft="0 -1 -2" LowerRight="2 -1 -2" UpperRight="2 1 -2" /> </Process> </pvx>
{ "pile_set_name": "Github" }
//===- llvm/CodeGen/MachineModuleInfoImpls.cpp ----------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file implements object-file format specific implementations of // MachineModuleInfoImpl. // //===----------------------------------------------------------------------===// #include "llvm/CodeGen/MachineModuleInfoImpls.h" #include "llvm/ADT/DenseMap.h" #include "llvm/MC/MCSymbol.h" using namespace llvm; //===----------------------------------------------------------------------===// // MachineModuleInfoMachO //===----------------------------------------------------------------------===// // Out of line virtual method. void MachineModuleInfoMachO::anchor() {} void MachineModuleInfoELF::anchor() {} void MachineModuleInfoCOFF::anchor() {} using PairTy = std::pair<MCSymbol *, MachineModuleInfoImpl::StubValueTy>; static int SortSymbolPair(const PairTy *LHS, const PairTy *RHS) { return LHS->first->getName().compare(RHS->first->getName()); } MachineModuleInfoImpl::SymbolListTy MachineModuleInfoImpl::getSortedStubs( DenseMap<MCSymbol *, MachineModuleInfoImpl::StubValueTy> &Map) { MachineModuleInfoImpl::SymbolListTy List(Map.begin(), Map.end()); array_pod_sort(List.begin(), List.end(), SortSymbolPair); Map.clear(); return List; }
{ "pile_set_name": "Github" }
fileFormatVersion: 2 guid: 545cb2cb1ce369541b6233c3cbcc1e15 timeCreated: 1488359254 licenseType: Store ModelImporter: serializedVersion: 18 fileIDToRecycleName: 100000: //RootNode 400000: //RootNode 2300000: //RootNode 3300000: //RootNode 4300000: Tarp_flat:object_1 9500000: //RootNode materials: importMaterials: 1 materialName: 0 materialSearch: 1 animations: legacyGenerateAnimations: 4 bakeSimulation: 0 optimizeGameObjects: 0 motionNodeName: animationCompression: 1 animationRotationError: .5 animationPositionError: .5 animationScaleError: .5 animationWrapMode: 0 extraExposedTransformPaths: [] clipAnimations: [] isReadable: 1 meshes: lODScreenPercentages: [] globalScale: 1 meshCompression: 0 addColliders: 0 importBlendShapes: 1 swapUVChannels: 0 generateSecondaryUV: 0 useFileUnits: 1 optimizeMeshForGPU: 1 keepQuads: 0 weldVertices: 1 secondaryUVAngleDistortion: 8 secondaryUVAreaDistortion: 15.000001 secondaryUVHardAngle: 88 secondaryUVPackMargin: 4 useFileScale: 1 tangentSpace: normalSmoothAngle: 60 splitTangentsAcrossUV: 1 normalImportMode: 0 tangentImportMode: 1 importAnimation: 1 copyAvatar: 0 humanDescription: human: [] skeleton: [] armTwist: .5 foreArmTwist: .5 upperLegTwist: .5 legTwist: .5 armStretch: .0500000007 legStretch: .0500000007 feetSpacing: 0 rootMotionBoneName: lastHumanDescriptionAvatarSource: {instanceID: 0} animationType: 0 additionalBone: 0 userData: assetBundleName: assetBundleVariant:
{ "pile_set_name": "Github" }
/* * Freescale i.MX28 BCH Register Definitions * * Copyright (C) 2011 Marek Vasut <[email protected]> * on behalf of DENX Software Engineering GmbH * * Based on code from LTIB: * Copyright 2008-2010 Freescale Semiconductor, Inc. All Rights Reserved. * * SPDX-License-Identifier: GPL-2.0+ */ #ifndef __MX28_REGS_BCH_H__ #define __MX28_REGS_BCH_H__ #include <asm/imx-common/regs-common.h> #ifndef __ASSEMBLY__ struct mxs_bch_regs { mxs_reg_32(hw_bch_ctrl) mxs_reg_32(hw_bch_status0) mxs_reg_32(hw_bch_mode) mxs_reg_32(hw_bch_encodeptr) mxs_reg_32(hw_bch_dataptr) mxs_reg_32(hw_bch_metaptr) uint32_t reserved[4]; mxs_reg_32(hw_bch_layoutselect) mxs_reg_32(hw_bch_flash0layout0) mxs_reg_32(hw_bch_flash0layout1) mxs_reg_32(hw_bch_flash1layout0) mxs_reg_32(hw_bch_flash1layout1) mxs_reg_32(hw_bch_flash2layout0) mxs_reg_32(hw_bch_flash2layout1) mxs_reg_32(hw_bch_flash3layout0) mxs_reg_32(hw_bch_flash3layout1) mxs_reg_32(hw_bch_dbgkesread) mxs_reg_32(hw_bch_dbgcsferead) mxs_reg_32(hw_bch_dbgsyndegread) mxs_reg_32(hw_bch_dbgahbmread) mxs_reg_32(hw_bch_blockname) mxs_reg_32(hw_bch_version) }; #endif #define BCH_CTRL_SFTRST (1 << 31) #define BCH_CTRL_CLKGATE (1 << 30) #define BCH_CTRL_DEBUGSYNDROME (1 << 22) #define BCH_CTRL_M2M_LAYOUT_MASK (0x3 << 18) #define BCH_CTRL_M2M_LAYOUT_OFFSET 18 #define BCH_CTRL_M2M_ENCODE (1 << 17) #define BCH_CTRL_M2M_ENABLE (1 << 16) #define BCH_CTRL_DEBUG_STALL_IRQ_EN (1 << 10) #define BCH_CTRL_COMPLETE_IRQ_EN (1 << 8) #define BCH_CTRL_BM_ERROR_IRQ (1 << 3) #define BCH_CTRL_DEBUG_STALL_IRQ (1 << 2) #define BCH_CTRL_COMPLETE_IRQ (1 << 0) #define BCH_STATUS0_HANDLE_MASK (0xfff << 20) #define BCH_STATUS0_HANDLE_OFFSET 20 #define BCH_STATUS0_COMPLETED_CE_MASK (0xf << 16) #define BCH_STATUS0_COMPLETED_CE_OFFSET 16 #define BCH_STATUS0_STATUS_BLK0_MASK (0xff << 8) #define BCH_STATUS0_STATUS_BLK0_OFFSET 8 #define BCH_STATUS0_STATUS_BLK0_ZERO (0x00 << 8) #define BCH_STATUS0_STATUS_BLK0_ERROR1 (0x01 << 8) #define BCH_STATUS0_STATUS_BLK0_ERROR2 (0x02 << 8) #define BCH_STATUS0_STATUS_BLK0_ERROR3 (0x03 << 8) #define BCH_STATUS0_STATUS_BLK0_ERROR4 (0x04 << 8) #define BCH_STATUS0_STATUS_BLK0_UNCORRECTABLE (0xfe << 8) #define BCH_STATUS0_STATUS_BLK0_ERASED (0xff << 8) #define BCH_STATUS0_ALLONES (1 << 4) #define BCH_STATUS0_CORRECTED (1 << 3) #define BCH_STATUS0_UNCORRECTABLE (1 << 2) #define BCH_MODE_ERASE_THRESHOLD_MASK 0xff #define BCH_MODE_ERASE_THRESHOLD_OFFSET 0 #define BCH_ENCODEPTR_ADDR_MASK 0xffffffff #define BCH_ENCODEPTR_ADDR_OFFSET 0 #define BCH_DATAPTR_ADDR_MASK 0xffffffff #define BCH_DATAPTR_ADDR_OFFSET 0 #define BCH_METAPTR_ADDR_MASK 0xffffffff #define BCH_METAPTR_ADDR_OFFSET 0 #define BCH_LAYOUTSELECT_CS15_SELECT_MASK (0x3 << 30) #define BCH_LAYOUTSELECT_CS15_SELECT_OFFSET 30 #define BCH_LAYOUTSELECT_CS14_SELECT_MASK (0x3 << 28) #define BCH_LAYOUTSELECT_CS14_SELECT_OFFSET 28 #define BCH_LAYOUTSELECT_CS13_SELECT_MASK (0x3 << 26) #define BCH_LAYOUTSELECT_CS13_SELECT_OFFSET 26 #define BCH_LAYOUTSELECT_CS12_SELECT_MASK (0x3 << 24) #define BCH_LAYOUTSELECT_CS12_SELECT_OFFSET 24 #define BCH_LAYOUTSELECT_CS11_SELECT_MASK (0x3 << 22) #define BCH_LAYOUTSELECT_CS11_SELECT_OFFSET 22 #define BCH_LAYOUTSELECT_CS10_SELECT_MASK (0x3 << 20) #define BCH_LAYOUTSELECT_CS10_SELECT_OFFSET 20 #define BCH_LAYOUTSELECT_CS9_SELECT_MASK (0x3 << 18) #define BCH_LAYOUTSELECT_CS9_SELECT_OFFSET 18 #define BCH_LAYOUTSELECT_CS8_SELECT_MASK (0x3 << 16) #define BCH_LAYOUTSELECT_CS8_SELECT_OFFSET 16 #define BCH_LAYOUTSELECT_CS7_SELECT_MASK (0x3 << 14) #define BCH_LAYOUTSELECT_CS7_SELECT_OFFSET 14 #define BCH_LAYOUTSELECT_CS6_SELECT_MASK (0x3 << 12) #define BCH_LAYOUTSELECT_CS6_SELECT_OFFSET 12 #define BCH_LAYOUTSELECT_CS5_SELECT_MASK (0x3 << 10) #define BCH_LAYOUTSELECT_CS5_SELECT_OFFSET 10 #define BCH_LAYOUTSELECT_CS4_SELECT_MASK (0x3 << 8) #define BCH_LAYOUTSELECT_CS4_SELECT_OFFSET 8 #define BCH_LAYOUTSELECT_CS3_SELECT_MASK (0x3 << 6) #define BCH_LAYOUTSELECT_CS3_SELECT_OFFSET 6 #define BCH_LAYOUTSELECT_CS2_SELECT_MASK (0x3 << 4) #define BCH_LAYOUTSELECT_CS2_SELECT_OFFSET 4 #define BCH_LAYOUTSELECT_CS1_SELECT_MASK (0x3 << 2) #define BCH_LAYOUTSELECT_CS1_SELECT_OFFSET 2 #define BCH_LAYOUTSELECT_CS0_SELECT_MASK (0x3 << 0) #define BCH_LAYOUTSELECT_CS0_SELECT_OFFSET 0 #define BCH_FLASHLAYOUT0_NBLOCKS_MASK (0xff << 24) #define BCH_FLASHLAYOUT0_NBLOCKS_OFFSET 24 #define BCH_FLASHLAYOUT0_META_SIZE_MASK (0xff << 16) #define BCH_FLASHLAYOUT0_META_SIZE_OFFSET 16 #if defined(CONFIG_MX6) #define BCH_FLASHLAYOUT0_ECC0_MASK (0x1f << 11) #define BCH_FLASHLAYOUT0_ECC0_OFFSET 11 #else #define BCH_FLASHLAYOUT0_ECC0_MASK (0xf << 12) #define BCH_FLASHLAYOUT0_ECC0_OFFSET 12 #endif #define BCH_FLASHLAYOUT0_ECC0_NONE (0x0 << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC2 (0x1 << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC4 (0x2 << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC6 (0x3 << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC8 (0x4 << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC10 (0x5 << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC12 (0x6 << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC14 (0x7 << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC16 (0x8 << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC18 (0x9 << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC20 (0xa << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC22 (0xb << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC24 (0xc << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC26 (0xd << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC28 (0xe << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC30 (0xf << 12) #define BCH_FLASHLAYOUT0_ECC0_ECC32 (0x10 << 12) #define BCH_FLASHLAYOUT0_GF13_0_GF14_1 (1 << 10) #define BCH_FLASHLAYOUT0_DATA0_SIZE_MASK 0xfff #define BCH_FLASHLAYOUT0_DATA0_SIZE_OFFSET 0 #define BCH_FLASHLAYOUT1_PAGE_SIZE_MASK (0xffff << 16) #define BCH_FLASHLAYOUT1_PAGE_SIZE_OFFSET 16 #if defined(CONFIG_MX6) #define BCH_FLASHLAYOUT1_ECCN_MASK (0x1f << 11) #define BCH_FLASHLAYOUT1_ECCN_OFFSET 11 #else #define BCH_FLASHLAYOUT1_ECCN_MASK (0xf << 12) #define BCH_FLASHLAYOUT1_ECCN_OFFSET 12 #endif #define BCH_FLASHLAYOUT1_ECCN_NONE (0x0 << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC2 (0x1 << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC4 (0x2 << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC6 (0x3 << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC8 (0x4 << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC10 (0x5 << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC12 (0x6 << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC14 (0x7 << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC16 (0x8 << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC18 (0x9 << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC20 (0xa << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC22 (0xb << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC24 (0xc << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC26 (0xd << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC28 (0xe << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC30 (0xf << 12) #define BCH_FLASHLAYOUT1_ECCN_ECC32 (0x10 << 12) #define BCH_FLASHLAYOUT1_GF13_0_GF14_1 (1 << 10) #define BCH_FLASHLAYOUT1_DATAN_SIZE_MASK 0xfff #define BCH_FLASHLAYOUT1_DATAN_SIZE_OFFSET 0 #define BCH_DEBUG0_RSVD1_MASK (0x1f << 27) #define BCH_DEBUG0_RSVD1_OFFSET 27 #define BCH_DEBUG0_ROM_BIST_ENABLE (1 << 26) #define BCH_DEBUG0_ROM_BIST_COMPLETE (1 << 25) #define BCH_DEBUG0_KES_DEBUG_SYNDROME_SYMBOL_MASK (0x1ff << 16) #define BCH_DEBUG0_KES_DEBUG_SYNDROME_SYMBOL_OFFSET 16 #define BCH_DEBUG0_KES_DEBUG_SYNDROME_SYMBOL_NORMAL (0x0 << 16) #define BCH_DEBUG0_KES_DEBUG_SYNDROME_SYMBOL_TEST_MODE (0x1 << 16) #define BCH_DEBUG0_KES_DEBUG_SHIFT_SYND (1 << 15) #define BCH_DEBUG0_KES_DEBUG_PAYLOAD_FLAG (1 << 14) #define BCH_DEBUG0_KES_DEBUG_MODE4K (1 << 13) #define BCH_DEBUG0_KES_DEBUG_KICK (1 << 12) #define BCH_DEBUG0_KES_STANDALONE (1 << 11) #define BCH_DEBUG0_KES_DEBUG_STEP (1 << 10) #define BCH_DEBUG0_KES_DEBUG_STALL (1 << 9) #define BCH_DEBUG0_BM_KES_TEST_BYPASS (1 << 8) #define BCH_DEBUG0_RSVD0_MASK (0x3 << 6) #define BCH_DEBUG0_RSVD0_OFFSET 6 #define BCH_DEBUG0_DEBUG_REG_SELECT_MASK 0x3f #define BCH_DEBUG0_DEBUG_REG_SELECT_OFFSET 0 #define BCH_DBGKESREAD_VALUES_MASK 0xffffffff #define BCH_DBGKESREAD_VALUES_OFFSET 0 #define BCH_DBGCSFEREAD_VALUES_MASK 0xffffffff #define BCH_DBGCSFEREAD_VALUES_OFFSET 0 #define BCH_DBGSYNDGENREAD_VALUES_MASK 0xffffffff #define BCH_DBGSYNDGENREAD_VALUES_OFFSET 0 #define BCH_DBGAHBMREAD_VALUES_MASK 0xffffffff #define BCH_DBGAHBMREAD_VALUES_OFFSET 0 #define BCH_BLOCKNAME_NAME_MASK 0xffffffff #define BCH_BLOCKNAME_NAME_OFFSET 0 #define BCH_VERSION_MAJOR_MASK (0xff << 24) #define BCH_VERSION_MAJOR_OFFSET 24 #define BCH_VERSION_MINOR_MASK (0xff << 16) #define BCH_VERSION_MINOR_OFFSET 16 #define BCH_VERSION_STEP_MASK 0xffff #define BCH_VERSION_STEP_OFFSET 0 #endif /* __MX28_REGS_BCH_H__ */
{ "pile_set_name": "Github" }
--- dims: created_on: 2008-08-11 17:02:21.413658 Z title: "Hosts - Installed Patches" conditions: !ruby/object:MiqExpression exp: FIND: search: IS NOT EMPTY: field: Host.patches-name checkall: IS NOT EMPTY: field: Host.patches-vendor updated_on: 2008-08-12 21:57:04.320822 Z order: Ascending graph: menu_name: "Host Patches" rpt_group: Custom priority: col_order: - name - patches.name - patches.description - patches.v_install_date timeline: id: 72 file_mtime: categories: rpt_type: Custom filename: include: patches: columns: - name - description - v_install_date db: Host cols: - name template_type: report group: c sortby: - name - patches.name headers: - Name - Patch Name - Patch Description - Patch Installed On
{ "pile_set_name": "Github" }
{ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "dist/out-tsc/test-browser", "baseUrl": "src/" }, "files": [ "src/browser/polyfills.ts", "test/test-browser.ts" ], "include": [ "test/", "**/*.d.ts", "src/browser/**/*.spec.ts", "src/libs/", "src/cores/" ] }
{ "pile_set_name": "Github" }
#!/bin/bash source /tmp/chroot-functions.sh echo "Double checking everything is fresh and happy." run_merge -uDN --with-bdeps=y world echo "Setting the default Python interpreter to Python 2." eselect python set python2.7
{ "pile_set_name": "Github" }
#-*-Makefile-*- vim:syntax=make TARGET = shimmer MSP_BSL ?= tos-bsl MSP_BSL_FLAGS = --invert-test --invert-reset ifdef CC2420_CHANNEL PFLAGS += -DCC2420_DEF_CHANNEL=$(CC2420_CHANNEL) endif $(call TOSMake_include_platform,shimmer) $(call TOSMake_include_make_platform,msp) shimmer: $(BUILD_DEPS) @:
{ "pile_set_name": "Github" }
{ "expr": "Account.Order.Product[$lowercase(Description.Colour) = \"purple\"][0].Price", "dataset": "dataset5", "bindings": {}, "result": [ 34.45, 34.45 ] }
{ "pile_set_name": "Github" }
//////////////////////////////////////////////////////////// // // SFML - Simple and Fast Multimedia Library // Copyright (C) 2007-2020 Laurent Gomila ([email protected]) // // This software is provided 'as-is', without any express or implied warranty. // In no event will the authors be held liable for any damages arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it freely, // subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; // you must not claim that you wrote the original software. // If you use this software in a product, an acknowledgment // in the product documentation would be appreciated but is not required. // // 2. Altered source versions must be plainly marked as such, // and must not be misrepresented as being the original software. // // 3. This notice may not be removed or altered from any source distribution. // //////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////// // Headers //////////////////////////////////////////////////////////// #include <SFML/Audio/Listener.hpp> #include <SFML/Audio/AudioDevice.hpp> namespace sf { //////////////////////////////////////////////////////////// void Listener::setGlobalVolume(float volume) { priv::AudioDevice::setGlobalVolume(volume); } //////////////////////////////////////////////////////////// float Listener::getGlobalVolume() { return priv::AudioDevice::getGlobalVolume(); } //////////////////////////////////////////////////////////// void Listener::setPosition(float x, float y, float z) { setPosition(Vector3f(x, y, z)); } //////////////////////////////////////////////////////////// void Listener::setPosition(const Vector3f& position) { priv::AudioDevice::setPosition(position); } //////////////////////////////////////////////////////////// Vector3f Listener::getPosition() { return priv::AudioDevice::getPosition(); } //////////////////////////////////////////////////////////// void Listener::setDirection(float x, float y, float z) { setDirection(Vector3f(x, y, z)); } //////////////////////////////////////////////////////////// void Listener::setDirection(const Vector3f& direction) { priv::AudioDevice::setDirection(direction); } //////////////////////////////////////////////////////////// Vector3f Listener::getDirection() { return priv::AudioDevice::getDirection(); } //////////////////////////////////////////////////////////// void Listener::setUpVector(float x, float y, float z) { setUpVector(Vector3f(x, y, z)); } //////////////////////////////////////////////////////////// void Listener::setUpVector(const Vector3f& upVector) { priv::AudioDevice::setUpVector(upVector); } //////////////////////////////////////////////////////////// Vector3f Listener::getUpVector() { return priv::AudioDevice::getUpVector(); } } // namespace sf
{ "pile_set_name": "Github" }
@import "ui.js"; @import "utils.js"; @import "constants.js"; var buildAlertWindow = function(responsiveArtboards, retinaImages) { const alertWindow = COSAlertWindow.new(); alertWindow.addButtonWithTitle("OK"); alertWindow.addButtonWithTitle("Cancel"); alertWindow.setMessageText("Settings"); const accessoryView = NSView.alloc().initWithFrame(NSMakeRect(0, 0, 300, 140)); const responsiveArtboardsCheckbox = UI.buildCheckbox("Responsive artboards", responsiveArtboards, NSMakeRect(0, 120, 300, 20)); accessoryView.addSubview(responsiveArtboardsCheckbox); accessoryView.addSubview(UI.buildHint("Determines whether artboards will be exported to the same page if their names starts with the same text.", 12, NSMakeRect(0, 60, 300, 60))); const exportRetinaImagesCheckbox = UI.buildCheckbox("Export retina images", retinaImages, NSMakeRect(0, 40, 300, 20)); accessoryView.addSubview(exportRetinaImagesCheckbox); accessoryView.addSubview(UI.buildHint("Determines whether 2x images are exported along with 1x images.", 12, NSMakeRect(0, 0, 300, 40))); alertWindow.addAccessoryView(accessoryView); return [alertWindow, responsiveArtboardsCheckbox, exportRetinaImagesCheckbox]; }; var onRun = function(context) { const responsiveArtboards = Utils.valueForKeyOnDocument(Constants.RESPONSIVE_ARTBOARDS, context, 1) == 1; const retinaImages = Utils.valueForKeyOnDocument(Constants.RETINA_IMAGES, context, 1) == 1; const retVals = buildAlertWindow(responsiveArtboards, retinaImages), alertWindow = retVals[0], responsiveArtboardsCheckbox = retVals[1], exportRetinaImagesCheckbox = retVals[2]; const response = alertWindow.runModal(); if (response == 1000) { Utils.setValueOnDocument(responsiveArtboardsCheckbox.state() == 1, Constants.RESPONSIVE_ARTBOARDS, context); Utils.setValueOnDocument(exportRetinaImagesCheckbox.state() == 1, Constants.RETINA_IMAGES, context); } };
{ "pile_set_name": "Github" }
# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # @generated # from cpython.ref cimport PyObject from libcpp.memory cimport shared_ptr from thrift.py3.server cimport cAsyncProcessorFactory from folly cimport cFollyExecutor cdef extern from "src/gen-py3/module/services_wrapper.h" namespace "::cpp2": shared_ptr[cAsyncProcessorFactory] cPubSubStreamingServiceInterface "::cpp2::PubSubStreamingServiceInterface"(PyObject *if_object, cFollyExecutor* Q) except *
{ "pile_set_name": "Github" }
package nl.tno.stormcv.fetcher; import java.util.ArrayList; import java.util.List; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import backtype.storm.task.TopologyContext; import nl.tno.stormcv.model.CVParticle; import nl.tno.stormcv.model.GroupOfFrames; import nl.tno.stormcv.model.serializer.CVParticleSerializer; import nl.tno.stormcv.operation.IBatchOperation; import nl.tno.stormcv.operation.IOperation; import nl.tno.stormcv.operation.SequentialFrameOp; import nl.tno.stormcv.operation.ISingleInputOperation; /** * A meta {@link IFetcher} that enables the use of an Operation directly within the spout. Data fetched is directly executed by the * configured operation. This avoids data transfer from Spout to Bolt but is only useful when the operation can keep up with the * load provided by the fetcher. A typical setup will be some Fetcher emitting Frame objects and a {@link ISingleInputOperation} * that processes the Frame. Hence it is also possible to use a {@link SequentialFrameOp}. * * It is possible to provide a {@link IBatchOperation} if the output of the Fetcher is set to emit {@link GroupOfFrames} using the * groupOfFramesOutput(...) function some Fetchers have. * * @author Corne Versloot * */ @SuppressWarnings("rawtypes") public class FetchAndOperateFetcher implements IFetcher<CVParticle> { private static final long serialVersionUID = -1900017732079975170L; private Logger logger = LoggerFactory.getLogger(this.getClass()); private IFetcher fetcher; private boolean sio = false; private ISingleInputOperation singleInOp; private IBatchOperation batchOp; private List<CVParticle> results; /** * Instantiate an {@link FetchAndOperateFetcher} by providing the Fetcher an Operation to be used. * The operation can be either a SingleInputOpearion or a BatchOperation. BatchOperation's can only * be used if the fetcher is configured to output GroupOfFrame objects instead of Frame's. * @param fetcher * @param operation */ public FetchAndOperateFetcher(IFetcher fetcher, IOperation operation) { this.fetcher = fetcher; if(operation instanceof ISingleInputOperation){ singleInOp = (ISingleInputOperation) operation; sio = true; }else{ batchOp = (IBatchOperation) operation; } } @Override public void prepare(Map stormConf, TopologyContext context) throws Exception { fetcher.prepare(stormConf, context); if(sio) singleInOp.prepare(stormConf, context); else batchOp.prepare(stormConf, context); results = new ArrayList<CVParticle>(); } @SuppressWarnings("unchecked") @Override public CVParticleSerializer<CVParticle> getSerializer() { if(sio) return singleInOp.getSerializer(); return batchOp.getSerializer(); } @Override public void activate() { fetcher.activate(); } @Override public void deactivate() { fetcher.deactivate(); } @Override @SuppressWarnings("unchecked") public CVParticle fetchData() { // first empty the current list with particles before fetching new data if(results.size() > 0) return results.remove(0); // fetch data from particle CVParticle particle = fetcher.fetchData(); if(particle == null) return null; try{ if(sio) results = singleInOp.execute(particle); else if (!sio && particle instanceof GroupOfFrames){ List<CVParticle> particles = new ArrayList<CVParticle>(); particles.addAll( ((GroupOfFrames)particle).getFrames() ); results = batchOp.execute(particles); }else{ logger.warn("BatchOperation configured did not get a GroupOfFrames object from from the Fetcher, got "+particle.getClass().getName()+" instead" ); } }catch(Exception e){ logger.error("Unable to process fetched data due to: "+e.getMessage(), e); } if(results.size() > 0) return results.remove(0); return null; } }
{ "pile_set_name": "Github" }
var Stack = require('./_Stack'), assignMergeValue = require('./_assignMergeValue'), baseFor = require('./_baseFor'), baseMergeDeep = require('./_baseMergeDeep'), isObject = require('./isObject'), keysIn = require('./keysIn'), safeGet = require('./_safeGet'); /** * The base implementation of `_.merge` without support for multiple sources. * * @private * @param {Object} object The destination object. * @param {Object} source The source object. * @param {number} srcIndex The index of `source`. * @param {Function} [customizer] The function to customize merged values. * @param {Object} [stack] Tracks traversed source values and their merged * counterparts. */ function baseMerge(object, source, srcIndex, customizer, stack) { if (object === source) { return; } baseFor(source, function(srcValue, key) { if (isObject(srcValue)) { stack || (stack = new Stack); baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); } else { var newValue = customizer ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) : undefined; if (newValue === undefined) { newValue = srcValue; } assignMergeValue(object, key, newValue); } }, keysIn); } module.exports = baseMerge;
{ "pile_set_name": "Github" }
# frozen_string_literal: true class CommentMailer < ActionMailer::Base helper :application include ApplicationHelper default from: "notifications@#{ActionMailer::Base.default_url_options[:host]}" # CommentMailer.notify_of_comment(user,self).deliver_now def notify(user, comment) @user = user @comment = comment @footer = feature('email-footer') mail(to: user.email, subject: "New comment on #{comment.parent.title}" \ " (##{comment.parent.id}) - #c#{comment.id} ") end def notify_note_author(user, comment) @user = user @comment = comment @footer = feature('email-footer') mail(to: user.email, subject: "New comment on #{comment.node.title}" \ " (##{comment.node.id}) - #c#{comment.id}") end # user is awarder, not awardee def notify_barnstar(user, note) @giver = user @note = note @footer = feature('email-footer') mail(to: note.author.email, subject: 'You were awarded a Barnstar!') end def notify_callout(comment, user) @user = user @comment = comment @footer = feature('email-footer') mail(to: user.email, subject: 'You were mentioned in a comment.' \ " (##{comment.node.id}) - #c#{comment.id} ") end def notify_tag_followers(comment, user) @user = user @comment = comment @footer = feature('email-footer') mail(to: user.email, subject: 'A tag you follow was mentioned in ' \ 'a comment.' \ " (##{comment.node.id}) - #c#{comment.id} ") end def notify_coauthor(user, note) @user = user @note = note @author = note.author @footer = feature('email-footer') mail(to: user.email, subject: 'You were added as a co-author!') end end
{ "pile_set_name": "Github" }
/* * ModSecurity, http://www.modsecurity.org/ * Copyright (c) 2015 - 2020 Trustwave Holdings, Inc. (http://www.trustwave.com/) * * You may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * If any of the files related to licensing are missing or if you have any * other questions related to licensing please contact Trustwave Holdings, Inc. * directly using the email address [email protected]. * */ #ifndef SRC_OPERATORS_GSBLOOKUP_H_ #define SRC_OPERATORS_GSBLOOKUP_H_ #include <string> #include <memory> #include <utility> #include "src/operators/operator.h" namespace modsecurity { namespace operators { class GsbLookup : public Operator { public: /** @ingroup ModSecurity_Operator */ explicit GsbLookup(std::unique_ptr<RunTimeString> param) : Operator("GsbLookup", std::move(param)) { } bool evaluate(Transaction *transaction, const std::string &str) override; }; } // namespace operators } // namespace modsecurity #endif // SRC_OPERATORS_GSBLOOKUP_H_
{ "pile_set_name": "Github" }
// Copyright 2019 The Prometheus Authors // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // +build linux,appengine !linux package util import ( "fmt" ) // SysReadFile is here implemented as a noop for builds that do not support // the read syscall. For example Windows, or Linux on Google App Engine. func SysReadFile(file string) (string, error) { return "", fmt.Errorf("not supported on this platform") }
{ "pile_set_name": "Github" }
# From https://www.kernel.org/pub/software/network/tftp/tftp-hpa/sha256sums.asc sha256 afee361df96a2f88344e191f6a25480fd714e1d28d176c3f10cc43fa206b718b tftp-hpa-5.2.tar.xz
{ "pile_set_name": "Github" }
SUBROUTINE GFSHC(AWY,NUY,HC,IDENT,AC,MROW) C C ROUTINE TO GENERATE CONSTRAINT MATRIX FOR PURELY INCOMPRESSIBLE C FORMULATION WHEN NO SPC'S ARE ON FLUID C DOUBLE PRECISION DZ(1) ,DTERM ,VAL C REAL RZ(1) C INTEGER Z ,SYSBUF ,MCB(7) ,NAME(2) ,HC 1 ,TI1 ,TO1 ,TO2 ,AWY ,SCR 2 ,AC C C OPEN CORE C COMMON / ZZZZZZ / Z(1) C C SYSTEM COMMON C COMMON / SYSTEM / SYSBUF C C PACK - UNPACK COMMON BLOCKS C COMMON / PACKX / TI1 ,TO1 ,I1 ,N1 1 ,INCR1 COMMON / UNPAKX / TO2 ,I2 ,N2 ,INCR2 COMMON / ZBLPKX / A(4) ,IROW C EQUIVALENCE ( Z(1) , RZ(1) , DZ(1) ) 1 ,( VAL , A(1) ) C DATA NAME / 4HGFSH , 4HC / C C C ALLOCATE CORE C NZ = KORSZ(Z(1)) IBUF = NZ - SYSBUF NZ = IBUF - 1 IF(NZ .LT. NUY) GO TO 1008 C C FORM A COLUMN VECTOR OF ONES C TI1 = 1 TO1 = 2 I1 = 1 N1 = NUY INCR1 = 1 DO 30 I=1,NUY 30 RZ(I) = 1.0 CALL MAKMCB(MCB,IDENT,NUY,2,2) CALL GOPEN(IDENT,Z(IBUF),1) CALL PACK(RZ(1),IDENT,MCB) CALL CLOSE(IDENT,1) CALL WRTTRL(MCB) C CALL SSG2B(AWY,IDENT,0,AC,0,2,1,SCR) C C PERFORM MULTIPLY TO GET COMPRESSIBLITY MATRIX C C C UNPACK ROW OF AC INTO CORE C MCB(1) = AC CALL RDTRL(MCB) NROW = MCB(3) IF(NZ .LT. 2*NROW) GO TO 1008 TO2 = 2 I2 = 1 N2 = NROW INCR2 = 1 C CALL GOPEN(AC,Z(IBUF),0) CALL UNPACK(*40,AC,DZ(1)) GO TO 60 C C AC IS NULL C 40 DO 50 I=1,NROW 50 DZ(I) = 0.0D0 C 60 CALL CLOSE(AC,1) C C LOCATE LARGEST TERM IN AC C DTERM = -1.0D10 DO 210 I=1,NROW IF(DZ(I) .LE. DTERM) GO TO 210 MROW = I DTERM = DZ(I) 210 CONTINUE C C GENERATE THE HC MATRIX C CALL MAKMCB(MCB,HC,NROW,1,2) CALL GOPEN(HC,Z(IBUF),1) C C GENERATE COLUMNS UP TO MROW C IF(MROW .EQ. 1) GO TO 230 MR = MROW - 1 DO 220 IR = 1,MR CALL BLDPK(2,2,HC,0,0) IROW = IR VAL = 1.0D0 CALL ZBLPKI IROW = MROW VAL = -DZ(IR) / DTERM CALL ZBLPKI 220 CALL BLDPKN(HC,0,MCB) C C PACK OUT NULL COLUMN FOR MROW C 230 CALL BLDPK(2,2,HC,0,0) CALL BLDPKN(HC,0,MCB) C C GENERATE REMAINING ROWS C IF(MROW .GE. NROW) GO TO 250 MR = MROW + 1 DO 240 IR=MR,NROW CALL BLDPK(2,2,HC,0,0) IROW = MROW VAL = -DZ(IR) / DTERM CALL ZBLPKI IROW = IR VAL = 1.0D0 CALL ZBLPKI 240 CALL BLDPKN(HC,0,MCB) C 250 CALL CLOSE(HC,1) CALL WRTTRL(MCB) C RETURN C C ERRORS C 1008 CALL MESAGE(-8,0,NAME) RETURN END
{ "pile_set_name": "Github" }
package shell import ( "fmt" "io/ioutil" "os" "path" "path/filepath" "runtime" "github.com/joyent/triton-kubernetes/state" "github.com/spf13/viper" getter "github.com/hashicorp/go-getter" ) type thirdPartyPlugin struct { BaseURL string SHA256Sums map[string]string } var thirdPartyPlugins = []thirdPartyPlugin{ thirdPartyPlugin{ BaseURL: "https://github.com/yamamoto-febc/terraform-provider-rke/releases/download/0.4.0/terraform-provider-rke_0.4.0_%s-%s.zip", SHA256Sums: map[string]string{ "terraform-provider-rke_0.4.0_darwin-386.zip": "b8b3085b06307619a98b83dd9901f8504169e83948843dc1af79aa058dfc03ee", "terraform-provider-rke_0.4.0_darwin-amd64.zip": "c6abfdee7c4db0bd8d068172c9c97beee4f382e1578ad0588f0347a725fd5562", "terraform-provider-rke_0.4.0_linux-386.zip": "4b8b3d76efd4e64813de820342c79cf60bffe6726d6a15a2306d636f5ae1dbfe", "terraform-provider-rke_0.4.0_linux-amd64.zip": "3c9bc09b389d00a4e130e4674c5aae6a5284417dbbc4de3c7e14a9a20eabe51c", "terraform-provider-rke_0.4.0_windows-386.zip": "b8a4594edadf9489b331939453b61cdbd383f380645f50f1411b6796155b7f73", "terraform-provider-rke_0.4.0_windows-amd64.zip": "1975fa24b2aa5830d884649a34adee6136e213cf5edd021513232d77eb50820c", }, }, } // A simplistic third party plugin installer. // This func will install terraform plugins regardless of whether they're needed for this particular execution. // Terraform doesn't currently support automatically installing third party plugins, issue being tracked here // https://github.com/hashicorp/terraform/issues/17154 func installThirdPartyProviders(workingDirectory string) error { fmt.Println("Installing third party plugins...") pluginInstallDirectoryPath := filepath.Join(workingDirectory, "terraform.d", "plugins", fmt.Sprintf("%s_%s", runtime.GOOS, runtime.GOARCH)) // Download/Verify/Unzip plugins for _, plugin := range thirdPartyPlugins { pluginURL := fmt.Sprintf(plugin.BaseURL, runtime.GOOS, runtime.GOARCH) _, pluginFileName := path.Split(pluginURL) pluginURL = fmt.Sprintf("%s?checksum=sha256:%s", pluginURL, plugin.SHA256Sums[pluginFileName]) // Download/Verify/Unzip err := getter.Get(pluginInstallDirectoryPath, pluginURL) if err != nil { return err } } fmt.Println("Finished installing third party plugins...") return nil } func RunTerraformApplyWithState(state state.State) error { if viper.GetBool("terraform-configuration") { fmt.Println("Updating terraform configuration") return nil } // Create a temporary directory tempDir, err := ioutil.TempDir("", "triton-kubernetes-") if err != nil { return err } defer os.RemoveAll(tempDir) // Save the terraform config to the temporary directory jsonPath := fmt.Sprintf("%s/%s", tempDir, "main.tf.json") err = ioutil.WriteFile(jsonPath, state.Bytes(), 0644) if err != nil { return err } // Use temporary directory as working directory shellOptions := ShellOptions{ WorkingDir: tempDir, } // Install third party providers err = installThirdPartyProviders(tempDir) if err != nil { return err } // Run terraform init err = runShellCommand(&shellOptions, "terraform", "init", "-force-copy") if err != nil { return err } // Run terraform apply err = runShellCommand(&shellOptions, "terraform", "apply", "-auto-approve") if err != nil { return err } return nil } func RunTerraformDestroyWithState(currentState state.State, args []string) error { // Create a temporary directory tempDir, err := ioutil.TempDir("", "triton-kubernetes-") if err != nil { return err } defer os.RemoveAll(tempDir) // Save the terraform config to the temporary directory jsonPath := fmt.Sprintf("%s/%s", tempDir, "main.tf.json") err = ioutil.WriteFile(jsonPath, currentState.Bytes(), 0644) if err != nil { return err } // Use temporary directory as working directory shellOptions := ShellOptions{ WorkingDir: tempDir, } // Install third party providers err = installThirdPartyProviders(tempDir) if err != nil { return err } // Run terraform init err = runShellCommand(&shellOptions, "terraform", "init", "-force-copy") if err != nil { return err } // Run terraform destroy allArgs := append([]string{"destroy", "-force"}, args...) err = runShellCommand(&shellOptions, "terraform", allArgs...) if err != nil { return err } return nil } func RunTerraformOutputWithState(state state.State, moduleName string) error { // Create a temporary directory tempDir, err := ioutil.TempDir("", "triton-kubernetes-") if err != nil { return err } defer os.RemoveAll(tempDir) // Save the terraform config to the temporary directory jsonPath := fmt.Sprintf("%s/%s", tempDir, "main.tf.json") err = ioutil.WriteFile(jsonPath, state.Bytes(), 0644) if err != nil { return err } // Use temporary directory as working directory shellOptions := ShellOptions{ WorkingDir: tempDir, } // Install third party providers err = installThirdPartyProviders(tempDir) if err != nil { return err } // Run terraform init err = runShellCommand(&shellOptions, "terraform", "init", "-force-copy") if err != nil { return err } // Run terraform output err = runShellCommand(&shellOptions, "terraform", "output", "-module", moduleName) if err != nil { return err } return nil }
{ "pile_set_name": "Github" }
#pragma once /* * Copyright (C) 2014 Team XBMC * http://xbmc.org * * This Program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This Program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with XBMC; see the file COPYING. If not, see * <http://www.gnu.org/licenses/>. * */ #include "filesystem/OverrideDirectory.h" namespace XFILE { class CResourceDirectory : public COverrideDirectory { public: CResourceDirectory(); virtual ~CResourceDirectory(); virtual bool GetDirectory(const CURL& url, CFileItemList &items); protected: virtual std::string TranslatePath(const CURL &url); }; }
{ "pile_set_name": "Github" }
// Faust Decoder Configuration File // Written by Ambisonic Decoder Toolbox, version 8.0 // run by sma on hive-macpro-osxmlion.local (MACI64) at 29-Jul-2018 19:42:07 //------- decoder information ------- // decoder file = ../decoders/ENV_3h3v_allrad_5200_rE_max_2_band.dsp // description = ENV_3h3v_allrad_5200_rE_max_2_band // speaker array name = ENV // horizontal order = 3 // vertical order = 3 // coefficient order = acn // coefficient scale = SN3D // input scale = SN3D // mixed-order scheme = HV // input channel order: W Y Z X V T R S U Q O M K L N P // output speaker order: R4.U R3.U R2.U R1.U R4.M R3.M R2.M R1.M R4.D R3.D R2.D R1.D R.T B.T L4.U L3.U L2.U L1.U L4.M L3.M L2.M L1.M L4.D L3.D L2.D L1.D F.T L.T //------- // start decoder configuration declare name "ENV_3h3v_allrad_5200_rE_max_2_band"; // bands nbands = 2; // decoder type decoder_type = 2; // crossover frequency in Hz xover_freq = hslider("xover [unit:Hz]",400,200,800,20): dezipper; // lfhf_balance lfhf_ratio = hslider("lf/hf [unit:dB]", 0, -3, +3, 0.1): mu.db2linear : dezipper; // decoder order decoder_order = 3; // ambisonic order of each input component co = ( 0, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3); // use full or reduced input set input_full_set = 1; // delay compensation delay_comp = 1; // level compensation level_comp = 1; // nfc on input or output nfc_output = 1; nfc_input = 0; // enable output gain and muting controls output_gain_muting = 1; // number of speakers ns = 28; // radius for each speaker in meters rs = ( 4.508, 3.377, 3.377, 4.508, 4.242, 3.013, 3.013, 4.242, 4.508, 3.377, 3.377, 4.508, 2.588, 3.256, 4.508, 3.377, 3.377, 4.508, 4.242, 3.013, 3.013, 4.242, 4.508, 3.377, 3.377, 4.508, 3.256, 2.588); // per order gains, 0 for LF, 1 for HF. // Used to implement shelf filters, or to modify velocity matrix // for max_rE decoding, and so forth. See Appendix A of BLaH6. gamma(0) = ( 1, 1, 1, 1); gamma(1) = ( 1, 0.8611363116, 0.6123336207, 0.304746985); // gain matrix s(00,0) = ( 0.0357172479, -0.032757265, 0.0352646226, -0.0888925232, 0.0707334168, -0.0300194819, -0.0541076425, -0.0826628351, 0.0827267977, -0.0851539748, 0.069714728, 0.018292878, -0.0866332131, 0.0467784863, 0.0830398657, -0.047445637); s(01,0) = ( 0.045830428, -0.0919159553, 0.0752716794, -0.049871766, 0.086932492, -0.1373160207, -0.0012812758, -0.0756332397, -0.0572265843, 0.0075140982, 0.1329952277, -0.0634282225, -0.0932760934, -0.0379285331, -0.0857515934, 0.0829759591); s(02,0) = ( 0.0559371813, -0.1204935128, 0.0826910184, 0.0494950009, -0.0860205055, -0.1573054717, -0.0211790956, 0.0751095572, -0.0943896436, 0.0482779899, -0.1315948505, -0.036824008, -0.1152512945, 0.0379232426, -0.1137372386, -0.0815560435); s(03,0) = ( 0.0357252983, -0.0327765023, 0.0352670091, 0.0889096493, -0.0707769757, -0.030023652, -0.0541252549, 0.0826663552, 0.0827288958, -0.0852102723, -0.0697214571, 0.0183190141, -0.0866386837, -0.0467991661, 0.0830373121, 0.0474187565); s(04,0) = ( 0.020405376, -0.0211599414, 7.6565e-06, -0.0551443276, 0.051889613, -6.6782e-06, -0.0490827329, -1.97985e-05, 0.0575443901, -0.0754849943, 1.73594e-05, 0.0282908121, -2.3924e-05, 0.0738180838, 2.39126e-05, -0.0380961256); s(05,0) = ( 0.0590398784, -0.1517538501, 8.6971e-06, -0.0547700393, 0.1170010193, -2.47875e-05, -0.127682427, 1.185e-07, -0.1404002337, 0.0765863397, 8.2055e-06, 0.1682653706, -1.70513e-05, 0.0644106705, -4.17871e-05, 0.1314708064); s(06,0) = ( 0.04101316, -0.1009859848, -4.6924e-06, 0.0555464482, -0.1191866625, 9.9534e-06, -0.0931159554, -8.9779e-06, -0.0746108403, 0.0045756341, 2.31583e-05, 0.1233115832, 1.15384e-05, -0.0657198556, 3.6052e-06, -0.1354198921); s(07,0) = ( 0.0204114526, -0.0211339976, -1.4045e-06, 0.055170352, -0.0518307634, 5.1764e-06, -0.0490963392, -1.6215e-06, 0.0576098683, -0.0754106933, 1.01923e-05, 0.0282569563, 4.9464e-06, -0.0738498299, 6.0489e-06, 0.0382170489); s(08,0) = ( 0.056586928, -0.0469388895, -0.0809383646, -0.1248484449, 0.0928961367, 0.0586621423, -0.0204273736, 0.1554753613, 0.1058996763, -0.1043304644, -0.1170126222, -0.0124289383, 0.0916986257, -0.0320090854, -0.1327139661, -0.0552613322); s(09,0) = ( 0.0488592146, -0.0972854974, -0.0856566939, -0.0434612163, 0.0802794113, 0.1525643556, 0.0176527163, 0.0654339631, -0.0688815419, 0.0202714417, -0.1219394711, -0.0909562241, 0.0696086863, -0.0338324056, 0.1117461656, 0.0844219218); s(10,0) = ( 0.0589754917, -0.1258600401, -0.0931060975, 0.0431120335, -0.0794026977, 0.172574662, -0.0022088542, -0.0649393208, -0.106006286, 0.0609835761, 0.1205606207, -0.0643972981, 0.0915694017, 0.0338293019, 0.139705354, -0.083015285); s(11,0) = ( 0.0565851662, -0.0469555549, -0.0809245446, 0.1248451534, -0.0929372902, 0.058665017, -0.0204444722, -0.1554481878, 0.1058872812, -0.1043891647, 0.1170271275, -0.0124003522, 0.0916853195, 0.0319773099, -0.1326845792, 0.0552337993); s(12,0) = ( 0.0609476373, -0.060901623, 0.1568837328, -5.9658e-06, 7.936e-06, -0.1385861927, 0.1897360754, -9.134e-06, -0.0260078428, 0.0094500174, 9.0074e-06, -0.1886192791, 0.1569858624, -3.821e-06, -0.0578612863, 1.31994e-05); s(13,0) = ( 0.059574577, 5.14e-07, 0.1315465495, -0.0982567549, 8.8876e-06, 6.9984e-06, 0.1025495782, -0.1964428896, 0.0622488859, -8.5787e-06, 1.41595e-05, 2.20501e-05, 0.0031880395, -0.2098120426, 0.1267193278, -0.0238483304); s(14,0) = ( 0.0300386236, 0.0329659613, 0.0322524594, -0.0724000279, -0.0712625625, 0.0302199818, -0.0414875573, -0.0742892578, 0.0603082292, 0.0860114822, -0.0702797614, -0.0184243275, -0.0769401469, 0.0275425163, 0.0707498532, -0.0212514112); s(15,0) = ( 0.0559461943, 0.120493671, 0.0827166835, -0.0495281802, -0.0860726106, 0.1573207753, -0.0211487272, -0.0751413914, -0.0943668289, -0.0482596843, -0.1316135152, 0.0368607784, -0.1152372767, -0.0379260703, -0.1137106625, 0.0816166578); s(16,0) = ( 0.0458381303, 0.0919299937, 0.0752763242, 0.0498881147, 0.0869653444, 0.1373212939, -0.0012930511, 0.0756376958, -0.0572232947, -0.0074868185, 0.1330061112, 0.0634198711, -0.0932775135, 0.0378983728, -0.0857441787, -0.0830080557); s(17,0) = ( 0.0300321815, 0.032953347, 0.0322522053, 0.0723914434, 0.0712482087, 0.0302278636, -0.0414695954, 0.0742857199, 0.0603332646, 0.0860344958, 0.0702980203, -0.0184005289, -0.0769303799, -0.0275309844, 0.0707452822, 0.0213233068); s(18,0) = ( 0.0311137037, 0.0207767208, -1.24508e-05, -0.0861730136, -0.0508313639, -1.07414e-05, -0.0725798422, 3.01893e-05, 0.0996098696, 0.0735903369, 2.38776e-05, -0.0276854342, 3.80669e-05, 0.1092214342, -2.92706e-05, -0.0871169714); s(19,0) = ( 0.0410245503, 0.1010175812, -3.5179e-06, -0.0555325479, -0.1191477539, -6.9183e-06, -0.0931509546, 4.3138e-06, -0.0746421826, -0.0045896518, 6.3086e-06, -0.1233723616, 1.06986e-05, 0.0657060284, 1.162e-06, 0.1353475266); s(20,0) = ( 0.0590493414, 0.1517735053, -1.06695e-05, 0.0547847398, 0.1170234009, -2.53252e-05, -0.1276995339, 5.9787e-06, -0.1404047575, -0.0765739272, 1.74584e-05, -0.1682751678, 2.53327e-05, -0.0644336782, 2.6792e-05, -0.1314713053); s(21,0) = ( 0.031131324, 0.0208134559, 4.4373e-06, 0.0862020208, 0.0508871221, -1.2082e-06, -0.0726254962, 1.07559e-05, 0.0995741549, 0.0735880944, -4.8916e-06, -0.0277426077, -1.24985e-05, -0.1092685432, 1.08534e-05, 0.0869912958); s(22,0) = ( 0.0508932934, 0.0471310343, -0.0779126987, -0.1083231912, -0.093397921, -0.058840556, -0.0077921067, 0.1470814684, 0.083460576, 0.1051683151, 0.1175480184, 0.0122717432, 0.0819967267, -0.0512664818, -0.1204180716, -0.0290768782); s(23,0) = ( 0.0589814686, 0.1258790599, -0.0931096772, -0.0431284754, -0.0794539223, -0.1725946105, -0.0022223117, 0.0649306741, -0.1060242195, -0.0609866023, 0.1205577523, 0.0643997028, 0.0915864223, -0.0337840024, 0.1397326705, 0.0831006745); s(24,0) = ( 0.0488570942, 0.097284727, -0.0856450051, 0.0434661495, 0.0802988273, -0.152544354, 0.0176361655, -0.0654304182, -0.0688836849, -0.0202621534, -0.121948231, 0.0909148185, 0.0696007924, 0.033814435, 0.1117406823, -0.0844533181); s(25,0) = ( 0.0509049591, 0.0471276337, -0.0779314951, 0.1083520914, 0.0933894576, -0.0588503653, -0.0077888328, -0.1471113602, 0.0835072023, 0.10517144, -0.1175505248, 0.0123056442, 0.0820038889, 0.0512642607, -0.1204457312, 0.029142866); s(26,0) = ( 0.0595768474, -6.1479e-06, 0.1315504888, 0.0982598074, -1.15614e-05, -7.6172e-06, 0.1025504146, 0.1964460037, 0.0622505209, -1.11582e-05, -1.52675e-05, 1.783e-06, 0.0031855767, 0.2098088168, 0.1267222439, 0.0238458967); s(27,0) = ( 0.0609545825, 0.0609200918, 0.1568956837, 4.3828e-06, 5.2388e-06, 0.1386267492, 0.1897335576, 7.7123e-06, -0.025999746, -0.0094262821, 9.7441e-06, 0.188668757, 0.1569560957, 5.18e-06, -0.0578473089, -2.9875e-06); // ----- do not change anything below here ---- // mask for full ambisonic set to channels in use input_mask(0) = bus(nc); input_mask(1) = (_,_,_,_,_,_,_,_,_,_,_,_,_,_,_,_); // Start of decoder implementation. No user serviceable parts below here! //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //declare name "Fill in name in configuration section below"; declare version "1.2"; declare author "AmbisonicDecoderToolkit"; declare license "BSD 3-Clause License"; declare copyright "(c) Aaron J. Heller 2013"; /* Copyright (c) 2013, Aaron J. Heller All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /* Author: Aaron J. Heller <[email protected]> $Id: 21810b615fa65b96af41a7c8783d7435b41084b8 $ */ // v 1.2, 28-Oct-2017 ajh // . add 6th-order NFC filters // . fixed error in speaker_chain and speaker_chain2, where speaker // distance was being indexed by order, not speaker number // v 1.1 remove dependancies on Faust Libraries, 23-Nov-2016 ajh // m = library("math.lib"); // mu = library("music.lib"); m = environment { // from the old math.lib take (1, (xs, xxs)) = xs; take (1, xs) = xs; take (nn, (xs, xxs)) = take (nn-1, xxs); bus(2) = _,_; // avoids a lot of "bus(1)" labels in block diagrams bus(n) = par(i, n, _); SR = min(192000, max(1, fconstant(int fSamplingFreq, <math.h>))); //PI = 3.1415926535897932385; // quad precision value PI = 3.14159265358979323846264338327950288; }; mu = environment { // from the old music.lib db2linear(x) = pow(10, x/20.0); }; // m.SR from math.lib is an integer, we need a float SR = float(m.SR); // descriptive statistics total(c) = c:>_; average(c) = total(c)/count(c); count(c) = R(c) :>_ with { R((c,cl)) = R(c),(R(cl)); R(c) = 1; }; rms(c) = R(c) :> /(count(c)) : sqrt with { R((c,cl)) = R(c),R(cl); R(c) = (c*c); }; sup(c) = R(c) with { R((c,cl)) = max(R(c),R(cl)); R(c) = c; }; inf(c) = R(c) with { R((c,cl)) = min(R(c),R(cl)); R(c) = c; }; // bus bus(n) = par(i,n,_); // bus with gains gain(c) = R(c) with { R((c,cl)) = R(c),R(cl); R(1) = _; R(0) = !:0; // need to preserve number of outputs, faust will optimize away R(float(0)) = R(0); R(float(1)) = R(1); R(c) = *(c); }; // fir filter (new improved, better behaved) fir(c) = R(c) :>_ with { R((c,lc)) = _<: R(c), (mem:R(lc)); R(c) = gain(c); }; // --- phase-matched bandsplitter from BLaH3 xover(freq,n) = par(i,n,xover1) with { sub(x,y) = y-x; k = tan(m.PI*float(freq)/m.SR); k2 = k^2; d = (k2 + 2*k + 1); //d = (k2,2*k,1):>_; // hf numerator b_hf = (1/d,-2/d,1/d); // lf numerator b_lf = (k2/d, 2*k2/d, k2/d); // denominator a = (2 * (k2-1) / d, (k2 - 2*k + 1) / d); // xover1 = _:sub ~ fir(a) <: fir(b_lf),fir(b_hf):_,*(-1); }; shelf(freq,g_lf,g_hf) = xover(freq,1) : gain(g_lf),gain(g_hf):>_; // from http://old.nabble.com/Re%3A--Faudiostream-devel---ANN--Faust-0.9.24-p28597267.html // (not used currently, do we need to worry about denormals?) anti_denormal = pow(10,-20); anti_denormal_ac = 1 - 1' : *(anti_denormal) : + ~ *(-1); // UI "dezipper" smooth(c) = *(1-c) : +~*(c); dezipper = smooth(0.999); // physical constants temp_celcius = 20; c = 331.3 * sqrt(1.0 + (temp_celcius/273.15)); // speed of sound m/s // ---- NFC filters ---- // see BesselPoly.m for coefficient calculations // // [1] J. Daniel, “Spatial Sound Encoding Including Near Field Effect: // Introducing Distance Coding Filters and a Viable, New Ambisonic // Format ,” Preprints 23rd AES International Conference, Copenhagen, // 2003. // [2] Weisstein, Eric W. "Bessel Polynomial." From MathWorld--A Wolfram // Web Resource. http://mathworld.wolfram.com/BesselPolynomial.html // [3] F. Adriaensen, “Near Field filters for Higher Order // Ambisonics,” Jul. 2006. // [4] J. O. Smith, “Digital State-Variable Filters,” CCRMA, May 2013. // // [5] "A Filter Primer", https://www.maximintegrated.com/en/app-notes/index.mvp/id/733 // first and second order state variable filters see [4] // FIXME FIXME this code needs to be refactored, so that the roots are // passed in rather then hardwired in the code, or another // API layer, or ... svf1(g,d1) = _ : *(g) : (+ <: +~_, _ ) ~ *(d1) : !,_ ; svf2(g,d1,d2) = _ : *(g) : (((_,_,_):> _ <: +~_, _ ) ~ *(d1) : +~_, _) ~ *(d2) : !,_ ; // these are Bessel filters, see [1,2] nfc1(r,gain) = svf1(g,d1) // r in meters with { omega = c/(float(r)*SR); // 1 1 b1 = omega/2.0; g1 = 1.0 + b1; d1 = 0.0 - (2.0 * b1) / g1; g = gain/g1; }; nfc2(r,gain) = svf2(g,d1,d2) with { omega = c/(float(r)*SR); r1 = omega/2.0; r2 = r1 * r1; // 1.000000000000000 3.00000000000000 3.00000000000000 b1 = 3.0 * r1; b2 = 3.0 * r2; g2 = 1.0 + b1 + b2; d1 = 0.0 - (2.0 * b1 + 4.0 * b2) / g2; // fixed d2 = 0.0 - (4.0 * b2) / g2; g = gain/g2; }; nfc3(r,gain) = svf2(g,d1,d2):svf1(1.0,d3) with { omega = c/(float(r)*SR); r1 = omega/2.0; r2 = r1 * r1; // 1.000000000000000 3.677814645373914 6.459432693483369 b1 = 3.677814645373914 * r1; b2 = 6.459432693483369 * r2; g2 = 1.0 + b1 + b2; d1 = 0.0 - (2.0 * b1 + 4.0 * b2) / g2; // fixed d2 = 0.0 - (4.0 * b2) / g2; // 1.000000000000000 2.322185354626086 b3 = 2.322185354626086 * r1; g3 = 1.0 + b3; d3 = 0.0 - (2.0 * b3) / g3; g = gain/(g3*g2); }; nfc4(r,gain) = svf2(g,d1,d2):svf2(1.0,d3,d4) with { omega = c/(float(r)*SR); r1 = omega/2.0; r2 = r1 * r1; // 1.000000000000000 4.207578794359250 11.487800476871168 b1 = 4.207578794359250 * r1; b2 = 11.487800476871168 * r2; g2 = 1.0 + b1 + b2; d1 = 0.0 - (2.0 * b1 + 4.0 * b2) / g2; // fixed d2 = 0.0 - (4.0 * b2) / g2; // 1.000000000000000 5.792421205640748 9.140130890277934 b3 = 5.792421205640748 * r1; b4 = 9.140130890277934 * r2; g3 = 1.0 + b3 + b4; d3 = 0.0 - (2.0 * b3 + 4.0 * b4) / g3; // fixed d4 = 0.0 - (4.0 * b4) / g3; g = gain/(g3*g2); }; nfc5(r,gain) = svf2(g,d1,d2):svf2(1.0,d3,d4):svf1(1.0,d5) with { omega = c/(float(r)*SR); r1 = omega/2.0; r2 = r1 * r1; // 1.000000000000000 4.649348606363304 18.156315313452325 b1 = 4.649348606363304 * r1; b2 = 18.156315313452325 * r2; g2 = 1.0 + b1 + b2; d1 = 0.0 - (2.0 * b1 + 4.0 * b2) / g2; // fixed d2 = 0.0 - (4.0 * b2) / g2; // 1.000000000000000 6.703912798306966 14.272480513279568 b3 = 6.703912798306966 * r1; b4 = 14.272480513279568 * r2; g3 = 1.0 + b3 + b4; d3 = 0.0 - (2.0 * b3 + 4 * b4) / g3; // fixed d4 = 0.0 - (4.0 * b4) / g3; // 1.000000000000000 3.646738595329718 b5 = 3.646738595329718 * r1; g4 = 1.0 + b5; d5 = 0.0 - (2.0 * b5) / g4; g = gain/(g4*g3*g2); }; nfc6(r,gain) = svf2(g,d11,d12):svf2(1.0,d21,d22):svf2(1.0,d31,d32) with { omega = c/(float(r)*SR); r1 = omega/2.0; r2 = r1 * r1; // reverse Bessel Poly 6: // 1 21 210 1260 4725 10395 10395 // factors: // 1.000000000000000 5.031864495621642 26.514025344067996 // 1.000000000000000 7.471416712651683 20.852823177396761 // 1.000000000000000 8.496718791726696 18.801130589570320 // 1.000000000000000 5.031864495621642 26.514025344067996 b11 = 5.031864495621642 * r1; b12 = 26.514025344067996 * r2; g1 = 1.0 + b11 + b12; d11 = 0.0 - (2.0 * b11 + 4.0 * b12) / g1; d12 = 0.0 - (4.0 * b12) / g1; // 1.000000000000000 7.471416712651683 20.852823177396761 b21 = 7.471416712651683 * r1; b22 = 20.852823177396761 * r2; g2 = 1.0 + b21 + b22; d21 = 0.0 - (2.0 * b21 + 4.0 * b22) / g2; d22 = 0.0 - (4.0 * b22) / g2; // 1.000000000000000 8.496718791726696 18.801130589570320 b31 = 8.496718791726696 * r1; b32 = 18.801130589570320 * r2; g3 = 1.0 + b31 + b32; d31 = 0.0 - (2.0 * b31 + 4.0 * b32) / g3; d32 = 0.0 - (4.0 * b32) / g3; g = gain/(g3*g2*g1); }; // ---- End NFC filters ---- nfc(0,r,g) = gain(g); nfc(1,r,g) = nfc1(r,g); nfc(2,r,g) = nfc2(r,g); nfc(3,r,g) = nfc3(r,g); nfc(4,r,g) = nfc4(r,g); nfc(5,r,g) = nfc5(r,g); nfc(6,r,g) = nfc6(r,g); // null NFC filters to allow very high order decoders. FIXME! nfc(o,r,g) = gain(g); //declare name "nfctest"; //process = bus(6):(nfc(0,2,1),nfc(1,2,1),nfc(2,2,1),nfc(3,2,1),nfc(4,2,1),nfc(5,2,1)):bus(6); // top level api to NFC filters nfc_out(1,order,r,g) = nfc(order,r,g); nfc_out(0,order,r,g) = _; nfc_inp(1,order,r,g) = nfc(order,r,g); nfc_inp(0,order,r,g) = _; // ---- delay and level delay(dc,r) = R(dc,r) with { R(0,r) = _; // delay_comp off R(1,0) = _; // delay_comp on, but no delay R(1,float(0)) = R(1,0); R(1,r) = @(meters2samples(r)); meters2samples(r) = int(m.SR * (float(r)/float(c)) + 0.5); }; level(lc,r,rmax) = R(lc,r,rmax) with{ R(0,r,rmax) = _; // level_comp off R(1,r,rmax) = gain(float(r)/float(rmax)); }; delay_level(r) = R(r) with { // delay_comp and level_comp are free variables (fix?) R((r,rl)) = R(r), R(rl); R(r) = delay(delay_comp,(r_max-r)) : level(level_comp,r,r_max); }; // ---- gates gate(0) = !; gate(1) = _; dirac(i,j) = i==j; gate_bus(order,(o,oss)) = (gate(order==o),gate_bus(order,oss)); gate_bus(order,o) = gate(order==o); // route (not used) route(n_inputs,n_outputs,outs) = m.bus(n_inputs) <: par(i,n_outputs,(0,gate_bus(i,outs)):>_) : m.bus(n_outputs); //process = route(4,4,(3,1,1,2)); // test // deinterleave deinterleave(n,span) = par(i,n,_) <: par(i,span, par(j,n,gate(%(j,span)==i))); // 1 band speaker chain speaker_chain(ispkr) = gain(s(ispkr,0)) // decoder matrix gains // iterate over orders, select each order from matrix <: par(jord,no,gate_bus(jord,co) // sum and apply NFC filter for that order // at the speaker distance :> nfc_out(nfc_output,jord,m.take(ispkr+1,rs),1.0)) // sum the orders :>_; // 1 band speaker chain -- bad definition // speaker_chain(i) = gain(s(i,0)) <: par(i,no,gate_bus(i,co):>nfc_out(nfc_output,i,m.take(i+1,rs),1.0)):>_; // near field correction at input, nfc_input = 1 nfc_input_bus(nc) = par(i,nc, nfc_inp(nfc_input, m.take(i+1,co), r_bar, 1.0)); // per order gains gamma_bus(n) = par(i,nc, gain( m.take(m.take(i+1,co)+1, gamma(n)))); // output gain and muting output_gain = hslider("gain [unit:dB]", -10, -30, +10, 1): mu.db2linear :*(checkbox("mute")<0.5): dezipper; gain_muting_bus(0,n) = bus(n); gain_muting_bus(1,n) = par(i,n,*(output_gain)); // one band decoder decoder(1,nc,ns) = nfc_input_bus(nc) : gamma_bus(0) <: par(is,ns, speaker_chain(is)) : delay_level(rs); // two band decoder // there are two variants of the two-band decoder // 1. classic, with shelf-filters and one matrix // 2. vienna, bandsplitting filters and separate LF and HF matricies. // classic shelf filter decoder decoder(2,nc,ns) = nfc_input_bus(nc) : par(i,nc, shelf(xover_freq,m.take(m.take(i+1,co)+1, gamma(0))/lfhf_ratio, m.take(m.take(i+1,co)+1, gamma(1))*lfhf_ratio)) <: par(is,ns, speaker_chain(is)) : delay_level(rs); // vienna decoder // FIXME FIXME need to incorporate lfhf_ratio decoder(3,nc,ns) = bus(nc) : nfc_input_bus(nc) : xover(xover_freq,nc) : deinterleave(2*nc,2) : (gamma_bus(0),gamma_bus(1)) : bus(2*nc) <: par(j, ns, speaker_chain2(j,nc)) : delay_level(rs) ; // 2 band speaker chain for vienna decoder // i is speaker, j is order speaker_chain2(i,nc) = gain(s(i,0)), gain(s(i,1)) :> bus(nc) <: par(j,no,gate_bus(j,co):>nfc_out(nfc_output,j,m.take(i+1,rs),1.0)) :>_ ; //process = speaker_chain2(1,16); // test // -------------------------------------- // things calculated from decoder config // maximum and average speaker distance r_max = sup(rs); r_bar = (rs :> float) / float(count(rs)); // number of ambisonic orders, including 0 no = decoder_order+1; // number of input component signals nc = count(co); // the top-level process process = input_mask(input_full_set):decoder(decoder_type,nc,ns):gain_muting_bus(output_gain_muting,ns); // End of decoder implementation. No user serviceable parts above here! //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ //EOF!
{ "pile_set_name": "Github" }
// // usbgamepad.c // // USPi - An USB driver for Raspberry Pi written in C // Copyright (C) 2014-2018 R. Stange <[email protected]> // Copyright (C) 2014 M. Maccaferri <[email protected]> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // #include <uspi/usbgamepad.h> #include <uspi/usbhostcontroller.h> #include <uspi/devicenameservice.h> #include <uspi/assert.h> #include <uspi/util.h> #include <uspios.h> // HID Report Items from HID 1.11 Section 6.2.2 #define HID_USAGE_PAGE 0x04 #define HID_USAGE 0x08 #define HID_COLLECTION 0xA0 #define HID_END_COLLECTION 0xC0 #define HID_REPORT_COUNT 0x94 #define HID_REPORT_SIZE 0x74 #define HID_USAGE_MIN 0x18 #define HID_USAGE_MAX 0x28 #define HID_LOGICAL_MIN 0x14 #define HID_LOGICAL_MAX 0x24 #define HID_PHYSICAL_MIN 0x34 #define HID_PHYSICAL_MAX 0x44 #define HID_INPUT 0x80 #define HID_REPORT_ID 0x84 #define HID_OUTPUT 0x90 // HID Report Usage Pages from HID Usage Tables 1.12 Section 3, Table 1 #define HID_USAGE_PAGE_GENERIC_DESKTOP 0x01 #define HID_USAGE_PAGE_KEY_CODES 0x07 #define HID_USAGE_PAGE_LEDS 0x08 #define HID_USAGE_PAGE_BUTTONS 0x09 // HID Report Usages from HID Usage Tables 1.12 Section 4, Table 6 #define HID_USAGE_POINTER 0x01 #define HID_USAGE_MOUSE 0x02 #define HID_USAGE_JOYSTICK 0x04 #define HID_USAGE_GAMEPAD 0x05 #define HID_USAGE_KEYBOARD 0x06 #define HID_USAGE_X 0x30 #define HID_USAGE_Y 0x31 #define HID_USAGE_Z 0x32 #define HID_USAGE_RX 0x33 #define HID_USAGE_RY 0x34 #define HID_USAGE_RZ 0x35 #define HID_USAGE_SLIDER 0x36 #define HID_USAGE_WHEEL 0x38 #define HID_USAGE_HATSWITCH 0x39 // HID Report Collection Types from HID 1.12 6.2.2.6 #define HID_COLLECTION_PHYSICAL 0 #define HID_COLLECTION_APPLICATION 1 // HID Input/Output/Feature Item Data (attributes) from HID 1.11 6.2.2.5 #define HID_ITEM_CONSTANT 0x1 #define HID_ITEM_VARIABLE 0x2 #define HID_ITEM_RELATIVE 0x4 static unsigned s_nDeviceNumber = 1; static const char FromUSBPad[] = "usbpad"; static boolean USBGamePadDeviceStartRequest (TUSBGamePadDevice *pThis); static void USBGamePadDeviceCompletionRoutine (TUSBRequest *pURB, void *pParam, void *pContext); static void USBGamePadDevicePS3Configure (TUSBGamePadDevice *pThis); void USBGamePadDevice (TUSBGamePadDevice *pThis, TUSBFunction *pDevice) { assert (pThis != 0); USBFunctionCopy (&pThis->m_USBFunction, pDevice); pThis->m_USBFunction.Configure = USBGamePadDeviceConfigure; pThis->m_pEndpointIn = 0; pThis->m_pEndpointOut = 0; pThis->m_pStatusHandler = 0; pThis->m_pHIDReportDescriptor = 0; pThis->m_usReportDescriptorLength = 0; pThis->m_nReportSize = 0; pThis->m_State.naxes = 0; for (int i = 0; i < MAX_AXIS; i++) { pThis->m_State.axes[i].value = 0; pThis->m_State.axes[i].minimum = 0; pThis->m_State.axes[i].maximum = 0; } pThis->m_State.nhats = 0; for (int i = 0; i < MAX_HATS; i++) pThis->m_State.hats[i] = 0; pThis->m_State.nbuttons = 0; pThis->m_State.buttons = 0; pThis->m_pReportBuffer = malloc (64); assert (pThis->m_pReportBuffer != 0); } void _CUSBGamePadDevice (TUSBGamePadDevice *pThis) { assert (pThis != 0); if (pThis->m_pHIDReportDescriptor != 0) { free (pThis->m_pHIDReportDescriptor); pThis->m_pHIDReportDescriptor = 0; } if (pThis->m_pReportBuffer != 0) { free (pThis->m_pReportBuffer); pThis->m_pReportBuffer = 0; } if (pThis->m_pEndpointIn != 0) { _USBEndpoint (pThis->m_pEndpointIn); free (pThis->m_pEndpointIn); pThis->m_pEndpointIn = 0; } if (pThis->m_pEndpointOut != 0) { _USBEndpoint (pThis->m_pEndpointOut); free (pThis->m_pEndpointOut); pThis->m_pEndpointOut = 0; } _USBFunction (&pThis->m_USBFunction); } static u32 BitGetUnsigned(void *buffer, u32 offset, u32 length) { u8* bitBuffer; u8 mask; u32 result; bitBuffer = buffer; result = 0; for (u32 i = offset / 8, j = 0; i < (offset + length + 7) / 8; i++) { if (offset / 8 == (offset + length - 1) / 8) { mask = (1 << ((offset % 8) + length)) - (1 << (offset % 8)); result = (bitBuffer[i] & mask) >> (offset % 8); } else if (i == offset / 8) { mask = 0x100 - (1 << (offset % 8)); j += 8 - (offset % 8); result = ((bitBuffer[i] & mask) >> (offset % 8)) << (length - j); } else if (i == (offset + length - 1) / 8) { mask = (1 << ((offset % 8) + length)) - 1; result |= bitBuffer[i] & mask; } else { j += 8; result |= bitBuffer[i] << (length - j); } } return result; } static s32 BitGetSigned(void* buffer, u32 offset, u32 length) { u32 result = BitGetUnsigned(buffer, offset, length); if (result & (1 << (length - 1))) result |= 0xffffffff - ((1 << length) - 1); return result; } enum { None = 0, GamePad, GamePadButton, GamePadAxis, GamePadHat, }; #define UNDEFINED -123456789 static void USBGamePadDeviceDecodeReport(TUSBGamePadDevice *pThis) { s32 item, arg; u32 offset = 0, size = 0, count = 0; s32 lmax = UNDEFINED, lmin = UNDEFINED, pmin = UNDEFINED, pmax = UNDEFINED; s32 naxes = 0, nhats = 0; u32 id = 0, state = None; u8 *pReportBuffer = pThis->m_pReportBuffer; s8 *pHIDReportDescriptor = (s8 *)pThis->m_pHIDReportDescriptor; u16 wReportDescriptorLength = pThis->m_usReportDescriptorLength; USPiGamePadState *pState = &pThis->m_State; while (wReportDescriptorLength > 0) { item = *pHIDReportDescriptor++; wReportDescriptorLength--; switch(item & 0x03) { case 0: arg = 0; break; case 1: arg = *pHIDReportDescriptor++; wReportDescriptorLength--; break; case 2: arg = *pHIDReportDescriptor++ & 0xFF; arg = arg | (*pHIDReportDescriptor++ << 8); wReportDescriptorLength -= 2; break; default: arg = *pHIDReportDescriptor++; arg = arg | (*pHIDReportDescriptor++ << 8); arg = arg | (*pHIDReportDescriptor++ << 16); arg = arg | (*pHIDReportDescriptor++ << 24); wReportDescriptorLength -= 4; break; } if ((item & 0xFC) == HID_REPORT_ID) { if (id != 0) break; id = BitGetUnsigned(pReportBuffer, 0, 8); if (id != 0 && id != arg) return; id = arg; offset = 8; } switch(item & 0xFC) { case HID_USAGE_PAGE: switch(arg) { case HID_USAGE_PAGE_BUTTONS: if (state == GamePad) state = GamePadButton; break; } break; case HID_USAGE: switch(arg) { case HID_USAGE_JOYSTICK: case HID_USAGE_GAMEPAD: state = GamePad; break; case HID_USAGE_X: case HID_USAGE_Y: case HID_USAGE_Z: case HID_USAGE_RX: case HID_USAGE_RY: case HID_USAGE_RZ: case HID_USAGE_SLIDER: if (state == GamePad) state = GamePadAxis; break; case HID_USAGE_HATSWITCH: if (state == GamePad) state = GamePadHat; break; } break; case HID_LOGICAL_MIN: lmin = arg; break; case HID_PHYSICAL_MIN: pmin = arg; break; case HID_LOGICAL_MAX: lmax = arg; break; case HID_PHYSICAL_MAX: pmax = arg; break; case HID_REPORT_SIZE: // REPORT_SIZE size = arg; break; case HID_REPORT_COUNT: // REPORT_COUNT count = arg; break; case HID_INPUT: if ((arg & 0x03) == 0x02) { // INPUT(Data,Var) if (state == GamePadAxis) { for (int i = 0; i < count && i < MAX_AXIS; i++) { pState->axes[naxes].minimum = lmin != UNDEFINED ? lmin : pmin; pState->axes[naxes].maximum = lmax != UNDEFINED ? lmax : pmax; int value = (pState->axes[naxes].minimum < 0) ? BitGetSigned(pReportBuffer, offset + i * size, size) : BitGetUnsigned(pReportBuffer, offset + i * size, size); pState->axes[naxes++].value = value; } state = GamePad; } else if (state == GamePadHat) { for (int i = 0; i < count && i < MAX_HATS; i++) { int value = BitGetUnsigned(pReportBuffer, offset + i * size, size); pState->hats[nhats++] = value; } state = GamePad; } else if (state == GamePadButton) { pState->nbuttons = count; pState->buttons = BitGetUnsigned(pReportBuffer, offset, size * count); state = GamePad; } } offset += count * size; break; case HID_OUTPUT: break; } } pState->naxes = naxes; pState->nhats = nhats; pThis->m_nReportSize = (offset + 7) / 8; } boolean USBGamePadDeviceConfigure (TUSBFunction *pUSBFunction) { TUSBGamePadDevice *pThis = (TUSBGamePadDevice *) pUSBFunction; assert (pThis != 0); if (USBFunctionGetNumEndpoints (&pThis->m_USBFunction) < 1) { USBFunctionConfigurationError (&pThis->m_USBFunction, FromUSBPad); return FALSE; } TUSBHIDDescriptor *pHIDDesc = (TUSBHIDDescriptor *) USBFunctionGetDescriptor (&pThis->m_USBFunction, DESCRIPTOR_HID); if ( pHIDDesc == 0 || pHIDDesc->wReportDescriptorLength == 0) { USBFunctionConfigurationError (&pThis->m_USBFunction, FromUSBPad); return FALSE; } const TUSBEndpointDescriptor *pEndpointDesc; while ((pEndpointDesc = (TUSBEndpointDescriptor *) USBFunctionGetDescriptor (&pThis->m_USBFunction, DESCRIPTOR_ENDPOINT)) != 0) { if ((pEndpointDesc->bmAttributes & 0x3F) == 0x03) // Interrupt { if ((pEndpointDesc->bEndpointAddress & 0x80) == 0x80) // Input { if (pThis->m_pEndpointIn != 0) { USBFunctionConfigurationError (&pThis->m_USBFunction, FromUSBPad); return FALSE; } pThis->m_pEndpointIn = (TUSBEndpoint *) malloc (sizeof (TUSBEndpoint)); assert (pThis->m_pEndpointIn != 0); USBEndpoint2 (pThis->m_pEndpointIn, USBFunctionGetDevice (&pThis->m_USBFunction), pEndpointDesc); } else // Output { if (pThis->m_pEndpointOut != 0) { USBFunctionConfigurationError (&pThis->m_USBFunction, FromUSBPad); return FALSE; } pThis->m_pEndpointOut = (TUSBEndpoint *) malloc (sizeof (TUSBEndpoint)); assert (pThis->m_pEndpointOut != 0); USBEndpoint2 (pThis->m_pEndpointOut, USBFunctionGetDevice (&pThis->m_USBFunction), pEndpointDesc); } } } if (pThis->m_pEndpointIn == 0) { USBFunctionConfigurationError (&pThis->m_USBFunction, FromUSBPad); return FALSE; } pThis->m_usReportDescriptorLength = pHIDDesc->wReportDescriptorLength; pThis->m_pHIDReportDescriptor = (unsigned char *) malloc(pHIDDesc->wReportDescriptorLength); assert (pThis->m_pHIDReportDescriptor != 0); if (DWHCIDeviceControlMessage (USBFunctionGetHost (&pThis->m_USBFunction), USBFunctionGetEndpoint0 (&pThis->m_USBFunction), REQUEST_IN | REQUEST_TO_INTERFACE, GET_DESCRIPTOR, (pHIDDesc->bReportDescriptorType << 8) | DESCRIPTOR_INDEX_DEFAULT, USBFunctionGetInterfaceNumber (&pThis->m_USBFunction), pThis->m_pHIDReportDescriptor, pHIDDesc->wReportDescriptorLength) != pHIDDesc->wReportDescriptorLength) { LogWrite (FromUSBPad, LOG_ERROR, "Cannot get HID report descriptor"); return FALSE; } //DebugHexdump (pThis->m_pHIDReportDescriptor, pHIDDesc->wReportDescriptorLength, "hid"); pThis->m_pReportBuffer[0] = 0; USBGamePadDeviceDecodeReport (pThis); // ignoring unsupported HID interface if ( pThis->m_State.naxes == 0 && pThis->m_State.nhats == 0 && pThis->m_State.nbuttons == 0) { return FALSE; } if (!USBFunctionConfigure (&pThis->m_USBFunction)) { LogWrite (FromUSBPad, LOG_ERROR, "Cannot set interface"); return FALSE; } pThis->m_nDeviceIndex = s_nDeviceNumber++; if ( USBFunctionGetDevice (pUSBFunction)->m_pDeviceDesc->idVendor == 0x054c && USBFunctionGetDevice (pUSBFunction)->m_pDeviceDesc->idProduct == 0x0268) { USBGamePadDevicePS3Configure (pThis); } TString DeviceName; String (&DeviceName); StringFormat (&DeviceName, "upad%u", pThis->m_nDeviceIndex); DeviceNameServiceAddDevice (DeviceNameServiceGet (), StringGet (&DeviceName), pThis, FALSE); _String (&DeviceName); return USBGamePadDeviceStartRequest (pThis); } void USBGamePadDeviceRegisterStatusHandler (TUSBGamePadDevice *pThis, TGamePadStatusHandler *pStatusHandler) { assert (pThis != 0); assert (pStatusHandler != 0); pThis->m_pStatusHandler = pStatusHandler; } boolean USBGamePadDeviceStartRequest (TUSBGamePadDevice *pThis) { assert (pThis != 0); assert (pThis->m_pEndpointIn != 0); assert (pThis->m_pReportBuffer != 0); USBRequest (&pThis->m_URB, pThis->m_pEndpointIn, pThis->m_pReportBuffer, pThis->m_nReportSize, 0); USBRequestSetCompletionRoutine (&pThis->m_URB, USBGamePadDeviceCompletionRoutine, 0, pThis); return DWHCIDeviceSubmitAsyncRequest (USBFunctionGetHost (&pThis->m_USBFunction), &pThis->m_URB); } void USBGamePadDeviceCompletionRoutine (TUSBRequest *pURB, void *pParam, void *pContext) { TUSBGamePadDevice *pThis = (TUSBGamePadDevice *) pContext; assert (pThis != 0); assert (pURB != 0); assert (&pThis->m_URB == pURB); if ( USBRequestGetStatus (pURB) != 0 && USBRequestGetResultLength (pURB) > 0) { //DebugHexdump (pThis->m_pReportBuffer, 16, "report"); if (pThis->m_pHIDReportDescriptor != 0 && pThis->m_pStatusHandler != 0) { USBGamePadDeviceDecodeReport (pThis); (*pThis->m_pStatusHandler) (pThis->m_nDeviceIndex - 1, &pThis->m_State); } } _USBRequest (&pThis->m_URB); USBGamePadDeviceStartRequest (pThis); } void USBGamePadDeviceGetReport (TUSBGamePadDevice *pThis) { if (DWHCIDeviceControlMessage (USBFunctionGetHost (&pThis->m_USBFunction), USBFunctionGetEndpoint0 (&pThis->m_USBFunction), REQUEST_IN | REQUEST_CLASS | REQUEST_TO_INTERFACE, GET_REPORT, (REPORT_TYPE_INPUT << 8) | 0x00, USBFunctionGetInterfaceNumber (&pThis->m_USBFunction), pThis->m_pReportBuffer, pThis->m_nReportSize) > 0) { USBGamePadDeviceDecodeReport (pThis); } } void USBGamePadDevicePS3Configure (TUSBGamePadDevice *pThis) { static u8 writeBuf[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x27, 0x10, 0x00, 0x32, 0xff, 0x27, 0x10, 0x00, 0x32, 0xff, 0x27, 0x10, 0x00, 0x32, 0xff, 0x27, 0x10, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; static u8 leds[] = { 0x00, // OFF 0x01, // LED1 0x02, // LED2 0x04, // LED3 0x08, // LED4 }; /* Special PS3 Controller enable commands */ pThis->m_pReportBuffer[0] = 0x42; pThis->m_pReportBuffer[1] = 0x0c; pThis->m_pReportBuffer[2] = 0x00; pThis->m_pReportBuffer[3] = 0x00; DWHCIDeviceControlMessage (USBFunctionGetHost (&pThis->m_USBFunction), USBFunctionGetEndpoint0 (&pThis->m_USBFunction), REQUEST_OUT | REQUEST_CLASS | REQUEST_TO_INTERFACE, SET_REPORT, (REPORT_TYPE_FEATURE << 8) | 0xf4, USBFunctionGetInterfaceNumber (&pThis->m_USBFunction), pThis->m_pReportBuffer, 4); /* Turn on LED */ writeBuf[9] |= (u8)(leds[pThis->m_nDeviceIndex] << 1); DWHCIDeviceControlMessage (USBFunctionGetHost (&pThis->m_USBFunction), USBFunctionGetEndpoint0 (&pThis->m_USBFunction), REQUEST_OUT | REQUEST_CLASS | REQUEST_TO_INTERFACE, SET_REPORT, (REPORT_TYPE_OUTPUT << 8) | 0x01, USBFunctionGetInterfaceNumber (&pThis->m_USBFunction), writeBuf, 48); }
{ "pile_set_name": "Github" }
/* * Copyright 2017 LINE Corporation * * LINE Corporation licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package com.linecorp.armeria.internal.common.grpc; import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.argThat; import static org.mockito.ArgumentMatchers.isA; import static org.mockito.Mockito.doThrow; import static org.mockito.Mockito.never; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.mockito.Mock; import org.mockito.junit.MockitoJUnit; import org.mockito.junit.MockitoRule; import org.reactivestreams.Subscription; import com.linecorp.armeria.common.HttpData; import com.linecorp.armeria.common.HttpHeaders; import com.linecorp.armeria.common.HttpStatus; import com.linecorp.armeria.common.ResponseHeaders; import com.linecorp.armeria.common.grpc.protocol.ArmeriaMessageDeframer; import com.linecorp.armeria.common.grpc.protocol.GrpcHeaderNames; import io.grpc.DecompressorRegistry; import io.grpc.Status; public class HttpStreamReaderTest { private static final ResponseHeaders HEADERS = ResponseHeaders.of(HttpStatus.OK); private static final HttpHeaders TRAILERS = HttpHeaders.of(GrpcHeaderNames.GRPC_STATUS, 2); private static final HttpData DATA = HttpData.ofUtf8("foobarbaz"); @Rule public MockitoRule mocks = MockitoJUnit.rule(); @Mock private TransportStatusListener transportStatusListener; @Mock private ArmeriaMessageDeframer deframer; @Mock private Subscription subscription; private HttpStreamReader reader; @Before public void setUp() { reader = new HttpStreamReader(DecompressorRegistry.getDefaultInstance(), deframer, transportStatusListener); } @Test public void subscribe_noServerRequests() { reader.onSubscribe(subscription); verifyNoMoreInteractions(subscription); } @Test public void subscribe_hasServerRequests_subscribeFirst() { when(deframer.isStalled()).thenReturn(true); reader.onSubscribe(subscription); verifyNoMoreInteractions(subscription); reader.request(1); verify(subscription).request(1); verifyNoMoreInteractions(subscription); } @Test public void subscribe_hasServerRequests_requestFirst() { when(deframer.isStalled()).thenReturn(true); reader.request(1); reader.onSubscribe(subscription); verify(subscription).request(1); verifyNoMoreInteractions(subscription); } @Test public void onHeaders() { reader.onSubscribe(subscription); verifyNoMoreInteractions(subscription); when(deframer.isStalled()).thenReturn(true); reader.onNext(HEADERS); verify(subscription).request(1); } @Test public void onTrailers() { reader.onSubscribe(subscription); when(deframer.isStalled()).thenReturn(true); reader.onNext(TRAILERS); verifyNoMoreInteractions(subscription); } @Test public void onMessage_noServerRequests() throws Exception { reader.onSubscribe(subscription); reader.onNext(DATA); verify(deframer).deframe(DATA, false); verifyNoMoreInteractions(subscription); } @Test public void onMessage_hasServerRequests() throws Exception { reader.onSubscribe(subscription); when(deframer.isStalled()).thenReturn(true); reader.onNext(DATA); verify(deframer).deframe(DATA, false); verify(subscription).request(1); } @Test public void onMessage_deframeError() throws Exception { doThrow(Status.INTERNAL.asRuntimeException()) .when(deframer).deframe(isA(HttpData.class), anyBoolean()); reader.onSubscribe(subscription); reader.onNext(DATA); verify(deframer).deframe(DATA, false); verify(transportStatusListener).transportReportStatus(Status.INTERNAL); verify(deframer).close(); } @Test public void onMessage_deframeError_errorListenerThrows() throws Exception { doThrow(Status.INTERNAL.asRuntimeException()) .when(deframer).deframe(isA(HttpData.class), anyBoolean()); doThrow(new IllegalStateException()) .when(transportStatusListener).transportReportStatus(isA(Status.class)); reader.onSubscribe(subscription); assertThatThrownBy(() -> reader.onNext(DATA)).isInstanceOf(IllegalStateException.class); verify(deframer).close(); } @Test public void clientDone() throws Exception { reader.onComplete(); verify(deframer).deframe(HttpData.empty(), true); verify(deframer).closeWhenComplete(); } @Test public void onComplete_when_deframer_isClosing() { when(deframer.isClosing()).thenReturn(true); reader.onComplete(); verify(deframer, never()).deframe(HttpData.empty(), true); verify(deframer, never()).closeWhenComplete(); } @Test public void serverCancelled() { reader.onSubscribe(subscription); reader.cancel(); verify(subscription).cancel(); } @Test public void httpNotOk() { reader.onSubscribe(subscription); verifyNoMoreInteractions(subscription); reader.onNext(ResponseHeaders.of(HttpStatus.UNAUTHORIZED)); verifyNoMoreInteractions(subscription); verifyNoMoreInteractions(deframer); verify(transportStatusListener).transportReportStatus( argThat(s -> s.getCode() == Status.UNAUTHENTICATED.getCode())); } }
{ "pile_set_name": "Github" }
{ "$schema": "http://json-schema.org/schema#", "required": [ "min", "max" ], "type": "object", "description": "ID Range provides a min/max of an allowed range of IDs.", "properties": { "max": { "type": "integer", "description": "Max is the end of the range, inclusive.", "format": "int64" }, "min": { "type": "integer", "description": "Min is the start of the range, inclusive.", "format": "int64" } } }
{ "pile_set_name": "Github" }
// Package difflib is a partial port of Python difflib module. // // It provides tools to compare sequences of strings and generate textual diffs. // // The following class and functions have been ported: // // - SequenceMatcher // // - unified_diff // // - context_diff // // Getting unified diffs was the main goal of the port. Keep in mind this code // is mostly suitable to output text differences in a human friendly way, there // are no guarantees generated diffs are consumable by patch(1). package difflib import ( "bufio" "bytes" "fmt" "io" "strings" ) func min(a, b int) int { if a < b { return a } return b } func max(a, b int) int { if a > b { return a } return b } func calculateRatio(matches, length int) float64 { if length > 0 { return 2.0 * float64(matches) / float64(length) } return 1.0 } type Match struct { A int B int Size int } type OpCode struct { Tag byte I1 int I2 int J1 int J2 int } // SequenceMatcher compares sequence of strings. The basic // algorithm predates, and is a little fancier than, an algorithm // published in the late 1980's by Ratcliff and Obershelp under the // hyperbolic name "gestalt pattern matching". The basic idea is to find // the longest contiguous matching subsequence that contains no "junk" // elements (R-O doesn't address junk). The same idea is then applied // recursively to the pieces of the sequences to the left and to the right // of the matching subsequence. This does not yield minimal edit // sequences, but does tend to yield matches that "look right" to people. // // SequenceMatcher tries to compute a "human-friendly diff" between two // sequences. Unlike e.g. UNIX(tm) diff, the fundamental notion is the // longest *contiguous* & junk-free matching subsequence. That's what // catches peoples' eyes. The Windows(tm) windiff has another interesting // notion, pairing up elements that appear uniquely in each sequence. // That, and the method here, appear to yield more intuitive difference // reports than does diff. This method appears to be the least vulnerable // to synching up on blocks of "junk lines", though (like blank lines in // ordinary text files, or maybe "<P>" lines in HTML files). That may be // because this is the only method of the 3 that has a *concept* of // "junk" <wink>. // // Timing: Basic R-O is cubic time worst case and quadratic time expected // case. SequenceMatcher is quadratic time for the worst case and has // expected-case behavior dependent in a complicated way on how many // elements the sequences have in common; best case time is linear. type SequenceMatcher struct { a []string b []string b2j map[string][]int IsJunk func(string) bool autoJunk bool bJunk map[string]struct{} matchingBlocks []Match fullBCount map[string]int bPopular map[string]struct{} opCodes []OpCode } func NewMatcher(a, b []string) *SequenceMatcher { m := SequenceMatcher{autoJunk: true} m.SetSeqs(a, b) return &m } func NewMatcherWithJunk(a, b []string, autoJunk bool, isJunk func(string) bool) *SequenceMatcher { m := SequenceMatcher{IsJunk: isJunk, autoJunk: autoJunk} m.SetSeqs(a, b) return &m } // Set two sequences to be compared. func (m *SequenceMatcher) SetSeqs(a, b []string) { m.SetSeq1(a) m.SetSeq2(b) } // Set the first sequence to be compared. The second sequence to be compared is // not changed. // // SequenceMatcher computes and caches detailed information about the second // sequence, so if you want to compare one sequence S against many sequences, // use .SetSeq2(s) once and call .SetSeq1(x) repeatedly for each of the other // sequences. // // See also SetSeqs() and SetSeq2(). func (m *SequenceMatcher) SetSeq1(a []string) { if &a == &m.a { return } m.a = a m.matchingBlocks = nil m.opCodes = nil } // Set the second sequence to be compared. The first sequence to be compared is // not changed. func (m *SequenceMatcher) SetSeq2(b []string) { if &b == &m.b { return } m.b = b m.matchingBlocks = nil m.opCodes = nil m.fullBCount = nil m.chainB() } func (m *SequenceMatcher) chainB() { // Populate line -> index mapping b2j := map[string][]int{} for i, s := range m.b { indices := b2j[s] indices = append(indices, i) b2j[s] = indices } // Purge junk elements m.bJunk = map[string]struct{}{} if m.IsJunk != nil { junk := m.bJunk for s, _ := range b2j { if m.IsJunk(s) { junk[s] = struct{}{} } } for s, _ := range junk { delete(b2j, s) } } // Purge remaining popular elements popular := map[string]struct{}{} n := len(m.b) if m.autoJunk && n >= 200 { ntest := n/100 + 1 for s, indices := range b2j { if len(indices) > ntest { popular[s] = struct{}{} } } for s, _ := range popular { delete(b2j, s) } } m.bPopular = popular m.b2j = b2j } func (m *SequenceMatcher) isBJunk(s string) bool { _, ok := m.bJunk[s] return ok } // Find longest matching block in a[alo:ahi] and b[blo:bhi]. // // If IsJunk is not defined: // // Return (i,j,k) such that a[i:i+k] is equal to b[j:j+k], where // alo <= i <= i+k <= ahi // blo <= j <= j+k <= bhi // and for all (i',j',k') meeting those conditions, // k >= k' // i <= i' // and if i == i', j <= j' // // In other words, of all maximal matching blocks, return one that // starts earliest in a, and of all those maximal matching blocks that // start earliest in a, return the one that starts earliest in b. // // If IsJunk is defined, first the longest matching block is // determined as above, but with the additional restriction that no // junk element appears in the block. Then that block is extended as // far as possible by matching (only) junk elements on both sides. So // the resulting block never matches on junk except as identical junk // happens to be adjacent to an "interesting" match. // // If no blocks match, return (alo, blo, 0). func (m *SequenceMatcher) findLongestMatch(alo, ahi, blo, bhi int) Match { // CAUTION: stripping common prefix or suffix would be incorrect. // E.g., // ab // acab // Longest matching block is "ab", but if common prefix is // stripped, it's "a" (tied with "b"). UNIX(tm) diff does so // strip, so ends up claiming that ab is changed to acab by // inserting "ca" in the middle. That's minimal but unintuitive: // "it's obvious" that someone inserted "ac" at the front. // Windiff ends up at the same place as diff, but by pairing up // the unique 'b's and then matching the first two 'a's. besti, bestj, bestsize := alo, blo, 0 // find longest junk-free match // during an iteration of the loop, j2len[j] = length of longest // junk-free match ending with a[i-1] and b[j] j2len := map[int]int{} for i := alo; i != ahi; i++ { // look at all instances of a[i] in b; note that because // b2j has no junk keys, the loop is skipped if a[i] is junk newj2len := map[int]int{} for _, j := range m.b2j[m.a[i]] { // a[i] matches b[j] if j < blo { continue } if j >= bhi { break } k := j2len[j-1] + 1 newj2len[j] = k if k > bestsize { besti, bestj, bestsize = i-k+1, j-k+1, k } } j2len = newj2len } // Extend the best by non-junk elements on each end. In particular, // "popular" non-junk elements aren't in b2j, which greatly speeds // the inner loop above, but also means "the best" match so far // doesn't contain any junk *or* popular non-junk elements. for besti > alo && bestj > blo && !m.isBJunk(m.b[bestj-1]) && m.a[besti-1] == m.b[bestj-1] { besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 } for besti+bestsize < ahi && bestj+bestsize < bhi && !m.isBJunk(m.b[bestj+bestsize]) && m.a[besti+bestsize] == m.b[bestj+bestsize] { bestsize += 1 } // Now that we have a wholly interesting match (albeit possibly // empty!), we may as well suck up the matching junk on each // side of it too. Can't think of a good reason not to, and it // saves post-processing the (possibly considerable) expense of // figuring out what to do with it. In the case of an empty // interesting match, this is clearly the right thing to do, // because no other kind of match is possible in the regions. for besti > alo && bestj > blo && m.isBJunk(m.b[bestj-1]) && m.a[besti-1] == m.b[bestj-1] { besti, bestj, bestsize = besti-1, bestj-1, bestsize+1 } for besti+bestsize < ahi && bestj+bestsize < bhi && m.isBJunk(m.b[bestj+bestsize]) && m.a[besti+bestsize] == m.b[bestj+bestsize] { bestsize += 1 } return Match{A: besti, B: bestj, Size: bestsize} } // Return list of triples describing matching subsequences. // // Each triple is of the form (i, j, n), and means that // a[i:i+n] == b[j:j+n]. The triples are monotonically increasing in // i and in j. It's also guaranteed that if (i, j, n) and (i', j', n') are // adjacent triples in the list, and the second is not the last triple in the // list, then i+n != i' or j+n != j'. IOW, adjacent triples never describe // adjacent equal blocks. // // The last triple is a dummy, (len(a), len(b), 0), and is the only // triple with n==0. func (m *SequenceMatcher) GetMatchingBlocks() []Match { if m.matchingBlocks != nil { return m.matchingBlocks } var matchBlocks func(alo, ahi, blo, bhi int, matched []Match) []Match matchBlocks = func(alo, ahi, blo, bhi int, matched []Match) []Match { match := m.findLongestMatch(alo, ahi, blo, bhi) i, j, k := match.A, match.B, match.Size if match.Size > 0 { if alo < i && blo < j { matched = matchBlocks(alo, i, blo, j, matched) } matched = append(matched, match) if i+k < ahi && j+k < bhi { matched = matchBlocks(i+k, ahi, j+k, bhi, matched) } } return matched } matched := matchBlocks(0, len(m.a), 0, len(m.b), nil) // It's possible that we have adjacent equal blocks in the // matching_blocks list now. nonAdjacent := []Match{} i1, j1, k1 := 0, 0, 0 for _, b := range matched { // Is this block adjacent to i1, j1, k1? i2, j2, k2 := b.A, b.B, b.Size if i1+k1 == i2 && j1+k1 == j2 { // Yes, so collapse them -- this just increases the length of // the first block by the length of the second, and the first // block so lengthened remains the block to compare against. k1 += k2 } else { // Not adjacent. Remember the first block (k1==0 means it's // the dummy we started with), and make the second block the // new block to compare against. if k1 > 0 { nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) } i1, j1, k1 = i2, j2, k2 } } if k1 > 0 { nonAdjacent = append(nonAdjacent, Match{i1, j1, k1}) } nonAdjacent = append(nonAdjacent, Match{len(m.a), len(m.b), 0}) m.matchingBlocks = nonAdjacent return m.matchingBlocks } // Return list of 5-tuples describing how to turn a into b. // // Each tuple is of the form (tag, i1, i2, j1, j2). The first tuple // has i1 == j1 == 0, and remaining tuples have i1 == the i2 from the // tuple preceding it, and likewise for j1 == the previous j2. // // The tags are characters, with these meanings: // // 'r' (replace): a[i1:i2] should be replaced by b[j1:j2] // // 'd' (delete): a[i1:i2] should be deleted, j1==j2 in this case. // // 'i' (insert): b[j1:j2] should be inserted at a[i1:i1], i1==i2 in this case. // // 'e' (equal): a[i1:i2] == b[j1:j2] func (m *SequenceMatcher) GetOpCodes() []OpCode { if m.opCodes != nil { return m.opCodes } i, j := 0, 0 matching := m.GetMatchingBlocks() opCodes := make([]OpCode, 0, len(matching)) for _, m := range matching { // invariant: we've pumped out correct diffs to change // a[:i] into b[:j], and the next matching block is // a[ai:ai+size] == b[bj:bj+size]. So we need to pump // out a diff to change a[i:ai] into b[j:bj], pump out // the matching block, and move (i,j) beyond the match ai, bj, size := m.A, m.B, m.Size tag := byte(0) if i < ai && j < bj { tag = 'r' } else if i < ai { tag = 'd' } else if j < bj { tag = 'i' } if tag > 0 { opCodes = append(opCodes, OpCode{tag, i, ai, j, bj}) } i, j = ai+size, bj+size // the list of matching blocks is terminated by a // sentinel with size 0 if size > 0 { opCodes = append(opCodes, OpCode{'e', ai, i, bj, j}) } } m.opCodes = opCodes return m.opCodes } // Isolate change clusters by eliminating ranges with no changes. // // Return a generator of groups with up to n lines of context. // Each group is in the same format as returned by GetOpCodes(). func (m *SequenceMatcher) GetGroupedOpCodes(n int) [][]OpCode { if n < 0 { n = 3 } codes := m.GetOpCodes() if len(codes) == 0 { codes = []OpCode{OpCode{'e', 0, 1, 0, 1}} } // Fixup leading and trailing groups if they show no changes. if codes[0].Tag == 'e' { c := codes[0] i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 codes[0] = OpCode{c.Tag, max(i1, i2-n), i2, max(j1, j2-n), j2} } if codes[len(codes)-1].Tag == 'e' { c := codes[len(codes)-1] i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 codes[len(codes)-1] = OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)} } nn := n + n groups := [][]OpCode{} group := []OpCode{} for _, c := range codes { i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 // End the current group and start a new one whenever // there is a large range with no changes. if c.Tag == 'e' && i2-i1 > nn { group = append(group, OpCode{c.Tag, i1, min(i2, i1+n), j1, min(j2, j1+n)}) groups = append(groups, group) group = []OpCode{} i1, j1 = max(i1, i2-n), max(j1, j2-n) } group = append(group, OpCode{c.Tag, i1, i2, j1, j2}) } if len(group) > 0 && !(len(group) == 1 && group[0].Tag == 'e') { groups = append(groups, group) } return groups } // Return a measure of the sequences' similarity (float in [0,1]). // // Where T is the total number of elements in both sequences, and // M is the number of matches, this is 2.0*M / T. // Note that this is 1 if the sequences are identical, and 0 if // they have nothing in common. // // .Ratio() is expensive to compute if you haven't already computed // .GetMatchingBlocks() or .GetOpCodes(), in which case you may // want to try .QuickRatio() or .RealQuickRation() first to get an // upper bound. func (m *SequenceMatcher) Ratio() float64 { matches := 0 for _, m := range m.GetMatchingBlocks() { matches += m.Size } return calculateRatio(matches, len(m.a)+len(m.b)) } // Return an upper bound on ratio() relatively quickly. // // This isn't defined beyond that it is an upper bound on .Ratio(), and // is faster to compute. func (m *SequenceMatcher) QuickRatio() float64 { // viewing a and b as multisets, set matches to the cardinality // of their intersection; this counts the number of matches // without regard to order, so is clearly an upper bound if m.fullBCount == nil { m.fullBCount = map[string]int{} for _, s := range m.b { m.fullBCount[s] = m.fullBCount[s] + 1 } } // avail[x] is the number of times x appears in 'b' less the // number of times we've seen it in 'a' so far ... kinda avail := map[string]int{} matches := 0 for _, s := range m.a { n, ok := avail[s] if !ok { n = m.fullBCount[s] } avail[s] = n - 1 if n > 0 { matches += 1 } } return calculateRatio(matches, len(m.a)+len(m.b)) } // Return an upper bound on ratio() very quickly. // // This isn't defined beyond that it is an upper bound on .Ratio(), and // is faster to compute than either .Ratio() or .QuickRatio(). func (m *SequenceMatcher) RealQuickRatio() float64 { la, lb := len(m.a), len(m.b) return calculateRatio(min(la, lb), la+lb) } // Convert range to the "ed" format func formatRangeUnified(start, stop int) string { // Per the diff spec at http://www.unix.org/single_unix_specification/ beginning := start + 1 // lines start numbering with one length := stop - start if length == 1 { return fmt.Sprintf("%d", beginning) } if length == 0 { beginning -= 1 // empty ranges begin at line just before the range } return fmt.Sprintf("%d,%d", beginning, length) } // Unified diff parameters type UnifiedDiff struct { A []string // First sequence lines FromFile string // First file name FromDate string // First file time B []string // Second sequence lines ToFile string // Second file name ToDate string // Second file time Eol string // Headers end of line, defaults to LF Context int // Number of context lines } // Compare two sequences of lines; generate the delta as a unified diff. // // Unified diffs are a compact way of showing line changes and a few // lines of context. The number of context lines is set by 'n' which // defaults to three. // // By default, the diff control lines (those with ---, +++, or @@) are // created with a trailing newline. This is helpful so that inputs // created from file.readlines() result in diffs that are suitable for // file.writelines() since both the inputs and outputs have trailing // newlines. // // For inputs that do not have trailing newlines, set the lineterm // argument to "" so that the output will be uniformly newline free. // // The unidiff format normally has a header for filenames and modification // times. Any or all of these may be specified using strings for // 'fromfile', 'tofile', 'fromfiledate', and 'tofiledate'. // The modification times are normally expressed in the ISO 8601 format. func WriteUnifiedDiff(writer io.Writer, diff UnifiedDiff) error { buf := bufio.NewWriter(writer) defer buf.Flush() wf := func(format string, args ...interface{}) error { _, err := buf.WriteString(fmt.Sprintf(format, args...)) return err } ws := func(s string) error { _, err := buf.WriteString(s) return err } if len(diff.Eol) == 0 { diff.Eol = "\n" } started := false m := NewMatcher(diff.A, diff.B) for _, g := range m.GetGroupedOpCodes(diff.Context) { if !started { started = true fromDate := "" if len(diff.FromDate) > 0 { fromDate = "\t" + diff.FromDate } toDate := "" if len(diff.ToDate) > 0 { toDate = "\t" + diff.ToDate } if diff.FromFile != "" || diff.ToFile != "" { err := wf("--- %s%s%s", diff.FromFile, fromDate, diff.Eol) if err != nil { return err } err = wf("+++ %s%s%s", diff.ToFile, toDate, diff.Eol) if err != nil { return err } } } first, last := g[0], g[len(g)-1] range1 := formatRangeUnified(first.I1, last.I2) range2 := formatRangeUnified(first.J1, last.J2) if err := wf("@@ -%s +%s @@%s", range1, range2, diff.Eol); err != nil { return err } for _, c := range g { i1, i2, j1, j2 := c.I1, c.I2, c.J1, c.J2 if c.Tag == 'e' { for _, line := range diff.A[i1:i2] { if err := ws(" " + line); err != nil { return err } } continue } if c.Tag == 'r' || c.Tag == 'd' { for _, line := range diff.A[i1:i2] { if err := ws("-" + line); err != nil { return err } } } if c.Tag == 'r' || c.Tag == 'i' { for _, line := range diff.B[j1:j2] { if err := ws("+" + line); err != nil { return err } } } } } return nil } // Like WriteUnifiedDiff but returns the diff a string. func GetUnifiedDiffString(diff UnifiedDiff) (string, error) { w := &bytes.Buffer{} err := WriteUnifiedDiff(w, diff) return string(w.Bytes()), err } // Convert range to the "ed" format. func formatRangeContext(start, stop int) string { // Per the diff spec at http://www.unix.org/single_unix_specification/ beginning := start + 1 // lines start numbering with one length := stop - start if length == 0 { beginning -= 1 // empty ranges begin at line just before the range } if length <= 1 { return fmt.Sprintf("%d", beginning) } return fmt.Sprintf("%d,%d", beginning, beginning+length-1) } type ContextDiff UnifiedDiff // Compare two sequences of lines; generate the delta as a context diff. // // Context diffs are a compact way of showing line changes and a few // lines of context. The number of context lines is set by diff.Context // which defaults to three. // // By default, the diff control lines (those with *** or ---) are // created with a trailing newline. // // For inputs that do not have trailing newlines, set the diff.Eol // argument to "" so that the output will be uniformly newline free. // // The context diff format normally has a header for filenames and // modification times. Any or all of these may be specified using // strings for diff.FromFile, diff.ToFile, diff.FromDate, diff.ToDate. // The modification times are normally expressed in the ISO 8601 format. // If not specified, the strings default to blanks. func WriteContextDiff(writer io.Writer, diff ContextDiff) error { buf := bufio.NewWriter(writer) defer buf.Flush() var diffErr error wf := func(format string, args ...interface{}) { _, err := buf.WriteString(fmt.Sprintf(format, args...)) if diffErr == nil && err != nil { diffErr = err } } ws := func(s string) { _, err := buf.WriteString(s) if diffErr == nil && err != nil { diffErr = err } } if len(diff.Eol) == 0 { diff.Eol = "\n" } prefix := map[byte]string{ 'i': "+ ", 'd': "- ", 'r': "! ", 'e': " ", } started := false m := NewMatcher(diff.A, diff.B) for _, g := range m.GetGroupedOpCodes(diff.Context) { if !started { started = true fromDate := "" if len(diff.FromDate) > 0 { fromDate = "\t" + diff.FromDate } toDate := "" if len(diff.ToDate) > 0 { toDate = "\t" + diff.ToDate } if diff.FromFile != "" || diff.ToFile != "" { wf("*** %s%s%s", diff.FromFile, fromDate, diff.Eol) wf("--- %s%s%s", diff.ToFile, toDate, diff.Eol) } } first, last := g[0], g[len(g)-1] ws("***************" + diff.Eol) range1 := formatRangeContext(first.I1, last.I2) wf("*** %s ****%s", range1, diff.Eol) for _, c := range g { if c.Tag == 'r' || c.Tag == 'd' { for _, cc := range g { if cc.Tag == 'i' { continue } for _, line := range diff.A[cc.I1:cc.I2] { ws(prefix[cc.Tag] + line) } } break } } range2 := formatRangeContext(first.J1, last.J2) wf("--- %s ----%s", range2, diff.Eol) for _, c := range g { if c.Tag == 'r' || c.Tag == 'i' { for _, cc := range g { if cc.Tag == 'd' { continue } for _, line := range diff.B[cc.J1:cc.J2] { ws(prefix[cc.Tag] + line) } } break } } } return diffErr } // Like WriteContextDiff but returns the diff a string. func GetContextDiffString(diff ContextDiff) (string, error) { w := &bytes.Buffer{} err := WriteContextDiff(w, diff) return string(w.Bytes()), err } // Split a string on "\n" while preserving them. The output can be used // as input for UnifiedDiff and ContextDiff structures. func SplitLines(s string) []string { lines := strings.SplitAfter(s, "\n") lines[len(lines)-1] += "\n" return lines }
{ "pile_set_name": "Github" }
ALTER TABLE db_version CHANGE COLUMN required_s2383_01_mangos_seal_of_righteousness_proc_restored required_s2384_01_mangos_seal_of_righteousness_cleanup bit; DELETE FROM `npc_trainer_template` WHERE `spell` IN (20154, 20271, 21084); DELETE FROM `npc_trainer` WHERE `spell` IN (20154, 20271, 21084);
{ "pile_set_name": "Github" }
/* Copyright (C) 2017 olie.xdev <[email protected]> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/> */ package com.health.openscale.core.bodymetric; import com.health.openscale.core.datatypes.ScaleMeasurement; import com.health.openscale.core.datatypes.ScaleUser; public class BFGallagherAsian extends EstimatedFatMetric { @Override public String getName() { return "Gallagher et. al [asian] (2000)"; } @Override public float getFat(ScaleUser user, ScaleMeasurement data) { if (user.getGender().isMale()) { // asian male return 51.9f - 740.0f * (1.0f / data.getBMI(user.getBodyHeight())) + 0.029f * user.getAge(data.getDateTime()); } // asian female return 64.8f - 752.0f * (1.0f / data.getBMI(user.getBodyHeight())) + 0.016f * user.getAge(data.getDateTime()); } }
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package demoapp.dom.types.javalang.shorts.holder; import org.apache.isis.applib.annotation.Action; import org.apache.isis.applib.annotation.ActionLayout; import org.apache.isis.applib.annotation.Optionality; import org.apache.isis.applib.annotation.Parameter; import org.apache.isis.applib.annotation.PromptStyle; import org.apache.isis.applib.annotation.SemanticsOf; import lombok.RequiredArgsConstructor; //tag::class[] @Action( semantics = SemanticsOf.IDEMPOTENT, associateWith = "readOnlyOptionalProperty", associateWithSequence = "1" ) @ActionLayout(promptStyle = PromptStyle.INLINE, named = "Update") @RequiredArgsConstructor public class WrapperShortHolder_updateReadOnlyOptionalProperty { private final WrapperShortHolder holder; public WrapperShortHolder act( @Parameter(optionality = Optionality.OPTIONAL) // <.> Short newValue ) { holder.setReadOnlyOptionalProperty(newValue); return holder; } public Short default0Act() { return holder.getReadOnlyOptionalProperty(); } } //end::class[]
{ "pile_set_name": "Github" }
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Foo\Bar; class A {} class B {}
{ "pile_set_name": "Github" }
import dayjs from 'dayjs' const locale = { name: 'fo', weekdays: 'sunnudagur_mánadagur_týsdagur_mikudagur_hósdagur_fríggjadagur_leygardagur'.split('_'), months: 'januar_februar_mars_apríl_mai_juni_juli_august_september_oktober_november_desember'.split('_'), weekStart: 1, weekdaysShort: 'sun_mán_týs_mik_hós_frí_ley'.split('_'), monthsShort: 'jan_feb_mar_apr_mai_jun_jul_aug_sep_okt_nov_des'.split('_'), weekdaysMin: 'su_má_tý_mi_hó_fr_le'.split('_'), ordinal: n => n } dayjs.locale(locale, null, true) export default locale
{ "pile_set_name": "Github" }
using Dermayon.Common.Events; using System; using System.Collections.Generic; using System.Text; namespace Pos.Event.Contracts { [Event("CustomerUpdated")] public class CustomerUpdatedEvent : IEvent { public Guid CustomerId { get; set; } public string Name { get; set; } public string Phone { get; set; } public string Address { get; set; } public DateTime CreatedAt { get; set; } } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <resources> <string name="code">ja</string> <string name="app_name">ペルシャ暦</string> <string name="cancel">止める</string> <string name="widget_name">ペルシャ暦</string> <string name="widget_mini_name">ペルシャ暦</string> <string name="latitude">緯度</string> <string name="longitude">経度</string> <string name="settings">設定</string> <string name="exit">出る</string> <string name="enable_persian_digits">ペルシャ語で数字を表示する</string> <string name="persian_digits">ペルシャ番号</string> <string name="showing_clock_on_widget">ウィジェットで時間を表示</string> <string name="clock_on_widget">ウィジェット内の時間</string> <string name="showing_clock_in_24">24時間表示</string> <string name="clock_in_24">24時間表示</string> <string name="about">就いて</string> <string name="gpl_logo">GNU一般公衆利用許諾契約書</string> <string name="date_converter">日付を変換 </string> <string name="widget_text_color">ウィジェットのテキストの色</string> <string name="select_widgets_text_color">ウィジェットテキストの色を選ぶ</string> <string name="notify_date">通知を点ける</string> <string name="enable_notify">日付通知を永久に有効にする</string> <string name="select_skin">テーマを選ぶ</string> <string name="skin">テーム</string> <string name="pray_methods">計算方法</string> <string name="pray_methods_calculation">礼拝時刻の計算方法</string> <string name="altitude">高さ</string> <string name="altitude_praytime">メートルで(任意)</string> <string name="gps_location">GPSから情報を得る</string> <string name="gps_location_help">この方法がうまくいけば、他の設定は不要です</string> <string name="location">場所</string> <string name="location_help">リストにない場合は、座標を追加</string> <string name="showing_iran_time">イランの時代のいたるところにウィジェット、通知バー、アプリケーションを表示します。海外のイラン人に適しています</string> <string name="iran_time">イランの時間</string> <string name="compass">羅針盤</string> <string name="compass_not_found">羅針盤センサーが見つかりませんでした</string> <string name="language">言葉</string> <string name="version">%1$s字体</string> <string name="athan">アダン</string> <string name="athan_alarm_summary">これらの祈りの アダン</string> <string name="athan_alarm">アダン</string> <string name="athan_volume_summary">アダンの音量</string> <string name="athan_volume">音量</string> <string name="athan_disabled_summary">アダンを使うには、リストから場所を選択するか、あなたの場所の詳細を追加してください</string> <string name="athan_gap">実際のアダンとアプリケーションのアダンの間の距離</string> <string name="athan_gap_summary">アダンの何分前に通知音が鳴る</string> <string name="closeDrawer">閉じる</string> <string name="openDrawer">開く</string> <string name="imsak">エムサーク</string> <string name="fajr">朝のアダン</string> <string name="dhuhr">昼のアダン</string> <string name="asr">夕方</string> <string name="maghrib">日没のアダン</string> <string name="isha">エシャー</string> <string name="sunrise">日の出</string> <string name="sunset">夕焼け</string> <string name="midnight">深夜</string> <string name="owghat">礼拝時刻</string> <string name="events">祝日</string> <string name="events_summary">カレンダーにはどんな種類の祝日が表示されますか</string> <string name="today">今日</string> <string name="return_to_today">今日に行く</string> <string name="select_type_date">どの種類の日付を選択する</string> <string name="year">年</string> <string name="month">月</string> <string name="day">日</string> <string name="select_year">年を選ぶ</string> <string name="select_month">月を選ぶ</string> <string name="select_day">日を選ぶ</string> <string name="date_exception">日付は違います</string> <string name="in_city_time">現地時間</string> <string name="date_copied_clipboard">«%1$s»メモリに保存しました</string> <string name="stop">ストップ</string> <string name="goto_date">別の日に行く</string> <string name="go">行く</string> <string name="pleasewaitgps">少し待って、1分経っても何も起こらない場合は、GPSがデバイス設定で有効になっていることを確認してください。それでもうまくいかない場合は、他の方法を試してみる必要があります。</string> <string name="notify_date_lock_screen">画面ロックで通知を表示</string> <string name="notify_date_lock_screen_summary">Only when a lock screen security method is set.</string> <string name="warn_if_events_not_set">To select and show holidays and events you like, go to the settings</string> <string name="date_diff_text">Distance: %1$s days (~%2$s years and %3$s months and %4$s days)</string> <string name="calendars_priority">Calendars Priority</string> <string name="calendars_priority_summary">Set calendars to show priority or hide them</string> <string name="week_of_year">Week of Year</string> <string name="week_of_year_summary">Show week of year on calendar</string> <string name="accept">確認する</string> <string name="calendar">暦</string> <string name="week_start">週の初日</string> <string name="week_start_summary">週の初日を選ぶ</string> <string name="week_ends">Weekends</string> <string name="week_ends_summary">Select weekends days</string> <string name="search_in_events">Search in events</string> <string name="show_device_calendar_events_summary">Show personal calendar events</string> <string name="show_device_calendar_events">Personal Calendar Events</string> <string name="add_event">予定を追加</string> <string name="device_calendar_does_not_support">Device calendar does not support the action</string> <string name="customize_widget_summary">What to show from notification and widgets to make them more compact</string> <string name="customize_widget">Widget Customization</string> <string name="add">加算</string> <string name="which_one_to_show">Which one to show</string> <string name="notification_athan">Athan Notification</string> <string name="enable_notification_athan">Show Athan as a notification and device vibration</string> <string name="returned_to_default">Returned to default</string> <string name="custom_notification_is_set">Custom notification is just set</string> <string name="custom_athan">Select Athan</string> <string name="default_athan">Default Athan</string> <string name="default_athan_summary">Return to default Athan</string> <string name="default_athan_name">Abdul-Basit Abdel-Samad</string> <string name="about_license">許可</string> <string name="about_license_title">Application License</string> <string name="about_license_sum">Check GPL3 License and other license terms used on Persian Calendar.</string> <string name="about_license_dialog_close">Close</string> <string name="help">案内</string> <string name="about_report_bug">問題を報告します</string> <string name="about_report_bug_sum">Preferred bug reporting or requesting for new feature, needs a GitHub account</string> <string name="about_sendMail">Eメール</string> <string name="about_noClient">No email client is installed</string> <string name="about_developers">開発者</string> <string name="about_support_developers">Developer Support</string> <string name="about_email_sum">Send personal email to the author of the app</string> <string name="gps_internet_desc">"Enable device's GPS and Internet connection to find your location, please. The app needs this only once, however, if you move to a new location, accessing to GPS and Internet is needed again."</string> <string name="start_of_year_diff">%1$s days (~%2$s weeks or %3$s months) from start of the year</string> <string name="end_of_year_diff">%1$s days (~%2$s weeks or %3$s months) to end of the year</string> <!-- Sun Info --> <string name="sunriseSunView">日の出</string> <string name="middaySunView">正午</string> <string name="sunsetSunView">日没</string> <string name="no_event">No event or appointment for this day.</string> <string name="length_of_day">Daytime: %1$sh %2$sm</string> <string name="remaining_daylight">Remaining: %1$sh %2$sm</string> <string name="more">More</string> <string name="zodiac">天宮図</string> <string name="capricorn">磨羯宮</string> <string name="aquarius">宝瓶宮</string> <string name="pisces">双魚宮</string> <string name="aries">白羊宮</string> <string name="taurus">金牛宮</string> <string name="gemini">双児宮</string> <string name="cancer">巨蟹宮</string> <string name="leo">獅子宮</string> <string name="virgo">処女宮</string> <string name="libra">天秤宮</string> <string name="scorpio">天蠍宮</string> <string name="sagittarius">人馬宮</string> <string name="year_name">十二支</string> <string name="year1">申</string> <string name="year2">酉</string> <string name="year3">戌</string> <string name="year4">亥</string> <string name="year5">子</string> <string name="year6">丑</string> <string name="year7">寅</string> <string name="year8">卯</string> <string name="year9">辰</string> <string name="year10">巳</string> <string name="year11">午</string> <string name="year12">未</string> <string name="level">Level</string> <string name="calibrate_compass_summary">For improving compass sensor accuracy move the phone away from any magnetic objects, tilt and rotate the device back and forth on every axis.</string> <string name="set_location">In order to have Sun and Moon location, and Qibla direction, set the location in the settings</string> <string name="moonInScorpio">Moon is in Scorpio</string> <string name="astronomical_info">Astronomical Information</string> <string name="astronomical_info_summary">Show additional information like constellation, years names and moon in scorpio</string> <string name="islamic_offset">Islamic offset</string> <string name="islamic_offset_summary">Adjust Islamic calendar by adding a number</string> <string name="pref_header_interface_calendar">界面と暦</string> <string name="pref_header_widget_location">ウィジェットと通知</string> <string name="pref_header_location_athan">Location and Athan</string> <string name="pref_interface">界面</string> <string name="resume">続ける</string> <string name="continue_button">続ける</string> <!--Permissions--> <string name="location_access">Location Access</string> <string name="phone_location_required">This part of the app needs location permission, if you choose deny you have to enter your latitude and longitude manually.</string> <string name="calendar_access">Calendar Access</string> <string name="phone_calendar_required">This part of the app needs calendar permission, if you allow it your personal events will be shown on the calendar.</string> <!--TalkBack, a11y--> <string name="previous_month">先月</string> <string name="next_month">来月</string> <string name="week_days_name_column">%1$s column in days table</string> <string name="equivalent_to">等しい</string> <string name="holiday_reason">Holiday because of</string> <string name="nth_week_of_year">%1$s week of year</string> <!-- New additions, to be categorized, keep the section on your translation --> <string name="empty" /> <string name="north">北</string> <string name="east">東</string> <string name="south">南</string> <string name="west">西</string> <string name="qibla">キブラ</string> <string name="outdated_app">Due to being outdated, things may be incorrect</string> <string name="update">Update</string> <string name="spring_equinox">Spring equinox time of year %1$s: %2$s</string> <string name="shift_work_settings">Shift work settings</string> <string name="ask_user_to_set_location">Set the location in the settings in order to see pray times here</string> <string name="remove">消す</string> <string name="shift_work_starting_date">%1$s, selected on the calendar, is shift work starting day.</string> <string name="shift_work_starting_date_edit">%1$s, previously selected, is the chosen shift work starting day.</string> <string name="shift_work_reset_button">Disable or reprogram</string> <string name="n_minutes">%1$s 分</string> <string name="n_hours">%1$s 時間</string> <string name="n_minutes_and_hours">%1$s hours and %2$s minutes</string> <string name="device_info">Device Information</string> <string name="center_align_widgets_summary">Center aligning 4x1 and 2x2 widgets</string> <string name="center_align_widgets">Center align the widgets</string> <string name="n_till">%1$s till to %2$s</string> <string name="shift_work_record_title">%1$s day(s) %2$s</string> <string name="recurs">繰り返す</string> <string name="am">午前</string> <string name="pm">午後</string> <string name="shift_work_days_head">長さ</string> <string name="prefer_linear_date_summary">Use 2000/1/1 instead 1 January 2000 in widget and notification</string> <string name="prefer_linear_date">Prefer numerical form of dates</string> <string name="month_overview">Month\'s events</string> <string name="map">地図</string> <string name="enable_ascending_athan_volume">アザンの声は1分以内にピークに達します</string> <string name="ascending_athan_volume">アザンの音の増加</string> <string name="widget_background_color">Widget Background Color</string> <string name="select_widgets_background_color">Select custom color for widgets background</string> <string name="share">Share</string> </resources>
{ "pile_set_name": "Github" }
/******************************************************************************* * Copyright (c) 2014 Salesforce.com, inc.. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Salesforce.com, inc. - initial API and implementation ******************************************************************************/ package com.salesforce.ide.ui.wizards.components.apex.page; import org.eclipse.jface.text.templates.ContextTypeRegistry; import org.eclipse.jface.text.templates.TemplateContext; import org.eclipse.jface.text.templates.TemplateContextType; import org.eclipse.jface.text.templates.persistence.TemplateStore; import com.salesforce.ide.core.internal.components.apex.page.ApexPageComponentController; import com.salesforce.ide.core.internal.utils.Utils; import com.salesforce.ide.core.project.ForceProjectException; import com.salesforce.ide.ui.editors.ForceIdeEditorsPlugin; import com.salesforce.ide.ui.editors.templates.ApexPageTemplateContextType; import com.salesforce.ide.ui.editors.templates.CodeTemplateContext; import com.salesforce.ide.ui.wizards.components.AbstractTemplateSelectionPage; import com.salesforce.ide.ui.wizards.components.ComponentWizardPage; import com.salesforce.ide.ui.wizards.components.TemplateSelectionWizard; /** * Wizard to create new Apex Class. * * @author cwall */ public class ApexPageWizard extends TemplateSelectionWizard { public ApexPageWizard() throws ForceProjectException { super(); controller = new ApexPageComponentController(); } @Override protected ComponentWizardPage getComponentWizardPageInstance() { return new ApexPageWizardPage(this); } @Override public void addPages() { super.addPages(); super.addPage(new ApexPageTemplateSelectionPage(getTemplateStore())); } @Override public boolean performFinish() { if (!getComponentController().canComplete()) { return false; } final ComponentWizardPage wizardPage = getWizardPage(); // create component based on given user input try { wizardPage.saveUserInput(); wizardPage.clearMessages(); // set focus on label or name if focus is returned, eg remote name check fails if (wizardPage.getBaseComponentWizardComposite().getTxtLabel() != null) { wizardPage.getBaseComponentWizardComposite().getTxtLabel().setFocus(); } else if (wizardPage.getBaseComponentWizardComposite().getTxtName() != null) { wizardPage.getBaseComponentWizardComposite().getTxtName().setFocus(); } TemplateContextType contextType = getTemplateContextRegistry().getContextType(ApexPageTemplateContextType.ID); TemplateContext context = new CodeTemplateContext(contextType, getComponentWizardModel(), 0, 0); final AbstractTemplateSelectionPage page = (AbstractTemplateSelectionPage) getPage(ApexPageTemplateSelectionPage.class.getSimpleName()); final String body = page.getTemplateString(context); if (null != body) { getComponentController().getComponent().initNewBody(body); } return executeCreateOperation(); } catch (Exception e) { Utils.openError(e, true, "Unable to create " + getComponentType() + "."); return false; } } private static ContextTypeRegistry getTemplateContextRegistry() { // TODO: Inject the Apex template context registry. return ForceIdeEditorsPlugin.getDefault().getVisualforceTemplateContextRegistry(); } private static TemplateStore getTemplateStore() { // TODO: Inject the Visualforce template store. return ForceIdeEditorsPlugin.getDefault().getVisualforceTemplateStore(); } }
{ "pile_set_name": "Github" }
import { LocaleInput } from '@fullcalendar/common' export default { code: "ja", buttonText: { prev: "前", next: "次", today: "今日", month: "月", week: "週", day: "日", list: "予定リスト" }, weekText: "週", allDayText: "終日", moreLinkText: function(n) { return "他 " + n + " 件"; }, noEventsText: "表示する予定はありません" } as LocaleInput
{ "pile_set_name": "Github" }
/* * Copyright (c) 2002-2020 "Neo4j," * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package org.neo4j.codegen; import java.lang.reflect.Modifier; import java.util.Arrays; import java.util.LinkedList; import java.util.List; import java.util.Objects; import org.neo4j.values.AnyValue; public class TypeReference { public static Bound extending( Class<?> type ) { return extending( typeReference( type ) ); } public static Bound extending( final TypeReference type ) { return new Bound( type ) { @Override public TypeReference extendsBound() { return type; } @Override public TypeReference superBound() { return null; } }; } private static TypeReference primitiveType( Class<?> base ) { return new TypeReference( "", base.getSimpleName(), true, 0, false, null, base.getModifiers() ); } private static TypeReference primitiveArray( Class<?> base, int arrayDepth ) { assert base.isPrimitive(); return new TypeReference( "", base.getSimpleName(), false, arrayDepth, false, null, base.getModifiers() ); } public static TypeReference typeReference( Class<?> type ) { if ( type == void.class ) { return VOID; } if ( type == Object.class ) { return OBJECT; } Class<?> innerType = type; int arrayDepth = 0; while ( innerType.isArray() ) { innerType = innerType.getComponentType(); arrayDepth++; } if ( innerType.isPrimitive() ) { return arrayDepth > 0 ? primitiveArray( innerType, arrayDepth ) : primitiveType( innerType ); } else { String packageName = ""; String name; TypeReference declaringTypeReference = null; Package typePackage = innerType.getPackage(); if ( typePackage != null ) { packageName = typePackage.getName(); } Class<?> declaringClass = innerType.getDeclaringClass(); if ( declaringClass != null ) { declaringTypeReference = typeReference( declaringClass ); } name = innerType.getSimpleName(); return new TypeReference( packageName, name, type.isPrimitive(), arrayDepth, false, declaringTypeReference, type.getModifiers() ); } } public static TypeReference typeParameter( String name ) { return new TypeReference( "", name, false, 0, true, null, Modifier.PUBLIC ); } public static TypeReference arrayOf( TypeReference type ) { return new TypeReference( type.packageName, type.name, false, type.arrayDepth + 1, false, type.declaringClass, type.modifiers ); } public static TypeReference parameterizedType( Class<?> base, Class<?>... parameters ) { return parameterizedType( typeReference( base ), typeReferences( parameters ) ); } public static TypeReference parameterizedType( Class<?> base, TypeReference... parameters ) { return parameterizedType( typeReference( base ), parameters ); } public static TypeReference parameterizedType( TypeReference base, TypeReference... parameters ) { return new TypeReference( base.packageName, base.name, false, base.arrayDepth, false, base.declaringClass, base.modifiers, parameters ); } public static TypeReference[] typeReferences( Class<?> first, Class<?>[] more ) { TypeReference[] result = new TypeReference[more.length + 1]; result[0] = typeReference( first ); for ( int i = 0; i < more.length; i++ ) { result[i + 1] = typeReference( more[i] ); } return result; } public static TypeReference[] typeReferences( Class<?>[] types ) { TypeReference[] result = new TypeReference[types.length]; for ( int i = 0; i < result.length; i++ ) { result[i] = typeReference( types[i] ); } return result; } public static TypeReference toBoxedType( TypeReference in ) { switch ( in.fullName() ) { case "byte": return TypeReference.typeReference( Byte.class ); case "short": return TypeReference.typeReference( Short.class ); case "int": return TypeReference.typeReference( Integer.class ); case "long": return TypeReference.typeReference( Long.class ); case "char": return TypeReference.typeReference( Character.class ); case "boolean": return TypeReference.typeReference( Boolean.class ); case "float": return TypeReference.typeReference( Float.class ); case "double": return TypeReference.typeReference( Double.class ); default: return in; } } private final String packageName; private final String name; private final TypeReference[] parameters; private final boolean isPrimitive; private final int arrayDepth; private final boolean isTypeParameter; private final TypeReference declaringClass; private final int modifiers; public static final TypeReference VOID = new TypeReference( "", "void", true, 0, false, null, void.class.getModifiers() ); public static final TypeReference OBJECT = new TypeReference( "java.lang", "Object", false, 0, false, null, Object.class.getModifiers() ); public static final TypeReference BOOLEAN = new TypeReference( "", "boolean", true, 0, false, null, boolean.class.getModifiers() ); public static final TypeReference INT = new TypeReference( "", "int", true, 0, false, null, int.class.getModifiers() ); public static final TypeReference LONG = new TypeReference( "", "long", true, 0, false, null, long.class.getModifiers() ); public static final TypeReference DOUBLE = new TypeReference( "", "double", true, 0, false, null, double.class.getModifiers() ); public static final TypeReference BOOLEAN_ARRAY = new TypeReference( "", "boolean", false, 1, false, null, boolean.class.getModifiers() ); public static final TypeReference INT_ARRAY = new TypeReference( "", "int", false, 1, false, null, int.class.getModifiers() ); public static final TypeReference LONG_ARRAY = new TypeReference( "", "long", false, 1, false, null, long.class.getModifiers() ); public static final TypeReference DOUBLE_ARRAY = new TypeReference( "", "double", false, 1, false, null, double.class.getModifiers() ); public static final TypeReference VALUE = new TypeReference( "org.neo4j.values", "AnyValue", false, 0, false, null, AnyValue.class.getModifiers() ); static final TypeReference[] NO_TYPES = new TypeReference[0]; TypeReference( String packageName, String name, boolean isPrimitive, int arrayDepth, boolean isTypeParameter, TypeReference declaringClass, int modifiers, TypeReference... parameters ) { this.packageName = packageName; this.name = name; this.isPrimitive = isPrimitive; this.arrayDepth = arrayDepth; this.isTypeParameter = isTypeParameter; this.declaringClass = declaringClass; this.modifiers = modifiers; this.parameters = parameters; } public String packageName() { return packageName; } public String name() { return name; } public String simpleName() { StringBuilder builder = new StringBuilder( name ); builder.append( "[]".repeat( Math.max( 0, arrayDepth ) ) ); return builder.toString(); } public boolean isPrimitive() { return isPrimitive; } boolean isTypeParameter() { return isTypeParameter; } public boolean isGeneric() { return parameters == null || parameters.length > 0; } public List<TypeReference> parameters() { return List.of( parameters ); } public String fullName() { return writeTo( new StringBuilder() ).toString(); } public boolean isArray() { return arrayDepth > 0; } int arrayDepth() { return arrayDepth; } public boolean isVoid() { return this == VOID; } public boolean isInnerClass() { return declaringClass != null; } List<TypeReference> declaringClasses() { LinkedList<TypeReference> parents = new LinkedList<>(); TypeReference parent = declaringClass; while ( parent != null ) { parents.addFirst( parent ); parent = parent.declaringClass; } return parents; } public int modifiers() { return modifiers; } @Override public boolean equals( Object o ) { if ( this == o ) { return true; } if ( o == null || getClass() != o.getClass() ) { return false; } TypeReference reference = (TypeReference) o; if ( isPrimitive != reference.isPrimitive ) { return false; } if ( arrayDepth != reference.arrayDepth ) { return false; } if ( isTypeParameter != reference.isTypeParameter ) { return false; } if ( modifiers != reference.modifiers ) { return false; } if ( !Objects.equals( packageName, reference.packageName ) ) { return false; } if ( !Objects.equals( name, reference.name ) ) { return false; } // Probably incorrect - comparing Object[] arrays with Arrays.equals if ( !Arrays.equals( parameters, reference.parameters ) ) { return false; } return Objects.equals( declaringClass, reference.declaringClass ); } @Override public int hashCode() { int result = packageName != null ? packageName.hashCode() : 0; result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + Arrays.hashCode( parameters ); result = 31 * result + (isPrimitive ? 1 : 0); result = 31 * result + arrayDepth; result = 31 * result + (isTypeParameter ? 1 : 0); result = 31 * result + (declaringClass != null ? declaringClass.hashCode() : 0); result = 31 * result + modifiers; return result; } String baseName() { return writeBaseType( new StringBuilder() ).toString(); } @Override public String toString() { return writeTo( new StringBuilder().append( "TypeReference[" ) ).append( ']' ).toString(); } StringBuilder writeTo( StringBuilder result ) { writeBaseType( result ); result.append( "[]".repeat( Math.max( 0, arrayDepth ) ) ); if ( !(parameters == null || parameters.length == 0) ) { result.append( '<' ); String sep = ""; for ( TypeReference parameter : parameters ) { parameter.writeTo( result.append( sep ) ); sep = ","; } result.append( '>' ); } return result; } private StringBuilder writeBaseType( StringBuilder result ) { if ( !packageName.isEmpty() ) { result.append( packageName ).append( '.' ); } List<TypeReference> parents = declaringClasses(); for ( TypeReference parent : parents ) { result.append( parent.name ).append( '.' ); } result.append( name ); return result; } public abstract static class Bound { private final TypeReference type; private Bound( TypeReference type ) { this.type = type; } public abstract TypeReference extendsBound(); public abstract TypeReference superBound(); } }
{ "pile_set_name": "Github" }
[access "refs/heads/*"] abandon = group tripleo-quickstart-core label-Code-Review = -2..+2 group tripleo-quickstart-core label-Verified = -1..+1 group tripleo-ci label-Workflow = -1..+1 group tripleo-quickstart-core [receive] requireChangeId = true requireContributorAgreement = true [submit] mergeContent = true
{ "pile_set_name": "Github" }
/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 2.0.4 * * Do not make changes to this file unless you know what you are doing--modify * the SWIG interface file instead. * ----------------------------------------------------------------------------- */ package org.robovm.libimobiledevice.binding; public class LibIMobileDevice implements LibIMobileDeviceConstants { public static PlistRef plist_new_dict() { long cPtr = LibIMobileDeviceJNI.plist_new_dict(); return (cPtr == 0) ? null : new PlistRef(cPtr, false); } public static void plist_free(PlistRef plist) { LibIMobileDeviceJNI.plist_free(PlistRef.getCPtr(plist), plist); } public static void plist_to_bin(PlistRef plist, ByteArrayOut plist_bin, IntOut length) { LibIMobileDeviceJNI.plist_to_bin(PlistRef.getCPtr(plist), plist, ByteArrayOut.getCPtr(plist_bin), plist_bin, IntOut.getCPtr(length), length); } public static void plist_to_xml(PlistRef plist, ByteArrayOut plist_xml, IntOut length) { LibIMobileDeviceJNI.plist_to_xml(PlistRef.getCPtr(plist), plist, ByteArrayOut.getCPtr(plist_xml), plist_xml, IntOut.getCPtr(length), length); } public static void plist_from_bin(byte[] plist_bin, int length, PlistRefOut plist) { LibIMobileDeviceJNI.plist_from_bin(plist_bin, length, PlistRefOut.getCPtr(plist), plist); } public static void delete_StringOut_value(StringOut s) { LibIMobileDeviceJNI.delete_StringOut_value(StringOut.getCPtr(s), s); } public static void delete_ByteArrayOut_value(ByteArrayOut s) { LibIMobileDeviceJNI.delete_ByteArrayOut_value(ByteArrayOut.getCPtr(s), s); } public static void delete_StringArray_values(StringArray s, int length) { LibIMobileDeviceJNI.delete_StringArray_values(StringArray.getCPtr(s), s, length); } public static void delete_StringArray_values_z(StringArray s) { LibIMobileDeviceJNI.delete_StringArray_values_z(StringArray.getCPtr(s), s); } public static long get_global_instproxy_status_cb() { return LibIMobileDeviceJNI.get_global_instproxy_status_cb(); } public static long get_global_idevice_event_cb() { return LibIMobileDeviceJNI.get_global_idevice_event_cb(); } public static MobileImageMounterError upload_image(MobileImageMounterClientRef client, String image_path, String image_type, byte[] sig, long sig_size) { return MobileImageMounterError.swigToEnum(LibIMobileDeviceJNI.upload_image(MobileImageMounterClientRef.getCPtr(client), client, image_path, image_type, sig, sig_size)); } public static void idevice_set_debug_level(int level) { LibIMobileDeviceJNI.idevice_set_debug_level(level); } public static IDeviceError idevice_event_subscribe(long callback, int user_data) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_event_subscribe(callback, user_data)); } public static IDeviceError idevice_event_unsubscribe() { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_event_unsubscribe()); } public static IDeviceError idevice_get_device_list(StringArrayOut devices, IntOut count) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_get_device_list(StringArrayOut.getCPtr(devices), devices, IntOut.getCPtr(count), count)); } public static IDeviceError idevice_device_list_free(StringArray devices) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_device_list_free(StringArray.getCPtr(devices), devices)); } public static IDeviceError idevice_new(IDeviceRefOut device, String udid) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_new(IDeviceRefOut.getCPtr(device), device, udid)); } public static IDeviceError idevice_free(IDeviceRef device) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_free(IDeviceRef.getCPtr(device), device)); } public static IDeviceError idevice_connect(IDeviceRef device, short port, IDeviceConnectionRefOut connection) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_connect(IDeviceRef.getCPtr(device), device, port, IDeviceConnectionRefOut.getCPtr(connection), connection)); } public static IDeviceError idevice_disconnect(IDeviceConnectionRef connection) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_disconnect(IDeviceConnectionRef.getCPtr(connection), connection)); } public static IDeviceError idevice_connection_send(IDeviceConnectionRef connection, byte[] data, int len, IntOut sent_bytes) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_connection_send(IDeviceConnectionRef.getCPtr(connection), connection, data, len, IntOut.getCPtr(sent_bytes), sent_bytes)); } public static IDeviceError idevice_connection_receive_timeout(IDeviceConnectionRef connection, byte[] data, int len, IntOut recv_bytes, int timeout) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_connection_receive_timeout(IDeviceConnectionRef.getCPtr(connection), connection, data, len, IntOut.getCPtr(recv_bytes), recv_bytes, timeout)); } public static IDeviceError idevice_connection_receive(IDeviceConnectionRef connection, byte[] data, int len, IntOut recv_bytes) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_connection_receive(IDeviceConnectionRef.getCPtr(connection), connection, data, len, IntOut.getCPtr(recv_bytes), recv_bytes)); } public static IDeviceError idevice_connection_enable_ssl(IDeviceConnectionRef connection) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_connection_enable_ssl(IDeviceConnectionRef.getCPtr(connection), connection)); } public static IDeviceError idevice_connection_disable_ssl(IDeviceConnectionRef connection) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_connection_disable_ssl(IDeviceConnectionRef.getCPtr(connection), connection)); } public static IDeviceError idevice_connection_disable_bypass_ssl(IDeviceConnectionRef connection, boolean sslBypass) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_connection_disable_bypass_ssl(IDeviceConnectionRef.getCPtr(connection), connection, sslBypass)); } public static IDeviceError idevice_connection_get_fd(IDeviceConnectionRef connection, IntOut fd) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_connection_get_fd(IDeviceConnectionRef.getCPtr(connection), connection, IntOut.getCPtr(fd), fd)); } public static IDeviceError idevice_get_handle(IDeviceRef device, IntOut handle) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_get_handle(IDeviceRef.getCPtr(device), device, IntOut.getCPtr(handle), handle)); } public static IDeviceError idevice_get_udid(IDeviceRef device, StringOut udid) { return IDeviceError.swigToEnum(LibIMobileDeviceJNI.idevice_get_udid(IDeviceRef.getCPtr(device), device, StringOut.getCPtr(udid), udid)); } public static LockdowndError lockdownd_client_new(IDeviceRef device, LockdowndClientRefOut client, String label) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_client_new(IDeviceRef.getCPtr(device), device, LockdowndClientRefOut.getCPtr(client), client, label)); } public static LockdowndError lockdownd_client_new_with_handshake(IDeviceRef device, LockdowndClientRefOut client, String label) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_client_new_with_handshake(IDeviceRef.getCPtr(device), device, LockdowndClientRefOut.getCPtr(client), client, label)); } public static LockdowndError lockdownd_client_free(LockdowndClientRef client) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_client_free(LockdowndClientRef.getCPtr(client), client)); } public static LockdowndError lockdownd_query_type(LockdowndClientRef client, StringOut type) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_query_type(LockdowndClientRef.getCPtr(client), client, StringOut.getCPtr(type), type)); } public static LockdowndError lockdownd_get_value(LockdowndClientRef client, String domain, String key, PlistRefOut value) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_get_value(LockdowndClientRef.getCPtr(client), client, domain, key, PlistRefOut.getCPtr(value), value)); } public static LockdowndError lockdownd_set_value(LockdowndClientRef client, String domain, String key, PlistRef value) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_set_value(LockdowndClientRef.getCPtr(client), client, domain, key, PlistRef.getCPtr(value), value)); } public static LockdowndError lockdownd_remove_value(LockdowndClientRef client, String domain, String key) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_remove_value(LockdowndClientRef.getCPtr(client), client, domain, key)); } public static LockdowndError lockdownd_start_service(LockdowndClientRef client, String identifier, LockdowndServiceDescriptorStructOut service) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_start_service(LockdowndClientRef.getCPtr(client), client, identifier, LockdowndServiceDescriptorStructOut.getCPtr(service), service)); } public static LockdowndError lockdownd_start_service_with_escrow_bag(LockdowndClientRef client, String identifier, LockdowndServiceDescriptorStructOut service) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_start_service_with_escrow_bag(LockdowndClientRef.getCPtr(client), client, identifier, LockdowndServiceDescriptorStructOut.getCPtr(service), service)); } public static LockdowndError lockdownd_start_session(LockdowndClientRef client, String host_id, StringOut session_id, IntOut sslEnabled) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_start_session(LockdowndClientRef.getCPtr(client), client, host_id, StringOut.getCPtr(session_id), session_id, IntOut.getCPtr(sslEnabled), sslEnabled)); } public static LockdowndError lockdownd_stop_session(LockdowndClientRef client, String session_id) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_stop_session(LockdowndClientRef.getCPtr(client), client, session_id)); } public static LockdowndError lockdownd_send(LockdowndClientRef client, PlistRef plist) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_send(LockdowndClientRef.getCPtr(client), client, PlistRef.getCPtr(plist), plist)); } public static LockdowndError lockdownd_receive(LockdowndClientRef client, PlistRefOut plist) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_receive(LockdowndClientRef.getCPtr(client), client, PlistRefOut.getCPtr(plist), plist)); } public static LockdowndError lockdownd_pair(LockdowndClientRef client, LockdowndPairRecordStruct pair_record) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_pair(LockdowndClientRef.getCPtr(client), client, LockdowndPairRecordStruct.getCPtr(pair_record), pair_record)); } public static LockdowndError lockdownd_pair_with_options(LockdowndClientRef client, LockdowndPairRecordStruct pair_record, PlistRef options, PlistRefOut response) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_pair_with_options(LockdowndClientRef.getCPtr(client), client, LockdowndPairRecordStruct.getCPtr(pair_record), pair_record, PlistRef.getCPtr(options), options, PlistRefOut.getCPtr(response), response)); } public static LockdowndError lockdownd_validate_pair(LockdowndClientRef client, LockdowndPairRecordStruct pair_record) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_validate_pair(LockdowndClientRef.getCPtr(client), client, LockdowndPairRecordStruct.getCPtr(pair_record), pair_record)); } public static LockdowndError lockdownd_unpair(LockdowndClientRef client, LockdowndPairRecordStruct pair_record) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_unpair(LockdowndClientRef.getCPtr(client), client, LockdowndPairRecordStruct.getCPtr(pair_record), pair_record)); } public static LockdowndError lockdownd_activate(LockdowndClientRef client, PlistRef activation_record) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_activate(LockdowndClientRef.getCPtr(client), client, PlistRef.getCPtr(activation_record), activation_record)); } public static LockdowndError lockdownd_deactivate(LockdowndClientRef client) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_deactivate(LockdowndClientRef.getCPtr(client), client)); } public static LockdowndError lockdownd_enter_recovery(LockdowndClientRef client) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_enter_recovery(LockdowndClientRef.getCPtr(client), client)); } public static LockdowndError lockdownd_goodbye(LockdowndClientRef client) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_goodbye(LockdowndClientRef.getCPtr(client), client)); } public static void lockdownd_client_set_label(LockdowndClientRef client, String label) { LibIMobileDeviceJNI.lockdownd_client_set_label(LockdowndClientRef.getCPtr(client), client, label); } public static LockdowndError lockdownd_get_device_udid(LockdowndClientRef control, StringOut udid) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_get_device_udid(LockdowndClientRef.getCPtr(control), control, StringOut.getCPtr(udid), udid)); } public static LockdowndError lockdownd_get_device_name(LockdowndClientRef client, StringOut device_name) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_get_device_name(LockdowndClientRef.getCPtr(client), client, StringOut.getCPtr(device_name), device_name)); } public static LockdowndError lockdownd_get_sync_data_classes(LockdowndClientRef client, StringArrayOut classes, IntOut count) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_get_sync_data_classes(LockdowndClientRef.getCPtr(client), client, StringArrayOut.getCPtr(classes), classes, IntOut.getCPtr(count), count)); } public static LockdowndError lockdownd_data_classes_free(StringArray classes) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_data_classes_free(StringArray.getCPtr(classes), classes)); } public static LockdowndError lockdownd_service_descriptor_free(LockdowndServiceDescriptorStruct service) { return LockdowndError.swigToEnum(LibIMobileDeviceJNI.lockdownd_service_descriptor_free(LockdowndServiceDescriptorStruct.getCPtr(service), service)); } public static AfcError afc_client_new(IDeviceRef device, LockdowndServiceDescriptorStruct service, AfcClientRefOut client) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_client_new(IDeviceRef.getCPtr(device), device, LockdowndServiceDescriptorStruct.getCPtr(service), service, AfcClientRefOut.getCPtr(client), client)); } public static AfcError afc_client_start_service(IDeviceRef device, AfcClientRefOut client, String label) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_client_start_service(IDeviceRef.getCPtr(device), device, AfcClientRefOut.getCPtr(client), client, label)); } public static AfcError afc_client_free(AfcClientRef client) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_client_free(AfcClientRef.getCPtr(client), client)); } public static AfcError afc_get_device_info(AfcClientRef client, StringArrayOut device_information) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_get_device_info(AfcClientRef.getCPtr(client), client, StringArrayOut.getCPtr(device_information), device_information)); } public static AfcError afc_read_directory(AfcClientRef client, String path, StringArrayOut directory_information) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_read_directory(AfcClientRef.getCPtr(client), client, path, StringArrayOut.getCPtr(directory_information), directory_information)); } public static AfcError afc_get_file_info(AfcClientRef client, String filename, StringArrayOut file_information) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_get_file_info(AfcClientRef.getCPtr(client), client, filename, StringArrayOut.getCPtr(file_information), file_information)); } public static AfcError afc_file_open(AfcClientRef client, String filename, AfcFileMode file_mode, LongOut handle) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_file_open(AfcClientRef.getCPtr(client), client, filename, file_mode.swigValue(), LongOut.getCPtr(handle), handle)); } public static AfcError afc_file_close(AfcClientRef client, long handle) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_file_close(AfcClientRef.getCPtr(client), client, handle)); } public static AfcError afc_file_lock(AfcClientRef client, long handle, AfcLockOperation operation) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_file_lock(AfcClientRef.getCPtr(client), client, handle, operation.swigValue())); } public static AfcError afc_file_read(AfcClientRef client, long handle, byte[] data, int length, IntOut bytes_read) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_file_read(AfcClientRef.getCPtr(client), client, handle, data, length, IntOut.getCPtr(bytes_read), bytes_read)); } public static AfcError afc_file_write(AfcClientRef client, long handle, byte[] data, int length, IntOut bytes_written) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_file_write(AfcClientRef.getCPtr(client), client, handle, data, length, IntOut.getCPtr(bytes_written), bytes_written)); } public static AfcError afc_file_seek(AfcClientRef client, long handle, long offset, int whence) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_file_seek(AfcClientRef.getCPtr(client), client, handle, offset, whence)); } public static AfcError afc_file_tell(AfcClientRef client, long handle, LongOut position) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_file_tell(AfcClientRef.getCPtr(client), client, handle, LongOut.getCPtr(position), position)); } public static AfcError afc_file_truncate(AfcClientRef client, long handle, long newsize) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_file_truncate(AfcClientRef.getCPtr(client), client, handle, newsize)); } public static AfcError afc_remove_path(AfcClientRef client, String path) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_remove_path(AfcClientRef.getCPtr(client), client, path)); } public static AfcError afc_rename_path(AfcClientRef client, String from, String to) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_rename_path(AfcClientRef.getCPtr(client), client, from, to)); } public static AfcError afc_make_directory(AfcClientRef client, String path) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_make_directory(AfcClientRef.getCPtr(client), client, path)); } public static AfcError afc_truncate(AfcClientRef client, String path, long newsize) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_truncate(AfcClientRef.getCPtr(client), client, path, newsize)); } public static AfcError afc_make_link(AfcClientRef client, AfcLinkType linktype, String target, String linkname) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_make_link(AfcClientRef.getCPtr(client), client, linktype.swigValue(), target, linkname)); } public static AfcError afc_set_file_time(AfcClientRef client, String path, long mtime) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_set_file_time(AfcClientRef.getCPtr(client), client, path, mtime)); } public static AfcError afc_remove_path_and_contents(AfcClientRef client, String path) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_remove_path_and_contents(AfcClientRef.getCPtr(client), client, path)); } public static AfcError afc_get_device_info_key(AfcClientRef client, String key, StringOut value) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_get_device_info_key(AfcClientRef.getCPtr(client), client, key, StringOut.getCPtr(value), value)); } public static AfcError afc_dictionary_free(StringOut dictionary) { return AfcError.swigToEnum(LibIMobileDeviceJNI.afc_dictionary_free(StringOut.getCPtr(dictionary), dictionary)); } public static InstProxyError instproxy_client_new(IDeviceRef device, LockdowndServiceDescriptorStruct service, InstproxyClientRefOut client) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_client_new(IDeviceRef.getCPtr(device), device, LockdowndServiceDescriptorStruct.getCPtr(service), service, InstproxyClientRefOut.getCPtr(client), client)); } public static InstProxyError instproxy_client_start_service(IDeviceRef device, InstproxyClientRefOut client, String label) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_client_start_service(IDeviceRef.getCPtr(device), device, InstproxyClientRefOut.getCPtr(client), client, label)); } public static InstProxyError instproxy_client_free(InstproxyClientRef client) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_client_free(InstproxyClientRef.getCPtr(client), client)); } public static InstProxyError instproxy_browse(InstproxyClientRef client, PlistRef client_options, PlistRefOut result) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_browse(InstproxyClientRef.getCPtr(client), client, PlistRef.getCPtr(client_options), client_options, PlistRefOut.getCPtr(result), result)); } public static InstProxyError instproxy_browse_with_callback(InstproxyClientRef client, PlistRef client_options, long status_cb, int user_data) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_browse_with_callback(InstproxyClientRef.getCPtr(client), client, PlistRef.getCPtr(client_options), client_options, status_cb, user_data)); } public static InstProxyError instproxy_lookup(InstproxyClientRef client, StringArray appids, PlistRef client_options, PlistRefOut result) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_lookup(InstproxyClientRef.getCPtr(client), client, StringArray.getCPtr(appids), appids, PlistRef.getCPtr(client_options), client_options, PlistRefOut.getCPtr(result), result)); } public static InstProxyError instproxy_install(InstproxyClientRef client, String pkg_path, PlistRef client_options, long status_cb, int user_data) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_install(InstproxyClientRef.getCPtr(client), client, pkg_path, PlistRef.getCPtr(client_options), client_options, status_cb, user_data)); } public static InstProxyError instproxy_upgrade(InstproxyClientRef client, String pkg_path, PlistRef client_options, long status_cb, int user_data) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_upgrade(InstproxyClientRef.getCPtr(client), client, pkg_path, PlistRef.getCPtr(client_options), client_options, status_cb, user_data)); } public static InstProxyError instproxy_uninstall(InstproxyClientRef client, String appid, PlistRef client_options, long status_cb, int user_data) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_uninstall(InstproxyClientRef.getCPtr(client), client, appid, PlistRef.getCPtr(client_options), client_options, status_cb, user_data)); } public static InstProxyError instproxy_lookup_archives(InstproxyClientRef client, PlistRef client_options, PlistRefOut result) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_lookup_archives(InstproxyClientRef.getCPtr(client), client, PlistRef.getCPtr(client_options), client_options, PlistRefOut.getCPtr(result), result)); } public static InstProxyError instproxy_archive(InstproxyClientRef client, String appid, PlistRef client_options, long status_cb, int user_data) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_archive(InstproxyClientRef.getCPtr(client), client, appid, PlistRef.getCPtr(client_options), client_options, status_cb, user_data)); } public static InstProxyError instproxy_restore(InstproxyClientRef client, String appid, PlistRef client_options, long status_cb, int user_data) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_restore(InstproxyClientRef.getCPtr(client), client, appid, PlistRef.getCPtr(client_options), client_options, status_cb, user_data)); } public static InstProxyError instproxy_remove_archive(InstproxyClientRef client, String appid, PlistRef client_options, long status_cb, int user_data) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_remove_archive(InstproxyClientRef.getCPtr(client), client, appid, PlistRef.getCPtr(client_options), client_options, status_cb, user_data)); } public static InstProxyError instproxy_check_capabilities_match(InstproxyClientRef client, StringArray capabilities, PlistRef client_options, PlistRefOut result) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_check_capabilities_match(InstproxyClientRef.getCPtr(client), client, StringArray.getCPtr(capabilities), capabilities, PlistRef.getCPtr(client_options), client_options, PlistRefOut.getCPtr(result), result)); } public static void instproxy_command_get_name(PlistRef command, StringOut name) { LibIMobileDeviceJNI.instproxy_command_get_name(PlistRef.getCPtr(command), command, StringOut.getCPtr(name), name); } public static void instproxy_status_get_name(PlistRef status, StringOut name) { LibIMobileDeviceJNI.instproxy_status_get_name(PlistRef.getCPtr(status), status, StringOut.getCPtr(name), name); } public static InstProxyError instproxy_status_get_error(PlistRef status, StringOut name, StringOut description, LongOut code) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_status_get_error(PlistRef.getCPtr(status), status, StringOut.getCPtr(name), name, StringOut.getCPtr(description), description, LongOut.getCPtr(code), code)); } public static void instproxy_status_get_current_list(PlistRef status, LongOut total, LongOut current_index, LongOut current_amount, PlistRefOut list) { LibIMobileDeviceJNI.instproxy_status_get_current_list(PlistRef.getCPtr(status), status, LongOut.getCPtr(total), total, LongOut.getCPtr(current_index), current_index, LongOut.getCPtr(current_amount), current_amount, PlistRefOut.getCPtr(list), list); } public static void instproxy_status_get_percent_complete(PlistRef status, IntOut percent) { LibIMobileDeviceJNI.instproxy_status_get_percent_complete(PlistRef.getCPtr(status), status, IntOut.getCPtr(percent), percent); } public static PlistRef instproxy_client_options_new() { long cPtr = LibIMobileDeviceJNI.instproxy_client_options_new(); return (cPtr == 0) ? null : new PlistRef(cPtr, false); } public static void instproxy_client_options_set_return_attributes(PlistRef client_options) { LibIMobileDeviceJNI.instproxy_client_options_set_return_attributes(PlistRef.getCPtr(client_options), client_options); } public static void instproxy_client_options_free(PlistRef client_options) { LibIMobileDeviceJNI.instproxy_client_options_free(PlistRef.getCPtr(client_options), client_options); } public static InstProxyError instproxy_client_get_path_for_bundle_identifier(InstproxyClientRef client, String bundle_id, StringOut path) { return InstProxyError.swigToEnum(LibIMobileDeviceJNI.instproxy_client_get_path_for_bundle_identifier(InstproxyClientRef.getCPtr(client), client, bundle_id, StringOut.getCPtr(path), path)); } public static MobileImageMounterError mobile_image_mounter_new(IDeviceRef device, LockdowndServiceDescriptorStruct service, MobileImageMounterClientRefOut client) { return MobileImageMounterError.swigToEnum(LibIMobileDeviceJNI.mobile_image_mounter_new(IDeviceRef.getCPtr(device), device, LockdowndServiceDescriptorStruct.getCPtr(service), service, MobileImageMounterClientRefOut.getCPtr(client), client)); } public static MobileImageMounterError mobile_image_mounter_start_service(IDeviceRef device, MobileImageMounterClientRefOut client, String label) { return MobileImageMounterError.swigToEnum(LibIMobileDeviceJNI.mobile_image_mounter_start_service(IDeviceRef.getCPtr(device), device, MobileImageMounterClientRefOut.getCPtr(client), client, label)); } public static MobileImageMounterError mobile_image_mounter_free(MobileImageMounterClientRef client) { return MobileImageMounterError.swigToEnum(LibIMobileDeviceJNI.mobile_image_mounter_free(MobileImageMounterClientRef.getCPtr(client), client)); } public static MobileImageMounterError mobile_image_mounter_lookup_image(MobileImageMounterClientRef client, String image_type, PlistRefOut result) { return MobileImageMounterError.swigToEnum(LibIMobileDeviceJNI.mobile_image_mounter_lookup_image(MobileImageMounterClientRef.getCPtr(client), client, image_type, PlistRefOut.getCPtr(result), result)); } public static MobileImageMounterError mobile_image_mounter_mount_image(MobileImageMounterClientRef client, String image_path, byte[] signature, short signature_size, String image_type, PlistRefOut result) { return MobileImageMounterError.swigToEnum(LibIMobileDeviceJNI.mobile_image_mounter_mount_image(MobileImageMounterClientRef.getCPtr(client), client, image_path, signature, signature_size, image_type, PlistRefOut.getCPtr(result), result)); } public static MobileImageMounterError mobile_image_mounter_hangup(MobileImageMounterClientRef client) { return MobileImageMounterError.swigToEnum(LibIMobileDeviceJNI.mobile_image_mounter_hangup(MobileImageMounterClientRef.getCPtr(client), client)); } public static DebugServerError debugserver_client_new(IDeviceRef device, LockdowndServiceDescriptorStruct service, DebugServerClientRefOut client) { return DebugServerError.swigToEnum(LibIMobileDeviceJNI.debugserver_client_new(IDeviceRef.getCPtr(device), device, LockdowndServiceDescriptorStruct.getCPtr(service), service, DebugServerClientRefOut.getCPtr(client), client)); } public static DebugServerError debugserver_client_start_service(IDeviceRef device, DebugServerClientRefOut client, String label) { return DebugServerError.swigToEnum(LibIMobileDeviceJNI.debugserver_client_start_service(IDeviceRef.getCPtr(device), device, DebugServerClientRefOut.getCPtr(client), client, label)); } public static DebugServerError debugserver_client_free(DebugServerClientRef client) { return DebugServerError.swigToEnum(LibIMobileDeviceJNI.debugserver_client_free(DebugServerClientRef.getCPtr(client), client)); } public static DebugServerError debugserver_client_send(DebugServerClientRef client, byte[] data, int size, IntOut sent) { return DebugServerError.swigToEnum(LibIMobileDeviceJNI.debugserver_client_send(DebugServerClientRef.getCPtr(client), client, data, size, IntOut.getCPtr(sent), sent)); } public static DebugServerError debugserver_client_receive_with_timeout(DebugServerClientRef client, byte[] data, int size, IntOut received, int timeout) { return DebugServerError.swigToEnum(LibIMobileDeviceJNI.debugserver_client_receive_with_timeout(DebugServerClientRef.getCPtr(client), client, data, size, IntOut.getCPtr(received), received, timeout)); } public static DebugServerError debugserver_client_receive(DebugServerClientRef client, byte[] data, int size, IntOut received) { return DebugServerError.swigToEnum(LibIMobileDeviceJNI.debugserver_client_receive(DebugServerClientRef.getCPtr(client), client, data, size, IntOut.getCPtr(received), received)); } public static DebugServerError debugserver_client_receive_response(DebugServerClientRef client, StringOut response) { return DebugServerError.swigToEnum(LibIMobileDeviceJNI.debugserver_client_receive_response(DebugServerClientRef.getCPtr(client), client, StringOut.getCPtr(response), response)); } public static PlistRef toPlistRef(long ptr) { return new PlistRef(ptr, false); } }
{ "pile_set_name": "Github" }
CREATE TABLE list (id VARCHAR(2) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)); INSERT INTO "list" ("id", "value") VALUES (E'af', E'Afrikaans'); INSERT INTO "list" ("id", "value") VALUES (E'af_NA', E'Afrikaans (Namibia)'); INSERT INTO "list" ("id", "value") VALUES (E'af_ZA', E'Afrikaans (South Africa)'); INSERT INTO "list" ("id", "value") VALUES (E'ak', E'Akan'); INSERT INTO "list" ("id", "value") VALUES (E'ak_GH', E'Akan (Ghana)'); INSERT INTO "list" ("id", "value") VALUES (E'sq', E'Albanian'); INSERT INTO "list" ("id", "value") VALUES (E'sq_AL', E'Albanian (Albania)'); INSERT INTO "list" ("id", "value") VALUES (E'sq_XK', E'Albanian (Kosovo)'); INSERT INTO "list" ("id", "value") VALUES (E'sq_MK', E'Albanian (Macedonia)'); INSERT INTO "list" ("id", "value") VALUES (E'am', E'Amharic'); INSERT INTO "list" ("id", "value") VALUES (E'am_ET', E'Amharic (Ethiopia)'); INSERT INTO "list" ("id", "value") VALUES (E'ar', E'Arabic'); INSERT INTO "list" ("id", "value") VALUES (E'ar_DZ', E'Arabic (Algeria)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_BH', E'Arabic (Bahrain)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_TD', E'Arabic (Chad)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_KM', E'Arabic (Comoros)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_DJ', E'Arabic (Djibouti)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_EG', E'Arabic (Egypt)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_ER', E'Arabic (Eritrea)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_IQ', E'Arabic (Iraq)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_IL', E'Arabic (Israel)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_JO', E'Arabic (Jordan)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_KW', E'Arabic (Kuwait)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_LB', E'Arabic (Lebanon)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_LY', E'Arabic (Libya)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_MR', E'Arabic (Mauritania)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_MA', E'Arabic (Morocco)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_OM', E'Arabic (Oman)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_PS', E'Arabic (Palestinian Territories)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_QA', E'Arabic (Qatar)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_SA', E'Arabic (Saudi Arabia)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_SO', E'Arabic (Somalia)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_SS', E'Arabic (South Sudan)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_SD', E'Arabic (Sudan)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_SY', E'Arabic (Syria)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_TN', E'Arabic (Tunisia)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_AE', E'Arabic (United Arab Emirates)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_EH', E'Arabic (Western Sahara)'); INSERT INTO "list" ("id", "value") VALUES (E'ar_YE', E'Arabic (Yemen)'); INSERT INTO "list" ("id", "value") VALUES (E'hy', E'Armenian'); INSERT INTO "list" ("id", "value") VALUES (E'hy_AM', E'Armenian (Armenia)'); INSERT INTO "list" ("id", "value") VALUES (E'as', E'Assamese'); INSERT INTO "list" ("id", "value") VALUES (E'as_IN', E'Assamese (India)'); INSERT INTO "list" ("id", "value") VALUES (E'az', E'Azerbaijani'); INSERT INTO "list" ("id", "value") VALUES (E'az_AZ', E'Azerbaijani (Azerbaijan)'); INSERT INTO "list" ("id", "value") VALUES (E'az_Cyrl_AZ', E'Azerbaijani (Cyrillic, Azerbaijan)'); INSERT INTO "list" ("id", "value") VALUES (E'az_Cyrl', E'Azerbaijani (Cyrillic)'); INSERT INTO "list" ("id", "value") VALUES (E'az_Latn_AZ', E'Azerbaijani (Latin, Azerbaijan)'); INSERT INTO "list" ("id", "value") VALUES (E'az_Latn', E'Azerbaijani (Latin)'); INSERT INTO "list" ("id", "value") VALUES (E'bm', E'Bambara'); INSERT INTO "list" ("id", "value") VALUES (E'bm_Latn_ML', E'Bambara (Latin, Mali)'); INSERT INTO "list" ("id", "value") VALUES (E'bm_Latn', E'Bambara (Latin)'); INSERT INTO "list" ("id", "value") VALUES (E'eu', E'Basque'); INSERT INTO "list" ("id", "value") VALUES (E'eu_ES', E'Basque (Spain)'); INSERT INTO "list" ("id", "value") VALUES (E'be', E'Belarusian'); INSERT INTO "list" ("id", "value") VALUES (E'be_BY', E'Belarusian (Belarus)'); INSERT INTO "list" ("id", "value") VALUES (E'bn', E'Bengali'); INSERT INTO "list" ("id", "value") VALUES (E'bn_BD', E'Bengali (Bangladesh)'); INSERT INTO "list" ("id", "value") VALUES (E'bn_IN', E'Bengali (India)'); INSERT INTO "list" ("id", "value") VALUES (E'bs', E'Bosnian'); INSERT INTO "list" ("id", "value") VALUES (E'bs_BA', E'Bosnian (Bosnia & Herzegovina)'); INSERT INTO "list" ("id", "value") VALUES (E'bs_Cyrl_BA', E'Bosnian (Cyrillic, Bosnia & Herzegovina)'); INSERT INTO "list" ("id", "value") VALUES (E'bs_Cyrl', E'Bosnian (Cyrillic)'); INSERT INTO "list" ("id", "value") VALUES (E'bs_Latn_BA', E'Bosnian (Latin, Bosnia & Herzegovina)'); INSERT INTO "list" ("id", "value") VALUES (E'bs_Latn', E'Bosnian (Latin)'); INSERT INTO "list" ("id", "value") VALUES (E'br', E'Breton'); INSERT INTO "list" ("id", "value") VALUES (E'br_FR', E'Breton (France)'); INSERT INTO "list" ("id", "value") VALUES (E'bg', E'Bulgarian'); INSERT INTO "list" ("id", "value") VALUES (E'bg_BG', E'Bulgarian (Bulgaria)'); INSERT INTO "list" ("id", "value") VALUES (E'my', E'Burmese'); INSERT INTO "list" ("id", "value") VALUES (E'my_MM', E'Burmese (Myanmar (Burma))'); INSERT INTO "list" ("id", "value") VALUES (E'ca', E'Catalan'); INSERT INTO "list" ("id", "value") VALUES (E'ca_AD', E'Catalan (Andorra)'); INSERT INTO "list" ("id", "value") VALUES (E'ca_FR', E'Catalan (France)'); INSERT INTO "list" ("id", "value") VALUES (E'ca_IT', E'Catalan (Italy)'); INSERT INTO "list" ("id", "value") VALUES (E'ca_ES', E'Catalan (Spain)'); INSERT INTO "list" ("id", "value") VALUES (E'zh', E'Chinese'); INSERT INTO "list" ("id", "value") VALUES (E'zh_CN', E'Chinese (China)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_HK', E'Chinese (Hong Kong SAR China)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_MO', E'Chinese (Macau SAR China)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_Hans_CN', E'Chinese (Simplified, China)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_Hans_HK', E'Chinese (Simplified, Hong Kong SAR China)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_Hans_MO', E'Chinese (Simplified, Macau SAR China)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_Hans_SG', E'Chinese (Simplified, Singapore)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_Hans', E'Chinese (Simplified)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_SG', E'Chinese (Singapore)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_TW', E'Chinese (Taiwan)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_Hant_HK', E'Chinese (Traditional, Hong Kong SAR China)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_Hant_MO', E'Chinese (Traditional, Macau SAR China)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_Hant_TW', E'Chinese (Traditional, Taiwan)'); INSERT INTO "list" ("id", "value") VALUES (E'zh_Hant', E'Chinese (Traditional)'); INSERT INTO "list" ("id", "value") VALUES (E'kw', E'Cornish'); INSERT INTO "list" ("id", "value") VALUES (E'kw_GB', E'Cornish (United Kingdom)'); INSERT INTO "list" ("id", "value") VALUES (E'hr', E'Croatian'); INSERT INTO "list" ("id", "value") VALUES (E'hr_BA', E'Croatian (Bosnia & Herzegovina)'); INSERT INTO "list" ("id", "value") VALUES (E'hr_HR', E'Croatian (Croatia)'); INSERT INTO "list" ("id", "value") VALUES (E'cs', E'Czech'); INSERT INTO "list" ("id", "value") VALUES (E'cs_CZ', E'Czech (Czech Republic)'); INSERT INTO "list" ("id", "value") VALUES (E'da', E'Danish'); INSERT INTO "list" ("id", "value") VALUES (E'da_DK', E'Danish (Denmark)'); INSERT INTO "list" ("id", "value") VALUES (E'da_GL', E'Danish (Greenland)'); INSERT INTO "list" ("id", "value") VALUES (E'nl', E'Dutch'); INSERT INTO "list" ("id", "value") VALUES (E'nl_AW', E'Dutch (Aruba)'); INSERT INTO "list" ("id", "value") VALUES (E'nl_BE', E'Dutch (Belgium)'); INSERT INTO "list" ("id", "value") VALUES (E'nl_BQ', E'Dutch (Caribbean Netherlands)'); INSERT INTO "list" ("id", "value") VALUES (E'nl_CW', E'Dutch (Curaçao)'); INSERT INTO "list" ("id", "value") VALUES (E'nl_NL', E'Dutch (Netherlands)'); INSERT INTO "list" ("id", "value") VALUES (E'nl_SX', E'Dutch (Sint Maarten)'); INSERT INTO "list" ("id", "value") VALUES (E'nl_SR', E'Dutch (Suriname)'); INSERT INTO "list" ("id", "value") VALUES (E'dz', E'Dzongkha'); INSERT INTO "list" ("id", "value") VALUES (E'dz_BT', E'Dzongkha (Bhutan)'); INSERT INTO "list" ("id", "value") VALUES (E'en', E'English'); INSERT INTO "list" ("id", "value") VALUES (E'en_AS', E'English (American Samoa)'); INSERT INTO "list" ("id", "value") VALUES (E'en_AI', E'English (Anguilla)'); INSERT INTO "list" ("id", "value") VALUES (E'en_AG', E'English (Antigua & Barbuda)'); INSERT INTO "list" ("id", "value") VALUES (E'en_AU', E'English (Australia)'); INSERT INTO "list" ("id", "value") VALUES (E'en_BS', E'English (Bahamas)'); INSERT INTO "list" ("id", "value") VALUES (E'en_BB', E'English (Barbados)'); INSERT INTO "list" ("id", "value") VALUES (E'en_BE', E'English (Belgium)'); INSERT INTO "list" ("id", "value") VALUES (E'en_BZ', E'English (Belize)'); INSERT INTO "list" ("id", "value") VALUES (E'en_BM', E'English (Bermuda)'); INSERT INTO "list" ("id", "value") VALUES (E'en_BW', E'English (Botswana)'); INSERT INTO "list" ("id", "value") VALUES (E'en_IO', E'English (British Indian Ocean Territory)'); INSERT INTO "list" ("id", "value") VALUES (E'en_VG', E'English (British Virgin Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_CM', E'English (Cameroon)'); INSERT INTO "list" ("id", "value") VALUES (E'en_CA', E'English (Canada)'); INSERT INTO "list" ("id", "value") VALUES (E'en_KY', E'English (Cayman Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_CX', E'English (Christmas Island)'); INSERT INTO "list" ("id", "value") VALUES (E'en_CC', E'English (Cocos (Keeling) Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_CK', E'English (Cook Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_DG', E'English (Diego Garcia)'); INSERT INTO "list" ("id", "value") VALUES (E'en_DM', E'English (Dominica)'); INSERT INTO "list" ("id", "value") VALUES (E'en_ER', E'English (Eritrea)'); INSERT INTO "list" ("id", "value") VALUES (E'en_FK', E'English (Falkland Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_FJ', E'English (Fiji)'); INSERT INTO "list" ("id", "value") VALUES (E'en_GM', E'English (Gambia)'); INSERT INTO "list" ("id", "value") VALUES (E'en_GH', E'English (Ghana)'); INSERT INTO "list" ("id", "value") VALUES (E'en_GI', E'English (Gibraltar)'); INSERT INTO "list" ("id", "value") VALUES (E'en_GD', E'English (Grenada)'); INSERT INTO "list" ("id", "value") VALUES (E'en_GU', E'English (Guam)'); INSERT INTO "list" ("id", "value") VALUES (E'en_GG', E'English (Guernsey)'); INSERT INTO "list" ("id", "value") VALUES (E'en_GY', E'English (Guyana)'); INSERT INTO "list" ("id", "value") VALUES (E'en_HK', E'English (Hong Kong SAR China)'); INSERT INTO "list" ("id", "value") VALUES (E'en_IN', E'English (India)'); INSERT INTO "list" ("id", "value") VALUES (E'en_IE', E'English (Ireland)'); INSERT INTO "list" ("id", "value") VALUES (E'en_IM', E'English (Isle of Man)'); INSERT INTO "list" ("id", "value") VALUES (E'en_JM', E'English (Jamaica)'); INSERT INTO "list" ("id", "value") VALUES (E'en_JE', E'English (Jersey)'); INSERT INTO "list" ("id", "value") VALUES (E'en_KE', E'English (Kenya)'); INSERT INTO "list" ("id", "value") VALUES (E'en_KI', E'English (Kiribati)'); INSERT INTO "list" ("id", "value") VALUES (E'en_LS', E'English (Lesotho)'); INSERT INTO "list" ("id", "value") VALUES (E'en_LR', E'English (Liberia)'); INSERT INTO "list" ("id", "value") VALUES (E'en_MO', E'English (Macau SAR China)'); INSERT INTO "list" ("id", "value") VALUES (E'en_MG', E'English (Madagascar)'); INSERT INTO "list" ("id", "value") VALUES (E'en_MW', E'English (Malawi)'); INSERT INTO "list" ("id", "value") VALUES (E'en_MY', E'English (Malaysia)'); INSERT INTO "list" ("id", "value") VALUES (E'en_MT', E'English (Malta)'); INSERT INTO "list" ("id", "value") VALUES (E'en_MH', E'English (Marshall Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_MU', E'English (Mauritius)'); INSERT INTO "list" ("id", "value") VALUES (E'en_FM', E'English (Micronesia)'); INSERT INTO "list" ("id", "value") VALUES (E'en_MS', E'English (Montserrat)'); INSERT INTO "list" ("id", "value") VALUES (E'en_NA', E'English (Namibia)'); INSERT INTO "list" ("id", "value") VALUES (E'en_NR', E'English (Nauru)'); INSERT INTO "list" ("id", "value") VALUES (E'en_NZ', E'English (New Zealand)'); INSERT INTO "list" ("id", "value") VALUES (E'en_NG', E'English (Nigeria)'); INSERT INTO "list" ("id", "value") VALUES (E'en_NU', E'English (Niue)'); INSERT INTO "list" ("id", "value") VALUES (E'en_NF', E'English (Norfolk Island)'); INSERT INTO "list" ("id", "value") VALUES (E'en_MP', E'English (Northern Mariana Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_PK', E'English (Pakistan)'); INSERT INTO "list" ("id", "value") VALUES (E'en_PW', E'English (Palau)'); INSERT INTO "list" ("id", "value") VALUES (E'en_PG', E'English (Papua New Guinea)'); INSERT INTO "list" ("id", "value") VALUES (E'en_PH', E'English (Philippines)'); INSERT INTO "list" ("id", "value") VALUES (E'en_PN', E'English (Pitcairn Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_PR', E'English (Puerto Rico)'); INSERT INTO "list" ("id", "value") VALUES (E'en_RW', E'English (Rwanda)'); INSERT INTO "list" ("id", "value") VALUES (E'en_WS', E'English (Samoa)'); INSERT INTO "list" ("id", "value") VALUES (E'en_SC', E'English (Seychelles)'); INSERT INTO "list" ("id", "value") VALUES (E'en_SL', E'English (Sierra Leone)'); INSERT INTO "list" ("id", "value") VALUES (E'en_SG', E'English (Singapore)'); INSERT INTO "list" ("id", "value") VALUES (E'en_SX', E'English (Sint Maarten)'); INSERT INTO "list" ("id", "value") VALUES (E'en_SB', E'English (Solomon Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_ZA', E'English (South Africa)'); INSERT INTO "list" ("id", "value") VALUES (E'en_SS', E'English (South Sudan)'); INSERT INTO "list" ("id", "value") VALUES (E'en_SH', E'English (St. Helena)'); INSERT INTO "list" ("id", "value") VALUES (E'en_KN', E'English (St. Kitts & Nevis)'); INSERT INTO "list" ("id", "value") VALUES (E'en_LC', E'English (St. Lucia)'); INSERT INTO "list" ("id", "value") VALUES (E'en_VC', E'English (St. Vincent & Grenadines)'); INSERT INTO "list" ("id", "value") VALUES (E'en_SD', E'English (Sudan)'); INSERT INTO "list" ("id", "value") VALUES (E'en_SZ', E'English (Swaziland)'); INSERT INTO "list" ("id", "value") VALUES (E'en_TZ', E'English (Tanzania)'); INSERT INTO "list" ("id", "value") VALUES (E'en_TK', E'English (Tokelau)'); INSERT INTO "list" ("id", "value") VALUES (E'en_TO', E'English (Tonga)'); INSERT INTO "list" ("id", "value") VALUES (E'en_TT', E'English (Trinidad & Tobago)'); INSERT INTO "list" ("id", "value") VALUES (E'en_TC', E'English (Turks & Caicos Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_TV', E'English (Tuvalu)'); INSERT INTO "list" ("id", "value") VALUES (E'en_UM', E'English (U.S. Outlying Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_VI', E'English (U.S. Virgin Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'en_UG', E'English (Uganda)'); INSERT INTO "list" ("id", "value") VALUES (E'en_GB', E'English (United Kingdom)'); INSERT INTO "list" ("id", "value") VALUES (E'en_US', E'English (United States)'); INSERT INTO "list" ("id", "value") VALUES (E'en_VU', E'English (Vanuatu)'); INSERT INTO "list" ("id", "value") VALUES (E'en_ZM', E'English (Zambia)'); INSERT INTO "list" ("id", "value") VALUES (E'en_ZW', E'English (Zimbabwe)'); INSERT INTO "list" ("id", "value") VALUES (E'eo', E'Esperanto'); INSERT INTO "list" ("id", "value") VALUES (E'et', E'Estonian'); INSERT INTO "list" ("id", "value") VALUES (E'et_EE', E'Estonian (Estonia)'); INSERT INTO "list" ("id", "value") VALUES (E'ee', E'Ewe'); INSERT INTO "list" ("id", "value") VALUES (E'ee_GH', E'Ewe (Ghana)'); INSERT INTO "list" ("id", "value") VALUES (E'ee_TG', E'Ewe (Togo)'); INSERT INTO "list" ("id", "value") VALUES (E'fo', E'Faroese'); INSERT INTO "list" ("id", "value") VALUES (E'fo_FO', E'Faroese (Faroe Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'fi', E'Finnish'); INSERT INTO "list" ("id", "value") VALUES (E'fi_FI', E'Finnish (Finland)'); INSERT INTO "list" ("id", "value") VALUES (E'fr', E'French'); INSERT INTO "list" ("id", "value") VALUES (E'fr_DZ', E'French (Algeria)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_BE', E'French (Belgium)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_BJ', E'French (Benin)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_BF', E'French (Burkina Faso)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_BI', E'French (Burundi)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_CM', E'French (Cameroon)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_CA', E'French (Canada)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_CF', E'French (Central African Republic)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_TD', E'French (Chad)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_KM', E'French (Comoros)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_CG', E'French (Congo - Brazzaville)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_CD', E'French (Congo - Kinshasa)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_CI', E'French (Côte d’Ivoire)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_DJ', E'French (Djibouti)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_GQ', E'French (Equatorial Guinea)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_FR', E'French (France)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_GF', E'French (French Guiana)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_PF', E'French (French Polynesia)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_GA', E'French (Gabon)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_GP', E'French (Guadeloupe)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_GN', E'French (Guinea)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_HT', E'French (Haiti)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_LU', E'French (Luxembourg)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_MG', E'French (Madagascar)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_ML', E'French (Mali)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_MQ', E'French (Martinique)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_MR', E'French (Mauritania)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_MU', E'French (Mauritius)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_YT', E'French (Mayotte)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_MC', E'French (Monaco)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_MA', E'French (Morocco)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_NC', E'French (New Caledonia)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_NE', E'French (Niger)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_RE', E'French (Réunion)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_RW', E'French (Rwanda)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_SN', E'French (Senegal)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_SC', E'French (Seychelles)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_BL', E'French (St. Barthélemy)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_MF', E'French (St. Martin)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_PM', E'French (St. Pierre & Miquelon)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_CH', E'French (Switzerland)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_SY', E'French (Syria)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_TG', E'French (Togo)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_TN', E'French (Tunisia)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_VU', E'French (Vanuatu)'); INSERT INTO "list" ("id", "value") VALUES (E'fr_WF', E'French (Wallis & Futuna)'); INSERT INTO "list" ("id", "value") VALUES (E'ff', E'Fulah'); INSERT INTO "list" ("id", "value") VALUES (E'ff_CM', E'Fulah (Cameroon)'); INSERT INTO "list" ("id", "value") VALUES (E'ff_GN', E'Fulah (Guinea)'); INSERT INTO "list" ("id", "value") VALUES (E'ff_MR', E'Fulah (Mauritania)'); INSERT INTO "list" ("id", "value") VALUES (E'ff_SN', E'Fulah (Senegal)'); INSERT INTO "list" ("id", "value") VALUES (E'gl', E'Galician'); INSERT INTO "list" ("id", "value") VALUES (E'gl_ES', E'Galician (Spain)'); INSERT INTO "list" ("id", "value") VALUES (E'lg', E'Ganda'); INSERT INTO "list" ("id", "value") VALUES (E'lg_UG', E'Ganda (Uganda)'); INSERT INTO "list" ("id", "value") VALUES (E'ka', E'Georgian'); INSERT INTO "list" ("id", "value") VALUES (E'ka_GE', E'Georgian (Georgia)'); INSERT INTO "list" ("id", "value") VALUES (E'de', E'German'); INSERT INTO "list" ("id", "value") VALUES (E'de_AT', E'German (Austria)'); INSERT INTO "list" ("id", "value") VALUES (E'de_BE', E'German (Belgium)'); INSERT INTO "list" ("id", "value") VALUES (E'de_DE', E'German (Germany)'); INSERT INTO "list" ("id", "value") VALUES (E'de_LI', E'German (Liechtenstein)'); INSERT INTO "list" ("id", "value") VALUES (E'de_LU', E'German (Luxembourg)'); INSERT INTO "list" ("id", "value") VALUES (E'de_CH', E'German (Switzerland)'); INSERT INTO "list" ("id", "value") VALUES (E'el', E'Greek'); INSERT INTO "list" ("id", "value") VALUES (E'el_CY', E'Greek (Cyprus)'); INSERT INTO "list" ("id", "value") VALUES (E'el_GR', E'Greek (Greece)'); INSERT INTO "list" ("id", "value") VALUES (E'gu', E'Gujarati'); INSERT INTO "list" ("id", "value") VALUES (E'gu_IN', E'Gujarati (India)'); INSERT INTO "list" ("id", "value") VALUES (E'ha', E'Hausa'); INSERT INTO "list" ("id", "value") VALUES (E'ha_GH', E'Hausa (Ghana)'); INSERT INTO "list" ("id", "value") VALUES (E'ha_Latn_GH', E'Hausa (Latin, Ghana)'); INSERT INTO "list" ("id", "value") VALUES (E'ha_Latn_NE', E'Hausa (Latin, Niger)'); INSERT INTO "list" ("id", "value") VALUES (E'ha_Latn_NG', E'Hausa (Latin, Nigeria)'); INSERT INTO "list" ("id", "value") VALUES (E'ha_Latn', E'Hausa (Latin)'); INSERT INTO "list" ("id", "value") VALUES (E'ha_NE', E'Hausa (Niger)'); INSERT INTO "list" ("id", "value") VALUES (E'ha_NG', E'Hausa (Nigeria)'); INSERT INTO "list" ("id", "value") VALUES (E'he', E'Hebrew'); INSERT INTO "list" ("id", "value") VALUES (E'he_IL', E'Hebrew (Israel)'); INSERT INTO "list" ("id", "value") VALUES (E'hi', E'Hindi'); INSERT INTO "list" ("id", "value") VALUES (E'hi_IN', E'Hindi (India)'); INSERT INTO "list" ("id", "value") VALUES (E'hu', E'Hungarian'); INSERT INTO "list" ("id", "value") VALUES (E'hu_HU', E'Hungarian (Hungary)'); INSERT INTO "list" ("id", "value") VALUES (E'is', E'Icelandic'); INSERT INTO "list" ("id", "value") VALUES (E'is_IS', E'Icelandic (Iceland)'); INSERT INTO "list" ("id", "value") VALUES (E'ig', E'Igbo'); INSERT INTO "list" ("id", "value") VALUES (E'ig_NG', E'Igbo (Nigeria)'); INSERT INTO "list" ("id", "value") VALUES (E'id', E'Indonesian'); INSERT INTO "list" ("id", "value") VALUES (E'id_ID', E'Indonesian (Indonesia)'); INSERT INTO "list" ("id", "value") VALUES (E'ga', E'Irish'); INSERT INTO "list" ("id", "value") VALUES (E'ga_IE', E'Irish (Ireland)'); INSERT INTO "list" ("id", "value") VALUES (E'it', E'Italian'); INSERT INTO "list" ("id", "value") VALUES (E'it_IT', E'Italian (Italy)'); INSERT INTO "list" ("id", "value") VALUES (E'it_SM', E'Italian (San Marino)'); INSERT INTO "list" ("id", "value") VALUES (E'it_CH', E'Italian (Switzerland)'); INSERT INTO "list" ("id", "value") VALUES (E'ja', E'Japanese'); INSERT INTO "list" ("id", "value") VALUES (E'ja_JP', E'Japanese (Japan)'); INSERT INTO "list" ("id", "value") VALUES (E'kl', E'Kalaallisut'); INSERT INTO "list" ("id", "value") VALUES (E'kl_GL', E'Kalaallisut (Greenland)'); INSERT INTO "list" ("id", "value") VALUES (E'kn', E'Kannada'); INSERT INTO "list" ("id", "value") VALUES (E'kn_IN', E'Kannada (India)'); INSERT INTO "list" ("id", "value") VALUES (E'ks', E'Kashmiri'); INSERT INTO "list" ("id", "value") VALUES (E'ks_Arab_IN', E'Kashmiri (Arabic, India)'); INSERT INTO "list" ("id", "value") VALUES (E'ks_Arab', E'Kashmiri (Arabic)'); INSERT INTO "list" ("id", "value") VALUES (E'ks_IN', E'Kashmiri (India)'); INSERT INTO "list" ("id", "value") VALUES (E'kk', E'Kazakh'); INSERT INTO "list" ("id", "value") VALUES (E'kk_Cyrl_KZ', E'Kazakh (Cyrillic, Kazakhstan)'); INSERT INTO "list" ("id", "value") VALUES (E'kk_Cyrl', E'Kazakh (Cyrillic)'); INSERT INTO "list" ("id", "value") VALUES (E'kk_KZ', E'Kazakh (Kazakhstan)'); INSERT INTO "list" ("id", "value") VALUES (E'km', E'Khmer'); INSERT INTO "list" ("id", "value") VALUES (E'km_KH', E'Khmer (Cambodia)'); INSERT INTO "list" ("id", "value") VALUES (E'ki', E'Kikuyu'); INSERT INTO "list" ("id", "value") VALUES (E'ki_KE', E'Kikuyu (Kenya)'); INSERT INTO "list" ("id", "value") VALUES (E'rw', E'Kinyarwanda'); INSERT INTO "list" ("id", "value") VALUES (E'rw_RW', E'Kinyarwanda (Rwanda)'); INSERT INTO "list" ("id", "value") VALUES (E'ko', E'Korean'); INSERT INTO "list" ("id", "value") VALUES (E'ko_KP', E'Korean (North Korea)'); INSERT INTO "list" ("id", "value") VALUES (E'ko_KR', E'Korean (South Korea)'); INSERT INTO "list" ("id", "value") VALUES (E'ky', E'Kyrgyz'); INSERT INTO "list" ("id", "value") VALUES (E'ky_Cyrl_KG', E'Kyrgyz (Cyrillic, Kyrgyzstan)'); INSERT INTO "list" ("id", "value") VALUES (E'ky_Cyrl', E'Kyrgyz (Cyrillic)'); INSERT INTO "list" ("id", "value") VALUES (E'ky_KG', E'Kyrgyz (Kyrgyzstan)'); INSERT INTO "list" ("id", "value") VALUES (E'lo', E'Lao'); INSERT INTO "list" ("id", "value") VALUES (E'lo_LA', E'Lao (Laos)'); INSERT INTO "list" ("id", "value") VALUES (E'lv', E'Latvian'); INSERT INTO "list" ("id", "value") VALUES (E'lv_LV', E'Latvian (Latvia)'); INSERT INTO "list" ("id", "value") VALUES (E'ln', E'Lingala'); INSERT INTO "list" ("id", "value") VALUES (E'ln_AO', E'Lingala (Angola)'); INSERT INTO "list" ("id", "value") VALUES (E'ln_CF', E'Lingala (Central African Republic)'); INSERT INTO "list" ("id", "value") VALUES (E'ln_CG', E'Lingala (Congo - Brazzaville)'); INSERT INTO "list" ("id", "value") VALUES (E'ln_CD', E'Lingala (Congo - Kinshasa)'); INSERT INTO "list" ("id", "value") VALUES (E'lt', E'Lithuanian'); INSERT INTO "list" ("id", "value") VALUES (E'lt_LT', E'Lithuanian (Lithuania)'); INSERT INTO "list" ("id", "value") VALUES (E'lu', E'Luba-Katanga'); INSERT INTO "list" ("id", "value") VALUES (E'lu_CD', E'Luba-Katanga (Congo - Kinshasa)'); INSERT INTO "list" ("id", "value") VALUES (E'lb', E'Luxembourgish'); INSERT INTO "list" ("id", "value") VALUES (E'lb_LU', E'Luxembourgish (Luxembourg)'); INSERT INTO "list" ("id", "value") VALUES (E'mk', E'Macedonian'); INSERT INTO "list" ("id", "value") VALUES (E'mk_MK', E'Macedonian (Macedonia)'); INSERT INTO "list" ("id", "value") VALUES (E'mg', E'Malagasy'); INSERT INTO "list" ("id", "value") VALUES (E'mg_MG', E'Malagasy (Madagascar)'); INSERT INTO "list" ("id", "value") VALUES (E'ms', E'Malay'); INSERT INTO "list" ("id", "value") VALUES (E'ms_BN', E'Malay (Brunei)'); INSERT INTO "list" ("id", "value") VALUES (E'ms_Latn_BN', E'Malay (Latin, Brunei)'); INSERT INTO "list" ("id", "value") VALUES (E'ms_Latn_MY', E'Malay (Latin, Malaysia)'); INSERT INTO "list" ("id", "value") VALUES (E'ms_Latn_SG', E'Malay (Latin, Singapore)'); INSERT INTO "list" ("id", "value") VALUES (E'ms_Latn', E'Malay (Latin)'); INSERT INTO "list" ("id", "value") VALUES (E'ms_MY', E'Malay (Malaysia)'); INSERT INTO "list" ("id", "value") VALUES (E'ms_SG', E'Malay (Singapore)'); INSERT INTO "list" ("id", "value") VALUES (E'ml', E'Malayalam'); INSERT INTO "list" ("id", "value") VALUES (E'ml_IN', E'Malayalam (India)'); INSERT INTO "list" ("id", "value") VALUES (E'mt', E'Maltese'); INSERT INTO "list" ("id", "value") VALUES (E'mt_MT', E'Maltese (Malta)'); INSERT INTO "list" ("id", "value") VALUES (E'gv', E'Manx'); INSERT INTO "list" ("id", "value") VALUES (E'gv_IM', E'Manx (Isle of Man)'); INSERT INTO "list" ("id", "value") VALUES (E'mr', E'Marathi'); INSERT INTO "list" ("id", "value") VALUES (E'mr_IN', E'Marathi (India)'); INSERT INTO "list" ("id", "value") VALUES (E'mn', E'Mongolian'); INSERT INTO "list" ("id", "value") VALUES (E'mn_Cyrl_MN', E'Mongolian (Cyrillic, Mongolia)'); INSERT INTO "list" ("id", "value") VALUES (E'mn_Cyrl', E'Mongolian (Cyrillic)'); INSERT INTO "list" ("id", "value") VALUES (E'mn_MN', E'Mongolian (Mongolia)'); INSERT INTO "list" ("id", "value") VALUES (E'ne', E'Nepali'); INSERT INTO "list" ("id", "value") VALUES (E'ne_IN', E'Nepali (India)'); INSERT INTO "list" ("id", "value") VALUES (E'ne_NP', E'Nepali (Nepal)'); INSERT INTO "list" ("id", "value") VALUES (E'nd', E'North Ndebele'); INSERT INTO "list" ("id", "value") VALUES (E'nd_ZW', E'North Ndebele (Zimbabwe)'); INSERT INTO "list" ("id", "value") VALUES (E'se', E'Northern Sami'); INSERT INTO "list" ("id", "value") VALUES (E'se_FI', E'Northern Sami (Finland)'); INSERT INTO "list" ("id", "value") VALUES (E'se_NO', E'Northern Sami (Norway)'); INSERT INTO "list" ("id", "value") VALUES (E'se_SE', E'Northern Sami (Sweden)'); INSERT INTO "list" ("id", "value") VALUES (E'no', E'Norwegian'); INSERT INTO "list" ("id", "value") VALUES (E'no_NO', E'Norwegian (Norway)'); INSERT INTO "list" ("id", "value") VALUES (E'nb', E'Norwegian Bokmål'); INSERT INTO "list" ("id", "value") VALUES (E'nb_NO', E'Norwegian Bokmål (Norway)'); INSERT INTO "list" ("id", "value") VALUES (E'nb_SJ', E'Norwegian Bokmål (Svalbard & Jan Mayen)'); INSERT INTO "list" ("id", "value") VALUES (E'nn', E'Norwegian Nynorsk'); INSERT INTO "list" ("id", "value") VALUES (E'nn_NO', E'Norwegian Nynorsk (Norway)'); INSERT INTO "list" ("id", "value") VALUES (E'or', E'Oriya'); INSERT INTO "list" ("id", "value") VALUES (E'or_IN', E'Oriya (India)'); INSERT INTO "list" ("id", "value") VALUES (E'om', E'Oromo'); INSERT INTO "list" ("id", "value") VALUES (E'om_ET', E'Oromo (Ethiopia)'); INSERT INTO "list" ("id", "value") VALUES (E'om_KE', E'Oromo (Kenya)'); INSERT INTO "list" ("id", "value") VALUES (E'os', E'Ossetic'); INSERT INTO "list" ("id", "value") VALUES (E'os_GE', E'Ossetic (Georgia)'); INSERT INTO "list" ("id", "value") VALUES (E'os_RU', E'Ossetic (Russia)'); INSERT INTO "list" ("id", "value") VALUES (E'ps', E'Pashto'); INSERT INTO "list" ("id", "value") VALUES (E'ps_AF', E'Pashto (Afghanistan)'); INSERT INTO "list" ("id", "value") VALUES (E'fa', E'Persian'); INSERT INTO "list" ("id", "value") VALUES (E'fa_AF', E'Persian (Afghanistan)'); INSERT INTO "list" ("id", "value") VALUES (E'fa_IR', E'Persian (Iran)'); INSERT INTO "list" ("id", "value") VALUES (E'pl', E'Polish'); INSERT INTO "list" ("id", "value") VALUES (E'pl_PL', E'Polish (Poland)'); INSERT INTO "list" ("id", "value") VALUES (E'pt', E'Portuguese'); INSERT INTO "list" ("id", "value") VALUES (E'pt_AO', E'Portuguese (Angola)'); INSERT INTO "list" ("id", "value") VALUES (E'pt_BR', E'Portuguese (Brazil)'); INSERT INTO "list" ("id", "value") VALUES (E'pt_CV', E'Portuguese (Cape Verde)'); INSERT INTO "list" ("id", "value") VALUES (E'pt_GW', E'Portuguese (Guinea-Bissau)'); INSERT INTO "list" ("id", "value") VALUES (E'pt_MO', E'Portuguese (Macau SAR China)'); INSERT INTO "list" ("id", "value") VALUES (E'pt_MZ', E'Portuguese (Mozambique)'); INSERT INTO "list" ("id", "value") VALUES (E'pt_PT', E'Portuguese (Portugal)'); INSERT INTO "list" ("id", "value") VALUES (E'pt_ST', E'Portuguese (São Tomé & Príncipe)'); INSERT INTO "list" ("id", "value") VALUES (E'pt_TL', E'Portuguese (Timor-Leste)'); INSERT INTO "list" ("id", "value") VALUES (E'pa', E'Punjabi'); INSERT INTO "list" ("id", "value") VALUES (E'pa_Arab_PK', E'Punjabi (Arabic, Pakistan)'); INSERT INTO "list" ("id", "value") VALUES (E'pa_Arab', E'Punjabi (Arabic)'); INSERT INTO "list" ("id", "value") VALUES (E'pa_Guru_IN', E'Punjabi (Gurmukhi, India)'); INSERT INTO "list" ("id", "value") VALUES (E'pa_Guru', E'Punjabi (Gurmukhi)'); INSERT INTO "list" ("id", "value") VALUES (E'pa_IN', E'Punjabi (India)'); INSERT INTO "list" ("id", "value") VALUES (E'pa_PK', E'Punjabi (Pakistan)'); INSERT INTO "list" ("id", "value") VALUES (E'qu', E'Quechua'); INSERT INTO "list" ("id", "value") VALUES (E'qu_BO', E'Quechua (Bolivia)'); INSERT INTO "list" ("id", "value") VALUES (E'qu_EC', E'Quechua (Ecuador)'); INSERT INTO "list" ("id", "value") VALUES (E'qu_PE', E'Quechua (Peru)'); INSERT INTO "list" ("id", "value") VALUES (E'ro', E'Romanian'); INSERT INTO "list" ("id", "value") VALUES (E'ro_MD', E'Romanian (Moldova)'); INSERT INTO "list" ("id", "value") VALUES (E'ro_RO', E'Romanian (Romania)'); INSERT INTO "list" ("id", "value") VALUES (E'rm', E'Romansh'); INSERT INTO "list" ("id", "value") VALUES (E'rm_CH', E'Romansh (Switzerland)'); INSERT INTO "list" ("id", "value") VALUES (E'rn', E'Rundi'); INSERT INTO "list" ("id", "value") VALUES (E'rn_BI', E'Rundi (Burundi)'); INSERT INTO "list" ("id", "value") VALUES (E'ru', E'Russian'); INSERT INTO "list" ("id", "value") VALUES (E'ru_BY', E'Russian (Belarus)'); INSERT INTO "list" ("id", "value") VALUES (E'ru_KZ', E'Russian (Kazakhstan)'); INSERT INTO "list" ("id", "value") VALUES (E'ru_KG', E'Russian (Kyrgyzstan)'); INSERT INTO "list" ("id", "value") VALUES (E'ru_MD', E'Russian (Moldova)'); INSERT INTO "list" ("id", "value") VALUES (E'ru_RU', E'Russian (Russia)'); INSERT INTO "list" ("id", "value") VALUES (E'ru_UA', E'Russian (Ukraine)'); INSERT INTO "list" ("id", "value") VALUES (E'sg', E'Sango'); INSERT INTO "list" ("id", "value") VALUES (E'sg_CF', E'Sango (Central African Republic)'); INSERT INTO "list" ("id", "value") VALUES (E'gd', E'Scottish Gaelic'); INSERT INTO "list" ("id", "value") VALUES (E'gd_GB', E'Scottish Gaelic (United Kingdom)'); INSERT INTO "list" ("id", "value") VALUES (E'sr', E'Serbian'); INSERT INTO "list" ("id", "value") VALUES (E'sr_BA', E'Serbian (Bosnia & Herzegovina)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_Cyrl_BA', E'Serbian (Cyrillic, Bosnia & Herzegovina)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_Cyrl_XK', E'Serbian (Cyrillic, Kosovo)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_Cyrl_ME', E'Serbian (Cyrillic, Montenegro)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_Cyrl_RS', E'Serbian (Cyrillic, Serbia)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_Cyrl', E'Serbian (Cyrillic)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_XK', E'Serbian (Kosovo)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_Latn_BA', E'Serbian (Latin, Bosnia & Herzegovina)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_Latn_XK', E'Serbian (Latin, Kosovo)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_Latn_ME', E'Serbian (Latin, Montenegro)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_Latn_RS', E'Serbian (Latin, Serbia)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_Latn', E'Serbian (Latin)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_ME', E'Serbian (Montenegro)'); INSERT INTO "list" ("id", "value") VALUES (E'sr_RS', E'Serbian (Serbia)'); INSERT INTO "list" ("id", "value") VALUES (E'sh', E'Serbo-Croatian'); INSERT INTO "list" ("id", "value") VALUES (E'sh_BA', E'Serbo-Croatian (Bosnia & Herzegovina)'); INSERT INTO "list" ("id", "value") VALUES (E'sn', E'Shona'); INSERT INTO "list" ("id", "value") VALUES (E'sn_ZW', E'Shona (Zimbabwe)'); INSERT INTO "list" ("id", "value") VALUES (E'ii', E'Sichuan Yi'); INSERT INTO "list" ("id", "value") VALUES (E'ii_CN', E'Sichuan Yi (China)'); INSERT INTO "list" ("id", "value") VALUES (E'si', E'Sinhala'); INSERT INTO "list" ("id", "value") VALUES (E'si_LK', E'Sinhala (Sri Lanka)'); INSERT INTO "list" ("id", "value") VALUES (E'sk', E'Slovak'); INSERT INTO "list" ("id", "value") VALUES (E'sk_SK', E'Slovak (Slovakia)'); INSERT INTO "list" ("id", "value") VALUES (E'sl', E'Slovenian'); INSERT INTO "list" ("id", "value") VALUES (E'sl_SI', E'Slovenian (Slovenia)'); INSERT INTO "list" ("id", "value") VALUES (E'so', E'Somali'); INSERT INTO "list" ("id", "value") VALUES (E'so_DJ', E'Somali (Djibouti)'); INSERT INTO "list" ("id", "value") VALUES (E'so_ET', E'Somali (Ethiopia)'); INSERT INTO "list" ("id", "value") VALUES (E'so_KE', E'Somali (Kenya)'); INSERT INTO "list" ("id", "value") VALUES (E'so_SO', E'Somali (Somalia)'); INSERT INTO "list" ("id", "value") VALUES (E'es', E'Spanish'); INSERT INTO "list" ("id", "value") VALUES (E'es_AR', E'Spanish (Argentina)'); INSERT INTO "list" ("id", "value") VALUES (E'es_BO', E'Spanish (Bolivia)'); INSERT INTO "list" ("id", "value") VALUES (E'es_IC', E'Spanish (Canary Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'es_EA', E'Spanish (Ceuta & Melilla)'); INSERT INTO "list" ("id", "value") VALUES (E'es_CL', E'Spanish (Chile)'); INSERT INTO "list" ("id", "value") VALUES (E'es_CO', E'Spanish (Colombia)'); INSERT INTO "list" ("id", "value") VALUES (E'es_CR', E'Spanish (Costa Rica)'); INSERT INTO "list" ("id", "value") VALUES (E'es_CU', E'Spanish (Cuba)'); INSERT INTO "list" ("id", "value") VALUES (E'es_DO', E'Spanish (Dominican Republic)'); INSERT INTO "list" ("id", "value") VALUES (E'es_EC', E'Spanish (Ecuador)'); INSERT INTO "list" ("id", "value") VALUES (E'es_SV', E'Spanish (El Salvador)'); INSERT INTO "list" ("id", "value") VALUES (E'es_GQ', E'Spanish (Equatorial Guinea)'); INSERT INTO "list" ("id", "value") VALUES (E'es_GT', E'Spanish (Guatemala)'); INSERT INTO "list" ("id", "value") VALUES (E'es_HN', E'Spanish (Honduras)'); INSERT INTO "list" ("id", "value") VALUES (E'es_MX', E'Spanish (Mexico)'); INSERT INTO "list" ("id", "value") VALUES (E'es_NI', E'Spanish (Nicaragua)'); INSERT INTO "list" ("id", "value") VALUES (E'es_PA', E'Spanish (Panama)'); INSERT INTO "list" ("id", "value") VALUES (E'es_PY', E'Spanish (Paraguay)'); INSERT INTO "list" ("id", "value") VALUES (E'es_PE', E'Spanish (Peru)'); INSERT INTO "list" ("id", "value") VALUES (E'es_PH', E'Spanish (Philippines)'); INSERT INTO "list" ("id", "value") VALUES (E'es_PR', E'Spanish (Puerto Rico)'); INSERT INTO "list" ("id", "value") VALUES (E'es_ES', E'Spanish (Spain)'); INSERT INTO "list" ("id", "value") VALUES (E'es_US', E'Spanish (United States)'); INSERT INTO "list" ("id", "value") VALUES (E'es_UY', E'Spanish (Uruguay)'); INSERT INTO "list" ("id", "value") VALUES (E'es_VE', E'Spanish (Venezuela)'); INSERT INTO "list" ("id", "value") VALUES (E'sw', E'Swahili'); INSERT INTO "list" ("id", "value") VALUES (E'sw_KE', E'Swahili (Kenya)'); INSERT INTO "list" ("id", "value") VALUES (E'sw_TZ', E'Swahili (Tanzania)'); INSERT INTO "list" ("id", "value") VALUES (E'sw_UG', E'Swahili (Uganda)'); INSERT INTO "list" ("id", "value") VALUES (E'sv', E'Swedish'); INSERT INTO "list" ("id", "value") VALUES (E'sv_AX', E'Swedish (Åland Islands)'); INSERT INTO "list" ("id", "value") VALUES (E'sv_FI', E'Swedish (Finland)'); INSERT INTO "list" ("id", "value") VALUES (E'sv_SE', E'Swedish (Sweden)'); INSERT INTO "list" ("id", "value") VALUES (E'tl', E'Tagalog'); INSERT INTO "list" ("id", "value") VALUES (E'tl_PH', E'Tagalog (Philippines)'); INSERT INTO "list" ("id", "value") VALUES (E'ta', E'Tamil'); INSERT INTO "list" ("id", "value") VALUES (E'ta_IN', E'Tamil (India)'); INSERT INTO "list" ("id", "value") VALUES (E'ta_MY', E'Tamil (Malaysia)'); INSERT INTO "list" ("id", "value") VALUES (E'ta_SG', E'Tamil (Singapore)'); INSERT INTO "list" ("id", "value") VALUES (E'ta_LK', E'Tamil (Sri Lanka)'); INSERT INTO "list" ("id", "value") VALUES (E'te', E'Telugu'); INSERT INTO "list" ("id", "value") VALUES (E'te_IN', E'Telugu (India)'); INSERT INTO "list" ("id", "value") VALUES (E'th', E'Thai'); INSERT INTO "list" ("id", "value") VALUES (E'th_TH', E'Thai (Thailand)'); INSERT INTO "list" ("id", "value") VALUES (E'bo', E'Tibetan'); INSERT INTO "list" ("id", "value") VALUES (E'bo_CN', E'Tibetan (China)'); INSERT INTO "list" ("id", "value") VALUES (E'bo_IN', E'Tibetan (India)'); INSERT INTO "list" ("id", "value") VALUES (E'ti', E'Tigrinya'); INSERT INTO "list" ("id", "value") VALUES (E'ti_ER', E'Tigrinya (Eritrea)'); INSERT INTO "list" ("id", "value") VALUES (E'ti_ET', E'Tigrinya (Ethiopia)'); INSERT INTO "list" ("id", "value") VALUES (E'to', E'Tongan'); INSERT INTO "list" ("id", "value") VALUES (E'to_TO', E'Tongan (Tonga)'); INSERT INTO "list" ("id", "value") VALUES (E'tr', E'Turkish'); INSERT INTO "list" ("id", "value") VALUES (E'tr_CY', E'Turkish (Cyprus)'); INSERT INTO "list" ("id", "value") VALUES (E'tr_TR', E'Turkish (Turkey)'); INSERT INTO "list" ("id", "value") VALUES (E'uk', E'Ukrainian'); INSERT INTO "list" ("id", "value") VALUES (E'uk_UA', E'Ukrainian (Ukraine)'); INSERT INTO "list" ("id", "value") VALUES (E'ur', E'Urdu'); INSERT INTO "list" ("id", "value") VALUES (E'ur_IN', E'Urdu (India)'); INSERT INTO "list" ("id", "value") VALUES (E'ur_PK', E'Urdu (Pakistan)'); INSERT INTO "list" ("id", "value") VALUES (E'ug', E'Uyghur'); INSERT INTO "list" ("id", "value") VALUES (E'ug_Arab_CN', E'Uyghur (Arabic, China)'); INSERT INTO "list" ("id", "value") VALUES (E'ug_Arab', E'Uyghur (Arabic)'); INSERT INTO "list" ("id", "value") VALUES (E'ug_CN', E'Uyghur (China)'); INSERT INTO "list" ("id", "value") VALUES (E'uz', E'Uzbek'); INSERT INTO "list" ("id", "value") VALUES (E'uz_AF', E'Uzbek (Afghanistan)'); INSERT INTO "list" ("id", "value") VALUES (E'uz_Arab_AF', E'Uzbek (Arabic, Afghanistan)'); INSERT INTO "list" ("id", "value") VALUES (E'uz_Arab', E'Uzbek (Arabic)'); INSERT INTO "list" ("id", "value") VALUES (E'uz_Cyrl_UZ', E'Uzbek (Cyrillic, Uzbekistan)'); INSERT INTO "list" ("id", "value") VALUES (E'uz_Cyrl', E'Uzbek (Cyrillic)'); INSERT INTO "list" ("id", "value") VALUES (E'uz_Latn_UZ', E'Uzbek (Latin, Uzbekistan)'); INSERT INTO "list" ("id", "value") VALUES (E'uz_Latn', E'Uzbek (Latin)'); INSERT INTO "list" ("id", "value") VALUES (E'uz_UZ', E'Uzbek (Uzbekistan)'); INSERT INTO "list" ("id", "value") VALUES (E'vi', E'Vietnamese'); INSERT INTO "list" ("id", "value") VALUES (E'vi_VN', E'Vietnamese (Vietnam)'); INSERT INTO "list" ("id", "value") VALUES (E'cy', E'Welsh'); INSERT INTO "list" ("id", "value") VALUES (E'cy_GB', E'Welsh (United Kingdom)'); INSERT INTO "list" ("id", "value") VALUES (E'fy', E'Western Frisian'); INSERT INTO "list" ("id", "value") VALUES (E'fy_NL', E'Western Frisian (Netherlands)'); INSERT INTO "list" ("id", "value") VALUES (E'yi', E'Yiddish'); INSERT INTO "list" ("id", "value") VALUES (E'yo', E'Yoruba'); INSERT INTO "list" ("id", "value") VALUES (E'yo_BJ', E'Yoruba (Benin)'); INSERT INTO "list" ("id", "value") VALUES (E'yo_NG', E'Yoruba (Nigeria)'); INSERT INTO "list" ("id", "value") VALUES (E'zu', E'Zulu'); INSERT INTO "list" ("id", "value") VALUES (E'zu_ZA', E'Zulu (South Africa)');
{ "pile_set_name": "Github" }
import "cross-fetch/polyfill"; import "core-js/stable"; import "regenerator-runtime/runtime"; import React from "react"; import ReactDOM from "react-dom"; import App from "./App"; const render = module.hot ? ReactDOM.render : ReactDOM.hydrate; render(<App />, document.getElementById("root"));
{ "pile_set_name": "Github" }
/* * Copyright (C) 2015-2019 Alibaba Group Holding Limited */ #ifndef K_PROC_H #define K_PROC_H #include <stdint.h> #ifndef RHINO_CONFIG_MAX_APP_BINS #define MAX_APP_BINS (3) /**< by default, support 3 app bins */ #else #if (RHINO_CONFIG_MAX_APP_BINS > 32) #error "app bins count beyonds 32" #endif #define MAX_APP_BINS RHINO_CONFIG_MAX_APP_BINS #endif /** * @brief process init * * @return On success, return 0, else return negative error code */ int k_proc_init(void); /** * @brief start all apps * * @return return the number of app star */ int k_proc_exec_all(void); /** * @brief unload process * * @param[in] pid the PID of the process to be unloaded */ void k_proc_unload(uint32_t pid); /** * @brief switch process on current CPU * * @param[in] new the new task to be scheded in * @param[in] old the old task to be scheded out */ void k_proc_switch(void *new, void *old); /** * @brief start user space apps * * @return On success return 0, else return negative errno */ int application_start(int argc, char **argv); #endif /* K_PROC_H */
{ "pile_set_name": "Github" }
/*! * Font Awesome 4.7.0 by @davegandy - http://fontawesome.io - @fontawesome * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) */ /* FONT PATH * -------------------------- */ @font-face { font-family: 'FontAwesome'; src: url('/assets/frappe/css/fonts/fontawesome/fontawesome-webfont.eot?v=4.7.0'); src: url('/assets/frappe/css/fonts/fontawesome/fontawesome-webfont.eot?#iefix&v=4.7.0') format('embedded-opentype'), url('/assets/frappe/css/fonts/fontawesome/fontawesome-webfont.woff2?v=4.7.0') format('woff2'), url('/assets/frappe/css/fonts/fontawesome/fontawesome-webfont.woff?v=4.7.0') format('woff'), url('/assets/frappe/css/fonts/fontawesome/fontawesome-webfont.ttf?v=4.7.0') format('truetype'), url('/assets/frappe/css/fonts/fontawesome/fontawesome-webfont.svg?v=4.7.0#fontawesomeregular') format('svg'); font-weight: normal; font-style: normal; } .fa { display: inline-block; font: normal normal normal 14px/1 FontAwesome; font-size: inherit; text-rendering: auto; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } /* makes the font 33% larger relative to the icon container */ .fa-lg { font-size: 1.33333333em; line-height: 0.75em; vertical-align: -15%; } .fa-2x { font-size: 2em; } .fa-3x { font-size: 3em; } .fa-4x { font-size: 4em; } .fa-5x { font-size: 5em; } .fa-fw { width: 1.28571429em; text-align: center; } .fa-ul { padding-left: 0; margin-left: 2.14285714em; list-style-type: none; } .fa-ul > li { position: relative; } .fa-li { position: absolute; left: -2.14285714em; width: 2.14285714em; top: 0.14285714em; text-align: center; } .fa-li.fa-lg { left: -1.85714286em; } .fa-border { padding: .2em .25em .15em; border: solid 0.08em #eeeeee; border-radius: .1em; } .fa-pull-left { float: left; } .fa-pull-right { float: right; } .fa.fa-pull-left { margin-right: .3em; } .fa.fa-pull-right { margin-left: .3em; } /* Deprecated as of 4.4.0 */ .pull-right { float: right; } .pull-left { float: left; } .fa.pull-left { margin-right: .3em; } .fa.pull-right { margin-left: .3em; } .fa-spin { -webkit-animation: fa-spin 2s infinite linear; animation: fa-spin 2s infinite linear; } .fa-pulse { -webkit-animation: fa-spin 1s infinite steps(8); animation: fa-spin 1s infinite steps(8); } @-webkit-keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } @keyframes fa-spin { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); transform: rotate(359deg); } } .fa-rotate-90 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)"; -webkit-transform: rotate(90deg); -ms-transform: rotate(90deg); transform: rotate(90deg); } .fa-rotate-180 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)"; -webkit-transform: rotate(180deg); -ms-transform: rotate(180deg); transform: rotate(180deg); } .fa-rotate-270 { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)"; -webkit-transform: rotate(270deg); -ms-transform: rotate(270deg); transform: rotate(270deg); } .fa-flip-horizontal { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)"; -webkit-transform: scale(-1, 1); -ms-transform: scale(-1, 1); transform: scale(-1, 1); } .fa-flip-vertical { -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)"; -webkit-transform: scale(1, -1); -ms-transform: scale(1, -1); transform: scale(1, -1); } :root .fa-rotate-90, :root .fa-rotate-180, :root .fa-rotate-270, :root .fa-flip-horizontal, :root .fa-flip-vertical { filter: none; } .fa-stack { position: relative; display: inline-block; width: 2em; height: 2em; line-height: 2em; vertical-align: middle; } .fa-stack-1x, .fa-stack-2x { position: absolute; left: 0; width: 100%; text-align: center; } .fa-stack-1x { line-height: inherit; } .fa-stack-2x { font-size: 2em; } .fa-inverse { color: #ffffff; } /* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen readers do not read off random characters that represent icons */ .fa-glass:before { content: "\f000"; } .fa-music:before { content: "\f001"; } .fa-search:before { content: "\f002"; } .fa-envelope-o:before { content: "\f003"; } .fa-heart:before { content: "\f004"; } .fa-star:before { content: "\f005"; } .fa-star-o:before { content: "\f006"; } .fa-user:before { content: "\f007"; } .fa-film:before { content: "\f008"; } .fa-th-large:before { content: "\f009"; } .fa-th:before { content: "\f00a"; } .fa-th-list:before { content: "\f00b"; } .fa-check:before { content: "\f00c"; } .fa-remove:before, .fa-close:before, .fa-times:before { content: "\f00d"; } .fa-search-plus:before { content: "\f00e"; } .fa-search-minus:before { content: "\f010"; } .fa-power-off:before { content: "\f011"; } .fa-signal:before { content: "\f012"; } .fa-gear:before, .fa-cog:before { content: "\f013"; } .fa-trash-o:before { content: "\f014"; } .fa-home:before { content: "\f015"; } .fa-file-o:before { content: "\f016"; } .fa-clock-o:before { content: "\f017"; } .fa-road:before { content: "\f018"; } .fa-download:before { content: "\f019"; } .fa-arrow-circle-o-down:before { content: "\f01a"; } .fa-arrow-circle-o-up:before { content: "\f01b"; } .fa-inbox:before { content: "\f01c"; } .fa-play-circle-o:before { content: "\f01d"; } .fa-rotate-right:before, .fa-repeat:before { content: "\f01e"; } .fa-refresh:before { content: "\f021"; } .fa-list-alt:before { content: "\f022"; } .fa-lock:before { content: "\f023"; } .fa-flag:before { content: "\f024"; } .fa-headphones:before { content: "\f025"; } .fa-volume-off:before { content: "\f026"; } .fa-volume-down:before { content: "\f027"; } .fa-volume-up:before { content: "\f028"; } .fa-qrcode:before { content: "\f029"; } .fa-barcode:before { content: "\f02a"; } .fa-tag:before { content: "\f02b"; } .fa-tags:before { content: "\f02c"; } .fa-book:before { content: "\f02d"; } .fa-bookmark:before { content: "\f02e"; } .fa-print:before { content: "\f02f"; } .fa-camera:before { content: "\f030"; } .fa-font:before { content: "\f031"; } .fa-bold:before { content: "\f032"; } .fa-italic:before { content: "\f033"; } .fa-text-height:before { content: "\f034"; } .fa-text-width:before { content: "\f035"; } .fa-align-left:before { content: "\f036"; } .fa-align-center:before { content: "\f037"; } .fa-align-right:before { content: "\f038"; } .fa-align-justify:before { content: "\f039"; } .fa-list:before { content: "\f03a"; } .fa-dedent:before, .fa-outdent:before { content: "\f03b"; } .fa-indent:before { content: "\f03c"; } .fa-video-camera:before { content: "\f03d"; } .fa-photo:before, .fa-image:before, .fa-picture-o:before { content: "\f03e"; } .fa-pencil:before { content: "\f040"; } .fa-map-marker:before { content: "\f041"; } .fa-adjust:before { content: "\f042"; } .fa-tint:before { content: "\f043"; } .fa-edit:before, .fa-pencil-square-o:before { content: "\f044"; } .fa-share-square-o:before { content: "\f045"; } .fa-check-square-o:before { content: "\f046"; } .fa-arrows:before { content: "\f047"; } .fa-step-backward:before { content: "\f048"; } .fa-fast-backward:before { content: "\f049"; } .fa-backward:before { content: "\f04a"; } .fa-play:before { content: "\f04b"; } .fa-pause:before { content: "\f04c"; } .fa-stop:before { content: "\f04d"; } .fa-forward:before { content: "\f04e"; } .fa-fast-forward:before { content: "\f050"; } .fa-step-forward:before { content: "\f051"; } .fa-eject:before { content: "\f052"; } .fa-chevron-left:before { content: "\f053"; } .fa-chevron-right:before { content: "\f054"; } .fa-plus-circle:before { content: "\f055"; } .fa-minus-circle:before { content: "\f056"; } .fa-times-circle:before { content: "\f057"; } .fa-check-circle:before { content: "\f058"; } .fa-question-circle:before { content: "\f059"; } .fa-info-circle:before { content: "\f05a"; } .fa-crosshairs:before { content: "\f05b"; } .fa-times-circle-o:before { content: "\f05c"; } .fa-check-circle-o:before { content: "\f05d"; } .fa-ban:before { content: "\f05e"; } .fa-arrow-left:before { content: "\f060"; } .fa-arrow-right:before { content: "\f061"; } .fa-arrow-up:before { content: "\f062"; } .fa-arrow-down:before { content: "\f063"; } .fa-mail-forward:before, .fa-share:before { content: "\f064"; } .fa-expand:before { content: "\f065"; } .fa-compress:before { content: "\f066"; } .fa-plus:before { content: "\f067"; } .fa-minus:before { content: "\f068"; } .fa-asterisk:before { content: "\f069"; } .fa-exclamation-circle:before { content: "\f06a"; } .fa-gift:before { content: "\f06b"; } .fa-leaf:before { content: "\f06c"; } .fa-fire:before { content: "\f06d"; } .fa-eye:before { content: "\f06e"; } .fa-eye-slash:before { content: "\f070"; } .fa-warning:before, .fa-exclamation-triangle:before { content: "\f071"; } .fa-plane:before { content: "\f072"; } .fa-calendar:before { content: "\f073"; } .fa-random:before { content: "\f074"; } .fa-comment:before { content: "\f075"; } .fa-magnet:before { content: "\f076"; } .fa-chevron-up:before { content: "\f077"; } .fa-chevron-down:before { content: "\f078"; } .fa-retweet:before { content: "\f079"; } .fa-shopping-cart:before { content: "\f07a"; } .fa-folder:before { content: "\f07b"; } .fa-folder-open:before { content: "\f07c"; } .fa-arrows-v:before { content: "\f07d"; } .fa-arrows-h:before { content: "\f07e"; } .fa-bar-chart-o:before, .fa-bar-chart:before { content: "\f080"; } .fa-twitter-square:before { content: "\f081"; } .fa-facebook-square:before { content: "\f082"; } .fa-camera-retro:before { content: "\f083"; } .fa-key:before { content: "\f084"; } .fa-gears:before, .fa-cogs:before { content: "\f085"; } .fa-comments:before { content: "\f086"; } .fa-thumbs-o-up:before { content: "\f087"; } .fa-thumbs-o-down:before { content: "\f088"; } .fa-star-half:before { content: "\f089"; } .fa-heart-o:before { content: "\f08a"; } .fa-sign-out:before { content: "\f08b"; } .fa-linkedin-square:before { content: "\f08c"; } .fa-thumb-tack:before { content: "\f08d"; } .fa-external-link:before { content: "\f08e"; } .fa-sign-in:before { content: "\f090"; } .fa-trophy:before { content: "\f091"; } .fa-github-square:before { content: "\f092"; } .fa-upload:before { content: "\f093"; } .fa-lemon-o:before { content: "\f094"; } .fa-phone:before { content: "\f095"; } .fa-square-o:before { content: "\f096"; } .fa-bookmark-o:before { content: "\f097"; } .fa-phone-square:before { content: "\f098"; } .fa-twitter:before { content: "\f099"; } .fa-facebook-f:before, .fa-facebook:before { content: "\f09a"; } .fa-github:before { content: "\f09b"; } .fa-unlock:before { content: "\f09c"; } .fa-credit-card:before { content: "\f09d"; } .fa-feed:before, .fa-rss:before { content: "\f09e"; } .fa-hdd-o:before { content: "\f0a0"; } .fa-bullhorn:before { content: "\f0a1"; } .fa-bell:before { content: "\f0f3"; } .fa-certificate:before { content: "\f0a3"; } .fa-hand-o-right:before { content: "\f0a4"; } .fa-hand-o-left:before { content: "\f0a5"; } .fa-hand-o-up:before { content: "\f0a6"; } .fa-hand-o-down:before { content: "\f0a7"; } .fa-arrow-circle-left:before { content: "\f0a8"; } .fa-arrow-circle-right:before { content: "\f0a9"; } .fa-arrow-circle-up:before { content: "\f0aa"; } .fa-arrow-circle-down:before { content: "\f0ab"; } .fa-globe:before { content: "\f0ac"; } .fa-wrench:before { content: "\f0ad"; } .fa-tasks:before { content: "\f0ae"; } .fa-filter:before { content: "\f0b0"; } .fa-briefcase:before { content: "\f0b1"; } .fa-arrows-alt:before { content: "\f0b2"; } .fa-group:before, .fa-users:before { content: "\f0c0"; } .fa-chain:before, .fa-link:before { content: "\f0c1"; } .fa-cloud:before { content: "\f0c2"; } .fa-flask:before { content: "\f0c3"; } .fa-cut:before, .fa-scissors:before { content: "\f0c4"; } .fa-copy:before, .fa-files-o:before { content: "\f0c5"; } .fa-paperclip:before { content: "\f0c6"; } .fa-save:before, .fa-floppy-o:before { content: "\f0c7"; } .fa-square:before { content: "\f0c8"; } .fa-navicon:before, .fa-reorder:before, .fa-bars:before { content: "\f0c9"; } .fa-list-ul:before { content: "\f0ca"; } .fa-list-ol:before { content: "\f0cb"; } .fa-strikethrough:before { content: "\f0cc"; } .fa-underline:before { content: "\f0cd"; } .fa-table:before { content: "\f0ce"; } .fa-magic:before { content: "\f0d0"; } .fa-truck:before { content: "\f0d1"; } .fa-pinterest:before { content: "\f0d2"; } .fa-pinterest-square:before { content: "\f0d3"; } .fa-google-plus-square:before { content: "\f0d4"; } .fa-google-plus:before { content: "\f0d5"; } .fa-money:before { content: "\f0d6"; } .fa-caret-down:before { content: "\f0d7"; } .fa-caret-up:before { content: "\f0d8"; } .fa-caret-left:before { content: "\f0d9"; } .fa-caret-right:before { content: "\f0da"; } .fa-columns:before { content: "\f0db"; } .fa-unsorted:before, .fa-sort:before { content: "\f0dc"; } .fa-sort-down:before, .fa-sort-desc:before { content: "\f0dd"; } .fa-sort-up:before, .fa-sort-asc:before { content: "\f0de"; } .fa-envelope:before { content: "\f0e0"; } .fa-linkedin:before { content: "\f0e1"; } .fa-rotate-left:before, .fa-undo:before { content: "\f0e2"; } .fa-legal:before, .fa-gavel:before { content: "\f0e3"; } .fa-dashboard:before, .fa-tachometer:before { content: "\f0e4"; } .fa-comment-o:before { content: "\f0e5"; } .fa-comments-o:before { content: "\f0e6"; } .fa-flash:before, .fa-bolt:before { content: "\f0e7"; } .fa-sitemap:before { content: "\f0e8"; } .fa-umbrella:before { content: "\f0e9"; } .fa-paste:before, .fa-clipboard:before { content: "\f0ea"; } .fa-lightbulb-o:before { content: "\f0eb"; } .fa-exchange:before { content: "\f0ec"; } .fa-cloud-download:before { content: "\f0ed"; } .fa-cloud-upload:before { content: "\f0ee"; } .fa-user-md:before { content: "\f0f0"; } .fa-stethoscope:before { content: "\f0f1"; } .fa-suitcase:before { content: "\f0f2"; } .fa-bell-o:before { content: "\f0a2"; } .fa-coffee:before { content: "\f0f4"; } .fa-cutlery:before { content: "\f0f5"; } .fa-file-text-o:before { content: "\f0f6"; } .fa-building-o:before { content: "\f0f7"; } .fa-hospital-o:before { content: "\f0f8"; } .fa-ambulance:before { content: "\f0f9"; } .fa-medkit:before { content: "\f0fa"; } .fa-fighter-jet:before { content: "\f0fb"; } .fa-beer:before { content: "\f0fc"; } .fa-h-square:before { content: "\f0fd"; } .fa-plus-square:before { content: "\f0fe"; } .fa-angle-double-left:before { content: "\f100"; } .fa-angle-double-right:before { content: "\f101"; } .fa-angle-double-up:before { content: "\f102"; } .fa-angle-double-down:before { content: "\f103"; } .fa-angle-left:before { content: "\f104"; } .fa-angle-right:before { content: "\f105"; } .fa-angle-up:before { content: "\f106"; } .fa-angle-down:before { content: "\f107"; } .fa-desktop:before { content: "\f108"; } .fa-laptop:before { content: "\f109"; } .fa-tablet:before { content: "\f10a"; } .fa-mobile-phone:before, .fa-mobile:before { content: "\f10b"; } .fa-circle-o:before { content: "\f10c"; } .fa-quote-left:before { content: "\f10d"; } .fa-quote-right:before { content: "\f10e"; } .fa-spinner:before { content: "\f110"; } .fa-circle:before { content: "\f111"; } .fa-mail-reply:before, .fa-reply:before { content: "\f112"; } .fa-github-alt:before { content: "\f113"; } .fa-folder-o:before { content: "\f114"; } .fa-folder-open-o:before { content: "\f115"; } .fa-smile-o:before { content: "\f118"; } .fa-frown-o:before { content: "\f119"; } .fa-meh-o:before { content: "\f11a"; } .fa-gamepad:before { content: "\f11b"; } .fa-keyboard-o:before { content: "\f11c"; } .fa-flag-o:before { content: "\f11d"; } .fa-flag-checkered:before { content: "\f11e"; } .fa-terminal:before { content: "\f120"; } .fa-code:before { content: "\f121"; } .fa-mail-reply-all:before, .fa-reply-all:before { content: "\f122"; } .fa-star-half-empty:before, .fa-star-half-full:before, .fa-star-half-o:before { content: "\f123"; } .fa-location-arrow:before { content: "\f124"; } .fa-crop:before { content: "\f125"; } .fa-code-fork:before { content: "\f126"; } .fa-unlink:before, .fa-chain-broken:before { content: "\f127"; } .fa-question:before { content: "\f128"; } .fa-info:before { content: "\f129"; } .fa-exclamation:before { content: "\f12a"; } .fa-superscript:before { content: "\f12b"; } .fa-subscript:before { content: "\f12c"; } .fa-eraser:before { content: "\f12d"; } .fa-puzzle-piece:before { content: "\f12e"; } .fa-microphone:before { content: "\f130"; } .fa-microphone-slash:before { content: "\f131"; } .fa-shield:before { content: "\f132"; } .fa-calendar-o:before { content: "\f133"; } .fa-fire-extinguisher:before { content: "\f134"; } .fa-rocket:before { content: "\f135"; } .fa-maxcdn:before { content: "\f136"; } .fa-chevron-circle-left:before { content: "\f137"; } .fa-chevron-circle-right:before { content: "\f138"; } .fa-chevron-circle-up:before { content: "\f139"; } .fa-chevron-circle-down:before { content: "\f13a"; } .fa-html5:before { content: "\f13b"; } .fa-css3:before { content: "\f13c"; } .fa-anchor:before { content: "\f13d"; } .fa-unlock-alt:before { content: "\f13e"; } .fa-bullseye:before { content: "\f140"; } .fa-ellipsis-h:before { content: "\f141"; } .fa-ellipsis-v:before { content: "\f142"; } .fa-rss-square:before { content: "\f143"; } .fa-play-circle:before { content: "\f144"; } .fa-ticket:before { content: "\f145"; } .fa-minus-square:before { content: "\f146"; } .fa-minus-square-o:before { content: "\f147"; } .fa-level-up:before { content: "\f148"; } .fa-level-down:before { content: "\f149"; } .fa-check-square:before { content: "\f14a"; } .fa-pencil-square:before { content: "\f14b"; } .fa-external-link-square:before { content: "\f14c"; } .fa-share-square:before { content: "\f14d"; } .fa-compass:before { content: "\f14e"; } .fa-toggle-down:before, .fa-caret-square-o-down:before { content: "\f150"; } .fa-toggle-up:before, .fa-caret-square-o-up:before { content: "\f151"; } .fa-toggle-right:before, .fa-caret-square-o-right:before { content: "\f152"; } .fa-euro:before, .fa-eur:before { content: "\f153"; } .fa-gbp:before { content: "\f154"; } .fa-dollar:before, .fa-usd:before { content: "\f155"; } .fa-rupee:before, .fa-inr:before { content: "\f156"; } .fa-cny:before, .fa-rmb:before, .fa-yen:before, .fa-jpy:before { content: "\f157"; } .fa-ruble:before, .fa-rouble:before, .fa-rub:before { content: "\f158"; } .fa-won:before, .fa-krw:before { content: "\f159"; } .fa-bitcoin:before, .fa-btc:before { content: "\f15a"; } .fa-file:before { content: "\f15b"; } .fa-file-text:before { content: "\f15c"; } .fa-sort-alpha-asc:before { content: "\f15d"; } .fa-sort-alpha-desc:before { content: "\f15e"; } .fa-sort-amount-asc:before { content: "\f160"; } .fa-sort-amount-desc:before { content: "\f161"; } .fa-sort-numeric-asc:before { content: "\f162"; } .fa-sort-numeric-desc:before { content: "\f163"; } .fa-thumbs-up:before { content: "\f164"; } .fa-thumbs-down:before { content: "\f165"; } .fa-youtube-square:before { content: "\f166"; } .fa-youtube:before { content: "\f167"; } .fa-xing:before { content: "\f168"; } .fa-xing-square:before { content: "\f169"; } .fa-youtube-play:before { content: "\f16a"; } .fa-dropbox:before { content: "\f16b"; } .fa-stack-overflow:before { content: "\f16c"; } .fa-instagram:before { content: "\f16d"; } .fa-flickr:before { content: "\f16e"; } .fa-adn:before { content: "\f170"; } .fa-bitbucket:before { content: "\f171"; } .fa-bitbucket-square:before { content: "\f172"; } .fa-tumblr:before { content: "\f173"; } .fa-tumblr-square:before { content: "\f174"; } .fa-long-arrow-down:before { content: "\f175"; } .fa-long-arrow-up:before { content: "\f176"; } .fa-long-arrow-left:before { content: "\f177"; } .fa-long-arrow-right:before { content: "\f178"; } .fa-apple:before { content: "\f179"; } .fa-windows:before { content: "\f17a"; } .fa-android:before { content: "\f17b"; } .fa-linux:before { content: "\f17c"; } .fa-dribbble:before { content: "\f17d"; } .fa-skype:before { content: "\f17e"; } .fa-foursquare:before { content: "\f180"; } .fa-trello:before { content: "\f181"; } .fa-female:before { content: "\f182"; } .fa-male:before { content: "\f183"; } .fa-gittip:before, .fa-gratipay:before { content: "\f184"; } .fa-sun-o:before { content: "\f185"; } .fa-moon-o:before { content: "\f186"; } .fa-archive:before { content: "\f187"; } .fa-bug:before { content: "\f188"; } .fa-vk:before { content: "\f189"; } .fa-weibo:before { content: "\f18a"; } .fa-renren:before { content: "\f18b"; } .fa-pagelines:before { content: "\f18c"; } .fa-stack-exchange:before { content: "\f18d"; } .fa-arrow-circle-o-right:before { content: "\f18e"; } .fa-arrow-circle-o-left:before { content: "\f190"; } .fa-toggle-left:before, .fa-caret-square-o-left:before { content: "\f191"; } .fa-dot-circle-o:before { content: "\f192"; } .fa-wheelchair:before { content: "\f193"; } .fa-vimeo-square:before { content: "\f194"; } .fa-turkish-lira:before, .fa-try:before { content: "\f195"; } .fa-plus-square-o:before { content: "\f196"; } .fa-space-shuttle:before { content: "\f197"; } .fa-slack:before { content: "\f198"; } .fa-envelope-square:before { content: "\f199"; } .fa-wordpress:before { content: "\f19a"; } .fa-openid:before { content: "\f19b"; } .fa-institution:before, .fa-bank:before, .fa-university:before { content: "\f19c"; } .fa-mortar-board:before, .fa-graduation-cap:before { content: "\f19d"; } .fa-yahoo:before { content: "\f19e"; } .fa-google:before { content: "\f1a0"; } .fa-reddit:before { content: "\f1a1"; } .fa-reddit-square:before { content: "\f1a2"; } .fa-stumbleupon-circle:before { content: "\f1a3"; } .fa-stumbleupon:before { content: "\f1a4"; } .fa-delicious:before { content: "\f1a5"; } .fa-digg:before { content: "\f1a6"; } .fa-pied-piper-pp:before { content: "\f1a7"; } .fa-pied-piper-alt:before { content: "\f1a8"; } .fa-drupal:before { content: "\f1a9"; } .fa-joomla:before { content: "\f1aa"; } .fa-language:before { content: "\f1ab"; } .fa-fax:before { content: "\f1ac"; } .fa-building:before { content: "\f1ad"; } .fa-child:before { content: "\f1ae"; } .fa-paw:before { content: "\f1b0"; } .fa-spoon:before { content: "\f1b1"; } .fa-cube:before { content: "\f1b2"; } .fa-cubes:before { content: "\f1b3"; } .fa-behance:before { content: "\f1b4"; } .fa-behance-square:before { content: "\f1b5"; } .fa-steam:before { content: "\f1b6"; } .fa-steam-square:before { content: "\f1b7"; } .fa-recycle:before { content: "\f1b8"; } .fa-automobile:before, .fa-car:before { content: "\f1b9"; } .fa-cab:before, .fa-taxi:before { content: "\f1ba"; } .fa-tree:before { content: "\f1bb"; } .fa-spotify:before { content: "\f1bc"; } .fa-deviantart:before { content: "\f1bd"; } .fa-soundcloud:before { content: "\f1be"; } .fa-database:before { content: "\f1c0"; } .fa-file-pdf-o:before { content: "\f1c1"; } .fa-file-word-o:before { content: "\f1c2"; } .fa-file-excel-o:before { content: "\f1c3"; } .fa-file-powerpoint-o:before { content: "\f1c4"; } .fa-file-photo-o:before, .fa-file-picture-o:before, .fa-file-image-o:before { content: "\f1c5"; } .fa-file-zip-o:before, .fa-file-archive-o:before { content: "\f1c6"; } .fa-file-sound-o:before, .fa-file-audio-o:before { content: "\f1c7"; } .fa-file-movie-o:before, .fa-file-video-o:before { content: "\f1c8"; } .fa-file-code-o:before { content: "\f1c9"; } .fa-vine:before { content: "\f1ca"; } .fa-codepen:before { content: "\f1cb"; } .fa-jsfiddle:before { content: "\f1cc"; } .fa-life-bouy:before, .fa-life-buoy:before, .fa-life-saver:before, .fa-support:before, .fa-life-ring:before { content: "\f1cd"; } .fa-circle-o-notch:before { content: "\f1ce"; } .fa-ra:before, .fa-resistance:before, .fa-rebel:before { content: "\f1d0"; } .fa-ge:before, .fa-empire:before { content: "\f1d1"; } .fa-git-square:before { content: "\f1d2"; } .fa-git:before { content: "\f1d3"; } .fa-y-combinator-square:before, .fa-yc-square:before, .fa-hacker-news:before { content: "\f1d4"; } .fa-tencent-weibo:before { content: "\f1d5"; } .fa-qq:before { content: "\f1d6"; } .fa-wechat:before, .fa-weixin:before { content: "\f1d7"; } .fa-send:before, .fa-paper-plane:before { content: "\f1d8"; } .fa-send-o:before, .fa-paper-plane-o:before { content: "\f1d9"; } .fa-history:before { content: "\f1da"; } .fa-circle-thin:before { content: "\f1db"; } .fa-header:before { content: "\f1dc"; } .fa-paragraph:before { content: "\f1dd"; } .fa-sliders:before { content: "\f1de"; } .fa-share-alt:before { content: "\f1e0"; } .fa-share-alt-square:before { content: "\f1e1"; } .fa-bomb:before { content: "\f1e2"; } .fa-soccer-ball-o:before, .fa-futbol-o:before { content: "\f1e3"; } .fa-tty:before { content: "\f1e4"; } .fa-binoculars:before { content: "\f1e5"; } .fa-plug:before { content: "\f1e6"; } .fa-slideshare:before { content: "\f1e7"; } .fa-twitch:before { content: "\f1e8"; } .fa-yelp:before { content: "\f1e9"; } .fa-newspaper-o:before { content: "\f1ea"; } .fa-wifi:before { content: "\f1eb"; } .fa-calculator:before { content: "\f1ec"; } .fa-paypal:before { content: "\f1ed"; } .fa-google-wallet:before { content: "\f1ee"; } .fa-cc-visa:before { content: "\f1f0"; } .fa-cc-mastercard:before { content: "\f1f1"; } .fa-cc-discover:before { content: "\f1f2"; } .fa-cc-amex:before { content: "\f1f3"; } .fa-cc-paypal:before { content: "\f1f4"; } .fa-cc-stripe:before { content: "\f1f5"; } .fa-bell-slash:before { content: "\f1f6"; } .fa-bell-slash-o:before { content: "\f1f7"; } .fa-trash:before { content: "\f1f8"; } .fa-copyright:before { content: "\f1f9"; } .fa-at:before { content: "\f1fa"; } .fa-eyedropper:before { content: "\f1fb"; } .fa-paint-brush:before { content: "\f1fc"; } .fa-birthday-cake:before { content: "\f1fd"; } .fa-area-chart:before { content: "\f1fe"; } .fa-pie-chart:before { content: "\f200"; } .fa-line-chart:before { content: "\f201"; } .fa-lastfm:before { content: "\f202"; } .fa-lastfm-square:before { content: "\f203"; } .fa-toggle-off:before { content: "\f204"; } .fa-toggle-on:before { content: "\f205"; } .fa-bicycle:before { content: "\f206"; } .fa-bus:before { content: "\f207"; } .fa-ioxhost:before { content: "\f208"; } .fa-angellist:before { content: "\f209"; } .fa-cc:before { content: "\f20a"; } .fa-shekel:before, .fa-sheqel:before, .fa-ils:before { content: "\f20b"; } .fa-meanpath:before { content: "\f20c"; } .fa-buysellads:before { content: "\f20d"; } .fa-connectdevelop:before { content: "\f20e"; } .fa-dashcube:before { content: "\f210"; } .fa-forumbee:before { content: "\f211"; } .fa-leanpub:before { content: "\f212"; } .fa-sellsy:before { content: "\f213"; } .fa-shirtsinbulk:before { content: "\f214"; } .fa-simplybuilt:before { content: "\f215"; } .fa-skyatlas:before { content: "\f216"; } .fa-cart-plus:before { content: "\f217"; } .fa-cart-arrow-down:before { content: "\f218"; } .fa-diamond:before { content: "\f219"; } .fa-ship:before { content: "\f21a"; } .fa-user-secret:before { content: "\f21b"; } .fa-motorcycle:before { content: "\f21c"; } .fa-street-view:before { content: "\f21d"; } .fa-heartbeat:before { content: "\f21e"; } .fa-venus:before { content: "\f221"; } .fa-mars:before { content: "\f222"; } .fa-mercury:before { content: "\f223"; } .fa-intersex:before, .fa-transgender:before { content: "\f224"; } .fa-transgender-alt:before { content: "\f225"; } .fa-venus-double:before { content: "\f226"; } .fa-mars-double:before { content: "\f227"; } .fa-venus-mars:before { content: "\f228"; } .fa-mars-stroke:before { content: "\f229"; } .fa-mars-stroke-v:before { content: "\f22a"; } .fa-mars-stroke-h:before { content: "\f22b"; } .fa-neuter:before { content: "\f22c"; } .fa-genderless:before { content: "\f22d"; } .fa-facebook-official:before { content: "\f230"; } .fa-pinterest-p:before { content: "\f231"; } .fa-whatsapp:before { content: "\f232"; } .fa-server:before { content: "\f233"; } .fa-user-plus:before { content: "\f234"; } .fa-user-times:before { content: "\f235"; } .fa-hotel:before, .fa-bed:before { content: "\f236"; } .fa-viacoin:before { content: "\f237"; } .fa-train:before { content: "\f238"; } .fa-subway:before { content: "\f239"; } .fa-medium:before { content: "\f23a"; } .fa-yc:before, .fa-y-combinator:before { content: "\f23b"; } .fa-optin-monster:before { content: "\f23c"; } .fa-opencart:before { content: "\f23d"; } .fa-expeditedssl:before { content: "\f23e"; } .fa-battery-4:before, .fa-battery:before, .fa-battery-full:before { content: "\f240"; } .fa-battery-3:before, .fa-battery-three-quarters:before { content: "\f241"; } .fa-battery-2:before, .fa-battery-half:before { content: "\f242"; } .fa-battery-1:before, .fa-battery-quarter:before { content: "\f243"; } .fa-battery-0:before, .fa-battery-empty:before { content: "\f244"; } .fa-mouse-pointer:before { content: "\f245"; } .fa-i-cursor:before { content: "\f246"; } .fa-object-group:before { content: "\f247"; } .fa-object-ungroup:before { content: "\f248"; } .fa-sticky-note:before { content: "\f249"; } .fa-sticky-note-o:before { content: "\f24a"; } .fa-cc-jcb:before { content: "\f24b"; } .fa-cc-diners-club:before { content: "\f24c"; } .fa-clone:before { content: "\f24d"; } .fa-balance-scale:before { content: "\f24e"; } .fa-hourglass-o:before { content: "\f250"; } .fa-hourglass-1:before, .fa-hourglass-start:before { content: "\f251"; } .fa-hourglass-2:before, .fa-hourglass-half:before { content: "\f252"; } .fa-hourglass-3:before, .fa-hourglass-end:before { content: "\f253"; } .fa-hourglass:before { content: "\f254"; } .fa-hand-grab-o:before, .fa-hand-rock-o:before { content: "\f255"; } .fa-hand-stop-o:before, .fa-hand-paper-o:before { content: "\f256"; } .fa-hand-scissors-o:before { content: "\f257"; } .fa-hand-lizard-o:before { content: "\f258"; } .fa-hand-spock-o:before { content: "\f259"; } .fa-hand-pointer-o:before { content: "\f25a"; } .fa-hand-peace-o:before { content: "\f25b"; } .fa-trademark:before { content: "\f25c"; } .fa-registered:before { content: "\f25d"; } .fa-creative-commons:before { content: "\f25e"; } .fa-gg:before { content: "\f260"; } .fa-gg-circle:before { content: "\f261"; } .fa-tripadvisor:before { content: "\f262"; } .fa-odnoklassniki:before { content: "\f263"; } .fa-odnoklassniki-square:before { content: "\f264"; } .fa-get-pocket:before { content: "\f265"; } .fa-wikipedia-w:before { content: "\f266"; } .fa-safari:before { content: "\f267"; } .fa-chrome:before { content: "\f268"; } .fa-firefox:before { content: "\f269"; } .fa-opera:before { content: "\f26a"; } .fa-internet-explorer:before { content: "\f26b"; } .fa-tv:before, .fa-television:before { content: "\f26c"; } .fa-contao:before { content: "\f26d"; } .fa-500px:before { content: "\f26e"; } .fa-amazon:before { content: "\f270"; } .fa-calendar-plus-o:before { content: "\f271"; } .fa-calendar-minus-o:before { content: "\f272"; } .fa-calendar-times-o:before { content: "\f273"; } .fa-calendar-check-o:before { content: "\f274"; } .fa-industry:before { content: "\f275"; } .fa-map-pin:before { content: "\f276"; } .fa-map-signs:before { content: "\f277"; } .fa-map-o:before { content: "\f278"; } .fa-map:before { content: "\f279"; } .fa-commenting:before { content: "\f27a"; } .fa-commenting-o:before { content: "\f27b"; } .fa-houzz:before { content: "\f27c"; } .fa-vimeo:before { content: "\f27d"; } .fa-black-tie:before { content: "\f27e"; } .fa-fonticons:before { content: "\f280"; } .fa-reddit-alien:before { content: "\f281"; } .fa-edge:before { content: "\f282"; } .fa-credit-card-alt:before { content: "\f283"; } .fa-codiepie:before { content: "\f284"; } .fa-modx:before { content: "\f285"; } .fa-fort-awesome:before { content: "\f286"; } .fa-usb:before { content: "\f287"; } .fa-product-hunt:before { content: "\f288"; } .fa-mixcloud:before { content: "\f289"; } .fa-scribd:before { content: "\f28a"; } .fa-pause-circle:before { content: "\f28b"; } .fa-pause-circle-o:before { content: "\f28c"; } .fa-stop-circle:before { content: "\f28d"; } .fa-stop-circle-o:before { content: "\f28e"; } .fa-shopping-bag:before { content: "\f290"; } .fa-shopping-basket:before { content: "\f291"; } .fa-hashtag:before { content: "\f292"; } .fa-bluetooth:before { content: "\f293"; } .fa-bluetooth-b:before { content: "\f294"; } .fa-percent:before { content: "\f295"; } .fa-gitlab:before { content: "\f296"; } .fa-wpbeginner:before { content: "\f297"; } .fa-wpforms:before { content: "\f298"; } .fa-envira:before { content: "\f299"; } .fa-universal-access:before { content: "\f29a"; } .fa-wheelchair-alt:before { content: "\f29b"; } .fa-question-circle-o:before { content: "\f29c"; } .fa-blind:before { content: "\f29d"; } .fa-audio-description:before { content: "\f29e"; } .fa-volume-control-phone:before { content: "\f2a0"; } .fa-braille:before { content: "\f2a1"; } .fa-assistive-listening-systems:before { content: "\f2a2"; } .fa-asl-interpreting:before, .fa-american-sign-language-interpreting:before { content: "\f2a3"; } .fa-deafness:before, .fa-hard-of-hearing:before, .fa-deaf:before { content: "\f2a4"; } .fa-glide:before { content: "\f2a5"; } .fa-glide-g:before { content: "\f2a6"; } .fa-signing:before, .fa-sign-language:before { content: "\f2a7"; } .fa-low-vision:before { content: "\f2a8"; } .fa-viadeo:before { content: "\f2a9"; } .fa-viadeo-square:before { content: "\f2aa"; } .fa-snapchat:before { content: "\f2ab"; } .fa-snapchat-ghost:before { content: "\f2ac"; } .fa-snapchat-square:before { content: "\f2ad"; } .fa-pied-piper:before { content: "\f2ae"; } .fa-first-order:before { content: "\f2b0"; } .fa-yoast:before { content: "\f2b1"; } .fa-themeisle:before { content: "\f2b2"; } .fa-google-plus-circle:before, .fa-google-plus-official:before { content: "\f2b3"; } .fa-fa:before, .fa-font-awesome:before { content: "\f2b4"; } .fa-handshake-o:before { content: "\f2b5"; } .fa-envelope-open:before { content: "\f2b6"; } .fa-envelope-open-o:before { content: "\f2b7"; } .fa-linode:before { content: "\f2b8"; } .fa-address-book:before { content: "\f2b9"; } .fa-address-book-o:before { content: "\f2ba"; } .fa-vcard:before, .fa-address-card:before { content: "\f2bb"; } .fa-vcard-o:before, .fa-address-card-o:before { content: "\f2bc"; } .fa-user-circle:before { content: "\f2bd"; } .fa-user-circle-o:before { content: "\f2be"; } .fa-user-o:before { content: "\f2c0"; } .fa-id-badge:before { content: "\f2c1"; } .fa-drivers-license:before, .fa-id-card:before { content: "\f2c2"; } .fa-drivers-license-o:before, .fa-id-card-o:before { content: "\f2c3"; } .fa-quora:before { content: "\f2c4"; } .fa-free-code-camp:before { content: "\f2c5"; } .fa-telegram:before { content: "\f2c6"; } .fa-thermometer-4:before, .fa-thermometer:before, .fa-thermometer-full:before { content: "\f2c7"; } .fa-thermometer-3:before, .fa-thermometer-three-quarters:before { content: "\f2c8"; } .fa-thermometer-2:before, .fa-thermometer-half:before { content: "\f2c9"; } .fa-thermometer-1:before, .fa-thermometer-quarter:before { content: "\f2ca"; } .fa-thermometer-0:before, .fa-thermometer-empty:before { content: "\f2cb"; } .fa-shower:before { content: "\f2cc"; } .fa-bathtub:before, .fa-s15:before, .fa-bath:before { content: "\f2cd"; } .fa-podcast:before { content: "\f2ce"; } .fa-window-maximize:before { content: "\f2d0"; } .fa-window-minimize:before { content: "\f2d1"; } .fa-window-restore:before { content: "\f2d2"; } .fa-times-rectangle:before, .fa-window-close:before { content: "\f2d3"; } .fa-times-rectangle-o:before, .fa-window-close-o:before { content: "\f2d4"; } .fa-bandcamp:before { content: "\f2d5"; } .fa-grav:before { content: "\f2d6"; } .fa-etsy:before { content: "\f2d7"; } .fa-imdb:before { content: "\f2d8"; } .fa-ravelry:before { content: "\f2d9"; } .fa-eercast:before { content: "\f2da"; } .fa-microchip:before { content: "\f2db"; } .fa-snowflake-o:before { content: "\f2dc"; } .fa-superpowers:before { content: "\f2dd"; } .fa-wpexplorer:before { content: "\f2de"; } .fa-meetup:before { content: "\f2e0"; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; } .sr-only-focusable:active, .sr-only-focusable:focus { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip: auto; }
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <objc/NSObject.h> #import <TVRemoteCore/HMAccessoryDelegate-Protocol.h> #import <TVRemoteCore/HMAccessoryDelegatePrivate-Protocol.h> #import <TVRemoteCore/HMHomeDelegate-Protocol.h> @class HMHome, NSMutableDictionary, NSString; @interface _TVRCHMHomeObserver : NSObject <HMAccessoryDelegate, HMHomeDelegate, HMAccessoryDelegatePrivate> { HMHome *_currentHome; NSMutableDictionary *_serviceToAccessoryIDMapping; } + (id)sharedInstance; - (void).cxx_destruct; @property(retain, nonatomic) NSMutableDictionary *serviceToAccessoryIDMapping; // @synthesize serviceToAccessoryIDMapping=_serviceToAccessoryIDMapping; @property(retain, nonatomic) HMHome *currentHome; // @synthesize currentHome=_currentHome; - (BOOL)_checkErrorForLocallySuspendedAccessory:(id)arg1; - (void)_readCharacteristic:(id)arg1 completion:(CDUnknownBlockType)arg2; - (void)_checkAccessoryReachabilityAndFetchTVServices:(id)arg1 withCompletion:(CDUnknownBlockType)arg2; - (void)_updateServicesForAccessory:(id)arg1; - (void)_updateAccessoriesForHome:(id)arg1; - (void)accessoryDidUpdateServices:(id)arg1; - (void)accessory:(id)arg1 didUpdateNameForService:(id)arg2; - (void)accessoryDidUpdateReachableTransports:(id)arg1; - (void)accessoryDidUpdateReachability:(id)arg1; - (void)home:(id)arg1 didRemoveAccessory:(id)arg2; - (void)home:(id)arg1 didAddAccessory:(id)arg2; - (id)init; // Remaining properties @property(readonly, copy) NSString *debugDescription; @property(readonly, copy) NSString *description; @property(readonly) unsigned long long hash; @property(readonly) Class superclass; @end
{ "pile_set_name": "Github" }
// Copyright 2018 Jeremy Cowles. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. using UnityEngine; namespace Unity.Formats.USD { [ExecuteInEditMode] public class UsdPayload : MonoBehaviour { [SerializeField] private bool m_isLoaded = true; // Variable used to track dirty load state. [SerializeField] [HideInInspector] private bool m_wasLoaded = true; /// <summary> /// Returns true of the prim is currently loaded. Note that this will return the currently /// requested load state, which may be pending to be applied on the next update. /// </summary> public bool IsLoaded { get { return m_isLoaded; } } /// <summary> /// Sets the current state to loaded. The actual chagne will be applied on next Update(). /// </summary> public void Load() { m_isLoaded = true; } /// <summary> /// Sets the current state to unloaded. The actual change will be applied on next Update(). /// </summary> public void Unload() { m_isLoaded = false; } /// <summary> /// Sets the current state without triggering load/unload operation from the USD scene state. /// </summary> /// <param name="loaded"></param> public void SetInitialState(bool loaded) { m_isLoaded = loaded; m_wasLoaded = loaded; } /// <summary> /// Synchronize the current state in Unity into the USD scenegraph. /// </summary> public void Update() { if (m_isLoaded == m_wasLoaded) { return; } m_wasLoaded = m_isLoaded; var stageRoot = transform.GetComponentInParent<UsdAsset>(); stageRoot.SetPayloadState(this.gameObject, m_isLoaded); } } }
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <title>CMSIS-DSP: arm_fill_f32.c File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="cmsis.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> <link href="stylsheetf" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 46px;"> <td id="projectlogo"><img alt="Logo" src="CMSIS_Logo_Final.png"/></td> <td style="padding-left: 0.5em;"> <div id="projectname">CMSIS-DSP &#160;<span id="projectnumber">Verison 1.4.1</span> </div> <div id="projectbrief">CMSIS DSP Software Library</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <div id="CMSISnav" class="tabs1"> <ul class="tablist"> <li><a href="../../General/html/index.html"><span>CMSIS</span></a></li> <li><a href="../../Core/html/index.html"><span>CORE</span></a></li> <li class="current"><a href="../../DSP/html/index.html"><span>DSP</span></a></li> <li><a href="../../RTOS/html/index.html"><span>RTOS API</span></a></li> <li><a href="../../SVD/html/index.html"><span>SVD</span></a></li> </ul> </div> <!-- Generated by Doxygen 1.8.3.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="pages.html"><span>Usage&#160;and&#160;Description</span></a></li> <li><a href="modules.html"><span>Reference</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('arm__fill__f32_8c.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">arm_fill_f32.c File Reference</div> </div> </div><!--header--> <div class="contents"> <table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ga2248e8d3901b4afb7827163132baad94"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___fill.html#ga2248e8d3901b4afb7827163132baad94">arm_fill_f32</a> (<a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> value, <a class="el" href="arm__math_8h.html#a4611b605e45ab401f02cab15c5e38715">float32_t</a> *pDst, uint32_t <a class="el" href="arm__variance__example__f32_8c.html#ab6558f40a619c2502fbc24c880fd4fb0">blockSize</a>)</td></tr> <tr class="memdesc:ga2248e8d3901b4afb7827163132baad94"><td class="mdescLeft">&#160;</td><td class="mdescRight">Fills a constant value into a floating-point vector. <a href="group___fill.html#ga2248e8d3901b4afb7827163132baad94">More...</a><br/></td></tr> <tr class="separator:ga2248e8d3901b4afb7827163132baad94"><td class="memSeparator" colspan="2">&#160;</td></tr> </table> </div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="navelem"><a class="el" href="dir_be2d3df67661aefe0e3f0071a1d6f8f1.html">DSP_Lib</a></li><li class="navelem"><a class="el" href="dir_7e8aa87db1ad6b3d9b1f25792e7c5208.html">Source</a></li><li class="navelem"><a class="el" href="dir_9aca731d350c1cdbae92b5821b7281b6.html">SupportFunctions</a></li><li class="navelem"><a class="el" href="arm__fill__f32_8c.html">arm_fill_f32.c</a></li> <li class="footer">Generated on Mon Mar 18 2013 13:37:54 for CMSIS-DSP by ARM Ltd. All rights reserved. <!-- <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 --> </li> </ul> </div> </body> </html>
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <title>Description of times</title> <meta name="keywords" content="times"> <meta name="description" content="C=A.*B"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="generator" content="m2html v1.5 &copy; 2003-2005 Guillaume Flandin"> <meta name="robots" content="index, follow"> <link type="text/css" rel="stylesheet" href="../../m2html.css"> </head> <body> <a name="_top"></a> <div><a href="../../index.html">Home</a> &gt; <a href="#">tt2</a> &gt; <a href="index.html">@qtt_tucker</a> &gt; times.m</div> <!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td> <td align="right"><a href="index.html">Index for tt2/@qtt_tucker&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>--> <h1>times </h1> <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> <div class="box"><strong>C=A.*B</strong></div> <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> <div class="box"><strong>function [c]=times(a,b) </strong></div> <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> <div class="fragment"><pre class="comment">C=A.*B [C]=TIMES(A,B) Hadamard product of two QTT-tuckers TT-Toolbox 2.2, 2009-2012 This is TT Toolbox, written by Ivan Oseledets et al. Institute of Numerical Mathematics, Moscow, Russia webpage: http://spring.inm.ras.ru/osel For all questions, bugs and suggestions please mail [email protected] ---------------------------</pre></div> <!-- crossreference --> <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> This function calls: <ul style="list-style-image:url(../../matlabicon.gif)"> <li><a href="qtt_tucker.html" class="code" title="function t = qtt_tucker(varargin)">qtt_tucker</a> QTT-Tucker contructor (TT-format for the core+QTT-format for the factors)</li><li><a href="../../tt2/@tt_tensor/reshape.html" class="code" title="function [tt2]=reshape(tt1,sz,eps, rl, rr)">reshape</a> Reshape of the TT-tensor</li><li><a href="../../tt2/@tt_tensor/tt_tensor.html" class="code" title="function t = tt_tensor(varargin)">tt_tensor</a> TT-tensor constructor</li></ul> This function is called by: <ul style="list-style-image:url(../../matlabicon.gif)"> </ul> <!-- crossreference --> <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [c]=times(a,b)</a> 0002 <span class="comment">%C=A.*B</span> 0003 <span class="comment">% [C]=TIMES(A,B) Hadamard product of two QTT-tuckers</span> 0004 <span class="comment">%</span> 0005 <span class="comment">%</span> 0006 <span class="comment">% TT-Toolbox 2.2, 2009-2012</span> 0007 <span class="comment">%</span> 0008 <span class="comment">%This is TT Toolbox, written by Ivan Oseledets et al.</span> 0009 <span class="comment">%Institute of Numerical Mathematics, Moscow, Russia</span> 0010 <span class="comment">%webpage: http://spring.inm.ras.ru/osel</span> 0011 <span class="comment">%</span> 0012 <span class="comment">%For all questions, bugs and suggestions please mail</span> 0013 <span class="comment">%[email protected]</span> 0014 <span class="comment">%---------------------------</span> 0015 0016 <span class="keyword">if</span> (nargin == 2 ) 0017 <span class="comment">% times of tucker factors (whatever it is)</span> 0018 d = a.dphys; 0019 c = <a href="qtt_tucker.html" class="code" title="function t = qtt_tucker(varargin)">qtt_tucker</a>; 0020 c.dphys = d; 0021 c.tuck = cell(d,1); 0022 <span class="keyword">for</span> i=1:d 0023 c.tuck{i} = a.tuck{i}.*b.tuck{i}; 0024 <span class="keyword">end</span>; 0025 c.core = <a href="../../tt2/@tt_tensor/tt_tensor.html" class="code" title="function t = tt_tensor(varargin)">tt_tensor</a>; 0026 c.core.d = d; 0027 rca = a.core.r; 0028 rcb = b.core.r; 0029 rta = a.core.n; 0030 rtb = b.core.n; 0031 c.core.r = rca.*rcb; 0032 c.core.n = rta.*rtb; 0033 c.core.ps = cumsum([1; c.core.r(1:d).*c.core.n.*c.core.r(2:d+1)]); 0034 c.core.core = zeros(c.core.ps(d+1)-1,1); 0035 <span class="keyword">for</span> i=1:d 0036 cra = a.core{i}; 0037 cra = <a href="../../tt2/@tt_tensor/reshape.html" class="code" title="function [tt2]=reshape(tt1,sz,eps, rl, rr)">reshape</a>(cra, rca(i)*rta(i)*rca(i+1), 1); 0038 crb = b.core{i}; 0039 crb = <a href="../../tt2/@tt_tensor/reshape.html" class="code" title="function [tt2]=reshape(tt1,sz,eps, rl, rr)">reshape</a>(crb, 1, rcb(i)*rtb(i)*rcb(i+1)); 0040 crc = cra*crb; 0041 crc = <a href="../../tt2/@tt_tensor/reshape.html" class="code" title="function [tt2]=reshape(tt1,sz,eps, rl, rr)">reshape</a>(crc, rca(i), rta(i), rca(i+1), rcb(i), rtb(i), rcb(i+1)); 0042 crc = permute(crc, [1, 4, 2, 5, 3, 6]); 0043 c.core.core(c.core.ps(i):c.core.ps(i+1)-1) = crc(:); 0044 <span class="keyword">end</span>; 0045 <span class="keyword">end</span> 0046 <span class="keyword">return</span> 0047 <span class="keyword">end</span></pre></div> <hr><address>Generated on Wed 08-Feb-2012 18:20:24 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/" title="Matlab Documentation in HTML">m2html</a></strong> &copy; 2005</address> </body> </html>
{ "pile_set_name": "Github" }
// Header for PCH test cxx-typeid.cpp #include <typeinfo>
{ "pile_set_name": "Github" }
# Flags marking events Flags are useful when you want to include further details about specific events along a chart’s timeline. This chart uses six flags with specific information on particular data such as the stocks fall in Greece, the Zimbabwe decision to replace the USD, etc. #### Tip To add a [flag](https://api.highcharts.com/highstock/plotOptions.flags), set a new series flag type under series with a date, a title and a short text.
{ "pile_set_name": "Github" }
/** * Sharing styles * Loads on front end and back end */ .ab-block-sharing { margin: 0 0 1.2em 0; position: relative; .blocks-rich-text { display: inline-flex; } .ab-share-list { margin: 0; padding: 0; li { list-style: none; display: inline-block; margin: 0 5px 5px 0; } a { background: #272c30; color: #fff; padding: 10px 15px; text-align: center; display: block; line-height: 1; font-size: 16px; transition: .3s ease; &:hover { box-shadow: inset 0 0 200px rgba(255, 255, 255, 0.15); } } } &.ab-share-icon-text { i { margin-right: 5px; } } &.ab-share-icon-only { a { padding: 10px 11px; min-width: 37px; } .ab-social-text { border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute !important; width: 1px; word-wrap: normal !important; } } &.ab-share-text-only { i { display: none; } } &.ab-share-shape-square { a { border-radius: 0; } } &.ab-share-shape-rounded { a { border-radius: 5px; } } &.ab-share-shape-circular { a { border-radius: 100px; } } &.ab-share-size-small { a { font-size: 13px; } } &.ab-share-size-small.ab-share-icon-only { a { padding: 7px 6px; min-width: 28px; } } &.ab-share-size-medium { a { font-size: 16px; } } &.ab-share-size-large { a { font-size: 20px; } } &.ab-share-size-large.ab-share-icon-only { a { font-size: 26px; min-width: 48px; } } &.ab-share-size-large.ab-share-icon-text { i { margin-right: 10px; } } &.ab-share-color-social { a { color: #fff; } .ab-share-twitter { background: #1ca1f3; } .ab-share-facebook { background: #3b5999; } .ab-share-google { background: #dc4b45; } .ab-share-pinterest { background: #bd091c; } .ab-share-linkedin { background: #0077b5; } .ab-share-reddit { background: #ff4500; } } } .ab-button-right { transform: translateX(-100%); left: 100%; position: relative; } .ab-button-center { margin: 0 auto; }
{ "pile_set_name": "Github" }
/* Translation-Revision-Date: 2020-05-26 04:07:15+0000 */ /* Plural-Forms: nplurals=1; plural=0; */ /* Generator: GlotPress/2.4.0-alpha */ /* Language: fa */ /* Number of Characters in a note */ "%@ Character" = "%@ نویسه"; /* Number of Characters in a note */ "%@ Characters" = "%@ نویسه"; /* Number of words in a note */ "%@ Word" = "%@ Word"; /* Number of words in a note */ "%@ Words" = "%@ Words"; /* Number of found search results */ "%d Result" = "%d Result"; /* Number of found search results */ "%d Results" = "%d Results"; /* Number of failed entries entering in passcode */ "%i Failed Passcode Attempt" = "%i Failed Passcode Attempt"; /* Number of failed entries entering in passcode */ "%i Failed Passcode Attempts" = "%i Failed Passcode Attempts"; /* Password Requirement: Length */ "- Minimum of 8 characters" = "- دست‌ِکم ۸ نویسه"; /* Password Requirement: Special Characters */ "- Neither tabs nor newlines are allowed" = "- جهش (tab) و سرخط مجاز نیست"; /* Password Requirement: Email Match */ "- Password cannot match email" = "- گذرواژه نمی‌تواند مطابقِ ایمیل باشد"; /* 1 minute passcode lock timeout */ "1 Minute" = "۱ دقیقه"; /* 15 seconds passcode lock timeout */ "15 Seconds" = "۱۵ ثانیه"; /* 2 minutes passcode lock timeout */ "2 Minutes" = "۲ دقیقه"; /* 3 minutes passcode lock timeout */ "3 Minutes" = "۳ دقیقه"; /* 30 seconds passcode lock timeout */ "30 Seconds" = "۳۰ ثانیه"; /* 4 minutes passcode lock timeout */ "4 Minutes" = "۴ دقیقه"; /* 5 minutes passcode lock timeout */ "5 Minutes" = "۵ دقیقه"; /* Display app about screen */ "About" = "درباره"; /* Accept Action Label of accept button on alert dialog */ "Accept" = "Accept"; /* No comment provided by engineer. */ "Account" = "Account"; /* Noun - collaborators are other Simplenote users who you chose to share a note with */ "Add a new collaborator..." = "Add a new collaborator..."; /* Placeholder test in textfield when adding a new tag to a note */ "Add a tag..." = "برچسب..."; /* Label on button to add a new tag to a note */ "Add tag" = "Add tag"; /* Title: No filters applied */ "All Notes" = "All Notes"; /* Sort Mode: Alphabetically */ "Alphabetically" = "الفبایی"; /* Sort Mode: Alphabetically, ascending */ "Alphabetically: A-Z" = "Alphabetically: A-Z"; /* Sort Mode: Alphabetically, descending */ "Alphabetically: Z-A" = "Alphabetically: Z-A"; /* Sign in error message */ "An error was encountered while signing in." = "An error was encountered while signing in."; /* No comment provided by engineer. */ "Appearance" = "نما"; /* Other Simplenote apps */ "Apps" = "Apps"; /* Automattic hiring description */ "Are you a developer? Automattic is hiring." = "Are you a developer? Automattic is hiring."; /* Empty Trash Warning */ "Are you sure you want to empty the trash? This cannot be undone." = "Are you sure you want to empty the trash? This cannot be undone."; /* User Authenticated */ "Authenticated" = "Authenticated"; /* Title of Back button for Markdown preview */ "Back" = "بازگشت"; /* The Simplenote blog */ "Blog" = "وب‌نوشت"; /* Terms of Service Legend *PREFIX*: printed in dark color */ "By creating an account you agree to our" = "By creating an account you agree to our"; /* Simplenote terms of service */ "California Users Privacy Notice" = "California Users Privacy Notice"; /* Cancel Action Dismissing an interface Verb, cancel an alert dialog */ "Cancel" = "Cancel"; /* Verb - work with others on a note */ "Collaborate" = "Collaborate"; /* No comment provided by engineer. */ "Collaboration has moved" = "Collaboration has moved"; /* Noun - collaborators are other Simplenote users who you chose to share a note with */ "Collaborators" = "Collaborators"; /* Option to make the note list show only 1 line of text. The default is 3. */ "Condensed Note List" = "Condensed Note List"; /* Contribute to the Simplenote apps on github */ "Contribute" = "Contribute"; /* No comment provided by engineer. */ "Could be better" = "Could be better"; /* Error for bad email or password */ "Could not create an account with the provided email address and password." = "Could not create an account with the provided email address and password."; /* Message displayed when login fails */ "Could not login with the provided email address and password." = "Could not login with the provided email address and password."; /* No comment provided by engineer. */ "Could you tell us how we could improve?" = "Could you tell us how we could improve?"; /* Alert dialog title displayed on sign in error */ "Couldn't Sign In" = "Couldn't Sign In"; /* Siri Suggestion to create a New Note */ "Create a New Note" = "ایجادِ یک یادداشتِ تازه"; /* No comment provided by engineer. */ "Create a new note" = "Create a new note"; /* Sort Mode: Creation Date */ "Created" = "ساخت‌شده"; /* Sort Mode: Creation Date, descending */ "Created: Newest" = "ایجادشده: جدیدترین"; /* Sort Mode: Creation Date, ascending */ "Created: Oldest" = "ایجادشده : قدیمی‌ترین"; /* No comment provided by engineer. */ "Current Collaborators" = "Current Collaborators"; /* Theme: Dark */ "Dark" = "تاریک"; /* Debug Screen Title Display internal debug status */ "Debug" = "Debug"; /* Verb: Delete notes and log out of the app */ "Delete Notes" = "Delete Notes"; /* No comment provided by engineer. */ "Disable Markdown formatting" = "Disable Markdown formatting"; /* No comment provided by engineer. */ "Dismiss keyboard" = "Dismiss keyboard"; /* Done toolbar button Verb: Close current view */ "Done" = "Done"; /* Edit Tags Action: Visible in the Tags List */ "Edit" = "ویرایش"; /* Email TextField Placeholder */ "Email" = "ایمیل"; /* Email Taken Alert Title */ "Email in use" = "Email in use"; /* Verb - empty causes all notes to be removed permenently from the trash */ "Empty" = "Empty"; /* Remove all notes from the trash */ "Empty trash" = "Empty trash"; /* No comment provided by engineer. */ "Enable Markdown formatting" = "Enable Markdown formatting"; /* Number of objects enqueued for processing */ "Enqueued" = "Enqueued"; /* Message shown on passcode lock screen */ "Enter a passcode" = "Enter a passcode"; /* Touch ID fallback title */ "Enter passcode" = "Enter passcode"; /* Pin Lock */ "Enter your passcode" = "Enter your passcode"; /* Offer to enable Face ID support if available and passcode is on. */ "Face ID" = "Face ID"; /* Show a message when user enter 3 wrong passcodes */ "FailedAttempts" = "FailedAttempts"; /* Password Reset Action */ "Forgotten password?" = "گذرواژه فراموش شده؟"; /* No comment provided by engineer. */ "Great! Mind leaving a review to tell us what you like?" = "عالی! اگر مشکلی نیست لطفاً با نوشتنِ یک بررسی به ما بگویید چه چیزی دوست دارید؟"; /* Privacy Details */ "Help us improve Simplenote by sharing usage data with our analytics tool." = "Help us improve Simplenote by sharing usage data with our analytics tool."; /* Noun - the version history of a note */ "History" = "History"; /* Action - view the version history of a note */ "History..." = "History..."; /* No comment provided by engineer. */ "I like it" = "I like it"; /* Last Message timestamp */ "LastSeen" = "آخرین بازدید"; /* Learn More Action */ "Learn more" = "بیشتر بدانید"; /* No comment provided by engineer. */ "Leave a review" = "Leave a review"; /* Theme: Light */ "Light" = "روشن"; /* Setting for when the passcode lock should enable */ "Lock Timeout" = "Lock Timeout"; /* Log In Action Login Action LogIn Action LogIn Interface Title */ "Log In" = "ثبتِ ورود"; /* Log out of the active account in the app */ "Log Out" = "Log Out"; /* Allows the user to SignIn using their WPCOM Account */ "Log in with WordPress.com" = "Log in with WordPress.com"; /* Presents the regular Email signin flow */ "Log in with email" = "Log in with email"; /* Month and day date formatter */ "MMM d" = "d MMM"; /* Month, day, and time date formatter */ "MMM d, h:mm a" = "d MMM، h:mm a"; /* Month, day, and year date formatter */ "MMM d, yyyy" = "d MMM yyyy"; /* Month and year date formatter */ "MMM yyyy" = "MMM yyyy"; /* Special formatting that can be turned on for notes */ "Markdown" = "Markdown"; /* Switch which marks a note as using Markdown formatting or not */ "Markdown toggle" = "Markdown toggle"; /* Terminoligy used for sidebar UI element where tags are displayed */ "Menu" = "Menu"; /* Sort Mode: Modified Date */ "Modified" = "تغییریافته"; /* Sort Mode: Modified Date, descending */ "Modified: Newest" = "Modified: Newest"; /* Sort Mode: Modified Date, ascending */ "Modified: Oldest" = "Modified: Oldest"; /* Label to create a new note */ "New note" = "New note"; /* Empty Note Placeholder */ "New note..." = "یادداشت تازه..."; /* Alert's Cancel Action Cancels Empty Trash Action */ "No" = "خیر"; /* Message shown in note list when no notes are in the current view */ "No Notes" = "No Notes"; /* Message shown when no notes match a search string */ "No Results" = "No Results"; /* No comment provided by engineer. */ "No thanks" = "نه ممنون"; /* No comment provided by engineer. */ "Note not published" = "Note not published"; /* Notes Header (Search Mode) Plural form of notes */ "Notes" = "Notes"; /* Dismisses an AlertController */ "OK" = "OK"; /* Instant passcode lock timeout */ "Off" = "Off"; /* No comment provided by engineer. */ "On" = "On"; /* Siri Suggestion to open a specific Note */ "Open \"(preview)\"" = "Open \"(preview)\""; /* Siri Suggestion to open our app */ "Open Simplenote" = "Open Simplenote"; /* Select a note to view in the note editor */ "Open note" = "Open note"; /* AlertController's Payload for the broken Sort Options Fix */ "Our update may have changed the order in which your notes appear. Would you like to review sort settings?" = "Our update may have changed the order in which your notes appear. Would you like to review sort settings?"; /* A 4-digit code to lock the app when it is closed */ "Passcode" = "Passcode"; /* Pin Lock */ "Passcodes did not match. Try again." = "Passcodes did not match. Try again."; /* Password TextField Placeholder */ "Password" = "گذرواژه"; /* Message displayed when password is invalid (Signup) */ "Password cannot match email" = "گذرواژه نمی‌تواند مطابقِ ایمیل باشد"; /* Message displayed when password is too short. Please preserve the Percent D! */ "Password must contain at least %d characters" = "گذرواژه دست‌ِکم باید حاویِ %d نویسه باشد"; /* Message displayed when a password contains a disallowed character */ "Password must not contain tabs nor newlines" = "گذرواژه نمی‌باید حاوی جهش (tab) و سرخط باشد"; /* Number of changes pending to be sent */ "Pendings" = "Pendings"; /* Action to mark a note as pinned */ "Pin note" = "Pin note"; /* Denotes when note is pinned to the top of the note list */ "Pin to Top" = "سنجاق به بالا"; /* Switch which marks a note as pinned or unpinned */ "Pin toggle" = "Pin toggle"; /* Pinned notes are stuck to the note of the note list */ "Pinned" = "سنجاق‌شده"; /* Error message displayed when user has not verified their WordPress.com account */ "Please activate your WordPress.com account via email and try again." = "لطفاً حسابِ WordPress.com ِخود را از راهِ ایمیل فعال کنید و سپس دوباره تلاش کنید."; /* Title of Markdown preview screen */ "Preview" = "پیش‌نمایش"; /* Simplenote privacy policy */ "Privacy Policy" = "Privacy Policy"; /* Privacy Settings */ "Privacy Settings" = "Privacy Settings"; /* Verb - Publishing a note creates URL and for any note in a user's account, making it viewable to others */ "Publish" = "Publish"; /* Action which published a note to a web page */ "Publish note" = "Publish note"; /* Switch which marks a note as published or unpublished */ "Publish toggle" = "Publish toggle"; /* No comment provided by engineer. */ "Published" = "منتشرشده"; /* Message shown when a note is in the processes of being published */ "Publishing..." = "در حالِ انتشار..."; /* Prompt when setting up a passcode */ "Re-enter a passcode" = "Re-enter a passcode"; /* Reachs Internet */ "Reachability" = "Reachability"; /* No comment provided by engineer. */ "Remove all notes from trash" = "Remove all notes from trash"; /* Rename a tag */ "Rename" = "تغییرِ نام"; /* Reset Action */ "Reset" = "بازنشانی"; /* Password Reset Required Alert Title */ "Reset Required" = "بازنشانی لازم است"; /* Restore a note to a previous version */ "Restore Note" = "Restore Note"; /* Search Placeholder Using Search instead of Back if user is searching */ "Search" = "جست‌و‌جو"; /* Tags Header (Search Mode) */ "Search by Tag" = "جستجو برپایهٔ برچسب"; /* SearchBar's Placeholder Text */ "Search notes or tags" = "جست‌وجویِ یادداشت‌ها یا برچسب‌ها"; /* No comment provided by engineer. */ "Security" = "امنیت"; /* Verb - send the content of the note by email, message, etc */ "Send" = "ارسال"; /* For debugging use */ "Send a Test Crash" = "Send a Test Crash"; /* No comment provided by engineer. */ "Send feedback" = "Send feedback"; /* Prompt when setting up a passcode */ "Set Passcode" = "Set Passcode"; /* Title of options screen */ "Settings" = "تنظیمات"; /* Option to disable Analytics. */ "Share Analytics" = "Share Analytics"; /* No comment provided by engineer. */ "Share note" = "Share note"; /* No comment provided by engineer. */ "Sharing notes is now accessed through the action menu from the toolbar." = "Sharing notes is now accessed through the action menu from the toolbar."; /* UI region to the left of the note list which shows all of a users tags */ "Sidebar" = "نوارِ کناری"; /* Signup Action SignUp Action SignUp Interface Title */ "Sign Up" = "نام‌نویسی"; /* Alert message displayed when an account has unsynced notes */ "Signing out will delete any unsynced notes. You can verify your synced notes by signing in to the Web App." = "Signing out will delete any unsynced notes. You can verify your synced notes by signing in to the Web App."; /* Our mighty brand! */ "Simplenote" = "Simplenote"; /* Simplenote's Feedback Email Title */ "Simplenote iOS Feedback" = "بازخوردِ Simplenote iOS"; /* Authentication Error Alert Title */ "Sorry!" = "پوزش!"; /* Option to sort tags alphabetically. The default is by manual ordering. */ "Sort Alphabetically" = "مرتب‌سازیِ الفبایی"; /* Option to sort notes in the note list alphabetically. The default is by modification date Sort Order for the Notes List */ "Sort Order" = "Sort Order"; /* Sort By Title */ "Sort by:" = "چینش بر پایهٔ:"; /* Theme: Matches iOS Settings */ "System Default" = "پیش‌فرضِ سامانه"; /* No comment provided by engineer. */ "Tags" = "برچسب‌ها"; /* Terms of Service Legend *SUFFIX*: Concatenated with a space, after the PREFIX, and printed in blue */ "Terms and Conditions" = "Terms and Conditions"; /* Simplenote terms of service */ "Terms of Service" = "شرایطِ خدمات"; /* Error when address is in use */ "The email you've entered is already associated with a Simplenote account." = "ایمیلی که فراهم کرده‌اید از پیش با یک حسابِ Simplenote مرتبط است."; /* Onboarding Header Text */ "The simplest way to keep notes." = "ساده‌ترین روش برای حفظِ یادداشت‌ها."; /* Option to enable the dark app theme. */ "Theme" = "پوسته"; /* Simplenote Themes */ "Themes" = "پوسته‌ها"; /* Touch ID reason/explanation */ "To unlock the application" = "To unlock the application"; /* Displayed as a date in the case where a note was modified today, for example */ "Today" = "امروز"; /* Accessibility hint used to show or hide the sidebar */ "Toggle tag sidebar" = "Toggle tag sidebar"; /* Offer to enable Touch ID support if available and passcode is on. */ "Touch ID" = "Touch ID"; /* Title: Trash Tag is selected */ "Trash-noun" = "زباله‌دان"; /* Trash (verb) - the action of deleting a note */ "Trash-verb" = "دور انداختن"; /* Prompt when disabling passcode */ "Turn off Passcode" = "Turn off Passcode"; /* Message shown when gaining entry to app via a passcode */ "Unlock %@" = "Unlock %@"; /* Action to mark a note as unpinned */ "Unpin note" = "Unpin note"; /* Action which unpublishes a note */ "Unpublish note" = "Unpublish note"; /* Message shown when a note is in the processes of being unpublished */ "Unpublishing..." = "Unpublishing..."; /* Alert title displayed in settings when an account has unsynced notes */ "Unsynced Notes Detected" = "Unsynced Notes Detected"; /* Title: Untagged Notes are onscreen */ "Untagged" = "برچسب‌نخورده"; /* Allows selecting notes with no tags */ "Untagged Notes" = "Untagged Notes"; /* A user's Simplenote account */ "Username" = "نامِ کاربری"; /* Represents a snapshot in time for a note */ "Version" = "Version"; /* App version number */ "Version %@" = "نسخهٔ %@"; /* Visit app.simplenote.com in the browser */ "Visit Web App" = "Visit Web App"; /* Generic error */ "We're having problems. Please try again soon." = "در حالِ حاضر با مشکلاتی مواجه هستیم. لطفاً به‌زودی دوباره امتحان کنید."; /* WebSocket Status */ "WebSocket" = "WebSocket"; /* No comment provided by engineer. */ "What do you think about Simplenote?" = "What do you think about Simplenote?"; /* Work at Automattic */ "Work With Us" = "با ما همکاری کنید"; /* Alert's Accept Action Proceeds with the Empty Trash OP */ "Yes" = "بله"; /* Displayed as a date in the case where a note was modified yesterday, for example */ "Yesterday" = "دیروز"; /* Message displayed when email address is invalid */ "Your email address is not valid" = "نشانیِ ایمیل شما معتبر نیست"; /* Password Requirements: Title */ "Your password is insecure and must be reset. The password requirements are:" = "گذرواژهٔ شما ایمن نیست و باید بازنشانی شود. ملزوماتِ گذرواژه از این قرارند:"; /* Accessibility hint on button which shows the current collaborators on a note */ "collaborate-accessibility-hint" = "collaborate-accessibility-hint"; /* No comment provided by engineer. */ "collaborators-description" = "collaborators-description"; /* Warning message shown when current note is deleted on another device */ "deleted-note-warning" = "deleted-note-warning"; /* Accessibility hint on button which shows the history of a note */ "history-accessibility-hint" = "history-accessibility-hint"; /* VoiceOver accessibiliity hint on button which shows or hides the menu */ "menu-accessibility-hint" = "menu-accessibility-hint"; /* VoiceOver accessibiliity hint on the button that closes the notes editor and navigates back to the note list */ "notes-accessibility-hint" = "notes-accessibility-hint"; /* Accessibility hint on share button */ "share-accessibility-hint" = "اشتراک‌گذاریِ محتوایِ یادداشتِ کنونی"; /* Accessibility hint for adding a tag to a note */ "tag-add-accessibility-hint" = "tag-add-accessibility-hint"; /* No comment provided by engineer. */ "tag-delete-accessibility-hint" = "tag-delete-accessibility-hint"; /* Accessibility hint on button which moves a note to the trash */ "trash-accessibility-hint" = "انتقالِ یادداشتِ کنونی به زباله‌دان"; /* Error alert message shown when trying to view history of a note without an internet connection */ "version-alert-message" = "version-alert-message"; /* Accessiblity hint describing how to reset the current note to a previous version */ "version-cell-accessibility-hint" = "version-cell-accessibility-hint"; /* Accessibility hint used when previous versions of a note are being fetched */ "version-cell-fetching-accessibility-hint" = "version-cell-fetching-accessibility-hint"; /* A welcome note for new iOS users */ "welcomeNote-iOS" = "welcomeNote-iOS";
{ "pile_set_name": "Github" }
// RUN: %clang_cc1 -verify -fopenmp -std=c++11 -ast-print %s | FileCheck %s // RUN: %clang_cc1 -fopenmp -x c++ -std=c++11 -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s // RUN: %clang_cc1 -verify -fopenmp-simd -std=c++11 -ast-print %s | FileCheck %s // RUN: %clang_cc1 -fopenmp-simd -x c++ -std=c++11 -emit-pch -o %t %s // RUN: %clang_cc1 -fopenmp-simd -std=c++11 -include-pch %t -fsyntax-only -verify %s -ast-print | FileCheck %s // expected-no-diagnostics #ifndef HEADER #define HEADER struct ST { int *a; }; typedef int arr[10]; typedef ST STarr[10]; struct SA { const int da[5] = { 0 }; ST g[10]; STarr &rg = g; int i; int &j = i; int *k = &j; int *&z = k; int aa[10]; arr &raa = aa; void func(int arg) { #pragma omp target parallel for simd is_device_ptr(k) for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(z) for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(aa) // OK for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(raa) // OK for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(g) // OK for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(rg) // OK for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(da) // OK for (int i=0; i<100; i++) ; return; } }; // CHECK: struct SA // CHECK-NEXT: const int da[5] = {0}; // CHECK-NEXT: ST g[10]; // CHECK-NEXT: STarr &rg = this->g; // CHECK-NEXT: int i; // CHECK-NEXT: int &j = this->i; // CHECK-NEXT: int *k = &this->j; // CHECK-NEXT: int *&z = this->k; // CHECK-NEXT: int aa[10]; // CHECK-NEXT: arr &raa = this->aa; // CHECK-NEXT: func( // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(this->k){{$}} // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(this->z) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(this->aa) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(this->raa) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(this->g) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(this->rg) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(this->da) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; struct SB { unsigned A; unsigned B; float Arr[100]; float *Ptr; float *foo() { return &Arr[0]; } }; struct SC { unsigned A : 2; unsigned B : 3; unsigned C; unsigned D; float Arr[100]; SB S; SB ArrS[100]; SB *PtrS; SB *&RPtrS; float *Ptr; SC(SB *&_RPtrS) : RPtrS(_RPtrS) {} }; union SD { unsigned A; float B; }; struct S1; extern S1 a; class S2 { mutable int a; public: S2():a(0) { } S2(S2 &s2):a(s2.a) { } static float S2s; static const float S2sc; }; const float S2::S2sc = 0; const S2 b; const S2 ba[5]; class S3 { int a; public: S3():a(0) { } S3(S3 &s3):a(s3.a) { } }; const S3 c; const S3 ca[5]; extern const int f; class S4 { int a; S4(); S4(const S4 &s4); public: S4(int v):a(v) { } }; class S5 { int a; S5():a(0) {} S5(const S5 &s5):a(s5.a) { } public: S5(int v):a(v) { } }; S3 h; #pragma omp threadprivate(h) typedef struct { int a; } S6; template <typename T> T tmain(T argc) { const T da[5] = { 0 }; S6 h[10]; auto &rh = h; T i; T &j = i; T *k = &j; T *&z = k; T aa[10]; auto &raa = aa; #pragma omp target parallel for simd is_device_ptr(k) for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(z) for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(aa) for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(raa) for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(h) for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(rh) for (int i=0; i<100; i++) ; #pragma omp target parallel for simd is_device_ptr(da) for (int i=0; i<100; i++) ; return 0; } // CHECK: template<> int tmain<int>(int argc) { // CHECK-NEXT: const int da[5] = {0}; // CHECK-NEXT: S6 h[10]; // CHECK-NEXT: auto &rh = h; // CHECK-NEXT: int i; // CHECK-NEXT: int &j = i; // CHECK-NEXT: int *k = &j; // CHECK-NEXT: int *&z = k; // CHECK-NEXT: int aa[10]; // CHECK-NEXT: auto &raa = aa; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(k) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(z) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(aa) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(raa) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(h) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(rh) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(da) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK: template<> int *tmain<int *>(int *argc) { // CHECK-NEXT: int *const da[5] = {0}; // CHECK-NEXT: S6 h[10]; // CHECK-NEXT: auto &rh = h; // CHECK-NEXT: int *i; // CHECK-NEXT: int *&j = i; // CHECK-NEXT: int **k = &j; // CHECK-NEXT: int **&z = k; // CHECK-NEXT: int *aa[10]; // CHECK-NEXT: auto &raa = aa; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(k) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(z) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(aa) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(raa) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(h) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(rh) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(da) // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; // CHECK-LABEL: int main(int argc, char **argv) { int main(int argc, char **argv) { const int da[5] = { 0 }; S6 h[10]; auto &rh = h; int i; int &j = i; int *k = &j; int *&z = k; int aa[10]; auto &raa = aa; // CHECK-NEXT: const int da[5] = {0}; // CHECK-NEXT: S6 h[10]; // CHECK-NEXT: auto &rh = h; // CHECK-NEXT: int i; // CHECK-NEXT: int &j = i; // CHECK-NEXT: int *k = &j; // CHECK-NEXT: int *&z = k; // CHECK-NEXT: int aa[10]; // CHECK-NEXT: auto &raa = aa; #pragma omp target parallel for simd is_device_ptr(k) // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(k) for (int i=0; i<100; i++) ; // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; #pragma omp target parallel for simd is_device_ptr(z) // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(z) for (int i=0; i<100; i++) ; // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; #pragma omp target parallel for simd is_device_ptr(aa) // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(aa) for (int i=0; i<100; i++) ; // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; #pragma omp target parallel for simd is_device_ptr(raa) // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(raa) for (int i=0; i<100; i++) ; // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; #pragma omp target parallel for simd is_device_ptr(h) // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(h) for (int i=0; i<100; i++) ; // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; #pragma omp target parallel for simd is_device_ptr(rh) // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(rh) for (int i=0; i<100; i++) ; // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; #pragma omp target parallel for simd is_device_ptr(da) // CHECK-NEXT: #pragma omp target parallel for simd is_device_ptr(da) for (int i=0; i<100; i++) ; // CHECK-NEXT: for (int i = 0; i < 100; i++) // CHECK-NEXT: ; return tmain<int>(argc) + *tmain<int *>(&argc); } #endif
{ "pile_set_name": "Github" }
บท ที่๑พายุ ไซโคลน โด โรธี อาศัย อยู่ ท่ามกลาง ทุ่งใหญ่ ใน แคนซัส กับ ลุง เฮ นรี ชาวไร่ และ ป้า เอ็ม ภรรยา ชาวไร่ บ้าน ของ พวก เขา หลัง เล็ก เพราะ ไม้ สร้าง บ้าน ต้อง ขน มา ด้วย เกวียน เป็น ระยะ ทาง หลาย ไมล์ บ้าน มี สี่ ฝา มี พื้น กับ หลังคา รวม ทำ เป็น ห้อง เดียว ใน ห้อง มี ทั้ง เตา หุง ต้ม ที่ สนิม ดู ขึ้น เลอะ มี ตู้ ใส่ ถ้วย ชาม โต๊ะ เก้าอี้ สาม หรือ สี่ ตัว แล้ว ก็ มี เตียง นอน ลุง เฮ นรี กับ ป้า เอ็ม มี เตียง นอน ใหญ่ อยู่ ที่ มุม หนึ่ง ส่วน โด โร ธีมี เตียง เล็ก อีก ที่ มุม หนึ่ง ไม่มี ห้อง ใต้ เพดาน เลย ห้อง ใต้ถุน ก็ ไม่มี เว้น แต่ มี โพ รง เล็กๆ ที่ ขุด ไป ใต้ พื้น เรียก ว่า "โพรง ไซโคลน" เป็น ที่ ครอบครัว นี้ จะ มุด เข้าไป เมื่อ เกิด ลม มหา ภัย ซึ่ง กระโชก แรง จน บดขยี้ สิ่ง ก่อ สร้าง ใดๆ ที่ ขวาง ทาง มัน ได้ ตรง กลาง พื้น มี ฝา เปิด เข้าไป จาก นั้น มี บันได ลง ไป ถึง โพรง มืด เล็กๆ เมื่อ โด โรธี ยืน ที่ ปาก ประตู และ มอง ไป รอบๆ เธอ ไม่ เห็น อะไร นอกจาก ท้อง ทุ่ง กว้าง สี เทา หม่น ทั่ว ทุก ด้าน ไม่มี แม้ ต้นไม้ สัก ต้น หรือ บ้าน สัก หลัง ที่ โผล่ พ้น ภูมิประเทศ อัน ราบ เรียบ แผ่ ไป ไกล จน จด ขอบ ฟ้า ทั่ว ทุก ทิศ ดวงตะวัน เผา ผืน ดิน ที่ ไถ แล้ว จน กลาย เป็น แผ่น มหึมา สี ดำ มี รอย แตก ระแหง อยู่ ตลอด แม้แต่ หญ้า ก็ ไม่ เขียว เพราะ ดวงตะวัน เผา ยอด ใบ ยาว เสีย จน เป็น สี เทา หม่น มอง เห็น อยู่ ทั่วไป ครั้ง หนึ่ง เคย ทาสี บ้าน เอา ไว้ แต่ ก็ ถูก ดวงตะวัน เผา เสีย จน สี พอง แล้ว ฝน ก็ ชะ มัน หลุด ไป จน หมด และ ตอน นี้ บ้าน จึง ดู หม่นหมอง เป็น สี เทา เหมือน สิ่ง อื่นๆ ด้วย ตอน ที่ ป้า เอ็ม ย้าย มา อยู่ ที่ นี่ เธอ ยัง สาว เป็น ภรรยา ที่ งดงาม แล้ว แดด และ ลม ก็ได้ เปลี่ยน เธอ ไป เอา ประกาย ไป จาก ดวงตา เธอ ปล่อย ไว้ แต่ ความ สุขุม อย่าง หม่นหมอง เอา สี แดง จาก แก้ม และ ริม ฝีปาก เธอ ไป กลาย เป็น สี หม่นๆ เหมือน กัน เธอ ผอม และ หลัง โค้ง และ เดี๋ยว นี้ ไม่ เคย ยิ้ม เลย เมื่อ โด โรธี ซึ่ง เป็น เด็ก กำพร้า มา อยู่ กับ เธอ ตอน แรก ป้า เอ็ม ตื่น เต้น กับ เสียง หัวเราะ ของ เด็ก น้อย มาก เธอ จะ ส่ง เสียง ร้อง แล้ว เอา มือ ทาบ อก ทุก ครั้ง ที่ เสียง อัน ร่าเริง ของ โด โรธี เข้าหู เธอ และ เธอ เฝ้า มอง เด็ก หญิง น้อยๆ ด้วย ความ ประหลาด ใจ ด้วย ยัง หา อะไร มา เป็น เรื่อง หัวเราะ ได้ ลุง เฮ นรี ไม่ เคย หัวเราะ ลุง ทำงาน หนัก จาก เช้า ยัน ค่ำ และ ไม่ เคย รู้จัก ว่า ความ ร่าเริง คือ อะไร ลุง ดู หม่นหมอง ไป หมด ตั้งแต่ เครา ยาว จน จด รองเท้า บูต อัน หยาบ แล้ว ลุง ก็ ดู เคร่งขรึม น่า เกรง ขาม ไม่ ค่อย จะ พูด มี โต โต้ ที่ ทำให้ โด โรธี หัวเราะ ได้ และ ช่วย เธอ ให้ พ้น จาก การก ลาย เป็น สี เทา หม่น เหมือน กับ สิ่ง รอบ ตัว อื่นๆ โต โต้ สี ไม่ เทา หม่น แต่ มัน เป็น หมา สี ดำ ตัว น้อยๆ ขน ยาว ปุย ราวกับ ไหม มี ตา ดำ เล็ก เป็น ประกาย รื่นเริง อยู่ สอง ข้าง จมูก เล็ก อัน น่า ขัน ของ มัน โต โต้ เล่น ทั้ง วัน และ โด โรธี ก็ เล่น กับ มัน และ รัก มัน เหลือ เกิน อย่างไร ก็ตาม วัน นี้ ทั้ง คู่ ไม่ ได้ เล่น ลุง เฮ นรี นั่ง อยู่ ที่ บันได ประตู และ เฝ้า กังวล จ้อง ดู ท้องฟ้า สี เทา หม่น ผิด ปกติ โด โรธี ยืน ที่ ประตู กอด โต โต้ ไว้ ใน อ้อม แขน และ ก็ มอง ดู ท้องฟ้า อยู่ เหมือน กัน ป้า เอ็ มกำ ลัง ล้าง ชาม อยู่ จาก ด้าน เหนือ ไกล ออก ไป มี เสียง ลม คราง แผ่ว เบา ได้ยิน มา ลุง เฮ นรี และ โด โรธี เห็น ต้น หญ้า สูง เอน เป็น คลื่น ก่อน ที่ พายุ จะ มา ถึง แล้ว ก็ มี เสียง หวีด หวิว ชัดเจน มา จาก บรรยากาศ ทาง ใต้ และ เมื่อ เหลือบ ตา ไป ทาง ด้าน นั้น ก็ เห็น คลื่น หญ้า มา ทาง ด้าน นั้น ด้วย ลุง เฮ นรี ผุด ลุก ขึ้น ทันใด "ลม ไซโคลน มา เอ็ม" ลุง ร้อง บอก ภรรยา "ข้า จะ ไป ดู สัตว์ เลี้ยง หน่อย" แล้ว ลุง ก็ วิ่ง ไป ยัง เพิง ที่ วัว และ ม้า อาศัย อยู่ ป้า เอ็ม หยุด ทำงาน และ มา ที่ ประตู เพียง ชายตา มอง ป้า ก็ บอก ได้ ว่า อันตราย มา ถึง แล้ว "เร็ว โด โรธี!" ป้า ตะโกน "วิ่ง ไป ห้อง ใต้ถุน" โต โต้ ผลุน กระโดด ลง จาก อ้อม แขน โด โรธี แล้ว เข้าไป ซ่อน อยู่ ใต้ เตียง เด็ก หญิง น้อย เข้าไป ดึง มัน ออก มา ป้า เอ็ มก ระ ชาก ฝา ที่ พื้น ออก อย่าง อก สั่น ขวัญ หาย ปีน บันได ไม้ ลง ไป ใน โพรง เล็ก อัน มืด ทึบ โด โรธี จับ โต โต้ ได้ ใน ที่สุด และ วิ่ง ตาม ป้า เธอ ไป เมื่อ เธอ มา ได้ ครึ่ง ห้อง ก็ มี เสียง หวีด หวือ ส่วน บ้าน ก็ สั่น อย่าง แรง จน เธอ หก คะมำ นั่ง จ้ำเบ้า อยู่ กับ พื้น แล้ว สิ่ง ประหลาด ก็ เกิด ขึ้น บ้าน หมุน ไป หมุน มาส อง สาม รอบ แล้ว ก็ ลอย ขึ้น สู่ อากาศ อย่าง ช้าๆ โด โร ธีรู้ สึก ราวกับ ว่า เธอ ได้ ขึ้น ไป กับ ลูก บอลลูน พายุ เหนือ กับ พายุ ใต้ มา พบ กัน ตรง ที่ บ้าน พอดี และ ทำให้ ตรง นั้น เป็น จุดศูนย์กลาง ของ พายุ ไซโคลน ตาม ปกติ ตรง กลาง พายุ ไซโคลน อากาศ จะ นิ่ง แต่ ความ กดดัน อย่าง หนัก ของ ลม ทุก ด้าน รอบ บ้าน ทำให้ บ้าน ลอย สูง ขึ้นๆ จน กระทั่ง ขึ้น ไป อยู่ สุด ยอด ของ พายุ ไซโคลน และ จาก ตรง นั้น ก็ ถูก หอบ ไป หลาย ไมล์ ง่ายดาย ราวกับ หอบ ขน นก มืด มาก แล้ว ลม ยัง ส่ง เสียง หวีด หวือ น่า กลัว อยู่ รอบ ตัว เธอ แต่ โด โรธี เห็น ว่า เธอ สามารถ นั่ง ไป ได้ อย่าง ง่ายดาย นัก ครั้ง หนึ่ง หลัง จาก ที่ บ้าน สะดุด อย่าง แรง และ หมุน ไป รอบๆ สอง สาม ครั้ง ใน ตอน แรก เธอ ก็ รู้สึก ว่า ตัว เอง ถูก แกว่ง อย่าง แผ่ว เบา ราว ทารก ใน เปล โต โต้ ไม่ ชอบใจ เลย มัน วิ่ง ไป วิ่ง มาร อบ ห้อง ทาง โน้น ที ทาง นี้ ที ส่ง เสียง เห่า ดัง ก้อง แต่ โด โรธี นั่ง นิ่ง อยู่ บน พื้น เฝ้า คอย ดู ว่า จะ เกิด อะไร ขึ้น ครั้ง หนึ่ง โต โต้ เข้าไป ใกล้ ฝา ที่ พื้น มาก ไป เลย พลัด ตกลง ไป ที แรก เด็ก หญิง คิด ว่า เธอ จะ สูญ เสีย มัน ไป เสีย แล้ว แต่ ชั่ว ครู่ เธอ ก็ เห็น หู ของ มัน โผล่ ขึ้น มา จาก ช่อง นั้น ทั้งนี้ เพราะ แรง กด อย่าง หนัก ของ อากาศ ทำให้ โต โต้ ไม่ ตกลง ไป ข้าง ล่าง โด โรธี คลาน ไป ที่ ช่อง นั้น จับ หู โต โต้ ไว้ ได้ และ ลาก มัน มา ที่ ห้อง อีก หลัง จาก นั้น ก็ ปิด ฝา พื้น เพื่อ จะ ได้ ไม่ เกิด อุบัติเหตุ อีก ชั่วโมง แล้ว ชั่วโมง เล่า ผ่าน ไป โด โรธี ค่อยๆ หาย กลัว แต่ เธอ รู้สึก เหงา เหลือ เกิน และ ลม ก็ ส่ง เสียง หวีด หวือ ดัง เสีย จน เธอ แทบ จะ หู หนวก ที แรก เธอ สงสัย ว่า คงจะ ถูก ฉีก กระชาก ออก เป็น ชิ้น เล็ก ชิ้น น้อย เมื่อ บ้าน เอน ล้ม ลง อีก ครั้ง แต่ หลาย ชั่วโมง ผ่าน ไป ก็ ไม่มี อะไร เกิด ขึ้น เธอ เลย เลิก วิตก และ ตัดสิน ใจ คอย ดู อย่าง สงบ และ รอ ว่า อนาคต จะ เป็น อย่างไร ใน ที่สุด เธอ คลาน จาก พื้น ห้อง ที่ โยก ไป มา ขึ้น ไป บน เตียง แล้ว ก็ นอน ลง โต โต้ ตาม ติด มา นอน ลง ใกล้ๆ เธอ ไม่ ช้า โด โรธี ก็ ปิด ตา ลง หลับ ผล็อย ไป อย่าง สนิท ทั้งๆ ที่ บ้าน โยก ไป มา และ ลม ก็ คราง หวีด หวือ
{ "pile_set_name": "Github" }
{ "errors":[ { "loc":{"source":null,"start":{"line":2,"column":18},"end":{"line":2,"column":19}}, "message":"Unexpected identifier, expected the token `:`" }, { "loc":{"source":null,"start":{"line":2,"column":19},"end":{"line":2,"column":20}}, "message":"Unexpected token `:`" }, { "loc":{"source":null,"start":{"line":2,"column":19},"end":{"line":2,"column":20}}, "message":"Unexpected token `:`, expected an identifier" }, { "loc":{"source":null,"start":{"line":2,"column":21},"end":{"line":2,"column":22}}, "message":"Unexpected identifier, expected the token `:`" }, { "loc":{"source":null,"start":{"line":2,"column":23},"end":{"line":2,"column":24}}, "message":"Unexpected token `}`" }, { "loc":{"source":null,"start":{"line":5,"column":18},"end":{"line":5,"column":19}}, "message":"Unexpected token `[`, expected the token `:`" }, { "loc":{"source":null,"start":{"line":5,"column":20},"end":{"line":5,"column":21}}, "message":"Unexpected token `]`" }, { "loc":{"source":null,"start":{"line":5,"column":20},"end":{"line":5,"column":21}}, "message":"Unexpected token `]`, expected an identifier" }, { "loc":{"source":null,"start":{"line":8,"column":18},"end":{"line":8,"column":21}}, "message":"Unexpected token `...`, expected the token `:`" }, { "loc":{"source":null,"start":{"line":14,"column":18},"end":{"line":14,"column":24}}, "message":"Use of future reserved word in strict mode" }, { "loc":{"source":null,"start":{"line":14,"column":24},"end":{"line":14,"column":25}}, "message":"Unexpected token `:`" }, { "loc":{"source":null,"start":{"line":14,"column":24},"end":{"line":14,"column":25}}, "message":"Unexpected token `:`, expected an identifier" }, { "loc":{"source":null,"start":{"line":14,"column":26},"end":{"line":14,"column":27}}, "message":"Unexpected identifier, expected the token `:`" }, { "loc":{"source":null,"start":{"line":14,"column":28},"end":{"line":14,"column":29}}, "message":"Unexpected token `}`" }, { "loc":{"source":null,"start":{"line":23,"column":18},"end":{"line":23,"column":24}}, "message":"Use of future reserved word in strict mode" }, { "loc":{"source":null,"start":{"line":23,"column":26},"end":{"line":23,"column":27}}, "message":"Unexpected token `:`, expected the token `=>`" }, { "loc":{"source":null,"start":{"line":26,"column":18},"end":{"line":26,"column":24}}, "message":"Use of future reserved word in strict mode" }, { "loc":{"source":null,"start":{"line":26,"column":29},"end":{"line":26,"column":30}}, "message":"Unexpected token `:`, expected the token `=>`" } ], "type":"Program", "loc":{"source":null,"start":{"line":2,"column":0},"end":{"line":26,"column":34}}, "range":[48,663], "body":[ { "type":"TypeAlias", "loc":{"source":null,"start":{"line":2,"column":0},"end":{"line":2,"column":24}}, "range":[48,72], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":2,"column":5},"end":{"line":2,"column":6}}, "range":[53,54], "name":"A", "typeAnnotation":null, "optional":false }, "typeParameters":null, "right":{ "type":"ObjectTypeAnnotation", "loc":{"source":null,"start":{"line":2,"column":9},"end":{"line":2,"column":24}}, "range":[57,72], "inexact":false, "exact":false, "properties":[ { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":2,"column":11},"end":{"line":2,"column":19}}, "range":[59,67], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":2,"column":11},"end":{"line":2,"column":17}}, "range":[59,65], "name":"static", "typeAnnotation":null, "optional":false }, "value":{ "type":"AnyTypeAnnotation", "loc":{"source":null,"start":{"line":2,"column":19},"end":{"line":2,"column":20}}, "range":[67,68] }, "method":false, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" }, { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":2,"column":19},"end":{"line":2,"column":22}}, "range":[67,70], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":2,"column":19},"end":{"line":2,"column":20}}, "range":[67,68], "name":"", "typeAnnotation":null, "optional":false }, "value":{ "type":"AnyTypeAnnotation", "loc":{"source":null,"start":{"line":2,"column":23},"end":{"line":2,"column":24}}, "range":[71,72] }, "method":false, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" } ], "indexers":[], "callProperties":[], "internalSlots":[] } }, { "type":"TypeAlias", "loc":{"source":null,"start":{"line":5,"column":0},"end":{"line":5,"column":26}}, "range":[143,169], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":5,"column":5},"end":{"line":5,"column":6}}, "range":[148,149], "name":"B", "typeAnnotation":null, "optional":false }, "typeParameters":null, "right":{ "type":"ObjectTypeAnnotation", "loc":{"source":null,"start":{"line":5,"column":9},"end":{"line":5,"column":26}}, "range":[152,169], "inexact":false, "exact":false, "properties":[ { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":5,"column":11},"end":{"line":5,"column":20}}, "range":[154,163], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":5,"column":11},"end":{"line":5,"column":17}}, "range":[154,160], "name":"static", "typeAnnotation":null, "optional":false }, "value":{ "type":"GenericTypeAnnotation", "loc":{"source":null,"start":{"line":5,"column":19},"end":{"line":5,"column":20}}, "range":[162,163], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":5,"column":19},"end":{"line":5,"column":20}}, "range":[162,163], "name":"K", "typeAnnotation":null, "optional":false }, "typeParameters":null }, "method":false, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" }, { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":5,"column":20},"end":{"line":5,"column":24}}, "range":[163,167], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":5,"column":20},"end":{"line":5,"column":21}}, "range":[163,164], "name":"", "typeAnnotation":null, "optional":false }, "value":{ "type":"GenericTypeAnnotation", "loc":{"source":null,"start":{"line":5,"column":23},"end":{"line":5,"column":24}}, "range":[166,167], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":5,"column":23},"end":{"line":5,"column":24}}, "range":[166,167], "name":"V", "typeAnnotation":null, "optional":false }, "typeParameters":null }, "method":false, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" } ], "indexers":[], "callProperties":[], "internalSlots":[] } }, { "type":"TypeAlias", "loc":{"source":null,"start":{"line":8,"column":0},"end":{"line":8,"column":24}}, "range":[238,262], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":8,"column":5},"end":{"line":8,"column":6}}, "range":[243,244], "name":"C", "typeAnnotation":null, "optional":false }, "typeParameters":null, "right":{ "type":"ObjectTypeAnnotation", "loc":{"source":null,"start":{"line":8,"column":9},"end":{"line":8,"column":24}}, "range":[247,262], "inexact":false, "exact":false, "properties":[ { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":8,"column":11},"end":{"line":8,"column":22}}, "range":[249,260], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":8,"column":11},"end":{"line":8,"column":17}}, "range":[249,255], "name":"static", "typeAnnotation":null, "optional":false }, "value":{ "type":"GenericTypeAnnotation", "loc":{"source":null,"start":{"line":8,"column":21},"end":{"line":8,"column":22}}, "range":[259,260], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":8,"column":21},"end":{"line":8,"column":22}}, "range":[259,260], "name":"X", "typeAnnotation":null, "optional":false }, "typeParameters":null }, "method":false, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" } ], "indexers":[], "callProperties":[], "internalSlots":[] } }, { "type":"TypeAlias", "loc":{"source":null,"start":{"line":11,"column":0},"end":{"line":11,"column":22}}, "range":[289,311], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":11,"column":5},"end":{"line":11,"column":6}}, "range":[294,295], "name":"D", "typeAnnotation":null, "optional":false }, "typeParameters":null, "right":{ "type":"ObjectTypeAnnotation", "loc":{"source":null,"start":{"line":11,"column":9},"end":{"line":11,"column":22}}, "range":[298,311], "inexact":false, "exact":false, "properties":[ { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":11,"column":11},"end":{"line":11,"column":20}}, "range":[300,309], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":11,"column":11},"end":{"line":11,"column":17}}, "range":[300,306], "name":"static", "typeAnnotation":null, "optional":false }, "value":{ "type":"GenericTypeAnnotation", "loc":{"source":null,"start":{"line":11,"column":19},"end":{"line":11,"column":20}}, "range":[308,309], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":11,"column":19},"end":{"line":11,"column":20}}, "range":[308,309], "name":"X", "typeAnnotation":null, "optional":false }, "typeParameters":null }, "method":false, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" } ], "indexers":[], "callProperties":[], "internalSlots":[] } }, { "type":"TypeAlias", "loc":{"source":null,"start":{"line":14,"column":0},"end":{"line":14,"column":29}}, "range":[348,377], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":14,"column":5},"end":{"line":14,"column":6}}, "range":[353,354], "name":"E", "typeAnnotation":null, "optional":false }, "typeParameters":null, "right":{ "type":"ObjectTypeAnnotation", "loc":{"source":null,"start":{"line":14,"column":9},"end":{"line":14,"column":29}}, "range":[357,377], "inexact":false, "exact":false, "properties":[ { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":14,"column":11},"end":{"line":14,"column":24}}, "range":[359,372], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":14,"column":11},"end":{"line":14,"column":17}}, "range":[359,365], "name":"static", "typeAnnotation":null, "optional":false }, "value":{ "type":"AnyTypeAnnotation", "loc":{"source":null,"start":{"line":14,"column":24},"end":{"line":14,"column":25}}, "range":[372,373] }, "method":false, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" }, { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":14,"column":24},"end":{"line":14,"column":27}}, "range":[372,375], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":14,"column":24},"end":{"line":14,"column":25}}, "range":[372,373], "name":"", "typeAnnotation":null, "optional":false }, "value":{ "type":"AnyTypeAnnotation", "loc":{"source":null,"start":{"line":14,"column":28},"end":{"line":14,"column":29}}, "range":[376,377] }, "method":false, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" } ], "indexers":[], "callProperties":[], "internalSlots":[] } }, { "type":"TypeAlias", "loc":{"source":null,"start":{"line":17,"column":0},"end":{"line":17,"column":24}}, "range":[418,442], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":17,"column":5},"end":{"line":17,"column":6}}, "range":[423,424], "name":"F", "typeAnnotation":null, "optional":false }, "typeParameters":null, "right":{ "type":"ObjectTypeAnnotation", "loc":{"source":null,"start":{"line":17,"column":9},"end":{"line":17,"column":24}}, "range":[427,442], "inexact":false, "exact":false, "properties":[ { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":17,"column":11},"end":{"line":17,"column":22}}, "range":[429,440], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":17,"column":11},"end":{"line":17,"column":17}}, "range":[429,435], "name":"static", "typeAnnotation":null, "optional":false }, "value":{ "type":"FunctionTypeAnnotation", "loc":{"source":null,"start":{"line":17,"column":11},"end":{"line":17,"column":22}}, "range":[429,440], "params":[], "returnType":{ "type":"GenericTypeAnnotation", "loc":{"source":null,"start":{"line":17,"column":21},"end":{"line":17,"column":22}}, "range":[439,440], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":17,"column":21},"end":{"line":17,"column":22}}, "range":[439,440], "name":"R", "typeAnnotation":null, "optional":false }, "typeParameters":null }, "rest":null, "typeParameters":null }, "method":true, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" } ], "indexers":[], "callProperties":[], "internalSlots":[] } }, { "type":"TypeAlias", "loc":{"source":null,"start":{"line":20,"column":0},"end":{"line":20,"column":27}}, "range":[488,515], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":20,"column":5},"end":{"line":20,"column":6}}, "range":[493,494], "name":"G", "typeAnnotation":null, "optional":false }, "typeParameters":null, "right":{ "type":"ObjectTypeAnnotation", "loc":{"source":null,"start":{"line":20,"column":9},"end":{"line":20,"column":27}}, "range":[497,515], "inexact":false, "exact":false, "properties":[ { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":20,"column":11},"end":{"line":20,"column":25}}, "range":[499,513], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":20,"column":11},"end":{"line":20,"column":17}}, "range":[499,505], "name":"static", "typeAnnotation":null, "optional":false }, "value":{ "type":"FunctionTypeAnnotation", "loc":{"source":null,"start":{"line":20,"column":11},"end":{"line":20,"column":25}}, "range":[499,513], "params":[], "returnType":{ "type":"GenericTypeAnnotation", "loc":{"source":null,"start":{"line":20,"column":24},"end":{"line":20,"column":25}}, "range":[512,513], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":20,"column":24},"end":{"line":20,"column":25}}, "range":[512,513], "name":"R", "typeAnnotation":null, "optional":false }, "typeParameters":null }, "rest":null, "typeParameters":{ "type":"TypeParameterDeclaration", "loc":{"source":null,"start":{"line":20,"column":17},"end":{"line":20,"column":20}}, "range":[505,508], "params":[ { "type":"TypeParameter", "loc":{"source":null,"start":{"line":20,"column":18},"end":{"line":20,"column":19}}, "range":[506,507], "name":"X", "bound":null, "variance":null, "default":null } ] } }, "method":true, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" } ], "indexers":[], "callProperties":[], "internalSlots":[] } }, { "type":"TypeAlias", "loc":{"source":null,"start":{"line":23,"column":0},"end":{"line":23,"column":31}}, "range":[554,585], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":23,"column":5},"end":{"line":23,"column":6}}, "range":[559,560], "name":"H", "typeAnnotation":null, "optional":false }, "typeParameters":null, "right":{ "type":"ObjectTypeAnnotation", "loc":{"source":null,"start":{"line":23,"column":9},"end":{"line":23,"column":31}}, "range":[563,585], "inexact":false, "exact":false, "properties":[ { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":23,"column":11},"end":{"line":23,"column":29}}, "range":[565,583], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":23,"column":11},"end":{"line":23,"column":17}}, "range":[565,571], "name":"static", "typeAnnotation":null, "optional":false }, "value":{ "type":"FunctionTypeAnnotation", "loc":{"source":null,"start":{"line":23,"column":24},"end":{"line":23,"column":29}}, "range":[578,583], "params":[], "returnType":{ "type":"GenericTypeAnnotation", "loc":{"source":null,"start":{"line":23,"column":28},"end":{"line":23,"column":29}}, "range":[582,583], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":23,"column":28},"end":{"line":23,"column":29}}, "range":[582,583], "name":"R", "typeAnnotation":null, "optional":false }, "typeParameters":null }, "rest":null, "typeParameters":null }, "method":false, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" } ], "indexers":[], "callProperties":[], "internalSlots":[] } }, { "type":"TypeAlias", "loc":{"source":null,"start":{"line":26,"column":0},"end":{"line":26,"column":34}}, "range":[629,663], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":26,"column":5},"end":{"line":26,"column":6}}, "range":[634,635], "name":"I", "typeAnnotation":null, "optional":false }, "typeParameters":null, "right":{ "type":"ObjectTypeAnnotation", "loc":{"source":null,"start":{"line":26,"column":9},"end":{"line":26,"column":34}}, "range":[638,663], "inexact":false, "exact":false, "properties":[ { "type":"ObjectTypeProperty", "loc":{"source":null,"start":{"line":26,"column":11},"end":{"line":26,"column":32}}, "range":[640,661], "key":{ "type":"Identifier", "loc":{"source":null,"start":{"line":26,"column":11},"end":{"line":26,"column":17}}, "range":[640,646], "name":"static", "typeAnnotation":null, "optional":false }, "value":{ "type":"FunctionTypeAnnotation", "loc":{"source":null,"start":{"line":26,"column":24},"end":{"line":26,"column":32}}, "range":[653,661], "params":[], "returnType":{ "type":"GenericTypeAnnotation", "loc":{"source":null,"start":{"line":26,"column":31},"end":{"line":26,"column":32}}, "range":[660,661], "id":{ "type":"Identifier", "loc":{"source":null,"start":{"line":26,"column":31},"end":{"line":26,"column":32}}, "range":[660,661], "name":"R", "typeAnnotation":null, "optional":false }, "typeParameters":null }, "rest":null, "typeParameters":{ "type":"TypeParameterDeclaration", "loc":{"source":null,"start":{"line":26,"column":24},"end":{"line":26,"column":27}}, "range":[653,656], "params":[ { "type":"TypeParameter", "loc":{"source":null,"start":{"line":26,"column":25},"end":{"line":26,"column":26}}, "range":[654,655], "name":"X", "bound":null, "variance":null, "default":null } ] } }, "method":false, "optional":false, "static":false, "proto":false, "variance":null, "kind":"init" } ], "indexers":[], "callProperties":[], "internalSlots":[] } } ], "comments":[ { "type":"Line", "loc":{"source":null,"start":{"line":1,"column":0},"end":{"line":1,"column":47}}, "range":[0,47], "value":" error: object types don't have static fields" }, { "type":"Line", "loc":{"source":null,"start":{"line":4,"column":0},"end":{"line":4,"column":68}}, "range":[74,142], "value":" error: object types don't have static fields (including indexers)" }, { "type":"Line", "loc":{"source":null,"start":{"line":7,"column":0},"end":{"line":7,"column":66}}, "range":[171,237], "value":" error: object types don't have static fields (including spread)" }, { "type":"Line", "loc":{"source":null,"start":{"line":10,"column":0},"end":{"line":10,"column":24}}, "range":[264,288], "value":" ok: prop named static" }, { "type":"Line", "loc":{"source":null,"start":{"line":13,"column":0},"end":{"line":13,"column":34}}, "range":[313,347], "value":" error: static prop named static" }, { "type":"Line", "loc":{"source":null,"start":{"line":16,"column":0},"end":{"line":16,"column":38}}, "range":[379,417], "value":" ok: parsed as a method named static" }, { "type":"Line", "loc":{"source":null,"start":{"line":19,"column":0},"end":{"line":19,"column":43}}, "range":[444,487], "value":" ok: parsed as a poly method named static" }, { "type":"Line", "loc":{"source":null,"start":{"line":22,"column":0},"end":{"line":22,"column":36}}, "range":[517,553], "value":" error: static method named static" }, { "type":"Line", "loc":{"source":null,"start":{"line":25,"column":0},"end":{"line":25,"column":41}}, "range":[587,628], "value":" error: static poly method named static" } ] }
{ "pile_set_name": "Github" }
/** * Copyright (c) 2016 - 2018 Syncleus, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aparapi.codegen.test; public class IfOrOrOr { public void run() { int testValue = 10; @SuppressWarnings("unused") boolean pass = false; if (testValue % 2 == 0 || testValue <= 0 || testValue >= 100 || testValue == 10) { pass = true; } } } /**{OpenCL{ typedef struct This_s{ int passid; }This; int get_pass_id(This *this){ return this->passid; } __kernel void run( int passid ){ This thisStruct; This* this=&thisStruct; this->passid = passid; { int testValue = 10; char pass = 0; if ((testValue % 2)==0 || testValue<=0 || testValue>=100 || testValue==10){ pass = 1; } return; } } }OpenCL}**/
{ "pile_set_name": "Github" }
/* wolfssl_KEIL_ARM.h * * Copyright (C) 2006-2017 wolfSSL Inc. * * This file is part of wolfSSL. * * wolfSSL is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * wolfSSL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA */ /******************************************************************************/ /** This file is for defining types, values for specific to KEIL-MDK-ARM. **/ /******************************************************************************/ #ifndef WOLFSSL_KEIL_ARM_H #define WOLFSSL_KEIL_ARM_H #include <stdio.h> /* Go to STDIN */ #define fgets(buff, sz, fd) wolfssl_fgets(buff, sz, fd) extern char * wolfssl_fgets ( char * str, int num, FILE * f ) ; #define SOCKET_T int /*** #include <socket.h> ***/ #define NUMBITSPERBYTE 8 #define FD_SETSIZE 10 typedef long fd_mask; #define NFDBITS (sizeof(fd_mask) * NUMBITSPERBYTE) /* bits per mask */ typedef struct fd_set { fd_mask fds_bits[(FD_SETSIZE + NFDBITS - 1) / NFDBITS]; } fd_set; /*** #include <sys/types.h> ***/ struct timeval { long tv_sec; /* seconds */ long tv_usec; /* microseconds */ }; #if defined(WOLFSSL_KEIL_TCP_NET) #define SCK_EWOULDBLOCK BSD_ERROR_WOULDBLOCK #define SCK_ETIMEOUT BSD_ERROR_TIMEOUT #include "rl_net.h" typedef int socklen_t ; /* for avoiding conflict with KEIL-TCPnet BSD socket */ /* Bodies are in cyassl_KEIL_RL.c */ #if defined(HAVE_KEIL_RTX) #define sleep(t) os_dly_wait(t/1000+1) ; #elif defined (WOLFSSL_CMSIS_RTOS) #define sleep(t) osDelay(t/1000+1) ; #endif /* for avoiding conflicting with KEIL-TCPnet TCP socket */ /* Bodies are in test.h */ #define tcp_connect wolfssl_tcp_connect #define tcp_socket wolfssl_tcp_soket #define tcp_listen wolfssl_tcp_listen #define tcp_select(a,b) (0) /** KEIL-RL TCPnet ****/ /* TCPnet BSD socket does not have following functions. */ extern char *inet_ntoa(struct in_addr in); extern unsigned long inet_addr(const char *cp); extern int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timeval *timeout); #endif /* WOLFSSL_KEIL_TCP_NET */ #endif /* WOLFSSL_KEIL_ARM_H */
{ "pile_set_name": "Github" }
/* nanosleep.c */ #include <ulib/base/base.h> #include <errno.h> #include <time.h> /* Pause execution for a number of nanoseconds */ extern U_EXPORT int nanosleep(const struct timespec* requested_time, struct timespec* remaining); U_EXPORT int nanosleep(const struct timespec* requested_time, struct timespec* remaining) { int result; /* Some code calls select() with all three sets empty, nfds zero, * and a non-NULL timeout as a fairly portable way to sleep with subsecond precision. */ ((struct timespec*)requested_time)->tv_nsec /= 1000; /* nanoseconds to microseconds */ #ifdef _MSWINDOWS_ result = select_w32(0, 0, 0, 0, (struct timeval*)requested_time); #else result = select(0, 0, 0, 0, (struct timeval*)requested_time); #endif if (remaining) { if (result == 0) remaining->tv_sec = remaining->tv_nsec = 0; else { remaining->tv_sec = requested_time->tv_sec; remaining->tv_nsec = requested_time->tv_nsec * 1000; /* microseconds to nanoseconds */ } } return result; }
{ "pile_set_name": "Github" }
<!doctype html> <html lang="en" ng-app="myApp"> <head> <meta charset="utf-8"> <title>Grid | Onsen UI</title> <link rel="stylesheet" href="../styles/app.css"/> <link rel="stylesheet" href="../../../../build/css/onsenui.css"> <link rel="stylesheet" href="../../../../build/css/onsen-css-components.css"> <script src="../../../../build/js/onsenui.js"></script> <script src="../../node_modules/angular/angular.js"></script> <script src="../../dist/angularjs-onsenui.js"></script> <script src="../app.js"></script> <style type="text/css" media="screen"> ons-col { border: 1px solid #ccc; background: #fff; overflow: hidden; padding: 4px; color: #999; } h2 { font-weight: 400; font-size: 18px; } h3 { border-bottom: 1px solid #CCC; font-weight: 300; font-size: 16px; } </style> </head> <body> <ons-page> <ons-toolbar> <div class="center">Grid</div> </ons-toolbar> <div style="padding: 10px"> <h3>Equally spaced</h3> <ons-row> <ons-col>Col</ons-col> <ons-col>Col</ons-col> </ons-row> <p></p> <ons-row> <ons-col>Col</ons-col> <ons-col>Col</ons-col> <ons-col>Col</ons-col> </ons-row> <p></p> <ons-row> <ons-col>Col</ons-col> <ons-col>Col</ons-col> <ons-col>Col</ons-col> <ons-col>Col</ons-col> </ons-row> <h3>Full height</h3> <ons-row> <ons-col> <div class="Demo"> This column's height will grow to the same height as the tallest column. </div> </ons-col> <ons-col> <div class="Demo"> Lorem ipsum dolor sit amet, consectetur adipisicing elit. Vestibulum mollis velit non gravida venenatis. Praesent consequat lectus purus, ut scelerisque velit condimentum eu. </div> </ons-col> </ons-row> <h3>Individual Sizing</h3> <ons-row> <ons-col width="50%">Col width="50%"</ons-col> <ons-col>Col</ons-col> <ons-col>Col</ons-col> </ons-row> <p></p> <ons-row> <ons-col width="200px"> <div class="Demo">Col width="200px"</div> </ons-col> <ons-col> <div class="Demo">Col</div> </ons-col> </ons-row> <p></p> <ons-row> <ons-col width="100px"> <div class="Demo">100px</div> </ons-col> <ons-col width="50px"> <div class="Demo">50px</div> </ons-col> <ons-col> <div class="Demo">Col</div> </ons-col> </ons-row> <p></p> <ons-row> <ons-col> <div class="Demo">Col</div> </ons-col> <ons-col width="33%"> <div class="Demo">Col width="33%"</div> </ons-col> </ons-row> <p></p> <ons-row> <ons-col width="25%"> <div class="Demo">Col width="25%"</div> </ons-col> <ons-col> <div class="Demo">Col</div> </ons-col> <ons-col width="33%"> <div class="Demo">Col width="33%"</div> </ons-col> </ons-row> <h2>Alignment Features</h2> <h3>Top-aligned Grid Cells</h3> <ons-row align="top"> <ons-col> <div class="Demo"> This cell should be top-aligned. </div> </ons-col> <ons-col> <div class="Demo"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </div> </ons-col> <ons-col> <div class="Demo"> This cell should be top-aligned. </div> </ons-col> </ons-row> <h3>Bottom-aligned Grid Cells</h3> <ons-row align="bottom"> <ons-col> <div class="Demo"> This cell should be bottom-aligned. </div> </ons-col> <ons-col> <div class="Demo"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </div> </ons-col> <ons-col> <div class="Demo"> This cell should be bottom-aligned. </div> </ons-col> </ons-row> <h3>Vertically Centered Grid Cells</h3> <ons-row align="center"> <ons-col> <div class="Demo"> This cell should be vertically-centered with the cell to its right. </div> </ons-col> <ons-col> <div class="Demo"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</div> </ons-col> </ons-row> <h3>Mixed Vertical Alignment</h3> <ons-row> <ons-col align="top"> <div class="Demo"> This cell should be top aligned. </div> </ons-col> <ons-col> <div class="Demo"> Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. </div> </ons-col> <ons-col align="center"> <div class="Demo"> This cell should be center-aligned. </div> </ons-col> <ons-col align="bottom"> <div class="Demo"> This cell should be bottom-aligned. </div> </ons-col> </ons-row> </div> </ons-page> </body> </html>
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard. // #import <AudioVideoBridging/AVB17221AEMObject.h> #import <AudioVideoBridging/NSCopying-Protocol.h> @interface AVB17221AEMSignalSplitterMapping : AVB17221AEMObject <NSCopying> { unsigned short subSignalStart; unsigned short subSignalCount; unsigned short outputIndex; } @property unsigned short outputIndex; // @synthesize outputIndex; @property unsigned short subSignalCount; // @synthesize subSignalCount; @property unsigned short subSignalStart; // @synthesize subSignalStart; - (BOOL)isEqual:(id)arg1; - (unsigned long long)hash; - (id)copyWithZone:(struct _NSZone *)arg1; - (id)debugLogStringWithIndentation:(id)arg1; - (BOOL)updateWithXML:(id)arg1; - (id)xmlRepresentation; - (id)plistRepresentation; - (BOOL)updateWithPlistEntry:(id)arg1; @end
{ "pile_set_name": "Github" }
https://medium.com/tebelorg // automation flow files usually start with an URL to tell TagUI where to go // files can also start with // for comments, or no URL if it's not web-related // this set of flows uses datatables to retrieve/act on info from GitHub // 6A - get URLs of Starrers, 6B - get contact info, 6C - email Starrers // for issues or questions, kindly feedback on GitHub or [email protected] // see cheatsheet for steps, conditions, finding element identifiers, etc // https://github.com/kelaberetiv/TagUI#cheat-sheet // CONTEXT - When TagUI beta was released, someone shared to Hacker News // and GitHub stars for the project jumped from 2 to 1.5k in a week or so. // I used this to send a one-time thank you email to all TagUI starrers, // but had since stopped using this as it is unsolicited and feels spammy. // when running TagUI, specify datatable csv to use, eg tagui 6C_datatables user_data.csv // TagUI loops through each row to run automation using the data from different rows // for example, echo "GitHub ID - `GITHUB_ID`" in your flow shows GitHub ID - ironman // echo '`[iteration]`' can be used in your flow to show the current iteration number // a file tagui_datatable.csv will be created in tagui/src folder for TagUI internal use // contents of user_data.csv // #,GITHUB_ID,USER_EMAIL // 1,ironman,[email protected] // 2,batman,[email protected] // 3,superman,[email protected] // now here's the actual flow, it uses part of the information from 6B to email using API // JavaScript can be used as needed to create more complex automation flows // set respective User IDs and User Emails and display to screen and log file // ; or no ; after assignment of variable is up to you, both works for TagUI github_id = "`GITHUB_ID`" user_email = "`USER_EMAIL`"; echo github_id " - " user_email // only display the api call to screen, we are not going to actually email the superheroes this.echo('api your_website_url/mailer.php?APIKEY=unique_key&SUBJECT=Hi @'+github_id+'&SENDTO='+user_email+'&SENDFROM=Your Name <[email protected]>&MESSAGE=Your message line 1.<br><br>Your message line 2.'); // how api step is used to send email with 1 line, in this case using Tmail (another open-source project from TA) // api your_website_url/mailer.php?APIKEY=unique_key&SUBJECT=Hi @`github_id`&SENDTO=`user_email`&SENDFROM=Your Name <[email protected]>&MESSAGE=Your message line 1.<br><br>Your message line 2. // response and result from the api call will be printed to screen and log, below is sample response from Tmail // OK - Hi @ironman mail sent successfully to [email protected] // wait a few seconds to reduce risk of network police flagging your mail server as bad actors and blocking you wait 3 seconds
{ "pile_set_name": "Github" }
// This file is part of Eigen, a lightweight C++ template library // for linear algebra. // // Copyright (C) 2014-2019 Gael Guennebaud <[email protected]> // // This Source Code Form is subject to the terms of the Mozilla // Public License v. 2.0. If a copy of the MPL was not distributed // with this file, You can obtain one at http://mozilla.org/MPL/2.0/. #ifndef EIGEN_INVERSE_H #define EIGEN_INVERSE_H namespace Eigen { template<typename XprType,typename StorageKind> class InverseImpl; namespace internal { template<typename XprType> struct traits<Inverse<XprType> > : traits<typename XprType::PlainObject> { typedef typename XprType::PlainObject PlainObject; typedef traits<PlainObject> BaseTraits; enum { Flags = BaseTraits::Flags & RowMajorBit }; }; } // end namespace internal /** \class Inverse * * \brief Expression of the inverse of another expression * * \tparam XprType the type of the expression we are taking the inverse * * This class represents an abstract expression of A.inverse() * and most of the time this is the only way it is used. * */ template<typename XprType> class Inverse : public InverseImpl<XprType,typename internal::traits<XprType>::StorageKind> { public: typedef typename XprType::StorageIndex StorageIndex; typedef typename XprType::Scalar Scalar; typedef typename internal::ref_selector<XprType>::type XprTypeNested; typedef typename internal::remove_all<XprTypeNested>::type XprTypeNestedCleaned; typedef typename internal::ref_selector<Inverse>::type Nested; typedef typename internal::remove_all<XprType>::type NestedExpression; explicit EIGEN_DEVICE_FUNC Inverse(const XprType &xpr) : m_xpr(xpr) {} EIGEN_DEVICE_FUNC Index rows() const { return m_xpr.cols(); } EIGEN_DEVICE_FUNC Index cols() const { return m_xpr.rows(); } EIGEN_DEVICE_FUNC const XprTypeNestedCleaned& nestedExpression() const { return m_xpr; } protected: XprTypeNested m_xpr; }; // Generic API dispatcher template<typename XprType, typename StorageKind> class InverseImpl : public internal::generic_xpr_base<Inverse<XprType> >::type { public: typedef typename internal::generic_xpr_base<Inverse<XprType> >::type Base; typedef typename XprType::Scalar Scalar; private: Scalar coeff(Index row, Index col) const; Scalar coeff(Index i) const; }; namespace internal { /** \internal * \brief Default evaluator for Inverse expression. * * This default evaluator for Inverse expression simply evaluate the inverse into a temporary * by a call to internal::call_assignment_no_alias. * Therefore, inverse implementers only have to specialize Assignment<Dst,Inverse<...>, ...> for * there own nested expression. * * \sa class Inverse */ template<typename ArgType> struct unary_evaluator<Inverse<ArgType> > : public evaluator<typename Inverse<ArgType>::PlainObject> { typedef Inverse<ArgType> InverseType; typedef typename InverseType::PlainObject PlainObject; typedef evaluator<PlainObject> Base; enum { Flags = Base::Flags | EvalBeforeNestingBit }; unary_evaluator(const InverseType& inv_xpr) : m_result(inv_xpr.rows(), inv_xpr.cols()) { ::new (static_cast<Base*>(this)) Base(m_result); internal::call_assignment_no_alias(m_result, inv_xpr); } protected: PlainObject m_result; }; } // end namespace internal } // end namespace Eigen #endif // EIGEN_INVERSE_H
{ "pile_set_name": "Github" }
/* KLayout Layout Viewer Copyright (C) 2006-2020 Matthias Koefferlein This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ /** * @file gsiDeclQStyleOptionComplex.cc * * DO NOT EDIT THIS FILE. * This file has been created automatically */ #include <QStyleOptionComplex> #include <QStyleOption> #include <QWidget> #include "gsiQt.h" #include "gsiQtWidgetsCommon.h" #include "gsiDeclQtWidgetsTypeTraits.h" #include <memory> // ----------------------------------------------------------------------- // class QStyleOptionComplex // Constructor QStyleOptionComplex::QStyleOptionComplex(int version, int type) static void _init_ctor_QStyleOptionComplex_1426 (qt_gsi::GenericStaticMethod *decl) { static gsi::ArgSpecBase argspec_0 ("version", true, "QStyleOptionComplex::Version"); decl->add_arg<int > (argspec_0); static gsi::ArgSpecBase argspec_1 ("type", true, "QStyleOption::SO_Complex"); decl->add_arg<int > (argspec_1); decl->set_return_new<QStyleOptionComplex> (); } static void _call_ctor_QStyleOptionComplex_1426 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) { __SUPPRESS_UNUSED_WARNING(args); tl::Heap heap; int arg1 = args ? gsi::arg_reader<int >() (args, heap) : gsi::arg_maker<int >() (QStyleOptionComplex::Version, heap); int arg2 = args ? gsi::arg_reader<int >() (args, heap) : gsi::arg_maker<int >() (QStyleOption::SO_Complex, heap); ret.write<QStyleOptionComplex *> (new QStyleOptionComplex (arg1, arg2)); } // Constructor QStyleOptionComplex::QStyleOptionComplex(const QStyleOptionComplex &other) static void _init_ctor_QStyleOptionComplex_3284 (qt_gsi::GenericStaticMethod *decl) { static gsi::ArgSpecBase argspec_0 ("other"); decl->add_arg<const QStyleOptionComplex & > (argspec_0); decl->set_return_new<QStyleOptionComplex> (); } static void _call_ctor_QStyleOptionComplex_3284 (const qt_gsi::GenericStaticMethod * /*decl*/, gsi::SerialArgs &args, gsi::SerialArgs &ret) { __SUPPRESS_UNUSED_WARNING(args); tl::Heap heap; const QStyleOptionComplex &arg1 = gsi::arg_reader<const QStyleOptionComplex & >() (args, heap); ret.write<QStyleOptionComplex *> (new QStyleOptionComplex (arg1)); } namespace gsi { static gsi::Methods methods_QStyleOptionComplex () { gsi::Methods methods; methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QStyleOptionComplex::QStyleOptionComplex(int version, int type)\nThis method creates an object of class QStyleOptionComplex.", &_init_ctor_QStyleOptionComplex_1426, &_call_ctor_QStyleOptionComplex_1426); methods += new qt_gsi::GenericStaticMethod ("new", "@brief Constructor QStyleOptionComplex::QStyleOptionComplex(const QStyleOptionComplex &other)\nThis method creates an object of class QStyleOptionComplex.", &_init_ctor_QStyleOptionComplex_3284, &_call_ctor_QStyleOptionComplex_3284); return methods; } gsi::Class<QStyleOption> &qtdecl_QStyleOption (); gsi::Class<QStyleOptionComplex> decl_QStyleOptionComplex (qtdecl_QStyleOption (), "QtWidgets", "QStyleOptionComplex", methods_QStyleOptionComplex (), "@qt\n@brief Binding of QStyleOptionComplex"); GSI_QTWIDGETS_PUBLIC gsi::Class<QStyleOptionComplex> &qtdecl_QStyleOptionComplex () { return decl_QStyleOptionComplex; } }
{ "pile_set_name": "Github" }
#include <assert.h> #include "src/codegen/helpers.h" namespace re2c_test { static std::string f(const std::string &str, const std::string &stub, const char *arg, size_t val, bool allow_unnamed) { std::ostringstream os; os << str; re2c::argsubst(os, stub, arg, allow_unnamed, val); return os.str(); } } // namespace re2c_test int main() { assert(re2c_test::f("", "@@", "", 42, false) == ""); assert(re2c_test::f("@@, @@, @@{xyz}, @@{xy}, @@{xyzz}, @@@{xyz}", "@@", "xyz", 42, false) == "@@, @@, 42, @@{xy}, @@{xyzz}, @42"); assert(re2c_test::f("@@, @@, @@{xyz}, @@{xy}, @@{xyzz}, @@@{xyz}", "@@", "xyz", 42, true) == "42, 42, 42, 42{xy}, 42{xyzz}, 42@{xyz}"); assert(re2c_test::f("@@{", "@@", "xy", 42, false) == "@@{"); assert(re2c_test::f("@@{x", "@@", "xy", 42, false) == "@@{x"); assert(re2c_test::f("@@{xy", "@@", "xy", 42, false) == "@@{xy"); assert(re2c_test::f("@@{xyz", "@@", "xy", 42, false) == "@@{xyz"); assert(re2c_test::f("@@{xy@@}", "@@", "xy", 42, false) == "@@{xy@@}"); assert(re2c_test::f("@@{", "@@", "xy", 42, true) == "42{"); assert(re2c_test::f("@@{x", "@@", "xy", 42, true) == "42{x"); assert(re2c_test::f("@@{xy", "@@", "xy", 42, true) == "42{xy"); assert(re2c_test::f("@@{xyz", "@@", "xy", 42, true) == "42{xyz"); assert(re2c_test::f("@@{xy@@}", "@@", "xy", 42, true) == "42{xy42}"); assert(re2c_test::f("@@@@@", "@@", "", 42, true) == "4242@"); assert(re2c_test::f("@@{xyz}@@{xyz}@", "@@", "xyz", 42, true) == "4242@"); assert(re2c_test::f("@@@{xyz}@@{xyz}", "@@", "xyz", 42, true) == "42@{xyz}42"); assert(re2c_test::f("@@@{xyz}@@{xyz}", "@@", "xyz", 42, false) == "@4242"); return 0; }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en" ng-app="jpm"> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <link href="/releases/5.0.0/css/style.css" rel="stylesheet" /> <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script> <script src="/js/releases.js"></script> <!-- Begin Jekyll SEO tag v2.6.1 --> <title>-runkeep true false</title> <meta name="generator" content="Jekyll v3.8.5" /> <meta property="og:title" content="-runkeep true false" /> <meta property="og:locale" content="en_US" /> <script type="application/ld+json"> {"@type":"WebPage","headline":"-runkeep true false","url":"/releases/5.0.0/instructions/runkeep.html","@context":"https://schema.org"}</script> <!-- End Jekyll SEO tag --> </head> <body> <ul class="container12 menu-bar"> <li span=11><a class=menu-link href="/releases/5.0.0/"><img class=menu-logo src="/releases/5.0.0/img/bnd-80x40-white.png"></a> <a href="/releases/5.0.0/chapters/110-introduction.html">Intro </a><a href="/releases/5.0.0/chapters/800-headers.html">Headers </a><a href="/releases/5.0.0/chapters/825-instructions-ref.html">Instructions </a><a href="/releases/5.0.0/chapters/855-macros-ref.html">Macros </a><a href="/releases/5.0.0/chapters/400-commands.html">Commands </a><div class="releases"><button class="dropbtn">5.0.0</button><div class="dropdown-content"></div></div> <li class=menu-link span=1> <a href="https://github.com/bndtools/bnd" target="_"><img style="position:absolute;top:0;right:0;margin:0;padding:0;z-index:100" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png"></a> </ul> <ul class=container12> <li span=3> <div> <ul class="side-nav"> <li><a href="/releases/5.0.0/chapters/110-introduction.html">Introduction</a> <li><a href="/releases/5.0.0/chapters/120-install.html">How to install bnd</a> <li><a href="/releases/5.0.0/chapters/123-tour-workspace.html">Guided Tour</a> <li><a href="/releases/5.0.0/chapters/125-tour-features.html">Guided Tour Workspace & Projects</a> <li><a href="/releases/5.0.0/chapters/130-concepts.html">Concepts</a> <li><a href="/releases/5.0.0/chapters/140-best-practices.html">Best practices</a> <li><a href="/releases/5.0.0/chapters/150-build.html">Build</a> <li><a href="/releases/5.0.0/chapters/155-project-setup.html">Project Setup</a> <li><a href="/releases/5.0.0/chapters/160-jars.html">Generating JARs</a> <li><a href="/releases/5.0.0/chapters/170-versioning.html">Versioning</a> <li><a href="/releases/5.0.0/chapters/180-baselining.html">Baselining</a> <li><a href="/releases/5.0.0/chapters/200-components.html">Service Components</a> <li><a href="/releases/5.0.0/chapters/210-metatype.html">Metatype</a> <li><a href="/releases/5.0.0/chapters/220-contracts.html">Contracts</a> <li><a href="/releases/5.0.0/chapters/230-manifest-annotations.html">Bundle Annotations</a> <li><a href="/releases/5.0.0/chapters/235-accessor-properties.html">Accessor Properties</a> <li><a href="/releases/5.0.0/chapters/240-spi-annotations.html">SPI Annotations</a> <li><a href="/releases/5.0.0/chapters/250-resolving.html">Resolving Dependencies</a> <li><a href="/releases/5.0.0/chapters/300-launching.html">Launching</a> <li><a href="/releases/5.0.0/chapters/305-startlevels.html">Startlevels</a> <li><a href="/releases/5.0.0/chapters/310-testing.html">Testing</a> <li><a href="/releases/5.0.0/chapters/315-launchpad-testing.html">Testing with Launchpad</a> <li><a href="/releases/5.0.0/chapters/320-packaging.html">Packaging Applications</a> <li><a href="/releases/5.0.0/chapters/330-jpms.html">JPMS Libraries</a> <li><a href="/releases/5.0.0/chapters/390-wrapping.html">Wrapping Libraries to OSGi Bundles</a> <li><a href="/releases/5.0.0/chapters/395-generating-documentation.html">Generating Documentation</a> <li><a href="/releases/5.0.0/chapters/400-commands.html">Commands</a> <li><a href="/releases/5.0.0/chapters/600-developer.html">For Developers</a> <li><a href="/releases/5.0.0/chapters/650-windows.html">Tips for Windows users</a> <li><a href="/releases/5.0.0/chapters/700-tools.html">Tools bound to bnd</a> <li><a href="/releases/5.0.0/chapters/800-headers.html">Headers</a> <li><a href="/releases/5.0.0/chapters/820-instructions.html">Instruction Reference</a> <li><a href="/releases/5.0.0/chapters/825-instructions-ref.html">Instruction Index</a> <li><a href="/releases/5.0.0/chapters/850-macros.html">Macro Reference</a> <li><a href="/releases/5.0.0/chapters/855-macros-ref.html">Macro Index</a> <li><a href="/releases/5.0.0/chapters/870-plugins.html">Plugins</a> <li><a href="/releases/5.0.0/chapters/880-settings.html">Settings</a> <li><a href="/releases/5.0.0/chapters/900-errors.html">Errors</a> <li><a href="/releases/5.0.0/chapters/910-warnings.html">Warnings</a> <li><a href="/releases/5.0.0/chapters/920-faq.html">Frequently Asked Questions</a> </ul> </div> <li span=9> <div class=notes-margin> <h1> -runkeep true | false</h1> </div> </ul> <nav class=next-prev> <a href='/releases/5.0.0/instructions/runjdb.html'></a> <a href='/releases/5.0.0/instructions/runnoreferences.html'></a> </nav> <footer class="container12" style="border-top: 1px solid black;padding:10px 0"> <ul span=12 row> <li span=12> <ul> <li><a href="/releases/5.0.0/">GitHub</a> </ul> </ul> </footer> </body> </html>
{ "pile_set_name": "Github" }
{ "name": "amazon-cognito-identity-js", "description": "Amazon Cognito Identity Provider JavaScript SDK", "version": "4.4.0", "author": { "name": "Amazon Web Services", "email": "[email protected]", "url": "http://aws.amazon.com" }, "homepage": "http://aws.amazon.com/cognito", "contributors": [ "Simon Buchan with Skilitics", "Jonathan Goldwasser", "Matt Durant", "John Ferlito", "Michael Hart", "Tylor Steinberger", "Paul Watts", "Gleb Promokhov", "Min Bi", "Michael Labieniec", "Chetan Mehta <[email protected]>", "Ionut Trestian <[email protected]>" ], "repository": { "type": "git", "url": "https://github.com/aws-amplify/amplify-js.git" }, "license": "SEE LICENSE IN LICENSE.txt", "licenses": [ { "type": "Amazon Software License", "url": "http://aws.amazon.com/asl" } ], "keywords": [ "amazon", "aws", "cognito", "identity", "react-native", "reactnative" ], "scripts": { "clean": "rimraf lib es", "build:cjs": "cross-env BABEL_ENV=commonjs babel src --out-dir lib", "build:cjs:watch": "cross-env BABEL_ENV=commonjs babel src --out-dir lib --watch", "build:esm": "cross-env BABEL_ENV=es babel src --out-dir es", "build:esm:watch": "cross-env BABEL_ENV=es babel src --out-dir es --watch", "build:umd": "webpack", "build": "npm run clean && npm run build:cjs && npm run build:esm && npm run build:umd", "doc": "jsdoc src -d docs", "lint": "eslint src", "lint2": "eslint enhance-rn.js", "test": "jest -w 1 --passWithNoTests", "format": "echo \"Not implemented\"" }, "main": "lib/index.js", "react-native": { "lib/index.js": "./enhance-rn.js", "./src/StorageHelper": "./src/StorageHelper-rn.js" }, "module": "es/index.js", "jsnext:main": "es/index.js", "types": "./index.d.ts", "dependencies": { "buffer": "4.9.1", "crypto-js": "^3.3.0", "isomorphic-unfetch": "^3.0.0", "js-cookie": "^2.2.1" }, "devDependencies": { "@babel/cli": "^7.7.4", "@babel/core": "^7.7.4", "@babel/preset-env": "^7.7.4", "babel-loader": "^8.0.6", "cross-env": "^3.1.4", "eslint": "^3.19.0", "eslint-config-airbnb-base": "^5.0.2", "eslint-config-prettier": "^6.3.0", "eslint-import-resolver-webpack": "^0.5.1", "eslint-plugin-import": "^2.7.0", "eslint-plugin-node": "^5.2.0", "eslint-plugin-promise": "^3.6.0", "eslint-plugin-standard": "^3.0.1", "jsdoc": "^3.4.0", "react": "^16.0.0", "react-native": "^0.44.0", "rimraf": "^2.5.4", "webpack": "^3.5.5" }, "jest": { "globals": { "ts-jest": { "diagnostics": false, "tsConfig": { "lib": [ "es5", "es2015", "dom", "esnext.asynciterable", "es2017.object" ], "allowJs": true } } }, "transform": { "^.+\\.(js|jsx|ts|tsx)$": "ts-jest" }, "preset": "ts-jest", "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(tsx?|jsx?)$", "moduleFileExtensions": [ "ts", "tsx", "js", "json", "jsx" ], "testEnvironment": "jsdom", "testURL": "http://localhost/", "coverageThreshold": { "global": { "branches": 0, "functions": 0, "lines": 0, "statements": 0 } }, "coveragePathIgnorePatterns": [ "/node_modules/" ] } }
{ "pile_set_name": "Github" }
// t0072.cc // declmodifiers after type specifier word const static int x = 4; //ERROR(1): const const int q; // duplicate 'const' unsigned int r; // some more hairy examples long unsigned y; const unsigned volatile long static int z; long long LL; // support this because my libc headers use it.. // may as well get the literal notation too void foo() { LL = 12LL; LL = -1LL; } //ERROR(3): long float g; // malformed type // too many! //ERROR(4): long long long LLL; //ERROR(5): long long long long LLLL; //ERROR(6): long long long long long LLLL;
{ "pile_set_name": "Github" }
menuconfig CAN_CC770 tristate "Bosch CC770 and Intel AN82527 devices" depends on HAS_IOMEM if CAN_CC770 config CAN_CC770_ISA tristate "ISA Bus based legacy CC770 driver" ---help--- This driver adds legacy support for CC770 and AN82527 chips connected to the ISA bus using I/O port, memory mapped or indirect access. config CAN_CC770_PLATFORM tristate "Generic Platform Bus based CC770 driver" ---help--- This driver adds support for the CC770 and AN82527 chips connected to the "platform bus" (Linux abstraction for directly to the processor attached devices). endif
{ "pile_set_name": "Github" }
{ "copyright": "Varun Dey", "url": "https://varundey.me", "theme": "afterdark", "email": "[email protected]", "format": "html" }
{ "pile_set_name": "Github" }
/* * LP55XX Common Driver Header * * Copyright (C) 2012 Texas Instruments * * Author: Milo(Woogyom) Kim <[email protected]> * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * version 2 as published by the Free Software Foundation. * * Derived from leds-lp5521.c, leds-lp5523.c */ #ifndef _LEDS_LP55XX_COMMON_H #define _LEDS_LP55XX_COMMON_H enum lp55xx_engine_index { LP55XX_ENGINE_INVALID, LP55XX_ENGINE_1, LP55XX_ENGINE_2, LP55XX_ENGINE_3, LP55XX_ENGINE_MAX = LP55XX_ENGINE_3, }; enum lp55xx_engine_mode { LP55XX_ENGINE_DISABLED, LP55XX_ENGINE_LOAD, LP55XX_ENGINE_RUN, }; #define LP55XX_DEV_ATTR_RW(name, show, store) \ DEVICE_ATTR(name, S_IRUGO | S_IWUSR, show, store) #define LP55XX_DEV_ATTR_RO(name, show) \ DEVICE_ATTR(name, S_IRUGO, show, NULL) #define LP55XX_DEV_ATTR_WO(name, store) \ DEVICE_ATTR(name, S_IWUSR, NULL, store) #define show_mode(nr) \ static ssize_t show_engine##nr##_mode(struct device *dev, \ struct device_attribute *attr, \ char *buf) \ { \ return show_engine_mode(dev, attr, buf, nr); \ } #define store_mode(nr) \ static ssize_t store_engine##nr##_mode(struct device *dev, \ struct device_attribute *attr, \ const char *buf, size_t len) \ { \ return store_engine_mode(dev, attr, buf, len, nr); \ } #define show_leds(nr) \ static ssize_t show_engine##nr##_leds(struct device *dev, \ struct device_attribute *attr, \ char *buf) \ { \ return show_engine_leds(dev, attr, buf, nr); \ } #define store_leds(nr) \ static ssize_t store_engine##nr##_leds(struct device *dev, \ struct device_attribute *attr, \ const char *buf, size_t len) \ { \ return store_engine_leds(dev, attr, buf, len, nr); \ } #define store_load(nr) \ static ssize_t store_engine##nr##_load(struct device *dev, \ struct device_attribute *attr, \ const char *buf, size_t len) \ { \ return store_engine_load(dev, attr, buf, len, nr); \ } struct lp55xx_led; struct lp55xx_chip; /* * struct lp55xx_reg * @addr : Register address * @val : Register value */ struct lp55xx_reg { u8 addr; u8 val; }; /* * struct lp55xx_device_config * @reset : Chip specific reset command * @enable : Chip specific enable command * @max_channel : Maximum number of channels * @post_init_device : Chip specific initialization code * @brightness_fn : Brightness function * @set_led_current : LED current set function * @firmware_cb : Call function when the firmware is loaded * @run_engine : Run internal engine for pattern * @dev_attr_group : Device specific attributes */ struct lp55xx_device_config { const struct lp55xx_reg reset; const struct lp55xx_reg enable; const int max_channel; /* define if the device has specific initialization process */ int (*post_init_device) (struct lp55xx_chip *chip); /* access brightness register */ int (*brightness_fn)(struct lp55xx_led *led); /* current setting function */ void (*set_led_current) (struct lp55xx_led *led, u8 led_current); /* access program memory when the firmware is loaded */ void (*firmware_cb)(struct lp55xx_chip *chip); /* used for running firmware LED patterns */ void (*run_engine) (struct lp55xx_chip *chip, bool start); /* additional device specific attributes */ const struct attribute_group *dev_attr_group; }; /* * struct lp55xx_engine * @mode : Engine mode * @led_mux : Mux bits for LED selection. Only used in LP5523 */ struct lp55xx_engine { enum lp55xx_engine_mode mode; u16 led_mux; }; /* * struct lp55xx_chip * @cl : I2C communication for access registers * @pdata : Platform specific data * @lock : Lock for user-space interface * @num_leds : Number of registered LEDs * @cfg : Device specific configuration data * @engine_idx : Selected engine number * @engines : Engine structure for the device attribute R/W interface * @fw : Firmware data for running a LED pattern */ struct lp55xx_chip { struct i2c_client *cl; struct clk *clk; struct lp55xx_platform_data *pdata; struct mutex lock; /* lock for user-space interface */ int num_leds; struct lp55xx_device_config *cfg; enum lp55xx_engine_index engine_idx; struct lp55xx_engine engines[LP55XX_ENGINE_MAX]; const struct firmware *fw; }; /* * struct lp55xx_led * @chan_nr : Channel number * @cdev : LED class device * @led_current : Current setting at each led channel * @max_current : Maximun current at each led channel * @brightness : Brightness value * @chip : The lp55xx chip data */ struct lp55xx_led { int chan_nr; struct led_classdev cdev; u8 led_current; u8 max_current; u8 brightness; struct lp55xx_chip *chip; }; /* register access */ extern int lp55xx_write(struct lp55xx_chip *chip, u8 reg, u8 val); extern int lp55xx_read(struct lp55xx_chip *chip, u8 reg, u8 *val); extern int lp55xx_update_bits(struct lp55xx_chip *chip, u8 reg, u8 mask, u8 val); /* external clock detection */ extern bool lp55xx_is_extclk_used(struct lp55xx_chip *chip); /* common device init/deinit functions */ extern int lp55xx_init_device(struct lp55xx_chip *chip); extern void lp55xx_deinit_device(struct lp55xx_chip *chip); /* common LED class device functions */ extern int lp55xx_register_leds(struct lp55xx_led *led, struct lp55xx_chip *chip); extern void lp55xx_unregister_leds(struct lp55xx_led *led, struct lp55xx_chip *chip); /* common device attributes functions */ extern int lp55xx_register_sysfs(struct lp55xx_chip *chip); extern void lp55xx_unregister_sysfs(struct lp55xx_chip *chip); /* common device tree population function */ extern struct lp55xx_platform_data *lp55xx_of_populate_pdata(struct device *dev, struct device_node *np); #endif /* _LEDS_LP55XX_COMMON_H */
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>jsCalendar</title> <meta name="description" content="jsCalendar example"> <meta name="author" content="GramThanos"> <!-- jsCalendar --> <link rel="stylesheet" type="text/css" href="../source/jsCalendar.css"> <link rel="stylesheet" type="text/css" href="../themes/jsCalendar.micro.css"> <script type="text/javascript" src="../source/jsCalendar.js"></script> <script type="text/javascript" src="../extensions/jsCalendar.datepicker.js"></script> <style type="text/css"> #wrapper { position: absolute; top: 50px; left: 50%; width: 400px; line-height: 40px; margin-left: -200px; font-size: 20px; text-align: center; } #wrapper input { height: 30px; width: 150px; line-height: 30px; font-size: 16px; text-align: center; } </style> <!--[if lt IE 9]> <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script> <![endif]--> </head> <body> <div id="wrapper"> Date Pickers Examples<br> Example 1 : <input type="text" name="test-1" data-datepicker/> <br> Example 2 : <input type="text" name="test-2" value="05/01/2019" data-datepicker data-class="classic-theme meterial-theme"/> <br> Example 3 : <input type="text" name="test-3" data-datepicker data-min="01/01/2019" data-max="31/01/2019" data-date="05/01/2019" data-navigation="no" data-class="classic-theme micro-theme"/> <br> </div> </body> </html>
{ "pile_set_name": "Github" }
#N canvas 554 317 506 356 10; #X obj 214 233 outlet; #X text 40 248 If the argument is not equal to 0 \, use it. Pd init arguments to 0 so unused arguments will be 0; #X obj 63 116 select 0; #X text 39 285 This is useful to have internals inited \, but not reset if there is no argument specified.; #X obj 63 190 select 0; #X obj 63 169 float \$2; #X obj 63 96 float \$1; #X text 211 191 if 2nd arg \, then use as default value; #X obj 63 14 inlet; #X obj 211 138 purepd/purepd_error float_argument; #X obj 211 92 bang; #X obj 64 49 route bang float; #X msg 211 114 wrong data type on inlet; #X connect 2 0 5 0; #X connect 2 1 0 0; #X connect 4 1 0 0; #X connect 5 0 4 0; #X connect 6 0 2 0; #X connect 8 0 11 0; #X connect 10 0 12 0; #X connect 11 0 6 0; #X connect 11 1 0 0; #X connect 11 2 10 0; #X connect 12 0 9 0;
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html dir="rtl"> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title></title> <link rel="Stylesheet" href="../css/analysis.css" /> <script type="text/javascript"> function init() { if (window.location.hash) { var parentDiv, nodes, i, helpInfo, helpId, helpInfoArr, helpEnvFilter, envContent, hideEnvClass, hideNodes; helpInfo = window.location.hash.substring(1); if(helpInfo.indexOf("-")) { helpInfoArr = helpInfo.split("-"); helpId = helpInfoArr[0]; helpEnvFilter = helpInfoArr[1]; } else { helpId = helpInfo; } parentDiv = document.getElementById("topics"); nodes = parentDiv.children; hideEnvClass = (helpEnvFilter === "OnlineOnly"? "PortalOnly": "OnlineOnly"); if(document.getElementsByClassName) { hideNodes = document.getElementsByClassName(hideEnvClass); } else { hideNodes = document.querySelectorAll(hideEnvClass); } for(i=0; i < nodes.length; i++) { if(nodes[i].id !== helpId) { nodes[i].style.display ="none"; } } for(i=0; i < hideNodes.length; i++) { hideNodes[i].style.display ="none"; } } } </script> </head> <body onload="init()"> <div id="topics"> <div id="toolDescription" class="regularsize"> <h2>איתור מיקומים דומים</h2><p/> <h2><img src="../images/GUID-6262A84E-9087-4E48-930E-E9B89FECC836-web.png" alt="איתור מיקומים דומים"></h2> <hr/> <p>על בסיס קריטריונים שאתה מציין, הכלי 'איתור מיקומים דומים' מודד את מידת הדמיון של מיקומים בשכבת חיפוש המועמדים שלך למיקום ייחוס אחד או יותר. כלי זה יכול לענות על שאלות כאון <ul> <li>אילו מבין החנויות שלך דומות לחנויות עם מיטב הביצועים, מבחינת פרופילים של הלקוחות? </li> <li>על בסיס מאפיינים של כפרים שהכי הושפעו מהמחלה, אילו כפרים אחרים נמצאים בסיכון גבוה? </li> </ul> כדי לענות על שאלות כגון אלה, אתה מספק את מיקומי הייחוס, מיקומי חיפוש המועמדים והשדות שמייצגים את הקריטריונים להתאמה. שכבת הקלט הראשונה צריכה להכיל את מיקומי הייחוס או אמות המידה. לדוגמה, זו עשויה להיות שכבה שמכילה את החנויות עם הביצועים הטובים ביותר או הכפרים שהכי הושפעו מהמחלה. לאחר מכן, תציין את השכבה שמכילה את מיקומי חיפוש המועמדים. אלה עשויים להיות החנויות שלך או כל שאר הכפרים. לבסוף, תזהה שדה אחד או יותר שבהם יש להשתמש כדי למדוד דמיון. הכלי 'איתור מיקומים דומים' ידרג אז את כל מיקומי חיפוש המועמדים לפי מידת ההתאמה שלהם למיקומי הייחוס בכל השדות שבחרת. </p> </div> <!--Parameter divs for each param--> <div id="inputLayer"> <div><h2>בחר שכבה המכילה את מיקומי הייחוס</h2></div> <hr/> <div> <p>השכבה שמכילה את מיקומי הייחוס להתאמה. </p> <p>בנוסף לבחירת שכבה מהמפה שלך, באפשרותך לבחור באפשרות <b>בחר שכבת ניתוח</b> בתחתית הרשימה הנפתחת כדי לדפדף לתכנים שלך עבור סט נתוני שיתוף קובץ Big Data או שכבת ישויות. באפשרותך אופציונלית להחיל מסנן על שכבת הקלט או להחיל בחירה על שכבות מתארחות שנוספו למפה שלך. מסננים ובחירות מוחלים רק עבור ניתוח. </p> </div> </div> <div id="inputLayerSel"> <div><h2>אתה יכול להשתמש בכל המיקומים או לבצע בחירה</h2></div> <hr/> <div> <p>השתמש בלחץ הבחירה כדי לזהות את מיקומי הייחוס, במידת הצורך. אפשרות זו זמינה רק אם הישויות משורטטות על המפה (לא זמין עבור שיתוף קובץ Big Data). לדוגמה, אם שכבת הקלט מכילה את כל המיקומים - מיקומי הייחוס כמו גם מיקומי חיפוש המועמדים - תצטרך להשתמש באחת מכלי הבחירה כדי לזהות את מיקומי הייחוס. אם אתה יוצר שתי שכבות נפרדות, אחת עם מיקומי ייחוס והשנייה עם כל מיקומי חיפוש המועמדים, אינך צריך לבצע בחירה. </p> <p>אם יש יותר ממיקום ייחוס אחד, נוצר מיקום אחד על ידי חישוב ממוצע של הערכים עבור כל אחד מהשדות אשר משמשים לניתוח דמיון. </p> </div> </div> <div id="searchLayer"> <div><h2>חפש מיקומים דומים בתוך</h2></div> <hr/> <div> <p>מיקומי החיפוש המועמדים בשכבה זו ידורגו מהדומה ביותר לפחות דומה ביותר. </p> <p>בנוסף לבחירת שכבה מהמפה שלך, באפשרותך לבחור באפשרות <b>בחר שכבת ניתוח</b> בתחתית הרשימה הנפתחת כדי לדפדף לתכנים שלך עבור סט נתוני שיתוף קובץ Big Data או שכבת ישויות. באפשרותך אופציונלית להחיל מסנן על שכבת הקלט או להחיל בחירה על שכבות מתארחות שנוספו למפה שלך. מסננים ובחירות מוחלים רק עבור ניתוח. </p> </div> </div> <div id="analysisFields"> <div><h2>הדמיון מבוסס על</h2></div> <hr/> <div> <p>השדות שבחרת יהיו הקריטריון אשר משמש להערכת דמיון. לדוגמה, אם בחרת בשדות אוכלוסייה והכנסה, מיקומי החיפוש המועמדים עם הדירוג הנמוך (הטוב) ביותר יהיו עם ערכי אוכלוסייה והכנסה דומים למיקומי הייחוס. </p> </div> </div> <div id="matchMethod"> <div><h2>קבע את הכי הרבה והכי פחות דומים באמצעות</h2></div> <hr/> <div> <p>השיטה שתבחר תגדיר את אופן קביעת ההתאמות. <ul> <li>שיטת <b>ערכי שדות</b> משתמשת בהבדלים המרובעים של ערכים מתוקננים. זוהי ברירת המחדל. </li> <li>שיטת <b>פרופילי שדות</b> משתמשת בשיטות מתמטיות של cosine similarity כדי להשוות את הפרופיל של ערכים מתוקננים. כדי להשתמש בפרופילי מאפיינים יש להשתמש בשני שדות ניתוח לפחות. </li> </ul> </p> </div> </div> <div id="numberOfResults"> <div><h2>הצג בפני</h2></div> <hr/> <div> <p>באפשרותך לראות את כל מיקומי חיפוש המועמדים מדורגים מהדומה ביותר לפחות דומה ביותר, או לציין את מספר התוצאות שברצונך לראות. <ul> <li>אם תציין <b>כל המיקומים מהדומים ביותר ועד לשונים ביותר</b>, כל הישויות בשכבת חיפוש המועמדים ייכללו בסדר מדורג בשכבת התוצאה. יוחזרו לכל היותר 10,000 תוצאות. </li> <li>אם תציין <code>מספר של</code> <code>הכי הרבה, הכי פחות או הכי הרבה והכי פחות</code> <b>מיקומים דומים</b>, אתה קובע כמה מהמועמדים הדומים הכי הרבה, הכי פחות או הכי פחות והכי הרבה ייכללו בשכבת התוצאה. הערך המרבי המותר הוא 10,000. </li> </ul> </p> </div> </div> <div id="appendFields"> <div><h2>בחר את השדות אליהם יתווספו התוצאות</h2></div> <hr/> <div> <p>אופציונלית, הוסף שדות לנתונים משכבת החיפוש. כברירת מחדל, כל השדות יתווספו. </p> </div> </div> <div id="outputName"> <div><h2>שם שכבת התוצאה</h2></div> <hr/> <div> <p> השם של השכבה שתיווצר. אם אתה כותב ל- ArcGIS Data Store, התוצאות שלך יישמרו ב-<b>התוכן שלי</b> ויתווספו למפה. אם אתה כותב לקובץ שיתוף Big Data, התוצאות שלך יאוחסנו בקובץ השיתוף של Big Data ויתווספו למניפסט שלו. הם לא יתווספו למפה. שם ברירת המחדל מבוסס על שם הכלי ושם שכבת הקלט. אם השכבה כבר קיימת, הכלי ייכשל. </p> <p>שכבת תוצאה זו תכיל את מיקומי הייחוס ואת מספר ישויות חיפוש המועמדות המדורגות שציינת. אם שם שכבת התוצאה כבר קיים, תתבקש לספק שם אחר. </p> <p>בעת כתיב ל- ArcGIS Data Store (מאגר נתונים יחסים או מרחבי-זמני של Big Data) בעזרת התיבה הנפתחת <b>שמור תוצאה ב</b>, באפשרותך לציין את שם התיקייה ב- <b>התוכן שלי</b> שבה התוצאה תישמר. </p> </div> </div> </div> </html>
{ "pile_set_name": "Github" }
-Xplugin:. -Xplugin-require:rafter-before-1
{ "pile_set_name": "Github" }
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { AppSettingTreeItem } from "vscode-azureappservice"; import { IActionContext } from "vscode-azureextensionui"; import { ext } from "../../extensionVariables"; export async function toggleSlotSetting(context: IActionContext, node?: AppSettingTreeItem): Promise<void> { if (!node) { node = await ext.tree.showTreeItemPicker<AppSettingTreeItem>(AppSettingTreeItem.contextValue, context); } await node.toggleSlotSetting(); }
{ "pile_set_name": "Github" }
// Copyright 2018 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS-IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. import 'core-js/es/array'; import 'core-js/es/function'; import 'core-js/es/map'; import 'core-js/es/number'; import 'core-js/es/object'; import 'core-js/es/string'; import 'core-js/es/symbol'; import 'core-js/proposals/reflect-metadata'; import 'zone.js/dist/zone'; import 'rxjs'; import {platformBrowser} from '@angular/platform-browser'; import {AppModuleNgFactory} from './app.ngfactory'; platformBrowser().bootstrapModuleFactory(AppModuleNgFactory);
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2013 The Android Open Source Project Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" tools:context="com.example.android.bluetoothadvertisements.AdvertiserFragment"> <!-- Horizontal Divider --> <View android:layout_width="250dp" android:layout_height="1dp" android:layout_centerHorizontal="true" android:layout_alignParentTop="true" android:background="@android:color/darker_gray"/> <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_centerInParent="true" android:paddingTop="20dp" android:paddingBottom="20dp" > <TextView android:text="@string/broadcast_device" android:layout_width="wrap_content" android:layout_height="match_parent" android:minWidth="100dp" android:padding="5dp"/> <Switch android:id="@+id/advertise_switch" android:layout_width="wrap_content" android:layout_height="match_parent" android:switchMinWidth="80dp" /> </LinearLayout> </RelativeLayout>
{ "pile_set_name": "Github" }
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Environment.equivalent_environment' db.alter_column(u'physical_environment', 'equivalent_environment_id', self.gf( 'django.db.models.fields.related.ForeignKey')(to=orm['physical.Environment'], null=True, on_delete=models.SET_NULL)) # Changing field 'Instance.future_instance' db.alter_column(u'physical_instance', 'future_instance_id', self.gf( 'django.db.models.fields.related.ForeignKey')(to=orm['physical.Instance'], null=True, on_delete=models.SET_NULL)) # Changing field 'Host.future_host' db.alter_column(u'physical_host', 'future_host_id', self.gf('django.db.models.fields.related.ForeignKey')( to=orm['physical.Host'], null=True, on_delete=models.SET_NULL)) # Changing field 'Plan.equivalent_plan' db.alter_column(u'physical_plan', 'equivalent_plan_id', self.gf( 'django.db.models.fields.related.ForeignKey')(to=orm['physical.Plan'], null=True, on_delete=models.SET_NULL)) def backwards(self, orm): # Changing field 'Environment.equivalent_environment' db.alter_column(u'physical_environment', 'equivalent_environment_id', self.gf( 'django.db.models.fields.related.ForeignKey')(to=orm['physical.Environment'], null=True)) # Changing field 'Instance.future_instance' db.alter_column(u'physical_instance', 'future_instance_id', self.gf( 'django.db.models.fields.related.ForeignKey')(to=orm['physical.Instance'], null=True)) # Changing field 'Host.future_host' db.alter_column(u'physical_host', 'future_host_id', self.gf( 'django.db.models.fields.related.ForeignKey')(to=orm['physical.Host'], null=True)) # Changing field 'Plan.equivalent_plan' db.alter_column(u'physical_plan', 'equivalent_plan_id', self.gf( 'django.db.models.fields.related.ForeignKey')(to=orm['physical.Plan'], null=True)) models = { u'physical.databaseinfra': { 'Meta': {'object_name': 'DatabaseInfra'}, 'capacity': ('django.db.models.fields.PositiveIntegerField', [], {'default': '1'}), 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'endpoint': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 'endpoint_dns': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 'engine': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'databaseinfras'", 'on_delete': 'models.PROTECT', 'to': u"orm['physical.Engine']"}), 'environment': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'databaseinfras'", 'on_delete': 'models.PROTECT', 'to': u"orm['physical.Environment']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), 'password': ('django.db.models.fields.CharField', [], {'max_length': '406', 'blank': 'True'}), 'per_database_size_mbytes': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'plan': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'databaseinfras'", 'on_delete': 'models.PROTECT', 'to': u"orm['physical.Plan']"}), 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'user': ('django.db.models.fields.CharField', [], {'max_length': '100', 'blank': 'True'}) }, u'physical.engine': { 'Meta': {'unique_together': "((u'version', u'engine_type'),)", 'object_name': 'Engine'}, 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'engine_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'engines'", 'on_delete': 'models.PROTECT', 'to': u"orm['physical.EngineType']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'path': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}), 'template_name': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}), 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'user_data_script': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'version': ('django.db.models.fields.CharField', [], {'max_length': '100'}) }, u'physical.enginetype': { 'Meta': {'object_name': 'EngineType'}, 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) }, u'physical.environment': { 'Meta': {'object_name': 'Environment'}, 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'equivalent_environment': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['physical.Environment']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) }, u'physical.host': { 'Meta': {'object_name': 'Host'}, 'address': ('django.db.models.fields.CharField', [], {'max_length': '255'}), 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'future_host': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['physical.Host']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), 'hostname': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'monitor_url': ('django.db.models.fields.URLField', [], {'max_length': '500', 'null': 'True', 'blank': 'True'}), 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) }, u'physical.instance': { 'Meta': {'unique_together': "((u'address', u'port'),)", 'object_name': 'Instance'}, 'address': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'databaseinfra': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'instances'", 'to': u"orm['physical.DatabaseInfra']"}), 'dns': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'future_instance': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['physical.Instance']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), 'hostname': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['physical.Host']"}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'instance_type': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_arbiter': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'port': ('django.db.models.fields.IntegerField', [], {}), 'status': ('django.db.models.fields.IntegerField', [], {'default': '2'}), 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) }, u'physical.plan': { 'Meta': {'object_name': 'Plan'}, 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), 'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}), 'engine_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'plans'", 'to': u"orm['physical.EngineType']"}), 'environments': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['physical.Environment']", 'symmetrical': 'False'}), 'equivalent_plan': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['physical.Plan']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}), 'is_default': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'is_ha': ('django.db.models.fields.BooleanField', [], {'default': 'False'}), 'max_db_size': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '100'}), 'provider': ('django.db.models.fields.IntegerField', [], {'default': '0'}), 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}) }, u'physical.planattribute': { 'Meta': {'object_name': 'PlanAttribute'}, 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}), u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}), 'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}), 'plan': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "u'plan_attributes'", 'to': u"orm['physical.Plan']"}), 'updated_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}), 'value': ('django.db.models.fields.CharField', [], {'max_length': '200'}) } } complete_apps = ['physical']
{ "pile_set_name": "Github" }
-- View: public.testview_$%{}[]()&*^!@"'`\/# -- DROP VIEW public."testview_$%{}[]()&*^!@""'`\/#"; CREATE OR REPLACE VIEW public."testview_$%{}[]()&*^!@""'`\/#" WITH ( check_option=local ) AS SELECT test_view_table.col1 FROM test_view_table; ALTER TABLE public."testview_$%{}[]()&*^!@""'`\/#" OWNER TO enterprisedb; COMMENT ON VIEW public."testview_$%{}[]()&*^!@""'`\/#" IS 'Testcomment'; GRANT ALL ON TABLE public."testview_$%{}[]()&*^!@""'`\/#" TO enterprisedb;
{ "pile_set_name": "Github" }
AC3Db MATERIAL "ac3dmat1" rgb 1 1 1 amb 0.2 0.2 0.2 emis 0 0 0 spec 0.5 0.5 0.5 shi 10 trans 0 OBJECT world kids 1 OBJECT poly name "rect" loc 0 8 0 texture "tree2.rgb" numvert 8 -7.5 8 0 7.5 8 0 7.5 -8 0 -7.5 -8 0 3.27826e-07 8 7.5 -3.27826e-07 8 -7.5 -3.27826e-07 -8 -7.5 3.27826e-07 -8 7.5 numsurf 4 SURF 0x30 mat 0 refs 3 3 0 0 2 1 0 0 0 1 SURF 0x30 mat 0 refs 3 2 1 0 1 1 1 0 0 1 SURF 0x30 mat 0 refs 3 7 0 0 6 1 0 4 0 1 SURF 0x30 mat 0 refs 3 6 1 0 5 1 1 4 0 1 kids 0
{ "pile_set_name": "Github" }
using Microsoft.VisualStudio.TestTools.UnitTesting; using Moq; using SportsStore.Domain.Abstract; using SportsStore.Domain.Entities; using SportsStore.WebUI.Controllers; using System; using System.Collections.Generic; using System.Linq; using System.Web.Mvc; namespace SportsStore.UnitTests { [TestClass] public class AdminTests { [TestMethod] public void Index_Contains_All_Products() { // Arrange - create the mock repository Mock<IProductRepository> mock = new Mock<IProductRepository>(); mock.Setup(m => m.Products).Returns(new Product[] { new Product {ProductID = 1, Name = "P1"}, new Product {ProductID = 2, Name = "P2"}, new Product {ProductID = 3, Name = "P3"}, }); // Arrange - create a controller AdminController target = new AdminController(mock.Object); // Action Product[] result = ((IEnumerable<Product>)target.Index(). ViewData.Model).ToArray(); // Assert Assert.AreEqual(result.Length, 3); Assert.AreEqual("P1", result[0].Name); Assert.AreEqual("P2", result[1].Name); Assert.AreEqual("P3", result[2].Name); } [TestMethod] public void Can_Edit_Product() { // Arrange - create the mock repository Mock<IProductRepository> mock = new Mock<IProductRepository>(); mock.Setup(m => m.Products).Returns(new Product[] { new Product {ProductID = 1, Name = "P1"}, new Product {ProductID = 2, Name = "P2"}, new Product {ProductID = 3, Name = "P3"}, }); // Arrange - create the controller AdminController target = new AdminController(mock.Object); // Act Product p1 = target.Edit(1).ViewData.Model as Product; Product p2 = target.Edit(2).ViewData.Model as Product; Product p3 = target.Edit(3).ViewData.Model as Product; // Assert Assert.AreEqual(1, p1.ProductID); Assert.AreEqual(2, p2.ProductID); Assert.AreEqual(3, p3.ProductID); } [TestMethod] public void Cannot_Edit_Nonexistent_Product() { // Arrange - create the mock repository Mock<IProductRepository> mock = new Mock<IProductRepository>(); mock.Setup(m => m.Products).Returns(new Product[] { new Product {ProductID = 1, Name = "P1"}, new Product {ProductID = 2, Name = "P2"}, new Product {ProductID = 3, Name = "P3"}, }); // Arrange - create the controller AdminController target = new AdminController(mock.Object); // Act Product result = (Product)target.Edit(4).ViewData.Model; // Assert Assert.IsNull(result); } [TestMethod] public void Can_Save_Valid_Changes() { // Arrange - create mock repository Mock<IProductRepository> mock = new Mock<IProductRepository>(); // Arrange - create the controller AdminController target = new AdminController(mock.Object); // Arrange - create a product Product product = new Product { Name = "Test" }; // Act - try to save the product ActionResult result = target.Edit(product); // Assert - check that the repository was called mock.Verify(m => m.SaveProduct(product)); // Assert - check the method result type Assert.IsNotInstanceOfType(result, typeof(ViewResult)); } [TestMethod] public void Cannot_Save_Invalid_Changes() { // Arrange - create mock repository Mock<IProductRepository> mock = new Mock<IProductRepository>(); // Arrange - create the controller AdminController target = new AdminController(mock.Object); // Arrange - create a product Product product = new Product { Name = "Test" }; // Arrange - add an error to the model state target.ModelState.AddModelError("error", "error"); // Act - try to save the product ActionResult result = target.Edit(product); // Assert - check that the repository was not called mock.Verify(m => m.SaveProduct(It.IsAny<Product>()), Times.Never()); // Assert - check the method result type Assert.IsInstanceOfType(result, typeof(ViewResult)); } [TestMethod] public void Can_Delete_Valid_Products() { // Arrange - create a Product Product prod = new Product { ProductID = 2, Name = "Test" }; // Arrange - create the mock repository Mock<IProductRepository> mock = new Mock<IProductRepository>(); mock.Setup(m => m.Products).Returns(new Product[] { new Product {ProductID = 1, Name = "P1"}, prod, new Product {ProductID = 3, Name = "P3"}, }); // Arrange - create the controller AdminController target = new AdminController(mock.Object); // Act - delete the product target.Delete(prod.ProductID); // Assert - ensure that the repository delete method was // called with the correct Product mock.Verify(m => m.DeleteProduct(prod.ProductID)); } } }
{ "pile_set_name": "Github" }
# Загрузчик пользовательских настроек ## Загрузка глобальных переменных из внешнего файла Чтобы не зашивать в тесты все плавающие пользовательские переменные, такие как имена баз, строки подключения, логины, пароли и др., имеется возможность забирать эти переменные из внешнего файла или внешнего key-value хранилища по http протоколу (поддерживается `Consul`). Это может быть особенно полезно, когда над фичами работает команда, и у каждого участника существуют свои настройки подключения к базам. Чтобы воспользоваться этой функциональностью для файлового режима, нужно выполнить следующее: 1. В своем каталоге проекта создать файл `user_settings.json` следующего формата: ```json { "userSettings": [ { "user": "USERNAME_1", "settings": { "ИМЯ_ПЕРЕМЕННОЙ_1": "ЗНАЧЕНИЕ_ПЕРЕМЕННОЙ_1", "ИМЯ_ПЕРЕМЕННОЙ_2": "ЗНАЧЕНИЕ_ПЕРЕМЕННОЙ_2", } }, { "user": "USERNAME_2", "settings": { "ИМЯ_ПЕРЕМЕННОЙ_1": "ЗНАЧЕНИЕ_ПЕРЕМЕННОЙ_1", "ИМЯ_ПЕРЕМЕННОЙ_2": "ЗНАЧЕНИЕ_ПЕРЕМЕННОЙ_2", } } ] } ``` 2. В свойства user поставить доменное (локальное) имя пользователя, для которого должны применяться настройки. Именно по этому свойству будет определяться, какие пользовательские настройки нужно загружать. 3. В свойстве settings прописать конкретные настройки для каждого пользователя. Состав настроек необязательно должен совпадать между пользователями, для какого-то пользователя настройки могут отсутствовать. 4. Открыть обработку `bddRunner` из корня `Vanessa.ADD` - файл `user_settings.json` подтянется автоматически из каталога, в котором находится `Vanessa.ADD` (поле `Каталог инструментов` на вкладке `Сервис`). Если такого файла нет, то загрузка не выполняется. Имеется возможность указать свой каталог загрузки настроек, он подчиняется свойству `Каталог проекта` на вкладке `Сервис`. Если файл найден, то на основании текущего имени пользователя компьютера или домена (которое определяется через WShell скрипт), ищутся настройки текущего пользователя и загружаются только они. Если настройки не найдены, то выводится предупреждающее сообщение. Чтобы воспользоваться этой функциональностью для `Consul`-a нужно: 1. Развернуть единый сервер консула и установить агентов консула на каждой машине, на которой запускается `Vanessa.ADD`. 2. На вкладке `Сервис` в `Vanessa.ADD` указать `Поставщик пользовательских настроек` равным `CONSUL`, а в поле `Адрес пользовательских настроек` указать полный url к настройкам на сервере. Url должен содержать путь, доступный через REST интерфейс консула, например http://127.0.0.1:8500/v1/kv/ivanov
{ "pile_set_name": "Github" }
# Testbed Once you have conquered the HelloWorld example, you should start looking at Box2D's testbed. The testbed is a testing framework and demo environment. Here are some of the features: - Camera with pan and zoom. - Mouse picking of shapes attached to dynamic bodies. - Extensible set of tests. - GUI for selecting tests, parameter tuning, and debug drawing options. - Pause and single step simulation. - Text rendering. ![Box2D Testbed](images/testbed.png) The testbed has many examples of Box2D usage in the test cases and the framework itself. I encourage you to explore and tinker with the testbed as you learn Box2D. Note: the testbed is written using [GLFW](https://www.glfw.org) and [imgui](https://github.com/ocornut/imgui). The testbed is not part of the Box2D library. The Box2D library is agnostic about rendering. As shown by the HelloWorld example, you don't need a renderer to use Box2D.
{ "pile_set_name": "Github" }
// !$*UTF8*$! { archiveVersion = 1; classes = { }; objectVersion = 46; objects = { /* Begin PBXBuildFile section */ 7746DB681DEEF1AC00C651DC /* ModelsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7746DB671DEEF1AC00C651DC /* ModelsTableViewController.m */; }; 7746DB7A1DEF32F600C651DC /* AnimationsTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7746DB791DEF32F600C651DC /* AnimationsTableViewController.m */; }; 7746DB821DEF3C2000C651DC /* navbar-bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 7746DB811DEF3C2000C651DC /* navbar-bg.png */; }; 77CDAB3F1DD7421500B7E342 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 77CDAB3E1DD7421500B7E342 /* main.m */; }; 77CDAB421DD7421500B7E342 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 77CDAB411DD7421500B7E342 /* AppDelegate.m */; }; 77CDAB441DD7421500B7E342 /* art.scnassets in Resources */ = {isa = PBXBuildFile; fileRef = 77CDAB431DD7421500B7E342 /* art.scnassets */; }; 77CDAB471DD7421500B7E342 /* GameViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77CDAB461DD7421500B7E342 /* GameViewController.m */; }; 77CDAB4A1DD7421500B7E342 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 77CDAB481DD7421500B7E342 /* Main.storyboard */; }; 77CDAB4C1DD7421500B7E342 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 77CDAB4B1DD7421500B7E342 /* Assets.xcassets */; }; 77CDAB4F1DD7421600B7E342 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 77CDAB4D1DD7421600B7E342 /* LaunchScreen.storyboard */; }; E832A3ED20E9048B001E7597 /* AssimpKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E832A3DA20E902B9001E7597 /* AssimpKit.framework */; }; E832A3EE20E904A3001E7597 /* AssimpKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = E832A3DA20E902B9001E7597 /* AssimpKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ 7746DB2B1DEEB7AC00C651DC /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 10; files = ( E832A3EE20E904A3001E7597 /* AssimpKit.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ 7746DB661DEEF1AC00C651DC /* ModelsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModelsTableViewController.h; sourceTree = "<group>"; }; 7746DB671DEEF1AC00C651DC /* ModelsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModelsTableViewController.m; sourceTree = "<group>"; }; 7746DB781DEF32F600C651DC /* AnimationsTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AnimationsTableViewController.h; sourceTree = "<group>"; }; 7746DB791DEF32F600C651DC /* AnimationsTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AnimationsTableViewController.m; sourceTree = "<group>"; }; 7746DB811DEF3C2000C651DC /* navbar-bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "navbar-bg.png"; sourceTree = "<group>"; }; 77CDAB3A1DD7421500B7E342 /* iOS-Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS-Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 77CDAB3E1DD7421500B7E342 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; }; 77CDAB401DD7421500B7E342 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; 77CDAB411DD7421500B7E342 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; 77CDAB431DD7421500B7E342 /* art.scnassets */ = {isa = PBXFileReference; lastKnownFileType = wrapper.scnassets; path = art.scnassets; sourceTree = "<group>"; }; 77CDAB451DD7421500B7E342 /* GameViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GameViewController.h; sourceTree = "<group>"; }; 77CDAB461DD7421500B7E342 /* GameViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GameViewController.m; sourceTree = "<group>"; }; 77CDAB491DD7421500B7E342 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; }; 77CDAB4B1DD7421500B7E342 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; 77CDAB4E1DD7421600B7E342 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; 77CDAB501DD7421600B7E342 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; E832A3DA20E902B9001E7597 /* AssimpKit.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = AssimpKit.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ 77CDAB371DD7421500B7E342 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( E832A3ED20E9048B001E7597 /* AssimpKit.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ 77CDAB311DD7421500B7E342 = { isa = PBXGroup; children = ( 77CDAB3C1DD7421500B7E342 /* iOS-Example */, 77CDAB3B1DD7421500B7E342 /* Products */, 77CDAB6F1DD743B100B7E342 /* Frameworks */, ); sourceTree = "<group>"; }; 77CDAB3B1DD7421500B7E342 /* Products */ = { isa = PBXGroup; children = ( 77CDAB3A1DD7421500B7E342 /* iOS-Example.app */, ); name = Products; sourceTree = "<group>"; }; 77CDAB3C1DD7421500B7E342 /* iOS-Example */ = { isa = PBXGroup; children = ( 77CDAB401DD7421500B7E342 /* AppDelegate.h */, 77CDAB411DD7421500B7E342 /* AppDelegate.m */, 77CDAB431DD7421500B7E342 /* art.scnassets */, 77CDAB451DD7421500B7E342 /* GameViewController.h */, 77CDAB461DD7421500B7E342 /* GameViewController.m */, 77CDAB481DD7421500B7E342 /* Main.storyboard */, 77CDAB4B1DD7421500B7E342 /* Assets.xcassets */, 77CDAB4D1DD7421600B7E342 /* LaunchScreen.storyboard */, 77CDAB501DD7421600B7E342 /* Info.plist */, 77CDAB3D1DD7421500B7E342 /* Supporting Files */, 7746DB661DEEF1AC00C651DC /* ModelsTableViewController.h */, 7746DB671DEEF1AC00C651DC /* ModelsTableViewController.m */, 7746DB781DEF32F600C651DC /* AnimationsTableViewController.h */, 7746DB791DEF32F600C651DC /* AnimationsTableViewController.m */, ); path = "iOS-Example"; sourceTree = "<group>"; }; 77CDAB3D1DD7421500B7E342 /* Supporting Files */ = { isa = PBXGroup; children = ( 7746DB811DEF3C2000C651DC /* navbar-bg.png */, 77CDAB3E1DD7421500B7E342 /* main.m */, ); name = "Supporting Files"; sourceTree = "<group>"; }; 77CDAB6F1DD743B100B7E342 /* Frameworks */ = { isa = PBXGroup; children = ( E832A3DA20E902B9001E7597 /* AssimpKit.framework */, ); name = Frameworks; sourceTree = "<group>"; }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ 77CDAB391DD7421500B7E342 /* iOS-Example */ = { isa = PBXNativeTarget; buildConfigurationList = 77CDAB531DD7421600B7E342 /* Build configuration list for PBXNativeTarget "iOS-Example" */; buildPhases = ( 77CDAB361DD7421500B7E342 /* Sources */, 77CDAB371DD7421500B7E342 /* Frameworks */, 77CDAB381DD7421500B7E342 /* Resources */, 7746DB2B1DEEB7AC00C651DC /* Embed Frameworks */, ); buildRules = ( ); dependencies = ( ); name = "iOS-Example"; productName = "iOS-Example"; productReference = 77CDAB3A1DD7421500B7E342 /* iOS-Example.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ 77CDAB321DD7421500B7E342 /* Project object */ = { isa = PBXProject; attributes = { LastUpgradeCheck = 0810; ORGANIZATIONNAME = "Ison Apps"; TargetAttributes = { 77CDAB391DD7421500B7E342 = { CreatedOnToolsVersion = 8.1; DevelopmentTeam = KQ5UPYJA8A; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = 77CDAB351DD7421500B7E342 /* Build configuration list for PBXProject "iOS-Example" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, Base, ); mainGroup = 77CDAB311DD7421500B7E342; productRefGroup = 77CDAB3B1DD7421500B7E342 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( 77CDAB391DD7421500B7E342 /* iOS-Example */, ); }; /* End PBXProject section */ /* Begin PBXResourcesBuildPhase section */ 77CDAB381DD7421500B7E342 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( 77CDAB441DD7421500B7E342 /* art.scnassets in Resources */, 77CDAB4F1DD7421600B7E342 /* LaunchScreen.storyboard in Resources */, 77CDAB4C1DD7421500B7E342 /* Assets.xcassets in Resources */, 7746DB821DEF3C2000C651DC /* navbar-bg.png in Resources */, 77CDAB4A1DD7421500B7E342 /* Main.storyboard in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ 77CDAB361DD7421500B7E342 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( 77CDAB421DD7421500B7E342 /* AppDelegate.m in Sources */, 7746DB681DEEF1AC00C651DC /* ModelsTableViewController.m in Sources */, 77CDAB471DD7421500B7E342 /* GameViewController.m in Sources */, 7746DB7A1DEF32F600C651DC /* AnimationsTableViewController.m in Sources */, 77CDAB3F1DD7421500B7E342 /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXVariantGroup section */ 77CDAB481DD7421500B7E342 /* Main.storyboard */ = { isa = PBXVariantGroup; children = ( 77CDAB491DD7421500B7E342 /* Base */, ); name = Main.storyboard; sourceTree = "<group>"; }; 77CDAB4D1DD7421600B7E342 /* LaunchScreen.storyboard */ = { isa = PBXVariantGroup; children = ( 77CDAB4E1DD7421600B7E342 /* Base */, ); name = LaunchScreen.storyboard; sourceTree = "<group>"; }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ 77CDAB511DD7421600B7E342 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD)"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = YES; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALID_ARCHS = arm64; }; name = Debug; }; 77CDAB521DD7421600B7E342 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD)"; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_SUSPICIOUS_MOVES = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 10.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VALID_ARCHS = arm64; }; name = Release; }; 77CDAB541DD7421600B7E342 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = KQ5UPYJA8A; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ""; INFOPLIST_FILE = "iOS-Example/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ""; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.isonapps.iOSExample; PRODUCT_NAME = "$(TARGET_NAME)"; USER_HEADER_SEARCH_PATHS = ""; }; name = Debug; }; 77CDAB551DD7421600B7E342 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = KQ5UPYJA8A; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ""; INFOPLIST_FILE = "iOS-Example/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 10.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; LIBRARY_SEARCH_PATHS = ""; OTHER_LDFLAGS = ""; PRODUCT_BUNDLE_IDENTIFIER = com.isonapps.iOSExample; PRODUCT_NAME = "$(TARGET_NAME)"; USER_HEADER_SEARCH_PATHS = ""; }; name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ 77CDAB351DD7421500B7E342 /* Build configuration list for PBXProject "iOS-Example" */ = { isa = XCConfigurationList; buildConfigurations = ( 77CDAB511DD7421600B7E342 /* Debug */, 77CDAB521DD7421600B7E342 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; 77CDAB531DD7421600B7E342 /* Build configuration list for PBXNativeTarget "iOS-Example" */ = { isa = XCConfigurationList; buildConfigurations = ( 77CDAB541DD7421600B7E342 /* Debug */, 77CDAB551DD7421600B7E342 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; rootObject = 77CDAB321DD7421500B7E342 /* Project object */; }
{ "pile_set_name": "Github" }
Subject: miningnews . net newsletter - friday , january 23 , 2004 friday , january 23 , 2004 miningnews . net to allow you to read the stories below , we have arranged a complimentary one month subscription for you . to accept , click here to visit our extended service at www . miningnews . net . alternatively , just click any of the stories below . should you wish to discontinue this service , you may click here to cancel your subscription , or email subscriptions @ miningnews . net . have some news of your own ? send your press releases , product news or conference details to submissions @ miningnews . net . straits to partially hedge whim creek output straits resource says it will look to hedge some of the copper due to be produced at its yet - to - be developed whim creek project at prices above $ 1 . 50 a pound . . . ( 23 january 2004 ) full story strong quarter for equigold seasoned gold producer equigold has delivered shareholders another good quarter at its australian operations , topped off by some strongly mineralised drill intersections at its bonikro project in cote d ivoire including 22 m grading 14 . 86 gpt from 95 m depth . . . ( 23 january 2004 ) full story sipa steps up exploration efforts sipa resources international produced 22 , 178 ounces of gold at cash costs of $ 367 / oz last quarter at its mt olympus project , and says it will know by the end of the month whether processing of a further 105 , 000 oz is viable . . . ( 23 january 2004 ) full story breakaway weighs eloise options breakaway resources has told the australian stock exchange it is considering various options for the troubled eloise copper mine in queensland , including a partial or full disposal of the asset . . . ( 23 january 2004 ) full story iron ore price rise to slug japanese steel makers us $ 5 - 6 bn higher commodity prices , especially for iron ore , will cost japan ' s steel industry between us $ 4 . 7 billion and us $ 5 . 6 billion next financial year . . . ( 23 january 2004 ) full story norilsk warns against high platinum prices higher world platinum prices could jeopardise the future of the metal , according to a senior executive from russia ' s leading producer of the platinum , norilsk nickel . . . ( 23 january 2004 ) full story sa not doing enough for black business : report white - controlled organisations , including mining companies , doing business in south africa have been served another warning that they will need to hand over more control to the black majority . . . ( 23 january 2004 ) full story mali gold output down 21 % gold production in mali , the third biggest source of gold in africa , fell by 21 % in 2003 , according to the latest government figures . . . ( 23 january 2004 ) full story us court backs epa on red dog mine teck cominco has suffered another defeat at the hands of us environmental regulators , this time over the type of diesel - power generator at its red dog zinc mine in alaska . . . ( 23 january 2004 ) full story medusa options king , queen projects medusa mining said it has signed options to purchase the king and queen copper - silver - gold projects near queenstown in tasmania . . . ( 23 january 2004 ) full story tahmoor progresses despite gas issues gas issues at austral coal ' s tahmoor colliery impacted longwall and development operations this quarter , but the mine managed to remain on schedule for the commencement of the tahmoor north longwall panel . . . ( 23 january 2004 ) full story tracking mining health the queensland government mines inspectorate is in the process of redefining its role in relation to the health of mine workers with a proposal on the table to introduce a revamped health surveillance scheme . brian lyne , chief inspector of coal mines with the queensland mines inspectorate , believes the new system will contribute to a step change in safety performance in the mining industry . . . ( 23 january 2004 ) full story xstrata copper management shake - up xstrata copper chief executive charlie sartain last week announced a management reshuffle following the merger of the london - listed group ' s australian and south american copper businesses into a single unit . . . ( 23 january 2004 ) full story argosy recovers namaqualand diamonds perth - based junior argosy minerals says it has recovered diamonds from eight out of nine drill holes in the megalodon channel on its albetros project in namaqualand , south africa . . . ( 22 january 2004 ) full story tritton holds out for higher prices tritton resources is holding off hedging any of its future copper production in the belief that there ' s plenty more upside in the red metal . . . ( 22 january 2004 ) full story phelps upgrade reflects better prices , fundamentals standard & poor ' s has revised its outlook for phelps dodge to stable from negative to reflect improvements in copper prices and industry fundamentals . . . ( 22 january 2004 ) full story alcoa , anglo to publish greenhouse emissions data some of the world ' s biggest miners , including alcoa and anglo american , are to publish their greenhouse gas emissions on a new website that will begin operating thursday . . . ( 22 january 2004 ) full story caterpillar continues chinese has reached a further beachhead in its march into the key market of china , producing its 10 , 000 th hydraulic excavator in the country . . . . full story streamlined anderson takes offa name change from elgin mining equipment to anderson mine services has signalled the company ' s determination to become the number one contract company in the underground mining industry . . . . miningnews . net ' s e - newsletter uses an html - rich media format to provide a visually attractive layout . if , for any reason , your computer does not support html format e - mail , please let us know by emailing contact @ miningnews . net with your full name and e - mail address , and we will ensure you receive our e - newsletter in a plain - text format . if you have forgotten your password , please contact helpdesk @ miningnews . net . have some news of your own ? send your press releases , product news or conference details to submissions @ miningnews . net . aspermont limited ( abn 66 000 375 048 ) postal address po box 78 , leederville , wa australia 6902 head office tel + 61 8 9489 9100 head office fax + 61 8 9381 1848 e - mail contact @ aspermont . com website www . aspermont . com section dryblower investment news mine safety and health & environment mine supply today analyst tips capital raisings commodities director trades due diligence exploration general ipos market wrap mining events moves mst features on the move on the record people in profil project watch resourcestocks the big picture week in review commodity coal copper diamonds gold nickel silver zinc bauxite - alum chromium cobalt gemstone iron ore kaolin magnesium manganese mineral sand oilshale pgm rare earths salt tantalum tin tungsten uranium vanadium region africa all regions asia australia europe north americ oceania south americ
{ "pile_set_name": "Github" }
--- Description: Programming DirectX with COM. title: Programming DirectX with COM ms.topic: article ms.date: 01/29/2019 --- # Programming DirectX with COM The Microsoft Component Object Model (COM) is an object-oriented programming model used by several technologies, including the bulk of the DirectX API surface. For that reason, you (as a DirectX developer) inevitably use COM when you program DirectX. > [!NOTE] > The topic [Consume COM components with C++/WinRT](/windows/uwp/cpp-and-winrt-apis/consume-com) shows how to consume DirectX APIs (and any COM API, for that matter) by using [C++/WinRT](/windows/uwp/cpp-and-winrt-apis/). That's by far the most convenient and recommended technology to use. Alternatively, you can use raw COM, and that's what this topic is about. You'll need a basic understanding of the principles and programming techniques involved in consuming COM APIs. Although COM has a reputation for being difficult and complex, the COM programming required by most DirectX applications is straightforward. In part, this is because you'll be consuming the COM objects provided by DirectX. There's no need for you to author your own COM objects, which is typically where the complexity arises. ## COM component overview A COM object is essentially an encapsulated component of functionality that can be used by applications to perform one or more tasks. For deployment, one or more COM components are packaged into a binary called a COM server; more often than not a DLL. A traditional DLL exports free functions. A COM server can do the same. But the COM components inside the COM server expose COM interfaces and member methods belonging to those interfaces. Your application creates instances of COM components, retrieves interfaces from them, and calls methods on those interfaces in order to benefit from the features implemented in the COM components. In practice, this feels similar to calling methods on a regular C++ object. But there are some differences. - A COM object enforces stricter encapsulation than a C++ object does. You can't just create the object, and then call any public method. Instead, a COM component's public methods are grouped into one or more COM interfaces. To call a method, you create the object and retrieve from the object the interface that implements the method. An interface typically implements a related set of methods that provide access to a particular feature of the object. For example, the [**ID3D12Device**](/windows/desktop/api/d3d12/nn-d3d12-id3d12device) interface represents a virtual graphics adapter, and it contains methods that enable you create resources, for example, and many other adapter-related tasks. - A COM object is not created in the same way as a C++ object. There are several ways to create a COM object, but all involve COM-specific techniques. The DirectX API includes a variety of helper functions and methods that simplify creating most of the DirectX COM objects. - You must use COM-specific techniques to control the lifetime of a COM object. - The COM server (typically a DLL) doesn't need to be explicitly loaded. Nor do you link to a static library in order to use a COM component. Each COM component has a unique registered identifier (a globally-unique identifier, or GUID), which your application uses to identify the COM object. Your application identifies the component, and the COM runtime automatically loads the correct COM server DLL. - COM is a binary specification. COM objects can be written in and accessed from a variety of languages. You don't need to know anything about the object's source code. For example, Visual Basic applications routinely use COM objects that were written in C++. ## Component, object, and interface It's important to understand the distinction between components, objects, and interfaces. In casual usage, you may hear a component or object referred to by the name of its principal interface. But the terms are not interchangeable. A component can implement any number of interfaces; and an object is an instance of a component. For example, while all components must implement the [**IUnknown interface**](/windows/desktop/api/unknwn/nn-unknwn-iunknown), they normally implement at least one additional interface, and they might implement many. To use a particular interface method, you must not only instantiate an object, you must also obtain the correct interface from it. In addition, more than one component might implement the same interface. An interface is a group of methods that perform a logically-related set of operations. The interface definition specifies only the syntax of the methods and their general functionality. Any COM component that needs to support a particular set of operations can do so by implementing a suitable interface. Some interfaces are highly specialized, and are implemented only by a single component; others are useful in a variety of circumstances, and are implemented by many components. If a component implements an interface, it must support every method in the interface definition. In other words, you must be able to call any method and be confident that it exists. However, the details of how a particular method is implemented may vary from one component to another. For example, different components may use different algorithms to arrive at the final result. There is also no guarantee that a method will be supported in a nontrivial way. Sometimes, a component implements a commonly-used interface, but it needs to support only a subset of the methods. You will still be able to call the remaining methods successfully, but they will return an [**HRESULT**](#hresult-values) (which is a standard COM type representing a result code) containing the value **E_NOTIMPL**. You should refer to its documentation to see how an interface is implemented by any particular component. The COM standard requires that an interface definition must not change once it has been published. The author cannot, for example, add a new method to an existing interface. The author must instead create a new interface. While there are no restrictions on what methods must be in that interface, a common practice is to have the next-generation interface include all the of the old interface's methods, plus any new methods. It's not unusual for an interface to have several generations. Typically, all generations perform essentially the same overall task, but they're different in specifics. Often, a COM component implements every current and prior generation of a given interface's lineage. Doing so allows older applications to continue using the object's older interfaces, while newer applications can take advantage of the features of the newer interfaces. Typically, a descent group of interfaces all have the same name, plus an integer that indicates the generation. For example, if the original interface were named **IMyInterface** (implying generation 1), then the next two generations would be called **IMyInterface2** and **IMyInterface3**. In the case of DirectX interfaces, successive generations are typically named for the version number of DirectX. ## GUIDs GUIDs are a key part of the COM programming model. At its most basic, a GUID is a 128-bit structure. However, GUIDs are created in such a way as to guarantee that no two GUIDs are the same. COM uses GUIDs extensively for two primary purposes. - To uniquely identify a particular COM component. A GUID that is assigned to identify a COM component is called a class identifier (CLSID), and you use a CLSID when you want to create an instance of the associated COM component. - To uniquely identify a particular COM interface. A GUID that is assigned to identify a COM interface is called an interface identifier (IID), and you use an IID when you request a particular interface from an instance of a component (an object). An interface's IID will be the same, regardless of which component implements the interface. For convenience, the DirectX documentation normally refers to components and interfaces by their descriptive names (for example, **ID3D12Device**) rather than by their GUIDs. Within the context of the DirectX documentation, there is no ambiguity. It's technically possible for a third-party to author an interface with the descriptive name **ID3D12Device** (it would need to have a different IID in order to be valid). In the interest of clarity, though, we don't recommend that. So, the only unambiguous way to refer to a particular object or interface is by its GUID. Although a GUID is a structure, a GUID is often expressed in equivalent string form. The general format of the string form of a GUID is 32 hexadecimal digits, in the format 8-4-4-4-12. That is, {xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx}, where each x corresponds to a hexadecimal digit. For example, the string form of the IID for the **ID3D12Device** interface is {189819F1-1DB6-4B57-BE54-1821339B85F7}. Because the actual GUID is somewhat clumsy to use and easy to mistype, an equivalent name is usually provided as well. In your code, you can use this name instead of the actual structure when you call functions, for example when you pass an argument for the `riid` parameter to [**D3D12CreateDevice**](/windows/desktop/api/d3d12/nf-d3d12-d3d12createdevice). The customary naming convention is to prepend either IID_ or CLSID_ to the descriptive name of the interface or object, respectively. For example, the name of the **ID3D12Device** interface's IID is IID_ID3D12Device. > [!NOTE] > DirectX applications should link with ``dxguid.lib`` and ``uuid.lib`` to provide definitions for the various interface and class GUIDs. Visual C++ and other compilers support the **__uuidof** operator language extension, but explicit C-style linkage with these link libraries is also supported and fully portable. ## HRESULT values Most COM methods return a 32-bit integer called an **HRESULT**. With most methods, the HRESULT is essentially a structure that contains two primary pieces of information. - Whether the method succeeded or failed. - More detailed information about the outcome of the operation performed by the method. Some methods return a **HRESULT** value from the standard set defined in `Winerror.h`. However, a method is free to return a custom **HRESULT** value with more specialized information. These values are normally documented on the method's reference page. The list of **HRESULT** values that you find on a method's reference page is often only a subset of the possible values that may be returned. The list typically covers only those values that are specific to the method, as well as those standard values that have some method-specific meaning. You should assume that a method may return a variety of standard **HRESULT** values, even if they're not explicitly documented. While **HRESULT** values are often used to return error information, you should not think of them as error codes. The fact that the bit that indicates success or failure is stored separately from the bits that contain the detailed information allows **HRESULT** values to have any number of success and failure codes. By convention, the names of success codes are prefixed by S_ and failure codes by E_. For example, the two most commonly used codes are S_OK and E_FAIL, which indicate simple success or failure, respectively. The fact that COM methods may return a variety of success or failure codes means that you have to be careful how you test the **HRESULT** value. For example, consider a hypothetical method with documented return values of S_OK if successful and E_FAIL if not. However, remember that the method may also return other failure or success codes. The following code fragment illustrates the danger of using a simple test, where `hr` contains the **HRESULT** value returned by the method. ```cpp if (hr == E_FAIL) { // Handle the failure case. } else { // Handle the success case. } ``` As long as, in the failure case, this method only ever return E_FAIL (and not some other failure code), then this test works. However, it's more realistic that a given method is implemented to return a set of specific failure codes, perhaps E_NOTIMPL or E_INVALIDARG. With the code above, those values would be incorrectly interpreted as a success. If you need detailed information about the outcome of the method call, you need to test each relevant **HRESULT** value. However, you may be interested only in whether the method succeeded or failed. A robust way to test whether an **HRESULT** value indicates success or failure is to pass the value to the one of the following macros, defined in Winerror.h. - The `SUCCEEDED` macro returns TRUE for a success code, and FALSE for a failure code. - The `FAILED` macro returns TRUE for a failure code, and FALSE for a success code. So, you can fix the preceding code fragment by using the `FAILED` macro, as shown in the following code. ```cpp if (FAILED(hr)) { // Handle the failure case. } else { // Handle the success case. } ``` This corrected code fragment properly treats E_NOTIMPL and E_INVALIDARG as failures. Although most COM methods return structured **HRESULT** values, a small number use the **HRESULT** to return a simple integer. Implicitly, these methods are always successful. If you pass an **HRESULT** of this sort to the SUCCEEDED macro, then the macro always returns TRUE. An example of a commonly-called method that doesn't return an **HRESULT** is the **IUnknown::Release** method, which returns a ULONG. This method decrements an object's reference count by one and returns the current reference count. See [Managing a COM object's lifetime](#managing-a-com-objects-lifetime) for a discussion of reference counting. ## The address of a pointer If you view a few COM method reference pages, you'll probably run across something like the following. ```cpp HRESULT D3D12CreateDevice( IUnknown *pAdapter, D3D_FEATURE_LEVEL MinimumFeatureLevel, REFIID riid, void **ppDevice ); ``` While a normal pointer is quite familiar to any C/C++ developer, COM often uses an additional level of indirection. This second level of indirection is indicated by two asterisks, `**`, following the type declaration, and the variable name typically has a prefix of `pp`. For the function above, the `ppDevice` parameter is typically referred to as the address of a pointer to a void. In practice, in this example, `ppDevice` is the address of a pointer to an **ID3D12Device** interface. Unlike a C++ object, you don't access a COM object's methods directly. Instead, you must obtain a pointer to an interface that exposes the method. To invoke the method, you use essentially the same syntax as you would to invoke a pointer to a C++ method. For example, to invoke the **IMyInterface::DoSomething** method, you would use the following syntax. ```cpp IMyInterface * pMyIface = nullptr; ... pMyIface->DoSomething(...); ``` The need for a second level of indirection comes from the fact that you don't create interface pointers directly. You must call one of a variety of methods, such as the **D3D12CreateDevice** method shown above. To use such a method to obtain an interface pointer, you declare a variable as a pointer to the desired interface, and then you pass the address of that variable to the method. In other words, you pass the address of a pointer to the method. When the method returns, the variable points to the requested interface, and you can use that pointer to call any of the interface's methods. ```cpp IDXGIAdapter * pIDXGIAdapter = nullptr; ... ID3D12Device * pD3D12Device = nullptr; HRESULT hr = ::D3D12CreateDevice( pIDXGIAdapter, D3D_FEATURE_LEVEL_11_0, IID_ID3D12Device, &pD3D12Device); if (FAILED(hr)) return E_FAIL; // Now use pD3D12Device in the form pD3D12Device->MethodName(...); ``` ## Creating a COM object There are several ways to create a COM object. These are the two most commonly used in DirectX programming. - Indirectly, by calling a DirectX method or function that creates the object for you. The method creates the object, and returns an interface on the object. When you create an object this way, sometimes you can specify which interface should be returned, other times the interface is implied. The code example above shows how to indirectly create a Direct3D 12 device COM object. - Directly, by passing the object's CLSID to the [**CoCreateInstance function**](/windows/desktop/api/combaseapi/nf-combaseapi-cocreateinstance). The function creates an instance of the object, and it returns a pointer to an interface that you specify. One time, before you create any COM objects, you must initialize COM by calling the [**CoInitializeEx function**](/windows/desktop/api/combaseapi/nf-combaseapi-coinitializeex). If you're creating objects indirectly, then the object creation method handles this task. But, if you need to create an object with **CoCreateInstance**, then you must call **CoInitializeEx** explicitly. When you're finished, COM must be uninitialized by calling [**CoUninitialize**](/windows/desktop/api/combaseapi/nf-combaseapi-couninitialize). If you make a call to **CoInitializeEx** then you must match it with a call to **CoUninitialize**. Typically, applications that need to explicitly initialize COM do so in their startup routine, and they uninitialize COM in their cleanup routine. To create a new instance of a COM object with **CoCreateInstance**, you must have the object's CLSID. If this CLSID is publicly available, you will find it in the reference documentation or the appropriate header file. If the CLSID is not publicly available, then you can't create the object directly. The **CoCreateInstance** function has five parameters. For the COM objects you will be using with DirectX, you can normally set the parameters as follows. *rclsid* Set this to the CLSID of the object that you want to create. *pUnkOuter* Set to `nullptr`. This parameter is used only if you are aggregating objects. A discussion of COM aggregation is outside the scope of this topic. *dwClsContext* Set to CLSCTX_INPROC_SERVER. This setting indicates that the object is implemented as a DLL and runs as part of your application's process. *riid* Set to the IID of the interface that you would like to have returned. The function will create the object and return the requested interface pointer in the ppv parameter. *ppv* Set this to the address of a pointer that will be set to the interface specified by `riid` when the function returns. This variable should be declared as a pointer to the requested interface, and the reference to the pointer in the parameter list should be cast as (LPVOID *). Creating an object indirectly is usually much simpler, as we saw in the code example above. You pass the object creation method the address of an interface pointer, and the method then creates the object and returns an interface pointer. When you create an object indirectly, even if you can't choose which interface the method returns, often you can still specify a variety of things about how the object should be created. For example, you can pass to **D3D12CreateDevice** a value specifying the minimum D3D feature level that the returned device should support, as shown in the code example above. ## Using COM interfaces When you create a COM object, the creation method returns an interface pointer. You can then use that pointer to access any of the interface's methods. The syntax is identical to that used with a pointer to a C++ method. ## Requesting Additional Interfaces In many cases, the interface pointer that you receive from the creation method may be the only one that you need. In fact, it's relatively common for an object to export only one interface other than **IUnknown**. However, many objects export multiple interfaces, and you may need pointers to several of them. If you need more interfaces than the one returned by the creation method, there's no need to create a new object. Instead, request another interface pointer by using the object's [**IUnknown::QueryInterface method**](/windows/desktop/api/unknwn/nf-unknwn-iunknown-queryinterface(refiid_void)). If you create your object with **CoCreateInstance**, then you can request an **IUnknown** interface pointer and then call **IUnknown::QueryInterface** to request every interface you need. However, this approach is inconvenient if you need only a single interface, and it doesn't work at all if you use an object creation method that doesn't allow you to specify which interface pointer should be returned. In practice, you usually don't need to obtain an explicit **IUnknown** pointer, because all COM interfaces extend the **IUnknown** interface. Extending an interface is conceptually similar to inheriting from a C++ class. The child interface exposes all of the parent interface's methods, plus one or more of its own. In fact, you will often see "inherits from" used instead of "extends". What you need to remember is that the inheritance is internal to the object. Your application can't inherit from or extend an object's interface. However, you can use the child interface to call any of the methods of the child or parent. Because all interfaces are children of **IUnknown**, you can call **QueryInterface** on any of the interface pointers that you already have for the object. When you do so, you must provide the IID of the interface that you're requesting and the address of a pointer that will contain the interface pointer when the method returns. For example, the following code fragment calls **IDXGIFactory2::CreateSwapChainForHwnd** to create a primary swap chain object. This object exposes several interfaces. The **CreateSwapChainForHwnd** method returns an **IDXGISwapChain1** interface. The subsequent code then uses the **IDXGISwapChain1** interface to call **QueryInterface** to request an **IDXGISwapChain3** interface. ```cpp HRESULT hr = S_OK; IDXGISwapChain1 * pDXGISwapChain1 = nullptr; hr = pIDXGIFactory->CreateSwapChainForHwnd( pCommandQueue, // For D3D12, this is a pointer to a direct command queue. hWnd, &swapChainDesc, nullptr, nullptr, &pDXGISwapChain1)); if (FAILED(hr)) return hr; IDXGISwapChain3 * pDXGISwapChain3 = nullptr; hr = pDXGISwapChain1->QueryInterface(IID_IDXGISwapChain3, (LPVOID*)&pDXGISwapChain3); if (FAILED(hr)) return hr; ``` > [!NOTE] > In C++ you can make use of the ``IID_PPV_ARGS`` macro rather than the explicit IID and cast pointer: ``pDXGISwapChain1->QueryInterface(IID_PPV_ARGS(&pDXGISwapChain3));``. > This is often used for creation methods as well as **QueryInterface**. See [combaseapi.h](/windows/win32/api/combaseapi/nf-combaseapi-iid_ppv_args) for more information. ## Managing a COM object's lifetime When an object is created, the system allocates the necessary memory resources. When an object is no longer needed, it should be destroyed. The system can use that memory for other purposes. With C++ objects, you can control the object's lifetime directly with the `new` and `delete` operators in cases where you're operating at that level, or just by using the stack and scope lifetime. COM doesn't enable you to directly create or destroy objects. The reason for this design is that the same object may be used by more than one part of your application or, in some cases, by more than one application. If one of those references were to destroy the object, then the other references would become invalid. Instead, COM uses a system of reference counting to control an object's lifetime. An object's reference count is the number of times one of its interfaces has been requested. Each time that an interface is requested, the reference count is incremented. An application releases an interface when that interface is no longer needed, decrementing the reference count. As long as the reference count is greater than zero, the object remains in memory. When the reference count reaches zero, the object destroys itself. You don't need to know anything about the reference count of an object. As long as you obtain and release an object's interfaces properly, the object will have the appropriate lifetime. Properly handling reference counting is a crucial part of COM programming. Failure to do so can easily create a memory leak or a crash. One of the most common mistakes that COM programmers make is failing to release an interface. When this happens, the reference count never reaches zero, and the object remains in memory indefinitely. ## Incrementing and decrementing the reference count Whenever you obtain a new interface pointer, the reference count must be incremented by a call to [**IUnknown::AddRef**](/windows/desktop/api/unknwn/nf-unknwn-iunknown-addref). However, your application doesn't usually need to call this method. If you obtain an interface pointer by calling an object creation method, or by calling **IUnknown::QueryInterface**, then the object automatically increments the reference count. However, if you create an interface pointer in some other way, such as copying an existing pointer, then you must explicitly call **IUnknown::AddRef**. Otherwise, when you release the original interface pointer, the object may be destroyed even though you may still need to use the copy of the pointer. You must release all interface pointers, regardless of whether you or the object incremented the reference count. When you no longer need an interface pointer, call [**IUnknown::Release**](/windows/desktop/api/unknwn/nf-unknwn-iunknown-release) to decrement the reference count. A common practice is to initialize all interface pointers to `nullptr`, and then to set them back to `nullptr` when they are released. That convention allows you to test all interface pointers in your cleanup code. Those that are not `nullptr` are still active, and you need to release them before you terminate the application. The following code fragment extends the sample shown earlier to illustrate how to handle reference counting. ```cpp HRESULT hr = S_OK; IDXGISwapChain1 * pDXGISwapChain1 = nullptr; hr = pIDXGIFactory->CreateSwapChainForHwnd( pCommandQueue, // For D3D12, this is a pointer to a direct command queue. hWnd, &swapChainDesc, nullptr, nullptr, &pDXGISwapChain1)); if (FAILED(hr)) return hr; IDXGISwapChain3 * pDXGISwapChain3 = nullptr; hr = pDXGISwapChain1->QueryInterface(IID_IDXGISwapChain3, (LPVOID*)&pDXGISwapChain3); if (FAILED(hr)) return hr; IDXGISwapChain3 * pDXGISwapChain3Copy = nullptr; // Make a copy of the IDXGISwapChain3 interface pointer. // Call AddRef to increment the reference count and to ensure that // the object is not destroyed prematurely. pDXGISwapChain3Copy = pDXGISwapChain3; pDXGISwapChain3Copy->AddRef(); ... // Cleanup code. Check to see whether the pointers are still active. // If they are, then call Release to release the interface. if (pDXGISwapChain1 != nullptr) { pDXGISwapChain1->Release(); pDXGISwapChain1 = nullptr; } if (pDXGISwapChain3 != nullptr) { pDXGISwapChain3->Release(); pDXGISwapChain3 = nullptr; } if (pDXGISwapChain3Copy != nullptr) { pDXGISwapChain3Copy->Release(); pDXGISwapChain3Copy = nullptr; } ``` ## COM Smart Pointers The code so far has explicitly called ``Release`` and ``AddRef`` to maintain the reference counts using **IUnknown** methods. This pattern requires the programmer to be diligent in remembering to properly maintain the count in all possible codepaths. This can result in complicated error-handling, and with C++ exception handling enabled can be particularly difficult to implement. A better solution with C++ is to make use of a [smart pointer](/cpp/cpp/smart-pointers-modern-cpp). * **winrt::com_ptr** is a smart pointer provided by the [C++/WinRT language projections](/uwp/cpp-ref-for-winrt/com-ptr). This is the recommended COM smart pointer to use for UWP apps. Note that C++/WinRT requires C++17. * **Microsoft::WRL::ComPtr** is a smart pointer provided by the [Windows Runtime C++ Template Library (WRL)](/cpp/cppcx/wrl/comptr-class). This library is "pure" C++ so it can be utilized for Windows Runtime applications (via C++/CX or C++/WinRT) as well as classic Win32 desktop applications. This smart pointer also works on older versions of Windows that do not support the Windows Runtime APIs. For Win32 desktop applications, you can use ``#include <wrl/client.h>`` to only include this class and optionally define the preprocessor symbol ``__WRL_CLASSIC_COM_STRICT__`` as well. For more information, see [COM smart pointers revisited](/archive/msdn-magazine/2015/february/windows-with-c-com-smart-pointers-revisited). * **CComPtr** is a smart pointer provided by the [Active Template Library (ATL)](/cpp/atl/reference/ccomptr-class). The **Microsoft::WRL::ComPtr** is a newer version of this implementation that addresses a number of subtle usage issues, so use of this smart pointer is not recommended for new projects. For more information, see [How to create and use CComPtr and CComQIPtr](/cpp/cpp/how-to-create-and-use-ccomptr-and-ccomqiptr-instances). ## Using ATL with DirectX 9 To use the Active Template Library (ATL) with DirectX 9, you must redefine the interfaces for ATL compatibility. This allows you to properly use the **CComQIPtr** class to obtain a pointer to an interface. You'll know if you don't redefine the interfaces for ATL, because you'll see the following error message. ``` [...]\atlmfc\include\atlbase.h(4704) : error C2787: 'IDirectXFileData' : no GUID has been associated with this object ``` The following code sample shows how to define the IDirectXFileData interface. ```cpp // Explicit declaration struct __declspec(uuid("{3D82AB44-62DA-11CF-AB39-0020AF71E433}")) IDirectXFileData; // Macro method #define RT_IID(iid_, name_) struct __declspec(uuid(iid_)) name_ RT_IID("{1DD9E8DA-1C77-4D40-B0CF-98FEFDFF9512}", IDirectXFileData); ``` After redefining the interface, you must use the **Attach** method to attach the interface to the interface pointer returned by **::Direct3DCreate9**. If you don't, then the **IDirect3D9** interface won't be properly released by the smart pointer class. The **CComPtr** class internally calls **IUnknown::AddRef** on the interface pointer when the object is created and when an interface is assigned to the **CComPtr** class. To avoid leaking the interface pointer, don't call **IUnknown::AddRef on the interface returned from **::Direct3DCreate9**. The following code properly releases the interface without calling **IUnknown::AddRef**. ```cpp CComPtr<IDirect3D9> d3d; d3d.Attach(::Direct3DCreate9(D3D_SDK_VERSION)); ``` Use the previous code. Don't use the following code, which calls **IUnknown::AddRef** followed by **IUnknown::Release**, and doesn't release the reference added by **::Direct3DCreate9**. ```cpp CComPtr<IDirect3D9> d3d = ::Direct3DCreate9(D3D_SDK_VERSION); ``` Note that this is the only place in Direct3D 9 where you'll have to use the **Attach** method in this manner. For more information about the **CComPTR** and **CComQIPtr** classes, see their definitions in the `Atlbase.h` header file.
{ "pile_set_name": "Github" }
#!/bin/bash # called by dracut check() { local _rootdev # No mdadm? No mdraid support. require_binaries mdadm expr || return 1 [[ $hostonly ]] || [[ $mount_needs ]] && { for dev in "${!host_fs_types[@]}"; do [[ "${host_fs_types[$dev]}" != *_raid_member ]] && continue DEVPATH=$(get_devpath_block "$dev") for holder in "$DEVPATH"/holders/*; do [[ -e "$holder" ]] || continue [[ -e "$holder/md" ]] && return 0 break done done return 255 } return 0 } # called by dracut depends() { echo rootfs-block return 0 } # called by dracut installkernel() { instmods =drivers/md } # called by dracut cmdline() { local _activated dev line UUID declare -A _activated for dev in "${!host_fs_types[@]}"; do [[ "${host_fs_types[$dev]}" != *_raid_member ]] && continue UUID=$( /sbin/mdadm --examine --export $dev \ | while read line || [ -n "$line" ]; do [[ ${line#MD_UUID=} = $line ]] && continue printf "%s" "${line#MD_UUID=} " done ) [[ -z "$UUID" ]] && continue if ! [[ ${_activated[${UUID}]} ]]; then printf "%s" " rd.md.uuid=${UUID}" _activated["${UUID}"]=1 fi done } # called by dracut install() { local rule rule_path inst_multiple cat expr inst_multiple -o mdmon inst $(command -v partx) /sbin/partx inst $(command -v mdadm) /sbin/mdadm if [[ $hostonly_cmdline == "yes" ]]; then local _raidconf=$(cmdline) [[ $_raidconf ]] && printf "%s\n" "$_raidconf" >> "${initdir}/etc/cmdline.d/90mdraid.conf" fi # <mdadm-3.3 udev rule inst_rules 64-md-raid.rules # >=mdadm-3.3 udev rules inst_rules 63-md-raid-arrays.rules 64-md-raid-assembly.rules # remove incremental assembly from stock rules, so they don't shadow # 65-md-inc*.rules and its fine-grained controls, or cause other problems # when we explicitly don't want certain components to be incrementally # assembled for rule in 64-md-raid.rules 64-md-raid-assembly.rules; do rule_path="${initdir}${udevdir}/rules.d/${rule}" [ -f "${rule_path}" ] && sed -i -r \ -e '/(RUN|IMPORT\{program\})\+?="[[:alpha:]/]*mdadm[[:blank:]]+(--incremental|-I)[[:blank:]]+(--export )?(\$env\{DEVNAME\}|\$tempnode|\$devnode)/d' \ "${rule_path}" done inst_rules "$moddir/65-md-incremental-imsm.rules" inst_rules "$moddir/59-persistent-storage-md.rules" prepare_udev_rules 59-persistent-storage-md.rules # guard against pre-3.0 mdadm versions, that can't handle containers if ! mdadm -Q -e imsm /dev/null >/dev/null 2>&1; then inst_hook pre-trigger 30 "$moddir/md-noimsm.sh" fi if ! mdadm -Q -e ddf /dev/null >/dev/null 2>&1; then inst_hook pre-trigger 30 "$moddir/md-noddf.sh" fi if [[ $hostonly ]] || [[ $mdadmconf = "yes" ]]; then if [ -f $dracutsysrootdir/etc/mdadm.conf ]; then inst -H /etc/mdadm.conf else [ -f $dracutsysrootdir/etc/mdadm/mdadm.conf ] && inst -H /etc/mdadm/mdadm.conf /etc/mdadm.conf fi if [ -d $dracutsysrootdir/etc/mdadm.conf.d ]; then local f inst_dir /etc/mdadm.conf.d for f in /etc/mdadm.conf.d/*.conf; do [ -f "$dracutsysrootdir$f" ] || continue inst -H "$f" done fi fi inst_hook pre-udev 30 "$moddir/mdmon-pre-udev.sh" inst_hook pre-trigger 30 "$moddir/parse-md.sh" inst_hook pre-mount 10 "$moddir/mdraid-waitclean.sh" inst_hook cleanup 99 "$moddir/mdraid-needshutdown.sh" inst_hook shutdown 30 "$moddir/md-shutdown.sh" inst_script "$moddir/mdraid-cleanup.sh" /sbin/mdraid-cleanup inst_script "$moddir/mdraid_start.sh" /sbin/mdraid_start if dracut_module_included "systemd"; then if [ -e $dracutsysrootdir$systemdsystemunitdir/[email protected] ]; then inst_simple $systemdsystemunitdir/[email protected] fi if [ -e $dracutsysrootdir$systemdsystemunitdir/[email protected] ]; then inst_simple $systemdsystemunitdir/[email protected] fi if [ -e $dracutsysrootdir$systemdsystemunitdir/[email protected] ]; then inst_simple $systemdsystemunitdir/[email protected] fi fi inst_hook pre-shutdown 30 "$moddir/mdmon-pre-shutdown.sh" dracut_need_initqueue }
{ "pile_set_name": "Github" }
/* * QTest I2C driver * * Copyright (c) 2012 Andreas Färber * * This work is licensed under the terms of the GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" #include "libqos/i2c.h" #include "libqtest.h" void i2c_send(I2CAdapter *i2c, uint8_t addr, const uint8_t *buf, uint16_t len) { i2c->send(i2c, addr, buf, len); } void i2c_recv(I2CAdapter *i2c, uint8_t addr, uint8_t *buf, uint16_t len) { i2c->recv(i2c, addr, buf, len); }
{ "pile_set_name": "Github" }
/* DVB USB compliant Linux driver for the Friio USB2.0 ISDB-T receiver. * * Copyright (C) 2009 Akihiro Tsukada <[email protected]> * * This module is based off the the gl861 and vp702x modules. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free * Software Foundation, version 2. * * see Documentation/dvb/README.dvb-usb for more information */ #include "friio.h" /* debug */ int dvb_usb_friio_debug; module_param_named(debug, dvb_usb_friio_debug, int, 0644); MODULE_PARM_DESC(debug, "set debugging level (1=info,2=xfer,4=rc,8=fe (or-able))." DVB_USB_DEBUG_STATUS); DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); /** * Indirect I2C access to the PLL via FE. * whole I2C protocol data to the PLL is sent via the FE's I2C register. * This is done by a control msg to the FE with the I2C data accompanied, and * a specific USB request number is assigned for that purpose. * * this func sends wbuf[1..] to the I2C register wbuf[0] at addr (= at FE). * TODO: refoctored, smarter i2c functions. */ static int gl861_i2c_ctrlmsg_data(struct dvb_usb_device *d, u8 addr, u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) { u16 index = wbuf[0]; /* must be JDVBT90502_2ND_I2C_REG(=0xFE) */ u16 value = addr << (8 + 1); int wo = (rbuf == NULL || rlen == 0); /* write only */ u8 req, type; deb_xfer("write to PLL:0x%02x via FE reg:0x%02x, len:%d\n", wbuf[1], wbuf[0], wlen - 1); if (wo && wlen >= 2) { req = GL861_REQ_I2C_DATA_CTRL_WRITE; type = GL861_WRITE; udelay(20); return usb_control_msg(d->udev, usb_sndctrlpipe(d->udev, 0), req, type, value, index, &wbuf[1], wlen - 1, 2000); } deb_xfer("not supported ctrl-msg, aborting."); return -EINVAL; } /* normal I2C access (without extra data arguments). * write to the register wbuf[0] at I2C address addr with the value wbuf[1], * or read from the register wbuf[0]. * register address can be 16bit (wbuf[2]<<8 | wbuf[0]) if wlen==3 */ static int gl861_i2c_msg(struct dvb_usb_device *d, u8 addr, u8 *wbuf, u16 wlen, u8 *rbuf, u16 rlen) { u16 index; u16 value = addr << (8 + 1); int wo = (rbuf == NULL || rlen == 0); /* write-only */ u8 req, type; unsigned int pipe; /* special case for the indirect I2C access to the PLL via FE, */ if (addr == friio_fe_config.demod_address && wbuf[0] == JDVBT90502_2ND_I2C_REG) return gl861_i2c_ctrlmsg_data(d, addr, wbuf, wlen, rbuf, rlen); if (wo) { req = GL861_REQ_I2C_WRITE; type = GL861_WRITE; pipe = usb_sndctrlpipe(d->udev, 0); } else { /* rw */ req = GL861_REQ_I2C_READ; type = GL861_READ; pipe = usb_rcvctrlpipe(d->udev, 0); } switch (wlen) { case 1: index = wbuf[0]; break; case 2: index = wbuf[0]; value = value + wbuf[1]; break; case 3: /* special case for 16bit register-address */ index = (wbuf[2] << 8) | wbuf[0]; value = value + wbuf[1]; break; default: deb_xfer("wlen = %x, aborting.", wlen); return -EINVAL; } msleep(1); return usb_control_msg(d->udev, pipe, req, type, value, index, rbuf, rlen, 2000); } /* I2C */ static int gl861_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg msg[], int num) { struct dvb_usb_device *d = i2c_get_adapdata(adap); int i; if (num > 2) return -EINVAL; if (mutex_lock_interruptible(&d->i2c_mutex) < 0) return -EAGAIN; for (i = 0; i < num; i++) { /* write/read request */ if (i + 1 < num && (msg[i + 1].flags & I2C_M_RD)) { if (gl861_i2c_msg(d, msg[i].addr, msg[i].buf, msg[i].len, msg[i + 1].buf, msg[i + 1].len) < 0) break; i++; } else if (gl861_i2c_msg(d, msg[i].addr, msg[i].buf, msg[i].len, NULL, 0) < 0) break; } mutex_unlock(&d->i2c_mutex); return i; } static u32 gl861_i2c_func(struct i2c_adapter *adapter) { return I2C_FUNC_I2C; } static int friio_ext_ctl(struct dvb_usb_adapter *adap, u32 sat_color, int lnb_on) { int i; int ret; struct i2c_msg msg; u8 *buf; u32 mask; u8 lnb = (lnb_on) ? FRIIO_CTL_LNB : 0; buf = kmalloc(2, GFP_KERNEL); if (!buf) return -ENOMEM; msg.addr = 0x00; msg.flags = 0; msg.len = 2; msg.buf = buf; buf[0] = 0x00; /* send 2bit header (&B10) */ buf[1] = lnb | FRIIO_CTL_LED | FRIIO_CTL_STROBE; ret = gl861_i2c_xfer(&adap->dev->i2c_adap, &msg, 1); buf[1] |= FRIIO_CTL_CLK; ret += gl861_i2c_xfer(&adap->dev->i2c_adap, &msg, 1); buf[1] = lnb | FRIIO_CTL_STROBE; ret += gl861_i2c_xfer(&adap->dev->i2c_adap, &msg, 1); buf[1] |= FRIIO_CTL_CLK; ret += gl861_i2c_xfer(&adap->dev->i2c_adap, &msg, 1); /* send 32bit(satur, R, G, B) data in serial */ mask = 1 << 31; for (i = 0; i < 32; i++) { buf[1] = lnb | FRIIO_CTL_STROBE; if (sat_color & mask) buf[1] |= FRIIO_CTL_LED; ret += gl861_i2c_xfer(&adap->dev->i2c_adap, &msg, 1); buf[1] |= FRIIO_CTL_CLK; ret += gl861_i2c_xfer(&adap->dev->i2c_adap, &msg, 1); mask >>= 1; } /* set the strobe off */ buf[1] = lnb; ret += gl861_i2c_xfer(&adap->dev->i2c_adap, &msg, 1); buf[1] |= FRIIO_CTL_CLK; ret += gl861_i2c_xfer(&adap->dev->i2c_adap, &msg, 1); kfree(buf); return (ret == 70); } static int friio_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff); /* TODO: move these init cmds to the FE's init routine? */ static u8 streaming_init_cmds[][2] = { {0x33, 0x08}, {0x37, 0x40}, {0x3A, 0x1F}, {0x3B, 0xFF}, {0x3C, 0x1F}, {0x3D, 0xFF}, {0x38, 0x00}, {0x35, 0x00}, {0x39, 0x00}, {0x36, 0x00}, }; static int cmdlen = sizeof(streaming_init_cmds) / 2; /* * Command sequence in this init function is a replay * of the captured USB commands from the Windows proprietary driver. */ static int friio_initialize(struct dvb_usb_device *d) { int ret; int i; int retry = 0; u8 *rbuf, *wbuf; deb_info("%s called.\n", __func__); wbuf = kmalloc(3, GFP_KERNEL); if (!wbuf) return -ENOMEM; rbuf = kmalloc(2, GFP_KERNEL); if (!rbuf) { kfree(wbuf); return -ENOMEM; } /* use gl861_i2c_msg instead of gl861_i2c_xfer(), */ /* because the i2c device is not set up yet. */ wbuf[0] = 0x11; wbuf[1] = 0x02; ret = gl861_i2c_msg(d, 0x00, wbuf, 2, NULL, 0); if (ret < 0) goto error; msleep(2); wbuf[0] = 0x11; wbuf[1] = 0x00; ret = gl861_i2c_msg(d, 0x00, wbuf, 2, NULL, 0); if (ret < 0) goto error; msleep(1); /* following msgs should be in the FE's init code? */ /* cmd sequence to identify the device type? (friio black/white) */ wbuf[0] = 0x03; wbuf[1] = 0x80; /* can't use gl861_i2c_cmd, as the register-addr is 16bit(0x0100) */ ret = usb_control_msg(d->udev, usb_sndctrlpipe(d->udev, 0), GL861_REQ_I2C_DATA_CTRL_WRITE, GL861_WRITE, 0x1200, 0x0100, wbuf, 2, 2000); if (ret < 0) goto error; msleep(2); wbuf[0] = 0x00; wbuf[2] = 0x01; /* reg.0x0100 */ wbuf[1] = 0x00; ret = gl861_i2c_msg(d, 0x12 >> 1, wbuf, 3, rbuf, 2); /* my Friio White returns 0xffff. */ if (ret < 0 || rbuf[0] != 0xff || rbuf[1] != 0xff) goto error; msleep(2); wbuf[0] = 0x03; wbuf[1] = 0x80; ret = usb_control_msg(d->udev, usb_sndctrlpipe(d->udev, 0), GL861_REQ_I2C_DATA_CTRL_WRITE, GL861_WRITE, 0x9000, 0x0100, wbuf, 2, 2000); if (ret < 0) goto error; msleep(2); wbuf[0] = 0x00; wbuf[2] = 0x01; /* reg.0x0100 */ wbuf[1] = 0x00; ret = gl861_i2c_msg(d, 0x90 >> 1, wbuf, 3, rbuf, 2); /* my Friio White returns 0xffff again. */ if (ret < 0 || rbuf[0] != 0xff || rbuf[1] != 0xff) goto error; msleep(1); restart: /* ============ start DEMOD init cmds ================== */ /* read PLL status to clear the POR bit */ wbuf[0] = JDVBT90502_2ND_I2C_REG; wbuf[1] = (FRIIO_PLL_ADDR << 1) + 1; /* +1 for reading */ ret = gl861_i2c_msg(d, FRIIO_DEMOD_ADDR, wbuf, 2, NULL, 0); if (ret < 0) goto error; msleep(5); /* note: DEMODULATOR has 16bit register-address. */ wbuf[0] = 0x00; wbuf[2] = 0x01; /* reg addr: 0x0100 */ wbuf[1] = 0x00; /* val: not used */ ret = gl861_i2c_msg(d, FRIIO_DEMOD_ADDR, wbuf, 3, rbuf, 1); if (ret < 0) goto error; /* msleep(1); wbuf[0] = 0x80; wbuf[1] = 0x00; ret = gl861_i2c_msg(d, FRIIO_DEMOD_ADDR, wbuf, 2, rbuf, 1); if (ret < 0) goto error; */ if (rbuf[0] & 0x80) { /* still in PowerOnReset state? */ if (++retry > 3) { deb_info("failed to get the correct" " FE demod status:0x%02x\n", rbuf[0]); goto error; } msleep(100); goto restart; } /* TODO: check return value in rbuf */ /* =========== end DEMOD init cmds ===================== */ msleep(1); wbuf[0] = 0x30; wbuf[1] = 0x04; ret = gl861_i2c_msg(d, 0x00, wbuf, 2, NULL, 0); if (ret < 0) goto error; msleep(2); /* following 2 cmds unnecessary? */ wbuf[0] = 0x00; wbuf[1] = 0x01; ret = gl861_i2c_msg(d, 0x00, wbuf, 2, NULL, 0); if (ret < 0) goto error; wbuf[0] = 0x06; wbuf[1] = 0x0F; ret = gl861_i2c_msg(d, 0x00, wbuf, 2, NULL, 0); if (ret < 0) goto error; /* some streaming ctl cmds (maybe) */ msleep(10); for (i = 0; i < cmdlen; i++) { ret = gl861_i2c_msg(d, 0x00, streaming_init_cmds[i], 2, NULL, 0); if (ret < 0) goto error; msleep(1); } msleep(20); /* change the LED color etc. */ ret = friio_streaming_ctrl(&d->adapter[0], 0); if (ret < 0) goto error; return 0; error: kfree(wbuf); kfree(rbuf); deb_info("%s:ret == %d\n", __func__, ret); return -EIO; } /* Callbacks for DVB USB */ static int friio_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff) { int ret; deb_info("%s called.(%d)\n", __func__, onoff); /* set the LED color and saturation (and LNB on) */ if (onoff) ret = friio_ext_ctl(adap, 0x6400ff64, 1); else ret = friio_ext_ctl(adap, 0x96ff00ff, 1); if (ret != 1) { deb_info("%s failed to send cmdx. ret==%d\n", __func__, ret); return -EREMOTEIO; } return 0; } static int friio_frontend_attach(struct dvb_usb_adapter *adap) { if (friio_initialize(adap->dev) < 0) return -EIO; adap->fe_adap[0].fe = jdvbt90502_attach(adap->dev); if (adap->fe_adap[0].fe == NULL) return -EIO; return 0; } /* DVB USB Driver stuff */ static struct dvb_usb_device_properties friio_properties; static int friio_probe(struct usb_interface *intf, const struct usb_device_id *id) { struct dvb_usb_device *d; struct usb_host_interface *alt; int ret; if (intf->num_altsetting < GL861_ALTSETTING_COUNT) return -ENODEV; alt = usb_altnum_to_altsetting(intf, FRIIO_BULK_ALTSETTING); if (alt == NULL) { deb_rc("not alt found!\n"); return -ENODEV; } ret = usb_set_interface(interface_to_usbdev(intf), alt->desc.bInterfaceNumber, alt->desc.bAlternateSetting); if (ret != 0) { deb_rc("failed to set alt-setting!\n"); return ret; } ret = dvb_usb_device_init(intf, &friio_properties, THIS_MODULE, &d, adapter_nr); if (ret == 0) friio_streaming_ctrl(&d->adapter[0], 1); return ret; } struct jdvbt90502_config friio_fe_config = { .demod_address = FRIIO_DEMOD_ADDR, .pll_address = FRIIO_PLL_ADDR, }; static struct i2c_algorithm gl861_i2c_algo = { .master_xfer = gl861_i2c_xfer, .functionality = gl861_i2c_func, }; static struct usb_device_id friio_table[] = { { USB_DEVICE(USB_VID_774, USB_PID_FRIIO_WHITE) }, { } /* Terminating entry */ }; MODULE_DEVICE_TABLE(usb, friio_table); static struct dvb_usb_device_properties friio_properties = { .caps = DVB_USB_IS_AN_I2C_ADAPTER, .usb_ctrl = DEVICE_SPECIFIC, .size_of_priv = 0, .num_adapters = 1, .adapter = { /* caps:0 => no pid filter, 188B TS packet */ /* GL861 has a HW pid filter, but no info available. */ { .num_frontends = 1, .fe = {{ .caps = 0, .frontend_attach = friio_frontend_attach, .streaming_ctrl = friio_streaming_ctrl, .stream = { .type = USB_BULK, /* count <= MAX_NO_URBS_FOR_DATA_STREAM(10) */ .count = 8, .endpoint = 0x01, .u = { /* GL861 has 6KB buf inside */ .bulk = { .buffersize = 16384, } } }, }}, } }, .i2c_algo = &gl861_i2c_algo, .num_device_descs = 1, .devices = { { .name = "774 Friio ISDB-T USB2.0", .cold_ids = { NULL }, .warm_ids = { &friio_table[0], NULL }, }, } }; static struct usb_driver friio_driver = { .name = "dvb_usb_friio", .probe = friio_probe, .disconnect = dvb_usb_device_exit, .id_table = friio_table, }; module_usb_driver(friio_driver); MODULE_AUTHOR("Akihiro Tsukada <[email protected]>"); MODULE_DESCRIPTION("Driver for Friio ISDB-T USB2.0 Receiver"); MODULE_VERSION("0.2"); MODULE_LICENSE("GPL");
{ "pile_set_name": "Github" }
sha256:a994dfec515ed4d64e546df2595b0c6f9964d07a70babccb0e1049da5e284e3f
{ "pile_set_name": "Github" }